From: <sag...@us...> - 2010-06-12 13:17:22
|
Revision: 621 http://modplug.svn.sourceforge.net/modplug/?rev=621&view=rev Author: saga-games Date: 2010-06-12 13:17:16 +0000 (Sat, 12 Jun 2010) Log Message: ----------- [Fix] Mod Conversion: When converting to MPTM, "+++" separator patterns are not recognized as subtune indicators anymore, as that was quite annoying. [Fix] XM Saver: Completely empty patterns are loaded as empty 64-row patterns in FT2, regardless of their original size. This is now being circumvented by adding a D00 effect at the end of such patterns. [Imp] Note Properties: Set envelope position effect (Lxx in XM) is now explained properly. Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/ModSequence.cpp Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-06-11 17:52:43 UTC (rev 620) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-06-12 13:17:16 UTC (rev 621) @@ -2722,6 +2722,10 @@ } break; + case CMD_SETENVPOSITION: + wsprintf(s, "Tick %d", param); + break; + case CMD_MIDI: if (param < 0x80) { @@ -2788,7 +2792,7 @@ case 0x0A: strcpy(s, "7A: Pan Env On"); break; case 0x0B: strcpy(s, "7B: Pitch Env Off"); break; case 0x0C: strcpy(s, "7C: Pitch Env On"); break; - // intentional fall-through follows + // intentional fall-through for non-MPT modules follows case 0x0D: if(m_SndFile.GetType() == MOD_TYPE_MPT) { strcpy(s, "7D: Force Pitch Env"); break; } case 0x0E: if(m_SndFile.GetType() == MOD_TYPE_MPT) { strcpy(s, "7E: Force Filter Env"); break; } default: wsprintf(s, "%02X: undefined", param); break; Modified: trunk/OpenMPT/soundlib/Load_xm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-06-11 17:52:43 UTC (rev 620) +++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-06-12 13:17:16 UTC (rev 621) @@ -826,6 +826,8 @@ { MODCOMMAND *p = Patterns[i]; UINT len = 0; + // Empty patterns are always loaded as 64-row patterns in FT2, regardless of their real size... + bool emptyPatNeedsFixing = (Patterns[i].GetNumRows() != 64); memset(&xmph, 0, sizeof(xmph)); xmph[0] = 9; @@ -876,6 +878,19 @@ } } } + + // no need to fix non-empty patterns + if(!p->IsEmpty()) + emptyPatNeedsFixing = false; + + // apparently, completely empty patterns are loaded as empty 64-row patterns in FT2, regardless of their original size. + // We have to avoid this, so we add a "break to row 0" command in the last row. + if(j == 1 && emptyPatNeedsFixing) + { + command = 0x0D; + param = 0; + } + if ((note) && (p->instr) && (vol > 0x0F) && (command) && (param)) { s[len++] = note; Modified: trunk/OpenMPT/soundlib/ModSequence.cpp =================================================================== --- trunk/OpenMPT/soundlib/ModSequence.cpp 2010-06-11 17:52:43 UTC (rev 620) +++ trunk/OpenMPT/soundlib/ModSequence.cpp 2010-06-12 13:17:16 UTC (rev 621) @@ -396,7 +396,7 @@ const ORDERINDEX nLengthTt = GetLengthTailTrimmed(); for(ORDERINDEX nOrd = 0; nOrd < nLengthTt; nOrd++) { - if(!m_pSndFile->Patterns.IsValidIndex(At(nOrd))) + if(!m_pSndFile->Patterns.IsValidPat(At(nOrd)) && At(nOrd) != GetIgnoreIndex()) { hasSepPatterns = true; break; @@ -414,7 +414,7 @@ for(ORDERINDEX nOrd = 0; nOrd < GetLengthTailTrimmed(); nOrd++) { // end of subsong? - if(!m_pSndFile->Patterns.IsValidIndex(At(nOrd))) + if(!m_pSndFile->Patterns.IsValidPat(At(nOrd)) && At(nOrd) != GetIgnoreIndex()) { ORDERINDEX oldLength = GetLengthTailTrimmed(); // remove all separator patterns between current and next subsong first This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |