mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
GOB: Fix playing of slot videos
The actual frame content is still not there, though :P svn-id: r51911
This commit is contained in:
parent
5dc322454d
commit
cebc1aca81
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user