- 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

@ -762,7 +762,7 @@ void DBaseStatusBar::DrINumberOuter (signed int val, int x, int y, bool center,
else if (val == 0)
{
screen->DrawTexture (Images[imgINumbers], x + 1, y + 1,
DTA_FillColor, 0, DTA_Alpha, HR_SHADOW,
DTA_FillColor, 0, DTA_AlphaF, HR_SHADOW,
DTA_HUDRules, center ? HUD_HorizCenter : HUD_Normal, TAG_DONE);
screen->DrawTexture (Images[imgINumbers], x, y,
DTA_HUDRules, center ? HUD_HorizCenter : HUD_Normal, TAG_DONE);
@ -776,7 +776,7 @@ void DBaseStatusBar::DrINumberOuter (signed int val, int x, int y, bool center,
while (val != 0)
{
screen->DrawTexture (Images[imgINumbers + val % 10], x + 1, y + 1,
DTA_FillColor, 0, DTA_Alpha, HR_SHADOW,
DTA_FillColor, 0, DTA_AlphaF, HR_SHADOW,
DTA_HUDRules, center ? HUD_HorizCenter : HUD_Normal, TAG_DONE);
x -= w;
val /= 10;
@ -784,7 +784,7 @@ void DBaseStatusBar::DrINumberOuter (signed int val, int x, int y, bool center,
if (negative)
{
screen->DrawTexture (Images[imgNEGATIVE], x + 1, y + 1,
DTA_FillColor, 0, DTA_Alpha, HR_SHADOW,
DTA_FillColor, 0, DTA_AlphaF, HR_SHADOW,
DTA_HUDRules, center ? HUD_HorizCenter : HUD_Normal, TAG_DONE);
}
@ -839,7 +839,7 @@ void DBaseStatusBar::DrBNumberOuter (signed int val, int x, int y, int size) con
{
screen->DrawTexture (pic, xpos - pic->GetWidth()/2 + 2, y + 2,
DTA_HUDRules, HUD_Normal,
DTA_Alpha, HR_SHADOW,
DTA_AlphaF, HR_SHADOW,
DTA_FillColor, 0,
TAG_DONE);
screen->DrawTexture (pic, xpos - pic->GetWidth()/2, y,
@ -865,7 +865,7 @@ void DBaseStatusBar::DrBNumberOuter (signed int val, int x, int y, int size) con
{
screen->DrawTexture (pic, xpos - pic->GetWidth()/2 + 2, y + 2,
DTA_HUDRules, HUD_Normal,
DTA_Alpha, HR_SHADOW,
DTA_AlphaF, HR_SHADOW,
DTA_FillColor, 0,
TAG_DONE);
}
@ -879,7 +879,7 @@ void DBaseStatusBar::DrBNumberOuter (signed int val, int x, int y, int size) con
{
screen->DrawTexture (pic, xpos - pic->GetWidth()/2 + 2, y + 2,
DTA_HUDRules, HUD_Normal,
DTA_Alpha, HR_SHADOW,
DTA_AlphaF, HR_SHADOW,
DTA_FillColor, 0,
TAG_DONE);
}
@ -941,7 +941,7 @@ void DBaseStatusBar::DrBNumberOuterFont (signed int val, int x, int y, int size)
pic = BigFont->GetChar ('0', &v);
screen->DrawTexture (pic, xpos - v/2 + 2, y + 2,
DTA_HUDRules, HUD_Normal,
DTA_Alpha, HR_SHADOW,
DTA_AlphaF, HR_SHADOW,
DTA_FillColor, 0,
DTA_Translation, BigFont->GetColorTranslation (CR_UNTRANSLATED),
TAG_DONE);
@ -966,7 +966,7 @@ void DBaseStatusBar::DrBNumberOuterFont (signed int val, int x, int y, int size)
pic = BigFont->GetChar ('0' + val % 10, &v);
screen->DrawTexture (pic, xpos - v/2 + 2, y + 2,
DTA_HUDRules, HUD_Normal,
DTA_Alpha, HR_SHADOW,
DTA_AlphaF, HR_SHADOW,
DTA_FillColor, 0,
DTA_Translation, BigFont->GetColorTranslation (CR_UNTRANSLATED),
TAG_DONE);
@ -980,7 +980,7 @@ void DBaseStatusBar::DrBNumberOuterFont (signed int val, int x, int y, int size)
{
screen->DrawTexture (pic, xpos - v/2 + 2, y + 2,
DTA_HUDRules, HUD_Normal,
DTA_Alpha, HR_SHADOW,
DTA_AlphaF, HR_SHADOW,
DTA_FillColor, 0,
DTA_Translation, BigFont->GetColorTranslation (CR_UNTRANSLATED),
TAG_DONE);