From 0e40bc7ce8c3b3be083002f88c3317d65f6570ad Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 6 Mar 2022 13:16:05 +0100 Subject: refactor: make vector2 & bounds data classes --- src/bootstrap.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'src/bootstrap.cpp') diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 343f01b..a0d8ab2 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -2,7 +2,6 @@ // Interfaces #include "interfaces/argument_parser.hpp" -#include "interfaces/bounds.hpp" #include "interfaces/game.hpp" #include "interfaces/game_initializer.hpp" #include "interfaces/input.hpp" @@ -10,15 +9,14 @@ #include "interfaces/matrix.hpp" #include "interfaces/randomization.hpp" #include "interfaces/scene.hpp" -#include "interfaces/vector2.hpp" // Implementations #include "argument_parser.hpp" +#include "engine/data/bounds.hpp" +#include "engine/data/vector2.hpp" #include "engine/game_initializer.hpp" -#include "engine/graphics/bounds.hpp" #include "engine/graphics/scene.hpp" #include "engine/graphics/string_matrix.hpp" -#include "engine/graphics/vector2.hpp" #include "engine/user/cursor.hpp" #include "engine/user/input.hpp" #include "game/game.hpp" @@ -56,25 +54,12 @@ Container bootstrap() std::make_shared(std::make_unique())); }); - container.bind().to_factory( - [](const IVector2Options &options) - { - return std::dynamic_pointer_cast( - std::make_shared(options)); - }); - container.bind>().to_factory( - [](const IBounds &bounds) + [](const Bounds &bounds) { return std::dynamic_pointer_cast>( std::make_shared(bounds)); }); - container.bind().to_factory( - [](const IBoundsOptions &options) - { - return std::dynamic_pointer_cast(std::make_shared(options)); - }); - return container; } -- cgit v1.2.3-18-g5258