diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-28 12:53:15 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-28 12:53:15 +0100 |
commit | 9d9c4fc4565f0ef0fc81c8baeef804389f07afc2 (patch) | |
tree | f8bfb75a2b99f40de8d8cfb68136bd0b8ee68a39 /src/crepe/system/RenderSystem.cpp | |
parent | 1cdaa2aaeb1b6bc71876b462fcc464800ec75732 (diff) |
implemented loek feedback
Diffstat (limited to 'src/crepe/system/RenderSystem.cpp')
-rw-r--r-- | src/crepe/system/RenderSystem.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp index 8895f02..c196bb1 100644 --- a/src/crepe/system/RenderSystem.cpp +++ b/src/crepe/system/RenderSystem.cpp @@ -77,31 +77,28 @@ bool RenderSystem::render_particle(const Sprite & sprite, const Camera & cam, for (const Particle & p : em.data.particles) { if (!p.active) continue; - RenderCtx ctx{ + this->context.draw(SDLContext::RenderContext{ .sprite = sprite, .cam = cam, .cam_pos = this->cam_pos, .pos = p.position, .angle = p.angle, .scale = scale, - }; - this->context.draw(ctx); + }); } } return rendering_particles; } void RenderSystem::render_normal(const Sprite & sprite, const Camera & cam, const Transform & tm) { - - RenderCtx ctx{ + this->context.draw(SDLContext::RenderContext{ .sprite = sprite, .cam = cam, .cam_pos = this->cam_pos, .pos = tm.position, .angle = tm.rotation, .scale = tm.scale, - }; - this->context.draw(ctx); + }); } void RenderSystem::render() { |