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/interfaces/scene.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/interfaces/scene.hpp') diff --git a/src/interfaces/scene.hpp b/src/interfaces/scene.hpp index 903a299..daabb10 100644 --- a/src/interfaces/scene.hpp +++ b/src/interfaces/scene.hpp @@ -1,14 +1,18 @@ #pragma once +#include "interfaces/component.hpp" #include "interfaces/cursor.hpp" #include "interfaces/matrix.hpp" #include "engine/data/bounds.hpp" +#include "engine/data/vector2.hpp" #include #include #include +#include +#include // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) class IScene @@ -26,6 +30,13 @@ public: [[nodiscard]] virtual auto get_matrix() const noexcept -> const std::shared_ptr> & = 0; + + virtual void register_component( + const std::shared_ptr &component, + const Vector2 &position) noexcept = 0; + + [[nodiscard]] virtual auto get_components() const noexcept + -> std::vector, Vector2>> = 0; }; using ISceneFactory = yacppdic::Factory( -- cgit v1.2.3-18-g5258