aboutsummaryrefslogtreecommitdiff
path: root/video/flic_decoder.h
diff options
context:
space:
mode:
authorFilippos Karapetis2016-10-03 00:18:39 +0300
committerFilippos Karapetis2016-10-03 00:33:49 +0300
commit7331bdc6b1f15bc9f5c8e186d4f19923c1c723a4 (patch)
tree0fc0f35c5a959e9a92f22bd99c6d0400555ff018 /video/flic_decoder.h
parent0152b7c47f0eef04bd01ae6e1cb808d25ccdd9a0 (diff)
downloadscummvm-rg350-7331bdc6b1f15bc9f5c8e186d4f19923c1c723a4.tar.gz
scummvm-rg350-7331bdc6b1f15bc9f5c8e186d4f19923c1c723a4.tar.bz2
scummvm-rg350-7331bdc6b1f15bc9f5c8e186d4f19923c1c723a4.zip
VIDEO: Allow parts of the FLIC decoder to be overriden by child classes
This is needed by the specialized FLIC video decoder used in the chewy engine
Diffstat (limited to 'video/flic_decoder.h')
-rw-r--r--video/flic_decoder.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/video/flic_decoder.h b/video/flic_decoder.h
index 1769e1ed2e..445e474b87 100644
--- a/video/flic_decoder.h
+++ b/video/flic_decoder.h
@@ -42,6 +42,7 @@ namespace Video {
* Decoder for FLIC videos.
*
* Video decoder used in engines:
+ * - chewy
* - tucker
*/
class FlicDecoder : public VideoDecoder {
@@ -49,21 +50,23 @@ public:
FlicDecoder();
virtual ~FlicDecoder();
- bool loadStream(Common::SeekableReadStream *stream);
+ virtual bool loadStream(Common::SeekableReadStream *stream);
const Common::List<Common::Rect> *getDirtyRects() const;
void clearDirtyRects();
void copyDirtyRectsToBuffer(uint8 *dst, uint pitch);
-private:
+protected:
class FlicVideoTrack : public VideoTrack {
public:
- FlicVideoTrack(Common::SeekableReadStream *stream, uint16 frameCount, uint16 width, uint16 height);
+ FlicVideoTrack(Common::SeekableReadStream *stream, uint16 frameCount, uint16 width, uint16 height, bool skipHeader = false);
~FlicVideoTrack();
+ virtual void readHeader();
+
bool endOfTrack() const;
- bool isRewindable() const { return true; }
- bool rewind();
+ virtual bool isRewindable() const { return true; }
+ virtual bool rewind();
uint16 getWidth() const;
uint16 getHeight() const;
@@ -71,7 +74,8 @@ private:
int getCurFrame() const { return _curFrame; }
int getFrameCount() const { return _frameCount; }
uint32 getNextFrameStartTime() const { return _nextFrameStartTime; }
- const Graphics::Surface *decodeNextFrame();
+ virtual const Graphics::Surface *decodeNextFrame();
+ virtual void handleFrame();
const byte *getPalette() const { _dirtyPalette = false; return _palette; }
bool hasDirtyPalette() const { return _dirtyPalette; }
@@ -79,7 +83,7 @@ private:
void clearDirtyRects() { _dirtyRects.clear(); }
void copyDirtyRectsToBuffer(uint8 *dst, uint pitch);
- private:
+ protected:
Common::SeekableReadStream *_fileStream;
Graphics::Surface *_surface;