diff --git a/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp b/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp index 1750d8c0..4faa483f 100644 --- a/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp +++ b/Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp @@ -1161,6 +1161,7 @@ namespace Simulator DefineAddress(CreateCellObject, SelectAddress(0xE74F60, 0xE74A20)); DefineAddress(OverwriteCellCollisionSpheres, SelectAddress(0xE843C0, 0xE83E30)); DefineAddress(MovePlayerToMousePosition, SelectAddress(0xE5BD90, 0xE5B790)); + DefineAddress(IncreasePlayerFood, SelectAddress(0x00E7D370, 0x00E7CE10)); DefineAddress(GetScaleDifferenceWithPlayer, SelectAddress(0xE57940, 0xE57340)); DefineAddress(ShouldNotAttack, SelectAddress(0xE57A60, 0xE57460)); DefineAddress(GetDamageAmount, SelectAddress(0xE58F80, 0xE58980)); diff --git a/Spore ModAPI/SourceCode/Simulator/SimulatorCell.cpp b/Spore ModAPI/SourceCode/Simulator/SimulatorCell.cpp index 6e57d3df..b4a877a1 100644 --- a/Spore ModAPI/SourceCode/Simulator/SimulatorCell.cpp +++ b/Spore ModAPI/SourceCode/Simulator/SimulatorCell.cpp @@ -95,6 +95,10 @@ namespace Simulator auto_STATIC_METHOD_VOID(Cell, MovePlayerToMousePosition, Args(float a0), Args(a0)); + auto_STATIC_METHOD_VOID(Cell, IncreasePlayerFood, + Args(int dnaCount, char dietType), + Args(dnaCount, dietType)); + auto_STATIC_METHOD(Cell, ScaleDifference, GetScaleDifferenceWithPlayer, Args(cCellObjectData* a0), Args(a0)); diff --git a/Spore ModAPI/Spore/Simulator/Cell/CellFunctions.h b/Spore ModAPI/Spore/Simulator/Cell/CellFunctions.h index aa21964a..65b623c6 100644 --- a/Spore ModAPI/Spore/Simulator/Cell/CellFunctions.h +++ b/Spore ModAPI/Spore/Simulator/Cell/CellFunctions.h @@ -51,6 +51,12 @@ namespace Simulator void MovePlayerToMousePosition(float deltaTime); + /// Increase the players progress by dnaCount. dnaCount is the progress bar progress. Not the currency. + /// dietType is how the food is counted on the timeline. If its 0, Spore counts it as meat. And if its not 0, its counted as a plant. + /// @param dnaCount + /// @param dietType + void IncreasePlayerFood(int dnaCount, char dietType); + /// Returns scale difference between the given cell and the player cell, /// telling whether it is smaller, larger or the same scale (level). /// @param otherCell @@ -111,6 +117,7 @@ namespace Simulator DeclareAddress(CreateCellObject); // 0xE74F60 0xE74A20 DeclareAddress(OverwriteCellCollisionSpheres); // 0xE83E30 0xe843c0 DeclareAddress(MovePlayerToMousePosition); // 0xE5BD90 0xE5B790 + DeclareAddress(IncreasePlayerFood); // 0xE7D370 0xE7CE10 DeclareAddress(GetScaleDifferenceWithPlayer); // 0xE57940 0xE57340 DeclareAddress(ShouldNotAttack); // 0xE57A60 0xE57460 DeclareAddress(GetDamageAmount); // 0xE58F80 0xE58980