From: <sag...@us...> - 2012-05-25 20:44:05
|
Revision: 1283 http://modplug.svn.sourceforge.net/modplug/?rev=1283&view=rev Author: saga-games Date: 2012-05-25 20:43:57 +0000 (Fri, 25 May 2012) Log Message: ----------- [Fix] XM Compatibility: Set Finetune should now work properly. Set Finetune for MOD is now also "almost" fixed. Modified Paths: -------------- trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-05-25 18:04:20 UTC (rev 1282) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-05-25 20:43:57 UTC (rev 1283) @@ -864,8 +864,13 @@ pChn->nFineTune = 0; } else { - pChn->nC5Speed = pSmp->nC5Speed; - pChn->nFineTune = pSmp->nFineTune; + if((!bPorta && GetType() == MOD_TYPE_XM) + || (pChn->rowCommand.instr != 0 && GetType() == MOD_TYPE_MOD) + || !(GetType() & (MOD_TYPE_MOD | MOD_TYPE_XM))) + { + pChn->nC5Speed = pSmp->nC5Speed; + pChn->nFineTune = pSmp->nFineTune; + } } @@ -965,7 +970,7 @@ } } - if ((!bPorta) && (GetType() & (MOD_TYPE_XM|MOD_TYPE_MED|MOD_TYPE_MT2))) + if (!bPorta && (GetType() & (MOD_TYPE_XM | MOD_TYPE_MED | MOD_TYPE_MT2))) { if (pSmp) { @@ -3121,13 +3126,28 @@ // E4x: Set Vibrato WaveForm case 0x40: pChn->nVibratoType = param & 0x07; break; // E5x: Set FineTune - case 0x50: if(!(m_dwSongFlags & SONG_FIRSTTICK)) break; - pChn->nC5Speed = S3MFineTuneTable[param]; - if (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)) - pChn->nFineTune = param*2; + case 0x50: if(!(m_dwSongFlags & SONG_FIRSTTICK)) + { + break; + } + if(GetType() == MOD_TYPE_MOD) + { + pChn->nFineTune = MOD2XMFineTune(param); + if(pChn->nPeriod && pChn->rowCommand.IsNote()) pChn->nPeriod = GetPeriodFromNote(pChn->nNote, pChn->nFineTune, pChn->nC5Speed); + } else if(pChn->rowCommand.IsNote()) + { + pChn->nFineTune = MOD2XMFineTune(param - 8); + if(pChn->nPeriod) pChn->nPeriod = GetPeriodFromNote(pChn->nNote, pChn->nFineTune, pChn->nC5Speed); + + } + + + /*if(!(m_dwSongFlags & SONG_FIRSTTICK) || !pChn->rowCommand.IsNote()) break; + if((GetType() & MOD_TYPE_MOD)) + pChn->nFineTune = MOD2XMFineTune(param); else - pChn->nFineTune = MOD2XMFineTune(param); - if (pChn->nPeriod) pChn->nPeriod = GetPeriodFromNote(pChn->nNote, pChn->nFineTune, pChn->nC5Speed); + pChn->nFineTune = MOD2XMFineTune(param - 8); + if (pChn->nPeriod) pChn->nPeriod = GetPeriodFromNote(pChn->nNote, pChn->nFineTune, pChn->nC5Speed);*/ break; // E6x: Pattern Loop // E7x: Set Tremolo WaveForm This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |