diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-12-11 08:09:30 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-12-11 08:09:30 +0100 |
commit | 9f6f4a36d87c1334437debd9f48f3de27a747dce (patch) | |
tree | 5c87f54baaceff98cdff2465b0c0b30591512025 /src/spells4.cc | |
parent | 18e52d9a037ebb751312d6a2632383135321763f (diff) |
Move print_book() to cmd5.cc and make it static
Diffstat (limited to 'src/spells4.cc')
-rw-r--r-- | src/spells4.cc | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/spells4.cc b/src/spells4.cc index 3c877bf2..b4f924c6 100644 --- a/src/spells4.cc +++ b/src/spells4.cc @@ -447,39 +447,6 @@ int print_spell(cptr label_, byte color, int y, s32b s) return y + 1; } -int print_book(s16b sval, s32b spell_idx, object_type *obj) -{ - int y = 2; - int i; - - random_book_setup(sval, spell_idx); - - school_book *school_book = school_books_at(sval); - - /* Parse all spells */ - i = 0; - for (auto spell_idx : school_book->spell_idxs) - { - byte color = TERM_L_DARK; - bool_ is_ok; - char label[8]; - - is_ok = is_ok_spell(spell_idx, obj->pval); - if (is_ok) - { - color = (get_mana(spell_idx) > get_power(spell_idx)) ? TERM_ORANGE : TERM_L_GREEN; - } - - sprintf(label, "%c) ", 'a' + i); - - y = print_spell(label, color, y, spell_idx); - i++; - } - - prt(format(" %-20s%-16s Level Cost Fail Info", "Name", "School"), 1, 0); - return y; -} - void lua_cast_school_spell(s32b s, bool_ no_cost) { bool_ use = FALSE; |