/*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */
#define STATUS_VIA_WINDOWPORT /* re-work of the status line updating process */
#define STATUS_HILITES /* support hilites of status fields */
-#define DUNGEON_OVERVIEW /* dungeon overview by Hojita Discordia */
/* #define WINCHAIN*/ /* stacked window systems */
/* End of Section 5 */
#endif /* MFLOPPY */
};
-#ifdef DUNGEON_OVERVIEW
/* types and structures for dungeon map recording
*
* It is designed to eliminate the need for an external notes file for some of
struct cemetery *final_resting_place; /* same as level.bonesinfo */
} mapseen;
-#endif /* DUNGEON_OVERVIEW */
#endif /* DUNGEON_H */
#ifdef WIZARD
E schar FDECL(print_dungeon, (BOOLEAN_P,schar *,xchar *));
#endif
-#ifdef DUNGEON_OVERVIEW
E int NDECL(donamelevel);
E int NDECL(dooverview);
E void FDECL(show_overview, (int,int));
E void FDECL(room_discovered, (int));
E void FDECL(recbranch_mapseen, (d_level *, d_level *));
E void FDECL(remdun_mapseen, (int));
-#endif /* DUNGEON_OVERVIEW */
/* ### eat.c ### */
char how[100 + 1]; /* [DTHSZ+1] */
/* date+time in string of digits rather than binary */
char when[4+2+2 + 2+2+2 + 1]; /* "YYYYMMDDhhmmss\0" */
-#ifdef DUNGEON_OVERVIEW
/* final resting place spot */
schar frpx, frpy;
boolean bonesknown;
-#endif
};
struct levelflags {
}
dlevel_t;
-#ifdef DUNGEON_OVERVIEW
extern schar lastseentyp[COLNO][ROWNO]; /* last seen/touched dungeon typ */
-#endif /* DUNGEON_OVERVIEW */
extern dlevel_t level; /* structure describing the current level */
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. */
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;
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
return 0;
}
-#ifdef DUNGEON_OVERVIEW
STATIC_PTR int
dooverview_or_wiz_where(VOID_ARGS)
{
return 0;
}
-#endif /* DUNGEON_OVERVIEW */
#ifdef WIZARD
/* ^W command - wish for something */
{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},
{'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},
{'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},
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},
{"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},
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,
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
/*
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;
}
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
/* 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))
#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);
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 *));
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]
boolean perform_write, free_data;
{
branch *curr, *next;
-#ifdef DUNGEON_OVERVIEW
mapseen *curr_ms, *next_ms;
-#endif
int count;
if (perform_write) {
(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) {
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)
free((genericptr_t) curr_ms);
}
mapseenchn = 0;
-#endif /* DUNGEON_OVERVIEW */
}
}
{
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);
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++) {
mapseenchn = curr_ms;
last_ms = curr_ms;
}
-#endif /* DUNGEON_OVERVIEW */
}
static void
}
#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
}
}
}
-#endif /* DUNGEON_OVERVIEW */
/*dungeon.c*/
rt = 0;
break;
}
-#ifdef DUNGEON_OVERVIEW
if (msg_given) room_discovered(roomno);
-#endif
if (rt != 0) {
rooms[roomno].rtype = OROOM;
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)) {
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)) {
struct mkroom *croom;
int ridx;
-#ifdef DUNGEON_OVERVIEW
init_mapseen(&u.uz);
-#endif
if(getbones()) return;
in_mklev = TRUE;
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 */
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
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
}
}
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
}
}
}
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));
#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));
viz_rmin = next_rmin;
viz_rmax = next_rmax;
-#ifdef DUNGEON_OVERVIEW
recalc_mapseen();
-#endif
}
#ifdef WIZARD
"debug mode",
#endif
-#ifdef DUNGEON_OVERVIEW
- "dungeon map overview patch",
-#endif
#ifdef EXP_ON_BOTL
"experience points on status line",
#endif