From fd202fad9649bbcbd879edf2baca6f907f373890 Mon Sep 17 00:00:00 2001 From: Vsevolod Kozlov Date: Sun, 8 Nov 2009 17:04:28 +0300 Subject: Replace uses of spelltype_name with spelltype_long_name. --- crawl-ref/source/command.cc | 2 +- crawl-ref/source/spl-book.cc | 6 +++--- crawl-ref/source/spl-cast.cc | 2 +- crawl-ref/source/spl-util.cc | 35 ----------------------------------- crawl-ref/source/spl-util.h | 2 -- 5 files changed, 5 insertions(+), 42 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 2dba6303a7..b4e365a41a 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -1219,7 +1219,7 @@ static bool _append_books(std::string &desc, item_def &item, std::string key) if (already) desc += "/" ; - desc += spelltype_name( 1 << i ); + desc += spelltype_long_name( 1 << i ); already = true; } } diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index 52533d386c..8845464757 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -850,7 +850,7 @@ int spellbook_contents( item_def &book, read_book_action_type action, if (already) out.cprintf( "/" ); - out.cprintf( "%s", spelltype_name( 1 << i ) ); + out.cprintf( "%s", spelltype_long_name( 1 << i ) ); already = true; } } @@ -2068,9 +2068,9 @@ static bool _compare_spells(spell_type a, spell_type b) { int mask = 1 << i; if (a_type == NULL && (schools_a & mask)) - a_type = spelltype_name(mask); + a_type = spelltype_long_name(mask); if (b_type == NULL && (schools_b & mask)) - b_type = spelltype_name(mask); + b_type = spelltype_long_name(mask); } ASSERT(a_type != NULL && b_type != NULL); return (strcmp(a_type, b_type) < 0); diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 7f92310aff..f62b74fa37 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -2407,7 +2407,7 @@ std::string spell_schools_string(spell_type spell) { if (already) desc += "/"; - desc += spelltype_name(1 << i); + desc += spelltype_long_name(1 << i); already = true; } } diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index ef780a4f88..c84dbeb525 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -849,41 +849,6 @@ const char* spelltype_long_name( int which_spelltype ) } } -const char *spelltype_name(unsigned int which_spelltype) -{ - switch (which_spelltype) - { - case SPTYP_CONJURATION: - return ("Conjuration"); - case SPTYP_ENCHANTMENT: - return ("Enchantment"); - case SPTYP_FIRE: - return ("Fire"); - case SPTYP_ICE: - return ("Ice"); - case SPTYP_TRANSMUTATION: - return ("Transmutation"); - case SPTYP_NECROMANCY: - return ("Necromancy"); - case SPTYP_HOLY: - return ("Holy"); - case SPTYP_SUMMONING: - return ("Summoning"); - case SPTYP_DIVINATION: - return ("Divination"); - case SPTYP_TRANSLOCATION: - return ("Translocation"); - case SPTYP_POISON: - return ("Poison"); - case SPTYP_EARTH: - return ("Earth"); - case SPTYP_AIR: - return ("Air"); - default: - return "Buggy"; - } -} // end spelltype_name() - int spell_type2skill(unsigned int spelltype) { switch (spelltype) diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h index 3525acc4c5..e3feea06ed 100644 --- a/crawl-ref/source/spl-util.h +++ b/crawl-ref/source/spl-util.h @@ -115,8 +115,6 @@ bool spell_direction( dist &spelld, bolt &pbolt, bool may_target_self = false, const char *prompt = NULL, bool cancel_at_self = false ); -const char *spelltype_name(unsigned int which_spelltype); - int spell_type2skill (unsigned int which_spelltype); int spell_skill2type (unsigned int which_skill); -- cgit v1.2.3-54-g00ecf