From 8805b1fe27344e8086cebabf869b7a02d2376f05 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 7 Jun 2022 19:45:17 +0200 Subject: refactor: decouple statusline from scene & cursor controller Might be slightly slower than previously though... --- src/engine/graphics/scene.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/engine/graphics/scene.cpp') diff --git a/src/engine/graphics/scene.cpp b/src/engine/graphics/scene.cpp index 9f561f0..e0f4da6 100644 --- a/src/engine/graphics/scene.cpp +++ b/src/engine/graphics/scene.cpp @@ -8,7 +8,6 @@ #include #include -#include Scene::Scene( IMatrixFactory matrix_factory, @@ -84,3 +83,17 @@ auto Scene::get_matrix() const noexcept -> const std::shared_ptr &component, + const Vector2 &position) noexcept +{ + _components.emplace_back(std::make_pair(component, position)); +} + +auto Scene::get_components() const noexcept + -> std::vector, Vector2>> +{ + return _components; +} + -- cgit v1.2.3-18-g5258