diff options
author | Max-001 <80035972+Max-001@users.noreply.github.com> | 2024-12-19 21:38:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-19 21:38:04 +0100 |
commit | 1bb9c2ccf96b7d2e24929c693192b25885614df9 (patch) | |
tree | 44184b5472cad44c9b335162177de85802692560 /src/crepe/system/RenderSystem.cpp | |
parent | 9c11853f7331fd740c763f5cc8f34903526a85d4 (diff) | |
parent | 3894948275e10b6a0e3614ba0da90b9ea8d6cd4e (diff) |
Merge pull request #85 from lonkaars/jaro/collision-system-handeling
Jaro/collision system handeling
Diffstat (limited to 'src/crepe/system/RenderSystem.cpp')
-rw-r--r-- | src/crepe/system/RenderSystem.cpp | 5 |
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, }); |