diff options
author | Paul Gilbert | 2015-01-08 23:02:46 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-01-08 23:02:46 -0500 |
commit | 00ef21e2a22dc84531d325bc95734b63b5c7daed (patch) | |
tree | d9228949f247d7382f127d13ab734d84ba49fded /engines/xeen/map.h | |
parent | 03952cd9d353c4af393da7ffeb524bcdb5746f34 (diff) | |
download | scummvm-rg350-00ef21e2a22dc84531d325bc95734b63b5c7daed.tar.gz scummvm-rg350-00ef21e2a22dc84531d325bc95734b63b5c7daed.tar.bz2 scummvm-rg350-00ef21e2a22dc84531d325bc95734b63b5c7daed.zip |
XEEN: Fixed monster/object data merging and sprite loading
Diffstat (limited to 'engines/xeen/map.h')
-rw-r--r-- | engines/xeen/map.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/engines/xeen/map.h b/engines/xeen/map.h index 7c0344b9a4..1d11bdcfaa 100644 --- a/engines/xeen/map.h +++ b/engines/xeen/map.h @@ -204,10 +204,10 @@ public: Common::Point _position; int _id; int _frame; - int _refId; + int _spriteId; Direction _direction; bool _flipped; - SpriteResource _sprites; + SpriteResource *_sprites; MazeObject(); }; @@ -216,12 +216,12 @@ struct MazeMonster { Common::Point _position; int _frame; int _id; - int _refId; + int _spriteId; int _hp; int _effect1, _effect2; int _effect3; - SpriteResource _sprites; - SpriteResource _attackSprites; + SpriteResource *_sprites; + SpriteResource *_attackSprites; MazeMonster(); }; @@ -230,16 +230,32 @@ class MazeWallItem { public: Common::Point _position; int _id; - int _refId; + int _spriteId; Direction _direction; - SpriteResource _sprites; + SpriteResource *_sprites; public: MazeWallItem(); }; +class Map; + class MonsterObjectData { + friend class Map; +public: + struct SpriteResourceEntry { + int _spriteId; + SpriteResource _sprites; + SpriteResource _attackSprites; + + SpriteResourceEntry() { _spriteId = -1; } + SpriteResourceEntry(int spriteId): _spriteId(spriteId) { } + }; private: XeenEngine *_vm; + Common::Array<SpriteResourceEntry> _objectSprites; + Common::Array<SpriteResourceEntry> _monsterSprites; + Common::Array<SpriteResourceEntry> _monsterAttackSprites; + Common::Array<SpriteResourceEntry> _wallItemSprites; public: Common::Array<MazeObject> _objects; Common::Array<MazeMonster> _monsters; |