PkmnLib/CInterface/Battling/ExperienceLibrary.cpp

16 lines
925 B
C++

#include "../../src/Battling/Library/ExperienceLibrary.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Battling;
export_func ExperienceLibrary* PkmnLib_ExperienceLibrary_Construct() { return new ExperienceLibrary(); }
export_func 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<ArbUt::BorrowedPtr<CreatureLib::Battling::Creature>>(
opponents, opponents + numberOfOpponents));)
}
export_func void PkmnLib_ExperienceLibrary_Destruct(ExperienceLibrary* p) { delete p; }