GOB: Fix playing of slot videos

The actual frame content is still not there, though :P

svn-id: r51911
This commit is contained in:
Sven Hesse 2010-08-08 01:03:21 +00:00
parent 5dc322454d
commit cebc1aca81
3 changed files with 10 additions and 6 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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;