]> granicus.if.org Git - nethack/commitdiff
Show in wizmode level teleport menu your current location
authorPasi Kallinen <paxed@alt.org>
Sat, 16 Sep 2017 15:17:56 +0000 (18:17 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 16 Sep 2017 15:19:25 +0000 (18:19 +0300)
doc/fixes36.1
src/dungeon.c

index 388c36eb8360c030a3f04ae061291f6ba81b763b..e060fc053ecdd5d029a677a7f0a32ebc4ab16320 100644 (file)
@@ -437,6 +437,7 @@ when the Amulet increased spell casting cost, nothing actually happened (aside
 if was possible to leash an adjacent pet while engulfed
 if leash or unleash attempt was directed at "remembered, unseen monster" glyph
        and yielded "there's no creature there", the glyph wasn't removed
+wizmode level teleport menu indicates on what level you currently are
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index a501afb8fd9ee84b613fb11c02df1a3f063d0f75..ca3f7c32d67a1d803638c6c376d88aa798e8bfd4 100644 (file)
@@ -57,6 +57,7 @@ STATIC_DCL boolean FDECL(unreachable_level, (d_level *, BOOLEAN_P));
 STATIC_DCL void FDECL(tport_menu, (winid, char *, struct lchoice *, d_level *,
                                    BOOLEAN_P));
 STATIC_DCL const char *FDECL(br_string, (int));
+STATIC_DCL char FDECL(chr_u_on_lvl, (d_level *));
 STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P,
                                      struct lchoice *));
 STATIC_DCL mapseen *FDECL(load_mapseen, (int));
@@ -1794,6 +1795,13 @@ int type;
     return " (unknown)";
 }
 
+STATIC_OVL char
+chr_u_on_lvl(dlev)
+d_level *dlev;
+{
+    return u.uz.dnum == dlev->dnum && u.uz.dlevel == dlev->dlevel ? '*' : ' ';
+}
+
 /* Print all child branches between the lower and upper bounds. */
 STATIC_OVL void
 print_branch(win, dnum, lower_bound, upper_bound, bymenu, lchoices_p)
@@ -1811,7 +1819,9 @@ struct lchoice *lchoices_p;
     for (br = branches; br; br = br->next) {
         if (br->end1.dnum == dnum && lower_bound < br->end1.dlevel
             && br->end1.dlevel <= upper_bound) {
-            Sprintf(buf, "   %s to %s: %d", br_string(br->type),
+            Sprintf(buf, "%c %s to %s: %d",
+                    bymenu ? chr_u_on_lvl(&br->end1) : ' ',
+                    br_string(br->type),
                     dungeons[br->end2.dnum].dname, depth(&br->end1));
             if (bymenu)
                 tport_menu(win, buf, lchoices_p, &br->end1,
@@ -1885,7 +1895,9 @@ xchar *rdgn;
             print_branch(win, i, last_level, slev->dlevel.dlevel, bymenu,
                          &lchoices);
 
-            Sprintf(buf, "   %s: %d", slev->proto, depth(&slev->dlevel));
+            Sprintf(buf, "%c %s: %d",
+                    chr_u_on_lvl(&slev->dlevel),
+                    slev->proto, depth(&slev->dlevel));
             if (Is_stronghold(&slev->dlevel))
                 Sprintf(eos(buf), " (tune %s)", tune);
             if (bymenu)