aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/dungeonman.h
diff options
context:
space:
mode:
authorStrangerke2016-08-20 10:36:28 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit705e906698505e8a547ef46c8a2fc65e3f48a49b (patch)
treeaa31e2354895391d791045b4ddf52dc2c558c22f /engines/dm/dungeonman.h
parent58d1bcc3e7f7aca20b1db3bef019f742ebd6c474 (diff)
downloadscummvm-rg350-705e906698505e8a547ef46c8a2fc65e3f48a49b.tar.gz
scummvm-rg350-705e906698505e8a547ef46c8a2fc65e3f48a49b.tar.bz2
scummvm-rg350-705e906698505e8a547ef46c8a2fc65e3f48a49b.zip
DM: Some renaming, move some globals to class member
Diffstat (limited to 'engines/dm/dungeonman.h')
-rw-r--r--engines/dm/dungeonman.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/dm/dungeonman.h b/engines/dm/dungeonman.h
index e738723f7c..269dcdf9f9 100644
--- a/engines/dm/dungeonman.h
+++ b/engines/dm/dungeonman.h
@@ -106,15 +106,15 @@ public:
uint16 _weight;
uint16 _defense;
uint16 _attributes;
+
ArmourInfo(uint16 weight, uint16 defense, uint16 attributes)
:_weight(weight), _defense(defense), _attributes(attributes) {}
+ ArmourInfo() :_weight(0), _defense(0), _attributes(0) {}
uint16 getAttribute(ArmourAttribute attribute) { return _attributes & attribute; }
void setAttribute(ArmourAttribute attribute) { _attributes |= attribute; }
}; // @ ARMOUR_INFO
-extern ArmourInfo g239_ArmourInfo[58]; // G0239_as_Graphic559_ArmourInfo
-
#define kM1_WeaponClassNone -1
/* Class 0: SWING weapons */
#define k0_WeaponClassSwingWeapon 0 // @ C000_CLASS_SWING_WEAPON
@@ -143,13 +143,12 @@ private:
public:
WeaponInfo(uint16 weight, uint16 wClass, uint16 strength, uint16 kineticEnergy, uint16 attributes)
: _weight(weight), _class(wClass), _strength(strength), _kineticEnergy(kineticEnergy), _attributes(attributes) {}
+ WeaponInfo() : _weight(0), _class(0), _strength(0), _kineticEnergy(0), _attributes(0) {}
uint16 getShootAttack() { return _attributes & 0xFF; } // @ M65_SHOOT_ATTACK
uint16 getProjectileAspectOrdinal() { return (_attributes >> 8) & 0x1F; } // @ M66_PROJECTILE_ASPECT_ORDINAL
}; // @ WEAPON_INFO
-extern WeaponInfo g238_WeaponInfo[46]; // @ G0238_as_Graphic559_WeaponInfo;
-
enum TextType {
/* Used for text on walls */
k0_TextTypeInscription = 0, // @ C0_TEXT_TYPE_INSCRIPTION
@@ -747,7 +746,9 @@ public:
Thing _g292_pileTopObject[5]; // @ G0292_aT_PileTopObject
DoorInfo _g275_currMapDoorInfo[2]; // @ G0275_as_CurrentMapDoorInfo
- ObjectInfo g237_ObjectInfo[180]; // @ G0237_as_Graphic559_ObjectInfo
+ ObjectInfo _objectInfo[180]; // @ G0237_as_Graphic559_ObjectInfo
+ ArmourInfo _armourInfo[58]; // @ G0239_as_Graphic559_ArmourInfo
+ WeaponInfo _weaponInfo[46]; // @ G0238_as_Graphic559_WeaponInfo
void setupArrays();
};