14 #include "lissajous.hpp"
54 inline float getWidth()
const {
58 inline float getHeight()
const {
62 inline size_t getFPS()
const {
71 inline bool shouldClose()
const {
72 return WindowShouldClose();
75 inline void beginDrawing() {
79 inline void endDrawing() {
99 void drawText(
const std::string& text,
const float x,
const float y,
const float scale = 1.0f,
const Color& color = WHITE);
115 void drawBubble(
const float x,
const float y,
const float radius,
const size_t hue);
131 void drawHUD(
const GameHUD& hud);
177 inline double time()
const {
186 return GetFrameTime() / 0.01667f;
201 return bubbleTexs.size();
210 return bgImgs.size();
218 enum class HandledKeys {
219 ACTION = KEY_LEFT_SHIFT,
224 inline bool inputOnce(
const HandledKeys key)
const {
225 return IsKeyPressed(
static_cast<int>(key));
228 inline bool inputHold(
const HandledKeys key)
const {
229 return IsKeyDown(
static_cast<int>(key));
240 std::vector<Image> bgImgs;
241 std::vector<Texture2D> bubbleTexs;
252 void initBackground();
Provides an object to manage the game HUD state.
Definition: hud.hpp:29
Handles the game window and provides rendering functionality.
Definition: window.hpp:27
void drawBoard(const PlacedBoard &boardData)
Draws the provided placed game board.
Definition: window.cpp:48
void loadBackground(const size_t index)
Loads a background image into the game window.
Definition: window.cpp:89
size_t countBackgroundImages() const
Gets the number of background images loaded.
Definition: window.hpp:209
~GameWindow()
Cleans up game window resources.
Definition: window.cpp:17
float getFrameDeltaRatio() const
Gets the ratio between the time the previous frame has taken and 60 FPS.
Definition: window.hpp:185
void drawBubble(const float x, const float y, const float radius, const size_t hue)
Draws a bubble at a specific position.
Definition: window.cpp:32
GameWindow()
Initializes the game window with specific configurations.
Definition: window.cpp:5
void stepBackground()
Steps the background movement animation.
Definition: window.cpp:84
void drawText(const std::string &text, const float x, const float y, const float scale=1.0f, const Color &color=WHITE)
Draws text at a specific position.
Definition: window.cpp:28
void applyLoadedBackground()
Applies the loaded background to the game window.
Definition: window.cpp:101
size_t countBubbleTextures() const
Gets the number of bubble textures loaded.
Definition: window.hpp:200
Provides a view of a Lissajous curve.
Definition: lissajous.hpp:19
Describes a game board placed in a window.
Definition: pboard.hpp:16