diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-11-22 14:35:04 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-11-22 14:35:04 +0100 |
commit | a11b647bec22890be44d68d15de6b73f8955722d (patch) | |
tree | bbdd12e1a2ec6fe423f036c98b2cd13ab5f3c319 /src/crepe/facade/SDLContext.cpp | |
parent | 3965297b579351745c0f5c87aa12829f707c98fd (diff) |
Replaced Vector2<double> by vec2 typedef
Diffstat (limited to 'src/crepe/facade/SDLContext.cpp')
-rw-r--r-- | src/crepe/facade/SDLContext.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<double> & 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<double> & }; } -void SDLContext::draw_particle(const Sprite & sprite, const Vector2<double> & 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) |