From: <sag...@us...> - 2009-07-12 12:25:43
|
Revision: 293 http://modplug.svn.sourceforge.net/modplug/?rev=293&view=rev Author: saga-games Date: 2009-07-12 12:25:38 +0000 (Sun, 12 Jul 2009) Log Message: ----------- [Fix] Pattern editor: Set max. row spacing / skipping value to 64, visibly clamp values > 64 to 64 in the edit box, skip to next pattern if continuous scroll is enabled [Fix] Playback: Global volume will be set correctly when skipping around in the module (accidentally broke this in rev. 290) Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-07-11 19:18:24 UTC (rev 292) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2009-07-12 12:25:38 UTC (rev 293) @@ -167,7 +167,7 @@ m_EditOrderListMargins.SetParent(this); m_EditOrderListMargins.SetLimitText(3); // Spin controls - m_SpinSpacing.SetRange(0, 16); + m_SpinSpacing.SetRange(0, MAX_SPACING); m_SpinSpacing.SetPos(CMainFrame::gnPatternSpacing); m_SpinInstrument.SetRange(-1, 1); @@ -716,7 +716,11 @@ if ((m_EditSpacing.m_hWnd) && (m_EditSpacing.GetWindowTextLength() > 0)) { CMainFrame::gnPatternSpacing = GetDlgItemInt(IDC_EDIT_SPACING); - if (CMainFrame::gnPatternSpacing > 16) CMainFrame::gnPatternSpacing = 16; + if (CMainFrame::gnPatternSpacing > MAX_SPACING) + { + CMainFrame::gnPatternSpacing = MAX_SPACING; + SetDlgItemInt(IDC_EDIT_SPACING, CMainFrame::gnPatternSpacing, FALSE); + } SendViewMessage(VIEWMSG_SETSPACING, CMainFrame::gnPatternSpacing); } } Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-11 19:18:24 UTC (rev 292) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-07-12 12:25:38 UTC (rev 293) @@ -18,7 +18,6 @@ #include "midi.h" #include <cmath> -#define MAX_SPACING 16 #define PLUGNAME_HEIGHT 16 //rewbs.patPlugName #pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data" @@ -4167,8 +4166,9 @@ if ( bIsLiveRecord == false ) { if ((m_nSpacing > 0) && (m_nSpacing <= MAX_SPACING)) { - if (nRow+m_nSpacing<pSndFile->PatternSize[nPat]) { - SetCurrentRow(nRow+m_nSpacing); + + if (nRow + m_nSpacing < pSndFile->PatternSize[nPat] || (CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL)) { + SetCurrentRow(nRow + m_nSpacing, (CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL) ? true: false); m_bLastNoteEntryBlocked=false; } else { m_bLastNoteEntryBlocked=true; // if the cursor is block by the end of the pattern here, Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2009-07-11 19:18:24 UTC (rev 292) +++ trunk/OpenMPT/mptrack/View_pat.h 2009-07-12 12:25:38 UTC (rev 293) @@ -30,6 +30,9 @@ #define PATSTATUS_PLUGNAMESINHEADERS 0x2000 //rewbs.patPlugName #define PATSTATUS_PATTERNLOOP 0x4000 +// Row Spacing +#define MAX_SPACING 64 + enum { NOTE_COLUMN=0, INST_COLUMN, Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-11 19:18:24 UTC (rev 292) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-12 12:25:38 UTC (rev 293) @@ -295,8 +295,6 @@ break; // Global Volume case CMD_GLOBALVOLUME: - if (m_nTickCount) break; - if (!(m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) param <<= 1; if(GetModFlag(MSF_COMPATIBLE_PLAY)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |