summaryrefslogtreecommitdiffhomepage
path: root/src/wall-atlas.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-12-23 12:17:12 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-12-23 12:17:12 +0100
commitae9cc0570ad7bd7a879bea1447b12fa9284b569c (patch)
treed112ccc202f04b3d100652504ed8aaf39ed068da /src/wall-atlas.cpp
parenta737d0cea5ca8bdcd3f9cfc38e29f8a15992ca3e (diff)
a
Diffstat (limited to 'src/wall-atlas.cpp')
-rw-r--r--src/wall-atlas.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wall-atlas.cpp b/src/wall-atlas.cpp
index 90d5dfe7..b56a845b 100644
--- a/src/wall-atlas.cpp
+++ b/src/wall-atlas.cpp
@@ -47,7 +47,7 @@ void resolve_wall_rotations(std::vector<Wall::Direction>& array, const std::arra
dir_name, group_name, direction_index_to_name(G.from_rotation));
const auto& D2 = array[DAI2.val];
const auto& G2 = D2.*ptr;
- if (!G2.is_defined)
+ if (!G2.is_defined || G2.from_rotation != (uint8_t)-1)
fm_throw("from_rotation for '{}/{}' points to empty group '{}/{}'"_cf,
dir_name, group_name, direction_index_to_name(G.from_rotation), group_name);
G.from_rotation = DAI2.val;
@@ -127,6 +127,7 @@ wall_atlas::wall_atlas(wall_atlas_def def, String path, const ImageView2D& img)
const auto& G = D->*gmemb;
fm_soft_assert(G.is_defined == !!G.count);
fm_soft_assert(G.is_defined == (G.index != (uint32_t)-1));
+ fm_soft_assert(G.from_rotation == (uint8_t)-1 || G.is_defined);
if (!G.is_defined)
continue;
found = true;