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/mklev.c
11
src/mklev.c
@@ -4,11 +4,6 @@
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include "hack.h"
|
||||
/* #define DEBUG */ /* uncomment to enable code debugging */
|
||||
|
||||
#ifdef DEBUG
|
||||
#define debugpline if (wizard) pline
|
||||
#endif
|
||||
|
||||
/* for UNIX, Rand #def'd to (long)lrand48() or (long)random() */
|
||||
/* croom->lx etc are schar (width <= int), so % arith ensures that */
|
||||
@@ -689,9 +684,7 @@ makelevel()
|
||||
/* make a secret treasure vault, not connected to the rest */
|
||||
if(do_vault()) {
|
||||
xchar w,h;
|
||||
#ifdef DEBUG
|
||||
debugpline("trying to make a vault...");
|
||||
#endif
|
||||
w = 1;
|
||||
h = 1;
|
||||
if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) {
|
||||
@@ -1567,9 +1560,7 @@ xchar x, y;
|
||||
*source = u.uz;
|
||||
insert_branch(br, TRUE);
|
||||
|
||||
#ifdef DEBUG
|
||||
pline("Made knox portal.");
|
||||
#endif
|
||||
debugpline("Made knox portal.");
|
||||
place_branch(br, x, y);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user