summaryrefslogtreecommitdiffhomepage
path: root/src/wall-atlas.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-11-24 13:51:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-11-24 13:51:07 +0100
commit6122c00992a51bea45bdbae8cdd10d299445a690 (patch)
treeafab20bcccfc69b3b57fcdcac1c538e1e6f5c3ce /src/wall-atlas.hpp
parent39cacb87ee3cd27dbfb07accc492adae26f090c1 (diff)
foo
Diffstat (limited to 'src/wall-atlas.hpp')
-rw-r--r--src/wall-atlas.hpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/wall-atlas.hpp b/src/wall-atlas.hpp
index fcad0a8b..60e87286 100644
--- a/src/wall-atlas.hpp
+++ b/src/wall-atlas.hpp
@@ -90,27 +90,23 @@ struct DirArrayIndex {
namespace floormat {
+constexpr inline auto Direction_COUNT = (size_t)Wall::Direction_::COUNT;
+
struct wall_atlas_def final
{
-private:
- using Frame = Wall::Frame;
- using Direction = Wall::Direction;
- using Info = Wall::Info;
- using DirArrayIndex = Wall::DirArrayIndex;
-
-public:
bool operator==(const wall_atlas_def&) const noexcept;
- Info header;
- std::vector<Frame> frames;
- std::vector<Direction> direction_array;
- std::array<DirArrayIndex, 4> direction_map;
- std::bitset<(size_t)Wall::Direction_::COUNT> direction_mask{0};
+ Wall::Info header;
+ std::vector<Wall::Frame> frames;
+ std::vector<Wall::Direction> direction_array;
+ std::array<Wall::DirArrayIndex, Direction_COUNT> direction_map;
+ std::bitset<Direction_COUNT> direction_mask{0};
static wall_atlas_def deserialize(StringView filename);
void serialize(StringView filename) const;
- static void serialize(StringView filename, const Info& header, ArrayView<const Frame> frames,
- ArrayView<const Direction> dir_array, std::array<DirArrayIndex, 4> dir_map);
+ static void serialize(StringView filename, const Wall::Info& header, ArrayView<const Wall::Frame> frames,
+ ArrayView<const Wall::Direction> dir_array,
+ std::array<Wall::DirArrayIndex, Direction_COUNT> dir_map);
};
class wall_atlas final