From a0070890fcdb422db85660fc44bcc709832870b8 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Thu, 5 Dec 2024 19:10:12 +0100 Subject: gameloop test working --- src/crepe/api/LoopManager.cpp | 5 +++-- src/crepe/api/LoopManager.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/crepe') 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; -- cgit v1.2.3