Defines | |
#define | _PHYSFS |
#define | _INITS_ |
#define | _KEYBOARD_ |
#define | _MOUSE_ |
#define | _BUTTONS_ |
#define | _EVENTHANDLER_ |
#define | _SPRITES_ |
#define | _MAINGAME_ |
#define | _RENDER_ |
#define | _PHYSCOL_ |
#define | _OPTIONS_ |
#define | _MAIN_ |
Functions | |
int | main (int argc, char **argv) |
The entry point of the game. | |
_Bool | data_init (void) |
Initializes the gdata structure. | |
_Bool | main_loop (void) |
Everything happens here! | |
GDATAPTR | get_game_data (void) |
Grabs the main GDATA structure. | |
void | loader (void) |
void | cleanup (GDATAPTR game) |
The entry point of the program and contains the main_loop function
_Bool data_init | ( | void | ) |
Initializes the gdata structure.
Initializes all members of the gdata structure, *data. Specifically, the screen is set, timer started, keyboard and mouse installed, allegro events registered and other important routines are executed.
GDATAPTR get_game_data | ( | void | ) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
The entry point of the game.
Initializes all needed assets and transfer control to the main_loop.
[in] | argc | The number of command line arguments passed to the program for processing |
[in] | *argv[] | The commands passed to the program, contained in an array of char*'s |
_Bool main_loop | ( | void | ) |
Everything happens here!
The main game loop, all other function are directly or indirectly called from this function. The fucntion does not return until the game quits, i.e. when the user hits the escape key or closes the Allegro window.