aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/character.h
diff options
context:
space:
mode:
authorPaul Gilbert2015-02-04 22:24:45 -0500
committerPaul Gilbert2015-02-04 22:24:45 -0500
commita983d9abcea603a3857c1c250f398e6b2fae29a0 (patch)
tree502c9a413664b0af49b3f5acf878c3b0dceed83a /engines/xeen/character.h
parent7ea32f3333cb2123675f6dbdfae3ed232347d1a5 (diff)
downloadscummvm-rg350-a983d9abcea603a3857c1c250f398e6b2fae29a0.tar.gz
scummvm-rg350-a983d9abcea603a3857c1c250f398e6b2fae29a0.tar.bz2
scummvm-rg350-a983d9abcea603a3857c1c250f398e6b2fae29a0.zip
XEEN: Implemented weapon variation of equipItem
Diffstat (limited to 'engines/xeen/character.h')
-rw-r--r--engines/xeen/character.h40
1 files changed, 34 insertions, 6 deletions
diff --git a/engines/xeen/character.h b/engines/xeen/character.h
index b3c9965e9d..c4eae0e706 100644
--- a/engines/xeen/character.h
+++ b/engines/xeen/character.h
@@ -95,24 +95,52 @@ public:
};
class InventoryItems : public Common::Array<XeenItem> {
-private:
+protected:
Character *_character;
ItemCategory _category;
const char *const *_names;
+
+ void equipError(int itemIndex1, ItemCategory category1, int itemIndex2,
+ ItemCategory category2);
public:
InventoryItems(Character *character, ItemCategory category);
bool passRestrictions(int itemId, bool showError) const;
+ Common::String getName(int itemIndex);
+
void discardItem(int itemIndex);
- void equipItem(int itemIndex);
+ virtual void equipItem(int itemIndex) {}
void removeItem(int itemIndex);
void sort();
};
+class WeaponItems: public InventoryItems {
+public:
+ WeaponItems(Character *character) : InventoryItems(character, CATEGORY_WEAPON) {}
+ virtual void equipItem(int itemIndex);
+};
+
+class ArmorItems : public InventoryItems {
+public:
+ ArmorItems(Character *character) : InventoryItems(character, CATEGORY_ARMOR) {}
+ virtual void equipItem(int itemIndex);
+};
+
+class AccessoryItems : public InventoryItems {
+public:
+ AccessoryItems(Character *character) : InventoryItems(character, CATEGORY_ACCESSORY) {}
+ virtual void equipItem(int itemIndex);
+};
+
+class MiscItems : public InventoryItems {
+public:
+ MiscItems(Character *character) : InventoryItems(character, CATEGORY_MISC) {}
+};
+
class InventoryItemsGroup {
private:
InventoryItems *_itemSets[4];
@@ -162,10 +190,10 @@ public:
int _currentSpell;
int _quickOption;
InventoryItemsGroup _items;
- InventoryItems _weapons;
- InventoryItems _armor;
- InventoryItems _accessories;
- InventoryItems _misc;
+ WeaponItems _weapons;
+ ArmorItems _armor;
+ AccessoryItems _accessories;
+ MiscItems _misc;
int _lloydSide;
AttributePair _fireResistence;
AttributePair _coldResistence;