diff options
author | Bendegúz Nagy | 2016-06-21 01:15:06 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 6eea379cc5d7311fde62b9f63fa175b42762a565 (patch) | |
tree | e3a35f8e28dd5097380f0d46bb2090e2b12e7782 /engines | |
parent | 8c007d02faf933ae633a5f10694e9d1667d424c3 (diff) | |
download | scummvm-rg350-6eea379cc5d7311fde62b9f63fa175b42762a565.tar.gz scummvm-rg350-6eea379cc5d7311fde62b9f63fa175b42762a565.tar.bz2 scummvm-rg350-6eea379cc5d7311fde62b9f63fa175b42762a565.zip |
DM: Add F0345_INVENTORY_DrawPanel_FoodWaterPoisoned
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dm/gfx.h | 8 | ||||
-rw-r--r-- | engines/dm/inventory.cpp | 16 | ||||
-rw-r--r-- | engines/dm/inventory.h | 1 |
3 files changed, 22 insertions, 3 deletions
diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index 48df3d7695..023535f704 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -13,7 +13,7 @@ enum ViewCell { kViewCellBackRight = 2, // @ C02_VIEW_CELL_BACK_RIGHT kViewCellBackLeft = 3, // @ C03_VIEW_CELL_BACK_LEFT kViewCellAlcove = 4, // @ C04_VIEW_CELL_ALCOVE - kViewCellDoorButtonOrWallOrn = 5 // @ C05_VIEW_CELL_DOOR_BUTTON_OR_WALL_ORNAMENT + kViewCellDoorButtonOrWallOrn = 5, // @ C05_VIEW_CELL_DOOR_BUTTON_OR_WALL_ORNAMENT }; enum GraphicIndice { @@ -28,7 +28,11 @@ enum GraphicIndice { kObjectIcons_128_TO_159 = 46, // @ C046_GRAPHIC_OBJECT_ICONS_128_TO_159 kObjectIcons_160_TO_191 = 47, // @ C047_GRAPHIC_OBJECT_ICONS_160_TO_191 kObjectIcons_192_TO_223 = 48, // @ C048_GRAPHIC_OBJECT_ICONS_192_TO_223 - kInventoryGraphicIndice = 17 // @ C017_GRAPHIC_INVENTORY + kInventoryGraphicIndice = 17, // @ C017_GRAPHIC_INVENTORY + kPanelEmptyIndice = 20, // @ C020_GRAPHIC_PANEL_EMPTY + kFoodLabelIndice = 30, // @ C030_GRAPHIC_FOOD_LABEL + kWaterLabelIndice = 31, // @ C031_GRAPHIC_WATER_LABEL + kPoisionedLabelIndice = 32 // @ C032_GRAPHIC_POISONED_LABEL }; extern uint16 gPalSwoosh[16]; diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp index 98713d01ce..68ebd616ed 100644 --- a/engines/dm/inventory.cpp +++ b/engines/dm/inventory.cpp @@ -110,7 +110,7 @@ void InventoryMan::drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Co void InventoryMan::drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color) { if (amount < -512) { color = kColorRed; - } else if(amount < 0) { + } else if (amount < 0) { color = kColorYellow; } @@ -123,4 +123,18 @@ void InventoryMan::drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color) { drawPanelHorizontalBar(113, y, pixelWidth, color); } +void InventoryMan::drawPanelFoodWaterPoisoned() { + Champion &champ = _vm->_championMan->_champions[_inventoryChampionOrdinal]; + warning("MISSING CODE: F0334_INVENTORY_CloseChest"); + DisplayMan &dispMan = *_vm->_displayMan; + dispMan.blitToScreen(dispMan.getBitmap(kPanelEmptyIndice), 144, 0, 0, gBoxPanel, kColorRed); + dispMan.blitToScreen(dispMan.getBitmap(kFoodLabelIndice), 48, 0, 0, gBoxFood, kColorDarkestGray); + dispMan.blitToScreen(dispMan.getBitmap(kWaterLabelIndice), 48, 0, 0, gBoxWater, kColorDarkestGray); + if (champ._poisonEventCount) { + dispMan.blitToScreen(dispMan.getBitmap(kPoisionedLabelIndice), 96, 0, 0, gBoxPoisoned, kColorDarkestGray); + } + drawPanelFoodOrWaterBar(champ._food, 69, kColorLightBrown); + drawPanelFoodOrWaterBar(champ._water, 92, kColorBlue); +} + } diff --git a/engines/dm/inventory.h b/engines/dm/inventory.h index bd6f18d788..5fb3f7560f 100644 --- a/engines/dm/inventory.h +++ b/engines/dm/inventory.h @@ -17,6 +17,7 @@ public: 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 + void drawPanelFoodWaterPoisoned(); // @ F0345_INVENTORY_DrawPanel_FoodWaterPoisoned }; }
\ No newline at end of file |