diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-01 13:21:32 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-01 13:21:32 +0100 |
commit | 81f68a2c83c0c25259cd526c8bb4839caa361e8f (patch) | |
tree | ff2db492dbd3dddfc341370a4cf4b2a95abdae70 /src | |
parent | 511d823c2dc2b917afed6a9c50ad940e5c58c5d5 (diff) |
serialize, loader, test: add serializing scenery
Diffstat (limited to 'src')
-rw-r--r-- | src/scenery.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
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, |