summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/command.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-23 10:19:28 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-04-23 10:19:28 +0000
commit31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3 (patch)
tree3b981f5efc06e3a5e46cf9b1a395f7e35f2ddd9a /crawl-ref/source/command.cc
parent00af6cae236018eae3c659ae02cd8c017549bd15 (diff)
downloadcrawl-ref-31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3.tar.gz
crawl-ref-31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3.zip
Cleaned up a lot of code which was using info[] to use mprf() directly
instead. Fixed a bug with affix_weapon_enchantment messaging (mea culpa.) Fixed shatter() messages getting surpressed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1347 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r--crawl-ref/source/command.cc27
1 files changed, 6 insertions, 21 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 85e7c61c5a..846e777c45 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -283,18 +283,13 @@ static void adjust_spells(void)
you.spell_letter_table[index_1] = tmp;
// print out spell in new slot (now at input_2)
- snprintf( info, INFO_SIZE, "%c - %s", input_2,
- spell_title( get_spell_by_letter(input_2) ) );
-
- mpr(info);
+ mprf("%c - %s", input_2, spell_title( get_spell_by_letter(input_2) ) );
// print out other spell if one was involved (now at input_1)
spell = get_spell_by_letter( input_1 );
+
if (spell != SPELL_NO_SPELL)
- {
- snprintf( info, INFO_SIZE, "%c - %s", input_1, spell_title(spell) );
- mpr(info);
- }
+ mprf("%c - %s", input_1, spell_title(spell) );
} // end adjust_spells()
static void adjust_ability(void)
@@ -358,10 +353,7 @@ static void adjust_ability(void)
}
// print out targeted spell:
- snprintf( info, INFO_SIZE, "%c - %s", input_1,
- get_ability_name_by_index( index_1 ) );
-
- mpr(info);
+ mprf("%c - %s", input_1, get_ability_name_by_index( index_1 ) );
mpr( "Adjust to which letter?", MSGCH_PROMPT );
@@ -413,17 +405,10 @@ static void adjust_ability(void)
// This is because nothing actually moves until generate_abilities is
// called again... fortunately that has to be done everytime because
// that's the silly way this system currently works. -- bwr
- snprintf( info, INFO_SIZE, "%c - %s", input_2,
- get_ability_name_by_index( index_1 ) );
-
- mpr(info);
+ mprf("%c - %s", input_2, get_ability_name_by_index( index_1 ) );
if (you.ability_letter_table[index_1] != ABIL_NON_ABILITY)
- {
- snprintf( info, INFO_SIZE, "%c - %s", input_1,
- get_ability_name_by_index( index_2 ) );
- mpr(info);
- }
+ mprf("%c - %s", input_1, get_ability_name_by_index( index_2 ) );
} // end adjust_ability()
void list_armour(void)