diff options
author | Paul Gilbert | 2015-02-04 19:18:51 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-02-04 19:18:51 -0500 |
commit | 4953b7954aca078be9655971f925f82c51e472db (patch) | |
tree | 7037d7bfcd5148c2ebe41b6b526b5004b4f80e6c /engines/xeen/items.h | |
parent | f34c5ad9b65f626884736faf802d627dc2fe68c0 (diff) | |
download | scummvm-rg350-4953b7954aca078be9655971f925f82c51e472db.tar.gz scummvm-rg350-4953b7954aca078be9655971f925f82c51e472db.tar.bz2 scummvm-rg350-4953b7954aca078be9655971f925f82c51e472db.zip |
XEEN: Partial implementation of doItemOptions
Diffstat (limited to 'engines/xeen/items.h')
-rw-r--r-- | engines/xeen/items.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/engines/xeen/items.h b/engines/xeen/items.h index 5a8c4d71a1..c0b82b9fce 100644 --- a/engines/xeen/items.h +++ b/engines/xeen/items.h @@ -24,11 +24,13 @@ #define XEEN_ITEMS_H #include "common/scummsys.h" +#include "common/array.h" #include "common/serializer.h" namespace Xeen { #define TOTAL_ITEMS 10 +#define INV_ITEMS_TOTAL 9 enum BonusFlags { ITEMFLAG_BONUS_MASK = 0xBF, ITEMFLAG_CURSED = 0x40, ITEMFLAG_BROKEN = 0x80 @@ -47,6 +49,8 @@ public: public: XeenItem(); + void clear(); + void synchronize(Common::Serializer &s); int getElementalCategory() const; @@ -54,6 +58,29 @@ public: int getAttributeCategory() const; }; +class InventoryItems : public Common::Array<XeenItem> { +public: + InventoryItems(); + + void discardItem(int itemIndex); + + void equipItem(int itemIndex); + + void removeItem(int itemIndex); + + void sort(); +}; + +class InventoryItemsGroup { +private: + InventoryItems *_itemSets[4]; +public: + InventoryItemsGroup(InventoryItems &weapons, InventoryItems &armor, + InventoryItems &accessories, InventoryItems &misc); + + InventoryItems &operator[](ItemCategory category); +}; + class Treasure { public: XeenItem _misc[TOTAL_ITEMS]; @@ -61,7 +88,6 @@ public: XeenItem _armor[TOTAL_ITEMS]; XeenItem _weapons[TOTAL_ITEMS]; bool _hasItems; - bool _v1; public: Treasure(); }; |