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:
@@ -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) | \
|
||||
|
||||
Reference in New Issue
Block a user