From 0f610b77f2016ca80b18fdfb7a0bdd6eeb804743 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Mon, 23 Feb 2015 09:12:01 +0100 Subject: Split spells4.cc declarations into separate header file --- src/cmd5.cc | 1 + src/externs.h | 40 ---------------------------------------- src/q_library.cc | 1 + src/script.cc | 1 + src/skills.cc | 1 + src/spell_type.cc | 1 + src/spells1.cc | 1 + src/spells3.cc | 1 + src/spells4.cc | 2 +- src/spells4.hpp | 41 +++++++++++++++++++++++++++++++++++++++++ src/spells5.cc | 1 + src/spells6.cc | 1 + 12 files changed, 51 insertions(+), 41 deletions(-) create mode 100644 src/spells4.hpp diff --git a/src/cmd5.cc b/src/cmd5.cc index b58df8f0..93f29a99 100644 --- a/src/cmd5.cc +++ b/src/cmd5.cc @@ -16,6 +16,7 @@ #include "spell_type.hpp" #include "spells1.hpp" #include "spells2.hpp" +#include "spells4.hpp" #include "spells5.hpp" #include "quark.h" #include "wizard2.hpp" diff --git a/src/externs.h b/src/externs.h index cf90a208..f85cffb8 100644 --- a/src/externs.h +++ b/src/externs.h @@ -760,46 +760,6 @@ extern s16b m_bonus(int max, int level); extern void object_gain_level(object_type *o_ptr); extern s32b flag_cost(object_type * o_ptr, int plusses); -/* spells4.c */ - -extern s32b SCHOOL_AIR; -extern s32b SCHOOL_AULE; -extern s32b SCHOOL_CONVEYANCE; -extern s32b SCHOOL_DEMON; -extern s32b SCHOOL_DEVICE; -extern s32b SCHOOL_DIVINATION; -extern s32b SCHOOL_EARTH; -extern s32b SCHOOL_ERU; -extern s32b SCHOOL_FIRE; -extern s32b SCHOOL_GEOMANCY; -extern s32b SCHOOL_MANA; -extern s32b SCHOOL_MANDOS; -extern s32b SCHOOL_MANWE; -extern s32b SCHOOL_MELKOR; -extern s32b SCHOOL_META; -extern s32b SCHOOL_MIND; -extern s32b SCHOOL_MUSIC; -extern s32b SCHOOL_NATURE; -extern s32b SCHOOL_TEMPORAL; -extern s32b SCHOOL_TULKAS; -extern s32b SCHOOL_UDUN; -extern s32b SCHOOL_ULMO; -extern s32b SCHOOL_VARDA; -extern s32b SCHOOL_WATER; -extern s32b SCHOOL_YAVANNA; - -void print_spell_desc(int s, int y); -void init_school_books(); -school_book_type *school_books_at(int sval); -void school_book_add_spell(school_book_type *school_book, s32b spell_idx); -void random_book_setup(s16b sval, s32b spell_idx); -int print_spell(cptr label, byte color, int y, s32b s); -int print_book(s16b sval, s32b pval, object_type *obj); -int school_book_length(int sval); -int spell_x(int sval, int pval, int i); -bool_ school_book_contains_spell(int sval, s32b spell_idx); -void lua_cast_school_spell(s32b spell_idx, bool_ no_cost); - /* spells6.c */ void schools_init(); diff --git a/src/q_library.cc b/src/q_library.cc index c3c044cd..b87b346c 100644 --- a/src/q_library.cc +++ b/src/q_library.cc @@ -2,6 +2,7 @@ #include "quark.h" #include "hooks.h" #include "spells3.hpp" +#include "spells4.hpp" #include diff --git a/src/script.cc b/src/script.cc index 55b89bdd..3e3ce8a3 100644 --- a/src/script.cc +++ b/src/script.cc @@ -12,6 +12,7 @@ #include "angband.h" #include "q_library.h" +#include "spells4.hpp" #include "spells5.hpp" diff --git a/src/skills.cc b/src/skills.cc index 84715150..c3fb3835 100644 --- a/src/skills.cc +++ b/src/skills.cc @@ -16,6 +16,7 @@ #include "help.hpp" #include "hooks.h" #include "spells1.hpp" +#include "spells4.hpp" #include "traps.hpp" #include "util.hpp" #include "xtra2.hpp" diff --git a/src/spell_type.cc b/src/spell_type.cc index eef93e6d..867068f8 100644 --- a/src/spell_type.cc +++ b/src/spell_type.cc @@ -2,6 +2,7 @@ #include "range.h" #include "device_allocation.h" #include "dice.h" +#include "spells4.hpp" #include "angband.h" diff --git a/src/spells1.cc b/src/spells1.cc index e51b8ee8..189ad043 100644 --- a/src/spells1.cc +++ b/src/spells1.cc @@ -16,6 +16,7 @@ #include "skills.hpp" #include "spell_type.hpp" #include "spells2.hpp" +#include "spells4.hpp" #include "spells5.hpp" #include "squeltch.hpp" #include "traps.hpp" diff --git a/src/spells3.cc b/src/spells3.cc index a36dcf1d..22bede27 100644 --- a/src/spells3.cc +++ b/src/spells3.cc @@ -8,6 +8,7 @@ #include "spell_idx_list.hpp" #include "spells1.hpp" #include "spells2.hpp" +#include "spells4.hpp" #include "spells5.hpp" #include "mimic.hpp" #include "xtra2.hpp" diff --git a/src/spells4.cc b/src/spells4.cc index 75f836a0..9e389d8e 100644 --- a/src/spells4.cc +++ b/src/spells4.cc @@ -1,4 +1,4 @@ -#include "angband.h" +#include "spells4.hpp" #include "cave.hpp" #include "cmd5.hpp" diff --git a/src/spells4.hpp b/src/spells4.hpp new file mode 100644 index 00000000..b358b571 --- /dev/null +++ b/src/spells4.hpp @@ -0,0 +1,41 @@ +#pragma once + +#include "angband.h" + +extern s32b SCHOOL_AIR; +extern s32b SCHOOL_AULE; +extern s32b SCHOOL_CONVEYANCE; +extern s32b SCHOOL_DEMON; +extern s32b SCHOOL_DEVICE; +extern s32b SCHOOL_DIVINATION; +extern s32b SCHOOL_EARTH; +extern s32b SCHOOL_ERU; +extern s32b SCHOOL_FIRE; +extern s32b SCHOOL_GEOMANCY; +extern s32b SCHOOL_MANA; +extern s32b SCHOOL_MANDOS; +extern s32b SCHOOL_MANWE; +extern s32b SCHOOL_MELKOR; +extern s32b SCHOOL_META; +extern s32b SCHOOL_MIND; +extern s32b SCHOOL_MUSIC; +extern s32b SCHOOL_NATURE; +extern s32b SCHOOL_TEMPORAL; +extern s32b SCHOOL_TULKAS; +extern s32b SCHOOL_UDUN; +extern s32b SCHOOL_ULMO; +extern s32b SCHOOL_VARDA; +extern s32b SCHOOL_WATER; +extern s32b SCHOOL_YAVANNA; + +void print_spell_desc(int s, int y); +void init_school_books(); +school_book_type *school_books_at(int sval); +void school_book_add_spell(school_book_type *school_book, s32b spell_idx); +void random_book_setup(s16b sval, s32b spell_idx); +int print_spell(cptr label, byte color, int y, s32b s); +int print_book(s16b sval, s32b pval, object_type *obj); +int school_book_length(int sval); +int spell_x(int sval, int pval, int i); +bool_ school_book_contains_spell(int sval, s32b spell_idx); +void lua_cast_school_spell(s32b spell_idx, bool_ no_cost); diff --git a/src/spells5.cc b/src/spells5.cc index 8e7bd4ab..32de8771 100644 --- a/src/spells5.cc +++ b/src/spells5.cc @@ -4,6 +4,7 @@ #include "spell_type.hpp" #include "device_allocation.h" #include "spells3.hpp" +#include "spells4.hpp" #include diff --git a/src/spells6.cc b/src/spells6.cc index ca344f7c..5c2d2a67 100644 --- a/src/spells6.cc +++ b/src/spells6.cc @@ -3,6 +3,7 @@ #include "gods.hpp" #include "skills.hpp" #include "spell_type.hpp" +#include "spells4.hpp" #include #include -- cgit v1.2.3