trap/secret door detection enhancement

The old secret door detection just redisplayed locations with
discoveries (secret doors and traps, mostly).  Somewhere along the
line it was augmented to find hidden monsters and to deliver one or
two messages reporting how many things had been discovered.  Now it
has been augmented again, to find trapped doors and chests, and to
supply a message when the detection attempt fails to find anything.

More substantially, it highlights the relevant locations as they're
found, before the feedback message(s).

Initially I was using tmp_at() to mark all significant locations,
but that required --More-- and for player to acknowledge it when
detection was done.  That would probably be ok for wand of secret
door detection and spell of detect unseen, but it would be a hassle
for ^E.  It's been revised to use flash_glyph_at() [previously only
used when ^G creates unseen monsters, I think].

The new behavior seems to be working reasonably well.  For curses,
the 'timed_delay' option must be set.  flash_glyph_at() calls
flush_screen() between its output and nap in each cycle of multiple
flashes, but that evidently isn't sufficient for curses.  Maybe
curses init should just force on 'timed_delay'.

I've left the tmp_at() stuff in.  We might want to modify things to
use it instead of flash_glyph_at() when the accessibility flag is
set.  Its current compile-time selection won't be adequate though.
This commit is contained in:
PatR
2024-08-29 14:08:23 -07:00
parent 0dff31a745
commit 1fd943e860
2 changed files with 158 additions and 49 deletions

View File

@@ -2664,6 +2664,8 @@ if hero is punished or tethered to a buried iron ball and has no inventory (or
during streaming video
'query_menu' option to use a menu when asked certain yes/no questions
pyrolisk eggs explode when broken
wand of secret door detection, spell of detect unseen, and wizard mode ^E now
flash the cursor at each location where detection finds something
Platform- and/or Interface-Specific New Features