Declares application initialization, shutdown, and main entry point.
More...
Go to the source code of this file.
|
enum | exit_code_t {
SUCCESS
, FAIL_TB_INIT
, FAIL_MEM_POOL_INIT
, FAIL_LOCAL_INIT
,
FAIL_IO_HANDLER_INIT
, FAIL_MAIN_MENU_INIT
, FAIL_SAVE_MENU_INIT
, FAIL_LANGUAGE_INIT
,
FAIL_GAME_MODE_INIT
, FAIL_INVENTORY_MODE_INIT
, FAIL_GAME_ENTITY_INIT
, FAIL_STATS_MODE_INIT
,
FAIL_ERROR
} |
|
int | main (void) |
| Main entry point for the application.
|
Declares application initialization, shutdown, and main entry point.
Definition in file main.h.
◆ exit_code_t
Definition at line 10 of file main.h.
10 {
11 SUCCESS,
12 FAIL_TB_INIT,
13 FAIL_MEM_POOL_INIT,
14 FAIL_LOCAL_INIT,
15 FAIL_IO_HANDLER_INIT,
16 FAIL_MAIN_MENU_INIT,
17 FAIL_SAVE_MENU_INIT,
18 FAIL_LANGUAGE_INIT,
19 FAIL_GAME_MODE_INIT,
20 FAIL_INVENTORY_MODE_INIT,
21 FAIL_GAME_ENTITY_INIT,
22 FAIL_STATS_MODE_INIT,
23 FAIL_ERROR,
24} exit_code_t;
◆ main()
Main entry point for the application.
This function initializes the game, runs the main game loop, and performs cleanup before exiting. It handles the overall flow of the application.
- Returns
- Exit code indicating success or failure.
Definition at line 178 of file main.c.
178 {
179 const int exit_code =
init();
182 return exit_code;
183 }
186 return exit_code;
187}
#define COMMON_SUCCESS
Common success return value.
void run_game()
Starts the game loop.
int init()
Initializes all necessary parts and subsystems for the game.
void shutdown_game(void)
Frees all allocated resources and performs cleanup tasks for the game.
◆ init_done