|
From: <sag...@us...> - 2010-10-08 14:40:51
|
Revision: 735
http://modplug.svn.sourceforge.net/modplug/?rev=735&view=rev
Author: saga-games
Date: 2010-10-08 14:40:44 +0000 (Fri, 08 Oct 2010)
Log Message:
-----------
[Fix] STM Loader: Some fix from Schism which makes sense.
[Fix] Mod Specifications: Octave 8 was allowed in S3M files, that's a bit much of course (it wasn't even saved)
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_stm.cpp
trunk/OpenMPT/soundlib/mod_specifications.h
Modified: trunk/OpenMPT/soundlib/Load_stm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_stm.cpp 2010-10-05 16:55:20 UTC (rev 734)
+++ trunk/OpenMPT/soundlib/Load_stm.cpp 2010-10-08 14:40:44 UTC (rev 735)
@@ -108,7 +108,11 @@
if ((pIns->nLength < 4) || (!pIns->nVolume)) pIns->nLength = 0;
pIns->nLoopStart = LittleEndianW(pStm->loopbeg);
pIns->nLoopEnd = LittleEndianW(pStm->loopend);
- if ((pIns->nLoopEnd > pIns->nLoopStart) && (pIns->nLoopEnd != 0xFFFF)) pIns->uFlags |= CHN_LOOP;
+ if ((pIns->nLoopEnd > pIns->nLoopStart) && (pIns->nLoopEnd != 0xFFFF))
+ {
+ pIns->uFlags |= CHN_LOOP;
+ pIns->nLoopEnd = min(pIns->nLoopEnd, pIns->nLength);
+ }
}
dwMemPos = sizeof(STMHEADER);
for (UINT nOrd = 0; nOrd < 128; nOrd++) if (Order[nOrd] >= 99) Order[nOrd] = Order.GetInvalidPatIndex();
Modified: trunk/OpenMPT/soundlib/mod_specifications.h
===================================================================
--- trunk/OpenMPT/soundlib/mod_specifications.h 2010-10-05 16:55:20 UTC (rev 734)
+++ trunk/OpenMPT/soundlib/mod_specifications.h 2010-10-08 14:40:44 UTC (rev 735)
@@ -265,7 +265,7 @@
// TODO: Set correct values.
"s3m", // File extension
13, // Minimum note index
- 120, // Maximum note index
+ 108, // Maximum note index
true, // Has notecut.
false, // No noteoff.
false, // No notefade.
@@ -305,7 +305,7 @@
// TODO: Set correct values.
"s3m", // File extension
13, // Minimum note index
- NOTE_MAX, // Maximum note index
+ 108, // Maximum note index
true, // Has notecut.
false, // No noteoff.
false, // No notefade.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|