Apply paxed's DEBUG patch to remove DEBUG/D_DEBUG.
Move debugging output into couple preprocessor defines, which
are no-op without DEBUG. To show debugging output from a
certain source files, use sysconf:
DEBUGFILES=dungeon.c questpgr.c
Also fix couple debug lines which did not compile.
This also includes fixes due to Derek Ray to depugpline to work better
on other platforms.
This commit is contained in:
11
src/sp_lev.c
11
src/sp_lev.c
@@ -12,11 +12,6 @@
|
||||
|
||||
#include "hack.h"
|
||||
#include "dlb.h"
|
||||
/* #define DEBUG */ /* uncomment to enable code debugging */
|
||||
|
||||
#ifdef DEBUG
|
||||
#define debugpline if (wizard) pline
|
||||
#endif
|
||||
|
||||
#include "sp_lev.h"
|
||||
|
||||
@@ -329,10 +324,8 @@ chk:
|
||||
lev = &levl[x][y];
|
||||
for (; y <= ymax; y++) {
|
||||
if (lev++->typ) {
|
||||
#ifdef DEBUG
|
||||
if(!vault)
|
||||
debugpline("strange area [%d,%d] in check_room.",x,y);
|
||||
#endif
|
||||
if (!rn2(3)) return FALSE;
|
||||
if (x < *lowx)
|
||||
*lowx = x + xlim + 1;
|
||||
@@ -405,9 +398,7 @@ xchar rtype, rlit;
|
||||
r1 = rnd_rect(); /* Get a random rectangle */
|
||||
|
||||
if (!r1) { /* No more free rectangles ! */
|
||||
#ifdef DEBUG
|
||||
debugpline("No more rects...");
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
hx = r1->hx;
|
||||
@@ -1320,10 +1311,8 @@ schar ftyp, btyp;
|
||||
if (xx <= 0 || yy <= 0 || tx <= 0 || ty <= 0 ||
|
||||
xx > COLNO-1 || tx > COLNO-1 ||
|
||||
yy > ROWNO-1 || ty > ROWNO-1) {
|
||||
#ifdef DEBUG
|
||||
debugpline("dig_corridor: bad coords : (%d,%d) (%d,%d).",
|
||||
xx,yy,tx,ty);
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
if (tx > xx) dx = 1;
|
||||
|
||||
Reference in New Issue
Block a user