Author: sagamusix
Date: Sat Mar 9 12:54:25 2024
New Revision: 20307
URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20307
Log:
Merged revision(s) 20305 from trunk/OpenMPT:
[Fix] IT: Allow Zxx to be used again in IT files made with older MPT versions (https://bugs.openmpt.org/view.php?id=1753).
........
Modified:
branches/OpenMPT-1.30/ (props changed)
branches/OpenMPT-1.30/soundlib/Load_it.cpp
Modified: branches/OpenMPT-1.30/soundlib/Load_it.cpp
==============================================================================
--- branches/OpenMPT-1.30/soundlib/Load_it.cpp Sat Mar 9 12:53:54 2024 (r20306)
+++ branches/OpenMPT-1.30/soundlib/Load_it.cpp Sat Mar 9 12:54:25 2024 (r20307)
@@ -702,14 +702,6 @@
m_MidiCfg.Sanitize();
}
- // Ignore MIDI data. Fixes some files like denonde.it that were made with old versions of Impulse Tracker (which didn't support Zxx filters) and have Zxx effects in the patterns.
- // Example: denonde.it by Mystical
- // Note: Do not compare against cwtv value, as IT 2.14 and 2.15 may write lower values there (see spx-visionsofthepast.it).
- if(fileHeader.cmwt < 0x0214)
- {
- m_MidiCfg.ClearZxxMacros();
- }
-
// Read pattern names: "PNAM"
FileReader patNames;
if(file.ReadMagic("PNAM"))
@@ -1277,6 +1269,17 @@
}
}
+ // Ignore MIDI data. Fixes some files like denonde.it that were made with old versions of Impulse Tracker (which didn't support Zxx filters) and have Zxx effects in the patterns.
+ // Example: denonde.it by Mystical
+ // Note: Only checking the cwtv "made with" version is not enough: spx-visionsofthepast.it has the strange combination of cwtv=2.00, cmwt=2.16
+ // Hence to be sure, we check that both values are below 2.14.
+ // Note that all ModPlug Tracker alpha versions do not support filters yet. Earlier alphas identify as cwtv=2.02, cmwt=2.00, but later alpha versions identify as IT 2.14.
+ // Apart from that, there's an unknown XM conversion tool declaring a lower comaptible version, which naturally also does not support filters, so it's okay that it is caught here.
+ if((fileHeader.cwtv < 0x0214 && fileHeader.cmwt < 0x0214) || (m_dwLastSavedWithVersion && m_dwLastSavedWithVersion <= MPT_V("1.00.00.A6")))
+ {
+ m_MidiCfg.ClearZxxMacros();
+ }
+
if(GetType() == MOD_TYPE_MPT)
{
// START - mpt specific:
|