From: <sag...@us...> - 2011-05-31 09:58:32
|
Revision: 888 http://modplug.svn.sourceforge.net/modplug/?rev=888&view=rev Author: saga-games Date: 2011-05-31 09:58:24 +0000 (Tue, 31 May 2011) Log Message: ----------- [Fix] Visitied Rows Check: Yet another error that shouldn't have happened and that I was not able to reproduce... (tx jmkz) [Fix] Setup Dialog: Fixed checkbox list so that it doesn't look weird under Wine and doesn't crash when compiling with VS2010. [Mod] OpenMPT: Version is now 1.19.02.03 Modified Paths: -------------- trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2011-05-30 21:31:03 UTC (rev 887) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2011-05-31 09:58:24 UTC (rev 888) @@ -6,9 +6,7 @@ #include "moptions.h" #include "moddoc.h" -#pragma warning(disable:4244) - ////////////////////////////////////////////////////////////// // COptionsColors @@ -552,44 +550,14 @@ ON_CLBN_CHKCHANGE(IDC_LIST1, OnSettingsChanged) END_MESSAGE_MAP() -typedef struct OPTGENDESC + +struct OPTGENDESC { DWORD dwFlagID; LPCSTR pszListName, pszDescription; -} OPTGENDESC; - -enum -{ - OPTGEN_PLAYNEWNOTES=0, - OPTGEN_PLAYEDITROW, - OPTGEN_CENTERROW, - OPTGEN_LARGECOMMENTSFONT, - OPTGEN_HEXROWDISP, - OPTGEN_CURSORWRAP, - OPTGEN_CREATEBACKUP, - OPTGEN_DRAGNDROPEDIT, - OPTGEN_FLATBUTTONS, - OPTGEN_SINGLEEXPAND, - OPTGEN_MUTECHNMODE, - OPTGEN_AUTOSPACEBAR, - OPTGEN_NOEXTRALOUD, - OPTGEN_SHOWPREVIOUS, - OPTGEN_CONTSCROLL, - OPTGEN_KBDNOTEOFF, - OPTGEN_FOLLOWSONGOFF, - OPTGEN_MIDIRECORD, - OPTGEN_PATTERNCTXMENUSTYLE, - OPTGEN_SYNCMUTE, - OPTGEN_AUTODELAY, - OPTGEN_PATNOTEFADE, - OPTGEN_OVERFLOWPASTE, - OPTGEN_POSITIONAWARETIMER, - OPTGEN_RESETCHANNELS, - OPTGEN_LIVEUPDATETREE, - OPTGEN_MAXOPTIONS }; -static OPTGENDESC gOptGenDesc[OPTGEN_MAXOPTIONS] = +static OPTGENDESC gOptGenDesc[] = { {PATTERN_PLAYNEWNOTE, "Play new notes while recording", "When this option is enabled, notes entered in the pattern editor will always be played (If not checked, notes won't be played in record mode)."}, {PATTERN_PLAYEDITROW, "Play whole row while recording", "When this option is enabled, all notes on the current row are played when entering notes in the pattern editor."}, @@ -617,6 +585,7 @@ {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) //------------------------------------------------------ { @@ -633,16 +602,16 @@ CHAR sname[32], s[256]; CPropertyPage::OnInitDialog(); - for (UINT i = 0; i < OPTGEN_MAXOPTIONS; i++) + for (UINT i = 0; i < CountOf(gOptGenDesc); i++) { - bool bCheck; - wsprintf(sname, "Setup.Gen.Opt%d.Name", i+1); + wsprintf(sname, "Setup.Gen.Opt%d.Name", i + 1); if ((theApp.GetLocalizedString(sname, s, sizeof(s))) && (s[0])) m_CheckList.AddString(s); else m_CheckList.AddString(gOptGenDesc[i].pszListName); - bCheck = (CMainFrame::m_dwPatternSetup & gOptGenDesc[i].dwFlagID) != 0 ? true : false; - m_CheckList.SetCheck(i, (bCheck) ? TRUE : FALSE); + + const int check = (CMainFrame::m_dwPatternSetup & gOptGenDesc[i].dwFlagID) != 0 ? BST_CHECKED : BST_UNCHECKED; + m_CheckList.SetCheck(i, check); } m_CheckList.SetCurSel(0); OnOptionSelChanged(); @@ -669,14 +638,12 @@ GetDlgItemText(IDC_OPTIONS_DIR_VSTS, szVstDir, _MAX_PATH); GetDlgItemText(IDC_OPTIONS_DIR_VSTPRESETS, szPresetDir, _MAX_PATH); - for (UINT i = 0; i < OPTGEN_MAXOPTIONS; i++) + for (UINT i = 0; i < CountOf(gOptGenDesc); i++) { - BOOL bCheck = m_CheckList.GetCheck(i); + const bool check = (m_CheckList.GetCheck(i) != BST_UNCHECKED); - if(bCheck) CMainFrame::m_dwPatternSetup |= gOptGenDesc[i].dwFlagID; + if(check) CMainFrame::m_dwPatternSetup |= gOptGenDesc[i].dwFlagID; else CMainFrame::m_dwPatternSetup &= ~gOptGenDesc[i].dwFlagID; - - m_CheckList.SetCheck(i, (bCheck) ? TRUE : FALSE); } CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); @@ -725,8 +692,8 @@ { CHAR sname[32], s[256]; LPCSTR pszDesc = NULL; - int sel = m_CheckList.GetCurSel(); - if ((sel >= 0) && (sel < OPTGEN_MAXOPTIONS)) + const int sel = m_CheckList.GetCurSel(); + if ((sel >= 0) && (sel < CountOf(gOptGenDesc))) { pszDesc = gOptGenDesc[sel].pszDescription; wsprintf(sname, "Setup.Gen.Opt%d.Desc", sel+1); @@ -734,5 +701,3 @@ } SetDlgItemText(IDC_TEXT1, (pszDesc) ? pszDesc : ""); } - - Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2011-05-30 21:31:03 UTC (rev 887) +++ trunk/OpenMPT/mptrack/version.h 2011-05-31 09:58:24 UTC (rev 888) @@ -15,7 +15,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 19 #define VER_MINOR 02 -#define VER_MINORMINOR 02 +#define VER_MINORMINOR 03 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2011-05-30 21:31:03 UTC (rev 887) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2011-05-31 09:58:24 UTC (rev 888) @@ -4142,7 +4142,7 @@ //-------------------------------------------------------------------------------------------------------------------------- { const ORDERINDEX nMaxOrd = Order.GetLengthTailTrimmed(); - if(nOrd >= nMaxOrd || nRow >= Patterns[Order[nOrd]].GetNumRows()) + if(nOrd >= nMaxOrd || nRow >= GetVisitedRowsVectorSize(Order[nOrd])) { return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |