diff options
Diffstat (limited to 'src/crepe/system')
-rw-r--r-- | src/crepe/system/RenderSystem.cpp | 4 | ||||
-rw-r--r-- | src/crepe/system/RenderSystem.h | 2 |
2 files changed, 3 insertions, 3 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; } diff --git a/src/crepe/system/RenderSystem.h b/src/crepe/system/RenderSystem.h index e270a6b..de26aa8 100644 --- a/src/crepe/system/RenderSystem.h +++ b/src/crepe/system/RenderSystem.h @@ -37,7 +37,7 @@ private: void present_screen(); //! Updates the active camera used for rendering. - SDLContext::CameraValues update_camera(); + SDLContext::CameraValues & update_camera(); //! Renders the whole screen void render(); |