From e24f379bccd1d61f68328e74bce2fef99e935713 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 28 Feb 2023 19:36:41 +0100 Subject: src/scenery: move rotation stuff to its own file --- src/rotation.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/rotation.hpp (limited to 'src/rotation.hpp') 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 + +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 -- cgit v1.2.3