diff options
-rw-r--r-- | video/flic_decoder.cpp | 12 | ||||
-rw-r--r-- | video/flic_decoder.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp index 1a0627615b..de545366b1 100644 --- a/video/flic_decoder.cpp +++ b/video/flic_decoder.cpp @@ -152,6 +152,7 @@ Graphics::PixelFormat FlicDecoder::FlicVideoTrack::getPixelFormat() const { #define FLI_SETPAL 4 #define FLI_SS2 7 #define FLI_BRUN 15 +#define FLI_COPY 16 #define PSTAMP 18 #define FRAME_TYPE 0xF1FA @@ -212,6 +213,9 @@ const Graphics::Surface *FlicDecoder::FlicVideoTrack::decodeNextFrame() { case FLI_BRUN: decodeByteRun(data); break; + case FLI_COPY: + copyFrame(data); + break; case PSTAMP: /* PSTAMP - skip for now */ break; @@ -247,6 +251,14 @@ void FlicDecoder::FlicVideoTrack::copyDirtyRectsToBuffer(uint8 *dst, uint pitch) clearDirtyRects(); } +void FlicDecoder::FlicVideoTrack::copyFrame(uint8 *data) { + memcpy((byte *)_surface->pixels, data, getWidth() * getHeight()); + + // Redraw + _dirtyRects.clear(); + _dirtyRects.push_back(Common::Rect(0, 0, getWidth(), getHeight())); +} + void FlicDecoder::FlicVideoTrack::decodeByteRun(uint8 *data) { byte *ptr = (byte *)_surface->pixels; while ((int32)(ptr - (byte *)_surface->pixels) < (getWidth() * getHeight())) { diff --git a/video/flic_decoder.h b/video/flic_decoder.h index 9037af05d6..c20a092a32 100644 --- a/video/flic_decoder.h +++ b/video/flic_decoder.h @@ -97,6 +97,7 @@ private: Common::List<Common::Rect> _dirtyRects; + void copyFrame(uint8 *data); void decodeByteRun(uint8 *data); void decodeDeltaFLC(uint8 *data); void unpackPalette(uint8 *mem); |