modifying 'O' command behavour

I was asked how a window-port controls which options are
set to SET_IN_FILE, DISP_IN_GAME, or SET_IN_GAME.

This provides a run-time way to change an option's SET_IN_FILE,
DISP_IN_GAME, or SET_IN_GAME status through code, rather
than clog up options.c with a lot of compile-time #ifdefs
for different ports to offer different default option settings.
Update the documentation to reflect this.
This commit is contained in:
nethack.allison
2002-02-07 03:23:55 +00:00
parent 843bdde1b3
commit 4b364d6927
4 changed files with 138 additions and 21 deletions

View File

@@ -238,6 +238,16 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
#define MENU_SELECTED TRUE
#define MENU_UNSELECTED FALSE
/*
* Option flags
* Each higher number includes the characteristics of the numbers
* below it.
*/
#define SET_IN_FILE 0 /* config file option only */
#define SET_VIA_PROG 1 /* may be set via extern program, not seen in game */
#define DISP_IN_GAME 2 /* may be set via extern program, displayed in game */
#define SET_IN_GAME 3 /* may be set via extern program or set in the game */
#define FEATURE_NOTICE_VER(major,minor,patch) (((unsigned long)major << 24) | \
((unsigned long)minor << 16) | \
((unsigned long)patch << 8) | \