aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-22 16:16:27 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-22 16:16:27 +0100
commit4ce924b1b1322ee4da3ba50d6da856ad13a2190b (patch)
treefdb411aa1a79dd6f7e16bdc145607ca8813b118c /src/crepe/facade/SDLContext.h
parent385f19a8c896ec126c569f1e5337d6d370d20517 (diff)
working scaling image with scaling world to screen
Diffstat (limited to 'src/crepe/facade/SDLContext.h')
-rw-r--r--src/crepe/facade/SDLContext.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h
index 45bbda6..68d1630 100644
--- a/src/crepe/facade/SDLContext.h
+++ b/src/crepe/facade/SDLContext.h
@@ -118,10 +118,9 @@ private:
* \param transform Reference to the Transform for positioning.
* \param camera Reference to the Camera for view adjustments.
*/
- void draw(const Sprite & sprite, const Transform & transform, const Camera & camera);
+ void draw(const Sprite & sprite, const Transform & transform, const Vector2 & scale);
- 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 & pos, const double & angle, const Vector2 & scale);
//! Clears the screen, preparing for a new frame.
void clear_screen();
@@ -133,7 +132,7 @@ private:
* \brief sets the background of the camera (will be adjusted in future PR)
* \param camera Reference to the Camera object.
*/
- void set_camera(Camera & camera);
+ void set_camera(const Camera & camera, Vector2 & scale);
private:
/**
@@ -153,8 +152,7 @@ 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 & pos, const Vector2 & scale) const;
private:
//! sdl Window