Add C Interface for random seed.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-07-26 11:02:54 +02:00
parent 15db2b4ea0
commit 90c33bfef0
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 3 additions and 2 deletions

View File

@ -4,9 +4,10 @@ using namespace PkmnLib::Battling;
export uint8_t PkmnLib_Battle_Construct(Battle*& out, const BattleLibrary* library,
CreatureLib::Battling::BattleParty* const* parties, size_t partiesCount,
bool canFlee, uint8_t numberOfSides, uint8_t creaturesPerSide) {
bool canFlee, uint8_t numberOfSides, uint8_t creaturesPerSide,
uint_fast32_t randomSeed) {
ArbUt::List<CreatureLib::Battling::BattleParty*> partiesList(parties, parties + partiesCount);
Try(out = new Battle(library, partiesList, canFlee, numberOfSides, creaturesPerSide));
Try(out = new Battle(library, partiesList, canFlee, numberOfSides, creaturesPerSide, randomSeed));
}
export void PkmnLib_Battle_Destruct(Battle* p) { delete p; }