engine.c: extend the last workaround to all four fogpals generated at startup.

git-svn-id: https://svn.eduke32.com/eduke32@4457 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-04-29 20:07:48 +00:00
parent fc77a8aa3d
commit c697835073

View file

@ -8254,15 +8254,17 @@ int32_t loadlookups(int32_t fp, uint8_t **basepaltabptr)
for (j=1; j<=255-3; j++)
if (!palookup[j] && !palookup[j+1] && !palookup[j+2] && !palookup[j+3])
{
int32_t i;
int32_t i, k;
makepalookup(j, NULL, 15, 15, 15, 1);
makepalookup(j+1, NULL, 15, 0, 0, 1);
makepalookup(j+2, NULL, 0, 15, 0, 1);
makepalookup(j+3, NULL, 0, 0, 15, 1);
// Make last shade value always map to the same color index.
for (k=0; k<3; k++)
for (i=1; i<255; i++)
palookup[j][((numshades-1)<<8) + i] = palookup[j][((numshades-1)<<8)];
palookup[j+k][((numshades-1)<<8) + i] = palookup[j+k][((numshades-1)<<8)];
firstfogpal = j;
break;