[Scummvm-cvs-logs] scummvm master -> b65b196e565b0a22a6ba0fbbabfa3349f98cf051

digitall dgturner at iee.org
Wed Dec 26 03:43:36 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b65b196e56 VIDEO: Add support for missing copyFrame type in FLIC decoder.


Commit: b65b196e565b0a22a6ba0fbbabfa3349f98cf051
    https://github.com/scummvm/scummvm/commit/b65b196e565b0a22a6ba0fbbabfa3349f98cf051
Author: D G Turner (digitall at scummvm.org)
Date: 2012-12-25T18:41:31-08:00

Commit Message:
VIDEO: Add support for missing copyFrame type in FLIC decoder.

Thanks to Tomaz^ for this patch.

Changed paths:
    video/flic_decoder.cpp
    video/flic_decoder.h



diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp
index 1a06276..de54536 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 9037af0..c20a092 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);






More information about the Scummvm-git-logs mailing list