From: <sag...@us...> - 2012-09-11 14:42:07
|
Revision: 1349 http://modplug.svn.sourceforge.net/modplug/?rev=1349&view=rev Author: saga-games Date: 2012-09-11 14:41:55 +0000 (Tue, 11 Sep 2012) Log Message: ----------- [Fix] Pattern Editor: Order list selection rectangle colour was a bit off in some cases with the latest colour improvements [Imp] Instrument Editor: Sustain / Loop points cannot be enabled anymore if there are no evelope points. [Ref] Other small changes Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/soundlib/Load_med.cpp trunk/OpenMPT/soundlib/ModSequence.cpp trunk/OpenMPT/soundlib/RowVisitor.h trunk/OpenMPT/soundlib/Sndmix.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2012-09-05 21:24:20 UTC (rev 1348) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2012-09-11 14:41:55 UTC (rev 1349) @@ -820,6 +820,7 @@ // Scrolling the shown orders(the showns rectangles)? while (rect.left < rcClient.right) { + dc.SetTextColor(colorText); bool bHighLight = ((bFocus) && (nIndex >= selection.firstOrd && nIndex <= selection.lastOrd)); const PATTERNINDEX nPat = (nIndex < pSndFile->Order.GetLength()) ? pSndFile->Order[nIndex] : PATTERNINDEX_INVALID; if ((rect.right = rect.left + m_cxFont) > rcClient.right) rect.right = rcClient.right; Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2012-09-05 21:24:20 UTC (rev 1348) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2012-09-11 14:41:55 UTC (rev 1349) @@ -718,6 +718,7 @@ { if(GetModuleFileName(NULL, m_szExePath, CountOf(m_szExePath))) { + StringFixer::SetNullTerminator(m_szExePath); TCHAR szDrive[_MAX_DRIVE] = "", szDir[_MAX_PATH] = ""; _splitpath(m_szExePath, szDrive, szDir, NULL, NULL); strcpy(m_szExePath, szDrive); @@ -1576,7 +1577,11 @@ m_bmp.LoadBitmap(MAKEINTRESOURCE(IDB_MPTRACK)); wsprintf(s, "Build Date: %s", gszBuildDate); SetDlgItemText(IDC_EDIT2, s); - SetDlgItemText(IDC_EDIT3, CString("OpenMPT ") + MptVersion::str); + SetDlgItemText(IDC_EDIT3, CString("OpenMPT ") + MptVersion::str +#if (MPT_VERSION_NUMERIC & 0xFF) != 0 + + CString(" (Test Build)") +#endif + ); m_heContact.SetWindowText( "Contact / Discussion:\r\n" Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2012-09-05 21:24:20 UTC (rev 1348) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2012-09-11 14:41:55 UTC (rev 1349) @@ -531,7 +531,7 @@ //--------------------------------------------------------------------- { InstrumentEnvelope *envelope = GetEnvelopePtr(); - if(envelope == nullptr) return false; + if(envelope == nullptr || envelope->nNodes == 0) return false; bool modified = envelope->dwFlags[flag] != enable; envelope->dwFlags.set(flag, enable); Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp 2012-09-05 21:24:20 UTC (rev 1348) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2012-09-11 14:41:55 UTC (rev 1349) @@ -1068,7 +1068,7 @@ _tcsftime(szDate, CountOf(szDate), _T("%d %b %Y, %H:%M:%S"), &hist->loadDate); // Time + stuff uint32 duration = (uint32)((double)(hist->openTime) / HISTORY_TIMER_PRECISION); - s.AppendFormat(_T("Loaded %s, open in the editor for %luh %02lum %02lus\r\n"), + s.AppendFormat(_T("Loaded %s, open for %luh %02lum %02lus\r\n"), szDate, duration / 3600, (duration / 60) % 60, duration % 60); } if(num == 0) Modified: trunk/OpenMPT/soundlib/Load_med.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_med.cpp 2012-09-05 21:24:20 UTC (rev 1348) +++ trunk/OpenMPT/soundlib/Load_med.cpp 2012-09-11 14:41:55 UTC (rev 1349) @@ -672,7 +672,7 @@ { MMD2PLAYSEQ *pmps = (MMD2PLAYSEQ *)(lpStream + pseq); if (!m_szNames[0][0]) memcpy(m_szNames[0], pmps->name, 31); - UINT n = BigEndianW(pmps->length); + uint16 n = BigEndianW(pmps->length); if (pseq+n <= dwMemLength) { Order.resize(nOrders + n); @@ -775,7 +775,7 @@ #ifdef MED_LOG Log("SampleData %d: stype=0x%02X len=%d\n", iSmp, BigEndianW(psdh->type), len); #endif - if ((len > MAX_SAMPLE_LENGTH) || (dwPos + len + 6 > dwMemLength)) len = 0; + if(dwPos + len + 6 > dwMemLength) len = 0; UINT stype = BigEndianW(psdh->type); LPSTR psdata = (LPSTR)(lpStream + dwPos + 6); Modified: trunk/OpenMPT/soundlib/ModSequence.cpp =================================================================== --- trunk/OpenMPT/soundlib/ModSequence.cpp 2012-09-05 21:24:20 UTC (rev 1348) +++ trunk/OpenMPT/soundlib/ModSequence.cpp 2012-09-11 14:41:55 UTC (rev 1349) @@ -11,7 +11,9 @@ #include "stdafx.h" #include "sndfile.h" #include "ModSequence.h" +#ifdef MODPLUG_TRACKER #include "../mptrack/moddoc.h" +#endif // MODPLUG_TRACKER #include "../mptrack/version.h" #include "../mptrack/serialization_utils.h" #include "../common/Reporting.h" Modified: trunk/OpenMPT/soundlib/RowVisitor.h =================================================================== --- trunk/OpenMPT/soundlib/RowVisitor.h 2012-09-05 21:24:20 UTC (rev 1348) +++ trunk/OpenMPT/soundlib/RowVisitor.h 2012-09-11 14:41:55 UTC (rev 1349) @@ -55,7 +55,7 @@ // Returns whether a given row has been visited yet. // If autoSet is true, the queried row will automatically be marked as visited. // Use this parameter instead of consecutive IsRowVisited / SetRowVisited calls. - bool IsVisited(ORDERINDEX nOrd, ROWINDEX nRow, bool autoSet); + bool IsVisited(ORDERINDEX order, ROWINDEX row, bool autoSet); // Get the needed vector size for a given pattern. size_t GetVisitedRowsVectorSize(PATTERNINDEX pattern) const; @@ -77,6 +77,6 @@ // (Un)sets a given row as visited. // order, row - which row should be (un)set // If visited is true, the row will be set as visited. - void SetVisited(ORDERINDEX nOrd, ROWINDEX nRow, bool visited); + void SetVisited(ORDERINDEX order, ROWINDEX row, bool visited); }; Modified: trunk/OpenMPT/soundlib/Sndmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndmix.cpp 2012-09-05 21:24:20 UTC (rev 1348) +++ trunk/OpenMPT/soundlib/Sndmix.cpp 2012-09-11 14:41:55 UTC (rev 1349) @@ -11,13 +11,7 @@ #include "stdafx.h" -// -> CODE#0022 -// -> DESC="alternative BPM/Speed interpretation method" -#include "../mptrack/mptrack.h" -#include "../mptrack/moddoc.h" -#include "../mptrack/MainFrm.h" -#include "../common/misc_util.h" -// -! NEW_FEATURE#0022 +#include "../mptrack/MainFrm.h" // TODO: Mix Settings shouldn't require CMainFrame #include "sndfile.h" #include "MIDIEvents.h" #include "tuning.h" @@ -879,7 +873,7 @@ pChn->nLeftVol = pChn->nNewLeftVol; pChn->nRightVol = pChn->nNewRightVol; pChn->dwFlags.reset(CHN_PORTAMENTO | CHN_VIBRATO | CHN_TREMOLO | CHN_PANBRELLO); - pChn->nCommand = 0; + pChn->nCommand = CMD_NONE; pChn->m_plugParamValueStep = 0; } @@ -1330,7 +1324,7 @@ { // Limit to last envelope point start = end = insEnv.Ticks[insEnv.nNodes - 1]; - if (position > end) + if(position > end) { // Env of envelope endReached = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |