diff options
author | Paul Gilbert | 2015-02-02 22:11:08 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-02-02 22:11:08 -0500 |
commit | 38df23ace070902d5808e77a7260f5d62ef88108 (patch) | |
tree | 5f83e75cfa72b8f92ae4690694b957cd24b8853d /engines/xeen/party.cpp | |
parent | 3767f316195940bbe02a3f10e7139f0267197ce8 (diff) | |
download | scummvm-rg350-38df23ace070902d5808e77a7260f5d62ef88108.tar.gz scummvm-rg350-38df23ace070902d5808e77a7260f5d62ef88108.tar.bz2 scummvm-rg350-38df23ace070902d5808e77a7260f5d62ef88108.zip |
XEEN: Implemented passRestrictions
Diffstat (limited to 'engines/xeen/party.cpp')
-rw-r--r-- | engines/xeen/party.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp index 210852686a..2590abcf13 100644 --- a/engines/xeen/party.cpp +++ b/engines/xeen/party.cpp @@ -859,11 +859,12 @@ int Character::getNumAwards() const { * Assembles a full lines description for a specified item for use in * the Items dialog */ -Common::String Character::assembleItemName(int itemIndex, int displayNum, int typeNum) { +Common::String Character::assembleItemName(int itemIndex, int displayNum, + ItemCategory category) { Spells &spells = *Party::_vm->_spells; - switch (typeNum) { - case 0: { + switch (category) { + case CATEGORY_WEAPON: { // Weapons XeenItem &i = _weapons[itemIndex]; return Common::String::format("\f%02u%s%s%s\f%02u%s%s%s", displayNum, @@ -877,7 +878,7 @@ Common::String Character::assembleItemName(int itemIndex, int displayNum, int ty ); } - case 1: { + case CATEGORY_ARMOR: { // Armor XeenItem &i = _armor[itemIndex]; return Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum, @@ -890,7 +891,7 @@ Common::String Character::assembleItemName(int itemIndex, int displayNum, int ty ); } - case 2: { + case CATEGORY_ACCESSORY: { // Accessories XeenItem &i = _accessories[itemIndex]; return Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum, @@ -903,7 +904,7 @@ Common::String Character::assembleItemName(int itemIndex, int displayNum, int ty ); } - case 3: { + case CATEGORY_MISC: { // Misc XeenItem &i = _misc[itemIndex]; return Common::String::format("\f%02u%s%s%s\f%02u%s%s", displayNum, |