From df0eca171633ade0d6bd88afbd280be9b556aecb Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Fri, 31 Jul 2020 15:01:25 +0200 Subject: [PATCH] C Interface explicit constructors for different events. --- CInterface/Battling/EventData.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CInterface/Battling/EventData.cpp b/CInterface/Battling/EventData.cpp index 3da43f7..48b0f3e 100644 --- a/CInterface/Battling/EventData.cpp +++ b/CInterface/Battling/EventData.cpp @@ -10,11 +10,15 @@ 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; }