From 679a19dda682726b0cfe0d13e96aef43987f9f12 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Sun, 20 Dec 2009 20:12:49 +0100 Subject: Replace long debug message calls with dprf(), except for cases where a dumb compiler could call unnecessary functions. For paranoia, I left even any uses of std::string. --- crawl-ref/source/item_use.cc | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 8e70a848f8..4553465d97 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2577,13 +2577,10 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, if (wepClass == OBJ_MISSILES && wepType == MI_NEEDLE) pbolt.ench_power = AUTOMATIC_HIT; -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, - "Base hit == %d; Base damage == %d " + dprf( "Base hit == %d; Base damage == %d " "(item %d + launcher %d)", baseHit, baseDam, item_base_dam, lnch_base_dam); -#endif // Fix ammo damage bonus, since missiles only use inv_plus. ammoDamBonus = ammoHitBonus; @@ -2625,9 +2622,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, effSkill = shoot_skill; const int speed = launcher_final_speed(launcher, you.shield()); -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Final launcher speed: %d", speed); -#endif + dprf("Final launcher speed: %d", speed); you.time_taken = speed * you.time_taken / 100; // [dshaligram] Improving missile weapons: @@ -3031,10 +3026,8 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, // blowguns. exHitBonus -= (30 - you.skills[SK_DARTS]) / 3; baseHit -= (30 - you.skills[SK_DARTS]) / 3; -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Needle base hit = %d, exHitBonus = %d", + dprf("Needle base hit = %d, exHitBonus = %d", baseHit, exHitBonus); -#endif } } @@ -3065,13 +3058,10 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, scale_dice(pbolt.damage); -#if DEBUG_DIAGNOSTICS - mprf( MSGCH_DIAGNOSTICS, - "H:%d+%d;a%dl%d. D:%d+%d;a%dl%d -> %d,%dd%d", + dprf( "H:%d+%d;a%dl%d. D:%d+%d;a%dl%d -> %d,%dd%d", baseHit, exHitBonus, ammoHitBonus, lnchHitBonus, baseDam, exDamBonus, ammoDamBonus, lnchDamBonus, pbolt.hit, pbolt.damage.num, pbolt.damage.size ); -#endif // Create message. mprf( "%s %s%s %s.", -- cgit v1.2.3-54-g00ecf