[Scummvm-cvs-logs] SF.net SVN: scummvm:[51482] scummvm/trunk/engines/sci

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Thu Jul 29 23:12:16 CEST 2010


Revision: 51482
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51482&view=rev
Author:   m_kiewitz
Date:     2010-07-29 21:12:16 +0000 (Thu, 29 Jul 2010)

Log Message:
-----------
SCI: midi hold behaviour fixed

we shouldnt react on hold midi data when no actual hold was called, fixes eq2/amulet problem (bug #3035392)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/sound/music.cpp
    scummvm/trunk/engines/sci/sound/music.h

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-29 21:09:47 UTC (rev 51481)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2010-07-29 21:12:16 UTC (rev 51482)
@@ -652,6 +652,14 @@
 
 bool Kernel::debugSetFunctionLogging(const char *kernelName, bool logging) {
 	if (strcmp(kernelName, "*")) {
+		const char *kernelSubName = strchr(kernelName, '(');
+		uint kernelSubNameLen = 0;
+		if (kernelSubName) {
+			kernelSubName++;
+			kernelSubNameLen = strlen(kernelSubName);
+			if ((!kernelSubNameLen) || (kernelSubName[kernelSubNameLen - 1] != ')'))
+				return false;
+		}
 		for (uint id = 0; id < _kernelFuncs.size(); id++) {
 			if (_kernelFuncs[id].name) {
 				if (!_kernelFuncs[id].subFunctions) {
@@ -662,7 +670,15 @@
 					}
 				} else {
 					// Sub-Functions available
-					// TODO: do this
+					if (kernelSubName) {
+						KernelSubFunction *kernelSubCall = _kernelFuncs[id].subFunctions;
+						uint kernelSubCallCount = _kernelFuncs[id].subFunctionCount;
+						for (uint subId = 0; subId < kernelSubCallCount; subId++) {
+							if (kernelSubCall->function)
+								kernelSubCall->debugLogging = logging;
+							kernelSubCall++;
+						}
+					}
 				}
 			}
 		}

Modified: scummvm/trunk/engines/sci/sound/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/music.cpp	2010-07-29 21:09:47 UTC (rev 51481)
+++ scummvm/trunk/engines/sci/sound/music.cpp	2010-07-29 21:12:16 UTC (rev 51482)
@@ -598,7 +598,7 @@
 	priority = 0;
 	loop = 0;
 	volume = MUSIC_VOLUME_DEFAULT;
-	hold = 0;
+	hold = -1;
 
 	pauseCounter = 0;
 	sampleLoopCounter = 0;

Modified: scummvm/trunk/engines/sci/sound/music.h
===================================================================
--- scummvm/trunk/engines/sci/sound/music.h	2010-07-29 21:09:47 UTC (rev 51481)
+++ scummvm/trunk/engines/sci/sound/music.h	2010-07-29 21:12:16 UTC (rev 51482)
@@ -71,7 +71,7 @@
 	byte priority;
 	uint16 loop;
 	int16 volume;
-	byte hold;
+	int16 hold;
 
 	int16 pauseCounter;
 	uint sampleLoopCounter;


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