[Scummvm-cvs-logs] SF.net SVN: scummvm: [31763] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Mon Apr 28 21:51:35 CEST 2008


Revision: 31763
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31763&view=rev
Author:   lordhoto
Date:     2008-04-28 12:51:34 -0700 (Mon, 28 Apr 2008)

Log Message:
-----------
Fixed bug in TimerManager::update, this should fix tic-tac-toe game in kyra3.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra_v3.cpp
    scummvm/trunk/engines/kyra/timer.cpp
    scummvm/trunk/engines/kyra/timer_v3.cpp

Modified: scummvm/trunk/engines/kyra/kyra_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v3.cpp	2008-04-28 19:19:45 UTC (rev 31762)
+++ scummvm/trunk/engines/kyra/kyra_v3.cpp	2008-04-28 19:51:34 UTC (rev 31763)
@@ -1173,7 +1173,6 @@
 	//XXX
 	updateSpecialSceneScripts();
 	updateCommandLine();
-	//XXX
 	musicUpdate(0);
 
 	restorePage3();

Modified: scummvm/trunk/engines/kyra/timer.cpp
===================================================================
--- scummvm/trunk/engines/kyra/timer.cpp	2008-04-28 19:19:45 UTC (rev 31762)
+++ scummvm/trunk/engines/kyra/timer.cpp	2008-04-28 19:51:34 UTC (rev 31763)
@@ -99,17 +99,23 @@
 	_nextRun += 99999;
 
 	for (Iterator pos = _timers.begin(); pos != _timers.end(); ++pos) {
-		if (pos->enabled && pos->countdown >= 0 && pos->nextRun <= _system->getMillis()) {
-			if (pos->func && pos->func->isValid())
-				(*pos->func)(pos->id);
+		if (pos->enabled)
 
-			uint32 curTime = _system->getMillis();
-			pos->lastUpdate = curTime;
-			pos->nextRun = curTime + pos->countdown * _vm->tickLength();
+		if (pos->enabled && pos->countdown >= 0) {
+			if (pos->nextRun <= _system->getMillis()) {
+				if (pos->func && pos->func->isValid()) {
+					(*pos->func)(pos->id);
+				}
 
+				uint32 curTime = _system->getMillis();
+				pos->lastUpdate = curTime;
+				pos->nextRun = curTime + pos->countdown * _vm->tickLength();
+			}
+
 			_nextRun = MIN(_nextRun, pos->nextRun);
 		}
 	}
+
 }
 
 void TimerManager::resync() {

Modified: scummvm/trunk/engines/kyra/timer_v3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/timer_v3.cpp	2008-04-28 19:19:45 UTC (rev 31762)
+++ scummvm/trunk/engines/kyra/timer_v3.cpp	2008-04-28 19:51:34 UTC (rev 31763)
@@ -51,6 +51,7 @@
 
 void KyraEngine_v3::timerRunSceneScript7(int arg) {
 	debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v3::timerRunSceneScript7(%d)", arg);
+	_scriptInterpreter->initScript(&_sceneScriptState, &_sceneScriptData);
 	_sceneScriptState.regs[1] = _mouseX;
 	_sceneScriptState.regs[2] = _mouseY;
 	_sceneScriptState.regs[3] = 0;


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