aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2012-11-22 17:28:31 -0800
committerJohannes Schickel2012-11-22 17:28:31 -0800
commit7c2f5e2d0e1df26de3d18e12d1cf644fb80f20e6 (patch)
tree78238b035f22b202348eaff3e1ddf4848b9a3c0d /engines
parent0da424efb6cf105b9fb5e4a0ae259a63a9d7b1e1 (diff)
parent1f69192f7d187ad3948e89f85913df5617306c10 (diff)
downloadscummvm-rg350-7c2f5e2d0e1df26de3d18e12d1cf644fb80f20e6.tar.gz
scummvm-rg350-7c2f5e2d0e1df26de3d18e12d1cf644fb80f20e6.tar.bz2
scummvm-rg350-7c2f5e2d0e1df26de3d18e12d1cf644fb80f20e6.zip
Merge pull request #283 from lordhoto/scumm-opl3
SCUMM: Support OPL3 in Sam&Max
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/imuse/imuse_part.cpp15
-rw-r--r--engines/scumm/scumm.cpp2
2 files changed, 15 insertions, 2 deletions
diff --git a/engines/scumm/imuse/imuse_part.cpp b/engines/scumm/imuse/imuse_part.cpp
index 89c16a8bb5..5e928f3d44 100644
--- a/engines/scumm/imuse/imuse_part.cpp
+++ b/engines/scumm/imuse/imuse_part.cpp
@@ -111,8 +111,19 @@ void Part::saveLoadWithSerializer(Serializer *ser) {
}
void Part::set_detune(int8 detune) {
- _detune_eff = clamp((_detune = detune) + _player->getDetune(), -128, 127);
- sendPitchBend();
+ // Sam&Max does not have detune, so we just ignore this here. We still get
+ // this called, since Sam&Max uses the same controller for a different
+ // purpose.
+ if (_se->_game_id == GID_SAMNMAX) {
+#if 0
+ if (_mc) {
+ _mc->controlChange(17, detune + 0x40);
+ }
+#endif
+ } else {
+ _detune_eff = clamp((_detune = detune) + _player->getDetune(), -128, 127);
+ sendPitchBend();
+ }
}
void Part::pitchBend(int16 value) {
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 2c79fb8de0..6a4fe238a1 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1858,6 +1858,8 @@ void ScummEngine::setupMusic(int midi) {
if (_sound->_musicType == MDT_ADLIB || _sound->_musicType == MDT_TOWNS || multi_midi) {
adlibMidiDriver = MidiDriver::createMidi(MidiDriver::detectDevice(_sound->_musicType == MDT_TOWNS ? MDT_TOWNS : MDT_ADLIB));
adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_game.features & GF_SMALL_HEADER) ? 1 : 0);
+ // Try to use OPL3 mode for Sam&Max when possible.
+ adlibMidiDriver->property(MidiDriver::PROP_SCUMM_OPL3, (_game.id == GID_SAMNMAX) ? 1 : 0);
} else if (_sound->_musicType == MDT_PCSPK) {
adlibMidiDriver = new PcSpkDriver(_mixer);
}