From b6141f6cbf07f0fbfadc892488f2ba83b7cf1719 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Sat, 10 Dec 2016 18:33:40 -0500 Subject: doc updates --- include/gametime.hpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'include/gametime.hpp') diff --git a/include/gametime.hpp b/include/gametime.hpp index a809ef9..988533a 100644 --- a/include/gametime.hpp +++ b/include/gametime.hpp @@ -1,16 +1,52 @@ +/** + * @file gametime.hpp + * @brief Handles time related operations + */ + #ifndef GAMETIME_H_ #define GAMETIME_H_ namespace game { namespace time { + /** + * Sets the game's tick count to the desired amount. + * @param t desired tick count + */ void setTickCount(unsigned int t); + + /** + * Gets the current tick count. + * @return the tick count + */ unsigned int getTickCount(void); + + /** + * Calculates and returns the delta time. + * @return the delta time + */ unsigned int getDeltaTime(void); + /** + * Increments the game's tick count. + */ void tick(void); + + /** + * Increments the game's tick count by the given amount of ticks. + * @param ticks the number of ticks to add + */ void tick(unsigned int ticks); + + /** + * Determines if a tick has passed since the last call to this function. + * @return if a tick has passed + */ bool tickHasPassed(void); + /** + * Handles time updating. + * This should be called from the game's main loop. + */ void mainLoopHandler(void); } } -- cgit v1.2.3