From bb671fdeba22ef2167994922b100b772dcf794ed Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Tue, 9 Jan 2024 00:48:35 +0100 Subject: [PATCH] 3rdParty: update Spore-ModAPI to v2.5.301 --- 3rdParty/BuildSporeModAPI.bat | 2 +- 3rdParty/Spore-ModAPI/.gitrepo | 4 +- .../SDKtoGhidra/SporeGhidra_disk.xml | 348 ++++++++++++++++-- .../SDKtoGhidra/SporeGhidra_march2017.xml | 345 +++++++++++++++-- .../SourceCode/DLL/AddressesSimulator.cpp | 21 +- .../SourceCode/Simulator/GameNounManager.cpp | 6 + .../SourceCode/Simulator/SimulatorMisc.cpp | 16 + .../Spore ModAPI/Spore ModAPI.vcxproj | 1 + .../Spore ModAPI/Spore ModAPI.vcxproj.filters | 5 +- .../Spore/Editors/INameableEntity.h | 12 +- .../Spore ModAPI/Spore/Simulator.h | 1 + .../Simulator/SubSystem/GameNounManager.h | 9 +- .../SubSystem/GamePersistenceManager.h | 67 ++++ .../Spore/Simulator/cCivilization.h | 8 +- .../Spore/Simulator/cIdentityColorable.h | 13 +- .../Spore ModAPI/Spore/Simulator/cPlayer.h | 120 +++++- .../Spore/Simulator/cSpeciesProfile.h | 14 +- 17 files changed, 916 insertions(+), 76 deletions(-) create mode 100644 3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/SubSystem/GamePersistenceManager.h diff --git a/3rdParty/BuildSporeModAPI.bat b/3rdParty/BuildSporeModAPI.bat index 3d0d65e..1ecfa31 100644 --- a/3rdParty/BuildSporeModAPI.bat +++ b/3rdParty/BuildSporeModAPI.bat @@ -4,7 +4,7 @@ set SPOREMODAPI_CUR_DIR=%~dp0 msbuild "%SPOREMODAPI_CUR_DIR%\Spore-ModAPI\Spore ModAPI" ^ /p:Configuration="Release DLL" ^ - /p:SDK_BUILD_VER=300 ^ + /p:SDK_BUILD_VER=301 ^ /p:EXECUTABLE_TYPE=10 ^ /p:Platform=Win32 ^ /m diff --git a/3rdParty/Spore-ModAPI/.gitrepo b/3rdParty/Spore-ModAPI/.gitrepo index 6d81264..3a6c439 100644 --- a/3rdParty/Spore-ModAPI/.gitrepo +++ b/3rdParty/Spore-ModAPI/.gitrepo @@ -6,7 +6,7 @@ [subrepo] remote = git@github.com:emd4600/Spore-ModAPI.git branch = master - commit = 42b62a380901f9c0e4ae14b120c4abeb55c54750 - parent = ab127d265d02d9dca33d9bb9a4b04169c455ceec + commit = e7954a61f5c33f82eea47c047b2cda6c9d383c3d + parent = 46786ad51ae2936314c0a1cd80f579cd1e107c73 method = merge cmdver = 0.4.6 diff --git a/3rdParty/Spore-ModAPI/SDKtoGhidra/SporeGhidra_disk.xml b/3rdParty/Spore-ModAPI/SDKtoGhidra/SporeGhidra_disk.xml index 5b6104f..f8b6ba9 100644 --- a/3rdParty/Spore-ModAPI/SDKtoGhidra/SporeGhidra_disk.xml +++ b/3rdParty/Spore-ModAPI/SDKtoGhidra/SporeGhidra_disk.xml @@ -16081,6 +16081,11 @@ + + + + + @@ -16101,7 +16106,7 @@ - + @@ -20344,6 +20349,17 @@ + + + + + + + + + + + @@ -20356,7 +20372,7 @@ - + @@ -22544,7 +22560,7 @@ - + @@ -22913,6 +22929,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -22959,6 +23184,10 @@ + + + + @@ -22983,6 +23212,9 @@ + + + @@ -23022,7 +23254,7 @@ - + @@ -23670,12 +23902,6 @@ - - - - - - @@ -24178,7 +24404,7 @@ - + @@ -24494,6 +24720,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -26910,7 +27212,7 @@ - + @@ -27835,10 +28137,6 @@ - - - - @@ -35685,16 +35983,6 @@ - - - - - - - - - - @@ -51016,6 +51304,7 @@ + @@ -51455,7 +51744,6 @@ - @@ -53293,7 +53581,6 @@ - @@ -53336,7 +53623,6 @@ - @@ -55313,6 +55599,7 @@ + @@ -55349,6 +55636,7 @@ + @@ -55364,6 +55652,7 @@ + @@ -55405,6 +55694,7 @@ + diff --git a/3rdParty/Spore-ModAPI/SDKtoGhidra/SporeGhidra_march2017.xml b/3rdParty/Spore-ModAPI/SDKtoGhidra/SporeGhidra_march2017.xml index 6d291d4..be36af1 100644 --- a/3rdParty/Spore-ModAPI/SDKtoGhidra/SporeGhidra_march2017.xml +++ b/3rdParty/Spore-ModAPI/SDKtoGhidra/SporeGhidra_march2017.xml @@ -16081,6 +16081,11 @@ + + + + + @@ -16101,7 +16106,7 @@ - + @@ -20344,6 +20349,17 @@ + + + + + + + + + + + @@ -20356,7 +20372,7 @@ - + @@ -22544,7 +22560,7 @@ - + @@ -22913,6 +22929,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -22959,6 +23184,10 @@ + + + + @@ -22983,6 +23212,9 @@ + + + @@ -23022,7 +23254,7 @@ - + @@ -23670,12 +23902,6 @@ - - - - - - @@ -24178,7 +24404,7 @@ - + @@ -24494,6 +24720,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -26910,7 +27212,7 @@ - + @@ -27835,10 +28137,6 @@ - - - - @@ -35685,16 +35983,6 @@ - - - - - - - - - - @@ -51016,6 +51304,7 @@ + @@ -51990,6 +52279,7 @@ + @@ -52026,6 +52316,7 @@ + @@ -52041,6 +52332,7 @@ + @@ -52082,6 +52374,7 @@ + diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp index 94a715b..41d22af 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp @@ -70,6 +70,8 @@ #include #include #include +#include +#include #include #include #include @@ -95,6 +97,7 @@ #include #include #include +#include #include namespace Addresses(Simulator) @@ -499,6 +502,7 @@ namespace Simulator DefineAddress(GetPlayerCivilization, SelectAddress(0xB25E30, 0xB25F90)); DefineAddress(CreateHerd, SelectAddress(0xB237C0, 0xB23920)); DefineAddress(CreateNest, SelectAddress(0xB20C70, 0xB20DD0)); + DefineAddress(EnsurePlayer, SelectAddress(0xB20DE0, 0xB20F40)); } namespace Addresses(cGameViewManager) @@ -964,7 +968,22 @@ namespace Simulator DefineAddress(GenerateNPCStore, SelectAddress(0x103F560, 0x103E8F0)); } - namespace Addresses(cCultureSet) + namespace Addresses(cGamePersistenceManager) + { + DefineAddress(Get, SelectAddress(0xB3D2A0, 0xB3D440)); + } + + namespace Addresses(cIdentityColorable) + { + DefineAddress(AssignNames, SelectAddress(0xB6F040, 0xB6F480)); + } + + namespace Addresses(cSpeciesProfile) + { + DefineAddress(GetSpeciesName, SelectAddress(0x4DA1C0, 0x4DA390)); + } + + namespace Addresses(cCultureSet) { DefineAddress(PickCreation, SelectAddress(0xBF8DF0, 0xBF9840)); } diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/GameNounManager.cpp b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/GameNounManager.cpp index 3563424..1d5b5bd 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/GameNounManager.cpp +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/GameNounManager.cpp @@ -39,6 +39,12 @@ namespace Simulator return mpPlayerTribe.get(); } + cPlayer* cGameNounManager::GetPlayer() { + return mpPlayer.get(); + } + + auto_METHOD_VOID_(cGameNounManager, EnsurePlayer); + auto_METHOD_(cGameNounManager, cCivilization*, GetPlayerCivilization); auto_METHOD(cGameNounManager, cHerd*, CreateHerd, diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp index cdc94ed..857e139 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp @@ -4,6 +4,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -71,6 +74,19 @@ namespace Simulator return *(cSimulatorUniverse**)GetAddress(cSimulatorUniverse, _ptr); } + //// GamePersistenceManager //// + + auto_STATIC_METHOD_(cGamePersistenceManager, cGamePersistenceManager*, Get); + + + //// cSpeciesProfile //// + + auto_METHOD_VOID(cSpeciesProfile, GetSpeciesName, Args(eastl::string16& dst), Args(dst)); + + + //// cIdentityColorable //// + + auto_METHOD_VOID(cIdentityColorable, AssignNames, Args(const eastl::string16& speciesName), Args(speciesName)); //// cDefaultToolProjectile //// diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore ModAPI.vcxproj b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore ModAPI.vcxproj index 5e804b7..ad550bd 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore ModAPI.vcxproj +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore ModAPI.vcxproj @@ -463,6 +463,7 @@ + diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore ModAPI.vcxproj.filters b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore ModAPI.vcxproj.filters index 7cd8c83..ef73104 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore ModAPI.vcxproj.filters +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore ModAPI.vcxproj.filters @@ -2127,7 +2127,7 @@ Header Files - + Header Files @@ -2161,6 +2161,9 @@ Header Files + Header Files + + Header Files diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Editors/INameableEntity.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Editors/INameableEntity.h index d7fb931..94465a9 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Editors/INameableEntity.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Editors/INameableEntity.h @@ -5,14 +5,14 @@ namespace Editors class INameableEntity { public: - virtual void SetName(const char16_t* pString) = 0; - virtual const char16_t* GetName() = 0; + /* 00h */ virtual void SetName(const char16_t* pString) = 0; + /* 04h */ virtual const char16_t* GetName() = 0; - virtual void SetDescription(const char16_t* pString) = 0; - virtual const char16_t* GetDescription() = 0; + /* 08h */ virtual void SetDescription(const char16_t* pString) = 0; + /* 0Ch */ virtual const char16_t* GetDescription() = 0; - virtual void SetTags(const char16_t* pString) {}; - virtual const char16_t* GetTags() { + /* 10h */ virtual void SetTags(const char16_t* pString) {}; + /* 14h */ virtual const char16_t* GetTags() { return nullptr; }; }; diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator.h index 33b7cb2..5e698cc 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/SubSystem/GameNounManager.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/SubSystem/GameNounManager.h index dd27417..73700fb 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/SubSystem/GameNounManager.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/SubSystem/GameNounManager.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -86,6 +87,11 @@ namespace Simulator void UpdateModels(); + cPlayer* GetPlayer(); + + /// If there is no cPlayer instance created, it creates one. + void EnsurePlayer(); + #ifndef SDK_TO_GHIDRA /// Gets all the game data objects that use the given game noun ID. To be more specific, first a container is created @@ -131,7 +137,7 @@ namespace Simulator /* 58h */ cHerdPtr mpAvatarHerd; /* 5Ch */ eastl::vector mPosseMembers; /* 70h */ cTribePtr mpPlayerTribe; - /* 74h */ ObjectPtr mpPlayer; // cPlayer + /* 74h */ cPlayerPtr mpPlayer; /* 78h */ eastl::intrusive_list mNouns; /* 80h */ eastl::vector field_80; // objects that haven't been updated since last call to UpdateModels? /* 94h */ int field_94; @@ -162,6 +168,7 @@ namespace Simulator DeclareAddress(GetPlayerCivilization); // 0xB25E30 0xB25F90 DeclareAddress(CreateHerd); DeclareAddress(CreateNest); // 0xB20C70 0xB20DD0 + DeclareAddress(EnsurePlayer); // 0xB20DE0 0xB20F40 } #ifndef SDK_TO_GHIDRA diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/SubSystem/GamePersistenceManager.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/SubSystem/GamePersistenceManager.h new file mode 100644 index 0000000..154680c --- /dev/null +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/SubSystem/GamePersistenceManager.h @@ -0,0 +1,67 @@ +#pragma once + +#include +#include +#include +#include + +#define GamePersistenceManager (*Simulator::cGamePersistenceManager::Get()) + +namespace Simulator +{ + struct GameLoadParameters + { + /// This will be appended with `.spo` to create the game file name. + /* 00h */ eastl::string16 mGameName; + /* 10h */ eastl::string16 mStarName; + /* 20h */ eastl::string16 field_20; + /* 30h */ char padding_30[0x48 - 0x30]; + /* 48h */ cSpeciesProfile* mpCreatureSpecies; + /* 4Ch */ ResourceKey mCreatureKey; + /* 58h */ ResourceKey field_58; + /* 5Ch */ char padding_64[0x7C - 0x64]; + /* 7Ch */ StarID mStarID {0}; + /* 80h */ char padding_80[0xA0 - 0x80]; + /* A0h */ Difficulty mDifficulty; + /// Game mode to load + /* A4h */ TechLevel mGameMode; + /* A8h */ char padding_A8[0xB0 - 0xA8]; + /* B0h */ int field_B0; + }; + ASSERT_SIZE(GameLoadParameters, 0xB4); // I don't know if this is the real size + + class cGamePersistenceManager + : public App::IMessageListener + , public cStrategy + { + public: + static cGamePersistenceManager* Get(); + + /// Call GameNounManager.EnsurePlayer() to avoid game crashes. + /* 10h */ virtual bool LoadGame(const GameLoadParameters& parameters); + //TODO more methods + + /* 14h */ virtual void func14h(int); + /* 18h */ virtual void func18h(int, int); + /* 1Ch */ virtual bool func1Ch(); + /* 20h */ virtual bool func1Ch(uint32_t); + + public: + /* 20h */ int field_20; + /* 24h */ int field_24; + /* 28h */ int field_28; + /* 2Ch */ int field_2C; + /* 30h */ int field_30; + /* 34h */ eastl::string16 field_34; + /* 44h */ bool field_44; + /* 45h */ bool field_45; + /* 46h */ bool field_46; + /* 47h */ bool field_47; + /* 48h */ int field_48; + }; + ASSERT_SIZE(cGamePersistenceManager, 0x4C); + + namespace Addresses(cGamePersistenceManager) { + DeclareAddress(Get); // 0xB3D2A0 0xB3D440 + } +} \ No newline at end of file diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cCivilization.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cCivilization.h index 9d869a8..e6de64b 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cCivilization.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cCivilization.h @@ -15,10 +15,10 @@ namespace Simulator { class cCivilization - : public cGameData - , public Editors::INameableEntity - , public App::IMessageListener - , public cIdentityColorable + /* 00h */ : public cGameData + /* 34h */ , public Editors::INameableEntity + /* 38h */ , public App::IMessageListener + /* 3Ch */ , public cIdentityColorable { public: static const uint32_t TYPE = 0x901F1362; diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cIdentityColorable.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cIdentityColorable.h index 19b1aa1..89730af 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cIdentityColorable.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cIdentityColorable.h @@ -20,6 +20,7 @@ #include #include +#include #define cIdentityColorablePtr eastl::intrusive_ptr @@ -47,10 +48,20 @@ namespace Simulator /* 14h */ virtual void Write(void*); /* 18h */ virtual void Read(void*); + /// Generates the identity name according to the color, and the names for all its entities. + /// @param speciesName + void AssignNames(const eastl::string16& speciesName); + public: /* 04h */ uint32_t mIDColorID; // 0x53DBCF1 - /* 08h */ eastl::map field_8; + /// Names for different entities such as buildings, vehicles, etc. Check `Identity.locale` + /* 08h */ eastl::map mEntityNames; /* 24h */ Math::ColorRGB mCachedColor; }; ASSERT_SIZE(cIdentityColorable, 0x30); + + namespace Addresses(cIdentityColorable) + { + DeclareAddress(AssignNames); // 0xB6F040 0xB6F480 + } } \ No newline at end of file diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cPlayer.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cPlayer.h index 0bf6a88..3fa8a9a 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cPlayer.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cPlayer.h @@ -16,8 +16,122 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . ****************************************************************************/ +#pragma once +#include +#include +#include +#include +#include +#include +#include +#include -// 10108h civ game -// 0x1248 in difficulty -// 0x1184 eastl::vector visitedPlanets \ No newline at end of file +#define cPlayerPtr eastl::intrusive_ptr + +namespace Simulator +{ + class cSpacePlayerWarData + { + public: + /* 00h */ virtual ~cSpacePlayerWarData() = 0; + /* 04h */ virtual bool Write(ISerializerStream* stream) = 0; + /* 08h */ virtual bool Read(ISerializerStream* stream) = 0; + + public: +#ifdef SDK_TO_GHIDRA + /* 04h */ int field_4; +#endif + /* 08h */ uint32_t mEnemyEmpireID; + /* 10h */ cGonzagoTimer mTimeSinceWarStart; + /* 30h */ int mPlayerStartStarsCount; + /* 34h */ int mEnemyStartStarsCount; + /* 38h */ int mPlayerStarsCaptured; + /* 3Ch */ int mEnemyStarsCaptured; + }; + ASSERT_SIZE(cSpacePlayerWarData, 0x40); + + class PlayerPlanetData + { + public: + /* 00h */ virtual bool Write(ISerializerStream* stream) = 0; + /* 04h */ virtual bool Read(ISerializerStream* stream) = 0; + /* 08h */ virtual ~PlayerPlanetData() = 0; + + public: +#ifdef SDK_TO_GHIDRA + /* 04h */ int field_4; +#endif + /* 08h */ eastl::vector_map mSpeciesIsScanned; + /* 20h */ eastl::vector_map mBuildingIsScanned; + /* 38h */ eastl::vector_map mVehicleIsScanned; + /* 50h */ eastl::vector_map mUFOIsScanned; + /* 68h */ eastl::vector_map mPoliticalIDsEncountered; + /* 80h */ cGonzagoTimer mTimeSinceLastSpiceUpdate; + /* A0h */ int8_t mMaxTScore; + /* A1h */ int8_t mMaxFoodWebLines; + /* A2h */ uint8_t mExplored; + /* A4h */ int field_A4; + /* A8h */ PlanetID field_A8; + /* ACh */ int field_AC; + }; + ASSERT_SIZE(PlayerPlanetData, 0xB0); + + class cPlayer + /* 00h */ : public cGameData + /* 34h */ , public App::IMessageListener + { + public: + static const uint32_t TYPE = 0x3C609F8; + + public: + /* 38h */ char mOneTimeEventFlags[0x68C - 0x38]; // some unknown data structure + /* 68Ch */ int field_68C; + /* 690h */ int field_690; + /* 694h */ int field_694; + /* 698h */ char mFlags[0x10E8 - 0x698]; // some unknown data structure + ///* 69Ch */ ResourceKey field_69C; // a creature key? + /* 10E8h */ ObjectPtr mpCRGItems; // cCollectableItemsPtr + /* 10ECh */ int field_10EC; // not initialized + /* 10F0h */ float mCurrentGoalProgress; + /* 10F4h */ float mGoalProgressTotal; // not initialized + /* 10F8h */ uint32_t mUniqueGameID; + /* 10FCh */ uint32_t mCellConsequenceTrait; + /* 1100h */ uint32_t mCreatureConsequenceTrait; + /* 1104h */ uint32_t mTribeConsequenceTrait; + /* 1108h */ uint32_t mCivConsequenceTrait; + /* 110Ch */ uint32_t mSpaceConsequenceTrait; + /* 1110h */ char field_1110[0xC]; + /* 111Ch */ eastl::hash_set mGameEventRecord; + /* 113Ch */ eastl::vector> mSelectionGroups; + /* 1150h */ ResourceKey mSelectedCityHallKey; + /* 115Ch */ ResourceKey mSelectedVehicleKey; + /* 1168h */ ResourceKey mSelectedUFOKey; + /* 1174h */ int field_1174; // not initialized + /* 1178h */ Math::Vector3 mCapitalCityPos; // not initialized + /* 1184h */ eastl::vector mStarsVisited; + /* 1198h */ eastl::vector mStarsKnown; + /* 11ACh */ eastl::vector mWormholesUsed; + /* 11C0h */ eastl::vector mPlanetData; + /* 11D8h */ eastl::map mPlayerSpecificEmpireData; + /* 11F0h */ bool mHasCheated; + /* 11F4h */ int field_11F4; + /* 11F8h */ eastl::map mSpacePlayerWarData; + /* 1214h */ eastl::vector> mPlayerCaptureProgressStars; + /* 1228h */ eastl::map> mEmbassies; + /* 1244h */ uint32_t mThemeID; + /* 1248h */ Difficulty mDifficultyLevel; + /* 124Ch */ int mMaxPosseSize; + /* 1250h */ int mTempPosseCount; + /* 1254h */ int field_1254; + /* 1258h */ cGonzagoTimer mSoothingSongTimer; + /* 1278h */ float mSocialTraitProgress; + /* 127Ch */ float mCombatTraitProgress; + /* 1280h */ ResourceKey mPirateUFOModelKey; + /* 128Ch */ unsigned int mTotalTimeInCVG; + /* 1290h */ ResourceKey mInitCaptainKey; + /* 129Ch */ eastl::vector mAdventuresCompleted; + /* 12B0h */ char padding_12B0[0x12D8 - 0x12B0]; + }; + ASSERT_SIZE(cPlayer, 0x12D8); +} \ No newline at end of file diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cSpeciesProfile.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cSpeciesProfile.h index 99f6708..a8e3224 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cSpeciesProfile.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cSpeciesProfile.h @@ -29,13 +29,20 @@ namespace Simulator class cSpeciesProfile { public: + + const ResourceKey& GetSpeciesKey(); + + void GetSpeciesName(eastl::string16& dst); + + private: char padding[0xA18]; + //TODO //PLACEHOLDER 6D4h eastl::vector> /* 504h */ ResourceKey mSpeciesKey; //TODO this is the main key? /* 510h */ ResourceKey field_510; - /* 51Ch */ eastl::string16 field_51C; + /* 51Ch */ eastl::string16 mName; /* 52Ch */ eastl::string16 field_52C; /* 53Ch */ ResourceKey mProfileSeq; /* 548h */ float field_548; @@ -137,4 +144,9 @@ namespace Simulator ///////////////////////////////// //PLACEHOLDER static_assert(sizeof(cSpeciesProfile) == 0xA18, "sizeof(cSpeciesProfile) != A18h"); + + namespace Addresses(cSpeciesProfile) + { + DeclareAddress(GetSpeciesName); // 0x4DA1C0 0x4DA390 + } } \ No newline at end of file