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:
@@ -389,6 +389,14 @@ E char *fqn_prefix_names[PREFIX_COUNT];
|
||||
|
||||
E NEARDATA struct savefile_info sfcap, sfrestinfo, sfsaveinfo;
|
||||
|
||||
struct opvar {
|
||||
xchar spovartyp; /* one of SPOVAR_foo */
|
||||
union {
|
||||
char *str;
|
||||
long l;
|
||||
} vardata;
|
||||
};
|
||||
|
||||
struct autopickup_exception {
|
||||
struct nhregex *regex;
|
||||
char *pattern;
|
||||
|
||||
@@ -384,7 +384,7 @@ E void NDECL(heal_legs);
|
||||
/* ### do_name.c ### */
|
||||
|
||||
E char *FDECL(coord_desc, (int, int, char *, CHAR_P));
|
||||
E boolean FDECL(getpos_menu, (coord *, BOOLEAN_P, int));
|
||||
E boolean FDECL(getpos_menu, (coord *, int));
|
||||
E int FDECL(getpos, (coord *, BOOLEAN_P, const char *));
|
||||
E void FDECL(getpos_sethilite, (void (*f)(int)));
|
||||
E void FDECL(new_mname, (struct monst *, int));
|
||||
@@ -2250,6 +2250,11 @@ E boolean
|
||||
FDECL(dig_corridor, (coord *, coord *, BOOLEAN_P, SCHAR_P, SCHAR_P));
|
||||
E void FDECL(fill_room, (struct mkroom *, BOOLEAN_P));
|
||||
E boolean FDECL(load_special, (const char *));
|
||||
E xchar FDECL(selection_getpoint, (int, int, struct opvar *));
|
||||
E struct opvar *FDECL(selection_opvar, (char *));
|
||||
E void FDECL(opvar_free_x, (struct opvar *));
|
||||
E void FDECL(set_selection_floodfillchk, (int FDECL((*), (int,int))));
|
||||
E void FDECL(selection_floodfill, (struct opvar *, int, int, BOOLEAN_P));
|
||||
|
||||
/* ### spell.c ### */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -235,6 +235,12 @@ enum screen_symbols {
|
||||
#define is_cmap_drawbridge(i) ((i) >= S_vodbridge && (i) <= S_hcdbridge)
|
||||
#define is_cmap_door(i) ((i) >= S_vodoor && (i) <= S_hcdoor)
|
||||
#define is_cmap_wall(i) ((i) >= S_stone && (i) <= S_trwall)
|
||||
#define is_cmap_room(i) ((i) >= S_room && (i) <= S_darkroom)
|
||||
#define is_cmap_corr(i) ((i) >= S_corr && (i) <= S_litcorr)
|
||||
#define is_cmap_furniture(i) ((i) >= S_upstair && (i) <= S_fountain)
|
||||
#define is_cmap_water(i) ((i) == S_pool || (i) == S_water)
|
||||
#define is_cmap_lava(i) ((i) == S_lava)
|
||||
|
||||
|
||||
struct symdef {
|
||||
uchar sym;
|
||||
|
||||
@@ -256,14 +256,6 @@ enum opcode_defs {
|
||||
#define SP_MAPCHAR_LIT(l) ((((l) >> 8) & 0xffff) - 10)
|
||||
#define SP_MAPCHAR_PACK(typ, lit) (((10 + (lit)) << 8) | ((typ) & 0xff))
|
||||
|
||||
struct opvar {
|
||||
xchar spovartyp; /* one of SPOVAR_foo */
|
||||
union {
|
||||
char *str;
|
||||
long l;
|
||||
} vardata;
|
||||
};
|
||||
|
||||
struct splev_var {
|
||||
struct splev_var *next;
|
||||
char *name;
|
||||
|
||||
Reference in New Issue
Block a user