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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue May 27 23:04:27 CEST 2008


Revision: 32330
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32330&view=rev
Author:   lordhoto
Date:     2008-05-27 14:04:27 -0700 (Tue, 27 May 2008)

Log Message:
-----------
Fixed KyraEngine_v1::snd_stopVoice and KyraEngine_v1::snd_voiceIsPlaying implementations.

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

Modified: scummvm/trunk/engines/kyra/script_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_hof.cpp	2008-05-27 20:15:36 UTC (rev 32329)
+++ scummvm/trunk/engines/kyra/script_hof.cpp	2008-05-27 21:04:27 UTC (rev 32330)
@@ -760,7 +760,7 @@
 
 int KyraEngine_HoF::o2_isAnySoundPlaying(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_isAnySoundPlaying(%p) ()", (const void *)script);
-	return _sound->voiceIsPlaying();
+	return _sound->voiceIsPlaying() ? 1 : 0;
 }
 
 int KyraEngine_HoF::o2_setDrawNoShapeFlag(EMCState *script) {

Modified: scummvm/trunk/engines/kyra/sound.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound.cpp	2008-05-27 20:15:36 UTC (rev 32329)
+++ scummvm/trunk/engines/kyra/sound.cpp	2008-05-27 21:04:27 UTC (rev 32330)
@@ -538,12 +538,15 @@
 
 void KyraEngine_v1::snd_stopVoice() {
 	debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_stopVoice()");
-	_sound->voiceStop(_speechFile.empty() ? 0 : _speechFile.c_str());
+	if (!_speechFile.empty()) {
+		_sound->voiceStop(_speechFile.c_str());
+		_speechFile.clear();
+	}
 }
 
 bool KyraEngine_v1::snd_voiceIsPlaying() {
 	debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_voiceIsPlaying()");
-	return _sound->voiceIsPlaying(_speechFile.empty() ? 0 : _speechFile.c_str());
+	return _speechFile.empty() ? false : _sound->voiceIsPlaying(_speechFile.c_str());
 }
 
 // static res


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