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

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sat Jan 3 14:32:15 CET 2009


Revision: 35699
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35699&view=rev
Author:   drmccoy
Date:     2009-01-03 13:32:14 +0000 (Sat, 03 Jan 2009)

Log Message:
-----------
Properly using SMKPlayer::getFrameWaitTime() in MoviePlayerSMK::processFrame()

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

Modified: scummvm/trunk/engines/agos/animation.cpp
===================================================================
--- scummvm/trunk/engines/agos/animation.cpp	2009-01-03 13:31:23 UTC (rev 35698)
+++ scummvm/trunk/engines/agos/animation.cpp	2009-01-03 13:32:14 UTC (rev 35699)
@@ -465,32 +465,15 @@
 	copyFrameToBuffer((byte *)screen->pixels, (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, _vm->_screenWidth);
 	_vm->_system->unlockScreen();
 
-	if (!getAudioLag() || getFrameWaitTime() || _frameSkipped > getFrameRate()) {
-		if (_frameSkipped > getFrameRate()) {
-			warning("force frame %i redraw", getCurFrame());
-			_frameSkipped = 0;
-		}
+	uint32 waitTime = getFrameWaitTime();
 
-		if (getAudioLag() > 0) {
-			while (getAudioLag() > 0) {
-				_vm->_system->delayMillis(10);
-			}
-			// In case the background sound ends prematurely, update
-			// _ticks so that we can still fall back on the no-sound
-			// sync case for the subsequent frames.
-			_ticks = _vm->_system->getMillis();
-		} else {
-			_ticks += getFrameDelay();
-			while ((_vm->_system->getMillis() * 100) < _ticks)
-				_vm->_system->delayMillis(10);
-		}
-
-		return true;
+	if (!waitTime) {
+		warning("dropped frame %i", getCurFrame());
+		return false;
 	}
 
-	warning("dropped frame %i", getCurFrame());
-	_frameSkipped++;
-	return false;
+	_vm->_system->delayMillis(waitTime);
+	return true;
 }
 
 ///////////////////////////////////////////////////////////////////////////////


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