[Scummvm-cvs-logs] SF.net SVN: scummvm: [32087] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Tue May 13 17:52:01 CEST 2008


Revision: 32087
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32087&view=rev
Author:   drmccoy
Date:     2008-05-13 08:52:01 -0700 (Tue, 13 May 2008)

Log Message:
-----------
Implemented support for object videos with more than 256 frames, this fixes a lockup when entering the bar

Modified Paths:
--------------
    scummvm/trunk/engines/gob/mult_v2.cpp
    scummvm/trunk/engines/gob/scenery.cpp

Modified: scummvm/trunk/engines/gob/mult_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/mult_v2.cpp	2008-05-13 15:40:29 UTC (rev 32086)
+++ scummvm/trunk/engines/gob/mult_v2.cpp	2008-05-13 15:52:01 UTC (rev 32087)
@@ -697,7 +697,7 @@
 		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 @@
 		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 @@
 	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 @@
 			}
 		}
 		break;
+
+	case 10:
+		warning("Woodruff Stub: AnimType 10");
+		break;
 	}
+
 	animData.newCycle = 1;
 }
 

Modified: scummvm/trunk/engines/gob/scenery.cpp
===================================================================
--- scummvm/trunk/engines/gob/scenery.cpp	2008-05-13 15:40:29 UTC (rev 32086)
+++ scummvm/trunk/engines/gob/scenery.cpp	2008-05-13 15:52:01 UTC (rev 32087)
@@ -632,9 +632,18 @@
 			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;
 		left = *(obj.pPosX);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list