aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter van Niftrik2009-05-23 01:41:09 +0000
committerWalter van Niftrik2009-05-23 01:41:09 +0000
commit248f415face22b2def45e84630dac66fb407aad9 (patch)
tree0ec8661122f5967d77b4a2819007610e207943d2
parent82b9cf95753df845c26ddfcf7bab6e0b5c0ee805 (diff)
downloadscummvm-rg350-248f415face22b2def45e84630dac66fb407aad9.tar.gz
scummvm-rg350-248f415face22b2def45e84630dac66fb407aad9.tar.bz2
scummvm-rg350-248f415face22b2def45e84630dac66fb407aad9.zip
SCI: Added partial support for SCI1.1 adlib music
svn-id: r40800
-rw-r--r--engines/sci/sfx/softseq/adlib.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/sci/sfx/softseq/adlib.cpp b/engines/sci/sfx/softseq/adlib.cpp
index fa075e0055..778903cb6d 100644
--- a/engines/sci/sfx/softseq/adlib.cpp
+++ b/engines/sci/sfx/softseq/adlib.cpp
@@ -124,6 +124,10 @@ void MidiDriver_Adlib::send(uint32 b) {
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 @@ int MidiPlayer_Adlib::open(ResourceManager *resmgr) {
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 @@ int MidiPlayer_Adlib::open(ResourceManager *resmgr) {
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);
}