aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2008-05-13 15:52:01 +0000
committerSven Hesse2008-05-13 15:52:01 +0000
commit85d28316ac2d513df8609ef7a39cc26a179f1078 (patch)
treed39e542c2cc88dfeb6e1b919e7c01f9eb7d5db22 /engines/gob
parent317b382757459e5ccd6ed336e4161f32387307b8 (diff)
downloadscummvm-rg350-85d28316ac2d513df8609ef7a39cc26a179f1078.tar.gz
scummvm-rg350-85d28316ac2d513df8609ef7a39cc26a179f1078.tar.bz2
scummvm-rg350-85d28316ac2d513df8609ef7a39cc26a179f1078.zip
Implemented support for object videos with more than 256 frames, this fixes a lockup when entering the bar
svn-id: r32087
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/mult_v2.cpp17
-rw-r--r--engines/gob/scenery.cpp13
2 files changed, 24 insertions, 6 deletions
diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp
index 3b561837ee..8a299649c7 100644
--- a/engines/gob/mult_v2.cpp
+++ b/engines/gob/mult_v2.cpp
@@ -697,7 +697,7 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) {
animData.frame = 0;
animData.isPaused = 1;
if (animData.animation < 0)
- warning("TODO: AnimType 4, animation: %d", animData.animation);
+ warning("Woodruff Stub: AnimType 4, animation: %d", animData.animation);
return;
}
@@ -705,9 +705,8 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) {
animData.animType = 11;
if (animData.animType == 11) {
- if (animData.isBusy != 0) {
- warning("TODO: AnimType 11");
- }
+ if (animData.isBusy != 0)
+ warning("Woodruff Stub: AnimType 11");
return;
}
@@ -754,6 +753,11 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) {
case 5:
animData.isStatic = 1;
animData.frame = 0;
+ if ((animData.animation < 0) && (animObj.videoSlot > 0)) {
+ _vm->_vidPlayer->slotClose(animObj.videoSlot - 1);
+ animObj.videoSlot = 0;
+ }
+
break;
case 6:
@@ -767,7 +771,12 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) {
}
}
break;
+
+ case 10:
+ warning("Woodruff Stub: AnimType 10");
+ break;
}
+
animData.newCycle = 1;
}
diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp
index 4dc1236ad6..25df5b7e71 100644
--- a/engines/gob/scenery.cpp
+++ b/engines/gob/scenery.cpp
@@ -632,8 +632,17 @@ void Scenery::updateAnim(int16 layer, int16 frame, int16 animation, int16 flags,
frame = _vm->_vidPlayer->getFramesCount(obj.videoSlot - 1) - 1;
// Seek to frame
- while (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) <= frame)
- _vm->_vidPlayer->slotPlay(obj.videoSlot - 1);
+ if (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) < 256) {
+ while (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) <= frame)
+ _vm->_vidPlayer->slotPlay(obj.videoSlot - 1);
+ } else {
+ int16 curFrame = _vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1);
+ uint8 frameWrap = curFrame / 256;
+ frame = (frame + 1) % 256;
+
+ while (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) < (frameWrap * 256 + frame))
+ _vm->_vidPlayer->slotPlay(obj.videoSlot - 1);
+ }
destX = 0;
destY = 0;