- fixed issues with fog setup and added missing fog to Exhumed's red palette.

Foggy lookups should not attempt to calculate a fade ramp, that does not work if the color gets brighter with distance.
Fixes #143
This commit is contained in:
Christoph Oelckers 2020-10-24 20:33:33 +02:00
parent acda4b7799
commit f02cf7e067
2 changed files with 2 additions and 0 deletions

View file

@ -142,6 +142,7 @@ void LookupTableInfo::postLoadTables(void)
// Try to detect fullbright translations. Unfortunately this cannot be used to detect fade strength because of loss of color precision in the palette map.
for (int j = 0; j < MAXPALOOKUPS; j++)
{
if (tables[j].FadeColor) continue;
auto lookup = tables[j].Shades;
if (lookup.Len() > 0)
{

View file

@ -84,6 +84,7 @@ int LoadPaletteLookups()
lookups.tables[kPalTorch].ShadeFactor = lookups.tables[kPalTorch2].ShadeFactor = (numshades - 2) / 20.f;
lookups.tables[kPalNoTorch].ShadeFactor = lookups.tables[kPalNoTorch2].ShadeFactor = (numshades - 2) / 4.f;
lookups.tables[kPalBrite].ShadeFactor = lookups.tables[kPalBrite].ShadeFactor = (numshades - 2) / 128.f;
lookups.setFadeColor(kPalRedBrite, 255, 0, 0);
}