diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-12 22:45:12 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-12 22:45:12 +0100 |
commit | 23196be83778973d9688cc5d465e4e4a16476568 (patch) | |
tree | 91dee3b2c2e05d3b529cf537d12a7faf7ec21dc1 /src/crepe/api/Engine.cpp | |
parent | 297d621987c224db26eadfb9bde9235741387496 (diff) |
add documentation
Diffstat (limited to 'src/crepe/api/Engine.cpp')
-rw-r--r-- | src/crepe/api/Engine.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crepe/api/Engine.cpp b/src/crepe/api/Engine.cpp index 7ae89b9..e8b7fd6 100644 --- a/src/crepe/api/Engine.cpp +++ b/src/crepe/api/Engine.cpp @@ -5,12 +5,12 @@ using namespace crepe; using namespace std; -void Engine::start() { +int Engine::main() noexcept { try { this->setup(); } catch (const exception & e) { Log::logf(Log::Level::ERROR, "Uncaught exception in setup: {}\n", e.what()); - return; + return EXIT_FAILURE; } try { @@ -19,10 +19,11 @@ void Engine::start() { Log::logf(Log::Level::ERROR, "Uncaught exception in main loop: {}\n", e.what()); this->event_manager.trigger_event<ShutDownEvent>(); } + + return EXIT_SUCCESS; } void Engine::setup() { - this->game_running = true; this->loop_timer.start(); this->scene_manager.load_next_scene(); |