aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/manager')
-rw-r--r--src/crepe/manager/EventManager.cpp2
-rw-r--r--src/crepe/manager/EventManager.h1
-rw-r--r--src/crepe/manager/LoopTimerManager.cpp18
3 files changed, 13 insertions, 8 deletions
diff --git a/src/crepe/manager/EventManager.cpp b/src/crepe/manager/EventManager.cpp
index 9b0fa95..6aa49ee 100644
--- a/src/crepe/manager/EventManager.cpp
+++ b/src/crepe/manager/EventManager.cpp
@@ -3,7 +3,7 @@
using namespace crepe;
using namespace std;
-EventManager::EventManager(Mediator & mediator) : Manager(mediator){
+EventManager::EventManager(Mediator & mediator) : Manager(mediator) {
this->mediator.event_manager = *this;
}
void EventManager::dispatch_events() {
diff --git a/src/crepe/manager/EventManager.h b/src/crepe/manager/EventManager.h
index 30b929c..ba55edf 100644
--- a/src/crepe/manager/EventManager.h
+++ b/src/crepe/manager/EventManager.h
@@ -98,7 +98,6 @@ public:
void clear();
private:
-
/**
* \struct QueueEntry
* \brief Represents an entry in the event queue.
diff --git a/src/crepe/manager/LoopTimerManager.cpp b/src/crepe/manager/LoopTimerManager.cpp
index 2379fdd..9bf30ae 100644
--- a/src/crepe/manager/LoopTimerManager.cpp
+++ b/src/crepe/manager/LoopTimerManager.cpp
@@ -8,10 +8,10 @@
using namespace crepe;
-LoopTimerManager::LoopTimerManager(Mediator & mediator) : Manager(mediator) {
+LoopTimerManager::LoopTimerManager(Mediator & mediator) : Manager(mediator) {
this->mediator.loop_timer = *this;
- dbg_trace();
- }
+ dbg_trace();
+}
void LoopTimerManager::start() {
this->last_frame_time = std::chrono::steady_clock::now();
@@ -38,13 +38,19 @@ void LoopTimerManager::update() {
this->last_frame_time = current_frame_time;
}
-double LoopTimerManager::get_delta_time() const { return this->delta_time.count() * this->time_scale; }
+double LoopTimerManager::get_delta_time() const {
+ return this->delta_time.count() * this->time_scale;
+}
double LoopTimerManager::get_current_time() const { return this->elapsed_time.count(); }
-void LoopTimerManager::advance_fixed_update() { this->elapsed_fixed_time += this->fixed_delta_time; }
+void LoopTimerManager::advance_fixed_update() {
+ this->elapsed_fixed_time += this->fixed_delta_time;
+}
-double LoopTimerManager::get_fixed_delta_time() const { return this->fixed_delta_time.count(); }
+double LoopTimerManager::get_fixed_delta_time() const {
+ return this->fixed_delta_time.count();
+}
void LoopTimerManager::set_target_fps(int fps) {
this->target_fps = fps;