summaryrefslogtreecommitdiff
path: root/src/feature_type.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature_type.hpp')
-rw-r--r--src/feature_type.hpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/feature_type.hpp b/src/feature_type.hpp
new file mode 100644
index 00000000..e818f17a
--- /dev/null
+++ b/src/feature_type.hpp
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "h-basic.h"
+
+#include "feature_flag_set.hpp"
+
+/**
+ * Terrain feature descriptor.
+ */
+struct feature_type
+{
+ char *name = nullptr; /* Name */
+
+ const char *text = nullptr; /* Text. May point to shared read-only memory, DO NOT FREE! */
+ const char *tunnel = nullptr; /* Text for tunneling. May point to shared read-only memory, DO NOT FREE! */
+ const char *block = nullptr; /* Text for blocking. May point to shared read-only memory, DO NOT FREE! */
+
+ byte mimic = 0; /* Feature to mimic */
+
+ feature_flag_set flags; /* First set of flags */
+
+ byte d_attr = 0; /* Default feature attribute */
+ char d_char = '\0'; /* Default feature character */
+
+ byte x_attr = 0; /* Desired feature attribute */
+ char x_char = '\0'; /* Desired feature character */
+
+ byte shimmer[7]; /* Shimmer colors */
+
+ int d_dice[4] = { 0 }; /* Number of dice */
+ int d_side[4] = { 0 }; /* Number of sides */
+ int d_frequency[4] = { 0 }; /* Frequency of damage (1 is the minimum) */
+ int d_type[4] = { 0 }; /* Type of damage */
+};