Reworked event hook to a system with pre-allocated memory, owned by the battle. This deals with cleaning up event data memory.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-07-31 16:19:39 +02:00
parent 3e8f9340f3
commit 0eaae43444
5 changed files with 33 additions and 13 deletions

View File

@@ -76,7 +76,4 @@ export bool CreatureLib_Battle_HasVolatileScript(Battle* p, const char* key) {
export uint8_t CreatureLib_Battle_RegisterEventListener(Battle* p, void (*func)(const EventData*)) {
Try(p->RegisterEventListener(func);)
}
export uint8_t CreatureLib_Battle_TriggerEventListener(Battle* p, EventData* data) {
Try(p->TriggerEventListener(data);)
}