summaryrefslogtreecommitdiff
path: root/src/device_allocation.h
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2013-03-25 10:59:33 +0100
committerBardur Arantsson <bardur@scientician.net>2013-09-27 14:46:41 +0200
commit63bb0520dcdb6177533fe3b412fd72ee1ce6d711 (patch)
treef5b8cba5d209522cf9d33ea347a43d57678d22ef /src/device_allocation.h
parentd1bc64bd22673bc72bafd7e200cbbea6eacb06c1 (diff)
Split out data types
Diffstat (limited to 'src/device_allocation.h')
-rw-r--r--src/device_allocation.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/device_allocation.h b/src/device_allocation.h
new file mode 100644
index 00000000..e620270f
--- /dev/null
+++ b/src/device_allocation.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "device_allocation_fwd.h"
+#include "range.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Device allocation for skill
+ */
+struct device_allocation
+{
+ byte tval;
+ s32b rarity;
+ range_type base_level;
+ range_type max_level;
+ /* Next device allocation in the list */
+ device_allocation *next;
+};
+
+int compare_device_allocation(device_allocation *a, device_allocation *b);
+SGLIB_DEFINE_LIST_PROTOTYPES(device_allocation, compare_device_allocation, next);
+
+void device_allocation_init(struct device_allocation *device_allocation, byte tval);
+struct device_allocation *device_allocation_new(byte tval);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif