]> granicus.if.org Git - nethack/commitdiff
Make DUNGEON_OVERVIEW unconditional.
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Sat, 14 Feb 2015 04:58:46 +0000 (23:58 -0500)
committerSean Hunt <scshunt@csclub.uwaterloo.ca>
Sat, 28 Feb 2015 00:33:20 +0000 (19:33 -0500)
20 files changed:
include/config.h
include/dungeon.h
include/extern.h
include/rm.h
src/bones.c
src/cmd.c
src/decl.c
src/display.c
src/do.c
src/dungeon.c
src/hack.c
src/lock.c
src/mklev.c
src/priest.c
src/quest.c
src/read.c
src/restore.c
src/save.c
src/vision.c
util/makedefs.c

index bcc8e99039855f7d9cd25a6d44fe5e3c3fed6c15..abdeb4187736de29a8f7c838a66de808e8a3da3b 100644 (file)
@@ -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 */
 
index d80d22a7da249de14511a671f3c9cb559d5dc566..f2bf75ef610db9eb093e7f6e16ab1898797aa708 100644 (file)
@@ -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 */
index 6f0ad015fb961e3031cb513497e5ee8625805a14..186d5c9ff8d010f1afc54ca78649629760189717 100644 (file)
@@ -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 ### */
 
index fbd7470cf698356b5efb95d8341a067aef0534db..8747407f969910002dbe6d7db4c319be3d32f964 100644 (file)
@@ -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 */
 
index e6c33a262786dda1d0fe3692d16e04d13c908a3f..8a36ea11de763db39d2c80cd843e83988dd11497 100644 (file)
@@ -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;
index 2abb73a078b464a39a914f546e47b9c4b5180ed6..00e1390012cc6378e186a3d942db408dd499a445 100644 (file)
--- 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},
index c9105bee636477a3faca57a1a8605fb6ce36e91d..d4892f9d41c68dba22e110a7233ba8a4e46f2518 100644 (file)
@@ -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,
index 263dd853abc1adaec7baca408083055bd7e7ad40..48b9f0b654cb304522a67101096b9cde3c1889bd 100644 (file)
@@ -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;
            }
index e0fe5a5c3b7744c6f2a947c2c6dc5bf8fe680070..4e5876e6be67f62163782360b79f11b945d657c1 100644 (file)
--- 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);
index c08d195af69570e2e307248d77aa1d57fbaf8235..ed186796b6d85c539f2a1006d0f302af834b02f0 100644 (file)
@@ -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*/
index 545c4c4aaa5d2748089ff8d3497ae242b0fd06ee..66e0962e6eed9b1447f4224aa59e8f20e703cb8a 100644 (file)
@@ -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;
index 73dc8c1591e9f010d4e843b321c20ce439bd831e..67a11a5452075c27342b6188cda5efd737bd5cc3 100644 (file)
@@ -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)) {
index 1bba98d611eddadb021d6f8686e3345e7effd7f6..acb4daac4e3e9f657317db9244a7863234a70fc1 100644 (file)
@@ -912,9 +912,7 @@ mklev()
        struct mkroom *croom;
        int ridx;
 
-#ifdef DUNGEON_OVERVIEW
        init_mapseen(&u.uz);
-#endif
        if(getbones()) return;
 
        in_mklev = TRUE;
index 915813af09c1d3b5f6c646300c7b87de5016318b..5e3b2ea10d8cef5008025aa53dd1362712193d48 100644 (file)
@@ -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 */
 
index c5ef6c8197dba7a0362ba2108a5a5d6f0c11b3a6..566d7f02941cc6006427d009109ee1d210b98658 100644 (file)
@@ -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
index bbdd11a09285a28a3fc194c751e3277f7d41b36a..6e314771466b28458e1414cc1baee55b796970a6 100644 (file)
@@ -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
        }
 }
 
index 64e8710d64fe680da4b61e69ea6c56286b5737f2..30af7762cfaadb30864f474071458527a1e73f7e 100644 (file)
@@ -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));
index f8f5d40b0e7f37285a8445eb7204a74fd1f9cd29..e66a5c9eb979d87259588dcd6e3858679b87c569 100644 (file)
@@ -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));
index f00306b8cb6517a228d70a9295be533dfa3567ad..a6585de144c90b3a622024617581b70683ffce46 100644 (file)
@@ -803,9 +803,7 @@ skip:
     viz_rmin  = next_rmin;
     viz_rmax = next_rmax;
 
-#ifdef DUNGEON_OVERVIEW
     recalc_mapseen();
-#endif
 }
 
 
index 5cf318416559533019a170eb10745f535c415b2b..4ddb7f4499715b6abada3a320d9cf695c90dfc61 100644 (file)
@@ -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