patch attempts to fix the MI2 music bug pointed out in bug report #551028

svn-id: r4908
This commit is contained in:
Jean-Yves Simon 2002-09-09 05:03:55 +00:00
parent c7eff375c5
commit 5b8eb34406
2 changed files with 13 additions and 3 deletions

View File

@ -25,15 +25,15 @@ OBJS =
# Enable this if you want ScummVM to dump all scripts it runs.
# This is mainly interesting for developers.
# DEFINES += -DDUMP_SCRIPTS
DEFINES += -DDUMP_SCRIPTS
# Uncomment this to activate the MAD lib for compressed sound files
DEFINES += -DCOMPRESSED_SOUND_FILE
LIBS += -lmad
# Uncomment this to activate the ALSA lib for midi
# DEFINES += -DUSE_ALSA
# LIBS += -lasound
DEFINES += -DUSE_ALSA
LIBS += -lasound
# Concat DEFINES and INCLUDES to for the CPPFLAGS
CPPFLAGS= $(DEFINES) $(INCLUDES)

View File

@ -2061,6 +2061,16 @@ void Player::parse_sysex(byte *p, uint len)
len -= 2;
switch (code = *p++) {
case 0: /* part on/off? */
// This seems to do the right thing for Monkey 2, at least.
a = *p++ & 0x0F;
part = get_part(a);
if (part) {
debug(2, "%d => turning %s part %d", p[1], (p[1] == 2) ? "OFF" : "ON", a);
part->set_onoff(p[1] != 2);
}
break;
case 16: /* set instrument in part */
a = *p++ & 0x0F;
if (_se->_hardware_type != *p++)