PkmnLib/CInterface/Battling/ExperienceLibrary.cpp

16 lines
851 B
C++
Raw Normal View History

2020-05-20 14:05:52 +00:00
#include "../../src/Battling/Library/ExperienceLibrary.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Battling;
export ExperienceLibrary* PkmnLib_ExperienceLibrary_Construct() { return new ExperienceLibrary(); }
export uint8_t PkmnLib_ExperienceLibrary_HandleExperienceGain(ExperienceLibrary* p,
CreatureLib::Battling::Creature* faintedMon,
CreatureLib::Battling::Creature* const* opponents,
size_t numberOfOpponents) {
Try(p->HandleExperienceGain(
faintedMon, std::unordered_set<CreatureLib::Battling::Creature*>(opponents, opponents + numberOfOpponents));)
}
export void PkmnLib_ExperienceLibrary_Destruct(ExperienceLibrary* p) { delete p; }