10 #ifndef ST_GAME_MANAGER_DEF
11 #define ST_GAME_MANAGER_DEF
13 #include <game_manager/level/level.hpp>
14 #include <message_bus.hpp>
15 #include <game_manager/lua_backend/lua_backend.hpp>
16 #include <task_manager.hpp>
23 std::vector<ST::level> levels{};
24 std::string active_level{};
27 std::atomic_bool game_is_running_{};
31 std::bitset<256> keys_pressed_data{};
32 std::bitset<256> keys_held_data{};
33 std::bitset<256> keys_released_data{};
36 int16_t left_trigger{};
37 int16_t right_trigger{};
38 int16_t left_stick_horizontal{};
39 int16_t left_stick_vertical{};
40 int16_t right_stick_vertical{};
41 int16_t right_stick_horizontal{};
44 uint16_t v_width = 1920;
45 uint16_t v_height = 1080;
48 uint16_t w_width = 1920;
49 uint16_t w_height = 1080;
52 void handle_messages();
54 int8_t load_level(
const std::string &);
56 void unload_level(
const std::string &);
58 void reload_level(
const std::string &);
60 void start_level(
const std::string &);
64 void run_level_loop();
67 bool vsync_flag =
true;
68 bool fullscreen_status =
false;
69 uint8_t music_volume_level = 100;
70 uint8_t sounds_volume_level = 100;
71 bool audio_enabled =
true;
82 [[nodiscard]]
bool key_held(uint16_t arg)
const;
118 void save_state(
const std::string &filepath);
This object contains all the data for a level and provides functions for loading and unloading a leve...
This class is responsible for managing all levels and the lua backend, it is the heart of the engine.
bool key_released(uint16_t arg) const
uint16_t get_internal_width() const
void center_camera_on_entity(uint64_t id)
uint16_t get_window_height() const
int16_t get_left_stick_vertical() const
bool key_held(uint16_t arg) const
int16_t get_left_trigger() const
int32_t get_mouse_x() const
int16_t get_right_stick_vertical() const
int16_t get_left_stick_horizontal() const
ST::level * get_level() const
uint16_t get_window_width() const
bool game_is_running() const
uint16_t get_internal_height() const
int32_t get_mouse_y() const
bool key_pressed(uint16_t arg) const
int16_t get_right_trigger() const
game_manager(message_bus &msg_bus)
int16_t get_right_stick_horizontal() const
std::string get_active_level() const
This class handles all interaction with lua.
The central messaging system of the engine. All subsystem make extensive use of it.
This class handles a small queue for messages.
The Task Manager handles all things multi-threaded in the engine.