From e611d6c12085d32c2e024bf1b544d4c32bae1738 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 6 Nov 2022 20:23:23 +0100 Subject: a --- src/scenery.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/scenery.hpp b/src/scenery.hpp index 1b0dc673..04c54c22 100644 --- a/src/scenery.hpp +++ b/src/scenery.hpp @@ -11,9 +11,11 @@ enum class rotation : std::uint16_t { struct scenery final { + static constexpr auto NO_FRAME = (1 << 12) - 1; + using frame_t = std::uint16_t; - frame_t frame : 12 = (1 << 12) - 1; + frame_t frame : 12 = NO_FRAME; rotation r : 4 = rotation::N; constexpr operator bool() const noexcept; @@ -23,7 +25,7 @@ static_assert(sizeof(scenery) == sizeof(std::uint16_t)); constexpr scenery::operator bool() const noexcept { - return frame == (1 << 13) - 1; + return frame == NO_FRAME; } } // namespace floormat -- cgit v1.2.3