aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.h
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-11-19 20:49:09 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-11-19 20:49:09 +0100
commit0f9f379a4dec7ad9d1dce30af5e2259931692c5f (patch)
treed84a76559d99fd6a3541d0087538564d79e39470 /src/crepe/facade/SDLContext.h
parent38a2476bcfa41b6d83a9a72d35f5acb684dc87fd (diff)
parent0476a8e9dbe7afb422862f7b1c15aaed7f3c416e (diff)
merge with master
Diffstat (limited to 'src/crepe/facade/SDLContext.h')
-rw-r--r--src/crepe/facade/SDLContext.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h
index 536dec5..007092b 100644
--- a/src/crepe/facade/SDLContext.h
+++ b/src/crepe/facade/SDLContext.h
@@ -17,9 +17,8 @@ const int SCREEN_HEIGHT = 480;
namespace crepe {
-// TODO: SDL_Keycode is defined in a header not distributed with crepe, which
-// means this typedef is unusable when crepe is packaged. Wouter will fix this
-// later.
+// TODO: SDL_Keycode is defined in a header not distributed with crepe, which means this
+// typedef is unusable when crepe is packaged. Wouter will fix this later.
typedef SDL_Keycode CREPE_KEYCODES;
class Texture;
@@ -29,8 +28,8 @@ class LoopManager;
* \class SDLContext
* \brief Facade for the SDL library
*
- * SDLContext is a singleton that handles the SDL window and renderer, provides methods
- * for event handling, and rendering to the screen. It is never used directly by the user
+ * SDLContext is a singleton that handles the SDL window and renderer, provides methods for
+ * event handling, and rendering to the screen. It is never used directly by the user
*/
class SDLContext {
@@ -68,9 +67,8 @@ private:
/**
* \brief Pauses the execution for a specified duration.
*
- * This function uses SDL's delay function to halt the program execution
- * for a given number of milliseconds, allowing for frame rate control
- * or other timing-related functionality.
+ * This function uses SDL's delay function to halt the program execution for a given number
+ * of milliseconds, allowing for frame rate control or other timing-related functionality.
*
* \param ms Duration of the delay in milliseconds.
*/
@@ -127,8 +125,7 @@ private:
* \param transform Reference to the Transform for positioning.
* \param camera Reference to the Camera for view adjustments.
*/
- void draw(const Sprite & sprite, const Transform & transform,
- const Camera & camera);
+ void draw(const Sprite & sprite, const Transform & transform, const Camera & camera);
//! Clears the screen, preparing for a new frame.
void clear_screen();
@@ -147,8 +144,7 @@ private:
std::unique_ptr<SDL_Window, std::function<void(SDL_Window *)>> game_window;
//! renderer for the crepe engine
- std::unique_ptr<SDL_Renderer, std::function<void(SDL_Renderer *)>>
- game_renderer;
+ std::unique_ptr<SDL_Renderer, std::function<void(SDL_Renderer *)>> game_renderer;
//! viewport for the camera window
SDL_Rect viewport = {0, 0, 640, 480};