From: <sag...@us...> - 2010-10-15 17:59:31
|
Revision: 740 http://modplug.svn.sourceforge.net/modplug/?rev=740&view=rev Author: saga-games Date: 2010-10-15 17:59:23 +0000 (Fri, 15 Oct 2010) Log Message: ----------- [Fix] XM Compatibility: Fixing many mind-boggling EDx testcases in one sweep Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-10-15 14:52:26 UTC (rev 739) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-10-15 17:59:23 UTC (rev 740) @@ -1385,9 +1385,21 @@ } // XM: Rogue note delays cause retrig - if ((note == NOTE_NONE) && IsCompatibleMode(TRK_FASTTRACKER2) && !(m_dwSongFlags & SONG_FIRSTTICK)) + if ((note == NOTE_NONE || instr == 0) && IsCompatibleMode(TRK_FASTTRACKER2) && !(m_dwSongFlags & SONG_FIRSTTICK)) { note = pChn->nNote - pChn->nTranspose; + // Stupid HACK to retrieve the last used instrument *number* + if(instr == 0) + { + for(INSTRUMENTINDEX nIns = 1; nIns <= m_nInstruments; nIns++) + { + if(Instruments[nIns] == pChn->pModInstrument) + { + instr = nIns; + break; + } + } + } } } if ((!note) && (instr)) //Case: instrument with no note data. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |