diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-02 19:03:32 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-02 20:25:31 +0100 |
commit | 5a95eb1282e30bd803d7e0b352a8443795842e42 (patch) | |
tree | c97bc43e4d5107a427817c65aa1b0c2eeb64a427 /serialize/world-impl.hpp | |
parent | 0fe5336b9a53f20817f54be0bd7cd935db14914c (diff) |
fix build with Linux and/or GCC
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 { |