aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-06 15:42:52 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-06 15:42:52 +0100
commit83ee80ea439fc6a9042307a25b214b3efcf28d91 (patch)
tree4ad0acd5be1c106c3406193846f0cb4f98b5f303 /src/crepe
parent7ec1fcfcff0c01d204ccbf1bac9919ba610b8606 (diff)
make format
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/api/Animator.h4
-rw-r--r--src/crepe/api/Sprite.h4
-rw-r--r--src/crepe/facade/SDLContext.cpp6
-rw-r--r--src/crepe/manager/Mediator.h2
4 files changed, 9 insertions, 7 deletions
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 {