orbit-plus/src/main.c

51 lines
509 B
C
Raw Normal View History

2023-02-12 04:18:45 +00:00
/*
* 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;
}