aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/LoopManager.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-04 16:38:15 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-04 16:38:15 +0100
commit5a43793e247fbffec590d334b89cc34d19049f45 (patch)
tree9447beee8ac21e4343927c595da4890c23223164 /src/crepe/api/LoopManager.cpp
parent1e72559664cb7cc68c1c404f1709d679d35a66e2 (diff)
gameloop tests
Diffstat (limited to 'src/crepe/api/LoopManager.cpp')
-rw-r--r--src/crepe/api/LoopManager.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/crepe/api/LoopManager.cpp b/src/crepe/api/LoopManager.cpp
index 4a6d2cd..e584ba7 100644
--- a/src/crepe/api/LoopManager.cpp
+++ b/src/crepe/api/LoopManager.cpp
@@ -1,3 +1,5 @@
+#include <iostream>
+
#include "../facade/SDLContext.h"
#include "../system/AnimatorSystem.h"
@@ -60,12 +62,12 @@ void LoopManager::loop() {
void LoopManager::setup() {
this->game_running = true;
this->loop_timer->start();
- this->loop_timer->set_fps(60);
+ this->loop_timer->set_target_fps(60);
}
void LoopManager::render() {
if (this->game_running) {
- this->get_system<RenderSystem>().update();
+ //this->get_system<RenderSystem>().update();
}
}
bool LoopManager::on_shutdown(const ShutDownEvent & e){
@@ -73,4 +75,6 @@ bool LoopManager::on_shutdown(const ShutDownEvent & e){
return false;
}
-void LoopManager::update() {}
+void LoopManager::update() {
+ std::cout << this->loop_timer->get_fps() << std::endl;
+}