7#define MAX(a, b) ((a)>(b)? (a) : (b))
8#define MIN(a, b) ((a)<(b)? (a) : (b))
32 Game(
int stage_width,
int stage_height,
bool full_screen,
int target_fps,
int window_flags,
int exit_key,
33 bool mouse,
bool audio,
const char *project_name);
57 void Run(
const std::string &scene_name, std::unique_ptr<game::core::Scene> scene)
const;
76 [[nodiscard]]
static Vector2
ClampValue(Vector2 value, Vector2
MIN, Vector2
MAX);
The entry point into the game. The constructor is used to specify the basic settings such as the size...
Game(const game::core::Game &game)=delete
RenderTexture2D render_target_
Temporary render target, which will later be output correctly scaled on the screen.
int stage_width_
Width of the game scene (unscaled). Fixed for the entire run time of the game.
Game & operator=(const Game &)=delete
static Vector2 ClampValue(Vector2 value, Vector2 MIN, Vector2 MAX)
Clamp Vector2 value with MIN and MAX and return a new vector2. Required for virtual mouse,...
void Run(const std::string &scene_name, std::unique_ptr< game::core::Scene > scene) const
Starts the first game scene.
bool audio_
Defines whether the audio device is initialized.
void UpdateMousePosition() const
Update virtual mouse position. This becomes necessary because the Raylib function GetMousePosition ca...
bool mouse_
Defines if the mouse support should be activated.
void DrawRenderTexture() const
Draws the correctly scaled and, if necessary, letterboxed graphic on the screen.
int stage_height_
Height of the game scene (unscaled). Fixed for the entire run time of the game.