- Implemented r_fullbrightignoresectorcolor from QZDoom

This commit is contained in:
raa-eruanna 2016-10-21 06:54:45 -04:00
commit c76431414a
8 changed files with 37 additions and 14 deletions

View file

@ -57,6 +57,7 @@
CVAR(Bool, r_np2, true, 0)
EXTERN_CVAR(Bool, r_fullbrightignoresectorcolor);
//CVAR (Int, ty, 8, 0)
//CVAR (Int, tx, 8, 0)
@ -313,7 +314,7 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2)
rw_scalestep = ds->iscalestep;
if (fixedlightlev >= 0)
dc_colormap = basecolormap->Maps + fixedlightlev;
dc_colormap = (r_fullbrightignoresectorcolor) ? (&FullNormalLight->Maps + fixedlightlev) : (basecolormap->Maps + fixedlightlev);
else if (fixedcolormap != NULL)
dc_colormap = fixedcolormap;
@ -630,7 +631,7 @@ void R_RenderFakeWall(drawseg_t *ds, int x1, int x2, F3DFloor *rover)
}
if (fixedlightlev >= 0)
dc_colormap = basecolormap->Maps + fixedlightlev;
dc_colormap = (r_fullbrightignoresectorcolor) ? (&FullNormalLight->Maps + fixedlightlev) : (basecolormap->Maps + fixedlightlev);
else if (fixedcolormap != NULL)
dc_colormap = fixedcolormap;
@ -1788,7 +1789,7 @@ void R_RenderSegLoop ()
fixed_t xoffset = rw_offset;
if (fixedlightlev >= 0)
dc_colormap = basecolormap->Maps + fixedlightlev;
dc_colormap = (r_fullbrightignoresectorcolor) ? (&FullNormalLight->Maps + fixedlightlev) : (basecolormap->Maps + fixedlightlev);
else if (fixedcolormap != NULL)
dc_colormap = fixedcolormap;
@ -3187,11 +3188,11 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
rw_light = rw_lightleft + (x1 - WallC.sx1) * rw_lightstep;
if (fixedlightlev >= 0)
dc_colormap = usecolormap->Maps + fixedlightlev;
dc_colormap = (r_fullbrightignoresectorcolor) ? (&FullNormalLight->Maps + fixedlightlev) : (usecolormap->Maps + fixedlightlev);
else if (fixedcolormap != NULL)
dc_colormap = fixedcolormap;
else if (!foggy && (decal->RenderFlags & RF_FULLBRIGHT))
dc_colormap = usecolormap->Maps;
dc_colormap = (r_fullbrightignoresectorcolor) ? &FullNormalLight->Maps : usecolormap->Maps;
else
calclighting = true;