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-13 23:46:47 -05:00
committed by Pasi Kallinen
parent bb647dc33c
commit ffd201495c
42 changed files with 38 additions and 273 deletions

View File

@@ -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;

View File

@@ -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 ||

View File

@@ -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",

View File

@@ -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);

View File

@@ -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)

View File

@@ -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...)" : "");

View File

@@ -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*/

View File

@@ -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
}
}
}

View File

@@ -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));
}

View File

@@ -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? */

View File

@@ -5,9 +5,7 @@
#include "hack.h"
#ifdef REINCARNATION
#include <ctype.h>
#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)) {

View File

@@ -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

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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) &&

View File

@@ -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)

View File

@@ -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;

View File

@@ -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));

View File

@@ -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));

View File

@@ -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

View File

@@ -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)) {

View File

@@ -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 */