I was using V_GetColor in a lot of places I shouldn't have, making the game look wrong with a non-default colour profile.

Though, I left R_RainbowColormap alone.
This commit is contained in:
Jaime Passos 2020-01-04 22:19:30 -03:00
parent a3396d6bd7
commit deee2a0d6f
2 changed files with 4 additions and 3 deletions

View file

@ -324,8 +324,8 @@ UINT8 ASTBlendPixel_8bpp(UINT8 background, UINT8 foreground, int style, UINT8 al
else if (style != AST_TRANSLUCENT)
{
RGBA_t texel;
RGBA_t bg = V_GetColor(background);
RGBA_t fg = V_GetColor(foreground);
RGBA_t bg = V_GetMasterColor(background);
RGBA_t fg = V_GetMasterColor(foreground);
texel.rgba = ASTBlendPixel(bg, fg, style, alpha);
return NearestColor(texel.s.red, texel.s.green, texel.s.blue);
}
@ -1664,7 +1664,7 @@ static void R_CreateFadeColormaps(void)
#define GETCOLOR \
px = colormaps[i%256]; \
fade = (i/256) * (256 / FADECOLORMAPROWS); \
rgba = V_GetColor(px);
rgba = V_GetMasterColor(px);
// to black
makeblack:

View file

@ -64,6 +64,7 @@ void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue);
// Retrieve the ARGB value from a palette color index
#define V_GetColor(color) (pLocalPalette[color&0xFF])
#define V_GetMasterColor(color) (pMasterPalette[color&0xFF])
// Bottom 8 bits are used for parameter (screen or character)
#define V_PARAMMASK 0x000000FF