Create CameraLight class

This commit is contained in:
Magnus Norddahl 2017-01-26 10:22:54 +01:00
commit ed05a2edd3
27 changed files with 133 additions and 96 deletions

View file

@ -108,14 +108,15 @@ namespace swrenderer
basecolormap = colormap;
GlobVis = LightVisibility::Instance()->FlatPlaneGlobVis() / planeheight;
ds_light = 0;
if (fixedlightlev >= 0)
CameraLight *cameraLight = CameraLight::Instance();
if (cameraLight->fixedlightlev >= 0)
{
R_SetDSColorMapLight(basecolormap, 0, FIXEDLIGHT2SHADE(fixedlightlev));
R_SetDSColorMapLight(basecolormap, 0, FIXEDLIGHT2SHADE(cameraLight->fixedlightlev));
plane_shade = false;
}
else if (fixedcolormap)
else if (cameraLight->fixedcolormap)
{
R_SetDSColorMapLight(fixedcolormap, 0, 0);
R_SetDSColorMapLight(cameraLight->fixedcolormap, 0, 0);
plane_shade = false;
}
else