diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/mult_v2.cpp | 2 | ||||
-rw-r--r-- | engines/gob/scenery.cpp | 10 | ||||
-rw-r--r-- | engines/gob/videoplayer.cpp | 4 |
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; |