diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/character.h | 2 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs_items.cpp | 9 | ||||
-rw-r--r-- | engines/xeen/dialogs/dialogs_items.h | 2 |
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); |