From: <sag...@us...> - 2010-07-28 23:20:04
|
Revision: 664 http://modplug.svn.sourceforge.net/modplug/?rev=664&view=rev Author: saga-games Date: 2010-07-28 23:19:58 +0000 (Wed, 28 Jul 2010) Log Message: ----------- [Fix] XM Loader: Compatibility flag was set too early. [Imp] Instrument Editor: Sample Map accepts various new shortcuts now. [Mod] Updated DE_jojo.mkb to include new shortcuts, remapped a few others (for IT-style). Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Ctrl_ins.h trunk/OpenMPT/mptrack/KeyConfigDlg.cpp trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb trunk/OpenMPT/soundlib/Load_xm.cpp Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-28 18:28:58 UTC (rev 663) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-28 23:19:58 UTC (rev 664) @@ -125,7 +125,7 @@ DefineKeyCommand(kcCopySelectOff, 1053, kcHidden, kcNoDummy, _T("Copy deselect key")); DefineKeyCommand(kcNextPattern, 1054, kcVisible, kcNoDummy, _T("Next pattern")); DefineKeyCommand(kcPrevPattern, 1055, kcVisible, kcNoDummy, _T("Previous pattern")); - //DefineKeyCommand(kcPrevPattern, 1056, kcVisible, kcNoDummy, _T("Wipe selection")); + //DefineKeyCommand(kcClearSelection, 1056, kcVisible, kcNoDummy, _T("Wipe selection")); DefineKeyCommand(kcClearRow, 1057, kcVisible, kcNoDummy, _T("Clear row")); DefineKeyCommand(kcClearField, 1058, kcVisible, kcNoDummy, _T("Clear field")); DefineKeyCommand(kcClearRowStep, 1059, kcVisible, kcNoDummy, _T("Clear row and step")); @@ -588,6 +588,17 @@ DefineKeyCommand(kcVSTGUIToggleRecordParams, 1839, kcVisible, kcNoDummy, _T("Toggle parameter recording")); DefineKeyCommand(kcVSTGUIToggleSendKeysToPlug, 1840, kcVisible, kcNoDummy, _T("Pass key presses to plugin")); DefineKeyCommand(kcVSTGUIBypassPlug, 1841, kcVisible, kcNoDummy, _T("Bypass plugin")); + DefineKeyCommand(kcInsNoteMapTransposeDown, 1842, kcVisible, kcNoDummy, _T("Transpose -1 (note map)")); + DefineKeyCommand(kcInsNoteMapTransposeUp, 1843, kcVisible, kcNoDummy, _T("Transpose +1 (note map)")); + DefineKeyCommand(kcInsNoteMapTransposeOctDown, 1844, kcVisible, kcNoDummy, _T("Transpose -12 (note map)")); + DefineKeyCommand(kcInsNoteMapTransposeOctUp, 1845, kcVisible, kcNoDummy, _T("Transpose +12 (note map)")); + DefineKeyCommand(kcInsNoteMapCopyCurrentNote, 1846, kcVisible, kcNoDummy, _T("Map all notes to selected note")); + DefineKeyCommand(kcInsNoteMapCopyCurrentSample, 1847, kcVisible, kcNoDummy, _T("Map all notes to selected sample")); + DefineKeyCommand(kcInsNoteMapReset, 1848, kcVisible, kcNoDummy, _T("Reset note mapping")); + DefineKeyCommand(kcInsNoteMapEditSample, 1849, kcVisible, kcNoDummy, _T("Edit current sample")); + DefineKeyCommand(kcInsNoteMapEditSampleMap, 1850, kcVisible, kcNoDummy, _T("Edit sample map")); + DefineKeyCommand(kcInstrumentCtrlDuplicate, 1851, kcVisible, kcNoDummy, _T("Duplicate instrument")); + // Add new key commands here. #ifdef _DEBUG for(size_t i = 0; i < kcNumCommands; i++) Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2010-07-28 18:28:58 UTC (rev 663) +++ trunk/OpenMPT/mptrack/CommandSet.h 2010-07-28 23:19:58 UTC (rev 664) @@ -573,7 +573,17 @@ kcInstrumentCtrlLoad=kcStartInstrumentCtrlMisc, kcInstrumentCtrlSave, kcInstrumentCtrlNew, - kcEndInstrumentCtrlMisc=kcInstrumentCtrlNew, + kcInstrumentCtrlDuplicate, + kcInsNoteMapEditSampleMap, + kcInsNoteMapEditSample, + kcInsNoteMapCopyCurrentNote, + kcInsNoteMapCopyCurrentSample, + kcInsNoteMapReset, + kcInsNoteMapTransposeUp, + kcInsNoteMapTransposeDown, + kcInsNoteMapTransposeOctUp, + kcInsNoteMapTransposeOctDown, + kcEndInstrumentCtrlMisc=kcInsNoteMapTransposeOctDown, kcStartSampleMisc, kcSampleLoad=kcStartSampleMisc, Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-07-28 18:28:58 UTC (rev 663) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-07-28 23:19:58 UTC (rev 664) @@ -61,6 +61,12 @@ if (ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT) != kcNull) return true; // Mapped to a command, no need to pass message on. + + // a bit of a hack... + ctx = (InputTargetContext)(kCtxCtrlInstruments); + + if (ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT) != kcNull) + return true; // Mapped to a command, no need to pass message on. } } @@ -154,7 +160,7 @@ dc.IntersectClipRect(&rcClient); if ((m_pModDoc) && (m_cxFont > 0) && (m_cyFont > 0)) { - BOOL bFocus = (::GetFocus() == m_hWnd) ? TRUE : FALSE; + bool bFocus = (::GetFocus() == m_hWnd); CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); MODINSTRUMENT *pIns = pSndFile->Instruments[m_nInstrument]; CHAR s[64]; @@ -165,7 +171,7 @@ int ypaint = 0; for (int ynote=0; ynote<nNotes; ynote++, ypaint+=m_cyFont, nPos++) { - BOOL bHighLight; + bool bHighLight; // Note s[0] = 0; @@ -176,7 +182,7 @@ rect.SetRect(0, ypaint, m_cxFont, ypaint+m_cyFont); DrawButtonRect(hdc, &rect, s, FALSE, FALSE); // Mapped Note - bHighLight = ((bFocus) && (nPos == (int)m_nNote) /*&& (!m_bIns)*/) ? TRUE : FALSE; + bHighLight = ((bFocus) && (nPos == (int)m_nNote) /*&& (!m_bIns)*/); rect.left = rect.right; rect.right = m_cxFont*2-1; strcpy(s, "..."); @@ -203,7 +209,7 @@ dc.SetTextColor((bHighLight) ? colorTextSel : colorText); dc.DrawText(s, -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER); // Sample - bHighLight = ((bFocus) && (nPos == (int)m_nNote) /*&& (m_bIns)*/) ? TRUE : FALSE; + bHighLight = ((bFocus) && (nPos == (int)m_nNote) /*&& (m_bIns)*/); rect.left = rcClient.left + m_cxFont*2+3; rect.right = rcClient.right; strcpy(s, " .."); @@ -254,15 +260,18 @@ void CNoteMapWnd::OnLButtonDown(UINT, CPoint pt) //---------------------------------------------- { - if ((pt.x >= m_cxFont) && (pt.x < m_cxFont*2) && (m_bIns)) { - m_bIns = FALSE; + if ((pt.x >= m_cxFont) && (pt.x < m_cxFont*2) && (m_bIns)) + { + m_bIns = false; InvalidateRect(NULL, FALSE); } - if ((pt.x > m_cxFont*2) && (pt.x <= m_cxFont*3) && (!m_bIns)) { - m_bIns = TRUE; + if ((pt.x > m_cxFont*2) && (pt.x <= m_cxFont*3) && (!m_bIns)) + { + m_bIns = true; InvalidateRect(NULL, FALSE); } - if ((pt.x >= 0) && (m_cyFont)) { + if ((pt.x >= 0) && (m_cyFont)) + { CRect rcClient; GetClientRect(&rcClient); int nNotes = (rcClient.bottom + m_cyFont - 1) / m_cyFont; @@ -290,9 +299,11 @@ CHAR s[64]; CSoundFile *pSndFile; MODINSTRUMENT *pIns; + CInputHandler* ih = CMainFrame::GetInputHandler(); pSndFile = m_pModDoc->GetSoundFile(); pIns = pSndFile->Instruments[m_nInstrument]; + if (pIns) { HMENU hMenu = ::CreatePopupMenu(); @@ -300,7 +311,7 @@ if (hMenu) { - AppendMenu(hMenu, MF_STRING, ID_INSTRUMENT_SAMPLEMAP, "Edit Sample &Map"); + AppendMenu(hMenu, MF_STRING, ID_INSTRUMENT_SAMPLEMAP, "Edit Sample &Map\t" + ih->GetKeyTextFromCommand(kcInsNoteMapEditSampleMap)); if (hSubMenu) { BYTE smpused[(MAX_SAMPLES+7)/8]; @@ -321,24 +332,24 @@ AppendMenu(hSubMenu, MF_STRING, ID_NOTEMAP_EDITSAMPLE+j, s); } } - AppendMenu(hMenu, MF_POPUP, (UINT)hSubMenu, "&Edit Sample"); + AppendMenu(hMenu, MF_POPUP, (UINT)hSubMenu, "&Edit Sample\t" + ih->GetKeyTextFromCommand(kcInsNoteMapEditSample)); AppendMenu(hMenu, MF_SEPARATOR, 0, NULL); } - wsprintf(s, "Map all notes to &sample %d", pIns->Keyboard[m_nNote]); + wsprintf(s, "Map all notes to &sample %d\t" + ih->GetKeyTextFromCommand(kcInsNoteMapCopyCurrentSample), pIns->Keyboard[m_nNote]); AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_COPY_SMP, s); if(pSndFile->GetType() != MOD_TYPE_XM) { if(pIns->NoteMap[m_nNote] < NOTE_MIN_SPECIAL) - wsprintf(s, "Map all ¬es to %s", pSndFile->GetNoteName(pIns->NoteMap[m_nNote], m_nInstrument).c_str()); + wsprintf(s, "Map all ¬es to %s\t" + ih->GetKeyTextFromCommand(kcInsNoteMapCopyCurrentNote), pSndFile->GetNoteName(pIns->NoteMap[m_nNote], m_nInstrument).c_str()); else - wsprintf(s, "Map all ¬es to %s", szSpecialNoteNames[pIns->NoteMap[m_nNote] - NOTE_MIN_SPECIAL]); + wsprintf(s, "Map all ¬es to %s\t" + ih->GetKeyTextFromCommand(kcInsNoteMapCopyCurrentNote), szSpecialNoteNames[pIns->NoteMap[m_nNote] - NOTE_MIN_SPECIAL]); AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_COPY_NOTE, s); - AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_TRANS_UP, "Transpose map &up"); - AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_TRANS_DOWN, "Transpose map &down"); + AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_TRANS_UP, "Transpose map &up\t" + ih->GetKeyTextFromCommand(kcInsNoteMapTransposeUp)); + AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_TRANS_DOWN, "Transpose map &down\t" + ih->GetKeyTextFromCommand(kcInsNoteMapTransposeDown)); } - AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_RESET, "&Reset note mapping"); - AppendMenu(hMenu, MF_STRING, ID_INSTRUMENT_DUPLICATE, "Duplicate &Instrument\tShift+New"); + AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_RESET, "&Reset note mapping\t" + ih->GetKeyTextFromCommand(kcInsNoteMapReset)); + AppendMenu(hMenu, MF_STRING, ID_INSTRUMENT_DUPLICATE, "Duplicate &Instrument\t" + ih->GetKeyTextFromCommand(kcInstrumentCtrlDuplicate)); SetMenuDefaultItem(hMenu, ID_INSTRUMENT_SAMPLEMAP, FALSE); ClientToScreen(&pt); ::TrackPopupMenu(hMenu, TPM_LEFTALIGN|TPM_RIGHTBUTTON, pt.x, pt.y, 0, m_hWnd, NULL); @@ -411,6 +422,7 @@ MODINSTRUMENT *pIns; pSndFile = m_pModDoc->GetSoundFile(); + if(pSndFile == nullptr) return; pIns = pSndFile->Instruments[m_nInstrument]; if (pIns) { @@ -503,11 +515,15 @@ return NULL; CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); + CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); + MODINSTRUMENT *pIns = nullptr; + if(pSndFile) + { + pIns = pSndFile->Instruments[m_nInstrument]; + } - //Handle notes + // Handle notes - - if (wParam>=kcInsNoteMapStartNotes && wParam<=kcInsNoteMapEndNotes) { //Special case: number keys override notes if we're in the sample # column. @@ -524,6 +540,26 @@ StopNote(m_nPlayingNote); return wParam; } + + // Other shortcuts + + switch(wParam) + { + case kcInsNoteMapTransposeDown: MapTranspose(-1); return wParam; + case kcInsNoteMapTransposeUp: MapTranspose(1); return wParam; + case kcInsNoteMapTransposeOctDown: MapTranspose(-12); return wParam; + case kcInsNoteMapTransposeOctUp: MapTranspose(12); return wParam; + + case kcInsNoteMapCopyCurrentSample: OnMapCopySample(); return wParam; + case kcInsNoteMapCopyCurrentNote: OnMapCopyNote(); return wParam; + case kcInsNoteMapReset: OnMapReset(); return wParam; + + case kcInsNoteMapEditSample: if(pIns) OnEditSample(pIns->Keyboard[m_nNote] + ID_NOTEMAP_EDITSAMPLE); return wParam; + case kcInsNoteMapEditSampleMap: OnEditSampleMap(); return wParam; + + // Parent shortcuts (also displayed in context menu of this control) + case kcInstrumentCtrlDuplicate: OnInstrumentDuplicate(); return wParam; + } return NULL; } @@ -538,11 +574,11 @@ if (!m_bIns && (pSndFile->m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT))) { UINT n = pIns->NoteMap[m_nNote]; - BOOL bOk = FALSE; + bool bOk = false; if ((note > 0) && (note <= NOTE_MAX)) { n = note; - bOk = TRUE; + bOk = true; } if (n != pIns->NoteMap[m_nNote]) { @@ -565,26 +601,30 @@ { CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); MODINSTRUMENT *pIns = pSndFile->Instruments[m_nInstrument]; - if ((pIns) && (m_nNote < NOTE_MAX)) { + if ((pIns) && (m_nNote < NOTE_MAX)) + { - if ((m_bIns) && (((c >= '0') && (c <= '9')) || (c == ' '))) { //in sample # column - + if ((m_bIns) && (((c >= '0') && (c <= '9')) || (c == ' '))) //in sample # column + { UINT n = m_nOldIns; - if (c != ' ') { - n = (10*pIns->Keyboard[m_nNote] + (c - '0')) % 10000; + if (c != ' ') + { + n = (10 * pIns->Keyboard[m_nNote] + (c - '0')) % 10000; if ((n >= MAX_SAMPLES) || ((pSndFile->m_nSamples < 1000) && (n >= 1000))) n = (n % 1000); if ((n >= MAX_SAMPLES) || ((pSndFile->m_nSamples < 100) && (n >= 100))) n = (n % 100); else if ((n > 31) && (pSndFile->m_nSamples < 32) && (n % 10)) n = (n % 10); } - if (n != pIns->Keyboard[m_nNote]) { + if (n != pIns->Keyboard[m_nNote]) + { pIns->Keyboard[m_nNote] = n; m_pModDoc->SetModified(); InvalidateRect(NULL, FALSE); PlayNote(m_nNote+1); } - if (c == ' ') { + if (c == ' ') + { if (m_nNote < NOTE_MAX - 1) m_nNote++; InvalidateRect(NULL, FALSE); PlayNote(m_nNote); @@ -592,27 +632,30 @@ return true; } - else if ((!m_bIns) && (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) { //in note column - + else if ((!m_bIns) && (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) //in note column + { UINT n = pIns->NoteMap[m_nNote]; - if ((c >= '0') && (c <= '9')) { - if (n) { + if ((c >= '0') && (c <= '9')) + { + if (n) n = ((n-1) % 12) + (c-'0')*12 + 1; - } else { + else n = (m_nNote % 12) + (c-'0')*12 + 1; - } - } else if (c == ' ') { + } else if (c == ' ') + { n = (m_nOldNote) ? m_nOldNote : m_nNote+1; } - if (n != pIns->NoteMap[m_nNote]) { + if (n != pIns->NoteMap[m_nNote]) + { pIns->NoteMap[m_nNote] = n; m_pModDoc->SetModified(); InvalidateRect(NULL, FALSE); } - if (c == ' ') { + if (c == ' ') + { SetCurrentNote(m_nNote+1); } @@ -627,7 +670,7 @@ bool CNoteMapWnd::HandleNav(WPARAM k) //------------------------------------ { - BOOL bRedraw = FALSE; + bool bRedraw = false; //HACK: handle numpad (convert numpad number key to normal number key) if ((k >= VK_NUMPAD0) && (k <= VK_NUMPAD9)) return HandleChar(k-VK_NUMPAD0+'0'); @@ -635,26 +678,26 @@ switch(k) { case VK_RIGHT: - if (!m_bIns) { m_bIns = TRUE; bRedraw = TRUE; } else - if (m_nNote < NOTE_MAX - 1) { m_nNote++; m_bIns = FALSE; bRedraw = TRUE; } + if (!m_bIns) { m_bIns = true; bRedraw = true; } else + if (m_nNote < NOTE_MAX - 1) { m_nNote++; m_bIns = false; bRedraw = true; } break; case VK_LEFT: - if (m_bIns) { m_bIns = FALSE; bRedraw = TRUE; } else - if (m_nNote) { m_nNote--; m_bIns = TRUE; bRedraw = TRUE; } + if (m_bIns) { m_bIns = false; bRedraw = true; } else + if (m_nNote) { m_nNote--; m_bIns = true; bRedraw = true; } break; case VK_UP: - if (m_nNote > 0) { m_nNote--; bRedraw = TRUE; } + if (m_nNote > 0) { m_nNote--; bRedraw = true; } break; case VK_DOWN: - if (m_nNote < NOTE_MAX - 1) { m_nNote++; bRedraw = TRUE; } + if (m_nNote < NOTE_MAX - 1) { m_nNote++; bRedraw = true; } break; case VK_PRIOR: - if (m_nNote > 3) { m_nNote-=3; bRedraw = TRUE; } else - if (m_nNote > 0) { m_nNote = 0; bRedraw = TRUE; } + if (m_nNote > 3) { m_nNote -= 3; bRedraw = true; } else + if (m_nNote > 0) { m_nNote = 0; bRedraw = true; } break; case VK_NEXT: - if (m_nNote+3 < NOTE_MAX) { m_nNote+=3; bRedraw = TRUE; } else - if (m_nNote < NOTE_MAX - 1) { m_nNote = NOTE_MAX - 1; bRedraw = TRUE; } + if (m_nNote+3 < NOTE_MAX) { m_nNote += 3; bRedraw = true; } else + if (m_nNote < NOTE_MAX - 1) { m_nNote = NOTE_MAX - 1; bRedraw = true; } break; case VK_TAB: return true; @@ -2528,6 +2571,8 @@ case kcInstrumentCtrlLoad: OnInstrumentOpen(); return wParam; case kcInstrumentCtrlSave: OnInstrumentSave(); return wParam; case kcInstrumentCtrlNew: OnInstrumentNew(); return wParam; + + case kcInstrumentCtrlDuplicate: OnInstrumentDuplicate(); return wParam; } return 0; Modified: trunk/OpenMPT/mptrack/Ctrl_ins.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.h 2010-07-28 18:28:58 UTC (rev 663) +++ trunk/OpenMPT/mptrack/Ctrl_ins.h 2010-07-28 23:19:58 UTC (rev 664) @@ -13,7 +13,8 @@ protected: CModDoc *m_pModDoc; CCtrlInstruments *m_pParent; - UINT m_nInstrument, m_nNote, m_bIns, m_nOldNote, m_nOldIns; + UINT m_nInstrument, m_nNote, m_nOldNote, m_nOldIns; + bool m_bIns; int m_nPlayingNote; HFONT m_hFont; int m_cxFont, m_cyFont; @@ -23,7 +24,18 @@ void MapTranspose(int nAmount); public: - CNoteMapWnd() { m_nPlayingNote=-1; m_nNote = NOTE_MIDDLEC - 1; m_pModDoc = NULL; m_nInstrument = 0; m_bIns = FALSE; m_cxFont = m_cyFont = 0; m_hFont = NULL; m_nOldNote = m_nOldIns = 0; m_pParent = NULL; } + CNoteMapWnd() + { + m_nPlayingNote = -1; + m_nNote = NOTE_MIDDLEC - 1; + m_pModDoc = nullptr; + m_nInstrument = 0; + m_bIns = false; + m_cxFont = m_cyFont = 0; + m_hFont = NULL; + m_nOldNote = m_nOldIns = 0; + m_pParent = NULL; + } BOOL SetCurrentInstrument(CModDoc *pModDoc, UINT nIns); BOOL SetCurrentNote(UINT nNote); VOID Init(CCtrlInstruments *pParent) { m_pParent = pParent; } Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp =================================================================== --- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2010-07-28 18:28:58 UTC (rev 663) +++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2010-07-28 23:19:58 UTC (rev 664) @@ -304,11 +304,13 @@ commandCategories.Add(*newCat); delete newCat; - newCat = new CommandCategory(" Instrument [Top]", kCtxCtrlInstruments); + newCat = new CommandCategory(" Instrument Editor", kCtxCtrlInstruments); + for (int c=kcStartInstrumentCtrlMisc; c<=kcEndInstrumentCtrlMisc; c++) + newCat->commands.Add(c); commandCategories.Add(*newCat); delete newCat; - newCat = new CommandCategory(" Instrument Editor", kCtxViewInstruments); + newCat = new CommandCategory(" Envelope Editor", kCtxViewInstruments); for (int c=kcStartInstrumentMisc; c<=kcEndInstrumentMisc; c++) newCat->commands.Add(c); commandCategories.Add(*newCat); @@ -355,7 +357,7 @@ // Fills command list and automatically selects first command. void COptionsKeyboard::OnCategorySelChanged() -//---------------------------------------- +//------------------------------------------- { CommandID nCmd = (CommandID)m_lbnCommandKeys.GetItemData( m_lbnCommandKeys.GetCurSel() ); int nCat = m_cmbCategory.GetItemData( m_cmbCategory.GetCurSel() ); @@ -385,7 +387,7 @@ // Fills key choice list and automatically selects first key choice void COptionsKeyboard::OnCommandKeySelChanged() -//---------------------------------------- +//--------------------------------------------- { CommandID nCmd = (CommandID)m_lbnCommandKeys.GetItemData( m_lbnCommandKeys.GetCurSel() ); CString str; Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2010-07-28 18:28:58 UTC (rev 663) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2010-07-28 23:19:58 UTC (rev 664) @@ -31,15 +31,17 @@ 0:1365:2:70:1 //Find: Ctrl+F (KeyDown) 0:1366:0:114:1 //Find Next: F3 (KeyDown) 0:1021:4:71:1 //View General: Alt+G (KeyDown) +0:1021:0:112:1 //View General: F1 (KeyDown) 0:1022:4:80:1 //View Pattern: Alt+P (KeyDown) +0:1022:0:113:1 //View Pattern: F2 (KeyDown) 0:1023:4:83:1 //View Samples: Alt+S (KeyDown) 0:1024:4:78:1 //View Instruments: Alt+N (KeyDown) +0:1024:0:115:1 //View Instruments: F4 (KeyDown) 0:1025:1:120:1 //View Comments: Shift+F9 (KeyDown) 0:1025:4:67:1 //View Comments: Alt+C (KeyDown) 0:1368:2:113:1 //Toggle Tree View: Ctrl+F2 (KeyDown) 0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown) -0:1781:2:114:1 //View MIDI mapping: Ctrl+F3 (KeyDown) -0:1370:0:112:1 //Help (to do): F1 (KeyDown) +0:1781:1:112:1 //View MIDI mapping: Shift+F1 (KeyDown) 0:1032:2:111:5 //Previous instrument: Ctrl+ (ZEHNERTASTATUR) (KeyDown|KeyHold) 0:1032:2:38:5 //Previous instrument: Ctrl+NACH-OBEN (KeyDown|KeyHold) 0:1033:2:106:5 //Next instrument: Ctrl+ (ZEHNERTASTATUR) (KeyDown|KeyHold) @@ -85,6 +87,7 @@ 2:1772:2:93:1 //Show pattern properties window: Ctrl+ANWENDUNG (KeyDown) 2:1819:2:69:1 //Split Keyboard Settings dialog: Ctrl+E (KeyDown) 2:1780:2:80:1 //Show playback time at current row: Ctrl+P (KeyDown) +2:1005:2:85:1 //Mute current channel: Ctrl+U (KeyDown) 2:1786:2:82:1 //Reset channel: Ctrl+R (KeyDown) 2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold) 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) @@ -317,6 +320,16 @@ //----( Sample Context [top] (16) )------------ //----( Instrument Context [top] (17) )------------ +17:1851:2:68:1 //Duplicate instrument: Ctrl+D (KeyDown) +17:1850:3:69:1 //Edit sample map: Shift+Ctrl+E (KeyDown) +17:1849:2:69:1 //Edit current sample: Ctrl+E (KeyDown) +17:1846:3:77:1 //Map all notes to selected note: Shift+Ctrl+M (KeyDown) +17:1847:2:77:1 //Map all notes to selected sample: Ctrl+M (KeyDown) +17:1848:2:82:1 //Reset note mapping: Ctrl+R (KeyDown) +17:1843:2:81:1 //Transpose +1 (note map): Ctrl+Q (KeyDown) +17:1842:2:65:1 //Transpose -1 (note map): Ctrl+A (KeyDown) +17:1845:3:81:1 //Transpose +12 (note map): Shift+Ctrl+Q (KeyDown) +17:1844:3:65:1 //Transpose -12 (note map): Shift+Ctrl+A (KeyDown) //----( Comments Context [top] (18) )------------ Modified: trunk/OpenMPT/soundlib/Load_xm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-07-28 18:28:58 UTC (rev 663) +++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-07-28 23:19:58 UTC (rev 664) @@ -245,8 +245,6 @@ UINT unused_samples; // dito bool bMadeWithModPlug = false, bProbablyMadeWithModPlug = false, bProbablyMPT109 = false, bIsFT2 = false; - // set this here already because XMs compressed with BoobieSqueezer will exit the function early - SetModFlag(MSF_COMPATIBLE_PLAY, true); m_nChannels = 0; if ((!lpStream) || (dwMemLength < 0xAA)) return false; // the smallest XM I know is 174 Bytes @@ -292,6 +290,9 @@ dwMemPos = xmheader.size + 60; + // set this here already because XMs compressed with BoobieSqueezer will exit the function early + SetModFlag(MSF_COMPATIBLE_PLAY, true); + if(xmheader.xmversion >= 0x0104) { if (dwMemPos + 8 >= dwMemLength) return true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |