diff options
Diffstat (limited to 'serialize/world-impl.hpp')
-rw-r--r-- | serialize/world-impl.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/serialize/world-impl.hpp b/serialize/world-impl.hpp index caf5e8a7..4c206a7e 100644 --- a/serialize/world-impl.hpp +++ b/serialize/world-impl.hpp @@ -9,14 +9,14 @@ namespace floormat::Serialize { -namespace { - using tilemeta = std::uint8_t; using varid = decltype(tile_image_proto::variant); using atlasid = std::uint16_t; using chunksiz = std::uint16_t; using proto_t = std::uint16_t; +namespace { + template<typename T> constexpr inline T int_max = std::numeric_limits<T>::max(); #define file_magic ".floormat.save" @@ -30,6 +30,8 @@ constexpr inline auto chunk_magic = (std::uint16_t)~0xc0d3; constexpr inline std::underlying_type_t<pass_mode> pass_mask = pass_blocked | pass_shoot_through | pass_ok; constexpr inline auto pass_bits = std::bit_width(pass_mask); +} // namespace + enum : tilemeta { meta_ground = 1 << (pass_bits + 0), meta_wall_n = 1 << (pass_bits + 1), @@ -38,8 +40,6 @@ enum : tilemeta { meta_short_variant = 1 << (pass_bits + 4), }; -} // namespace - } // namespace floormat::Serialize namespace floormat { |