From: <sag...@us...> - 2012-06-30 23:41:42
|
Revision: 1312 http://modplug.svn.sourceforge.net/modplug/?rev=1312&view=rev Author: saga-games Date: 2012-06-30 23:41:35 +0000 (Sat, 30 Jun 2012) Log Message: ----------- [Fix] FT2 compatibility: Fixed gxx memory (tx coda) as well as combinations of gxx and Gxx. Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-06-30 18:26:37 UTC (rev 1311) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-06-30 23:41:35 UTC (rev 1312) @@ -1926,10 +1926,23 @@ { if (volcmd == VOLCMD_TONEPORTAMENTO) { - if (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) - TonePortamento(pChn, ImpulseTrackerPortaVolCmd[vol & 0x0F]); - else if(vol != 0 || !IsCompatibleMode(TRK_FASTTRACKER2)) - TonePortamento(pChn, vol * 16); + UINT param = 0; + if(GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT)) + { + param = ImpulseTrackerPortaVolCmd[vol & 0x0F]; + } else + { + if(cmd == CMD_TONEPORTAMENTO && GetType() == MOD_TYPE_XM) + { + // Yes, FT2 is *that* weird. If there is a Mx command in the volume column + // and a normal 3xx command, the 3xx command is ignored but the Mx command's + // effectiveness is doubled. + cmd = CMD_NONE; + vol *= 2; + } + param = vol << 4; + } + TonePortamento(pChn, param); } else { // XM Compatibility: FT2 ignores some volume commands with parameter = 0. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |