mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Recreate the CLUT when the palette changes
(cherry picked from commit 6e0ff4a4a40306a59c8b18d03ae86560e6a52a4a)
This commit is contained in:
parent
1a759a4904
commit
53f78b7693
1 changed files with 3 additions and 1 deletions
|
|
@ -2878,13 +2878,15 @@ void InitColorLUT(void)
|
||||||
{
|
{
|
||||||
UINT8 r, g, b;
|
UINT8 r, g, b;
|
||||||
static boolean clutinit = false;
|
static boolean clutinit = false;
|
||||||
if (!clutinit)
|
static RGBA_t *lastpalette = NULL;
|
||||||
|
if ((!clutinit) || (lastpalette != pLocalPalette))
|
||||||
{
|
{
|
||||||
for (r = 0; r < CLUTSIZE; r++)
|
for (r = 0; r < CLUTSIZE; r++)
|
||||||
for (g = 0; g < CLUTSIZE; g++)
|
for (g = 0; g < CLUTSIZE; g++)
|
||||||
for (b = 0; b < CLUTSIZE; b++)
|
for (b = 0; b < CLUTSIZE; b++)
|
||||||
colorlookup[r][g][b] = NearestColor(r << SHIFTCOLORBITS, g << SHIFTCOLORBITS, b << SHIFTCOLORBITS);
|
colorlookup[r][g][b] = NearestColor(r << SHIFTCOLORBITS, g << SHIFTCOLORBITS, b << SHIFTCOLORBITS);
|
||||||
clutinit = true;
|
clutinit = true;
|
||||||
|
lastpalette = pLocalPalette;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue