[Scummvm-cvs-logs] SF.net SVN: scummvm:[40716] scummvm/trunk/engines/agos/animation.cpp

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Tue May 19 03:20:55 CEST 2009


Revision: 40716
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40716&view=rev
Author:   Kirben
Date:     2009-05-19 01:20:54 +0000 (Tue, 19 May 2009)

Log Message:
-----------
Improve looping of videos, in the demo version of The Feeble Files.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/animation.cpp

Modified: scummvm/trunk/engines/agos/animation.cpp
===================================================================
--- scummvm/trunk/engines/agos/animation.cpp	2009-05-19 01:13:29 UTC (rev 40715)
+++ scummvm/trunk/engines/agos/animation.cpp	2009-05-19 01:20:54 UTC (rev 40716)
@@ -321,6 +321,12 @@
 		return;
 	}
 
+	if (_vm->_interactiveVideo == TYPE_LOOPING && getCurFrame() == getFrameCount()) {
+		_fileStream->seek(_videoInfo.frameOffs);
+		_videoInfo.currentFrame = 0;
+		startSound();
+	}
+
 	if (getCurFrame() < getFrameCount()) {
 		decodeNextFrame();
 		if (_vm->_interactiveVideo == TYPE_OMNITV) {
@@ -328,16 +334,10 @@
 		} else if (_vm->_interactiveVideo == TYPE_LOOPING) {
 			copyFrameToBuffer(_vm->getBackBuf(), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, _vm->_screenWidth);
 		}
-	} else {
-		if (_vm->_interactiveVideo == TYPE_OMNITV) {
-			closeFile();
-			_vm->_interactiveVideo = 0;
-			_vm->_variableArray[254] = 6747;
-		} else if (_vm->_interactiveVideo == TYPE_LOOPING) {
-			_fileStream->seek(_videoInfo.frameOffs);
-			_videoInfo.currentFrame = 0;
-			startSound();
-		}
+	} else if (_vm->_interactiveVideo == TYPE_OMNITV) {
+		closeFile();
+		_vm->_interactiveVideo = 0;
+		_vm->_variableArray[254] = 6747;
 	}
 }
 
@@ -444,6 +444,11 @@
 }
 
 void MoviePlayerSMK::nextFrame() {
+	if (_vm->_interactiveVideo == TYPE_LOOPING && getCurFrame() == getFrameCount()) {
+		_fileStream->seek(_videoInfo.frameOffs);
+		_videoInfo.currentFrame = 0;
+	}
+
 	if (getCurFrame() < getFrameCount()) {
 		decodeNextFrame();
 		if (_vm->_interactiveVideo == TYPE_OMNITV) {
@@ -451,15 +456,10 @@
 		} else if (_vm->_interactiveVideo == TYPE_LOOPING) {
 			copyFrameToBuffer(_vm->getBackBuf(), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, _vm->_screenWidth);
 		}
-	} else {
-		if (_vm->_interactiveVideo == TYPE_OMNITV) {
-			closeFile();
-			_vm->_interactiveVideo = 0;
-			_vm->_variableArray[254] = 6747;
-		} else if (_vm->_interactiveVideo == TYPE_LOOPING) {
-			_fileStream->seek(_videoInfo.frameOffs);
-			_videoInfo.currentFrame = 0;
-		}
+	} else if (_vm->_interactiveVideo == TYPE_OMNITV) {
+		closeFile();
+		_vm->_interactiveVideo = 0;
+		_vm->_variableArray[254] = 6747;
 	}
 }
 


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