|
From: <sag...@us...> - 2013-05-19 16:14:26
|
Revision: 2132
http://sourceforge.net/p/modplug/code/2132
Author: saga-games
Date: 2013-05-19 16:14:05 +0000 (Sun, 19 May 2013)
Log Message:
-----------
[Mod] MPTM Loading: Removed order truncation note for old MPTM files (order was not actually truncated anymore)
[Fix] MT2 Loading: Convert effects from XM to IT on loading, this fixes e.g. global volume commands.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_mt2.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2013-05-19 16:12:50 UTC (rev 2131)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2013-05-19 16:14:05 UTC (rev 2132)
@@ -26,7 +26,6 @@
#define str_tooMuchPatternData (GetStrI18N((MPT_TEXT("Warning: File format limit was reached. Some pattern data may not get written to file."))))
#define str_pattern (GetStrI18N((MPT_TEXT("pattern"))))
#define str_PatternSetTruncationNote (GetStrI18N((MPT_TEXT("The module contains %u patterns but only %u patterns can be loaded in this OpenMPT version."))))
-#define str_SequenceTruncationNote (GetStrI18N((MPT_TEXT("Module has sequence of length %u; it will be truncated to maximum supported length, %u."))))
#define str_LoadingIncompatibleVersion MPT_TEXT("The file informed that it is incompatible with this version of OpenMPT. Loading was terminated.")
#define str_LoadingMoreRecentVersion MPT_TEXT("The loaded file was made with a more recent OpenMPT version and this version may not be able to load all the features or play the file correctly.")
@@ -466,15 +465,6 @@
Order.ReadAsByte(file, fileHeader.ordnum);
} else
{
- ORDERINDEX ordSize = fileHeader.ordnum;
- if(fileHeader.ordnum > GetModSpecifications().ordersMax)
- {
- mpt::String str;
- str.Format(str_SequenceTruncationNote, fileHeader.ordnum, GetModSpecifications().ordersMax);
- AddToLog(str);
- ordSize = GetModSpecifications().ordersMax;
- }
-
if(fileHeader.cwtv > 0x88A && fileHeader.cwtv <= 0x88D)
{
Order.Deserialize(file);
Modified: trunk/OpenMPT/soundlib/Load_mt2.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mt2.cpp 2013-05-19 16:12:50 UTC (rev 2131)
+++ trunk/OpenMPT/soundlib/Load_mt2.cpp 2013-05-19 16:14:05 UTC (rev 2132)
@@ -207,7 +207,7 @@
m->command = p->fxparam2;
m->param = p->fxparam1;
that->ConvertModCommand(*m);
- m->ExtendedMODtoS3MEffect();
+ m->Convert(MOD_TYPE_XM, MOD_TYPE_IT);
} else
{
// TODO: MT2 Effects
@@ -660,4 +660,4 @@
if (dwMemPos+4 >= dwMemLength) break;
}
return true;
-}
+}
\ No newline at end of file
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-05-19 16:12:50 UTC (rev 2131)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-05-19 16:14:05 UTC (rev 2132)
@@ -449,7 +449,7 @@
// break;
// }
- if(!(GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_IMF | MOD_TYPE_J2B | MOD_TYPE_MID | MOD_TYPE_AMS | MOD_TYPE_AMS2 | MOD_TYPE_DBM))) param <<= 1;
+ if(!(GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_MT2 | MOD_TYPE_IMF | MOD_TYPE_J2B | MOD_TYPE_MID | MOD_TYPE_AMS | MOD_TYPE_AMS2 | MOD_TYPE_DBM))) param <<= 1;
// IT compatibility 16. FT2, ST3 and IT ignore out-of-range values
if(param <= 128)
{
@@ -2330,7 +2330,7 @@
// break;
// }
- if (!(GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_IMF | MOD_TYPE_J2B | MOD_TYPE_MID | MOD_TYPE_AMS | MOD_TYPE_AMS2 | MOD_TYPE_DBM))) param *= 2;
+ if (!(GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_MT2 | MOD_TYPE_IMF | MOD_TYPE_J2B | MOD_TYPE_MID | MOD_TYPE_AMS | MOD_TYPE_AMS2 | MOD_TYPE_DBM))) param *= 2;
// IT compatibility 16. FT2, ST3 and IT ignore out-of-range values.
// Test case: globalvol-invalid.it
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|