Add whatis_filter option to filter eligible map locations for travel

Compound option whatis_filter, filters the eligible map locations
when getting a cursor location for targeting. Accepts 'n' (none),
'v' (map locations in view), or 'a' (map locations in the same area,
eg. room or corridor).
This commit is contained in:
Pasi Kallinen
2017-07-31 16:58:23 +03:00
parent 6b851e0503
commit 439028dcae
13 changed files with 285 additions and 43 deletions

View File

@@ -176,6 +176,14 @@ struct sysflag {
#define GPCOORDS_COMFULL 'f'
#define GPCOORDS_SCREEN 's'
enum getloc_filters {
GFILTER_NONE = 0,
GFILTER_VIEW,
GFILTER_AREA,
NUM_GFILTER
};
struct instance_flags {
/* stuff that really isn't option or platform related. They are
* set and cleared during the game to control the internal
@@ -194,7 +202,7 @@ struct instance_flags {
#define TER_MON 0x08
#define TER_DETECT 0x10 /* detect_foo magic rather than #terrain */
boolean getloc_travelmode;
boolean getloc_limitview;
int getloc_filter; /* GFILTER_foo */
boolean getloc_usemenu;
coord travelcc; /* coordinates for travel_cache */
boolean window_inited; /* true if init_nhwindows() completed */