[Scummvm-cvs-logs] SF.net SVN: scummvm:[40800] scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp

waltervn at users.sourceforge.net waltervn at users.sourceforge.net
Sat May 23 03:41:09 CEST 2009


Revision: 40800
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40800&view=rev
Author:   waltervn
Date:     2009-05-23 01:41:09 +0000 (Sat, 23 May 2009)

Log Message:
-----------
SCI: Added partial support for SCI1.1 adlib music

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp

Modified: scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp	2009-05-23 01:15:20 UTC (rev 40799)
+++ scummvm/trunk/engines/sci/sfx/softseq/adlib.cpp	2009-05-23 01:41:09 UTC (rev 40800)
@@ -124,6 +124,10 @@
 	byte op1 = (b >> 8) & 0xff;
 	byte op2 = (b >> 16) & 0xff;
 
+	// FIXME: Remove this hack after adding support for the rhythm channel
+	if (channel == 9)
+		return;
+
 	switch (command) {
 	case 0x80:
 		noteOff(channel, op1);
@@ -603,7 +607,7 @@
 		return -1;
 	}
 
-	if ((res->size != 1344) && (res->size != 2690)) {
+	if ((res->size != 1344) && (res->size != 2690) && (res->size != 5382)) {
 		warning("ADLIB: Unsupported patch format (%i bytes)", res->size);
 		return -1;
 	}
@@ -611,9 +615,13 @@
 	for (int i = 0; i < 48; i++)
 		_driver->sysEx(res->data + (28 * i), 28);
 
-	if (res->size == 2690)
+	if (res->size == 2690) {
 		for (int i = 48; i < 96; i++)
 			_driver->sysEx(res->data + 2 + (28 * i), 28);
+	} else if (res->size == 5382) {
+		for (int i = 48; i < 190; i++)
+			_driver->sysEx(res->data + (28 * i), 28);
+	}
 
 	return static_cast<MidiDriver_Adlib *>(_driver)->open(resmgr->_sciVersion == SCI_VERSION_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