[Scummvm-cvs-logs] SF.net SVN: scummvm:[55264] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sun Jan 16 17:30:16 CET 2011


Revision: 55264
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55264&view=rev
Author:   drmccoy
Date:     2011-01-16 16:30:15 +0000 (Sun, 16 Jan 2011)

Log Message:
-----------
GOB: Allow true-color VMD cursors

Modified Paths:
--------------
    scummvm/trunk/engines/gob/inter_v6.cpp
    scummvm/trunk/engines/gob/videoplayer.cpp
    scummvm/trunk/engines/gob/videoplayer.h

Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-16 16:29:43 UTC (rev 55263)
+++ scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-16 16:30:15 UTC (rev 55264)
@@ -234,14 +234,15 @@
 		int16 framesCount = _vm->_vidPlayer->getFrameCount(vmdSlot);
 
 		for (int i = 0; i < framesCount; i++) {
-			props.startFrame = i;
-			props.lastFrame  = i;
+			props.startFrame   = i;
+			props.lastFrame    = i;
+			props.waitEndFrame = false;
 
 			_vm->_vidPlayer->play(vmdSlot, props);
 			_vm->_vidPlayer->copyFrame(vmdSlot, _vm->_draw->_cursorSprites->getData(),
 					0, 0, _vm->_draw->_cursorWidth, _vm->_draw->_cursorWidth,
 					(start + i) * _vm->_draw->_cursorWidth, 0,
-					_vm->_draw->_cursorSprites->getWidth());
+					_vm->_draw->_cursorSprites->getWidth() * 2, 2);
 		}
 
 		_vm->_vidPlayer->closeVideo(vmdSlot);

Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp	2011-01-16 16:29:43 UTC (rev 55263)
+++ scummvm/trunk/engines/gob/videoplayer.cpp	2011-01-16 16:30:15 UTC (rev 55264)
@@ -563,7 +563,7 @@
 
 bool VideoPlayer::copyFrame(int slot, byte *dest,
 		uint16 left, uint16 top, uint16 width, uint16 height,
-		uint16 x, uint16 y, uint16 pitch, int16 transp) const {
+		uint16 x, uint16 y, uint16 pitch, uint8 bpp, int16 transp) const {
 
 	const Video *video = getVideoBySlot(slot);
 	if (!video)
@@ -573,6 +573,8 @@
 	if (!surface)
 		return false;
 
+	assert(surface->bytesPerPixel == bpp);
+
 	int32 w = MIN<int32>(width , surface->w);
 	int32 h = MIN<int32>(height, surface->h);
 
@@ -585,7 +587,7 @@
 		if ((x == 0) && (left == 0) && (pitch == surface->pitch) && (width == surface->w)) {
 			// Dimensions fit, we can copy everything at once
 
-			memcpy(dst, src, w * h);
+			memcpy(dst, src, w * h * bpp);
 			return true;
 		}
 
@@ -595,7 +597,7 @@
 			const byte *srcRow = src;
 						byte *dstRow = dst;
 
-			memcpy(dstRow, srcRow, w);
+			memcpy(dstRow, srcRow, w * bpp);
 
 			src += surface->pitch;
 			dst +=          pitch;
@@ -606,6 +608,8 @@
 
 	// Copy pixel-by-pixel
 
+	assert(bpp == 1);
+
 	while (h-- > 0) {
 		const byte *srcRow = src;
 		      byte *dstRow = dst;

Modified: scummvm/trunk/engines/gob/videoplayer.h
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.h	2011-01-16 16:29:43 UTC (rev 55263)
+++ scummvm/trunk/engines/gob/videoplayer.h	2011-01-16 16:30:15 UTC (rev 55264)
@@ -132,7 +132,7 @@
 
 	bool copyFrame(int slot, byte *dest,
 			uint16 left, uint16 top, uint16 width, uint16 height,
-			uint16 x, uint16 y, uint16 pitch, int16 transp = -1) const;
+			uint16 x, uint16 y, uint16 pitch, uint8 bpp = 1, int16 transp = -1) const;
 
 private:
 	struct Video {


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