[Scummvm-cvs-logs] SF.net SVN: scummvm:[44166] scummvm/branches/branch-1-0-0/engines/kyra/ script_hof.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Sep 17 18:12:00 CEST 2009


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

Log Message:
-----------
Backport workaround for Nintendo DS in o2_isAnySoundPlaying.

Modified Paths:
--------------
    scummvm/branches/branch-1-0-0/engines/kyra/script_hof.cpp

Modified: scummvm/branches/branch-1-0-0/engines/kyra/script_hof.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/kyra/script_hof.cpp	2009-09-17 16:08:27 UTC (rev 44165)
+++ scummvm/branches/branch-1-0-0/engines/kyra/script_hof.cpp	2009-09-17 16:11:57 UTC (rev 44166)
@@ -745,6 +745,22 @@
 
 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 Nintendo 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.
+#ifndef __DS__
+	if (_currentScene == 16 && _currentChapter == 1)
+#endif
+		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