mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-19 18:12:06 +00:00
- Fixed: Sprites and decals that are drawn with addition must fade to black.
SVN r1952 (trunk)
This commit is contained in:
parent
321ab2f686
commit
4252cd52ad
3 changed files with 19 additions and 7 deletions
|
@ -1,8 +1,7 @@
|
||||||
October 29, 2009
|
October 29, 2009
|
||||||
|
- Fixed: Sprites and decals that are drawn with addition must fade to black.
|
||||||
- Make TranslateToStartSpot() set the new sector references for a polyobj's
|
- Make TranslateToStartSpot() set the new sector references for a polyobj's
|
||||||
walls so that P_CheckSwitchRange() will work with them.
|
walls so that P_CheckSwitchRange() will work with them.
|
||||||
- Fixed: If P_ActivateLine() failed in P_UseTraverse() it would not play
|
|
||||||
the *usefail sound.
|
|
||||||
- Fixed: An unspecified save_dir will now save to the program directory on
|
- Fixed: An unspecified save_dir will now save to the program directory on
|
||||||
Windows. (Other operating systems already use the user's home directory
|
Windows. (Other operating systems already use the user's home directory
|
||||||
instead.)
|
instead.)
|
||||||
|
|
|
@ -2432,14 +2432,21 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
|
||||||
|
|
||||||
// Prepare lighting
|
// Prepare lighting
|
||||||
calclighting = false;
|
calclighting = false;
|
||||||
|
FDynamicColormap *usecolormap = basecolormap;
|
||||||
|
|
||||||
|
// Decals that are added to the scene must fade to black.
|
||||||
|
if (decal->RenderStyle.BlendOp == STYLEOP_Add && usecolormap->Fade != 0)
|
||||||
|
{
|
||||||
|
usecolormap = GetSpecialLights(usecolormap->Color, 0, usecolormap->Desaturate);
|
||||||
|
}
|
||||||
|
|
||||||
rw_light = rw_lightleft + (x1 - WallSX1) * rw_lightstep;
|
rw_light = rw_lightleft + (x1 - WallSX1) * rw_lightstep;
|
||||||
if (fixedlightlev >= 0)
|
if (fixedlightlev >= 0)
|
||||||
dc_colormap = basecolormap->Maps + fixedlightlev;
|
dc_colormap = usecolormap->Maps + fixedlightlev;
|
||||||
else if (fixedcolormap != NULL)
|
else if (fixedcolormap != NULL)
|
||||||
dc_colormap = fixedcolormap;
|
dc_colormap = fixedcolormap;
|
||||||
else if (!foggy && (decal->RenderFlags & RF_FULLBRIGHT))
|
else if (!foggy && (decal->RenderFlags & RF_FULLBRIGHT))
|
||||||
dc_colormap = basecolormap->Maps;
|
dc_colormap = usecolormap->Maps;
|
||||||
else
|
else
|
||||||
calclighting = true;
|
calclighting = true;
|
||||||
|
|
||||||
|
@ -2486,7 +2493,7 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
|
||||||
{
|
{
|
||||||
if (calclighting)
|
if (calclighting)
|
||||||
{ // calculate lighting
|
{ // calculate lighting
|
||||||
dc_colormap = basecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
|
dc_colormap = usecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
WallSpriteColumn (R_DrawMaskedColumn);
|
WallSpriteColumn (R_DrawMaskedColumn);
|
||||||
|
@ -2497,7 +2504,7 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
|
||||||
{
|
{
|
||||||
if (calclighting)
|
if (calclighting)
|
||||||
{ // calculate lighting
|
{ // calculate lighting
|
||||||
dc_colormap = basecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
|
dc_colormap = usecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
|
||||||
}
|
}
|
||||||
rt_initcols();
|
rt_initcols();
|
||||||
for (int zz = 4; zz; --zz)
|
for (int zz = 4; zz; --zz)
|
||||||
|
@ -2512,7 +2519,7 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
|
||||||
{
|
{
|
||||||
if (calclighting)
|
if (calclighting)
|
||||||
{ // calculate lighting
|
{ // calculate lighting
|
||||||
dc_colormap = basecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
|
dc_colormap = usecolormap->Maps + (GETPALOOKUP (rw_light, wallshade) << COLORMAPSHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
WallSpriteColumn (R_DrawMaskedColumn);
|
WallSpriteColumn (R_DrawMaskedColumn);
|
||||||
|
|
|
@ -1432,6 +1432,12 @@ void R_ProjectSprite (AActor *thing, int fakeside)
|
||||||
|
|
||||||
FDynamicColormap *mybasecolormap = basecolormap;
|
FDynamicColormap *mybasecolormap = basecolormap;
|
||||||
|
|
||||||
|
// Sprites that are added to the scene must fade to black.
|
||||||
|
if (vis->RenderStyle.BlendOp == STYLEOP_Add && mybasecolormap->Fade != 0)
|
||||||
|
{
|
||||||
|
mybasecolormap = GetSpecialLights(mybasecolormap->Color, 0, mybasecolormap->Desaturate);
|
||||||
|
}
|
||||||
|
|
||||||
if (vis->RenderStyle.Flags & STYLEF_FadeToBlack)
|
if (vis->RenderStyle.Flags & STYLEF_FadeToBlack)
|
||||||
{
|
{
|
||||||
if (invertcolormap)
|
if (invertcolormap)
|
||||||
|
|
Loading…
Reference in a new issue