C Interface for battle libraries.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-29 19:46:24 +02:00
parent 9f27e43de8
commit 9206ff642b
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
4 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#include "../../src/Battling/Library/BattleLibrary.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Battling;
export uint8_t PkmnLib_BattleLibrary_Construct(BattleLibrary*& out, PkmnLib::Library::PokemonLibrary* staticLib,
StatCalculator* statCalculator, DamageLibrary* damageLibrary,
CreatureLib::Battling::ExperienceLibrary* experienceLibrary,
CreatureLib::Battling::ScriptResolver* scriptResolver,
PkmnLib::Battling::MiscLibrary* miscLibrary) {
Try(out = new BattleLibrary(staticLib, statCalculator, damageLibrary, experienceLibrary, scriptResolver,
miscLibrary));
}
export void PkmnLib_BattleLibrary_Destruct(BattleLibrary* p) { delete p; }

View File

@ -0,0 +1,7 @@
#include "../../src/Battling/Library/DamageLibrary.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Battling;
export DamageLibrary* PkmnLib_DamageLibrary_Construct() { return new DamageLibrary(); }
export void PkmnLib_DamageLibrary_Destruct(DamageLibrary* p) { delete p; }

View File

@ -0,0 +1,7 @@
#include "../../src/Battling/Library/MiscLibrary.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Battling;
export MiscLibrary* PkmnLib_MiscLibrary_Construct() { return new MiscLibrary(); }
export void PkmnLib_MiscLibrary_Destruct(MiscLibrary* p) { delete p; }

View File

@ -0,0 +1,7 @@
#include "../../src/Battling/Library/StatCalculator.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Battling;
export StatCalculator* PkmnLib_StatCalculator_Construct() { return new StatCalculator(); }
export void PkmnLib_StatCalculator_Destruct(StatCalculator* p) { delete p; }