From 77be74d880675c548417c7ff5af17e1785c62e05 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Mon, 9 Dec 2024 09:41:33 +0100 Subject: changed some function names --- src/crepe/api/LoopManager.cpp | 7 ++++--- src/crepe/api/LoopManager.h | 9 +-------- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'src/crepe/api') diff --git a/src/crepe/api/LoopManager.cpp b/src/crepe/api/LoopManager.cpp index 922e66b..f588d7f 100644 --- a/src/crepe/api/LoopManager.cpp +++ b/src/crepe/api/LoopManager.cpp @@ -48,13 +48,13 @@ void LoopManager::loop() { while (game_running) { this->loop_timer.update(); - while (this->loop_timer.get_lag() >= this->loop_timer.get_scaled_fixed_delta_time()) { + while (this->loop_timer.get_lag() >= this->loop_timer.get_fixed_loop_interval()) { this->process_input(); this->fixed_update(); this->loop_timer.advance_fixed_update(); } - this->update(); + this->frame_update(); this->render(); this->loop_timer.enforce_frame_rate(); } @@ -72,9 +72,10 @@ void LoopManager::render() { this->get_system().update(); this->get_system().update(); } + bool LoopManager::on_shutdown(const ShutDownEvent & e) { this->game_running = false; return false; } -void LoopManager::update() {} +void LoopManager::frame_update() {} diff --git a/src/crepe/api/LoopManager.h b/src/crepe/api/LoopManager.h index 6b2e857..f94cea1 100644 --- a/src/crepe/api/LoopManager.h +++ b/src/crepe/api/LoopManager.h @@ -63,14 +63,7 @@ private: * * Updates the game state based on the elapsed time since the last frame. */ - virtual void update(); - - /** - * \brief Late update which is called after update(). - * - * This function can be used for final adjustments before rendering. - */ - void late_update(); + virtual void frame_update(); /** * \brief Fixed update executed at a fixed rate. -- cgit v1.2.3