diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-05 19:10:12 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-05 19:10:12 +0100 |
commit | a0070890fcdb422db85660fc44bcc709832870b8 (patch) | |
tree | baeef52627277dd069ada5c605a247ce8e1deef3 /src/crepe | |
parent | 823935627c7743c36e1b832670f931d6a67abe2a (diff) |
gameloop test working
Diffstat (limited to 'src/crepe')
-rw-r--r-- | src/crepe/api/LoopManager.cpp | 5 | ||||
-rw-r--r-- | src/crepe/api/LoopManager.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/crepe/api/LoopManager.cpp b/src/crepe/api/LoopManager.cpp index 5879d79..454afe8 100644 --- a/src/crepe/api/LoopManager.cpp +++ b/src/crepe/api/LoopManager.cpp @@ -26,7 +26,9 @@ LoopManager::LoopManager() { this->mediator.loop_timer = *loop_timer; } -void LoopManager::process_input() { this->sdl_context.handle_events(this->game_running); } +void LoopManager::process_input() { + + this->sdl_context.handle_events(this->game_running); } void LoopManager::start() { this->setup(); @@ -57,7 +59,6 @@ void LoopManager::setup() { this->game_running = true; this->loop_timer->start(); - this->loop_timer->set_target_fps(200); } void LoopManager::render() { diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h index 7097ee1..2161dff 100644 --- a/src/crepe/api/LoopManager.h +++ b/src/crepe/api/LoopManager.h @@ -81,7 +81,7 @@ private: * * Renders the current state of the game to the screen. */ - void render(); + virtual void render(); bool game_running = false; |