Make DUNGEON_OVERVIEW unconditional.
This commit is contained in:
@@ -457,9 +457,7 @@ struct obj *corpse;
|
||||
levl[x][y].seenv = 0;
|
||||
levl[x][y].waslit = 0;
|
||||
levl[x][y].glyph = cmap_to_glyph(S_stone);
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
lastseentyp[x][y] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Attach bones info to the current level before saving. */
|
||||
@@ -476,11 +474,9 @@ struct obj *corpse;
|
||||
aligns[1 - u.ualign.type].filecode);
|
||||
formatkiller(newbones->how, sizeof newbones->how, how);
|
||||
Strcpy(newbones->when, yyyymmddhhmmss(when));
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
/* final resting place, used to decide when bones are discovered */
|
||||
newbones->frpx = u.ux, newbones->frpy = u.uy;
|
||||
newbones->bonesknown = FALSE;
|
||||
#endif
|
||||
/* if current character died on a bones level, the cememtery list
|
||||
will have multiple entries, most recent (this dead hero) first */
|
||||
newbones->next = level.bonesinfo;
|
||||
|
||||
18
src/cmd.c
18
src/cmd.c
@@ -123,9 +123,7 @@ STATIC_PTR int NDECL(doprev_message);
|
||||
STATIC_PTR int NDECL(timed_occupation);
|
||||
STATIC_PTR int NDECL(doextcmd);
|
||||
STATIC_PTR int NDECL(domonability);
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
STATIC_PTR int NDECL(dooverview_or_wiz_where);
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
STATIC_PTR int NDECL(dotravel);
|
||||
STATIC_PTR int NDECL(doterrain);
|
||||
# ifdef WIZARD
|
||||
@@ -537,7 +535,6 @@ enter_explore_mode(VOID_ARGS)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
STATIC_PTR int
|
||||
dooverview_or_wiz_where(VOID_ARGS)
|
||||
{
|
||||
@@ -549,7 +546,6 @@ dooverview_or_wiz_where(VOID_ARGS)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
#ifdef WIZARD
|
||||
|
||||
/* ^W command - wish for something */
|
||||
@@ -2392,14 +2388,8 @@ static const struct func_tab cmdlist[] = {
|
||||
{C('i'), TRUE, wiz_identify},
|
||||
#endif
|
||||
{C('l'), TRUE, doredraw}, /* if number_pad is set */
|
||||
#ifndef DUNGEON_OVERVIEW
|
||||
#ifdef WIZARD
|
||||
{C('o'), TRUE, wiz_where},
|
||||
#endif
|
||||
#else
|
||||
{C('n'), TRUE, donamelevel}, /* if number_pad is set */
|
||||
{C('o'), TRUE, dooverview_or_wiz_where}, /* depending on wizard status */
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
{C('p'), TRUE, doprev_message},
|
||||
{C('r'), TRUE, doredraw},
|
||||
{C('t'), TRUE, dotele},
|
||||
@@ -2412,9 +2402,7 @@ static const struct func_tab cmdlist[] = {
|
||||
{'a', FALSE, doapply},
|
||||
{'A', FALSE, doddoremarm},
|
||||
{M('a'), TRUE, doorganize},
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
{M('A'), TRUE, donamelevel}, /* #annotate */
|
||||
#endif
|
||||
/* 'b', 'B' : go sw */
|
||||
{'c', FALSE, doclose},
|
||||
{'C', TRUE, docallcmd},
|
||||
@@ -2449,9 +2437,7 @@ static const struct func_tab cmdlist[] = {
|
||||
{'o', FALSE, doopen},
|
||||
{'O', TRUE, doset},
|
||||
{M('o'), FALSE, dosacrifice},
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
{M('O'), TRUE, dooverview}, /* #overview */
|
||||
#endif
|
||||
{'p', FALSE, dopay},
|
||||
{'P', FALSE, doputon},
|
||||
{M('p'), TRUE, dopray},
|
||||
@@ -2517,9 +2503,7 @@ static const struct func_tab cmdlist[] = {
|
||||
|
||||
struct ext_func_tab extcmdlist[] = {
|
||||
{"adjust", "adjust inventory letters", doorganize, TRUE},
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
{"annotate", "name current level", donamelevel, TRUE},
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
{"chat", "talk to someone", dotalk, TRUE}, /* converse? */
|
||||
{"conduct", "list voluntary challenges you have maintained",
|
||||
doconduct, TRUE},
|
||||
@@ -2533,9 +2517,7 @@ struct ext_func_tab extcmdlist[] = {
|
||||
{"monster", "use a monster's special ability", domonability, TRUE},
|
||||
{"name", "name a monster or an object", docallcmd, TRUE},
|
||||
{"offer", "offer a sacrifice to the gods", dosacrifice, FALSE},
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
{"overview", "show an overview of the dungeon", dooverview, TRUE},
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
{"pray", "pray to the gods for help", dopray, TRUE},
|
||||
{"quit", "exit without saving current game", done2, TRUE},
|
||||
{"ride", "ride (or stop riding) a monster", doride, FALSE},
|
||||
|
||||
@@ -142,9 +142,7 @@ NEARDATA struct you u = DUMMY;
|
||||
NEARDATA time_t ubirthday = DUMMY;
|
||||
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
schar lastseentyp[COLNO][ROWNO] = {DUMMY}; /* last seen/touched dungeon typ */
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
|
||||
NEARDATA struct obj *invent = (struct obj *)0,
|
||||
*uwep = (struct obj *)0, *uarm = (struct obj *)0,
|
||||
|
||||
@@ -137,11 +137,7 @@ STATIC_DCL void FDECL(set_seenv, (struct rm *, int, int, int, int));
|
||||
STATIC_DCL void FDECL(t_warn, (struct rm *));
|
||||
STATIC_DCL int FDECL(wall_angle, (struct rm *));
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
# define remember_topology(x,y) (lastseentyp[x][y] = levl[x][y].typ)
|
||||
#else
|
||||
# define remember_topology(x,y) /*empty*/
|
||||
#endif
|
||||
#define remember_topology(x,y) (lastseentyp[x][y] = levl[x][y].typ)
|
||||
|
||||
#ifdef INVISIBLE_OBJECTS
|
||||
/*
|
||||
@@ -420,10 +416,8 @@ display_monster(x, y, mon, sightflags, worm_tail)
|
||||
levl[x][y].glyph = glyph;
|
||||
if (!sensed) {
|
||||
show_glyph(x,y, glyph);
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
/* override real topology with mimic's fake one */
|
||||
lastseentyp[x][y] = cmap_to_type(sym);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
6
src/do.c
6
src/do.c
@@ -1107,9 +1107,7 @@ boolean at_stairs, falling, portal;
|
||||
keepdogs(FALSE);
|
||||
if (u.uswallow) /* idem */
|
||||
u.uswldtim = u.uswallow = 0;
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
recalc_mapseen(); /* recalculate map overview before we leave the level */
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
/*
|
||||
* We no longer see anything on the level. Make sure that this
|
||||
* follows u.uswallow set to null since uswallow overrides all
|
||||
@@ -1136,11 +1134,9 @@ boolean at_stairs, falling, portal;
|
||||
/* discard unreachable levels; keep #0 */
|
||||
for (l_idx = maxledgerno(); l_idx > 0; --l_idx)
|
||||
delete_levelfile(l_idx);
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
/* mark #overview data for all dungeon branches as uninteresting */
|
||||
for (l_idx = 0; l_idx < n_dgns; ++l_idx)
|
||||
remdun_mapseen(l_idx);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (Is_rogue_level(newlevel) || Is_rogue_level(&u.uz))
|
||||
@@ -1148,13 +1144,11 @@ boolean at_stairs, falling, portal;
|
||||
#ifdef USE_TILES
|
||||
substitute_tiles(newlevel);
|
||||
#endif
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
/* record this level transition as a potential seen branch unless using
|
||||
* some non-standard means of transportation (level teleport).
|
||||
*/
|
||||
if ((at_stairs || falling || portal) && (u.uz.dnum != newlevel->dnum))
|
||||
recbranch_mapseen(&u.uz, newlevel);
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
assign_level(&u.uz0, &u.uz);
|
||||
assign_level(&u.uz, newlevel);
|
||||
assign_level(&u.utolev, newlevel);
|
||||
|
||||
@@ -59,7 +59,6 @@ STATIC_DCL const char *FDECL(br_string, (int));
|
||||
STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lchoice *));
|
||||
#endif
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
mapseen *mapseenchn = (struct mapseen *)0;
|
||||
STATIC_DCL mapseen *FDECL(load_mapseen, (int));
|
||||
STATIC_DCL void FDECL(save_mapseen, (int, mapseen *));
|
||||
@@ -72,7 +71,6 @@ STATIC_DCL const char *FDECL(br_string2, (branch *));
|
||||
STATIC_DCL const char *FDECL(endgamelevelname, (char *,int));
|
||||
STATIC_DCL const char *FDECL(shop_string, (int));
|
||||
STATIC_DCL char *FDECL(tunesuffix, (mapseen *,char *));
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DD dungeons[i]
|
||||
@@ -135,9 +133,7 @@ save_dungeon(fd, perform_write, free_data)
|
||||
boolean perform_write, free_data;
|
||||
{
|
||||
branch *curr, *next;
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
mapseen *curr_ms, *next_ms;
|
||||
#endif
|
||||
int count;
|
||||
|
||||
if (perform_write) {
|
||||
@@ -159,14 +155,12 @@ save_dungeon(fd, perform_write, free_data)
|
||||
(unsigned)count * sizeof (struct linfo));
|
||||
bwrite(fd, (genericptr_t) &inv_pos, sizeof inv_pos);
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
for (count = 0, curr_ms = mapseenchn; curr_ms; curr_ms = curr_ms->next)
|
||||
count++;
|
||||
bwrite(fd, (genericptr_t) &count, sizeof(count));
|
||||
|
||||
for (curr_ms = mapseenchn; curr_ms; curr_ms = curr_ms->next)
|
||||
save_mapseen(fd, curr_ms);
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
}
|
||||
|
||||
if (free_data) {
|
||||
@@ -175,7 +169,6 @@ save_dungeon(fd, perform_write, free_data)
|
||||
free((genericptr_t) curr);
|
||||
}
|
||||
branches = 0;
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
for (curr_ms = mapseenchn; curr_ms; curr_ms = next_ms) {
|
||||
next_ms = curr_ms->next;
|
||||
if (curr_ms->custom)
|
||||
@@ -183,7 +176,6 @@ save_dungeon(fd, perform_write, free_data)
|
||||
free((genericptr_t) curr_ms);
|
||||
}
|
||||
mapseenchn = 0;
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,9 +186,7 @@ restore_dungeon(fd)
|
||||
{
|
||||
branch *curr, *last;
|
||||
int count, i;
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
mapseen *curr_ms, *last_ms;
|
||||
#endif
|
||||
|
||||
mread(fd, (genericptr_t) &n_dgns, sizeof(n_dgns));
|
||||
mread(fd, (genericptr_t) dungeons, sizeof(dungeon) * (unsigned)n_dgns);
|
||||
@@ -223,7 +213,6 @@ restore_dungeon(fd)
|
||||
mread(fd, (genericptr_t) level_info, (unsigned)count*sizeof(struct linfo));
|
||||
mread(fd, (genericptr_t) &inv_pos, sizeof inv_pos);
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
mread(fd, (genericptr_t) &count, sizeof(count));
|
||||
last_ms = (mapseen *) 0;
|
||||
for (i = 0; i < count; i++) {
|
||||
@@ -235,7 +224,6 @@ restore_dungeon(fd)
|
||||
mapseenchn = curr_ms;
|
||||
last_ms = curr_ms;
|
||||
}
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1835,7 +1823,6 @@ xchar *rdgn;
|
||||
}
|
||||
#endif /* WIZARD */
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
/* Record that the player knows about a branch from a level. This function
|
||||
* will determine whether or not it was a "real" branch that was taken.
|
||||
* This function should not be called for a transition done via level
|
||||
@@ -2711,6 +2698,5 @@ boolean printdun;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* DUNGEON_OVERVIEW */
|
||||
|
||||
/*dungeon.c*/
|
||||
|
||||
@@ -2115,9 +2115,7 @@ register boolean newlev;
|
||||
rt = 0;
|
||||
break;
|
||||
}
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
if (msg_given) room_discovered(roomno);
|
||||
#endif
|
||||
|
||||
if (rt != 0) {
|
||||
rooms[roomno].rtype = OROOM;
|
||||
|
||||
17
src/lock.c
17
src/lock.c
@@ -561,16 +561,12 @@ doopen() /* try to open a door */
|
||||
portcullis = (is_drawbridge_wall(cc.x, cc.y) >= 0);
|
||||
if (Blind) {
|
||||
int oldglyph = door->glyph;
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
schar oldlastseentyp = lastseentyp[cc.x][cc.y];
|
||||
#endif
|
||||
|
||||
feel_location(cc.x, cc.y);
|
||||
if (door->glyph != oldglyph
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
|| lastseentyp[cc.x][cc.y] != oldlastseentyp
|
||||
#endif
|
||||
) res = 1; /* learned something */
|
||||
|| lastseentyp[cc.x][cc.y] != oldlastseentyp)
|
||||
res = 1; /* learned something */
|
||||
}
|
||||
|
||||
if (portcullis || !IS_DOOR(door->typ)) {
|
||||
@@ -693,16 +689,11 @@ doclose() /* try to close a door */
|
||||
portcullis = (is_drawbridge_wall(x, y) >= 0);
|
||||
if (Blind) {
|
||||
int oldglyph = door->glyph;
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
schar oldlastseentyp = lastseentyp[x][y];
|
||||
#endif
|
||||
|
||||
feel_location(x, y);
|
||||
if (door->glyph != oldglyph
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
|| lastseentyp[x][y] != oldlastseentyp
|
||||
#endif
|
||||
) res = 1; /* learned something */
|
||||
if (door->glyph != oldglyph || lastseentyp[x][y] != oldlastseentyp)
|
||||
res = 1; /* learned something */
|
||||
}
|
||||
|
||||
if (portcullis || !IS_DOOR(door->typ)) {
|
||||
|
||||
@@ -912,9 +912,7 @@ mklev()
|
||||
struct mkroom *croom;
|
||||
int ridx;
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
init_mapseen(&u.uz);
|
||||
#endif
|
||||
if(getbones()) return;
|
||||
|
||||
in_mklev = TRUE;
|
||||
|
||||
@@ -445,11 +445,9 @@ int roomno;
|
||||
if (*this_time <= *other_time) *other_time = *this_time - 1L;
|
||||
}
|
||||
}
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
/* recognize the Valley of the Dead and Moloch's Sanctum
|
||||
once hero has encountered the temple priest on those levels */
|
||||
mapseen_temple(priest);
|
||||
#endif
|
||||
} else {
|
||||
/* untended */
|
||||
|
||||
|
||||
@@ -174,9 +174,7 @@ boolean seal;
|
||||
if (seal) { /* remove the portal to the quest - sealing it off */
|
||||
int reexpelled = u.uevent.qexpelled;
|
||||
u.uevent.qexpelled = 1;
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
remdun_mapseen(quest_dnum);
|
||||
#endif
|
||||
/* Delete the near portal now; the far (main dungeon side)
|
||||
portal will be deleted as part of arrival on that level.
|
||||
If monster movement is in progress, any who haven't moved
|
||||
|
||||
@@ -570,9 +570,7 @@ forget_map(howmuch)
|
||||
levl[zx][zy].seenv = 0;
|
||||
levl[zx][zy].waslit = 0;
|
||||
levl[zx][zy].glyph = cmap_to_glyph(S_stone);
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
lastseentyp[zx][zy] = STONE;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,9 +631,7 @@ forget_levels(percent)
|
||||
count = ((count * percent) + 50) / 100;
|
||||
for (i = 0; i < count; i++) {
|
||||
level_info[indices[i]].flags |= FORGOTTEN;
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
forget_mapseen(indices[i]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1015,9 +1015,7 @@ boolean ghostly;
|
||||
}
|
||||
restcemetery(fd, &level.bonesinfo);
|
||||
rest_levl(fd, (boolean)((sfrestinfo.sfi1 & SFI1_RLECOMP) == SFI1_RLECOMP));
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
mread(fd, (genericptr_t)lastseentyp, sizeof(lastseentyp));
|
||||
#endif
|
||||
mread(fd, (genericptr_t)&omoves, sizeof(omoves));
|
||||
elapsed = monstermoves - omoves;
|
||||
mread(fd, (genericptr_t)&upstair, sizeof(stairway));
|
||||
|
||||
@@ -511,9 +511,7 @@ int mode;
|
||||
#endif
|
||||
savecemetery(fd, mode, &level.bonesinfo);
|
||||
savelevl(fd, (boolean)((sfsaveinfo.sfi1 & SFI1_RLECOMP) == SFI1_RLECOMP));
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
bwrite(fd,(genericptr_t) lastseentyp,sizeof(lastseentyp));
|
||||
#endif
|
||||
bwrite(fd,(genericptr_t) &monstermoves,sizeof(monstermoves));
|
||||
bwrite(fd,(genericptr_t) &upstair,sizeof(stairway));
|
||||
bwrite(fd,(genericptr_t) &dnstair,sizeof(stairway));
|
||||
|
||||
@@ -803,9 +803,7 @@ skip:
|
||||
viz_rmin = next_rmin;
|
||||
viz_rmax = next_rmax;
|
||||
|
||||
#ifdef DUNGEON_OVERVIEW
|
||||
recalc_mapseen();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user