Skip to content

Commit

Permalink
[Imp] IT: Like our fix for old (Open)MPT versions, clamp the Vxx para…
Browse files Browse the repository at this point in the history
…meter to V80 for files made with old Schism Tracker versions (see schismtracker/schismtracker#531).

git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@21769 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Sep 30, 2024
1 parent f2f7f8d commit 026e700
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions soundlib/Load_it.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,10 @@ bool CSoundFile::ReadIT(FileReader &file, ModLoadingFlags loadFlags)
// Example: ckbounce.it
lastValue[ch].command = m.command;
lastValue[ch].param = m.param;
// Fix handling of commands V81-VFF in ITs made with old Schism Tracker versions
// (fixed in https://github.com/schismtracker/schismtracker/commit/ab5517d4730d4c717f7ebffb401445679bd30888 - one of the last versions to identify as v0.50)
if(m.command == CMD_GLOBALVOLUME && m.param > 0x80 && fileHeader.cwtv >= 0x1000 && fileHeader.cwtv <= 0x1050)
m.param = 0x80;
}
}
}
Expand Down

0 comments on commit 026e700

Please sign in to comment.