diff options
author | Max-001 <80035972+Max-001@users.noreply.github.com> | 2024-12-19 21:38:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-19 21:38:04 +0100 |
commit | 1bb9c2ccf96b7d2e24929c693192b25885614df9 (patch) | |
tree | 44184b5472cad44c9b335162177de85802692560 /src/crepe/facade/SDLContext.cpp | |
parent | 9c11853f7331fd740c763f5cc8f34903526a85d4 (diff) | |
parent | 3894948275e10b6a0e3614ba0da90b9ea8d6cd4e (diff) |
Merge pull request #85 from lonkaars/jaro/collision-system-handeling
Jaro/collision system handeling
Diffstat (limited to 'src/crepe/facade/SDLContext.cpp')
-rw-r--r-- | src/crepe/facade/SDLContext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index ca45b79..164d35e 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -229,10 +229,10 @@ void SDLContext::draw_text(const RenderText & data) { = {tmp_font_texture, [](SDL_Texture * texture) { SDL_DestroyTexture(texture); }}; vec2 size = text.dimensions * cam_aux_data.render_scale * data.transform.scale; - vec2 screen_pos = (absoluut_pos - cam_aux_data.cam_pos - + (cam_aux_data.zoomed_viewport) / 2) - * cam_aux_data.render_scale - - size / 2 + cam_aux_data.bar_size; + vec2 screen_pos + = (absoluut_pos - cam_aux_data.cam_pos + (cam_aux_data.zoomed_viewport) / 2) + * cam_aux_data.render_scale + - size / 2 + cam_aux_data.bar_size; SDL_FRect dstrect{ .x = screen_pos.x, |