aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/imuse/imuse.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2011-07-10 05:21:25 +0200
committerJohannes Schickel2011-07-10 05:21:25 +0200
commitabbd29b16ab8f4c893415c630bb529b0e4c194ab (patch)
treee6909f45f3a19fbb7ab369c0ff0463a4aead63ca /engines/scumm/imuse/imuse.cpp
parent0a94fc5b7bed22f846f2d28797107496454b0ecb (diff)
downloadscummvm-rg350-abbd29b16ab8f4c893415c630bb529b0e4c194ab.tar.gz
scummvm-rg350-abbd29b16ab8f4c893415c630bb529b0e4c194ab.tar.bz2
scummvm-rg350-abbd29b16ab8f4c893415c630bb529b0e4c194ab.zip
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.
Diffstat (limited to 'engines/scumm/imuse/imuse.cpp')
-rw-r--r--engines/scumm/imuse/imuse.cpp15
1 files changed, 10 insertions, 5 deletions
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);
}