aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/dm/inventory.cpp29
-rw-r--r--engines/dm/inventory.h1
2 files changed, 30 insertions, 0 deletions
diff --git a/engines/dm/inventory.cpp b/engines/dm/inventory.cpp
index e4887100d4..db3472051d 100644
--- a/engines/dm/inventory.cpp
+++ b/engines/dm/inventory.cpp
@@ -144,4 +144,33 @@ void InventoryMan::drawPanelResurrectReincarnate() {
_vm->_displayMan->blitToScreen(_vm->_displayMan->getBitmap(kPanelResurectReincaranteIndice), 144, 0, 0, gBoxPanel, kColorDarkGreen, gDungeonViewport);
}
+void InventoryMan::drawPanel() {
+ warning("MISSING CODE: F0334_INVENTORY_CloseChest, altho adding it may reintroduce BUG0_48");
+
+ ChampionMan &cm = *_vm->_championMan;
+ if (cm._candidateChampionOrdinal) {
+ drawPanelResurrectReincarnate();
+ return;
+ }
+
+ Thing thing = cm._champions[ordinalToIndex(_inventoryChampionOrdinal)].getSlot(kChampionSlotActionHand);
+
+ _panelContent = kPanelContentFoodWaterPoisoned;
+ switch (thing.getType()) {
+ case kContainerThingType:
+ _panelContent = kPanelContentChest;
+ break;
+ case kScrollThingType:
+ _panelContent = kPanelContentScroll;
+ break;
+ default:
+ thing = Thing::_thingNone;
+ break;
+ }
+ if (thing == Thing::_thingNone) {
+ drawPanelFoodWaterPoisoned();
+ } else {
+ warning("MISSING CODE: F0342_INVENTORY_DrawPanel_Object(L1075_T_Thing, C0_FALSE);");
+ }
+}
}
diff --git a/engines/dm/inventory.h b/engines/dm/inventory.h
index b6b23c4109..32c3d451ae 100644
--- a/engines/dm/inventory.h
+++ b/engines/dm/inventory.h
@@ -30,6 +30,7 @@ public:
void drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color); // @ F0344_INVENTORY_DrawPanel_FoodOrWaterBar
void drawPanelFoodWaterPoisoned(); // @ F0345_INVENTORY_DrawPanel_FoodWaterPoisoned
void drawPanelResurrectReincarnate(); // @ F0346_INVENTORY_DrawPanel_ResurrectReincarnate
+ void drawPanel(); // @ F0347_INVENTORY_DrawPanel
};