Author: sagamusix
Date: Mon May 6 22:01:37 2024
New Revision: 20715
URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20715
Log:
Merged revision(s) 20702 from trunk/OpenMPT:
[Mod] MDL: Command 9 is not Set Envelope Position, it select a different envelope instead. As we only have one envelope per type per instrument, instead do the only thing we can do for now: Assume that the instrument envelope was disabled and enable it.
........
Modified:
branches/OpenMPT-1.31/ (props changed)
branches/OpenMPT-1.31/soundlib/Load_mdl.cpp
Modified: branches/OpenMPT-1.31/soundlib/Load_mdl.cpp
==============================================================================
--- branches/OpenMPT-1.31/soundlib/Load_mdl.cpp Mon May 6 22:00:18 2024 (r20714)
+++ branches/OpenMPT-1.31/soundlib/Load_mdl.cpp Mon May 6 22:01:37 2024 (r20715)
@@ -168,7 +168,7 @@
/* Either column */
/* 7 */ CMD_TEMPO,
/* 8 */ CMD_PANNING8,
- /* 9 */ CMD_SETENVPOSITION,
+ /* 9 */ CMD_S3MCMDEX,
/* A */ CMD_NONE,
/* B */ CMD_POSITIONJUMP,
/* C */ CMD_GLOBALVOLUME,
@@ -203,6 +203,16 @@
case 0x08: // Panning
param = (param & 0x7F) * 2u;
break;
+ case 0x09: // Set Envelope (we can only have one envelope per type...)
+ if(param < 0x40)
+ param = 0x78; // Enable the one volume envelope we have
+ else if (param < 0x80)
+ param = 0x7A; // Enable the one panning envelope we have
+ else if(param < 0xC0)
+ param = 0x7C; // Enable the one pitch envelope we have
+ else
+ cmd = CMD_NONE;
+ break;
case 0x0C: // Global volume
param = (param + 1) / 2u;
break;
|