From abbd29b16ab8f4c893415c630bb529b0e4c194ab Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 10 Jul 2011 05:21:25 +0200 Subject: SCUMM: Limit iMuse default instrument load to PC Speaker output. Albeit the code is marked as a hack inside the source, the original behaved exaclty the same. If the code is removed the PC Speaker output will miss notes, since unlike the original we only output to parts, which have an instrument set up. --- engines/scumm/imuse/imuse.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'engines/scumm/imuse/imuse.cpp') diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp index 961d0690d0..912ab71420 100644 --- a/engines/scumm/imuse/imuse.cpp +++ b/engines/scumm/imuse/imuse.cpp @@ -64,7 +64,8 @@ _queue_cleared(0), _master_volume(0), _music_volume(0), _trigger_count(0), -_snm_trigger_index(0) { +_snm_trigger_index(0), +_pcSpeaker(false) { memset(_channel_volume,0,sizeof(_channel_volume)); memset(_channel_volume_eff,0,sizeof(_channel_volume_eff)); memset(_volchan_table,0,sizeof(_volchan_table)); @@ -467,6 +468,10 @@ uint32 IMuseInternal::property(int prop, uint32 value) { case IMuse::PROP_GAME_ID: _game_id = value; break; + + case IMuse::PROP_PC_SPEAKER: + _pcSpeaker = (value != 0); + break; } return 0; @@ -1670,20 +1675,20 @@ void IMuseInternal::reallocateMidiChannels(MidiDriver *midi) { void IMuseInternal::setGlobalAdLibInstrument(byte slot, byte *data) { if (slot < 32) { - _global_adlib_instruments[slot].adlib(data); + _global_instruments[slot].adlib(data); } } void IMuseInternal::setGlobalPcSpkInstrument(byte slot, byte *data) { if (slot < 32) { - _global_adlib_instruments[slot].pcspk(data); + _global_instruments[slot].pcspk(data); } } -void IMuseInternal::copyGlobalAdLibInstrument(byte slot, Instrument *dest) { +void IMuseInternal::copyGlobalInstrument(byte slot, Instrument *dest) { if (slot >= 32) return; - _global_adlib_instruments[slot].copy_to(dest); + _global_instruments[slot].copy_to(dest); } -- cgit v1.2.3