PkmnLib/CInterface/Battling/BattleLibrary.cpp

18 lines
1.1 KiB
C++

#include "../../src/Battling/Library/BattleLibrary.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Battling;
export_func uint8_t PkmnLib_BattleLibrary_Construct(BattleLibrary*& out, PkmnLib::Library::PokemonLibrary* staticLib,
StatCalculator* statCalculator, DamageLibrary* damageLibrary,
ExperienceLibrary* experienceLibrary,
PkmnLib::Battling::ScriptResolver* scriptResolver,
MiscLibrary* miscLibrary, CaptureLibrary* captureLibrary) {
Try(out = new BattleLibrary(staticLib, statCalculator, damageLibrary, experienceLibrary, scriptResolver,
miscLibrary, captureLibrary));
}
export_func void PkmnLib_BattleLibrary_Destruct(BattleLibrary* p) { delete p; }
export_func uint8_t PkmnLib_CaptureLibrary_Construct(CaptureLibrary*& out) { Try(out = new CaptureLibrary()); }
export_func void PkmnLib_CaptureLibrary_Destruct(CaptureLibrary* p) { delete p; }