Commit Graph

107 Commits

Author SHA1 Message Date
nhmall
08852d25be mingw build bit 2020-04-11 10:14:05 -04:00
PatR
689c3e67fe restore 'use_inverse' option
'use_inverse' used to be unconditionally present but conditionally
had default value True for WIN32 and False for others.  The options
changes that moved things to optlist.h made it present for WIN32 and
absent for others.  Put it back, and change the default value to be
unconditionally True.
2020-04-01 14:58:40 -07:00
nhmall
5c3670b1f0 msdos build fix
../include/optlist.h:510:62: error: macro "NHOPTC" requires 10 arguments, but only 9 given
                 "color mappings for internal screen routines")
                                                              ^

../include/optlist.h:562:52: error: macro "NHOPTP" requires 10 arguments, but only 9 given
                 "prefix for old micro IBM_ options")
                                                    ^
2020-03-13 10:48:17 -04:00
nhmall
058fbc1cd5 more duplicate detect; also copy-and-paste for vt_tiledata entry left it enabled by default 2020-03-01 10:48:46 -05:00
nhmall
5d310d815d options follow-up: fix up duplicate_option_detection and !pet 2020-02-29 17:54:41 -05:00
nhmall
96a559e392 fix the menu_* options which had valok set to No 2020-02-26 14:23:26 -05:00
nhmall
68fdc3bbcb February 2020 options.c overhaul
combine boolean and compound options into a single allopt[] array for
processing in options.c.

move the definitions of the options into new include/optlist.h file which
uses a set of macros to define them appropriately.

during compile of options.c each option described in include/optlist.h:
   1. automatically results in a function prototype for an optfn called
      optfn_xxxx (xxxx is the option name).
   2. automatically results in an opt_xxxx enum value for referencing
      its index throughout options.c (xxxx is the option name).
   3. is used to initialize an element of the allopt[] array at index
      opt_xxxx (xxxx is the option name) based on the settings in the
      NHOPTB, NHOPTC, NHOPTP macros. Those macros only live during the
      compilation of include/optlist.h.

each optfn_xxxx() function can be called with a req id of: do_init, do_set,
get_val or do_handler.

req do_init is called from options_init, and if initialization or memory
allocation or other initialization for that particular option is needed,
it can be done in response to the init req.

req do_set is called from parseoptions() for each option it encounters
and the optfn_xxxx() function is expected to react and set the option
based on the string values that parseoptions() passes to it.

req get_val expects each optfn_xxxx() function to write the current
option value into the buffer it is passed.

req do_handler is called during doset() operations in response to player
selections most likely from the 'O' option-setting menu, but only if the
option is identified as having do_handler support in the allopts[]
'has_handler' boolean flag. Not every optfn_xxxx() does.

function special_handling() is eliminated. It's code has been redistributed
to individual handler functions for the option or purpose that they serve.

moved reglyph_darkroom() function from options.c to display.c
2020-02-26 00:24:37 -05:00