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:
@@ -157,6 +157,11 @@ struct instance_globals_a {
|
||||
short *animal_list; /* list of PM values for animal monsters */
|
||||
int animal_list_count;
|
||||
|
||||
#ifdef CHANGE_COLOR
|
||||
/* options.c */
|
||||
uint32 altpalette[CLR_MAX];
|
||||
#endif
|
||||
|
||||
/* pickup.c */
|
||||
int A_first_hint; /* menustyle:Full plus 'A' response + !paranoid:A */
|
||||
int A_second_hint; /* menustyle:Full plus 'A' response + paranoid:A */
|
||||
@@ -759,6 +764,7 @@ struct instance_globals_o {
|
||||
boolean opt_need_promptstyle;
|
||||
boolean opt_reset_customcolors;
|
||||
boolean opt_reset_customsymbols;
|
||||
boolean opt_update_basic_palette;
|
||||
|
||||
/* pickup.c */
|
||||
int oldcap; /* last encumbrance */
|
||||
|
||||
Reference in New Issue
Block a user