From 51ac21bc889c4952149528b5e3d043f78beda9d0 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 25 Aug 2022 17:11:43 +0300 Subject: [PATCH] Make mouse clicklook report only the specific tile Previously the mouse clicklook mentioned every tile that matched the character symbol, leading to overload of information and if playing with tiles, it was mostly useless. Also the most important bit - the tile info - was last in the text. Now mouse clicklook only reports the exact tile information that was clicked on. --- include/extern.h | 1 + src/cmd.c | 2 +- src/do_name.c | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/extern.h b/include/extern.h index 9b55a9636..8ab21673b 100644 --- a/include/extern.h +++ b/include/extern.h @@ -491,6 +491,7 @@ extern void heal_legs(int); extern char *dxdy_to_dist_descr(coordxy, coordxy, boolean); extern char *coord_desc(coordxy, coordxy, char *, char); +extern void auto_describe(coordxy, coordxy); extern boolean getpos_menu(coord *, int); extern int getpos(coord *, boolean, const char *); extern void getpos_sethilite(void(*f)(int), boolean(*d)(coordxy,coordxy)); diff --git a/src/cmd.c b/src/cmd.c index 5a67425a0..b0c9f085d 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -6277,7 +6277,7 @@ doclicklook(void) return ECMD_OK; g.context.move = FALSE; - (void) do_look(2, &g.clicklook_cc); + auto_describe(g.clicklook_cc.x, g.clicklook_cc.y); return ECMD_OK; } diff --git a/src/do_name.c b/src/do_name.c index 7e1f13af4..3aa6c8fb2 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -16,7 +16,6 @@ static void gloc_filter_init(void); static void gloc_filter_done(void); static boolean gather_locs_interesting(coordxy, coordxy, int); static void gather_locs(coord **, int *, int); -static void auto_describe(int, int); static void truncate_to_map(int *, int *, schar, schar); static void do_mgivenname(void); static boolean alreadynamed(struct monst *, char *, char *); @@ -553,8 +552,8 @@ coord_desc(coordxy x, coordxy y, char *outbuf, char cmode) RESTORE_WARNING_FORMAT_NONLITERAL -static void -auto_describe(int cx, int cy) +void +auto_describe(coordxy cx, coordxy cy) { coord cc; int sym = 0;