From 38f14606c78c119d452f302f17329455e29a9a6f Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 10 Mar 2022 19:12:31 +0100 Subject: refactor: rename game initializer & move input config --- src/bootstrap.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/bootstrap.cpp') diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 2e64986..8aeba85 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -3,25 +3,25 @@ // Interfaces #include "interfaces/argument_parser.hpp" #include "interfaces/cursor.hpp" +#include "interfaces/engine.hpp" #include "interfaces/game.hpp" -#include "interfaces/game_initializer.hpp" #include "interfaces/input.hpp" -#include "interfaces/input_configurator.hpp" #include "interfaces/matrix.hpp" #include "interfaces/randomization.hpp" #include "interfaces/scene.hpp" +#include "interfaces/window.hpp" // Implementations #include "argument_parser.hpp" #include "engine/data/bounds.hpp" #include "engine/data/vector2.hpp" -#include "engine/game_initializer.hpp" +#include "engine/engine.hpp" #include "engine/graphics/scene.hpp" #include "engine/graphics/string_matrix.hpp" +#include "engine/graphics/window.hpp" #include "engine/user/cursor.hpp" #include "engine/user/input.hpp" #include "game/game.hpp" -#include "game/input_configurator.hpp" #include "randomization/generator.hpp" #include "randomization/seed_generator.hpp" @@ -37,11 +37,10 @@ Container bootstrap() container.bind().to(); container.bind().to(); - container.bind().to(); container.bind().to(); container.bind().to(); - container.bind().to(); - container.bind().to(); + container.bind().to(); + container.bind().to(); container.bind().to_factory(normalize_lambda( [&container]() @@ -70,5 +69,12 @@ Container bootstrap() std::make_shared(bounds)); }); + container.bind().to_factory(normalize_lambda( + [&container]() + { + return std::dynamic_pointer_cast(std::make_shared( + container.get>())); + })); + return container; } -- cgit v1.2.3-18-g5258