This commit is contained in:
Rachael Alexanderson 2016-11-06 19:54:08 -05:00
commit 8e7e1b48e9

View file

@ -241,7 +241,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
applyscale = false; applyscale = false;
} }
if(type == PLAYERICON) if(type == PLAYERICON)
texture = TexMan[statusBar->CPlayer->mo->ScoreIcon]; texture = TexMan(statusBar->CPlayer->mo->ScoreIcon);
else if(type == AMMO1) else if(type == AMMO1)
{ {
AAmmo *ammo = statusBar->ammo1; AAmmo *ammo = statusBar->ammo1;
@ -270,7 +270,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
{ {
AInventory *item = statusBar->CPlayer->mo->FindInventory<ASigil>(); AInventory *item = statusBar->CPlayer->mo->FindInventory<ASigil>();
if (item != NULL) if (item != NULL)
texture = TexMan[item->Icon]; texture = TexMan(item->Icon);
} }
else if(type == HEXENARMOR_ARMOR || type == HEXENARMOR_SHIELD || type == HEXENARMOR_HELM || type == HEXENARMOR_AMULET) else if(type == HEXENARMOR_ARMOR || type == HEXENARMOR_SHIELD || type == HEXENARMOR_HELM || type == HEXENARMOR_AMULET)
{ {
@ -290,7 +290,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
} }
} }
else if(type == INVENTORYICON) else if(type == INVENTORYICON)
texture = TexMan[sprite]; texture = TexMan(sprite);
else if(type == SELECTEDINVENTORYICON && statusBar->CPlayer->mo->InvSel != NULL) else if(type == SELECTEDINVENTORYICON && statusBar->CPlayer->mo->InvSel != NULL)
texture = TexMan(statusBar->CPlayer->mo->InvSel->Icon); texture = TexMan(statusBar->CPlayer->mo->InvSel->Icon);
else if(image >= 0) else if(image >= 0)
@ -312,7 +312,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
spawnScaleY = item->Scale.Y; spawnScaleY = item->Scale.Y;
} }
texture = TexMan[icon]; texture = TexMan(icon);
} }
enum ImageType enum ImageType
@ -2436,22 +2436,22 @@ class CommandDrawKeyBar : public SBarInfoCommand
{ {
if(!vertical) if(!vertical)
{ {
statusBar->DrawGraphic(TexMan[item->Icon], x+slotOffset, y+rowOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets()); statusBar->DrawGraphic(TexMan(item->Icon), x+slotOffset, y+rowOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets());
rowWidth = rowIconSize == -1 ? TexMan[item->Icon]->GetScaledHeight()+2 : rowIconSize; rowWidth = rowIconSize == -1 ? TexMan(item->Icon)->GetScaledHeight()+2 : rowIconSize;
} }
else else
{ {
statusBar->DrawGraphic(TexMan[item->Icon], x+rowOffset, y+slotOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets()); statusBar->DrawGraphic(TexMan(item->Icon), x+rowOffset, y+slotOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets());
rowWidth = rowIconSize == -1 ? TexMan[item->Icon]->GetScaledWidth()+2 : rowIconSize; rowWidth = rowIconSize == -1 ? TexMan(item->Icon)->GetScaledWidth()+2 : rowIconSize;
} }
// If cmd.special is -1 then the slot size is auto detected // If cmd.special is -1 then the slot size is auto detected
if(iconSize == -1) if(iconSize == -1)
{ {
if(!vertical) if(!vertical)
slotOffset += (reverse ? -1 : 1) * (TexMan[item->Icon]->GetScaledWidth() + 2); slotOffset += (reverse ? -1 : 1) * (TexMan(item->Icon)->GetScaledWidth() + 2);
else else
slotOffset += (reverse ? -1 : 1) * (TexMan[item->Icon]->GetScaledHeight() + 2); slotOffset += (reverse ? -1 : 1) * (TexMan(item->Icon)->GetScaledHeight() + 2);
} }
else else
slotOffset += (reverse ? -iconSize : iconSize); slotOffset += (reverse ? -iconSize : iconSize);