From: <sag...@us...> - 2012-07-20 16:49:50
|
Revision: 1331 http://modplug.svn.sourceforge.net/modplug/?rev=1331&view=rev Author: saga-games Date: 2012-07-20 16:49:43 +0000 (Fri, 20 Jul 2012) Log Message: ----------- [Fix] XM compatibility: FT2 ignores any notes next to note delays if the delay is greater than the current speed (*ignoring* any pattern delays). Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-07-19 21:26:58 UTC (rev 1330) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-07-20 16:49:43 UTC (rev 1331) @@ -1590,7 +1590,7 @@ NoteCut(nChn, cutAtTick); } else if ((cmd == CMD_MODCMDEX) || (cmd == CMD_S3MCMDEX)) { - if ((!param) && (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT))) param = pChn->nOldCmdEx; else pChn->nOldCmdEx = param; + if ((!param) && (GetType() & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT))) param = pChn->nOldCmdEx; else pChn->nOldCmdEx = param; // Note Delay ? if ((param & 0xF0) == 0xD0) { @@ -1602,13 +1602,11 @@ nStartTick = 1; //ST3 ignores notes with SD0 completely else if(GetType() == MOD_TYPE_S3M) - nStartTick = UINT_MAX; - } - - // IT compatibility 08. Handling of out-of-range delay command. - // Additional test case: tickdelay.it - if(nStartTick >= GetNumTicksOnCurrentRow() && IsCompatibleMode(TRK_IMPULSETRACKER)) + continue; + } else if(nStartTick >= GetNumTicksOnCurrentRow() && IsCompatibleMode(TRK_IMPULSETRACKER)) { + // IT compatibility 08. Handling of out-of-range delay command. + // Additional test case: tickdelay.it if(instr) { if(GetNumInstruments() < 1 && instr < MAX_SAMPLES) @@ -1621,6 +1619,12 @@ } } 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]) { @@ -1738,9 +1742,7 @@ { // XM: Key-Off + Sample == Note Cut (BUT: Only if no instr number or volume effect is present!) - if(note == NOTE_KEYOFF - && ((!instr && volcmd == VOLCMD_NONE && cmd != CMD_VOLUME) || !IsCompatibleMode(TRK_FASTTRACKER2)) - && (pChn->pModInstrument == nullptr || !pChn->pModInstrument->VolEnv.dwFlags[ENV_ENABLED])) + if ((note == NOTE_KEYOFF) && ((!instr && volcmd == VOLCMD_NONE && cmd != CMD_VOLUME) || !IsCompatibleMode(TRK_FASTTRACKER2)) && ((!pChn->pModInstrument) || (!(pChn->pModInstrument->VolEnv.dwFlags & ENV_ENABLED)))) { pChn->dwFlags.set(CHN_FASTVOLRAMP); pChn->nVolume = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |