summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.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/spells3.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/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc28
1 files changed, 11 insertions, 17 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index b4e741efff..5ef969ccd9 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -395,10 +395,9 @@ void simulacrum(int power)
if (summoned)
{
- strcpy( info, (summoned == 1) ? "An icy figure forms "
- : "Some icy figures form " );
- strcat( info, "before you!" );
- mpr( info );
+ mprf("%s before you!",
+ (summoned == 1) ? "An icy figure forms "
+ : "Some icy figures form ");
}
else
mpr( "You feel cold for a second." );
@@ -635,8 +634,7 @@ void you_teleport2( bool allow_control, bool new_abyss_area )
redraw_screen();
#if DEBUG_DIAGNOSTICS
- snprintf( info, INFO_SIZE, "Target square (%d,%d)", plox[0], plox[1] );
- mpr( info, MSGCH_DIAGNOSTICS );
+ mprf(MSGCH_DIAGNOSTICS, "Target square (%d,%d)", plox[0], plox[1] );
#endif
plox[0] += random2(3) - 1;
@@ -656,8 +654,8 @@ void you_teleport2( bool allow_control, bool new_abyss_area )
}
#if DEBUG_DIAGNOSTICS
- snprintf( info, INFO_SIZE, "Scattered target square (%d,%d)", plox[0], plox[1] );
- mpr( info, MSGCH_DIAGNOSTICS );
+ mprf(MSGCH_DIAGNOSTICS,
+ "Scattered target square (%d,%d)", plox[0], plox[1] );
#endif
if (is_controlled)
@@ -846,8 +844,7 @@ bool project_noise(void)
redraw_screen();
#if DEBUG_DIAGNOSTICS
- snprintf( info, INFO_SIZE, "Target square (%d,%d)", plox[0], plox[1] );
- mpr( info, MSGCH_DIAGNOSTICS );
+ mprf(MSGCH_DIAGNOSTICS, "Target square (%d,%d)", plox[0], plox[1] );
#endif
if (!silenced( plox[0], plox[1] ))
@@ -863,14 +860,11 @@ bool project_noise(void)
if (!silenced( you.x_pos, you.y_pos ))
{
- if (!success)
- mpr("You hear a dull thud.", MSGCH_SOUND);
+ if (success)
+ mprf(MSGCH_SOUND, "You hear a %svoice call your name.",
+ (see_grid( plox[0], plox[1] ) ? "distant " : "") );
else
- {
- snprintf( info, INFO_SIZE, "You hear a %svoice call your name.",
- (see_grid( plox[0], plox[1] ) ? "distant " : "") );
- mpr( info , MSGCH_SOUND );
- }
+ mprf(MSGCH_SOUND, "You hear a dull thud.");
}
}