- added the needed properties for Doom64 colors and a little FraggleScript hack to test it with existing maps.

This commit is contained in:
Christoph Oelckers 2017-01-28 19:05:39 +01:00
commit dbbd797baa
8 changed files with 67 additions and 3 deletions

View file

@ -3875,7 +3875,7 @@ void FParser::SF_SetColor(void)
color.r=intvalue(t_argv[1]);
color.g=intvalue(t_argv[2]);
color.b=intvalue(t_argv[3]);
color.a=0;
color.a = (DFraggleThinker::ActiveThinker->setcolormaterial) ? 255 : 0;
}
else return;
@ -3883,7 +3883,16 @@ void FParser::SF_SetColor(void)
FSSectorTagIterator itr(tagnum);
while ((i = itr.Next()) >= 0)
{
level.sectors[i].ColorMap = GetSpecialLights (color, level.sectors[i].ColorMap->Fade, 0);
if (!DFraggleThinker::ActiveThinker->setcolormaterial)
level.sectors[i].ColorMap = GetSpecialLights(color, level.sectors[i].ColorMap->Fade, 0);
else
{
// little hack for testing the D64 color stuff.
for (int j = 0; j < 4; j++) level.sectors[i].SpecialColors[j] = color;
// simulates 'nocoloredspritelighting' settings.
int v = (color.r + color.g + color.b) / 3;
level.sectors[i].SpecialColors[4] = (255 + v + v) / 3;
}
}
}
}