Allow setting the colormap from mapinfo (dsda-doom)

This commit is contained in:
Ricardo Luís Vaz Silva 2023-10-28 00:01:06 -03:00 committed by Christoph Oelckers
commit e12f2ce0fe
4 changed files with 20 additions and 1 deletions

View file

@ -271,7 +271,11 @@ void FSoftwareRenderer::SetColormap(FLevelLocals *Level)
NormalLight.Maps = realcolormaps.Maps;
NormalLight.ChangeColor(PalEntry(255, 255, 255), 0);
NormalLight.ChangeFade(Level->fadeto);
if (Level->fadeto == 0)
if(Level->info->flags3 & LEVEL3_HAS_CUSTOM_COLORMAP)
{
SetDefaultColormap(Level->info->CustomColorMap.GetChars());
}
else if (Level->fadeto == 0)
{
SetDefaultColormap(Level->info->FadeTable.GetChars());
}