mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 04:01:31 +00:00
- ok, that color_absolute option was pretty much redundant, considering that it is already possible to explicitly set a fog density per sector - it was only necessary to give that priority over standard depth fade calculations for fog-less sectors.
This commit is contained in:
parent
476aceb5d7
commit
95afc97d48
8 changed files with 8 additions and 15 deletions
|
@ -229,9 +229,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
in OpenGL 2.x this will define the entire wall's color) Default is white (0xffffff)
|
||||
color_wallbottom = <int>; // Material color of bottom of sector's sidedefs (OpenGL 3.x and later only) Default is white (0xffffff)
|
||||
color_sprites = <int>; // Material color of sprites in sector (OpenGL only.) Default is white (0xffffff)
|
||||
color_absolute = <bool> // treats the above properties as absolute, i.e. final light level is only defined by the color, the sector's light level is ignored
|
||||
for calculating the light color. The sector's light level is only used for fog density calculations.)
|
||||
|
||||
|
||||
|
||||
portal_ceil_blocksound = <bool> // ceiling portal blocks sound.
|
||||
portal_ceil_disabled = <bool> // ceiling portal disabled.
|
||||
|
|
|
@ -377,7 +377,7 @@ void GLFlat::Draw(int pass, bool trans) // trans only has meaning for GLPASS_LIG
|
|||
{
|
||||
case GLPASS_PLAIN: // Single-pass rendering
|
||||
case GLPASS_ALL: // Same, but also creates the dynlight data.
|
||||
gl_SetColor((sector->MoreFlags & SECF_SPECIALCOLORSABSOLUTE) ? 255 : lightlevel, rel, Colormap,1.0f);
|
||||
gl_SetColor(lightlevel, rel, Colormap,1.0f);
|
||||
gl_SetFog(lightlevel, rel, &Colormap, false);
|
||||
gl_RenderState.SetObjectColor(FlatColor | 0xff000000);
|
||||
if (sector->special != GLSector_Skybox)
|
||||
|
@ -404,7 +404,7 @@ void GLFlat::Draw(int pass, bool trans) // trans only has meaning for GLPASS_LIG
|
|||
|
||||
case GLPASS_TRANSLUCENT:
|
||||
if (renderstyle==STYLE_Add) gl_RenderState.BlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
gl_SetColor((sector->MoreFlags & SECF_SPECIALCOLORSABSOLUTE) ? 255 : lightlevel, rel, Colormap, alpha);
|
||||
gl_SetColor(lightlevel, rel, Colormap, alpha);
|
||||
gl_SetFog(lightlevel, rel, &Colormap, false);
|
||||
gl_RenderState.SetObjectColor(FlatColor | 0xff000000);
|
||||
if (!gltexture)
|
||||
|
|
|
@ -332,7 +332,7 @@ void GLSprite::Draw(int pass)
|
|||
ThingColor.b * actor->Sector->SpecialColors[sector_t::sprites].b / 255);
|
||||
|
||||
gl_RenderState.SetObjectColor(finalcol);
|
||||
gl_SetColor((actor->Sector->MoreFlags & SECF_SPECIALCOLORSABSOLUTE) ? 255 : lightlevel, rel, Colormap, trans);
|
||||
gl_SetColor(lightlevel, rel, Colormap, trans);
|
||||
}
|
||||
|
||||
|
||||
|
@ -401,7 +401,7 @@ void GLSprite::Draw(int pass)
|
|||
thiscm.Decolorize();
|
||||
}
|
||||
|
||||
gl_SetColor((actor->Sector->MoreFlags & SECF_SPECIALCOLORSABSOLUTE) ? 255 : thisll, rel, thiscm, trans);
|
||||
gl_SetColor(thisll, rel, thiscm, trans);
|
||||
if (!foglayer)
|
||||
{
|
||||
gl_SetFog(thislight, rel, &thiscm, additivefog);
|
||||
|
|
|
@ -347,7 +347,7 @@ void GLWall::RenderTextured(int rflags)
|
|||
if (lightlist == NULL)
|
||||
{
|
||||
if (type != RENDERWALL_M2SNF) gl_SetFog(lightlevel, rel, &Colormap, RenderStyle == STYLE_Add);
|
||||
gl_SetColor((seg->frontsector->MoreFlags & SECF_SPECIALCOLORSABSOLUTE)? 255 : lightlevel, rel, Colormap, absalpha);
|
||||
gl_SetColor(lightlevel, rel, Colormap, absalpha);
|
||||
RenderWall(rflags);
|
||||
}
|
||||
else
|
||||
|
@ -367,7 +367,7 @@ void GLWall::RenderTextured(int rflags)
|
|||
FColormap thiscm;
|
||||
thiscm.FadeColor = Colormap.FadeColor;
|
||||
thiscm.CopyFrom3DLight(&(*lightlist)[i]);
|
||||
gl_SetColor((seg->frontsector->MoreFlags & SECF_SPECIALCOLORSABSOLUTE) ? 255 : thisll, rel, thiscm, absalpha);
|
||||
gl_SetColor(thisll, rel, thiscm, absalpha);
|
||||
if (type != RENDERWALL_M2SNF) gl_SetFog(thisll, rel, &thiscm, RenderStyle == STYLE_Add);
|
||||
gl_RenderState.SetSplitPlanes((*lightlist)[i].plane, lowplane);
|
||||
RenderWall(rflags);
|
||||
|
|
|
@ -417,7 +417,7 @@ void FGLRenderer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
|||
{
|
||||
gl_SetDynSpriteLight(playermo, NULL);
|
||||
}
|
||||
gl_SetColor((viewsector->MoreFlags & SECF_SPECIALCOLORSABSOLUTE) ? 255 : ll, 0, cmc, trans, true);
|
||||
gl_SetColor(ll, 0, cmc, trans, true);
|
||||
}
|
||||
|
||||
if (psp->firstTic)
|
||||
|
|
|
@ -554,7 +554,6 @@ xx(Color_Ceiling)
|
|||
xx(Color_Walltop)
|
||||
xx(Color_Wallbottom)
|
||||
xx(Color_Sprites)
|
||||
xx(Color_Absolute)
|
||||
xx(Desaturation)
|
||||
xx(SoundSequence)
|
||||
xx(Silent)
|
||||
|
|
|
@ -1480,9 +1480,6 @@ public:
|
|||
sec->SpecialColors[sector_t::sprites] = CheckInt(key) || 0xff000000;
|
||||
break;
|
||||
|
||||
case NAME_Color_Absolute:
|
||||
Flag(sec->MoreFlags, SECF_SPECIALCOLORSABSOLUTE, key);
|
||||
|
||||
case NAME_Desaturation:
|
||||
desaturation = int(255*CheckFloat(key));
|
||||
continue;
|
||||
|
|
|
@ -479,7 +479,6 @@ enum
|
|||
SECF_UNDERWATERMASK = 32+64,
|
||||
SECF_DRAWN = 128, // sector has been drawn at least once
|
||||
SECF_HIDDEN = 256, // Do not draw on textured automap
|
||||
SECF_SPECIALCOLORSABSOLUTE = 512, // The special colors ignore the light level except for fog density.
|
||||
};
|
||||
|
||||
enum
|
||||
|
|
Loading…
Reference in a new issue