#include <stdbool.h>
#include "trc_world_position.h"
Go to the source code of this file.
◆ scenes_t
A scene represents a state for the game (like the main menu, options menu, specific level, boos fight, etc)
| Enumerator |
|---|
| MAIN_MENU_SCENE | The main menu, the first scene
|
| GAME_SCENE | Gameplay scene
|
◆ get_current_camera_spawn()
Returns the camera spawn of the current level
◆ get_current_level_index()
| int get_current_level_index |
( |
void |
| ) |
|
Returns the current level id
◆ get_current_level_info()
| level_t get_current_level_info |
( |
void |
| ) |
|
Returns the info of the current level
◆ get_current_map_dimensions()
◆ get_current_map_offset()
| int get_current_map_offset |
( |
void |
| ) |
|
Returns the current map offset for the levels map array
◆ get_current_map_size()
| float get_current_map_size |
( |
void |
| ) |
|
Returns the map size of the current level
◆ get_current_scene()
Returns the current scene being played
◆ get_fps()
Returns the current FPS count
◆ get_game_state()
Returns the current game state
◆ init_game_state()
| void init_game_state |
( |
void |
| ) |
|
Initialize the state of the game
The current state of ALL the program
◆ is_debug_console_on()
| bool is_debug_console_on |
( |
void |
| ) |
|
Returns if the debug console is begin shown
◆ is_game_running()
| bool is_game_running |
( |
void |
| ) |
|
Returns if the game is currently running
◆ is_top_down_view_on()
| bool is_top_down_view_on |
( |
void |
| ) |
|
Returns if the 2D top down view of the map is being shown
◆ load_level()
| void load_level |
( |
const int |
level_idx | ) |
|
Update the current map and camera info to be the level_idx level
- Parameters
-
| level_idx | The index of the level to get the info from (from 0 to LEVEL_COUNT) |
- Note
- Calling this function will RESET the level (every door will be to the original state, the camera will be at the spawn of that level, etc)
◆ reload_level()
| void reload_level |
( |
void |
| ) |
|
◆ stop_game()
Sets the game_running variable to false
◆ update_debug_console_state()
| 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
◆ update_game_state_fps()
| void update_game_state_fps |
( |
const int |
fps | ) |
|
Updates the count frame per second