aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/RenderSystem.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-09 20:15:41 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-09 20:15:41 +0100
commita597b0059f30e9d56331c6ece34fdcabb4028616 (patch)
tree09da85838764dc25f020a14a17937267a686590c /src/crepe/system/RenderSystem.cpp
parent4d74c80d9c3c9fdca9b07d960a1f9fd3e38cdfad (diff)
making rendering fonts and UI
Diffstat (limited to 'src/crepe/system/RenderSystem.cpp')
-rw-r--r--src/crepe/system/RenderSystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp
index 26f2c85..74fed26 100644
--- a/src/crepe/system/RenderSystem.cpp
+++ b/src/crepe/system/RenderSystem.cpp
@@ -27,7 +27,7 @@ void RenderSystem::present_screen() {
ctx.present_screen();
}
-SDLContext::CameraValues RenderSystem::update_camera() {
+SDLContext::CameraValues & RenderSystem::update_camera() {
ComponentManager & mgr = this->mediator.component_manager;
SDLContext & ctx = this->mediator.sdl_context;
RefVector<Camera> cameras = mgr.get_components_by_type<Camera>();
@@ -38,7 +38,7 @@ SDLContext::CameraValues RenderSystem::update_camera() {
if (!cam.active) continue;
const Transform & transform
= mgr.get_components_by_id<Transform>(cam.game_object_id).front().get();
- SDLContext::CameraValues cam_val = ctx.set_camera(cam);
+ SDLContext::CameraValues & cam_val = ctx.set_camera(cam);
cam_val.cam_pos = transform.position + cam.data.postion_offset;
return cam_val;
}