From 31d23a40fe1ac90e0e319ce9bab1fa3bb0a08bf3 Mon Sep 17 00:00:00 2001 From: haranp Date: Mon, 23 Apr 2007 10:19:28 +0000 Subject: 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 --- crawl-ref/source/spells3.cc | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'crawl-ref/source/spells3.cc') 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."); } } -- cgit v1.2.3-54-g00ecf