diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-07 19:45:17 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:57:01 +0200 |
commit | 8805b1fe27344e8086cebabf869b7a02d2376f05 (patch) | |
tree | a90a2e2dda1bcb98fb4de5cd983138e5441c2222 /src/interfaces/scene.hpp | |
parent | f778317bae709f397345a2d5e04e23864c6391b3 (diff) |
refactor: decouple statusline from scene & cursor controller
Might be slightly slower than previously though...
Diffstat (limited to 'src/interfaces/scene.hpp')
-rw-r--r-- | src/interfaces/scene.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
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 <yacppdic/factory.hpp> #include <memory> #include <string_view> +#include <utility> +#include <vector> // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) class IScene @@ -26,6 +30,13 @@ public: [[nodiscard]] virtual auto get_matrix() const noexcept -> const std::shared_ptr<IMatrix<MatrixElement>> & = 0; + + virtual void register_component( + const std::shared_ptr<IComponent> &component, + const Vector2 &position) noexcept = 0; + + [[nodiscard]] virtual auto get_components() const noexcept + -> std::vector<std::pair<std::shared_ptr<IComponent>, Vector2>> = 0; }; using ISceneFactory = yacppdic::Factory<std::unique_ptr<IScene>( |