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 505433a..fcb52c3 100644
--- a/src/crepe/system/RenderSystem.cpp
+++ b/src/crepe/system/RenderSystem.cpp
@@ -13,6 +13,7 @@
#include "../facade/Texture.h"
#include "../manager/ComponentManager.h"
#include "../manager/ResourceManager.h"
+#include "util/AbsoluutPosition.h"
#include "RenderSystem.h"
#include "types.h"
@@ -105,11 +106,11 @@ void RenderSystem::render_normal(const Sprite & sprite, const Transform & tm) {
SDLContext & ctx = this->mediator.sdl_context;
ResourceManager & resource_manager = this->mediator.resource_manager;
const Texture & res = resource_manager.get<Texture>(sprite.source);
-
+ vec2 pos = AbsoluutPosition::get_position(tm,sprite.data.position_offset);
ctx.draw(SDLContext::RenderContext{
.sprite = sprite,
.texture = res,
- .pos = tm.position,
+ .pos = pos,
.angle = tm.rotation,
.scale = tm.scale,
});