diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-12-20 20:12:49 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-12-20 20:30:43 +0100 |
commit | 679a19dda682726b0cfe0d13e96aef43987f9f12 (patch) | |
tree | 6c4eadc03fe0b383e67a09977d3fdec408324249 /crawl-ref/source/ouch.cc | |
parent | ab23b2d884b7eafc8bd17baa818102f14d165e5e (diff) | |
download | crawl-ref-679a19dda682726b0cfe0d13e96aef43987f9f12.tar.gz crawl-ref-679a19dda682726b0cfe0d13e96aef43987f9f12.zip |
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.
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 1c7d94cf1f..40352ecc0c 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -80,9 +80,7 @@ int check_your_resists(int hurted, beam_type flavour) int resist; int original = hurted; -#if DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "checking resistance: flavour=%d", flavour ); -#endif + dprf("checking resistance: flavour=%d", flavour ); if (flavour == BEAM_FIRE || flavour == BEAM_LAVA || flavour == BEAM_HELLFIRE || flavour == BEAM_FRAG) @@ -310,9 +308,7 @@ void _item_corrode(int slot) // Anti-corrosion items protect against 90% of corrosion. if (wearing_amulet(AMU_RESIST_CORROSION) && !one_chance_in(10)) { -#if DEBUG_DIAGNOSTICS - mpr( "Amulet protects.", MSGCH_DIAGNOSTICS ); -#endif + dprf("Amulet protects."); return; } @@ -747,10 +743,8 @@ bool drain_exp(bool announce_full) you.exp_available = std::max(0, you.exp_available); -#if DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "You lose %ld experience points, %ld from pool.", + dprf("You lose %ld experience points, %ld from pool.", exp_drained, pool_drained); -#endif you.redraw_experience = true; @@ -1013,9 +1007,7 @@ void ouch(int dam, int death_source, kill_method_type death_type, { // Deep Dwarves get to shave _any_ hp loss. int shave = 1 + random2(2 + random2(1 + you.experience_level / 3)); -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "HP shaved: %d.", shave); -#endif + dprf("HP shaved: %d.", shave); dam -= shave; if (dam <= 0) return; @@ -1174,9 +1166,7 @@ void ouch(int dam, int death_source, kill_method_type death_type, = se.death_description(scorefile_entry::DDV_VERBOSE); #ifdef USE_OPTIONAL_WIZARD_DEATH -#if DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Damage: %d; Hit points: %d", dam, you.hp); -#endif + dprf("Damage: %d; Hit points: %d", dam, you.hp); if (crawl_state.test || !yesno("Die?", false, 'n')) { |