From 83ee80ea439fc6a9042307a25b214b3efcf28d91 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Fri, 6 Dec 2024 15:42:52 +0100 Subject: make format --- src/crepe/api/Animator.h | 4 ++-- src/crepe/api/Sprite.h | 4 ++-- src/crepe/facade/SDLContext.cpp | 6 ++++-- src/crepe/manager/Mediator.h | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src/crepe') diff --git a/src/crepe/api/Animator.h b/src/crepe/api/Animator.h index e0399a8..2a0a889 100644 --- a/src/crepe/api/Animator.h +++ b/src/crepe/api/Animator.h @@ -110,7 +110,8 @@ public: * This constructor sets up the Animator with the given parameters, and initializes the * animation system. */ - Animator(game_object_id_t id, Sprite & ss, unsigned int max_row, unsigned int max_col, const Animator::Data & ctx); + Animator(game_object_id_t id, Sprite & ss, unsigned int max_row, unsigned int max_col, + const Animator::Data & ctx); ~Animator(); // dbg_trace public: @@ -124,7 +125,6 @@ public: const unsigned int row; Animator::Data data; - }; } // namespace crepe // diff --git a/src/crepe/api/Sprite.h b/src/crepe/api/Sprite.h index 0ccc296..78ed7ad 100644 --- a/src/crepe/api/Sprite.h +++ b/src/crepe/api/Sprite.h @@ -27,7 +27,7 @@ public: //! vertical flip bool flip_y = false; }; - + struct Data { //! Color tint of the sprite Color color = Color::WHITE; @@ -58,7 +58,7 @@ public: //! independent sprite scale multiplier float scale_offset = 1; - //! independent sprite offset position + //! independent sprite offset position vec2 position_offset; }; diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index 9533b8a..cf9f7d5 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -243,8 +243,10 @@ SDL_FRect SDLContext::get_dst_rect(const DstRect & ctx) const { size *= cam.render_scale * ctx.img_scale * data.scale_offset; - vec2 screen_pos = (ctx.pos + data.position_offset - cam.cam_pos + (cam.zoomed_viewport) / 2) * cam.render_scale - - size / 2 + cam.bar_size; + vec2 screen_pos + = (ctx.pos + data.position_offset - cam.cam_pos + (cam.zoomed_viewport) / 2) + * cam.render_scale + - size / 2 + cam.bar_size; return SDL_FRect{ .x = screen_pos.x, diff --git a/src/crepe/manager/Mediator.h b/src/crepe/manager/Mediator.h index 5b53bcc..f8517a3 100644 --- a/src/crepe/manager/Mediator.h +++ b/src/crepe/manager/Mediator.h @@ -3,9 +3,9 @@ #include "../util/OptionalRef.h" // TODO: remove these singletons: +#include "../facade/SDLContext.h" #include "EventManager.h" #include "SaveManager.h" -#include "../facade/SDLContext.h" namespace crepe { -- cgit v1.2.3