DungeonCrawl
|
Defines and manages functions for map exploration, player movement, and map interactions in map mode. More...
Go to the source code of this file.
Macros | |
#define | COLOR_FOREGROUND 0xffffff |
#define | COLOR_BACKGROUND 0x000000 |
#define | LIGHT_RADIUS 3 |
Enumerations | |
enum | map_mode_result_t { CONTINUE , QUIT , NEXT_FLOOR , COMBAT , SHOW_MENU , SHOW_STATS , SHOW_INVENTORY } |
Functions | |
void | set_player_start_pos (int player_x, int player_y) |
Sets the starting position of the player. | |
vector2d_t | get_player_pos () |
Get the current player position. | |
map_mode_result_t | map_mode_update (character_t *player) |
Updates the player position based on the player's input and redraws the maze. | |
void | init_map_mode (void) |
Initializes the map mode. | |
void | shutdown_map_mode (void) |
Frees any resources associated with the map mode. | |
map_mode_result_t | handle_input (const input_event_t *input_event, character_t *player) |
Functions is only exposed for testing purposes. |
Defines and manages functions for map exploration, player movement, and map interactions in map mode.
Definition in file map_mode.h.
#define COLOR_BACKGROUND 0x000000 |
Definition at line 14 of file map_mode.h.
#define COLOR_FOREGROUND 0xffffff |
Definition at line 13 of file map_mode.h.
#define LIGHT_RADIUS 3 |
Definition at line 16 of file map_mode.h.
enum map_mode_result_t |
Definition at line 18 of file map_mode.h.
vector2d_t get_player_pos | ( | ) |
Get the current player position.
Definition at line 33 of file map_mode.c.
map_mode_result_t handle_input | ( | const input_event_t * | input_event, |
character_t * | player ) |
Functions is only exposed for testing purposes.
Definition at line 37 of file map_mode.c.
void init_map_mode | ( | void | ) |
Initializes the map mode.
Definition at line 139 of file map_mode.c.
map_mode_result_t map_mode_update | ( | character_t * | player | ) |
Updates the player position based on the player's input and redraws the maze.
Definition at line 116 of file map_mode.c.
void set_player_start_pos | ( | int | player_x, |
int | player_y ) |
Sets the starting position of the player.
player_x | The starting x position of the player. |
player_y | The starting y position of the player. |
Definition at line 26 of file map_mode.c.
void shutdown_map_mode | ( | void | ) |
Frees any resources associated with the map mode.
Definition at line 147 of file map_mode.c.