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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Sep 17 18:01:22 CEST 2009


Revision: 44163
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44163&view=rev
Author:   lordhoto
Date:     2009-09-17 16:01:21 +0000 (Thu, 17 Sep 2009)

Log Message:
-----------
Add workaround in "o2_isAnySoundPlaying", which will hopefully make Kyra2 work on the Nintendo DS.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/script_hof.cpp

Modified: scummvm/trunk/engines/kyra/script_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_hof.cpp	2009-09-17 15:59:45 UTC (rev 44162)
+++ scummvm/trunk/engines/kyra/script_hof.cpp	2009-09-17 16:01:21 UTC (rev 44163)
@@ -727,6 +727,20 @@
 
 int KyraEngine_HoF::o2_isAnySoundPlaying(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_isAnySoundPlaying(%p) ()", (const void *)script);
+
+	// WORKAROUND
+	//
+	// The input script function in the skull scene does busy wait
+	// for the sound effect, which is played after completing the
+	// song, to finish. To avoid too much CPU use, we add some slight
+	// delay here.
+	//
+	// Also the Ninteno DS backend seems only to update the sound, when
+	// either OSystem::updateScreen or OSystem::delayMillis is called.
+	// So we have to call delay here, since otherwise the game would hang.
+	if (_currentScene == 16 && _currentChapter == 1)
+		delay(_tickLength);
+
 	return _sound->voiceIsPlaying() ? 1 : 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