mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-13 14:25:10 +00:00
Merge branch 'vgetcolorfixes' into 'master'
Fix usage of V_GetColor See merge request STJr/SRB2!638
This commit is contained in:
commit
6af0249d01
2 changed files with 4 additions and 3 deletions
|
@ -324,8 +324,8 @@ UINT8 ASTBlendPixel_8bpp(UINT8 background, UINT8 foreground, int style, UINT8 al
|
||||||
else if (style != AST_TRANSLUCENT)
|
else if (style != AST_TRANSLUCENT)
|
||||||
{
|
{
|
||||||
RGBA_t texel;
|
RGBA_t texel;
|
||||||
RGBA_t bg = V_GetColor(background);
|
RGBA_t bg = V_GetMasterColor(background);
|
||||||
RGBA_t fg = V_GetColor(foreground);
|
RGBA_t fg = V_GetMasterColor(foreground);
|
||||||
texel.rgba = ASTBlendPixel(bg, fg, style, alpha);
|
texel.rgba = ASTBlendPixel(bg, fg, style, alpha);
|
||||||
return NearestColor(texel.s.red, texel.s.green, texel.s.blue);
|
return NearestColor(texel.s.red, texel.s.green, texel.s.blue);
|
||||||
}
|
}
|
||||||
|
@ -1664,7 +1664,7 @@ static void R_CreateFadeColormaps(void)
|
||||||
#define GETCOLOR \
|
#define GETCOLOR \
|
||||||
px = colormaps[i%256]; \
|
px = colormaps[i%256]; \
|
||||||
fade = (i/256) * (256 / FADECOLORMAPROWS); \
|
fade = (i/256) * (256 / FADECOLORMAPROWS); \
|
||||||
rgba = V_GetColor(px);
|
rgba = V_GetMasterColor(px);
|
||||||
|
|
||||||
// to black
|
// to black
|
||||||
makeblack:
|
makeblack:
|
||||||
|
|
|
@ -64,6 +64,7 @@ void V_CubeApply(UINT8 *red, UINT8 *green, UINT8 *blue);
|
||||||
|
|
||||||
// Retrieve the ARGB value from a palette color index
|
// Retrieve the ARGB value from a palette color index
|
||||||
#define V_GetColor(color) (pLocalPalette[color&0xFF])
|
#define V_GetColor(color) (pLocalPalette[color&0xFF])
|
||||||
|
#define V_GetMasterColor(color) (pMasterPalette[color&0xFF])
|
||||||
|
|
||||||
// Bottom 8 bits are used for parameter (screen or character)
|
// Bottom 8 bits are used for parameter (screen or character)
|
||||||
#define V_PARAMMASK 0x000000FF
|
#define V_PARAMMASK 0x000000FF
|
||||||
|
|
Loading…
Reference in a new issue