Skip to content

Commit

Permalink
3rdParty: update Spore-ModAPI to v2.5.312
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Mar 17, 2024
1 parent b0e5ca8 commit ab7d391
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions 3rdParty/Spore-ModAPI/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = [email protected]:emd4600/Spore-ModAPI.git
branch = master
commit = 69de07644fb97c1cbf433db2130b0cea0c168798
parent = 6adf7e1834bc2eb324f5c879bf50661c1650dc45
commit = d3c4313925b9f4da54c444b153cdfaf94c80cd63
parent = b0e5ca832d8fe3b4004218ce165c2ff50e590515
method = merge
cmdver = 0.4.6
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions 3rdParty/Spore-ModAPI/Spore ModAPI/Spore/Simulator/cEmpire.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -123,6 +130,7 @@ namespace Simulator
DeclareAddress(SetSpeciesProfile);
DeclareAddress(sub_C32EA0);
DeclareAddress(CaptureSystem);
DeclareAddress(UpdateAndGetColor); // 0xC325F0 0xC32E30
//TODO sub_C30F90 RequireHomePlanet
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace Simulator
/* 75h */ bool field_75; // true
/* 76h */ bool field_76;
/* 77h */ bool field_77;
/* 78h */ eastl::vector<int> mNPC_UFOs; //TODO
/* 78h */ eastl::vector<cGameDataUFOPtr> mNPC_UFOs;
/* 90h */ cGonzagoTimer mTimeSinceStartedSpaceGame;
/// Current star ID??
/* B0h */ StarID field_B0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ namespace Simulator

enum StarFlags
{
kStarFlagIsOwned = 0x10, // 1 << 4

// 0x200 has raid?

kStarFlagHasRare = 0x1000, // 1 << 12
};

Expand Down

0 comments on commit ab7d391

Please sign in to comment.