autodescribe for #terrain

Requested during beta-testing however long ago:  want a way to
look at specific map locations while #terrain is showing them
without monsters and/or objects and/or traps being displayed in
the way.  The post-3.6.0 autodescribe feature for getpos() made
this pretty easy to achieve, although the lookat() aspect felt
more like trail-and-error than careful design.

Instead of putting up a --More-- prompt, ask the player to pick
a location with the cursor.  Moving the cursor gives the terse
description for every location traversed.  Actually picking a
spot just ends #terrain and goes back to normal play.
This commit is contained in:
PatR
2016-05-12 18:57:10 -07:00
parent 088c47a427
commit dccc818801
6 changed files with 149 additions and 94 deletions

View File

@@ -3,8 +3,8 @@
/* NetHack may be freely redistributed. See license for details. */
/* If you change the flag structure make sure you increment EDITLEVEL in */
/* patchlevel.h if needed. Changing the instance_flags structure does */
/* not require incrementing EDITLEVEL. */
/* patchlevel.h if needed. Changing the instance_flags structure does */
/* not require incrementing EDITLEVEL. */
#ifndef FLAG_H
#define FLAG_H
@@ -97,7 +97,7 @@ struct flag {
* characters or letters, because that limits us to 26 roles.
* They are not booleans, because someday someone may need a neuter
* gender. Negative values are used to indicate that the user
* hasn't yet specified that particular value. If you determine
* hasn't yet specified that particular value. If you determine
* that the user wants a random choice, then you should set an
* appropriate random value; if you just left the negative value,
* the user would be asked again!
@@ -186,17 +186,24 @@ struct instance_flags {
int purge_monsters; /* # of dead monsters still on fmon list */
int override_ID; /* true to force full identification of objects */
int suppress_price; /* controls doname() for unpaid objects */
int terrainmode; /* for getpos()'s autodescribe when #terrain is active */
#define TER_MAP 0x01
#define TER_TRP 0x02
#define TER_OBJ 0x04
#define TER_MON 0x08
coord travelcc; /* coordinates for travel_cache */
boolean window_inited; /* true if init_nhwindows() completed */
boolean vision_inited; /* true if vision is ready */
boolean sanity_check; /* run sanity checks */
boolean mon_polycontrol; /* debug: control monster polymorphs */
/* stuff that is related to options and/or user or platform preferences */
/* stuff that is related to options and/or user or platform preferences
*/
unsigned msg_history; /* hint: # of top lines to save */
int getpos_coords; /* show coordinates when getting cursor position */
int menu_headings; /* ATR for menu headings */
int *opt_booldup; /* for duplication of boolean opts in config file */
int *opt_compdup; /* for duplication of compound opts in config file */
int *opt_compdup; /* for duplication of compound opts in conf file */
#ifdef ALTMETA
boolean altmeta; /* Alt-c sends ESC c rather than M-c */
#endif
@@ -224,11 +231,11 @@ struct instance_flags {
boolean hilite_pile; /* mark piles of objects with a hilite */
boolean autodescribe; /* autodescribe mode in getpos() */
#if 0
boolean DECgraphics; /* use DEC VT-xxx extended character set */
boolean IBMgraphics; /* use IBM extended character set */
boolean DECgraphics; /* use DEC VT-xxx extended character set */
boolean IBMgraphics; /* use IBM extended character set */
#ifdef MAC_GRAPHICS_ENV
boolean MACgraphics; /* use Macintosh extended character set, as
as defined in the special font HackFont */
boolean MACgraphics; /* use Macintosh extended character set, as
as defined in the special font HackFont */
#endif
#endif
uchar bouldersym; /* symbol for boulder display */
@@ -275,6 +282,7 @@ struct instance_flags {
boolean vt_tiledata; /* output console codes for tile support in TTY */
#endif
boolean wizweight; /* display weight of everything in wizard mode */
/*
* Window capability support.
*/