From 45e5a204c6d94911844f35e7ecd7071049b32267 Mon Sep 17 00:00:00 2001 From: Johannes Schultz Date: Mon, 30 Sep 2024 16:55:34 +0000 Subject: [PATCH] Merged revision(s) 21769 from trunk/OpenMPT: [Imp] IT: Like our fix for old (Open)MPT versions, clamp the Vxx parameter to V80 for files made with old Schism Tracker versions (see https://github.com/schismtracker/schismtracker/issues/531). ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@21770 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- soundlib/Load_it.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/soundlib/Load_it.cpp b/soundlib/Load_it.cpp index 359eb3c250a..32b98624d65 100644 --- a/soundlib/Load_it.cpp +++ b/soundlib/Load_it.cpp @@ -1143,6 +1143,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; } } }