aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-11-21 17:04:58 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-11-21 17:04:58 +0100
commitea95685b4dd2adf09a9be4e2dd9233d0cf98b1ef (patch)
tree2877243b80b0c026db7a2a618a15677156f41a56 /src/crepe/facade
parentadbd81d3937a1363af312202c7e4b5ec0bf3458d (diff)
Minor changes due to templating of Vector2
Diffstat (limited to 'src/crepe/facade')
-rw-r--r--src/crepe/facade/SDLContext.cpp4
-rw-r--r--src/crepe/facade/SDLContext.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index 00523a6..c808d41 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 Vector2<double> & pos,
const double & scale, const Camera & cam) const {
double adjusted_x = (pos.x - cam.x) * cam.zoom;
@@ -120,7 +120,7 @@ SDL_Rect SDLContext::get_dst_rect(const Sprite & sprite, const Vector2 & pos,
};
}
-void SDLContext::draw_particle(const Sprite & sprite, const Vector2 & pos,
+void SDLContext::draw_particle(const Sprite & sprite, const Vector2<double> & pos,
const double & angle, const double & scale,
const Camera & camera) {
diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h
index 841ffc9..e4a0da5 100644
--- a/src/crepe/facade/SDLContext.h
+++ b/src/crepe/facade/SDLContext.h
@@ -120,8 +120,8 @@ private:
*/
void draw(const Sprite & sprite, const Transform & transform, const Camera & camera);
- void draw_particle(const Sprite & sprite, const Vector2 & pos, const double & angle,
- const double & scale, const Camera & camera);
+ void draw_particle(const Sprite & sprite, const Vector2<double> & pos,
+ const double & angle, const double & scale, const Camera & camera);
//! Clears the screen, preparing for a new frame.
void clear_screen();
@@ -153,8 +153,8 @@ private:
* on the camera
* \return sdl rectangle to draw a dst image to draw on the screen
*/
- SDL_Rect get_dst_rect(const Sprite & sprite, const Vector2 & pos, const double & scale,
- const Camera & cam) const;
+ SDL_Rect get_dst_rect(const Sprite & sprite, const Vector2<double> & pos,
+ const double & scale, const Camera & cam) const;
private:
//! sdl Window