From: <sag...@us...> - 2009-11-23 22:00:41
|
Revision: 422 http://modplug.svn.sourceforge.net/modplug/?rev=422&view=rev Author: saga-games Date: 2009-11-23 22:00:32 +0000 (Mon, 23 Nov 2009) Log Message: ----------- [Fix] FX Editing: Min value for XM arpeggio is now 001, max value for channel volume is M40 [Imp] Mod Conversion: Removing channel features (pan/vol) in formats where they're not supported [Imp] MPTM: Only write full envelope info if at least one envelope has more than 25 envelope points. [Ref] Switched to British English in setup dialog ("Colour" instead of "Color") Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/soundlib/Load_it.cpp Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2009-11-23 22:00:32 UTC (rev 422) @@ -2268,9 +2268,10 @@ switch(gFXInfo[ndx].dwEffect) { case CMD_ARPEGGIO: - if (nType & MOD_TYPE_MOD) nmin = 1; + if (nType & (MOD_TYPE_MOD|MOD_TYPE_XM)) nmin = 1; break; case CMD_VOLUME: + case CMD_CHANNELVOLUME: nmax = 0x40; break; case CMD_SPEED: Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-11-23 22:00:32 UTC (rev 422) @@ -344,6 +344,20 @@ } } + // Fix channel settings (pan/vol) + for(CHANNELINDEX nChn = 0; nChn < m_SndFile.m_nChannels; nChn++) + { + if(newTypeIsMOD_XM || newTypeIsS3M) + { + m_SndFile.ChnSettings->nVolume = 64; + m_SndFile.ChnSettings->dwFlags &= ~CHN_SURROUND; + } + if(newTypeIsXM) + { + m_SndFile.ChnSettings->nPan = 128; + } + } + BEGIN_CRITICAL(); m_SndFile.ChangeModTypeTo(nNewType); if (!newTypeIsXM_IT_MPT && (m_SndFile.m_dwSongFlags & SONG_LINEARSLIDES)) Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2009-11-23 22:00:32 UTC (rev 422) @@ -701,7 +701,7 @@ {PATTERN_OVERFLOWPASTE, "Overflow paste mode", "Wrap pasted pattern data into next pattern. This is useful for creating echo channels."}, {PATTERN_POSITIONAWARETIMER, "Position aware timer", "If enabled, timer will show the playback position time if possible instead of running timer."}, {PATTERN_RESETCHANNELS, "Reset channels on loop", "If enabled, channels will be reset to their initial state when song looping is enabled.\nNote: This does not affect manual song loops (i.e. triggered by pattern commands)"}, - {PATTERN_LIVEUPDATETREE,"Update sample status in tree", "If enabled, active samples and instruments will be indicated by a differnt icon in the treeview."} + {PATTERN_LIVEUPDATETREE,"Update sample status in tree", "If enabled, active samples and instruments will be indicated by a different icon in the treeview."} }; void COptionsGeneral::DoDataExchange(CDataExchange* pDX) Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/mptrack/mptrack.rc 2009-11-23 22:00:32 UTC (rev 422) @@ -273,7 +273,7 @@ IDD_OPTIONS_COLORS DIALOGEX 0, 0, 272, 281 STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Colors" +CAPTION "Colours" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN COMBOBOX IDC_COMBO1,15,25,134,109,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -287,14 +287,14 @@ PUSHBUTTON "FT2",IDC_BUTTON6,204,246,24,15 PUSHBUTTON "IT",IDC_BUTTON7,174,246,24,15 PUSHBUTTON "Buzz",IDC_BUTTON8,234,246,24,15 - CONTROL "Color",IDC_BUTTON1,"Button",BS_OWNERDRAW,25,194,51,15 - CONTROL "Color",IDC_BUTTON2,"Button",BS_OWNERDRAW,98,194,51,15 - CONTROL "Color",IDC_BUTTON3,"Button",BS_OWNERDRAW,168,194,51,15 + CONTROL "Colour",IDC_BUTTON1,"Button",BS_OWNERDRAW,25,194,51,15 + CONTROL "Colour",IDC_BUTTON2,"Button",BS_OWNERDRAW,98,194,51,15 + CONTROL "Colour",IDC_BUTTON3,"Button",BS_OWNERDRAW,168,194,51,15 LTEXT "Background:",IDC_TEXT1,25,183,60,8 LTEXT "Foreground:",IDC_TEXT2,98,183,62,8 LTEXT "Highlight:",IDC_TEXT3,169,185,61,8 GROUPBOX "",IDC_STATIC,5,5,260,211 - LTEXT "Select color for:",IDC_STATIC,15,15,63,8 + LTEXT "Select colour for:",IDC_STATIC,15,15,63,8 LTEXT "rows",IDC_STATIC,138,92,16,8 LTEXT "rows",IDC_STATIC,138,110,16,8 CONTROL "",IDC_BUTTON4,"Button",BS_OWNERDRAW | BS_FLAT,65,130,114,43 @@ -302,7 +302,7 @@ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,75,136,10 PUSHBUTTON "Load...",IDC_LOAD_COLORSCHEME,18,246,48,15 PUSHBUTTON "Save...",IDC_SAVE_COLORSCHEME,72,246,48,15 - GROUPBOX "Color Presets",IDC_STATIC,6,228,264,42 + GROUPBOX "Colour Presets",IDC_STATIC,6,228,264,42 END IDD_OPTIONS_MIDI DIALOGEX 0, 0, 272, 281 Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2009-11-21 18:24:39 UTC (rev 421) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2009-11-23 22:00:32 UTC (rev 422) @@ -3413,15 +3413,25 @@ if(m_nType & MOD_TYPE_MPT) { + UINT maxNodes = 0; + for(INSTRUMENTINDEX nIns = 1; nIns <= m_nInstruments; nIns++) if(Instruments[nIns] != nullptr) + { + maxNodes = max(maxNodes, Instruments[nIns]->VolEnv.nNodes); + maxNodes = max(maxNodes, Instruments[nIns]->PanEnv.nNodes); + maxNodes = max(maxNodes, Instruments[nIns]->PitchEnv.nNodes); + } // write full envelope information for MPTM files (more env points) - WriteInstrumentPropertyForAllInstruments('VP[.', sizeof(m_defaultInstrument.VolEnv.Ticks ), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('VE[.', sizeof(m_defaultInstrument.VolEnv.Values), f, instruments, nInstruments); + if(maxNodes > 25) + { + WriteInstrumentPropertyForAllInstruments('VP[.', sizeof(m_defaultInstrument.VolEnv.Ticks ), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('VE[.', sizeof(m_defaultInstrument.VolEnv.Values), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('PP[.', sizeof(m_defaultInstrument.PanEnv.Ticks), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('PE[.', sizeof(m_defaultInstrument.PanEnv.Values), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('PP[.', sizeof(m_defaultInstrument.PanEnv.Ticks), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('PE[.', sizeof(m_defaultInstrument.PanEnv.Values), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('PiP[', sizeof(m_defaultInstrument.PitchEnv.Ticks), f, instruments, nInstruments); - WriteInstrumentPropertyForAllInstruments('PiE[', sizeof(m_defaultInstrument.PitchEnv.Values), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('PiP[', sizeof(m_defaultInstrument.PitchEnv.Ticks), f, instruments, nInstruments); + WriteInstrumentPropertyForAllInstruments('PiE[', sizeof(m_defaultInstrument.PitchEnv.Values), f, instruments, nInstruments); + } } return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |