From ab7d3918211cbd30a3fba6918a785a3d45390aa1 Mon Sep 17 00:00:00 2001 From: Rosalie Wanders Date: Sun, 17 Mar 2024 16:40:59 +0100 Subject: [PATCH] 3rdParty: update Spore-ModAPI to v2.5.312 --- 3rdParty/Spore-ModAPI/.gitrepo | 4 ++-- .../Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp | 1 + .../Spore ModAPI/SourceCode/Simulator/cEmpire.cpp | 6 ++++++ .../Spore-ModAPI/Spore ModAPI/Spore/Simulator/cEmpire.h | 8 ++++++++ .../Spore ModAPI/Spore/Simulator/cSimulatorSpaceGame.h | 2 +- .../Spore ModAPI/Spore/Simulator/cStarRecord.h | 4 ++++ 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/3rdParty/Spore-ModAPI/.gitrepo b/3rdParty/Spore-ModAPI/.gitrepo index 0315527..dd72aa0 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 = 69de07644fb97c1cbf433db2130b0cea0c168798 - parent = 6adf7e1834bc2eb324f5c879bf50661c1650dc45 + commit = d3c4313925b9f4da54c444b153cdfaf94c80cd63 + parent = b0e5ca832d8fe3b4004218ce165c2ff50e590515 method = merge cmdver = 0.4.6 diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp index 140a1b7..b284ad3 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp @@ -300,6 +300,7 @@ namespace Simulator DefineAddress(SetSpeciesProfile, SelectAddress(0xC32FB0, 0xC337F0)); DefineAddress(sub_C32EA0, SelectAddress(0xC32EA0, 0xC336E0)); DefineAddress(CaptureSystem, SelectAddress(0xC8C320, 0xC8D190)); + DefineAddress(UpdateAndGetColor, SelectAddress(0xC325F0, 0xC32E30)); } namespace Addresses(cEnergyRepairToolStrategy) diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/cEmpire.cpp b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/cEmpire.cpp index ae33c73..77b793f 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/cEmpire.cpp +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/SourceCode/Simulator/cEmpire.cpp @@ -38,5 +38,11 @@ namespace Simulator return nullptr; } } + + Math::ColorRGB cEmpire::UpdateAndGetColor() { + Math::ColorRGB dst; + CALL(GetAddress(cEmpire, UpdateAndGetColor), void, Args(cEmpire*, Math::ColorRGB&), Args(this, dst)); + return dst; + } } #endif diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cEmpire.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cEmpire.h index c91af32..0c75453 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cEmpire.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cEmpire.h @@ -63,6 +63,13 @@ namespace Simulator void SetSpeciesProfile(cSpeciesProfile* pSpecies); + /// Calculates and returns the identity color of the empire, based on the `mIDColorID` field. + /// ColorIDs equal or greater than `0x53DBCF1` are cached, and `colorID - 0x53DBCF1` is an index to + /// the real color stored in `animations~!ui.prop` in `IdentityColors` property. + /// `0x53DBCF1` is special and uses the empire species identity color, instead of the color on the list. + /// If the ID less than `0x53DBCF1`, the color will be recalculated, cached, and the ID will be updated. + Math::ColorRGB UpdateAndGetColor(); + /// Captures a star system for a specific empire. /// @param pStarRecord The star system to capture. /// @param empireID Political ID of the empire that will become the owner. @@ -123,6 +130,7 @@ namespace Simulator DeclareAddress(SetSpeciesProfile); DeclareAddress(sub_C32EA0); DeclareAddress(CaptureSystem); + DeclareAddress(UpdateAndGetColor); // 0xC325F0 0xC32E30 //TODO sub_C30F90 RequireHomePlanet } diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cSimulatorSpaceGame.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cSimulatorSpaceGame.h index 6f93177..23d4144 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cSimulatorSpaceGame.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cSimulatorSpaceGame.h @@ -86,7 +86,7 @@ namespace Simulator /* 75h */ bool field_75; // true /* 76h */ bool field_76; /* 77h */ bool field_77; - /* 78h */ eastl::vector mNPC_UFOs; //TODO + /* 78h */ eastl::vector mNPC_UFOs; /* 90h */ cGonzagoTimer mTimeSinceStartedSpaceGame; /// Current star ID?? /* B0h */ StarID field_B0; diff --git a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cStarRecord.h b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cStarRecord.h index 18397d6..6186a82 100644 --- a/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cStarRecord.h +++ b/3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cStarRecord.h @@ -35,6 +35,10 @@ namespace Simulator enum StarFlags { + kStarFlagIsOwned = 0x10, // 1 << 4 + + // 0x200 has raid? + kStarFlagHasRare = 0x1000, // 1 << 12 };