diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-12 13:44:58 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:57:01 +0200 |
commit | 927e065f9829045247be7c0b3296408b6f577c1f (patch) | |
tree | 7da3d9cd5aa4070414a8708a582f6c3ab3e1e708 /src/bootstrap.cpp | |
parent | eb66598c326862fd9dfc1899be4eac93f81a8023 (diff) |
feat: add reading RLE files
Diffstat (limited to 'src/bootstrap.cpp')
-rw-r--r-- | src/bootstrap.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 3554183..16d38a3 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -1,6 +1,7 @@ #include "bootstrap.hpp" // Interfaces +#include "interfaces/RLE_reader.hpp" #include "interfaces/cell_helper.hpp" #include "interfaces/component.hpp" #include "interfaces/component_renderer.hpp" @@ -23,6 +24,7 @@ #include "engine/graphics/scene.hpp" #include "engine/user/cursor.hpp" #include "engine/user/input.hpp" +#include "game/RLE_reader.hpp" #include "game/cell_helper.hpp" #include "game/components/statusline.hpp" #include "game/game.hpp" @@ -40,6 +42,7 @@ auto bootstrap() noexcept -> yacppdic::Container container.bind<ICLIGameEngine>().to<CLIGameEngine>(); container.bind<IStatusManager>().to<StatusManager>(); container.bind<IScene>().to<Scene>(); + container.bind<IRLEReader>().to<RLEReader>(); container.bind<IGameFactory>().to_factory( [&container]( @@ -57,6 +60,8 @@ auto bootstrap() noexcept -> yacppdic::Container const auto cell_helper_factory = container.get<ICellHelperFactory<char>>(); + std::shared_ptr<IRLEReader> rle_reader = container.get<IRLEReader>(); + return std::make_unique<Game>( statusline_factory, scene, @@ -64,7 +69,8 @@ auto bootstrap() noexcept -> yacppdic::Container generation_tracker, status_manager, user_input_observer, - cell_helper_factory(*(scene->get_matrix()))); + cell_helper_factory(*(scene->get_matrix())), + rle_reader); }); container.bind<IMatrixFactory<char>>().to_factory( |