diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-05 19:32:03 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-05 19:32:03 +0100 |
commit | 141ecedcacda8fa094a22da067fe24423f0d6f38 (patch) | |
tree | 67a8241c1bcd4d9788e93d472859ee15b496300b /src/scenery.hpp | |
parent | 11f27ee84b255ee5a3f9d72832f5bfef261d2378 (diff) |
wip
Diffstat (limited to 'src/scenery.hpp')
-rw-r--r-- | src/scenery.hpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/scenery.hpp b/src/scenery.hpp index 4e362070..731b999b 100644 --- a/src/scenery.hpp +++ b/src/scenery.hpp @@ -4,16 +4,19 @@ namespace floormat { -struct anim_atlas; +enum class rotation : std::uint16_t { + N, NE, E, SE, S, SW, W, NW, + COUNT, +}; struct scenery final { - enum class rotation : std::uint16_t { - N, NE, E, SE, S, SW, W, NW, - }; + using frame_t = std::uint16_t; - rotation r : 3 = rotation::N; - std::uint16_t frame : 13 = 0; + frame_t frame : 13 = 0; + rotation r : 3 = rotation::N; }; +static_assert(sizeof(scenery) == sizeof(std::uint16_t)); + } // namespace floormat |