diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-04-21 16:01:17 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-04-21 16:01:17 +0200 |
commit | 30de546be99096a9092a377691a47ccbcbaa60eb (patch) | |
tree | f64b440b59fbd252562efd02d5d0a8dc872a65e8 /crawl-ref/source/los.cc | |
parent | 846770870d30581284157885f21080bddaede2ba (diff) | |
download | crawl-ref-30de546be99096a9092a377691a47ccbcbaa60eb.tar.gz crawl-ref-30de546be99096a9092a377691a47ccbcbaa60eb.zip |
dprf()ize a number of #ifdef ... mprf(MSGCH_DIAGNOSTICS).
There's no cost for costly functions like name() anymore -- but remember,
if a dprf() had a side effect before, it did happen, but now it won't outside
of debug builds.
I skipped anything even remotely related to combat code, to avoid making
the combat overhaul merge any worse.
Diffstat (limited to 'crawl-ref/source/los.cc')
-rw-r--r-- | crawl-ref/source/los.cc | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/crawl-ref/source/los.cc b/crawl-ref/source/los.cc index 1f6158005d..a01ce471d5 100644 --- a/crawl-ref/source/los.cc +++ b/crawl-ref/source/los.cc @@ -175,11 +175,8 @@ struct los_ray : public ray_def old = c; if (!copy.advance()) { -//#ifdef DEBUG_DIAGNOSTICS -// mprf(MSGCH_DIAGNOSTICS, -// "discarding corner ray (%f,%f) + t*(%f,%f)", +// dprf("discarding corner ray (%f,%f) + t*(%f,%f)", // r.start.x, r.start.y, r.dir.x, r.dir.y); -//#endif cs.clear(); break; } @@ -449,10 +446,8 @@ static void _create_blockrays() dead_rays = new bit_array(n_min_rays); smoke_rays = new bit_array(n_min_rays); -#ifdef DEBUG_DIAGNOSTICS - mprf(MSGCH_DIAGNOSTICS, "Cellrays: %d Fullrays: %u Minimal cellrays: %u", + dprf("Cellrays: %d Fullrays: %u Minimal cellrays: %u", n_cellrays, fullrays.size(), n_min_rays); -#endif } static int _gcd(int x, int y) @@ -583,11 +578,8 @@ static bool _find_ray_se(const coord_def& target, ray_def& ray, cellray c = min[0]; // XXX: const cellray &c ? unsigned int index = 0; -#ifdef DEBUG_DIAGNOSTICS if (cycle) - mprf(MSGCH_DIAGNOSTICS, "cycling from %d (total %d)", - ray.cycle_idx, min.size()); -#endif + dprf("cycling from %d (total %d)", ray.cycle_idx, min.size()); unsigned int start = cycle ? ray.cycle_idx + 1 : 0; ASSERT(start <= min.size()); |