diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-03-22 18:38:09 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-03-22 18:38:09 +0100 |
commit | 97c42872e9da98a7aa4a1d5fe70bfc1e8adfa68c (patch) | |
tree | 74ca3b6b0cff3443650ca3e82fb010390a00e147 /src/spells3.cc | |
parent | 92344ee3f306ecdfd1da4365ffc5cab6eaa29afd (diff) |
Split school_book_type out of types.h
- Rename to school_book
- Remove pointless spell_idx_list indirection
Diffstat (limited to 'src/spells3.cc')
-rw-r--r-- | src/spells3.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/spells3.cc b/src/spells3.cc index 2e709391..00cdfcc4 100644 --- a/src/spells3.cc +++ b/src/spells3.cc @@ -11,7 +11,6 @@ #include "object2.hpp" #include "skills.hpp" #include "spell_type.hpp" -#include "spell_idx_list.hpp" #include "spells1.hpp" #include "spells2.hpp" #include "spells4.hpp" @@ -2909,15 +2908,14 @@ casting_result tulkas_whirlwind() int udun_in_book(s32b sval, s32b pval) { int count = 0; - school_book_type *school_book; random_book_setup(sval, pval); /* Get the school book */ - school_book = school_books_at(sval); + school_book *school_book = school_books_at(sval); /* Go through spells */ - for (auto spell_idx : school_book->spell_idx_list->v) { + for (auto spell_idx : school_book->spell_idxs) { spell_type *spell = spell_at(spell_idx); for (auto school_idx : spell_type_get_schools(spell)) { @@ -2939,10 +2937,10 @@ int levels_in_book(s32b sval, s32b pval) random_book_setup(sval, pval); /* Get the school book */ - school_book_type *school_book = school_books_at(sval); + school_book *school_book = school_books_at(sval); /* Parse all spells */ - for (auto spell_idx : school_book->spell_idx_list->v) + for (auto spell_idx : school_book->spell_idxs) { spell_type *spell = spell_at(spell_idx); levels += spell_type_skill_level(spell); |