summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/macro.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/macro.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/macro.cc')
-rw-r--r--crawl-ref/source/macro.cc21
1 files changed, 8 insertions, 13 deletions
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc
index 17b7fa0c49..4eac355975 100644
--- a/crawl-ref/source/macro.cc
+++ b/crawl-ref/source/macro.cc
@@ -630,25 +630,20 @@ void macro_add_query( void )
// reference to the appropriate mapping
macromap &mapref = (keymap ? Keymaps[keymc] : Macros);
- snprintf( info, INFO_SIZE, "Input %s%s trigger key: ",
- keymap?
- (keymc == KC_DEFAULT? "default " :
- keymc == KC_LEVELMAP? "level-map " :
- "targeting ") :
- "",
- (keymap ? "keymap" : "macro") );
-
- mpr( info, MSGCH_PROMPT );
+ mprf(MSGCH_PROMPT, "Input %s%s trigger key: ",
+ keymap ? (keymc == KC_DEFAULT ? "default " :
+ keymc == KC_LEVELMAP ? "level-map "
+ : "targeting ")
+ : "",
+ (keymap ? "keymap" : "macro") );
+
keyseq key = getch_mul();
cprintf( "%s" EOL, (vtostr( key )).c_str() ); // echo key to screen
if (mapref[key].size() > 0)
{
- snprintf( info, INFO_SIZE, "Current Action: %s",
- (vtostr( mapref[key] )).c_str() );
-
- mpr( info, MSGCH_WARN );
+ mprf(MSGCH_WARN, "Current Action: %s", vtostr(mapref[key]).c_str());
mpr( "Do you wish to (r)edefine, (c)lear, or (a)bort?", MSGCH_PROMPT );
input = getch();