aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm.cpp
diff options
context:
space:
mode:
authorathrxx2011-05-16 23:13:33 +0200
committerWillem Jan Palenstijn2011-05-17 20:42:47 +0200
commit87571909be0c9f4c29eb1384665be064d2ee8f42 (patch)
treea21623caa7604930299e5b05d43eb8c6bf6838dd /engines/scumm/scumm.cpp
parent52d81727a3c4ee5a5737b10366951021066eda13 (diff)
parent726a7f3b1aee4abd7c1fe198cbd317664685e21f (diff)
downloadscummvm-rg350-87571909be0c9f4c29eb1384665be064d2ee8f42.tar.gz
scummvm-rg350-87571909be0c9f4c29eb1384665be064d2ee8f42.tar.bz2
scummvm-rg350-87571909be0c9f4c29eb1384665be064d2ee8f42.zip
SCUMM FM-TOWNS: iMUSE MIDI driver for INDY4/MONKEY2
- This adds an accurate imuse midi driver implementation for the FM-Towns versions of MI2 and INDY4. Until now you could only use the PC devices for these two games (which was not a real issue since the audio tracks are dedicated AdLib and MT-32 tracks anyway; for FM-Towns the AdLib music simply gets converted which is not really satisfactory). Anyway, the new driver it will sound just like when using an emulator like UNZ. - The YM2612 code was removed since it was not used anymore (except for the plugin code which was moved to a separate file). Some explanation about this: The YM2612 code was an incomplete (no instrument support, no pcm support, no proper tempo handling, etc.) implementation of the FM-Towns euphony driver which is used for some sound effects in SCUMM3 games (e.g. LOOM distaff). We do have a rather complete and accurate implementation of that driver in fmtowns_pc98\towns_euphony.cpp (used only in KYRA 1 FM-Towns at first, but also in SCUMM3 since last summer). So this is safe to be removed.
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r--engines/scumm/scumm.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 1b7f16bdca..e8dd6cb548 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1828,22 +1828,22 @@ void ScummEngine::setupMusic(int midi) {
MidiDriver *nativeMidiDriver = 0;
MidiDriver *adlibMidiDriver = 0;
- if (_musicType != MDT_ADLIB)
+ if (_musicType != MDT_ADLIB && _musicType != MDT_TOWNS)
nativeMidiDriver = MidiDriver::createMidi(dev);
if (nativeMidiDriver != NULL && _native_mt32)
nativeMidiDriver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
bool multi_midi = ConfMan.getBool("multi_midi") && _musicType != MDT_NONE && (midi & MDT_ADLIB);
- if (_musicType == MDT_ADLIB || multi_midi) {
- adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(MDT_ADLIB));
+ if (_musicType == MDT_ADLIB || MDT_TOWNS || multi_midi) {
+ adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(_musicType == MDT_TOWNS ? MDT_TOWNS : MDT_ADLIB));
adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_game.features & GF_SMALL_HEADER) ? 1 : 0);
}
_imuse = IMuse::create(_system, nativeMidiDriver, adlibMidiDriver);
if (_game.platform == Common::kPlatformFMTowns) {
- _musicEngine = _townsPlayer = new Player_Towns_v2(this, _imuse, _mixer, true);
+ _musicEngine = _townsPlayer = new Player_Towns_v2(this, _mixer, _imuse, true);
if (!_townsPlayer->init())
- error("Failed to initialize FM-Towns audio driver");
+ error("ScummEngine::setupMusic(): Failed to initialize FM-Towns audio driver");
} else {
_musicEngine = _imuse;
}
@@ -1855,7 +1855,6 @@ void ScummEngine::setupMusic(int midi) {
_imuse->property(IMuse::PROP_GAME_ID, _game.id);
if (ConfMan.hasKey("tempo"))
_imuse->property(IMuse::PROP_TEMPO_BASE, ConfMan.getInt("tempo"));
- // YM2162 driver can't handle midi->getPercussionChannel(), NULL shouldn't init MT-32/GM/GS
if (midi != MDT_NONE) {
_imuse->property(IMuse::PROP_NATIVE_MT32, _native_mt32);
if (MidiDriver::getMusicType(dev) != MT_MT32) // MT-32 Emulation shouldn't be GM/GS initialized