Allow toggling menu for any travel target list

This commit is contained in:
Pasi Kallinen
2016-10-13 20:16:21 +03:00
parent 4af4fc1143
commit abb4f0fab2
7 changed files with 150 additions and 65 deletions

View File

@@ -379,7 +379,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));
E boolean FDECL(getpos_menu, (coord *, BOOLEAN_P, 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));

View File

@@ -194,6 +194,8 @@ struct instance_flags {
#define TER_MON 0x08
#define TER_DETECT 0x10 /* detect_foo magic rather than #terrain */
boolean getloc_travelmode;
boolean getloc_limitview;
boolean getloc_usemenu;
coord travelcc; /* coordinates for travel_cache */
boolean window_inited; /* true if init_nhwindows() completed */
boolean vision_inited; /* true if vision is ready */
@@ -471,13 +473,25 @@ enum nh_keyfunc {
NHKF_GETPOS_DOOR_PREV,
NHKF_GETPOS_UNEX_NEXT,
NHKF_GETPOS_UNEX_PREV,
NHKF_GETPOS_INTERESTING_NEXT,
NHKF_GETPOS_INTERESTING_PREV,
NHKF_GETPOS_HELP,
NHKF_GETPOS_MENU,
NHKF_GETPOS_MENU_FOV,
NHKF_GETPOS_LIMITVIEW,
NUM_NHKF
};
enum gloctypes {
GLOC_MONS = 0,
GLOC_OBJS,
GLOC_DOOR,
GLOC_EXPLORE,
GLOC_INTERESTING,
NUM_GLOCS
};
/* commands[] is used to directly access cmdlist[] instead of looping
through it to find the entry for a given input character;
move_X is the character used for moving one step in direction X;