- made AActor::alpha a floating point value

- replaced some uses of FRACUNIT with OPAQUE when it was about translucency.
- simplified some overly complicated translucency multiplications in the SBARINFO code.
This commit is contained in:
Christoph Oelckers 2016-03-21 12:18:46 +01:00
commit 4e60ea0252
50 changed files with 235 additions and 216 deletions

View file

@ -531,7 +531,11 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, double x, double y, DWORD tag
break;
case DTA_Alpha:
parms->alpha = MIN<fixed_t>(FRACUNIT, va_arg (tags, fixed_t));
parms->alpha = MIN<fixed_t>(OPAQUE, va_arg (tags, fixed_t));
break;
case DTA_AlphaF:
parms->alpha = FLOAT2FIXED(MIN<double>(1., va_arg(tags, double)));
break;
case DTA_AlphaChannel:
@ -640,7 +644,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, double x, double y, DWORD tag
break;
case DTA_ShadowAlpha:
parms->shadowAlpha = MIN<fixed_t>(FRACUNIT, va_arg (tags, fixed_t));
parms->shadowAlpha = MIN<fixed_t>(OPAQUE, va_arg (tags, fixed_t));
break;
case DTA_ShadowColor:
@ -719,7 +723,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, double x, double y, DWORD tag
{
parms->style = STYLE_Shaded;
}
else if (parms->alpha < FRACUNIT)
else if (parms->alpha < OPAQUE)
{
parms->style = STYLE_TranslucentStencil;
}
@ -728,7 +732,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, double x, double y, DWORD tag
parms->style = STYLE_Stencil;
}
}
else if (parms->alpha < FRACUNIT)
else if (parms->alpha < OPAQUE)
{
parms->style = STYLE_Translucent;
}