diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 88fd0d0e4..1a2ccdd9a 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -8051,7 +8051,7 @@ static int32_t loadpalette(void) kread(fil,palette,768); kread(fil,&numshades,2); numshades = B_LITTLE16(numshades); - if (numshades <= 0) + if (numshades <= 1) return loadpalette_err("Invalid number of shades in \"palette.dat\"!"); alloc_palookup(0); @@ -8254,18 +8254,11 @@ 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, 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+k][((numshades-1)<<8) + i] = palookup[j+k][((numshades-1)<<8)]; - firstfogpal = j; break; } @@ -14985,7 +14978,7 @@ void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8 for (i=0; i