From: <sag...@us...> - 2015-03-05 00:08:33
|
Revision: 4829 http://sourceforge.net/p/modplug/code/4829 Author: saga-games Date: 2015-03-05 00:08:20 +0000 (Thu, 05 Mar 2015) Log Message: ----------- [Imp] Instrument tab: Drag&Drop now also works with envelope files. [Fix] Pattern tab: When only enabling Amiga limits for MOD but not PT1/2 mode, invalid notes were not coloured as such. Modified Paths: -------------- trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp 2015-03-04 18:04:26 UTC (rev 4828) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2015-03-05 00:08:20 UTC (rev 4829) @@ -884,17 +884,19 @@ { tx_col = MODCOLOR_NOTE; - if(sndFile.m_SongFlags[SONG_PT1XMODE] && (m->note < NOTE_MIDDLEC - 12 || m->note >= NOTE_MIDDLEC + 2 * 12)) + if(sndFile.m_SongFlags[SONG_AMIGALIMITS | SONG_PT1XMODE]) { - // MOD "ProTracker 1.x" flag: Highlight notes that are not supported by Amiga trackers. - tx_col = MODCOLOR_DODGY_COMMANDS; - } else if(sndFile.m_SongFlags[SONG_AMIGALIMITS] && m->instr != 0 && m->instr <= sndFile.GetNumSamples()) - { - // S3M "Force Amiga Limits": Highlight notes that exceed the Amiga's frequency range. - UINT period = sndFile.GetPeriodFromNote(m->note, 0, sndFile.GetSample(m->instr).nC5Speed); - if(period < 113 * 4 || period > 856 * 4) + // Highlight notes that exceed the Amiga's frequency range. + if(sndFile.GetType() == MOD_TYPE_MOD && (m->note < NOTE_MIDDLEC - 12 || m->note >= NOTE_MIDDLEC + 2 * 12)) { tx_col = MODCOLOR_DODGY_COMMANDS; + } else if(sndFile.GetType() == MOD_TYPE_S3M && m->instr != 0 && m->instr <= sndFile.GetNumSamples()) + { + uint32 period = sndFile.GetPeriodFromNote(m->note, 0, sndFile.GetSample(m->instr).nC5Speed); + if(period < 113 * 4 || period > 856 * 4) + { + tx_col = MODCOLOR_DODGY_COMMANDS; + } } } } Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2015-03-04 18:04:26 UTC (rev 4828) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2015-03-05 00:08:20 UTC (rev 4829) @@ -2026,8 +2026,11 @@ if(::DragQueryFileW(hDropInfo, f, fileName, CountOf(fileName))) { const mpt::PathString file = mpt::PathString::FromNative(fileName); - if(SendCtrlMessage(CTRLMSG_INS_OPENFILE, (LPARAM)&file) && f < nFiles - 1) + if(GetDocument()->LoadEnvelope(m_nInstrument, m_nEnv, file)) { + SetModified(InstrumentHint(m_nInstrument).Envelope(), true); + } else if(SendCtrlMessage(CTRLMSG_INS_OPENFILE, (LPARAM)&file) && f < nFiles - 1) + { // Insert more instrument slots SendCtrlMessage(IDC_INSTRUMENT_NEW); } Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2015-03-04 18:04:26 UTC (rev 4828) +++ trunk/OpenMPT/mptrack/mptrack.rc 2015-03-05 00:08:20 UTC (rev 4829) @@ -2547,10 +2547,14 @@ STRINGTABLE BEGIN + ID_ENVELOPE_ZOOM_IN "Zoom In" + ID_ENVELOPE_ZOOM_OUT "Zoom Out" ID_PANIC "Kill all VSTi and sample voices\nStop all hanging VSTi and sample voices" ID_VIEW_EDITHISTORY "View the edit history of this module" ID_SAMPLE_GRID "Configure Sample Grid" ID_FILE_SAVEASTEMPLATE "Save the active document as template module\nSave as Template" + ID_ENVELOPE_LOAD "Load instrument envelope from file" + ID_ENVELOPE_SAVE "Save instrument envelope to file" END STRINGTABLE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |