mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
Implement the todo that someone left in the source code
This commit is contained in:
parent
906c944895
commit
e154ff888d
2 changed files with 8 additions and 10 deletions
|
@ -216,21 +216,20 @@ namespace swrenderer
|
||||||
if (vis->RenderStyle.Flags & STYLEF_InvertSource)
|
if (vis->RenderStyle.Flags & STYLEF_InvertSource)
|
||||||
invertcolormap = !invertcolormap;
|
invertcolormap = !invertcolormap;
|
||||||
|
|
||||||
FDynamicColormap *mybasecolormap = basecolormap;
|
|
||||||
if (current_sector->sectornum != thing->Sector->sectornum) // compare sectornums to account for R_FakeFlat copies.
|
if (current_sector->sectornum != thing->Sector->sectornum) // compare sectornums to account for R_FakeFlat copies.
|
||||||
{
|
{
|
||||||
// Todo: The actor is from a different sector so we have to retrieve the proper basecolormap for that sector.
|
basecolormap = thing->Sector->ColorMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vis->RenderStyle == LegacyRenderStyles[STYLE_Add] && mybasecolormap->Fade != 0)
|
if (vis->RenderStyle == LegacyRenderStyles[STYLE_Add] && basecolormap->Fade != 0)
|
||||||
{
|
{
|
||||||
mybasecolormap = GetSpecialLights(mybasecolormap->Color, 0, mybasecolormap->Desaturate);
|
basecolormap = GetSpecialLights(basecolormap->Color, 0, basecolormap->Desaturate);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fullbright = !vis->foggy && ((renderflags & RF_FULLBRIGHT) || (thing->flags5 & MF5_BRIGHT));
|
bool fullbright = !vis->foggy && ((renderflags & RF_FULLBRIGHT) || (thing->flags5 & MF5_BRIGHT));
|
||||||
bool fadeToBlack = (vis->RenderStyle.Flags & STYLEF_FadeToBlack) != 0;
|
bool fadeToBlack = (vis->RenderStyle.Flags & STYLEF_FadeToBlack) != 0;
|
||||||
|
|
||||||
vis->SetColormap(r_SpriteVisibility / MAX(tz, MINZ), spriteshade, mybasecolormap, fullbright, invertcolormap, fadeToBlack);
|
vis->SetColormap(r_SpriteVisibility / MAX(tz, MINZ), spriteshade, basecolormap, fullbright, invertcolormap, fadeToBlack);
|
||||||
|
|
||||||
VisibleSpriteList::Instance()->Push(vis);
|
VisibleSpriteList::Instance()->Push(vis);
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,22 +166,21 @@ namespace swrenderer
|
||||||
invertcolormap = !invertcolormap;
|
invertcolormap = !invertcolormap;
|
||||||
}
|
}
|
||||||
|
|
||||||
FDynamicColormap *mybasecolormap = basecolormap;
|
|
||||||
if (current_sector->sectornum != thing->Sector->sectornum) // compare sectornums to account for R_FakeFlat copies.
|
if (current_sector->sectornum != thing->Sector->sectornum) // compare sectornums to account for R_FakeFlat copies.
|
||||||
{
|
{
|
||||||
// Todo: The actor is from a different sector so we have to retrieve the proper basecolormap for that sector.
|
basecolormap = thing->Sector->ColorMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sprites that are added to the scene must fade to black.
|
// Sprites that are added to the scene must fade to black.
|
||||||
if (vis->RenderStyle == LegacyRenderStyles[STYLE_Add] && mybasecolormap->Fade != 0)
|
if (vis->RenderStyle == LegacyRenderStyles[STYLE_Add] && basecolormap->Fade != 0)
|
||||||
{
|
{
|
||||||
mybasecolormap = GetSpecialLights(mybasecolormap->Color, 0, mybasecolormap->Desaturate);
|
basecolormap = GetSpecialLights(basecolormap->Color, 0, basecolormap->Desaturate);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fullbright = !vis->foggy && ((renderflags & RF_FULLBRIGHT) || (thing->flags5 & MF5_BRIGHT));
|
bool fullbright = !vis->foggy && ((renderflags & RF_FULLBRIGHT) || (thing->flags5 & MF5_BRIGHT));
|
||||||
bool fadeToBlack = (vis->RenderStyle.Flags & STYLEF_FadeToBlack) != 0;
|
bool fadeToBlack = (vis->RenderStyle.Flags & STYLEF_FadeToBlack) != 0;
|
||||||
|
|
||||||
vis->SetColormap(r_SpriteVisibility / MAX(tz, MINZ), spriteshade, mybasecolormap, fullbright, invertcolormap, fadeToBlack);
|
vis->SetColormap(r_SpriteVisibility / MAX(tz, MINZ), spriteshade, basecolormap, fullbright, invertcolormap, fadeToBlack);
|
||||||
|
|
||||||
VisibleSpriteList::Instance()->Push(vis);
|
VisibleSpriteList::Instance()->Push(vis);
|
||||||
RenderTranslucentPass::DrewAVoxel = true;
|
RenderTranslucentPass::DrewAVoxel = true;
|
||||||
|
|
Loading…
Reference in a new issue