PkmnLib/CInterface/Library/PokemonLibrary.cpp

17 lines
1.0 KiB
C++

#include "../../src/Library/PokemonLibrary.hpp"
#include "../Core.hpp"
using namespace PkmnLib::Library;
export_func uint8_t PkmnLib_PokemonLibrary_Construct(PokemonLibrary*& out, PkmnLib::Library::LibrarySettings* settings,
SpeciesLibrary* species, MoveLibrary* moves, ItemLibrary* items,
CreatureLib::Library::GrowthRateLibrary* growthRates,
CreatureLib::Library::TypeLibrary* typeLibrary,
CreatureLib::Library::TalentLibrary* talentLibrary,
NatureLibrary* natures) {
Try(out = new PokemonLibrary(settings, species, moves, items, growthRates, typeLibrary, talentLibrary, natures));
}
export_func void PkmnLib_PokemonLibrary_Destruct(const PokemonLibrary* p) { delete p; }
export_func const NatureLibrary* PkmnLib_PokemonLibrary_GetNatureLibrary(const PokemonLibrary* p) {
return p->GetNatureLibrary().GetRaw();
}