Go to the documentation of this file.
29 double gametime::Minute;
33 bool gametime::running;
45 double cycles = (60000 * rt_minutes) / (
double)
CYCLE_LENGTH;
49 Minute = cycles / 1440;
64 timer2 = SDL_GetTicks () - timer1;
68 if (timer2 >= gfx_cycle_length)
break;
static void update()
Call this after each run of the main loop to sync the game's speed to the machine it is running on.
#define u_int32
32 bits long unsigned integer
static void init(u_int16 rt_minutes)
Initialize the gametime class.
#define FTS_LIMIT
Defines the maximum number of frames to skip in order to keep the game's speed constant on slow machi...
#define u_int8
8 bits long unsigned integer
#define u_int16
16 bits long unsigned integer
#define CYCLE_LENGTH
Length of a game cycle, in milliseconds.
#define FRAME_RATE
Number of maximum displayed frames per second.
Declares the gametime class.