aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBendegúz Nagy2016-06-18 12:53:52 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit21be32bb17530ef833a6d60b9a685007a209fac0 (patch)
treed3c3929226b0e96e654b5c470474a05e1f430389
parentef95c50fbb7acfa97b10a009c1f65e060ba26815 (diff)
downloadscummvm-rg350-21be32bb17530ef833a6d60b9a685007a209fac0.tar.gz
scummvm-rg350-21be32bb17530ef833a6d60b9a685007a209fac0.tar.bz2
scummvm-rg350-21be32bb17530ef833a6d60b9a685007a209fac0.zip
DM: Add ArmourInfo and realted enums
-rw-r--r--engines/dm/dungeonman.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index 93705721f6..f5943cd6be 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -8,6 +8,25 @@
namespace DM {
+
+enum ArmourAttribute {
+ kArmourAttributeIsAShield = 0x0080, // @ MASK0x0080_IS_A_SHIELD
+ kArmourAttributeSharpDefense = 0x0007, // @ MASK0x0007_SHARP_DEFENSE
+};
+
+class ArmourInfo {
+public:
+ uint16 _weight;
+ uint16 _defense;
+private:
+ uint16 _attributes;
+public:
+ ArmourInfo(uint16 weight, uint16 defense)
+ :_weight(weight), _defense(defense) {}
+
+ uint16 getAttribute(ArmourAttribute attribute) { return _attributes & attribute; }
+ void setAttribute(ArmourAttribute attribute) { _attributes |= attribute; }
+}; // @ ARMOUR_INFO
enum WeaponClass {
/* Class 0: SWING weapons */