- fixed: The MUS precacher did not handle invalid patches well.

- increased the valid range of patch values for MUS. According to the original MIDI2MUS code it can handle numbers up to 188, not 181, and at least one track from Eternal Doom uses #183.
This commit is contained in:
Christoph Oelckers 2015-12-31 14:35:34 +01:00
parent c88ed426a8
commit 1316120fe4

View file

@ -223,10 +223,17 @@ void MUSSong2::Precache()
{
val = instr;
}
else if (instr >= 135 && instr <= 181)
else if (instr >= 135 && instr <= 188)
{ // Percussions are 100-based, not 128-based, eh?
val = instr - 100 + (1 << 14);
}
else
{
// skip it.
val = used[k++];
k += val;
continue;
}
int numbanks = used[k++];
if (numbanks > 0)