diff options
author | Paul Gilbert | 2014-02-25 19:52:35 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-02-25 19:52:35 -0500 |
commit | 9eaab29afedf9eceee50f882b64cb39a14e616a2 (patch) | |
tree | cc067a4ab22fa48ccdf13fddebf125f35b994f31 /engines/mads/scene_data.h | |
parent | c9057bd6a8ee2b039e2ba528b1e2e59814b8ef88 (diff) | |
download | scummvm-rg350-9eaab29afedf9eceee50f882b64cb39a14e616a2.tar.gz scummvm-rg350-9eaab29afedf9eceee50f882b64cb39a14e616a2.tar.bz2 scummvm-rg350-9eaab29afedf9eceee50f882b64cb39a14e616a2.zip |
MADS: Starting to refactor some Scene array fields as separate classes
Diffstat (limited to 'engines/mads/scene_data.h')
-rw-r--r-- | engines/mads/scene_data.h | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/engines/mads/scene_data.h b/engines/mads/scene_data.h index a4950dbc0a..b464cbaee3 100644 --- a/engines/mads/scene_data.h +++ b/engines/mads/scene_data.h @@ -30,6 +30,9 @@ namespace MADS { +class MADSEngine; +class Scene; + enum { VERB_LOOK = 3, VERB_TAKE = 4, @@ -70,7 +73,7 @@ class SpriteSlot { public: SpriteType _spriteType; int _seqIndex; - int _spriteListIndex; + int _spritesIndex; int _frameNumber; Common::Point _position; int _depth; @@ -80,6 +83,30 @@ public: SpriteSlot(SpriteType type, int seqIndex); }; +class SpriteSlots: public Common::Array<SpriteSlot> { +private: + MADSEngine *_vm; +public: + SpriteSlots(MADSEngine *vm): _vm(vm) {} + + /** + * Clears any pending slot data and schedules a full screen refresh. + * @param flag Also reset sprite list + */ + void clear(bool flag); + + /** + * Delete any sprites used by the player + */ + void releasePlayerSprites(); + + /** + * Delete a sprite entry + * @param index Specifies the index in the array + */ + void deleteEntry(int index); +}; + class TextDisplay { public: bool _active; @@ -110,7 +137,7 @@ public: class SequenceEntry { public: - int _spriteListIndex; + int _spritesIndex; int _flipped; int _frameIndex; int _frameStart; @@ -175,13 +202,6 @@ public: Hotspot(Common::SeekableReadStream &f); }; -#define SPRITE_COUNT 50 -#define TEXT_DISPLAY_COUNT 40 -#define DYNAMIC_HOTSPOT_COUNT 8 - -class MADSEngine; -class Scene; - class SceneLogic { protected: Scene *_scene; |