summaryrefslogtreecommitdiff
path: root/editor/main.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-11-28 16:55:20 -0500
committerJonathan Bradley <jcb@pikum.xyz>2023-11-28 16:55:20 -0500
commitd56ef32202ea5180aa8d1308418946d5467adf40 (patch)
tree493adb247a59e971ad78a6558c0c0d609282a40f /editor/main.cpp
parent6d9bea3e71137a94ba64fd0b5661d341304b2dc1 (diff)
make pke a library and the editor its own executable
Diffstat (limited to 'editor/main.cpp')
-rw-r--r--editor/main.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/editor/main.cpp b/editor/main.cpp
new file mode 100644
index 0000000..0d4ef9f
--- /dev/null
+++ b/editor/main.cpp
@@ -0,0 +1,20 @@
+#include <csignal>
+
+#include "game.hpp"
+#include "game-settings.hpp"
+#include "window-types.hpp"
+
+void signal_handler(int signal_num) {
+ fprintf(stdout, "Received signal: %d - shutting down\n", signal_num);
+ pkeSettings.isGameRunning = false;
+}
+
+PKEWindowProperties windowProps{};
+
+int main() {
+ signal(SIGTERM, signal_handler);
+ fprintf(stdout, "PKE ENTERING\n");
+ Game_Main(&windowProps);
+ fprintf(stdout, "PKE EXITING\n");
+ return 0;
+}