[Scummvm-tracker] [ScummVM :: Bugs] #15152: SCUMM: MONKEY2: Wrong instruments used in MT-32 playback
ScummVM :: Bugs
trac at scummvm.org
Fri Jun 7 15:33:14 UTC 2024
#15152: SCUMM: MONKEY2: Wrong instruments used in MT-32 playback
-----------------------+------------------------------
Reporter: gabberhead | Owner: athrxx
Type: defect | Status: pending
Priority: normal | Component: Engine: SCUMM
Version: | Resolution: pending
Keywords: | Game: Monkey Island 2
-----------------------+------------------------------
Comment (by eriktorbjorn):
I'm not the original reporter, of course, but it seems to work for me. But
the condition in sysExNoDelay() looks a bit funny, and GCC warns about it:
{{{
if (_isMT32 && (!_scanning && (msg[0] == IMUSE_SYSEX_ID && msg[1] == 0) ||
msg[0] == ROLAND_SYSEX_ID))
return length >= 25 ? 70 : 20;
}}}
{{{
engines/scumm/imuse/imuse_player.cpp: In member function ‘virtual uint16
Scumm::Player::sysExNoDelay(const byte*, uint16)’:
engines/scumm/imuse/imuse_player.cpp:480:36: warning: suggest parentheses
around ‘&&’ within ‘||’ [-Wparentheses]
480 | if (_isMT32 && (!_scanning && (msg[0] == IMUSE_SYSEX_ID &&
msg[1] == 0) || msg[0] == ROLAND_SYSEX_ID))
|
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}}}
So as long as `msg[0] == ROLAND_SYSEX_ID` the whole condition will be
true, regardless of `_isMT32` and `!_scanning`, right? Was it supposed to
look like this instead?
{{{
if (_isMT32 && !_scanning && ((msg[0] == IMUSE_SYSEX_ID && msg[1] == 0) ||
msg[0] == ROLAND_SYSEX_ID))
return length >= 25 ? 70 : 20;
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/15152#comment:5>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list