summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-stuff.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-12-20 20:12:49 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-12-20 20:30:43 +0100
commit679a19dda682726b0cfe0d13e96aef43987f9f12 (patch)
tree6c4eadc03fe0b383e67a09977d3fdec408324249 /crawl-ref/source/mon-stuff.cc
parentab23b2d884b7eafc8bd17baa818102f14d165e5e (diff)
downloadcrawl-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/mon-stuff.cc')
-rw-r--r--crawl-ref/source/mon-stuff.cc23
1 files changed, 5 insertions, 18 deletions
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc
index 9b54cac979..76f964fe20 100644
--- a/crawl-ref/source/mon-stuff.cc
+++ b/crawl-ref/source/mon-stuff.cc
@@ -403,10 +403,7 @@ bool explode_corpse(item_def& corpse, const coord_def& where)
cp.x += random_range(-LOS_RADIUS, LOS_RADIUS);
cp.y += random_range(-LOS_RADIUS, LOS_RADIUS);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Trying to scatter chunk to %d, %d...",
- cp.x, cp.y);
-#endif
+ dprf("Trying to scatter chunk to %d, %d...", cp.x, cp.y);
if (! in_bounds(cp))
continue;
@@ -414,9 +411,7 @@ bool explode_corpse(item_def& corpse, const coord_def& where)
if (! ld.see_cell(cp))
continue;
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Cell is visible...");
-#endif
+ dprf("Cell is visible...");
if (feat_is_solid(grd(cp)) || actor_at(cp))
continue;
@@ -431,9 +426,7 @@ bool explode_corpse(item_def& corpse, const coord_def& where)
continue;
}
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "Success");
-#endif
+ dprf("Success");
copy_item_to_grid(corpse, cp);
}
@@ -730,18 +723,12 @@ static bool _ely_heal_monster(monsters *monster, killer_type killer, int i)
else if (!YOU_KILL(killer))
return (false);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "monster hp: %d, max hp: %d",
- monster->hit_points, monster->max_hit_points);
-#endif
+ dprf("monster hp: %d, max hp: %d", monster->hit_points, monster->max_hit_points);
monster->hit_points = std::min(1 + random2(ely_penance/3),
monster->max_hit_points);
-#ifdef DEBUG_DIAGNOSTICS
- mprf(MSGCH_DIAGNOSTICS, "new hp: %d, ely penance: %d",
- monster->hit_points, ely_penance);
-#endif
+ dprf("new hp: %d, ely penance: %d", monster->hit_points, ely_penance);
snprintf(info, INFO_SIZE, "%s heals %s%s",
god_name(god, false).c_str(),