diff options
author | Bendegúz Nagy | 2016-06-20 17:34:32 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 3fe7213947a52b75ad7a0777af840909a372ef8f (patch) | |
tree | c23a940036f8cb5c9477798e1459efcce4c1c7cd | |
parent | 051b1d9adf69ac82a76751a0fe13c69ac7822934 (diff) | |
download | scummvm-rg350-3fe7213947a52b75ad7a0777af840909a372ef8f.tar.gz scummvm-rg350-3fe7213947a52b75ad7a0777af840909a372ef8f.tar.bz2 scummvm-rg350-3fe7213947a52b75ad7a0777af840909a372ef8f.zip |
DM: Add PARTY and SCENT types
-rw-r--r-- | engines/dm/champion.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/engines/dm/champion.h b/engines/dm/champion.h index a3c6f80773..8f202612d3 100644 --- a/engines/dm/champion.h +++ b/engines/dm/champion.h @@ -6,6 +6,46 @@ namespace DM { +class Scent { + uint16 _scent; +public: + Scent(uint16 scent = 0): _scent(scent) {} + + uint16 getMapX() { return _scent & 0x1F; } + uint16 getMapY() { return (_scent >> 5) & 0x1F; } + uint16 getMapIndex() { return (_scent >> 10) & 0x3F; } + + uint16 setMapX(uint16 val) { _scent = (_scent & ~0x1F) & (val & 0x1F); } + uint16 setMapY(uint16 val) { _scent = (_scent & ~(0x1F << 5)) & (val & 0x1F); } + uint16 setMapIndex(uint16 val) { _scent = (_scent & ~(0x1F << 10)) & (val & 0x3F); } +}; // @ SCENT + +class Party { +public: + Party() { + _magicalLightAmount = _event73Count_ThievesEye = _event79Count_Footprints = _shieldDefense = 0; + _fireShieldDefense = _spellShieldDefense = _scentCount = _freezeLifeTicks = _firstScentIndex = 0; + _lastScentIndex = _event71Count_Invisibility = 0; + for (int16 i = 0; i < 24; ++i) + _scentStrengths[i] = 0; + } + int16 _magicalLightAmount; + byte _event73Count_ThievesEye; + byte _event79Count_Footprints; + int16 _shieldDefense; + + int16 _fireShieldDefense; + int16 _spellShieldDefense; + byte _scentCount; + byte _freezeLifeTicks; + byte _firstScentIndex; + + byte _lastScentIndex; + Scent _scents[24]; // if I remember correctly, user defined default constructors are always called + byte _scentStrengths[24]; + byte _event71Count_Invisibility; +}; // @ PARTY + enum IconIndice { kIconIndiceNone = -1, // @ CM1_ICON_NONE kIconIndiceJunkCompassNorth = 0, // @ C000_ICON_JUNK_COMPASS_NORTH |