From 81f68a2c83c0c25259cd526c8bb4839caa361e8f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 1 Dec 2022 13:21:32 +0100 Subject: serialize, loader, test: add serializing scenery --- src/scenery.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/scenery.hpp b/src/scenery.hpp index 05a72b43..4ed55d20 100644 --- a/src/scenery.hpp +++ b/src/scenery.hpp @@ -11,7 +11,9 @@ enum class rotation : std::uint8_t { N, NE, E, SE, S, SW, W, NW, }; -constexpr inline rotation rotation_COUNT = rotation{8}; +constexpr inline std::size_t rotation_BITS = 3; +constexpr inline std::size_t rotation_MASK = (1 << rotation_BITS)-1; +constexpr inline rotation rotation_COUNT = rotation{1 << rotation_BITS}; enum class scenery_type : std::uint8_t { none, generic, door, -- cgit v1.2.3