aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2010-08-08 01:03:21 +0000
committerSven Hesse2010-08-08 01:03:21 +0000
commitcebc1aca818eb3912feaee12716e78d6d8210b48 (patch)
treed1fa43604567f10ff47a233d63fab18fba4b4e33 /engines/gob
parent5dc322454de75e25d5db8b8f284131a166d558e7 (diff)
downloadscummvm-rg350-cebc1aca818eb3912feaee12716e78d6d8210b48.tar.gz
scummvm-rg350-cebc1aca818eb3912feaee12716e78d6d8210b48.tar.bz2
scummvm-rg350-cebc1aca818eb3912feaee12716e78d6d8210b48.zip
GOB: Fix playing of slot videos
The actual frame content is still not there, though :P svn-id: r51911
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/mult_v2.cpp2
-rw-r--r--engines/gob/scenery.cpp10
-rw-r--r--engines/gob/videoplayer.cpp4
3 files changed, 10 insertions, 6 deletions
diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp
index 47cd74b454..66488054e7 100644
--- a/engines/gob/mult_v2.cpp
+++ b/engines/gob/mult_v2.cpp
@@ -736,7 +736,7 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) {
if (animData.animation < 0) {
if ((animObj.videoSlot > 0) &&
- (_vm->_vidPlayer->getCurrentFrame(animObj.videoSlot - 1) <
+ ((_vm->_vidPlayer->getCurrentFrame(animObj.videoSlot - 1) + 1) <
_vm->_vidPlayer->getFrameCount(animObj.videoSlot - 1))) {
animData.newCycle = 0;
return;
diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp
index 7fd1429aac..02a2f39ca0 100644
--- a/engines/gob/scenery.cpp
+++ b/engines/gob/scenery.cpp
@@ -616,14 +616,15 @@ void Scenery::updateAnim(int16 layer, int16 frame, int16 animation, int16 flags,
return;
}
- if (frame >= ((int16)_vm->_vidPlayer->getFrameCount(obj.videoSlot - 1)))
+ 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) < 256) {
+ if (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) < 255) {
VideoPlayer::Properties props;
- props.lastFrame = frame + 1;
+ props.waitEndFrame = false;
+ props.lastFrame = frame;
_vm->_vidPlayer->play(obj.videoSlot - 1, props);
} else {
@@ -633,7 +634,8 @@ void Scenery::updateAnim(int16 layer, int16 frame, int16 animation, int16 flags,
VideoPlayer::Properties props;
- props.lastFrame = frameWrap * 256 + frame;
+ props.waitEndFrame = false;
+ props.lastFrame = frameWrap * 256 + frame;
_vm->_vidPlayer->play(obj.videoSlot - 1, props);
}
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 970d8dc9dd..db82c9b965 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -230,7 +230,9 @@ bool VideoPlayer::play(int slot, Properties &properties) {
properties.canceled = false;
- while (properties.startFrame != properties.lastFrame) {
+ while ((properties.startFrame != properties.lastFrame) &&
+ (properties.startFrame < (int32)(video->decoder->getFrameCount() - 1))) {
+
playFrame(slot, properties);
if (properties.canceled)
break;