From eca41ae06065208e5efd9c41b547f2deba2c0e2f Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Fri, 13 Feb 2015 23:58:46 -0500 Subject: [PATCH] Make DUNGEON_OVERVIEW unconditional. --- include/config.h | 1 - include/dungeon.h | 2 -- include/extern.h | 2 -- include/rm.h | 4 ---- src/bones.c | 4 ---- src/cmd.c | 18 ------------------ src/decl.c | 2 -- src/display.c | 8 +------- src/do.c | 6 ------ src/dungeon.c | 14 -------------- src/hack.c | 2 -- src/lock.c | 17 ++++------------- src/mklev.c | 2 -- src/priest.c | 2 -- src/quest.c | 2 -- src/read.c | 4 ---- src/restore.c | 2 -- src/save.c | 2 -- src/vision.c | 2 -- util/makedefs.c | 3 --- 20 files changed, 5 insertions(+), 94 deletions(-) diff --git a/include/config.h b/include/config.h index bcc8e9903..abdeb4187 100644 --- a/include/config.h +++ b/include/config.h @@ -450,7 +450,6 @@ typedef unsigned char uchar; /*#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 */ diff --git a/include/dungeon.h b/include/dungeon.h index d80d22a7d..f2bf75ef6 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -169,7 +169,6 @@ struct linfo { #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 @@ -245,5 +244,4 @@ typedef struct mapseen { struct cemetery *final_resting_place; /* same as level.bonesinfo */ } mapseen; -#endif /* DUNGEON_OVERVIEW */ #endif /* DUNGEON_H */ diff --git a/include/extern.h b/include/extern.h index 6f0ad015f..186d5c9ff 100644 --- a/include/extern.h +++ b/include/extern.h @@ -581,7 +581,6 @@ E schar FDECL(lev_by_name, (const char *)); #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)); @@ -592,7 +591,6 @@ E void FDECL(mapseen_temple, (struct monst *)); 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 ### */ diff --git a/include/rm.h b/include/rm.h index fbd7470cf..8747407f9 100644 --- a/include/rm.h +++ b/include/rm.h @@ -506,11 +506,9 @@ struct cemetery { 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 { @@ -564,9 +562,7 @@ typedef struct } 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 */ diff --git a/src/bones.c b/src/bones.c index e6c33a262..8a36ea11d 100644 --- a/src/bones.c +++ b/src/bones.c @@ -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; diff --git a/src/cmd.c b/src/cmd.c index 2abb73a07..00e139001 100644 --- a/src/cmd.c +++ b/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}, diff --git a/src/decl.c b/src/decl.c index c9105bee6..d4892f9d4 100644 --- a/src/decl.c +++ b/src/decl.c @@ -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, diff --git a/src/display.c b/src/display.c index 263dd853a..48b9f0b65 100644 --- a/src/display.c +++ b/src/display.c @@ -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; } diff --git a/src/do.c b/src/do.c index e0fe5a5c3..4e5876e6b 100644 --- a/src/do.c +++ b/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); diff --git a/src/dungeon.c b/src/dungeon.c index c08d195af..ed186796b 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -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*/ diff --git a/src/hack.c b/src/hack.c index 545c4c4aa..66e0962e6 100644 --- a/src/hack.c +++ b/src/hack.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; diff --git a/src/lock.c b/src/lock.c index 73dc8c159..67a11a545 100644 --- a/src/lock.c +++ b/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)) { diff --git a/src/mklev.c b/src/mklev.c index 1bba98d61..acb4daac4 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -912,9 +912,7 @@ mklev() struct mkroom *croom; int ridx; -#ifdef DUNGEON_OVERVIEW init_mapseen(&u.uz); -#endif if(getbones()) return; in_mklev = TRUE; diff --git a/src/priest.c b/src/priest.c index 915813af0..5e3b2ea10 100644 --- a/src/priest.c +++ b/src/priest.c @@ -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 */ diff --git a/src/quest.c b/src/quest.c index c5ef6c819..566d7f029 100644 --- a/src/quest.c +++ b/src/quest.c @@ -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 diff --git a/src/read.c b/src/read.c index bbdd11a09..6e3147714 100644 --- a/src/read.c +++ b/src/read.c @@ -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 } } diff --git a/src/restore.c b/src/restore.c index 64e8710d6..30af7762c 100644 --- a/src/restore.c +++ b/src/restore.c @@ -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)); diff --git a/src/save.c b/src/save.c index f8f5d40b0..e66a5c9eb 100644 --- a/src/save.c +++ b/src/save.c @@ -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)); diff --git a/src/vision.c b/src/vision.c index f00306b8c..a6585de14 100644 --- a/src/vision.c +++ b/src/vision.c @@ -803,9 +803,7 @@ skip: viz_rmin = next_rmin; viz_rmax = next_rmax; -#ifdef DUNGEON_OVERVIEW recalc_mapseen(); -#endif } diff --git a/util/makedefs.c b/util/makedefs.c index 5cf318416..4ddb7f449 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1236,9 +1236,6 @@ static const char *build_opts[] = { #ifdef WIZARD "debug mode", #endif -#ifdef DUNGEON_OVERVIEW - "dungeon map overview patch", -#endif #ifdef EXP_ON_BOTL "experience points on status line", #endif -- 2.40.0