aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/facade')
-rw-r--r--src/crepe/facade/SDLContext.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index 6e22316..abb3cb7 100644
--- a/src/crepe/facade/SDLContext.cpp
+++ b/src/crepe/facade/SDLContext.cpp
@@ -112,17 +112,8 @@ SDL_Rect SDLContext::get_src_rect(const Sprite & sprite) const {
SDL_Rect SDLContext::get_dst_rect(const Sprite & sprite, const vec2 & pos, const Camera & cam,
const double & img_scale) const {
- int width, height;
-
- if (sprite.width > sprite.height) {
- width = sprite.width;
- height = sprite.width / sprite.aspect_ratio;
- } else {
- height = sprite.height;
- width = sprite.height * sprite.aspect_ratio;
- }
-
- cout << width << " " << height << " " << " " << sprite.aspect_ratio << endl;
+ int width = sprite.height * sprite.aspect_ratio;
+ int height = sprite.height;
width *= img_scale * cam.zoom;
height *= img_scale * cam.zoom;