[Scummvm-git-logs] scummvm master -> 23ca6c9e1b9d1553e12bb3356aa7a267b5c4ee36
dreammaster
dreammaster at scummvm.org
Sat Mar 31 16:58:41 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
23ca6c9e1b XEEN: Show number of charges remaining when show Misc items
Commit: 23ca6c9e1b9d1553e12bb3356aa7a267b5c4ee36
https://github.com/scummvm/scummvm/commit/23ca6c9e1b9d1553e12bb3356aa7a267b5c4ee36
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-31T10:58:33-04:00
Commit Message:
XEEN: Show number of charges remaining when show Misc items
Changed paths:
engines/xeen/character.h
engines/xeen/dialogs/dialogs_items.cpp
engines/xeen/dialogs/dialogs_items.h
diff --git a/engines/xeen/character.h b/engines/xeen/character.h
index 43531c7..019fd9b 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 49297d5..2e01681 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 2df8a43..d3632dc 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);
More information about the Scummvm-git-logs
mailing list