Skip to content

Commit 66c82bd

Browse files
committed
Added NPCTickAI(), AvatarTickAI() in cCreatureAnimal. Added CreaturePersonality enum.
1 parent d7ce59c commit 66c82bd

File tree

14 files changed

+55
-90
lines changed

14 files changed

+55
-90
lines changed

Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ namespace Simulator
159159
namespace Addresses(cCreatureAnimal)
160160
{
161161
DefineAddress(Create, SelectAddress(0xC092A0, 0xC09B40));
162+
DefineAddress(NPCTickAI, SelectAddress(0xC08CD0, 0xC09570));
163+
DefineAddress(AvatarTickAI, SelectAddress(0xC03710, 0xC04020));
162164
}
163165

164166
namespace Addresses(cCreatureBase)

Spore ModAPI/SourceCode/Simulator/cCreatureAnimal.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,9 @@ namespace Simulator
8080
auto_METHOD(cCreatureBase, int, PlayVoice,
8181
Args(const char* pName, int param2, int param3),
8282
Args(pName, param2, param3));
83+
84+
85+
auto_METHOD_VOID(cCreatureAnimal, NPCTickAI, Args(float f), Args(f));
86+
auto_METHOD_VOID(cCreatureAnimal, AvatarTickAI, Args(float f), Args(f));
8387
}
8488
#endif

Spore ModAPI/Spore ModAPI.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@
732732
<ClInclude Include="Spore\Swarm\CollectionResource.h" />
733733
<ClInclude Include="Spore\Swarm\Components\cCameraDescription.h" />
734734
<ClInclude Include="Spore\Swarm\Components\cDistributeDescription.h" />
735-
<ClInclude Include="Spore\Swarm\Components\cDistributeEffect.h" />
735+
<ClInclude Include="Spore\Swarm\cDistributeEffect.h" />
736736
<ClInclude Include="Spore\Swarm\Components\DistributeEffect.h" />
737737
<ClInclude Include="Spore\Swarm\Components\SkinpaintDistributeEffect.h" />
738738
<ClInclude Include="Spore\Swarm\Components\SkinpaintParticleEffect.h" />

Spore ModAPI/Spore ModAPI.vcxproj.filters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2121,7 +2121,7 @@
21212121
<ClInclude Include="Spore\Swarm\Components\cDistributeDescription.h">
21222122
<Filter>Header Files</Filter>
21232123
</ClInclude>
2124-
<ClInclude Include="Spore\Swarm\Components\cDistributeEffect.h">
2124+
<ClInclude Include="Spore\Swarm\cDistributeEffect.h">
21252125
<Filter>Header Files</Filter>
21262126
</ClInclude>
21272127
<ClInclude Include="Spore\Swarm\ParticleStreamers.h">

