summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-06 20:23:23 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-06 20:23:23 +0100
commite611d6c12085d32c2e024bf1b544d4c32bae1738 (patch)
tree0dbdc8bce4d4d0ccc26a51f6f7d4f2546437aafe /src
parentb82ebb0339a15cc05e26f9cdca646022e6b71ef4 (diff)
a
Diffstat (limited to 'src')
-rw-r--r--src/scenery.hpp6
1 files changed, 4 insertions, 2 deletions
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