made the sector's color_* properties work in the software renderer.
With no 3D floors this appears to be ok, but there are so many places where colormaps are being set in the software renderer that I cannot guarantee that I got all of them correct. This will need some testing.
This commit is contained in:
parent
921bc763fb
commit
76d3ae5ba2
14 changed files with 59 additions and 40 deletions
|
|
@ -105,7 +105,7 @@ namespace swrenderer
|
|||
// killough 4/13/98: get correct lightlevel for 2s normal textures
|
||||
sec = Thread->OpaquePass->FakeFlat(frontsector, &tempsec, nullptr, nullptr, nullptr, 0, 0, 0, 0);
|
||||
|
||||
FDynamicColormap *basecolormap = GetColorTable(sec->Colormap); // [RH] Set basecolormap
|
||||
FDynamicColormap *basecolormap = GetColorTable(sec->Colormap, sec->SpecialColors[sector_t::walltop]); // [RH] Set basecolormap
|
||||
|
||||
int wallshade = ds->shade;
|
||||
rw_lightstep = ds->lightstep;
|
||||
|
|
@ -125,7 +125,7 @@ namespace swrenderer
|
|||
if (clip3d->sclipTop <= frontsector->e->XFloor.lightlist[i].plane.Zat0())
|
||||
{
|
||||
lightlist_t *lit = &frontsector->e->XFloor.lightlist[i];
|
||||
basecolormap = GetColorTable(lit->extra_colormap);
|
||||
basecolormap = GetColorTable(lit->extra_colormap, frontsector->SpecialColors[sector_t::walltop]);
|
||||
bool foggy = (level.fadeto || basecolormap->Fade || (level.flags & LEVEL_HASFADETABLE)); // [RH] set foggy flag
|
||||
wallshade = LightVisibility::LightLevelToShade(curline->sidedef->GetLightLevel(ds->foggy, *lit->p_lightlevel, lit->lightsource != nullptr) + LightVisibility::ActualExtraLight(ds->foggy, viewport), foggy);
|
||||
break;
|
||||
|
|
@ -703,7 +703,7 @@ namespace swrenderer
|
|||
if (clip3d->sclipTop <= backsector->e->XFloor.lightlist[j].plane.Zat0())
|
||||
{
|
||||
lightlist_t *lit = &backsector->e->XFloor.lightlist[j];
|
||||
basecolormap = GetColorTable(lit->extra_colormap);
|
||||
basecolormap = GetColorTable(lit->extra_colormap, frontsector->SpecialColors[sector_t::walltop]);
|
||||
bool foggy = (level.fadeto || basecolormap->Fade || (level.flags & LEVEL_HASFADETABLE)); // [RH] set foggy flag
|
||||
wallshade = LightVisibility::LightLevelToShade(curline->sidedef->GetLightLevel(ds->foggy, *lit->p_lightlevel, lit->lightsource != nullptr) + LightVisibility::ActualExtraLight(ds->foggy, Thread->Viewport.get()), foggy);
|
||||
break;
|
||||
|
|
@ -717,7 +717,7 @@ namespace swrenderer
|
|||
if (clip3d->sclipTop <= frontsector->e->XFloor.lightlist[j].plane.Zat0())
|
||||
{
|
||||
lightlist_t *lit = &frontsector->e->XFloor.lightlist[j];
|
||||
basecolormap = GetColorTable(lit->extra_colormap);
|
||||
basecolormap = GetColorTable(lit->extra_colormap, frontsector->SpecialColors[sector_t::walltop]);
|
||||
bool foggy = (level.fadeto || basecolormap->Fade || (level.flags & LEVEL_HASFADETABLE)); // [RH] set foggy flag
|
||||
wallshade = LightVisibility::LightLevelToShade(curline->sidedef->GetLightLevel(ds->foggy, *lit->p_lightlevel, lit->lightsource != nullptr) + LightVisibility::ActualExtraLight(ds->foggy, Thread->Viewport.get()), foggy);
|
||||
break;
|
||||
|
|
@ -725,7 +725,7 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
}
|
||||
if (basecolormap == nullptr) basecolormap = GetColorTable(frontsector->Colormap);
|
||||
if (basecolormap == nullptr) basecolormap = GetColorTable(frontsector->Colormap, frontsector->SpecialColors[sector_t::walltop]);
|
||||
|
||||
if (rw_pic != DONT_DRAW)
|
||||
{
|
||||
|
|
@ -882,7 +882,7 @@ namespace swrenderer
|
|||
if (clip3d->sclipTop <= backsector->e->XFloor.lightlist[j].plane.Zat0())
|
||||
{
|
||||
lightlist_t *lit = &backsector->e->XFloor.lightlist[j];
|
||||
basecolormap = GetColorTable(lit->extra_colormap);
|
||||
basecolormap = GetColorTable(lit->extra_colormap, frontsector->SpecialColors[sector_t::walltop]);
|
||||
bool foggy = (level.fadeto || basecolormap->Fade || (level.flags & LEVEL_HASFADETABLE)); // [RH] set foggy flag
|
||||
wallshade = LightVisibility::LightLevelToShade(curline->sidedef->GetLightLevel(ds->foggy, *lit->p_lightlevel, lit->lightsource != nullptr) + LightVisibility::ActualExtraLight(ds->foggy, Thread->Viewport.get()), foggy);
|
||||
break;
|
||||
|
|
@ -896,7 +896,7 @@ namespace swrenderer
|
|||
if (clip3d->sclipTop <= frontsector->e->XFloor.lightlist[j].plane.Zat0())
|
||||
{
|
||||
lightlist_t *lit = &frontsector->e->XFloor.lightlist[j];
|
||||
basecolormap = GetColorTable(lit->extra_colormap);
|
||||
basecolormap = GetColorTable(lit->extra_colormap, frontsector->SpecialColors[sector_t::walltop]);
|
||||
bool foggy = (level.fadeto || basecolormap->Fade || (level.flags & LEVEL_HASFADETABLE)); // [RH] set foggy flag
|
||||
wallshade = LightVisibility::LightLevelToShade(curline->sidedef->GetLightLevel(ds->foggy, *lit->p_lightlevel, lit->lightsource != nullptr) + LightVisibility::ActualExtraLight(ds->foggy, Thread->Viewport.get()), foggy);
|
||||
break;
|
||||
|
|
@ -904,7 +904,7 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
}
|
||||
if (basecolormap == nullptr) basecolormap = GetColorTable(frontsector->Colormap);
|
||||
if (basecolormap == nullptr) basecolormap = GetColorTable(frontsector->Colormap, frontsector->SpecialColors[sector_t::walltop]);
|
||||
|
||||
if (rw_pic != DONT_DRAW)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue