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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Jun 2 01:25:10 CEST 2009


Revision: 41114
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41114&view=rev
Author:   lordhoto
Date:     2009-06-01 23:25:10 +0000 (Mon, 01 Jun 2009)

Log Message:
-----------
Change LoLEngine::delay to be conform with KyraEngine_v1::delay. (remove special iUpdate parameter, just call updateInput, when "doUpdate" is set to false)

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/lol.cpp
    scummvm/trunk/engines/kyra/lol.h
    scummvm/trunk/engines/kyra/scene_lol.cpp
    scummvm/trunk/engines/kyra/script_lol.cpp
    scummvm/trunk/engines/kyra/sound_lol.cpp

Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp	2009-06-01 22:03:27 UTC (rev 41113)
+++ scummvm/trunk/engines/kyra/lol.cpp	2009-06-01 23:25:10 UTC (rev 41114)
@@ -1779,12 +1779,12 @@
 	return (id & 0x8000) ? _monsters[id & 0x7fff].properties->protectionAgainstItems : _characters[id].protectionAgainstItems;
 }
 
-void LoLEngine::delay(uint32 millis, bool cUpdate, bool iUpdate) {
+void LoLEngine::delay(uint32 millis, bool doUpdate, bool) {
 	int del = (int)(millis);
 	while (del > 0 && !shouldQuit()) {
-		if (cUpdate)
+		if (doUpdate)
 			update();
-		if (iUpdate)
+		else
 			updateInput();
 		int step = del >= _tickLength ? _tickLength : del;
 		_system->delayMillis(step);
@@ -2402,7 +2402,7 @@
 
 		int del = _tickLength - (_system->getMillis() - ctime);
 		if (del > 0)
-			delay(del, false, true);
+			delay(del);
 
 		_screen->checkedPageUpdate(drawPage1, drawPage2);
 		_screen->updateScreen();
@@ -2849,7 +2849,7 @@
 			int step = del > _tickLength ? _tickLength : del;
 
 			if (!pal1 || !pal2) {
-				delay(step, false, true);
+				delay(step);
 				del -= step;
 				continue;
 			}
@@ -2857,7 +2857,7 @@
 			if (!_screen->fadePaletteStep(pal1, pal2, _system->getMillis() - startTime, _tickLength * fadeDelay) && !mov)
 				return;
 
-			delay(step, false, true);
+			delay(step);
 			del -= step;
 		} while (del > 0);
 

Modified: scummvm/trunk/engines/kyra/lol.h
===================================================================
--- scummvm/trunk/engines/kyra/lol.h	2009-06-01 22:03:27 UTC (rev 41113)
+++ scummvm/trunk/engines/kyra/lol.h	2009-06-01 23:25:10 UTC (rev 41114)
@@ -1291,7 +1291,7 @@
 	int _monsterScaleWHSize;
 
 	// misc
-	void delay(uint32 millis, bool cUpdate = false, bool iUpdate = false);
+	void delay(uint32 millis, bool doUpdate = false, bool isMainLoop = false);
 	void delayUntil(uint32 timeStamp);
 	uint8 getRandomNumberSpecial();
 

Modified: scummvm/trunk/engines/kyra/scene_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/scene_lol.cpp	2009-06-01 22:03:27 UTC (rev 41113)
+++ scummvm/trunk/engines/kyra/scene_lol.cpp	2009-06-01 23:25:10 UTC (rev 41114)
@@ -1244,7 +1244,7 @@
 
 		del = _tickLength -	(_system->getMillis() - ctime);
 		if (del > 0)
-			delay(del, false, true);
+			delay(del);
 	}
 
 	_screen->copyRegionSpecial(2, 320, 200, 112, 0, 0, 320, 200, 112, 0, 176, 120, 0);
@@ -1252,7 +1252,7 @@
 
 	del = _tickLength -	(_system->getMillis() - ctime);
 	if (del > 0)
-		delay(del, false, true);
+		delay(del);
 	updateDrawPage2();
 }
 

Modified: scummvm/trunk/engines/kyra/script_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_lol.cpp	2009-06-01 22:03:27 UTC (rev 41113)
+++ scummvm/trunk/engines/kyra/script_lol.cpp	2009-06-01 23:25:10 UTC (rev 41114)
@@ -199,7 +199,7 @@
 
 int LoLEngine::olol_delay(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_delay(%p) (%d)", (const void *)script, stackPos(0));
-	delay(stackPos(0) * _tickLength, false, true);
+	delay(stackPos(0) * _tickLength);
 	return 1;
 }
 

Modified: scummvm/trunk/engines/kyra/sound_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_lol.cpp	2009-06-01 22:03:27 UTC (rev 41113)
+++ scummvm/trunk/engines/kyra/sound_lol.cpp	2009-06-01 23:25:10 UTC (rev 41114)
@@ -90,10 +90,10 @@
 		return false;
 
 	while (_sound->voiceIsPlaying(&_speechHandle))
-		delay(_tickLength, true, false);
+		delay(_tickLength, true);
 
 	while (_sound->allVoiceChannelsPlaying())
-		delay(_tickLength, false, true);
+		delay(_tickLength);
 
 	for (Common::List<Audio::AudioStream *>::iterator i = _speechList.begin(); i != _speechList.end(); ++i)
 		delete *i;


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