diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-09-09 16:36:19 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-09-09 16:36:19 -0400 |
| commit | 9da4ad75a7395a2656ea17203197eda890e8093d (patch) | |
| tree | 121d76e733cf17898cab656617bcca5401ca53f7 | |
| parent | 5daa12fed0449a7811fc25ec62236bc060a56fa7 (diff) | |
pke: implement calling level callbacks
| -rw-r--r-- | src/game.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index ab7d211..448bf3d 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -92,6 +92,9 @@ void Game_Tick(double delta) { } } if (pkeSettings.rt.previousLevel != nullptr) { + if (pkeSettings.rt.previousLevel->pke_cb_teardown.func != nullptr) { + pkeSettings.rt.previousLevel->pke_cb_teardown.func(); + } pke_level_teardown(pkeSettings.rt.previousLevel); pkeSettings.rt.previousLevel = nullptr; } @@ -114,7 +117,7 @@ void Game_Tick(double delta) { } if (pkeSettings.rt.activeLevel->pke_cb_tick.func != nullptr) { - pkeSettings.rt.activeLevel->pke_cb_tick.func(); + reinterpret_cast<void(*)(double delta)>(pkeSettings.rt.activeLevel->pke_cb_tick.func)(delta); } PkeCamera_Tick(delta); |
