summaryrefslogtreecommitdiffhomepage
path: root/src/pass-mode.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-12-02 14:44:32 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-12-02 14:46:59 +0100
commit889d2c0c0933cf2fd9e068b1d2b79eb936b29b58 (patch)
treecfc5f5b6e417c28482734645a69e0d49388fa5b3 /src/pass-mode.hpp
parent8dbf450e34121358992e48212ae22cb7f5fc92f9 (diff)
src, serialize: work on pass mode
1. add one more value to the enum 2. serialize it properly in binary 3. serialize it as string in json
Diffstat (limited to 'src/pass-mode.hpp')
-rw-r--r--src/pass-mode.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pass-mode.hpp b/src/pass-mode.hpp
new file mode 100644
index 00000000..a60a8188
--- /dev/null
+++ b/src/pass-mode.hpp
@@ -0,0 +1,10 @@
+#pragma once
+#include <cstdint>
+
+namespace floormat {
+
+enum class pass_mode : std::uint8_t { shoot_through, pass, blocked, see_through };
+constexpr inline std::uint8_t pass_mode_COUNT = std::uint8_t(pass_mode::see_through) + 1;
+static_assert(pass_mode_COUNT == 4);
+
+} // namespace floormat