Spore ModAPI/Spore/App/ICamera.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ namespace App
4141
: public Object
4242
{
4343
public:
44+
enum CameraControlMessages
45+
{
46+
/// The data is a float*, only changes the initial zoom
47+
kMsgInitialZoom = 0x101D445,
48+
/// The data is a float*, sets the current and initial zoom
49+
kMsgZoom = 0x101D4C7,
50+
};
4451

4552
static const uint32_t TYPE = 0x29DA727;
4653

Spore ModAPI/Spore/Graphics/ILightingWorld.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace Graphics
4343

4444
virtual ~ILightingWorld() {};
4545

46-
/* 0Ch */ virtual int AddLight(const Vector3& position, const ColorRGB& color, float, float) = 0;
46+
/* 0Ch */ virtual int AddLight(const Vector3& position, const ColorRGB& color, float strength, float size) = 0;
4747

4848
/* 10h */ virtual void UpdateLightPosition(int index, const Vector3&) = 0;
4949

Spore ModAPI/Spore/Graphics/IModelWorld.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ namespace Graphics
9292
: requiredGroupFlags()
9393
, excludedGroupFlags()
9494
, filterFunction(nullptr)
95-
, collisionMode(CollisionMode::Lod0KDTree)
95+
, collisionMode(CollisionMode::MeshCluster)
9696
, flags(kUseModelCollisionMode)
9797
{
9898
}

Spore ModAPI/Spore/Graphics/Model.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@
3838
namespace Graphics
3939
{
4040
enum class CollisionMode : uint8_t {
41-
/// Just intersect with the bounding box
42-
BoundingBox = 0,
43-
TightBoundingBox = 1,
41+
/// Only use the bounding radius to intersect
42+
BoundingSphere = 0,
43+
/// Only use the bounding box to intersect
44+
BoundingBox = 1,
4445
/// Check intersection with the hull mesh
45-
HullKDTree = 2,
46-
/// Check intersection with the LOD0 mesh
47-
Lod0KDTree = 3,
48-
Unk4 = 4
46+
HullTriangle = 2,
47+
/// Check intersection with the LOD0 mesh, in an optimized but more imprecise way
48+
MeshCluster = 3,
49+
/// Check intersection with the LOD0 mesh triangle geometry, the slowest but most precise
50+
MeshTriangle = 4
4951
};
5052

5153
class IModelWorld;

Spore ModAPI/Spore/Graphics/cMITextureSet.h

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,30 @@
55

66
namespace Graphics
77
{
8-
class cMITextureSet
8+
class cShaderDataTextureSet
99
{
10-
public:
1110
struct Entry
1211
{
1312
Texture* mpTexture;
1413
char field_4[12]; // related with sampler states
1514
};
15+
ASSERT_SIZE(Entry, 0x10);
16+
17+
/* 00h */ int mEntryCount;
18+
/* 04h */ Entry mEntries[6];
19+
};
20+
21+
class cMITextureSet
22+
{
23+
public:
1624

1725
virtual ~cMITextureSet();
1826

19-
/* 04h */ uint16_t field_4; // 0x20D, maybe shader data index
20-
/* 06h */ uint16_t field_6; // 0x64
21-
/* 08h */ void* field_8; // &mEntryCount
22-
/* 0Ch */ int mEntryCount;
23-
/* 10h */ Entry mEntries[6];
27+
/* 04h */ uint16_t mShaderDataIndex; // 0x20D, maybe shader data index
28+
/* 06h */ uint16_t mShaderDataSize; // 0x64
29+
/* 08h */ cShaderDataTextureSet* mShaderData; // &mEntryCount
30+
/* 0Ch */ cShaderDataTextureSet mData;
2431
};
2532

26-
ASSERT_SIZE(cMITextureSet::Entry, 0x10);
2733
ASSERT_SIZE(cMITextureSet, 0x70);
2834
}

Spore ModAPI/Spore/Pollinator/cAssetMetadata.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace Pollinator
3535
eastl::string16 GetDescription() const;
3636
eastl::string16 GetAuthor() const;
3737
int64_t GetAuthorID() const;
38-
const eastl::vector<eastl::string16>& GetAuthors() const;
38+
const eastl::vector<eastl::string8>& GetAuthors() const;
3939
const eastl::vector<eastl::string16>& GetTags() const;
4040

4141
const eastl::vector<uint32_t>& GetConsequenceTraits() const;
@@ -61,7 +61,7 @@ namespace Pollinator
6161
/* 74h */ bool mIsShareable; // true
6262
/* 78h */ eastl::string16 mName;
6363
/* 88h */ eastl::string16 mDescription;
64-
/* 98h */ eastl::vector<eastl::string16> mAuthors;
64+
/* 98h */ eastl::vector<eastl::string8> mAuthors;
6565
/* ACh */ eastl::vector<eastl::string16> mTags;
6666
/* C0h */ eastl::vector<uint32_t> mConsequenceTraits;
6767
};
@@ -89,7 +89,7 @@ namespace Pollinator
8989
inline eastl::string16 cAssetMetadata::GetDescription() const { return mDescription; }
9090
inline eastl::string16 cAssetMetadata::GetAuthor() const { return mAuthorName; }
9191
inline int64_t cAssetMetadata::GetAuthorID() const { return mAuthorID; }
92-
inline const eastl::vector<eastl::string16>& cAssetMetadata::GetAuthors() const { return mAuthors; }
92+
inline const eastl::vector<eastl::string8>& cAssetMetadata::GetAuthors() const { return mAuthors; }
9393
inline const eastl::vector<eastl::string16>& cAssetMetadata::GetTags() const { return mTags; }
9494

9595
inline const eastl::vector<uint32_t>& cAssetMetadata::GetConsequenceTraits() const { return mConsequenceTraits; }

0 commit comments

Comments
 (0)