aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-31 10:58:18 -0400
committerPaul Gilbert2018-03-31 10:58:33 -0400
commit23ca6c9e1b9d1553e12bb3356aa7a267b5c4ee36 (patch)
tree95ef60cd7b2023c7e15b07e05d19d706aeb13452 /engines/xeen
parent44e2a45c6f7d8eb78c814c6827d971155c30e08c (diff)
downloadscummvm-rg350-23ca6c9e1b9d1553e12bb3356aa7a267b5c4ee36.tar.gz
scummvm-rg350-23ca6c9e1b9d1553e12bb3356aa7a267b5c4ee36.tar.bz2
scummvm-rg350-23ca6c9e1b9d1553e12bb3356aa7a267b5c4ee36.zip
XEEN: Show number of charges remaining when show Misc items
Diffstat (limited to 'engines/xeen')
-rw-r--r--engines/xeen/character.h2
-rw-r--r--engines/xeen/dialogs/dialogs_items.cpp9
-rw-r--r--engines/xeen/dialogs/dialogs_items.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/engines/xeen/character.h b/engines/xeen/character.h
index 43531c74cf..019fd9bff8 100644
--- a/engines/xeen/character.h
+++ b/engines/xeen/character.h
@@ -45,7 +45,7 @@ enum Award {
};
enum BonusFlags {
- ITEMFLAG_BONUS_MASK = 0xBF, ITEMFLAG_CURSED = 0x40, ITEMFLAG_BROKEN = 0x80
+ ITEMFLAG_CURSED = 0x40, ITEMFLAG_BROKEN = 0x80, ITEMFLAG_BONUS_MASK = 0xBF, ITEMFLAG_CHARGES_MASK = 0x3F
};
enum Sex { MALE = 0, FEMALE = 1, YES_PLEASE = 2 };
diff --git a/engines/xeen/dialogs/dialogs_items.cpp b/engines/xeen/dialogs/dialogs_items.cpp
index 49297d560e..2e01681e5c 100644
--- a/engines/xeen/dialogs/dialogs_items.cpp
+++ b/engines/xeen/dialogs/dialogs_items.cpp
@@ -730,6 +730,15 @@ int ItemsDialog::calcItemCost(Character *c, int itemIndex, ItemsMode mode,
if (!result)
result = 1;
break;
+
+ case ITEMMODE_3:
+ case ITEMMODE_RECHARGE:
+ case ITEMMODE_5:
+ case ITEMMODE_ENCHANT:
+ // Show number of charges
+ result = i._bonusFlags & ITEMFLAG_CHARGES_MASK;
+ break;
+
default:
break;
}
diff --git a/engines/xeen/dialogs/dialogs_items.h b/engines/xeen/dialogs/dialogs_items.h
index 2df8a4357b..d3632dc8dc 100644
--- a/engines/xeen/dialogs/dialogs_items.h
+++ b/engines/xeen/dialogs/dialogs_items.h
@@ -59,7 +59,7 @@ private:
void setEquipmentIcons();
/**
- * Calculate the cost of an item
+ * Calculate the cost of an item, or charges renaming for Misc items as appropriate
*/
int calcItemCost(Character *c, int itemIndex, ItemsMode mode, int skillLevel,
ItemCategory category);