From: Pasi Kallinen Date: Sat, 16 Sep 2017 15:17:56 +0000 (+0300) Subject: Show in wizmode level teleport menu your current location X-Git-Tag: NetHack-3.6.1_RC01~357 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f36d1036de2e56b622983ff89f121c542ae037af;p=nethack Show in wizmode level teleport menu your current location --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 388c36eb8..e060fc053 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 diff --git a/src/dungeon.c b/src/dungeon.c index a501afb8f..ca3f7c32d 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -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)