diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/tile-editor.cpp | 3 | ||||
-rw-r--r-- | editor/tile-editor.hpp | 1 | ||||
-rw-r--r-- | editor/wall-editor.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/editor/tile-editor.cpp b/editor/tile-editor.cpp index e6d98079..0bccd6d9 100644 --- a/editor/tile-editor.cpp +++ b/editor/tile-editor.cpp @@ -17,8 +17,7 @@ tile_editor::tile_editor() void tile_editor::load_atlases() { - const auto filename = _name + ".json"; - for (const auto& atlas : loader.tile_atlases(filename)) + for (const auto& atlas : loader.tile_atlases("floor.json"_s)) { auto& [_, vec] = _permutation; vec.reserve(atlas->num_tiles()); diff --git a/editor/tile-editor.hpp b/editor/tile-editor.hpp index 57347bf0..a33ed848 100644 --- a/editor/tile-editor.hpp +++ b/editor/tile-editor.hpp @@ -23,7 +23,6 @@ class tile_editor final std::vector<decltype(tile_image_proto::variant)> variant; }; - String _name; std::map<StringView, std::shared_ptr<tile_atlas>> _atlases; tile_image_proto _selected_tile; tuple _permutation; diff --git a/editor/wall-editor.cpp b/editor/wall-editor.cpp index c0bb2b4b..d1bcd650 100644 --- a/editor/wall-editor.cpp +++ b/editor/wall-editor.cpp @@ -58,6 +58,7 @@ void wall_editor::load_atlases() wall_editor::wall_editor() { load_atlases(); + _selected_atlas = _atlases.begin()->second.atlas; // todo } StringView wall_editor::name() const { return "wall"_s; } @@ -79,6 +80,7 @@ void wall_editor::place_tile(world& w, global_coords coords, const std::shared_p case rotation::W: t.wall_west() = { atlas, (uint8_t)-1 }; break; default: std::unreachable(); } + c.mark_walls_modified(); } editor_snap_mode wall_editor::check_snap(int mods) const |