mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
Recreate the CLUT when the palette changes
This commit is contained in:
parent
f22e767380
commit
994f9492e8
1 changed files with 3 additions and 1 deletions
|
@ -2604,13 +2604,15 @@ void InitColorLUT(void)
|
|||
{
|
||||
UINT8 r, g, b;
|
||||
static boolean clutinit = false;
|
||||
if (!clutinit)
|
||||
static RGBA_t *lastpalette = NULL;
|
||||
if ((!clutinit) || (lastpalette != pLocalPalette))
|
||||
{
|
||||
for (r = 0; r < CLUTSIZE; r++)
|
||||
for (g = 0; g < CLUTSIZE; g++)
|
||||
for (b = 0; b < CLUTSIZE; b++)
|
||||
colorlookup[r][g][b] = NearestColor(r << SHIFTCOLORBITS, g << SHIFTCOLORBITS, b << SHIFTCOLORBITS);
|
||||
clutinit = true;
|
||||
lastpalette = pLocalPalette;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue