summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-book.h
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-01-17 01:09:51 -0500
committerNeil Moore <neil@s-z.org>2014-01-17 01:13:50 -0500
commitdde664e211b3661fc7ece9c36dba454eaa50c38b (patch)
tree7581a7b959b4e4dd1d2a74418e750ee3e91ab554 /crawl-ref/source/mon-book.h
parentdb6e4539e64514ec7665a14fb8726f019b270037 (diff)
downloadcrawl-ref-dde664e211b3661fc7ece9c36dba454eaa50c38b.tar.gz
crawl-ref-dde664e211b3661fc7ece9c36dba454eaa50c38b.zip
Split some prototypes etc off to mon-book.h
All the ones that reference mon_spellbook_type, so that the users of mon-util.h don't all require a rebuild whenever mon-spll.h is touched and mon-mst.h regenerated. For the same reason, change the 'sec' field mon monster_entry back to an int, and make get_spellbooks a function rather than a method of monster_info. I did not split the implementations off into a new .cc file, but that wouldn't be unreasonable.
Diffstat (limited to 'crawl-ref/source/mon-book.h')
-rw-r--r--crawl-ref/source/mon-book.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-book.h b/crawl-ref/source/mon-book.h
new file mode 100644
index 0000000000..1c7a49479d
--- /dev/null
+++ b/crawl-ref/source/mon-book.h
@@ -0,0 +1,23 @@
+/**
+ * @file
+ * @brief Monster spellbook functions, types, and globals.
+**/
+
+#ifndef MONBOOK_H
+#define MONBOOK_H
+
+#include <vector>
+#include "defines.h"
+#include "enum.h"
+#include "mon-mst.h"
+
+struct mon_spellbook
+{
+ mon_spellbook_type type;
+ spell_type spells[NUM_MONSTER_SPELL_SLOTS];
+};
+
+extern const mon_spellbook mspell_list[];
+
+vector<mon_spellbook_type> get_spellbooks(const monster_info &mon);
+#endif