From: <sag...@us...> - 2010-10-25 19:28:22
|
Revision: 751 http://modplug.svn.sourceforge.net/modplug/?rev=751&view=rev Author: saga-games Date: 2010-10-25 19:28:16 +0000 (Mon, 25 Oct 2010) Log Message: ----------- [Fix] XM compatibility: Portamento combined with an Offset command results in the offset command being ignored. I have commented out some code related to Offset that didn't make sense at all, but left a debug assertion there, in case it *did* make sense (which I doubt) Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-10-23 13:59:13 UTC (rev 750) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-10-25 19:28:16 UTC (rev 751) @@ -3334,12 +3334,22 @@ } // -! NEW_FEATURE#0010 - if ((pChn->nRowNote) && (pChn->nRowNote < 0x80)) + if ((pChn->nRowNote >= NOTE_MIN) && (pChn->nRowNote <= NOTE_MAX)) { - if (bPorta) + /* if (bPorta) pChn->nPos = param; else - pChn->nPos += param; + pChn->nPos += param; */ + // The code above doesn't make sense at all. If there's a note and no porta, how on earth could nPos be something else than 0? + // Anyway, keeping a debug assert here, just in case... + ASSERT(bPorta || pChn->nPos == 0); + + // XM compatibility: Portamento + Offset = Ignore offset + if(bPorta && IsCompatibleMode(TRK_FASTTRACKER2)) + { + return; + } + if (pChn->nPos >= pChn->nLength) { // Offset beyond sample size This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |