|
From: <sag...@us...> - 2010-06-15 18:40:22
|
Revision: 624
http://modplug.svn.sourceforge.net/modplug/?rev=624&view=rev
Author: saga-games
Date: 2010-06-15 18:40:15 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
[Imp] Mod Conversion: Some improvements with converting note cuts, ECx/SCx and EDx/SDx.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Sndfile.cpp
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-06-15 16:36:36 UTC (rev 623)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-06-15 18:40:15 UTC (rev 624)
@@ -1504,7 +1504,7 @@
ChnSettings[nChn].nVolume = 64;
ChnSettings[nChn].dwFlags = 0;
ChnSettings[nChn].nMixPlugin = 0;
- ChnSettings[nChn].szName[0] = 0;
+ strcpy(ChnSettings[nChn].szName, "");
ResetChannelState(nChn, CHNRESET_TOTAL);
@@ -3332,6 +3332,8 @@
case 0x90: m->command = CMD_RETRIG; m->param = 0x80 | (m->param & 0x0F); break;
case 0xA0: if (m->param & 0x0F) { m->command = CMD_VOLUMESLIDE; m->param = (m->param << 4) | 0x0F; } else m->command = 0; break;
case 0xB0: if (m->param & 0x0F) { m->command = CMD_VOLUMESLIDE; m->param |= 0xF0; } else m->command = 0; break;
+ case 0xC0: if (m->param == 0xC0) { m->command = CMD_NONE; m->note = NOTE_NOTECUT; } // this does different things in IT and ST3
+ case 0xD0: if (m->param == 0xD0) { m->command = CMD_NONE; } // dito
// rest are the same
}
}
@@ -3493,10 +3495,18 @@
// Convert S3M / IT / MPTM to MOD / XM
else if(oldTypeIsS3M_IT_MPT && newTypeIsMOD_XM)
{
- // convert note cut/off/fade
- if(m->note == NOTE_NOTECUT || m->note == NOTE_FADE)
+ if(m->note == NOTE_NOTECUT)
+ {
+ // convert note cut to EC0
+ m->note = NOTE_NONE;
+ m->command = CMD_MODCMDEX;
+ m->param = 0xC0;
+ } else if(m->note == NOTE_FADE)
+ {
+ // convert note fade to note off
m->note = NOTE_KEYOFF;
-
+ }
+
switch(m->command)
{
case CMD_S3MCMDEX:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|