From: <sag...@us...> - 2015-07-25 23:43:13
|
Revision: 5415 http://sourceforge.net/p/modplug/code/5415 Author: saga-games Date: 2015-07-25 23:43:06 +0000 (Sat, 25 Jul 2015) Log Message: ----------- [Imp] XM: Detect files made with latest MilkyTracker versions and enable FT2 pan law for them. [Fix] S3M: In S3M files not made with OpenMPT or Scream Tracker, support portamento between different samples again like in old versions of ModPlug Tracker (fixes k_vision.s3m, made in IT) [Fix] Pattern tab: Since OpenMPT 1.24.03.00, jumping to a pattern through the order list would still execute the last row of the previous pattern in some cases. [Fix] Main bar: Changing the rows per beat didn't update the tempo global swing. [Mod] OpenMPT: Version is now 1.25.00.20 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/Mainbar.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2015-07-14 20:30:01 UTC (rev 5414) +++ trunk/OpenMPT/common/versionNumber.h 2015-07-25 23:43:06 UTC (rev 5415) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 25 #define VER_MINOR 00 -#define VER_MINORMINOR 19 +#define VER_MINORMINOR 20 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/Mainbar.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mainbar.cpp 2015-07-14 20:30:01 UTC (rev 5414) +++ trunk/OpenMPT/mptrack/Mainbar.cpp 2015-07-25 23:43:06 UTC (rev 5415) @@ -657,8 +657,11 @@ { pSndFile->Patterns[nPat].SetSignature(nNewRPB, pSndFile->Patterns[nPat].GetRowsPerMeasure()); TempoSwing swing = pSndFile->Patterns[nPat].GetTempoSwing(); - swing.resize(nNewRPB); - pSndFile->Patterns[nPat].SetTempoSwing(swing); + if(!swing.empty()) + { + swing.resize(nNewRPB); + pSndFile->Patterns[nPat].SetTempoSwing(swing); + } pModDoc->SetModified(); } } else @@ -666,6 +669,7 @@ if(nNewRPB <= pSndFile->m_nDefaultRowsPerMeasure) { pSndFile->m_nDefaultRowsPerBeat = nNewRPB; + if(!pSndFile->m_tempoSwing.empty()) pSndFile->m_tempoSwing.resize(nNewRPB); pModDoc->SetModified(); } } Modified: trunk/OpenMPT/soundlib/Load_xm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp 2015-07-14 20:30:01 UTC (rev 5414) +++ trunk/OpenMPT/soundlib/Load_xm.cpp 2015-07-25 23:43:06 UTC (rev 5415) @@ -314,6 +314,16 @@ madeWith = verUnknown | verConfirmed; mpt::String::Read<mpt::String::spacePadded>(madeWithTracker, fileHeader.trackerName); + + if(!memcmp(fileHeader.trackerName, "MilkyTracker ", 12)) + { + // MilkyTracker prior to version 0.90.86 doesn't set a version string. + // Luckily, starting with v0.90.86, MilkyTracker also implements the FT2 panning scheme. + if(memcmp(fileHeader.trackerName + 12, " ", 8)) + { + m_nMixLevels = mixLevelsCompatibleFT2; + } + } } mpt::String::Read<mpt::String::spacePadded>(songName, fileHeader.songName); Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-07-14 20:30:01 UTC (rev 5414) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2015-07-25 23:43:06 UTC (rev 5415) @@ -1010,6 +1010,7 @@ // Target found, or there is no target (i.e. play whole song)... m_PlayState = memory.state; m_PlayState.m_nFrameDelay = m_PlayState.m_nPatternDelay = 0; + m_PlayState.m_nTickCount = Util::MaxValueOfType(m_PlayState.m_nTickCount) - 1; m_PlayState.m_bPositionChanged = true; for(CHANNELINDEX n = 0; n < GetNumChannels(); n++) { @@ -1108,10 +1109,11 @@ pSmp = pChn->pModSample; } - // Special XM hack (also applies to MOD / S3M) + // Special XM hack (also applies to MOD / S3M, except when playing IT-style S3Ms, such as k_vision.s3m) // Test case: PortaSmpChange.mod, PortaSmpChange.s3m if((!instrumentChanged && (GetType() & (MOD_TYPE_XM | MOD_TYPE_MT2)) && pIns) - || (GetType() & (MOD_TYPE_MOD | MOD_TYPE_S3M | MOD_TYPE_PLM))) + || (GetType() & (MOD_TYPE_MOD | MOD_TYPE_PLM)) + || IsCompatibleMode(TRK_SCREAMTRACKER)) { // FT2 doesn't change the sample in this case, // but still uses the sample info from the old one (bug?) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |