You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(10) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
| 2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(4) |
| 2009 |
Jan
(9) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(6) |
Jun
(18) |
Jul
(33) |
Aug
(39) |
Sep
(33) |
Oct
(24) |
Nov
(23) |
Dec
(22) |
| 2010 |
Jan
(29) |
Feb
(32) |
Mar
(51) |
Apr
(17) |
May
(31) |
Jun
(21) |
Jul
(32) |
Aug
(28) |
Sep
(35) |
Oct
(27) |
Nov
(11) |
Dec
(13) |
| 2011 |
Jan
(14) |
Feb
(13) |
Mar
(27) |
Apr
(27) |
May
(28) |
Jun
(20) |
Jul
(43) |
Aug
(52) |
Sep
(66) |
Oct
(61) |
Nov
(11) |
Dec
(8) |
| 2012 |
Jan
(20) |
Feb
(30) |
Mar
(38) |
Apr
(21) |
May
(33) |
Jun
(21) |
Jul
(25) |
Aug
(9) |
Sep
(24) |
Oct
(42) |
Nov
(27) |
Dec
(41) |
| 2013 |
Jan
(20) |
Feb
(35) |
Mar
(156) |
Apr
(298) |
May
(258) |
Jun
(201) |
Jul
(105) |
Aug
(60) |
Sep
(193) |
Oct
(245) |
Nov
(280) |
Dec
(194) |
| 2014 |
Jan
(63) |
Feb
(202) |
Mar
(200) |
Apr
(23) |
May
(53) |
Jun
(105) |
Jul
(18) |
Aug
(26) |
Sep
(110) |
Oct
(187) |
Nov
(97) |
Dec
(74) |
| 2015 |
Jan
(45) |
Feb
(55) |
Mar
(116) |
Apr
(116) |
May
(193) |
Jun
(164) |
Jul
(50) |
Aug
(111) |
Sep
(98) |
Oct
(71) |
Nov
(103) |
Dec
(63) |
| 2016 |
Jan
(33) |
Feb
(101) |
Mar
(182) |
Apr
(139) |
May
(140) |
Jun
(103) |
Jul
(165) |
Aug
(286) |
Sep
(208) |
Oct
(127) |
Nov
(97) |
Dec
(54) |
| 2017 |
Jan
(64) |
Feb
(335) |
Mar
(202) |
Apr
(212) |
May
(139) |
Jun
(127) |
Jul
(294) |
Aug
(154) |
Sep
(170) |
Oct
(152) |
Nov
(156) |
Dec
(62) |
| 2018 |
Jan
(168) |
Feb
(237) |
Mar
(196) |
Apr
(174) |
May
(174) |
Jun
(161) |
Jul
(127) |
Aug
(88) |
Sep
(149) |
Oct
(66) |
Nov
(52) |
Dec
(135) |
| 2019 |
Jan
(146) |
Feb
(126) |
Mar
(104) |
Apr
(58) |
May
(60) |
Jun
(28) |
Jul
(197) |
Aug
(129) |
Sep
(141) |
Oct
(148) |
Nov
(63) |
Dec
(100) |
| 2020 |
Jan
(74) |
Feb
(37) |
Mar
(59) |
Apr
(154) |
May
(194) |
Jun
(133) |
Jul
(313) |
Aug
(197) |
Sep
(49) |
Oct
(162) |
Nov
(143) |
Dec
(57) |
| 2021 |
Jan
(120) |
Feb
(107) |
Mar
(314) |
Apr
(157) |
May
(524) |
Jun
(169) |
Jul
(72) |
Aug
(133) |
Sep
(135) |
Oct
(146) |
Nov
(198) |
Dec
(325) |
| 2022 |
Jan
(409) |
Feb
(249) |
Mar
(138) |
Apr
(95) |
May
(102) |
Jun
(221) |
Jul
(66) |
Aug
(120) |
Sep
(192) |
Oct
(131) |
Nov
(53) |
Dec
(171) |
| 2023 |
Jan
(357) |
Feb
(82) |
Mar
(168) |
Apr
(218) |
May
(196) |
Jun
(86) |
Jul
(115) |
Aug
(49) |
Sep
(190) |
Oct
(102) |
Nov
(45) |
Dec
(76) |
| 2024 |
Jan
(86) |
Feb
(50) |
Mar
(324) |
Apr
(209) |
May
(197) |
Jun
(232) |
Jul
(194) |
Aug
(247) |
Sep
(219) |
Oct
(266) |
Nov
(328) |
Dec
(304) |
| 2025 |
Jan
(191) |
Feb
(115) |
Mar
(137) |
Apr
(32) |
May
(126) |
Jun
(403) |
Jul
(213) |
Aug
(203) |
Sep
(148) |
Oct
(109) |
Nov
(191) |
Dec
(209) |
| 2026 |
Jan
(127) |
Feb
(123) |
Mar
(160) |
Apr
(141) |
May
(45) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <sag...@us...> - 2010-12-20 23:03:54
|
Revision: 776
http://modplug.svn.sourceforge.net/modplug/?rev=776&view=rev
Author: saga-games
Date: 2010-12-20 23:03:47 +0000 (Mon, 20 Dec 2010)
Log Message:
-----------
[Fix] Pattern Editor: Using Right-Click -> Change Plugin on PC notes did not work for plugin numbers that were higher than the highest instrument number.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-19 17:50:40 UTC (rev 775)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-20 23:03:47 UTC (rev 776)
@@ -2566,47 +2566,7 @@
void CViewPattern::OnSetSelInstrument()
//-------------------------------------
{
- CModDoc *pModDoc;
- CSoundFile *pSndFile;
- BYTE nIns = static_cast<BYTE>(GetCurrentInstrument());
- MODCOMMAND *p;
- BOOL bModified;
-
- if (!nIns) return;
- if ((pModDoc = GetDocument()) == NULL) return;
- pSndFile = pModDoc->GetSoundFile();
- if(!pSndFile) return;
- p = pSndFile->Patterns[m_nPattern];
- if (!p) return;
- BeginWaitCursor();
- PrepareUndo(m_dwBeginSel, m_dwEndSel);
- bModified = FALSE;
-
- //rewbs: re-written to work regardless of selection
- UINT startRow = GetSelectionStartRow();
- UINT endRow = GetSelectionEndRow();
- UINT startChan = GetSelectionStartChan();
- UINT endChan = GetSelectionEndChan();
-
- for (UINT r=startRow; r<endRow+1; r++) {
- for (UINT c=startChan; c<endChan+1; c++) {
-
- p = pSndFile->Patterns[m_nPattern] + r * pSndFile->m_nChannels + c;
- // If a note or an instr is present on the row, do the change, if required.
- // Do not set instr if note and instr are both blank.
- // Do set instr if note is a PC note and instr is blank.
- if ( ((p->note > 0 && p->note < NOTE_MIN_SPECIAL) || p->IsPcNote() || p->instr) && (p->instr!=nIns) ) {
- p->instr = nIns;
- bModified = TRUE;
- }
- }
- }
-
- if (bModified) {
- pModDoc->SetModified();
- pModDoc->UpdateAllViews(NULL, HINT_PATTERNDATA | (m_nPattern << HINT_SHIFT_PAT), NULL);
- }
- EndWaitCursor();
+ SetSelectionInstrument(GetCurrentInstrument());
}
void CViewPattern::OnRemoveChannelDialog()
@@ -4794,18 +4754,15 @@
void CViewPattern::OnSelectInstrument(UINT nID)
//---------------------------------------------
{
- UINT o_inst = GetCurrentInstrument();
- UINT n_inst = nID-ID_CHANGE_INSTRUMENT;
+ const UINT newIns = nID - ID_CHANGE_INSTRUMENT;
- if (n_inst == 0)
+ if (newIns == 0)
{
RowMask sp = {0,1,0,0,0}; // Setup mask to only clear instrument data in OnClearSelection
OnClearSelection(false, sp); // Clears instrument selection from pattern
} else
{
- SendCtrlMessage(CTRLMSG_SETCURRENTINSTRUMENT, n_inst);
- OnSetSelInstrument();
- SendCtrlMessage(CTRLMSG_SETCURRENTINSTRUMENT, o_inst); //Restoring old instrument.
+ SetSelectionInstrument(newIns);
}
}
@@ -5620,3 +5577,51 @@
else
return pSndFile->Patterns[m_nPattern].GetRowsPerMeasure();
}
+
+
+void CViewPattern::SetSelectionInstrument(const INSTRUMENTINDEX nIns)
+//-------------------------------------------------------------------
+{
+ CModDoc *pModDoc;
+ CSoundFile *pSndFile;
+ MODCOMMAND *p;
+ bool bModified = false;
+
+ if (!nIns) return;
+ if ((pModDoc = GetDocument()) == nullptr) return;
+ pSndFile = pModDoc->GetSoundFile();
+ if(!pSndFile) return;
+ p = pSndFile->Patterns[m_nPattern];
+ if (!p) return;
+ BeginWaitCursor();
+ PrepareUndo(m_dwBeginSel, m_dwEndSel);
+
+ //rewbs: re-written to work regardless of selection
+ UINT startRow = GetSelectionStartRow();
+ UINT endRow = GetSelectionEndRow();
+ UINT startChan = GetSelectionStartChan();
+ UINT endChan = GetSelectionEndChan();
+
+ for (UINT r=startRow; r<endRow+1; r++)
+ {
+ p = pSndFile->Patterns[m_nPattern] + r * pSndFile->m_nChannels + startChan;
+ for (UINT c = startChan; c < endChan + 1; c++, p++)
+ {
+ // If a note or an instr is present on the row, do the change, if required.
+ // Do not set instr if note and instr are both blank.
+ // Do set instr if note is a PC note and instr is blank.
+ if ( ((p->note > 0 && p->note < NOTE_MIN_SPECIAL) || p->IsPcNote() || p->instr) && (p->instr!=nIns) )
+ {
+ p->instr = nIns;
+ bModified = true;
+ }
+ }
+ }
+
+ if (bModified)
+ {
+ pModDoc->SetModified();
+ pModDoc->UpdateAllViews(NULL, HINT_PATTERNDATA | (m_nPattern << HINT_SHIFT_PAT), NULL);
+ }
+ EndWaitCursor();
+}
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2010-12-19 17:50:40 UTC (rev 775)
+++ trunk/OpenMPT/mptrack/View_pat.h 2010-12-20 23:03:47 UTC (rev 776)
@@ -206,6 +206,7 @@
void SetSpacing(int n);
void OnClearField(int, bool, bool=false);
void InsertRows(UINT colmin, UINT colmax);
+ void SetSelectionInstrument(const INSTRUMENTINDEX nIns);
//end rewbs.customKeys
void TogglePluginEditor(int chan); //rewbs.patPlugName
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-12-19 17:50:47
|
Revision: 775
http://modplug.svn.sourceforge.net/modplug/?rev=775&view=rev
Author: saga-games
Date: 2010-12-19 17:50:40 +0000 (Sun, 19 Dec 2010)
Log Message:
-----------
[New] Sample Editor: The new "sample grid" feature can create equally-sized sample selections, so it is f.e. easy to split a sample into four equally-sized samples.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/View_smp.h
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/res/smptoolb.bmp
trunk/OpenMPT/mptrack/resource.h
Modified: trunk/OpenMPT/mptrack/Mainfrm.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainfrm.h 2010-12-18 19:08:08 UTC (rev 774)
+++ trunk/OpenMPT/mptrack/Mainfrm.h 2010-12-19 17:50:40 UTC (rev 775)
@@ -298,6 +298,7 @@
SIMAGE_DRAW,
SIMAGE_RESIZE,
SIMAGE_GENERATE,
+ SIMAGE_GRID,
};
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2010-12-18 19:08:08 UTC (rev 774)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2010-12-19 17:50:40 UTC (rev 775)
@@ -31,7 +31,7 @@
// trimming will be done. This is the minimum value for
// selection difference, so the minimum length of result
// of trimming is nTrimLengthMin + 1.
-const uint8 nTrimLengthMin = 16;
+#define MIN_TRIM_LENGTH 16
const UINT cLeftBarButtons[SMP_LEFTBAR_BUTTONS] =
{
@@ -40,6 +40,9 @@
ID_SEPARATOR,
ID_SAMPLE_DRAW,
ID_SAMPLE_ADDSILENCE,
+ ID_SEPARATOR,
+ ID_SAMPLE_GRID,
+ ID_SEPARATOR,
};
@@ -88,6 +91,7 @@
ON_COMMAND(ID_SAMPLE_ZOOMDOWN, OnZoomDown)
ON_COMMAND(ID_SAMPLE_DRAW, OnDrawingToggle)
ON_COMMAND(ID_SAMPLE_ADDSILENCE, OnAddSilence)
+ ON_COMMAND(ID_SAMPLE_GRID, OnChangeGridSize)
ON_MESSAGE(WM_MOD_MIDIMSG, OnMidiMsg)
ON_MESSAGE(WM_MOD_KEYCOMMAND, OnCustomKeyMsg) //rewbs.customKeys
//}}AFX_MSG_MAP
@@ -100,6 +104,7 @@
CViewSample::CViewSample()
//------------------------
{
+ m_nGridSegments = 0;
m_nSample = 1;
m_nZoom = 0;
m_nScrollPos = 0;
@@ -225,12 +230,23 @@
void CViewSample::SetCurSel(DWORD nBegin, DWORD nEnd)
//---------------------------------------------------
{
+ CSoundFile *pSndFile = (GetDocument()) ? GetDocument()->GetSoundFile() : nullptr;
+ if(pSndFile == nullptr)
+ return;
+
+ // Snap to grid
+ if(m_nGridSegments > 0)
+ {
+ const float sampsPerSegment = (float)(pSndFile->Samples[m_nSample].nLength / m_nGridSegments);
+ nBegin = (DWORD)(floor((float)(nBegin / sampsPerSegment) + 0.5f) * sampsPerSegment);
+ nEnd = (DWORD)(floor((float)(nEnd / sampsPerSegment) + 0.5f) * sampsPerSegment);
+ }
+
if (nBegin > nEnd)
{
- DWORD tmp = nBegin;
- nBegin = nEnd;
- nEnd = tmp;
+ std::swap(nBegin, nEnd);
}
+
if ((nBegin != m_dwBeginSel) || (nEnd != m_dwEndSel))
{
RECT rect;
@@ -272,23 +288,18 @@
s[0] = 0;
if (m_dwEndSel > m_dwBeginSel)
{
- CModDoc *pModDoc = GetDocument();
wsprintf(s, "[%d,%d]", m_dwBeginSel, m_dwEndSel);
- if (pModDoc)
+ LONG lSampleRate = pSndFile->Samples[m_nSample].nC5Speed;
+ if (pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))
{
- CSoundFile *pSndFile = pModDoc->GetSoundFile();
- LONG lSampleRate = pSndFile->Samples[m_nSample].nC5Speed;
- if (pSndFile->m_nType & (MOD_TYPE_MOD|MOD_TYPE_XM))
- {
- lSampleRate = CSoundFile::TransposeToFrequency(pSndFile->Samples[m_nSample].RelativeTone, pSndFile->Samples[m_nSample].nFineTune);
- }
- if (!lSampleRate) lSampleRate = 8363;
- ULONG msec = ((ULONG)(m_dwEndSel - m_dwBeginSel) * 1000) / lSampleRate;
- if (msec < 1000)
- wsprintf(s+strlen(s), " (%lums)", msec);
- else
- wsprintf(s+strlen(s), " (%lu.%lus)", msec/1000, (msec/100) % 10);
+ lSampleRate = CSoundFile::TransposeToFrequency(pSndFile->Samples[m_nSample].RelativeTone, pSndFile->Samples[m_nSample].nFineTune);
}
+ if (!lSampleRate) lSampleRate = 8363;
+ ULONG msec = ((ULONG)(m_dwEndSel - m_dwBeginSel) * 1000) / lSampleRate;
+ if (msec < 1000)
+ wsprintf(s+strlen(s), " (%lums)", msec);
+ else
+ wsprintf(s+strlen(s), " (%lu.%lus)", msec/1000, (msec/100) % 10);
}
pMainFrm->SetInfoText(s);
}
@@ -1009,6 +1020,7 @@
case ID_SAMPLE_ZOOMDOWN: nImage = SIMAGE_ZOOMDOWN; break;
case ID_SAMPLE_DRAW: nImage = (dwStyle & NCBTNS_DISABLED) ? SIMAGE_NODRAW : SIMAGE_DRAW; break;
case ID_SAMPLE_ADDSILENCE: nImage = SIMAGE_RESIZE; break;
+ case ID_SAMPLE_GRID: nImage = SIMAGE_GRID; break;
}
pDC->Draw3dRect(rect.left-1, rect.top-1, SMP_LEFTBAR_CXBTN+2, SMP_LEFTBAR_CYBTN+2, c3, c4);
pDC->Draw3dRect(rect.left, rect.top, SMP_LEFTBAR_CXBTN, SMP_LEFTBAR_CYBTN, c1, c2);
@@ -1481,7 +1493,7 @@
// "Trim" menu item is responding differently if there's no selection,
// but a loop present: "trim around loop point"! (jojo in topic 2258)
std::string sTrimMenuText = "Trim";
- bool bIsGrayed = ( (m_dwEndSel<=m_dwBeginSel) || (m_dwEndSel - m_dwBeginSel < nTrimLengthMin)
+ bool bIsGrayed = ( (m_dwEndSel<=m_dwBeginSel) || (m_dwEndSel - m_dwBeginSel < MIN_TRIM_LENGTH)
|| (m_dwEndSel - m_dwBeginSel == pSmp->nLength)
);
@@ -1491,7 +1503,7 @@
sTrimMenuText += " around loop points";
// Check whether trim menu item can be enabled (loop not too short or long for trimming).
if( (pSmp->nLoopEnd <= pSmp->nLength) &&
- (pSmp->nLoopEnd - pSmp->nLoopStart >= nTrimLengthMin) &&
+ (pSmp->nLoopEnd - pSmp->nLoopStart >= MIN_TRIM_LENGTH) &&
(pSmp->nLoopEnd - pSmp->nLoopStart < pSmp->nLength) )
bIsGrayed = false;
}
@@ -2055,7 +2067,7 @@
UINT nStart = m_dwBeginSel;
UINT nEnd = m_dwEndSel - m_dwBeginSel;
- if ((pSmp->pSample) && (nStart+nEnd <= pSmp->nLength) && (nEnd >= nTrimLengthMin))
+ if ((pSmp->pSample) && (nStart+nEnd <= pSmp->nLength) && (nEnd >= MIN_TRIM_LENGTH))
{
pModDoc->GetSampleUndo()->PrepareUndo(m_nSample, sundo_replace);
BEGIN_CRITICAL();
@@ -2355,7 +2367,7 @@
if(pSmp->uFlags & CHN_LOOP)
{
/* only update sample buffer if the loop is actually enabled
- (resets sound without any reason otherwise) - bug report 1874 */
+ (resets sound without any reason otherwise) - http://forum.openmpt.org/index.php?topic=1874.0 */
pModDoc->AdjustEndOfSample(m_nSample);
}
pModDoc->UpdateAllViews(NULL, (m_nSample << HINT_SHIFT_SMP) | HINT_SAMPLEINFO | HINT_SAMPLEDATA, NULL);
@@ -2380,7 +2392,7 @@
if(pSmp->uFlags & CHN_LOOP)
{
/* only update sample buffer if the loop is actually enabled
- (resets sound without any reason otherwise) - bug report 1874 */
+ (resets sound without any reason otherwise) - http://forum.openmpt.org/index.php?topic=1874.0 */
pModDoc->AdjustEndOfSample(m_nSample);
}
pModDoc->UpdateAllViews(NULL, (m_nSample << HINT_SHIFT_SMP) | HINT_SAMPLEINFO | HINT_SAMPLEDATA, NULL);
@@ -2703,3 +2715,15 @@
return CModScrollView::OnMouseWheel(nFlags, zDelta, pt);
}
+
+
+void CViewSample::OnChangeGridSize()
+//----------------------------------
+{
+ CSampleGridDlg dlg(this, m_nGridSegments, GetDocument()->GetSoundFile()->Samples[m_nSample].nLength);
+ if(dlg.DoModal() == IDOK)
+ {
+ m_nGridSegments = dlg.m_nSegments;
+ InvalidateSample();
+ }
+}
Modified: trunk/OpenMPT/mptrack/View_smp.h
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.h 2010-12-18 19:08:08 UTC (rev 774)
+++ trunk/OpenMPT/mptrack/View_smp.h 2010-12-19 17:50:40 UTC (rev 775)
@@ -5,7 +5,7 @@
#define SMPSTATUS_KEYDOWN 0x02
#define SMPSTATUS_NCLBTNDOWN 0x04
-#define SMP_LEFTBAR_BUTTONS 5
+#define SMP_LEFTBAR_BUTTONS 8
//======================================
class CViewSample: public CModScrollView
@@ -21,6 +21,7 @@
DWORD m_dwMenuParam;
DWORD m_NcButtonState[SMP_LEFTBAR_BUTTONS];
DWORD m_dwNotifyPos[MAX_CHANNELS];
+ int m_nGridSegments;
bool m_bDrawingEnabled; // sample drawing mode enabled?
CPoint m_lastDrawPoint; // for drawing horizontal lines
@@ -123,6 +124,7 @@
afx_msg void OnZoomDown();
afx_msg void OnDrawingToggle();
afx_msg void OnAddSilence();
+ afx_msg void OnChangeGridSize();
afx_msg LRESULT OnMidiMsg(WPARAM, LPARAM);
afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //rewbs.customKeys
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-12-18 19:08:08 UTC (rev 774)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-12-19 17:50:40 UTC (rev 775)
@@ -526,7 +526,7 @@
strTipText = "Gxx and Exx/Fxx won't share effect memory. Gxx resets instrument envelopes.";
break;
case IDC_CHECK5:
- strTipText = "The resonant filter's frequency range is incresed from about 4KHz to 10KHz.";
+ strTipText = "The resonant filter's frequency range is increased from about 4KHz to 10KHz.";
break;
case IDC_CHECK6:
strTipText = "The instrument settings of the external ITI files will be ignored.";
@@ -1873,6 +1873,39 @@
}
+void CSampleGridDlg::DoDataExchange(CDataExchange* pDX)
+//-----------------------------------------------------
+{
+ CDialog::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CSampleGridDlg)
+ DDX_Control(pDX, IDC_EDIT1, m_EditSegments);
+ DDX_Control(pDX, IDC_SPIN1, m_SpinSegments);
+ //}}AFX_DATA_MAP
+}
+
+
+BOOL CSampleGridDlg::OnInitDialog()
+//---------------------------------
+{
+ CDialog::OnInitDialog();
+ m_SpinSegments.SetRange32(0, m_nMaxSegments);
+ m_SpinSegments.SetPos(m_nSegments);
+ SetDlgItemInt(IDC_EDIT1, m_nSegments, FALSE);
+ GetDlgItem(IDC_EDIT1)->SetFocus();
+ return TRUE;
+}
+
+
+void CSampleGridDlg::OnOK()
+//-------------------------
+{
+ m_nSegments = GetDlgItemInt(IDC_EDIT1, NULL, FALSE);
+ CDialog::OnOK();
+}
+
+
+
+
////////////////////////////////////////////////////////////////////////////////
// Sound Bank Information
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2010-12-18 19:08:08 UTC (rev 774)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2010-12-19 17:50:40 UTC (rev 775)
@@ -447,7 +447,28 @@
};
+//==================================
+class CSampleGridDlg: public CDialog
+//==================================
+{
+public:
+ int m_nSegments, m_nMaxSegments;
+protected:
+ CEdit m_EditSegments;
+ CSpinButtonCtrl m_SpinSegments;
+
+public:
+ CSampleGridDlg(CWnd *parent, int nSegments, int nMaxSegments) : CDialog(IDD_SAMPLE_GRID_SIZE, parent) { m_nSegments = nSegments; m_nMaxSegments = nMaxSegments; };
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX);
+ virtual BOOL OnInitDialog();
+ virtual void OnOK();
+};
+
+
+
////////////////////////////////////////////////////////////////////////
// Sound Banks
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2010-12-18 19:08:08 UTC (rev 774)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2010-12-19 17:50:40 UTC (rev 775)
@@ -160,7 +160,20 @@
LTEXT "",IDC_TOTAL_EDIT_TIME,60,165,192,15
END
+IDD_SAMPLE_GRID_SIZE DIALOGEX 0, 0, 154, 71
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Sample Grid Size"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ EDITTEXT IDC_EDIT1,66,6,42,12,ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,102,6,11,14
+ DEFPUSHBUTTON "&OK",IDOK,42,48,50,14
+ PUSHBUTTON "&Cancel",IDCANCEL,96,48,50,14
+ LTEXT "Input the number of grid segments, or input ""0"" to disable the grid.",IDC_STATIC,6,24,138,24
+ LTEXT "Grid Segments:",IDC_STATIC,6,8,60,8
+END
+
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
@@ -224,6 +237,14 @@
TOPMARGIN, 7
BOTTOMMARGIN, 178
END
+
+ IDD_SAMPLE_GRID_SIZE, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 147
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 64
+ END
END
#endif // APSTUDIO_INVOKED
@@ -415,7 +436,7 @@
END
IDD_OPTIONS_MIDI DIALOGEX 0, 0, 272, 281
-STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD | WS_DISABLED | WS_CAPTION
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "MIDI"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
@@ -435,7 +456,7 @@
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,140,226,9
CONTROL "Pass MIDI to active instrument plugin (experimental)",IDC_MIDI_TO_PLUGIN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,155,180,9
- CONTROL "Respond to play/continue/stop song messages (untested)",IDC_MIDIPLAYCONTROL,
+ CONTROL "Respond to play/continue/stop song messages",IDC_MIDIPLAYCONTROL,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,170,200,9
CONTROL "Continue song as soon as MIDI notes are being received",IDC_MIDIPLAYPATTERNONMIDIIN,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,185,195,10
Modified: trunk/OpenMPT/mptrack/res/smptoolb.bmp
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2010-12-18 19:08:08 UTC (rev 774)
+++ trunk/OpenMPT/mptrack/resource.h 2010-12-19 17:50:40 UTC (rev 775)
@@ -136,6 +136,7 @@
#define IDD_SAMPLE_GENERATOR 524
#define IDD_SAMPLE_GENERATOR_PRESETS 525
#define IDD_EDITHISTORY 526
+#define IDD_SAMPLE_GRID_SIZE 527
#define IDC_BUTTON1 1001
#define IDC_BUTTON2 1002
#define IDC_BUTTON3 1003
@@ -1185,14 +1186,15 @@
#define ID_ENVELOPE_ZOOM_OUT 60450
#define ID_PANIC 60451
#define ID_VIEW_EDITHISTORY 60452
+#define ID_SAMPLE_GRID 60453
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
-#define _APS_NEXT_RESOURCE_VALUE 527
-#define _APS_NEXT_COMMAND_VALUE 60453
+#define _APS_NEXT_RESOURCE_VALUE 528
+#define _APS_NEXT_COMMAND_VALUE 60454
#define _APS_NEXT_CONTROL_VALUE 2433
#define _APS_NEXT_SYMED_VALUE 901
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-12-18 19:08:14
|
Revision: 774
http://modplug.svn.sourceforge.net/modplug/?rev=774&view=rev
Author: saga-games
Date: 2010-12-18 19:08:08 +0000 (Sat, 18 Dec 2010)
Log Message:
-----------
[Fix] VST Handling: Speaker arrangement is now sent to the plugins upon initialization. This fixes Voxengo SPAN 2 (a VST 2.4 plugin). Does this break other multichannel plugins?
[Mod] OpenMPT: Version is now 1.19.00.16
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/version.h
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2010-12-18 19:06:01 UTC (rev 773)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2010-12-18 19:08:08 UTC (rev 774)
@@ -1728,7 +1728,7 @@
void CVstPlugin::Initialize(CSoundFile* pSndFile)
-//-------------------------------------------
+//-----------------------------------------------
{
if (!m_pEvList)
{
@@ -1759,7 +1759,38 @@
m_bIsVst2 = (CVstPlugin::Dispatch(effGetVstVersion, 0,0, NULL, 0) >= 2) ? TRUE : FALSE;
if (m_bIsVst2)
{
- // Dummy pin properies collection.
+ // Set VST speaker in/out setup to Stereo. Required for some plugins (possibly all VST 2.4+ plugins?)
+ // All this might get more interesting when adding sidechaining support...
+ VstSpeakerArrangement sa;
+ MemsetZero(sa);
+ sa.numChannels = 2;
+ sa.type = kSpeakerArrStereo;
+ for(int i = 0; i < ARRAYELEMCOUNT(sa.speakers); i++)
+ {
+ sa.speakers[i].azimuth = 0;
+ sa.speakers[i].elevation = 0;
+ sa.speakers[i].radius = 0;
+ sa.speakers[i].reserved = 0.0f;
+ // For now, only left and right speaker are used.
+ switch(i)
+ {
+ case 0:
+ sa.speakers[i].type = kSpeakerL;
+ strcpy(sa.speakers[i].name, "Left");
+ break;
+ case 1:
+ sa.speakers[i].type = kSpeakerR;
+ strcpy(sa.speakers[i].name, "Right");
+ break;
+ default:
+ sa.speakers[i].type = kSpeakerUndefined;
+ break;
+ }
+ }
+ // For now, input setup = output setup.
+ Dispatch(effSetSpeakerArrangement, 0, (LONG_PTR)(&sa), &sa, 0.0f);
+
+ // Dummy pin properties collection.
// We don't use them but some plugs might do inits in here.
VstPinProperties tempPinProperties;
Dispatch(effGetInputProperties, 0, 0, &tempPinProperties, 0);
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-12-18 19:06:01 UTC (rev 773)
+++ trunk/OpenMPT/mptrack/version.h 2010-12-18 19:08:08 UTC (rev 774)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 19
#define VER_MINOR 00
-#define VER_MINORMINOR 15
+#define VER_MINORMINOR 16
//Creates version number from version parts that appears in version string.
//For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-12-18 19:06:08
|
Revision: 773
http://modplug.svn.sourceforge.net/modplug/?rev=773&view=rev
Author: saga-games
Date: 2010-12-18 19:06:01 +0000 (Sat, 18 Dec 2010)
Log Message:
-----------
[Fix] Pattern Editor: Pressing Shift doesn't interfere with full row selection anymore (http://bugs.openmpt.org/view.php?id=45#c24)
[Mod] Config Dialog: The MMX acceleration label is now updated according to the multimedia extensions that are supported by the CPU (3DNow! / SSE)
[Ref] Added some comments to the HW-accelerated mixing code
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mpdlgs.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/soundlib/Mmx_mix.cpp
trunk/OpenMPT/soundlib/Snd_defs.h
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2010-12-13 15:23:38 UTC (rev 772)
+++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2010-12-18 19:06:01 UTC (rev 773)
@@ -113,7 +113,16 @@
if (m_dwSoundSetup & SOUNDSETUP_SOFTPANNING) CheckDlgButton(IDC_CHECK2, MF_CHECKED);
if (m_dwSoundSetup & SOUNDSETUP_ENABLEMMX) CheckDlgButton(IDC_CHECK3, MF_CHECKED);
if (m_dwSoundSetup & SOUNDSETUP_SECONDARY) CheckDlgButton(IDC_CHECK4, MF_CHECKED);
+ // Multimedia extensions
::EnableWindow(::GetDlgItem(m_hWnd, IDC_CHECK3), (CSoundFile::GetSysInfo() & SYSMIX_ENABLEMMX) ? TRUE : FALSE);
+ if(CSoundFile::GetSysInfo() & SYSMIX_SSE)
+ {
+ SetDlgItemText(IDC_CHECK3, _T("Enable SSE acceleration"));
+ } else if (CSoundFile::GetSysInfo() & SYSMIX_3DNOW)
+ {
+ SetDlgItemText(IDC_CHECK3, _T("Enable 3DNow! acceleration"));
+ }
+
// Sampling Rate
{
UINT n = 1;
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-13 15:23:38 UTC (rev 772)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-18 19:06:01 UTC (rev 773)
@@ -903,7 +903,7 @@
if (rm.note)
{
if(m->IsPcNote())
- { // Clear whole row if clearing PC note
+ { // Clear whole cell if clearing PC note
m->Clear();
invalidateAllCols = true;
}
@@ -3707,14 +3707,14 @@
return wParam; }
case kcSelectWithCopySelect:
case kcSelectWithNav:
- case kcSelect: if (!(m_dwStatus & PATSTATUS_DRAGNDROPEDIT)) m_dwStartSel = (m_nRow << 16) | m_dwCursor;
+ case kcSelect: if (!(m_dwStatus & (PATSTATUS_DRAGNDROPEDIT|PATSTATUS_SELECTROW))) m_dwStartSel = (m_nRow << 16) | m_dwCursor;
m_dwStatus |= PATSTATUS_KEYDRAGSEL; return wParam;
case kcSelectOffWithCopySelect:
case kcSelectOffWithNav:
case kcSelectOff: m_dwStatus &= ~PATSTATUS_KEYDRAGSEL; return wParam;
case kcCopySelectWithSelect:
case kcCopySelectWithNav:
- case kcCopySelect: if (!(m_dwStatus & PATSTATUS_DRAGNDROPEDIT)) m_dwStartSel = (m_nRow << 16) | m_dwCursor;
+ case kcCopySelect: if (!(m_dwStatus & (PATSTATUS_DRAGNDROPEDIT|PATSTATUS_SELECTROW))) m_dwStartSel = (m_nRow << 16) | m_dwCursor;
m_dwStatus |= PATSTATUS_CTRLDRAGSEL; return wParam;
case kcCopySelectOffWithSelect:
case kcCopySelectOffWithNav:
@@ -4930,8 +4930,8 @@
AppendMenu(hMenu, (pSndFile->ChnSettings[nChn].dwFlags & CHN_MUTE) ?
(MF_STRING|MF_CHECKED) : MF_STRING, ID_PATTERN_MUTE,
"Mute Channel\t" + ih->GetKeyTextFromCommand(kcChannelMute));
- BOOL bSolo = false, bUnmuteAll = false;
- BOOL bSoloPending = false, bUnmuteAllPending = false; // doesn't work perfectly yet
+ bool bSolo = false, bUnmuteAll = false;
+ bool bSoloPending = false, bUnmuteAllPending = false; // doesn't work perfectly yet
for (CHANNELINDEX i = 0; i < pSndFile->m_nChannels; i++) {
if (i != nChn)
Modified: trunk/OpenMPT/soundlib/Mmx_mix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Mmx_mix.cpp 2010-12-13 15:23:38 UTC (rev 772)
+++ trunk/OpenMPT/soundlib/Mmx_mix.cpp 2010-12-18 19:06:01 UTC (rev 773)
@@ -37,7 +37,7 @@
#define PROCSUPPORT_3DNOW 0x08
#define PROCSUPPORT_SSE 0x10
-
+// Byte offsets into the MODCHANNEL structure
#define CHNOFS_PCURRENTSAMPLE 0
#define CHNOFS_NPOS 4
#define CHNOFS_NPOSLO 8
Modified: trunk/OpenMPT/soundlib/Snd_defs.h
===================================================================
--- trunk/OpenMPT/soundlib/Snd_defs.h 2010-12-13 15:23:38 UTC (rev 772)
+++ trunk/OpenMPT/soundlib/Snd_defs.h 2010-12-18 19:06:01 UTC (rev 773)
@@ -282,12 +282,12 @@
#define DNA_NOTEFADE 2
// Mixer Hardware-Dependent features
-#define SYSMIX_ENABLEMMX 0x01
-#define SYSMIX_SLOWCPU 0x02
-#define SYSMIX_FASTCPU 0x04
-#define SYSMIX_MMXEX 0x08
-#define SYSMIX_3DNOW 0x10
-#define SYSMIX_SSE 0x20
+#define SYSMIX_ENABLEMMX 0x01 // Hardware acceleration features (MMX/3DNow!/SSE) are supported by this processor
+#define SYSMIX_SLOWCPU 0x02 // *Really* old processor (in this context, it doesn't know CPUID instructions => Must be older than Pentium)
+#define SYSMIX_FASTCPU 0x04 // "Fast" processor (in this context, anything that is at least a Pentium MMX)
+#define SYSMIX_MMXEX 0x08 // Processor supports AMD MMX extensions
+#define SYSMIX_3DNOW 0x10 // Processor supports AMD 3DNow! instructions
+#define SYSMIX_SSE 0x20 // Processor supports SSE instructions
// Module flags
#define SONG_EMBEDMIDICFG 0x0001 // Embed macros in file
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-12-13 15:23:38 UTC (rev 772)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-12-18 19:06:01 UTC (rev 773)
@@ -175,6 +175,7 @@
typedef struct __declspec(align(32)) _MODCHANNEL
{
// First 32-bytes: Most used mixing information: don't change it
+ // These fields are accessed directly by the MMX mixing code (look out for CHNOFS_PCURRENTSAMPLE), so the order is crucial
LPSTR pCurrentSample;
DWORD nPos;
DWORD nPosLo; // actually 16-bit
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-12-13 15:23:45
|
Revision: 772
http://modplug.svn.sourceforge.net/modplug/?rev=772&view=rev
Author: saga-games
Date: 2010-12-13 15:23:38 +0000 (Mon, 13 Dec 2010)
Log Message:
-----------
[Imp] Pattern Editor: The new "select whole row" feature now also autoscrolls the pattern.
[Ref] Some refactoring (IT Saver: Using IsPatternEmpty, const modifiers in modcommand.h, refactored visited rows code for future expansion)
[Mod] OpenMPT: Version is now 1.19.00.15
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/version.h
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/modcommand.h
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-06 23:54:31 UTC (rev 771)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-13 15:23:38 UTC (rev 772)
@@ -512,6 +512,11 @@
}
+// Drag a selection to position dwPos.
+// If bScroll is true, the point dwPos is scrolled into the view if needed.
+// If bNoMode if specified, the original selection points are not altered.
+// Note that scrolling will only be executed if dwPos contains legal coordinates.
+// This can be useful when selecting a whole row and specifying 0xFFFF as the end channel.
BOOL CViewPattern::DragToSel(DWORD dwPos, BOOL bScroll, BOOL bNoMove)
//-------------------------------------------------------------------
{
@@ -1322,7 +1327,7 @@
// Mark row number => mark whole row (continue)
InvalidateSelection();
m_dwEndSel = GetPositionFromPoint(point) | 0xFFFF;
- SetCurSel(m_dwStartSel, m_dwEndSel);
+ DragToSel(m_dwEndSel, TRUE, FALSE);
} else if (m_dwStatus & PATSTATUS_MOUSEDRAGSEL)
{
CModDoc *pModDoc = GetDocument();
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-12-06 23:54:31 UTC (rev 771)
+++ trunk/OpenMPT/mptrack/version.h 2010-12-13 15:23:38 UTC (rev 772)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 19
#define VER_MINOR 00
-#define VER_MINORMINOR 14
+#define VER_MINORMINOR 15
//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/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-12-06 23:54:31 UTC (rev 771)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-12-13 15:23:38 UTC (rev 772)
@@ -1637,22 +1637,12 @@
bNeedsMptPatSave = true;
// Check for empty pattern
- if (Patterns[npat].GetNumRows() == 64)
+ if (Patterns[npat].GetNumRows() == 64 && Patterns.IsPatternEmpty(npat))
{
- MODCOMMAND *pzc = Patterns[npat];
- UINT nz = Patterns[npat].GetNumRows() * m_nChannels;
- UINT iz = 0;
- for (iz=0; iz<nz; iz++)
- {
- if ((pzc[iz].note) || (pzc[iz].instr)
- || (pzc[iz].volcmd) || (pzc[iz].command)) break;
- }
- if (iz == nz)
- {
- patpos[npat] = 0;
- continue;
- }
+ patpos[npat] = 0;
+ continue;
}
+
fwrite(patinfo, 8, 1, f);
dwPos += 8;
memset(chnmask, 0xFF, sizeof(chnmask));
@@ -2237,23 +2227,14 @@
patinfo[1] = Patterns[npat].GetNumRows();
patinfo[2] = 0;
patinfo[3] = 0;
+
// Check for empty pattern
- if (Patterns[npat].GetNumRows() == 64)
+ if (Patterns[npat].GetNumRows() == 64 && Patterns.IsPatternEmpty(npat))
{
- MODCOMMAND *pzc = Patterns[npat];
- UINT nz = Patterns[npat].GetNumRows() * nChannels;
- UINT iz = 0;
- for (iz=0; iz<nz; iz++)
- {
- if ((pzc[iz].note) || (pzc[iz].instr)
- || (pzc[iz].volcmd) || (pzc[iz].command)) break;
- }
- if (iz == nz)
- {
- patpos[npat] = 0;
- continue;
- }
+ patpos[npat] = 0;
+ continue;
}
+
fwrite(patinfo, 8, 1, f);
dwPos += 8;
memset(chnmask, 0xFF, sizeof(chnmask));
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-12-06 23:54:31 UTC (rev 771)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-12-13 15:23:38 UTC (rev 772)
@@ -78,10 +78,6 @@
{
bool dummy = false;
double result = GetLength(dummy, bAdjust, endOrder, endRow);
- if(!bAdjust)
- {
- InitializeVisitedRows(true); // forget that we went over the whole module.
- }
return result;
}
@@ -106,28 +102,22 @@
// -! NEW_FEATURE#0022
UINT nMusicSpeed = m_nDefaultSpeed, nMusicTempo = m_nDefaultTempo, nNextRow = 0;
LONG nGlbVol = m_nDefaultGlobalVolume, nOldGlbVolSlide = 0;
- vector<BYTE> instr;
- vector<UINT> notes;
- vector<BYTE> vols;
- vector<BYTE> oldparam;
- vector<UINT> chnvols;
- vector<double> patloop;
- vector<ROWINDEX> patloopstart;
-
- notes.resize(m_nChannels, 0);
- instr.resize(m_nChannels, 0);
- vols.resize(m_nChannels, 0xFF);
- oldparam.resize(m_nChannels, 0);
- chnvols.resize(m_nChannels, 64);
- patloop.resize(m_nChannels, 0);
- patloopstart.resize(m_nChannels, 0);
+ vector<BYTE> instr(m_nChannels, 0);
+ vector<UINT> notes(m_nChannels, 0);
+ vector<BYTE> vols(m_nChannels, 0xFF);
+ vector<BYTE> oldparam(m_nChannels, 0);
+ vector<UINT> chnvols(m_nChannels, 64);
+ vector<double> patloop(m_nChannels, 0);
+ vector<ROWINDEX> patloopstart(m_nChannels, 0);
+ VisitedRowsType visitedRows; // temporary visited rows vector (so that GetLength() won't interfere with the player code if the module is playing at the same time)
+
+ InitializeVisitedRows(true, &visitedRows);
+
for(CHANNELINDEX icv = 0; icv < m_nChannels; icv++) chnvols[icv] = ChnSettings[icv].nVolume;
nCurrentPattern = nNextPattern = 0;
nPattern = Order[0];
nRow = nNextRow = 0;
- InitializeVisitedRows(true);
-
for (;;)
{
UINT nSpeedCount = 0;
@@ -157,7 +147,7 @@
}
nPattern = (nCurrentPattern < Order.size()) ? Order[nCurrentPattern] : Order.GetInvalidPatIndex();
nNextPattern = nCurrentPattern;
- if((!Patterns.IsValidPat(nPattern)) && IsRowVisited(nCurrentPattern, 0, true))
+ if((!Patterns.IsValidPat(nPattern)) && IsRowVisited(nCurrentPattern, 0, true, &visitedRows))
break;
}
// Skip non-existing patterns
@@ -180,7 +170,7 @@
break;
}
- if(IsRowVisited(nCurrentPattern, nRow, true))
+ if(IsRowVisited(nCurrentPattern, nRow, true, &visitedRows))
break;
// Update next position
@@ -458,6 +448,8 @@
m_nMusicTempo = m_nDefaultTempo;
m_nGlobalVolume = m_nDefaultGlobalVolume;
}
+ // When adjusting the playback status, we will also want to update the visited rows vector according to the current position.
+ m_bVisitedRows = visitedRows;
}
return dElapsedTime / 1000.0;
@@ -4220,8 +4212,8 @@
Specific implementations:
Length detection code:
- As the ModPlug engine already deals with pattern loops sufficiently, there's no problem with (infinite) pattern loops
- in this code.
+ As the ModPlug engine already deals with pattern loops sufficiently (though not always correctly),
+ there's no problem with (infinite) pattern loops in this code.
Normal player code:
Bare in mind that rows inside pattern loops should only be evaluated once, or else the algorithm will cancel too early!
@@ -4229,65 +4221,97 @@
*/
-void CSoundFile::InitializeVisitedRows(const bool bReset)
-//-------------------------------------------------------
+// Resize / Clear the row vector.
+// If bReset is true, the vector is not only resized to the required dimensions, but also completely cleared (i.e. all visited rows are unset).
+// If pRowVector is specified, an alternative row vector instead of the module's global one will be used (f.e. when using GetLength()).
+void CSoundFile::InitializeVisitedRows(const bool bReset, VisitedRowsType *pRowVector)
+//------------------------------------------------------------------------------------
{
- m_bVisitedRows.resize(Order.GetLengthTailTrimmed());
+ if(pRowVector == nullptr)
+ {
+ pRowVector = &m_bVisitedRows;
+ }
+ pRowVector->resize(Order.GetLengthTailTrimmed());
for(ORDERINDEX nOrd = 0; nOrd < Order.GetLengthTailTrimmed(); nOrd++)
{
- // If we want to reset the vectors completely, we overwrite exisiting items with 0.
+ VisitedRowsBaseType *pRow = &(pRowVector->at(nOrd));
+ // If we want to reset the vectors completely, we overwrite existing items with false.
if(bReset)
{
- for(size_t i = 0; i < m_bVisitedRows[nOrd].size(); i++)
- {
- m_bVisitedRows[nOrd][i] = false;
- }
+ pRow->assign(pRow->size(), false);
}
- m_bVisitedRows[nOrd].resize(GetVisitedRowsVectorSize(Order[nOrd]), false);
+ pRow->resize(GetVisitedRowsVectorSize(Order[nOrd]), false);
}
}
// (Un)sets a given row as visited.
-void CSoundFile::SetRowVisited(const ORDERINDEX nOrd, const ROWINDEX nRow, const bool bVisited)
-//---------------------------------------------------------------------------------------------
+// nOrd, nRow - which row should be (un)set
+// If bVisited is true, the row will be set as visited.
+// If pRowVector is specified, an alternative row vector instead of the module's global one will be used (f.e. when using GetLength()).
+void CSoundFile::SetRowVisited(const ORDERINDEX nOrd, const ROWINDEX nRow, const bool bVisited, VisitedRowsType *pRowVector)
+//--------------------------------------------------------------------------------------------------------------------------
{
const ORDERINDEX nMaxOrd = Order.GetLengthTailTrimmed();
if(nOrd >= nMaxOrd || nRow > Patterns[Order[nOrd]].GetNumRows())
+ {
return;
+ }
+ if(pRowVector == nullptr)
+ {
+ pRowVector = &m_bVisitedRows;
+ }
+
// The module might have been edited in the meantime - so we have to extend this a bit.
- if(nOrd >= m_bVisitedRows.size() || nRow >= m_bVisitedRows[nOrd].size())
- InitializeVisitedRows(false);
+ if(nOrd >= pRowVector->size() || nRow >= pRowVector->at(nOrd).size())
+ {
+ InitializeVisitedRows(false, pRowVector);
+ }
- m_bVisitedRows[nOrd][nRow] = bVisited;
+ pRowVector->at(nOrd)[nRow] = bVisited;
}
// Returns if a given row has been visited yet.
// If bAutoSet is true, the queried row will automatically be marked as visited.
-// Use this parameter instead of consecutive IsRowVisited/SetRowVisited calls, as it's faster.
-bool CSoundFile::IsRowVisited(const ORDERINDEX nOrd, const ROWINDEX nRow, const bool bAutoSet)
-//--------------------------------------------------------------------------------------------
+// Use this parameter instead of consecutive IsRowVisited/SetRowVisited calls.
+// If pRowVector is specified, an alternative row vector instead of the module's global one will be used (f.e. when using GetLength()).
+bool CSoundFile::IsRowVisited(const ORDERINDEX nOrd, const ROWINDEX nRow, const bool bAutoSet, VisitedRowsType *pRowVector)
+//-------------------------------------------------------------------------------------------------------------------------
{
const ORDERINDEX nMaxOrd = Order.GetLengthTailTrimmed();
if(nOrd >= nMaxOrd)
+ {
return false;
+ }
+ if(pRowVector == nullptr)
+ {
+ pRowVector = &m_bVisitedRows;
+ }
+
// The row slot for this row has not been assigned yet - Just return false, as this means that the program has not played the row yet.
- if(nOrd >= m_bVisitedRows.size() || nRow >= m_bVisitedRows[nOrd].size())
+ if(nOrd >= pRowVector->size() || nRow >= pRowVector->at(nOrd).size())
{
if(bAutoSet)
- SetRowVisited(nOrd, nRow, true);
+ {
+ SetRowVisited(nOrd, nRow, true, pRowVector);
+ }
return false;
}
- if(m_bVisitedRows[nOrd][nRow])
- return true; // we visited this row already - this module must be looping.
+ if(pRowVector->at(nOrd)[nRow])
+ {
+ // we visited this row already - this module must be looping.
+ return true;
+ }
if(bAutoSet)
- m_bVisitedRows[nOrd][nRow] = true;
+ {
+ pRowVector->at(nOrd)[nRow] = true;
+ }
return false;
}
@@ -4298,7 +4322,12 @@
//------------------------------------------------------------------
{
if(Patterns.IsValidPat(nPat))
+ {
return (size_t)(Patterns[nPat].GetNumRows());
+ }
else
- return 1; // invalid patterns consist of a "fake" row.
+ {
+ // invalid patterns consist of a "fake" row.
+ return 1;
+ }
}
\ No newline at end of file
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-12-06 23:54:31 UTC (rev 771)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-12-13 15:23:38 UTC (rev 772)
@@ -470,10 +470,11 @@
ORDERINDEX order; // which order is this?
};
+// Data type for the visited rows routines.
+typedef vector<bool> VisitedRowsBaseType;
+typedef vector<VisitedRowsBaseType> VisitedRowsType;
-class CSoundFile;
-
//Note: These are bit indeces. MSF <-> Mod(Specific)Flag.
//If changing these, ChangeModTypeTo() might need modification.
const BYTE MSF_COMPATIBLE_PLAY = 0; //IT/MPT/XM
@@ -553,7 +554,7 @@
const CModSpecifications* m_pModSpecs;
// For handling backwards jumps and stuff to prevent infinite loops when counting the mod length or rendering to wav.
- vector<vector<bool> > m_bVisitedRows;
+ VisitedRowsType m_bVisitedRows;
@@ -689,6 +690,7 @@
//Returns song length in seconds.
DWORD GetSongTime() { return static_cast<DWORD>((m_nTempoMode == tempo_mode_alternative) ? GetLength(false) + 1.0 : GetLength(false) + 0.5); }
+ // A repeat count value of -1 means infinite loop
void SetRepeatCount(int n) { m_nRepeatCount = n; }
int GetRepeatCount() const { return m_nRepeatCount; }
bool IsPaused() const { return (m_dwSongFlags & (SONG_PAUSED|SONG_STEP)) ? true : false; } // Added SONG_STEP as it seems to be desirable in most cases to check for this as well.
@@ -1023,10 +1025,10 @@
// A couple of functions for handling backwards jumps and stuff to prevent infinite loops when counting the mod length or rendering to wav.
public:
- void InitializeVisitedRows(const bool bReset = true);
+ void InitializeVisitedRows(const bool bReset = true, VisitedRowsType *pRowVector = nullptr);
private:
- void SetRowVisited(const ORDERINDEX nOrd, const ROWINDEX nRow, const bool bVisited = true);
- bool IsRowVisited(const ORDERINDEX nOrd, const ROWINDEX nRow, const bool bAutoSet = true);
+ void SetRowVisited(const ORDERINDEX nOrd, const ROWINDEX nRow, const bool bVisited = true, VisitedRowsType *pRowVector = nullptr);
+ bool IsRowVisited(const ORDERINDEX nOrd, const ROWINDEX nRow, const bool bAutoSet = true, VisitedRowsType *pRowVector = nullptr);
size_t GetVisitedRowsVectorSize(const PATTERNINDEX nPat);
public:
Modified: trunk/OpenMPT/soundlib/modcommand.h
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.h 2010-12-06 23:54:31 UTC (rev 771)
+++ trunk/OpenMPT/soundlib/modcommand.h 2010-12-13 15:23:38 UTC (rev 772)
@@ -53,7 +53,7 @@
// Returns true if modcommand is empty, false otherwise.
// If ignoreEffectValues is true (default), effect values are ignored are ignored if there is no effect command present.
- bool IsEmpty(bool ignoreEffectValues = true) const
+ bool IsEmpty(const bool ignoreEffectValues = true) const
{
if(ignoreEffectValues)
return (this->note == 0 && this->instr == 0 && this->volcmd == 0 && this->command == 0);
@@ -66,7 +66,7 @@
// Returns true if and only if note is NOTE_PC or NOTE_PCS.
bool IsPcNote() const { return note == NOTE_PC || note == NOTE_PCS; }
- static bool IsPcNote(NOTE note_id) { return note_id == NOTE_PC || note_id == NOTE_PCS; }
+ static bool IsPcNote(const NOTE note_id) { return note_id == NOTE_PC || note_id == NOTE_PCS; }
// Swap volume and effect column (doesn't do any conversion as it's mainly for importing formats with multiple effect columns, so beware!)
void SwapEffects()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-12-06 23:54:37
|
Revision: 771
http://modplug.svn.sourceforge.net/modplug/?rev=771&view=rev
Author: saga-games
Date: 2010-12-06 23:54:31 +0000 (Mon, 06 Dec 2010)
Log Message:
-----------
[Imp] Find/Replace: When changing the content of a combobox, the corresponding checkbox is now automatically checked. Likewise, the "Replace By" checkbox is checked if a checkbox or combobox on the "Replace" tab is enabled.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-12-04 20:07:14 UTC (rev 770)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-12-06 23:54:31 UTC (rev 771)
@@ -730,7 +730,19 @@
// Find/Replace Dialog
BEGIN_MESSAGE_MAP(CFindReplaceTab, CPropertyPage)
+ ON_CBN_SELCHANGE(IDC_COMBO1, OnNoteChanged)
+ ON_CBN_SELCHANGE(IDC_COMBO2, OnInstrChanged)
+ ON_CBN_SELCHANGE(IDC_COMBO3, OnVolCmdChanged)
+ ON_CBN_SELCHANGE(IDC_COMBO4, OnVolumeChanged)
ON_CBN_SELCHANGE(IDC_COMBO5, OnEffectChanged)
+ ON_CBN_SELCHANGE(IDC_COMBO6, OnParamChanged)
+ ON_COMMAND(IDC_CHECK1, OnCheckNote)
+ ON_COMMAND(IDC_CHECK2, OnCheckInstr)
+ ON_COMMAND(IDC_CHECK3, OnCheckVolCmd)
+ ON_COMMAND(IDC_CHECK4, OnCheckVolume)
+ ON_COMMAND(IDC_CHECK5, OnCheckEffect)
+ ON_COMMAND(IDC_CHECK6, OnCheckParam)
+
ON_COMMAND(IDC_CHECK7, OnCheckChannelSearch)
END_MESSAGE_MAP()
@@ -880,14 +892,14 @@
break;
}
}
- OnEffectChanged();
+ ChangeEffect();
OnCheckChannelSearch();
return TRUE;
}
-void CFindReplaceTab::OnEffectChanged()
-//-------------------------------------
+void CFindReplaceTab::ChangeEffect()
+//----------------------------------
{
int fxndx = -1;
CComboBox *combo;
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2010-12-04 20:07:14 UTC (rev 770)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2010-12-06 23:54:31 UTC (rev 771)
@@ -188,13 +188,34 @@
// Make sure there's unused notes between NOTE_MAX and NOTE_MIN_SPECIAL.
STATIC_ASSERT(NOTE_MIN_SPECIAL - 4 > NOTE_MAX);
+protected:
+ void ChangeEffect();
+
public:
CFindReplaceTab(UINT nIDD, BOOL bReplaceTab, CModDoc *pModDoc):CPropertyPage(nIDD) { m_bReplace = bReplaceTab; m_pModDoc = pModDoc; }
protected:
virtual BOOL OnInitDialog();
virtual void OnOK();
- afx_msg void OnEffectChanged();
+
+ // When a combobox is focussed, check the corresponding checkbox.
+ void CheckOnChange(int nIDButton) { CheckDlgButton(nIDButton, BST_CHECKED); CheckReplace(nIDButton); };
+ afx_msg void OnNoteChanged() { CheckOnChange(IDC_CHECK1); };
+ afx_msg void OnInstrChanged() { CheckOnChange(IDC_CHECK2); };
+ afx_msg void OnVolCmdChanged() { CheckOnChange(IDC_CHECK3); };
+ afx_msg void OnVolumeChanged() { CheckOnChange(IDC_CHECK4); };
+ afx_msg void OnEffectChanged() { CheckOnChange(IDC_CHECK5); ChangeEffect(); };
+ afx_msg void OnParamChanged() { CheckOnChange(IDC_CHECK6); };
+ // When a checkbox is checked, also check "Replace By".
+ afx_msg void OnCheckNote() { CheckReplace(IDC_CHECK1); };
+ afx_msg void OnCheckInstr() { CheckReplace(IDC_CHECK2); };
+ afx_msg void OnCheckVolCmd() { CheckReplace(IDC_CHECK3); };
+ afx_msg void OnCheckVolume() { CheckReplace(IDC_CHECK4); };
+ afx_msg void OnCheckEffect() { CheckReplace(IDC_CHECK5); };
+ afx_msg void OnCheckParam() { CheckReplace(IDC_CHECK6); };
+ // Check "Replace By"
+ afx_msg void CheckReplace(int nIDButton) { if(m_bReplace && IsDlgButtonChecked(nIDButton)) CheckDlgButton(IDC_CHECK7, BST_CHECKED); };
+
afx_msg void OnCheckChannelSearch();
DECLARE_MESSAGE_MAP()
};
@@ -392,9 +413,9 @@
addsilence_resize, // Resize sample
};
-//===========================
+//==================================
class CAddSilenceDlg: public CDialog
-//===========================
+//==================================
{
protected:
enmAddSilenceOptions GetEditMode();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-12-04 20:07:21
|
Revision: 770
http://modplug.svn.sourceforge.net/modplug/?rev=770&view=rev
Author: saga-games
Date: 2010-12-04 20:07:14 +0000 (Sat, 04 Dec 2010)
Log Message:
-----------
[Mod] Undo steps have been increased from 100 to 1000.
[Fix] Pattern Editor: Find/Replace in selection didn't work when not using "Replace All" (i.e. Finding didn't work at all)
[Mod] Pattern Editor: "Replace All" just creates one undo point now.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Undo.h
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
Modified: trunk/OpenMPT/mptrack/Undo.h
===================================================================
--- trunk/OpenMPT/mptrack/Undo.h 2010-12-03 22:12:57 UTC (rev 769)
+++ trunk/OpenMPT/mptrack/Undo.h 2010-12-04 20:07:14 UTC (rev 770)
@@ -9,7 +9,7 @@
#pragma once
-#define MAX_UNDO_LEVEL 100 // 100 undo steps for each undo type!
+#define MAX_UNDO_LEVEL 1000 // 1000 undo steps for each undo type!
/////////////////////////////////////////////////////////////////////////////////////////
// Pattern Undo
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-03 22:12:57 UTC (rev 769)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-04 20:07:14 UTC (rev 770)
@@ -30,6 +30,7 @@
PATSEARCH_FULLSEARCH, PATSEARCH_REPLACEALL,
0, 0,
0,
+ 0, 0,
};
MODCOMMAND CViewPattern::m_cmdOld = {0,0,0,0,0,0};
@@ -1734,6 +1735,8 @@
m_findReplace.cmdReplace.param = pageReplace.m_nParam;
m_findReplace.dwReplaceFlags = pageReplace.m_dwFlags;
m_findReplace.cInstrRelChange = pageReplace.cInstrRelChange;
+ m_findReplace.dwBeginSel = m_dwBeginSel;
+ m_findReplace.dwEndSel = m_dwEndSel;
m_bContinueSearch = false;
OnEditFindNext();
}
@@ -1847,8 +1850,9 @@
// limit to pattern selection
const CHANNELINDEX ch = n % pSndFile->m_nChannels;
const ROWINDEX row = n / pSndFile->m_nChannels;
- if ((ch < GetSelectionStartChan()) || (ch > GetSelectionEndChan())) bFound = false;
- if ((row < GetSelectionStartRow()) || (row > GetSelectionEndRow())) bFound = false;
+
+ if ((ch < GetChanFromCursor(m_findReplace.dwBeginSel)) || (ch > GetChanFromCursor(m_findReplace.dwEndSel))) bFound = false;
+ if ((row < GetRowFromCursor(m_findReplace.dwBeginSel)) || (row > GetRowFromCursor(m_findReplace.dwEndSel))) bFound = false;
}
if (((m_findReplace.dwFindFlags & PATSEARCH_NOTE) && ((m->note != m_findReplace.cmdFind.note) && ((m_findReplace.cmdFind.note != CFindReplaceTab::findAny) || (!m->note) || (m->note & 0x80))))
|| ((m_findReplace.dwFindFlags & PATSEARCH_INSTR) && (m->instr != m_findReplace.cmdFind.instr))
@@ -1880,6 +1884,7 @@
bool bUpdPos = true;
if ((m_findReplace.dwReplaceFlags & (PATSEARCH_REPLACEALL|PATSEARCH_REPLACE)) == (PATSEARCH_REPLACEALL|PATSEARCH_REPLACE)) bUpdPos = false;
nFound++;
+
if (bUpdPos)
{
// turn off "follow song"
@@ -1889,6 +1894,7 @@
SetCurrentPattern(nPat);
SetCurrentRow(n / pSndFile->m_nChannels);
}
+
UINT ncurs = (n % pSndFile->m_nChannels) << 3;
if (!(m_findReplace.dwFindFlags & PATSEARCH_NOTE))
{
@@ -1916,7 +1922,9 @@
}
if (bReplace)
{
- pModDoc->GetPatternUndo()->PrepareUndo(nPat, n % pSndFile->m_nChannels, n / pSndFile->m_nChannels, 1, 1);
+ // Just create one logic undo step when auto-replacing all occurences.
+ const bool linkUndoBuffer = (nFound > 1) && (m_findReplace.dwReplaceFlags & PATSEARCH_REPLACEALL) != 0;
+ pModDoc->GetPatternUndo()->PrepareUndo(nPat, n % pSndFile->m_nChannels, n / pSndFile->m_nChannels, 1, 1, linkUndoBuffer);
if ((m_findReplace.dwReplaceFlags & PATSEARCH_NOTE))
{
@@ -1986,7 +1994,16 @@
}
}
EndSearch:
- if (m_findReplace.dwReplaceFlags & PATSEARCH_REPLACEALL) InvalidatePattern();
+ if( m_findReplace.dwFindFlags & PATSEARCH_PATSELECTION)
+ {
+ // Restore original selection
+ m_dwBeginSel = m_findReplace.dwBeginSel;
+ m_dwEndSel = m_findReplace.dwEndSel;
+ InvalidatePattern();
+ } else if (m_findReplace.dwReplaceFlags & PATSEARCH_REPLACEALL)
+ {
+ InvalidatePattern();
+ }
m_bContinueSearch = true;
EndWaitCursor();
// Display search results
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2010-12-03 22:12:57 UTC (rev 769)
+++ trunk/OpenMPT/mptrack/View_pat.h 2010-12-04 20:07:14 UTC (rev 770)
@@ -66,10 +66,11 @@
// Find/Replace data
struct FindReplaceStruct
{
- MODCOMMAND cmdFind, cmdReplace;
- DWORD dwFindFlags, dwReplaceFlags;
- CHANNELINDEX nFindMinChn, nFindMaxChn;
- signed char cInstrRelChange; // relative instrument change (quick'n'dirty fix, this should be implemented in a less cryptic way)
+ MODCOMMAND cmdFind, cmdReplace; // Find/replace notes/instruments/effects
+ DWORD dwFindFlags, dwReplaceFlags; // PATSEARCH_XXX flags
+ CHANNELINDEX nFindMinChn, nFindMaxChn; // Find in these channels (if PATSEARCH_CHANNEL is set)
+ signed char cInstrRelChange; // relative instrument change (quick'n'dirty fix, this should be implemented in a less cryptic way)
+ DWORD dwBeginSel, dwEndSel; // Find in this selection (if PATSEARCH_PATSEL is set)
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-12-03 22:13:04
|
Revision: 769
http://modplug.svn.sourceforge.net/modplug/?rev=769&view=rev
Author: saga-games
Date: 2010-12-03 22:12:57 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
[New] Pattern Editor: New (experimental) Find/Replace mode: Find in pattern selection.
[Ref] Refactored Find/Replace code to use a struct for all the Find/Replace data (to keep the CViewPattern class clean)
[Mod] OpenMPT: Version is now 1.19.00.14
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/version.h
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-03 22:05:09 UTC (rev 768)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-03 22:12:57 UTC (rev 769)
@@ -24,16 +24,16 @@
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
+FindReplaceStruct CViewPattern::m_findReplace =
+{
+ {0,0,0,0,0,0}, {0,0,0,0,0,0},
+ PATSEARCH_FULLSEARCH, PATSEARCH_REPLACEALL,
+ 0, 0,
+ 0,
+};
+
MODCOMMAND CViewPattern::m_cmdOld = {0,0,0,0,0,0};
-MODCOMMAND CViewPattern::m_cmdFind = {0,0,0,0,0,0};
-MODCOMMAND CViewPattern::m_cmdReplace = {0,0,0,0,0,0};
-DWORD CViewPattern::m_dwFindFlags = PATSEARCH_FULLSEARCH;
-DWORD CViewPattern::m_dwReplaceFlags = PATSEARCH_REPLACEALL;
-UINT CViewPattern::m_nFindMinChn = 0;
-UINT CViewPattern::m_nFindMaxChn = 0;
-signed char cInstrRelChange = 0;
-
IMPLEMENT_SERIAL(CViewPattern, CModScrollView, 0)
BEGIN_MESSAGE_MAP(CViewPattern, CModScrollView)
@@ -1690,44 +1690,50 @@
CFindReplaceTab pageReplace(IDD_EDIT_REPLACE, TRUE, pModDoc);
CPropertySheet dlg("Find/Replace");
- pageFind.m_nNote = m_cmdFind.note;
- pageFind.m_nInstr = m_cmdFind.instr;
- pageFind.m_nVolCmd = m_cmdFind.volcmd;
- pageFind.m_nVol = m_cmdFind.vol;
- pageFind.m_nCommand = m_cmdFind.command;
- pageFind.m_nParam = m_cmdFind.param;
- pageFind.m_dwFlags = m_dwFindFlags;
- pageFind.m_nMinChannel = m_nFindMinChn;
- pageFind.m_nMaxChannel = m_nFindMaxChn;
- pageReplace.m_nNote = m_cmdReplace.note;
- pageReplace.m_nInstr = m_cmdReplace.instr;
- pageReplace.m_nVolCmd = m_cmdReplace.volcmd;
- pageReplace.m_nVol = m_cmdReplace.vol;
- pageReplace.m_nCommand = m_cmdReplace.command;
- pageReplace.m_nParam = m_cmdReplace.param;
- pageReplace.m_dwFlags = m_dwReplaceFlags;
- pageReplace.cInstrRelChange = m_cInstrRelChange;
+ pageFind.m_nNote = m_findReplace.cmdFind.note;
+ pageFind.m_nInstr = m_findReplace.cmdFind.instr;
+ pageFind.m_nVolCmd = m_findReplace.cmdFind.volcmd;
+ pageFind.m_nVol = m_findReplace.cmdFind.vol;
+ pageFind.m_nCommand = m_findReplace.cmdFind.command;
+ pageFind.m_nParam = m_findReplace.cmdFind.param;
+ pageFind.m_dwFlags = m_findReplace.dwFindFlags;
+ pageFind.m_nMinChannel = m_findReplace.nFindMinChn;
+ pageFind.m_nMaxChannel = m_findReplace.nFindMaxChn;
+ pageFind.m_bPatSel = (m_dwBeginSel != m_dwEndSel) ? true : false;
+ pageReplace.m_nNote = m_findReplace.cmdReplace.note;
+ pageReplace.m_nInstr = m_findReplace.cmdReplace.instr;
+ pageReplace.m_nVolCmd = m_findReplace.cmdReplace.volcmd;
+ pageReplace.m_nVol = m_findReplace.cmdReplace.vol;
+ pageReplace.m_nCommand = m_findReplace.cmdReplace.command;
+ pageReplace.m_nParam = m_findReplace.cmdReplace.param;
+ pageReplace.m_dwFlags = m_findReplace.dwReplaceFlags;
+ pageReplace.cInstrRelChange = m_findReplace.cInstrRelChange;
+ if(m_dwBeginSel != m_dwEndSel)
+ {
+ pageFind.m_dwFlags |= PATSEARCH_PATSELECTION;
+ pageFind.m_dwFlags &= ~PATSEARCH_FULLSEARCH;
+ }
dlg.AddPage(&pageFind);
dlg.AddPage(&pageReplace);
if (dlg.DoModal() == IDOK)
{
- m_cmdFind.note = pageFind.m_nNote;
- m_cmdFind.instr = pageFind.m_nInstr;
- m_cmdFind.volcmd = pageFind.m_nVolCmd;
- m_cmdFind.vol = pageFind.m_nVol;
- m_cmdFind.command = pageFind.m_nCommand;
- m_cmdFind.param = pageFind.m_nParam;
- m_nFindMinChn = pageFind.m_nMinChannel;
- m_nFindMaxChn = pageFind.m_nMaxChannel;
- m_dwFindFlags = pageFind.m_dwFlags;
- m_cmdReplace.note = pageReplace.m_nNote;
- m_cmdReplace.instr = pageReplace.m_nInstr;
- m_cmdReplace.volcmd = pageReplace.m_nVolCmd;
- m_cmdReplace.vol = pageReplace.m_nVol;
- m_cmdReplace.command = pageReplace.m_nCommand;
- m_cmdReplace.param = pageReplace.m_nParam;
- m_dwReplaceFlags = pageReplace.m_dwFlags;
- m_cInstrRelChange = pageReplace.cInstrRelChange;
+ m_findReplace.cmdFind.note = pageFind.m_nNote;
+ m_findReplace.cmdFind.instr = pageFind.m_nInstr;
+ m_findReplace.cmdFind.volcmd = pageFind.m_nVolCmd;
+ m_findReplace.cmdFind.vol = pageFind.m_nVol;
+ m_findReplace.cmdFind.command = pageFind.m_nCommand;
+ m_findReplace.cmdFind.param = pageFind.m_nParam;
+ m_findReplace.nFindMinChn = pageFind.m_nMinChannel;
+ m_findReplace.nFindMaxChn = pageFind.m_nMaxChannel;
+ m_findReplace.dwFindFlags = pageFind.m_dwFlags;
+ m_findReplace.cmdReplace.note = pageReplace.m_nNote;
+ m_findReplace.cmdReplace.instr = pageReplace.m_nInstr;
+ m_findReplace.cmdReplace.volcmd = pageReplace.m_nVolCmd;
+ m_findReplace.cmdReplace.vol = pageReplace.m_nVol;
+ m_findReplace.cmdReplace.command = pageReplace.m_nCommand;
+ m_findReplace.cmdReplace.param = pageReplace.m_nParam;
+ m_findReplace.dwReplaceFlags = pageReplace.m_dwFlags;
+ m_findReplace.cInstrRelChange = pageReplace.cInstrRelChange;
m_bContinueSearch = false;
OnEditFindNext();
}
@@ -1787,7 +1793,7 @@
BOOL bEffectEx;
if (!pModDoc) return;
- if (!(m_dwFindFlags & ~PATSEARCH_FULLSEARCH))
+ if (!(m_findReplace.dwFindFlags & ~PATSEARCH_FULLSEARCH))
{
PostMessage(WM_COMMAND, ID_EDIT_FIND);
return;
@@ -1796,19 +1802,23 @@
pSndFile = pModDoc->GetSoundFile();
nPatStart = m_nPattern;
nPatEnd = m_nPattern+1;
- if (m_dwFindFlags & PATSEARCH_FULLSEARCH)
+ if (m_findReplace.dwFindFlags & PATSEARCH_FULLSEARCH)
{
nPatStart = 0;
nPatEnd = pSndFile->Patterns.Size();
+ } else if(m_findReplace.dwFindFlags & PATSEARCH_PATSELECTION)
+ {
+ nPatStart = m_nPattern;
+ nPatEnd = nPatStart + 1;
}
if (m_bContinueSearch)
{
nPatStart = m_nPattern;
}
bEffectEx = FALSE;
- if (m_dwFindFlags & PATSEARCH_COMMAND)
+ if (m_findReplace.dwFindFlags & PATSEARCH_COMMAND)
{
- UINT fxndx = pModDoc->GetIndexFromEffect(m_cmdFind.command, m_cmdFind.param);
+ UINT fxndx = pModDoc->GetIndexFromEffect(m_findReplace.cmdFind.command, m_findReplace.cmdFind.param);
bEffectEx = pModDoc->IsExtendedEffect(fxndx);
}
for (UINT nPat=nPatStart; nPat<nPatEnd; nPat++)
@@ -1824,42 +1834,51 @@
}
for (; n<len; n++, m++)
{
- BOOL bFound = TRUE, bReplace = TRUE;
+ bool bFound = true, bReplace = true;
- if (m_dwFindFlags & PATSEARCH_CHANNEL)
+ if (m_findReplace.dwFindFlags & PATSEARCH_CHANNEL)
{
- UINT ch = n % pSndFile->m_nChannels;
- if ((ch < m_nFindMinChn) || (ch > m_nFindMaxChn)) bFound = FALSE;
+ // limit to given channels
+ const CHANNELINDEX ch = n % pSndFile->m_nChannels;
+ if ((ch < m_findReplace.nFindMinChn) || (ch > m_findReplace.nFindMaxChn)) bFound = false;
}
- if (((m_dwFindFlags & PATSEARCH_NOTE) && ((m->note != m_cmdFind.note) && ((m_cmdFind.note != CFindReplaceTab::findAny) || (!m->note) || (m->note & 0x80))))
- || ((m_dwFindFlags & PATSEARCH_INSTR) && (m->instr != m_cmdFind.instr))
- || ((m_dwFindFlags & PATSEARCH_VOLCMD) && (m->volcmd != m_cmdFind.volcmd))
- || ((m_dwFindFlags & PATSEARCH_VOLUME) && (m->vol != m_cmdFind.vol))
- || ((m_dwFindFlags & PATSEARCH_COMMAND) && (m->command != m_cmdFind.command))
- || ((m_dwFindFlags & PATSEARCH_PARAM) && (m->param != m_cmdFind.param)))
+ if (m_findReplace.dwFindFlags & PATSEARCH_PATSELECTION)
{
- bFound = FALSE;
+ // limit to pattern selection
+ const CHANNELINDEX ch = n % pSndFile->m_nChannels;
+ const ROWINDEX row = n / pSndFile->m_nChannels;
+ if ((ch < GetSelectionStartChan()) || (ch > GetSelectionEndChan())) bFound = false;
+ if ((row < GetSelectionStartRow()) || (row > GetSelectionEndRow())) bFound = false;
+ }
+ if (((m_findReplace.dwFindFlags & PATSEARCH_NOTE) && ((m->note != m_findReplace.cmdFind.note) && ((m_findReplace.cmdFind.note != CFindReplaceTab::findAny) || (!m->note) || (m->note & 0x80))))
+ || ((m_findReplace.dwFindFlags & PATSEARCH_INSTR) && (m->instr != m_findReplace.cmdFind.instr))
+ || ((m_findReplace.dwFindFlags & PATSEARCH_VOLCMD) && (m->volcmd != m_findReplace.cmdFind.volcmd))
+ || ((m_findReplace.dwFindFlags & PATSEARCH_VOLUME) && (m->vol != m_findReplace.cmdFind.vol))
+ || ((m_findReplace.dwFindFlags & PATSEARCH_COMMAND) && (m->command != m_findReplace.cmdFind.command))
+ || ((m_findReplace.dwFindFlags & PATSEARCH_PARAM) && (m->param != m_findReplace.cmdFind.param)))
+ {
+ bFound = false;
}
else
{
- if (((m_dwFindFlags & (PATSEARCH_COMMAND|PATSEARCH_PARAM)) == PATSEARCH_COMMAND) && (bEffectEx))
+ if (((m_findReplace.dwFindFlags & (PATSEARCH_COMMAND|PATSEARCH_PARAM)) == PATSEARCH_COMMAND) && (bEffectEx))
{
- if ((m->param & 0xF0) != (m_cmdFind.param & 0xF0)) bFound = FALSE;
+ if ((m->param & 0xF0) != (m_findReplace.cmdFind.param & 0xF0)) bFound = false;
}
// Ignore modcommands with PC/PCS notes when searching from volume or effect column.
if( (m->IsPcNote())
&&
- m_dwFindFlags & (PATSEARCH_VOLCMD|PATSEARCH_VOLUME|PATSEARCH_COMMAND|PATSEARCH_PARAM))
+ m_findReplace.dwFindFlags & (PATSEARCH_VOLCMD|PATSEARCH_VOLUME|PATSEARCH_COMMAND|PATSEARCH_PARAM))
{
- bFound = FALSE;
+ bFound = false;
}
}
// Found!
if (bFound)
{
- BOOL bUpdPos = TRUE;
- if ((m_dwReplaceFlags & (PATSEARCH_REPLACEALL|PATSEARCH_REPLACE)) == (PATSEARCH_REPLACEALL|PATSEARCH_REPLACE)) bUpdPos = FALSE;
+ bool bUpdPos = true;
+ if ((m_findReplace.dwReplaceFlags & (PATSEARCH_REPLACEALL|PATSEARCH_REPLACE)) == (PATSEARCH_REPLACEALL|PATSEARCH_REPLACE)) bUpdPos = false;
nFound++;
if (bUpdPos)
{
@@ -1871,16 +1890,16 @@
SetCurrentRow(n / pSndFile->m_nChannels);
}
UINT ncurs = (n % pSndFile->m_nChannels) << 3;
- if (!(m_dwFindFlags & PATSEARCH_NOTE))
+ if (!(m_findReplace.dwFindFlags & PATSEARCH_NOTE))
{
ncurs++;
- if (!(m_dwFindFlags & PATSEARCH_INSTR))
+ if (!(m_findReplace.dwFindFlags & PATSEARCH_INSTR))
{
ncurs++;
- if (!(m_dwFindFlags & (PATSEARCH_VOLCMD|PATSEARCH_VOLUME)))
+ if (!(m_findReplace.dwFindFlags & (PATSEARCH_VOLCMD|PATSEARCH_VOLUME)))
{
ncurs++;
- if (!(m_dwFindFlags & PATSEARCH_COMMAND)) ncurs++;
+ if (!(m_findReplace.dwFindFlags & PATSEARCH_COMMAND)) ncurs++;
}
}
}
@@ -1888,77 +1907,77 @@
{
SetCurrentColumn(ncurs);
}
- if (!(m_dwReplaceFlags & PATSEARCH_REPLACE)) goto EndSearch;
- if (!(m_dwReplaceFlags & PATSEARCH_REPLACEALL))
+ if (!(m_findReplace.dwReplaceFlags & PATSEARCH_REPLACE)) goto EndSearch;
+ if (!(m_findReplace.dwReplaceFlags & PATSEARCH_REPLACEALL))
{
UINT ans = MessageBox("Replace this occurrence?", "Replace", MB_YESNOCANCEL);
- if (ans == IDYES) bReplace = TRUE; else
- if (ans == IDNO) bReplace = FALSE; else goto EndSearch;
+ if (ans == IDYES) bReplace = true; else
+ if (ans == IDNO) bReplace = false; else goto EndSearch;
}
if (bReplace)
{
pModDoc->GetPatternUndo()->PrepareUndo(nPat, n % pSndFile->m_nChannels, n / pSndFile->m_nChannels, 1, 1);
- if ((m_dwReplaceFlags & PATSEARCH_NOTE))
+ if ((m_findReplace.dwReplaceFlags & PATSEARCH_NOTE))
{
// -1 octave
- if (m_cmdReplace.note == CFindReplaceTab::replaceNoteMinusOctave)
+ if (m_findReplace.cmdReplace.note == CFindReplaceTab::replaceNoteMinusOctave)
{
if (m->note > 12) m->note -= 12;
} else
// +1 octave
- if (m_cmdReplace.note == CFindReplaceTab::replaceNotePlusOctave)
+ if (m_findReplace.cmdReplace.note == CFindReplaceTab::replaceNotePlusOctave)
{
if (m->note <= NOTE_MAX - 12) m->note += 12;
} else
// Note--
- if (m_cmdReplace.note == CFindReplaceTab::replaceNoteMinusOne)
+ if (m_findReplace.cmdReplace.note == CFindReplaceTab::replaceNoteMinusOne)
{
if (m->note > 1) m->note--;
} else
// Note++
- if (m_cmdReplace.note == CFindReplaceTab::replaceNotePlusOne)
+ if (m_findReplace.cmdReplace.note == CFindReplaceTab::replaceNotePlusOne)
{
if (m->note < NOTE_MAX) m->note++;
} else
// Replace with another note
{
- // If we're going to remove a PC Note, wipe out the complete column.
- if(m->IsPcNote() && !MODCOMMAND::IsPcNote(m_cmdReplace.note))
+ // If we're going to remove a PC Note or replace a normal note by a PC note, wipe out the complete column.
+ if(m->IsPcNote() != MODCOMMAND::IsPcNote(m_findReplace.cmdReplace.note))
{
m->Clear();
}
- m->note = m_cmdReplace.note;
+ m->note = m_findReplace.cmdReplace.note;
}
}
- if ((m_dwReplaceFlags & PATSEARCH_INSTR))
+ if ((m_findReplace.dwReplaceFlags & PATSEARCH_INSTR))
{
// Instr--
- if (m_cInstrRelChange == -1 && m->instr > 1)
+ if (m_findReplace.cInstrRelChange == -1 && m->instr > 1)
m->instr--;
// Instr++
- else if (m_cInstrRelChange == 1 && m->instr > 0 && m->instr < (MAX_INSTRUMENTS - 1))
+ else if (m_findReplace.cInstrRelChange == 1 && m->instr > 0 && m->instr < (MAX_INSTRUMENTS - 1))
m->instr++;
- else m->instr = m_cmdReplace.instr;
+ else m->instr = m_findReplace.cmdReplace.instr;
}
- if ((m_dwReplaceFlags & PATSEARCH_VOLCMD))
+ if ((m_findReplace.dwReplaceFlags & PATSEARCH_VOLCMD))
{
- m->volcmd = m_cmdReplace.volcmd;
+ m->volcmd = m_findReplace.cmdReplace.volcmd;
}
- if ((m_dwReplaceFlags & PATSEARCH_VOLUME))
+ if ((m_findReplace.dwReplaceFlags & PATSEARCH_VOLUME))
{
- m->vol = m_cmdReplace.vol;
+ m->vol = m_findReplace.cmdReplace.vol;
}
- if ((m_dwReplaceFlags & PATSEARCH_COMMAND))
+ if ((m_findReplace.dwReplaceFlags & PATSEARCH_COMMAND))
{
- m->command = m_cmdReplace.command;
+ m->command = m_findReplace.cmdReplace.command;
}
- if ((m_dwReplaceFlags & PATSEARCH_PARAM))
+ if ((m_findReplace.dwReplaceFlags & PATSEARCH_PARAM))
{
- if ((bEffectEx) && (!(m_dwReplaceFlags & PATSEARCH_COMMAND)))
- m->param = (BYTE)((m->param & 0xF0) | (m_cmdReplace.param & 0x0F));
+ if ((bEffectEx) && (!(m_findReplace.dwReplaceFlags & PATSEARCH_COMMAND)))
+ m->param = (BYTE)((m->param & 0xF0) | (m_findReplace.cmdReplace.param & 0x0F));
else
- m->param = m_cmdReplace.param;
+ m->param = m_findReplace.cmdReplace.param;
}
pModDoc->SetModified();
if (bUpdPos) InvalidateRow();
@@ -1967,52 +1986,52 @@
}
}
EndSearch:
- if (m_dwReplaceFlags & PATSEARCH_REPLACEALL) InvalidatePattern();
+ if (m_findReplace.dwReplaceFlags & PATSEARCH_REPLACEALL) InvalidatePattern();
m_bContinueSearch = true;
EndWaitCursor();
// Display search results
- //m_dwReplaceFlags &= ~PATSEARCH_REPLACEALL;
+ //m_findReplace.dwReplaceFlags &= ~PATSEARCH_REPLACEALL;
if (!nFound)
{
- if (m_dwFindFlags & PATSEARCH_NOTE)
+ if (m_findReplace.dwFindFlags & PATSEARCH_NOTE)
{
- wsprintf(szFind, "%s", GetNoteStr(m_cmdFind.note));
+ wsprintf(szFind, "%s", GetNoteStr(m_findReplace.cmdFind.note));
} else strcpy(szFind, "???");
strcat(szFind, " ");
- if (m_dwFindFlags & PATSEARCH_INSTR)
+ if (m_findReplace.dwFindFlags & PATSEARCH_INSTR)
{
- if (m_cmdFind.instr)
- wsprintf(&szFind[strlen(szFind)], "%03d", m_cmdFind.instr);
+ if (m_findReplace.cmdFind.instr)
+ wsprintf(&szFind[strlen(szFind)], "%03d", m_findReplace.cmdFind.instr);
else
strcat(szFind, " ..");
} else strcat(szFind, " ??");
strcat(szFind, " ");
- if (m_dwFindFlags & PATSEARCH_VOLCMD)
+ if (m_findReplace.dwFindFlags & PATSEARCH_VOLCMD)
{
- if (m_cmdFind.volcmd)
- wsprintf(&szFind[strlen(szFind)], "%c", gszVolCommands[m_cmdFind.volcmd]);
+ if (m_findReplace.cmdFind.volcmd)
+ wsprintf(&szFind[strlen(szFind)], "%c", gszVolCommands[m_findReplace.cmdFind.volcmd]);
else
strcat(szFind, ".");
} else strcat(szFind, "?");
- if (m_dwFindFlags & PATSEARCH_VOLUME)
+ if (m_findReplace.dwFindFlags & PATSEARCH_VOLUME)
{
- wsprintf(&szFind[strlen(szFind)], "%02d", m_cmdFind.vol);
+ wsprintf(&szFind[strlen(szFind)], "%02d", m_findReplace.cmdFind.vol);
} else strcat(szFind, "??");
strcat(szFind, " ");
- if (m_dwFindFlags & PATSEARCH_COMMAND)
+ if (m_findReplace.dwFindFlags & PATSEARCH_COMMAND)
{
- if (m_cmdFind.command)
+ if (m_findReplace.cmdFind.command)
{
if (pSndFile->m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT|MOD_TYPE_MPT))
- wsprintf(&szFind[strlen(szFind)], "%c", gszS3mCommands[m_cmdFind.command]);
+ wsprintf(&szFind[strlen(szFind)], "%c", gszS3mCommands[m_findReplace.cmdFind.command]);
else
- wsprintf(&szFind[strlen(szFind)], "%c", gszModCommands[m_cmdFind.command]);
+ wsprintf(&szFind[strlen(szFind)], "%c", gszModCommands[m_findReplace.cmdFind.command]);
} else
strcat(szFind, ".");
} else strcat(szFind, "?");
- if (m_dwFindFlags & PATSEARCH_PARAM)
+ if (m_findReplace.dwFindFlags & PATSEARCH_PARAM)
{
- wsprintf(&szFind[strlen(szFind)], "%02X", m_cmdFind.param);
+ wsprintf(&szFind[strlen(szFind)], "%02X", m_findReplace.cmdFind.param);
} else strcat(szFind, "??");
wsprintf(s, "Cannot find \"%s\"", szFind);
MessageBox(s, "Find/Replace", MB_OK | MB_ICONINFORMATION);
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2010-12-03 22:05:09 UTC (rev 768)
+++ trunk/OpenMPT/mptrack/View_pat.h 2010-12-03 22:12:57 UTC (rev 769)
@@ -63,7 +63,16 @@
CHANNELINDEX nChn;
};
+// Find/Replace data
+struct FindReplaceStruct
+{
+ MODCOMMAND cmdFind, cmdReplace;
+ DWORD dwFindFlags, dwReplaceFlags;
+ CHANNELINDEX nFindMinChn, nFindMaxChn;
+ signed char cInstrRelChange; // relative instrument change (quick'n'dirty fix, this should be implemented in a less cryptic way)
+};
+
//////////////////////////////////////////////////////////////////
// Pattern editing class
@@ -72,13 +81,6 @@
class CViewPattern: public CModScrollView
//=======================================
{
-public:
- // Find/Replace
- static MODCOMMAND m_cmdFind, m_cmdReplace, m_cmdOld;
- static DWORD m_dwFindFlags, m_dwReplaceFlags;
- static UINT m_nFindMinChn, m_nFindMaxChn;
- signed char m_cInstrRelChange; // relative instrument change (quick'n'dirty fix, this should be implemented in a less cryptic way)
-
protected:
CFastBitmap m_Dib;
CEditCommand *m_pEditWnd;
@@ -102,6 +104,9 @@
UINT m_nLastPlayedChannel; //rewbs.customkeys
bool m_bLastNoteEntryBlocked;
+ static MODCOMMAND m_cmdOld; // Quick cursor copy/paste data
+ static FindReplaceStruct m_findReplace; // Find/replace data
+
// -> CODE#0012
// -> DESC="midi keyboard split"
BYTE activeNoteChannel[NOTE_MAX + 1];
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-12-03 22:05:09 UTC (rev 768)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-12-03 22:12:57 UTC (rev 769)
@@ -759,9 +759,18 @@
} else
{
if (m_dwFlags & PATSEARCH_CHANNEL) CheckDlgButton(IDC_CHECK7, MF_CHECKED);
- CheckRadioButton(IDC_RADIO1, IDC_RADIO2, (m_dwFlags & PATSEARCH_FULLSEARCH) ? IDC_RADIO2 : IDC_RADIO1);
- SetDlgItemInt(IDC_EDIT1, m_nMinChannel+1);
- SetDlgItemInt(IDC_EDIT2, m_nMaxChannel+1);
+ int nButton = IDC_RADIO1;
+ if((m_dwFlags & PATSEARCH_FULLSEARCH))
+ {
+ nButton = IDC_RADIO2;
+ } else if(/*(m_dwFlags & PATSEARCH_PATSELECTION) &&*/ m_bPatSel)
+ {
+ nButton = IDC_RADIO3;
+ }
+ CheckRadioButton(IDC_RADIO1, IDC_RADIO3, nButton);
+ GetDlgItem(IDC_RADIO3)->EnableWindow(m_bPatSel ? TRUE : FALSE);
+ SetDlgItemInt(IDC_EDIT1, m_nMinChannel + 1);
+ SetDlgItemInt(IDC_EDIT2, m_nMaxChannel + 1);
}
// Note
if ((combo = (CComboBox *)GetDlgItem(IDC_COMBO1)) != NULL)
@@ -941,6 +950,7 @@
{
if (IsDlgButtonChecked(IDC_CHECK7)) m_dwFlags |= PATSEARCH_CHANNEL;
if (IsDlgButtonChecked(IDC_RADIO2)) m_dwFlags |= PATSEARCH_FULLSEARCH;
+ if (IsDlgButtonChecked(IDC_RADIO3)) m_dwFlags |= PATSEARCH_PATSELECTION;
}
// Note
if ((combo = (CComboBox *)GetDlgItem(IDC_COMBO1)) != NULL)
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2010-12-03 22:05:09 UTC (rev 768)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2010-12-03 22:12:57 UTC (rev 769)
@@ -141,16 +141,17 @@
/////////////////////////////////////////////////////////////////////////
// Search/Replace
-#define PATSEARCH_NOTE 0x01
-#define PATSEARCH_INSTR 0x02
-#define PATSEARCH_VOLCMD 0x04
-#define PATSEARCH_VOLUME 0x08
-#define PATSEARCH_COMMAND 0x10
-#define PATSEARCH_PARAM 0x20
-#define PATSEARCH_CHANNEL 0x40
-#define PATSEARCH_FULLSEARCH 0x100
-#define PATSEARCH_REPLACE 0x200
-#define PATSEARCH_REPLACEALL 0x400
+#define PATSEARCH_NOTE 0x01 // Search for note
+#define PATSEARCH_INSTR 0x02 // Search for instrument
+#define PATSEARCH_VOLCMD 0x04 // Search for volume effect
+#define PATSEARCH_VOLUME 0x08 // Search for volume
+#define PATSEARCH_COMMAND 0x10 // Search for effect
+#define PATSEARCH_PARAM 0x20 // Search for effect parameter
+#define PATSEARCH_CHANNEL 0x40 // Limit search to channels
+#define PATSEARCH_FULLSEARCH 0x100 // Search whole song
+#define PATSEARCH_PATSELECTION 0x200 // Search in current pattern selection
+#define PATSEARCH_REPLACE 0x400 // Replace
+#define PATSEARCH_REPLACEALL 0x800 // Replace all
//=========================================
class CFindReplaceTab: public CPropertyPage
@@ -161,8 +162,10 @@
CModDoc *m_pModDoc;
public:
- UINT m_nNote, m_nInstr, m_nVolCmd, m_nVol, m_nCommand, m_nParam, m_nMinChannel, m_nMaxChannel;
+ UINT m_nNote, m_nInstr, m_nVolCmd, m_nVol, m_nCommand, m_nParam;
+ CHANNELINDEX m_nMinChannel, m_nMaxChannel;
signed char cInstrRelChange;
+ bool m_bPatSel;
DWORD m_dwFlags;
enum findItem
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2010-12-03 22:05:09 UTC (rev 768)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2010-12-03 22:12:57 UTC (rev 769)
@@ -871,8 +871,8 @@
CTEXT "Wet Dry Ratio",IDC_STATIC8,245,282,65,14,SS_CENTERIMAGE,WS_EX_STATICEDGE
END
-IDD_EDIT_FIND DIALOGEX 0, 0, 182, 145
-STYLE DS_SETFONT | WS_CHILD | WS_CAPTION
+IDD_EDIT_FIND DIALOGEX 0, 0, 182, 161
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CAPTION
CAPTION "Find"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
@@ -889,12 +889,13 @@
COMBOBOX IDC_COMBO5,13,92,94,71,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "Effect Data",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,117,78,52,10
COMBOBOX IDC_COMBO6,117,92,48,68,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- CONTROL "Find in current pattern",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,6,117,88,10
- CONTROL "Find in the whole song",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,6,131,89,10
+ CONTROL "Find in current pattern",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,6,120,96,8
+ CONTROL "Find in the whole song",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,6,144,102,8
CONTROL "Only in channels",IDC_CHECK7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,105,117,70,10
EDITTEXT IDC_EDIT1,117,130,22,12,ES_AUTOHSCROLL | ES_NUMBER
CTEXT "to",IDC_STATIC,143,131,8,8
EDITTEXT IDC_EDIT2,155,130,22,12,ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "Find in current selection",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,6,132,102,8
END
IDD_EDIT_REPLACE DIALOGEX 0, 0, 182, 145
@@ -1641,6 +1642,11 @@
BOTTOMMARGIN, 335
END
+ IDD_EDIT_FIND, DIALOG
+ BEGIN
+ BOTTOMMARGIN, 145
+ END
+
IDD_PATTERN_PROPERTIES, DIALOG
BEGIN
LEFTMARGIN, 4
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-12-03 22:05:09 UTC (rev 768)
+++ trunk/OpenMPT/mptrack/version.h 2010-12-03 22:12:57 UTC (rev 769)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 19
#define VER_MINOR 00
-#define VER_MINORMINOR 13
+#define VER_MINORMINOR 14
//Creates version number from version parts that appears in version string.
//For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-12-03 22:05:15
|
Revision: 768
http://modplug.svn.sourceforge.net/modplug/?rev=768&view=rev
Author: saga-games
Date: 2010-12-03 22:05:09 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
[Imp] Mod Conversion: Changed volume command priority when converting from XM to IT/S3M - Cxx overrides vxx in XM, so this is now taken into account.
[Fix] Pattern Editor: When applying the Amplify command on a pattern selection that was just covering the note/instrument column of the first channel, the program crashed.
[Ref] Rewrote some of the pattern amplification code to look less dumb and be more efficient.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/soundlib/modcommand.cpp
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-02 22:52:54 UTC (rev 767)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-03 22:05:09 UTC (rev 768)
@@ -2785,31 +2785,57 @@
static UINT snOldAmp = 100;
CAmpDlg dlg(this, snOldAmp, 0);
CModDoc *pModDoc = GetDocument();
- BYTE chvol[MAX_BASECHANNELS];
if ((pModDoc) && (dlg.DoModal() == IDOK))
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
+ const bool useVolCol = (pSndFile->GetType() != MOD_TYPE_MOD);
+
BeginWaitCursor();
PrepareUndo(m_dwBeginSel, m_dwEndSel);
snOldAmp = static_cast<UINT>(dlg.m_nFactor);
- memset(chvol, 64, sizeof(chvol));
+
if (pSndFile->Patterns[m_nPattern])
{
MODCOMMAND *p = pSndFile->Patterns[m_nPattern];
- CHANNELINDEX firstChannel = (m_dwBeginSel & 0xFFFF) >> 3, lastChannel = (m_dwEndSel & 0xFFFF) >> 3;
- ROWINDEX firstRow = (m_dwBeginSel >> 16), lastRow = (m_dwEndSel >> 16);
+ CHANNELINDEX firstChannel = GetSelectionStartChan(), lastChannel = GetSelectionEndChan();
+ ROWINDEX firstRow = GetSelectionStartRow(), lastRow = GetSelectionEndRow();
firstChannel = CLAMP(firstChannel, 0, pSndFile->m_nChannels - 1);
- lastChannel = CLAMP(lastChannel, 0, pSndFile->m_nChannels - 1);
+ lastChannel = CLAMP(lastChannel, firstChannel, pSndFile->m_nChannels - 1);
firstRow = CLAMP(firstRow, 0, pSndFile->Patterns[m_nPattern].GetNumRows() - 1);
- lastRow = CLAMP(lastRow, 0, pSndFile->Patterns[m_nPattern].GetNumRows() - 1);
+ lastRow = CLAMP(lastRow, firstRow, pSndFile->Patterns[m_nPattern].GetNumRows() - 1);
- for (CHANNELINDEX nChn = firstChannel; nChn <= lastChannel; nChn++)
+ // adjust min/max channel if they're only partly selected (i.e. volume column or effect column (when using .MOD) is not covered)
+ if(((firstChannel << 3) | (useVolCol ? 2 : 3)) < (m_dwBeginSel & 0xFFFF))
{
- for (ROWINDEX nRow = firstRow; nRow <= lastRow; nRow++)
+ if(firstChannel >= lastChannel)
{
- MODCOMMAND *m = p + nRow * pSndFile->m_nChannels + nChn;
+ // Selection too small!
+ EndWaitCursor();
+ return;
+ }
+ firstChannel++;
+ }
+ if(((lastChannel << 3) | (useVolCol ? 2 : 3)) > (m_dwEndSel & 0xFFFF))
+ {
+ if(lastChannel == 0)
+ {
+ // Selection too small!
+ EndWaitCursor();
+ return;
+ }
+ lastChannel--;
+ }
+
+ // Volume memory for each channel.
+ vector<BYTE> chvol(lastChannel + 1, 64);
+
+ for (ROWINDEX nRow = firstRow; nRow <= lastRow; nRow++)
+ {
+ MODCOMMAND *m = p + nRow * pSndFile->m_nChannels + firstChannel;
+ for (CHANNELINDEX nChn = firstChannel; nChn <= lastChannel; nChn++, m++)
+ {
if ((m->command == CMD_VOLUME) && (m->param <= 64))
{
chvol[nChn] = m->param;
@@ -2841,14 +2867,14 @@
}
else
{ //nonexistant sample and no volume present in patten? assume volume=64.
- if(pSndFile->GetType() == MOD_TYPE_MOD)
+ if(useVolCol)
{
+ m->volcmd = VOLCMD_VOLUME;
+ m->vol = 64;
+ } else
+ {
m->command = CMD_VOLUME;
m->param = 64;
- } else
- {
- m->volcmd = VOLCMD_VOLUME;
- m->vol = 64;
}
chvol[nChn] = 64;
break;
@@ -2857,26 +2883,22 @@
}
}
- // adjust min/max channel if they're only partly selected (i.e. volume column is not covered)
- if(((firstChannel << 3) | 2) < (m_dwBeginSel & 0xFFFF)) firstChannel++;
- if(((lastChannel << 3) | 2) > (m_dwEndSel & 0xFFFF)) lastChannel--;
-
for (ROWINDEX nRow = firstRow; nRow <= lastRow; nRow++)
{
- p = pSndFile->Patterns[m_nPattern] + nRow * pSndFile->m_nChannels;
- int cy = lastRow - firstRow + 1; // total rows (for fading)
- for (CHANNELINDEX nChn = firstChannel; nChn <= lastChannel; nChn++)
+ MODCOMMAND *m = p + nRow * pSndFile->m_nChannels + firstChannel;
+ const int cy = lastRow - firstRow + 1; // total rows (for fading)
+ for (CHANNELINDEX nChn = firstChannel; nChn <= lastChannel; nChn++, m++)
{
- if ((!p[nChn].volcmd) && (p[nChn].command != CMD_VOLUME)
- && (p[nChn].note) && (p[nChn].note <= NOTE_MAX) && (p[nChn].instr))
+ if ((!m->volcmd) && (m->command != CMD_VOLUME)
+ && (m->note) && (m->note <= NOTE_MAX) && (m->instr))
{
- UINT nSmp = p[nChn].instr;
+ UINT nSmp = m->instr;
bool overrideSampleVol = false;
if (pSndFile->m_nInstruments)
{
if ((nSmp <= pSndFile->m_nInstruments) && (pSndFile->Instruments[nSmp]))
{
- nSmp = pSndFile->Instruments[nSmp]->Keyboard[p[nChn].note];
+ nSmp = pSndFile->Instruments[nSmp]->Keyboard[m->note];
// hack for instruments without samples
if(!nSmp)
{
@@ -2890,49 +2912,49 @@
}
if ((nSmp) && (nSmp <= pSndFile->m_nSamples))
{
- if(pSndFile->GetType() == MOD_TYPE_MOD)
+ if(useVolCol)
{
- p[nChn].command = CMD_VOLUME;
- p[nChn].param = (overrideSampleVol) ? 64 : pSndFile->Samples[nSmp].nVolume >> 2;
+ m->volcmd = VOLCMD_VOLUME;
+ m->vol = (overrideSampleVol) ? 64 : pSndFile->Samples[nSmp].nVolume >> 2;
} else
{
- p[nChn].volcmd = VOLCMD_VOLUME;
- p[nChn].vol = (overrideSampleVol) ? 64 : pSndFile->Samples[nSmp].nVolume >> 2;
+ m->command = CMD_VOLUME;
+ m->param = (overrideSampleVol) ? 64 : pSndFile->Samples[nSmp].nVolume >> 2;
}
}
}
- if (p[nChn].volcmd == VOLCMD_VOLUME) chvol[nChn] = (BYTE)p[nChn].vol;
- if (((dlg.m_bFadeIn) || (dlg.m_bFadeOut)) && (p[nChn].command != CMD_VOLUME) && (!p[nChn].volcmd))
+ if (m->volcmd == VOLCMD_VOLUME) chvol[nChn] = (BYTE)m->vol;
+ if (((dlg.m_bFadeIn) || (dlg.m_bFadeOut)) && (m->command != CMD_VOLUME) && (!m->volcmd))
{
- if(pSndFile->GetType() == MOD_TYPE_MOD)
+ if(useVolCol)
{
- p[nChn].command = CMD_VOLUME;
- p[nChn].param = chvol[nChn];
+ m->volcmd = VOLCMD_VOLUME;
+ m->vol = chvol[nChn];
} else
{
- p[nChn].volcmd = VOLCMD_VOLUME;
- p[nChn].vol = chvol[nChn];
+ m->command = CMD_VOLUME;
+ m->param = chvol[nChn];
}
}
- if (p[nChn].volcmd == VOLCMD_VOLUME)
+ if (m->volcmd == VOLCMD_VOLUME)
{
- int vol = p[nChn].vol * dlg.m_nFactor;
+ int vol = m->vol * dlg.m_nFactor;
if (dlg.m_bFadeIn) vol = (vol * (nRow+1-firstRow)) / cy;
if (dlg.m_bFadeOut) vol = (vol * (cy+firstRow-nRow)) / cy;
- vol = (vol+50) / 100;
+ vol = (vol + 50) / 100;
if (vol > 64) vol = 64;
- p[nChn].vol = (BYTE)vol;
+ m->vol = (BYTE)vol;
}
if ((((nChn << 3) | 3) >= (m_dwBeginSel & 0xFFFF)) && (((nChn << 3) | 3) <= (m_dwEndSel & 0xFFFF)))
{
- if ((p[nChn].command == CMD_VOLUME) && (p[nChn].param <= 64))
+ if ((m->command == CMD_VOLUME) && (m->param <= 64))
{
- int vol = p[nChn].param * dlg.m_nFactor;
+ int vol = m->param * dlg.m_nFactor;
if (dlg.m_bFadeIn) vol = (vol * (nRow + 1 - firstRow)) / cy;
if (dlg.m_bFadeOut) vol = (vol * (cy + firstRow - nRow)) / cy;
vol = (vol + 50) / 100;
if (vol > 64) vol = 64;
- p[nChn].param = (BYTE)vol;
+ m->param = (BYTE)vol;
}
}
}
Modified: trunk/OpenMPT/soundlib/modcommand.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.cpp 2010-12-02 22:52:54 UTC (rev 767)
+++ trunk/OpenMPT/soundlib/modcommand.cpp 2010-12-03 22:05:09 UTC (rev 768)
@@ -136,7 +136,8 @@
MODExx2S3MSxx(m);
break;
case CMD_VOLUME:
- if (!m->volcmd)
+ // Effect column volume command overrides the volume column in XM.
+ if (m->volcmd == VOLCMD_NONE || m->volcmd == VOLCMD_VOLUME)
{
m->volcmd = VOLCMD_VOLUME;
m->vol = m->param;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-12-02 22:53:00
|
Revision: 767
http://modplug.svn.sourceforge.net/modplug/?rev=767&view=rev
Author: saga-games
Date: 2010-12-02 22:52:54 +0000 (Thu, 02 Dec 2010)
Log Message:
-----------
[New] Pattern Editor: Clicking and dragging the row numbers selects the whole row now (Excel/Calc style) - see http://bugs.openmpt.org/view.php?id=45
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-11-27 23:28:39 UTC (rev 766)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-12-02 22:52:54 UTC (rev 767)
@@ -987,10 +987,10 @@
void CViewPattern::OnLButtonDown(UINT nFlags, CPoint point)
-//--------------------------------------------------
+//---------------------------------------------------------
{
CModDoc *pModDoc = GetDocument();
- if (/*(m_bDragging) ||*/ (!pModDoc)) return;
+ if (/*(m_bDragging) ||*/ (pModDoc == nullptr) || (pModDoc->GetSoundFile() == nullptr)) return;
SetFocus();
m_nDragItem = GetDragItem(point, &m_rcDragItem);
m_bDragging = true;
@@ -1049,7 +1049,20 @@
}
}
}
+ } else if ((point.x < m_szHeader.cx) && (point.y > m_szHeader.cy))
+ {
+ // Mark row number => mark whole row (start)
+ InvalidateSelection();
+ DWORD dwPoint = GetPositionFromPoint(point);
+ if((dwPoint >> 16) < pModDoc->GetSoundFile()->Patterns[m_nPattern].GetNumRows())
+ {
+ m_dwBeginSel = m_dwStartSel = dwPoint;
+ m_dwEndSel = m_dwBeginSel | 0xFFFF;
+ SetCurSel(m_dwStartSel, m_dwEndSel);
+ m_dwStatus |= PATSTATUS_SELECTROW;
+ }
}
+
if (m_nDragItem)
{
InvalidateRect(&m_rcDragItem, FALSE);
@@ -1079,7 +1092,7 @@
m_bDragging = false;
m_bInItemRect = false;
ReleaseCapture();
- m_dwStatus &= ~PATSTATUS_MOUSEDRAGSEL;
+ m_dwStatus &= ~(PATSTATUS_MOUSEDRAGSEL|PATSTATUS_SELECTROW);
// Drag & Drop Editing
if (m_dwStatus & PATSTATUS_DRAGNDROPEDIT)
{
@@ -1303,8 +1316,14 @@
UpdateWindow();
}
}
- if (m_dwStatus & PATSTATUS_MOUSEDRAGSEL)
+ if ((m_dwStatus & PATSTATUS_SELECTROW) /*&& (point.x < m_szHeader.cx)*/ && (point.y > m_szHeader.cy))
{
+ // Mark row number => mark whole row (continue)
+ InvalidateSelection();
+ m_dwEndSel = GetPositionFromPoint(point) | 0xFFFF;
+ SetCurSel(m_dwStartSel, m_dwEndSel);
+ } else if (m_dwStatus & PATSTATUS_MOUSEDRAGSEL)
+ {
CModDoc *pModDoc = GetDocument();
DWORD dwPos = GetPositionFromPoint(point);
if ((pModDoc) && (m_nPattern < pModDoc->GetSoundFile()->Patterns.Size()))
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2010-11-27 23:28:39 UTC (rev 766)
+++ trunk/OpenMPT/mptrack/View_pat.h 2010-12-02 22:52:54 UTC (rev 767)
@@ -14,21 +14,21 @@
#define DRAGITEM_PATTERNHEADER 0x020000
#define DRAGITEM_PLUGNAME 0x040000 //rewbs.patPlugName
-#define PATSTATUS_MOUSEDRAGSEL 0x01
-#define PATSTATUS_KEYDRAGSEL 0x02
-#define PATSTATUS_FOCUS 0x04
-#define PATSTATUS_FOLLOWSONG 0x08
-#define PATSTATUS_RECORD 0x10
-#define PATSTATUS_DRAGHSCROLL 0x20
-#define PATSTATUS_DRAGVSCROLL 0x40
-#define PATSTATUS_VUMETERS 0x80
-#define PATSTATUS_CHORDPLAYING 0x100
-#define PATSTATUS_DRAGNDROPEDIT 0x200
-#define PATSTATUS_DRAGNDROPPING 0x400
-#define PATSTATUS_MIDISPACINGPENDING 0x800
-#define PATSTATUS_CTRLDRAGSEL 0x1000
-#define PATSTATUS_PLUGNAMESINHEADERS 0x2000 //rewbs.patPlugName
-#define PATSTATUS_PATTERNLOOP 0x4000
+#define PATSTATUS_MOUSEDRAGSEL 0x01 // Creating a selection using the mouse
+#define PATSTATUS_KEYDRAGSEL 0x02 // Creating a selection using shortcuts
+#define PATSTATUS_FOCUS 0x04 // Is the pattern editor focussed
+#define PATSTATUS_FOLLOWSONG 0x08 // Does the cursor follow playback
+#define PATSTATUS_RECORD 0x10 // Recording enabled
+#define PATSTATUS_DRAGHSCROLL 0x20 // Some weird dragging stuff (?)
+#define PATSTATUS_DRAGVSCROLL 0x40 // Some weird dragging stuff (?)
+#define PATSTATUS_VUMETERS 0x80 // Display channel VU meters?
+#define PATSTATUS_CHORDPLAYING 0x100 // Is a chord playing? (pretty much unused)
+#define PATSTATUS_DRAGNDROPEDIT 0x200 // Drag & Drop editing (?)
+#define PATSTATUS_DRAGNDROPPING 0x400 // Dragging a selection around
+#define PATSTATUS_MIDISPACINGPENDING 0x800 // Unused (?)
+#define PATSTATUS_CTRLDRAGSEL 0x1000 // Creating a selection using Ctrl
+#define PATSTATUS_PLUGNAMESINHEADERS 0x2000 // Show plugin names in channel headers //rewbs.patPlugName
+#define PATSTATUS_SELECTROW 0x4000 // Selecting a whole pattern row by clicking the row numbers
// Row Spacing
#define MAX_SPACING 64 // MAX_PATTERN_ROWS
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-27 23:28:46
|
Revision: 766
http://modplug.svn.sourceforge.net/modplug/?rev=766&view=rev
Author: saga-games
Date: 2010-11-27 23:28:39 +0000 (Sat, 27 Nov 2010)
Log Message:
-----------
[Imp] VST File Selector code should now work (hopefully). Borrowed some logic from Psycle.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/Vstplug.h
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2010-11-20 21:11:32 UTC (rev 765)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2010-11-27 23:28:39 UTC (rev 766)
@@ -82,7 +82,6 @@
//------------------------------------
{
m_pVstHead = NULL;
- m_szHostBuffer = nullptr;
//m_bNeedIdle = FALSE; //rewbs.VSTCompliance - now member of plugin class
CSoundFile::gpMixPluginCreateProc = CreateMixPluginProc;
EnumerateDirectXDMOs();
@@ -93,11 +92,6 @@
//-------------------------------------
{
CSoundFile::gpMixPluginCreateProc = NULL;
- if(m_szHostBuffer != nullptr)
- {
- delete[] m_szHostBuffer;
- m_szHostBuffer = nullptr;
- }
while (m_pVstHead)
{
PVSTPLUGINLIB p = m_pVstHead;
@@ -1009,7 +1003,7 @@
//---from here VST 2.2 extension opcodes------------------------------------------------------
// close a fileselector operation with VstFileSelect* in <ptr>: Must be always called after an open !
case audioMasterCloseFileSelector:
- return VstFileSelector(opcode == audioMasterCloseFileSelector, (VstFileSelect *)ptr);
+ return VstFileSelector(opcode == audioMasterCloseFileSelector, (VstFileSelect *)ptr, effect);
// open an editor for audio (defined by XML text in ptr)
case audioMasterEditFile:
@@ -1035,18 +1029,21 @@
// Helper function for file selection dialog stuff.
-long CVstPluginManager::VstFileSelector(const bool destructor, VstFileSelect *pFileSel)
-//-------------------------------------------------------------------------------------
+long CVstPluginManager::VstFileSelector(const bool destructor, VstFileSelect *pFileSel, const AEffect *effect)
+//------------------------------------------------------------------------------------------------------------
{
+ if(pFileSel == nullptr)
+ {
+ return 0;
+ }
+
if(!destructor)
{
- if(pFileSel == nullptr)
- {
- return 0;
- }
+ pFileSel->nbReturnPath = 0;
if(pFileSel->command != kVstDirectorySelect)
{
+ // Plugin wants to load or save a file.
std::string extensions, workingDir;
for(size_t i = 0; i < pFileSel->nbFileTypes; i++)
{
@@ -1083,8 +1080,6 @@
(pFileSel->command == kVstMultipleFilesLoad ? true : false)
);
- pFileSel->nbReturnPath = 0;
-
if(files.abort)
{
return 0;
@@ -1092,43 +1087,114 @@
if(pFileSel->command == kVstMultipleFilesLoad)
{
- // TODO: multiple paths
- Log("VST plugin to host: Multiple files\n");
- return 0;
+ // Multiple paths
+ pFileSel->nbReturnPath = files.filenames.size();
+ pFileSel->returnMultiplePaths = new char *[pFileSel->nbReturnPath];
+ for(size_t i = 0; i < files.filenames.size(); i++)
+ {
+ char *fname = new char[files.filenames[i].length() + 1];
+ strcpy(fname, files.filenames[i].c_str());
+ pFileSel->returnMultiplePaths[i] = fname;
+ }
+ return 1;
} else
{
- if(pFileSel->returnPath == nullptr)
+ // Single path
+ if(pFileSel->returnPath == nullptr || pFileSel->sizeReturnPath == 0)
{
+
// Provide some memory for the return path.
- if(m_szHostBuffer != nullptr)
+ pFileSel->sizeReturnPath = files.first_file.length();
+ pFileSel->returnPath = new char[pFileSel->sizeReturnPath + 1];
+ if(pFileSel->returnPath == nullptr)
{
- delete[] m_szHostBuffer;
- }
- pFileSel->sizeReturnPath = _MAX_PATH;
- m_szHostBuffer = new char[_MAX_PATH];
- if(m_szHostBuffer == nullptr)
- {
return 0;
}
- pFileSel->returnPath = m_szHostBuffer;
+ pFileSel->returnPath[pFileSel->sizeReturnPath] = '\0';
+ pFileSel->reserved = 1;
+ } else
+ {
+ pFileSel->reserved = 0;
}
- strncpy(pFileSel->returnPath, files.first_file.c_str(), pFileSel->sizeReturnPath - 1);
+ strncpy(pFileSel->returnPath, files.first_file.c_str(), pFileSel->sizeReturnPath);
pFileSel->nbReturnPath = 1;
}
return 1;
} else
{
- Log("VST plugin to host: Get Directory\n");
- return 0;
+ // Plugin wants a directory
+
+ char szInitPath[_MAX_PATH];
+ MemsetZero(szInitPath);
+ if(pFileSel->initialPath)
+ {
+ strncpy(szInitPath, pFileSel->initialPath, _MAX_PATH - 1);
+ }
+
+ char szBuffer[_MAX_PATH];
+ MemsetZero(szBuffer);
+
+ BROWSEINFO bi;
+ MemsetZero(bi);
+ bi.hwndOwner = CMainFrame::GetMainFrame()->m_hWnd;
+ bi.lpszTitle = pFileSel->title;
+ bi.pszDisplayName = szInitPath;
+ bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_USENEWUI;
+ LPITEMIDLIST pid = SHBrowseForFolder(&bi);
+ if(pid != NULL && SHGetPathFromIDList(pid, szBuffer))
+ {
+ if(!memcmp(&(effect->uniqueID), "rTSV", 4) && pFileSel->returnPath != nullptr && pFileSel->sizeReturnPath == 0)
+ {
+ // old versions of reViSiT (which still relied on the host's file selection code) seem to be dodgy.
+ // They report a path size of 0, but when using an own buffer, they will crash.
+ // So we'll just assume that reViSiT can handle long enough (_MAX_PATH) paths here.
+ pFileSel->sizeReturnPath = strlen(szBuffer);
+ pFileSel->returnPath[pFileSel->sizeReturnPath] = '\0';
+ }
+ if(pFileSel->returnPath == nullptr || pFileSel->sizeReturnPath == 0)
+ {
+ // Provide some memory for the return path.
+ pFileSel->sizeReturnPath = strlen(szBuffer);
+ pFileSel->returnPath = new char[pFileSel->sizeReturnPath + 1];
+ if(pFileSel->returnPath == nullptr)
+ {
+ return 0;
+ }
+ pFileSel->returnPath[pFileSel->sizeReturnPath] = '\0';
+ pFileSel->reserved = 1;
+ } else
+ {
+ pFileSel->reserved = 0;
+ }
+ strncpy(pFileSel->returnPath, szBuffer, pFileSel->sizeReturnPath);
+ pFileSel->nbReturnPath = 1;
+ return 1;
+ } else
+ {
+ return 0;
+ }
}
} else
{
- Log("VST plugin to host: Close File Selector\n");
- if(m_szHostBuffer != nullptr)
+ // Close file selector - delete allocated strings.
+ if(pFileSel->command == kVstMultipleFilesLoad && pFileSel->returnMultiplePaths != nullptr)
{
- delete[] m_szHostBuffer;
- m_szHostBuffer = nullptr;
+ for(size_t i = 0; i < pFileSel->nbReturnPath; i++)
+ {
+ if(pFileSel->returnMultiplePaths[i] != nullptr)
+ {
+ delete[] pFileSel->returnMultiplePaths[i];
+ }
+ }
+ delete[] pFileSel->returnMultiplePaths;
+ } else
+ {
+ if(pFileSel->reserved == 1 && pFileSel->returnPath != nullptr)
+ {
+ delete[] pFileSel->returnPath;
+ pFileSel->returnPath = nullptr;
+ }
}
return 1;
}
Modified: trunk/OpenMPT/mptrack/Vstplug.h
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.h 2010-11-20 21:11:32 UTC (rev 765)
+++ trunk/OpenMPT/mptrack/Vstplug.h 2010-11-27 23:28:39 UTC (rev 766)
@@ -246,14 +246,11 @@
protected:
long VstCallback(AEffect *effect, long opcode, long index, long value, void *ptr, float opt);
- long VstFileSelector(const bool destructor, VstFileSelect *pFileSel);
+ long VstFileSelector(const bool destructor, VstFileSelect *pFileSel, const AEffect *effect);
static long VSTCALLBACK MasterCallBack(AEffect *effect, long opcode, long index, long value, void *ptr, float opt);
static BOOL __cdecl CreateMixPluginProc(PSNDMIXPLUGIN, CSoundFile*);
VstTimeInfo timeInfo; //rewbs.VSTcompliance
-protected:
- char *m_szHostBuffer; // host's buffer for file select dialog
-
public:
static char s_szHostProductString[64];
static char s_szHostVendorString[64];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-20 21:11:39
|
Revision: 765
http://modplug.svn.sourceforge.net/modplug/?rev=765&view=rev
Author: saga-games
Date: 2010-11-20 21:11:32 +0000 (Sat, 20 Nov 2010)
Log Message:
-----------
[Fix] Format string for keymap errors was broken since rev.762
[Mod] Made the keyboard config dialog look a bit nicer.
[Mod] Updated URLs.
[Ref] Small changes here and there.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/KeyConfigDlg.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
trunk/OpenMPT/soundlib/Loaders.h
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2010-11-20 20:55:32 UTC (rev 764)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2010-11-20 21:11:32 UTC (rev 765)
@@ -1504,7 +1504,7 @@
if(fileVersion > KEYMAP_VERSION)
{
CString err;
- err.Format("Key binding file has version %d. Your version of OpenMPT only supports loading files up to version %d.", szFilename, fileVersion, KEYMAP_VERSION);
+ err.Format("File version is %d, but your version of OpenMPT only supports loading files up to version %d.", fileVersion, KEYMAP_VERSION);
errText += err + "\n";
Log(err);
}
@@ -1543,15 +1543,17 @@
if(!ignoreLine)
{
//Error checking (TODO):
- if (cmd<0 || cmd>=kcNumCommands || spos==-1)
+ if (cmd < 0 || cmd >= kcNumCommands || spos == -1)
{
errorCount++;
CString err;
- if (errorCount<10) {
- err.Format("Line %d was not understood.", l, szFilename);
+ if (errorCount < 10)
+ {
+ err.Format("Line %d was not understood.", l);
errText += err + "\n";
Log(err);
- } else if (errorCount==10) {
+ } else if (errorCount == 10)
+ {
err = "Too many errors detected, not reporting any more.";
errText += err + "\n";
Log(err);
@@ -1571,8 +1573,8 @@
{
CString err;
err.Format("The following problems have been encountered while trying to load the key binding file %s:\n", szFilename);
- errText = err + errText;
- ::MessageBox(NULL, errText, "", MB_ICONEXCLAMATION|MB_OK);
+ err += errText;
+ ::MessageBox(NULL, err, "", MB_ICONEXCLAMATION|MB_OK);
}
if(fileVersion < KEYMAP_VERSION) UpgradeKeymap(pTempCS, fileVersion);
Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2010-11-20 20:55:32 UTC (rev 764)
+++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2010-11-20 21:11:32 UTC (rev 765)
@@ -156,7 +156,7 @@
m_eCustHotKey.SetParent(m_hWnd, IDC_CUSTHOTKEY, this);
m_eReport.FmtLines(TRUE);
- m_eReport.SetWindowText("Log:\r\n");
+ m_eReport.SetWindowText("");
CString s;
s.Format("%d", CMainFrame::gnAutoChordWaitTime);
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-11-20 20:55:32 UTC (rev 764)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-11-20 21:11:32 UTC (rev 765)
@@ -1787,7 +1787,7 @@
m_heContact.SetWindowText(
"Contact / Discussion:\r\n"
- "http://openmpt.com/forum/\r\n"
+ "http://forum.openmpt.org/\r\n"
"\r\nUpdates:\r\n"
"http://sourceforge.net/projects/modplug/");
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2010-11-20 20:55:32 UTC (rev 764)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2010-11-20 21:11:32 UTC (rev 765)
@@ -345,40 +345,40 @@
CTEXT "Writing file...",IDC_TEXT1,4,4,178,9
END
-IDD_OPTIONS_KEYBOARD DIALOGEX 0, 0, 272, 279
+IDD_OPTIONS_KEYBOARD DIALOGEX 0, 0, 274, 281
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Keyboard"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- COMBOBOX IDC_KEYCATEGORY,5,16,130,204,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LISTBOX IDC_COMMAND_LIST,5,32,130,238,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- COMBOBOX IDC_CHOICECOMBO,147,16,79,51,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
- EDITTEXT IDC_CUSTHOTKEY,163,31,98,13,ES_AUTOHSCROLL
- CONTROL "On Key Down",IDC_CHECKKEYDOWN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,44,66,14
- CONTROL "On Key Hold",IDC_CHECKKEYHOLD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,57,66,10
- CONTROL "On Key Up",IDC_CHECKKEYUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,68,66,8
- PUSHBUTTON "Restore",IDC_RESTORE,217,46,43,13
- PUSHBUTTON "Delete",IDC_DELETE,217,64,43,13
- EDITTEXT IDC_KEYREPORT,138,94,128,98,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
- PUSHBUTTON "Y",IDC_NOTESREPEAT,234,207,12,9
- PUSHBUTTON "N",IDC_NONOTESREPEAT,250,207,12,9
- EDITTEXT IDC_CHORDDETECTWAITTIME,234,220,24,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
+ COMBOBOX IDC_KEYCATEGORY,5,16,133,204,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LISTBOX IDC_COMMAND_LIST,5,32,133,244,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_CHOICECOMBO,150,18,114,51,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_CUSTHOTKEY,168,36,95,13,ES_AUTOHSCROLL
+ CONTROL "On Key Down",IDC_CHECKKEYDOWN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,54,66,8
+ CONTROL "On Key Hold",IDC_CHECKKEYHOLD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,66,66,8
+ CONTROL "On Key Up",IDC_CHECKKEYUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,78,66,8
+ PUSHBUTTON "Restore",IDC_RESTORE,222,54,43,13
+ PUSHBUTTON "Delete",IDC_DELETE,222,71,43,13
+ EDITTEXT IDC_KEYREPORT,144,192,126,84,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
+ PUSHBUTTON "Yes",IDC_NOTESREPEAT,228,108,18,9
+ PUSHBUTTON "No",IDC_NONOTESREPEAT,246,108,18,9
+ EDITTEXT IDC_CHORDDETECTWAITTIME,240,120,24,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
PUSHBUTTON "it",IDC_EFFECTLETTERSIT,103,184,12,9,NOT WS_VISIBLE
PUSHBUTTON "xm",IDC_EFFECTLETTERSXM,119,184,12,9,NOT WS_VISIBLE
- PUSHBUTTON "Load Keys...",IDC_LOAD,144,252,54,13
- PUSHBUTTON "Save Keys As...",IDC_SAVE,204,252,54,13
+ PUSHBUTTON "Import Keys...",IDC_LOAD,150,156,54,13
+ PUSHBUTTON "Export Keys...",IDC_SAVE,210,156,54,13
CONTROL "Debug Save",IDC_DEBUGSAVE,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,59,199,56,10
- LTEXT "Select category:",IDC_STATIC,7,5,74,11
- PUSHBUTTON "Set",IDC_SET,225,45,43,13,NOT WS_VISIBLE
- GROUPBOX "Key setup for this command ",IDC_STATIC,139,5,127,75
- LTEXT "Key:",IDC_STATIC,147,33,16,8
- GROUPBOX "Misc",IDC_STATIC,138,198,126,37
- GROUPBOX "Multi Config Handling",IDC_STATIC,138,240,126,31
- LTEXT "Repeat notes on hold?",IDC_STATIC,142,207,74,11
+ LTEXT "Select category:",IDC_STATIC,7,5,131,11
+ PUSHBUTTON "Set",IDC_SET,228,52,43,13,NOT WS_VISIBLE
+ GROUPBOX "Key setup for this command ",IDC_STATIC,144,6,126,84
+ LTEXT "Key:",IDC_STATIC,150,38,16,8
+ GROUPBOX "Misc",IDC_STATIC,144,96,126,40
+ GROUPBOX "Multi Config Handling",IDC_STATIC,144,144,126,31
+ LTEXT "Repeat notes on hold?",IDC_STATIC,150,108,74,8
LTEXT "Effect letters like:",IDC_STATIC,11,185,73,11,NOT WS_VISIBLE
- LTEXT "Chord detect interval (ms):",IDC_STATIC,142,222,88,11
- LTEXT "Log:",IDC_STATIC,141,84,19,10
- PUSHBUTTON "Clear Log",IDC_CLEARLOG,227,85,37,9
+ LTEXT "Chord detect interval (ms):",IDC_STATIC,150,122,88,8
+ LTEXT "Error Log:",IDC_STATIC,144,180,88,8
+ PUSHBUTTON "Clear Log",IDC_CLEARLOG,228,179,42,12
END
IDD_OPTIONS_COLORS DIALOGEX 0, 0, 272, 281
@@ -1564,9 +1564,9 @@
IDD_OPTIONS_KEYBOARD, DIALOG
BEGIN
- RIGHTMARGIN, 266
+ RIGHTMARGIN, 268
TOPMARGIN, 5
- BOTTOMMARGIN, 275
+ BOTTOMMARGIN, 277
END
IDD_OPTIONS_COLORS, DIALOG
@@ -2377,7 +2377,7 @@
"Can't open keybindings file %1 for reading. Default keybindings will be used."
IDS_UNABLE_TO_LOAD_KEYBINDINGS
"Loading keybindings failed. The keyboard won't work properly."
- IDS_CANT_OPEN_FILE_FOR_WRITING "Can't open file for writing."
+ IDS_CANT_OPEN_FILE_FOR_WRITING "Can't open keybindings file for writing."
IDS_CONFIRM_SEQUENCE_DELETE "Delete sequence %1?"
IDS_PATTERN_CLEANUP_UNAVAILABLE
"Removing unused patterns is not available when using multiple sequences."
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-11-20 20:55:32 UTC (rev 764)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-11-20 21:11:32 UTC (rev 765)
@@ -221,7 +221,7 @@
[New] <Jojo> Key shortcut + context menu entry for toggling the plugin editor of the PC note that's under the cursor.
[Imp] <Jojo> Overflow paste now only uses one undo step.
[Imp] <Jojo> Instead of simply ignoring note off/cut/fade when working with .MOD files, it is converted to C00.
- [Fix] <rewbs> Effect visualizer is now aware of PC notes (bug 3836).
+ [Fix] <rewbs> Effect visualizer is now aware of PC notes (http://forum.openmpt.org/index.php?topic=3836.0).
[Fix] <Jojo> When using MIDI record or split keyboard settings, volume data was written into the volume column in MOD format.
[Fix] <Jojo> When converting PC Notes to MIDI Macros, the instrument index is now also cleaned as well. Noticeable for example when pasting PC notes into an IT module.
[Fix] <Jojo> Now, plugin slot 100 can also be automated using PC Notes.
@@ -886,31 +886,31 @@
v1.17.02.53 (May 2009, revision 259)
------------------------------------
General
- [New] <jojo> Can now import MO3 files using external library. (rev. 248)
+ [New] <Jojo> Can now import MO3 files using external library. (rev. 248)
- [Fix] <jojo> Song Cleanup: Sample cleanup should no longer remove data after sustain loop end point. (rev. 248)
- [Fix] <jojo> Misc: When adding channels from song properties, new channels are now initialized properly (bug 1814). (rev. 236)
- [Fix] <jojo> BPM approximation showed wrong rows per beat in some cases (bug 2532) (rev. 231)
- [Fix] <jojo> Disabled special handling of '&'-character when drawing texts to various components where the special handling should not take place. (http://forum.openmpt.org/index.php?topic=1962.0) (rev. 229)
- [Fix] <re> File opening: Added a couple of return value checks to reduce the change of crash when opening lots of files (bug 2546) (rev. 239)
+ [Fix] <Jojo> Song Cleanup: Sample cleanup should no longer remove data after sustain loop end point. (rev. 248)
+ [Fix] <Jojo> Misc: When adding channels from song properties, new channels are now initialized properly (http://forum.openmpt.org/index.php?topic=1814.0). (rev. 236)
+ [Fix] <Jojo> BPM approximation showed wrong rows per beat in some cases (http://forum.openmpt.org/index.php?topic=2532.0) (rev. 231)
+ [Fix] <Jojo> Disabled special handling of '&'-character when drawing texts to various components where the special handling should not take place. (http://forum.openmpt.org/index.php?topic=1962.0) (rev. 229)
+ [Fix] <re> File opening: Added a couple of return value checks to reduce the change of crash when opening lots of files (http://forum.openmpt.org/index.php?topic=2546.0) (rev. 239)
- [Mod] <jojo> Menu: Goto dialog can now be opened from Edit-menu. (rev. 246)
+ [Mod] <Jojo> Menu: Goto dialog can now be opened from Edit-menu. (rev. 246)
[Mod] <re> Pattern cleanup: Clearing sequence after first '---' item is now optional. (rev. 239)
[Mod] <re> When passing MIDI to plug, documents will now be set modified since MIDI data may change parameters. (rev. 243)
General tab
- [Mod] <jojo> General tab: VST volume slider is now disabled for S3M. (rev. 246)
- [Mod] <jojo> General tab: Initial channel volume controls are now enabled only for IT and MPTM. (rev. 246)
+ [Mod] <Jojo> General tab: VST volume slider is now disabled for S3M. (rev. 246)
+ [Mod] <Jojo> General tab: Initial channel volume controls are now enabled only for IT and MPTM. (rev. 246)
Pattern tab
- [New] <jojo> Added descriptions of SBx, S3x, S4x and S5x command parameters to note properties dialog. (rev. 251)
- [New] <jojo> Descriptions to retrigger note command parameters in note properties dialog. (rev. 248)
- [New] <jojo> Ability to start playback with incoming MIDI note (see setup->MIDI) (rev. 246)
- [New] <jojo> Duplicate channel (see channel header context menu). (246)
+ [New] <Jojo> Added descriptions of SBx, S3x, S4x and S5x command parameters to note properties dialog. (rev. 251)
+ [New] <Jojo> Descriptions to retrigger note command parameters in note properties dialog. (rev. 248)
+ [New] <Jojo> Ability to start playback with incoming MIDI note (see setup->MIDI) (rev. 246)
+ [New] <Jojo> Duplicate channel (see channel header context menu). (246)
[New] <re> MIDI controllers can now be used to input smooth MIDI macro commands to pattern (setup->MIDI). (rev. 240)
[Fix] <re> Undo should now work with chords. (rev. 244)
- [Fix] <re> When playing with MIDI keyboard, plugins got a constant note velocity, not the actual velocity (bug 2754) (rev. 239)
+ [Fix] <re> When playing with MIDI keyboard, plugins got a constant note velocity, not the actual velocity (http://forum.openmpt.org/index.php?topic=2754.0) (rev. 239)
[Fix] <re> Undo fixes (didn't properly handle playback positions/multichannel record, set redundant undo points)(rev 243)
[Fix] <re> Param record in plugs GUI wrote commands even when pattern record was off. (rev 243)
[Fix] <re> Fixed chord detection when row spacing was enabled. (rev 243)
@@ -918,35 +918,35 @@
[Fix] <re> Accidental moving when selecting order in margins shouldn't happen anymore. (rev 225)
[Fix] <re> Fix to possible crash when using undo after pattern resize (bug introduced in rev. 168)
- [Mod] <jojo> When applying "change instrument", an instrument number won't be added to note off/cut anymore if the note doesn't already have an instrument. (rev. 248)
+ [Mod] <Jojo> When applying "change instrument", an instrument number won't be added to note off/cut anymore if the note doesn't already have an instrument. (rev. 248)
[Mod] <re> Default orderlist margin value can now be controlled with "DefaultSequenceMargins" ini-settings under "Pattern Editor" context. (rev 225)
- [Mod] <jojo & re> Sequence view: Sequence scrolling won't no longer be cut on first '---' item on IT/MPTM/XM. (rev. 237)
- [Fix] <re> Pattern: The keyboard split 'feature' when entering chords is removed (bug 2790). (rev. 244)
+ [Mod] <Jojo & re> Sequence view: Sequence scrolling won't no longer be cut on first '---' item on IT/MPTM/XM. (rev. 237)
+ [Fix] <re> Pattern: The keyboard split 'feature' when entering chords is removed (http://forum.openmpt.org/index.php?topic=2790.0). (rev. 244)
Sample tab
- [New] <jojo> Can now normalize sample selections. (rev. 254)
- [New] <jojo> Can now optionally normalize all samples instead of just one (click normalize with shift down) (rev. 249)
- [New] <jojo & re> Status bar now displays offset value at given sample point. (rev. 232)
- [New] <jojo & re> Sample amplify now accepts negative values(inverts sample phase) (request 2219) (rev. 234)
- [New] <jojo & re> Signed/unsigned sample conversion. (rev. 235)
+ [New] <Jojo> Can now normalize sample selections. (rev. 254)
+ [New] <Jojo> Can now optionally normalize all samples instead of just one (click normalize with shift down) (rev. 249)
+ [New] <Jojo & re> Status bar now displays offset value at given sample point. (rev. 232)
+ [New] <Jojo & re> Sample amplify now accepts negative values(inverts sample phase) (request 2219) (rev. 234)
+ [New] <Jojo & re> Signed/unsigned sample conversion. (rev. 235)
[New] <re> Added button for phase invert to toolbar. (rev. 235)
- [New] <jojo> Ability to save sample as raw. (rev. 236)
+ [New] <Jojo> Ability to save sample as raw. (rev. 236)
[Fix] <re> Fix to zoom-related crash when loading samples in sample tab. Occurs usually with lengthy samples. (rev. 211)
- [Fix] <jojo> Playing sample selection didn't work properly in all cases (bug 1700). (rev. 231)
- [Fix] <jojo> Setting loop points could affect playing of sample even if loop was disabled (bug 1874) (rev. 231)
+ [Fix] <Jojo> Playing sample selection didn't work properly in all cases (http://forum.openmpt.org/index.php?topic=1700.0). (rev. 231)
+ [Fix] <Jojo> Setting loop points could affect playing of sample even if loop was disabled (http://forum.openmpt.org/index.php?topic=1874.0) (rev. 231)
- [Mod] <jojo> Notes from MIDI should now be played like notes from keyboard. (rev. 246)
- [Mod] <jojo> Play sample button now stops previous note even if mod is playing (bug 1366) (rev. 231)
- [Mod] <jojo> Sustain loop will now be enabled when setting it to sample selection. (rev. 231)
- [Mod] <jojo> Sample editing: If possible, use loop points as trim limits if there's no selection chosen. (rev. 230)
+ [Mod] <Jojo> Notes from MIDI should now be played like notes from keyboard. (rev. 246)
+ [Mod] <Jojo> Play sample button now stops previous note even if mod is playing (http://forum.openmpt.org/index.php?topic=1366.0) (rev. 231)
+ [Mod] <Jojo> Sustain loop will now be enabled when setting it to sample selection. (rev. 231)
+ [Mod] <Jojo> Sample editing: If possible, use loop points as trim limits if there's no selection chosen. (rev. 230)
[Mod] <re> Time stretching is now implemented with SoundTouch library. (rev. 228)
[Mod] <re> Disabled pitchshifting/time stretching of 8-bit samples(didn't seem to work). (rev. 228)
Instrument tab
- [Fix] <jojo> Envelope view: Middle line will now be drawn in panning and pitch/filter envelopes even if row guidelines are enabled. (rev. 254)
+ [Fix] <Jojo> Envelope view: Middle line will now be drawn in panning and pitch/filter envelopes even if row guidelines are enabled. (rev. 254)
- [Mod] <jojo> Instrument tab: Sample map can now map "No sample". (rev. 236)
+ [Mod] <Jojo> Instrument tab: Sample map can now map "No sample". (rev. 236)
[Mod] <re> Changed default instrument plug volume command handling from Dry/Wet to none. Also added ini-setting with which one can set the default value used for new instruments. Ini setting is "DefaultPlugVolumeHandling" in [Misc], possible values are 0,1,2. (rev. 238)
MPTM
@@ -960,23 +960,23 @@
[Mod] <re> Notes should now be drawn more clearly when using custom tunings. (rev. 217)
IT
- [Fix] <jojo & re> Macro config should now be loaded correctly also when loading IT files not made with MPT. (rev. 257)
- [Fix] <jojo & re> Playback fix to vibrato with ramp down waveform in IT compatibility play. (rev. 257)
+ [Fix] <Jojo & re> Macro config should now be loaded correctly also when loading IT files not made with MPT. (rev. 257)
+ [Fix] <Jojo & re> Playback fix to vibrato with ramp down waveform in IT compatibility play. (rev. 257)
[Fix] <re> When file was saved with compatibility export, the last order was not shown in Impulse Tracker. (rev. 257)
XM
- [Fix] <jojo> Fix to handling a special case of Bxx and Dxx (bug 2769) (rev 241)
+ [Fix] <Jojo> Dxx effects that are to the left of a Bxx effect are now ignored. (http://forum.openmpt.org/index.php?topic=2769.0) (rev 241)
S3M
[Fix] <re> S3M saving: Sequence of length 241-255 should now be cut to length 240 instead of 16. (rev. 239)
- [Mod] <re> When loading S3M files which contain Zxx effects, user is now asked how to process them. (bug 2166) (rev. 233)
[Mod] <re> S3M saving: Saved sequence is no longer cut on first '---' item. (rev. 239)
+ [Mod] <re> When loading S3M files which contain Zxx effects, user is now asked how to process them. (http://forum.openmpt.org/index.php?topic=2166.0) (rev. 233)
MOD
- [Fix] <jojo & re> Fixes to MOD saving: it should now be possible to create ProTracker compatible MOD files with compatibility export. (rev. 256)
+ [Fix] <Jojo & re> Fixes to MOD saving: it should now be possible to create ProTracker compatible MOD files with compatibility export. (rev. 256)
Package template
- [Mod] <jojo> PackageTemplate: Update to DE_jojo-keymap
+ [Mod] <Jojo> PackageTemplate: Update to DE_jojo.mkb keymap
Misc
[Fix] <from libmodplug> Fix to faulty portamento handling on loading AMF.
@@ -987,15 +987,15 @@
v1.17.02.52 (14 Apr 2008, revision 210)
---------------------------------------
[Fix] <re> Shouldn't need winhttp anymore (at least now that updatecheck is disabled). Dependency caused problems in Win98.
- [Fix] <re> Fix to faulty plug file existence check (introduced in 1.17.02.51)(http://forum.openmpt.org/index.php?topic=2255.0)
+ [Fix] <re> Fix to faulty plug file existence check (introduced in 1.17.02.51) (http://forum.openmpt.org/index.php?topic=2255.0)
[Fix] <re> Sound card-options buffer length value validation.
- [Fix] <re> In .51, muted channels were ignored completely in MIDI export. Now pattern effects are processed in muted channels.
+ [Fix] <re> In 1.17.02.51, muted channels were ignored completely in MIDI export. Now pattern effects are processed in muted channels.
[Fix] <re> IT style-playback fix
v1.17.02.51 (29 Mar 2008, revision 208) internal test build
-----------------------------------------------------------
- [Fix] <re> Fix to crash when loading VST with long(>32) param name.
+ [Fix] <re> Fix to crash when loading VST with long(> 32 characters) param name.
[Fix] <ma & re> Fix to possible memory corruption problem on handling VST with more than 30 outputs.
- VST with more than 32 outputs might still be handled poorly.
[Fix] <re> Fix to possible crash when browsing modules in treeview(http://forum.openmpt.org/index.php?topic=2222.0).
Modified: trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
===================================================================
--- trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-11-20 20:55:32 UTC (rev 764)
+++ trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-11-20 21:11:32 UTC (rev 765)
@@ -120,7 +120,7 @@
<ul>
<li>It is very simple to <strong>switch to another module</strong> now: Simply click the module name!</li>
<li><strong>Closing a module</strong> is almost as simple: Right-click the module name and select the appropriate context menu entry.</li>
- <li>Sample and instrument <strong>playback indicators</strong>.</li>
+ <li>Sample and instrument <strong>playback indication icons</strong>. Has to be enabled from the settings.</li>
<li><strong>Improved icons</strong>: Mute status is now displayed.</li>
<li><strong>Sequence control</strong> including copying a sequence to another module.</li>
</ul>
@@ -207,8 +207,9 @@
<h2>Contact</h2>
<p>
- Helpful bug reports, new ideas and brave volunteers to test early development builds or contribute to the code are more than welcome!
- You can meet us at the ModPlug Central forums: <a href="http://forum.openmpt.org/">http://forum.openmpt.org/</a>.
+ Helpful bug reports, new ideas and brave volunteers to test early development builds or contribute to the code are more than welcome!<br />
+ Our issue tracker is located at <a href="http://bugs.openmpt.org/">http://bugs.openmpt.org/</a> and can be used to report bugs and feature requests.<br />
+ You can also meet us at the ModPlug Central forums: <a href="http://forum.openmpt.org/">http://forum.openmpt.org/</a>.
</p>
</body>
Modified: trunk/OpenMPT/soundlib/Loaders.h
===================================================================
--- trunk/OpenMPT/soundlib/Loaders.h 2010-11-20 20:55:32 UTC (rev 764)
+++ trunk/OpenMPT/soundlib/Loaders.h 2010-11-20 21:11:32 UTC (rev 765)
@@ -9,7 +9,7 @@
#include "Sndfile.h"
-// Execute "action" if "request" bytes cannot be read from stream
+// Execute "action" if "request_bytes" bytes cannot be read from stream at position "position"
#define ASSERT_CAN_READ_PROTOTYPE(position, length, request_bytes, action) \
if( position > length || request_bytes > length - position) action;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-20 20:55:39
|
Revision: 764
http://modplug.svn.sourceforge.net/modplug/?rev=764&view=rev
Author: saga-games
Date: 2010-11-20 20:55:32 +0000 (Sat, 20 Nov 2010)
Log Message:
-----------
[Fix] IT Compatibility: Further fixes to autovibrato handling.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-11-17 21:07:55 UTC (rev 763)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-11-20 20:55:32 UTC (rev 764)
@@ -611,7 +611,7 @@
{
resetEnvelopes(pChn);
}
- // IT Compatibility: Always reset autovibrato settings when there's an instrument number
+ // IT Compatibility: Autovibrato reset
if(!IsCompatibleMode(TRK_IMPULSETRACKER))
{
pChn->nAutoVibDepth = 0;
@@ -630,13 +630,6 @@
return;
}
- // IT Compatibility: Always reset autovibrato settings when there's an instrument number
- if(IsCompatibleMode(TRK_IMPULSETRACKER))
- {
- pChn->nAutoVibDepth = 0;
- pChn->nAutoVibPos = 0;
- }
-
// Tone-Portamento doesn't reset the pingpong direction flag
if ((bPorta) && (pSmp == pChn->pModSample))
{
@@ -681,6 +674,13 @@
pChn->nLoopStart = pSmp->nLoopStart;
pChn->nLoopEnd = pSmp->nLoopEnd;
+ // IT Compatibility: Autovibrato reset
+ if(IsCompatibleMode(TRK_IMPULSETRACKER))
+ {
+ pChn->nAutoVibDepth = 0;
+ pChn->nAutoVibPos = 0;
+ }
+
if(bNewTuning)
{
pChn->nC5Speed = pSmp->nC5Speed;
@@ -714,7 +714,7 @@
void CSoundFile::NoteChange(UINT nChn, int note, bool bPorta, bool bResetEnv, bool bManual)
//-----------------------------------------------------------------------------------------
{
- if (note < 1) return;
+ if (note < NOTE_MIN) return;
MODCHANNEL * const pChn = &Chn[nChn];
MODSAMPLE *pSmp = pChn->pModSample;
MODINSTRUMENT *pIns = pChn->pModInstrument;
@@ -786,7 +786,7 @@
}
if (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2|MOD_TYPE_MED)) note += pChn->nTranspose;
- note = CLAMP(note, 1, 132);
+ note = CLAMP(note, NOTE_MIN, NOTE_MAX);
pChn->nNote = note;
pChn->m_CalculateFreq = true;
@@ -852,8 +852,12 @@
if ((m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)) && (pChn->dwFlags & CHN_NOTEFADE) && (!pChn->nFadeOutVol))
{
resetEnvelopes(pChn);
- pChn->nAutoVibDepth = 0;
- pChn->nAutoVibPos = 0;
+ // IT Compatibility: Autovibrato reset
+ if(!IsCompatibleMode(TRK_IMPULSETRACKER))
+ {
+ pChn->nAutoVibDepth = 0;
+ pChn->nAutoVibPos = 0;
+ }
pChn->dwFlags &= ~CHN_NOTEFADE;
pChn->nFadeOutVol = 65536;
}
@@ -874,6 +878,13 @@
pChn->nLeftVU = pChn->nRightVU = 0xFF;
pChn->dwFlags &= ~CHN_FILTER;
pChn->dwFlags |= CHN_FASTVOLRAMP;
+ // IT Compatibility: Autovibrato reset
+ if(bResetEnv && IsCompatibleMode(TRK_IMPULSETRACKER))
+ {
+ pChn->nAutoVibDepth = 0;
+ pChn->nAutoVibPos = 0;
+ pChn->nVibratoPos = 0;
+ }
//IT compatibility 15. Retrigger will not be reset (Tremor doesn't store anything here, so we just don't reset this as well)
if(!IsCompatibleMode(TRK_IMPULSETRACKER))
{
@@ -939,8 +950,12 @@
}
}
}
- pChn->nAutoVibDepth = 0;
- pChn->nAutoVibPos = 0;
+ // IT Compatibility: Autovibrato reset
+ if(!IsCompatibleMode(TRK_IMPULSETRACKER))
+ {
+ pChn->nAutoVibDepth = 0;
+ pChn->nAutoVibPos = 0;
+ }
}
pChn->nLeftVol = pChn->nRightVol = 0;
bool bFlt = (m_dwSongFlags & SONG_MPTFILTERMODE) ? false : true;
@@ -1447,8 +1462,12 @@
{
pChn->dwFlags |= CHN_FASTVOLRAMP;
resetEnvelopes(pChn);
- pChn->nAutoVibDepth = 0;
- pChn->nAutoVibPos = 0;
+ // IT Compatibility: Autovibrato reset
+ if(!IsCompatibleMode(TRK_IMPULSETRACKER))
+ {
+ pChn->nAutoVibDepth = 0;
+ pChn->nAutoVibPos = 0;
+ }
pChn->dwFlags &= ~CHN_NOTEFADE;
pChn->nFadeOutVol = 65536;
}
@@ -1524,8 +1543,12 @@
{
pChn->dwFlags |= CHN_FASTVOLRAMP;
resetEnvelopes(pChn);
- pChn->nAutoVibDepth = 0;
- pChn->nAutoVibPos = 0;
+ // IT Compatibility: Autovibrato reset
+ if(!IsCompatibleMode(TRK_IMPULSETRACKER))
+ {
+ pChn->nAutoVibDepth = 0;
+ pChn->nAutoVibPos = 0;
+ }
}
}
// Tick-0 only volume commands
@@ -2005,7 +2028,9 @@
}
// see http://forum.openmpt.org/index.php?topic=2769.0 - FastTracker resets Dxx if Bxx is called _after_ Dxx
if(GetType() == MOD_TYPE_XM)
+ {
nBreakRow = 0;
+ }
break;
// Pattern Break
@@ -2018,7 +2043,7 @@
}
if (m && m->command == CMD_XPARAM)
{
- nBreakRow = (param<<8) + m->param;
+ nBreakRow = (param << 8) + m->param;
} else
{
nBreakRow = param;
@@ -2118,7 +2143,7 @@
}
}
m_nNextPattern = nPosJump;
- m_nNextRow = (UINT)nBreakRow;
+ m_nNextRow = nBreakRow;
m_bPatternTransitionOccurred = true;
}
} //Ends condition (nBreakRow >= 0) || (nPosJump >= 0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-17 21:08:02
|
Revision: 763
http://modplug.svn.sourceforge.net/modplug/?rev=763&view=rev
Author: saga-games
Date: 2010-11-17 21:07:55 +0000 (Wed, 17 Nov 2010)
Log Message:
-----------
[Mod] Updated History.txt, updated URLs.
Modified Paths:
--------------
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-11-16 21:39:23 UTC (rev 762)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-11-17 21:07:55 UTC (rev 763)
@@ -10,10 +10,11 @@
(tx XYZ): thanks to XYZ for telling us about the bug
-v1.19.xx.xx (October 2010, revision 748) not release yet
---------------------------------------------------------
+v1.19.01.00 (October 2010, revision 757)
+----------------------------------------
Pattern tab
[New] <Jojo> Experimental feature: Play the whole pattern row when entering notes and chords into the pattern editor. This can be enabled from the setup screen.
+ [Mod] <Jojo> Using the Goto Dialog should now update channel parameters and set the elapsed time. (http://bugs.openmpt.org/view.php?id=28)
[Fix] <Jojo> Cursor paste was possible even when editing was disabled.
[Fix] <Jojo> When entering chords into the pattern editor, the module was only marked as modified if the base note of the chord was changed.
[Fix] <Jojo> When jumping to an order which is normally not played, the song variables are now reset (previously, if the main song had f.e. a global volume fade out at the end, this was retained when switching to an unplayed order, effectively muting all sub songs).
@@ -23,9 +24,11 @@
[Fix] <Jojo> The meaning of Q0x was displayed wrong for S3M / IT.
Sample tab
+ [Imp] <re> Ctrl + Mouse Wheel can now be used for zooming into the sample data.
[Fix] <Jojo> When cutting samples with a loop, the loop end point was not always moved correctly if the cut start was in the loop.
Instrument tab
+ [Imp] <re> Ctrl + Mouse Wheel can now be used for zooming into the envelopes.
[Mod] <Jojo> Copying and pasting envelopes with no points isn't possible anymore. (Who wants to do that anyway?)
[Fix] <Jojo> Changing the filter mode didn't mark the file as modified.
@@ -37,12 +40,17 @@
[Fix] <Jojo> Q0y means "no volume change" in S3M / IT, but R0y means "continue volume change" in FT2, and converting from IT / S3M to XM didn't consider this. Q0y is now converted to R8y, and E9y is now converted to Q0y (instead of Q8y).
Playback
+ [New] <Jojo> New mix mode: Compatible. This is used for MOD / S3M / XM / IT by default and has more appropriate mixing levels for those formats (same levels as Schism Tracker) than mix mode RC3. Please use compatible mixing levels when working with legacy formats from now on.
[Imp] <Jojo> Improved the algorithm for finding a free channel for note playback in the editor (does not affect normal module playback).
+ [Fix] <Jojo> Pattern jumps to the same row + pattern as the jump command are not ignored anymore. (http://forum.openmpt.org/index.php?topic=1810.0)
+
IT
[New] <Jojo> Edit history information can now be read from IT files and saved to IT / MPTM files. This is based on an undocumented feature in Impulse Tracker. Use View -> Edit History for viewing or deleting this information.
[Imp] <Jojo> ITs made with Modplug Tracker 1.00a5 are now also detected as such.
- [Mod] <Jojo> Sane values are used again for the "cwtv" and "cmwt" header fields when saving IT files; in fact the same values as in compatibility export are used. To be able to distinguish between raped and compatiblity-exported IT files, "OMPT" is written in the "reserved" header field. As a consequence, IT files made with OpenMPT can now be loaded in Impulse Tracker again.
+ [Mod] <Jojo> Sane values are used again for the "cwtv" and "cmwt" header fields when saving IT files; in fact the same values as in compatibility export are used. To be able to distinguish between raped and compatibility-exported IT files, "OMPT" is written in the "reserved" header field. As a consequence, IT files made with OpenMPT can now be loaded in Impulse Tracker again.
+ [Mod] <Jojo> IT Loader: MIDI macros are now cleared when loading IT files made with old Impulse Tracker versions (< 2.14), so that Zxx commands won't break the songs anymore (fixes denonde.it, fix from Schism Tracker).
+ [Fix] <Jojo> Sample autovibrato is now hopefully a bit closer to Impulse Tracker in compatible mode...
[Fix] <Jojo> The envelope handling was altered slightly to work more like in Schism Tracker. This fixes a combination of Envelope Carry + Portamento as it can be found in "electric bunny" by Alpha C.
[Fix] <Jojo> Various fixes to playback of multi-sample instruments. "Ultima Ratio" by Nebularia and "Shuttle Departure" by Sphenx sound better now.
[Fix] <Jojo> The extended sample map is not saved anymore in the instrument headers when using compatibility export.
@@ -52,8 +60,9 @@
[New] <Jojo> Edit history information (read the "IT" section above for an explanation)
XM
- [Fix] <Jojo> XM Compatiblity: Various mind-boggling combinations of EDx, notes and instrument numbers should work correctly now.
- [Fix] <Jojo> XM Compatiblity: When there's a instrument number next to a 3xx effect which differs from the previous instrument number, it resets the instrument properties of the previous instrument now.
+ [Fix] <Jojo> XM Compatibility: Various mind-boggling combinations of EDx, notes and instrument numbers should work correctly now.
+ [Fix] <Jojo> XM Compatibility: When there's a instrument number next to a 3xx effect which differs from the previous instrument number, it resets the instrument properties of the previous instrument now.
+ [Fix] <Jojo> XM Compatibility: Portamento combined with an Offset command results in the offset command being ignored.
[Fix] <Jojo> XM Loader: Fixed handling of instruments with no samples, so that instruments assigned to VST plugins work correctly.
MOD
@@ -64,6 +73,7 @@
[New] <Jojo> Added a heuristic detection for VBlank MODs. Most MODs use the CIA timer instead of VBlank timing, but some don't.
[New] <Jojo> Added a heuristic detection for PT 1.x playback mode: If there is pattern data that looks like it needs on-the-fly sample swapping, PT 1.x mode is enabled.
[New] <Jojo> Added a heuristic detection for MODs with 7-bit panning, which is then automatically converted to 8-bit panning.
+ [Fix] <Jojo> Tentative fix for MODs with short loops at the sample start that were most likely not intended.
S3M
[Mod] <Jojo> Changed some code in the S3M loader that should only affect really broken S3M files which every player handles different anyway (at least my broken version of aa-polym.s3m sounds better now)
@@ -87,6 +97,7 @@
[New] <Jojo> WAV Export: Sample-exact cue points are now written at each pattern transition.
[Imp] <Jojo> New keyboard shortcuts: Panic, View Edit History, Set Invalid / Ignore (--- / +++) Pattern (in the orderlist)
[Imp] <Jojo> Some improvements were made to the Registry / INI reading: If there were no Registry settings because MPT 1.16 was previously not installed, the INI file is now also read as it might contain some lines created by the installer.
+ [Mod] <Jojo> Changes to keymap file handling: The active keymap is now always saved to Keybindings.mkb (in either %APPDATA%\OpenMPT or the executable's directory). Any other keymaps are now only overwritten when using the "Save keys as" function.
[Mod] <Jojo> On first run, the default ASIO driver is now chosen instead of DirectSound (if there is one).
[Mod] <Jojo> The "Original" mix mode now also has a version number (1.16) to reflect what the "original" thing is.
[Mod] <Jojo> Updated genre list in the MP3 export dialog.
@@ -623,7 +634,7 @@
[Mod] <Jojo> Entering note with row spacing enabled can now move cursor to next pattern if continuous scroll is enabled.
[Fix] <Jojo> Inserting a new pattern won't resize it to 32 rows anymore if the current pattern has less than 32 rows.
[Fix] <Jojo> Show "offset" and "velocity" volume commands in default color instead of "pitch" color.
- [Fix] <Jojo> Fixed weird combination of context menu shortcut and "always center active row" being disabled (http://lpchip.com/modplug/viewtopic.php?t=3203).
+ [Fix] <Jojo> Fixed weird combination of context menu shortcut and "always center active row" being disabled (http://forum.openmpt.org/index.php?topic=3203.0).
[Fix] <Jojo> Keyboard split note was off by one.
[Fix] <Jojo> Set max. row spacing / skipping value to 64, visibly clamp values > 64 to 64 in the edit box.
@@ -880,7 +891,7 @@
[Fix] <jojo> Song Cleanup: Sample cleanup should no longer remove data after sustain loop end point. (rev. 248)
[Fix] <jojo> Misc: When adding channels from song properties, new channels are now initialized properly (bug 1814). (rev. 236)
[Fix] <jojo> BPM approximation showed wrong rows per beat in some cases (bug 2532) (rev. 231)
- [Fix] <jojo> Disabled special handling of '&'-character when drawing texts to various components where the special handling should not take place. (http://lpchip.com/modplug/viewtopic.php?t=1962) (rev. 229)
+ [Fix] <jojo> Disabled special handling of '&'-character when drawing texts to various components where the special handling should not take place. (http://forum.openmpt.org/index.php?topic=1962.0) (rev. 229)
[Fix] <re> File opening: Added a couple of return value checks to reduce the change of crash when opening lots of files (bug 2546) (rev. 239)
[Mod] <jojo> Menu: Goto dialog can now be opened from Edit-menu. (rev. 246)
@@ -903,7 +914,7 @@
[Fix] <re> Undo fixes (didn't properly handle playback positions/multichannel record, set redundant undo points)(rev 243)
[Fix] <re> Param record in plugs GUI wrote commands even when pattern record was off. (rev 243)
[Fix] <re> Fixed chord detection when row spacing was enabled. (rev 243)
- [Fix] <re> Fix to displaying wrong pattern name when using more than 255 patterns (http://lpchip.com/modplug/viewtopic.php?t=2344) (rev. 212)
+ [Fix] <re> Fix to displaying wrong pattern name when using more than 255 patterns (http://forum.openmpt.org/index.php?topic=2344.0) (rev. 212)
[Fix] <re> Accidental moving when selecting order in margins shouldn't happen anymore. (rev 225)
[Fix] <re> Fix to possible crash when using undo after pattern resize (bug introduced in rev. 168)
@@ -976,7 +987,7 @@
v1.17.02.52 (14 Apr 2008, revision 210)
---------------------------------------
[Fix] <re> Shouldn't need winhttp anymore (at least now that updatecheck is disabled). Dependency caused problems in Win98.
- [Fix] <re> Fix to faulty plug file existence check (introduced in 1.17.02.51)(http://lpchip.com/modplug/viewtopic.php?t=2255)
+ [Fix] <re> Fix to faulty plug file existence check (introduced in 1.17.02.51)(http://forum.openmpt.org/index.php?topic=2255.0)
[Fix] <re> Sound card-options buffer length value validation.
[Fix] <re> In .51, muted channels were ignored completely in MIDI export. Now pattern effects are processed in muted channels.
[Fix] <re> IT style-playback fix
@@ -987,30 +998,30 @@
[Fix] <re> Fix to crash when loading VST with long(>32) param name.
[Fix] <ma & re> Fix to possible memory corruption problem on handling VST with more than 30 outputs.
- VST with more than 32 outputs might still be handled poorly.
- [Fix] <re> Fix to possible crash when browsing modules in treeview(http://lpchip.com/modplug/viewtopic.php?t=2222).
+ [Fix] <re> Fix to possible crash when browsing modules in treeview(http://forum.openmpt.org/index.php?topic=2222.0).
[Fix] <re> Fix to severe memory leak in the same section as above.
[Fix] <re> Fix to mptm not showing in tree view file browser.
- [Fix] <re> Fix to MIDI drum export (http://lpchip.com/modplug/viewtopic.php?t=2024)
+ [Fix] <re> Fix to MIDI drum export (http://forum.openmpt.org/index.php?topic=2024.0)
[Fix] <re> Fix to possible crash on MIDI export if exporting module with more than 64 channels.
- [Mod] <re> MIDI export won't anymore export muted channels(http://lpchip.com/modplug/viewtopic.php?t=2017)
- [Fix] <re> When converting MOD->S3M/IT/MPTM, finetune setting was ignored (http://lpchip.com/modplug/viewtopic.php?t=1706)
- [Fix] <re> IT compatibility: Fix to not resetting envelopes on new instrument (http://lpchip.com/modplug/viewtopic.php?t=1869)
- [Fix] <re> IT compatibility: Fix to bidi loop resetting (http://lpchip.com/modplug/viewtopic.php?t=788)
- [Fix] <re> IT compatibility: Fix to note trigger after note cut(http://lpchip.com/modplug/viewtopic.php?t=2080)
- [Fix] <re> Mixmode tool tip in general tab was in some cases shown on unrelated controls (http://lpchip.com/modplug/viewtopic.php?t=2176)
- [Fix] <re> Pitch/tempo lock was lost on first instrument when opening instrument tab for the first time. (http://lpchip.com/modplug/viewtopic.php?t=1823)
- [Fix] <re> Verifying buffer length-setting read from INI-file to prevent the impression that it can be set < 10 (http://lpchip.com/modplug/viewtopic.php?t=992)
- [Fix] <re> Pattern effectdata paste was broken for MOD (probably since .46) (http://lpchip.com/modplug/viewtopic.php?t=1938)
- [Mod] <re> When loading plug information at startup, checking whether the plug files exist. (http://lpchip.com/modplug/viewtopic.php?t=1367)
- [Fix] <re> Continuous pattern navigation fixes(http://lpchip.com/modplug/viewtopic.php?t=1960, http://lpchip.com/modplug/viewtopic.php?t=1959)
- [Fix] <re> Keyboard split related fix (http://lpchip.com/modplug/viewtopic.php?t=1887)
- [Fix] <re> Releasenode information should now be included when copying instrument envelopes (http://lpchip.com/modplug/viewtopic.php?t=1780)
+ [Mod] <re> MIDI export won't anymore export muted channels(http://forum.openmpt.org/index.php?topic=2017.0)
+ [Fix] <re> When converting MOD->S3M/IT/MPTM, finetune setting was ignored (http://forum.openmpt.org/index.php?topic=1706.0)
+ [Fix] <re> IT compatibility: Fix to not resetting envelopes on new instrument (http://forum.openmpt.org/index.php?topic=1869.0)
+ [Fix] <re> IT compatibility: Fix to bidi loop resetting (http://forum.openmpt.org/index.php?topic=788.0)
+ [Fix] <re> IT compatibility: Fix to note trigger after note cut(http://forum.openmpt.org/index.php?topic=2080.0)
+ [Fix] <re> Mixmode tool tip in general tab was in some cases shown on unrelated controls (http://forum.openmpt.org/index.php?topic=2176.0)
+ [Fix] <re> Pitch/tempo lock was lost on first instrument when opening instrument tab for the first time. (http://forum.openmpt.org/index.php?topic=1823.0)
+ [Fix] <re> Verifying buffer length-setting read from INI-file to prevent the impression that it can be set < 10 (http://forum.openmpt.org/index.php?topic=992.0)
+ [Fix] <re> Pattern effectdata paste was broken for MOD (probably since .46) (http://forum.openmpt.org/index.php?topic=1938.0)
+ [Mod] <re> When loading plug information at startup, checking whether the plug files exist. (http://forum.openmpt.org/index.php?topic=1367.0)
+ [Fix] <re> Continuous pattern navigation fixes(http://forum.openmpt.org/index.php?topic=1960.0, http://forum.openmpt.org/index.php?topic=1959.0)
+ [Fix] <re> Keyboard split related fix (http://forum.openmpt.org/index.php?topic=1887.0)
+ [Fix] <re> Releasenode information should now be included when copying instrument envelopes (http://forum.openmpt.org/index.php?topic=1780.0)
[Fix] <ma> Potential memory corruption bug when loading VSTs
- [Reg] <re> Removed buggy rearrange samples (http://lpchip.com/modplug/viewtopic.php?t=2148)
+ [Reg] <re> Removed buggy rearrange samples (http://forum.openmpt.org/index.php?topic=2148.0)
[Fix] <re> Fixed MIDI mapping not checking MIDI event, which could cause events like pitch bend to trigger some mapping item.
- [Fix] <re> Extended song/instrument properties were not always loaded correctly for IT (bug introduced in 1.17.02.50)(http://lpchip.com/modplug/viewtopic.php?p=16335)
- [Fix] <re> Fix for faulty tabs when switching between modtypes with and without instrumenttab. (http://lpchip.com/modplug/viewtopic.php?t=1614)
+ [Fix] <re> Extended song/instrument properties were not always loaded correctly for IT (bug introduced in 1.17.02.50)(http://forum.openmpt.org/index.php?topic=2154.0)
+ [Fix] <re> Fix for faulty tabs when switching between modtypes with and without instrumenttab. (http://forum.openmpt.org/index.php?topic=1614.0)
[Fix] <re> Fix for possible crash on save/load when using more than 64 channels with MPTM.
[Mod] <re> Modified flag is not set when sliding tempo/global volume slider for MOD file.
[Mod] <re> When setting instrument pan, checking whether instrument samples have set pan enabled and optionally disabling them.
@@ -1036,16 +1047,16 @@
[Fix] <re> Default VST editor preset field name validation in the menubar.
[New] <re> Added ability to edit various flags in song properties.
- [Fix] <re> Fix for pattern duplicate for small patterns (http://lpchip.com/modplug/viewtopic.php?t=1747)
+ [Fix] <re> Fix for pattern duplicate for small patterns (http://forum.openmpt.org/index.php?topic=1747.0)
[Fix] <re> Fixed song properties-menu entry in mainframe(was greyed and didn't show keyshortcut)
- [Fix] <re> Fixed crash with certain toolbar related ini-settings (http://lpchip.com/modplug/viewtopic.php?t=2033)
+ [Fix] <re> Fixed crash with certain toolbar related ini-settings (http://forum.openmpt.org/index.php?topic=2033.0)
[Fix] <re> Further fixes to prevent unnotified overwriting of file.
[Mod] <re> .bak-files won't now be shown with "All modules" filter when loading modules.
- [Fix] <re> Show row playtime didn't on certain cases work on first pattern row (http://lpchip.com/modplug/viewtopic.php?t=2044)
- [Fix] <re> Fix to faulty play with certain instruments without notes in IT compatible playmode (http://lpchip.com/modplug/viewtopic.php?t=2080)
- [Fix] <re> Pattern number box didn't open pattern properties when using MPTm. (http://lpchip.com/modplug/viewtopic.php?t=2073)
+ [Fix] <re> Show row playtime didn't on certain cases work on first pattern row (http://forum.openmpt.org/index.php?topic=2044.0)
+ [Fix] <re> Fix to faulty play with certain instruments without notes in IT compatible playmode (http://forum.openmpt.org/index.php?topic=2080.0)
+ [Fix] <re> Pattern number box didn't open pattern properties when using MPTm. (http://forum.openmpt.org/index.php?topic=2073.0)
[Fix] <re> Fixed wrong MIDI CC names in macro editor.
- [Fix/Mod] <re> Setting volume to 0(v00) in pattern didn't necessarily set volume to 0 when using volume random variation for instrument. All other random variation behaviors are changed as well; now the 'swing' is applied directly to channel values instead of using swing addition, and by default the swing effect is reset on new note. (http://lpchip.com/modplug/viewtopic.php?t=2074)
+ [Fix/Mod] <re> Setting volume to 0(v00) in pattern didn't necessarily set volume to 0 when using volume random variation for instrument. All other random variation behaviors are changed as well; now the 'swing' is applied directly to channel values instead of using swing addition, and by default the swing effect is reset on new note. (http://forum.openmpt.org/index.php?topic=2074.0)
[Mod] <re> MPTm made with this version will be recognized as IT in earlier versions.
[Mod] <re> Various validity checks for read data in ITP loading.
@@ -1056,19 +1067,19 @@
[New] <re> Improved VST preset navigation in VST window. Known problem: doesn't update if preset is changed from VSTs own preset navigation.
[New] <re> Improvements in IT compatibility playmode. When loading ITs, if file doesn't seem modplug made, then automatically setting IT compatibility playmode. The playmode setting can be toggled in song properties dialog, and the autodetection with an ini setting.
[New] <re> 'key binding not understood'-messages can be disabled with an ini setting.
- [Fix] <re> Fixed wrong file version in IT compatibility save. (http://lpchip.com/modplug/viewtopic.php?t=1723)
- [Fix] <re> Fixed possible unnotified overwriting of file occurring for example when dealing with a new file. (http://lpchip.com/modplug/viewtopic.php?t=1813)
- [Fix] <re> Fixed broken note preview for certain type of instruments in instrument tab. (http://lpchip.com/modplug/viewtopic.php?t=1996)
- [Fix] <re> Fixed possible crash on channel mode wav export when a channel has a long name. (http://lpchip.com/modplug/viewtopic.php?t=2005)
- [Fix] <re> Fixed pattern position indicator jump when clicking VST-box in channel header. (http://lpchip.com/modplug/viewtopic.php?t=2014)
+ [Fix] <re> Fixed wrong file version in IT compatibility save. (http://forum.openmpt.org/index.php?topic=1723.0)
+ [Fix] <re> Fixed possible unnotified overwriting of file occurring for example when dealing with a new file. (http://forum.openmpt.org/index.php?topic=1813.0)
+ [Fix] <re> Fixed broken note preview for certain type of instruments in instrument tab. (http://forum.openmpt.org/index.php?topic=1996.0)
+ [Fix] <re> Fixed possible crash on channel mode wav export when a channel has a long name. (http://forum.openmpt.org/index.php?topic=2005.0)
+ [Fix] <re> Fixed pattern position indicator jump when clicking VST-box in channel header. (http://forum.openmpt.org/index.php?topic=2014.0)
[Mod] <re> Custom tuning related
- file format changes
- changed interpretation of finesteps: now zero finesteps means that finesteps are equal to notesteps, previously zero finesteps disabled portamentos etc)
- Pitch slide between notes with portamentos is now specialised also for other tuning types than just geometric(changes behavior). Previously behavior was 'geometric' for all types.
- [Fix] <rewbs> Fix pattern search, which could search for the wrong param. Also enable typing of desired param value rather than only selecting from listbox. (http://lpchip.com/modplug/viewtopic.php?t=1799)
- [Fix] <rewbs> Delay-load winhttp.dll and don't die if it can't be found, e.g. on win98. (http://lpchip.com/modplug/viewtopic.php?t=1778)
- [Fix] <rewbs> Fix a couple of pixels on D# in the pattern editor small font bitmap. (http://lpchip.com/modplug/viewtopic.php?t=1781)
+ [Fix] <rewbs> Fix pattern search, which could search for the wrong param. Also enable typing of desired param value rather than only selecting from listbox. (http://forum.openmpt.org/index.php?topic=1799.0)
+ [Fix] <rewbs> Delay-load winhttp.dll and don't die if it can't be found, e.g. on win98. (http://forum.openmpt.org/index.php?topic=1778.0)
+ [Fix] <rewbs> Fix a couple of pixels on D# in the pattern editor small font bitmap. (http://forum.openmpt.org/index.php?topic=1781.0)
[New] <rewbs> Add name filter to plugin selection dialog. Useful when you have hundreds of plugins.
[New] <Pelya> Allow Window key as a modifier in the keyboard configuration. Disables start menu pop-up when pressing the Win key if and only if it used in the active keyboard configuration.
[New] <Pelya> Disables NumLock/CapsLock/ScrollLock lamps on keyboard if and only if they are used in the active keyboard configuration. The lamps will blink anyway - can't help it until we start using DirectInput.
@@ -1076,15 +1087,15 @@
v1.17.02.48
-----------
- [Fix] <re> Fix song cleanup issue (http://lpchip.com/modplug/viewtopic.php?t=1711)
- [Fix] <re> Pitch/Tempo lock fix (broken in .46 and .47) (http://lpchip.com/modplug/viewtopic.php?t=1646)
- [Mod] <re> Pattern manager channel reordering behviour changes / fixes. (http://lpchip.com/modplug/viewtopic.php?t=1148)
- [Fix] <pelya> Fix bad horizontal scrolling in pattern editor when positioning the cursor with the mouse. (http://lpchip.com/modplug/viewtopic.php?t=1650)
- [Fix] <rewbs> Fix odd "play row" behaviour when using 1 tick-per-row (http://lpchip.com/modplug/viewtopic.php?t=1038).
- [Fix] <rewbs> Fix pop due to ramping when song starts with a pattern command that sets a low global volume. (http://lpchip.com/modplug/viewtopic.php?t=523)
- [Fix] <rewbs> Fix occasional colour issues with orderlist (http://lpchip.com/modplug/viewtopic.php?t=867)
+ [Fix] <re> Fix song cleanup issue (http://forum.openmpt.org/index.php?topic=1711.0)
+ [Fix] <re> Pitch/Tempo lock fix (broken in .46 and .47) (http://forum.openmpt.org/index.php?topic=1646.0)
+ [Mod] <re> Pattern manager channel reordering behviour changes / fixes. (http://forum.openmpt.org/index.php?topic=1148.0)
+ [Fix] <pelya> Fix bad horizontal scrolling in pattern editor when positioning the cursor with the mouse. (http://forum.openmpt.org/index.php?topic=1650.0)
+ [Fix] <rewbs> Fix odd "play row" behaviour when using 1 tick-per-row (http://forum.openmpt.org/index.php?topic=1038.0).
+ [Fix] <rewbs> Fix pop due to ramping when song starts with a pattern command that sets a low global volume. (http://forum.openmpt.org/index.php?topic=523.0)
+ [Fix] <rewbs> Fix occasional colour issues with orderlist (http://forum.openmpt.org/index.php?topic=867.0)
[Fix] <rewbs> Fix impossible horizontal scrolling in pattern editor when playing with follow song on
- [Fix] <rewbs> Grey out "Trim" option in sample editor context menu if there's no selection. (http://lpchip.com/modplug/viewtopic.php?t=908)
+ [Fix] <rewbs> Grey out "Trim" option in sample editor context menu if there's no selection. (http://forum.openmpt.org/index.php?topic=908.0)
v1.17.02.47
@@ -1172,11 +1183,11 @@
v1.17.02.42
-----------
[New] <rewbs> "Compatibility export" in file menu: save as 'plain' IT, without all of OpenMPT's crap. IT only for now (not XM).
- [Fix] <rewbs> Set instrument in pattern editor should work when no note is specified (tx Torvus - http://lpchip.com/modplug/viewtopic.php?t=470)
- [Fix] <rewbs> Restart position saved in IT (tx LPChip - http://lpchip.com/modplug/viewtopic.php?t=473)
- [Fix] <rewbs> Loop song now works even if restart pos falls on +++ (tx LPChip - http://lpchip.com/modplug/viewtopic.php?t=463)
- [Fix] <rewbs> Last used tempo is applied even when playback is triggered from instrument panel. (tx LPChip - http://lpchip.com/modplug/viewtopic.php?t=480)
- [Mod] <rewbs> User now gets a warning when loading MDA Degrade (tx fisk0 - http://lpchip.com/modplug/viewtopic.php?t=467)
+ [Fix] <rewbs> Set instrument in pattern editor should work when no note is specified (tx Torvus - http://forum.openmpt.org/index.php?topic=470.0)
+ [Fix] <rewbs> Restart position saved in IT (tx LPChip - http://forum.openmpt.org/index.php?topic=473.0)
+ [Fix] <rewbs> Loop song now works even if restart pos falls on +++ (tx LPChip - http://forum.openmpt.org/index.php?topic=463.0)
+ [Fix] <rewbs> Last used tempo is applied even when playback is triggered from instrument panel. (tx LPChip - http://forum.openmpt.org/index.php?topic=480.0)
+ [Mod] <rewbs> User now gets a warning when loading MDA Degrade (tx fisk0 - http://forum.openmpt.org/index.php?topic=467.0)
v1.17.02.41
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-11-16 21:39:23 UTC (rev 762)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-11-17 21:07:55 UTC (rev 763)
@@ -219,7 +219,7 @@
positionJumpOnThisRow = true;
nNextPattern = (ORDERINDEX)param;
nNextPatStartRow = 0; // FT2 E60 bug
- // see http://lpchip.com/modplug/viewtopic.php?t=2769 - FastTracker resets Dxx if Bxx is called _after_ Dxx
+ // see http://forum.openmpt.org/index.php?topic=2769.0 - FastTracker resets Dxx if Bxx is called _after_ Dxx
if(!patternBreakOnThisRow || (GetType() == MOD_TYPE_XM))
nNextRow = 0;
@@ -2003,7 +2003,7 @@
//instant jumps - modifying behavior so that now position jumps
//occurs also when pattern loop is enabled.
}
- // see http://lpchip.com/modplug/viewtopic.php?t=2769 - FastTracker resets Dxx if Bxx is called _after_ Dxx
+ // see http://forum.openmpt.org/index.php?topic=2769.0 - FastTracker resets Dxx if Bxx is called _after_ Dxx
if(GetType() == MOD_TYPE_XM)
nBreakRow = 0;
break;
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-11-16 21:39:23 UTC (rev 762)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-11-17 21:07:55 UTC (rev 763)
@@ -424,7 +424,7 @@
lRead -= lCount;
m_nBufferCount -= lCount;
m_lTotalSampleCount += lCount; // increase sample count for VSTTimeInfo.
- // Turn on ramping after first read (fix http://lpchip.com/modplug/viewtopic.php?t=523 )
+ // Turn on ramping after first read (fix http://forum.openmpt.org/index.php?topic=523.0 )
gnVolumeRampSamples = CMainFrame::glVolumeRampSamples;
}
MixDone:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-16 21:39:31
|
Revision: 762
http://modplug.svn.sourceforge.net/modplug/?rev=762&view=rev
Author: saga-games
Date: 2010-11-16 21:39:23 +0000 (Tue, 16 Nov 2010)
Log Message:
-----------
[Mod] Changes to keymap file handling: The active keymap is now always saved to Keybindings.mkb (in either %APPDATA%\OpenMPT or the executable's directory). Any other keymaps are now only overwritten when using the "Save as" function. This behaviour is backwards-compatible when using several versions of OpenMPT 1.18+ next to each other, since the INI setting is cleared when exiting OpenMPT, so it just defaults to Keybindings.mkb in older versions.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/InputHandler.cpp
trunk/OpenMPT/mptrack/InputHandler.h
trunk/OpenMPT/mptrack/KeyConfigDlg.cpp
trunk/OpenMPT/mptrack/KeyConfigDlg.h
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/resource.h
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2010-11-13 22:03:04 UTC (rev 761)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2010-11-16 21:39:23 UTC (rev 762)
@@ -1504,7 +1504,7 @@
if(fileVersion > KEYMAP_VERSION)
{
CString err;
- err.Format("Key binding file %s has version %d. Your version of OpenMPT only supports loading files up to version %d.", szFilename, fileVersion, KEYMAP_VERSION);
+ err.Format("Key binding file has version %d. Your version of OpenMPT only supports loading files up to version %d.", szFilename, fileVersion, KEYMAP_VERSION);
errText += err + "\n";
Log(err);
}
@@ -1548,7 +1548,7 @@
errorCount++;
CString err;
if (errorCount<10) {
- err.Format("Line %d in key binding file %s was not understood.", l, szFilename);
+ err.Format("Line %d was not understood.", l, szFilename);
errText += err + "\n";
Log(err);
} else if (errorCount==10) {
@@ -1567,7 +1567,13 @@
l++;
}
- if(s_bShowErrorOnUnknownKeybinding && !errText.IsEmpty()) ::MessageBox(NULL, errText, "", MB_ICONEXCLAMATION|MB_OK);
+ if(s_bShowErrorOnUnknownKeybinding && !errText.IsEmpty())
+ {
+ CString err;
+ err.Format("The following problems have been encountered while trying to load the key binding file %s:\n", szFilename);
+ errText = err + errText;
+ ::MessageBox(NULL, errText, "", MB_ICONEXCLAMATION|MB_OK);
+ }
if(fileVersion < KEYMAP_VERSION) UpgradeKeymap(pTempCS, fileVersion);
Modified: trunk/OpenMPT/mptrack/InputHandler.cpp
===================================================================
--- trunk/OpenMPT/mptrack/InputHandler.cpp 2010-11-13 22:03:04 UTC (rev 761)
+++ trunk/OpenMPT/mptrack/InputHandler.cpp 2010-11-16 21:39:23 UTC (rev 762)
@@ -61,6 +61,8 @@
if (bSuccess == false)
AfxMessageBox(IDS_UNABLE_TO_LOAD_KEYBINDINGS, MB_ICONERROR);
}
+ // We will only overwrite the default Keybindings.mkb file from now on.
+ _tcscpy(CMainFrame::m_szKbdFile, sDefaultPath);
//Get Keymap
activeCommandSet->GenKeyMap(keyMap);
@@ -73,9 +75,7 @@
m_bBypass = false;
modifierMask=0;
m_bNoAltMenu = true;
- m_bAutoSave = true;
-
}
CInputHandler::~CInputHandler(void)
{
Modified: trunk/OpenMPT/mptrack/InputHandler.h
===================================================================
--- trunk/OpenMPT/mptrack/InputHandler.h 2010-11-13 22:03:04 UTC (rev 761)
+++ trunk/OpenMPT/mptrack/InputHandler.h 2010-11-16 21:39:23 UTC (rev 762)
@@ -87,7 +87,6 @@
void UpdateMainMenu();
void SetNewCommandSet(CCommandSet * newSet);
bool noAltMenu();
- bool m_bAutoSave;
bool SetXMEffects(void);
bool SetITEffects(void);
};
Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2010-11-13 22:03:04 UTC (rev 761)
+++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2010-11-16 21:39:23 UTC (rev 762)
@@ -116,10 +116,8 @@
DDX_Control(pDX, IDC_CHECKKEYDOWN, m_bKeyDown);
DDX_Control(pDX, IDC_CHECKKEYHOLD, m_bKeyHold);
DDX_Control(pDX, IDC_CHECKKEYUP, m_bKeyUp);
- DDX_Control(pDX, IDC_KEYMAPFILE, m_eKeyFile);
DDX_Control(pDX, IDC_DEBUGSAVE, m_bDebugSave);
- DDX_Control(pDX, IDC_AUTOSAVE, m_bAutoSave);
}
@@ -160,8 +158,6 @@
m_eReport.FmtLines(TRUE);
m_eReport.SetWindowText("Log:\r\n");
- m_bAutoSave.SetCheck(CMainFrame::GetInputHandler()->m_bAutoSave);
-
CString s;
s.Format("%d", CMainFrame::gnAutoChordWaitTime);
m_eChordWaitTime.SetWindowText(s);
@@ -341,7 +337,6 @@
void COptionsKeyboard::UpdateDialog()
//-----------------------------------
{
- m_eKeyFile.SetWindowText(CMainFrame::m_szKbdFile);
OnCategorySelChanged(); // Fills command list and automatically selects first command.
OnCommandKeySelChanged(); // Fills command key choice list for that command and automatically selects first choice.
}
@@ -623,21 +618,12 @@
void COptionsKeyboard::OnOK()
//---------------------------
{
- CString cs;
- m_eKeyFile.GetWindowText(cs);
- strcpy(CMainFrame::m_szKbdFile, cs);
CMainFrame::GetInputHandler()->SetNewCommandSet(plocalCmdSet);
+ CString cs;
m_eChordWaitTime.GetWindowText(cs);
CMainFrame::gnAutoChordWaitTime = atoi(cs);
- if (m_bAutoSave.GetCheck())
- plocalCmdSet->SaveFile(CMainFrame::m_szKbdFile, m_bDebugSave.GetCheck());
-
- CMainFrame::GetInputHandler()->m_bAutoSave = m_bAutoSave.GetCheck();
-
-
-
CPropertyPage::OnOK();
}
@@ -659,7 +645,7 @@
m_sFullPathName = files.first_file.c_str();
plocalCmdSet->LoadFile(m_sFullPathName);
ForceUpdateGUI();
- TentativeSetToDefaultFile(m_sFullPathName);
+ //TentativeSetToDefaultFile(m_sFullPathName);
}
void COptionsKeyboard::OnSave()
@@ -672,7 +658,7 @@
m_sFullPathName = files.first_file.c_str();
plocalCmdSet->SaveFile(m_sFullPathName, m_bDebugSave.GetCheck());
- TentativeSetToDefaultFile(m_sFullPathName);
+ //TentativeSetToDefaultFile(m_sFullPathName);
}
bool COptionsKeyboard::TentativeSetToDefaultFile(CString m_sFullPathName)
Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.h
===================================================================
--- trunk/OpenMPT/mptrack/KeyConfigDlg.h 2010-11-13 22:03:04 UTC (rev 761)
+++ trunk/OpenMPT/mptrack/KeyConfigDlg.h 2010-11-16 21:39:23 UTC (rev 762)
@@ -89,7 +89,7 @@
CButton m_bKeyDown, m_bKeyHold, m_bKeyUp;
CButton m_bnReset;
CCustEdit m_eCustHotKey;
- CEdit m_eReport, m_eKeyFile, m_eChordWaitTime;
+ CEdit m_eReport, m_eChordWaitTime;
UINT m_nKeyboardCfg;
int m_nCurHotKey, m_nCurCategory, m_nCurKeyChoice;
CString m_sFullPathName;
@@ -99,7 +99,6 @@
bool m_bChoiceModified;
CButton m_bDebugSave;
- CButton m_bAutoSave;
void ForceUpdateGUI();
bool TentativeSetToDefaultFile(CString);
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-11-13 22:03:04 UTC (rev 761)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-11-16 21:39:23 UTC (rev 762)
@@ -945,6 +945,10 @@
}
// Save Settings
SaveIniSettings();
+ if(m_InputHandler && m_InputHandler->activeCommandSet)
+ {
+ m_InputHandler->activeCommandSet->SaveFile(m_szKbdFile, false);
+ }
EndWaitCursor();
CMDIFrameWnd::OnClose();
@@ -1033,12 +1037,8 @@
WritePrivateProfileString("Paths", m_szDirectoryToSettingsName[i], szPath, iniFile);
}
- _tcscpy(szPath, m_szKbdFile);
- if(bConvertPaths)
- {
- AbsolutePathToRelative(szPath);
- }
- WritePrivateProfileString("Paths", "Key_Config_File", szPath, iniFile);
+ // Obsolete, since we always write to Keybindings.mkb now. Older versions of OpenMPT 1.18+ will look for this file if this entry is missing, so this is kind of backwards compatible.
+ WritePrivateProfileString("Paths", "Key_Config_File", NULL, iniFile);
WritePrivateProfileLong("Effects", "XBassDepth", CSoundFile::m_nXBassDepth, iniFile);
WritePrivateProfileLong("Effects", "XBassRange", CSoundFile::m_nXBassRange, iniFile);
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-11-13 22:03:04 UTC (rev 761)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-11-16 21:39:23 UTC (rev 762)
@@ -662,6 +662,9 @@
}
#ifdef WIN32 // Legacy stuff
+// Move a config file called sFileName from the App's directory (or one of its sub directories specified by sSubDir) to
+// %APPDATA%. If specified, it will be renamed to sNewFileName. Existing files are never overwritten.
+// Returns true on success.
bool CTrackApp::MoveConfigFile(TCHAR sFileName[_MAX_PATH], TCHAR sSubDir[_MAX_PATH], TCHAR sNewFileName[_MAX_PATH])
//-----------------------------------------------------------------------------------------------------------------
{
@@ -682,8 +685,7 @@
if(PathFileExists(sNewPath) == 0 && PathFileExists(sOldPath) != 0)
{
- MoveFile(sOldPath, sNewPath);
- return true;
+ return (MoveFile(sOldPath, sNewPath) != 0);
}
return false;
}
@@ -728,56 +730,16 @@
strcat(m_szConfigDirectory, "\\OpenMPT\\");
// Path doesn't exist yet, so it has to be created
- bool justCreated = false;
if(PathIsDirectory(m_szConfigDirectory) == 0)
{
CreateDirectory(m_szConfigDirectory, 0);
- justCreated = true;
}
#ifdef WIN32 // Legacy stuff
-
- bool movedKeyboardFiles = false;
- // Move files if necessary.
- movedKeyboardFiles = MoveConfigFile("default.mkb", "", "Keybindings.mkb");
- movedKeyboardFiles |= MoveConfigFile("Keybindings.mkb");
-
- // Check the old ini settings
- if(justCreated && movedKeyboardFiles)
- {
- TCHAR szOldPath[_MAX_PATH], szTestPath[_MAX_PATH];
-
- GetPrivateProfileString("Paths", "Key_Config_File", szOldPath, szOldPath, INIBUFFERSIZE, m_szConfigFileName);
- _strlwr(szOldPath); // compare all in lower case
-
- bool overwritePath = false;
- strcpy(szTestPath, m_szExePath);
- strcat(szTestPath, "default.mkb");
- _strlwr(szTestPath);
- overwritePath = (strcmp(szTestPath, szOldPath) == 0);
-
- if(overwritePath == false)
- {
- strcpy(szTestPath, m_szExePath);
- strcat(szTestPath, "Keybindings.mkb");
- _strlwr(szTestPath);
- overwritePath = (strcmp(szTestPath, szOldPath) == 0);
- }
-
- if(overwritePath)
- {
- // if old INI entry points to a file that's going to be moved, change it.
- strcpy(szTestPath, m_szConfigDirectory);
- strcat(szTestPath, "Keybindings.mkb");
- WritePrivateProfileString("Paths", "Key_Config_File", szTestPath, m_szConfigFileName);
- }
-
- }
- // Move some more files
+ // Move the config files if they're still in the old place.
MoveConfigFile("mptrack.ini");
MoveConfigFile("plugin.cache");
MoveConfigFile("mpt_intl.ini");
-
#endif // WIN32 Legacy Stuff
}
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2010-11-13 22:03:04 UTC (rev 761)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2010-11-16 21:39:23 UTC (rev 762)
@@ -346,12 +346,12 @@
END
IDD_OPTIONS_KEYBOARD DIALOGEX 0, 0, 272, 279
-STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Keyboard"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
COMBOBOX IDC_KEYCATEGORY,5,16,130,204,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LISTBOX IDC_COMMAND_LIST,5,32,130,242,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ LISTBOX IDC_COMMAND_LIST,5,32,130,238,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_CHOICECOMBO,147,16,79,51,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_CUSTHOTKEY,163,31,98,13,ES_AUTOHSCROLL
CONTROL "On Key Down",IDC_CHECKKEYDOWN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,44,66,14
@@ -359,27 +359,24 @@
CONTROL "On Key Up",IDC_CHECKKEYUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,68,66,8
PUSHBUTTON "Restore",IDC_RESTORE,217,46,43,13
PUSHBUTTON "Delete",IDC_DELETE,217,64,43,13
- EDITTEXT IDC_KEYREPORT,141,94,125,70,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
- PUSHBUTTON "Y",IDC_NOTESREPEAT,235,176,12,9
- PUSHBUTTON "N",IDC_NONOTESREPEAT,251,176,12,9
- EDITTEXT IDC_CHORDDETECTWAITTIME,235,189,28,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
+ EDITTEXT IDC_KEYREPORT,138,94,128,98,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
+ PUSHBUTTON "Y",IDC_NOTESREPEAT,234,207,12,9
+ PUSHBUTTON "N",IDC_NONOTESREPEAT,250,207,12,9
+ EDITTEXT IDC_CHORDDETECTWAITTIME,234,220,24,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT
PUSHBUTTON "it",IDC_EFFECTLETTERSIT,103,184,12,9,NOT WS_VISIBLE
PUSHBUTTON "xm",IDC_EFFECTLETTERSXM,119,184,12,9,NOT WS_VISIBLE
- PUSHBUTTON "Load Keys...",IDC_LOAD,145,221,54,13
- PUSHBUTTON "Save Keys As...",IDC_SAVE,205,221,54,13
+ PUSHBUTTON "Load Keys...",IDC_LOAD,144,252,54,13
+ PUSHBUTTON "Save Keys As...",IDC_SAVE,204,252,54,13
CONTROL "Debug Save",IDC_DEBUGSAVE,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,59,199,56,10
- EDITTEXT IDC_KEYMAPFILE,145,249,114,13,ES_AUTOHSCROLL
LTEXT "Select category:",IDC_STATIC,7,5,74,11
PUSHBUTTON "Set",IDC_SET,225,45,43,13,NOT WS_VISIBLE
GROUPBOX "Key setup for this command ",IDC_STATIC,139,5,127,75
LTEXT "Key:",IDC_STATIC,147,33,16,8
- GROUPBOX "Misc",IDC_STATIC,139,167,126,40
- GROUPBOX "Multi Config Handling",IDC_STATIC,139,209,126,66
- LTEXT "Repeat notes on hold?",IDC_STATIC,143,176,74,11
+ GROUPBOX "Misc",IDC_STATIC,138,198,126,37
+ GROUPBOX "Multi Config Handling",IDC_STATIC,138,240,126,31
+ LTEXT "Repeat notes on hold?",IDC_STATIC,142,207,74,11
LTEXT "Effect letters like:",IDC_STATIC,11,185,73,11,NOT WS_VISIBLE
- LTEXT "Chord detect interval (ms):",IDC_STATIC,143,190,88,11
- CONTROL "Save to this file on OK/Apply?",IDC_AUTOSAVE,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_TABSTOP,153,262,106,10
- LTEXT "Config to load on startup:",IDC_STATIC,145,239,80,8
+ LTEXT "Chord detect interval (ms):",IDC_STATIC,142,222,88,11
LTEXT "Log:",IDC_STATIC,141,84,19,10
PUSHBUTTON "Clear Log",IDC_CLEARLOG,227,85,37,9
END
@@ -763,8 +760,8 @@
EDITTEXT IDC_EDIT_LOG,6,7,234,96,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL
END
-IDD_REMOVECHANNELS DIALOGEX 0, 0, 171, 220
-STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+IDD_REMOVECHANNELS DIALOGEX 0, 0, 171, 221
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Remove Channels"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
@@ -772,7 +769,7 @@
PUSHBUTTON "Cancel",IDCANCEL,114,198,50,14
LISTBOX IDC_REMCHANSLIST,6,36,156,156,LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
LTEXT "Channels:",IDC_QUESTION1,6,6,157,18
- LTEXT "Detected unused channels are already selected",IDC_STATIC,6,24,159,10
+ LTEXT "Detected unused channels are already selected",IDC_STATIC,4,24,159,10
END
IDD_VIEW_GLOBALS DIALOGEX 0, 0, 471, 337
@@ -1636,7 +1633,7 @@
IDD_REMOVECHANNELS, DIALOG
BEGIN
RIGHTMARGIN, 163
- BOTTOMMARGIN, 218
+ BOTTOMMARGIN, 219
END
IDD_VIEW_GLOBALS, DIALOG
@@ -1912,7 +1909,7 @@
MENUITEM "Import &MIDI Library...", ID_IMPORT_MIDILIB
MENUITEM "Add Sound &Bank...", ID_ADD_SOUNDBANK
MENUITEM SEPARATOR
- MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED
+ MENUITEM "Recent File", ID_FILE_MRU_FILE1
MENUITEM SEPARATOR
MENUITEM "E&xit", ID_APP_EXIT
END
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2010-11-13 22:03:04 UTC (rev 761)
+++ trunk/OpenMPT/mptrack/resource.h 2010-11-16 21:39:23 UTC (rev 762)
@@ -645,7 +645,6 @@
#define IDC_LIST6 2076
#define IDC_KEYBOARD1 2078
#define IDC_SPLASH 2079
-#define IDC_HOTKEY1 2080
#define IDC_TREEVIEW 2081
#define IDC_COMMANDKEY 2081
#define IDC_VUMETER_LEFT 2082
@@ -655,63 +654,33 @@
#define IDC_COMBO7 2085
#define IDC_TREE1 2086
#define IDC_VISSTATUS 2087
-#define IDC_CHECK130 2088
-#define IDC_CHECK131 2089
-#define IDC_CHECK132 2090
#define IDC_CHOICECOMBO 2090
-#define IDC_CHECK133 2091
-#define IDC_CHECK134 2092
#define IDC_CHOICECOMBO2 2092
#define IDC_KEYCATEGORY 2092
-#define IDC_CHECK135 2093
-#define IDC_CHECK136 2094
#define IDC_CHECKKEYDOWN 2094
-#define IDC_CHECK137 2095
#define IDC_CHECKKEYHOLD 2095
-#define IDC_CHECK138 2096
#define IDC_CHECKKEYUP 2096
-#define IDC_CHECK139 2097
#define IDC_DEBUGSAVE 2097
-#define IDC_CHECK140 2098
#define IDC_CUSTHOTKEY 2098
-#define IDC_CHECK141 2099
#define IDC_SET 2099
-#define IDC_CHECK142 2100
#define IDC_RESTORE 2100
-#define IDC_CHECK143 2101
#define IDC_DELETE 2101
-#define IDC_CHECK144 2102
#define IDC_SAVE 2102
-#define IDC_CHECK145 2103
#define IDC_LOAD 2103
-#define IDC_CHECK146 2104
-#define IDC_AUTOSAVE 2104
-#define IDC_CHECK147 2105
#define IDC_KEYREPORT 2105
-#define IDC_CHECK148 2106
-#define IDC_KEYMAPFILE 2106
-#define IDC_CHECK149 2107
#define IDC_BROWSEKEYCONF 2107
#define IDC_CLEARLOG 2107
-#define IDC_CHECK150 2108
#define IDC_NOTESREPEAT 2108
#define IDC_REMCHANSLIST 2108
-#define IDC_CHECK151 2109
#define IDC_NOTESREPEAT2 2109
#define IDC_NONOTESREPEAT 2109
-#define IDC_CHECK152 2110
#define IDC_EFFECTLETTERSIT 2110
#define IDC_INSVIEWPLG 2110
-#define IDC_CHECK153 2111
#define IDC_EFFECTLETTERSXM 2111
#define IDC_PARAMLABEL 2111
-#define IDC_CHECK154 2112
#define IDC_PARAMLIST 2112
-#define IDC_CHECK155 2113
#define IDC_PARAMVALUETEXT 2113
-#define IDC_CHECK156 2114
#define IDC_PARAMVALUESLIDE 2114
-#define IDC_CHECK157 2115
#define IDC_PARAMLABEL2 2115
#define IDC_VISFILLBLANKS 2115
#define IDC_CHECK158 2116
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-13 22:03:11
|
Revision: 761
http://modplug.svn.sourceforge.net/modplug/?rev=761&view=rev
Author: saga-games
Date: 2010-11-13 22:03:04 +0000 (Sat, 13 Nov 2010)
Log Message:
-----------
[Fix] IT Compatibility: Sample autovibrato is now hopefully a bit closer to Impulse Tracker...
[Mod] OpenMPT: Version is now 1.19.00.13
Modified Paths:
--------------
trunk/OpenMPT/mptrack/version.h
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-11-13 13:49:04 UTC (rev 760)
+++ trunk/OpenMPT/mptrack/version.h 2010-11-13 22:03:04 UTC (rev 761)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 19
#define VER_MINOR 00
-#define VER_MINORMINOR 12
+#define VER_MINORMINOR 13
//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/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-11-13 13:49:04 UTC (rev 760)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-11-13 22:03:04 UTC (rev 761)
@@ -1112,6 +1112,7 @@
MODINSTRUMENT *pIns = pChn->pModInstrument;
// Volume Envelope
// IT Compatibility: S77 does not disable the volume envelope, it just pauses the counter
+ // Problem: This pauses on the wrong tick at the moment...
if (((pChn->dwFlags & CHN_VOLENV) || ((pIns->VolEnv.dwFlags & ENV_ENABLED) && IsCompatibleMode(TRK_IMPULSETRACKER))) && (pIns->VolEnv.nNodes))
{
int envvol = getVolEnvValueFromPosition(pChn->VolEnv.nEnvPosition, pIns);
@@ -1139,6 +1140,7 @@
}
// Panning Envelope
// IT Compatibility: S79 does not disable the panning envelope, it just pauses the counter
+ // Problem: This pauses on the wrong tick at the moment...
if (((pChn->dwFlags & CHN_PANENV) || ((pIns->PanEnv.dwFlags & ENV_ENABLED) && IsCompatibleMode(TRK_IMPULSETRACKER))) && (pIns->PanEnv.nNodes))
{
int envpos = pChn->PanEnv.nEnvPosition;
@@ -1232,7 +1234,7 @@
pChn->nRealVolume = 0;
} else if (m_pConfig->getGlobalVolumeAppliesToMaster())
{
- pChn->nRealVolume = _muldiv(vol*MAX_GLOBAL_VOLUME, pChn->nGlobalVol * pChn->nInsVol, 1 << 20);
+ pChn->nRealVolume = _muldiv(vol * MAX_GLOBAL_VOLUME, pChn->nGlobalVol * pChn->nInsVol, 1 << 20);
} else
{
pChn->nRealVolume = _muldiv(vol * m_nGlobalVolume, pChn->nGlobalVol * pChn->nInsVol, 1 << 20);
@@ -1320,6 +1322,7 @@
// Pitch/Filter Envelope
// IT Compatibility: S7B does not disable the pitch envelope, it just pauses the counter
+ // Problem: This pauses on the wrong tick at the moment...
if ((pIns) && ((pChn->dwFlags & CHN_PITCHENV) || ((pIns->PitchEnv.dwFlags & ENV_ENABLED) && IsCompatibleMode(TRK_IMPULSETRACKER))) && (pChn->pModInstrument->PitchEnv.nNodes))
{
int envpos = pChn->PitchEnv.nEnvPosition;
@@ -1520,94 +1523,160 @@
if ((pChn->pModSample) && (pChn->pModSample->nVibDepth))
{
MODSAMPLE *pSmp = pChn->pModSample;
+ const bool alternativeTuning = pChn->pModInstrument && pChn->pModInstrument->pTuning;
- // IT compatibility: No vibrato sweep = No vibrato at all!
- if (pSmp->nVibSweep == 0 && !IsCompatibleMode(TRK_IMPULSETRACKER))
+ // IT compatibility: Autovibrato is so much different in IT that I just put this in a separate code block, to get rid of a dozen IsCompatibilityMode() calls.
+ if(IsCompatibleMode(TRK_IMPULSETRACKER) && !alternativeTuning)
{
- pChn->nAutoVibDepth = pSmp->nVibDepth << 8;
+ // Schism's autovibrato code
+
+ /*
+ X86 Assembler from ITTECH.TXT:
+ 1) Mov AX, [SomeVariableNameRelatingToVibrato]
+ 2) Add AL, Rate
+ 3) AdC AH, 0
+ 4) AH contains the depth of the vibrato as a fine-linear slide.
+ 5) Mov [SomeVariableNameRelatingToVibrato], AX ; For the next cycle.
+ */
+ const int vibpos = pChn->nAutoVibPos & 0xFF;
+ int adepth = pChn->nAutoVibDepth; // (1)
+ adepth += pSmp->nVibSweep & 0xFF; // (2 & 3)
+ adepth = min(adepth, (int)(pSmp->nVibDepth << 8));
+ pChn->nAutoVibDepth = adepth; // (5)
+ adepth >>= 8; // (4)
+
+ pChn->nAutoVibPos += pSmp->nVibRate;
+
+ int vdelta;
+ switch(pSmp->nVibType)
+ {
+ case VIB_RANDOM:
+ vdelta = (rand() & 0x7F) - 0x40;
+ break;
+ case VIB_RAMP_DOWN:
+ vdelta = ITRampDownTable[vibpos];
+ break;
+ case VIB_RAMP_UP:
+ vdelta = -ITRampDownTable[vibpos];
+ break;
+ case VIB_SQUARE:
+ vdelta = ITSquareTable[vibpos];
+ break;
+ case VIB_SINE:
+ default:
+ vdelta = ITSinusTable[vibpos];
+ break;
+ }
+
+ vdelta = (vdelta * adepth) >> 6;
+ int l = abs(vdelta);
+ if(vdelta < 0)
+ {
+ vdelta = _muldiv(period, LinearSlideDownTable[l >> 2], 0x10000) - period;
+ if (l & 0x03)
+ {
+ vdelta += _muldiv(period, FineLinearSlideDownTable[l & 0x03], 0x10000) - period;
+ }
+ } else
+ {
+ vdelta = _muldiv(period, LinearSlideUpTable[l >> 2], 0x10000) - period;
+ if (l & 0x03)
+ {
+ vdelta += _muldiv(period, FineLinearSlideUpTable[l & 0x03], 0x10000) - period;
+ }
+ }
+ period -= vdelta;
+
} else
{
- if (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))
+ // MPT's autovibrato code
+ if (pSmp->nVibSweep == 0)
{
- if(IsCompatibleMode(TRK_IMPULSETRACKER))
+ pChn->nAutoVibDepth = pSmp->nVibDepth << 8;
+ } else
+ {
+ // Calculate current autovibrato depth using vibsweep
+ if (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))
{
- // TODO
- pChn->nAutoVibDepth += pSmp->nVibSweep << 3;
+ // Note: changed bitshift from 3 to 1 as the variable is not divided by 4 in the IT loader anymore
+ // - so we divide sweep by 4 here.
+ pChn->nAutoVibDepth += pSmp->nVibSweep << 1;
} else
{
- /* Note: changed bitshift from 3 to 1 as the variable is not divided by 4 in the IT loader anymore
- - so we divide sweep by 4 here. */
- pChn->nAutoVibDepth += pSmp->nVibSweep << 1;
+ if (!(pChn->dwFlags & CHN_KEYOFF))
+ {
+ pChn->nAutoVibDepth += (pSmp->nVibDepth << 8) / pSmp->nVibSweep;
+ }
}
- } else
- if (!(pChn->dwFlags & CHN_KEYOFF))
+ if ((pChn->nAutoVibDepth >> 8) > pSmp->nVibDepth)
+ pChn->nAutoVibDepth = pSmp->nVibDepth << 8;
+ }
+ const int vibpos = pChn->nAutoVibPos & 0xFF;
+ pChn->nAutoVibPos += pSmp->nVibRate;
+ int vdelta;
+ switch(pSmp->nVibType)
{
- pChn->nAutoVibDepth += (pSmp->nVibDepth << 8) / pSmp->nVibSweep;
+ case VIB_RANDOM:
+ vdelta = ModRandomTable[pChn->nAutoVibPos & 0x3F];
+ pChn->nAutoVibPos++;
+ break;
+ case VIB_RAMP_DOWN:
+ vdelta = ((0x40 - (pChn->nAutoVibPos >> 1)) & 0x7F) - 0x40;
+ break;
+ case VIB_RAMP_UP:
+ vdelta = ((0x40 + (pChn->nAutoVibPos >> 1)) & 0x7f) - 0x40;
+ break;
+ case VIB_SQUARE:
+ vdelta = (pChn->nAutoVibPos & 128) ? +64 : -64;
+ break;
+ case VIB_SINE:
+ default:
+ vdelta = ft2VibratoTable[pChn->nAutoVibPos & 0xFF];
}
- if ((pChn->nAutoVibDepth >> 8) > pSmp->nVibDepth)
- pChn->nAutoVibDepth = pSmp->nVibDepth << 8;
- }
- pChn->nAutoVibPos += pSmp->nVibRate;
- int val;
- switch(pSmp->nVibType)
- {
- case 4: // Random
- val = ModRandomTable[pChn->nAutoVibPos & 0x3F];
- pChn->nAutoVibPos++;
- break;
- case 3: // Ramp Down
- val = ((0x40 - (pChn->nAutoVibPos >> 1)) & 0x7F) - 0x40;
- break;
- case 2: // Ramp Up
- val = ((0x40 + (pChn->nAutoVibPos >> 1)) & 0x7f) - 0x40;
- break;
- case 1: // Square
- val = (pChn->nAutoVibPos & 128) ? +64 : -64;
- break;
- default: // Sine
- val = ft2VibratoTable[pChn->nAutoVibPos & 255];
- }
- int n = ((val * pChn->nAutoVibDepth) >> 8);
+ int n;
+ n = ((vdelta * pChn->nAutoVibDepth) >> 8);
- if(pChn->pModInstrument && pChn->pModInstrument->pTuning)
- {
- //Vib sweep is not taken into account here.
- vibratoFactor += 0.05F * pSmp->nVibDepth * val / 4096.0F; //4096 == 64^2
- //See vibrato for explanation.
- pChn->m_CalculateFreq = true;
- /*
- Finestep vibrato:
- const float autoVibDepth = pSmp->nVibDepth * val / 4096.0F; //4096 == 64^2
- vibratoFineSteps += static_cast<CTuning::FINESTEPTYPE>(pChn->pModInstrument->pTuning->GetFineStepCount() * autoVibDepth);
- pChn->m_CalculateFreq = true;
- */
- }
- else //Original behavior
- {
- if (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))
+ if(alternativeTuning)
{
- int df1, df2;
- if (n < 0)
+ //Vib sweep is not taken into account here.
+ vibratoFactor += 0.05F * pSmp->nVibDepth * vdelta / 4096.0F; //4096 == 64^2
+ //See vibrato for explanation.
+ pChn->m_CalculateFreq = true;
+ /*
+ Finestep vibrato:
+ const float autoVibDepth = pSmp->nVibDepth * val / 4096.0F; //4096 == 64^2
+ vibratoFineSteps += static_cast<CTuning::FINESTEPTYPE>(pChn->pModInstrument->pTuning->GetFineStepCount() * autoVibDepth);
+ pChn->m_CalculateFreq = true;
+ */
+ }
+ else //Original behavior
+ {
+ if (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))
{
- n = -n;
- UINT n1 = n >> 8;
- df1 = LinearSlideUpTable[n1];
- df2 = LinearSlideUpTable[n1+1];
+ int df1, df2;
+ if (n < 0)
+ {
+ n = -n;
+ UINT n1 = n >> 8;
+ df1 = LinearSlideUpTable[n1];
+ df2 = LinearSlideUpTable[n1+1];
+ } else
+ {
+ UINT n1 = n >> 8;
+ df1 = LinearSlideDownTable[n1];
+ df2 = LinearSlideDownTable[n1+1];
+ }
+ n >>= 2;
+ period = _muldiv(period, df1 + ((df2 - df1) * (n & 0x3F) >> 6), 256);
+ nPeriodFrac = period & 0xFF;
+ period >>= 8;
} else
{
- UINT n1 = n >> 8;
- df1 = LinearSlideDownTable[n1];
- df2 = LinearSlideDownTable[n1+1];
+ period += (n >> 6);
}
- n >>= 2;
- period = _muldiv(period, df1 + ((df2 - df1) * (n & 0x3F) >> 6), 256);
- nPeriodFrac = period & 0xFF;
- period >>= 8;
- } else
- {
- period += (n >> 6);
- }
- } //Original MPT behavior
+ } //Original MPT behavior
+ }
+
} //End: AutoVibrato
// Final Period
if (period <= m_nMinPeriod)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-13 13:49:15
|
Revision: 760
http://modplug.svn.sourceforge.net/modplug/?rev=760&view=rev
Author: saga-games
Date: 2010-11-13 13:49:04 +0000 (Sat, 13 Nov 2010)
Log Message:
-----------
[Fix] Pattern jumps to the same row+pattern as the jump command are not ignored anymore. (http://forum.openmpt.org/index.php?topic=1810.0)
[Fix] MOD Loader: Tentative fix for MODs with short loops at the sample start that were most likely not intended.
[Mod] IT Loader: MIDI macros are now cleared when loading IT files made with old Impulse Tracker versions (<2.14), so that Zxx commands won't break the songs anymore (fixes denonde.it, fix from Schism Tracker).
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_mod.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-11-07 16:37:22 UTC (rev 759)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-11-13 13:49:04 UTC (rev 760)
@@ -775,6 +775,13 @@
dwMemPos += sizeof(MODMIDICFG);
}
}
+ // Ignore MIDI data. Fixes some files like denonde.it that were made with old versions of Impulse Tracker (which didn't support Zxx filters) and have Zxx effects in the patterns.
+ if (pifh->cwtv < 0x0214)
+ {
+ MemsetZero(m_MidiCfg);
+ m_dwSongFlags |= SONG_EMBEDMIDICFG;
+ }
+
// Read pattern names: "PNAM"
if ((dwMemPos + 8 < dwMemLength) && (*((DWORD *)(lpStream+dwMemPos)) == 0x4d414e50))
{
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2010-11-07 16:37:22 UTC (rev 759)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2010-11-13 13:49:04 UTC (rev 760)
@@ -275,7 +275,7 @@
// Check Mod Magic
memcpy(s, pMagic->Magic, 4);
if ((IsMagic(s, "M.K.")) || (IsMagic(s, "M!K!"))
- || (IsMagic(s, "M&K!")) || (IsMagic(s, "N.T."))) m_nChannels = 4; else
+ || (IsMagic(s, "M&K!")) || (IsMagic(s, "N.T.")) || (IsMagic(s, "FEST"))) m_nChannels = 4; else
if ((IsMagic(s, "CD81")) || (IsMagic(s, "OKTA"))) m_nChannels = 8; else
if ((s[0]=='F') && (s[1]=='L') && (s[2]=='T') && (s[3]>='4') && (s[3]<='9')) m_nChannels = s[3] - '0'; else
if ((s[0]>='4') && (s[0]<='9') && (s[1]=='C') && (s[2]=='H') && (s[3]=='N')) m_nChannels = s[0] - '0'; else
@@ -332,6 +332,11 @@
psmp->nLoopStart = 0;
psmp->nLoopEnd = 0;
}
+ // Fix for most likely broken sample loops. This fixes super_sufm_-_new_life.mod which has a long sample which is looped from 0 to 4.
+ if(psmp->nLoopEnd <= 8 && psmp->nLoopStart == 0 && psmp->nLength > psmp->nLoopEnd)
+ {
+ psmp->nLoopEnd = 0;
+ }
if (psmp->nLoopEnd > psmp->nLoopStart)
{
psmp->uFlags |= CHN_LOOP;
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-11-07 16:37:22 UTC (rev 759)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-11-13 13:49:04 UTC (rev 760)
@@ -1996,7 +1996,7 @@
case CMD_POSITIONJUMP:
m_nNextPatStartRow = 0; // FT2 E60 bug
nPosJump = param;
- if((m_dwSongFlags & SONG_PATTERNLOOP && m_nSeqOverride == 0))
+ if((m_dwSongFlags & SONG_PATTERNLOOP) && m_nSeqOverride == 0)
{
m_nSeqOverride = param + 1;
//Releasing pattern loop after position jump could cause
@@ -2104,15 +2104,18 @@
//if (((!bNoLoop) && (nPosJump < MAX_ORDERS))
if (nPosJump>=Order.size())
nPosJump = 0;
- if ((!bNoLoop)
- //end rewbs.fix
- && ((nPosJump != (int)m_nCurrentPattern) || (nBreakRow != (int)m_nRow)))
+
+ // This checks whether we're jumping to the same row we're already on.
+ // Sounds pretty stupid and pointless to me. And noone else does this, either.
+ //if((nPosJump != (int)m_nCurrentPattern) || (nBreakRow != (int)m_nRow))
{
// IT compatibility: don't reset loop count on pattern break
if (nPosJump != (int)m_nCurrentPattern && !IsCompatibleMode(TRK_IMPULSETRACKER))
{
for (CHANNELINDEX i = 0; i < m_nChannels; i++)
+ {
Chn[i].nPatternLoopCount = 0;
+ }
}
m_nNextPattern = nPosJump;
m_nNextRow = (UINT)nBreakRow;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-07 16:37:29
|
Revision: 759
http://modplug.svn.sourceforge.net/modplug/?rev=759&view=rev
Author: saga-games
Date: 2010-11-07 16:37:22 +0000 (Sun, 07 Nov 2010)
Log Message:
-----------
[Mod] Pattern Editor: Using the Goto Dialog should now update channel parameters and set the elapsed time. (http://bugs.openmpt.org/view.php?id=28)
[Ref] Misc unimportant stuff (URLs, missing newlines, const modifiers)
[Mod] OpenMPT: Version is now 1.19.00.12
Modified Paths:
--------------
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/version.h
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-11-07 16:07:38 UTC (rev 758)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-11-07 16:37:22 UTC (rev 759)
@@ -2771,7 +2771,7 @@
void CMainFrame::OnReportBug()
//----------------------------
{
- CTrackApp::OpenURL("http://openmpt.com/bugreport/");
+ CTrackApp::OpenURL("http://bugs.openmpt.org/");
return;
}
//end rewbs.reportBug
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-11-07 16:07:38 UTC (rev 758)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-11-07 16:37:22 UTC (rev 759)
@@ -3271,8 +3271,8 @@
* - allowMultiSelect: allow the user to select multiple files? (will be ignored if load == false)
* - filterIndex: pointer to a variable holding the index of the last extension filter used.
*/
-FileDlgResult CTrackApp::ShowOpenSaveFileDialog(bool load, std::string defaultExtension, std::string defaultFilename, std::string extFilter, std::string workingDirectory, bool allowMultiSelect, int *filterIndex)
-//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+FileDlgResult CTrackApp::ShowOpenSaveFileDialog(const bool load, const std::string defaultExtension, const std::string defaultFilename, const std::string extFilter, const std::string workingDirectory, const bool allowMultiSelect, int *filterIndex)
+//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{
FileDlgResult result;
result.workingDirectory = workingDirectory;
@@ -3282,16 +3282,13 @@
result.abort = true;
// we can't save multiple files.
- if(!load)
- {
- allowMultiSelect = false;
- }
+ const bool multiSelect = allowMultiSelect && load;
// First, set up the dialog...
CFileDialog dlg(load ? TRUE : FALSE,
defaultExtension.empty() ? NULL : defaultExtension.c_str(),
defaultFilename.empty() ? NULL : defaultFilename.c_str(),
- load ? (OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | (allowMultiSelect ? OFN_ALLOWMULTISELECT : 0))
+ load ? (OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | (multiSelect ? OFN_ALLOWMULTISELECT : 0))
: (OFN_HIDEREADONLY | OFN_ENABLESIZING | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_NOREADONLYRETURN),
extFilter.empty() ? NULL : extFilter.c_str(),
theApp.m_pMainWnd);
@@ -3301,7 +3298,7 @@
dlg.m_ofn.nFilterIndex = (DWORD)(*filterIndex);
vector<TCHAR> filenameBuffer;
- if (allowMultiSelect)
+ if(multiSelect)
{
const size_t bufferSize = 2048; // Note: This is possibly the maximum buffer size in MFC 7(this note was written November 2006).
filenameBuffer.resize(bufferSize, 0);
@@ -3322,7 +3319,7 @@
if(filterIndex != nullptr)
*filterIndex = dlg.m_ofn.nFilterIndex;
- if(allowMultiSelect)
+ if(multiSelect)
{
// multiple files might have been selected
POSITION pos = dlg.GetStartPosition();
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2010-11-07 16:07:38 UTC (rev 758)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2010-11-07 16:37:22 UTC (rev 759)
@@ -190,7 +190,7 @@
static BOOL AddDLSBank(LPCSTR);
static BOOL OpenURL(LPCSTR lpszURL);
- static FileDlgResult ShowOpenSaveFileDialog(bool load, std::string defaultExtension, std::string defaultFilename, std::string extFilter, std::string workingDirectory = "", bool allowMultiSelect = false, int *filterIndex = nullptr);
+ static FileDlgResult ShowOpenSaveFileDialog(const bool load, const std::string defaultExtension, const std::string defaultFilename, const std::string extFilter, const std::string workingDirectory = "", const bool allowMultiSelect = false, int *filterIndex = nullptr);
public:
CDocTemplate *GetModDocTemplate() const { return m_pModTemplate; }
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-11-07 16:07:38 UTC (rev 758)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-11-07 16:37:22 UTC (rev 759)
@@ -1723,35 +1723,36 @@
return;
- if (!m_pGotoWnd) {
+ if (!m_pGotoWnd)
+ {
m_pGotoWnd = new CPatternGotoDialog(this);
//if (m_pGotoWnd) m_pGotoWnd->SetParent(this/*, GetDocument()*/);
}
- if (m_pGotoWnd) {
+ if (m_pGotoWnd)
+ {
CSoundFile* pSndFile = pModDoc->GetSoundFile();
UINT nCurrentOrder = SendCtrlMessage(CTRLMSG_GETCURRENTORDER);
UINT nCurrentChannel = ((m_dwCursor & 0xFFFF) >> 3) + 1;
m_pGotoWnd->UpdatePos(m_nRow, nCurrentChannel, m_nPattern, nCurrentOrder, pSndFile);
- if (m_pGotoWnd->DoModal() == IDOK) {
+ if (m_pGotoWnd->DoModal() == IDOK)
+ {
//Position should be valididated.
- if (m_pGotoWnd->m_nPattern != m_nPattern) {
+ if (m_pGotoWnd->m_nPattern != m_nPattern)
SetCurrentPattern(m_pGotoWnd->m_nPattern);
- }
- if (m_pGotoWnd->m_nOrder != nCurrentOrder) {
+ if (m_pGotoWnd->m_nOrder != nCurrentOrder)
SendCtrlMessage(CTRLMSG_SETCURRENTORDER, m_pGotoWnd->m_nOrder);
- }
- if (m_pGotoWnd->m_nChannel != nCurrentChannel) {
+ if (m_pGotoWnd->m_nChannel != nCurrentChannel)
SetCurrentColumn((m_pGotoWnd->m_nChannel-1) << 3);
- }
- if (m_pGotoWnd->m_nRow != m_nRow) {
+ if (m_pGotoWnd->m_nRow != m_nRow)
SetCurrentRow(m_pGotoWnd->m_nRow);
- }
+
+ pModDoc->SetElapsedTime(m_pGotoWnd->m_nOrder, m_pGotoWnd->m_nRow);
}
}
return;
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-11-07 16:07:38 UTC (rev 758)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-11-07 16:37:22 UTC (rev 759)
@@ -185,7 +185,8 @@
m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC2"), mixLevels_117RC2);
m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC1"), mixLevels_117RC1);
m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Original (MPT 1.16)"), mixLevels_original);
- m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Compatible"), mixLevels_compatible); //m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), mixLevels_Test);
+ m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Compatible"), mixLevels_compatible);
+ //m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), mixLevels_Test);
switch(m_pSndFile->m_nMixLevels)
{
//case mixLevels_Test: m_PlugMixBox.SetCurSel(5); break;
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-11-07 16:07:38 UTC (rev 758)
+++ trunk/OpenMPT/mptrack/version.h 2010-11-07 16:37:22 UTC (rev 759)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 19
#define VER_MINOR 00
-#define VER_MINORMINOR 11
+#define VER_MINORMINOR 12
//Creates version number from version parts that appears in version string.
//For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-07 16:07:45
|
Revision: 758
http://modplug.svn.sourceforge.net/modplug/?rev=758&view=rev
Author: saga-games
Date: 2010-11-07 16:07:38 +0000 (Sun, 07 Nov 2010)
Log Message:
-----------
[New] VST: Experimental support for load/save dialogs. Loading multiple files and the directory selector don't work yet.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/Vstplug.h
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2010-11-06 16:10:57 UTC (rev 757)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2010-11-07 16:07:38 UTC (rev 758)
@@ -82,6 +82,7 @@
//------------------------------------
{
m_pVstHead = NULL;
+ m_szHostBuffer = nullptr;
//m_bNeedIdle = FALSE; //rewbs.VSTCompliance - now member of plugin class
CSoundFile::gpMixPluginCreateProc = CreateMixPluginProc;
EnumerateDirectXDMOs();
@@ -92,6 +93,11 @@
//-------------------------------------
{
CSoundFile::gpMixPluginCreateProc = NULL;
+ if(m_szHostBuffer != nullptr)
+ {
+ delete[] m_szHostBuffer;
+ m_szHostBuffer = nullptr;
+ }
while (m_pVstHead)
{
PVSTPLUGINLIB p = m_pVstHead;
@@ -946,11 +952,13 @@
//"asyncProcessing",
//"offline",
//"supportShell"
- if ((strcmp((char*)ptr,"sendVstEvents")==0 ||
- strcmp((char*)ptr,"sendVstMidiEvent")==0 ||
- strcmp((char*)ptr,"sendVstTimeInfo")==0 ||
- strcmp((char*)ptr,"supplyIdle")==0 ||
- strcmp((char*)ptr,"sizeWindow")==0))
+ if ((strcmp((char*)ptr,"sendVstEvents") == 0 ||
+ strcmp((char*)ptr,"sendVstMidiEvent") == 0 ||
+ strcmp((char*)ptr,"sendVstTimeInfo") == 0 ||
+ strcmp((char*)ptr,"supplyIdle") == 0 ||
+ strcmp((char*)ptr,"sizeWindow") == 0 ||
+ strcmp((char*)ptr,"openFileSelector") == 0
+ ))
return HostCanDo;
else
return HostCanNotDo;
@@ -997,59 +1005,12 @@
Log("VST plugin to host: End Edit\n");
break;
// open a fileselector window with VstFileSelect* in <ptr>
- case audioMasterOpenFileSelector:
- {
- /*
- VstFileSelect *pFileSel = (VstFileSelect *)ptr;
- ASSERT(false);
-
- if(pFileSel->command != kVstDirectorySelect)
- {
- std::string extensions;
- for(size_t i = 0; i < pFileSel->nbFileTypes; i++)
- {
- VstFileType *pType = &(pFileSel->fileTypes[i]);
- extensions += pType->name;
- extensions += "|";
-#if (defined(WIN32) || defined(WINDOWS))
- extensions += "*.";
- extensions += pType->dosType;
-#elif defined(MAC)
- extensions += "*";
- extensions += pType->macType;
-#elif defined(UNIX)
- extensions += "*.";
- extensions += pType->unixType;
-#else
- #error Platform-specific code missing
-#endif
- extensions += "|";
- }
-
- FileDlgResult files = CTrackApp::ShowOpenSaveFileDialog(
- pFileSel->command == kVstFileSave ? false : true,
- "", "", extensions, pFileSel->initialPath,
- pFileSel->command == kVstMultipleFilesLoad
- );
- if(files.abort)
- return 0;
- // todo: retrieve filenames etc.
- //strcpy(pFileSel->returnPath, files.first_file.c_str());
- //pFileSel->sizeReturnPath = files.first_file.length();
- return 1;
-
- } else */
- {
- Log("VST plugin to host: Get Directory\n");
- }
- }
- break;
-
+ case audioMasterOpenFileSelector:
//---from here VST 2.2 extension opcodes------------------------------------------------------
// close a fileselector operation with VstFileSelect* in <ptr>: Must be always called after an open !
case audioMasterCloseFileSelector:
- Log("VST plugin to host: Close File Selector\n");
- break;
+ return VstFileSelector(opcode == audioMasterCloseFileSelector, (VstFileSelect *)ptr);
+
// open an editor for audio (defined by XML text in ptr)
case audioMasterEditFile:
Log("VST plugin to host: Edit File\n");
@@ -1073,8 +1034,109 @@
//end rewbs. VSTCompliance:
+// Helper function for file selection dialog stuff.
+long CVstPluginManager::VstFileSelector(const bool destructor, VstFileSelect *pFileSel)
+//-------------------------------------------------------------------------------------
+{
+ if(!destructor)
+ {
+ if(pFileSel == nullptr)
+ {
+ return 0;
+ }
+
+ if(pFileSel->command != kVstDirectorySelect)
+ {
+ std::string extensions, workingDir;
+ for(size_t i = 0; i < pFileSel->nbFileTypes; i++)
+ {
+ VstFileType *pType = &(pFileSel->fileTypes[i]);
+ extensions += pType->name;
+ extensions += "|";
+#if (defined(WIN32) || defined(WINDOWS))
+ extensions += "*.";
+ extensions += pType->dosType;
+#elif defined(MAC)
+ extensions += "*";
+ extensions += pType->macType;
+#elif defined(UNIX)
+ extensions += "*.";
+ extensions += pType->unixType;
+#else
+#error Platform-specific code missing
+#endif
+ extensions += "|";
+ }
+
+ if(pFileSel->initialPath != nullptr)
+ {
+ workingDir = pFileSel->initialPath;
+ } else
+ {
+ // Plugins are probably looking for presets...?
+ workingDir = ""; //CMainFrame::GetWorkingDirectory(DIR_PLUGINPRESETS);
+ }
+
+ FileDlgResult files = CTrackApp::ShowOpenSaveFileDialog(
+ (pFileSel->command == kVstFileSave ? false : true),
+ "", "", extensions, workingDir,
+ (pFileSel->command == kVstMultipleFilesLoad ? true : false)
+ );
+
+ pFileSel->nbReturnPath = 0;
+
+ if(files.abort)
+ {
+ return 0;
+ }
+
+ if(pFileSel->command == kVstMultipleFilesLoad)
+ {
+ // TODO: multiple paths
+ Log("VST plugin to host: Multiple files\n");
+ return 0;
+ } else
+ {
+ if(pFileSel->returnPath == nullptr)
+ {
+ // Provide some memory for the return path.
+ if(m_szHostBuffer != nullptr)
+ {
+ delete[] m_szHostBuffer;
+ }
+ pFileSel->sizeReturnPath = _MAX_PATH;
+ m_szHostBuffer = new char[_MAX_PATH];
+ if(m_szHostBuffer == nullptr)
+ {
+ return 0;
+ }
+ pFileSel->returnPath = m_szHostBuffer;
+ }
+ strncpy(pFileSel->returnPath, files.first_file.c_str(), pFileSel->sizeReturnPath - 1);
+ pFileSel->nbReturnPath = 1;
+ }
+ return 1;
+
+ } else
+ {
+ Log("VST plugin to host: Get Directory\n");
+ return 0;
+ }
+ } else
+ {
+ Log("VST plugin to host: Close File Selector\n");
+ if(m_szHostBuffer != nullptr)
+ {
+ delete[] m_szHostBuffer;
+ m_szHostBuffer = nullptr;
+ }
+ return 1;
+ }
+}
+
+
void CVstPluginManager::ReportPlugException(LPCSTR format,...)
-//-----------------------------------------------------------
+//------------------------------------------------------------
{
CHAR cBuf[1024];
va_list va;
Modified: trunk/OpenMPT/mptrack/Vstplug.h
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.h 2010-11-06 16:10:57 UTC (rev 757)
+++ trunk/OpenMPT/mptrack/Vstplug.h 2010-11-07 16:07:38 UTC (rev 758)
@@ -246,10 +246,14 @@
protected:
long VstCallback(AEffect *effect, long opcode, long index, long value, void *ptr, float opt);
+ long VstFileSelector(const bool destructor, VstFileSelect *pFileSel);
static long VSTCALLBACK MasterCallBack(AEffect *effect, long opcode, long index, long value, void *ptr, float opt);
static BOOL __cdecl CreateMixPluginProc(PSNDMIXPLUGIN, CSoundFile*);
VstTimeInfo timeInfo; //rewbs.VSTcompliance
+protected:
+ char *m_szHostBuffer; // host's buffer for file select dialog
+
public:
static char s_szHostProductString[64];
static char s_szHostVendorString[64];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-06 16:11:03
|
Revision: 757
http://modplug.svn.sourceforge.net/modplug/?rev=757&view=rev
Author: saga-games
Date: 2010-11-06 16:10:57 +0000 (Sat, 06 Nov 2010)
Log Message:
-----------
[Imp] Order list: When jumpin to an order that is never played, tempo/speed/global volume are now reset.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-11-05 23:06:56 UTC (rev 756)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-11-06 16:10:57 UTC (rev 757)
@@ -431,22 +431,32 @@
}
// Store final variables
- if (bAdjust && (targetReached || endOrder == ORDERINDEX_INVALID || endRow == ROWINDEX_INVALID))
+ if (bAdjust)
{
- m_nGlobalVolume = nGlbVol;
- m_nOldGlbVolSlide = nOldGlbVolSlide;
- m_nMusicSpeed = nMusicSpeed;
- m_nMusicTempo = nMusicTempo;
- for (CHANNELINDEX n = 0; n < m_nChannels; n++)
+ if (targetReached || endOrder == ORDERINDEX_INVALID || endRow == ROWINDEX_INVALID)
{
- Chn[n].nGlobalVol = chnvols[n];
- if (notes[n]) Chn[n].nNewNote = notes[n];
- if (instr[n]) Chn[n].nNewIns = instr[n];
- if (vols[n] != 0xFF)
+ // Target found, or there is no target (i.e. play whole song)...
+ m_nGlobalVolume = nGlbVol;
+ m_nOldGlbVolSlide = nOldGlbVolSlide;
+ m_nMusicSpeed = nMusicSpeed;
+ m_nMusicTempo = nMusicTempo;
+ for (CHANNELINDEX n = 0; n < m_nChannels; n++)
{
- if (vols[n] > 64) vols[n] = 64;
- Chn[n].nVolume = vols[n] << 2;
+ Chn[n].nGlobalVol = chnvols[n];
+ if (notes[n]) Chn[n].nNewNote = notes[n];
+ if (instr[n]) Chn[n].nNewIns = instr[n];
+ if (vols[n] != 0xFF)
+ {
+ if (vols[n] > 64) vols[n] = 64;
+ Chn[n].nVolume = vols[n] << 2;
+ }
}
+ } else
+ {
+ // Target not found (f.e. when jumping to a hidden sub song), reset global variables...
+ m_nMusicSpeed = m_nDefaultSpeed;
+ m_nMusicTempo = m_nDefaultTempo;
+ m_nGlobalVolume = m_nDefaultGlobalVolume;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-11-05 23:07:03
|
Revision: 756
http://modplug.svn.sourceforge.net/modplug/?rev=756&view=rev
Author: saga-games
Date: 2010-11-05 23:06:56 +0000 (Fri, 05 Nov 2010)
Log Message:
-----------
[New] New mix mode: Compatible. This is used for MOD/S3M/XM/IT by default and has more appropriate mixing levels for those formats (same levels as Schism Tracker) than mix mode RC3. It also forces soft panning to be *off*. Slight changes in volume levels are possible until the final release of OpenMPT 1.19, so don't rely on the levels too much (this should actually only bother you when using VST, which you should only do in the MPTM format)
[Mod] OpenMPT: Version is now 1.19.00.11
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CleanupSong.cpp
trunk/OpenMPT/mptrack/MPTHacks.cpp
trunk/OpenMPT/mptrack/ModConvert.cpp
trunk/OpenMPT/mptrack/ModConvert.h
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp
trunk/OpenMPT/mptrack/SoundFilePlayConfig.h
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/version.h
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndmix.cpp
trunk/OpenMPT/soundlib/mod_specifications.h
Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -927,7 +927,7 @@
// convert to IT...
m_pModDoc->ChangeModType(MOD_TYPE_IT);
- pSndFile->m_nMixLevels = mixLevels_original;
+ pSndFile->m_nMixLevels = mixLevels_compatible;
pSndFile->m_nTempoMode = tempo_mode_classic;
pSndFile->m_dwSongFlags = SONG_LINEARSLIDES;
Modified: trunk/OpenMPT/mptrack/MPTHacks.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MPTHacks.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/mptrack/MPTHacks.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -354,6 +354,14 @@
m_SndFile.m_nRestartPos = 0;
}
+ if(m_SndFile.m_nMixLevels != mixLevels_compatible)
+ {
+ AddToLog("Found incorrect mix levels\n");
+ foundHacks = true;
+ if(autofix)
+ m_SndFile.m_nMixLevels = mixLevels_compatible;
+ }
+
if(autofix && foundHacks)
SetModified();
Modified: trunk/OpenMPT/mptrack/ModConvert.cpp
===================================================================
--- trunk/OpenMPT/mptrack/ModConvert.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/mptrack/ModConvert.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -428,6 +428,17 @@
if(newTypeIsS3M || newTypeIsMOD) m_SndFile.m_dwSongFlags &= ~SONG_EXFILTERRANGE;
if(oldTypeIsXM && newTypeIsIT_MPT) m_SndFile.m_dwSongFlags |= SONG_ITCOMPATGXX;
+ // Adjust mix levels
+ if(newTypeIsMOD || newTypeIsS3M)
+ {
+ m_SndFile.m_nMixLevels = mixLevels_compatible;
+ m_SndFile.m_pConfig->SetMixLevels(mixLevels_compatible);
+ }
+ if(oldTypeIsMPT && m_SndFile.m_nMixLevels != mixLevels_compatible)
+ {
+ CHANGEMODTYPE_WARNING(wMixmode);
+ }
+
END_CRITICAL();
ChangeFileExtension(nNewType);
@@ -463,6 +474,7 @@
CHANGEMODTYPE_CHECK(wTrimmedEnvelopes, "Instrument envelopes have been shortened.\n");
CHANGEMODTYPE_CHECK(wReleaseNode, "Instrument envelope release nodes are not supported by the new format.\n");
CHANGEMODTYPE_CHECK(wEditHistory, "Edit history will not be saved in the new format.\n");
+ CHANGEMODTYPE_CHECK(wMixmode, "Consider setting the mix levels to \"Compatible\" in the song properties when working with legacy formats.\n");
SetModified();
GetPatternUndo()->ClearUndo();
Modified: trunk/OpenMPT/mptrack/ModConvert.h
===================================================================
--- trunk/OpenMPT/mptrack/ModConvert.h 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/mptrack/ModConvert.h 2010-11-05 23:06:56 UTC (rev 756)
@@ -33,6 +33,7 @@
wTrimmedEnvelopes,
wReleaseNode,
wEditHistory,
+ wMixmode,
wNumWarnings
};
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -670,7 +670,8 @@
m_SndFile.m_nMusicTempo = m_SndFile.m_nDefaultTempo = 125;
m_SndFile.m_nMusicSpeed = m_SndFile.m_nDefaultSpeed = 6;
- if(m_SndFile.m_nMixLevels == mixLevels_original)
+ // Set up levels
+ if(m_SndFile.m_nMixLevels == mixLevels_original || m_SndFile.m_nMixLevels == mixLevels_compatible)
{
m_SndFile.m_nGlobalVolume = m_SndFile.m_nDefaultGlobalVolume = MAX_GLOBAL_VOLUME;
m_SndFile.m_nSamplePreAmp = m_SndFile.m_nVSTiVolume = 48;
Modified: trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp
===================================================================
--- trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -1,4 +1,5 @@
#include "stdafx.h"
+#include "Sndfile.h"
#include ".\soundfileplayconfig.h"
CSoundFilePlayConfig::CSoundFilePlayConfig(void) {
@@ -8,9 +9,11 @@
CSoundFilePlayConfig::~CSoundFilePlayConfig(void) {
}
-void CSoundFilePlayConfig::SetMixLevels(int mixLevelType) {
+void CSoundFilePlayConfig::SetMixLevels(int mixLevelType)
+{
switch (mixLevelType)
{
+
// Olivier's version gives us floats in [-0.5; 0.5] and slightly saturates VSTis.
case mixLevels_original:
setVSTiAttenuation(NO_ATTENUATION);
@@ -18,11 +21,12 @@
setFloatToInt(static_cast<float>(1<<28));
setGlobalVolumeAppliesToMaster(false);
setUseGlobalPreAmp(true);
- setForceSoftPanning(false);
+ setForcePanningMode(dontForcePanningMode);
setDisplayDBValues(false);
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(100.0);
setNormalGlobalVol(128.0);
+ setExtraSampleAttenuation(MIXING_ATTENUATION);
break;
// Ericus' version gives us floats in [-0.06;0.06] and requires attenuation to
@@ -33,11 +37,12 @@
setFloatToInt(static_cast<float>(0x07FFFFFFF));
setGlobalVolumeAppliesToMaster(false);
setUseGlobalPreAmp(true);
- setForceSoftPanning(false);
+ setForcePanningMode(dontForcePanningMode);
setDisplayDBValues(false);
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(100.0);
setNormalGlobalVol(128.0);
+ setExtraSampleAttenuation(MIXING_ATTENUATION);
break;
// 117RC2 gives us floats in [-1.0; 1.0] and hopefully plays VSTis at
@@ -49,11 +54,12 @@
setFloatToInt(static_cast<float>(MIXING_CLIPMAX));
setGlobalVolumeAppliesToMaster(true);
setUseGlobalPreAmp(true);
- setForceSoftPanning(false);
+ setForcePanningMode(dontForcePanningMode);
setDisplayDBValues(false);
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(100.0);
setNormalGlobalVol(128.0);
+ setExtraSampleAttenuation(MIXING_ATTENUATION);
break;
// 117RC3 ignores the horrible global, system-specific pre-amp,
@@ -66,13 +72,31 @@
setFloatToInt(static_cast<float>(MIXING_CLIPMAX));
setGlobalVolumeAppliesToMaster(true);
setUseGlobalPreAmp(false);
- setForceSoftPanning(true);
+ setForcePanningMode(forceSoftPanning);
setDisplayDBValues(true);
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(128.0);
setNormalGlobalVol(256.0);
+ setExtraSampleAttenuation(0);
break;
+ // A mixmode that is intended to be compatible to legacy trackers (IT/FT2/etc).
+ // This is basically derived from mixmode 1.17 RC3, with panning mode and volume levels changed.
+ // Sample attenuation is the same as in Schism Tracker (more attenuation than with RC3, thus VSTi attenuation is also higher).
+ case mixLevels_compatible:
+ setVSTiAttenuation(4.0f);
+ setIntToFloat(1.0f/static_cast<float>(MIXING_CLIPMAX));
+ setFloatToInt(static_cast<float>(MIXING_CLIPMAX));
+ setGlobalVolumeAppliesToMaster(true);
+ setUseGlobalPreAmp(false);
+ setForcePanningMode(forceNoSoftPanning);
+ setDisplayDBValues(true);
+ setNormalSamplePreAmp(48.0);
+ setNormalVSTiVol(48.0);
+ setNormalGlobalVol(256.0);
+ setExtraSampleAttenuation(1);
+ break;
+
// FOR TEST PURPOSES ONLY:
/*
case mixLevels_Test:
@@ -86,6 +110,7 @@
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(128.0);
setNormalGlobalVol(256.0);
+ setExtraAttenuation(0);
break;
*/
@@ -153,11 +178,11 @@
}
-bool CSoundFilePlayConfig::getForceSoftPanning() {
+forcePanningMode CSoundFilePlayConfig::getForcePanningMode() {
return m_forceSoftPanning;
}
-void CSoundFilePlayConfig::setForceSoftPanning(bool inForceSoftPanning) {
+void CSoundFilePlayConfig::setForcePanningMode(forcePanningMode inForceSoftPanning) {
m_forceSoftPanning=inForceSoftPanning;
}
@@ -193,5 +218,14 @@
return m_normalGlobalVol;
}
+void CSoundFilePlayConfig::setExtraSampleAttenuation(int attn)
+{
+ m_extraAttenuation = attn;
+}
+int CSoundFilePlayConfig::getExtraSampleAttenuation()
+{
+ return m_extraAttenuation;
+}
+
Modified: trunk/OpenMPT/mptrack/SoundFilePlayConfig.h
===================================================================
--- trunk/OpenMPT/mptrack/SoundFilePlayConfig.h 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/mptrack/SoundFilePlayConfig.h 2010-11-05 23:06:56 UTC (rev 756)
@@ -13,13 +13,21 @@
};
enum {
- mixLevels_original = 0,
- mixLevels_117RC1 = 1,
- mixLevels_117RC2 = 2,
- mixLevels_117RC3 = 3,
- mixLevels_Test = 4,
+ mixLevels_original = 0,
+ mixLevels_117RC1 = 1,
+ mixLevels_117RC2 = 2,
+ mixLevels_117RC3 = 3,
+ mixLevels_compatible = 4,
+ mixLevels_Test = 5,
};
+enum forcePanningMode
+{
+ dontForcePanningMode,
+ forceSoftPanning,
+ forceNoSoftPanning,
+};
+
// Class used to store settings for a song file.
class CSoundFilePlayConfig
{
@@ -49,12 +57,16 @@
void setUseGlobalPreAmp(bool);
bool getUseGlobalPreAmp();
- void setForceSoftPanning(bool);
- bool getForceSoftPanning();
+ void setForcePanningMode(forcePanningMode);
+ forcePanningMode getForcePanningMode();
void setDisplayDBValues(bool);
bool getDisplayDBValues();
+ // Extra sample attenuation in bits
+ void setExtraSampleAttenuation(int);
+ int getExtraSampleAttenuation();
+
//Values at which volumes are unchanged
double getNormalSamplePreAmp();
double getNormalVSTiVol();
@@ -79,9 +91,11 @@
bool m_globalVolumeAppliesToMaster;
bool m_ignorePreAmp;
- bool m_forceSoftPanning;
+ forcePanningMode m_forceSoftPanning;
bool m_displayDBValues;
+ int m_extraAttenuation;
+
DWORD m_LastSavedWithVersion;
DWORD m_CreatedWithVersion;
};
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -185,11 +185,11 @@
m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC2"), mixLevels_117RC2);
m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC1"), mixLevels_117RC1);
m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Original (MPT 1.16)"), mixLevels_original);
- //m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), mixLevels_Test);
+ m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Compatible"), mixLevels_compatible); //m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), mixLevels_Test);
switch(m_pSndFile->m_nMixLevels)
{
- //case mixLevels_Test: m_PlugMixBox.SetCurSel(4); break;
- case mixLevels_original: m_PlugMixBox.SetCurSel(3); break;
+ //case mixLevels_Test: m_PlugMixBox.SetCurSel(5); break;
+ case mixLevels_compatible: m_PlugMixBox.SetCurSel(4); break; case mixLevels_original: m_PlugMixBox.SetCurSel(3); break;
case mixLevels_117RC1: m_PlugMixBox.SetCurSel(2); break;
case mixLevels_117RC2: m_PlugMixBox.SetCurSel(1); break;
case mixLevels_117RC3:
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/mptrack/version.h 2010-11-05 23:06:56 UTC (rev 756)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 19
#define VER_MINOR 00
-#define VER_MINORMINOR 10
+#define VER_MINORMINOR 11
//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/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -998,6 +998,10 @@
// Load instrument and song extensions.
if(mptStartPos >= dwMemPos)
{
+ if(interpretModPlugMade)
+ {
+ m_nMixLevels = mixLevels_original;
+ }
LPCBYTE ptr = LoadExtendedInstrumentProperties(lpStream + dwMemPos, lpStream + mptStartPos, &interpretModPlugMade);
LoadExtendedSongProperties(GetType(), ptr, lpStream, mptStartPos, &interpretModPlugMade);
}
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -686,6 +686,7 @@
if(bMadeWithModPlug)
{
+ m_nMixLevels = mixLevels_original;
SetModFlag(MSF_COMPATIBLE_PLAY, false);
if(!m_dwLastSavedWithVersion)
{
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -550,7 +550,7 @@
m_nMaxOrderPosition = 0;
m_lpszPatternNames = NULL;
m_lpszSongComments = nullptr;
- m_nMixLevels = mixLevels_original; // Will be overridden if appropriate.
+ m_nMixLevels = mixLevels_compatible; // Will be overridden if appropriate.
memset(Samples, 0, sizeof(Samples));
memset(ChnMix, 0, sizeof(ChnMix));
memset(Chn, 0, sizeof(Chn));
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-11-05 23:06:56 UTC (rev 756)
@@ -1831,7 +1831,8 @@
realvol = (pChn->nRealVolume * kChnMasterVol) >> 8;
}
- if (m_pConfig->getForceSoftPanning() || (gdwSoundSetup & SNDMIX_SOFTPANNING))
+ const forcePanningMode panningMode = m_pConfig->getForcePanningMode();
+ if (panningMode == forceSoftPanning || (panningMode == dontForcePanningMode && (gdwSoundSetup & SNDMIX_SOFTPANNING)))
{
if (pan < 128)
{
@@ -1905,11 +1906,15 @@
if (pChn->nInc >= 0xFE00) pChn->dwFlags |= CHN_NOIDO;
#endif // FASTSOUNDLIB
}
- if (m_pConfig->getUseGlobalPreAmp())
+
+ /*if (m_pConfig->getUseGlobalPreAmp())
{
pChn->nNewRightVol >>= MIXING_ATTENUATION;
pChn->nNewLeftVol >>= MIXING_ATTENUATION;
- }
+ }*/
+ const int extraAttenuation = m_pConfig->getExtraSampleAttenuation();
+ pChn->nNewRightVol >>= extraAttenuation;
+ pChn->nNewLeftVol >>= extraAttenuation;
pChn->nRightRamp = pChn->nLeftRamp = 0;
// Dolby Pro-Logic Surround
Modified: trunk/OpenMPT/soundlib/mod_specifications.h
===================================================================
--- trunk/OpenMPT/soundlib/mod_specifications.h 2010-10-26 17:58:56 UTC (rev 755)
+++ trunk/OpenMPT/soundlib/mod_specifications.h 2010-11-05 23:06:56 UTC (rev 756)
@@ -63,7 +63,7 @@
NOTE: If changing limits, see whether:
-savefile format and GUI methods can handle new values(might not be a small task :).
*/
- "MPTm", // File extension
+ "mptm", // File extension
1, // Minimum note index
NOTE_MAX, // Maximum note index
true, // Has notecut.
@@ -126,7 +126,7 @@
0, // Max instrument filename length
31, // SamplesMax
0, // instrumentMax
- mixLevels_original, // defaultMixLevels
+ mixLevels_compatible, // defaultMixLevels
0, // Max MIDI mapping directives
1, // Min Speed
32, // Max Speed
@@ -166,7 +166,7 @@
0, // Max instrument filename length
31, // SamplesMax
0, // instrumentMax
- mixLevels_original, // defaultMixLevels
+ mixLevels_compatible, // defaultMixLevels
0, // Max MIDI mapping directives
1, // Min Speed
32, // Max Speed
@@ -205,7 +205,7 @@
0, // Max instrument filename length
128 * 16, // SamplesMax (actually 16 per instrument)
128, // instrumentMax
- mixLevels_original, // defaultMixLevels
+ mixLevels_compatible, // defaultMixLevels
0, // Max MIDI mapping directives
1, // Min Speed
31, // Max Speed
@@ -245,7 +245,7 @@
0, // Max instrument filename length
4000, // SamplesMax (actually 16 per instrument(256*16=4096), but limited to MAX_SAMPLES=4000)
256, // instrumentMax
- mixLevels_117RC3, // defaultMixLevels
+ mixLevels_compatible, // defaultMixLevels
200, // Max MIDI mapping directives
1, // Min Speed
31, // Max Speed
@@ -284,7 +284,7 @@
0, // Max instrument filename length
99, // SamplesMax
0, // instrumentMax
- mixLevels_original, // defaultMixLevels
+ mixLevels_compatible, // defaultMixLevels
0, // Max MIDI mapping directives
1, // Min Speed
255, // Max Speed
@@ -324,7 +324,7 @@
0, // Max instrument filename length
99, // SamplesMax
0, // instrumentMax
- mixLevels_original, // defaultMixLevels
+ mixLevels_compatible, // defaultMixLevels
0, // Max MIDI mapping directives
1, // Min Speed
255, // Max Speed
@@ -363,7 +363,7 @@
12, // Max instrument filename length
99, // SamplesMax
99, // instrumentMax
- mixLevels_original, // defaultMixLevels
+ mixLevels_compatible, // defaultMixLevels
0, // Max MIDI mapping directives
1, // Min Speed
255, // Max Speed
@@ -402,7 +402,7 @@
12, // Max instrument filename length
4000, // SamplesMax
256, // instrumentMax
- mixLevels_117RC3, // defaultMixLevels
+ mixLevels_compatible, // defaultMixLevels
200, // Max MIDI mapping directives
1, // Min Speed
255, // Max Speed
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-10-26 17:59:03
|
Revision: 755
http://modplug.svn.sourceforge.net/modplug/?rev=755&view=rev
Author: saga-games
Date: 2010-10-26 17:58:56 +0000 (Tue, 26 Oct 2010)
Log Message:
-----------
[Fix] Loading IT files from the tree view was broken since the introduction of the edit history.
[Fix] Mod Conversion: Got rid of the unnecessary "channel panning is not supported" message when converting from MOD to XM.
[Fix] Playing samples from modules with a very short order list through the tree view should now also work again.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/ModConvert.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-10-25 20:27:05 UTC (rev 754)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-10-26 17:58:56 UTC (rev 755)
@@ -2142,6 +2142,7 @@
m_WaveFile.m_nInstruments = 0;
m_WaveFile.m_nSamples = 1;
}
+ m_WaveFile.Order.resize(3);
m_WaveFile.Order[0] = 0;
m_WaveFile.Order[1] = 1;
m_WaveFile.Order[2] = m_WaveFile.Order.GetInvalidPatIndex();
@@ -2156,10 +2157,10 @@
m[1].note = (BYTE)nNote;
m[1].instr = 1;
m = m_WaveFile.Patterns[1];
- m[32*4].note = 0xFF;
- m[32*4+1].note = 0xFF;
- m[63*4].note = 0xFE;
- m[63*4+1].note = 0xFE;
+ m[32*4].note = NOTE_FADE;
+ m[32*4+1].note = NOTE_FADE;
+ m[63*4].note = NOTE_KEYOFF;
+ m[63*4+1].note = NOTE_KEYOFF;
}
if ((nInstrument) && (nInstrument <= pSong->m_nInstruments))
{
Modified: trunk/OpenMPT/mptrack/ModConvert.cpp
===================================================================
--- trunk/OpenMPT/mptrack/ModConvert.cpp 2010-10-25 20:27:05 UTC (rev 754)
+++ trunk/OpenMPT/mptrack/ModConvert.cpp 2010-10-26 17:58:56 UTC (rev 755)
@@ -386,7 +386,7 @@
CHANGEMODTYPE_WARNING(wChannelVolSurround);
}
}
- if(newTypeIsXM)
+ if(newTypeIsXM && !oldTypeIsMOD_XM)
{
if(m_SndFile.ChnSettings[nChn].nPan != 128)
{
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-10-25 20:27:05 UTC (rev 754)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-10-26 17:58:56 UTC (rev 755)
@@ -723,36 +723,42 @@
if (nflt * 8 <= dwMemLength - dwMemPos && dwMemPos + nflt * 8 <= minptr)
{
- GetpModDoc()->GetFileHistory()->clear();
- for(size_t n = 0; n < nflt; n++)
+#ifdef MODPLUG_TRACKER
+ if(GetpModDoc() != nullptr)
{
-#ifdef MODPLUG_TRACKER
- ITHISTORYSTRUCT itHistory = *((ITHISTORYSTRUCT *)(lpStream + dwMemPos));
- itHistory.fatdate = LittleEndianW(itHistory.fatdate);
- itHistory.fattime = LittleEndianW(itHistory.fattime);
- itHistory.runtime = LittleEndian(itHistory.runtime);
+ GetpModDoc()->GetFileHistory()->clear();
+ for(size_t n = 0; n < nflt; n++)
+ {
+ ITHISTORYSTRUCT itHistory = *((ITHISTORYSTRUCT *)(lpStream + dwMemPos));
+ itHistory.fatdate = LittleEndianW(itHistory.fatdate);
+ itHistory.fattime = LittleEndianW(itHistory.fattime);
+ itHistory.runtime = LittleEndian(itHistory.runtime);
- FileHistory mptHistory;
- MemsetZero(mptHistory);
- // Decode FAT date and time
- mptHistory.loadDate.tm_year = ((itHistory.fatdate >> 9) & 0x7F) + 80;
- mptHistory.loadDate.tm_mon = CLAMP((itHistory.fatdate >> 5) & 0x0F, 1, 12) - 1;
- mptHistory.loadDate.tm_mday = CLAMP(itHistory.fatdate & 0x1F, 1, 31);
- mptHistory.loadDate.tm_hour = CLAMP((itHistory.fattime >> 11) & 0x1F, 0, 23);
- mptHistory.loadDate.tm_min = CLAMP((itHistory.fattime >> 5) & 0x3F, 0, 59);
- mptHistory.loadDate.tm_sec = CLAMP((itHistory.fattime & 0x1F) * 2, 0, 59);
- mptHistory.openTime = itHistory.runtime * (HISTORY_TIMER_PRECISION / 18.2f);
- GetpModDoc()->GetFileHistory()->push_back(mptHistory);
+ FileHistory mptHistory;
+ MemsetZero(mptHistory);
+ // Decode FAT date and time
+ mptHistory.loadDate.tm_year = ((itHistory.fatdate >> 9) & 0x7F) + 80;
+ mptHistory.loadDate.tm_mon = CLAMP((itHistory.fatdate >> 5) & 0x0F, 1, 12) - 1;
+ mptHistory.loadDate.tm_mday = CLAMP(itHistory.fatdate & 0x1F, 1, 31);
+ mptHistory.loadDate.tm_hour = CLAMP((itHistory.fattime >> 11) & 0x1F, 0, 23);
+ mptHistory.loadDate.tm_min = CLAMP((itHistory.fattime >> 5) & 0x3F, 0, 59);
+ mptHistory.loadDate.tm_sec = CLAMP((itHistory.fattime & 0x1F) * 2, 0, 59);
+ mptHistory.openTime = itHistory.runtime * (HISTORY_TIMER_PRECISION / 18.2f);
+ GetpModDoc()->GetFileHistory()->push_back(mptHistory);
#ifdef DEBUG
- const uint32 seconds = (uint32)(((double)itHistory.runtime) / 18.2f);
- CHAR stime[128];
- wsprintf(stime, "IT Edit History: Loaded %04u-%02u-%02u %02u:%02u:%02u, open for %u:%02u:%02u (%u ticks)\n", ((itHistory.fatdate >> 9) & 0x7F) + 1980, (itHistory.fatdate >> 5) & 0x0F, itHistory.fatdate & 0x1F, (itHistory.fattime >> 11) & 0x1F, (itHistory.fattime >> 5) & 0x3F, (itHistory.fattime & 0x1F) * 2, seconds / 3600, (seconds / 60) % 60, seconds % 60, itHistory.runtime);
- Log(stime);
+ const uint32 seconds = (uint32)(((double)itHistory.runtime) / 18.2f);
+ CHAR stime[128];
+ wsprintf(stime, "IT Edit History: Loaded %04u-%02u-%02u %02u:%02u:%02u, open for %u:%02u:%02u (%u ticks)\n", ((itHistory.fatdate >> 9) & 0x7F) + 1980, (itHistory.fatdate >> 5) & 0x0F, itHistory.fatdate & 0x1F, (itHistory.fattime >> 11) & 0x1F, (itHistory.fattime >> 5) & 0x3F, (itHistory.fattime & 0x1F) * 2, seconds / 3600, (seconds / 60) % 60, seconds % 60, itHistory.runtime);
+ Log(stime);
#endif // DEBUG
+ dwMemPos += 8;
+ }
+ } else
#endif // MODPLUG_TRACKER
- dwMemPos += 8;
+ {
+ dwMemPos += nflt * 8;
}
} else
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2010-10-25 20:27:13
|
Revision: 754
http://modplug.svn.sourceforge.net/modplug/?rev=754&view=rev
Author: relabsoluness
Date: 2010-10-25 20:27:05 +0000 (Mon, 25 Oct 2010)
Log Message:
-----------
[Imp] Sample editor: Can now zoom with ctrl + mouse wheel.
[Imp] Instrument editor: Can now zoom with ctrl + mouse wheel.
[Ref] Tiny fixes, changes and documentation including VC10 build fixes, some added utilities and project config changes.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Stdafx.h
trunk/OpenMPT/mptrack/Undo.cpp
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/mptrack/View_ins.h
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/View_smp.h
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/misc_util.h
trunk/OpenMPT/mptrack/serialization_utils.cpp
trunk/OpenMPT/mptrack/serialization_utils.h
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_mo3.cpp
trunk/OpenMPT/soundlib/Snddev.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundtouch/soundtouch_08.vcproj
trunk/OpenMPT/ungzip/ungzip_08.vcproj
trunk/OpenMPT/unlha/unlha_08.vcproj
trunk/OpenMPT/unrar/unrar_08.vcproj
trunk/OpenMPT/unzip/unzip_08.vcproj
trunk/OpenMPT/xsoundlib/xsoundlib_08.vcproj
trunk/OpenMPT/zlib/contrib/vstudio/vc9/zlibstat.vcproj
Modified: trunk/OpenMPT/mptrack/Stdafx.h
===================================================================
--- trunk/OpenMPT/mptrack/Stdafx.h 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/Stdafx.h 2010-10-25 20:27:05 UTC (rev 754)
@@ -13,7 +13,7 @@
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#if _MSC_VER >= 1500
- #define _WIN32_WINNT 0x0500
+ #define _WIN32_WINNT 0x0500 // 0x0500 = Windows 2000
#else
#define WINVER 0x0401
#endif
Modified: trunk/OpenMPT/mptrack/Undo.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Undo.cpp 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/Undo.cpp 2010-10-25 20:27:05 UTC (rev 754)
@@ -14,6 +14,7 @@
#include "modsmp_ctrl.h"
#include "Undo.h"
+#define new DEBUG_NEW
/////////////////////////////////////////////////////////////////////////////////////////
// Pattern Undo Functions
Modified: trunk/OpenMPT/mptrack/View_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.cpp 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/View_ins.cpp 2010-10-25 20:27:05 UTC (rev 754)
@@ -98,6 +98,7 @@
ON_COMMAND(ID_ENVELOPE_TOGGLERELEASENODE, OnEnvToggleReleasNode)
//}}AFX_MSG_MAP
ON_COMMAND(ID_ENVELOPE_SCALEPOINTS, OnEnvelopeScalepoints)
+ ON_WM_MOUSEWHEEL()
END_MESSAGE_MAP()
@@ -2486,3 +2487,18 @@
return envelope;
}
+
+
+BOOL CViewInstrument::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
+//----------------------------------------------------------------------
+{
+ // Ctrl + mouse wheel: envelope zoom.
+ if (nFlags == MK_CONTROL)
+ {
+ // Speed up zoom scrolling by some factor (might need some tuning).
+ const float speedUpFactor = Util::Max(1.0f, m_fZoom * 7.0f / ENV_MAX_ZOOM);
+ EnvSetZoom(m_fZoom + speedUpFactor * (zDelta / WHEEL_DELTA));
+ }
+
+ return CModScrollView::OnMouseWheel(nFlags, zDelta, pt);
+}
Modified: trunk/OpenMPT/mptrack/View_ins.h
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.h 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/View_ins.h 2010-10-25 20:27:05 UTC (rev 754)
@@ -195,6 +195,7 @@
afx_msg void OnDropFiles(HDROP hDropInfo);
afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //rewbs.customKeys
afx_msg LRESULT OnMidiMsg(WPARAM, LPARAM);
+ afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
virtual BOOL PreTranslateMessage(MSG *pMsg); //rewbs.customKeys
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-10-25 20:27:05 UTC (rev 754)
@@ -128,6 +128,7 @@
ON_WM_RBUTTONUP()
END_MESSAGE_MAP()
+static_assert(MODCOMMAND::maxColumnValue <= 999, "Command range for ID_CHANGE_PCNOTE_PARAM is designed for 999");
CViewPattern::CViewPattern()
//--------------------------
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2010-10-25 20:27:05 UTC (rev 754)
@@ -66,6 +66,7 @@
ON_WM_KEYDOWN()
ON_WM_KEYUP()
ON_WM_DROPFILES()
+ ON_WM_MOUSEWHEEL()
ON_COMMAND(ID_EDIT_UNDO, OnEditUndo)
ON_COMMAND(ID_EDIT_SELECT_ALL, OnEditSelectAll)
ON_COMMAND(ID_EDIT_CUT, OnEditCut)
@@ -2636,3 +2637,69 @@
return NULL;
}
+
+
+// Returns auto-zoom level compared to other zoom levels.
+// If auto-zoom gives bigger zoom than zoom level N but smaller than zoom level N-1,
+// return value is N. If zoom is bigger than the biggest zoom, returns MIN_ZOOM + 1 and
+// if smaller than the smallest zoom, returns value >= MAX_ZOOM + 1.
+UINT CViewSample::GetAutoZoomLevel(const MODSAMPLE& smp)
+//-----------------------------------------------------
+{
+ m_rcClient.NormalizeRect();
+ if (m_rcClient.Width() == 0 || smp.nLength <= 0)
+ return MAX_ZOOM + 1;
+
+ // When m_nZoom > 0, 2^(m_nZoom - 1) = samplesPerPixel [1]
+ // With auto-zoom setting the whole sample is fitted to screen:
+ // ViewScreenWidthInPixels * samplesPerPixel = sampleLength (approximately) [2].
+ // Solve samplesPerPixel from [2], then "m_nZoom" from [1].
+ float zoom = static_cast<float>(smp.nLength) / static_cast<float>(m_rcClient.Width());
+ zoom = 1 + (log10(zoom) / log10(2.0f));
+ return static_cast<UINT>(Util::Max(zoom + 1, MIN_ZOOM + 1.0f));
+}
+
+
+BOOL CViewSample::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
+//------------------------------------------------------------------
+{
+ // Ctrl + mouse wheel: zoom control.
+ // One scroll direction zooms in and the other zooms out.
+ // This behaviour is different from what would happen if simply scrolling
+ // the zoom levels in the zoom combobox.
+ if (nFlags == MK_CONTROL)
+ {
+ CSoundFile* const pSndFile = (GetDocument()) ? GetDocument()->GetSoundFile() : nullptr;
+ if (pSndFile != nullptr)
+ {
+ // zoomOrder: Biggest to smallest zoom order.
+ UINT zoomOrder[MAX_ZOOM + 1];
+ for(size_t i = 1; i < CountOf(zoomOrder); ++i)
+ zoomOrder[i-1] = i; // [0]=1, [1]=2, ...
+ zoomOrder[CountOf(zoomOrder) - 1] = 0;
+ UINT* const pZoomOrderEnd = zoomOrder + CountOf(zoomOrder);
+ const UINT nAutoZoomLevel = GetAutoZoomLevel(pSndFile->Samples[m_nSample]);
+
+ // If auto-zoom is not the smallest zoom, move auto-zoom index(=zero)
+ // to the right position in the zoom order.
+ if (nAutoZoomLevel < MAX_ZOOM + 1)
+ {
+ UINT* p = std::find(zoomOrder, pZoomOrderEnd, nAutoZoomLevel);
+ if (p != pZoomOrderEnd)
+ {
+ memmove(p + 1, p, sizeof(zoomOrder[0]) * (pZoomOrderEnd - (p+1)));
+ *p = 0;
+ }
+ else
+ ASSERT(false);
+ }
+ const ptrdiff_t nPos = std::find(zoomOrder, pZoomOrderEnd, m_nZoom) - zoomOrder;
+ if (zDelta > 0 && nPos > 0)
+ SendCtrlMessage(CTRLMSG_SMP_SETZOOM, zoomOrder[nPos - 1]);
+ else if (zDelta < 0 && nPos + 1 < CountOf(zoomOrder))
+ SendCtrlMessage(CTRLMSG_SMP_SETZOOM, zoomOrder[nPos + 1]);
+ }
+ }
+
+ return CModScrollView::OnMouseWheel(nFlags, zDelta, pt);
+}
Modified: trunk/OpenMPT/mptrack/View_smp.h
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.h 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/View_smp.h 2010-10-25 20:27:05 UTC (rev 754)
@@ -58,6 +58,12 @@
template<class T, class uT>
T GetSampleValueFromPoint(const CPoint& point);
+ // Returns auto-zoom level compared to other zoom levels.
+ // If auto-zoom gives bigger zoom than zoom level N but smaller than zoom level N-1,
+ // return value is N. If zoom is bigger than the biggest zoom, returns MIN_ZOOM + 1 and
+ // if smaller than the smallest zoom, returns value >= MAX_ZOOM + 1.
+ UINT GetAutoZoomLevel(const MODSAMPLE& smp);
+
public:
//{{AFX_VIRTUAL(CViewSample)
virtual void OnDraw(CDC *);
@@ -119,6 +125,7 @@
afx_msg void OnAddSilence();
afx_msg LRESULT OnMidiMsg(WPARAM, LPARAM);
afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //rewbs.customKeys
+ afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2010-10-25 20:27:05 UTC (rev 754)
@@ -20,6 +20,8 @@
#include "../zlib/zlib.h" //For CRC32 calculation (to detect plugins with same UID)
#endif
+#define new DEBUG_NEW
+
#ifndef NO_VST
char CVstPluginManager::s_szHostProductString[64] = "OpenMPT";
Modified: trunk/OpenMPT/mptrack/misc_util.h
===================================================================
--- trunk/OpenMPT/mptrack/misc_util.h 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/misc_util.h 2010-10-25 20:27:05 UTC (rev 754)
@@ -4,6 +4,9 @@
#include <sstream>
#include <string>
#include <limits>
+#if _HAS_TR1
+ #include <type_traits>
+#endif
//Convert object(typically number) to string
template<class T>
@@ -20,6 +23,9 @@
inline T ConvertStrTo(LPCSTR psz)
//-------------------------------
{
+ #if _HAS_TR1
+ static_assert(std::tr1::is_const<T>::value == false && std::tr1::is_volatile<T>::value == false, "Const and volatile types are not handled correctly.");
+ #endif
if(std::numeric_limits<T>::is_integer)
return static_cast<T>(atoi(psz));
else
@@ -43,7 +49,13 @@
// Memset given object to zero.
template <class T>
-inline void MemsetZero(T& a) {memset(&a, 0, sizeof(T));}
+inline void MemsetZero(T& a)
+{
+ #if _HAS_TR1
+ static_assert(std::tr1::is_pointer<T>::value == false, "Won't memset pointers.");
+ #endif
+ memset(&a, 0, sizeof(T));
+}
// Limits 'val' to given range. If 'val' is less than 'lowerLimit', 'val' is set to value 'lowerLimit'.
@@ -205,4 +217,13 @@
}
}
+namespace Util
+{
+ // Like std::max, but avoids conflict with max-macro.
+ template <class T> inline const T& Max(const T& a, const T& b) {return (std::max)(a, b);}
+
+ // Returns maximum value of given integer type.
+ template <class T> inline T MaxValueOfType(const T&) {static_assert(std::numeric_limits<T>::is_integer == true, "Only interger types are allowed."); return (std::numeric_limits<T>::max)();}
+};
+
#endif
Modified: trunk/OpenMPT/mptrack/serialization_utils.cpp
===================================================================
--- trunk/OpenMPT/mptrack/serialization_utils.cpp 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/serialization_utils.cpp 2010-10-25 20:27:05 UTC (rev 754)
@@ -1,6 +1,7 @@
#include "stdafx.h"
#include "serialization_utils.h"
#include <algorithm>
+#include <iterator> // for back_inserter
namespace srlztn
{
@@ -752,7 +753,7 @@
if(nIdsize == IdSizeVariable) //Variablesize ID
ReadAdaptive12(iStrm, nIdsize);
const size_t nOldEnd = m_Idarray.size();
- if(nIdsize > 0)
+ if (nIdsize > 0 && (Util::MaxValueOfType(nOldEnd) - nOldEnd >= nIdsize))
{
m_Idarray.resize(nOldEnd + nIdsize);
iStrm.read(&m_Idarray[nOldEnd], nIdsize);
Modified: trunk/OpenMPT/mptrack/serialization_utils.h
===================================================================
--- trunk/OpenMPT/mptrack/serialization_utils.h 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/mptrack/serialization_utils.h 2010-10-25 20:27:05 UTC (rev 754)
@@ -318,7 +318,7 @@
static int32 s_DefaultWriteLogMask;
static fpLogFunc_t s_DefaultLogFunc;
static const char s_EntryID[3];
- static const uint32 s_DefaultFlags = (1 << RwfWMapStartPosEntry) +
+ static const int32 s_DefaultFlags = (1 << RwfWMapStartPosEntry) +
(1 << RwfWMapSizeEntry) + (1 << RwfWVersionNum) +
(1 << RwfRPartialIdMatch);
};
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-10-25 20:27:05 UTC (rev 754)
@@ -32,7 +32,8 @@
/*
MPTM version history for cwtv-field in "IT" header (only for MPTM files!):
0x890(1.18.02.00) -> 0x891(1.19.00.00): Pattern-specific time signatures
-0x88F(1.18.01.00) -> 0x890(1.18.02.00): Removed volume command velocity :xy, added delay-cut command :xy.
+ Fixed behaviour of Pattern Loop command for rows > 255 (r617)
+0x88F(1.18.01.00) -> 0x890(1.18.02.00): Removed volume command velocity :xy, added delay-cut command :xy.
0x88E(1.17.02.50) -> 0x88F(1.18.01.00): Numerous changes
0x88D(1.17.02.49) -> 0x88E(1.17.02.50): Changed ID to that of IT and undone the orderlist change done in
0x88A->0x88B. Now extended orderlist is saved as extension.
Modified: trunk/OpenMPT/soundlib/Load_mo3.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mo3.cpp 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/soundlib/Load_mo3.cpp 2010-10-25 20:27:05 UTC (rev 754)
@@ -62,8 +62,8 @@
}
else //case: dll loaded succesfully.
{
- UNMO3_DECODE UNMO3_Decode = (UNMO3_DECODE)GetProcAddress(unmo3, _TEXT("UNMO3_Decode"));
- UNMO3_FREE UNMO3_Free = (UNMO3_FREE)GetProcAddress(unmo3, _TEXT("UNMO3_Free"));
+ UNMO3_DECODE UNMO3_Decode = (UNMO3_DECODE)GetProcAddress(unmo3, "UNMO3_Decode");
+ UNMO3_FREE UNMO3_Free = (UNMO3_FREE)GetProcAddress(unmo3, "UNMO3_Free");
if(UNMO3_Decode != NULL && UNMO3_Free != NULL)
{
Modified: trunk/OpenMPT/soundlib/Snddev.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snddev.cpp 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/soundlib/Snddev.cpp 2010-10-25 20:27:05 UTC (rev 754)
@@ -1373,6 +1373,7 @@
{
if (ghDSoundDLL) return TRUE;
if ((ghDSoundDLL = LoadLibrary("dsound.dll")) == NULL) return FALSE;
+ static_assert(sizeof(TCHAR) == 1, "Check DirectSoundEnumerateA below");
if ((gpDSoundEnumerate = (LPDSOUNDENUMERATE)GetProcAddress(ghDSoundDLL, "DirectSoundEnumerateA")) == NULL) return FALSE;
if ((gpDSoundCreate = (LPDSOUNDCREATE)GetProcAddress(ghDSoundDLL, "DirectSoundCreate")) == NULL) return FALSE;
RtlZeroMemory(glpDSoundGUID, sizeof(glpDSoundGUID));
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-10-25 20:27:05 UTC (rev 754)
@@ -652,6 +652,8 @@
void SetMasterVolume(UINT vol, bool adjustAGC = false);
UINT GetMasterVolume() const { return m_nMasterVolume; }
+
+ // Returns 1 + index of last valid pattern, zero if no such pattern exists.
PATTERNINDEX GetNumPatterns() const;
INSTRUMENTINDEX GetNumInstruments() const { return m_nInstruments; }
SAMPLEINDEX GetNumSamples() const { return m_nSamples; }
Modified: trunk/OpenMPT/soundtouch/soundtouch_08.vcproj
===================================================================
--- trunk/OpenMPT/soundtouch/soundtouch_08.vcproj 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/soundtouch/soundtouch_08.vcproj 2010-10-25 20:27:05 UTC (rev 754)
@@ -45,7 +45,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;INTEGER_SAMPLES=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
ForceConformanceInForLoopScope="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Modified: trunk/OpenMPT/ungzip/ungzip_08.vcproj
===================================================================
--- trunk/OpenMPT/ungzip/ungzip_08.vcproj 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/ungzip/ungzip_08.vcproj 2010-10-25 20:27:05 UTC (rev 754)
@@ -17,7 +17,7 @@
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
@@ -78,7 +78,7 @@
</Configuration>
<Configuration
Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
@@ -104,7 +104,7 @@
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
- RuntimeLibrary="2"
+ RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
WarningLevel="3"
SuppressStartupBanner="false"
Modified: trunk/OpenMPT/unlha/unlha_08.vcproj
===================================================================
--- trunk/OpenMPT/unlha/unlha_08.vcproj 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/unlha/unlha_08.vcproj 2010-10-25 20:27:05 UTC (rev 754)
@@ -45,7 +45,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
StringPooling="true"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
BufferSecurityCheck="true"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Debug/unlha.pch"
Modified: trunk/OpenMPT/unrar/unrar_08.vcproj
===================================================================
--- trunk/OpenMPT/unrar/unrar_08.vcproj 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/unrar/unrar_08.vcproj 2010-10-25 20:27:05 UTC (rev 754)
@@ -43,7 +43,7 @@
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
StringPooling="true"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
BufferSecurityCheck="true"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Debug/UNRAR.pch"
Modified: trunk/OpenMPT/unzip/unzip_08.vcproj
===================================================================
--- trunk/OpenMPT/unzip/unzip_08.vcproj 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/unzip/unzip_08.vcproj 2010-10-25 20:27:05 UTC (rev 754)
@@ -43,7 +43,7 @@
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
StringPooling="true"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
BufferSecurityCheck="true"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Debug/unzip.pch"
Modified: trunk/OpenMPT/xsoundlib/xsoundlib_08.vcproj
===================================================================
--- trunk/OpenMPT/xsoundlib/xsoundlib_08.vcproj 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/xsoundlib/xsoundlib_08.vcproj 2010-10-25 20:27:05 UTC (rev 754)
@@ -44,7 +44,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
BufferSecurityCheck="true"
UsePrecompiledHeader="2"
WarningLevel="3"
Modified: trunk/OpenMPT/zlib/contrib/vstudio/vc9/zlibstat.vcproj
===================================================================
--- trunk/OpenMPT/zlib/contrib/vstudio/vc9/zlibstat.vcproj 2010-10-25 19:49:49 UTC (rev 753)
+++ trunk/OpenMPT/zlib/contrib/vstudio/vc9/zlibstat.vcproj 2010-10-25 20:27:05 UTC (rev 754)
@@ -50,7 +50,7 @@
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
ExceptionHandling="0"
- RuntimeLibrary="1"
+ RuntimeLibrary="3"
BufferSecurityCheck="false"
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
AssemblerListingLocation="$(IntDir)\"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-10-25 19:49:56
|
Revision: 753
http://modplug.svn.sourceforge.net/modplug/?rev=753&view=rev
Author: saga-games
Date: 2010-10-25 19:49:49 +0000 (Mon, 25 Oct 2010)
Log Message:
-----------
[Fix] It would help to actually set the offset...
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-10-25 19:31:16 UTC (rev 752)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-10-25 19:49:49 UTC (rev 753)
@@ -3349,6 +3349,7 @@
{
return;
}
+ pChn->nPos = param;
if (pChn->nPos >= pChn->nLength)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-10-25 19:31:23
|
Revision: 752
http://modplug.svn.sourceforge.net/modplug/?rev=752&view=rev
Author: saga-games
Date: 2010-10-25 19:31:16 +0000 (Mon, 25 Oct 2010)
Log Message:
-----------
[Fix] The speed input field on the general tab broke for S3M files in rev.744
[Fix] WAV cue points were not written properly on Big-Endian system, which is not really an error since OpenMPT doesn't run on any of them anyway.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_gen.cpp
trunk/OpenMPT/mptrack/Mod2wave.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2010-10-25 19:28:16 UTC (rev 751)
+++ trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2010-10-25 19:31:16 UTC (rev 752)
@@ -96,7 +96,7 @@
if(m_pSndFile->GetType() & MOD_TYPE_S3M)
{
m_SpinTempo.SetRange(33, 255);
- m_SpinSpeed.SetRange(1, 25);
+ m_SpinSpeed.SetRange(1, 255);
} else
{
m_SpinTempo.SetRange((short)specs.tempoMin, (short)specs.tempoMax);
Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mod2wave.cpp 2010-10-25 19:28:16 UTC (rev 751)
+++ trunk/OpenMPT/mptrack/Mod2wave.cpp 2010-10-25 19:31:16 UTC (rev 752)
@@ -870,10 +870,10 @@
// Write all cue points
vector<PatternCuePoint>::const_iterator iter;
DWORD num = 0;
- for(iter = m_pSndFile->m_PatternCuePoints.begin(); iter != m_pSndFile->m_PatternCuePoints.end(); ++iter)
+ for(iter = m_pSndFile->m_PatternCuePoints.begin(); iter != m_pSndFile->m_PatternCuePoints.end(); ++iter, num++)
{
WAVCUEPOINT cuepoint;
- cuepoint.cp_id = LittleEndian(num++);
+ cuepoint.cp_id = LittleEndian(num);
cuepoint.cp_pos = LittleEndian((DWORD)iter->offset);
cuepoint.cp_chunkid = LittleEndian(IFFID_data);
cuepoint.cp_chunkstart = 0; // we use no Wave List Chunk (wavl) as we have only one data block, so this should be 0.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|