#pragma once #include "compat/integer-types.hpp" #include namespace floormat { enum class rotation : std::uint16_t { N, NE, E, SE, S, SW, W, NW, COUNT, }; struct scenery final { static constexpr auto NO_FRAME = (1 << 12) - 1; using frame_t = std::uint16_t; frame_t frame : 12 = NO_FRAME; rotation r : 4 = rotation::N; constexpr operator bool() const noexcept; }; static_assert(sizeof(scenery) == sizeof(std::uint16_t)); constexpr scenery::operator bool() const noexcept { return frame == NO_FRAME; } } // namespace floormat