diff options
Diffstat (limited to 'engines/mutationofjb/animationdecoder.h')
-rw-r--r-- | engines/mutationofjb/animationdecoder.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/mutationofjb/animationdecoder.h b/engines/mutationofjb/animationdecoder.h index 050aa3b9dd..f213440d9d 100644 --- a/engines/mutationofjb/animationdecoder.h +++ b/engines/mutationofjb/animationdecoder.h @@ -23,8 +23,10 @@ #ifndef MUTATIONOFJB_ANIMATIONDECODER_H #define MUTATIONOFJB_ANIMATIONDECODER_H +#include "common/rect.h" #include "common/scummsys.h" #include "common/str.h" + #include "graphics/surface.h" #include "mutationofjb/encryptedfile.h" @@ -51,9 +53,20 @@ public: class AnimationDecoder { public: AnimationDecoder(const Common::String &fileName); + AnimationDecoder(const Common::String &fileName, const Graphics::Surface &outSurface); ~AnimationDecoder(); bool decode(AnimationDecoderCallback *callback); + /** + * Enables partial decoding mode. + * + * @param fromFrame Frame to start decoding on (inclusive). + * @param toFrame Frame to end decoding on (inclusive). + * @param area Output surface will be confined to this area. + * @param threshold Source pixels with color index above this threshold will not be replaced. + */ + void setPartialMode(int fromFrame, int toFrame, const Common::Rect area = Common::Rect(), uint8 threshold = 0xFF); + private: void loadPalette(Common::SeekableReadStream &stream); void loadFullFrame(EncryptedFile &file, uint32 size); @@ -61,7 +74,12 @@ private: Common::String _fileName; Graphics::Surface _surface; + bool _owningSurface; byte _palette[PALETTE_SIZE]; + int _fromFrame; + int _toFrame; + Common::Rect _area; + uint8 _threshold; }; } |