From 90c33bfef06d088e0642a97f52a2c1b70559ad40 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 26 Jul 2020 11:02:54 +0200 Subject: [PATCH] Add C Interface for random seed. --- CInterface/Battling/Battle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CInterface/Battling/Battle.cpp b/CInterface/Battling/Battle.cpp index 64a3ac3..a11ad1c 100644 --- a/CInterface/Battling/Battle.cpp +++ b/CInterface/Battling/Battle.cpp @@ -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 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; }