diff options
author | Paul Gilbert | 2015-03-15 23:16:38 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-03-15 23:16:38 -0400 |
commit | 6cfb7169b94e0c3c665d7799584eb8e5a7f337b3 (patch) | |
tree | d969bd9f75890205fb2cab91ca43041e4943948b /engines/sherlock/sprite.h | |
parent | 92c55e2bb192785e4587e143c9c367213f30233c (diff) | |
download | scummvm-rg350-6cfb7169b94e0c3c665d7799584eb8e5a7f337b3.tar.gz scummvm-rg350-6cfb7169b94e0c3c665d7799584eb8e5a7f337b3.tar.bz2 scummvm-rg350-6cfb7169b94e0c3c665d7799584eb8e5a7f337b3.zip |
SHERLOCK: Beginnings of sprite loading for animations
Diffstat (limited to 'engines/sherlock/sprite.h')
-rw-r--r-- | engines/sherlock/sprite.h | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/engines/sherlock/sprite.h b/engines/sherlock/sprite.h index f56ab588bb..1f81cf8071 100644 --- a/engines/sherlock/sprite.h +++ b/engines/sherlock/sprite.h @@ -23,32 +23,29 @@ #ifndef SHERLOCK_SPRITE_H #define SHERLOCK_SPRITE_H -#include "common/stream.h" #include "common/array.h" +#include "common/rect.h" +#include "common/stream.h" #include "graphics/surface.h" namespace Sherlock { struct SpriteFrame { - byte *data; - uint32 size; - uint16 width, height; - uint16 flags; - int xofs, yofs; - byte rleMarker; - Graphics::Surface *frame; + uint32 _size; + uint16 _width, _height; + int _flags; + Common::Point _offset; + byte _rleMarker; + Graphics::Surface _frame; }; -class Sprite { +class Sprite: public Common::Array<SpriteFrame> { +private: + void load(Common::SeekableReadStream &stream); + void decompressFrame(SpriteFrame &frame, const byte *src); public: Sprite(Common::SeekableReadStream &stream); ~Sprite(); - int getFrameCount(); - SpriteFrame *getFrame(int index); -protected: - Common::Array<SpriteFrame*> _frames; - void load(Common::SeekableReadStream &stream); - void decompressFrame(SpriteFrame *frame); }; } // End of namespace Sherlock |