diff options
author | Bendegúz Nagy | 2016-06-19 00:26:01 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 16d65d476d2acdefd559e79e34b1854cc4d141d3 (patch) | |
tree | 4c87720f25339e08de02f9157437ab531e5c9ac9 | |
parent | c97a4560b21ba73537e59cbcc9c18d8943992231 (diff) | |
download | scummvm-rg350-16d65d476d2acdefd559e79e34b1854cc4d141d3.tar.gz scummvm-rg350-16d65d476d2acdefd559e79e34b1854cc4d141d3.tar.bz2 scummvm-rg350-16d65d476d2acdefd559e79e34b1854cc4d141d3.zip |
DM: Add ObjectInfo
-rw-r--r-- | engines/dm/dungeonman.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h index 0a68600c1a..00dbcc2c9c 100644 --- a/engines/dm/dungeonman.h +++ b/engines/dm/dungeonman.h @@ -8,6 +8,40 @@ namespace DM { +enum ObjectAllowedSlot { + kObjectAllowedSlotMouth = 0x0001, // @ MASK0x0001_MOUTH + kObjectAllowedSlotHead = 0x0002, // @ MASK0x0002_HEAD + kObjectAllowedSlotNeck = 0x0004, // @ MASK0x0004_NECK + kObjectAllowedSlotTorso = 0x0008, // @ MASK0x0008_TORSO + kObjectAllowedSlotLegs = 0x0010, // @ MASK0x0010_LEGS + kObjectAllowedSlotFeet = 0x0020, // @ MASK0x0020_FEET + kObjectAllowedSlotQuiverLine_1 = 0x0040, // @ MASK0x0040_QUIVER_LINE1 + kObjectAllowedSlotQuiverLine_2 = 0x0080, // @ MASK0x0080_QUIVER_LINE2 + kObjectAllowedSlotPouchPassAndThroughDoors = 0x0100, // @ MASK0x0100_POUCH_PASS_AND_THROUGH_DOORS + kObjectAllowedSlotHands = 0x0200, // @ MASK0x0200_HANDS + kObjectAllowedSlotContainer = 0x0400 // @ MASK0x0400_CONTAINER +}; + +class ObjectInfo { +public: + int16 _type; + uint16 _objectAspectIndex; + uint16 _actionSetIndex; +private: + uint16 _allowedSlots; +public: + ObjectInfo(int16 type, uint16 objectAspectIndex, uint16 actionSetIndex, uint16 allowedSlots) + : _type(type), _objectAspectIndex(objectAspectIndex), _actionSetIndex(actionSetIndex), _allowedSlots(allowedSlots) {} + bool getAllowedSlot(ObjectAllowedSlot slot) { return _allowedSlots & slot; } + void setAllowedSlot(ObjectAllowedSlot slot, bool val) { + if (val) { + _allowedSlots |= slot; + } else { + _allowedSlots &= ~slot; + } + } +}; // @ OBJECT_INFO + extern uint16 gJunkInfo[53]; enum ArmourAttribute { |