aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-18 11:32:41 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-18 11:32:41 +0100
commit3f176dace320b9bb72675cf9b6fd77fe6d35c539 (patch)
tree8eeabdd5d2a3741af092713faab2c255a7d3c1f4 /src/crepe/facade
parentea5e62b4ca8fbe214605abdab486bf6dcc1cc540 (diff)
make format
Diffstat (limited to 'src/crepe/facade')
-rw-r--r--src/crepe/facade/SDLContext.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index 35f82d8..ed702b0 100644
--- a/src/crepe/facade/SDLContext.cpp
+++ b/src/crepe/facade/SDLContext.cpp
@@ -140,7 +140,6 @@ SDL_FRect SDLContext::get_dst_rect(const DestinationRectangleData & ctx) const {
vec2 size = data.size;
vec2 screen_pos = ctx.pos + data.position_offset;
-
if (data.size.x == 0 && data.size.y != 0) {
size.x = data.size.y * aspect_ratio;
}
@@ -151,11 +150,14 @@ SDL_FRect SDLContext::get_dst_rect(const DestinationRectangleData & ctx) const {
if (ctx.sprite.data.world_space) {
cout << "world_space" << endl;
- vec2 multiplier = cam_aux_data.cam_pos + (cam_aux_data.zoomed_viewport / 2) * cam_aux_data.render_scale - size / 2 + cam_aux_data.bar_size;
+ vec2 multiplier = cam_aux_data.cam_pos
+ + (cam_aux_data.zoomed_viewport / 2) * cam_aux_data.render_scale
+ - size / 2 + cam_aux_data.bar_size;
screen_pos += multiplier;
} else {
cout << "camera space" << endl;
- vec2 multiplier = (cam_aux_data.zoomed_viewport / 2) * cam_aux_data.render_scale - size / 2 + cam_aux_data.bar_size;
+ vec2 multiplier = (cam_aux_data.zoomed_viewport / 2) * cam_aux_data.render_scale
+ - size / 2 + cam_aux_data.bar_size;
screen_pos += multiplier;
}