summaryrefslogtreecommitdiff
path: root/editor/main.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-11-29 21:07:06 -0500
committerJonathan Bradley <jcb@pikum.xyz>2023-11-29 21:07:06 -0500
commit9830bc2425385de6e666251fa9df6318605c639c (patch)
treee52494a973ad8957c30cf7dacf92f1fa518105dc /editor/main.cpp
parente111f78d519363a3d76237ff0a62dcbd5e53e3d6 (diff)
major refactor to decouple the engine and the editor
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;
}