CHANGE_COLOR palette option adjustments
It was too early to call the windowport change_color() routine while processing the config file. The windowport was not yet fully operational. Now the palette option processing will just place the rgb value into the appropriate ga.altpalette[CLR_MAX] entry. init_sound_disp_gamewindows(void) [allmain.c] calls change_palette() [coloratt.c] and it will call the windowport change_color() function for each ga.altpalette[] entry that has been set. Notes: The rgb values stored in ga.altpalette[] have the NH_ALTPALETTE bit set so that the rgb value of 0 can be stored and be distinguishable from a "not set" entry. The NH_ALTPALETTE bit is cleared from the rgb value in change_palette() prior to calling the windowport change_color() function. The syntax for palette is colorname/r-g-b. For example: palette:black/12-12-12 colorname must be one of the NH_BASIC_COLOR names or a suitable alias for one of those 16 entries. Some of the windowport CHANGE_COLOR functions had the wrong parameters, perhaps due to bitrot. Those have been corrected to match the prototype.
This commit is contained in:
+5
-5
@@ -534,14 +534,14 @@ static int optfn_##a(int, int, boolean, char *, char *);
|
||||
No, Yes, No, No, NoAlias,
|
||||
"the inventory order of the items in your pack")
|
||||
#ifdef CHANGE_COLOR
|
||||
#ifndef WIN32
|
||||
#ifndef MAC /* not old Mac OS9 */
|
||||
NHOPTC(palette, Advanced, 15, opt_in, set_gameview,
|
||||
No, Yes, No, No, "hicolor",
|
||||
"palette (adjust an RGB color in palette (color/R-G-B)")
|
||||
#else
|
||||
NHOPTC(palette, Advanced, 15, opt_in, set_in_game,
|
||||
No, Yes, No, No, "hicolor",
|
||||
"palette (00c/880/-fff is blue/yellow/reverse white)")
|
||||
#else
|
||||
NHOPTC(palette, Advanced, 15, opt_in, set_in_config,
|
||||
No, Yes, No, No, "hicolor",
|
||||
"palette (adjust an RGB color in palette (color-R-G-B)")
|
||||
#endif
|
||||
#endif
|
||||
/* prior to paranoid_confirmation, 'prayconfirm' was a distinct option */
|
||||
|
||||
Reference in New Issue
Block a user