number_pad (modified from <Someone>'s patch)

The number_pad option can now optionally hold a value
{0,1, 2 } for {off, on, DOS-mode} but plain number_pad and
!number_pad in config files still work as before.

When number_pad:2 is set, iflags.num_pad_mode is set to 1
which triggers the following behaviour:
> '5', M('5') and M('0') are mapped in rhack()
>in cmd.c, only when they are entered as a command. When used as a
>number, like in the 'n' command, no mapping takes place. '0' is
>already mapped to 'i' by the core. The
>only difference [<Someone>] left in (deliberately) is when you press Ctrl-0;
>this used to map to C('i'), which is an invalid command; now
>keep it '0' (which is interpreted as 'i' by the core.)
This commit is contained in:
nethack.allison
2003-06-06 03:49:56 +00:00
parent 3a31710a6c
commit a67ed775cb
8 changed files with 58 additions and 16 deletions

View File

@@ -172,6 +172,7 @@ struct instance_flags {
boolean menu_tab_sep; /* Use tabs to separate option menu fields */
boolean menu_requested; /* Flag for overloaded use of 'm' prefix
* on some non-move commands */
uchar num_pad_mode;
int purge_monsters; /* # of dead monsters still on fmon list */
int *opt_booldup; /* for duplication of boolean opts in config file */
int *opt_compdup; /* for duplication of compound opts in config file */