gl-adventure
|
Declares function to deal with system time. More...
Go to the source code of this file.
Functions | |
void | init_game_time () |
Init the game time. More... | |
float | get_game_time () |
Get the processed time since the game start. More... | |
void | update_fps () |
Update the fps value. More... | |
Variables | |
float | timeAtGameStart |
Time when the game start. | |
long | ticksPerSecond |
The system ticks per second. | |
float | lastUpdate |
The time when the last update occur. | |
float | fpsUpdateInterval |
Updates every (?? seconds) | |
unsigned int | numFrames |
Frames drawn since last FPS update. | |
long | fps |
The frame per second number. | |
float | lastInGameTimeUpdate |
Ellapsed time since last in-game update. | |
float | lastFoodDownTime |
Ellapsed time since last food down. | |
float | lastWaterDownTime |
Ellapsed time since last water down. | |
Declares function to deal with system time.
The following page http://www.programmersheaven.com/2/time-fps was really usefull.
Modifications :
float get_game_time | ( | ) |
Get the processed time since the game start.
void init_game_time | ( | ) |
Init the game time.
This must be called only one tile when the game is started.
void update_fps | ( | ) |
Update the fps value.
This must be called when a frame is drawn.