Skip to content
Snippets Groups Projects
Commit deee2a0d authored by Lactozilla's avatar Lactozilla :speech_balloon:
Browse files

I was using V_GetColor in a lot of places I shouldn't have, making the game...

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.
parent a3396d6b
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment