diff --git a/src/g_shared/sbarinfo_display.cpp b/src/g_shared/sbarinfo_display.cpp index 45eef6b81..2244c5b58 100644 --- a/src/g_shared/sbarinfo_display.cpp +++ b/src/g_shared/sbarinfo_display.cpp @@ -546,11 +546,11 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a if(drawAlt != 0) //draw 'off' image { if(cmd.special != -1 && drawAlt == 1) - DrawGraphic(Images[cmd.special], cmd.x, cmd.y, xOffset, yOffset, alpha, (cmd.flags & DRAWIMAGE_TRANSLATABLE), false, (cmd.flags & DRAWIMAGE_OFFSET_CENTER)); + DrawGraphic(Images[cmd.special], cmd.x, cmd.y, xOffset, yOffset, alpha, !!(cmd.flags & DRAWIMAGE_TRANSLATABLE), false, !!(cmd.flags & DRAWIMAGE_OFFSET_CENTER)); else if(cmd.special2 != -1 && drawAlt == 2) - DrawGraphic(Images[cmd.special2], cmd.x, cmd.y, xOffset, yOffset, alpha, (cmd.flags & DRAWIMAGE_TRANSLATABLE), false, (cmd.flags & DRAWIMAGE_OFFSET_CENTER)); + DrawGraphic(Images[cmd.special2], cmd.x, cmd.y, xOffset, yOffset, alpha, !!(cmd.flags & DRAWIMAGE_TRANSLATABLE), false, !!(cmd.flags & DRAWIMAGE_OFFSET_CENTER)); else if(cmd.special3 != -1 && drawAlt == 3) - DrawGraphic(Images[cmd.special3], cmd.x, cmd.y, xOffset, yOffset, alpha, (cmd.flags & DRAWIMAGE_TRANSLATABLE), false, (cmd.flags & DRAWIMAGE_OFFSET_CENTER)); + DrawGraphic(Images[cmd.special3], cmd.x, cmd.y, xOffset, yOffset, alpha, !!(cmd.flags & DRAWIMAGE_TRANSLATABLE), false, !!(cmd.flags & DRAWIMAGE_OFFSET_CENTER)); break; } } @@ -587,7 +587,7 @@ void DSBarInfo::doCommands(SBarInfoBlock &block, int xOffset, int yOffset, int a else if(cmd.sprite != -1) texture = Images[cmd.sprite]; - DrawGraphic(texture, cmd.x, cmd.y, xOffset, yOffset, alpha, (cmd.flags & DRAWIMAGE_TRANSLATABLE), false, (cmd.flags & DRAWIMAGE_OFFSET_CENTER)); + DrawGraphic(texture, cmd.x, cmd.y, xOffset, yOffset, alpha, !!(cmd.flags & DRAWIMAGE_TRANSLATABLE), false, !!(cmd.flags & DRAWIMAGE_OFFSET_CENTER)); break; } case SBARINFO_DRAWNUMBER: @@ -1508,9 +1508,9 @@ void DSBarInfo::DrawGem(FTexture* chain, FTexture* gem, int value, int x, int y, y += chainWiggle; int chainWidth = chain->GetWidth(); int offset = (int) (((double) (chainWidth-padleft-padright)/100)*value); - DrawGraphic(chain, x+(offset%chainsize), y); + DrawGraphic(chain, x+(offset%chainsize), y, xOffset, yOffset, alpha); if(gem != NULL) - DrawGraphic(gem, x+padleft+offset, y, translate ? DRAWIMAGE_TRANSLATABLE : 0); + DrawGraphic(gem, x+padleft+offset, y, xOffset, yOffset, alpha, translate); } FRemapTable* DSBarInfo::getTranslation() diff --git a/src/g_shared/sbarinfo_parser.cpp b/src/g_shared/sbarinfo_parser.cpp index eecea2a4b..920267208 100644 --- a/src/g_shared/sbarinfo_parser.cpp +++ b/src/g_shared/sbarinfo_parser.cpp @@ -271,7 +271,7 @@ void SBarInfo::ParseSBarInfo(int lump) goto FinishStatusBar; //No more args so we must skip over anything else and go to the end. } sc.MustGetToken(TK_FloatConst); - this->huds[barNum].alpha = FRACUNIT * sc.Float; + this->huds[barNum].alpha = fixed_t(FRACUNIT * sc.Float); } FinishStatusBar: sc.MustGetToken('{'); @@ -348,10 +348,10 @@ void SBarInfo::ParseSBarInfo(int lump) popup.transition = TRANSITION_FADE; sc.MustGetToken(','); sc.MustGetToken(TK_FloatConst); - popup.speed = FRACUNIT * sc.Float; + popup.speed = fixed_t(FRACUNIT * sc.Float); sc.MustGetToken(','); sc.MustGetToken(TK_FloatConst); - popup.speed2 = FRACUNIT * sc.Float; + popup.speed2 = fixed_t(FRACUNIT * sc.Float); } else sc.ScriptError("Unkown transition type: '%s'", sc.String);