- slight rework for ProcessPalletLump

This commit is contained in:
SoapyMan 2023-04-17 20:08:56 +06:00
parent 078694290d
commit 3e136cce78

View File

@ -1242,7 +1242,7 @@ void MangleWheelModels(void)
src++;
}
} while (++i < 3);
}
// HACK: Show clean model only in Rio.
//if (GameLevel == 3)
@ -1276,24 +1276,23 @@ void ProcessPalletLump(char *lump_ptr, int lump_size)
texnum = buffPtr[1];
tpageindex = buffPtr[2];
clut_number = buffPtr[3];
buffPtr += 4;
if (clut_number == -1)
{
// store clut
LoadImage(&clutpos, (u_long*)(buffPtr + 4));
LoadImage(&clutpos, (u_long*)buffPtr);
buffPtr += 8;
clutValue = GetClut(clutpos.x, clutpos.y);
*clutTablePtr++ = clutValue;
IncrementClutNum(&clutpos);
buffPtr += 12;
*clutTablePtr++ = clutValue;
}
else
{
// use stored clut
clutValue = clutTable[clut_number];
buffPtr += 4;
}
civ_clut[GetCarPalIndex(tpageindex)][texnum][palette + 1] = clutValue;