Add functions to CameraLight

This commit is contained in:
Magnus Norddahl 2017-02-03 09:00:46 +01:00
commit 892350ac2e
25 changed files with 83 additions and 77 deletions

View file

@ -329,14 +329,14 @@ void RenderPolyPlayerSprites::RenderSprite(DPSprite *sprite, AActor *owner, floa
// If the main colormap has fixed lights, and this sprite is being drawn with that
// colormap, disable acceleration so that the lights can remain fixed.
swrenderer::CameraLight *cameraLight = swrenderer::CameraLight::Instance();
if (!noaccel && cameraLight->realfixedcolormap == nullptr &&
if (!noaccel && cameraLight->ShaderColormap() == nullptr &&
NormalLightHasFixedLights && mybasecolormap == &NormalLight &&
tex->UseBasePalette())
{
noaccel = true;
}
// [SP] If emulating GZDoom fullbright, disable acceleration
if (r_fullbrightignoresectorcolor && cameraLight->fixedlightlev >= 0)
if (r_fullbrightignoresectorcolor && cameraLight->FixedLightLevel() >= 0)
mybasecolormap = &FullNormalLight;
if (r_fullbrightignoresectorcolor && !foggy && sprite->GetState()->GetFullbright())
mybasecolormap = &FullNormalLight;