From 7de921836587cdc359c2c4b84ed6446ada16c008 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 22 May 2022 17:05:00 +0200 Subject: refactor: remove window class --- src/bootstrap.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/bootstrap.cpp') diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index b11f199..2e687ed 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -13,7 +13,6 @@ #include "interfaces/status_manager.hpp" #include "interfaces/statusline.hpp" #include "interfaces/statusline_subscriber_adapter.hpp" -#include "interfaces/window.hpp" // Implementations #include "argument_parser.hpp" @@ -23,7 +22,6 @@ #include "engine/graphics/matrix.hpp" #include "engine/graphics/scene.hpp" #include "engine/graphics/statusline.hpp" -#include "engine/graphics/window.hpp" #include "engine/user/cursor.hpp" #include "engine/user/input.hpp" #include "game/game.hpp" @@ -49,17 +47,15 @@ auto bootstrap() noexcept -> yacppdic::Container container.bind().to(); container.bind().to(); container.bind().to(); - container.bind().to(); container.bind().to(); container.bind().to_factory( [&container]( - const std::shared_ptr &window, const std::shared_ptr &scene, const std::shared_ptr &cursor_controller) { std::shared_ptr statusline = - container.get()(cursor_controller, window); + container.get()(cursor_controller, scene); std::shared_ptr status_manager = container.get()(statusline); @@ -71,7 +67,6 @@ auto bootstrap() noexcept -> yacppdic::Container container.get>(); return std::make_unique( - window, scene, cursor_controller, statusline, @@ -93,20 +88,18 @@ auto bootstrap() noexcept -> yacppdic::Container }); container.bind().to_factory( - [&container]( - const std::shared_ptr &cursor_controller, - const std::shared_ptr &window) + [&container](const std::shared_ptr &cursor_controller) { auto matrix_factory = container.get>(); - return std::make_unique(matrix_factory, cursor_controller, window); + return std::make_unique(matrix_factory, cursor_controller); }); container.bind().to_factory( [](const std::shared_ptr &cursor_controller, - const std::shared_ptr &window) + const std::shared_ptr &scene) { - return std::make_unique(cursor_controller, window); + return std::make_unique(cursor_controller, scene); }); container.bind().to_factory( -- cgit v1.2.3-18-g5258