Added a copyFrameToBuffer() method to the FLIC player too, like in the other players

svn-id: r35742
This commit is contained in:
Filippos Karapetis 2009-01-05 17:05:50 +00:00
parent 7f9ea7e35c
commit 70ab22e9f2
2 changed files with 25 additions and 0 deletions

View File

@ -273,4 +273,18 @@ void FlicPlayer::setPalette(uint8 *mem) {
}
}
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

View File

@ -113,7 +113,18 @@ public:
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);