From: PatR Date: Fri, 21 Feb 2020 21:46:03 +0000 (-0800) Subject: extra ^X info (mon's location) for u.ustuck X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9366307210b01cc903d29bfc9465aa0708d940df;p=nethack extra ^X info (mon's location) for u.ustuck --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index ab1be2e70..dbea1b6b3 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.103 $ $NHDT-Date: 1582020640 2020/02/18 10:10:40 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.106 $ $NHDT-Date: 1582321542 2020/02/21 21:45:42 $ General Fixes and Modified Features ----------------------------------- @@ -57,6 +57,7 @@ give feedback if controlled level teleport attempt fails because hero is already on the bottom level and player tries to go even deeper unseen pet that drowned didn't give "you have a sad feeling" message prevent ravens from blinding other ravens: /corvus oculum corvi non eruit/ +have ^X provide more information when held or swallowed Fixes to 3.7.0-x Problems that Were Exposed Via git Repository @@ -201,6 +202,9 @@ correct the Guidebook descriptions for msdos video_width and video_height to Code Cleanup and Reorganization ------------------------------- +new core file insight.c - move enlightenment and conduct from cmd.c to it, + also move vanquished, genocided, and extinct monsters from end.c, + and move one-line stethoscope/probing feedback from priest.c move majority of global variables into instance_globals struct g move zeroobj, zeromonst, zeroany into const_globals struct cg remove STATIC_DCL, STATIC_OVL, STATIC_VAR, STATIC_PTR diff --git a/include/extern.h b/include/extern.h index 0660ab847..48cd8a26a 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 extern.h $NHDT-Date: 1582155854 2020/02/19 23:44:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.799 $ */ +/* NetHack 3.6 extern.h $NHDT-Date: 1582321542 2020/02/21 21:45:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.801 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -424,6 +424,7 @@ E void FDECL(heal_legs, (int)); /* ### do_name.c ### */ +E char *FDECL(dxdy_to_dist_descr, (int, int, BOOLEAN_P)); E char *FDECL(coord_desc, (int, int, char *, CHAR_P)); E boolean FDECL(getpos_menu, (coord *, int)); E int FDECL(getpos, (coord *, BOOLEAN_P, const char *)); diff --git a/src/insight.c b/src/insight.c index 4e260e6b4..a6fa1ad4b 100644 --- a/src/insight.c +++ b/src/insight.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 insight.c $NHDT-Date: 1582238044 2020/02/20 22:34:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.5 $ */ +/* NetHack 3.7 insight.c $NHDT-Date: 1582321544 2020/02/21 21:45:44 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.7 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -914,9 +914,11 @@ int final; Sprintf(eos(buf), " (%u)", u.uswldtim); you_are(buf, ""); } else if (u.ustuck) { - Sprintf(buf, "%s %s", - (Upolyd && sticks(g.youmonst.data)) ? "holding" : "held by", - a_monnam(u.ustuck)); + boolean ustick = (Upolyd && sticks(g.youmonst.data)); + int dx = u.ustuck->mx - u.ux, dy = u.ustuck->my - u.uy; + + Sprintf(buf, "%s %s (%s)", ustick ? "holding" : "held by", + a_monnam(u.ustuck), dxdy_to_dist_descr(dx, dy, TRUE)); you_are(buf, ""); } if (Riding) {