From: <sag...@us...> - 2014-04-22 17:13:31
|
Revision: 4017 http://sourceforge.net/p/modplug/code/4017 Author: saga-games Date: 2014-04-22 17:13:25 +0000 (Tue, 22 Apr 2014) Log Message: ----------- [Imp] Add protracker-style offset when note but no instrument number is specified in PT1.x mode (fixes h0ffman's Revision 2014 tracked music entry) Revision Links: -------------- http://sourceforge.net/p/modplug/code/2014 Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2014-04-22 15:56:51 UTC (rev 4016) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2014-04-22 17:13:25 UTC (rev 4017) @@ -1325,6 +1325,10 @@ pChn->nLoopStart = 0; pChn->nPos = 0; pChn->nPosLo = 0; + if(m_SongFlags[SONG_PT1XMODE] && !pChn->rowCommand.instr) + { + pChn->nPos = (pChn->nOldHiOffset << 16) + (pChn->nOldOffset << 8); + } pChn->dwFlags = (pChn->dwFlags & CHN_CHANNELFLAGS) | (static_cast<ChannelFlags>(pSmp->uFlags) & CHN_SAMPLEFLAGS); if(pChn->dwFlags[CHN_SUSTAINLOOP]) { @@ -4403,7 +4407,7 @@ if (pChn->nPos >= pChn->nLength) { // Offset beyond sample size - if (!(GetType() & (MOD_TYPE_XM|MOD_TYPE_MT2))) + if (!(GetType() & (MOD_TYPE_XM|MOD_TYPE_MT2|MOD_TYPE_MOD))) { // IT Compatibility: Offset if(IsCompatibleMode(TRK_IMPULSETRACKER)) @@ -5092,7 +5096,13 @@ nChn = channel.nMasterChn - 1; } - nPlugin = ChnSettings[nChn].nMixPlugin; + if(nChn < MAX_BASECHANNELS) + { + nPlugin = ChnSettings[nChn].nMixPlugin; + } else + { + nPlugin = 0; + } } return nPlugin; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |