From 17e225f897e91837dabf6206a81354df7091e442 Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Wed, 6 Aug 2014 00:59:09 -0400 Subject: 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. --- crawl-ref/source/mon-book.h | 2 -- crawl-ref/source/mon-spll.h | 7 ++++--- 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 > unique_books; vector 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 monsters_by_habitat[NUM_HABITATS]; static vector species_by_habitat[NUM_HABITATS]; -const mon_spellbook mspell_list[] = -{ #include "mon-spll.h" -}; - #include "mon-data.h" #define MONDATASIZE ARRAYSZ(mondata) -- cgit v1.2.3-54-g00ecf