|
From: <sag...@us...> - 2010-09-27 12:01:42
|
Revision: 722
http://modplug.svn.sourceforge.net/modplug/?rev=722&view=rev
Author: saga-games
Date: 2010-09-27 12:01:36 +0000 (Mon, 27 Sep 2010)
Log Message:
-----------
[Imp] It's now possible to create MOD files with more than 64 patterns. Just like in ProTracker, such MOD files are identified by the "M!K!" signature (instead of M.K.)
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_mod.cpp
trunk/OpenMPT/soundlib/mod_specifications.h
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2010-09-27 00:15:39 UTC (rev 721)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2010-09-27 12:01:36 UTC (rev 722)
@@ -617,7 +617,7 @@
norders = iord;
break;
}
- if ((Order[iord] < 0x80) && (nbp<=Order[iord])) nbp = Order[iord]+1;
+ if ((Order[iord] < 0x80) && (nbp <= Order[iord])) nbp = Order[iord] + 1;
}
bTab[0] = norders;
bTab[1] = m_nRestartPos;
@@ -628,9 +628,15 @@
fwrite(ord, 128, 1, f);
// Writing signature
if (m_nChannels == 4)
- lstrcpy((LPSTR)&bTab, "M.K.");
- else
- wsprintf((LPSTR)&bTab, "%luCHN", m_nChannels);
+ {
+ if(nbp < 64)
+ lstrcpy((LPSTR)&bTab, "M.K.");
+ else // more than 64 patterns
+ lstrcpy((LPSTR)&bTab, "M!K!");
+ } else
+ {
+ sprintf((LPSTR)&bTab, "%luCHN", m_nChannels);
+ }
fwrite(bTab, 4, 1, f);
// Writing patterns
for (UINT ipat=0; ipat<nbp; ipat++) { //for all patterns
Modified: trunk/OpenMPT/soundlib/mod_specifications.h
===================================================================
--- trunk/OpenMPT/soundlib/mod_specifications.h 2010-09-27 00:15:39 UTC (rev 721)
+++ trunk/OpenMPT/soundlib/mod_specifications.h 2010-09-27 12:01:36 UTC (rev 722)
@@ -111,7 +111,7 @@
false, // No notecut.
false, // No noteoff.
false, // No notefade.
- 64, // Pattern max.
+ 128, // Pattern max.
128, // Order max.
4, // Channel min
32, // Channel max
@@ -151,7 +151,7 @@
false, // No notecut.
false, // No noteoff.
false, // No notefade.
- 64, // Pattern max.
+ 128, // Pattern max.
128, // Order max.
4, // Channel min
32, // Channel max
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|