diff options
author | Neil Moore <neil@s-z.org> | 2014-08-06 00:59:09 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-08-06 01:04:53 -0400 |
commit | 17e225f897e91837dabf6206a81354df7091e442 (patch) | |
tree | 4e250c93ee1111b90a682a089e821937d589d2ca | |
parent | 0ca2a48c7e8d7454b609b9156c9ce56e04e891e3 (diff) | |
download | crawl-ref-17e225f897e91837dabf6206a81354df7091e442.tar.gz crawl-ref-17e225f897e91837dabf6206a81354df7091e442.zip |
Adjust mspell_list definition.
Make it static; and to match the other data headers (mon-data.h etc.),
move the whole definition into mon-spll.h and remove the include guards
there.
-rw-r--r-- | crawl-ref/source/mon-book.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/mon-spll.h | 7 | ||||
-rw-r--r-- | crawl-ref/source/mon-util.cc | 4 |
3 files changed, 4 insertions, 9 deletions
diff --git a/crawl-ref/source/mon-book.h b/crawl-ref/source/mon-book.h index 7100498b1d..ec082dd57d 100644 --- a/crawl-ref/source/mon-book.h +++ b/crawl-ref/source/mon-book.h @@ -17,8 +17,6 @@ struct mon_spellbook spell_type spells[NUM_MONSTER_SPELL_SLOTS]; }; -extern const mon_spellbook mspell_list[]; - typedef vector<vector<spell_type> > unique_books; vector<mon_spellbook_type> get_spellbooks(const monster_info &mon); diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h index 8d198bfc85..8850feb958 100644 --- a/crawl-ref/source/mon-spll.h +++ b/crawl-ref/source/mon-spll.h @@ -1,5 +1,4 @@ -#ifndef MON_SPLL_H -#define MON_SPLL_H +#include "mon-book.h" /* ********************************************************************* @@ -22,6 +21,8 @@ ********************************************************************* */ +static const mon_spellbook mspell_list[] = +{ { MST_ORC_WIZARD_I, { SPELL_MAGIC_DART, @@ -2469,4 +2470,4 @@ SPELL_MASS_CONFUSION } }, -#endif +}; diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index 727e0de4f8..dbce2ded97 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -78,11 +78,7 @@ static bool initialised_randmons = false; static vector<monster_type> monsters_by_habitat[NUM_HABITATS]; static vector<monster_type> species_by_habitat[NUM_HABITATS]; -const mon_spellbook mspell_list[] = -{ #include "mon-spll.h" -}; - #include "mon-data.h" #define MONDATASIZE ARRAYSZ(mondata) |