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.cpp11
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() {