diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-24 17:39:36 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-24 17:39:36 +0200 |
commit | efa8640aabb3b4df31531ecd41ed1073dda63ed2 (patch) | |
tree | 151ddb75a5866784ce6b65757e0eea68aee6e05b /src/control/RPGEdit.cpp | |
parent | aadcecf2022ec13d15da5d816567779740a37da7 (diff) | |
download | rpgedit-efa8640aabb3b4df31531ecd41ed1073dda63ed2.tar rpgedit-efa8640aabb3b4df31531ecd41ed1073dda63ed2.zip |
Make MapContext keep a complete copy of the map
Diffstat (limited to 'src/control/RPGEdit.cpp')
-rw-r--r-- | src/control/RPGEdit.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/control/RPGEdit.cpp b/src/control/RPGEdit.cpp index e22d8fa..257a801 100644 --- a/src/control/RPGEdit.cpp +++ b/src/control/RPGEdit.cpp @@ -99,12 +99,11 @@ void RPGEdit::eventLoop() { } void RPGEdit::run() { - std::shared_ptr<Model::Map> map = Model::Map::load("test"); + std::unique_ptr<Model::Map> map = Model::Map::load("test"); window = std::make_shared<View::Window>(); - mapView = std::make_shared<View::MapView>(window, map); - ctx = std::make_shared<MapContext>(&eventBus, &inputHandler, mapView.get(), map); + ctx = std::make_shared<MapContext>(&eventBus, &inputHandler, window, *map); eventThread = std::thread([this] { eventLoop(); }); |