13 #include <game_manager/level/light.hpp>
14 #include <message_bus.hpp>
15 #include <game_manager/level/camera.hpp>
16 #include <renderer_sdl.hpp>
17 #include <game_manager/level/level.hpp>
18 #include <console.hpp>
19 #include "main/metrics.hpp"
22 #define DEFAULT_FONT_NORMAL "OpenSans-Regular.ttf 40"
23 #define DEFAULT_FONT_SMALL "OpenSans-Regular.ttf 25"
41 uint16_t w_width = 1920;
42 uint16_t w_height = 1080;
45 uint8_t lightmap[1920][1080]{};
46 uint8_t darkness_level = 0;
47 uint8_t lights_quality = 0;
49 uint16_t default_font_normal = 0;
50 uint16_t default_font_small = 0;
53 bool collisions_shown =
false;
55 bool lighting_enabled =
false;
56 bool metrics_shown =
false;
59 void draw_entities(
const std::vector<ST::entity> &)
const;
61 void draw_collisions(
const std::vector<ST::entity> &)
const;
63 void draw_coordinates(
const std::vector<ST::entity> &)
const;
65 void draw_lights()
const;
67 void draw_fps(
float fps)
const;
71 void draw_text_objects(
const std::vector<ST::text> &)
const;
73 void draw_background(
const uint16_t background[PARALLAX_BG_LAYERS],
74 const uint8_t parallax_speed[PARALLAX_BG_LAYERS])
const;
76 void draw_metrics(
ST::metrics metrics,
const ST::level &level,
const std::vector<ST::entity> &entities)
const;
79 void process_lights(
const std::vector<ST::light> &arg);
81 [[nodiscard]]
bool is_onscreen(
const ST::entity &i)
const;
83 [[nodiscard]]
bool is_onscreen(
const ST::text &i)
const;
86 void handle_messages();
88 void set_darkness(uint8_t arg);
This class represents all static or dynamic objects in the game (excluding text, see ST::text)
This object contains all the data for a level and provides functions for loading and unloading a leve...
This object represents the console window.
This object is responsible for issuing drawing commands and drawing the current level.
drawing_manager(SDL_Window *window, message_bus &gMessageBus)
void update(const ST::level &temp, float fps, console &gConsole, ST::metrics metrics)
The central messaging system of the engine. All subsystem make extensive use of it.
This class handles a small queue for messages.
The camera object - represents the viewport for the game.
This struct represents text objects in the game.