CreatureLib/CInterface/Battling/EventData.cpp

25 lines
1.1 KiB
C++

#include "../../src/Battling/EventHooks/EventData.hpp"
#include "../Core.hpp"
using namespace CreatureLib::Battling;
export void CreatureLib_EventData_Destruct(const EventData* p) { delete p; }
SIMPLE_GET_FUNC(EventData, GetKind, EventDataKind);
BORROWED_GET_FUNC(DamageEvent, GetCreature, Creature*);
SIMPLE_GET_FUNC(DamageEvent, GetDamageSource, DamageSource);
SIMPLE_GET_FUNC(DamageEvent, GetOriginalHealth, uint32_t);
SIMPLE_GET_FUNC(DamageEvent, GetNewHealth, uint32_t);
export void CreatureLib_DamageEvent_Destruct(const DamageEvent* p) { delete p; }
BORROWED_GET_FUNC(HealEvent, GetCreature, Creature*);
SIMPLE_GET_FUNC(HealEvent, GetOriginalHealth, uint32_t);
SIMPLE_GET_FUNC(HealEvent, GetNewHealth, uint32_t);
export void CreatureLib_HealEvent_Destruct(const HealEvent* p) { delete p; }
BORROWED_GET_FUNC(FaintEvent, GetCreature, Creature*);
export void CreatureLib_FaintEvent_Destruct(const FaintEvent* p) { delete p; }
export const char* CreatureLib_DisplayTextEvent_GetText(const DisplayTextEvent* p) { return p->GetText().c_str(); }
export void CreatureLib_DisplayTextEvent_Destruct(const DisplayTextEvent* p) { delete p; }