|
Trace Engine
A Raycaster Engine in C
|
Functions | |
| void | init_game_state (void) |
| bool | is_game_running (void) |
| bool | is_debug_console_on (void) |
| bool | is_top_down_view_on (void) |
| game_state_t * | get_game_state (void) |
| scenes_t | get_current_scene (void) |
| int | get_current_level_index (void) |
| level_t | get_current_level_info (void) |
| trc_world_position_t | get_current_map_dimensions (void) |
| float | get_current_map_size (void) |
| int | get_current_map_offset (void) |
| trc_world_position_t | get_current_camera_spawn (void) |
| int | get_fps (void) |
| void | update_game_state_fps (const int fps) |
| void | stop_game (void) |
| void | update_debug_console_state (void) |
| void | load_level (const int level_idx) |
| void | reload_level (void) |
Variables | |
| game_state_t | game_state = {0} |
| trc_world_position_t get_current_camera_spawn | ( | void | ) |
Returns the camera spawn of the current level
| int get_current_level_index | ( | void | ) |
Returns the current level id
| level_t get_current_level_info | ( | void | ) |
Returns the info of the current level
| trc_world_position_t get_current_map_dimensions | ( | void | ) |
Returns the map dimensions of the current level in a trc_world_position_t
| int get_current_map_offset | ( | void | ) |
Returns the current map offset for the levels map array
| float get_current_map_size | ( | void | ) |
Returns the map size of the current level
| scenes_t get_current_scene | ( | void | ) |
Returns the current scene being played
| int get_fps | ( | void | ) |
Returns the current FPS count
| game_state_t * get_game_state | ( | void | ) |
Returns the current game state
| void init_game_state | ( | void | ) |
The current state of ALL the program
| bool is_debug_console_on | ( | void | ) |
Returns if the debug console is begin shown
| bool is_game_running | ( | void | ) |
Returns if the game is currently running
| bool is_top_down_view_on | ( | void | ) |
Returns if the 2D top down view of the map is being shown
| void load_level | ( | const int | level_idx | ) |
Update the current map and camera info to be the level_idx level
| level_idx | The index of the level to get the info from (from 0 to LEVEL_COUNT) |
| void reload_level | ( | void | ) |
Resets the current level
| void stop_game | ( | void | ) |
Sets the game_running variable to false
| void update_debug_console_state | ( | void | ) |
If the debug console is being shown, this turns it off
If the debug console is hidden, this turns it on
| void update_game_state_fps | ( | const int | fps | ) |
Updates the count frame per second
| game_state_t game_state = {0} |