Rudimentary key rebinding in game options

Currently shown only in the full options list, as it's not
quite complete. (For example, it doesn't handle movement commands,
or the getpos keys)
This commit is contained in:
Pasi Kallinen
2022-08-04 14:00:47 +03:00
parent b5acfc5c3f
commit 4ff9537b0d
5 changed files with 209 additions and 0 deletions

View File

@@ -264,6 +264,8 @@ extern void savech_extcmd(const char *, boolean);
extern char extcmd_initiator(void);
extern int doextcmd(void);
extern struct ext_func_tab *extcmds_getentry(int);
extern int count_bind_keys(void);
extern void handler_rebind_keys(void);
extern int extcmds_match(const char *, int, int **);
extern const char *key2extcmddesc(uchar);
extern boolean bind_specialkey(uchar, const char *);

View File

@@ -132,6 +132,8 @@ opt_##a,
+ sizeof "kick" + sizeof "force" + 20),
opt_out, set_in_game, Yes, Yes, No, Yes, NoAlias,
"action to take when encountering locked door or chest")
NHOPTO("bind keys", Advanced, o_bind_keys, BUFSZ, opt_in,
set_in_game, No, Yes, No, NoAlias, "edit key binds")
#if defined(MICRO) && !defined(AMIGA)
NHOPTB(BIOS, Advanced, 0, opt_in, set_in_config, Off, Yes, No, No, NoAlias,
&iflags.BIOS)