From: <sag...@us...> - 2013-12-05 16:44:19
|
Revision: 3380 http://sourceforge.net/p/modplug/code/3380 Author: saga-games Date: 2013-12-05 16:44:13 +0000 (Thu, 05 Dec 2013) Log Message: ----------- [Mod] Song properites: Disable MixMode RC3 for XM/IT. [Imp] Envelope view: Always use the back buffer for drawing position marks. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/View_ins.h trunk/OpenMPT/mptrack/dlg_misc.cpp Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2013-12-05 16:43:01 UTC (rev 3379) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2013-12-05 16:44:13 UTC (rev 3380) @@ -850,7 +850,7 @@ } } - pDC->BitBlt(m_rcClient.left, m_rcClient.top, m_rcClient.right-m_rcClient.left, m_rcClient.bottom-m_rcClient.top, &m_dcGrid, 0, 0, SRCCOPY); + pDC->BitBlt(m_rcClient.left, m_rcClient.top, m_rcClient.Width(), m_rcClient.Height(), &m_dcGrid, 0, 0, SRCCOPY); } //end rewbs.envRowGrid @@ -962,11 +962,11 @@ } } - DrawPositionMarks(m_dcMemMain.m_hDC); + DrawPositionMarks(); if (oldpen) m_dcMemMain.SelectObject(oldpen); //rewbs.envRowGrid - pDC->BitBlt(m_rcClient.left, m_rcClient.top, m_rcClient.right-m_rcClient.left, m_rcClient.bottom-m_rcClient.top, &m_dcMemMain, 0, 0, SRCCOPY); + pDC->BitBlt(m_rcClient.left, m_rcClient.top, m_rcClient.Width(), m_rcClient.Height(), &m_dcMemMain, 0, 0, SRCCOPY); // -> CODE#0015 // -> DESC="channels management dlg" @@ -1127,8 +1127,8 @@ -void CViewInstrument::DrawPositionMarks(HDC hdc) -//---------------------------------------------- +void CViewInstrument::DrawPositionMarks() +//--------------------------------------- { CRect rect; for(UINT i = 0; i < MAX_CHANNELS; i++) if (m_dwNotifyPos[i] != Notification::PosInvalid) @@ -1137,7 +1137,7 @@ rect.left = TickToScreen(m_dwNotifyPos[i]); rect.right = rect.left + 1; rect.bottom = m_rcClient.bottom + 1; - InvertRect(hdc, &rect); + InvertRect(m_dcMemMain.m_hDC, &rect); } } @@ -1185,14 +1185,15 @@ if (bUpdate) { HDC hdc = ::GetDC(m_hWnd); - DrawPositionMarks(hdc); + DrawPositionMarks(); for (CHANNELINDEX j = 0; j < MAX_CHANNELS; j++) { //DWORD newpos = (pSndFile->m_SongFlags[SONG_PAUSED]) ? pnotify->dwPos[j] : 0; uint32 newpos = (uint32)pnotify->pos[j]; m_dwNotifyPos[j] = newpos; } - DrawPositionMarks(hdc); + DrawPositionMarks(); + BitBlt(hdc, m_rcClient.left, m_rcClient.top, m_rcClient.Width(), m_rcClient.Height(), m_dcMemMain.GetSafeHdc(), 0, 0, SRCCOPY); ::ReleaseDC(m_hWnd, hdc); } } Modified: trunk/OpenMPT/mptrack/View_ins.h =================================================================== --- trunk/OpenMPT/mptrack/View_ins.h 2013-12-05 16:43:01 UTC (rev 3379) +++ trunk/OpenMPT/mptrack/View_ins.h 2013-12-05 16:44:13 UTC (rev 3380) @@ -25,7 +25,7 @@ protected: CImageList m_bmpEnvBar; POINT m_ptMenu; - RECT m_rcClient; + CRect m_rcClient; CBitmap m_bmpGrid; CBitmap m_bmpMemMain; @@ -145,7 +145,7 @@ int ValueToScreen(int val) const { return m_rcClient.bottom - 1 - (val * (m_rcClient.bottom - 1)) / 64; } int ScreenToValue(int y) const; void InvalidateEnvelope() { InvalidateRect(NULL, FALSE); } - void DrawPositionMarks(HDC hdc); + void DrawPositionMarks(); void DrawNcButton(CDC *pDC, UINT nBtn); BOOL GetNcButtonRect(UINT nBtn, LPRECT lpRect); void UpdateNcButtonState(); Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp 2013-12-05 16:43:01 UTC (rev 3379) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2013-12-05 16:44:13 UTC (rev 3380) @@ -94,12 +94,12 @@ // Tempo modes // Don't show new tempo modes for XM/IT, unless they are currently used - const bool showNewTempoModes = (sndFile.GetType() == MOD_TYPE_MPT || (sndFile.m_SongFlags[SONG_ITPROJECT] != 0)); + const bool showNewModes = (sndFile.GetType() == MOD_TYPE_MPT || (sndFile.m_SongFlags[SONG_ITPROJECT] != 0)); m_TempoModeBox.SetItemData(m_TempoModeBox.AddString("Classic"), tempo_mode_classic); - if(showNewTempoModes || sndFile.m_nTempoMode == tempo_mode_alternative) + if(showNewModes || sndFile.m_nTempoMode == tempo_mode_alternative) m_TempoModeBox.SetItemData(m_TempoModeBox.AddString("Alternative"), tempo_mode_alternative); - if(showNewTempoModes || sndFile.m_nTempoMode == tempo_mode_modern) + if(showNewModes || sndFile.m_nTempoMode == tempo_mode_modern) m_TempoModeBox.SetItemData(m_TempoModeBox.AddString("Modern (accurate)"), tempo_mode_modern); m_TempoModeBox.SetCurSel(0); for(int i = m_TempoModeBox.GetCount(); i > 0; i--) @@ -113,7 +113,8 @@ // Mix levels - m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC3"), mixLevels_117RC3); + if(showNewModes || sndFile.GetMixLevels() == mixLevels_117RC3) // In XM/IT, this is only shown for backwards compatibility with existing tunes + m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC3"), mixLevels_117RC3); if(sndFile.GetMixLevels() == mixLevels_117RC2) // Only shown for backwards compatibility with existing tunes m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC2"), mixLevels_117RC2); if(sndFile.GetMixLevels() == mixLevels_117RC1) // Dito This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |