mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 05:11:34 +00:00
Merge branch 'ogl-color-fix3' into 'master'
Ogl colormap fix third attempt See merge request KartKrew/Kart-Public!184
This commit is contained in:
commit
d2098c23fc
1 changed files with 4 additions and 6 deletions
|
@ -1494,17 +1494,16 @@ static void P_LoadRawSideDefs2(void *data)
|
||||||
color.s.red = (HEX2INT(col[1]) << 4) + HEX2INT(col[2]);
|
color.s.red = (HEX2INT(col[1]) << 4) + HEX2INT(col[2]);
|
||||||
color.s.green = (HEX2INT(col[3]) << 4) + HEX2INT(col[4]);
|
color.s.green = (HEX2INT(col[3]) << 4) + HEX2INT(col[4]);
|
||||||
color.s.blue = (HEX2INT(col[5]) << 4) + HEX2INT(col[6]);
|
color.s.blue = (HEX2INT(col[5]) << 4) + HEX2INT(col[6]);
|
||||||
color.s.alpha = 0;
|
|
||||||
|
|
||||||
#ifdef GLENCORE
|
#ifdef GLENCORE
|
||||||
if (encoremap)
|
if (encoremap)
|
||||||
{
|
{
|
||||||
j = encoremap[NearestColor(color.s.red, color.s.green, color.s.blue)];
|
j = encoremap[NearestColor(color.s.red, color.s.green, color.s.blue)];
|
||||||
//CONS_Printf("R_CreateColormap: encoremap[%d] = %d\n", j, encoremap[j]); -- moved encoremap upwards for optimisation
|
//CONS_Printf("R_CreateColormap: encoremap[%d] = %d\n", j, encoremap[j]); -- moved encoremap upwards for optimisation
|
||||||
color = pLocalPalette[j];
|
color = pLocalPalette[j]; // note: this sets alpha to 255, we will reset it below
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
color.s.alpha = 0; // reset/init the alpha, so the addition below will work correctly
|
||||||
sec->extra_colormap->rgba = color.rgba;
|
sec->extra_colormap->rgba = color.rgba;
|
||||||
|
|
||||||
// alpha
|
// alpha
|
||||||
|
@ -1536,17 +1535,16 @@ static void P_LoadRawSideDefs2(void *data)
|
||||||
color.s.red = (HEX2INT(col[1]) << 4) + HEX2INT(col[2]);
|
color.s.red = (HEX2INT(col[1]) << 4) + HEX2INT(col[2]);
|
||||||
color.s.green = (HEX2INT(col[3]) << 4) + HEX2INT(col[4]);
|
color.s.green = (HEX2INT(col[3]) << 4) + HEX2INT(col[4]);
|
||||||
color.s.blue = (HEX2INT(col[5]) << 4) + HEX2INT(col[6]);
|
color.s.blue = (HEX2INT(col[5]) << 4) + HEX2INT(col[6]);
|
||||||
color.s.alpha = 0;
|
|
||||||
|
|
||||||
#ifdef GLENCORE
|
#ifdef GLENCORE
|
||||||
if (encoremap)
|
if (encoremap)
|
||||||
{
|
{
|
||||||
j = encoremap[NearestColor(color.s.red, color.s.green, color.s.blue)];
|
j = encoremap[NearestColor(color.s.red, color.s.green, color.s.blue)];
|
||||||
//CONS_Printf("R_CreateColormap: encoremap[%d] = %d\n", j, encoremap[j]); -- moved encoremap upwards for optimisation
|
//CONS_Printf("R_CreateColormap: encoremap[%d] = %d\n", j, encoremap[j]); -- moved encoremap upwards for optimisation
|
||||||
color = pLocalPalette[j];
|
color = pLocalPalette[j]; // note: this sets alpha to 255, we will reset it below
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
color.s.alpha = 0; // reset/init the alpha, so the addition below will work correctly
|
||||||
sec->extra_colormap->fadergba = color.rgba;
|
sec->extra_colormap->fadergba = color.rgba;
|
||||||
|
|
||||||
// alpha
|
// alpha
|
||||||
|
|
Loading…
Reference in a new issue