From 97c4856117fec75e26171c9bb996f6334a3e8d07 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Tue, 25 Aug 2020 18:33:39 +0200 Subject: [PATCH] C Interface for several events. Signed-off-by: Deukhoofd --- CInterface/Battling/EventData.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CInterface/Battling/EventData.cpp b/CInterface/Battling/EventData.cpp index 161c465..2ccab4e 100644 --- a/CInterface/Battling/EventData.cpp +++ b/CInterface/Battling/EventData.cpp @@ -29,10 +29,24 @@ DESTRUCTOR(TurnStartEvent); DESTRUCTOR(TurnEndEvent); -BORROWED_GET_FUNC(ExperienceGainEvent, GetCreature, Creature*); +BORROWED_GET_FUNC(ExperienceGainEvent, GetCreature, const Creature*); SIMPLE_GET_FUNC(ExperienceGainEvent, GetPreviousExperience, uint32_t); SIMPLE_GET_FUNC(ExperienceGainEvent, GetNewExperience, uint32_t); DESTRUCTOR(ExperienceGainEvent); +BORROWED_GET_FUNC(MissEvent, GetCreature, const Creature*); +DESTRUCTOR(MissEvent); + +BORROWED_GET_FUNC(ChangeSpeciesEvent, GetCreature, const Creature*); +BORROWED_GET_FUNC(ChangeSpeciesEvent, GetNewSpecies, const CreatureLib::Library::CreatureSpecies*); +DESTRUCTOR(ChangeSpeciesEvent); + +BORROWED_GET_FUNC(ChangeVariantEvent, GetCreature, const Creature*); +BORROWED_GET_FUNC(ChangeVariantEvent, GetNewVariant, const CreatureLib::Library::SpeciesVariant*); +DESTRUCTOR(ChangeVariantEvent); + +BORROWED_GET_FUNC(AttackUseEvent, GetAttack, const ExecutingAttack*); +DESTRUCTOR(AttackUseEvent); + export const char* CreatureLib_DisplayTextEvent_GetText(const DisplayTextEvent* p) { return p->GetText().c_str(); } export void CreatureLib_DisplayTextEvent_Destruct(const DisplayTextEvent* p) { delete p; }