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