DungeonCrawl
|
Declares core game states, global database connection, and main game control functions. More...
#include "database/database.h"
Go to the source code of this file.
Macros | |
#define | COLOR_FG_RGB 255, 255, 255 |
#define | COLOR_BG_RGB 0, 0, 0 |
Enumerations | |
enum | game_state_t { MAIN_MENU , MAP_MODE , COMBAT_MODE , LOOT_MODE , INVENTORY_MODE , GENERATE_MAP , STATS_MODE , EXIT } |
Functions | |
void | run_game () |
Starts the game loop. | |
void | main_menu_state () |
Handles the main menu state of the game. | |
void | map_mode_state () |
Handles the map mode state of the game. | |
void | inventory_mode_state () |
Handles the inventory mode state of the game. | |
void | loot_mode_state () |
Handles the loot mode state of the game. |
Variables | |
struct notcurses * | nc |
struct ncplane * | stdplane |
db_connection_t | db_connection |
Declares core game states, global database connection, and main game control functions.
Definition in file game.h.
enum game_state_t |
void inventory_mode_state | ( | ) |
Handles the inventory mode state of the game.
This function manages the interactions and transitions that occur within the inventory mode, including item management, usage, and equipping items.
Definition at line 249 of file game.c.
void loot_mode_state | ( | ) |
Handles the loot mode state of the game.
This function manages the interactions and transitions that occur when the player is looting after a combat encounter, including selecting items to take and managing inventory.
Definition at line 238 of file game.c.
void main_menu_state | ( | ) |
Handles the main menu state of the game.
This function manages the interactions and transitions that occur within the main menu, including starting a new game, loading a game, and changing settings.
Definition at line 115 of file game.c.
void map_mode_state | ( | ) |
Handles the map mode state of the game.
This function manages the interactions and transitions that occur within the map mode, including player movement, map exploration, and interactions with map elements.
Definition at line 186 of file game.c.
void run_game | ( | ) |
Starts the game loop.
This function initializes and runs the main game loop, handling the various game states and transitions until the game is exited.
|
extern |
|
extern |
Definition at line 26 of file io_handler.c.
|
extern |
Definition at line 27 of file io_handler.c.