[Scummvm-cvs-logs] SF.net SVN: scummvm:[51913] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Sun Aug 8 03:04:19 CEST 2010
Revision: 51913
http://scummvm.svn.sourceforge.net/scummvm/?rev=51913&view=rev
Author: drmccoy
Date: 2010-08-08 01:04:19 +0000 (Sun, 08 Aug 2010)
Log Message:
-----------
GOB: Partly fixing VMD slot playing
Modified Paths:
--------------
scummvm/trunk/engines/gob/scenery.cpp
scummvm/trunk/engines/gob/videoplayer.cpp
Modified: scummvm/trunk/engines/gob/scenery.cpp
===================================================================
--- scummvm/trunk/engines/gob/scenery.cpp 2010-08-08 01:03:50 UTC (rev 51912)
+++ scummvm/trunk/engines/gob/scenery.cpp 2010-08-08 01:04:19 UTC (rev 51913)
@@ -619,24 +619,20 @@
if (frame >= (int32)_vm->_vidPlayer->getFrameCount(obj.videoSlot - 1))
frame = _vm->_vidPlayer->getFrameCount(obj.videoSlot - 1) - 1;
- // Seek to frame
- if (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) < 255) {
+ if (frame != (int32)_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1)) {
+ // Seek to frame
+
VideoPlayer::Properties props;
+ props.forceSeek = true;
props.waitEndFrame = false;
props.lastFrame = frame;
- _vm->_vidPlayer->play(obj.videoSlot - 1, props);
- } else {
- int16 curFrame = _vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) + 1;
- uint8 frameWrap = curFrame / 256;
- frame = (frame + 1) % 256;
+ if ((int32)_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) < frame)
+ props.startFrame = _vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) + 1;
+ else
+ props.startFrame = 0;
- VideoPlayer::Properties props;
-
- props.waitEndFrame = false;
- props.lastFrame = frameWrap * 256 + frame;
-
_vm->_vidPlayer->play(obj.videoSlot - 1, props);
}
@@ -736,13 +732,12 @@
_vm->_draw->invalidateRect(_vm->_draw->_destSpriteX, _vm->_draw->_destSpriteY,
_vm->_draw->_destSpriteX + _vm->_draw->_spriteRight - 1,
_vm->_draw->_destSpriteY + _vm->_draw->_spriteBottom - 1);
-
}
if (!(flags & 4)) {
- _animLeft = _toRedrawLeft = left;
- _animTop = _toRedrawTop = top;
- _animRight = _toRedrawRight = right;
+ _animLeft = _toRedrawLeft = left;
+ _animTop = _toRedrawTop = top;
+ _animRight = _toRedrawRight = right;
_animBottom = _toRedrawBottom = bottom;
}
Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp 2010-08-08 01:03:50 UTC (rev 51912)
+++ scummvm/trunk/engines/gob/videoplayer.cpp 2010-08-08 01:04:19 UTC (rev 51913)
@@ -521,10 +521,10 @@
int16 x = -1, y = -1, width = -1, height = -1;
- x = video.decoder->getDefaultX();
- y = video.decoder->getDefaultY();
- width = video.decoder->getWidth();
- width = video.decoder->getHeight();
+ x = video.decoder->getDefaultX();
+ y = video.decoder->getDefaultY();
+ width = video.decoder->getWidth();
+ height = video.decoder->getHeight();
if (VAR_OFFSET(varX) == 0xFFFFFFFF)
video.decoder->getFrameCoords(1, x, y, width, height);
@@ -535,6 +535,8 @@
WRITE_VAR_OFFSET(varWidth , width);
WRITE_VAR_OFFSET(varHeight, height);
+ closeVideo(slot);
+
} else {
WRITE_VAR_OFFSET(varX , (uint32) -1);
WRITE_VAR_OFFSET(varY , (uint32) -1);
@@ -560,7 +562,7 @@
int32 h = MIN<int32>(height, surface->h);
const byte *src = (byte*)surface->pixels + (top * surface->pitch) + left;
- byte *dst = dest + (y * pitch) + x;
+ byte *dst = dest + (y * pitch) + x;
if (transp < 0) {
// No transparency
@@ -578,10 +580,10 @@
const byte *srcRow = src;
byte *dstRow = dst;
- memcpy(dst, src, w);
+ memcpy(dstRow, srcRow, w);
- srcRow += surface->pitch;
- dstRow += pitch;
+ src += surface->pitch;
+ dst += pitch;
}
return true;
@@ -597,8 +599,8 @@
if (*srcRow != transp)
*dstRow = *srcRow;
- srcRow += surface->pitch;
- dstRow += pitch;
+ src += surface->pitch;
+ dst += pitch;
}
return true;
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