[Scummvm-cvs-logs] SF.net SVN: scummvm:[35742] scummvm/trunk/graphics/video
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Jan 5 18:05:50 CET 2009
Revision: 35742
http://scummvm.svn.sourceforge.net/scummvm/?rev=35742&view=rev
Author: thebluegr
Date: 2009-01-05 17:05:50 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
Added a copyFrameToBuffer() method to the FLIC player too, like in the other players
Modified Paths:
--------------
scummvm/trunk/graphics/video/flic_player.cpp
scummvm/trunk/graphics/video/flic_player.h
Modified: scummvm/trunk/graphics/video/flic_player.cpp
===================================================================
--- scummvm/trunk/graphics/video/flic_player.cpp 2009-01-05 15:10:13 UTC (rev 35741)
+++ scummvm/trunk/graphics/video/flic_player.cpp 2009-01-05 17:05:50 UTC (rev 35742)
@@ -273,4 +273,18 @@
}
}
+void FlicPlayer::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) {
+ uint h = _flicInfo.height;
+ uint w = _flicInfo.width;
+
+ byte *src = (byte *)_offscreen;
+ dst += y * pitch + x;
+
+ do {
+ memcpy(dst, src, w);
+ dst += pitch;
+ src += w;
+ } while (--h);
+}
+
} // End of namespace Graphics
Modified: scummvm/trunk/graphics/video/flic_player.h
===================================================================
--- scummvm/trunk/graphics/video/flic_player.h 2009-01-05 15:10:13 UTC (rev 35741)
+++ scummvm/trunk/graphics/video/flic_player.h 2009-01-05 17:05:50 UTC (rev 35742)
@@ -113,7 +113,18 @@
void redraw();
void reset();
+ /**
+ * Copy current frame into the specified position of the destination
+ * buffer.
+ * @param dst the buffer
+ * @param x the x position of the buffer
+ * @param y the y position of the buffer
+ * @param pitch the pitch of buffer
+ */
+ void copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch);
+
protected:
+
ChunkHeader readChunkHeader();
FrameTypeChunkHeader readFrameTypeChunkHeader(ChunkHeader chunkHead);
void decodeByteRun(uint8 *data);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list