From: Sean Hunt Date: Sat, 14 Feb 2015 04:46:47 +0000 (-0500) Subject: Make REINCARNATION unconditional. X-Git-Tag: NetHack-3.6.0_RC01~667 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1edadd1d482e73cd71ab783a9ed08f4a243e0094;p=nethack Make REINCARNATION unconditional. There is a lot of code affected by this, and Pat Rankin correctly observes that it would be better to store roguelike as a level flag rather than just using Is_rogue_level. A note for the future. --- diff --git a/dat/dungeon.def b/dat/dungeon.def index b881884f5..bccd31b85 100644 --- a/dat/dungeon.def +++ b/dat/dungeon.def @@ -19,8 +19,8 @@ DUNGEON: "The Dungeons of Doom" "D" (25, 5) ALIGNMENT: unaligned BRANCH: "The Gnomish Mines" @ (2, 3) -%REINCARNATION LEVEL: "rogue" "R" @ (15, 4) -%REINCARNATION LEVELDESC: roguelike +LEVEL: "rogue" "R" @ (15, 4) +LEVELDESC: roguelike LEVEL: "oracle" "O" @ (5, 5) LEVALIGN: neutral CHAINBRANCH: "Sokoban" "oracle" + (1, 0) up diff --git a/include/config.h b/include/config.h index c9b17524d..bcc8e9903 100644 --- a/include/config.h +++ b/include/config.h @@ -420,7 +420,6 @@ typedef unsigned char uchar; /* dungeon features */ /* dungeon levels */ #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ -#define REINCARNATION /* Special Rogue-like levels */ /* monsters & objects */ #define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ /* I/O */ diff --git a/include/decl.h b/include/decl.h index bfe3052db..8276c6022 100644 --- a/include/decl.h +++ b/include/decl.h @@ -46,9 +46,7 @@ E NEARDATA int in_doagain; E struct dgn_topology { /* special dungeon levels for speed */ d_level d_oracle_level; d_level d_bigroom_level; /* unused */ -#ifdef REINCARNATION d_level d_rogue_level; -#endif d_level d_medusa_level; d_level d_stronghold_level; d_level d_valley_level; @@ -75,9 +73,7 @@ E struct dgn_topology { /* special dungeon levels for speed */ /* macros for accesing the dungeon levels by their old names */ #define oracle_level (dungeon_topology.d_oracle_level) #define bigroom_level (dungeon_topology.d_bigroom_level) -#ifdef REINCARNATION #define rogue_level (dungeon_topology.d_rogue_level) -#endif #define medusa_level (dungeon_topology.d_medusa_level) #define stronghold_level (dungeon_topology.d_stronghold_level) #define valley_level (dungeon_topology.d_valley_level) diff --git a/include/dungeon.h b/include/dungeon.h index 2aac7f39e..d80d22a7d 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -232,9 +232,7 @@ typedef struct mapseen { Bitfield(valley, 1); Bitfield(msanctum, 1); Bitfield(ludios, 1); -# ifdef REINCARNATION Bitfield(roguelevel, 1); -# endif } flags; /* custom naming */ char *custom; diff --git a/include/extern.h b/include/extern.h index 667d598d1..6f0ad015f 100644 --- a/include/extern.h +++ b/include/extern.h @@ -399,9 +399,7 @@ E char *FDECL(distant_monnam, (struct monst *,int,char *)); E const char *NDECL(rndmonnam); E const char *FDECL(hcolor, (const char *)); E const char *NDECL(rndcolor); -#ifdef REINCARNATION E const char *NDECL(roguename); -#endif E struct obj *FDECL(realloc_obj, (struct obj *, int, genericptr_t, int, const char *)); E char *FDECL(coyotename, (struct monst *,char *)); @@ -519,9 +517,7 @@ E int FDECL(def_char_to_monclass, (CHAR_P)); #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) E void FDECL(switch_symbols, (int)); E void FDECL(assign_graphics, (int)); -#ifdef REINCARNATION E void NDECL(init_r_symbols); -#endif E void NDECL(init_symbols); E void NDECL(init_showsyms); E void NDECL(init_l_symbols); @@ -702,11 +698,9 @@ E void FDECL(explode_oil, (struct obj *,int,int)); /* ### extralev.c ### */ -#ifdef REINCARNATION E void NDECL(makeroguerooms); E void FDECL(corr, (int,int)); E void NDECL(makerogueghost); -#endif /* ### files.c ### */ diff --git a/src/detect.c b/src/detect.c index db280b819..93db6c77c 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1059,12 +1059,10 @@ struct rm *lev; { int newmask = lev->doormask & ~WM_MASK; -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) /* rogue didn't have doors, only doorways */ newmask = D_NODOOR; else -#endif /* newly exposed door is closed */ if (!(newmask & D_LOCKED)) newmask |= D_CLOSED; diff --git a/src/do.c b/src/do.c index 35b0b9c40..e0fe5a5c3 100644 --- a/src/do.c +++ b/src/do.c @@ -1143,10 +1143,8 @@ boolean at_stairs, falling, portal; #endif } -#ifdef REINCARNATION if (Is_rogue_level(newlevel) || Is_rogue_level(&u.uz)) assign_graphics(Is_rogue_level(newlevel) ? ROGUESET : PRIMARY); -#endif #ifdef USE_TILES substitute_tiles(newlevel); #endif @@ -1411,10 +1409,8 @@ boolean at_stairs, falling, portal; } } } else { -#ifdef REINCARNATION if (new && Is_rogue_level(&u.uz)) You("enter what seems to be an older, more primitive world."); -#endif /* main dungeon message from your quest leader */ if (!In_quest(&u.uz0) && at_dgn_entrance("The Quest") && !(u.uevent.qcompleted || u.uevent.qexpelled || diff --git a/src/do_name.c b/src/do_name.c index ea5b64b8b..4face203e 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1057,7 +1057,6 @@ const char *mname; return FALSE; } -#ifdef REINCARNATION const char * roguename() /* Name of a Rogue player */ { @@ -1075,7 +1074,6 @@ roguename() /* Name of a Rogue player */ return rn2(3) ? (rn2(2) ? "Michael Toy" : "Kenneth Arnold") : "Glenn Wichman"; } -#endif /* REINCARNATION */ static NEARDATA const char * const hcolors[] = { "ultraviolet", "infrared", "bluish-orange", diff --git a/src/dogmove.c b/src/dogmove.c index 526f40454..4300fb8de 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -673,9 +673,7 @@ register int after; /* this is extra fast monster movement */ } if (is_giant(mtmp->data)) allowflags |= BUSTDOOR; if (tunnels(mtmp->data) -#ifdef REINCARNATION && !Is_rogue_level(&u.uz) /* same restriction as m_move() */ -#endif ) allowflags |= ALLOW_DIG; cnt = mfndpos(mtmp, poss, info, allowflags); diff --git a/src/drawing.c b/src/drawing.c index 80e82133f..3d94d8803 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -27,9 +27,7 @@ int currentgraphics = 0; nhsym showsyms[SYM_MAX] = DUMMY; /* symbols to be displayed */ nhsym l_syms[SYM_MAX] = DUMMY; /* loaded symbols */ -#ifdef REINCARNATION nhsym r_syms[SYM_MAX] = DUMMY; /* rogue symbols */ -#endif nhsym warnsyms[WARNCOUNT] = DUMMY; /* the current warning display symbols */ const char invisexplain[] = "remembered, unseen, creature"; @@ -234,7 +232,6 @@ const struct symdef defsyms[MAXPCHARS] = { {'/', "", C(CLR_ORANGE)}, /* explosion bottom right */ }; -#ifdef REINCARNATION /* default rogue level symbols */ static const uchar def_r_oc_syms[MAXOCLASSES] = { /* 0*/ '\0', @@ -256,7 +253,6 @@ static const uchar def_r_oc_syms[MAXOCLASSES] = { CHAIN_SYM, VENOM_SYM }; -#endif #undef C @@ -306,10 +302,10 @@ def_char_to_monclass(ch) * Sets the current display symbols, the * loadable symbols to the default NetHack * symbols, including the r_syms rogue level - * symbols if REINCARNATION is defined. - * This would typically be done immediately - * after execution begins. Any previously - * loaded external symbol sets are discarded. + * symbols. This would typically be done + * immediately after execution begins. Any + * previously loaded external symbol sets are + * discarded. * * switch_symbols(arg) * Called to swap in new current display symbols @@ -350,9 +346,7 @@ init_symbols() { init_l_symbols(); init_showsyms(); -#ifdef REINCARNATION init_r_symbols(); -#endif } void @@ -410,7 +404,6 @@ init_l_symbols() #endif } -#ifdef REINCARNATION void init_r_symbols() { @@ -448,7 +441,6 @@ init_r_symbols() */ # endif } -#endif /*REINCARNATION*/ void assign_graphics(whichset) @@ -457,7 +449,6 @@ int whichset; register int i; switch(whichset) { -# ifdef REINCARNATION case ROGUESET: /* Adjust graphics display characters on Rogue levels */ @@ -469,7 +460,6 @@ int whichset; # endif currentgraphics = ROGUESET; break; -# endif case PRIMARY: default: @@ -518,7 +508,6 @@ int val; l_syms[symp->idx] = val; } -# ifdef REINCARNATION void update_r_symset(symp, val) struct symparse *symp; @@ -526,7 +515,6 @@ int val; { r_syms[symp->idx] = val; } -# endif /* REINCARNATION */ void clear_symsetentry(which_set, name_too) diff --git a/src/dungeon.c b/src/dungeon.c index d87faa15e..c08d195af 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -680,9 +680,7 @@ struct level_map { { "medusa", &medusa_level }, { "oracle", &oracle_level }, { "orcus", &orcus_level }, -#ifdef REINCARNATION { "rogue", &rogue_level }, -#endif { "sanctum", &sanctum_level }, { "valley", &valley_level }, { "water", &water_level }, @@ -2086,9 +2084,7 @@ mapseen *mptr; if (mptr->flags.unreachable || mptr->flags.forgot) return FALSE; /* level is of interest if it has an auto-generated annotation */ if (mptr->flags.oracle || mptr->flags.bigroom || -# ifdef REINCARNATION mptr->flags.roguelevel || -# endif mptr->flags.castle || mptr->flags.valley || mptr->flags.msanctum) return TRUE; /* when in Sokoban, list all sokoban levels visited; when not in it, @@ -2151,9 +2147,7 @@ recalc_mapseen() mptr->flags.bigroom = Is_bigroom(&u.uz); else if (mptr->flags.forgot) mptr->flags.bigroom = 0; -# ifdef REINCARNATION mptr->flags.roguelevel = Is_rogue_level(&u.uz); -# endif mptr->flags.oracle = 0; /* recalculated during room traversal below */ mptr->flags.castletune = 0; /* flags.castle, flags.valley, flags.msanctum retain previous value */ @@ -2650,10 +2644,8 @@ boolean printdun; mptr->flags.sokosolved ? "Solved" : "Unsolved"); } else if (mptr->flags.bigroom) { Sprintf(buf, "%sA very big room.", PREFIX); -# ifdef REINCARNATION } else if (mptr->flags.roguelevel) { Sprintf(buf, "%sA primitive area.", PREFIX); -# endif } else if (on_level(&mptr->lev, &qstart_level)) { Sprintf(buf, "%sHome%s.", PREFIX, mptr->flags.unreachable ? " (no way back...)" : ""); diff --git a/src/extralev.c b/src/extralev.c index 597b23e72..821e5794f 100644 --- a/src/extralev.c +++ b/src/extralev.c @@ -9,8 +9,6 @@ #include "hack.h" -#ifdef REINCARNATION - struct rogueroom { xchar rlx, rly; xchar dx, dy; @@ -336,6 +334,5 @@ makerogueghost() ghostobj->known = TRUE; } } -#endif /* REINCARNATION */ /*extralev.c*/ diff --git a/src/files.c b/src/files.c index 4b72c754d..f667b8093 100644 --- a/src/files.c +++ b/src/files.c @@ -2752,11 +2752,8 @@ int which_set; /* matches desired one */ chosen_symset_start = TRUE; /* these init_*() functions clear symset fields too */ -# ifdef REINCARNATION if (which_set == ROGUESET) init_r_symbols(); - else -# endif - if (which_set == PRIMARY) init_l_symbols(); + else if (which_set == PRIMARY) init_l_symbols(); } break; case 1: @@ -2808,11 +2805,8 @@ int which_set; if (chosen_symset_start) chosen_symset_end = FALSE; chosen_symset_start = FALSE; -# ifdef REINCARNATION if (which_set == ROGUESET) init_r_symbols(); - else -# endif - if (which_set == PRIMARY) init_l_symbols(); + else if (which_set == PRIMARY) init_l_symbols(); } } break; @@ -2822,12 +2816,9 @@ int which_set; if (chosen_symset_start) { if (which_set == PRIMARY) { update_l_symset(symp, val); - } -# ifdef REINCARNATION - else if (which_set == ROGUESET) { + } else if (which_set == ROGUESET) { update_r_symset(symp, val); } -# endif } } } diff --git a/src/hack.c b/src/hack.c index 1bbfa1977..545c4c4aa 100644 --- a/src/hack.c +++ b/src/hack.c @@ -2356,11 +2356,9 @@ int x, y; struct rm *lev_p = &levl[x][y]; if (!IS_DOOR(lev_p->typ)) return FALSE; -#ifdef REINCARNATION /* all rogue level doors are doorless but disallow diagonal access, so we treat them as if their non-existant doors were actually present */ if (Is_rogue_level(&u.uz)) return FALSE; -#endif return !(lev_p->doormask & ~(D_NODOOR|D_BROKEN)); } diff --git a/src/lock.c b/src/lock.c index 2ba1d51b7..73dc8c159 100644 --- a/src/lock.c +++ b/src/lock.c @@ -831,7 +831,6 @@ int x, y; switch(otmp->otyp) { case WAN_LOCKING: case SPE_WIZARD_LOCK: -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { boolean vis = cansee(x,y); /* Can't have real locking in Rogue, so just hide doorway */ @@ -849,7 +848,6 @@ int x, y; newsym(x,y); return TRUE; } -#endif if (obstructed(x,y,mysterywand)) return FALSE; /* Don't allow doors to close over traps. This is for pits */ /* & trap doors, but is it ever OK for anything else? */ diff --git a/src/makemon.c b/src/makemon.c index 72f3ae6b9..44fcb79a0 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -5,9 +5,7 @@ #include "hack.h" -#ifdef REINCARNATION #include -#endif STATIC_VAR NEARDATA struct monst zeromonst; @@ -160,9 +158,7 @@ register struct monst *mtmp; register int mm = monsndx(ptr); struct obj *otmp; -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) return; -#endif /* * first a few special cases: * @@ -481,9 +477,7 @@ register struct monst *mtmp; register int cnt; register struct obj *otmp; register struct permonst *ptr = mtmp->data; -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) return; -#endif /* * Soldiers get armour & rations - armour approximates their ac. * Nymphs may get mirror or potion of object detection. @@ -1279,9 +1273,7 @@ rndmonst() if (rndmonst_state.choice_count < 0) { /* need to recalculate */ int zlevel, minmlev, maxmlev; boolean elemlevel; -#ifdef REINCARNATION boolean upper; -#endif rndmonst_state.choice_count = 0; /* look for first common monster */ @@ -1301,9 +1293,7 @@ rndmonst() minmlev = zlevel / 6; /* determine the level of the strongest monster to make. */ maxmlev = (zlevel + u.ulevel) / 2; -#ifdef REINCARNATION upper = Is_rogue_level(&u.uz); -#endif elemlevel = In_endgame(&u.uz) && !Is_astralevel(&u.uz); /* @@ -1315,9 +1305,7 @@ rndmonst() rndmonst_state.mchoices[mndx] = 0; if (tooweak(mndx, minmlev) || toostrong(mndx, maxmlev)) continue; -#ifdef REINCARNATION if (upper && !isupper(def_monsyms[(int)(ptr->mlet)].sym)) continue; -#endif if (elemlevel && wrong_elem_type(ptr)) continue; if (uncommon(mndx)) continue; if (Inhell && (ptr->geno & G_NOHELL)) continue; @@ -1825,15 +1813,9 @@ register struct monst *mtmp; levl[mx-1][my].typ == TDWALL || levl[mx-1][my].typ == CROSSWALL|| levl[mx-1][my].typ == TUWALL )) -#ifdef REINCARNATION appear = Is_rogue_level(&u.uz) ? S_hwall : S_hcdoor; else appear = Is_rogue_level(&u.uz) ? S_vwall : S_vcdoor; -#else - appear = S_hcdoor; - else - appear = S_vcdoor; -#endif if(!mtmp->minvis || See_invisible) block_point(mx,my); /* vision */ } else if (level.flags.is_maze_lev && !In_sokoban(&u.uz) && rn2(2)) { diff --git a/src/mapglyph.c b/src/mapglyph.c index b0dfa2a66..f1adae27a 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -34,9 +34,9 @@ int explcolors[] = { #define pet_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR #define warn_color(n) color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR #define explode_color(n) color = iflags.use_color ? explcolors[n] : NO_COLOR -# if defined(REINCARNATION) && defined(LOADSYMSETS) -# define ROGUE_COLOR -# endif +#ifdef LOADSYMSETS +# define ROGUE_COLOR +#endif #else /* no text color */ @@ -236,14 +236,10 @@ unsigned *ospecial; ch = showsyms[idx]; #ifdef TEXTCOLOR /* Turn off color if no color defined, or rogue level w/o PC graphics. */ -# ifdef REINCARNATION -# ifdef ROGUE_COLOR +# ifdef ROGUE_COLOR if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color)) -# else - if (!has_color(color) || Is_rogue_level(&u.uz)) -# endif # else - if (!has_color(color)) + if (!has_color(color) || Is_rogue_level(&u.uz)) # endif color = NO_COLOR; #endif diff --git a/src/mhitu.c b/src/mhitu.c index 89cd68968..ad68b2d31 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -654,9 +654,7 @@ mattacku(mtmp) break; case AT_WEAP: if(range2) { -#ifdef REINCARNATION if (!Is_rogue_level(&u.uz)) -#endif thrwmu(mtmp); } else { int hittmp = 0; diff --git a/src/mklev.c b/src/mklev.c index 1d895dc2c..1bba98d61 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -400,11 +400,9 @@ register int type; levl[x][y].doormask = (shdoor ? D_ISOPEN : D_NODOOR); #endif -#ifdef REINCARNATION /* also done in roguecorr(); doing it here first prevents making mimics in place of trapped doors on rogue level */ if (Is_rogue_level(&u.uz)) levl[x][y].doormask = D_NODOOR; -#endif if(levl[x][y].doormask & D_TRAPPED) { struct monst *mtmp; @@ -627,11 +625,7 @@ makelevel() register s_level *slev = Is_special(&u.uz); /* check for special levels */ -#ifdef REINCARNATION if (slev && !Is_rogue_level(&u.uz)) -#else - if (slev) -#endif { makemaz(slev->proto); return; @@ -663,12 +657,10 @@ makelevel() /* otherwise, fall through - it's a "regular" level. */ -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { makeroguerooms(); makerogueghost(); } else -#endif makerooms(); sort_rooms(); @@ -694,9 +686,7 @@ makelevel() branchp = Is_branchlev(&u.uz); /* possible dungeon branch */ room_threshold = branchp ? 4 : 3; /* minimum number of rooms needed to allow a random special room */ -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) goto skip0; -#endif makecorridors(); make_niches(); @@ -753,9 +743,7 @@ makelevel() !(mvitals[PM_COCKATRICE].mvflags & G_GONE)) mkroom(COCKNEST); } -#ifdef REINCARNATION skip0: -#endif /* Place multi-dungeon branch. */ place_branch(branchp, 0, 0); @@ -784,9 +772,7 @@ skip0: mktrap(0,0,croom,(coord*)0); if (!goldseen && !rn2(3)) (void) mkgold(0L, somex(croom), somey(croom)); -#ifdef REINCARNATION if(Is_rogue_level(&u.uz)) goto skip_nonrogue; -#endif if(!rn2(10)) mkfount(0,croom); if(!rn2(60)) mksink(croom); if(!rn2(60)) mkaltar(croom); @@ -822,9 +808,7 @@ skip0: } } -#ifdef REINCARNATION skip_nonrogue: -#endif if(!rn2(3)) { (void) mkobj_at(0, somex(croom), somey(croom), TRUE); tryct = 0; @@ -863,9 +847,7 @@ mineralize() /* determine if it is even allowed; almost all special levels are excluded */ if (In_hell(&u.uz) || In_V_tower(&u.uz) || -#ifdef REINCARNATION Is_rogue_level(&u.uz) || -#endif level.flags.arboreal || ((sp = Is_special(&u.uz)) != 0 && !Is_oracle_level(&u.uz) && (!In_mines(&u.uz) || sp->flags.town) @@ -983,10 +965,8 @@ register struct mkroom *croom; if ((int) levl[lowx][lowy].roomno == roomno || croom->irregular) return; #ifdef SPECIALIZATION -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) do_ordinary = TRUE; /* vision routine helper */ -# endif if ((rtype != OROOM) || do_ordinary) #endif { @@ -1207,7 +1187,6 @@ coord *tm; if (num > 0 && num < TRAPNUM) { kind = num; -#ifdef REINCARNATION } else if (Is_rogue_level(&u.uz)) { switch (rn2(7)) { default: kind = BEAR_TRAP; break; /* 0 */ @@ -1218,7 +1197,6 @@ coord *tm; case 5: kind = SLP_GAS_TRAP; break; case 6: kind = RUST_TRAP; break; } -#endif } else if (Inhell && !rn2(5)) { /* bias the frequency of fire traps in Gehennom */ kind = FIRE_TRAP; diff --git a/src/mkobj.c b/src/mkobj.c index 1edb34977..698018e9f 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -52,7 +52,6 @@ const struct icp boxiprobs[] = { { 1, AMULET_CLASS} }; -#ifdef REINCARNATION const struct icp rogueprobs[] = { {12, WEAPON_CLASS}, {12, ARMOR_CLASS}, @@ -62,7 +61,6 @@ const struct icp rogueprobs[] = { { 5, WAND_CLASS}, { 5, RING_CLASS} }; -#endif const struct icp hellprobs[] = { {20, WEAPON_CLASS}, @@ -222,10 +220,8 @@ boolean artif; if(oclass == RANDOM_CLASS) { const struct icp *iprobs = -#ifdef REINCARNATION (Is_rogue_level(&u.uz)) ? (const struct icp *)rogueprobs : -#endif Inhell ? (const struct icp *)hellprobs : (const struct icp *)mkobjprobs; diff --git a/src/mon.c b/src/mon.c index 4ed4b168c..2befc3e5b 100644 --- a/src/mon.c +++ b/src/mon.c @@ -28,14 +28,9 @@ STATIC_DCL boolean FDECL(validvamp, (struct monst *,int *,int)); #endif STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int)); -#ifdef REINCARNATION #define LEVEL_SPECIFIC_NOCORPSE(mdat) \ (Is_rogue_level(&u.uz) || \ (level.flags.graveyard && is_undead(mdat) && rn2(3))) -#else -#define LEVEL_SPECIFIC_NOCORPSE(mdat) \ - (level.flags.graveyard && is_undead(mdat) && rn2(3)) -#endif #if 0 /* part of the original warning code which was replaced in 3.3.1 */ @@ -1048,9 +1043,7 @@ nexttry: /* eels prefer the water, but if there is no water nearby, if (nx != x && ny != y && (nodiag || (IS_DOOR(nowtyp) && (levl[x][y].doormask & ~D_BROKEN)) || (IS_DOOR(ntyp) && (levl[nx][ny].doormask & ~D_BROKEN)) || -#ifdef REINCARNATION ((IS_DOOR(nowtyp) || IS_DOOR(ntyp)) && Is_rogue_level(&u.uz)) || -#endif /* mustn't pass between adjacent long worm segments, but can attack that way */ (m_at(x, ny) && m_at(nx, y) && worm_cross(x, y, nx, ny) && diff --git a/src/monmove.c b/src/monmove.c index cc18bcd3c..dd7315346 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -680,9 +680,7 @@ register int after; /* Not necessary if m_move called from this file, but necessary in * other calls of m_move (ex. leprechauns dodging) */ -#ifdef REINCARNATION if (!Is_rogue_level(&u.uz)) -#endif can_tunnel = tunnels(ptr); can_open = !(nohands(ptr) || verysmall(ptr)); can_unlock = ((can_open && monhaskey(mtmp, TRUE)) || @@ -804,11 +802,7 @@ not_special: } } - if ((!mtmp->mpeaceful || !rn2(10)) -#ifdef REINCARNATION - && (!Is_rogue_level(&u.uz)) -#endif - ) { + if ((!mtmp->mpeaceful || !rn2(10)) && (!Is_rogue_level(&u.uz))) { boolean in_line = lined_up(mtmp) && (distmin(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy) <= (throws_rocks(youmonst.data) ? 20 : ACURRSTR/2+1) diff --git a/src/muse.c b/src/muse.c index ec4bc55ab..855a91887 100644 --- a/src/muse.c +++ b/src/muse.c @@ -1080,9 +1080,7 @@ struct monst *mtmp; unsolid(mtmp->data) || !rn2(10)) && dist2(mtmp->mx,mtmp->my,mtmp->mux,mtmp->muy) <= 2 && mtmp->mcansee && haseyes(mtmp->data) -#ifdef REINCARNATION && !Is_rogue_level(&u.uz) -#endif && (!In_endgame(&u.uz) || Is_earthlevel(&u.uz))) { m.offensive = obj; m.has_offense = MUSE_SCR_EARTH; diff --git a/src/options.c b/src/options.c index 18966efb5..8504a2c3e 100644 --- a/src/options.c +++ b/src/options.c @@ -369,14 +369,10 @@ static struct Comp_Opt DISP_IN_GAME}, #endif { "roguesymset", "load a set of rogue display symbols from the symbols file", 70, -#ifdef REINCARNATION -# ifdef LOADSYMSETS +#ifdef LOADSYMSETS SET_IN_GAME }, -# else - DISP_IN_GAME}, -# endif #else - SET_IN_FILE}, + DISP_IN_GAME}, #endif { "suppress_alert", "suppress alerts about version-specific features", 8, SET_IN_GAME }, @@ -1417,7 +1413,6 @@ boolean tinitial, tfrom_file; fullname = "roguesymset"; if (match_optname(opts, fullname, 7, TRUE)) { -#if defined(REINCARNATION) && defined(LOADSYMSETS) if (duplicate) complain_about_duplicate(opts,1); if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_opt(opts, FALSE)) != 0) { @@ -1434,7 +1429,6 @@ boolean tinitial, tfrom_file; need_redraw = TRUE; } } -#endif return; } @@ -2594,10 +2588,8 @@ goodfruit: wait_synch(); } else { switch_symbols(TRUE); -# ifdef REINCARNATION if (!initial && Is_rogue_level(&u.uz)) assign_graphics(ROGUESET); -# endif } } # endif /*LOADSYMSETS*/ @@ -3449,16 +3441,10 @@ boolean setinitial,setfromfile; #endif int chosen = -2, which_set; -#ifdef REINCARNATION if (rogueflag) which_set = ROGUESET; else -#endif which_set = PRIMARY; -#ifndef REINCARNATION - if (rogueflag) return TRUE; -#endif - #ifdef LOADSYMSETS /* clear symset[].name as a flag to read_sym_file() to build list */ symset_name = symset[which_set].name; @@ -3587,12 +3573,10 @@ boolean setinitial,setfromfile; symset[which_set].name = symset_name; /* Set default symbols and clear the handling value */ -# ifdef REINCARNATION if(rogueflag) init_r_symbols(); else -# endif - init_l_symbols(); + init_l_symbols(); if (symset[which_set].name) { if (read_sym_file(which_set)) @@ -3605,13 +3589,10 @@ boolean setinitial,setfromfile; if (ready_to_switch) switch_symbols(TRUE); -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { if (rogueflag) assign_graphics(ROGUESET); - } else -# endif - if (!rogueflag) assign_graphics(PRIMARY); + } else if (!rogueflag) assign_graphics(PRIMARY); need_redraw = TRUE; #endif /*LOADSYMSETS*/ return TRUE; @@ -3832,17 +3813,15 @@ char *buf; } else if (!strcmp(optname, "race")) Sprintf(buf, "%s", rolestring(flags.initrace, races, noun)); -#ifdef REINCARNATION else if (!strcmp(optname, "roguesymset")) { Sprintf(buf, "%s", -# ifdef LOADSYMSETS +#ifdef LOADSYMSETS symset[ROGUESET].name ? symset[ROGUESET].name : -# endif +#endif "default"); if (currentgraphics == ROGUESET && symset[ROGUESET].name) Strcat(buf, ", active"); -#endif } else if (!strcmp(optname, "role")) Sprintf(buf, "%s", rolestring(flags.initrole, roles, name.m)); diff --git a/src/read.c b/src/read.c index 6f4c7c478..bbdd11a09 100644 --- a/src/read.c +++ b/src/read.c @@ -1322,11 +1322,8 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ break; case SCR_EARTH: /* TODO: handle steeds */ - if ( -#ifdef REINCARNATION - !Is_rogue_level(&u.uz) && -#endif - (!In_endgame(&u.uz) || Is_earthlevel(&u.uz))) { + if (!Is_rogue_level(&u.uz) + && (!In_endgame(&u.uz) || Is_earthlevel(&u.uz))) { register int x, y; /* Identify the scroll */ @@ -1606,7 +1603,6 @@ do_it: if (Punished && !on && !Blind) move_bc(1, 0, uball->ox, uball->oy, uchain->ox, uchain->oy); -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { /* Can't use do_clear_area because MAX_RADIUS is too small */ /* rogue lighting must light the entire room */ @@ -1621,7 +1617,6 @@ do_it: } /* hallways remain dark on the rogue level */ } else -#endif do_clear_area(u.ux,u.uy, (obj && obj->oclass==SCROLL_CLASS && obj->blessed) ? 9 : 5, set_lit, (genericptr_t)(on ? &is_lit : (char *)0)); diff --git a/src/restore.c b/src/restore.c index dc883c6da..64e8710d6 100644 --- a/src/restore.c +++ b/src/restore.c @@ -857,9 +857,7 @@ register int fd; if (!wizard && !discover) (void) delete_savefile(); -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) assign_graphics(ROGUESET); -#endif #ifdef USE_TILES substitute_tiles(&u.uz); #endif diff --git a/src/vision.c b/src/vision.c index d835fb554..f00306b8c 100644 --- a/src/vision.c +++ b/src/vision.c @@ -103,9 +103,7 @@ STATIC_DCL void NDECL(view_init); STATIC_DCL void FDECL(view_from,(int,int,char **,char *,char *,int, void (*)(int,int,genericptr_t),genericptr_t)); STATIC_DCL void FDECL(get_unused_cs, (char ***,char **,char **)); -#ifdef REINCARNATION STATIC_DCL void FDECL(rogue_vision, (char **,char *,char *)); -#endif /* Macro definitions that I can't find anywhere. */ #define sign(z) ((z) < 0 ? -1 : ((z) ? 1 : 0 )) @@ -285,7 +283,6 @@ get_unused_cs(rows, rmin, rmax) } -#ifdef REINCARNATION /* * rogue_vision() * @@ -349,7 +346,6 @@ rogue_vision(next, rmin, rmax) } } } -#endif /* REINCARNATION */ /*#define EXTEND_SPINE*/ /* possibly better looking wall-angle */ @@ -568,13 +564,9 @@ vision_recalc(control) /* skip the normal update loop */ goto skip; - } -#ifdef REINCARNATION - else if (Is_rogue_level(&u.uz)) { + } else if (Is_rogue_level(&u.uz)) { rogue_vision(next_array,next_rmin,next_rmax); - } -#endif - else { + } else { int has_night_vision = 1; /* hero has night vision */ if (Underwater && !Is_waterlevel(&u.uz)) { diff --git a/src/zap.c b/src/zap.c index 752b03796..173bee625 100644 --- a/src/zap.c +++ b/src/zap.c @@ -4162,10 +4162,8 @@ short exploding_wand_typ; if (see_it) pline("%s %s reveals a secret door.", yourzap ? "Your" : "The", zapverb); -#ifdef REINCARNATION else if (Is_rogue_level(&u.uz)) You_feel("a draft."); /* new open doorway */ -#endif } /* regular door absorbs remaining zap range, possibly gets destroyed */ diff --git a/sys/amiga/winfuncs.c b/sys/amiga/winfuncs.c index 21f1937e4..cb9e3a504 100644 --- a/sys/amiga/winfuncs.c +++ b/sys/amiga/winfuncs.c @@ -2081,12 +2081,7 @@ if(u.uz.dlevel != x){ } } #endif - if( - WINVERS_AMIV -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ) + if(WINVERS_AMIV && !Is_rogue_level(&u.uz)) { amii_curs(win,x,y); amiga_print_glyph(win,0,glyph); @@ -2095,7 +2090,6 @@ if(u.uz.dlevel != x){ { /* map glyph to character and color */ (void) mapglyph(glyph, &och, &color, &special, x, y); - /* XXX next if should be ifdef REINCARNATION */ ch = (uchar)och; if( WINVERS_AMIV ){ /* implies Rogue level here */ amii_curs(win,x,y); @@ -2106,10 +2100,8 @@ if(u.uz.dlevel != x){ #ifdef TEXTCOLOR /* Turn off color if rogue level. */ -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) color = NO_COLOR; -# endif amiga_print_glyph(win,color,ch); #else diff --git a/sys/msdos/pckeys.c b/sys/msdos/pckeys.c index 142618ee7..6551f7df5 100644 --- a/sys/msdos/pckeys.c +++ b/sys/msdos/pckeys.c @@ -56,24 +56,16 @@ unsigned char shift; vga_userpan(0); break; case 0x3E: /* F4 = toggle overview mode */ - if (iflags.tile_view && - !opening_dialog -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ) { + if (iflags.tile_view && !opening_dialog + && !Is_rogue_level(&u.uz)) { iflags.traditional_view = FALSE; vga_overview(iflags.over_view ? FALSE : TRUE); vga_refresh(); } break; case 0x3F: /* F5 = toggle traditional mode */ - if (iflags.tile_view && - !opening_dialog -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ) { + if (iflags.tile_view && !opening_dialog + && !Is_rogue_level(&u.uz)) { iflags.over_view = FALSE; vga_traditional(iflags.traditional_view ? FALSE : TRUE); vga_refresh(); diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index e128821f9..0784cf007 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -1171,14 +1171,9 @@ vga_DrawCursor() unsigned char first,second; /* char on[2] = {0xFF,0xFF}; */ /* char off[2] = {0x00,0x00}; */ -#ifdef REINCARNATION boolean isrogue = Is_rogue_level(&u.uz); boolean singlebyte = (isrogue || iflags.over_view || iflags.traditional_view || !inmap); -#else - boolean singlebyte = (iflags.over_view - || iflags.traditional_view || !inmap); -#endif int curtyp; if (!cursor_type && inmap) return; /* CURSOR_INVIS - nothing to do */ @@ -1376,14 +1371,9 @@ vga_HideCursor() int i,pixx,pixy,x,y; char __far *tmp1; char __far *tmp2; -#ifdef REINCARNATION boolean isrogue = Is_rogue_level(&u.uz); boolean singlebyte = (isrogue || iflags.over_view || iflags.traditional_view || !inmap); -#else - boolean singlebyte = (iflags.over_view - || iflags.traditional_view || !inmap); -#endif int curtyp; if (inmap && !cursor_type) return; /* CURSOR_INVIS - nothing to do */ diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index f6c2b6b12..0923f735f 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -309,11 +309,9 @@ char *argv[]; if (!symset[PRIMARY].name) { load_symset("IBMGraphics_2", PRIMARY); } -# ifdef REINCARNATION if (!symset[ROGUESET].name) { load_symset("RogueEpyx", ROGUESET); } -# endif # endif #endif /*LOADSYMSETS*/ diff --git a/sys/wince/mhmain.c b/sys/wince/mhmain.c index ff4e628b3..943ab111f 100644 --- a/sys/wince/mhmain.c +++ b/sys/wince/mhmain.c @@ -1053,9 +1053,7 @@ void mswin_select_map_mode(int mode) #endif /* override for Rogue level */ -#ifdef REINCARNATION if( Is_rogue_level(&u.uz) && !IS_MAP_ASCII(mode) ) return; -#endif /* set map mode menu mark */ if( IS_MAP_ASCII(mode) ) { diff --git a/sys/wince/mhmap.c b/sys/wince/mhmap.c index 1fe386490..f2b611f9c 100644 --- a/sys/wince/mhmap.c +++ b/sys/wince/mhmap.c @@ -569,12 +569,8 @@ void onPaint(HWND hWnd) paint_rt.right = min(data->xPos + (ps.rcPaint.right - data->map_orig.x)/data->xScrTile+1, COLNO); paint_rt.bottom = min(data->yPos + (ps.rcPaint.bottom - data->map_orig.y)/data->yScrTile+1, ROWNO); - if( data->bAsciiMode -#ifdef REINCARNATION - || Is_rogue_level(&u.uz) + if(data->bAsciiMode || Is_rogue_level(&u.uz)) { /* You enter a VERY primitive world! */ -#endif - ) { HGDIOBJ oldFont; oldFont = SelectObject(hDC, data->hMapFont); diff --git a/sys/wince/mswproc.c b/sys/wince/mswproc.c index a4e5ede90..84c2b092c 100644 --- a/sys/wince/mswproc.c +++ b/sys/wince/mswproc.c @@ -793,14 +793,12 @@ void mswin_clear_nhwindow(winid wid) (wid < MAXWINDOWS) && (GetNHApp()->windowlist[wid].win != NULL)) { -#ifdef REINCARNATION if( GetNHApp()->windowlist[wid].type == NHW_MAP ) { if( Is_rogue_level(&u.uz) ) mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), ROGUE_LEVEL_MAP_MODE); else mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), iflags.wc_map_mode); } -#endif SendMessage( GetNHApp()->windowlist[wid].win, diff --git a/util/makedefs.c b/util/makedefs.c index 1de90dc6c..5cf318416 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -988,9 +988,6 @@ make_version() */ version.feature_set = (unsigned long)(0L /* levels and/or topology (0..4) */ -#ifdef REINCARNATION - | (1L << 1) -#endif /* monsters (5..9) */ #ifdef MAIL | (1L << 6) @@ -1289,9 +1286,6 @@ static const char *build_opts[] = { #ifdef SELECTSAVED "restore saved games via menu", #endif -#ifdef REINCARNATION - "rogue level", -#endif #ifdef SCORE_ON_BOTL "score on status line", #endif @@ -1823,12 +1817,9 @@ static struct deflist { const char *defname; boolean true_or_false; } deflist[] = { -#ifdef REINCARNATION { "REINCARNATION", TRUE }, -#else - { "REINCARNATION", FALSE }, -#endif - { 0, 0 } }; + { 0, 0 } +}; static int check_control(s) diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index ac2141fcc..af412e25a 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -1644,12 +1644,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event) painter.begin(this); - if ( -#ifdef REINCARNATION - Is_rogue_level(&u.uz) || -#endif - iflags.wc_ascii_map - ) + if (Is_rogue_level(&u.uz) || iflags.wc_ascii_map) { // You enter a VERY primitive world! @@ -1730,7 +1725,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event) } if (garea.contains(cursor)) { -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { #ifdef TEXTCOLOR painter.setPen( white ); @@ -1738,7 +1732,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event) painter.setPen( green ); // REALLY primitive #endif } else -#endif { int hp100; if (u.mtimedone) { diff --git a/win/X11/winmap.c b/win/X11/winmap.c index cc48a5478..dd92ad680 100644 --- a/win/X11/winmap.c +++ b/win/X11/winmap.c @@ -839,10 +839,7 @@ display_map_window(wp) register int row; struct map_info_t *map_info = wp->map_information; - if (( -#ifdef REINCARNATION - Is_rogue_level(&u.uz) ? map_info->is_tile : -#endif + if ((Is_rogue_level(&u.uz) ? map_info->is_tile : (map_info->is_tile != iflags.wc_tiled_map)) && map_info->tile_map.image_width) { /* changed map display mode, re-display the full map */ @@ -850,11 +847,7 @@ display_map_window(wp) sizeof(map_info->t_start)); (void) memset((genericptr_t) map_info->t_stop, (char) COLNO-1, sizeof(map_info->t_stop)); - map_info->is_tile = iflags.wc_tiled_map -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ; + map_info->is_tile = iflags.wc_tiled_map && !Is_rogue_level(&u.uz); XClearWindow(XtDisplay(wp->w), XtWindow(wp->w)); set_map_size(wp, COLNO, ROWNO); check_cursor_visibility(wp); diff --git a/win/gem/wingem.c b/win/gem/wingem.c index 63fda6914..87d175231 100644 --- a/win/gem/wingem.c +++ b/win/gem/wingem.c @@ -911,9 +911,7 @@ int x, y; void mar_print_gl_char(winid,xchar,xchar,int); -#ifdef REINCARNATION extern int mar_set_rogue(int); -#endif extern void mar_add_pet_sign(winid,int,int); @@ -926,9 +924,7 @@ Gem_print_glyph(window, x, y, glyph) /* Move the cursor. */ Gem_curs(window, x,y); -# ifdef REINCARNATION - mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE); -# endif + mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE); x--; /* MAR -- because x ranges from 1 to COLNO */ if(mar_set_tile_mode(-1)){ @@ -960,9 +956,7 @@ void mar_print_gl_char(window, x, y, glyph) #ifdef TEXTCOLOR /* Turn off color if rogue level. */ -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) color = NO_COLOR; -# endif #endif /* TEXTCOLOR */ mar_print_char(window,x,y,ch,color); diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index b8a2dac10..6092f5cd5 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -1043,9 +1043,7 @@ void mswin_select_map_mode(int mode) data = (PNHMainWindow)GetWindowLongPtr(GetNHApp()->hMainWnd, GWLP_USERDATA); /* override for Rogue level */ -#ifdef REINCARNATION if( Is_rogue_level(&u.uz) && !IS_MAP_ASCII(mode) ) return; -#endif /* set map mode menu mark */ if( IS_MAP_ASCII(mode) ) { diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index ff1a43fb1..bd3c60a17 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -603,12 +603,8 @@ void onPaint(HWND hWnd) paint_rt.right = min(data->xPos + (ps.rcPaint.right - data->map_orig.x)/data->xScrTile+1, COLNO); paint_rt.bottom = min(data->yPos + (ps.rcPaint.bottom - data->map_orig.y)/data->yScrTile+1, ROWNO); - if( data->bAsciiMode -#ifdef REINCARNATION - || Is_rogue_level(&u.uz) + if( data->bAsciiMode || Is_rogue_level(&u.uz) ) { /* You enter a VERY primitive world! */ -#endif - ) { HGDIOBJ oldFont; oldFont = SelectObject(hDC, data->hMapFont); diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 11b109067..39776d87b 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -802,14 +802,12 @@ void mswin_clear_nhwindow(winid wid) (wid < MAXWINDOWS) && (GetNHApp()->windowlist[wid].win != NULL)) { -#ifdef REINCARNATION if( GetNHApp()->windowlist[wid].type == NHW_MAP ) { if( Is_rogue_level(&u.uz) ) mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), ROGUE_LEVEL_MAP_MODE); else mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), iflags.wc_map_mode); } -#endif SendMessage( GetNHApp()->windowlist[wid].win,