From a11b647bec22890be44d68d15de6b73f8955722d Mon Sep 17 00:00:00 2001 From: max-001 Date: Fri, 22 Nov 2024 14:35:04 +0100 Subject: Replaced Vector2 by vec2 typedef --- src/crepe/facade/SDLContext.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/crepe/facade/SDLContext.cpp') diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index c808d41..1c75fe8 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -104,7 +104,7 @@ SDL_Rect SDLContext::get_src_rect(const Sprite & sprite) const { .h = sprite.sprite_rect.h, }; } -SDL_Rect SDLContext::get_dst_rect(const Sprite & sprite, const Vector2 & pos, +SDL_Rect SDLContext::get_dst_rect(const Sprite & sprite, const vec2 & pos, const double & scale, const Camera & cam) const { double adjusted_x = (pos.x - cam.x) * cam.zoom; @@ -120,9 +120,8 @@ SDL_Rect SDLContext::get_dst_rect(const Sprite & sprite, const Vector2 & }; } -void SDLContext::draw_particle(const Sprite & sprite, const Vector2 & pos, - const double & angle, const double & scale, - const Camera & camera) { +void SDLContext::draw_particle(const Sprite & sprite, const vec2 & pos, const double & angle, + const double & scale, const Camera & camera) { SDL_RendererFlip render_flip = (SDL_RendererFlip) ((SDL_FLIP_HORIZONTAL * sprite.flip.flip_x) -- cgit v1.2.3