summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/CMakeLists.txt10
-rw-r--r--runtime/main.cpp21
-rw-r--r--src/game.cpp3
3 files changed, 31 insertions, 3 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
new file mode 100644
index 0000000..24349aa
--- /dev/null
+++ b/runtime/CMakeLists.txt
@@ -0,0 +1,10 @@
+project(pke_runtime VERSION 0.0)
+
+set(PKE_RUNTIME_SOURCE_FILES
+ main.cpp
+)
+add_executable(pke_runtime
+ ${PKE_RUNTIME_SOURCE_FILES}
+)
+target_link_libraries(pke_runtime PRIVATE pke)
+target_include_directories(pke_runtime PRIVATE pke)
diff --git a/runtime/main.cpp b/runtime/main.cpp
new file mode 100644
index 0000000..c3b20b9
--- /dev/null
+++ b/runtime/main.cpp
@@ -0,0 +1,21 @@
+
+#include <csignal>
+
+#include "plugins.hpp"
+#include "event.hpp"
+#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;
+}
+
+int main(int argc, char *argv[]) {
+ signal(SIGTERM, signal_handler);
+ fprintf(stdout, "PKE_EDITOR ENTERING\n");
+ Game_Main({});
+ fprintf(stdout, "PKE_EDITOR EXITING\n");
+ return 0;
+}
diff --git a/src/game.cpp b/src/game.cpp
index 5d39d1b..c2424ff 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -616,9 +616,6 @@ void Game_Init() {
for (long i = 0; i < consoleBufferCount; ++i) {
memset(consoleBuffer[i], '\0', consoleLineLength);
}
- if (!pkePlugin.OnImGuiRender) {
- pkePlugin.OnImGuiRender = Game_RecordImGui;
- }
}
void Game_Teardown() { }