aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-10 16:21:05 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-10 16:21:05 +0100
commit7b8de90699aea153e73b5f2cee05c69b966b81be (patch)
tree123f8b71b59a933b2bfcffb9e43e5bea66086d8f /src/crepe/facade/SDLContext.cpp
parent33cd5566909ac089cdf56db38a3d1daf0cb7dd10 (diff)
implemented feedback wouter, improved animator. however if spritesheet aspect_ratio is not the same as the single frame then the scaling is wrong
Diffstat (limited to 'src/crepe/facade/SDLContext.cpp')
-rw-r--r--src/crepe/facade/SDLContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index ac21d15..a92ec8b 100644
--- a/src/crepe/facade/SDLContext.cpp
+++ b/src/crepe/facade/SDLContext.cpp
@@ -19,12 +19,12 @@
#include "../api/Color.h"
#include "../api/Config.h"
#include "../api/Sprite.h"
-#include "../api/Texture.h"
#include "../util/Log.h"
#include "manager/Manager.h"
#include "manager/Mediator.h"
#include "SDLContext.h"
+#include "Texture.h"
#include "types.h"
using namespace crepe;
@@ -273,7 +273,7 @@ void SDLContext::draw(const RenderContext & ctx) {
.img_scale = ctx.scale,
});
- cout << dstrect.w << " " << dstrect.h << " " << dstrect.x << " " << dstrect.y << endl;
+ cout << srcrect->w << " " << srcrect->h << " " << srcrect->x << " " << srcrect->y << endl;
double angle = ctx.angle + data.angle_offset;
this->set_color_texture(ctx.texture, ctx.sprite.data.color);