diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-27 21:39:41 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-27 21:39:41 +0100 |
commit | efecf0ab20304b5d76b3072a66b36b50d8522082 (patch) | |
tree | 5afa6fb96ee863864c52c1a52ede96649c71278a /editor/tile-editor.cpp | |
parent | beb6685f605b89ce4b2dd99f87b9319e4f7f4d94 (diff) |
scenery wip
Diffstat (limited to 'editor/tile-editor.cpp')
-rw-r--r-- | editor/tile-editor.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/editor/tile-editor.cpp b/editor/tile-editor.cpp index 4ae54d86..d944f47f 100644 --- a/editor/tile-editor.cpp +++ b/editor/tile-editor.cpp @@ -4,23 +4,20 @@ #include "keys.hpp" #include "loader/loader.hpp" #include "random.hpp" -#include "serialize/json-helper.hpp" -#include "serialize/tile-atlas.hpp" #include <Corrade/Containers/PairStl.h> #include <Corrade/Utility/Path.h> namespace floormat { -tile_editor::tile_editor(editor_mode mode, StringView name) : _name{ name}, _mode{ mode} +tile_editor::tile_editor(editor_mode mode, StringView name) : _name{name}, _mode{ mode} { load_atlases(); } void tile_editor::load_atlases() { - using atlas_array = std::vector<std::shared_ptr<tile_atlas>>; const auto filename = _name + ".json"; - for (auto& atlas : json_helper::from_json<atlas_array>(Path::join(loader_::IMAGE_PATH, filename))) + for (const auto& atlas : loader.tile_atlases(filename)) { const auto [name, _ext] = Path::splitExtension(atlas->name()); auto& [_, vec] = _permutation; |