diff --git a/CInterface/Battling/BattleLibrary.cpp b/CInterface/Battling/BattleLibrary.cpp new file mode 100644 index 0000000..a6b114b --- /dev/null +++ b/CInterface/Battling/BattleLibrary.cpp @@ -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; } diff --git a/CInterface/Battling/DamageLibrary.cpp b/CInterface/Battling/DamageLibrary.cpp new file mode 100644 index 0000000..f1c0a75 --- /dev/null +++ b/CInterface/Battling/DamageLibrary.cpp @@ -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; } diff --git a/CInterface/Battling/MiscLibrary.cpp b/CInterface/Battling/MiscLibrary.cpp new file mode 100644 index 0000000..485be37 --- /dev/null +++ b/CInterface/Battling/MiscLibrary.cpp @@ -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; } diff --git a/CInterface/Battling/StatCalculator.cpp b/CInterface/Battling/StatCalculator.cpp new file mode 100644 index 0000000..5159655 --- /dev/null +++ b/CInterface/Battling/StatCalculator.cpp @@ -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; }