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

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Sat Apr 4 14:56:49 CEST 2009


Revision: 39836
          http://scummvm.svn.sourceforge.net/scummvm/?rev=39836&view=rev
Author:   athrxx
Date:     2009-04-04 12:56:49 +0000 (Sat, 04 Apr 2009)

Log Message:
-----------
LOL: - minor sfx bug fix

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

Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp	2009-04-04 10:10:15 UTC (rev 39835)
+++ scummvm/trunk/engines/kyra/lol.cpp	2009-04-04 12:56:49 UTC (rev 39836)
@@ -1548,15 +1548,21 @@
 
 	if (volIndex > 0)
 		volume = (volIndex * volume) >> 8;
-	else
+	else if (volIndex < 0)
 		volume = -volIndex;
 
 	// volume TODO
 	volume = 254 - volume;
 
 	int16 vocIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
-	if (vocIndex != -1
-) {
+
+	bool hasVocFile = false;
+	if (vocIndex != -1) {
+		if (scumm_stricmp(_ingameSoundList[vocIndex], "EMPTY"))
+			hasVocFile = true;
+	}
+
+	if (hasVocFile) {
 		_sound->voicePlay(_ingameSoundList[vocIndex], volume & 0xff, true);
 	} else if (_flags.platform == Common::kPlatformPC) {
 		if (_sound->getSfxType() == Sound::kMidiMT32)

Modified: scummvm/trunk/engines/kyra/script_lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_lol.cpp	2009-04-04 10:10:15 UTC (rev 39835)
+++ scummvm/trunk/engines/kyra/script_lol.cpp	2009-04-04 12:56:49 UTC (rev 39836)
@@ -1023,7 +1023,7 @@
 
 int LoLEngine::olol_playSoundEffect(EMCState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "LoLEngine::olol_playSoundEffect(%p) (%d)", (const void *)script, stackPos(0));
-	snd_playSoundEffect(stackPos(0), 255);
+	snd_playSoundEffect(stackPos(0), -1);
 	return 1;
 }
 


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