diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2023-12-05 13:52:31 -0500 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2023-12-05 13:52:31 -0500 |
| commit | bbde646e46f8993fcf1f30ead6b7376f1670f389 (patch) | |
| tree | dd38ba7241d8fdbc642daeb44d64bf594260cc26 /runtime | |
| parent | f3a850f0f7f2547c80f4d1dac894788ca3546c33 (diff) | |
add runtime first pass
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | runtime/main.cpp | 21 |
2 files changed, 31 insertions, 0 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; +} |
