summaryrefslogtreecommitdiff
path: root/editor/main.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-11-30 11:31:45 -0500
committerJonathan Bradley <jcb@pikum.xyz>2023-11-30 11:31:45 -0500
commit6e498a3781f5ccbbaa6cf5e407cf67722624760f (patch)
tree8a4e95e4d962b3102d8d348a0f292f8ef8ee30df /editor/main.cpp
parent9830bc2425385de6e666251fa9df6318605c639c (diff)
prefer explicit callback system over events
Diffstat (limited to 'editor/main.cpp')
-rw-r--r--editor/main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/editor/main.cpp b/editor/main.cpp
index 7400583..54c7607 100644
--- a/editor/main.cpp
+++ b/editor/main.cpp
@@ -11,20 +11,19 @@ void signal_handler(int signal_num) {
pkeSettings.isGameRunning = false;
}
-PKEWindowProperties windowProps{};
-
int main() {
signal(SIGTERM, signal_handler);
fprintf(stdout, "PKE_EDITOR ENTERING\n");
// setup
{
pkeSettings.isShowingEditor = true;
- Event_RegisterCallback<EventHandler>("GAME_INIT", PkeEditor_Init);
-
- Event_RegisterCallback<EventHandler>("GAME_TEARDOWN", PkeEditor_Teardown);
+ pkeGameCallbacks.OnInit = PkeEditor_Init;
+ pkeGameCallbacks.OnTick = PkeEditor_Tick;
+ pkeGameCallbacks.OnTeardown = PkeEditor_Teardown;
+ pkeGameCallbacks.OnImGuiRender = PkeEditor_RecordImGui;
}
// run
- Game_Main(&windowProps);
+ Game_Main({});
fprintf(stdout, "PKE_EDITOR EXITING\n");
return 0;
}