diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-26 13:39:57 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-11-26 13:39:57 +0100 |
commit | 143b205fae27ed433fd7cac0e0ab6f0fa4f8b03b (patch) | |
tree | 08c5fb78ea86684ffc29c1792052571671c51073 | |
parent | 5689253f0d5fb19eabeb3c8270284e6c28b73ade (diff) |
a
-rw-r--r-- | test/wall-atlas.cpp | 1 | ||||
-rw-r--r-- | wall-tileset-tool/main.cpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/test/wall-atlas.cpp b/test/wall-atlas.cpp index e49abd80..3fa78fc0 100644 --- a/test/wall-atlas.cpp +++ b/test/wall-atlas.cpp @@ -60,6 +60,7 @@ void test_read_groups(StringView filename) fm_assert(!is_direction_defined(read_direction_metadata(jroot, Direction_::S))); const auto dir = read_direction_metadata(jroot, Direction_::W); + fm_assert(is_direction_defined(dir)); fm_assert(dir.passability == pass_mode::shoot_through); fm_assert(dir.wall.pixel_size == Vector2ui{} ); fm_assert(dir.wall.default_tint == false ); diff --git a/wall-tileset-tool/main.cpp b/wall-tileset-tool/main.cpp index 4fc62b9d..4a64dc82 100644 --- a/wall-tileset-tool/main.cpp +++ b/wall-tileset-tool/main.cpp @@ -102,6 +102,9 @@ bool do_direction(state& st, size_t i) for (auto [_str, ptr, tag] : Direction::groups) { + const auto& old_group = old_dir.*ptr; + if (!old_group.is_defined) + continue; if (!do_group(st, i, (size_t)tag, dir.*ptr)) return false; } |