Added MiscLibrary C Interface.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-03-04 19:18:47 +01:00
parent da79d51ad2
commit 985c2720c5
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#include "../../src/Battling/Library/MiscLibrary.hpp"
#define export extern "C"
using namespace CreatureLib::Battling;
export MiscLibrary* CreatureLib_MiscLibrary_Construct() { return new MiscLibrary(); }
export void CreatureLib_MiscLibrary_Destruct(const MiscLibrary* p) { delete p; }
export void CreatureLib_MiscLibrary_IsCritical(MiscLibrary* p, ExecutingAttack* attack, Creature* target, uint8_t hit) {
p->IsCritical(attack, target, hit);
};
export void CreatureLib_MiscLibrary_CanFlee(MiscLibrary* p, FleeTurnChoice* switchChoice) { p->CanFlee(switchChoice); };