51 lines
509 B
C
51 lines
509 B
C
/*
|
|
* DESCRIPTION:
|
|
* Main file.
|
|
*/
|
|
|
|
#include "main.h"
|
|
|
|
static void loop(void);
|
|
static void init(void);
|
|
static void quit(void);
|
|
|
|
struct Game game;
|
|
|
|
/* Initializes the program. */
|
|
static void
|
|
init(void)
|
|
{
|
|
game_init();
|
|
}
|
|
|
|
/* Quits the program. */
|
|
static void
|
|
quit(void)
|
|
{
|
|
game_free();
|
|
|
|
exit(EXIT_SUCCESS);
|
|
}
|
|
|
|
/* Main loop. */
|
|
static void
|
|
loop(void)
|
|
{
|
|
game_loop();
|
|
|
|
if (game.isQuit)
|
|
quit();
|
|
}
|
|
|
|
/* main(). */
|
|
s32
|
|
main(s32 argc, char* argv[])
|
|
{
|
|
init();
|
|
|
|
while (true)
|
|
loop();
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|