From 9da4ad75a7395a2656ea17203197eda890e8093d Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Tue, 9 Sep 2025 16:36:19 -0400 Subject: pke: implement calling level callbacks --- src/game.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(pkeSettings.rt.activeLevel->pke_cb_tick.func)(delta); } PkeCamera_Tick(delta); -- cgit v1.2.3