|
From: <sag...@us...> - 2011-04-01 15:03:24
|
Revision: 835
http://modplug.svn.sourceforge.net/modplug/?rev=835&view=rev
Author: saga-games
Date: 2011-04-01 15:03:17 +0000 (Fri, 01 Apr 2011)
Log Message:
-----------
[Fix] S3M Loader: Sample header and sample data offsets can now be 0. (The specs only say that pattern offset 0 means "empty pattern")
[Reg] Removed S3M global volume hacks from revision 831 (there are too many non-ST3 S3Ms around to emulate this faithfully)
Revision Links:
--------------
http://modplug.svn.sourceforge.net/modplug/?rev=831&view=rev
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2011-04-01 14:59:06 UTC (rev 834)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2011-04-01 15:03:17 UTC (rev 835)
@@ -355,7 +355,7 @@
for (UINT iSmp=1; iSmp<=insnum; iSmp++)
{
UINT nInd = ((DWORD)smppos[iSmp - 1]) * 16;
- if ((!nInd) || (nInd + 0x50 > dwMemLength)) continue;
+ if (nInd + 0x50 > dwMemLength) continue;
memcpy(s, lpStream + nInd, 0x50);
memcpy(Samples[iSmp].filename, s+1, 12);
@@ -504,7 +504,7 @@
}
// Reading samples
- for (UINT iRaw = 1; iRaw <= insnum; iRaw++) if ((Samples[iRaw].nLength) && (smpdatapos[iRaw - 1]))
+ for (UINT iRaw = 1; iRaw <= insnum; iRaw++) if (Samples[iRaw].nLength)
{
UINT flags = (psfh.version == 1) ? RS_PCM8S : RS_PCM8U;
if (insflags[iRaw-1] & 4) flags += 5;
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2011-04-01 14:59:06 UTC (rev 834)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2011-04-01 15:03:17 UTC (rev 835)
@@ -343,11 +343,11 @@
break;
// Global Volume
case CMD_GLOBALVOLUME:
- // ST3 applies global volume on tick 1 and does other weird things, but we just emulate this part for now.
- if((GetType() & MOD_TYPE_S3M) && nMusicSpeed <= 1)
- {
- break;
- }
+ // ST3 applies global volume on tick 1 and does other weird things, but we won't emulate this for now.
+// if((GetType() & MOD_TYPE_S3M) && nMusicSpeed <= 1)
+// {
+// break;
+// }
if (!(GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT))) param <<= 1;
if(IsCompatibleMode(TRK_IMPULSETRACKER | TRK_FASTTRACKER2 | TRK_SCREAMTRACKER))
@@ -1880,12 +1880,12 @@
// Set Global Volume
case CMD_GLOBALVOLUME:
- // ST3 applies global volume on tick 1 and does other weird things, but we just emulate this part for now.
- if(((GetType() & MOD_TYPE_S3M) && m_nTickCount != 1)
- || (!(GetType() & MOD_TYPE_S3M) && !(m_dwSongFlags & SONG_FIRSTTICK)))
- {
- break;
- }
+ // ST3 applies global volume on tick 1 and does other weird things, but we won't emulate this for now.
+// if(((GetType() & MOD_TYPE_S3M) && m_nTickCount != 1)
+// || (!(GetType() & MOD_TYPE_S3M) && !(m_dwSongFlags & SONG_FIRSTTICK)))
+// {
+// break;
+// }
if (!(GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT))) param <<= 1;
//IT compatibility 16. FT2, ST3 and IT ignore out-of-range values
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|