summaryrefslogtreecommitdiff
path: root/src/level_marker.hpp
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2017-09-07 12:53:57 +0200
committerBardur Arantsson <bardur@scientician.net>2017-09-07 12:53:57 +0200
commit39e1689130e87732cf410aaea7458dfdc399d50e (patch)
tree1dab000e95f28816522ea0997f022ec8ca64ef40 /src/level_marker.hpp
parentb4dafbb7604b8840c702455022096e8c17c8726b (diff)
Move special_level[] to Game struct
Refactor into a multi_array<> to make it more robust.
Diffstat (limited to 'src/level_marker.hpp')
-rw-r--r--src/level_marker.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/level_marker.hpp b/src/level_marker.hpp
new file mode 100644
index 00000000..07925b70
--- /dev/null
+++ b/src/level_marker.hpp
@@ -0,0 +1,25 @@
+#pragma once
+
+#include <tome/enum_string_map.hpp>
+
+/**
+ * Markers for 'special' levels.
+ */
+enum class level_marker {
+ NORMAL,
+ SPECIAL,
+ REGENERATE
+};
+
+/**
+ * Is the level "normal"?
+ */
+inline bool is_normal_level(level_marker m)
+{
+ return m == level_marker::NORMAL;
+}
+
+/**
+ * Bidrectional map between enum and strings.
+ */
+EnumStringMap<level_marker> const &level_marker_values();