diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-28 19:22:06 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-28 19:22:06 +0200 |
commit | d2a76bd8cfd883070259bf572a9f723a37c0d96e (patch) | |
tree | cca72b471b0c3a562789a1ab966e4568edf7165a /src/engine/graphics | |
parent | daf39f75d764449f18cd480b6d3c645b8372b0a5 (diff) |
refactor: improve includes with iwyu
Diffstat (limited to 'src/engine/graphics')
-rw-r--r-- | src/engine/graphics/component_renderer.cpp | 15 | ||||
-rw-r--r-- | src/engine/graphics/component_renderer.hpp | 9 | ||||
-rw-r--r-- | src/engine/graphics/scene.cpp | 14 | ||||
-rw-r--r-- | src/engine/graphics/scene.hpp | 18 |
4 files changed, 35 insertions, 21 deletions
diff --git a/src/engine/graphics/component_renderer.cpp b/src/engine/graphics/component_renderer.cpp index effe153..0584028 100644 --- a/src/engine/graphics/component_renderer.cpp +++ b/src/engine/graphics/component_renderer.cpp @@ -1,13 +1,20 @@ #include "component_renderer.hpp" -#include "engine/escape.hpp" -#include "util/color.hpp" - #include <fmt/core.h> - #include <iostream> +#include <optional> #include <utility> +#include "engine/data/style.hpp" +#include "engine/data/vector2.hpp" +#include "engine/escape.hpp" +#include "engine/graphics/matrix_iterator.hpp" +#include "engine/graphics/matrix_iterator_impl.hpp" +#include "interfaces/component.hpp" +#include "interfaces/cursor.hpp" +#include "interfaces/matrix.hpp" +#include "util/color.hpp" + ComponentRenderer::ComponentRenderer( std::shared_ptr<ICursorController> cursor_controller) noexcept : _cursor_controller(std::move(cursor_controller)) diff --git a/src/engine/graphics/component_renderer.hpp b/src/engine/graphics/component_renderer.hpp index ff1bc47..4d21623 100644 --- a/src/engine/graphics/component_renderer.hpp +++ b/src/engine/graphics/component_renderer.hpp @@ -1,12 +1,15 @@ #pragma once +#include <memory> + +#include "engine/data/vector2.hpp" #include "interfaces/component.hpp" #include "interfaces/component_renderer.hpp" #include "interfaces/cursor.hpp" -#include "engine/data/vector2.hpp" - -#include <memory> +class IComponent; +class ICursorController; +class Vector2; constexpr auto SET_BOLD_MODE = "{esc}[1m"; diff --git a/src/engine/graphics/scene.cpp b/src/engine/graphics/scene.cpp index ff64edd..7c23c7d 100644 --- a/src/engine/graphics/scene.cpp +++ b/src/engine/graphics/scene.cpp @@ -1,13 +1,15 @@ #include "scene.hpp" -#include "engine/escape.hpp" -#include "util/color.hpp" - -#include <fmt/color.h> #include <fmt/core.h> - -#include <iostream> #include <sys/ioctl.h> +#include <termios.h> +#include <unistd.h> +#include <cstdint> +#include <iostream> + +#include "engine/escape.hpp" + +class IComponent; Scene::Scene(const IMatrixFactory<MatrixElement> &matrix_factory) noexcept : _matrix(matrix_factory(size())), _is_shown(false) diff --git a/src/engine/graphics/scene.hpp b/src/engine/graphics/scene.hpp index 4df5f56..5b52027 100644 --- a/src/engine/graphics/scene.hpp +++ b/src/engine/graphics/scene.hpp @@ -1,19 +1,21 @@ #pragma once -#include "interfaces/component.hpp" -#include "interfaces/matrix.hpp" -#include "interfaces/scene.hpp" - -#include "engine/data/vector2.hpp" - #include <fmt/core.h> -#include <yacppdic/auto_wirable.hpp> - #include <memory> #include <string_view> #include <termios.h> #include <utility> #include <vector> +#include <yacppdic/auto_wirable.hpp> + +#include "engine/data/bounds.hpp" +#include "engine/data/vector2.hpp" +#include "interfaces/component.hpp" +#include "interfaces/matrix.hpp" +#include "interfaces/scene.hpp" + +class IComponent; +struct termios; constexpr fmt::string_view ENABLE_ALT_BUFFER = "{esc}[?1049h"; constexpr fmt::string_view DISABLE_ALT_BUFFER = "{esc}[?1049l"; |