Make WIZARD unconditional.

This commit is contained in:
Sean Hunt
2015-02-27 19:33:22 -05:00
parent ad82ca80f3
commit 4f59f5c6fd
62 changed files with 42 additions and 493 deletions
+4 -8
View File
@@ -172,16 +172,12 @@
* GDBPATH (the path to the system gdb(1) program) * GDBPATH (the path to the system gdb(1) program)
*/ */
#ifndef WIZARD /* allow for compile-time or Makefile changes */ #ifndef WIZARD_NAME /* allow for compile-time or Makefile changes */
# ifndef KR1ED # define WIZARD_NAME "wizard"
# define WIZARD "wizard" /* the person allowed to use the -D option */ #endif
/* #define SYSCF */ /* use a global configuration */ /* #define SYSCF */ /* use a global configuration */
/* #define SYSCF_FILE "sysconf" */ /* global configuration is in a file */ /* #define SYSCF_FILE "sysconf" */ /* global configuration is in a file */
# else
# define WIZARD
# define WIZARD_NAME "wizard"
# endif
#endif
#ifndef GDBPATH #ifndef GDBPATH
# define GDBPATH "/usr/bin/gdb" # define GDBPATH "/usr/bin/gdb"
-2
View File
@@ -151,9 +151,7 @@ E NEARDATA struct sinfo {
#ifdef PANICLOG #ifdef PANICLOG
int in_paniclog; int in_paniclog;
#endif #endif
#ifdef WIZARD
int wizkit_wishing; int wizkit_wishing;
#endif
} program_state; } program_state;
E boolean restoring; E boolean restoring;
+1 -21
View File
@@ -172,7 +172,6 @@ E int NDECL(domonability);
E int NDECL(doprev_message); E int NDECL(doprev_message);
E int NDECL(timed_occupation); E int NDECL(timed_occupation);
E int NDECL(doattributes); E int NDECL(doattributes);
# ifdef WIZARD
E int NDECL(wiz_detect); E int NDECL(wiz_detect);
E int NDECL(wiz_genesis); E int NDECL(wiz_genesis);
E int NDECL(wiz_identify); E int NDECL(wiz_identify);
@@ -180,7 +179,6 @@ E int NDECL(wiz_level_tele);
E int NDECL(wiz_map); E int NDECL(wiz_map);
E int NDECL(wiz_where); E int NDECL(wiz_where);
E int NDECL(wiz_wish); E int NDECL(wiz_wish);
# endif /* WIZARD */
#endif /* USE_TRAMPOLI */ #endif /* USE_TRAMPOLI */
E void NDECL(reset_occupations); E void NDECL(reset_occupations);
E void FDECL(set_occupation, (int (*)(void),const char *,int)); E void FDECL(set_occupation, (int (*)(void),const char *,int));
@@ -189,9 +187,7 @@ E char NDECL(pgetchar);
E void FDECL(pushch, (CHAR_P)); E void FDECL(pushch, (CHAR_P));
E void FDECL(savech, (CHAR_P)); E void FDECL(savech, (CHAR_P));
#endif #endif
#ifdef WIZARD
E void NDECL(add_debug_extended_commands); E void NDECL(add_debug_extended_commands);
#endif /* WIZARD */
E void FDECL(reset_commands, (BOOLEAN_P)); E void FDECL(reset_commands, (BOOLEAN_P));
E void FDECL(rhack, (char *)); E void FDECL(rhack, (char *));
E int NDECL(doextlist); E int NDECL(doextlist);
@@ -215,9 +211,7 @@ E void FDECL(hangup, (int));
E void NDECL(end_of_input); E void NDECL(end_of_input);
#endif #endif
E char NDECL(readchar); E char NDECL(readchar);
#ifdef WIZARD
E void NDECL(sanity_check); E void NDECL(sanity_check);
#endif
E char FDECL(yn_function, (const char *, const char *, CHAR_P)); E char FDECL(yn_function, (const char *, const char *, CHAR_P));
E boolean FDECL(paranoid_query, (BOOLEAN_P,const char *)); E boolean FDECL(paranoid_query, (BOOLEAN_P,const char *));
@@ -578,9 +572,7 @@ E int FDECL(induced_align, (int));
E boolean FDECL(Invocation_lev, (d_level *)); E boolean FDECL(Invocation_lev, (d_level *));
E xchar NDECL(level_difficulty); E xchar NDECL(level_difficulty);
E schar FDECL(lev_by_name, (const char *)); E schar FDECL(lev_by_name, (const char *));
#ifdef WIZARD
E schar FDECL(print_dungeon, (BOOLEAN_P,schar *,xchar *)); E schar FDECL(print_dungeon, (BOOLEAN_P,schar *,xchar *));
#endif
E int NDECL(donamelevel); E int NDECL(donamelevel);
E int NDECL(dooverview); E int NDECL(dooverview);
E void FDECL(show_overview, (int,int)); E void FDECL(show_overview, (int,int));
@@ -726,7 +718,7 @@ E void FDECL(set_savefile_name, (BOOLEAN_P));
#ifdef INSURANCE #ifdef INSURANCE
E void FDECL(save_savefile_name, (int)); E void FDECL(save_savefile_name, (int));
#endif #endif
#if defined(WIZARD) && !defined(MICRO) #ifndef MICRO
E void NDECL(set_error_savefile); E void NDECL(set_error_savefile);
#endif #endif
E int NDECL(create_savefile); E int NDECL(create_savefile);
@@ -742,9 +734,7 @@ E boolean FDECL(can_read_file, (const char *));
#endif #endif
E boolean FDECL(read_config_file, (const char *, int)); E boolean FDECL(read_config_file, (const char *, int));
E void FDECL(check_recordfile, (const char *)); E void FDECL(check_recordfile, (const char *));
#if defined(WIZARD)
E void NDECL(read_wizkit); E void NDECL(read_wizkit);
#endif
#ifdef LOADSYMSETS #ifdef LOADSYMSETS
E int FDECL(read_sym_file, (int)); E int FDECL(read_sym_file, (int));
E int FDECL(parse_sym_line, (char *,int)); E int FDECL(parse_sym_line, (char *,int));
@@ -987,9 +977,7 @@ E void FDECL(obj_adjust_light_radius, (struct obj *,int));
E int FDECL(candle_light_range, (struct obj *)); E int FDECL(candle_light_range, (struct obj *));
E int FDECL(arti_light_radius, (struct obj *)); E int FDECL(arti_light_radius, (struct obj *));
E const char *FDECL(arti_light_description, (struct obj *)); E const char *FDECL(arti_light_description, (struct obj *));
#ifdef WIZARD
E int NDECL(wiz_light_sources); E int NDECL(wiz_light_sources);
#endif
/* ### lock.c ### */ /* ### lock.c ### */
@@ -1260,9 +1248,7 @@ E void FDECL(dealloc_obj, (struct obj *));
E void FDECL(obj_ice_effects, (int, int, BOOLEAN_P)); E void FDECL(obj_ice_effects, (int, int, BOOLEAN_P));
E long FDECL(peek_at_iced_corpse_age, (struct obj *)); E long FDECL(peek_at_iced_corpse_age, (struct obj *));
E int FDECL(hornoplenty, (struct obj *,BOOLEAN_P)); E int FDECL(hornoplenty, (struct obj *,BOOLEAN_P));
#ifdef WIZARD
E void NDECL(obj_sanity_check); E void NDECL(obj_sanity_check);
#endif
/* ### mkroom.c ### */ /* ### mkroom.c ### */
@@ -1896,9 +1882,7 @@ E void FDECL(do_genocide, (int));
E void FDECL(punish, (struct obj *)); E void FDECL(punish, (struct obj *));
E void NDECL(unpunish); E void NDECL(unpunish);
E boolean FDECL(cant_revive, (int *,BOOLEAN_P,struct obj *)); E boolean FDECL(cant_revive, (int *,BOOLEAN_P,struct obj *));
#ifdef WIZARD
E boolean NDECL(create_particular); E boolean NDECL(create_particular);
#endif
/* ### rect.c ### */ /* ### rect.c ### */
@@ -2000,9 +1984,7 @@ E void FDECL(outoracle, (BOOLEAN_P, BOOLEAN_P));
E void FDECL(save_oracles, (int,int)); E void FDECL(save_oracles, (int,int));
E void FDECL(restore_oracles, (int)); E void FDECL(restore_oracles, (int));
E int FDECL(doconsult, (struct monst *)); E int FDECL(doconsult, (struct monst *));
#ifdef WIZARD
E void NDECL(rumor_check); E void NDECL(rumor_check);
#endif
/* ### save.c ### */ /* ### save.c ### */
@@ -2263,10 +2245,8 @@ E boolean FDECL(obj_is_local, (struct obj *));
E void FDECL(save_timers, (int,int,int)); E void FDECL(save_timers, (int,int,int));
E void FDECL(restore_timers, (int,int,BOOLEAN_P,long)); E void FDECL(restore_timers, (int,int,BOOLEAN_P,long));
E void FDECL(relink_timers, (BOOLEAN_P)); E void FDECL(relink_timers, (BOOLEAN_P));
#ifdef WIZARD
E int NDECL(wiz_timeout_queue); E int NDECL(wiz_timeout_queue);
E void NDECL(timer_sanity_check); E void NDECL(timer_sanity_check);
#endif
/* ### topten.c ### */ /* ### topten.c ### */
-2
View File
@@ -174,10 +174,8 @@ struct instance_flags {
coord travelcc; /* coordinates for travel_cache */ coord travelcc; /* coordinates for travel_cache */
boolean window_inited; /* true if init_nhwindows() completed */ boolean window_inited; /* true if init_nhwindows() completed */
boolean vision_inited; /* true if vision is ready */ boolean vision_inited; /* true if vision is ready */
#ifdef WIZARD
boolean sanity_check; /* run sanity checks */ boolean sanity_check; /* run sanity checks */
boolean mon_polycontrol; /* debug: control monster polymorphs */ boolean mon_polycontrol; /* debug: control monster polymorphs */
#endif
/* stuff that is related to options and/or user or platform preferences */ /* stuff that is related to options and/or user or platform preferences */
unsigned msg_history; /* hint: # of top lines to save */ unsigned msg_history; /* hint: # of top lines to save */
int menu_headings; /* ATR for menu headings */ int menu_headings; /* ATR for menu headings */
-2
View File
@@ -28,7 +28,6 @@
#define doprev_message() doprev_message_() #define doprev_message() doprev_message_()
#define timed_occupation() timed_occupation_() #define timed_occupation() timed_occupation_()
#define wiz_attributes() wiz_attributes_() #define wiz_attributes() wiz_attributes_()
#ifdef WIZARD
#define wiz_detect() wiz_detect_() #define wiz_detect() wiz_detect_()
#define wiz_genesis() wiz_genesis_() #define wiz_genesis() wiz_genesis_()
#define wiz_identify() wiz_identify_() #define wiz_identify() wiz_identify_()
@@ -36,7 +35,6 @@
#define wiz_map() wiz_map_() #define wiz_map() wiz_map_()
#define wiz_where() wiz_where_() #define wiz_where() wiz_where_()
#define wiz_wish() wiz_wish_() #define wiz_wish() wiz_wish_()
#endif
/* ### display.c ### */ /* ### display.c ### */
#define doredraw() doredraw_() #define doredraw() doredraw_()
+1 -10
View File
@@ -30,20 +30,11 @@
#ifdef HACKDIR #ifdef HACKDIR
# undef HACKDIR # undef HACKDIR
#endif #endif
#ifdef WIZARD
# undef WIZARD
#endif
#ifdef WIZARD_NAME #ifdef WIZARD_NAME
# undef WIZARD_NAME # undef WIZARD_NAME
#endif #endif
#define HACKDIR Local_HACKDIR #define HACKDIR Local_HACKDIR
#ifndef KR1ED #define WIZARD_NAME Local_WIZARD
# define WIZARD Local_WIZARD
# define WIZARD_NAME WIZARD
#else
# define WIZARD 1
# define WIZARD_NAME Local_WIZARD
#endif
#ifndef SYSCF #ifndef SYSCF
# define SYSCF # define SYSCF
#endif #endif
-6
View File
@@ -35,9 +35,7 @@ boolean resuming;
monstr_init(); /* monster strengths */ monstr_init(); /* monster strengths */
objects_init(); objects_init();
#ifdef WIZARD
if (wizard) add_debug_extended_commands(); if (wizard) add_debug_extended_commands();
#endif
/* if a save file created in normal mode is now being restored in /* if a save file created in normal mode is now being restored in
explore mode, treat it as normal restore followed by 'X' command explore mode, treat it as normal restore followed by 'X' command
@@ -384,10 +382,8 @@ boolean resuming;
continue; continue;
} }
#ifdef WIZARD
if (iflags.sanity_check) if (iflags.sanity_check)
sanity_check(); sanity_check();
#endif
#ifdef CLIPPING #ifdef CLIPPING
/* just before rhack */ /* just before rhack */
@@ -525,9 +521,7 @@ newgame()
mklev(); mklev();
u_on_upstairs(); u_on_upstairs();
#ifdef WIZARD
if (wizard) obj_delivery(FALSE); /* finish wizkit */ if (wizard) obj_delivery(FALSE); /* finish wizkit */
#endif
vision_reset(); /* set up internals for level (after mklev) */ vision_reset(); /* set up internals for level (after mklev) */
check_special_room(FALSE); check_special_room(FALSE);
-2
View File
@@ -698,7 +698,6 @@ int propidx; /* special cases can have negative values */
/* /*
* Restrict the source of the attributes just to debug mode for now * Restrict the source of the attributes just to debug mode for now
*/ */
#ifdef WIZARD
if (wizard) { if (wizard) {
static NEARDATA const char because_of[] = " because of %s"; static NEARDATA const char because_of[] = " because of %s";
@@ -745,7 +744,6 @@ int propidx; /* special cases can have negative values */
} }
} /*wizard*/ } /*wizard*/
#endif
return buf; return buf;
} }
+2 -23
View File
@@ -312,10 +312,7 @@ can_make_bones()
if(depth(&u.uz) <= 0 || /* bulletproofing for endgame */ if(depth(&u.uz) <= 0 || /* bulletproofing for endgame */
(!rn2(1 + (depth(&u.uz)>>2)) /* fewer ghosts on low levels */ (!rn2(1 + (depth(&u.uz)>>2)) /* fewer ghosts on low levels */
#ifdef WIZARD && !wizard)) return FALSE;
&& !wizard
#endif
)) return FALSE;
/* don't let multiple restarts generate multiple copies of objects /* don't let multiple restarts generate multiple copies of objects
* in bones files */ * in bones files */
if (discover) return FALSE; if (discover) return FALSE;
@@ -344,23 +341,19 @@ struct obj *corpse;
fd = open_bonesfile(&u.uz, &bonesid); fd = open_bonesfile(&u.uz, &bonesid);
if (fd >= 0) { if (fd >= 0) {
(void) close(fd); (void) close(fd);
#ifdef WIZARD
if (wizard) { if (wizard) {
if (yn("Bones file already exists. Replace it?") == 'y') { if (yn("Bones file already exists. Replace it?") == 'y') {
if (delete_bonesfile(&u.uz)) goto make_bones; if (delete_bonesfile(&u.uz)) goto make_bones;
else pline("Cannot unlink old bones."); else pline("Cannot unlink old bones.");
} }
} }
#endif
/* compression can change the file's name, so must /* compression can change the file's name, so must
wait until after any attempt to delete this file */ wait until after any attempt to delete this file */
compress_bonesfile(); compress_bonesfile();
return; return;
} }
#ifdef WIZARD
make_bones: make_bones:
#endif
unleash_all(); unleash_all();
/* in case these characters are not in their home bases */ /* in case these characters are not in their home bases */
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
@@ -488,10 +481,8 @@ struct obj *corpse;
fd = create_bonesfile(&u.uz, &bonesid, whynot); fd = create_bonesfile(&u.uz, &bonesid, whynot);
if(fd < 0) { if(fd < 0) {
#ifdef WIZARD
if(wizard) if(wizard)
pline1(whynot); pline1(whynot);
#endif
/* bones file creation problems are silent to the player. /* bones file creation problems are silent to the player.
* Keep it that way, but place a clue into the paniclog. * Keep it that way, but place a clue into the paniclog.
*/ */
@@ -520,10 +511,8 @@ struct obj *corpse;
savefruitchn(fd, COUNT_SAVE); savefruitchn(fd, COUNT_SAVE);
bflush(fd); bflush(fd);
if (bytes_counted > freediskspace(bones)) { /* not enough room */ if (bytes_counted > freediskspace(bones)) { /* not enough room */
# ifdef WIZARD
if (wizard) if (wizard)
pline("Insufficient space to create bones file."); pline("Insufficient space to create bones file.");
# endif
(void) close(fd); (void) close(fd);
cancel_bonesfile(); cancel_bonesfile();
return; return;
@@ -556,23 +545,18 @@ getbones()
/* wizard check added by GAN 02/05/87 */ /* wizard check added by GAN 02/05/87 */
if(rn2(3) /* only once in three times do we find bones */ if(rn2(3) /* only once in three times do we find bones */
#ifdef WIZARD
&& !wizard && !wizard
#endif
) return(0); ) return(0);
if(no_bones_level(&u.uz)) return(0); if(no_bones_level(&u.uz)) return(0);
fd = open_bonesfile(&u.uz, &bonesid); fd = open_bonesfile(&u.uz, &bonesid);
if (fd < 0) return(0); if (fd < 0) return(0);
if (validate(fd, bones) != 0) { if (validate(fd, bones) != 0) {
#ifdef WIZARD
if (!wizard) if (!wizard)
#endif
pline("Discarding unuseable bones; no need to panic..."); pline("Discarding unuseable bones; no need to panic...");
ok = FALSE; ok = FALSE;
} else { } else {
ok = TRUE; ok = TRUE;
#ifdef WIZARD
if(wizard) { if(wizard) {
if(yn("Get bones?") == 'n') { if(yn("Get bones?") == 'n') {
(void) close(fd); (void) close(fd);
@@ -580,7 +564,6 @@ getbones()
return(0); return(0);
} }
} }
#endif
mread(fd, (genericptr_t) &c, sizeof c); /* length incl. '\0' */ mread(fd, (genericptr_t) &c, sizeof c); /* length incl. '\0' */
mread(fd, (genericptr_t) oldbonesid, (unsigned) c); /* DD.nnn */ mread(fd, (genericptr_t) oldbonesid, (unsigned) c); /* DD.nnn */
if (strcmp(bonesid, oldbonesid) != 0) { if (strcmp(bonesid, oldbonesid) != 0) {
@@ -588,12 +571,10 @@ getbones()
Sprintf(errbuf, "This is bones level '%s', not '%s'!", Sprintf(errbuf, "This is bones level '%s', not '%s'!",
oldbonesid, bonesid); oldbonesid, bonesid);
#ifdef WIZARD
if (wizard) { if (wizard) {
pline1(errbuf); pline1(errbuf);
ok = FALSE; /* won't die of trickery */ ok = FALSE; /* won't die of trickery */
} }
#endif
trickery(errbuf); trickery(errbuf);
} else { } else {
register struct monst *mtmp; register struct monst *mtmp;
@@ -610,7 +591,7 @@ getbones()
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) { for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if (has_mname(mtmp)) sanitize_name(MNAME(mtmp)); if (has_mname(mtmp)) sanitize_name(MNAME(mtmp));
if (mtmp->mhpmax == DEFUNCT_MONSTER) { if (mtmp->mhpmax == DEFUNCT_MONSTER) {
#if defined(DEBUG) && defined(WIZARD) #if defined(DEBUG)
if (wizard) if (wizard)
pline("Removing defunct monster %s from bones.", pline("Removing defunct monster %s from bones.",
mtmp->data->mname); mtmp->data->mname);
@@ -627,14 +608,12 @@ getbones()
(void) close(fd); (void) close(fd);
sanitize_engravings(); sanitize_engravings();
#ifdef WIZARD
if(wizard) { if(wizard) {
if(yn("Unlink bones?") == 'n') { if(yn("Unlink bones?") == 'n') {
compress_bonesfile(); compress_bonesfile();
return(ok); return(ok);
} }
} }
#endif
if (!delete_bonesfile(&u.uz)) { if (!delete_bonesfile(&u.uz)) {
/* When N games try to simultaneously restore the same /* When N games try to simultaneously restore the same
* bones file, N-1 of them will fail to delete it * bones file, N-1 of them will fail to delete it
+3 -59
View File
@@ -126,7 +126,6 @@ STATIC_PTR int NDECL(domonability);
STATIC_PTR int NDECL(dooverview_or_wiz_where); STATIC_PTR int NDECL(dooverview_or_wiz_where);
STATIC_PTR int NDECL(dotravel); STATIC_PTR int NDECL(dotravel);
STATIC_PTR int NDECL(doterrain); STATIC_PTR int NDECL(doterrain);
# ifdef WIZARD
STATIC_PTR int NDECL(wiz_wish); STATIC_PTR int NDECL(wiz_wish);
STATIC_PTR int NDECL(wiz_identify); STATIC_PTR int NDECL(wiz_identify);
STATIC_PTR int NDECL(wiz_map); STATIC_PTR int NDECL(wiz_map);
@@ -164,7 +163,6 @@ STATIC_DCL int NDECL(wiz_port_debug);
# endif # endif
STATIC_PTR int NDECL(wiz_rumor_check); STATIC_PTR int NDECL(wiz_rumor_check);
STATIC_DCL char FDECL(cmd_from_func, (int NDECL((*)))); STATIC_DCL char FDECL(cmd_from_func, (int NDECL((*))));
# endif /* WIZARD */
STATIC_PTR int NDECL(doattributes); STATIC_PTR int NDECL(doattributes);
STATIC_PTR int NDECL(doconduct); /**/ STATIC_PTR int NDECL(doconduct); /**/
@@ -514,9 +512,7 @@ int
enter_explore_mode(VOID_ARGS) enter_explore_mode(VOID_ARGS)
{ {
if (wizard) { if (wizard) {
#ifdef WIZARD
You("are in debug mode."); You("are in debug mode.");
#endif
} else if (discover) { } else if (discover) {
You("are already in explore mode."); You("are already in explore mode.");
} else { } else {
@@ -538,16 +534,11 @@ enter_explore_mode(VOID_ARGS)
STATIC_PTR int STATIC_PTR int
dooverview_or_wiz_where(VOID_ARGS) dooverview_or_wiz_where(VOID_ARGS)
{ {
#ifdef WIZARD
if (wizard) return wiz_where(); if (wizard) return wiz_where();
else else dooverview();
#endif
dooverview();
return 0; return 0;
} }
#ifdef WIZARD
/* ^W command - wish for something */ /* ^W command - wish for something */
STATIC_PTR int STATIC_PTR int
wiz_wish(VOID_ARGS) /* Unlimited wishes for debug mode by Paul Polderman */ wiz_wish(VOID_ARGS) /* Unlimited wishes for debug mode by Paul Polderman */
@@ -1063,7 +1054,6 @@ wiz_rumor_check(VOID_ARGS)
rumor_check(); rumor_check();
return 0; return 0;
} }
#endif /* WIZARD */
/* #terrain command */ /* #terrain command */
STATIC_PTR int STATIC_PTR int
@@ -1091,7 +1081,6 @@ doterrain(VOID_ARGS)
add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE, add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE,
"full map without monsters, objects, and traps", "full map without monsters, objects, and traps",
MENU_UNSELECTED); MENU_UNSELECTED);
#ifdef WIZARD
if (wizard) { if (wizard) {
any.a_int = 3; any.a_int = 3;
add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE, add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE,
@@ -1102,7 +1091,6 @@ doterrain(VOID_ARGS)
"legend of base-36 levl[][].typ codes", "legend of base-36 levl[][].typ codes",
MENU_UNSELECTED); MENU_UNSELECTED);
} }
#endif
end_menu(men, "View which?"); end_menu(men, "View which?");
n = select_menu(men, PICK_ONE, &sel); n = select_menu(men, PICK_ONE, &sel);
@@ -1121,10 +1109,8 @@ doterrain(VOID_ARGS)
switch (which) { switch (which) {
case 1: reveal_terrain(FALSE); break; /* known map */ case 1: reveal_terrain(FALSE); break; /* known map */
case 2: reveal_terrain(TRUE); break; /* full map */ case 2: reveal_terrain(TRUE); break; /* full map */
#ifdef WIZARD
case 3: wiz_map_levltyp(); break; /* map internals */ case 3: wiz_map_levltyp(); break; /* map internals */
case 4: wiz_levltyp_legend(); break; /* internal details */ case 4: wiz_levltyp_legend(); break; /* internal details */
#endif
default: break; default: break;
} }
return 0; /* no time elapses */ return 0; /* no time elapses */
@@ -1584,9 +1570,7 @@ int final;
you_are("buried", ""); you_are("buried", "");
} else { } else {
Strcpy(buf, "being strangled"); Strcpy(buf, "being strangled");
#ifdef WIZARD
if (wizard) Sprintf(eos(buf), " (%ld)", (Strangled & TIMEOUT)); if (wizard) Sprintf(eos(buf), " (%ld)", (Strangled & TIMEOUT));
#endif
you_are(buf, from_what(STRANGLED)); you_are(buf, from_what(STRANGLED));
} }
} }
@@ -1639,9 +1623,7 @@ int final;
} /* (u.utrap) */ } /* (u.utrap) */
if (u.uswallow) { if (u.uswallow) {
Sprintf(buf, "swallowed by %s", a_monnam(u.ustuck)); Sprintf(buf, "swallowed by %s", a_monnam(u.ustuck));
#ifdef WIZARD
if (wizard) Sprintf(eos(buf), " (%u)", u.uswldtim); if (wizard) Sprintf(eos(buf), " (%u)", u.uswldtim);
#endif
you_are(buf, ""); you_are(buf, "");
} else if (u.ustuck) { } else if (u.ustuck) {
Sprintf(buf, "%s %s", Sprintf(buf, "%s %s",
@@ -1662,13 +1644,11 @@ int final;
/* when mounted, Wounded_legs applies to steed rather than to /* when mounted, Wounded_legs applies to steed rather than to
hero; we only report steed's wounded legs in wizard mode */ hero; we only report steed's wounded legs in wizard mode */
if (u.usteed) { /* not `Riding' here */ if (u.usteed) { /* not `Riding' here */
# ifdef WIZARD
if (wizard) { if (wizard) {
Strcpy(buf, steedname); Strcpy(buf, steedname);
*buf = highc(*buf); *buf = highc(*buf);
enl_msg(buf, " has", " had", " wounded legs", ""); enl_msg(buf, " has", " had", " wounded legs", "");
} }
# endif
} else { } else {
Sprintf(buf, "wounded %s", makeplural(body_part(LEG))); Sprintf(buf, "wounded %s", makeplural(body_part(LEG)));
you_have(buf, ""); you_have(buf, "");
@@ -1685,9 +1665,7 @@ int final;
if (Sleepy) { if (Sleepy) {
if (magic || cause_known(SLEEPY)) { if (magic || cause_known(SLEEPY)) {
Strcpy(buf, from_what(SLEEPY)); Strcpy(buf, from_what(SLEEPY));
#ifdef WIZARD
if (wizard) Sprintf(eos(buf), " (%ld)", (HSleepy & TIMEOUT)); if (wizard) Sprintf(eos(buf), " (%ld)", (HSleepy & TIMEOUT));
#endif
enl_msg("You ", "fall", "fell", " asleep uncontrollably", buf); enl_msg("You ", "fall", "fell", " asleep uncontrollably", buf);
} }
} }
@@ -1788,12 +1766,10 @@ int final;
else if (u.ualign.record >= -3) you_have("strayed",""); else if (u.ualign.record >= -3) you_have("strayed","");
else if (u.ualign.record >= -8) you_have("sinned",""); else if (u.ualign.record >= -8) you_have("sinned","");
else you_have("transgressed",""); else you_have("transgressed","");
#ifdef WIZARD
if (wizard) { if (wizard) {
Sprintf(buf, " %d", u.ualign.record); Sprintf(buf, " %d", u.ualign.record);
enl_msg("Your alignment ", "is", "was", buf, ""); enl_msg("Your alignment ", "is", "was", buf, "");
} }
#endif
/*** Resistances to troubles ***/ /*** Resistances to troubles ***/
if (Invulnerable) you_are("invulnerable",from_what(INVULNERABLE)); if (Invulnerable) you_are("invulnerable",from_what(INVULNERABLE));
@@ -1977,9 +1953,7 @@ int final;
if (Upolyd) { if (Upolyd) {
if (u.umonnum == u.ulycn) Strcpy(buf, "in beast form"); if (u.umonnum == u.ulycn) Strcpy(buf, "in beast form");
else Sprintf(buf, "polymorphed into %s", an(youmonst.data->mname)); else Sprintf(buf, "polymorphed into %s", an(youmonst.data->mname));
#ifdef WIZARD
if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone); if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone);
#endif
you_are(buf,""); you_are(buf,"");
if (lays_eggs(youmonst.data) && flags.female) if (lays_eggs(youmonst.data) && flags.female)
you_can("lay eggs", ""); you_can("lay eggs", "");
@@ -2000,14 +1974,9 @@ int final;
Sprintf(buf, "%s%slucky", Sprintf(buf, "%s%slucky",
ltmp >= 10 ? "extremely " : ltmp >= 5 ? "very " : "", ltmp >= 10 ? "extremely " : ltmp >= 5 ? "very " : "",
Luck < 0 ? "un" : ""); Luck < 0 ? "un" : "");
#ifdef WIZARD
if (wizard) Sprintf(eos(buf), " (%d)", Luck); if (wizard) Sprintf(eos(buf), " (%d)", Luck);
#endif
you_are(buf,""); you_are(buf,"");
} } else if (wizard) enl_msg("Your luck ", "is", "was", " zero","");
#ifdef WIZARD
else if (wizard) enl_msg("Your luck ", "is", "was", " zero","");
#endif
if (u.moreluck > 0) you_have("extra luck",""); if (u.moreluck > 0) you_have("extra luck","");
else if (u.moreluck < 0) you_have("reduced luck",""); else if (u.moreluck < 0) you_have("reduced luck","");
if (carrying(LUCKSTONE) || stone_luck(TRUE)) { if (carrying(LUCKSTONE) || stone_luck(TRUE)) {
@@ -2021,9 +1990,7 @@ int final;
if (u.ugangr) { if (u.ugangr) {
Sprintf(buf, " %sangry with you", Sprintf(buf, " %sangry with you",
u.ugangr > 6 ? "extremely " : u.ugangr > 3 ? "very " : ""); u.ugangr > 6 ? "extremely " : u.ugangr > 3 ? "very " : "");
#ifdef WIZARD
if (wizard) Sprintf(eos(buf), " (%d)", u.ugangr); if (wizard) Sprintf(eos(buf), " (%d)", u.ugangr);
#endif
enl_msg(u_gname(), " is", " was", buf,""); enl_msg(u_gname(), " is", " was", buf,"");
} else } else
/* /*
@@ -2039,9 +2006,7 @@ int final;
#else #else
Sprintf(buf, "%ssafely pray", can_pray(FALSE) ? "" : "not "); Sprintf(buf, "%ssafely pray", can_pray(FALSE) ? "" : "not ");
#endif #endif
#ifdef WIZARD
if (wizard) Sprintf(eos(buf), " (%d)", u.ublesscnt); if (wizard) Sprintf(eos(buf), " (%d)", u.ublesscnt);
#endif
you_can(buf,""); you_can(buf,"");
} }
if (wizard) { if (wizard) {
@@ -2301,25 +2266,21 @@ int final;
if (!u.uconduct.weaphit) if (!u.uconduct.weaphit)
you_have_never("hit with a wielded weapon"); you_have_never("hit with a wielded weapon");
#ifdef WIZARD
else if (wizard) { else if (wizard) {
Sprintf(buf, "used a wielded weapon %ld time%s", Sprintf(buf, "used a wielded weapon %ld time%s",
u.uconduct.weaphit, plur(u.uconduct.weaphit)); u.uconduct.weaphit, plur(u.uconduct.weaphit));
you_have_X(buf); you_have_X(buf);
} }
#endif
if (!u.uconduct.killer) if (!u.uconduct.killer)
you_have_been("a pacifist"); you_have_been("a pacifist");
if (!u.uconduct.literate) if (!u.uconduct.literate)
you_have_been("illiterate"); you_have_been("illiterate");
#ifdef WIZARD
else if (wizard) { else if (wizard) {
Sprintf(buf, "read items or engraved %ld time%s", Sprintf(buf, "read items or engraved %ld time%s",
u.uconduct.literate, plur(u.uconduct.literate)); u.uconduct.literate, plur(u.uconduct.literate));
you_have_X(buf); you_have_X(buf);
} }
#endif
ngenocided = num_genocides(); ngenocided = num_genocides();
if (ngenocided == 0) { if (ngenocided == 0) {
@@ -2332,23 +2293,19 @@ int final;
if (!u.uconduct.polypiles) if (!u.uconduct.polypiles)
you_have_never("polymorphed an object"); you_have_never("polymorphed an object");
#ifdef WIZARD
else if (wizard) { else if (wizard) {
Sprintf(buf, "polymorphed %ld item%s", Sprintf(buf, "polymorphed %ld item%s",
u.uconduct.polypiles, plur(u.uconduct.polypiles)); u.uconduct.polypiles, plur(u.uconduct.polypiles));
you_have_X(buf); you_have_X(buf);
} }
#endif
if (!u.uconduct.polyselfs) if (!u.uconduct.polyselfs)
you_have_never("changed form"); you_have_never("changed form");
#ifdef WIZARD
else if (wizard) { else if (wizard) {
Sprintf(buf, "changed form %ld time%s", Sprintf(buf, "changed form %ld time%s",
u.uconduct.polyselfs, plur(u.uconduct.polyselfs)); u.uconduct.polyselfs, plur(u.uconduct.polyselfs));
you_have_X(buf); you_have_X(buf);
} }
#endif
if (!u.uconduct.wishes) if (!u.uconduct.wishes)
you_have_X("used no wishes"); you_have_X("used no wishes");
@@ -2381,22 +2338,18 @@ int final;
static const struct func_tab cmdlist[] = { static const struct func_tab cmdlist[] = {
{C('d'), FALSE, dokick}, /* "D" is for door!...? Msg is in dokick.c */ {C('d'), FALSE, dokick}, /* "D" is for door!...? Msg is in dokick.c */
#ifdef WIZARD
{C('e'), TRUE, wiz_detect}, {C('e'), TRUE, wiz_detect},
{C('f'), TRUE, wiz_map}, {C('f'), TRUE, wiz_map},
{C('g'), TRUE, wiz_genesis}, {C('g'), TRUE, wiz_genesis},
{C('i'), TRUE, wiz_identify}, {C('i'), TRUE, wiz_identify},
#endif
{C('l'), TRUE, doredraw}, /* if number_pad is set */ {C('l'), TRUE, doredraw}, /* if number_pad is set */
{C('n'), TRUE, donamelevel}, /* if number_pad is set */ {C('n'), TRUE, donamelevel}, /* if number_pad is set */
{C('o'), TRUE, dooverview_or_wiz_where}, /* depending on wizard status */ {C('o'), TRUE, dooverview_or_wiz_where}, /* depending on wizard status */
{C('p'), TRUE, doprev_message}, {C('p'), TRUE, doprev_message},
{C('r'), TRUE, doredraw}, {C('r'), TRUE, doredraw},
{C('t'), TRUE, dotele}, {C('t'), TRUE, dotele},
#ifdef WIZARD
{C('v'), TRUE, wiz_level_tele}, {C('v'), TRUE, wiz_level_tele},
{C('w'), TRUE, wiz_wish}, {C('w'), TRUE, wiz_wish},
#endif
{C('x'), TRUE, doattributes}, {C('x'), TRUE, doattributes},
{C('z'), TRUE, dosuspend_core}, {C('z'), TRUE, dosuspend_core},
{'a', FALSE, doapply}, {'a', FALSE, doapply},
@@ -2532,7 +2485,6 @@ struct ext_func_tab extcmdlist[] = {
doextversion, TRUE}, doextversion, TRUE},
{"wipe", "wipe off your face", dowipe, FALSE}, {"wipe", "wipe off your face", dowipe, FALSE},
{"?", "get this list of extended commands", doextlist, TRUE}, {"?", "get this list of extended commands", doextlist, TRUE},
#if defined(WIZARD)
/* /*
* There must be a blank entry here for every entry in the table * There must be a blank entry here for every entry in the table
* below. * below.
@@ -2559,11 +2511,9 @@ struct ext_func_tab extcmdlist[] = {
#endif #endif
{(char *)0, (char *)0, donull, TRUE}, /* wizrumorcheck */ {(char *)0, (char *)0, donull, TRUE}, /* wizrumorcheck */
{(char *)0, (char *)0, donull, TRUE}, /* wmode */ {(char *)0, (char *)0, donull, TRUE}, /* wmode */
#endif
{(char *)0, (char *)0, donull, TRUE} /* sentinel */ {(char *)0, (char *)0, donull, TRUE} /* sentinel */
}; };
#ifdef WIZARD
/* there must be a placeholder in the table above for every entry here */ /* there must be a placeholder in the table above for every entry here */
static const struct ext_func_tab debug_extcmdlist[] = { static const struct ext_func_tab debug_extcmdlist[] = {
{"levelchange", "change experience level", wiz_level_change, TRUE}, {"levelchange", "change experience level", wiz_level_change, TRUE},
@@ -2882,8 +2832,6 @@ wiz_migrate_mons()
} }
#endif #endif
#endif /* WIZARD */
#define unctrl(c) ((c) <= C('z') ? (0x60 | (c)) : (c)) #define unctrl(c) ((c) <= C('z') ? (0x60 | (c)) : (c))
#define unmeta(c) (0x7f & (c)) #define unmeta(c) (0x7f & (c))
@@ -3371,11 +3319,7 @@ const char *msg;
sym = highc(sym); sym = highc(sym);
ctrl = (sym - 'A') + 1; ctrl = (sym - 'A') + 1;
if ((explain = dowhatdoes_core(ctrl, buf2)) if ((explain = dowhatdoes_core(ctrl, buf2))
&& (!index(wiz_only_list, sym) && (!index(wiz_only_list, sym) || wizard)) {
#ifdef WIZARD
|| wizard
#endif
)) {
Sprintf(buf, "Are you trying to use ^%c%s?", sym, Sprintf(buf, "Are you trying to use ^%c%s?", sym,
index(wiz_only_list, sym) ? "" : index(wiz_only_list, sym) ? "" :
" as specified in the Guidebook"); " as specified in the Guidebook");
-4
View File
@@ -1029,9 +1029,7 @@ boolean at_stairs, falling, portal;
newlevel->dlevel = dunlevs_in_dungeon(newlevel); newlevel->dlevel = dunlevs_in_dungeon(newlevel);
if (newdungeon && In_endgame(newlevel)) { /* 1st Endgame Level !!! */ if (newdungeon && In_endgame(newlevel)) { /* 1st Endgame Level !!! */
if (!u.uhave.amulet) return; /* must have the Amulet */ if (!u.uhave.amulet) return; /* must have the Amulet */
#ifdef WIZARD
if (!wizard) /* wizard ^V can bypass Earth level */ if (!wizard) /* wizard ^V can bypass Earth level */
#endif
assign_level(newlevel, &earth_level); /* (redundant) */ assign_level(newlevel, &earth_level); /* (redundant) */
} }
new_ledger = ledger_no(newlevel); new_ledger = ledger_no(newlevel);
@@ -1297,12 +1295,10 @@ boolean at_stairs, falling, portal;
mnexto(mtmp); mnexto(mtmp);
if ((mtmp = m_at(u.ux, u.uy)) != 0) { if ((mtmp = m_at(u.ux, u.uy)) != 0) {
#ifdef WIZARD
/* there was an unconditional impossible("mnearto failed") /* there was an unconditional impossible("mnearto failed")
here, but it's not impossible and we're prepared to cope here, but it's not impossible and we're prepared to cope
with the situation, so only say something when debugging */ with the situation, so only say something when debugging */
if (wizard) pline("(monster in hero's way)"); if (wizard) pline("(monster in hero's way)");
#endif
if (!rloc(mtmp, TRUE)) if (!rloc(mtmp, TRUE))
/* no room to move it; send it away, to return later */ /* no room to move it; send it away, to return later */
migrate_to_level(mtmp, ledger_no(&u.uz), migrate_to_level(mtmp, ledger_no(&u.uz),
+3 -19
View File
@@ -50,14 +50,12 @@ STATIC_DCL void FDECL(init_level, (int,int,struct proto_dungeon *));
STATIC_DCL int FDECL(possible_places, (int, boolean *, struct proto_dungeon *)); STATIC_DCL int FDECL(possible_places, (int, boolean *, struct proto_dungeon *));
STATIC_DCL xchar FDECL(pick_level, (boolean *, int)); STATIC_DCL xchar FDECL(pick_level, (boolean *, int));
STATIC_DCL boolean FDECL(place_level, (int, struct proto_dungeon *)); STATIC_DCL boolean FDECL(place_level, (int, struct proto_dungeon *));
#ifdef WIZARD
STATIC_DCL boolean FDECL(unplaced_floater, (struct dungeon *)); STATIC_DCL boolean FDECL(unplaced_floater, (struct dungeon *));
STATIC_DCL boolean FDECL(unreachable_level, (d_level *,BOOLEAN_P)); STATIC_DCL boolean FDECL(unreachable_level, (d_level *,BOOLEAN_P));
STATIC_DCL void FDECL(tport_menu, (winid,char *,struct lchoice *, STATIC_DCL void FDECL(tport_menu, (winid,char *,struct lchoice *,
d_level *,BOOLEAN_P)); d_level *,BOOLEAN_P));
STATIC_DCL const char *FDECL(br_string, (int)); STATIC_DCL const char *FDECL(br_string, (int));
STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lchoice *)); STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lchoice *));
#endif
mapseen *mapseenchn = (struct mapseen *)0; mapseen *mapseenchn = (struct mapseen *)0;
STATIC_DCL mapseen *FDECL(load_mapseen, (int)); STATIC_DCL mapseen *FDECL(load_mapseen, (int));
@@ -521,10 +519,7 @@ init_level(dgn, proto_index, pd)
struct tmplevel *tlevel = &pd->tmplevel[proto_index]; struct tmplevel *tlevel = &pd->tmplevel[proto_index];
pd->final_lev[proto_index] = (s_level *) 0; /* no "real" level */ pd->final_lev[proto_index] = (s_level *) 0; /* no "real" level */
#ifdef WIZARD if (!wizard && tlevel->chance <= rn2(100)) return;
if (!wizard)
#endif
if (tlevel->chance <= rn2(100)) return;
pd->final_lev[proto_index] = new_level = pd->final_lev[proto_index] = new_level =
(s_level *) alloc(sizeof(s_level)); (s_level *) alloc(sizeof(s_level));
@@ -742,10 +737,8 @@ init_dungeons() /* initialize the "dungeon" structs */
for (i = 0; i < n_dgns; i++) { for (i = 0; i < n_dgns; i++) {
Fread((genericptr_t)&pd.tmpdungeon[i], Fread((genericptr_t)&pd.tmpdungeon[i],
sizeof(struct tmpdungeon), 1, dgn_file); sizeof(struct tmpdungeon), 1, dgn_file);
#ifdef WIZARD if(!wizard && pd.tmpdungeon[i].chance
if(!wizard) && (pd.tmpdungeon[i].chance <= rn2(100))) {
#endif
if(pd.tmpdungeon[i].chance && (pd.tmpdungeon[i].chance <= rn2(100))) {
int j; int j;
/* skip over any levels or branches */ /* skip over any levels or branches */
@@ -1542,9 +1535,7 @@ const char *nam;
(u.uz.dnum == medusa_level.dnum && (u.uz.dnum == medusa_level.dnum &&
dlev.dnum == valley_level.dnum)) && dlev.dnum == valley_level.dnum)) &&
( /* either wizard mode or else seen and not forgotten */ ( /* either wizard mode or else seen and not forgotten */
#ifdef WIZARD
wizard || wizard ||
#endif
(level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED)) { (level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED)) {
lev = depth(&slev->dlevel); lev = depth(&slev->dlevel);
} }
@@ -1558,9 +1549,7 @@ const char *nam;
idxtoo = (idx >> 8) & 0x00FF; idxtoo = (idx >> 8) & 0x00FF;
idx &= 0x00FF; idx &= 0x00FF;
if ( /* either wizard mode, or else _both_ sides of branch seen */ if ( /* either wizard mode, or else _both_ sides of branch seen */
#ifdef WIZARD
wizard || wizard ||
#endif
((level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED && ((level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED &&
(level_info[idxtoo].flags & (FORGOTTEN|VISITED)) == VISITED)) { (level_info[idxtoo].flags & (FORGOTTEN|VISITED)) == VISITED)) {
if (ledger_to_dnum(idxtoo) == u.uz.dnum) idx = idxtoo; if (ledger_to_dnum(idxtoo) == u.uz.dnum) idx = idxtoo;
@@ -1573,8 +1562,6 @@ const char *nam;
return lev; return lev;
} }
#ifdef WIZARD
STATIC_OVL boolean STATIC_OVL boolean
unplaced_floater(dptr) unplaced_floater(dptr)
struct dungeon *dptr; struct dungeon *dptr;
@@ -1821,7 +1808,6 @@ xchar *rdgn;
destroy_nhwindow(win); destroy_nhwindow(win);
return 0; return 0;
} }
#endif /* WIZARD */
/* Record that the player knows about a branch from a level. This function /* Record that the player knows about a branch from a level. This function
* will determine whether or not it was a "real" branch that was taken. * will determine whether or not it was a "real" branch that was taken.
@@ -2560,7 +2546,6 @@ boolean printdun;
*/ */
Sprintf(buf, "%sLevel %d:", TAB, i); Sprintf(buf, "%sLevel %d:", TAB, i);
#ifdef WIZARD
/* wizmode prints out proto dungeon names for clarity */ /* wizmode prints out proto dungeon names for clarity */
if (wizard) { if (wizard) {
s_level *slev; s_level *slev;
@@ -2568,7 +2553,6 @@ boolean printdun;
if ((slev = Is_special(&mptr->lev)) != 0) if ((slev = Is_special(&mptr->lev)) != 0)
Sprintf(eos(buf), " [%s]", slev->proto); Sprintf(eos(buf), " [%s]", slev->proto);
} }
#endif
/* [perhaps print custom annotation on its own line when it's long] */ /* [perhaps print custom annotation on its own line when it's long] */
if (mptr->custom) if (mptr->custom)
Sprintf(eos(buf), " (%s)", mptr->custom); Sprintf(eos(buf), " (%s)", mptr->custom);
-4
View File
@@ -8,11 +8,7 @@
/* #define DEBUG */ /* uncomment to enable new eat code debugging */ /* #define DEBUG */ /* uncomment to enable new eat code debugging */
#ifdef DEBUG #ifdef DEBUG
# ifdef WIZARD
#define debugpline if (wizard) pline #define debugpline if (wizard) pline
# else
#define debugpline pline
# endif
#endif #endif
STATIC_PTR int NDECL(eatmdone); STATIC_PTR int NDECL(eatmdone);
+4 -16
View File
@@ -323,7 +323,7 @@ done2()
} }
return 0; return 0;
} }
#if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE)) #if (defined(UNIX) || defined(VMS) || defined(LATTICE))
if(wizard) { if(wizard) {
int c; int c;
# ifdef VMS # ifdef VMS
@@ -510,7 +510,7 @@ panic VA_DECL(const char *, str)
!program_state.something_worth_saving ? !program_state.something_worth_saving ?
"Program initialization has failed." : "Program initialization has failed." :
"Suddenly, the dungeon collapses."); "Suddenly, the dungeon collapses.");
#if defined(WIZARD) && !defined(MICRO) #ifndef MICRO
# if defined(NOTIFY_NETHACK_BUGS) # if defined(NOTIFY_NETHACK_BUGS)
if (!wizard) if (!wizard)
raw_printf("Report the following error to \"%s\" or at \"%s\".", raw_printf("Report the following error to \"%s\" or at \"%s\".",
@@ -531,11 +531,7 @@ panic VA_DECL(const char *, str)
free(tmp); free(tmp);
} else } else
raw_printf("Report error to \"%s\"%s.", raw_printf("Report error to \"%s\"%s.",
# ifdef WIZARD_NAME /*(KR1ED)*/
WIZARD_NAME, WIZARD_NAME,
# else
WIZARD,
# endif
!program_state.something_worth_saving ? "" : !program_state.something_worth_saving ? "" :
" and it may be possible to rebuild."); " and it may be possible to rebuild.");
} }
@@ -560,7 +556,7 @@ panic VA_DECL(const char *, str)
#ifdef WIN32 #ifdef WIN32
interject(INTERJECT_PANIC); interject(INTERJECT_PANIC);
#endif #endif
#if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE) || defined(WIN32)) #if defined(UNIX) || defined(VMS) || defined(LATTICE) || defined(WIN32)
if (wizard) if (wizard)
NH_abort(); /* generate core dump */ NH_abort(); /* generate core dump */
#endif #endif
@@ -846,12 +842,10 @@ int how;
paniclog("trickery", killer.name); paniclog("trickery", killer.name);
killer.name[0] = 0; killer.name[0] = 0;
} }
#ifdef WIZARD
if (wizard) { if (wizard) {
You("are a very tricky wizard, it seems."); You("are a very tricky wizard, it seems.");
return; return;
} }
#endif
} }
/* pbuf: holds Sprintf'd output for raw_print and putstr /* pbuf: holds Sprintf'd output for raw_print and putstr
@@ -885,11 +879,7 @@ int how;
return; return;
} }
} }
if (( if ((wizard || discover) && (how <= GENOCIDED)) {
#ifdef WIZARD
wizard ||
#endif
discover) && (how <= GENOCIDED)) {
if (paranoid_query(ParanoidDie, "Die?")) goto die; if (paranoid_query(ParanoidDie, "Die?")) goto die;
pline("OK, so you don't %s.", pline("OK, so you don't %s.",
(how == CHOKING) ? "choke" : "die"); (how == CHOKING) ? "choke" : "die");
@@ -1047,9 +1037,7 @@ die:
} }
if (bones_ok) { if (bones_ok) {
#ifdef WIZARD
if (!wizard || paranoid_query(ParanoidBones, "Save bones?")) if (!wizard || paranoid_query(ParanoidBones, "Save bones?"))
#endif
savebones(how, endtime, corpse); savebones(how, endtime, corpse);
/* corpse may be invalid pointer now so /* corpse may be invalid pointer now so
ensure that it isn't used again */ ensure that it isn't used again */
-2
View File
@@ -836,12 +836,10 @@ doengrave()
break; break;
case VENOM_CLASS: case VENOM_CLASS:
#ifdef WIZARD
if (wizard) { if (wizard) {
pline("Writing a poison pen letter??"); pline("Writing a poison pen letter??");
break; break;
} }
#endif
case ILLOBJ_CLASS: case ILLOBJ_CLASS:
impossible("You're engraving with an illegal object!"); impossible("You're engraving with an illegal object!");
break; break;
-2
View File
@@ -171,13 +171,11 @@ const char *drainer; /* cause of death, if drain should be fatal */
{ {
register int num; register int num;
#ifdef WIZARD
/* override life-drain resistance when handling an explicit /* override life-drain resistance when handling an explicit
wizard mode request to reduce level; never fatal though */ wizard mode request to reduce level; never fatal though */
if (drainer && !strcmp(drainer, "#levelchange")) if (drainer && !strcmp(drainer, "#levelchange"))
drainer = 0; drainer = 0;
else else
#endif
if (resists_drli(&youmonst)) return; if (resists_drli(&youmonst)) return;
if (u.ulevel > 1) { if (u.ulevel > 1) {
+1 -12
View File
@@ -124,12 +124,10 @@ boolean nethack_thinks_it_is_open; /* Does NetHack think it's open? */
# endif # endif
#endif /*HOLD_LOCKFILE_OPEN*/ #endif /*HOLD_LOCKFILE_OPEN*/
#ifdef WIZARD
#define WIZKIT_MAX 128 #define WIZKIT_MAX 128
static char wizkit[WIZKIT_MAX]; static char wizkit[WIZKIT_MAX];
STATIC_DCL FILE *NDECL(fopen_wizkit_file); STATIC_DCL FILE *NDECL(fopen_wizkit_file);
STATIC_DCL void FDECL(wizkit_addinv, (struct obj *)); STATIC_DCL void FDECL(wizkit_addinv, (struct obj *));
#endif
#ifdef AMIGA #ifdef AMIGA
extern char PATH[]; /* see sys/amiga/amidos.c */ extern char PATH[]; /* see sys/amiga/amidos.c */
@@ -790,10 +788,8 @@ d_level *lev;
#else #else
ret = rename(tempname, fq_bones); ret = rename(tempname, fq_bones);
#endif #endif
#ifdef WIZARD
if (wizard && ret != 0) if (wizard && ret != 0)
pline("couldn't rename %s to %s.", tempname, fq_bones); pline("couldn't rename %s to %s.", tempname, fq_bones);
#endif
} }
@@ -899,7 +895,7 @@ int fd;
#endif #endif
#if defined(WIZARD) && !defined(MICRO) #ifndef MICRO
/* change pre-existing savefile name to indicate an error savefile */ /* change pre-existing savefile name to indicate an error savefile */
void void
set_error_savefile() set_error_savefile()
@@ -1298,9 +1294,7 @@ boolean uncomp;
(void) signal(SIGQUIT, SIG_IGN); (void) signal(SIGQUIT, SIG_IGN);
(void) wait((int *)&i); (void) wait((int *)&i);
(void) signal(SIGINT, (SIG_RET_TYPE) done1); (void) signal(SIGINT, (SIG_RET_TYPE) done1);
# ifdef WIZARD
if (wizard) (void) signal(SIGQUIT, SIG_DFL); if (wizard) (void) signal(SIGQUIT, SIG_DFL);
# endif
#else #else
/* I don't think we can really cope with external compression /* I don't think we can really cope with external compression
* without signals, so we'll declare that compress failed and * without signals, so we'll declare that compress failed and
@@ -2246,10 +2240,8 @@ int src;
#ifdef LOADSYMSETS #ifdef LOADSYMSETS
switch_symbols(TRUE); switch_symbols(TRUE);
#endif #endif
#ifdef WIZARD
} else if (match_varname(buf, "WIZKIT", 6)) { } else if (match_varname(buf, "WIZKIT", 6)) {
(void) strncpy(wizkit, bufp, WIZKIT_MAX-1); (void) strncpy(wizkit, bufp, WIZKIT_MAX-1);
#endif
#ifdef AMIGA #ifdef AMIGA
} else if (match_varname(buf, "FONT", 4)) { } else if (match_varname(buf, "FONT", 4)) {
char *t; char *t;
@@ -2435,7 +2427,6 @@ OR: Forbid multiline stuff for alternate config sources.
return rv; return rv;
} }
#ifdef WIZARD
STATIC_OVL FILE * STATIC_OVL FILE *
fopen_wizkit_file() fopen_wizkit_file()
{ {
@@ -2569,8 +2560,6 @@ read_wizkit()
return; return;
} }
#endif /*WIZARD*/
#ifdef LOADSYMSETS #ifdef LOADSYMSETS
extern struct symsetentry *symset_list; /* options.c */ extern struct symsetentry *symset_list; /* options.c */
extern struct symparse loadsyms[]; /* drawing.c */ extern struct symparse loadsyms[]; /* drawing.c */
-2
View File
@@ -182,12 +182,10 @@ boolean isyou;
if(!mtmp) pline_The("flow reduces to a trickle."); if(!mtmp) pline_The("flow reduces to a trickle.");
return; return;
} }
#ifdef WIZARD
if (isyou && wizard) { if (isyou && wizard) {
if (yn("Dry up fountain?") == 'n') if (yn("Dry up fountain?") == 'n')
return; return;
} }
#endif
/* replace the fountain with ordinary floor */ /* replace the fountain with ordinary floor */
levl[x][y].typ = ROOM; levl[x][y].typ = ROOM;
levl[x][y].looted = 0; levl[x][y].looted = 0;
-6
View File
@@ -33,7 +33,6 @@ STATIC_DCL char FDECL(obj_to_let,(struct obj *));
static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */ static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */
#ifdef WIZARD
/* wizards can wish for venom, which will become an invisible inventory /* wizards can wish for venom, which will become an invisible inventory
* item without this. putting it in inv_order would mean venom would * item without this. putting it in inv_order would mean venom would
* suddenly become a choice for all the inventory-class commands, which * suddenly become a choice for all the inventory-class commands, which
@@ -42,7 +41,6 @@ static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */
* around on a bones level for normal players to find. * around on a bones level for normal players to find.
*/ */
static char venom_inv[] = { VENOM_CLASS, 0 }; /* (constant) */ static char venom_inv[] = { VENOM_CLASS, 0 }; /* (constant) */
#endif
void void
assigninvlet(otmp) assigninvlet(otmp)
@@ -1916,7 +1914,6 @@ long* out_cnt;
} }
start_menu(win); start_menu(win);
#ifdef WIZARD
if (wizard && iflags.override_ID) { if (wizard && iflags.override_ID) {
char prompt[BUFSZ]; char prompt[BUFSZ];
any.a_char = -1; any.a_char = -1;
@@ -1927,7 +1924,6 @@ long* out_cnt;
add_menu(win, NO_GLYPH, &any,' ', iflags.override_ID, ATR_NONE, add_menu(win, NO_GLYPH, &any,' ', iflags.override_ID, ATR_NONE,
prompt, MENU_UNSELECTED); prompt, MENU_UNSELECTED);
} }
#endif
nextclass: nextclass:
classcount = 0; classcount = 0;
any = zeroany; /* set all bits to zero */ any = zeroany; /* set all bits to zero */
@@ -1950,12 +1946,10 @@ nextclass:
} }
if (flags.sortpack) { if (flags.sortpack) {
if (*++invlet) goto nextclass; if (*++invlet) goto nextclass;
#ifdef WIZARD
if (--invlet != venom_inv) { if (--invlet != venom_inv) {
invlet = venom_inv; invlet = venom_inv;
goto nextclass; goto nextclass;
} }
#endif
} }
end_menu(win, (char *) 0); end_menu(win, (char *) 0);
-4
View File
@@ -633,8 +633,6 @@ struct obj *obj;
return "strangely"; return "strangely";
} }
#ifdef WIZARD
int int
wiz_light_sources() wiz_light_sources()
{ {
@@ -674,6 +672,4 @@ wiz_light_sources()
return 0; return 0;
} }
#endif /* WIZARD */
/*light.c*/ /*light.c*/
+2 -6
View File
@@ -779,7 +779,7 @@ boolean ghostly;
mvitals[mndx].born++; mvitals[mndx].born++;
if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) && if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) &&
!(mvitals[mndx].mvflags & G_EXTINCT)) { !(mvitals[mndx].mvflags & G_EXTINCT)) {
#if defined(DEBUG) && defined(WIZARD) #ifdef DEBUG
if (wizard) pline("Automatically extinguished %s.", if (wizard) pline("Automatically extinguished %s.",
makeplural(mons[mndx].mname)); makeplural(mons[mndx].mname));
#endif #endif
@@ -925,7 +925,7 @@ register int mmflags;
/* if you are to make a specific monster and it has /* if you are to make a specific monster and it has
already been genocided, return */ already been genocided, return */
if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0); if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0);
#if defined(WIZARD) && defined(DEBUG) #ifdef DEBUG
if (wizard && (mvitals[mndx].mvflags & G_EXTINCT)) if (wizard && (mvitals[mndx].mvflags & G_EXTINCT))
pline("Explicitly creating extinct monster %s.", pline("Explicitly creating extinct monster %s.",
mons[mndx].mname); mons[mndx].mname);
@@ -1186,12 +1186,9 @@ boolean neverask;
int x, y; int x, y;
struct monst *mon; struct monst *mon;
boolean known = FALSE; boolean known = FALSE;
#ifdef WIZARD
boolean ask = (wizard && !neverask); boolean ask = (wizard && !neverask);
#endif
while (cnt--) { while (cnt--) {
#ifdef WIZARD
if (ask) { if (ask) {
if (create_particular()) { if (create_particular()) {
known = TRUE; known = TRUE;
@@ -1199,7 +1196,6 @@ boolean neverask;
} }
else ask = FALSE; /* ESC will shut off prompting */ else ask = FALSE; /* ESC will shut off prompting */
} }
#endif
x = u.ux, y = u.uy; x = u.ux, y = u.uy;
/* if in water, try to encourage an aquatic monster /* if in water, try to encourage an aquatic monster
by finding and then specifying another wet location */ by finding and then specifying another wet location */
+1 -11
View File
@@ -7,11 +7,7 @@
/* #define DEBUG */ /* uncomment to enable code debugging */ /* #define DEBUG */ /* uncomment to enable code debugging */
#ifdef DEBUG #ifdef DEBUG
# ifdef WIZARD
#define debugpline if (wizard) pline #define debugpline if (wizard) pline
# else
#define debugpline pline
# endif
#endif #endif
/* for UNIX, Rand #def'd to (long)lrand48() or (long)random() */ /* for UNIX, Rand #def'd to (long)lrand48() or (long)random() */
@@ -720,9 +716,7 @@ makelevel()
{ {
register int u_depth = depth(&u.uz); register int u_depth = depth(&u.uz);
#ifdef WIZARD
if(wizard && nh_getenv("SHOPTYPE")) mkroom(SHOPBASE); else if(wizard && nh_getenv("SHOPTYPE")) mkroom(SHOPBASE); else
#endif
if (u_depth > 1 && if (u_depth > 1 &&
u_depth < depth(&medusa_level) && u_depth < depth(&medusa_level) &&
nroom >= room_threshold && nroom >= room_threshold &&
@@ -1561,11 +1555,7 @@ xchar x, y;
} }
/* Already set or 2/3 chance of deferring until a later level. */ /* Already set or 2/3 chance of deferring until a later level. */
if (source->dnum < n_dgns || (rn2(3) if (source->dnum < n_dgns || (rn2(3) && !wizard)) return;
#ifdef WIZARD
&& !wizard
#endif
)) return;
if (! (u.uz.dnum == oracle_level.dnum /* in main dungeon */ if (! (u.uz.dnum == oracle_level.dnum /* in main dungeon */
&& !at_dgn_entrance("The Quest") /* but not Quest's entry */ && !at_dgn_entrance("The Quest") /* but not Quest's entry */
-2
View File
@@ -509,7 +509,6 @@ register const char *s;
} else Strcpy(protofile, ""); } else Strcpy(protofile, "");
#ifdef WIZARD
/* SPLEVTYPE format is "level-choice,level-choice"... */ /* SPLEVTYPE format is "level-choice,level-choice"... */
if (wizard && *protofile && sp && sp->rndlevs) { if (wizard && *protofile && sp && sp->rndlevs) {
char *ep = getenv("SPLEVTYPE"); /* not nh_getenv */ char *ep = getenv("SPLEVTYPE"); /* not nh_getenv */
@@ -531,7 +530,6 @@ register const char *s;
} }
} }
} }
#endif
if(*protofile) { if(*protofile) {
Strcat(protofile, LEV_EXT); Strcat(protofile, LEV_EXT);
-4
View File
@@ -10,14 +10,12 @@ STATIC_DCL void FDECL(maybe_adjust_light, (struct obj *,int));
STATIC_DCL void FDECL(obj_timer_checks,(struct obj *, XCHAR_P, XCHAR_P, int)); STATIC_DCL void FDECL(obj_timer_checks,(struct obj *, XCHAR_P, XCHAR_P, int));
STATIC_DCL void FDECL(container_weight, (struct obj *)); STATIC_DCL void FDECL(container_weight, (struct obj *));
STATIC_DCL struct obj *FDECL(save_mtraits, (struct obj *, struct monst *)); STATIC_DCL struct obj *FDECL(save_mtraits, (struct obj *, struct monst *));
#ifdef WIZARD
STATIC_DCL void FDECL(objlist_sanity, (struct obj *,int,const char *)); STATIC_DCL void FDECL(objlist_sanity, (struct obj *,int,const char *));
STATIC_DCL void FDECL(mon_obj_sanity, (struct monst *,const char *)); STATIC_DCL void FDECL(mon_obj_sanity, (struct monst *,const char *));
STATIC_DCL const char *FDECL(where_name, (struct obj *)); STATIC_DCL const char *FDECL(where_name, (struct obj *));
STATIC_DCL void FDECL(insane_object, STATIC_DCL void FDECL(insane_object,
(struct obj *,const char *,const char *,struct monst *)); (struct obj *,const char *,const char *,struct monst *));
STATIC_DCL void FDECL(check_contained, (struct obj *,const char *)); STATIC_DCL void FDECL(check_contained, (struct obj *,const char *));
#endif
/*#define DEBUG_EFFECTS*/ /* show some messages for debugging */ /*#define DEBUG_EFFECTS*/ /* show some messages for debugging */
@@ -1950,7 +1948,6 @@ boolean tipping; /* caller emptying entire contents; affects shop handling */
return objcount; return objcount;
} }
#ifdef WIZARD
/* support for wizard-mode's `sanity_check' option */ /* support for wizard-mode's `sanity_check' option */
static const char NEARDATA /* pline formats for insane_object() */ static const char NEARDATA /* pline formats for insane_object() */
@@ -2144,6 +2141,5 @@ check_contained(container, mesg)
} }
} }
} }
#endif /* WIZARD */
/*mkobj.c*/ /*mkobj.c*/
+3 -12
View File
@@ -67,7 +67,6 @@ mkshop()
{ {
register struct mkroom *sroom; register struct mkroom *sroom;
int i = -1; int i = -1;
#ifdef WIZARD
char *ep = (char *)0; /* (init == lint suppression) */ char *ep = (char *)0; /* (init == lint suppression) */
/* first determine shoptype */ /* first determine shoptype */
@@ -129,7 +128,6 @@ mkshop()
} }
#ifndef MAC #ifndef MAC
gottype: gottype:
#endif
#endif #endif
for(sroom = &rooms[0]; ; sroom++){ for(sroom = &rooms[0]; ; sroom++){
if(sroom->hx < 0) return; if(sroom->hx < 0) return;
@@ -140,11 +138,8 @@ gottype:
if(sroom->rtype != OROOM) continue; if(sroom->rtype != OROOM) continue;
if(has_dnstairs(sroom) || has_upstairs(sroom)) if(has_dnstairs(sroom) || has_upstairs(sroom))
continue; continue;
if( if( (wizard && ep && sroom->doorct != 0) || sroom->doorct == 1)
#ifdef WIZARD break;
(wizard && ep && sroom->doorct != 0) ||
#endif
sroom->doorct == 1) break;
} }
if (!sroom->rlit) { if (!sroom->rlit) {
int x, y; int x, y;
@@ -200,11 +195,7 @@ register boolean strict;
continue; continue;
} else if(has_upstairs(sroom) || has_dnstairs(sroom)) } else if(has_upstairs(sroom) || has_dnstairs(sroom))
continue; continue;
if(sroom->doorct == 1 || !rn2(5) if(sroom->doorct == 1 || !rn2(5) || wizard)
#ifdef WIZARD
|| wizard
#endif
)
return sroom; return sroom;
} }
return (struct mkroom *)0; return (struct mkroom *)0;
-6
View File
@@ -23,9 +23,7 @@ STATIC_DCL void FDECL(dealloc_mextra, (struct mextra *));
STATIC_DCL int FDECL(pickvampshape, (struct monst *)); STATIC_DCL int FDECL(pickvampshape, (struct monst *));
STATIC_DCL boolean FDECL(isspecmon, (struct monst *)); STATIC_DCL boolean FDECL(isspecmon, (struct monst *));
STATIC_DCL boolean FDECL(validspecmon, (struct monst *,int)); STATIC_DCL boolean FDECL(validspecmon, (struct monst *,int));
#ifdef WIZARD
STATIC_DCL boolean FDECL(validvamp, (struct monst *,int *,int)); STATIC_DCL boolean FDECL(validvamp, (struct monst *,int *,int));
#endif
STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int)); STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int));
#define LEVEL_SPECIFIC_NOCORPSE(mdat) \ #define LEVEL_SPECIFIC_NOCORPSE(mdat) \
@@ -2599,7 +2597,6 @@ int mndx;
return TRUE; /* potential new form is ok */ return TRUE; /* potential new form is ok */
} }
#ifdef WIZARD
/* prevent wizard mode user from specifying invalid vampshifter shape */ /* prevent wizard mode user from specifying invalid vampshifter shape */
STATIC_OVL boolean STATIC_OVL boolean
validvamp(mon, mndx_p, monclass) validvamp(mon, mndx_p, monclass)
@@ -2638,7 +2635,6 @@ int *mndx_p, monclass;
} }
return (*mndx_p != NON_PM); return (*mndx_p != NON_PM);
} }
#endif /*WIZARD*/
int int
select_newcham_form(mon) select_newcham_form(mon)
@@ -2689,7 +2685,6 @@ struct monst *mon;
} }
break; break;
} }
#ifdef WIZARD
/* for debugging: allow control of polymorphed monster */ /* for debugging: allow control of polymorphed monster */
if (wizard && iflags.mon_polycontrol) { if (wizard && iflags.mon_polycontrol) {
char pprompt[BUFSZ], buf[BUFSZ]; char pprompt[BUFSZ], buf[BUFSZ];
@@ -2731,7 +2726,6 @@ struct monst *mon;
if (is_vampshifter(mon) && !validvamp(mon, &mndx, monclass)) if (is_vampshifter(mon) && !validvamp(mon, &mndx, monclass))
mndx = pickvampshape(mon); /* don't resort to arbitrary */ mndx = pickvampshape(mon); /* don't resort to arbitrary */
} }
#endif /*WIZARD*/
/* if no form was specified above, pick one at random now */ /* if no form was specified above, pick one at random now */
if (mndx == NON_PM) { if (mndx == NON_PM) {
-2
View File
@@ -1462,9 +1462,7 @@ struct monst *mtmp;
typ != LUMP_OF_ROYAL_JELLY && typ != LUMP_OF_ROYAL_JELLY &&
obj->oclass != AMULET_CLASS && obj->oclass != AMULET_CLASS &&
obj->oclass != RING_CLASS && obj->oclass != RING_CLASS &&
#ifdef WIZARD
obj->oclass != VENOM_CLASS && obj->oclass != VENOM_CLASS &&
#endif
typ != SACK && typ != BAG_OF_HOLDING && typ != SACK && typ != BAG_OF_HOLDING &&
typ != BAG_OF_TRICKS && !Is_candle(obj) && typ != BAG_OF_TRICKS && !Is_candle(obj) &&
typ != OILSKIN_SACK && typ != LEASH && typ != OILSKIN_SACK && typ != LEASH &&
-12
View File
@@ -1690,9 +1690,7 @@ static const char *const as_is[] = {
"boots", "shoes", "boots", "shoes",
"gloves", "lenses", "scales", "gloves", "lenses", "scales",
"gauntlets", "gauntlets",
#ifdef WIZARD
"iron bars", "iron bars",
#endif
/* both singular and plural are spelled the same */ /* both singular and plural are spelled the same */
"deer", "fish", "tuna", "yaki", "-hai", "deer", "fish", "tuna", "yaki", "-hai",
"krill", "manes", "ninja", "sheep", "ronin", "roshi", "shito", "tengu", "krill", "manes", "ninja", "sheep", "ronin", "roshi", "shito", "tengu",
@@ -2188,9 +2186,7 @@ STATIC_OVL NEARDATA const struct o_range o_ranges[] = {
{ "dragon scale mail", { "dragon scale mail",
ARMOR_CLASS, GRAY_DRAGON_SCALE_MAIL, YELLOW_DRAGON_SCALE_MAIL }, ARMOR_CLASS, GRAY_DRAGON_SCALE_MAIL, YELLOW_DRAGON_SCALE_MAIL },
{ "sword", WEAPON_CLASS, SHORT_SWORD, KATANA }, { "sword", WEAPON_CLASS, SHORT_SWORD, KATANA },
#ifdef WIZARD
{ "venom", VENOM_CLASS, BLINDING_VENOM, ACID_VENOM }, { "venom", VENOM_CLASS, BLINDING_VENOM, ACID_VENOM },
#endif
{ "gray stone", GEM_CLASS, LUCKSTONE, FLINT }, { "gray stone", GEM_CLASS, LUCKSTONE, FLINT },
{ "grey stone", GEM_CLASS, LUCKSTONE, FLINT }, { "grey stone", GEM_CLASS, LUCKSTONE, FLINT },
}; };
@@ -2652,7 +2648,6 @@ struct obj *no_wish;
} }
} }
#ifdef WIZARD
/* Wishing in wizard mode can create traps and furniture. /* Wishing in wizard mode can create traps and furniture.
* Part I: distinguish between trap and object for the two * Part I: distinguish between trap and object for the two
* types of traps which have corresponding objects: bear trap * types of traps which have corresponding objects: bear trap
@@ -2692,7 +2687,6 @@ struct obj *no_wish;
the object name and getting a disarmed trap object] */ the object name and getting a disarmed trap object] */
} }
} }
#endif
retry: retry:
/* "grey stone" check must be before general "stone" */ /* "grey stone" check must be before general "stone" */
@@ -2862,7 +2856,6 @@ srch:
goto typfnd; goto typfnd;
} }
} }
#ifdef WIZARD
/* Let wizards wish for traps and furniture. /* Let wizards wish for traps and furniture.
* Must come after objects check so wizards can still wish for * Must come after objects check so wizards can still wish for
* trap objects like beartraps. * trap objects like beartraps.
@@ -2979,7 +2972,6 @@ wiztrap:
return &zeroobj; return &zeroobj;
} }
} }
#endif /* WIZARD */
if(!oclass) return((struct obj *)0); if(!oclass) return((struct obj *)0);
any: any:
@@ -3035,16 +3027,12 @@ typfnd:
|| typ == ROCK || is_missile(otmp))))) || typ == ROCK || is_missile(otmp)))))
otmp->quan = (long) cnt; otmp->quan = (long) cnt;
#ifdef WIZARD
if (oclass == VENOM_CLASS) otmp->spe = 1; if (oclass == VENOM_CLASS) otmp->spe = 1;
#endif
if (spesgn == 0) { if (spesgn == 0) {
spe = otmp->spe; spe = otmp->spe;
#ifdef WIZARD
} else if (wizard) { } else if (wizard) {
; /* no alteration to spe */ ; /* no alteration to spe */
#endif
} else if (oclass == ARMOR_CLASS || oclass == WEAPON_CLASS || } else if (oclass == ARMOR_CLASS || oclass == WEAPON_CLASS ||
is_weptool(otmp) || is_weptool(otmp) ||
(oclass==RING_CLASS && objects[typ].oc_charged)) { (oclass==RING_CLASS && objects[typ].oc_charged)) {
+1 -33
View File
@@ -138,12 +138,8 @@ static struct Bool_Opt
#else #else
{"mail", (boolean *)0, TRUE, SET_IN_FILE}, {"mail", (boolean *)0, TRUE, SET_IN_FILE},
#endif #endif
#ifdef WIZARD
/* for menu debugging only*/ /* for menu debugging only*/
{"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME}, {"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME},
#else
{"menu_tab_sep", (boolean *)0, FALSE, SET_IN_FILE},
#endif
{"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME}, /*WC*/ {"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME}, /*WC*/
#ifdef NEWS #ifdef NEWS
{"news", &iflags.news, TRUE, DISP_IN_GAME}, {"news", &iflags.news, TRUE, DISP_IN_GAME},
@@ -177,11 +173,7 @@ static struct Bool_Opt
DISP_IN_GAME}, DISP_IN_GAME},
#endif #endif
{"safe_pet", &flags.safe_dog, TRUE, SET_IN_GAME}, {"safe_pet", &flags.safe_dog, TRUE, SET_IN_GAME},
#ifdef WIZARD
{"sanity_check", &iflags.sanity_check, FALSE, SET_IN_GAME}, {"sanity_check", &iflags.sanity_check, FALSE, SET_IN_GAME},
#else
{"sanity_check", (boolean *)0, FALSE, SET_IN_FILE},
#endif
{"selectsaved", &iflags.wc2_selectsaved, TRUE, DISP_IN_GAME}, /*WC*/ {"selectsaved", &iflags.wc2_selectsaved, TRUE, DISP_IN_GAME}, /*WC*/
#ifdef EXP_ON_BOTL #ifdef EXP_ON_BOTL
{"showexp", &flags.showexp, FALSE, SET_IN_GAME}, {"showexp", &flags.showexp, FALSE, SET_IN_GAME},
@@ -339,12 +331,7 @@ static struct Comp_Opt
MAXOCLASSES, SET_IN_GAME }, MAXOCLASSES, SET_IN_GAME },
{ "pile_limit", "threshold for \"there are many objects here\"", { "pile_limit", "threshold for \"there are many objects here\"",
24, SET_IN_GAME }, 24, SET_IN_GAME },
{ "playmode", { "playmode", "normal play, non-scoring explore mode, or debug mode",
#ifdef WIZARD
"normal play, non-scoring explore mode, or debug mode",
#else
"normal play or non-scoring explore mode",
#endif
8, DISP_IN_GAME }, 8, DISP_IN_GAME },
{ "player_selection", "choose character via dialog or prompts", { "player_selection", "choose character via dialog or prompts",
12, DISP_IN_GAME }, 12, DISP_IN_GAME },
@@ -1112,17 +1099,9 @@ STATIC_VAR const struct paranoia_opts {
{ PARANOID_QUIT, "quit", 1, "explore", 1, { PARANOID_QUIT, "quit", 1, "explore", 1,
"yes vs y to quit or to enter explore mode" }, "yes vs y to quit or to enter explore mode" },
{ PARANOID_DIE, "die", 1, "death", 2, { PARANOID_DIE, "die", 1, "death", 2,
#ifdef WIZARD
"yes vs y to die (explore mode or debug mode)" }, "yes vs y to die (explore mode or debug mode)" },
#else
"yes vs y to die (explore mode only)" },
#endif
{ PARANOID_BONES, "bones", 1, 0, 0, { PARANOID_BONES, "bones", 1, 0, 0,
#ifdef WIZARD
"yes vs y to save bones data when dying in debug mode" }, "yes vs y to save bones data when dying in debug mode" },
#else
"(only applicable for debug mode)" },
#endif
{ PARANOID_HIT, "attack", 1, "hit", 1, { PARANOID_HIT, "attack", 1, "hit", 1,
"yes vs y to attack a peaceful monster" }, "yes vs y to attack a peaceful monster" },
{ PARANOID_PRAY, "pray", 1, 0, 0, { PARANOID_PRAY, "pray", 1, 0, 0,
@@ -2045,12 +2024,7 @@ goodfruit:
wizard = FALSE, discover = TRUE; wizard = FALSE, discover = TRUE;
} else if (!strncmpi(op, "debug", 5) || } else if (!strncmpi(op, "debug", 5) ||
!strncmpi(op, "wizard", 6)) { !strncmpi(op, "wizard", 6)) {
#ifdef WIZARD
wizard = TRUE, discover = FALSE; wizard = TRUE, discover = FALSE;
#else
raw_printf("\"%s\":%s -- debug mode not available.",
fullname, op);
#endif
} else { } else {
raw_printf("Invalid value for \"%s\":%s.", fullname, op); raw_printf("Invalid value for \"%s\":%s.", fullname, op);
} }
@@ -2868,10 +2842,8 @@ doset()
((boolopt[i].optflags == DISP_IN_GAME && pass == 0) || ((boolopt[i].optflags == DISP_IN_GAME && pass == 0) ||
(boolopt[i].optflags == SET_IN_GAME && pass == 1))) { (boolopt[i].optflags == SET_IN_GAME && pass == 1))) {
if (bool_p == &flags.female) continue; /* obsolete */ if (bool_p == &flags.female) continue; /* obsolete */
#ifdef WIZARD
if (bool_p == &iflags.sanity_check && !wizard) continue; if (bool_p == &iflags.sanity_check && !wizard) continue;
if (bool_p == &iflags.menu_tab_sep && !wizard) continue; if (bool_p == &iflags.menu_tab_sep && !wizard) continue;
#endif
if (is_wc_option(boolopt[i].name) && if (is_wc_option(boolopt[i].name) &&
!wc_supported(boolopt[i].name)) continue; !wc_supported(boolopt[i].name)) continue;
if (is_wc2_option(boolopt[i].name) && if (is_wc2_option(boolopt[i].name) &&
@@ -4162,10 +4134,8 @@ option_help()
/* Boolean options */ /* Boolean options */
for (i = 0; boolopt[i].name; i++) { for (i = 0; boolopt[i].name; i++) {
if (boolopt[i].addr) { if (boolopt[i].addr) {
#ifdef WIZARD
if (boolopt[i].addr == &iflags.sanity_check && !wizard) continue; if (boolopt[i].addr == &iflags.sanity_check && !wizard) continue;
if (boolopt[i].addr == &iflags.menu_tab_sep && !wizard) continue; if (boolopt[i].addr == &iflags.menu_tab_sep && !wizard) continue;
#endif
next_opt(datawin, boolopt[i].name); next_opt(datawin, boolopt[i].name);
} }
} }
@@ -4756,11 +4726,9 @@ void
set_playmode() set_playmode()
{ {
if (wizard) { if (wizard) {
#ifdef WIZARD
if (authorize_wizard_mode()) if (authorize_wizard_mode())
Strcpy(plname, "wizard"); Strcpy(plname, "wizard");
else else
#endif
wizard = FALSE; /* not allowed or not available */ wizard = FALSE; /* not allowed or not available */
/* force explore mode if we didn't make it into wizard mode */ /* force explore mode if we didn't make it into wizard mode */
discover = !wizard; discover = !wizard;
-6
View File
@@ -936,9 +936,7 @@ static const char *help_menu_items[] = {
#else #else
#define WIZHLP_SLOT 11 #define WIZHLP_SLOT 11
#endif #endif
#ifdef WIZARD
"List of wizard-mode commands.", "List of wizard-mode commands.",
#endif
"", "",
(char *)0 (char *)0
}; };
@@ -957,10 +955,8 @@ help_menu(sel)
any = zeroany; /* zero all bits */ any = zeroany; /* zero all bits */
start_menu(tmpwin); start_menu(tmpwin);
#ifdef WIZARD
if (!wizard) help_menu_items[WIZHLP_SLOT] = "", if (!wizard) help_menu_items[WIZHLP_SLOT] = "",
help_menu_items[WIZHLP_SLOT+1] = (char *)0; help_menu_items[WIZHLP_SLOT+1] = (char *)0;
#endif
for (i = 0; help_menu_items[i]; i++) for (i = 0; help_menu_items[i]; i++)
#ifdef PORT_HELP #ifdef PORT_HELP
/* port-specific line has a %s in it for the PORT_ID */ /* port-specific line has a %s in it for the PORT_ID */
@@ -1010,10 +1006,8 @@ dohelp()
case PORT_HELP_ID: port_help(); break; case PORT_HELP_ID: port_help(); break;
#endif #endif
default: default:
#ifdef WIZARD
/* handle slot 11 or 12 */ /* handle slot 11 or 12 */
display_file(DEBUGHELP, TRUE); display_file(DEBUGHELP, TRUE);
#endif
break; break;
} }
} }
-4
View File
@@ -50,9 +50,7 @@ pline VA_DECL(const char *, line)
#ifdef HANGUPHANDLING #ifdef HANGUPHANDLING
if (program_state.done_hup) return; if (program_state.done_hup) return;
#endif #endif
#ifdef WIZARD
if (program_state.wizkit_wishing) return; if (program_state.wizkit_wishing) return;
#endif
if (index(line, '%')) { if (index(line, '%')) {
Vsprintf(pbuf,line,VA_ARGS); Vsprintf(pbuf,line,VA_ARGS);
@@ -341,7 +339,6 @@ register struct monst *mtmp;
info[0] = 0; info[0] = 0;
if (mtmp->mtame) { Strcat(info, ", tame"); if (mtmp->mtame) { Strcat(info, ", tame");
#ifdef WIZARD
if (wizard) { if (wizard) {
Sprintf(eos(info), " (%d", mtmp->mtame); Sprintf(eos(info), " (%d", mtmp->mtame);
if (!mtmp->isminion) if (!mtmp->isminion)
@@ -349,7 +346,6 @@ register struct monst *mtmp;
EDOG(mtmp)->hungrytime, EDOG(mtmp)->apport); EDOG(mtmp)->hungrytime, EDOG(mtmp)->apport);
Strcat(info, ")"); Strcat(info, ")");
} }
#endif
} }
else if (mtmp->mpeaceful) Strcat(info, ", peaceful"); else if (mtmp->mpeaceful) Strcat(info, ", peaceful");
if (mtmp->cham >= LOW_PM && mtmp->data != &mons[mtmp->cham]) if (mtmp->cham >= LOW_PM && mtmp->data != &mons[mtmp->cham])
-2
View File
@@ -1645,7 +1645,6 @@ dopray()
/* set up p_type and p_alignment */ /* set up p_type and p_alignment */
if (!can_pray(TRUE)) return 0; if (!can_pray(TRUE)) return 0;
#ifdef WIZARD
if (wizard && p_type >= 0) { if (wizard && p_type >= 0) {
if (yn("Force the gods to be pleased?") == 'y') { if (yn("Force the gods to be pleased?") == 'y') {
u.ublesscnt = 0; u.ublesscnt = 0;
@@ -1655,7 +1654,6 @@ dopray()
if(p_type < 2) p_type = 3; if(p_type < 2) p_type = 3;
} }
} }
#endif
nomul(-3); nomul(-3);
nomovemsg = "You finish your prayer."; nomovemsg = "You finish your prayer.";
afternmv = prayer_done; afternmv = prayer_done;
-2
View File
@@ -129,7 +129,6 @@ boolean talk;
int purity; int purity;
aligntyp original_alignment = u.ualignbase[A_ORIGINAL]; aligntyp original_alignment = u.ualignbase[A_ORIGINAL];
#ifdef WIZARD
if (wizard && talk) { if (wizard && talk) {
if (u.ualign.type != original_alignment) { if (u.ualign.type != original_alignment) {
You("are currently %s instead of %s.", You("are currently %s instead of %s.",
@@ -143,7 +142,6 @@ boolean talk;
u.ualign.record = MIN_QUEST_ALIGN; u.ualign.record = MIN_QUEST_ALIGN;
} }
} }
#endif
purity = (u.ualign.record >= MIN_QUEST_ALIGN && purity = (u.ualign.record >= MIN_QUEST_ALIGN &&
u.ualign.type == original_alignment && u.ualign.type == original_alignment &&
u.ualignbase[A_CURRENT] == original_alignment) ? 1 : u.ualignbase[A_CURRENT] == original_alignment) ? 1 :
-2
View File
@@ -461,10 +461,8 @@ boolean
skip_pager(common) skip_pager(common)
boolean common; boolean common;
{ {
#ifdef WIZARD
/* WIZKIT: suppress plot feedback if starting with quest artifact */ /* WIZKIT: suppress plot feedback if starting with quest artifact */
if (program_state.wizkit_wishing) return TRUE; if (program_state.wizkit_wishing) return TRUE;
#endif
if (!(common ? qt_list.common : qt_list.chrole)) { if (!(common ? qt_list.common : qt_list.chrole)) {
panic("%s: no %s quest text data available", panic("%s: no %s quest text data available",
common ? "com_pager" : "qt_pager", common ? "com_pager" : "qt_pager",
-8
View File
@@ -1687,7 +1687,6 @@ do_class_genocide()
else if (immunecnt || class == S_invisible) else if (immunecnt || class == S_invisible)
You("aren't permitted to genocide such monsters."); You("aren't permitted to genocide such monsters.");
else else
#ifdef WIZARD /* to aid in topology testing; remove pesky monsters */
if (wizard && buf[0] == '*') { if (wizard && buf[0] == '*') {
register struct monst *mtmp, *mtmp2; register struct monst *mtmp, *mtmp2;
@@ -1701,7 +1700,6 @@ do_class_genocide()
pline("Eliminated %d monster%s.", gonecnt, plur(gonecnt)); pline("Eliminated %d monster%s.", gonecnt, plur(gonecnt));
return; return;
} else } else
#endif
pline("That %s does not represent any monster.", pline("That %s does not represent any monster.",
strlen(buf) == 1 ? "symbol" : "response"); strlen(buf) == 1 ? "symbol" : "response");
continue; continue;
@@ -2023,7 +2021,6 @@ struct obj *from_obj;
return FALSE; return FALSE;
} }
#ifdef WIZARD
/* /*
* Make a new monster with the type controlled by the user. * Make a new monster with the type controlled by the user.
* *
@@ -2063,12 +2060,10 @@ create_particular()
makehostile = TRUE; makehostile = TRUE;
} }
/* decide whether a valid monster was chosen */ /* decide whether a valid monster was chosen */
#ifdef WIZARD
if (wizard && (!strcmp(bufp, "*") || !strcmp(bufp, "random"))) { if (wizard && (!strcmp(bufp, "*") || !strcmp(bufp, "random"))) {
randmonst = TRUE; randmonst = TRUE;
break; break;
} }
#endif
which = name_to_mon(bufp); which = name_to_mon(bufp);
if (which >= LOW_PM) break; /* got one */ if (which >= LOW_PM) break; /* got one */
monclass = name_to_monclass(bufp, &which); monclass = name_to_monclass(bufp, &which);
@@ -2089,12 +2084,10 @@ create_particular()
if (!randmonst) { if (!randmonst) {
firstchoice = which; firstchoice = which;
if (cant_revive(&which, FALSE, (struct obj *)0)) { if (cant_revive(&which, FALSE, (struct obj *)0)) {
#ifdef WIZARD /* intentionally redundant... */
/* wizard mode can override handling of special monsters */ /* wizard mode can override handling of special monsters */
Sprintf(buf, "Creating %s instead; force %s?", Sprintf(buf, "Creating %s instead; force %s?",
mons[which].mname, mons[firstchoice].mname); mons[which].mname, mons[firstchoice].mname);
if (yn(buf) == 'y') which = firstchoice; if (yn(buf) == 'y') which = firstchoice;
#endif
} }
whichpm = &mons[which]; whichpm = &mons[which];
} }
@@ -2127,6 +2120,5 @@ create_particular()
} }
return madeany; return madeany;
} }
#endif /* WIZARD */
/*read.c*/ /*read.c*/
-2
View File
@@ -137,9 +137,7 @@ add_rect(r)
NhRect *r; NhRect *r;
{ {
if (rect_cnt >= MAXRECT) { if (rect_cnt >= MAXRECT) {
#ifdef WIZARD
if (wizard) pline("MAXRECT may be too small."); if (wizard) pline("MAXRECT may be too small.");
#endif
return; return;
} }
/* Check that this NhRect is not included in another one */ /* Check that this NhRect is not included in another one */
-4
View File
@@ -531,9 +531,7 @@ unsigned int *stuckid, *steedid;
/* for wizard mode, issue a reminder; for others, treat it /* for wizard mode, issue a reminder; for others, treat it
as an attempt to cheat and refuse to restore this file */ as an attempt to cheat and refuse to restore this file */
pline("Saved game was not yours."); pline("Saved game was not yours.");
#ifdef WIZARD
if (!wizard) if (!wizard)
#endif
return FALSE; return FALSE;
} }
mread(fd, (genericptr_t) &context, sizeof(struct context_info)); mread(fd, (genericptr_t) &context, sizeof(struct context_info));
@@ -1008,9 +1006,7 @@ boolean ghostly;
hpid, pid); hpid, pid);
else else
Sprintf(trickbuf, "This is level %d, not %d!", dlvl, lev); Sprintf(trickbuf, "This is level %d, not %d!", dlvl, lev);
#ifdef WIZARD
if (wizard) pline1(trickbuf); if (wizard) pline1(trickbuf);
#endif
trickery(trickbuf); trickery(trickbuf);
} }
restcemetery(fd, &level.bonesinfo); restcemetery(fd, &level.bonesinfo);
-2
View File
@@ -172,7 +172,6 @@ boolean exclude_cookie;
return rumor_buf; return rumor_buf;
} }
#ifdef WIZARD
/* /*
* test that the true/false rumor boundaries are valid. * test that the true/false rumor boundaries are valid.
*/ */
@@ -266,7 +265,6 @@ rumor_check()
true_rumor_size = -1; /* don't try to open it again */ true_rumor_size = -1; /* don't try to open it again */
} }
} }
#endif
void void
outrumor(truth, mechanism) outrumor(truth, mechanism)
-4
View File
@@ -1391,12 +1391,10 @@ int lev;
if (!swapout_oldest()) if (!swapout_oldest())
return FALSE; return FALSE;
} }
# ifdef WIZARD
if (wizard) { if (wizard) {
pline("Swapping in `%s'.", from); pline("Swapping in `%s'.", from);
wait_synch(); wait_synch();
} }
# endif
copyfile(from, to); copyfile(from, to);
(void) unlink(from); (void) unlink(from);
level_info[lev].where = ACTIVE; level_info[lev].where = ACTIVE;
@@ -1423,12 +1421,10 @@ swapout_oldest() {
Sprintf(to, "%s%s", permbones, alllevels); Sprintf(to, "%s%s", permbones, alllevels);
set_levelfile_name(from, oldest); set_levelfile_name(from, oldest);
set_levelfile_name(to, oldest); set_levelfile_name(to, oldest);
# ifdef WIZARD
if (wizard) { if (wizard) {
pline("Swapping out `%s'.", from); pline("Swapping out `%s'.", from);
wait_synch(); wait_synch();
} }
# endif
copyfile(from, to); copyfile(from, to);
(void) unlink(from); (void) unlink(from);
level_info[oldest].where = SWAPPED; level_info[oldest].where = SWAPPED;
-2
View File
@@ -510,7 +510,6 @@ struct mkroom *sroom;
else if(sy == sroom->hy+1) sy--; else { else if(sy == sroom->hy+1) sy--; else {
shk_failed: shk_failed:
#ifdef DEBUG #ifdef DEBUG
# ifdef WIZARD
/* Said to happen sometimes, but I have never seen it. */ /* Said to happen sometimes, but I have never seen it. */
/* Supposedly fixed by fdoor change in mklev.c */ /* Supposedly fixed by fdoor change in mklev.c */
if(wizard) { if(wizard) {
@@ -527,7 +526,6 @@ struct mkroom *sroom;
} }
display_nhwindow(WIN_MESSAGE, FALSE); display_nhwindow(WIN_MESSAGE, FALSE);
} }
# endif
#endif #endif
return(-1); return(-1);
} }
-4
View File
@@ -15,11 +15,7 @@
/* #define DEBUG */ /* uncomment to enable code debugging */ /* #define DEBUG */ /* uncomment to enable code debugging */
#ifdef DEBUG #ifdef DEBUG
# ifdef WIZARD
#define debugpline if (wizard) pline #define debugpline if (wizard) pline
# else
#define debugpline pline
# endif
#endif #endif
#include "sp_lev.h" #include "sp_lev.h"
-4
View File
@@ -177,10 +177,8 @@ doride()
if (u.usteed) { if (u.usteed) {
dismount_steed(DISMOUNT_BYCHOICE); dismount_steed(DISMOUNT_BYCHOICE);
} else if (getdir((char *)0) && isok(u.ux+u.dx, u.uy+u.dy)) { } else if (getdir((char *)0) && isok(u.ux+u.dx, u.uy+u.dy)) {
#ifdef WIZARD
if (wizard && yn("Force the mount to succeed?") == 'y') if (wizard && yn("Force the mount to succeed?") == 'y')
forcemount = TRUE; forcemount = TRUE;
#endif
return (mount_steed(m_at(u.ux+u.dx, u.uy+u.dy), forcemount)); return (mount_steed(m_at(u.ux+u.dx, u.uy+u.dy), forcemount));
} else { } else {
return 0; return 0;
@@ -225,11 +223,9 @@ mount_steed(mtmp, force)
*/ */
if (Wounded_legs) { if (Wounded_legs) {
Your("%s are in no shape for riding.", makeplural(body_part(LEG))); Your("%s are in no shape for riding.", makeplural(body_part(LEG)));
#ifdef WIZARD
if (force && wizard && yn("Heal your legs?") == 'y') if (force && wizard && yn("Heal your legs?") == 'y')
HWounded_legs = EWounded_legs = 0; HWounded_legs = EWounded_legs = 0;
else else
#endif
return (FALSE); return (FALSE);
} }
-4
View File
@@ -8,10 +8,6 @@
/* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string; /* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string;
for usual config, WIZARD is the string; forcing WIZARD_NAME to match it for usual config, WIZARD is the string; forcing WIZARD_NAME to match it
eliminates conditional testing for which one to use in string ops */ eliminates conditional testing for which one to use in string ops */
#ifndef KR1ED
# undef WIZARD_NAME
# define WIZARD_NAME WIZARD
#endif
struct sysopt sysopt; struct sysopt sysopt;
+7 -51
View File
@@ -418,14 +418,10 @@ struct obj *scroll;
/* Disable teleportation in stronghold && Vlad's Tower */ /* Disable teleportation in stronghold && Vlad's Tower */
if (level.flags.noteleport) { if (level.flags.noteleport) {
#ifdef WIZARD
if (!wizard) { if (!wizard) {
#endif
pline("A mysterious force prevents you from teleporting!"); pline("A mysterious force prevents you from teleporting!");
return TRUE; return TRUE;
#ifdef WIZARD
} }
#endif
} }
/* don't show trap if "Sorry..." */ /* don't show trap if "Sorry..." */
@@ -433,15 +429,11 @@ struct obj *scroll;
if ((u.uhave.amulet || On_W_tower_level(&u.uz)) && !rn2(3)) { if ((u.uhave.amulet || On_W_tower_level(&u.uz)) && !rn2(3)) {
You_feel("disoriented for a moment."); You_feel("disoriented for a moment.");
#ifdef WIZARD
if (wizard && yn("Override?") != 'y') if (wizard && yn("Override?") != 'y')
#endif
return FALSE; return FALSE;
} }
if ((Teleport_control && !Stunned) if ((Teleport_control && !Stunned)
#ifdef WIZARD
|| wizard || wizard
#endif
) { ) {
if (unconscious()) { if (unconscious()) {
pline("Being unconscious, you cannot control your teleport."); pline("Being unconscious, you cannot control your teleport.");
@@ -519,40 +511,29 @@ dotele()
castit = TRUE; castit = TRUE;
break; break;
} }
#ifdef WIZARD
if (!wizard) { if (!wizard) {
#endif
if (!castit) { if (!castit) {
if (!Teleportation) if (!Teleportation)
You("don't know that spell."); You("don't know that spell.");
else You("are not able to teleport at will."); else You("are not able to teleport at will.");
return(0); return(0);
} }
#ifdef WIZARD
} }
#endif
} }
if (u.uhunger <= 100 || ACURR(A_STR) < 6) { if (u.uhunger <= 100 || ACURR(A_STR) < 6) {
#ifdef WIZARD
if (!wizard) { if (!wizard) {
#endif
You("lack the strength %s.", You("lack the strength %s.",
castit ? "for a teleport spell" : "to teleport"); castit ? "for a teleport spell" : "to teleport");
return 1; return 1;
#ifdef WIZARD
} }
#endif
} }
energy = objects[SPE_TELEPORT_AWAY].oc_level * 7 / 2 - 2; energy = objects[SPE_TELEPORT_AWAY].oc_level * 7 / 2 - 2;
if (u.uen <= energy) { if (u.uen <= energy) {
#ifdef WIZARD
if (wizard) if (wizard)
energy = u.uen; energy = u.uen;
else else {
#endif
{
You("lack the energy %s.", You("lack the energy %s.",
castit ? "for a teleport spell" : "to teleport"); castit ? "for a teleport spell" : "to teleport");
return 1; return 1;
@@ -567,10 +548,7 @@ dotele()
exercise(A_WIS, TRUE); exercise(A_WIS, TRUE);
if (spelleffects(sp_no, TRUE)) if (spelleffects(sp_no, TRUE))
return(1); return(1);
else else if (!wizard)
#ifdef WIZARD
if (!wizard)
#endif
return(0); return(0);
} else { } else {
u.uen -= energy; u.uen -= energy;
@@ -601,29 +579,19 @@ level_tele()
boolean force_dest = FALSE; boolean force_dest = FALSE;
if ((u.uhave.amulet || In_endgame(&u.uz) || In_sokoban(&u.uz)) if ((u.uhave.amulet || In_endgame(&u.uz) || In_sokoban(&u.uz))
#ifdef WIZARD && !wizard) {
&& !wizard
#endif
) {
You_feel("very disoriented for a moment."); You_feel("very disoriented for a moment.");
return; return;
} }
if ((Teleport_control && !Stunned) if ((Teleport_control && !Stunned) || wizard) {
#ifdef WIZARD
|| wizard
#endif
) {
char qbuf[BUFSZ]; char qbuf[BUFSZ];
int trycnt = 0; int trycnt = 0;
Strcpy(qbuf, "To what level do you want to teleport?"); Strcpy(qbuf, "To what level do you want to teleport?");
do { do {
if (++trycnt == 2) { if (++trycnt == 2) {
#ifdef WIZARD
if (wizard) Strcat(qbuf, " [type a number or ? for a menu]"); if (wizard) Strcat(qbuf, " [type a number or ? for a menu]");
else else Strcat(qbuf, " [type a number]");
#endif
Strcat(qbuf, " [type a number]");
} }
getlin(qbuf, buf); getlin(qbuf, buf);
if (!strcmp(buf,"\033")) { /* cancelled */ if (!strcmp(buf,"\033")) { /* cancelled */
@@ -638,7 +606,6 @@ level_tele()
pline("Oops..."); pline("Oops...");
goto random_levtport; goto random_levtport;
} }
#ifdef WIZARD
if (wizard && !strcmp(buf,"?")) { if (wizard && !strcmp(buf,"?")) {
schar destlev = 0; schar destlev = 0;
xchar destdnum = 0; xchar destdnum = 0;
@@ -661,9 +628,7 @@ level_tele()
} }
} }
force_dest = TRUE; force_dest = TRUE;
} else } else if ((newlev = lev_by_name(buf)) == 0) newlev = atoi(buf);
#endif /*WIZARD*/
if ((newlev = lev_by_name(buf)) == 0) newlev = atoi(buf);
} while (!newlev && !digit(buf[0]) && } while (!newlev && !digit(buf[0]) &&
(buf[0] != '-' || !digit(buf[1])) && (buf[0] != '-' || !digit(buf[1])) &&
trycnt < 10); trycnt < 10);
@@ -721,7 +686,6 @@ level_tele()
You1(shudder_for_moment); You1(shudder_for_moment);
return; return;
} }
#ifdef WIZARD
if (In_endgame(&u.uz)) { /* must already be wizard */ if (In_endgame(&u.uz)) { /* must already be wizard */
int llimit = dunlevs_in_dungeon(&u.uz); int llimit = dunlevs_in_dungeon(&u.uz);
@@ -734,7 +698,6 @@ level_tele()
schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0); schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0);
return; return;
} }
#endif
killer.name[0] = 0; /* still alive, so far... */ killer.name[0] = 0; /* still alive, so far... */
@@ -800,18 +763,13 @@ level_tele()
} else if (u.uz.dnum == medusa_level.dnum && } else if (u.uz.dnum == medusa_level.dnum &&
newlev >= dungeons[u.uz.dnum].depth_start + newlev >= dungeons[u.uz.dnum].depth_start +
dunlevs_in_dungeon(&u.uz)) { dunlevs_in_dungeon(&u.uz)) {
#ifdef WIZARD
if (!(wizard && force_dest)) if (!(wizard && force_dest))
#endif
find_hell(&newlevel); find_hell(&newlevel);
} else { } else {
/* if invocation did not yet occur, teleporting into /* if invocation did not yet occur, teleporting into
* the last level of Gehennom is forbidden. * the last level of Gehennom is forbidden.
*/ */
#ifdef WIZARD if (!wizard && Inhell && !u.uevent.invoked &&
if (!wizard)
#endif
if (Inhell && !u.uevent.invoked &&
newlev >= (dungeons[u.uz.dnum].depth_start + newlev >= (dungeons[u.uz.dnum].depth_start +
dunlevs_in_dungeon(&u.uz) - 1)) { dunlevs_in_dungeon(&u.uz) - 1)) {
newlev = dungeons[u.uz.dnum].depth_start + newlev = dungeons[u.uz.dnum].depth_start +
@@ -825,9 +783,7 @@ level_tele()
* we must translate newlev to a number relative to the * we must translate newlev to a number relative to the
* current dungeon. * current dungeon.
*/ */
#ifdef WIZARD
if (!(wizard && force_dest)) if (!(wizard && force_dest))
#endif
get_level(&newlevel, newlev); get_level(&newlevel, newlev);
} }
schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0); schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0);
-8
View File
@@ -1336,10 +1336,8 @@ do_storms()
* Check whether object has a timer of type timer_type. * Check whether object has a timer of type timer_type.
*/ */
#ifdef WIZARD
STATIC_DCL const char *FDECL(kind_name, (SHORT_P)); STATIC_DCL const char *FDECL(kind_name, (SHORT_P));
STATIC_DCL void FDECL(print_queue, (winid, timer_element *)); STATIC_DCL void FDECL(print_queue, (winid, timer_element *));
#endif
STATIC_DCL void FDECL(insert_timer, (timer_element *)); STATIC_DCL void FDECL(insert_timer, (timer_element *));
STATIC_DCL timer_element *FDECL(remove_timer, (timer_element **, SHORT_P, STATIC_DCL timer_element *FDECL(remove_timer, (timer_element **, SHORT_P,
ANY_P *)); ANY_P *));
@@ -1377,9 +1375,6 @@ static const ttable timeout_funcs[NUM_TIME_FUNCS] = {
}; };
#undef TTAB #undef TTAB
#if defined(WIZARD)
STATIC_OVL const char * STATIC_OVL const char *
kind_name(kind) kind_name(kind)
short kind; short kind;
@@ -1460,9 +1455,6 @@ timer_sanity_check()
} }
} }
#endif /* WIZARD */
/* /*
* Pick off timeout elements from the global queue and call their functions. * Pick off timeout elements from the global queue and call their functions.
* Do this until their time is less than or equal to the move count. * Do this until their time is less than or equal to the move count.
-2
View File
@@ -775,10 +775,8 @@ u_init()
if (discover) if (discover)
ini_inv(Wishing); ini_inv(Wishing);
#ifdef WIZARD
if (wizard) if (wizard)
read_wizkit(); read_wizkit();
#endif
#ifndef GOLDOBJ #ifndef GOLDOBJ
u.ugold0 += hidden_gold(); /* in case sack has gold in it */ u.ugold0 += hidden_gold(); /* in case sack has gold in it */
+1 -10
View File
@@ -821,9 +821,7 @@ boolean speedy;
{ {
return !P_RESTRICTED(skill) return !P_RESTRICTED(skill)
&& P_SKILL(skill) < P_MAX_SKILL(skill) && ( && P_SKILL(skill) < P_MAX_SKILL(skill) && (
#ifdef WIZARD
(wizard && speedy) || (wizard && speedy) ||
#endif
(P_ADVANCE(skill) >= (P_ADVANCE(skill) >=
(unsigned) practice_needed_to_advance(P_SKILL(skill)) (unsigned) practice_needed_to_advance(P_SKILL(skill))
&& u.skills_advanced < P_SKILL_LIMIT && u.skills_advanced < P_SKILL_LIMIT
@@ -896,10 +894,8 @@ enhance_weapon_skill()
winid win; winid win;
boolean speedy = FALSE; boolean speedy = FALSE;
#ifdef WIZARD
if (wizard && yn("Advance skills without practice?") == 'y') if (wizard && yn("Advance skills without practice?") == 'y')
speedy = TRUE; speedy = TRUE;
#endif
do { do {
/* find longest available skill name, count those that can advance */ /* find longest available skill name, count those that can advance */
@@ -972,7 +968,6 @@ enhance_weapon_skill()
prefix = (to_advance + eventually_advance + prefix = (to_advance + eventually_advance +
maxxed_cnt > 0) ? " " : ""; maxxed_cnt > 0) ? " " : "";
(void) skill_level_name(i, sklnambuf); (void) skill_level_name(i, sklnambuf);
#ifdef WIZARD
if (wizard) { if (wizard) {
if (!iflags.menu_tab_sep) if (!iflags.menu_tab_sep)
Sprintf(buf, " %s%-*s %-12s %5d(%4d)", Sprintf(buf, " %s%-*s %-12s %5d(%4d)",
@@ -984,9 +979,7 @@ enhance_weapon_skill()
prefix, P_NAME(i), sklnambuf, prefix, P_NAME(i), sklnambuf,
P_ADVANCE(i), P_ADVANCE(i),
practice_needed_to_advance(P_SKILL(i))); practice_needed_to_advance(P_SKILL(i)));
} else } else {
#endif
{
if (!iflags.menu_tab_sep) if (!iflags.menu_tab_sep)
Sprintf(buf, " %s %-*s [%s]", Sprintf(buf, " %s %-*s [%s]",
prefix, longest, P_NAME(i), sklnambuf); prefix, longest, P_NAME(i), sklnambuf);
@@ -1001,11 +994,9 @@ enhance_weapon_skill()
Strcpy(buf, (to_advance > 0) ? "Pick a skill to advance:" : Strcpy(buf, (to_advance > 0) ? "Pick a skill to advance:" :
"Current skills:"); "Current skills:");
#ifdef WIZARD
if (wizard && !speedy) if (wizard && !speedy)
Sprintf(eos(buf), " (%d slot%s available)", Sprintf(eos(buf), " (%d slot%s available)",
u.weapon_slots, plur(u.weapon_slots)); u.weapon_slots, plur(u.weapon_slots));
#endif
end_menu(win, buf); end_menu(win, buf);
n = select_menu(win, to_advance ? PICK_ONE : PICK_NONE, &selected); n = select_menu(win, to_advance ? PICK_ONE : PICK_NONE, &selected);
destroy_nhwindow(win); destroy_nhwindow(win);
-6
View File
@@ -161,10 +161,8 @@ static void process_options(int argc, char **argv)
argc--; argc--;
switch (argv[0][1]) { switch (argv[0][1]) {
case 'D': case 'D':
#ifdef WIZARD
wizard = TRUE, discover = FALSE; wizard = TRUE, discover = FALSE;
break; break;
#endif
/* otherwise fall thru to discover */ /* otherwise fall thru to discover */
case 'X': case 'X':
discover = TRUE, wizard = FALSE; discover = TRUE, wizard = FALSE;
@@ -253,12 +251,8 @@ void getlock(void)
boolean boolean
authorize_wizard_mode() authorize_wizard_mode()
{ {
#ifdef WIZARD
/* other ports validate user name or character name here */ /* other ports validate user name or character name here */
return TRUE; return TRUE;
#else
return FALSE;
#endif
} }
#ifndef __begui__ #ifndef __begui__
-4
View File
@@ -284,12 +284,8 @@ finder_file_request(void)
boolean boolean
authorize_wizard_mode() authorize_wizard_mode()
{ {
#ifdef WIZARD
/* other ports validate user name or character name here */ /* other ports validate user name or character name here */
return TRUE; return TRUE;
#else
return FALSE;
#endif
} }
/*macmain.c*/ /*macmain.c*/
+2 -13
View File
@@ -619,9 +619,7 @@ void mac_askname ()
fatal("\pCannot create mode menu"); fatal("\pCannot create mode menu");
AppendMenu(askmenu[RSRC_ASK_MODE], "\pNormal"); AppendMenu(askmenu[RSRC_ASK_MODE], "\pNormal");
AppendMenu(askmenu[RSRC_ASK_MODE], "\pExplore"); AppendMenu(askmenu[RSRC_ASK_MODE], "\pExplore");
#ifdef WIZARD
AppendMenu(askmenu[RSRC_ASK_MODE], "\pDebug"); AppendMenu(askmenu[RSRC_ASK_MODE], "\pDebug");
#endif
InsertMenu(askmenu[RSRC_ASK_MODE], hierMenu); InsertMenu(askmenu[RSRC_ASK_MODE], hierMenu);
currmode = 0; currmode = 0;
@@ -708,9 +706,7 @@ void mac_askname ()
/* Adjust the mode popup menu */ /* Adjust the mode popup menu */
CheckMenuItem(askmenu[RSRC_ASK_MODE], 1, currmode == 0); CheckMenuItem(askmenu[RSRC_ASK_MODE], 1, currmode == 0);
CheckMenuItem(askmenu[RSRC_ASK_MODE], 2, currmode == 1); CheckMenuItem(askmenu[RSRC_ASK_MODE], 2, currmode == 1);
#ifdef WIZARD
CheckMenuItem(askmenu[RSRC_ASK_MODE], 3, currmode == 2); CheckMenuItem(askmenu[RSRC_ASK_MODE], 3, currmode == 2);
#endif
/* Wait for an action on an item */ /* Wait for an action on an item */
ModalDialog(filter, &item); ModalDialog(filter, &item);
@@ -773,22 +769,17 @@ void mac_askname ()
DisposeUserItemUPP(redraw); DisposeUserItemUPP(redraw);
/* Process the mode */ /* Process the mode */
#ifdef WIZARD wizard = discover = 0;
wizard =
#endif
discover = 0;
switch (currmode) { switch (currmode) {
case 0: /* Normal */ case 0: /* Normal */
break; break;
case 1: /* Explore */ case 1: /* Explore */
discover = 1; discover = 1;
break; break;
#ifdef WIZARD
case 2: /* Debug */ case 2: /* Debug */
wizard = 1; wizard = 1;
strcpy(plname, WIZARD); strcpy(plname, WIZARD_NAME);
break; break;
#endif
default: /* Quit */ default: /* Quit */
ExitToShell(); ExitToShell();
} }
@@ -935,7 +926,6 @@ AdjustMenus(short dimMenubar)
if (newMenubar != mbarRegular) if (newMenubar != mbarRegular)
; /* we've already found its state */ ; /* we've already found its state */
#ifdef WIZARD
else if (wizard) else if (wizard)
{ {
newMenubar = mbarSpecial; newMenubar = mbarSpecial;
@@ -947,7 +937,6 @@ AdjustMenus(short dimMenubar)
SetMenuItemText(MHND_FILE, menuFilePlayMode, "\pDebug"); SetMenuItemText(MHND_FILE, menuFilePlayMode, "\pDebug");
} }
} }
#endif
else if (discover) else if (discover)
{ {
-10
View File
@@ -702,21 +702,11 @@ port_help()
# endif /* MSDOS || WIN32 */ # endif /* MSDOS || WIN32 */
#endif /* PORT_HELP */ #endif /* PORT_HELP */
/* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string;
for usual config, WIZARD is the string; forcing WIZARD_NAME to match it
eliminates conditional testing for which one to use in string ops */
#ifndef KR1ED
# undef WIZARD_NAME
# define WIZARD_NAME WIZARD
#endif
/* validate wizard mode if player has requested access to it */ /* validate wizard mode if player has requested access to it */
boolean boolean
authorize_wizard_mode() authorize_wizard_mode()
{ {
#ifdef WIZARD
if (!strcmp(plname, WIZARD_NAME)) return TRUE; if (!strcmp(plname, WIZARD_NAME)) return TRUE;
#endif
return FALSE; return FALSE;
} }
+1 -10
View File
@@ -224,13 +224,10 @@ char *argv[];
or holds a generic user name like "player" or "games" */ or holds a generic user name like "player" or "games" */
plnamesuffix(); plnamesuffix();
#ifdef WIZARD
if (wizard) { if (wizard) {
/* use character name rather than lock letter for file names */ /* use character name rather than lock letter for file names */
locknum = 0; locknum = 0;
} else } else {
#endif
{
/* suppress interrupts while processing lock file */ /* suppress interrupts while processing lock file */
(void) signal(SIGQUIT,SIG_IGN); (void) signal(SIGQUIT,SIG_IGN);
(void) signal(SIGINT,SIG_IGN); (void) signal(SIGINT,SIG_IGN);
@@ -560,12 +557,10 @@ port_help()
boolean boolean
authorize_wizard_mode() authorize_wizard_mode()
{ {
#ifdef WIZARD
struct passwd *pw = get_unix_pw(); struct passwd *pw = get_unix_pw();
if (pw && sysopt.wizards && sysopt.wizards[0]) { if (pw && sysopt.wizards && sysopt.wizards[0]) {
if(check_user_string(sysopt.wizards)) return TRUE; if(check_user_string(sysopt.wizards)) return TRUE;
} }
#endif /* WIZARD */
wiz_error_flag = TRUE; /* not being allowed into wizard mode */ wiz_error_flag = TRUE; /* not being allowed into wizard mode */
return FALSE; return FALSE;
} }
@@ -574,16 +569,12 @@ static void
wd_message() wd_message()
{ {
if (wiz_error_flag) { if (wiz_error_flag) {
#ifdef WIZARD
if (sysopt.wizards && sysopt.wizards[0]) { if (sysopt.wizards && sysopt.wizards[0]) {
char *tmp = build_english_list(sysopt.wizards); char *tmp = build_english_list(sysopt.wizards);
pline("Only user%s %s may access debug (wizard) mode.", pline("Only user%s %s may access debug (wizard) mode.",
index(sysopt.wizards, ' ')?"s":"", tmp); index(sysopt.wizards, ' ')?"s":"", tmp);
free(tmp); free(tmp);
} else } else
#else
pline("Debug mode is not available.");
#endif
pline("Entering explore/discovery mode instead."); pline("Entering explore/discovery mode instead.");
wizard = 0, discover = 1; /* (paranoia) */ wizard = 0, discover = 1; /* (paranoia) */
} else if (discover) } else if (discover)
-2
View File
@@ -311,9 +311,7 @@ int wt;
#endif #endif
#ifndef NO_SIGNAL #ifndef NO_SIGNAL
(void) signal(SIGINT, (SIG_RET_TYPE) done1); (void) signal(SIGINT, (SIG_RET_TYPE) done1);
# ifdef WIZARD
if(wizard) (void) signal(SIGQUIT,SIG_DFL); if(wizard) (void) signal(SIGQUIT,SIG_DFL);
# endif
#endif #endif
if(wt) { if(wt) {
raw_print(""); raw_print("");
+3 -14
View File
@@ -136,13 +136,10 @@ char *argv[];
or holds a generic user name like "player" or "games" */ or holds a generic user name like "player" or "games" */
plnamesuffix(); plnamesuffix();
#ifdef WIZARD
if (wizard) { if (wizard) {
/* use character name rather than lock letter for file names */ /* use character name rather than lock letter for file names */
locknum = 0; locknum = 0;
} else } else {
#endif
{
/* suppress interrupts while processing lock file */ /* suppress interrupts while processing lock file */
(void) signal(SIGQUIT, SIG_IGN); (void) signal(SIGQUIT, SIG_IGN);
(void) signal(SIGINT, SIG_IGN); (void) signal(SIGINT, SIG_IGN);
@@ -416,12 +413,10 @@ genericptr_t sigargs, mechargs; /* [0] is argc, [1..argc] are the real args */
|| (condition >= SS$_ASTFLT && condition <= SS$_TBIT) || (condition >= SS$_ASTFLT && condition <= SS$_TBIT)
|| (condition >= SS$_ARTRES && condition <= SS$_INHCHME)) { || (condition >= SS$_ARTRES && condition <= SS$_INHCHME)) {
program_state.done_hup = TRUE; /* pretend hangup has been attempted */ program_state.done_hup = TRUE; /* pretend hangup has been attempted */
# if defined(WIZARD) && !defined(BETA) # ifndef BETA
if (wizard) if (wizard)
# endif /*WIZARD && !BETA*/ # endif /* !BETA */
# if defined(WIZARD) || defined(BETA)
abort(); /* enter the debugger */ abort(); /* enter the debugger */
# endif /*WIZARD || BETA*/
} }
return SS$_RESIGNAL; return SS$_RESIGNAL;
} }
@@ -454,9 +449,7 @@ port_help()
boolean boolean
authorize_wizard_mode() authorize_wizard_mode()
{ {
#ifdef WIZARD
if (!strcmpi(nh_getenv("USER"), WIZARD_NAME)) return TRUE; if (!strcmpi(nh_getenv("USER"), WIZARD_NAME)) return TRUE;
#endif
wiz_error_flag = TRUE; /* not being allowed into wizard mode */ wiz_error_flag = TRUE; /* not being allowed into wizard mode */
return FALSE; return FALSE;
} }
@@ -465,12 +458,8 @@ static void
wd_message() wd_message()
{ {
if (wiz_error_flag) { if (wiz_error_flag) {
#ifdef WIZARD
pline("Only user \"%s\" may access debug (wizard) mode.", pline("Only user \"%s\" may access debug (wizard) mode.",
WIZARD_NAME); WIZARD_NAME);
#else
pline("Debug mode is not available.");
#endif
pline("Entering explore/discovery mode instead."); pline("Entering explore/discovery mode instead.");
wizard = 0, discover = 1; /* (paranoia) */ wizard = 0, discover = 1; /* (paranoia) */
} else if (discover) } else if (discover)
-2
View File
@@ -367,9 +367,7 @@ hack_resume(screen_manip)
boolean screen_manip; boolean screen_manip;
{ {
(void) signal(SIGINT, (SIG_RET_TYPE) done1); (void) signal(SIGINT, (SIG_RET_TYPE) done1);
# ifdef WIZARD
if (wizard) (void) signal(SIGQUIT,SIG_DFL); if (wizard) (void) signal(SIGQUIT,SIG_DFL);
# endif
if (screen_manip) if (screen_manip)
resume_nhwindows(); /* setup terminal modes, redraw screen, &c */ resume_nhwindows(); /* setup terminal modes, redraw screen, &c */
} }
-4
View File
@@ -296,7 +296,6 @@ NHCmdPadCell cells_layout_lookup[NH_CMDPAD_CELLNUM] =
{ -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 } { -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 }
}; };
#ifdef WIZARD
/* wizard mode layout */ /* wizard mode layout */
NHCmdPadCell cells_layout_wizard[NH_CMDPAD_CELLNUM] = NHCmdPadCell cells_layout_wizard[NH_CMDPAD_CELLNUM] =
{ {
@@ -313,7 +312,6 @@ NHCmdPadCell cells_layout_wizard[NH_CMDPAD_CELLNUM] =
{ -1, "", "", -NH_CMDPAD_FONT_NORMAL, NH_CELL_REG, 1, (void*)-1 }, { -1, "", "", -NH_CMDPAD_FONT_NORMAL, NH_CELL_REG, 1, (void*)-1 },
{ -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 } { -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 }
}; };
#endif
#else /* !WIN_CE_SMARTPHONE */ #else /* !WIN_CE_SMARTPHONE */
@@ -557,13 +555,11 @@ void register_command_window_class()
nhcmdlayout_init(plt, cells_layout_lookup); nhcmdlayout_init(plt, cells_layout_lookup);
nhcmdset_add(nhcmdset_current, plt); nhcmdset_add(nhcmdset_current, plt);
#ifdef WIZARD
if( wizard ) { if( wizard ) {
plt = nhcmdlayout_create("Wizard Mode", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); plt = nhcmdlayout_create("Wizard Mode", NH_CMDPAD_ROWS, NH_CMDPAD_COLS);
nhcmdlayout_init(plt, cells_layout_wizard); nhcmdlayout_init(plt, cells_layout_wizard);
nhcmdset_add(nhcmdset_current, plt); nhcmdset_add(nhcmdset_current, plt);
} }
#endif
#else /* ! WIN_CE_SMARTPHONE */ #else /* ! WIN_CE_SMARTPHONE */
plt = nhcmdlayout_create("lowercase", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); plt = nhcmdlayout_create("lowercase", NH_CMDPAD_ROWS, NH_CMDPAD_COLS);
-2
View File
@@ -340,10 +340,8 @@ register char *s;
void win32_abort() void win32_abort()
{ {
#ifdef WIZARD
if (wizard) if (wizard)
DebugBreak(); DebugBreak();
#endif
abort(); abort();
} }
+1 -1
View File
@@ -417,7 +417,7 @@ int *x, *y, *mod;
static void static void
really_move_cursor() really_move_cursor()
{ {
#if defined(PORT_DEBUG) && defined(WIZARD) #ifdef PORT_DEBUG
char oldtitle[BUFSZ], newtitle[BUFSZ]; char oldtitle[BUFSZ], newtitle[BUFSZ];
if (display_cursor_info && wizard) { if (display_cursor_info && wizard) {
oldtitle[0] = '\0'; oldtitle[0] = '\0';
-2
View File
@@ -236,7 +236,6 @@ extern void NDECL(backsp);
void win32_abort() void win32_abort()
{ {
#ifdef WIZARD
if (wizard) { if (wizard) {
# ifdef WIN32CON # ifdef WIN32CON
int c, ci, ct; int c, ci, ct;
@@ -263,7 +262,6 @@ void win32_abort()
DebugBreak(); DebugBreak();
# endif # endif
} }
#endif
abort(); abort();
} }
-3
View File
@@ -1233,9 +1233,6 @@ static const char *build_opts[] = {
#ifdef DLB #ifdef DLB
"data librarian", "data librarian",
#endif #endif
#ifdef WIZARD
"debug mode",
#endif
#ifdef EXP_ON_BOTL #ifdef EXP_ON_BOTL
"experience points on status line", "experience points on status line",
#endif #endif
-4
View File
@@ -257,11 +257,7 @@ static struct grep_var grep_vars[]={
#else #else
{"WIN_CE_SMARTPHONE", 0}, {"WIN_CE_SMARTPHONE", 0},
#endif #endif
#if defined(WIZARD)
{"WIZARD", 1}, {"WIZARD", 1},
#else
{"WIZARD", 0},
#endif
#if defined(X11_GRAPHICS) #if defined(X11_GRAPHICS)
{"X11_GRAPHICS", 1}, {"X11_GRAPHICS", 1},
#else #else
+1 -1
View File
@@ -18,7 +18,7 @@
# Game Features: # Game Features:
@feature = qw/ZEROCOMP USE_TILES ASCIIGRAPH CLIPPING TEXTCOLOR @feature = qw/ZEROCOMP USE_TILES ASCIIGRAPH CLIPPING TEXTCOLOR
COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS WIZARD COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS
SAFERHANGUP MFLOPPY NOCWD_ASSUMPTIONS SAFERHANGUP MFLOPPY NOCWD_ASSUMPTIONS
VAR_PLAYGROUND DLB SHELL SUSPEND NOSAVEONHANGUP HANGUPHANDLING VAR_PLAYGROUND DLB SHELL SUSPEND NOSAVEONHANGUP HANGUPHANDLING
BSD_JOB_CONTROL MAIL POSIX_JOB_CONTROL INSURANCE BSD_JOB_CONTROL MAIL POSIX_JOB_CONTROL INSURANCE