- 2D drawer cleanup.
This commit is contained in:
parent
ac1f4b8f11
commit
b18faacab0
36 changed files with 1032 additions and 1147 deletions
|
|
@ -106,7 +106,7 @@ void HWDecal::DrawDecal(HWDrawInfo *di, FRenderState &state)
|
|||
int thisll = lightlist[k].caster != nullptr ? hw_ClampLight(*lightlist[k].p_lightlevel) : lightlevel;
|
||||
FColormap thiscm;
|
||||
thiscm.FadeColor = Colormap.FadeColor;
|
||||
thiscm.CopyFrom3DLight(&lightlist[k]);
|
||||
CopyFrom3DLight(thiscm, &lightlist[k]);
|
||||
di->SetColor(state, thisll, rellight, di->isFullbrightScene(), thiscm, alpha);
|
||||
if (di->Level->flags3 & LEVEL3_NOCOLOREDSPRITELIGHTING) thiscm.Decolorize();
|
||||
di->SetFog(state, thisll, rellight, di->isFullbrightScene(), &thiscm, false);
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ void HWFlat::SetFrom3DFloor(F3DFloor *rover, bool top, bool underside)
|
|||
}
|
||||
else
|
||||
{
|
||||
Colormap.CopyFrom3DLight(light);
|
||||
CopyFrom3DLight(Colormap, light);
|
||||
FlatColor = plane.model->SpecialColors[plane.isceiling];
|
||||
AddColor = plane.model->AdditiveColors[plane.isceiling];
|
||||
TextureFx = &plane.model->planes[plane.isceiling].TextureFx;
|
||||
|
|
@ -548,7 +548,7 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sector_t * frontsector, int which)
|
|||
lightlevel = hw_ClampLight(*light->p_lightlevel);
|
||||
}
|
||||
|
||||
Colormap.CopyFrom3DLight(light);
|
||||
CopyFrom3DLight(Colormap, light);
|
||||
}
|
||||
renderstyle = STYLE_Translucent;
|
||||
Process(di, frontsector, sector_t::floor, false);
|
||||
|
|
@ -604,7 +604,7 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sector_t * frontsector, int which)
|
|||
{
|
||||
lightlevel = hw_ClampLight(*light->p_lightlevel);
|
||||
}
|
||||
Colormap.CopyFrom3DLight(light);
|
||||
CopyFrom3DLight(Colormap, light);
|
||||
}
|
||||
renderstyle = STYLE_Translucent;
|
||||
Process(di, frontsector, sector_t::ceiling, false);
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ void HWSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
|
|||
|
||||
FColormap thiscm;
|
||||
thiscm.CopyFog(Colormap);
|
||||
thiscm.CopyFrom3DLight(&(*lightlist)[i]);
|
||||
CopyFrom3DLight(thiscm, &(*lightlist)[i]);
|
||||
if (di->Level->flags3 & LEVEL3_NOCOLOREDSPRITELIGHTING)
|
||||
{
|
||||
thiscm.Decolorize();
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags)
|
|||
FColormap thiscm;
|
||||
thiscm.FadeColor = Colormap.FadeColor;
|
||||
thiscm.FogDensity = Colormap.FogDensity;
|
||||
thiscm.CopyFrom3DLight(&(*lightlist)[i]);
|
||||
CopyFrom3DLight(thiscm, &(*lightlist)[i]);
|
||||
di->SetColor(state, thisll, rel, false, thiscm, absalpha);
|
||||
if (type != RENDERWALL_M2SNF) di->SetFog(state, thisll, rel, false, &thiscm, RenderStyle == STYLE_Add);
|
||||
state.SetSplitPlanes((*lightlist)[i].plane, lowplane);
|
||||
|
|
@ -619,7 +619,7 @@ void HWWall::Put3DWall(HWDrawInfo *di, lightlist_t * lightlist, bool translucent
|
|||
}
|
||||
// relative light won't get changed here. It is constant across the entire wall.
|
||||
|
||||
Colormap.CopyFrom3DLight(lightlist);
|
||||
CopyFrom3DLight(Colormap, lightlist);
|
||||
PutWall(di, translucent);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue