farlook of "`"

Allow farlook/quicklook to step through all engravings--corridor
ones as well as room ones--with repeated '`' when picking location
with getpos(), similar to how repeated '^' goes through all traps
no matter what display character they use.

It isn't possible to look at corridor engravings by using their
default symbol '#'.  It is possible by using 'a' for "anything of
interest" but that matches lots of other stuff.

This tries to add an NHDT tags line to sym.h.  That was followed by
'git nhadd' which did stage it for commit, but date/branch/revision
tag expansion isn't working.  I did something similar to defsym.h
about 5 weeks ago; that one worked and I don't recall having needed
to do anything special.
This commit is contained in:
PatR
2024-08-17 11:19:45 -07:00
parent 45690624e5
commit 23532b012b
2 changed files with 8 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 sym.h */ /* NetHack 3.7 sym.h $NHDT-Date: $ $NHDT-Branch: $ $NHDT-Revision: $ */
/* Copyright (c) 2016 by Pasi Kallinen */ /* Copyright (c) 2016 by Pasi Kallinen */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -105,6 +105,7 @@ struct symsetentry {
#define is_cmap_water(i) ((i) == S_pool || (i) == S_water) #define is_cmap_water(i) ((i) == S_pool || (i) == S_water)
#define is_cmap_lava(i) ((i) == S_lava || (i) == S_lavawall) #define is_cmap_lava(i) ((i) == S_lava || (i) == S_lavawall)
#define is_cmap_stairs(i) ((i) >= S_upstair && (i) <= S_brdnladder) #define is_cmap_stairs(i) ((i) >= S_upstair && (i) <= S_brdnladder)
#define is_cmap_engraving(i) ((i) == S_engroom || (i) == S_engrcorr)
/* misc symbol definitions */ /* misc symbol definitions */
enum misc_symbols { enum misc_symbols {

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 getpos.c $NHDT-Date: 1708126536 2024/02/16 23:35:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.307 $ */ /* NetHack 3.7 getpos.c $NHDT-Date: 1723875487 2024/08/17 06:18:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $ */
/*-Copyright (c) Pasi Kallinen, 2023. */ /*-Copyright (c) Pasi Kallinen, 2023. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1033,7 +1033,11 @@ getpos(coord *ccp, boolean force, const char *goal)
|| c == (int) gs.showsyms[sidx] || c == (int) gs.showsyms[sidx]
/* have '^' match webs and vibrating square or any /* have '^' match webs and vibrating square or any
other trap that uses something other than '^' */ other trap that uses something other than '^' */
|| (c == '^' && is_cmap_trap(sidx))) || (c == '^' && is_cmap_trap(sidx))
/* have room engraving character (default '`')
match corridor engravings (default '#') too */
|| (c == gs.showsyms[S_engroom]
&& is_cmap_engraving(sidx)))
matching[sidx] = (char) ++k; matching[sidx] = (char) ++k;
} }
if (k) { if (k) {