Adds C Interface for CanEvolveFromLevelUp

This commit is contained in:
Deukhoofd 2021-07-02 11:11:46 +02:00
parent 3d3bff3772
commit 8fc29d925b
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 7 additions and 1 deletions

View File

@ -2,8 +2,14 @@
#include "../Core.hpp"
using namespace PkmnLib::Battling;
export MiscLibrary* PkmnLib_MiscLibrary_Construct(PkmnLib::Library::TimeOfDay(*getTime)()) {
export MiscLibrary* PkmnLib_MiscLibrary_Construct(PkmnLib::Library::TimeOfDay (*getTime)()) {
return new MiscLibrary(getTime);
}
export void PkmnLib_MiscLibrary_Destruct(MiscLibrary* p) { delete p; }
export u8 PkmnLib_MiscLibrary_CanEvolveFromLevelUp(bool& out, MiscLibrary* p,
const PkmnLib::Library::EvolutionData* evoData,
const Pokemon* pokemon) {
Try(out = p->CanEvolveFromLevelUp(evoData, pokemon))
}