diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-28 19:36:41 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-28 19:36:50 +0100 |
commit | e24f379bccd1d61f68328e74bce2fef99e935713 (patch) | |
tree | b9b0a4dbb0305107b739d150fc0f3934c9014458 /src/rotation.hpp | |
parent | e9741774861c37b780929902a4c9fecfaa8cd2e2 (diff) |
src/scenery: move rotation stuff to its own file
Diffstat (limited to 'src/rotation.hpp')
-rw-r--r-- | src/rotation.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/rotation.hpp b/src/rotation.hpp new file mode 100644 index 00000000..39694336 --- /dev/null +++ b/src/rotation.hpp @@ -0,0 +1,14 @@ +#pragma once +#include <cstddef> + +namespace floormat { + +enum class rotation : unsigned char { + N, NE, E, SE, S, SW, W, NW, +}; + +constexpr inline std::size_t rotation_BITS = 3; +constexpr inline std::size_t rotation_MASK = (1 << rotation_BITS)-1; +constexpr inline rotation rotation_COUNT = rotation{1 << rotation_BITS}; + +} // namespace floormat |