summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wall-atlas.cpp12
-rw-r--r--src/wall-atlas.hpp9
2 files changed, 7 insertions, 14 deletions
diff --git a/src/wall-atlas.cpp b/src/wall-atlas.cpp
index 77c8e404..721b7906 100644
--- a/src/wall-atlas.cpp
+++ b/src/wall-atlas.cpp
@@ -129,8 +129,10 @@ auto wall_atlas::group(size_t dir, size_t group) const -> const Group*
const auto memfn = set.groups[group].member;
const Group& ret = set.*memfn;
+#if 0
if (ret.is_empty())
return {};
+#endif
return &ret;
}
@@ -139,8 +141,10 @@ auto wall_atlas::group(const Direction& dir, Group_ tag) const -> const Group*
fm_assert(tag < Group_::COUNT);
const auto memfn = dir.groups[(size_t)tag].member;
const Group& ret = dir.*memfn;
+#if 0
if (ret.is_empty())
return {};
+#endif
return &ret;
}
@@ -167,14 +171,6 @@ size_t wall_atlas::enum_to_index(enum rotation r)
namespace floormat::Wall {
-bool Direction::is_empty() const noexcept
-{
- for (auto [str, member, tag] : Direction::groups)
- if (const auto& val = this->*member; !val.is_empty())
- return false;
- return true;
-}
-
const Group& Direction::group(Group_ i) const { return const_cast<Direction&>(*this).group((size_t)i); }
const Group& Direction::group(size_t i) const { return const_cast<Direction&>(*this).group(i); }
Group& Direction::group(Group_ i) { return group((size_t)i); }
diff --git a/src/wall-atlas.hpp b/src/wall-atlas.hpp
index d00370fd..8afddc24 100644
--- a/src/wall-atlas.hpp
+++ b/src/wall-atlas.hpp
@@ -29,10 +29,10 @@ struct Group
Color3 tint_add;
uint8_t from_rotation = (uint8_t)-1; // applies only to images
bool mirrored : 1 = false,
- default_tint : 1 = true;
+ default_tint : 1 = true,
+ is_defined : 1 = false;
- explicit operator bool() const noexcept { return !is_empty(); }
- bool is_empty() const noexcept { return count == 0; }
+ //bool is_empty() const noexcept { return count == 0; }
bool operator==(const Group&) const noexcept;
};
@@ -46,9 +46,6 @@ struct Direction
using memfn_ptr = Group Direction::*;
struct member_tuple { StringView str; memfn_ptr member; Group_ tag; };
- explicit operator bool() const noexcept { return !is_empty(); }
- bool is_empty() const noexcept;
-
Group wall{}, overlay{}, side{}, top{};
Group corner_L{}, corner_R{};
pass_mode passability = pass_mode::blocked;