aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-12-16 21:14:46 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-12-16 21:14:46 +0100
commit16f3aa77cfbfd3327a50a3f11f27e7d7dd303026 (patch)
treee57bc35f9d784e9b93d9ff77428c0612ae835603 /src/crepe/facade
parentb2a7105fa88b7d23dcb5b698c3c10b76c19c789b (diff)
Added util for position
Diffstat (limited to 'src/crepe/facade')
-rw-r--r--src/crepe/facade/SDLContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index 20bb030..ee7d149 100644
--- a/src/crepe/facade/SDLContext.cpp
+++ b/src/crepe/facade/SDLContext.cpp
@@ -235,7 +235,7 @@ SDL_FRect SDLContext::get_dst_rect(const DestinationRectangleData & ctx) const {
}
size *= cam_aux_data.render_scale * ctx.img_scale * data.scale_offset;
- vec2 screen_pos = (ctx.pos + data.position_offset - cam_aux_data.cam_pos
+ vec2 screen_pos = (ctx.pos - cam_aux_data.cam_pos
+ (cam_aux_data.zoomed_viewport) / 2)
* cam_aux_data.render_scale
- size / 2 + cam_aux_data.bar_size;