aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-09 17:25:50 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-09 17:25:50 +0100
commitfa2d728d847e5aa29859c8cf72d8ee8df363373e (patch)
treeb92dc1d61b97dc2cde19d7a98e1e37d88ce031f5 /src
parent61e13d06b1062cb0c41db3ca59bb09c0aff1dd95 (diff)
added doxygens
Diffstat (limited to 'src')
-rw-r--r--src/crepe/manager/EventManager.h3
-rw-r--r--src/crepe/manager/LoopTimerManager.cpp2
-rw-r--r--src/crepe/manager/LoopTimerManager.h12
3 files changed, 12 insertions, 5 deletions
diff --git a/src/crepe/manager/EventManager.h b/src/crepe/manager/EventManager.h
index ba55edf..639e37f 100644
--- a/src/crepe/manager/EventManager.h
+++ b/src/crepe/manager/EventManager.h
@@ -33,6 +33,9 @@ typedef size_t event_channel_t;
class EventManager : public Manager {
public:
static constexpr const event_channel_t CHANNEL_ALL = -1;
+ /**
+ * \param mediator A reference to a Mediator object used for transfering managers.
+ */
EventManager(Mediator & mediator);
/**
* \brief Subscribe to a specific event type.
diff --git a/src/crepe/manager/LoopTimerManager.cpp b/src/crepe/manager/LoopTimerManager.cpp
index 9c77785..597b214 100644
--- a/src/crepe/manager/LoopTimerManager.cpp
+++ b/src/crepe/manager/LoopTimerManager.cpp
@@ -81,7 +81,7 @@ double LoopTimerManager::get_lag() const {
double LoopTimerManager::get_fixed_delta_time() const {
return this->fixed_delta_time.count() * this->time_scale;
}
-void LoopTimerManager::set_fixed_delta_time(int seconds) {
+void LoopTimerManager::set_fixed_delta_time(double seconds) {
this->fixed_delta_time = std::chrono::duration<double>(seconds);
}
diff --git a/src/crepe/manager/LoopTimerManager.h b/src/crepe/manager/LoopTimerManager.h
index 8fc69ed..77674b4 100644
--- a/src/crepe/manager/LoopTimerManager.h
+++ b/src/crepe/manager/LoopTimerManager.h
@@ -16,7 +16,10 @@ namespace crepe {
*/
class LoopTimerManager : public Manager {
public:
- LoopTimerManager(Mediator & mediator);
+ /**
+ * \param mediator A reference to a Mediator object used for transfering managers.
+ */
+ LoopTimerManager(Mediator &mediator);
/**
* \brief Get the current delta time for the current frame.
*
@@ -66,7 +69,7 @@ public:
void set_time_scale(double time_scale);
/**
- * \brief Get the scaled fixed delta time om seconds.
+ * \brief Get the scaled fixed delta time in seconds.
*
* The fixed delta time is used for operations that require uniform time steps,
* such as physics calculations, and is scaled by the current time scale.
@@ -88,13 +91,14 @@ public:
/**
* \brief Set the fixed_delta_time in seconds.
*
- * \param ms fixed_delta_time in seconds.
+ * \param seconds fixed_delta_time in seconds.
*
* The fixed_delta_time value is used to determine how many times per second the fixed_update and process_input functions are called.
*/
- void set_fixed_delta_time(int seconds);
+ void set_fixed_delta_time(double seconds);
private:
+ //! Friend relation to use start,enforce_frame_rate,get_lag,update,advance_fixed_update.
friend class LoopManager;
/**