From: <sag...@us...> - 2014-02-05 22:15:47
|
Revision: 3665 http://sourceforge.net/p/modplug/code/3665 Author: saga-games Date: 2014-02-05 22:15:39 +0000 (Wed, 05 Feb 2014) Log Message: ----------- [Fix] FT2 compatibility: Super mind-boggling combination of portamento and note-delay (PortaDelay.xm) Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2014-02-05 21:18:59 UTC (rev 3664) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2014-02-05 22:15:39 UTC (rev 3665) @@ -1718,12 +1718,6 @@ } } continue; - } else if(nStartTick >= m_nMusicSpeed && IsCompatibleMode(TRK_FASTTRACKER2)) - { - // FT2 compatibility: Note delays greater than the song speed should be ignored. - // However, EEx pattern delay is *not* considered at all. - // Test case: DelayCombination.xm - continue; } } else if(m_SongFlags[SONG_FIRSTTICK]) { @@ -1781,11 +1775,17 @@ } bool triggerNote = (m_nTickCount == nStartTick); // Can be delayed by a note delay effect - // IT compatibility: Delayed notes (using SDx) that are on the same row as a Row Delay effect are retriggered. Scream Tracker 3 does the same. - // Test case: PatternDelay-NoteDelay.it if((GetType() & (MOD_TYPE_S3M | MOD_TYPE_IT | MOD_TYPE_MPT)) && nStartTick > 0 && (m_nTickCount % (m_nMusicSpeed + m_nFrameDelay)) == nStartTick) { + // IT compatibility: Delayed notes (using SDx) that are on the same row as a Row Delay effect are retriggered. Scream Tracker 3 does the same. + // Test case: PatternDelay-NoteDelay.it triggerNote = true; + } else if(IsCompatibleMode(TRK_FASTTRACKER2) && nStartTick >= m_nMusicSpeed) + { + // FT2 compatibility: Note delays greater than the song speed should be ignored. + // However, EEx pattern delay is *not* considered at all. + // Test case: DelayCombination.xm, PortaDelay.xm + triggerNote = false; } // IT compatibility: Tick-0 vs non-tick-0 effect distinction is always based on tick delay. @@ -1795,6 +1795,13 @@ pChn->isFirstTick = triggerNote; } + // FT2 compatibility: Note + portamento + note delay = no portamento + // Test case: PortaDelay.xm + if(IsCompatibleMode(TRK_FASTTRACKER2) && nStartTick != 0) + { + bPorta = false; + } + // Handles note/instrument/volume changes if(triggerNote) { @@ -2119,6 +2126,13 @@ vol *= 2; } param = vol << 4; + + // FT2 compatibility: If there's a portamento and a note delay, execute the portamento, but don't update the parameter + // Test case: PortaDelay.xm + if(IsCompatibleMode(TRK_FASTTRACKER2) && nStartTick != 0) + { + param = 0; + } } TonePortamento(pChn, param); } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |