From: <sag...@us...> - 2012-08-26 23:36:02
|
Revision: 1345 http://modplug.svn.sourceforge.net/modplug/?rev=1345&view=rev Author: saga-games Date: 2012-08-26 23:35:54 +0000 (Sun, 26 Aug 2012) Log Message: ----------- [Fix] IT Compatibility: Revision 1344 broke note-off + portamento handling with Compatible Gxx enabled. [Mod] OpenMPT: Version is now 1.20.02.07 Revision Links: -------------- http://modplug.svn.sourceforge.net/modplug/?rev=1344&view=rev Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-08-20 23:42:49 UTC (rev 1344) +++ trunk/OpenMPT/mptrack/version.h 2012-08-26 23:35:54 UTC (rev 1345) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 02 -#define VER_MINORMINOR 06 +#define VER_MINORMINOR 07 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-08-20 23:42:49 UTC (rev 1344) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-08-26 23:35:54 UTC (rev 1345) @@ -1107,9 +1107,9 @@ } } - // IT compatibility: Don't reset key-off flag on porta notes - // Test case: Off-Porta.it - if(IsCompatibleMode(TRK_IMPULSETRACKER) && bPorta) + // IT compatibility: Don't reset key-off flag on porta notes unless Compat Gxx is enabled + // Test case: Off-Porta.it, Off-Porta-CompatGxx.it + if(IsCompatibleMode(TRK_IMPULSETRACKER) && bPorta && !m_SongFlags[SONG_ITCOMPATGXX]) pChn->dwFlags.reset(CHN_EXTRALOUD); else pChn->dwFlags.reset(CHN_EXTRALOUD | CHN_KEYOFF); @@ -1157,13 +1157,13 @@ if (pIns->nVolSwing) { const double delta = 2 * (((double) rand()) / RAND_MAX) - 1; - pChn->nVolSwing = (LONG)std::floor(delta * (IsCompatibleMode(TRK_IMPULSETRACKER) ? pChn->nInsVol : ((pChn->nVolume + 1) / 2)) * pIns->nVolSwing / 100.0); + pChn->nVolSwing = static_cast<int32>(std::floor(delta * (IsCompatibleMode(TRK_IMPULSETRACKER) ? pChn->nInsVol : ((pChn->nVolume + 1) / 2)) * pIns->nVolSwing / 100.0)); } // Pan Swing if (pIns->nPanSwing) { const double delta = 2 * (((double) rand()) / RAND_MAX) - 1; - pChn->nPanSwing = (LONG)std::floor(delta * (IsCompatibleMode(TRK_IMPULSETRACKER) ? 4 : 1) * pIns->nPanSwing); + pChn->nPanSwing = static_cast<int32>(std::floor(delta * (IsCompatibleMode(TRK_IMPULSETRACKER) ? 4 : 1) * pIns->nPanSwing)); if(!IsCompatibleMode(TRK_IMPULSETRACKER)) { pChn->nRestorePanOnNewNote = pChn->nPan + 1; @@ -1172,15 +1172,15 @@ // Cutoff Swing if (pIns->nCutSwing) { - int d = ((LONG)pIns->nCutSwing * (LONG)((rand() & 0xFF) - 0x7F)) / 128; - pChn->nCutSwing = (signed short)((d * pChn->nCutOff + 1) / 128); + int32 d = ((int32)pIns->nCutSwing * (int32)((rand() & 0xFF) - 0x7F)) / 128; + pChn->nCutSwing = (int16)((d * pChn->nCutOff + 1) / 128); pChn->nRestoreCutoffOnNewNote = pChn->nCutOff + 1; } // Resonance Swing if (pIns->nResSwing) { - int d = ((LONG)pIns->nResSwing * (LONG)((rand() & 0xFF) - 0x7F)) / 128; - pChn->nResSwing = (signed short)((d * pChn->nResonance + 1) / 128); + int32 d = ((int32)pIns->nResSwing * (int32)((rand() & 0xFF) - 0x7F)) / 128; + pChn->nResSwing = (int16)((d * pChn->nResonance + 1) / 128); pChn->nRestoreResonanceOnNewNote = pChn->nResonance + 1; } } @@ -2902,7 +2902,7 @@ { if (pChn->nPeriod < pChn->nPortamentoDest) { - LONG delta = (int)pChn->nPortamentoSlide; + int32 delta = pChn->nPortamentoSlide; if(m_SongFlags[SONG_LINEARSLIDES] && !(GetType() & (MOD_TYPE_XM | MOD_TYPE_MT2))) { UINT n = pChn->nPortamentoSlide >> 2; @@ -2917,7 +2917,7 @@ } else if (pChn->nPeriod > pChn->nPortamentoDest) { - LONG delta = - (int)pChn->nPortamentoSlide; + int32 delta = -pChn->nPortamentoSlide; if(m_SongFlags[SONG_LINEARSLIDES] && !(GetType() & (MOD_TYPE_XM|MOD_TYPE_MT2))) { UINT n = pChn->nPortamentoSlide >> 2; @@ -3043,7 +3043,6 @@ void CSoundFile::PanningSlide(ModChannel *pChn, UINT param) //--------------------------------------------------------- { - LONG nPanSlide = 0; if (param) pChn->nOldPanSlide = param; else @@ -3061,6 +3060,8 @@ } } + int32 nPanSlide = 0; + if (GetType() & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT|MOD_TYPE_STM)) { if (((param & 0x0F) == 0x0F) && (param & 0xF0)) @@ -4032,7 +4033,7 @@ pChn->dwFlags.set(CHN_FASTVOLRAMP); } UINT nNote = pChn->nNewNote; - LONG nOldPeriod = pChn->nPeriod; + int32 nOldPeriod = pChn->nPeriod; if ((nNote) && (nNote <= NOTE_MAX) && (pChn->nLength)) CheckNNA(nChn, 0, nNote, TRUE); bool bResetEnv = false; if (GetType() & (MOD_TYPE_XM|MOD_TYPE_MT2)) @@ -4080,7 +4081,7 @@ if (!pChn->nPeriod) return; if(m_SongFlags[SONG_LINEARSLIDES] && !(GetType() & (MOD_TYPE_XM | MOD_TYPE_MT2))) { - LONG nOldPeriod = pChn->nPeriod; + int32 nOldPeriod = pChn->nPeriod; if (nFreqSlide < 0) { UINT n = (- nFreqSlide) >> 2; @@ -4518,7 +4519,7 @@ //----------------------------------------------------------------------------------- { if (!period) return 0; - if (m_nType & (MOD_TYPE_MED|MOD_TYPE_MOD|MOD_TYPE_MTM|MOD_TYPE_669|MOD_TYPE_OKT|MOD_TYPE_AMF0)) + if (GetType() & (MOD_TYPE_MED|MOD_TYPE_MOD|MOD_TYPE_MTM|MOD_TYPE_669|MOD_TYPE_OKT|MOD_TYPE_AMF0)) { return (3546895L*4) / period; } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |