summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/scenery.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/scenery.hpp b/src/scenery.hpp
index 3e7c4e4f..cc8cc159 100644
--- a/src/scenery.hpp
+++ b/src/scenery.hpp
@@ -6,23 +6,21 @@ namespace floormat {
struct anim_atlas;
-enum class rotation : std::uint16_t {
+enum class rotation : std::uint8_t {
N, NE, E, SE, S, SW, W, NW,
COUNT,
};
struct scenery final
{
- static constexpr auto NO_FRAME = (1 << 12) - 1;
+ static constexpr auto NO_FRAME = (std::uint16_t)-1;
using frame_t = std::uint16_t;
- rotation r : 4 = rotation::N;
- frame_t frame : 12 = NO_FRAME;
+ frame_t frame = NO_FRAME;
+ rotation r = rotation::N;
};
-static_assert(sizeof(scenery) == sizeof(std::uint16_t));
-
struct scenery_proto final {
std::shared_ptr<anim_atlas> atlas;
scenery frame;