aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/RenderSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/system/RenderSystem.cpp')
-rw-r--r--src/crepe/system/RenderSystem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp
index e8339c3..8c31743 100644
--- a/src/crepe/system/RenderSystem.cpp
+++ b/src/crepe/system/RenderSystem.cpp
@@ -18,6 +18,7 @@
#include "../manager/ResourceManager.h"
#include "api/Text.h"
#include "facade/Font.h"
+#include "util/AbsolutePosition.h"
#include "RenderSystem.h"
#include "types.h"
@@ -134,11 +135,11 @@ void RenderSystem::render_normal(const Sprite & sprite, const Transform & transf
SDLContext & ctx = this->mediator.sdl_context;
ResourceManager & resource_manager = this->mediator.resource_manager;
const Texture & res = resource_manager.get<Texture>(sprite.source);
-
+ vec2 pos = AbsolutePosition::get_position(transform, sprite.data.position_offset);
ctx.draw(SDLContext::RenderContext{
.sprite = sprite,
.texture = res,
- .pos = transform.position,
+ .pos = pos,
.angle = transform.rotation,
.scale = transform.scale,
});