C Interface explicit constructors for different events.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-07-31 15:01:25 +02:00
parent b1ecb56f10
commit df0eca1716
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 4 additions and 0 deletions

View File

@ -10,11 +10,15 @@ BORROWED_GET_FUNC(DamageEvent, GetCreature, Creature*);
SIMPLE_GET_FUNC(DamageEvent, GetDamageSource, DamageSource); SIMPLE_GET_FUNC(DamageEvent, GetDamageSource, DamageSource);
SIMPLE_GET_FUNC(DamageEvent, GetOriginalHealth, uint32_t); SIMPLE_GET_FUNC(DamageEvent, GetOriginalHealth, uint32_t);
SIMPLE_GET_FUNC(DamageEvent, GetNewHealth, 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*); BORROWED_GET_FUNC(HealEvent, GetCreature, Creature*);
SIMPLE_GET_FUNC(HealEvent, GetOriginalHealth, uint32_t); SIMPLE_GET_FUNC(HealEvent, GetOriginalHealth, uint32_t);
SIMPLE_GET_FUNC(HealEvent, GetNewHealth, 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*); 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 const char* CreatureLib_DisplayTextEvent_GetText(const DisplayTextEvent* p) { return p->GetText().c_str(); }
export void CreatureLib_DisplayTextEvent_Destruct(const DisplayTextEvent* p) { delete p; }