aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-18 14:08:36 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-18 14:08:36 +0100
commit20fc8401083e23e414feae2a9a4d217b228b8f15 (patch)
tree08c9e9c4ddcde5438eb54f6b051895c0896f935b /src/crepe/facade/SDLContext.h
parent60669b60e63532bc264ecd6d106bd15f0688a5b6 (diff)
parent121b64b1cb6cfead5814070c8b0185d3d7308095 (diff)
Merge remote-tracking branch 'origin/master' into niels/rendering_color
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 5b5ee3e..8cbd5fa 100644
--- a/src/crepe/facade/SDLContext.h
+++ b/src/crepe/facade/SDLContext.h
@@ -19,9 +19,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;
@@ -31,8 +30,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 {
@@ -70,9 +69,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.
*/
@@ -129,8 +127,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);
void draw_particle(const Vector2 & pos, const Camera & camera);
@@ -173,8 +170,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};