summaryrefslogtreecommitdiff
path: root/editor/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/main.cpp')
-rw-r--r--editor/main.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/editor/main.cpp b/editor/main.cpp
index 0d4ef9f..7400583 100644
--- a/editor/main.cpp
+++ b/editor/main.cpp
@@ -1,5 +1,7 @@
#include <csignal>
+#include "editor.hpp"
+#include "event.hpp"
#include "game.hpp"
#include "game-settings.hpp"
#include "window-types.hpp"
@@ -13,8 +15,16 @@ PKEWindowProperties windowProps{};
int main() {
signal(SIGTERM, signal_handler);
- fprintf(stdout, "PKE ENTERING\n");
+ fprintf(stdout, "PKE_EDITOR ENTERING\n");
+ // setup
+ {
+ pkeSettings.isShowingEditor = true;
+ Event_RegisterCallback<EventHandler>("GAME_INIT", PkeEditor_Init);
+
+ Event_RegisterCallback<EventHandler>("GAME_TEARDOWN", PkeEditor_Teardown);
+ }
+ // run
Game_Main(&windowProps);
- fprintf(stdout, "PKE EXITING\n");
+ fprintf(stdout, "PKE_EDITOR EXITING\n");
return 0;
}