[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.93,2.94 imuse_player.cpp,2.29,2.30 scummvm.cpp,2.392,2.393 sound.cpp,1.252,1.253
Jamieson Christian
jamieson630 at users.sourceforge.net
Tue Sep 16 04:45:09 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv2668
Modified Files:
imuse.cpp imuse_player.cpp scummvm.cpp sound.cpp
Log Message:
Partial fix for Bug [636985] ZAK256: No kazoo tune
Implemented a parser for Euphony music. No
FM instrument support yet, as the FM chip used
by FM Towns is not being emulated yet. In the
meantime, a stock FM-emulated GM instrument is
being used instead.
This at least makes the Zak Towns kazoo tune
and the Loom Towns distaff audible. Emulation
of the FM Towns synth chip, or suitable
emulation using the OPL2 synth, is still
under investigation.
Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 2.93
retrieving revision 2.94
diff -u -d -r2.93 -r2.94
--- imuse.cpp 15 Sep 2003 21:35:30 -0000 2.93
+++ imuse.cpp 16 Sep 2003 11:44:47 -0000 2.94
@@ -88,6 +88,8 @@
// Check for old-style headers first, like 'RO'
if (ptr[4] == 'R' && ptr[5] == 'O'&& ptr[6] != 'L')
return ptr + 4;
+ if (ptr[8] == 'S' && ptr[9] == 'O')
+ return ptr + 8;
ptr += 8;
size = READ_BE_UINT32(ptr);
@@ -134,9 +136,12 @@
return false;
}
- // Check old style headers, like 'RO'
+ // Old style 'RO' has equivalent properties to 'ROL'
if (ptr[4] == 'R' && ptr[5] == 'O')
return true;
+ // Euphony tracks show as 'SO' and have equivalent properties to 'ADL'
+ if (ptr[8] == 'S' && ptr[9] == 'O')
+ return false;
return false;
}
@@ -170,8 +175,12 @@
return false;
}
- // Check old style headers, like 'RO'
+ // Old style 'RO' has equivalent properties to 'ROL'
if (ptr[4] == 'R' && ptr[5] == 'O')
+ return true;
+ // Euphony tracks show as 'SO' and have equivalent properties to 'ADL'
+ // FIXME: Right now we're pretending it's GM.
+ if (ptr[8] == 'S' && ptr[9] == 'O')
return true;
return false;
Index: imuse_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_player.cpp,v
retrieving revision 2.29
retrieving revision 2.30
diff -u -d -r2.29 -r2.30
--- imuse_player.cpp 7 Sep 2003 17:14:56 -0000 2.29
+++ imuse_player.cpp 16 Sep 2003 11:44:48 -0000 2.30
@@ -39,6 +39,7 @@
////////////////////////////////////////
extern MidiParser *MidiParser_createRO();
+extern MidiParser *MidiParser_createEUP();
static uint read_word(byte *a) {
return (a[0] << 8) + a[1];
@@ -186,6 +187,9 @@
if (!memcmp (ptr, "RO", 2)) {
// Old style 'RO' resource
_parser = MidiParser_createRO();
+ } else if (!memcmp (ptr, "SO", 2)) {
+ // Euphony (FM Towns) resource
+ _parser = MidiParser_createEUP();
} else if (!memcmp(ptr, "FORM", 4)) {
// Humongous Games XMIDI resource
_parser = MidiParser::createParser_XMIDI();
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.392
retrieving revision 2.393
diff -u -d -r2.392 -r2.393
--- scummvm.cpp 14 Sep 2003 22:46:47 -0000 2.392
+++ scummvm.cpp 16 Sep 2003 11:44:48 -0000 2.393
@@ -91,11 +91,11 @@
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
{"indy3", "Indiana Jones and the Last Crusade (256)", GID_INDY3, 3, MDT_PCSPK | MDT_ADLIB,
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_FEW_LOCALS, "00.LFL"},
- {"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, MDT_PCSPK,
+ {"zak256", "Zak McKracken and the Alien Mindbenders (256)", GID_ZAK256, 3, MDT_ADLIB,
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
{"loom", "Loom", GID_LOOM, 3, MDT_PCSPK | MDT_ADLIB | MDT_NATIVE,
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_USE_KEY | GF_16COLOR | GF_OLD_BUNDLE, "00.LFL"},
- {"loomTowns", "Loom (FM Towns)", GID_LOOM, 3, MDT_NONE,
+ {"loomTowns", "Loom (FM Towns)", GID_LOOM, 3, MDT_ADLIB,
GF_SMALL_HEADER | GF_SMALL_NAMES | GF_NO_SCALING | GF_OLD256 | GF_FMTOWNS | GF_AUDIOTRACKS, "00.LFL"},
/* Scumm Version 4 */
@@ -723,7 +723,7 @@
_imuse->property(IMuse::PROP_OLD_ADLIB_INSTRUMENTS, (_features & GF_SMALL_HEADER) ? 1 : 0);
_imuse->property(IMuse::PROP_MULTI_MIDI, detector->_multi_midi && _midiDriver != MD_NULL);
_imuse->property(IMuse::PROP_NATIVE_MT32, detector->_native_mt32);
- if (_features & GF_HUMONGOUS) {
+ if (_features & GF_HUMONGOUS || _features & GF_FMTOWNS) {
_imuse->property(IMuse::PROP_LIMIT_PLAYERS, 1);
_imuse->property(IMuse::PROP_RECYCLE_PLAYERS, 1);
}
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -r1.252 -r1.253
--- sound.cpp 15 Sep 2003 19:48:54 -0000 1.252
+++ sound.cpp 16 Sep 2003 11:44:48 -0000 1.253
@@ -384,23 +384,8 @@
}
case 1: { // Music (Euphony format)
- int numInstruments = *(ptr + 0x14);
- int tuneSize = 0, tempo = 0;
-
- ptr += (0x16 + (numInstruments * 48)); // Skip instrument definitions
- ptr += (32*4); // Skip preset values (mute, channel, volume, transpose)
- ptr += 8; // (Unknown)
-
- ptr += 6; // Instrument channel's. Always 6 bytes according to the disassembly.
-
- tuneSize = READ_LE_UINT32(ptr);
- ptr += 5;
-
- tempo = *ptr++;
- ptr += 2;
- // Music data begins here
-
- warning("Euphony tune #%d unsupported", soundID);
+ if (_scumm->_musicEngine)
+ _scumm->_musicEngine->startSound (soundID);
break;
}
More information about the Scummvm-git-logs
mailing list