mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-05 17:20:30 +00:00
DM: Add F0344_INVENTORY_DrawPanel_FoodOrWaterBar
This commit is contained in:
parent
3385a3dd5c
commit
8c007d02fa
@ -107,4 +107,20 @@ void InventoryMan::drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Co
|
||||
_vm->_displayMan->clearScreenBox(color, box);
|
||||
}
|
||||
|
||||
void InventoryMan::drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color) {
|
||||
if (amount < -512) {
|
||||
color = kColorRed;
|
||||
} else if(amount < 0) {
|
||||
color = kColorYellow;
|
||||
}
|
||||
|
||||
int16 pixelWidth = amount + 1024;
|
||||
if (pixelWidth == 3072) {
|
||||
pixelWidth = 3071;
|
||||
}
|
||||
pixelWidth /= 32;
|
||||
drawPanelHorizontalBar(115, y + 2, pixelWidth, kColorBlack);
|
||||
drawPanelHorizontalBar(113, y, pixelWidth, color);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ public:
|
||||
void toggleInventory(ChampionIndex championIndex); // @ F0355_INVENTORY_Toggle_CPSE
|
||||
void drawStatusBoxPortrait(ChampionIndex championIndex); // @ F0354_INVENTORY_DrawStatusBoxPortrait
|
||||
void drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Color color); // @ F0343_INVENTORY_DrawPanel_HorizontalBar
|
||||
void drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color); // @ F0344_INVENTORY_DrawPanel_FoodOrWaterBar
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user