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: <rel...@us...> - 2008-02-02 19:03:45
|
Revision: 200
http://modplug.svn.sourceforge.net/modplug/?rev=200&view=rev
Author: relabsoluness
Date: 2008-02-02 11:03:19 -0800 (Sat, 02 Feb 2008)
Log Message:
-----------
. Extended song/instrument properties were not always loaded correctly for IT(http://lpchip.com/modplug/viewtopic.php?p=16335)
. Channel pan controls in general view were disable for all types instead of just XM and MOD (bug introduced in rev. 199)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_gen.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
Modified: trunk/OpenMPT/mptrack/View_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_gen.cpp 2008-01-29 21:00:25 UTC (rev 199)
+++ trunk/OpenMPT/mptrack/View_gen.cpp 2008-02-02 19:03:19 UTC (rev 200)
@@ -390,11 +390,11 @@
::EnableWindow(::GetDlgItem(m_hWnd, IDC_CHECK1+ichn*2), bEnable);
::EnableWindow(::GetDlgItem(m_hWnd, IDC_CHECK2+ichn*2), bIT);
::EnableWindow(m_sbVolume[ichn].m_hWnd, bEnable);
- ::EnableWindow(m_sbPan[ichn].m_hWnd, bEnable && !(pSndFile->GetType() & MOD_TYPE_XM|MOD_TYPE_MOD));
+ ::EnableWindow(m_sbPan[ichn].m_hWnd, bEnable && !(pSndFile->GetType() & (MOD_TYPE_XM|MOD_TYPE_MOD)));
::EnableWindow(m_spinVolume[ichn], bEnable);
- ::EnableWindow(m_spinPan[ichn], bEnable && !(pSndFile->GetType() & MOD_TYPE_XM|MOD_TYPE_MOD));
+ ::EnableWindow(m_spinPan[ichn], bEnable && !(pSndFile->GetType() & (MOD_TYPE_XM|MOD_TYPE_MOD)));
::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT1+ichn*2), bEnable);
- ::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT2+ichn*2), bEnable && !(pSndFile->GetType() & MOD_TYPE_XM|MOD_TYPE_MOD));
+ ::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT2+ichn*2), bEnable && !(pSndFile->GetType() & (MOD_TYPE_XM|MOD_TYPE_MOD)));
::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT9+ichn), ((bEnable) && (pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT))));
m_CbnEffects[ichn].EnableWindow(bEnable);
}
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2008-01-29 21:00:25 UTC (rev 199)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2008-02-02 19:03:19 UTC (rev 200)
@@ -958,6 +958,8 @@
}
}
+ if(GetType() == MOD_TYPE_IT) mptStartPos = dwMemLength;
+
if (pifh->flags & 0x08) m_dwSongFlags |= SONG_LINEARSLIDES;
if (pifh->flags & 0x10) m_dwSongFlags |= SONG_ITOLDEFFECTS;
if (pifh->flags & 0x20) m_dwSongFlags |= SONG_ITCOMPATMODE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2008-01-29 21:00:47
|
Revision: 199
http://modplug.svn.sourceforge.net/modplug/?rev=199&view=rev
Author: relabsoluness
Date: 2008-01-29 13:00:25 -0800 (Tue, 29 Jan 2008)
Log Message:
-----------
Miscellaneous minor changes
. Fix for faulty tabs when switching between modtypes with and without instrumenttab. (http://lpchip.com/modplug/viewtopic.php?t=1614)
/ Modified flag is not set when sliding tempo/global volume slider for MOD file
/ When setting instrument pan, checking whether instrument samples have set pan enabled and optionally disabling them.
+ Unmute all(on transition) shortcutkeys should now work in orderlist context
/ Disabled Set Pan in sample tab for XM
+ Half/double pattern rownumber buttons to pattern properties dialog.
/ Show prev/next pattern now shows pattern over +++ orderlist items.
+ Channel status in status bar now show channel volume info.
/ Disabled setting channel pan for MOD/XM in general view.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_gen.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_seq.cpp
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
trunk/OpenMPT/mptrack/Draw_pat.cpp
trunk/OpenMPT/mptrack/Globals.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/OrderToPatternTable.cpp
trunk/OpenMPT/mptrack/OrderToPatternTable.h
trunk/OpenMPT/mptrack/View_gen.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/pattern.h
trunk/OpenMPT/mptrack/patternContainer.cpp
trunk/OpenMPT/mptrack/patternContainer.h
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/mptrack/typedefs.h
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/mod_specifications.h
Modified: trunk/OpenMPT/mptrack/Ctrl_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -80,17 +80,19 @@
BOOL CCtrlGeneral::OnInitDialog()
//-------------------------------
{
+ const CModSpecifications specs = m_pSndFile->GetModSpecifications();
CModControlDlg::OnInitDialog();
// Song Title
if(m_pSndFile)
- m_EditTitle.SetLimitText(m_pSndFile->GetModSpecifications().modNameLengthMax);
+ m_EditTitle.SetLimitText(specs.modNameLengthMax);
else
m_EditTitle.SetLimitText(25);
// -> CODE#0016
// -> DESC="default tempo update"
// m_SpinTempo.SetRange(32, 255); // 255 bpm max
- m_SpinTempo.SetRange(32, 512);
+ //m_SpinTempo.SetRange(32, 512);
+ m_SpinTempo.SetRange(specs.tempoMin, specs.tempoMax);
m_SpinSpeed.SetRange(1, 64);
// -! BEHAVIOUR_CHANGE#0016
m_SpinGlobalVol.SetRange(0, 128);
@@ -98,7 +100,7 @@
m_SpinVSTiVol.SetRange(0, 2000);
m_SpinRestartPos.SetRange(0, 255);
- m_SliderTempo.SetRange(0, 480);
+ m_SliderTempo.SetRange(0, specs.tempoMax - specs.tempoMin);
m_SliderGlobalVol.SetRange(0, MAX_SLIDER_GLOBAL_VOL);
m_SliderVSTiVol.SetRange(0, MAX_SLIDER_VSTI_VOL);
m_SliderSamplePreAmp.SetRange(0, MAX_SLIDER_SAMPLE_VOL);
@@ -190,13 +192,17 @@
m_SliderGlobalVol.SetPos(MAX_SLIDER_GLOBAL_VOL-m_pSndFile->m_nDefaultGlobalVolume);
m_SliderVSTiVol.SetPos(MAX_SLIDER_VSTI_VOL-m_pSndFile->m_nVSTiVolume);
m_SliderSamplePreAmp.SetPos(MAX_SLIDER_SAMPLE_VOL-m_pSndFile->m_nSamplePreAmp);
- m_SliderTempo.SetPos(480 - m_pSndFile->m_nDefaultTempo + 32);
+ m_SliderTempo.SetPos(m_pSndFile->GetModSpecifications().tempoMax - m_pSndFile->m_nDefaultTempo);
}
if (dwHint & HINT_MODTYPE)
{
+ CModSpecifications specs = m_pSndFile->GetModSpecifications();
+ m_SpinTempo.SetRange(specs.tempoMin, specs.tempoMax);
+ m_SliderTempo.SetRange(0, specs.tempoMax - specs.tempoMin);
+
BOOL b = TRUE;
if (m_pSndFile->m_nType == MOD_TYPE_MOD) b = FALSE;
m_EditTempo.EnableWindow(b);
@@ -211,6 +217,8 @@
m_SpinSamplePA.EnableWindow(b);
m_SliderSamplePreAmp.EnableWindow(b);
m_SliderVSTiVol.EnableWindow(b);
+ //Note: Global volume slider is not disabled for MOD
+ //on purpose(can be used to control play volume)
// MOD Type
LPCSTR pszModType = "MOD (ProTracker)";
@@ -258,11 +266,15 @@
CSliderCtrl* pSlider = (CSliderCtrl*) pscroll;
if (pSlider==&m_SliderTempo) {
- int tempo = 480 - m_SliderTempo.GetPos() + 32;
- if ((tempo >= 32) && (tempo <= 512) && (tempo != m_pSndFile->m_nDefaultTempo)) {
+ int min, max;
+ m_SpinTempo.GetRange(min, max);
+ int tempo = max - m_SliderTempo.GetPos();
+ if ((tempo >= m_pSndFile->GetModSpecifications().tempoMin) && (tempo <= m_pSndFile->GetModSpecifications().tempoMax) && (tempo != m_pSndFile->m_nDefaultTempo)) {
m_pSndFile->m_nDefaultTempo = tempo;
m_pSndFile->m_nMusicTempo = tempo;
- m_pModDoc->SetModified();
+ if(m_pSndFile->GetType() != MOD_TYPE_MOD)
+ m_pModDoc->SetModified();
+
m_pModDoc->UpdateAllViews(NULL, HINT_MODGENERAL, this);
}
}
@@ -272,7 +284,9 @@
if ((gv >= 0) && (gv <= MAX_SLIDER_GLOBAL_VOL) && (gv != m_pSndFile->m_nDefaultGlobalVolume)) {
m_pSndFile->m_nGlobalVolume = gv;
m_pSndFile->m_nDefaultGlobalVolume = gv;
- m_pModDoc->SetModified();
+ if(m_pSndFile->GetType() != MOD_TYPE_MOD)
+ m_pModDoc->SetModified();
+
m_pModDoc->UpdateAllViews(NULL, HINT_MODGENERAL, this);
}
}
@@ -327,7 +341,8 @@
if (s[0])
{
UINT n = atoi(s);
- if ((n >= 32) && (n <= 512) && (n != m_pSndFile->m_nDefaultTempo))
+ CModSpecifications specs = m_pSndFile->GetModSpecifications();
+ if ((n >= specs.tempoMin) && (n <= specs.tempoMax) && (n != m_pSndFile->m_nDefaultTempo))
{
m_bEditsLocked=true;
m_EditTempo.SetModify(FALSE);
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -14,7 +14,7 @@
using std::string;
using std::vector;
-#pragma warning(disable:4244)
+#pragma warning(disable:4244) //conversion from 'type1' to 'type2', possible loss of data
const pair<string, WORD> CCtrlInstruments::s_TuningNotFound("Tuning was not found. Setting to default tuning", 7);
@@ -1741,9 +1741,44 @@
INSTRUMENTHEADER *penv = m_pSndFile->Headers[m_nInstrument];
if ((!IsLocked()) && (penv))
{
- BOOL b = m_CheckPanning.GetCheck();
+ const BOOL b = m_CheckPanning.GetCheck();
+
if (b) penv->dwFlags |= ENV_SETPANNING;
else penv->dwFlags &= ~ENV_SETPANNING;
+
+ if(b && m_pSndFile->GetType() & MOD_TYPE_IT|MOD_TYPE_MPT)
+ {
+ bool smpPanningInUse = false;
+ for(BYTE i = 0; i<ARRAYELEMCOUNT(penv->Keyboard); i++)
+ {
+ const SAMPLEINDEX smp = penv->Keyboard[i];
+ if(smp <= m_pSndFile->GetNumSamples() && m_pSndFile->Ins[smp].uFlags & CHN_PANNING)
+ {
+ smpPanningInUse = true;
+ break;
+ }
+ }
+ if(smpPanningInUse)
+ {
+ if(MessageBox("Some of the samples used in the instrument have \"Set Pan\" enabled. "
+ "When instrument is played with such sample, sample pan setting overrides instrument pan. "
+ "Do you wish to disable panning from those samples so that instrument pan setting is effective "
+ "for the whole instrument?",
+ "",
+ MB_YESNO) == IDYES)
+ {
+ for(BYTE i = 0; i<ARRAYELEMCOUNT(penv->Keyboard); i++)
+ {
+ const SAMPLEINDEX smp = penv->Keyboard[i];
+ if(smp <= m_pSndFile->GetNumSamples())
+ m_pSndFile->Ins[smp].uFlags &= ~CHN_PANNING;
+ }
+ m_pModDoc->SetModified();
+ m_pModDoc->UpdateAllViews(NULL, HINT_SAMPLEINFO | HINT_MODTYPE);
+ }
+ }
+ }
+
// -> CODE#0023
// -> DESC="IT project files (.itp)"
m_pSndFile->instrumentModified[m_nInstrument-1] = TRUE;
Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -316,7 +316,7 @@
}
if (ord != pSndFile->Order[m_nScrollPos])
{
- pSndFile->Order[m_nScrollPos] = static_cast<UINT>(ord);
+ pSndFile->Order[m_nScrollPos] = static_cast<PATTERNINDEX>(ord);
m_pModDoc->SetModified();
m_pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, this);
InvalidateSelection();
@@ -351,12 +351,17 @@
switch (kc)
{
- case kcSwitchToOrderList: OnSwitchToView(); return true;
+ case kcSwitchToOrderList: OnSwitchToView(); return true;
case kcChangeLoopStatus: m_pParent->OnModCtrlMsg(CTRLMSG_PAT_LOOP, -1); return true;
case kcToggleFollowSong: m_pParent->OnFollowSong(); return true;
+
+ case kcChannelUnmuteAll:
+ case kcUnmuteAllChnOnPatTransition:
+ ::PostMessage(m_pParent->GetViewWnd(), WM_MOD_KEYCOMMAND, kc, 0);
+ return true;
}
}
- //end rewbs.customKeys
+ //end rewbs.customKeys
switch(pMsg->message)
@@ -889,7 +894,7 @@
switch(pDropInfo->dwDropType)
{
case DRAGONDROP_PATTERN:
- pSndFile->Order[posdest] = static_cast<UINT>(pDropInfo->dwDropItem);
+ pSndFile->Order[posdest] = static_cast<PATTERNINDEX>(pDropInfo->dwDropItem);
break;
case DRAGONDROP_ORDER:
@@ -925,4 +930,4 @@
else m_nOrderlistMargins = maxMargins;
}
return m_nOrderlistMargins;
-}
+}
\ No newline at end of file
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -570,8 +570,8 @@
m_EditGlobalVol.EnableWindow(b);
m_SpinGlobalVol.EnableWindow(b);
// Panning
- b = (m_pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)) ? TRUE : FALSE;
- m_CheckPanning.EnableWindow(b);
+ b = (m_pSndFile->GetType() & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)) ? TRUE : FALSE;
+ m_CheckPanning.EnableWindow(b && !(m_pSndFile->GetType() & MOD_TYPE_XM));
m_EditPanning.EnableWindow(b);
m_SpinPanning.EnableWindow(b);
}
@@ -599,7 +599,7 @@
// Global Volume
SetDlgItemInt(IDC_EDIT8, pins->nGlobalVol);
// Panning
- CheckDlgButton(IDC_CHECK1, (pins->uFlags & CHN_PANNING) ? MF_CHECKED : 0);
+ CheckDlgButton(IDC_CHECK1, (pins->uFlags & CHN_PANNING) ? MF_CHECKED : MF_UNCHECKED);
//rewbs.fix36944
if (m_pSndFile->m_nType == MOD_TYPE_XM) {
SetDlgItemInt(IDC_EDIT9, pins->nPan); //displayed panning with XM is 0-256, just like MPT's internal engine
@@ -2236,7 +2236,7 @@
{
if (IsLocked()) return;
BOOL b = FALSE;
- if (m_pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT))
+ if (m_pSndFile->m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT))
{
b = IsDlgButtonChecked(IDC_CHECK1);
}
@@ -2245,14 +2245,14 @@
if (!(m_pSndFile->Ins[m_nSample].uFlags & CHN_PANNING))
{
m_pSndFile->Ins[m_nSample].uFlags |= CHN_PANNING;
- if (m_pSndFile->m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)) m_pModDoc->SetModified();
+ m_pModDoc->SetModified();
}
} else
{
if (m_pSndFile->Ins[m_nSample].uFlags & CHN_PANNING)
{
m_pSndFile->Ins[m_nSample].uFlags &= ~CHN_PANNING;
- if (m_pSndFile->m_nType == (MOD_TYPE_IT|MOD_TYPE_MPT)) m_pModDoc->SetModified();
+ m_pModDoc->SetModified();
}
}
}
@@ -2818,7 +2818,7 @@
return CModControlDlg::PreTranslateMessage(pMsg);
}
-LRESULT CCtrlSamples::OnCustomKeyMsg(WPARAM wParam, LPARAM lParam)
+LRESULT CCtrlSamples::OnCustomKeyMsg(WPARAM wParam, LPARAM /*lParam*/)
//----------------------------------------------------------------
{
if (wParam == kcNull)
Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Draw_pat.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -99,12 +99,14 @@
// CViewPattern Drawing Implementation
inline PCPATTERNFONT GetCurrentPatternFont()
+//------------------------------------------
{
return (CMainFrame::m_dwPatternSetup & PATTERN_SMALLFONT) ? &gSmallPatternFont : &gDefaultPatternFont;
}
static BYTE hilightcolor(int c0, int c1)
+//--------------------------------------
{
int cf0, cf1;
@@ -510,14 +512,21 @@
UINT nPrevPat = m_nPattern;
BOOL bPrevPatFound = FALSE;
+ // Display previous pattern
if (CMainFrame::m_dwPatternSetup & PATTERN_SHOWPREVIOUS)
{
- UINT nCurOrder = SendCtrlMessage(CTRLMSG_GETCURRENTORDER);
-
- if ((nCurOrder > 0) && (nCurOrder < pSndFile->Order.size()) && (pSndFile->Order[nCurOrder] == m_nPattern))
+ const ORDERINDEX startOrder = static_cast<ORDERINDEX>(SendCtrlMessage(CTRLMSG_GETCURRENTORDER));
+ if(startOrder > 0)
{
- nPrevPat = pSndFile->Order[nCurOrder-1];
- bPrevPatFound = TRUE;
+ ORDERINDEX prevOrder = startOrder - 1;
+ //Skip +++ items
+ while(prevOrder > 0 && pSndFile->Order[prevOrder] == pSndFile->Order.GetIgnoreIndex()) --prevOrder;
+
+ if(startOrder < pSndFile->Order.size() && pSndFile->Order[startOrder] == m_nPattern)
+ {
+ nPrevPat = pSndFile->Order[prevOrder];
+ bPrevPatFound = TRUE;
+ }
}
}
if ((bPrevPatFound) && (nPrevPat < pSndFile->Patterns.Size()) && (pSndFile->Patterns[nPrevPat]))
@@ -556,11 +565,16 @@
{
UINT nNextPat = m_nPattern;
BOOL bNextPatFound = FALSE;
- UINT nCurOrder = SendCtrlMessage(CTRLMSG_GETCURRENTORDER);
-
- if ((nCurOrder+1 < pSndFile->Order.size()) && (pSndFile->Order[nCurOrder] == m_nPattern))
+ const ORDERINDEX startOrder= static_cast<ORDERINDEX>(SendCtrlMessage(CTRLMSG_GETCURRENTORDER));
+ ORDERINDEX nNextOrder = 1 + startOrder;
+
+ //Ignore skip items(+++) from sequence.
+ const ORDERINDEX ordCount = pSndFile->Order.GetCount();
+ while(nNextOrder < ordCount && pSndFile->Order[nNextOrder] == pSndFile->Order.GetIgnoreIndex()) nNextOrder++;
+
+ if ((nNextOrder < ordCount) && (pSndFile->Order[startOrder] == m_nPattern))
{
- nNextPat = pSndFile->Order[nCurOrder+1];
+ nNextPat = pSndFile->Order[nNextOrder];
bNextPatFound = TRUE;
}
if ((bNextPatFound) && (nNextPat < pSndFile->Patterns.Size()) && (pSndFile->Patterns[nNextPat]))
@@ -1423,6 +1437,7 @@
//rewbs.xinfo
void CViewPattern::UpdateXInfoText()
+//----------------------------------
{
UINT nChn = GetCurrentChannel();
CString xtraInfo;
@@ -1434,8 +1449,10 @@
CSoundFile *pSndFile = pModDoc->GetSoundFile();
if (!pSndFile) return;
- xtraInfo.Format("Chan: %d; macro: %X; cutoff: %X; reso: %X; pan: %X",
+ //xtraInfo.Format("Chan: %d; macro: %X; cutoff: %X; reso: %X; pan: %X",
+ xtraInfo.Format("Chn:%d; Vol:%X; Mac:%X; Cut:%X; Res:%X; Pan:%X",
nChn+1,
+ pSndFile->Chn[nChn].nGlobalVol,
pSndFile->Chn[nChn].nActiveMacro,
pSndFile->Chn[nChn].nCutOff,
pSndFile->Chn[nChn].nResonance,
Modified: trunk/OpenMPT/mptrack/Globals.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Globals.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/Globals.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -289,9 +289,39 @@
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
CModControlDlg *pDlg = NULL;
- UINT nID;
+
if (nIndex == -1) nIndex = m_TabCtrl.GetCurSel();
+
+ const UINT nID = m_TabCtrl.GetItemData(nIndex);
+ if(nID == 0) return FALSE;
+
+ switch(nID)
+ {
+ //rewbs.graph
+ case IDD_CONTROL_GRAPH:
+ nIndex = 5;
+ break;
+ //end rewbs.graph
+ case IDD_CONTROL_COMMENTS:
+ nIndex = 4;
+ break;
+ case IDD_CONTROL_GLOBALS:
+ nIndex = 0;
+ break;
+ case IDD_CONTROL_PATTERNS:
+ nIndex = 1;
+ break;
+ case IDD_CONTROL_SAMPLES:
+ nIndex = 2;
+ break;
+ case IDD_CONTROL_INSTRUMENTS:
+ nIndex = 3;
+ break;
+ default:
+ return FALSE;
+ }
+
if ((nIndex < 0) || (nIndex >= MAX_PAGES) || (!pMainFrm)) return FALSE;
//rewbs.varWindowSize
@@ -304,7 +334,6 @@
PostMessage(WM_MOD_CTRLMSG, CTRLMSG_ACTIVATEPAGE, lParam);
return TRUE;
}
- if ((nID = m_TabCtrl.GetItemData(nIndex)) == 0) return FALSE;
if ((m_nActiveDlg >= 0) && (m_nActiveDlg < MAX_PAGES))
{
if (m_Pages[m_nActiveDlg])
@@ -314,11 +343,11 @@
}
m_nActiveDlg = -1;
}
- if (m_Pages[nIndex])
+ if (m_Pages[nIndex]) //Ctrl window already created?
{
m_nActiveDlg = nIndex;
pDlg = m_Pages[nIndex];
- } else
+ } else //Ctrl window is not created yet - creating one.
{
switch(nID)
{
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -192,18 +192,13 @@
static void ShowChangesDialog()
//-----------------------------
{
+ /*
CString firstOpenMessage = "OpenMPT version " + CMainFrame::GetFullVersionString();
firstOpenMessage += ". This is a development build.\n\nChanges:\n\n"
- "[New] Ability to control plug params with MIDI controllers.\n"
- "[New] Ability to pass MIDI to plugin.\n"
- "[Imp] Ability to take MIDI volume into account when playing notes.\n"
- "[Fix/Imp] Plugin volume command fix. In addition now there are options how to interpret it.\n"
- "[Imp] Keyshortcut for preset navigation jumps in VST editor.\n"
- "[Mod] .bak files won't be shown in load dialog with 'All modules' filter.\n"
- "[Fix/Mod] Instrument random variation fix/behavior change.\n\n"
- "And various other fixes and changes.";
+ "TODO";
CMainFrame::GetMainFrame()->MessageBox(firstOpenMessage, "OpenMPT v." + CMainFrame::GetFullVersionString(), MB_ICONINFORMATION);
+ */
}
Modified: trunk/OpenMPT/mptrack/OrderToPatternTable.cpp
===================================================================
--- trunk/OpenMPT/mptrack/OrderToPatternTable.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/OrderToPatternTable.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -89,10 +89,34 @@
}
-PATTERNINDEX COrderToPatternTable::GetInvalidPatIndex() const {return m_rSndFile.GetType() == MOD_TYPE_MPT ? 65535 : 0xFF;}
-PATTERNINDEX COrderToPatternTable::GetIgnoreIndex() const {return m_rSndFile.GetType() == MOD_TYPE_MPT ? 65534 : 0xFE;}
+void COrderToPatternTable::OnModTypeChanged(const MODTYPE oldtype)
+//----------------------------------------------------------------
+{
+ const CModSpecifications specs = m_rSndFile.GetModSpecifications();
+ //Resize orderlist if needed. Because old orderlist had 256 elements, not making it
+ //smaller than that even if the modtype doesn't support that many orders.
+ if(specs.ordersMax < GetCount())
+ {
+ resize(max(MAX_PATTERNS, specs.ordersMax));
+ for(ORDERINDEX i = GetCount(); i>specs.ordersMax; --i) (*this)[i-1] = GetInvalidPatIndex();
+ }
+ //Replace items used to denote end of song/skip order.
+ replace(begin(), end(), GetInvalidPatIndex(oldtype), GetInvalidPatIndex());
+ replace(begin(), end(), GetIgnoreIndex(oldtype), GetIgnoreIndex());
+}
+
+
+PATTERNINDEX COrderToPatternTable::GetInvalidPatIndex(const MODTYPE type) {return type == MOD_TYPE_MPT ? 65535 : 0xFF;}
+PATTERNINDEX COrderToPatternTable::GetIgnoreIndex(const MODTYPE type) {return type == MOD_TYPE_MPT ? 65534 : 0xFE;}
+
+PATTERNINDEX COrderToPatternTable::GetInvalidPatIndex() const {return GetInvalidPatIndex(m_rSndFile.GetType());}
+PATTERNINDEX COrderToPatternTable::GetIgnoreIndex() const {return GetIgnoreIndex(m_rSndFile.GetType());}
+
+
+
+
//--------------------------------------------------
//--------------------------------------------------
//--------------------------------------------------
@@ -131,3 +155,5 @@
}
}
+
+
Modified: trunk/OpenMPT/mptrack/OrderToPatternTable.h
===================================================================
--- trunk/OpenMPT/mptrack/OrderToPatternTable.h 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/OrderToPatternTable.h 2008-01-29 21:00:25 UTC (rev 199)
@@ -32,14 +32,21 @@
size_t WriteToByteArray(BYTE* dest, const UINT numOfBytes, const UINT destSize);
+ ORDERINDEX GetCount() const {return static_cast<ORDERINDEX>(size());}
+
//Deprecated function used for MPTm's created in 1.17.02.46 - 1.17.02.48.
DWORD Unserialize(const BYTE* const src, const DWORD memLength);
//Returns true if the IT orderlist datafield is not sufficient to store orderlist information.
bool NeedsExtraDatafield() const;
+ void OnModTypeChanged(const MODTYPE oldtype);
+
PATTERNINDEX GetInvalidPatIndex() const; //To correspond 0xFF
+ static PATTERNINDEX GetInvalidPatIndex(const MODTYPE type);
+
PATTERNINDEX GetIgnoreIndex() const; //To correspond 0xFE
+ static PATTERNINDEX GetIgnoreIndex(const MODTYPE type);
COrderSerialization* NewReadWriteObject() {return new COrderSerialization(*this);}
Modified: trunk/OpenMPT/mptrack/View_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_gen.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/View_gen.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -318,7 +318,8 @@
m_TabCtrl.DeleteAllItems();
for (int iItem=0; iItem<nTabCount; iItem++)
{
- wsprintf(s, "%d - %d", iItem * 4 + 1, iItem * 4 + 4);
+ const int lastItem = min(iItem * 4 + 4, MAX_BASECHANNELS);
+ wsprintf(s, "%d - %d", iItem * 4 + 1, lastItem);
tci.mask = TCIF_TEXT | TCIF_PARAM;
tci.pszText = s;
tci.lParam = iItem * 4;
@@ -337,58 +338,65 @@
m_nActiveTab = nTabIndex;
for (int ichn=0; ichn<4; ichn++)
{
- UINT nChn = nTabIndex*4+ichn;
- BOOL bEnable = (nChn < pSndFile->m_nChannels) ? TRUE : FALSE;
- // Text
- s[0] = 0;
- if (bEnable) wsprintf(s, "Channel %d", nChn+1);
- SetDlgItemText(IDC_TEXT1+ichn, s);
- // Mute
- CheckDlgButton(IDC_CHECK1+ichn*2, (pSndFile->ChnSettings[nChn].dwFlags & CHN_MUTE) ? TRUE : FALSE);
- // Surround
- CheckDlgButton(IDC_CHECK2+ichn*2, (pSndFile->ChnSettings[nChn].dwFlags & CHN_SURROUND) ? TRUE : FALSE);
- // Volume
- int vol = pSndFile->ChnSettings[nChn].nVolume;
- m_sbVolume[ichn].SetPos(vol);
- SetDlgItemInt(IDC_EDIT1+ichn*2, vol);
- // Pan
- int pan = pSndFile->ChnSettings[nChn].nPan;
- m_sbPan[ichn].SetPos(pan/4);
- SetDlgItemInt(IDC_EDIT2+ichn*2, pan);
- memcpy(s, pSndFile->ChnSettings[nChn].szName, MAX_CHANNELNAME);
- s[MAX_CHANNELNAME-1] = 0;
- SetDlgItemText(IDC_EDIT9+ichn, s);
- // Channel effect
- m_CbnEffects[ichn].SetRedraw(FALSE);
- m_CbnEffects[ichn].ResetContent();
- m_CbnEffects[ichn].SetItemData(m_CbnEffects[ichn].AddString("No plugin"), 0);
- int fxsel = 0;
- for (UINT ifx=0; ifx<MAX_MIXPLUGINS; ifx++)
+ const UINT nChn = nTabIndex*4+ichn;
+ const BOOL bEnable = (nChn < pSndFile->GetNumChannels()) ? TRUE : FALSE;
+ if(nChn < MAX_BASECHANNELS)
{
- if ((pSndFile->m_MixPlugins[ifx].Info.dwPluginId1)
- || (pSndFile->m_MixPlugins[ifx].Info.dwPluginId2)
- || (pSndFile->m_MixPlugins[ifx].Info.szName[0]
- || (pSndFile->ChnSettings[nChn].nMixPlugin == ifx+1)))
+ // Text
+ s[0] = 0;
+ if (bEnable) wsprintf(s, "Channel %d", nChn+1);
+ SetDlgItemText(IDC_TEXT1+ichn, s);
+ // Mute
+ CheckDlgButton(IDC_CHECK1+ichn*2, (pSndFile->ChnSettings[nChn].dwFlags & CHN_MUTE) ? TRUE : FALSE);
+ // Surround
+ CheckDlgButton(IDC_CHECK2+ichn*2, (pSndFile->ChnSettings[nChn].dwFlags & CHN_SURROUND) ? TRUE : FALSE);
+ // Volume
+ int vol = pSndFile->ChnSettings[nChn].nVolume;
+ m_sbVolume[ichn].SetPos(vol);
+ SetDlgItemInt(IDC_EDIT1+ichn*2, vol);
+ // Pan
+ int pan = pSndFile->ChnSettings[nChn].nPan;
+ m_sbPan[ichn].SetPos(pan/4);
+ SetDlgItemInt(IDC_EDIT2+ichn*2, pan);
+ memcpy(s, pSndFile->ChnSettings[nChn].szName, MAX_CHANNELNAME);
+ s[MAX_CHANNELNAME-1] = 0;
+ SetDlgItemText(IDC_EDIT9+ichn, s);
+ // Channel effect
+ m_CbnEffects[ichn].SetRedraw(FALSE);
+ m_CbnEffects[ichn].ResetContent();
+ m_CbnEffects[ichn].SetItemData(m_CbnEffects[ichn].AddString("No plugin"), 0);
+ int fxsel = 0;
+ for (UINT ifx=0; ifx<MAX_MIXPLUGINS; ifx++)
{
- wsprintf(s, "FX%d: %s", ifx+1, pSndFile->m_MixPlugins[ifx].Info.szName);
- int n = m_CbnEffects[ichn].AddString(s);
- m_CbnEffects[ichn].SetItemData(n, ifx+1);
- if (pSndFile->ChnSettings[nChn].nMixPlugin == ifx+1) fxsel = n;
+ if ((pSndFile->m_MixPlugins[ifx].Info.dwPluginId1)
+ || (pSndFile->m_MixPlugins[ifx].Info.dwPluginId2)
+ || (pSndFile->m_MixPlugins[ifx].Info.szName[0]
+ || (pSndFile->ChnSettings[nChn].nMixPlugin == ifx+1)))
+ {
+ wsprintf(s, "FX%d: %s", ifx+1, pSndFile->m_MixPlugins[ifx].Info.szName);
+ int n = m_CbnEffects[ichn].AddString(s);
+ m_CbnEffects[ichn].SetItemData(n, ifx+1);
+ if (pSndFile->ChnSettings[nChn].nMixPlugin == ifx+1) fxsel = n;
+ }
}
+ m_CbnEffects[ichn].SetRedraw(TRUE);
+ m_CbnEffects[ichn].SetCurSel(fxsel);
}
- m_CbnEffects[ichn].SetRedraw(TRUE);
- m_CbnEffects[ichn].SetCurSel(fxsel);
+ else
+ SetDlgItemText(IDC_TEXT1+ichn, "");
+
// Enable/Disable controls for this channel
BOOL bIT = ((bEnable) && (pSndFile->m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)));
::EnableWindow(::GetDlgItem(m_hWnd, IDC_CHECK1+ichn*2), bEnable);
::EnableWindow(::GetDlgItem(m_hWnd, IDC_CHECK2+ichn*2), bIT);
::EnableWindow(m_sbVolume[ichn].m_hWnd, bEnable);
- ::EnableWindow(m_sbPan[ichn].m_hWnd, bEnable);
+ ::EnableWindow(m_sbPan[ichn].m_hWnd, bEnable && !(pSndFile->GetType() & MOD_TYPE_XM|MOD_TYPE_MOD));
::EnableWindow(m_spinVolume[ichn], bEnable);
- ::EnableWindow(m_spinPan[ichn], bEnable);
+ ::EnableWindow(m_spinPan[ichn], bEnable && !(pSndFile->GetType() & MOD_TYPE_XM|MOD_TYPE_MOD));
::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT1+ichn*2), bEnable);
- ::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT2+ichn*2), bEnable);
+ ::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT2+ichn*2), bEnable && !(pSndFile->GetType() & MOD_TYPE_XM|MOD_TYPE_MOD));
::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT9+ichn), ((bEnable) && (pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT))));
+ m_CbnEffects[ichn].EnableWindow(bEnable);
}
UnlockControls();
}
@@ -1622,7 +1630,7 @@
}
// Update all other plugs' outputs
- for (int nPlug=0; nPlug<src; nPlug++) {
+ for (PLUGINDEX nPlug=0; nPlug<src; nPlug++) {
if (pSndFile->m_MixPlugins[nPlug].Info.dwOutputRouting & 0x80) {
if ((pSndFile->m_MixPlugins[nPlug].Info.dwOutputRouting & 0x7f) == src) {
pSndFile->m_MixPlugins[nPlug].Info.dwOutputRouting = ((BYTE)dest)|0x80;
@@ -1630,14 +1638,14 @@
}
}
// Update channels
- for (int nChn=0; nChn<pSndFile->m_nChannels; nChn++) {
+ for (CHANNELINDEX nChn=0; nChn<pSndFile->m_nChannels; nChn++) {
if (pSndFile->ChnSettings[nChn].nMixPlugin == src+1) {
pSndFile->ChnSettings[nChn].nMixPlugin = dest+1;
}
}
// Update instruments
- for (int nIns=1; nIns<=pSndFile->m_nInstruments; nIns++) {
+ for (INSTRUMENTINDEX nIns=1; nIns<=pSndFile->m_nInstruments; nIns++) {
if (pSndFile->Headers[nIns] && (pSndFile->Headers[nIns]->nMixPlug == src+1)) {
pSndFile->Headers[nIns]->nMixPlug = dest+1;
}
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -2910,10 +2910,10 @@
const BYTE nByte1 = GetFromMIDIMsg_DataByte1(dwMidiData);
const BYTE nByte2 = GetFromMIDIMsg_DataByte2(dwMidiData);
- const BYTE nNote = nByte1 + 1; // +1 is for MPT, where middle C is 61
- int nVol = nByte2; // At this stage nVol is a non linear value in [0;127]
+ const BYTE nNote = nByte1 + 1; // +1 is for MPT, where middle C is 61
+ int nVol = nByte2; // At this stage nVol is a non linear value in [0;127]
// Need to convert to linear in [0;64] - see below
- BYTE event = GetFromMIDIMsg_Event(dwMidiData);
+ BYTE event = GetFromMIDIMsg_Event(dwMidiData);
if ((event == 0x9) && !nVol) event = 0x8; //Convert event to note-off if req'd
@@ -3241,7 +3241,7 @@
case kcChannelMute: OnMuteChannel(true); return wParam;
case kcChannelSolo: OnSoloChannel(true); return wParam;
case kcChannelUnmuteAll: OnUnmuteAll(); return wParam;
- case kcToggleChanMuteOnPatTransition: TogglePendingMute((m_dwCursor&0xFFFF)>>3); return wParam;
+ case kcToggleChanMuteOnPatTransition: TogglePendingMute(GetChanFromCursor(m_dwCursor)); return wParam;
case kcUnmuteAllChnOnPatTransition: OnPendingUnmuteAllChnFromClick(); return wParam;
case kcTimeAtRow: OnShowTimeAtRow(); return wParam;
case kcSoloChnOnPatTransition: PendingSoloChn(GetCurrentChannel()); return wParam;
@@ -3701,8 +3701,7 @@
return;
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- MODCOMMAND *p = pSndFile->Patterns[m_nPattern], *prowbase;
- UINT nChn = (m_dwCursor & 0xFFFF) >> 3;
+ UINT nChn = GetChanFromCursor(m_dwCursor);
PrepareUndo(m_dwBeginSel, m_dwEndSel);
BYTE* activeNoteMap = isSplit ? splitActiveNoteChannel : activeNoteChannel;
@@ -3725,11 +3724,7 @@
//Work out where to put the note off
UINT nRow = usePlaybackPosition ? pSndFile->m_nRow : m_nRow;
- prowbase = p + nRow * pSndFile->m_nChannels;
- if (releaseChan < pSndFile->GetNumChannels())
- p=prowbase+releaseChan;
- else
- p=prowbase+nChn;
+ MODCOMMAND* p = pSndFile->Patterns[m_nPattern].GetpModCommand(nRow, (releaseChan < pSndFile->GetNumChannels()) ? releaseChan : nChn);
//don't overwrite:
if (p->note || p->instr || p->volcmd) {
@@ -3802,8 +3797,7 @@
return;
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- MODCOMMAND *p = pSndFile->Patterns[m_nPattern], *prowbase;
- UINT nChn = (m_dwCursor & 0xFFFF) >> 3;
+ UINT nChn = GetChanFromCursor(m_dwCursor);
PrepareUndo(m_dwBeginSel, m_dwEndSel);
BYTE* activeNoteMap = isSplit ? splitActiveNoteChannel : activeNoteChannel;
@@ -3816,9 +3810,7 @@
if (!(CMainFrame::m_dwPatternSetup&PATTERN_KBDNOTEOFF ))
return;
- //Work out where to put the note off
- prowbase = p + m_nRow * pSndFile->m_nChannels;
- p=prowbase+nChn;
+ MODCOMMAND* p = pSndFile->Patterns[m_nPattern].GetpModCommand(m_nRow, nChn);
//don't overwrite:
if (p->note)
@@ -3863,15 +3855,11 @@
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- MODCOMMAND *p = pSndFile->Patterns[m_nPattern], *prowbase;
- MODCOMMAND oldcmd; // This is the command we are about to overwrite
- UINT nChn = (m_dwCursor & 0xFFFF) >> 3;
+ UINT nChn = GetChanFromCursor(m_dwCursor);
PrepareUndo(m_dwBeginSel, m_dwEndSel);
- // -- Work out where to put the new oct
- prowbase = p + m_nRow * pSndFile->m_nChannels;
- p = prowbase + nChn;
- oldcmd = *p;
+ MODCOMMAND* p = pSndFile->Patterns[m_nPattern].GetpModCommand(m_nRow, nChn);
+ MODCOMMAND oldcmd = *p; // This is the command we are about to overwrite
if (oldcmd.note)
TempEnterNote(((oldcmd.note-1)%12)+val*12+1);
}
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -844,6 +844,11 @@
/////////////////////////////////////////////////////////////////////////////////////////////
// CPatternPropertiesDlg
+BEGIN_MESSAGE_MAP(CPatternPropertiesDlg, CDialog)
+ ON_COMMAND(IDC_BUTTON_HALF, OnHalfRowNumber)
+ ON_COMMAND(IDC_BUTTON_DOUBLE, OnDoubleRowNumber)
+END_MESSAGE_MAP()
+
BOOL CPatternPropertiesDlg::OnInitDialog()
//----------------------------------------
{
@@ -871,13 +876,50 @@
wsprintf(s, "Pattern #%d:\x0d\x0a %d rows (%dK)",
m_nPattern,
pSndFile->PatternSize[m_nPattern],
- (pSndFile->PatternSize[m_nPattern] * pSndFile->m_nChannels * 6)/1024);
+ (pSndFile->PatternSize[m_nPattern] * pSndFile->m_nChannels * sizeof(MODCOMMAND))/1024);
SetDlgItemText(IDC_TEXT1, s);
}
return TRUE;
}
+void CPatternPropertiesDlg::OnHalfRowNumber()
+//-------------------------------------------
+{
+ CComboBox *combo;
+ CString str;
+ combo = (CComboBox *)GetDlgItem(IDC_COMBO1);
+ if(combo->GetCount() < 1) return;
+ if(combo->GetCurSel() == CB_ERR) combo->SetCurSel(0);
+
+ combo->GetLBText(combo->GetCurSel(), str);
+ int sel = atoi(str)/2;
+ combo->GetLBText(0, str);
+ const int row0 = atoi(str);
+ if(sel < row0) sel = row0;
+ combo->SetCurSel(sel - row0);
+}
+
+
+void CPatternPropertiesDlg::OnDoubleRowNumber()
+//---------------------------------------------
+{
+ CComboBox *combo;
+ CString str;
+ combo = (CComboBox *)GetDlgItem(IDC_COMBO1);
+ if(combo->GetCount() < 1) return;
+ if(combo->GetCurSel() == CB_ERR) combo->SetCurSel(0);
+
+ combo->GetLBText(combo->GetCurSel(), str);
+ int sel = 2*atoi(str);
+ combo->GetLBText(0, str);
+ const int row0 = atoi(str);
+ combo->GetLBText(combo->GetCount()-1, str);
+ if(sel > atoi(str)) sel = atoi(str);
+ combo->SetCurSel(sel - row0);
+}
+
+
void CPatternPropertiesDlg::OnOK()
//--------------------------------
{
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2008-01-29 21:00:25 UTC (rev 199)
@@ -159,6 +159,9 @@
protected:
virtual BOOL OnInitDialog();
virtual void OnOK();
+ afx_msg void OnHalfRowNumber();
+ afx_msg void OnDoubleRowNumber();
+ DECLARE_MESSAGE_MAP()
};
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2008-01-29 21:00:25 UTC (rev 199)
@@ -1239,6 +1239,8 @@
LTEXT "Pattern Info",IDC_TEXT1,10,36,95,25
DEFPUSHBUTTON "OK",IDOK,115,4,50,14
PUSHBUTTON "Cancel",IDCANCEL,115,22,50,14
+ PUSHBUTTON "/2",IDC_BUTTON_HALF,117,47,21,14
+ PUSHBUTTON "x2",IDC_BUTTON_DOUBLE,144,47,21,14
END
IDD_PATTERN_EDITCOMMAND DIALOGEX 0, 0, 214, 65
@@ -1945,7 +1947,7 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,17,2,50
+ FILEVERSION 1,17,2,51
PRODUCTVERSION 0,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@@ -1963,7 +1965,7 @@
BEGIN
VALUE "CompanyName", "Olivier Lapicque / OpenMPT team"
VALUE "FileDescription", "OpenMPT / ModPlug Tracker"
- VALUE "FileVersion", "1, 17, 2, 50"
+ VALUE "FileVersion", "1, 17, 2, 51"
VALUE "InternalName", "Modplug Tracker"
VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2007 GPL."
VALUE "LegalTrademarks", "M.O.D.P.L.U.G"
Modified: trunk/OpenMPT/mptrack/pattern.h
===================================================================
--- trunk/OpenMPT/mptrack/pattern.h 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/pattern.h 2008-01-29 21:00:25 UTC (rev 199)
@@ -31,8 +31,8 @@
//BEGIN: INTERFACE METHODS
public:
- MODCOMMAND* GetpModCommand(const UINT r, const UINT c) {return &m_ModCommands[r*GetNumChannels()+c];}
- const MODCOMMAND* GetpModCommand(const UINT r, const UINT c) const {return &m_ModCommands[r*GetNumChannels()+c];}
+ MODCOMMAND* GetpModCommand(const ROWINDEX r, const CHANNELINDEX c) {return &m_ModCommands[r*GetNumChannels()+c];}
+ const MODCOMMAND* GetpModCommand(const ROWINDEX r, const CHANNELINDEX c) const {return &m_ModCommands[r*GetNumChannels()+c];}
ROWINDEX GetNumRows() const {return m_Rows;}
Modified: trunk/OpenMPT/mptrack/patternContainer.cpp
===================================================================
--- trunk/OpenMPT/mptrack/patternContainer.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/patternContainer.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -6,10 +6,10 @@
int CPatternContainer::Insert(const ROWINDEX rows)
//---------------------------------------------
{
- size_t i = 0;
+ PATTERNINDEX i = 0;
for(i = 0; i<m_Patterns.size(); i++)
if(!m_Patterns[i]) break;
- if(Insert(static_cast<WORD>(i), rows))
+ if(Insert(i, rows))
return -1;
else return i;
@@ -20,7 +20,7 @@
//---------------------------------------------------------------
{
const CModSpecifications& specs = m_rSndFile.GetModSpecifications();
- if(index > m_Patterns.size() || rows > specs.patternRowsMax)
+ if(index >= specs.patternsMax || index > m_Patterns.size() || rows > specs.patternRowsMax)
return true;
if(index < m_Patterns.size() && m_Patterns[index])
return true;
@@ -75,3 +75,13 @@
m_Patterns.resize(newSize, MODPATTERN(*this));
}
}
+
+
+void CPatternContainer::OnModTypeChanged(const MODTYPE /*oldtype*/)
+//----------------------------------------------------------
+{
+ const CModSpecifications specs = m_rSndFile.GetModSpecifications();
+ if(specs.patternsMax < Size()) ResizeArray(max(MAX_PATTERNS, specs.patternsMax));
+ else if(Size() < MAX_PATTERNS) ResizeArray(MAX_PATTERNS);
+}
+
Modified: trunk/OpenMPT/mptrack/patternContainer.h
===================================================================
--- trunk/OpenMPT/mptrack/patternContainer.h 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/patternContainer.h 2008-01-29 21:00:25 UTC (rev 199)
@@ -54,6 +54,8 @@
void ResizeArray(const PATTERNINDEX newSize);
+ void OnModTypeChanged(const MODTYPE oldtype);
+
//END: INTERFACE METHODS
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/resource.h 2008-01-29 21:00:25 UTC (rev 199)
@@ -810,6 +810,8 @@
#define IDC_EDIT_FLAGS 2323
#define IDC_CHECKCAPTURE 2324
#define IDC_SPINMOVEMAPPING 2325
+#define IDC_BUTTON_HALF 2326
+#define IDC_BUTTON_DOUBLE 2327
#define ID_FILE_NEWMOD 32771
#define ID_FILE_NEWXM 32772
#define ID_FILE_NEWS3M 32773
@@ -1032,7 +1034,7 @@
#define ID_Menu59207 59207
#define ID_ENVELOPE_SCALEPOINTS 59208
#define ID_NETLINK_OPENMPTWIKI 59210
-#define ID_VIEW_MIDIMAPPING 59211
+#define ID_VIEW_MIDIMAPPING 59211
// Next default values for new objects
//
@@ -1041,7 +1043,7 @@
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 516
#define _APS_NEXT_COMMAND_VALUE 59212
-#define _APS_NEXT_CONTROL_VALUE 2326
+#define _APS_NEXT_CONTROL_VALUE 2328
#define _APS_NEXT_SYMED_VALUE 901
#endif
#endif
Modified: trunk/OpenMPT/mptrack/typedefs.h
===================================================================
--- trunk/OpenMPT/mptrack/typedefs.h 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/mptrack/typedefs.h 2008-01-29 21:00:25 UTC (rev 199)
@@ -39,6 +39,7 @@
typedef uint16 TEMPO;
typedef uint16 SAMPLEINDEX;
typedef uint16 INSTRUMENTINDEX;
+typedef uint32 MODTYPE;
const ORDERINDEX ORDERINDEX_MAX = (std::numeric_limits<ORDERINDEX>::max)();
const ROWINDEX ROWINDEX_MAX = (std::numeric_limits<ROWINDEX>::max)();
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -1105,13 +1105,14 @@
{
dwMemPos += LoadMixPlugins(lpStream+dwMemPos, dwMemLength-dwMemPos);
}
- // Checking for unused channels
+
//UINT npatterns = pifh->patnum;
UINT npatterns = patpos.size();
if (npatterns > GetModSpecifications().patternsMax)
npatterns = GetModSpecifications().patternsMax;
+ // Checking for unused channels
for (UINT patchk=0; patchk<npatterns; patchk++)
{
memset(chnmask, 0, sizeof(chnmask));
@@ -1331,6 +1332,8 @@
LoadExtendedSongProperties(GetType(), ptr, lpStream, mptStartPos);
}
+ Patterns.ResizeArray(max(MAX_PATTERNS, npatterns));
+
// Reading Patterns
for (UINT npat=0; npat<npatterns; npat++)
{
@@ -1338,8 +1341,10 @@
{
if(Patterns.Insert(npat, 64))
{
- MessageBox(NULL, "Error occured while loading file, error code 1101080209", "", MB_ICONERROR);
- return FALSE;
+ CString s;
+ s.Format("Allocating patterns failed starting from pattern %u", npat);
+ MessageBox(NULL, s, "", MB_ICONERROR);
+ break;
}
continue;
}
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2008-01-29 21:00:25 UTC (rev 199)
@@ -1534,11 +1534,11 @@
if(chnFrom == chnTo) return false;
if(chnFrom >= m_nChannels || chnTo >= m_nChannels)
{
- CString str = "Error: Bad move indexes in CSoundFile::MoveChannel(...)";
- CMainFrame::GetMainFrame()->MessageBox(str , "MoveChannel(...)", MB_OK | MB_ICONINFORMATION);
- return true;
+ CString str = "Error: Bad move indexes in CSoundFile::MoveChannel(...)";
+ CMainFrame::GetMainFrame()->MessageBox(str , "MoveChannel(...)", MB_OK | MB_ICONINFORMATION);
+ return true;
}
- std::vector<CHANNELINDEX> newOrder;
+ vector<CHANNELINDEX> newOrder;
//First creating new order identical to current order...
for(CHANNELINDEX i = 0; i<GetNumChannels(); i++)
{
@@ -2913,27 +2913,16 @@
//---------------------------------------------------
{
const MODTYPE oldtype = m_nType;
- const PATTERNINDEX oldInvalidIndex = Order.GetInvalidPatIndex();
- const PATTERNINDEX oldIgnoreIndex = Order.GetIgnoreIndex();
m_nType = newType;
SetModSpecsPointer(m_pModSpecs, m_nType);
m_ModFlags = m_ModFlags & GetModFlagMask(oldtype, newType);
-
- const CModSpecifications& specs = GetModSpecifications();
- if(specs.ordersMax < Order.size())
- {
- Order.resize(max(MAX_PATTERNS, specs.ordersMax));
- for(ORDERINDEX i = Order.size(); i>specs.ordersMax; --i) Order[i-1] = Order.GetInvalidPatIndex();
- }
- replace(Order.begin(), Order.end(), oldInvalidIndex, Order.GetInvalidPatIndex());
- replace(Order.begin(), Order.end(), oldIgnoreIndex, Order.GetIgnoreIndex());
- if(specs.patternsMax < Patterns.Size()) Patterns.ResizeArray(specs.patternsMax);
- else if(Patterns.Size() < MAX_PATTERNS) Patterns.ResizeArray(MAX_PATTERNS);
-
+ Order.OnModTypeChanged(oldtype);
+ Patterns.OnModTypeChanged(oldtype);
}
+
bool CSoundFile::SetTitle(const char* titleCandidate, size_t strSize)
//-------------------------------------------------------------------
{
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2008-01-29 21:00:25 UTC (rev 199)
@@ -819,7 +819,6 @@
const BYTE MSF_OLDVOLSWING = 1; //IT/MPT
const BYTE MSF_MIDICC_BUGEMULATION = 2; //IT/MPT/XM
-typedef UINT MODTYPE;
class CTuningCollection;
@@ -965,7 +964,7 @@
//Return the number of channels in the pattern. In 1.17.02.45
//it returned the number of channels with volume != 0
- CHANNELINDEX GetNumChannels() const {return static_cast<CHANNELINDEX>(m_nChannels);}
+ CHANNELINDEX GetNumChannels() const {return static_cast<CHANNELINDEX>(m_nChannels);}
BOOL SetMasterVolume(UINT vol, BOOL bAdjustAGC=FALSE);
UINT GetMasterVolume() const { return m_nMasterVolume; }
@@ -980,7 +979,7 @@
UINT GetMaxPosition() const;
IMixPlugin* GetInstrumentPlugin(INSTRUMENTINDEX instr);
- const CModSpecifications& GetModSpecifications() {return *m_pModSpecs;}
+ const CModSpecifications& GetModSpecifications() const {return *m_pModSpecs;}
static const CModSpecifications& GetModSpecifications(const MODTYPE type);
double GetCurrentBPM() const;
@@ -1013,7 +1012,7 @@
void CheckCPUUsage(UINT nCPU);
BOOL SetPatternName(UINT nPat, LPCSTR lpszName);
BOOL GetPatternName(UINT nPat, LPSTR lpszName, UINT cbSize=MAX_PATTERNNAME) const;
- CHANNELINDEX ReArrangeChannels(const std::vector<CHANNELINDEX>& fromToArray);
+ CHANNELINDEX ReArrangeChannels(const vector<CHANNELINDEX>& fromToArray);
bool MoveChannel(UINT chn_from, UINT chn_to);
bool InitChannel(UINT nch);
Modified: trunk/OpenMPT/soundlib/mod_specifications.h
===================================================================
--- trunk/OpenMPT/soundlib/mod_specifications.h 2008-01-26 20:02:01 UTC (rev 198)
+++ trunk/OpenMPT/soundlib/mod_specifications.h 2008-01-29 21:00:25 UTC (rev 199)
@@ -176,7 +176,7 @@
//TODO: Set correct values.
"it", //File extension
240, //Pattern max.
- 256, //Order max.
+ 200, //Order max.
4, //Channel min
64, //Channel max
32, //Min tempo
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2008-01-26 20:02:36
|
Revision: 198
http://modplug.svn.sourceforge.net/modplug/?rev=198&view=rev
Author: relabsoluness
Date: 2008-01-26 12:02:01 -0800 (Sat, 26 Jan 2008)
Log Message:
-----------
1.17.02.50
. Few improvements in the volume command handling for plugs
Modified Paths:
--------------
trunk/OpenMPT/mptrack/bin/mptrack.exe
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
Modified: trunk/OpenMPT/mptrack/bin/mptrack.exe
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2008-01-19 16:37:43 UTC (rev 197)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2008-01-26 20:02:01 UTC (rev 198)
@@ -276,8 +276,8 @@
{
p->ShowWindow(XMorITorMPT);
if(ITorMPT)
- p->SetWindowText("0: True to use various IT compatible playback changes\n"
- "1: True for old instrument random variation behavior\n"
+ p->SetWindowText("0: Various playback changes for IT compatibility\n"
+ "1: Old instrument random variation behavior\n"
"2: Plugin volume command bug emulation");
else if(XM) p->SetWindowText("0: Unused\n1: Unused\n2: Plugin volume command bug emulation");
}
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2008-01-19 16:37:43 UTC (rev 197)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2008-01-26 20:02:01 UTC (rev 198)
@@ -916,8 +916,8 @@
RTEXT "--",IDC_TEXT1,204,62,27,8
GROUPBOX "Pitch/Tempo Lock",IDC_STATIC,364,57,89,25
GROUPBOX "Sample Map",IDC_STATIC,461,27,62,141
- CTEXT "Note Velocity style",IDC_STATIC,374,101,77,10,
- SS_CENTERIMAGE,WS_EX_STATICEDGE
+ CTEXT "Note Velocity",IDC_STATIC,374,101,77,10,SS_CENTERIMAGE,
+ WS_EX_STATICEDGE
CTEXT "Volume command effect",IDC_STATIC,374,133,77,10,
SS_CENTERIMAGE,WS_EX_STATICEDGE
GROUPBOX "Tuning (experimental)",IDC_STATIC,364,28,92,28
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2008-01-19 16:37:43 UTC (rev 197)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2008-01-26 20:02:01 UTC (rev 198)
@@ -300,7 +300,7 @@
memset(Headers[iIns], 0, sizeof(INSTRUMENTHEADER));
Headers[iIns]->pTuning = m_defaultInstrument.pTuning;
Headers[iIns]->nPluginVelocityHandling = PLUGIN_VELOCITYHANDLING_CHANNEL;
- Headers[iIns]->nPluginVolumeHandling = PLUGIN_VOLUMEHANDLING_MIDI;
+ Headers[iIns]->nPluginVolumeHandling = PLUGIN_VOLUMEHANDLING_IGNORE;
memcpy(Headers[iIns]->name, pih->name, 22);
if ((nsamples = pih->samples) > 0)
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2008-01-19 16:37:43 UTC (rev 197)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2008-01-26 20:02:01 UTC (rev 198)
@@ -2736,7 +2736,7 @@
m_defaultInstrument.nVolEnvReleaseNode=ENV_RELEASE_NODE_UNSET;
m_defaultInstrument.wPitchToTempoLock = 0;
m_defaultInstrument.pTuning = m_defaultInstrument.s_DefaultTuning;
- m_defaultInstrument.nPluginVelocityHandling = PLUGIN_VELOCITYHANDLING_VOLUME;
+ m_defaultInstrument.nPluginVelocityHandling = PLUGIN_VELOCITYHANDLING_CHANNEL;
m_defaultInstrument.nPluginVolumeHandling = PLUGIN_VOLUMEHANDLING_DRYWET;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2008-01-19 16:37:49
|
Revision: 197
http://modplug.svn.sourceforge.net/modplug/?rev=197&view=rev
Author: relabsoluness
Date: 2008-01-19 08:37:43 -0800 (Sat, 19 Jan 2008)
Log Message:
-----------
Projectfile update
Modified Paths:
--------------
trunk/OpenMPT/mptrack/mptrack.vcproj
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2008-01-14 21:38:20 UTC (rev 196)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2008-01-19 16:37:43 UTC (rev 197)
@@ -499,9 +499,6 @@
RelativePath="..\soundlib\Load_mod.cpp">
</File>
<File
- RelativePath="..\soundlib\load_mptm.cpp">
- </File>
- <File
RelativePath="..\Soundlib\load_mt2.cpp">
</File>
<File
@@ -541,6 +538,9 @@
RelativePath=".\MainFrm.cpp">
</File>
<File
+ RelativePath=".\MIDIMappingDialog.cpp">
+ </File>
+ <File
RelativePath=".\misc_util.cpp">
</File>
<File
@@ -574,9 +574,6 @@
RelativePath=".\mpt_midi.cpp">
</File>
<File
- RelativePath="..\soundlib\MPT_module.cpp">
- </File>
- <File
RelativePath=".\mptrack.cpp">
</File>
<File
@@ -986,6 +983,9 @@
RelativePath=".\MainFrm.h">
</File>
<File
+ RelativePath=".\MIDIMappingDialog.h">
+ </File>
+ <File
RelativePath=".\misc_util.h">
</File>
<File
@@ -1010,9 +1010,6 @@
RelativePath=".\Mpdlgs.h">
</File>
<File
- RelativePath="..\soundlib\MPT_module.h">
- </File>
- <File
RelativePath=".\mptrack.h">
</File>
<File
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Phanoo T. B. <the...@gm...> - 2008-01-18 00:22:13
|
hello I succeeded to compile OpenMPT, I've modified the mptrack.vcproj file to add and remove some links into ( relabsoluness has forgotten to modify it...). When I try to upload the new mptrack.vcproj, totoiseSVN ask me for a username and a password. How I can upload the file ? thanks sorry for my english, I'm french |
|
From: <rel...@us...> - 2008-01-14 21:39:42
|
Revision: 196
http://modplug.svn.sourceforge.net/modplug/?rev=196&view=rev
Author: relabsoluness
Date: 2008-01-14 13:38:20 -0800 (Mon, 14 Jan 2008)
Log Message:
-----------
/ MIDICC bug related compatibility improvement for loading old IT/MPTm files.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2008-01-12 16:49:50 UTC (rev 195)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2008-01-14 21:38:20 UTC (rev 196)
@@ -272,7 +272,7 @@
long returnVal=0;
penv->pTuning = m_defaultInstrument.pTuning;
penv->nPluginVelocityHandling = PLUGIN_VELOCITYHANDLING_CHANNEL;
- penv->nPluginVolumeHandling = PLUGIN_VOLUMEHANDLING_MIDI;
+ penv->nPluginVolumeHandling = PLUGIN_VOLUMEHANDLING_IGNORE;
if (trkvers < 0x0200)
{
const ITOLDINSTRUMENT *pis = (const ITOLDINSTRUMENT *)p;
@@ -446,6 +446,8 @@
penv->nPanSwing = pis->rp;
penv->nPan = (pis->dfp & 0x7F) << 2;
SetDefaultInstrumentValues(penv);
+ penv->nPluginVelocityHandling = PLUGIN_VELOCITYHANDLING_CHANNEL;
+ penv->nPluginVolumeHandling = PLUGIN_VOLUMEHANDLING_IGNORE;
if (penv->nPan > 256) penv->nPan = 128;
if (pis->dfp < 0x80) penv->dwFlags |= ENV_SETPANNING;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Rel...@us...> - 2008-01-12 16:49:54
|
Revision: 195
http://modplug.svn.sourceforge.net/modplug/?rev=195&view=rev
Author: Relabsoluness
Date: 2008-01-12 08:49:50 -0800 (Sat, 12 Jan 2008)
Log Message:
-----------
+ MIDI controller mapping to plug params.
+ Ability to take MIDI volume into account when playing notes.
+ Ability to pass MIDI to plug.
+ Ability to start/continue/stop play with certain MIDI messages (untested)
+ Ability to choose how volume commands behave for plugs.
. Fixed sending wrong MIDI message in ::MidiCC.
+ Keyshortcuts for preset navigation jumps in VST editor.
. Default VST editor preset field name validation in the menubar.
+ Added ability to edit various flags in song properties.
. Fix for pattern duplicate for small patterns (http://lpchip.com/modplug/viewtopic.php?t=1747)
. Fixed song properties-menu entry in mainframe(was grayed and didn't show keyshortcut)
. Fixed crash with certain toolbar related ini-settings (http://lpchip.com/modplug/viewtopic.php?t=2033)
. Further fixes to prevent unnotified overwriting of file.
/ .bak-files won't now be shown with "All modules" filter when loading modules.
. Show row playtime didn't on certain cases work on first pattern row (http://lpchip.com/modplug/viewtopic.php?t=2044)
. Fix to faulty play with certain instruments without notes in IT compatible playmode (http://lpchip.com/modplug/viewtopic.php?t=2080)
. Pattern number box didn't open pattern properties when using MPTm. (http://lpchip.com/modplug/viewtopic.php?t=2073)
. Fixed wrong MIDI CC names in macro editor.
./ 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)
/ MPTm made with this version will be recognized as IT in earlier versions.
/ Merged MPTm loading/saving function to that of IT.
/ Various validity checks for read data in ITP loading.
/ Removed unused files from the include directory.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
trunk/OpenMPT/mptrack/AutoSaver.cpp
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/CommandSet.h
trunk/OpenMPT/mptrack/Ctrl_gen.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.h
trunk/OpenMPT/mptrack/Ctrl_pat.cpp
trunk/OpenMPT/mptrack/Ctrl_seq.cpp
trunk/OpenMPT/mptrack/InputHandler.cpp
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mainbar.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/Mpdlgs.cpp
trunk/OpenMPT/mptrack/Mpt_midi.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
trunk/OpenMPT/mptrack/OrderToPatternTable.cpp
trunk/OpenMPT/mptrack/OrderToPatternTable.h
trunk/OpenMPT/mptrack/Stdafx.h
trunk/OpenMPT/mptrack/View_gen.cpp
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/View_tre.cpp
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/mod2midi.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/pattern.cpp
trunk/OpenMPT/mptrack/pattern.h
trunk/OpenMPT/mptrack/patternContainer.cpp
trunk/OpenMPT/mptrack/patternContainer.h
trunk/OpenMPT/mptrack/res/img_list.bmp
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/mptrack/typedefs.h
trunk/OpenMPT/soundlib/LOAD_AMF.CPP
trunk/OpenMPT/soundlib/Load_ams.cpp
trunk/OpenMPT/soundlib/Load_far.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_mid.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/Snd_flt.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
trunk/OpenMPT/soundlib/midi.h
trunk/OpenMPT/soundlib/mod_specifications.h
Added Paths:
-----------
trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp
trunk/OpenMPT/mptrack/MIDIMappingDialog.h
Removed Paths:
-------------
trunk/OpenMPT/include/3DL2.H
trunk/OpenMPT/include/3DL2HELP.H
trunk/OpenMPT/include/AudioEffect.cpp
trunk/OpenMPT/include/AudioEffect.hpp
trunk/OpenMPT/include/MachineInterface.h
trunk/OpenMPT/include/audioeffectx.cpp
trunk/OpenMPT/include/audioeffectx.h
trunk/OpenMPT/soundlib/MPT_module.cpp
trunk/OpenMPT/soundlib/MPT_module.h
trunk/OpenMPT/soundlib/load_mptm.cpp
Deleted: trunk/OpenMPT/include/3DL2.H
===================================================================
--- trunk/OpenMPT/include/3DL2.H 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/3DL2.H 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,227 +0,0 @@
-// 3DL2.H
-//
-
-#ifndef _3DL2_H_INCLUDED
-#define _3DL2_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-#pragma pack(push, 4)
-
-// I3DL2 listener property set {DA0F0520-300A-11D3-8A2B-0060970DB011}
-DEFINE_GUID(DSPROPSETID_I3DL2_ListenerProperties,
- 0xDA0F0520,
- 0x300A,
- 0x11D3,
- 0x8A, 0x2B, 0x00, 0x60, 0x97, 0x0D, 0xB0, 0x11);
-
-typedef enum
-{
-// sets all I3DL2 listener properties
- DSPROPERTY_I3DL2LISTENER_ALL,
-// room effect level at low frequencies
- DSPROPERTY_I3DL2LISTENER_ROOM,
-// room effect high-frequency level re. low frequency level
- DSPROPERTY_I3DL2LISTENER_ROOMHF,
-// like DS3D flRolloffFactor but for room effect
- DSPROPERTY_I3DL2LISTENER_ROOMROLLOFFFACTOR,
-// reverberation decay time at low-frequencies
- DSPROPERTY_I3DL2LISTENER_DECAYTIME,
-// high-frequency to low-frequency decay time ratio
- DSPROPERTY_I3DL2LISTENER_DECAYHFRATIO,
-// early reflections level relative to room effect
- DSPROPERTY_I3DL2LISTENER_REFLECTIONS,
-// delay time of first reflection
- DSPROPERTY_I3DL2LISTENER_REFLECTIONSDELAY,
-// late reverberation level relative to room effect
- DSPROPERTY_I3DL2LISTENER_REVERB,
-// late reverberation delay time relative to first reflection
- DSPROPERTY_I3DL2LISTENER_REVERBDELAY,
-// reverberation diffusion (echo density)
- DSPROPERTY_I3DL2LISTENER_DIFFUSION,
-// reverberation density (modal density)
- DSPROPERTY_I3DL2LISTENER_DENSITY,
-// reference high frequency
- DSPROPERTY_I3DL2LISTENER_HFREFERENCE
-} DSPROPERTY_I3DL2_LISTENERPROPERTY;
-
-// use this structure for DSPROPERTY_I3DL2LISTENER_ALL
-// - all levels are hundredths of decibels (mB)
-// - all times are in seconds (s)
-typedef struct _I3DL2_LISTENERPROPERTIES
-{
- LONG lRoom; // [-10000, 0] default: -10000 mB
- LONG lRoomHF; // [-10000, 0] default: 0 mB
- FLOAT flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
- FLOAT flDecayTime; // [0.1, 20.0] default: 1.0 s
- FLOAT flDecayHFRatio; // [0.1, 2.0] default: 0.5
- LONG lReflections; // [-10000, 1000] default: -10000 mB
- FLOAT flReflectionsDelay; // [0.0, 0.3] default: 0.02 s
- LONG lReverb; // [-10000, 2000] default: -10000 mB
- FLOAT flReverbDelay; // [0.0, 0.1] default: 0.04 s
- FLOAT flDiffusion; // [0.0, 100.0] default: 100.0 %
- FLOAT flDensity; // [0.0, 100.0] default: 100.0 %
- FLOAT flHFReference; // [20.0, 20000.0] default: 5000.0 Hz
-} I3DL2_LISTENERPROPERTIES, *LPI3DL2_LISTENERPROPERTIES;
-
-// property ranges and defaults:
-
-#define I3DL2LISTENER_MINROOM (-10000)
-#define I3DL2LISTENER_MAXROOM 0
-#define I3DL2LISTENER_DEFAULTROOM (-10000)
-
-#define I3DL2LISTENER_MINROOMHF (-10000)
-#define I3DL2LISTENER_MAXROOMHF 0
-#define I3DL2LISTENER_DEFAULTROOMHF 0
-
-#define I3DL2LISTENER_MINROOMROLLOFFFACTOR 0.0f
-#define I3DL2LISTENER_MAXROOMROLLOFFFACTOR 10.0f
-#define I3DL2LISTENER_DEFAULTROOMROLLOFFFACTOR 0.0f
-
-#define I3DL2LISTENER_MINDECAYTIME 0.1f
-#define I3DL2LISTENER_MAXDECAYTIME 20.0f
-#define I3DL2LISTENER_DEFAULTDECAYTIME 1.0f
-
-#define I3DL2LISTENER_MINDECAYHFRATIO 0.1f
-#define I3DL2LISTENER_MAXDECAYHFRATIO 2.0f
-#define I3DL2LISTENER_DEFAULTDECAYHFRATIO 0.5f
-
-#define I3DL2LISTENER_MINREFLECTIONS (-10000)
-#define I3DL2LISTENER_MAXREFLECTIONS 1000
-#define I3DL2LISTENER_DEFAULTREFLECTIONS (-10000)
-
-#define I3DL2LISTENER_MINREFLECTIONSDELAY 0.0f
-#define I3DL2LISTENER_MAXREFLECTIONSDELAY 0.3f
-#define I3DL2LISTENER_DEFAULTREFLECTIONSDELAY 0.02f
-
-#define I3DL2LISTENER_MINREVERB (-10000)
-#define I3DL2LISTENER_MAXREVERB 2000
-#define I3DL2LISTENER_DEFAULTREVERB (-10000)
-
-#define I3DL2LISTENER_MINREVERBDELAY 0.0f
-#define I3DL2LISTENER_MAXREVERBDELAY 0.1f
-#define I3DL2LISTENER_DEFAULTREVERBDELAY 0.04f
-
-#define I3DL2LISTENER_MINDIFFUSION 0.0f
-#define I3DL2LISTENER_MAXDIFFUSION 100.0f
-#define I3DL2LISTENER_DEFAULTDIFFUSION 100.0f
-
-#define I3DL2LISTENER_MINDENSITY 0.0f
-#define I3DL2LISTENER_MAXDENSITY 100.0f
-#define I3DL2LISTENER_DEFAULTDENSITY 100.0f
-
-#define I3DL2LISTENER_MINHFREFERENCE 20.0f
-#define I3DL2LISTENER_MAXHFREFERENCE 20000.0f
-#define I3DL2LISTENER_DEFAULTHFREFERENCE 5000.0f
-
-// I3DL2 buffer property set {DA0F0521-300A-11D3-8A2B-0060970DB011}
-DEFINE_GUID(DSPROPSETID_I3DL2_BufferProperties,
- 0xDA0F0521,
- 0x300A,
- 0x11D3,
- 0x8A, 0x2B, 0x00, 0x60, 0x97, 0x0D, 0xB0, 0x11);
-
-typedef enum
-{
-// sets all I3DL2 buffer properties
- DSPROPERTY_I3DL2BUFFER_ALL,
-// sets both obstruction properties
- DSPROPERTY_I3DL2BUFFER_OBSTRUCTIONALL,
-// sets both occlusion properties
- DSPROPERTY_I3DL2BUFFER_OCCLUSIONALL,
-// additional direct path level correction
- DSPROPERTY_I3DL2BUFFER_DIRECT,
-// additional direct path high-frequency re. low-frequency level correction
- DSPROPERTY_I3DL2BUFFER_DIRECTHF,
-// additional room effect level correction
- DSPROPERTY_I3DL2BUFFER_ROOM,
-// additional room effect high-frequency re. low-frequency level correction
- DSPROPERTY_I3DL2BUFFER_ROOMHF,
-// like DS3D flRolloffFactor but for room effect
- DSPROPERTY_I3DL2BUFFER_ROOMROLLOFFFACTOR,
-// main obstruction control (attenuation at high frequencies)
- DSPROPERTY_I3DL2BUFFER_OBSTRUCTION,
-// obstruction low-frequency re. high-frequency ratio
- DSPROPERTY_I3DL2BUFFER_OBSTRUCTIONLFRATIO,
-// main occlusion control (attenuation at high frequencies)
- DSPROPERTY_I3DL2BUFFER_OCCLUSION,
-// occlusion low-frequency re. high-frequency ratio
- DSPROPERTY_I3DL2BUFFER_OCCLUSIONLFRATIO
-} DSPROPERTY_I3DL2_BUFFERPROPERTY;
-
-// use this structure for DSPROPERTY_I3DL2BUFFER_OBSTRUCTIONALL
-// - all levels are hundredths of decibels (mB)
-typedef struct _I3DL2_OBSTRUCTIONPROPERTIES
-{
- LONG lHFLevel; // [-10000, 0] default: 0 mB
- FLOAT flLFRatio; // [0.0, 1.0] default: 0.0
-} I3DL2_OBSTRUCTIONPROPERTIES, *LPI3DL2_OBSTRUCTIONPROPERTIES;
-
-// use this structure for DSPROPERTY_I3DL2BUFFER_OCCLUSIONALL
-// - all levels are hundredths of decibels (mB)
-typedef struct _I3DL2_OCCLUSIONPROPERTIES
-{
- LONG lHFLevel; // [-10000, 0] default: 0 mB
- FLOAT flLFRatio; // [0.0, 1.0] default: 0.25
-} I3DL2_OCCLUSIONPROPERTIES, *LPI3DL2_OCCLUSIONPROPERTIES;
-
-// use this structure for DSPROPERTY_I3DL2BUFFER_ALL
-// - all levels are hundredths of decibels (mB)
-typedef struct _I3DL2_BUFFERPROPERTIES
-{
- LONG lDirect; // [-10000, 1000] default: 0 mB
- LONG lDirectHF; // [-10000, 0] default: 0 mB
- LONG lRoom; // [-10000, 1000] default: 0 mB
- LONG lRoomHF; // [-10000, 0] default: 0 mB
- FLOAT flRoomRolloffFactor; // [0.0, 10.0] default: 0.0
- I3DL2_OBSTRUCTIONPROPERTIES Obstruction;
- I3DL2_OCCLUSIONPROPERTIES Occlusion;
-} I3DL2_BUFFERPROPERTIES, *LPI3DL2_BUFFERPROPERTIES;
-
-// property ranges and defaults:
-
-#define I3DL2BUFFER_MINDIRECT (-10000)
-#define I3DL2BUFFER_MAXDIRECT 1000
-#define I3DL2BUFFER_DEFAULTDIRECT 0
-
-#define I3DL2BUFFER_MINDIRECTHF (-10000)
-#define I3DL2BUFFER_MAXDIRECTHF 0
-#define I3DL2BUFFER_DEFAULTDIRECTHF 0
-
-#define I3DL2BUFFER_MINROOM (-10000)
-#define I3DL2BUFFER_MAXROOM 1000
-#define I3DL2BUFFER_DEFAULTROOM 0
-
-#define I3DL2BUFFER_MINROOMHF (-10000)
-#define I3DL2BUFFER_MAXROOMHF 0
-#define I3DL2BUFFER_DEFAULTROOMHF 0
-
-#define I3DL2BUFFER_MINROOMROLLOFFFACTOR 0.0f
-#define I3DL2BUFFER_MAXROOMROLLOFFFACTOR 10.f
-#define I3DL2BUFFER_DEFAULTROOMROLLOFFFACTOR 0.0f
-
-#define I3DL2BUFFER_MINOBSTRUCTION (-10000)
-#define I3DL2BUFFER_MAXOBSTRUCTION 0
-#define I3DL2BUFFER_DEFAULTOBSTRUCTION 0
-
-#define I3DL2BUFFER_MINOBSTRUCTIONLFRATIO 0.0f
-#define I3DL2BUFFER_MAXOBSTRUCTIONLFRATIO 1.0f
-#define I3DL2BUFFER_DEFAULTOBSTRUCTIONLFRATIO 0.0f
-
-#define I3DL2BUFFER_MINOCCLUSION (-10000)
-#define I3DL2BUFFER_MAXOCCLUSION 0
-#define I3DL2BUFFER_DEFAULTOCCLUSION 0
-
-#define I3DL2BUFFER_MINOCCLUSIONLFRATIO 0.0f
-#define I3DL2BUFFER_MAXOCCLUSIONLFRATIO 1.0f
-#define I3DL2BUFFER_DEFAULTOCCLUSIONLFRATIO 0.25f
-
-#pragma pack(pop)
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#endif
Deleted: trunk/OpenMPT/include/3DL2HELP.H
===================================================================
--- trunk/OpenMPT/include/3DL2HELP.H 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/3DL2HELP.H 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,102 +0,0 @@
-// 3DL2HELP.H
-//
-
-#ifndef _3DL2HELP_H_INCLUDED
-#define _3DL2HELP_H_INCLUDED
-
-// Example listener environment presets
-// for use with DSPROPERTY_I3DL2LISTENER_ALL.
-// Each array contains 12 values whose order and types are defined
-// by structure I3DL2_LISTENERPROPERTIES (defined in 3DL2.H).
-
-#define I3DL2_ENVIRONMENT_PRESET_DEFAULT \
--10000, 0,0.0f, 1.00f,0.50f,-10000,0.020f,-10000,0.040f,100.0f,100.0f,5000.0f
-
-#define I3DL2_ENVIRONMENT_PRESET_GENERIC \
- -1000, -100,0.0f, 1.49f,0.83f, -2602,0.007f, 200,0.011f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \
- -1000,-6000,0.0f, 0.17f,0.10f, -1204,0.001f, 207,0.002f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_ROOM \
- -1000, -454,0.0f, 0.40f,0.83f, -1646,0.002f, 53,0.003f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_BATHROOM \
- -1000,-1200,0.0f, 1.49f,0.54f, -370,0.007f, 1030,0.011f,100.0f, 60.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \
- -1000,-6000,0.0f, 0.50f,0.10f, -1376,0.003f, -1104,0.004f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_STONEROOM \
- -1000, -300,0.0f, 2.31f,0.64f, -711,0.012f, 83,0.017f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \
- -1000, -476,0.0f, 4.32f,0.59f, -789,0.020f, -289,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \
- -1000, -500,0.0f, 3.92f,0.70f, -1230,0.020f, -2,0.029f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_CAVE \
- -1000, 0,0.0f, 2.91f,1.30f, -602,0.015f, -302,0.022f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_ARENA \
- -1000, -698,0.0f, 7.24f,0.33f, -1166,0.020f, 16,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_HANGAR \
- -1000,-1000,0.0f,10.05f,0.23f, -602,0.020f, 198,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \
- -1000,-4000,0.0f, 0.30f,0.10f, -1831,0.002f, -1630,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_HALLWAY \
- -1000, -300,0.0f, 1.49f,0.59f, -1219,0.007f, 441,0.011f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \
- -1000, -237,0.0f, 2.70f,0.79f, -1214,0.013f, 395,0.020f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_ALLEY \
- -1000, -270,0.0f, 1.49f,0.86f, -1204,0.007f, -4,0.011f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_FOREST \
- -1000,-3300,0.0f, 1.49f,0.54f, -2560,0.162f, -613,0.088f, 79.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_CITY \
- -1000, -800,0.0f, 1.49f,0.67f, -2273,0.007f, -2217,0.011f, 50.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \
- -1000,-2500,0.0f, 1.49f,0.21f, -2780,0.300f, -2014,0.100f, 27.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_QUARRY \
- -1000,-1000,0.0f, 1.49f,0.83f,-10000,0.061f, 500,0.025f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_PLAIN \
- -1000,-2000,0.0f, 1.49f,0.50f, -2466,0.179f, -2514,0.100f, 21.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \
- -1000, 0,0.0f, 1.65f,1.50f, -1363,0.008f, -1153,0.012f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \
- -1000,-1000,0.0f, 2.81f,0.14f, 429,0.014f, 648,0.021f, 80.0f, 60.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_UNDERWATER \
- -1000,-4000,0.0f, 1.49f,0.10f, -449,0.007f, 1700,0.011f,100.0f,100.0f,5000.0f
-
-// Examples simulating General MIDI 2'musical' reverb presets
-//
-// Name (Decay time) Description
-//
-// Small Room (1.1s) A small size room with a length of 5m or so.
-// Medium Room (1.3s) A medium size room with a length of 10m or so.
-// Large Room (1.5s) A large size room suitable for live performances.
-// Medium Hall (1.8s) A medium size concert hall.
-// Large Hall (1.8s) A large size concert hall suitable for a full orchestra.
-// Plate (1.3s) A plate reverb simulation.
-
-#define I3DL2_ENVIRONMENT_PRESET_SMALLROOM \
- -1000, -600,0.0f, 1.10f,0.83f, -400,0.005f, 500,0.010f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \
- -1000, -600,0.0f, 1.30f,0.83f, -1000,0.010f, -200,0.020f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_LARGEROOM \
- -1000, -600,0.0f, 1.50f,0.83f, -1600,0.020f, -1000,0.040f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \
- -1000, -600,0.0f, 1.80f,0.70f, -1300,0.015f, -800,0.030f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_LARGEHALL \
- -1000, -600,0.0f, 1.80f,0.70f, -2000,0.030f, -1400,0.060f,100.0f,100.0f,5000.0f
-#define I3DL2_ENVIRONMENT_PRESET_PLATE \
- -1000, -200,0.0f, 1.30f,0.90f, 0,0.002f, 0,0.010f,100.0f, 75.0f,5000.0f
-
-// Example material transmission presets
-// for use with DSPROPERTY_I3DL2BUFFER_OCCLUSIONALL
-// or DSPROPERTY_I3DL2BUFFER_OBSTRUCTIONALL.
-// Each array contains 2 values whose order and types are defined
-// by structure I3DL2_OCCLUSIONPROPERTIES
-// or I3DL2_OBSTRUCTIONPROPERTIES (defined in 3DL2.H).
-
-#define I3DL2_MATERIAL_PRESET_SINGLEWINDOW -2800,0.71f
-#define I3DL2_MATERIAL_PRESET_DOUBLEWINDOW -5000,0.40f
-#define I3DL2_MATERIAL_PRESET_THINDOOR -1800,0.66f
-#define I3DL2_MATERIAL_PRESET_THICKDOOR -4400,0.64f
-#define I3DL2_MATERIAL_PRESET_WOODWALL -4000,0.50f
-#define I3DL2_MATERIAL_PRESET_BRICKWALL -5000,0.60f
-#define I3DL2_MATERIAL_PRESET_STONEWALL -6000,0.68f
-#define I3DL2_MATERIAL_PRESET_CURTAIN -1200,0.15f
-
-#endif
Deleted: trunk/OpenMPT/include/AudioEffect.cpp
===================================================================
--- trunk/OpenMPT/include/AudioEffect.cpp 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/AudioEffect.cpp 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,393 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// VST Plug-Ins SDK
-// Version 1.0
-// \xA9 2003 Steinberg Media Technologies, All Rights Reserved
-//
-// you should not have to edit this file
-// use override methods instead
-//-------------------------------------------------------------------------------------------------------
-
-#include <stddef.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-
-#ifndef __AudioEffect__
-#include "AudioEffect.hpp"
-#endif
-
-#ifndef __AEffEditor__
-#include "AEffEditor.hpp"
-#endif
-
-//-------------------------------------------------------------------------------------------------------
-long dispatchEffectClass (AEffect *e, long opCode, long index, long value, void *ptr, float opt)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
-
- if (opCode == effClose)
- {
- ae->dispatcher (opCode, index, value, ptr, opt);
- delete ae;
- return 1;
- }
-
- return ae->dispatcher (opCode, index, value, ptr, opt);
-}
-
-//-------------------------------------------------------------------------------------------------------
-float getParameterClass (AEffect *e, long index)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
- return ae->getParameter (index);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void setParameterClass (AEffect *e, long index, float value)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
- ae->setParameter (index, value);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void processClass (AEffect *e, float **inputs, float **outputs, long sampleFrames)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
- ae->process (inputs, outputs, sampleFrames);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void processClassReplacing (AEffect *e, float **inputs, float **outputs, long sampleFrames)
-{
- AudioEffect *ae = (AudioEffect*)(e->object);
- ae->processReplacing (inputs, outputs, sampleFrames);
-}
-
-
-//-------------------------------------------------------------------------------------------------------
-// AudioEffect Implementation
-//-------------------------------------------------------------------------------------------------------
-
-//-------------------------------------------------------------------------------------------------------
-AudioEffect::AudioEffect (audioMasterCallback audioMaster, long numPrograms, long numParams)
-{
- this->audioMaster = audioMaster;
- editor = 0;
- this->numPrograms = numPrograms;
- this->numParams = numParams;
- curProgram = 0;
-
- memset(&cEffect, 0, sizeof (cEffect));
- cEffect.magic = kEffectMagic;
- cEffect.dispatcher = dispatchEffectClass;
- cEffect.process = processClass;
- cEffect.setParameter = setParameterClass;
- cEffect.getParameter = getParameterClass;
- cEffect.numPrograms = numPrograms;
- cEffect.numParams = numParams;
- cEffect.numInputs = 1;
- cEffect.numOutputs = 2;
- cEffect.flags = 0;
- cEffect.resvd1 = 0;
- cEffect.resvd2 = 0;
- cEffect.initialDelay = 0;
- cEffect.realQualities = 0;
- cEffect.offQualities = 0;
- cEffect.ioRatio = 1.f;
- cEffect.object = this;
- cEffect.user = 0;
- cEffect.uniqueID = CCONST ('N', 'o', 'E', 'f'); // you must set this!
- cEffect.version = 1;
- cEffect.processReplacing = processClassReplacing;
-
- sampleRate = 44100.f;
- blockSize = 1024L;
-}
-
-//-------------------------------------------------------------------------------------------------------
-AudioEffect::~AudioEffect ()
-{
- if (editor)
- delete editor;
-}
-
-//-------------------------------------------------------------------------------------------------------
-long AudioEffect::dispatcher (long opCode, long index, long value, void *ptr, float opt)
-{
- long v = 0;
-
- switch (opCode)
- {
- case effOpen: open (); break;
- case effClose: close (); break;
- case effSetProgram: if (value < numPrograms) setProgram (value); break;
- case effGetProgram: v = getProgram (); break;
- case effSetProgramName: setProgramName ((char *)ptr); break;
- case effGetProgramName: getProgramName ((char *)ptr); break;
- case effGetParamLabel: getParameterLabel (index, (char *)ptr); break;
- case effGetParamDisplay: getParameterDisplay (index, (char *)ptr); break;
- case effGetParamName: getParameterName (index, (char *)ptr); break;
-
- case effSetSampleRate: setSampleRate (opt); break;
- case effSetBlockSize: setBlockSize (value); break;
- case effMainsChanged: if (!value) suspend (); else resume (); break;
- case effGetVu: v = (long)(getVu () * 32767.); break;
-
-
- // Editor
- case effEditGetRect: if (editor) v = editor->getRect ((ERect **)ptr); break;
- case effEditOpen: if (editor) v = editor->open (ptr); break;
- case effEditClose: if (editor) editor->close (); break;
- case effEditIdle: if (editor) editor->idle (); break;
-
- #if MAC
- case effEditDraw: if (editor) editor->draw ((ERect *)ptr); break;
- case effEditMouse: if (editor) v = editor->mouse (index, value); break;
- case effEditKey: if (editor) v = editor->key (value); break;
- case effEditTop: if (editor) editor->top (); break;
- case effEditSleep: if (editor) editor->sleep (); break;
- #endif
-
- case effIdentify: v = CCONST ('N', 'v', 'E', 'f'); break;
- case effGetChunk: v = getChunk ((void**)ptr, index ? true : false); break;
- case effSetChunk: v = setChunk (ptr, value, index ? true : false); break;
- }
- return v;
-}
-
-//-------------------------------------------------------------------------------------------------------
-long AudioEffect::getMasterVersion ()
-{
- long version = 1;
- if (audioMaster)
- {
- version = audioMaster (&cEffect, audioMasterVersion, 0, 0, 0, 0);
- if (!version) // old
- version = 1;
- }
- return version;
-}
-
-//-------------------------------------------------------------------------------------------------------
-long AudioEffect::getCurrentUniqueId ()
-{
- long id = 0;
- if (audioMaster)
- id = audioMaster (&cEffect, audioMasterCurrentId, 0, 0, 0, 0);
- return id;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::masterIdle ()
-{
- if (audioMaster)
- audioMaster (&cEffect, audioMasterIdle, 0, 0, 0, 0);
-}
-
-//-------------------------------------------------------------------------------------------------------
-bool AudioEffect::isInputConnected (long input)
-{
- long ret = 0;
- if (audioMaster)
- ret = audioMaster (&cEffect, audioMasterPinConnected, input, 0, 0, 0);
- return ret ? false : true; // return value is 0 for true
-}
-
-//-------------------------------------------------------------------------------------------------------
-bool AudioEffect::isOutputConnected (long output)
-{
- long ret = 0;
- if (audioMaster)
- ret = audioMaster (&cEffect, audioMasterPinConnected, output, 1, 0, 0);
- return ret ? false : true; // return value is 0 for true
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::setParameterAutomated (long index, float value)
-{
- setParameter (index, value);
- if (audioMaster)
- audioMaster (&cEffect, audioMasterAutomate, index, 0, 0, value); // value is in opt
-}
-
-//-------------------------------------------------------------------------------------------------------
-// Flags
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::hasVu (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsHasVu;
- else
- cEffect.flags &= ~effFlagsHasVu;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::hasClip (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsHasClip;
- else
- cEffect.flags &= ~effFlagsHasClip;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::canMono (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsCanMono;
- else
- cEffect.flags &= ~effFlagsCanMono;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::canProcessReplacing (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsCanReplacing;
- else
- cEffect.flags &= ~effFlagsCanReplacing;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::programsAreChunks (bool state)
-{
- if (state)
- cEffect.flags |= effFlagsProgramChunks;
- else
- cEffect.flags &= ~effFlagsProgramChunks;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::setRealtimeQualities (long qualities)
-{
- cEffect.realQualities = qualities;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::setOfflineQualities (long qualities)
-{
- cEffect.offQualities = qualities;
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::setInitialDelay (long delay)
-{
- cEffect.initialDelay = delay;
-}
-
-//-------------------------------------------------------------------------------------------------------
-// Strings Conversion
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::dB2string (float value, char *text)
-{
- if (value <= 0)
- #if MAC
- strcpy (text, "-\xB0");
- #else
- strcpy (text, "-oo");
- #endif
- else
- float2string ((float)(20. * log10 (value)), text);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::Hz2string (float samples, char *text)
-{
- float sampleRate = getSampleRate ();
- if (!samples)
- float2string (0, text);
- else
- float2string (sampleRate / samples, text);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::ms2string (float samples, char *text)
-{
- float2string ((float)(samples * 1000. / getSampleRate ()), text);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::float2string (float value, char *text)
-{
- long c = 0, neg = 0;
- char string[32];
- char *s;
- double v, integ, i10, mantissa, m10, ten = 10.;
-
- v = (double)value;
- if (v < 0)
- {
- neg = 1;
- value = -value;
- v = -v;
- c++;
- if (v > 9999999.)
- {
- strcpy (string, "Huge!");
- return;
- }
- }
- else if( v > 99999999.)
- {
- strcpy (string, "Huge!");
- return;
- }
-
- s = string + 31;
- *s-- = 0;
- *s-- = '.';
- c++;
-
- integ = floor (v);
- i10 = fmod (integ, ten);
- *s-- = (char)((long)i10 + '0');
- integ /= ten;
- c++;
- while (integ >= 1. && c < 8)
- {
- i10 = fmod (integ, ten);
- *s-- = (char)((long)i10 + '0');
- integ /= ten;
- c++;
- }
- if (neg)
- *s-- = '-';
- strcpy (text, s + 1);
- if (c >= 8)
- return;
-
- s = string + 31;
- *s-- = 0;
- mantissa = fmod (v, 1.);
- mantissa *= pow (ten, (double)(8 - c));
- while (c < 8)
- {
- if (mantissa <= 0)
- *s-- = '0';
- else
- {
- m10 = fmod (mantissa, ten);
- *s-- = (char)((long)m10 + '0');
- mantissa /= 10.;
- }
- c++;
- }
- strcat (text, s + 1);
-}
-
-//-------------------------------------------------------------------------------------------------------
-void AudioEffect::long2string (long value, char *text)
-{
- char string[32];
-
- if (value >= 100000000)
- {
- strcpy (text, "Huge!");
- return;
- }
- sprintf (string, "%7d", (int)value);
- string[8] = 0;
- strcpy (text, (char *)string);
-}
-//-------------------------------------------------------------------------------------------------------
-//-------------------------------------------------------------------------------------------------------
Deleted: trunk/OpenMPT/include/AudioEffect.hpp
===================================================================
--- trunk/OpenMPT/include/AudioEffect.hpp 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/AudioEffect.hpp 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,131 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// VST Plug-Ins SDK
-// Version 1.0
-// \xA9 2003, Steinberg Media Technologies, All Rights Reserved
-//-------------------------------------------------------------------------------------------------------
-
-#ifndef __AudioEffect__
-#define __AudioEffect__
-
-#ifndef __AEffect__
-#include "AEffect.h" // "c" interface
-#endif
-
-class AEffEditor;
-class AudioEffect;
-
-//-------------------------------------------------------------------------------------------------------
-// Needs to be defined by the audio effect and is
-// called to create the audio effect object instance.
-AudioEffect* createEffectInstance (audioMasterCallback audioMaster);
-
-long dispatchEffectClass (AEffect *e, long opCode, long index, long value, void *ptr, float opt);
-float getParameterClass (long index);
-void setParameterClass (long index, float value);
-void processClass (AEffect *e, float **inputs, float **outputs, long sampleFrames);
-void processClassReplacing (AEffect *e, float **inputs, float **outputs, long sampleFrames);
-
-//-------------------------------------------------------------------------------------------------------
-class AudioEffect
-{
-friend class AEffEditor;
-friend long dispatchEffectClass (AEffect *e, long opCode, long index, long value, void *ptr, float opt);
-friend float getParameterClass (AEffect *e, long index);
-friend void setParameterClass (AEffect *e, long index, float value);
-friend void processClass (AEffect *e, float **inputs, float **outputs, long sampleFrames);
-friend void processClassReplacing (AEffect *e, float **inputs, float **outputs, long sampleFrames);
-
-public:
- AudioEffect (audioMasterCallback audioMaster, long numPrograms, long numParams);
- virtual ~AudioEffect ();
-
- virtual void setParameter (long index, float value) { index = index; value = value; }
- virtual float getParameter (long index) { index = index; return 0; }
- virtual void setParameterAutomated (long index, float value);
-
- AEffect *getAeffect () { return &cEffect; } // Returns the AEffect Structure
-
- void setEditor (AEffEditor *editor)
- { this->editor = editor;
- if (editor) cEffect.flags |= effFlagsHasEditor;
- else cEffect.flags &= ~effFlagsHasEditor; } // Should be called if you want to define your own editor
-
- //---Called from audio master (Host -> Plug)---------------
- virtual void process (float **inputs, float **outputs, long sampleFrames) = 0;
- virtual void processReplacing (float **inputs, float **outputs, long sampleFrames)
- { inputs = inputs; outputs = outputs; sampleFrames = sampleFrames; }
-
- virtual long dispatcher (long opCode, long index, long value, void *ptr, float opt); // Opcodes dispatcher
-
- virtual void open () {} // Called when Plugin is initialized
- virtual void close () {} // Called when Plugin will be released
-
- //---Program----------------------------
- virtual long getProgram () { return curProgram; }
- virtual void setProgram (long program) { curProgram = program; }// Don't forget to set curProgram
- virtual void setProgramName (char *name) { *name = 0; } // All following refer to curProgram
- virtual void getProgramName (char *name) { *name = 0; }
-
- virtual void getParameterLabel (long index, char *label) { index = index; *label = 0; } // example: "dB"
- virtual void getParameterDisplay (long index, char *text) { index = index; *text = 0; } // example: "6.01"
- virtual void getParameterName (long index, char *text) { index = index; *text = 0; } // example: "Volume"
-
- virtual float getVu () { return 0; }
-
- virtual long getChunk (void** data, bool isPreset = false) { return 0; } // Returns the Size in bytes of the chunk (Plugin allocates the data array)
- virtual long setChunk (void* data, long byteSize, bool isPreset = false) { return 0; }
-
- virtual void setSampleRate (float sampleRate) { this->sampleRate = sampleRate; }
- virtual void setBlockSize (long blockSize) { this->blockSize = blockSize; }
-
- virtual void suspend () {} // Called when Plugin is switched to Off
- virtual void resume () {} // Called when Plugin is switched to On
-
- //---Setup---------------------------
- virtual void setUniqueID (long iD) { cEffect.uniqueID = iD; } // must call this!
- virtual void setNumInputs (long inputs) { cEffect.numInputs = inputs; }
- virtual void setNumOutputs (long outputs) { cEffect.numOutputs = outputs; }
-
- virtual void hasVu (bool state = true);
- virtual void hasClip (bool state = true);
- virtual void canMono (bool state = true);
- virtual void canProcessReplacing (bool state = true); // Tells that the processReplacing () could be used
- virtual void programsAreChunks (bool state = true);
- virtual void setRealtimeQualities (long qualities);
- virtual void setOfflineQualities (long qualities);
- virtual void setInitialDelay (long delay); // Uses to report the Plugin's latency (Group Delay)
-
- //---Inquiry-------------------------
- virtual float getSampleRate () { return sampleRate; }
- virtual long getBlockSize () { return blockSize; }
-
- //---Host communication--------------
- virtual long getMasterVersion ();
- virtual long getCurrentUniqueId ();
- virtual void masterIdle ();
- virtual bool isInputConnected (long input);
- virtual bool isOutputConnected (long output);
-
- //---Tools---------------------------
- virtual void dB2string (float value, char *text);
- virtual void Hz2string (float samples, char *text);
- virtual void ms2string (float samples, char *text);
- virtual void float2string (float value, char *string);
- virtual void long2string (long value, char *text);
-
-protected:
- //---Members-------------------------
- float sampleRate;
- AEffEditor *editor;
- audioMasterCallback audioMaster;
- long numPrograms;
- long numParams;
- long curProgram;
- long blockSize;
- AEffect cEffect;
-};
-
-#endif // __AudioEffect__
-//-------------------------------------------------------------------------------------------------------
-//-------------------------------------------------------------------------------------------------------
-
Deleted: trunk/OpenMPT/include/MachineInterface.h
===================================================================
--- trunk/OpenMPT/include/MachineInterface.h 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/MachineInterface.h 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,514 +0,0 @@
-// Copyright (C) 1997-2000 Oskari Tammelin (ot...@ik...)
-// This header file may be used to write _freeware_ DLL "machines" for Buzz
-// Using it for anything else is not allowed without a permission from the author
-
-#ifndef __MACHINE_INTERFACE_H
-#define __MACHINE_INTERFACE_H
-
-#define MI_VERSION 15
-
-typedef unsigned char byte;
-typedef unsigned short word;
-typedef unsigned long dword;
-
-double const PI = 3.14159265358979323846;
-
-#define MAX_BUFFER_LENGTH 256 // in number of samples
-
-// machine types
-#define MT_MASTER 0
-#define MT_GENERATOR 1
-#define MT_EFFECT 2
-
-// special parameter values
-#define NOTE_NO 0
-#define NOTE_OFF 255
-#define NOTE_MIN 1 // C-0
-#define NOTE_MAX ((16 * 9) + 12) // B-9
-#define SWITCH_OFF 0
-#define SWITCH_ON 1
-#define SWITCH_NO 255
-#define WAVE_MIN 1
-#define WAVE_MAX 200
-#define WAVE_NO 0
-
-// CMachineParameter flags
-#define MPF_WAVE 1
-#define MPF_STATE 2
-#define MPF_TICK_ON_EDIT 4
-
-// CMachineInfo flags
-#define MIF_MONO_TO_STEREO (1<<0)
-#define MIF_PLAYS_WAVES (1<<1)
-#define MIF_USES_LIB_INTERFACE (1<<2)
-#define MIF_USES_INSTRUMENTS (1<<3)
-#define MIF_DOES_INPUT_MIXING (1<<4)
-#define MIF_NO_OUTPUT (1<<5) // used for effect machines that don't actually use any outputs (WaveOutput, AuxSend etc.)
-#define MIF_CONTROL_MACHINE (1<<6) // used to control other (non MIF_CONTROL_MACHINE) machines
-#define MIF_INTERNAL_AUX (1<<7) // uses internal aux bus (jeskola mixer and jeskola mixer aux)
-
-// work modes
-#define WM_NOIO 0
-#define WM_READ 1
-#define WM_WRITE 2
-#define WM_READWRITE 3
-
-// state flags
-#define SF_PLAYING 1
-#define SF_RECORDING 2
-
-
-enum BEventType
-{
- DoubleClickMachine, // return true to ignore default handler (open parameter dialog), no parameters
- gDeleteMachine // data = CMachine *, param = ThisMac
-
-};
-
-class CMachineInterface;
-typedef bool (CMachineInterface::*EVENT_HANDLER_PTR)(void *);
-
-
-enum CMPType { pt_note, pt_switch, pt_byte, pt_word };
-
-class CMachineParameter
-{
-public:
-
- CMPType Type; // pt_byte
- char const *Name; // Short name: "Cutoff"
- char const *Description;// Longer description: "Cutoff Frequency (0-7f)"
- int MinValue; // 0
- int MaxValue; // 127
- int NoValue; // 255
- int Flags;
- int DefValue; // default value for params that have MPF_STATE flag set
-};
-
-class CMachineAttribute
-{
-public:
- char const *Name;
- int MinValue;
- int MaxValue;
- int DefValue;
-};
-
-class CMasterInfo
-{
-public:
- int BeatsPerMin; // [16..500]
- int TicksPerBeat; // [1..32]
- int SamplesPerSec; // usually 44100, but machines should support any rate from 11050 to 96000
- int SamplesPerTick; // (int)((60 * SPS) / (BPM * TPB))
- int PosInTick; // [0..SamplesPerTick-1]
- float TicksPerSec; // (float)SPS / (float)SPT
-
-};
-
-// CWaveInfo flags
-#define WF_LOOP 1
-#define WF_STEREO 8
-#define WF_BIDIR_LOOP 16
-
-class CWaveInfo
-{
-public:
- int Flags;
- float Volume;
-
-};
-
-class CWaveLevel
-{
-public:
- int numSamples;
- short *pSamples;
- int RootNote;
- int SamplesPerSec;
- int LoopStart;
- int LoopEnd;
-};
-
-// oscillator waveforms (used with GetOscillatorTable function)
-#define OWF_SINE 0
-#define OWF_SAWTOOTH 1
-#define OWF_PULSE 2 // square
-#define OWF_TRIANGLE 3
-#define OWF_NOISE 4
-#define OWF_303_SAWTOOTH 5
-
-// each oscillator table contains one full cycle of a bandlimited waveform at 11 levels
-// level 0 = 2048 samples
-// level 1 = 1024 samples
-// level 2 = 512 samples
-// ...
-// level 9 = 8 samples
-// level 10 = 4 samples
-// level 11 = 2 samples
-//
-// the waves are normalized to 16bit signed integers
-//
-// GetOscillatorTable retusns pointer to a table
-// GetOscTblOffset returns offset in the table for a specified level
-
-inline int GetOscTblOffset(int const level)
-{
- ASSERT(level >= 0 && level <= 10);
- return (2048+1024+512+256+128+64+32+16+8+4) & ~((2048+1024+512+256+128+64+32+16+8+4) >> level);
-}
-
-class CPattern;
-class CSequence;
-class CMachineInterfaceEx;
-class CMachine;
-
-class CMachineDataOutput;
-class CMachineInfo;
-
-class CMICallbacks
-{
-public:
- virtual CWaveInfo const *GetWave(int const i);
- virtual CWaveLevel const *GetWaveLevel(int const i, int const level);
- virtual void MessageBox(char const *txt);
- virtual void Lock();
- virtual void Unlock();
- virtual int GetWritePos();
- virtual int GetPlayPos();
- virtual float *GetAuxBuffer();
- virtual void ClearAuxBuffer();
- virtual int GetFreeWave();
- virtual bool AllocateWave(int const i, int const size, char const *name);
- virtual void ScheduleEvent(int const time, dword const data);
- virtual void MidiOut(int const dev, dword const data);
- virtual short const *GetOscillatorTable(int const waveform);
-
- // envelopes
- virtual int GetEnvSize(int const wave, int const env);
- virtual bool GetEnvPoint(int const wave, int const env, int const i, word &x, word &y, int &flags);
-
- virtual CWaveLevel const *GetNearestWaveLevel(int const i, int const note);
-
- // pattern editing
- virtual void SetNumberOfTracks(int const n);
- virtual CPattern *CreatePattern(char const *name, int const length);
- virtual CPattern *GetPattern(int const index);
- virtual char const *GetPatternName(CPattern *ppat);
- virtual void RenamePattern(char const *oldname, char const *newname);
- virtual void DeletePattern(CPattern *ppat);
- virtual int GetPatternData(CPattern *ppat, int const row, int const group, int const track, int const field);
- virtual void SetPatternData(CPattern *ppat, int const row, int const group, int const track, int const field, int const value);
-
- // sequence editing
- virtual CSequence *CreateSequence();
- virtual void DeleteSequence(CSequence *pseq);
-
-
- // special ppat values for GetSequenceData and SetSequenceData
- // empty = NULL
- // <break> = (CPattern *)1
- // <mute> = (CPattern *)2
- // <thru> = (CPattern *)3
- virtual CPattern *GetSequenceData(int const row);
- virtual void SetSequenceData(int const row, CPattern *ppat);
-
-
- // buzz v1.2 (MI_VERSION 15) additions start here
-
- virtual void SetMachineInterfaceEx(CMachineInterfaceEx *pex);
- // group 1=global, 2=track
- virtual void ControlChange__obsolete__(int group, int track, int param, int value); // set value of parameter
-
- // direct calls to audiodriver, used by WaveInput and WaveOutput
- // shouldn't be used for anything else
- virtual int ADGetnumChannels(bool input);
- virtual void ADWrite(int channel, float *psamples, int numsamples);
- virtual void ADRead(int channel, float *psamples, int numsamples);
-
- virtual CMachine *GetThisMachine(); // only call this in Init()!
- virtual void ControlChange(CMachine *pmac, int group, int track, int param, int value); // set value of parameter (group & 16 == don't record)
-
- // returns pointer to the sequence if there is a pattern playing
- virtual CSequence *GetPlayingSequence(CMachine *pmac);
-
- // gets ptr to raw pattern data for row of a track of a currently playing pattern (or something like that)
- virtual void *GetPlayingRow(CSequence *pseq, int group, int track);
-
- virtual int GetStateFlags();
-
- virtual void SetnumOutputChannels(CMachine *pmac, int n); // if n=1 Work(), n=2 WorkMonoToStereo()
-
- virtual void SetEventHandler(CMachine *pmac, BEventType et, EVENT_HANDLER_PTR p, void *param);
-
- virtual char const *GetWaveName(int const i);
-
- virtual void SetInternalWaveName(CMachine *pmac, int const i, char const *name); // i >= 1, NULL name to clear
-
- virtual void GetMachineNames(CMachineDataOutput *pout); // *pout will get one name per Write()
- virtual CMachine *GetMachine(char const *name);
- virtual CMachineInfo const *GetMachineInfo(CMachine *pmac);
- virtual char const *GetMachineName(CMachine *pmac);
-
- virtual bool GetInput(int index, float *psamples, int numsamples, bool stereo, float *extrabuffer);
-};
-
-
-class CLibInterface
-{
-public:
- virtual void GetInstrumentList(CMachineDataOutput *pout) {}
-
- // make some space to vtable so this interface can be extended later
- virtual void Dummy1() {}
- virtual void Dummy2() {}
- virtual void Dummy3() {}
- virtual void Dummy4() {}
- virtual void Dummy5() {}
- virtual void Dummy6() {}
- virtual void Dummy7() {}
- virtual void Dummy8() {}
- virtual void Dummy9() {}
- virtual void Dummy10() {}
- virtual void Dummy11() {}
- virtual void Dummy12() {}
- virtual void Dummy13() {}
- virtual void Dummy14() {}
- virtual void Dummy15() {}
- virtual void Dummy16() {}
- virtual void Dummy17() {}
- virtual void Dummy18() {}
- virtual void Dummy19() {}
- virtual void Dummy20() {}
- virtual void Dummy21() {}
- virtual void Dummy22() {}
- virtual void Dummy23() {}
- virtual void Dummy24() {}
- virtual void Dummy25() {}
- virtual void Dummy26() {}
- virtual void Dummy27() {}
- virtual void Dummy28() {}
- virtual void Dummy29() {}
- virtual void Dummy30() {}
- virtual void Dummy31() {}
- virtual void Dummy32() {}
-
-
-};
-
-
-class CMachineInfo
-{
-public:
- int Type; // MT_GENERATOR or MT_EFFECT,
- int Version; // MI_VERSION
- // v1.2: high word = internal machine version
- // higher version wins if two copies of machine found
- int Flags;
- int minTracks; // [0..256] must be >= 1 if numTrackParameters > 0
- int maxTracks; // [minTracks..256]
- int numGlobalParameters;
- int numTrackParameters;
- CMachineParameter const **Parameters;
- int numAttributes;
- CMachineAttribute const **Attributes;
- char const *Name; // "Jeskola Reverb"
- char const *ShortName; // "Reverb"
- char const *Author; // "Oskari Tammelin"
- char const *Commands; // "Command1\nCommand2\nCommand3..."
- CLibInterface *pLI; // ignored if MIF_USES_LIB_INTERFACE is not set
-};
-
-class CMachineDataInput
-{
-public:
- virtual void Read(void *pbuf, int const numbytes);
-
- void Read(int &d) { Read(&d, sizeof(int)); }
- void Read(dword &d) { Read(&d, sizeof(dword)); }
- void Read(short &d) { Read(&d, sizeof(short)); }
- void Read(word &d) { Read(&d, sizeof(word)); }
- void Read(char &d) { Read(&d, sizeof(char)); }
- void Read(byte &d) { Read(&d, sizeof(byte)); }
- void Read(float &d) { Read(&d, sizeof(float)); }
- void Read(double &d) { Read(&d, sizeof(double)); }
- void Read(bool &d) { Read(&d, sizeof(bool)); }
-
-};
-
-class CMachineDataOutput
-{
-public:
- virtual void Write(void *pbuf, int const numbytes);
-
- void Write(int d) { Write(&d, sizeof(int)); }
- void Write(dword d) { Write(&d, sizeof(dword)); }
- void Write(short d) { Write(&d, sizeof(short)); }
- void Write(word d) { Write(&d, sizeof(word)); }
- void Write(char d) { Write(&d, sizeof(char)); }
- void Write(byte d) { Write(&d, sizeof(byte)); }
- void Write(float d) { Write(&d, sizeof(float)); }
- void Write(double d) { Write(&d, sizeof(double)); }
- void Write(bool d) { Write(&d, sizeof(bool)); }
- void Write(char const *str) { Write((void *)str, strlen(str)+1); }
-
-};
-
-// envelope info flags
-#define EIF_SUSTAIN 1
-#define EIF_LOOP 2
-
-class CEnvelopeInfo
-{
-public:
- char const *Name;
- int Flags;
-};
-
-class CMachineInterface
-{
-public:
- virtual ~CMachineInterface() {}
- virtual void Init(CMachineDataInput * const pi) {}
- virtual void Tick() {}
- virtual bool Work(float *psamples, int numsamples, int const mode) { return false; }
- virtual bool WorkMonoToStereo(float *pin, float *pout, int numsamples, int const mode) { return false; }
- virtual void Stop() {}
- virtual void Save(CMachineDataOutput * const po) {}
- virtual void AttributesChanged() {}
- virtual void Command(int const i) {}
-
- virtual void SetNumTracks(int const n) {}
- virtual void MuteTrack(int const i) {}
- virtual bool IsTrackMuted(int const i) const { return false; }
-
- virtual void MidiNote(int const channel, int const value, int const velocity) {}
- virtual void Event(dword const data) {}
-
- virtual char const *DescribeValue(int const param, int const value) { return NULL; }
-
- virtual CEnvelopeInfo const **GetEnvelopeInfos() { return NULL; }
-
- virtual bool PlayWave(int const wave, int const note, float const volume) { return false; }
- virtual void StopWave() {}
- virtual int GetWaveEnvPlayPos(int const env) { return -1; }
-
-
-public:
- // initialize these members in the constructor
- void *GlobalVals;
- void *TrackVals;
- int *AttrVals;
-
- // these members are initialized by the
- // engine right after it calls CreateMachine()
- // don't touch them in the constructor
- CMasterInfo *pMasterInfo;
- CMICallbacks *pCB;
-
-};
-
-// buzz v1.2 extended machine interface
-class CMachineInterfaceEx
-{
-public:
- virtual char const *DescribeParam(int const param) { return NULL; } // use this to dynamically change name of parameter
- virtual bool SetInstrument(char const *name) { return false; }
-
- virtual void GetSubMenu(int const i, CMachineDataOutput *pout) {}
-
- virtual void AddInput(char const *macname, bool stereo) {} // called when input is added to a machine
- virtual void DeleteInput(char const *macename) {}
- virtual void RenameInput(char const *macoldname, char const *macnewname) {}
-
- virtual void Input(float *psamples, int numsamples, float amp) {} // if MIX_DOES_INPUT_MIXING
-
- virtual void MidiControlChange(int const ctrl, int const channel, int const value) {}
-
- virtual void SetInputChannels(char const *macname, bool stereo) {}
-
- virtual bool HandleInput(int index, int amp, int pan) { return false; }
-
- // make some space to vtable so this interface can be extended later
- virtual void Dummy1() {}
- virtual void Dummy2() {}
- virtual void Dummy3() {}
- virtual void Dummy4() {}
- virtual void Dummy5() {}
- virtual void Dummy6() {}
- virtual void Dummy7() {}
- virtual void Dummy8() {}
- virtual void Dummy9() {}
- virtual void Dummy10() {}
- virtual void Dummy11() {}
- virtual void Dummy12() {}
- virtual void Dummy13() {}
- virtual void Dummy14() {}
- virtual void Dummy15() {}
- virtual void Dummy16() {}
- virtual void Dummy17() {}
- virtual void Dummy18() {}
- virtual void Dummy19() {}
- virtual void Dummy20() {}
- virtual void Dummy21() {}
- virtual void Dummy22() {}
- virtual void Dummy23() {}
- virtual void Dummy24() {}
- virtual void Dummy25() {}
- virtual void Dummy26() {}
- virtual void Dummy27() {}
- virtual void Dummy28() {}
- virtual void Dummy29() {}
- virtual void Dummy30() {}
- virtual void Dummy31() {}
- virtual void Dummy32() {}
-
-};
-
-class CMILock
-{
-public:
- CMILock(CMICallbacks *p) { pCB = p; pCB->Lock(); }
- ~CMILock() { pCB->Unlock(); }
-private:
- CMICallbacks *pCB;
-};
-
-#define MACHINE_LOCK CMILock __machinelock(pCB);
-
-#ifdef STATIC_BUILD
-
- typedef CMachineInfo const *(__cdecl *GET_INFO)();
- typedef CMachineInterface *(__cdecl *CREATE_MACHINE)();
-
- extern void RegisterMachine(CMachineInfo const *pmi, GET_INFO gi, CREATE_MACHINE cm);
-
-#define DLL_EXPORTS(INIT_FUNC) \
- static CMachineInfo const * __cdecl GetInfo() { return &MacInfo; } \
- static CMachineInterface * __cdecl CreateMachine() { return new mi; } \
- void INIT_FUNC() { RegisterMachine(&MacInfo, GetInfo, CreateMachine); } \
-
-
-#define DLL_EXPORTS_NS(NS, INIT_FUNC) /* namespaced version */ \
- static CMachineInfo const * __cdecl GetInfo() { return &NS::MacInfo; } \
- static CMachineInterface * __cdecl CreateMachine() { return new NS::mi; } \
- void INIT_FUNC() { RegisterMachine(&NS::MacInfo, GetInfo, CreateMachine); } \
-
-
-
-#else
-
- #define DLL_EXPORTS extern "C" { \
- __declspec(dllexport) CMachineInfo const * __cdecl GetInfo() \
- { \
- return &MacInfo; \
- } \
- __declspec(dllexport) CMachineInterface * __cdecl CreateMachine() \
- { \
- return new mi; \
- } \
- }
-
-#endif
-
-#endif
\ No newline at end of file
Deleted: trunk/OpenMPT/include/audioeffectx.cpp
===================================================================
--- trunk/OpenMPT/include/audioeffectx.cpp 2007-11-17 20:42:39 UTC (rev 194)
+++ trunk/OpenMPT/include/audioeffectx.cpp 2008-01-12 16:49:50 UTC (rev 195)
@@ -1,793 +0,0 @@
-//-------------------------------------------------------------------------------------------------------
-// VST Plug-Ins SDK
-// Version 2.3 Extension
-// \xA9 2003 Steinberg Media Technologies, All Rights Reserved
-//
-// you should not have to edit this file
-// use override methods instead, as suggested in the class declaration (audioeffectx.h)
-//-------------------------------------------------------------------------------------------------------
-
-#ifndef __audioeffectx__
-#include "audioeffectx.h"
-#endif
-
-#ifndef __AEffEditor__
-#include "AEffEditor.hpp"
-#endif
-
-//---------------------------------------------------------------------------------------------
-// 'canDo' strings. note other 'canDos' can be evaluated by calling the according
-// function, for instance if getSampleRate returns 0, you
-// will certainly want to assume that this selector is not supported.
-//---------------------------------------------------------------------------------------------
-
-const char* hostCanDos [] =
-{
- "sendVstEvents",
- "sendVstMidiEvent",
- "sendVstTimeInfo",
- "receiveVstEvents",
- "receiveVstMidiEvent",
- "receiveVstTimeInfo",
-
- "reportConnectionChanges",
- "acceptIOChanges",
- "sizeWindow",
-
- "asyncProcessing",
- "offline",
- "supplyIdle",
- "supportShell", // 'shell' handling via uniqueID as suggested by Waves
- "openFileSelector"
-#if VST_2_2_EXTENSIONS
- ,
- "editFile",
- "closeFileSelector"
-#endif // VST_2_2_EXTENSIONS
-#if VST_2_3_EXTENSIONS
- ,
- "startStopProcess"
-#endif // VST_2_3_EXTENSIONS
-};
-
-const char* plugCanDos [] =
-{
- "sendVstEvents",
- "sendVstMidiEvent",
- "sendVstTimeInfo",
- "receiveVstEvents",
- "receiveVstMidiEvent",
- "receiveVstTimeInfo",
- "offline",
- "plugAsChannelInsert",
- "plugAsSend",
- "mixDryWet",
- "noRealTime",
- "multipass",
- "metapass",
- "1in1out",
- "1in2out",
- "2in1out",
- "2in2out",
- "2in4out",
- "4in2out",
- "4in4out",
- "4in8out", // 4:2 matrix to surround bus
- "8in4out", // surround bus to 4:2 matrix
- "8in8out"
-#if VST_2_1_EXTENSIONS
- ,
- "midiProgramNames",
- "conformsToWindowRules" // mac: doesn't mess with grafport. general: may want
- // to call sizeWindow (). if you want to use sizeWindow (),
- // you must return true (1) in canDo ("conformsToWindowRules")
-#endif // VST_2_1_EXTENSIONS
-
-#if VST_2_3_EXTENSIONS
- ,
- "bypass"
-#endif // VST_2_3_EXTENSIONS
-};
-
-//-------------------------------------------------------------------------------------------------------
-//-------------------------------------------------------------------------------------------------------
-// AudioEffectX extends AudioEffect with the new features. so you should derive
-// your plug from AudioEffectX
-//-------------------------------------------------------------------------------------------------------
-//-------------------------------------------------------------------------------------------------------
-
-//-------------------------------------------------------------------------------------------------------
-// VstEvents + VstTimeInfo
-//-------------------------------------------------------------------------------------------------------
-
-//-------------------------------------------------------------------------------------------------------
-AudioEffectX::AudioEffectX (audioMasterCallback audioMaster, long numPrograms, long numParams)
- : AudioEffect (audioMaster, numPrograms, numParams)
-{
-}
-
-//-------------------------------------------------------------------------------------------------------
-AudioEffectX::~AudioEffectX ()
-{
-}
-
-//-------------------------------------------------------------------------------------------------------
-long AudioEffectX::dispatcher (long opCode, long index, long value, void *ptr, float opt)
-{
- long v = 0;
- switch(opCode)
- {
- // VstEvents
- case effProcessEvents:
- v = processEvents ((VstEvents*)ptr);
- break;
-
- // parameters and programs
- case effCanBeAutomated:
- v = canParameterBeAutomated (index) ? 1 : 0;
- break;
- case effString2Parameter:
- v = string2parameter (index, (char*)ptr) ? 1 : 0;
- break;
-
- case effGetNumProgramCategories:
- v = getNumCategories ();
- break;
- case effGetProgramNameIndexed:
- v = getProgramNameIndexed (value, index, (char*)ptr) ? 1 : 0;
- break;
- case effCopyProgram:
- v = copyProgram (index) ? 1 : 0;
- break;
-
- // connections, configuration
- case effConnectInput:
- inputConnected (index, value ? true : false);
- v = 1;
- break;
- case effConnectOutput:
- outputConnected (index, value ? true : false);
- v = 1;
- break;
- case effGetInputProperties:
- v = getInputProperties (index, (VstPinProperties*)ptr) ? 1 : 0;
- break;
- case effGetOutputProperties:
- v = getOutputProperties (index, (VstPinProperties*)ptr) ? 1 : 0;
- break;
- case effGetPlugCategory:
- v = (long)getPlugCategory ();
- break;
-
- // realtime
- case effGetCurrentPosition:
- v = reportCurrentPosition ();
- break;
-
- case effGetDestinationBuffer:
- v = (long)reportDestinationBuffer ();
- break;
-
- // offline
- case effOfflineNotify:
- v = offlineNotify ((VstAudioFile*)ptr, value, index != 0);
- break;
- case effOfflinePrepare:
- v = offlinePrepare ((Vs...
[truncated message content] |
|
From: <Rel...@us...> - 2007-11-17 20:42:43
|
Revision: 194
http://modplug.svn.sourceforge.net/modplug/?rev=194&view=rev
Author: Relabsoluness
Date: 2007-11-17 12:42:39 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
1.17.02.49
Modified Paths:
--------------
trunk/OpenMPT/mptrack/bin/mptrack.exe
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/mptrack/bin/mptrack.exe
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2007-11-17 18:31:14 UTC (rev 193)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2007-11-17 20:42:39 UTC (rev 194)
@@ -425,6 +425,22 @@
//Playback behavior change for MPT: Don't change sample if it is in the same instrument as previous sample.
if(bPorta && bNewTuning && penv == pChn->pHeader)
return;
+
+ bool returnAfterVolumeAdjust = false;
+ // bInstrumentChanged is used for IT carry-on env option
+ if (penv != pChn->pHeader)
+ {
+ bInstrumentChanged = TRUE;
+ pChn->pHeader = penv;
+ } else
+ // Special XM hack
+ if ((bPorta) && (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)) && (penv)
+ && (pChn->pInstrument) && (psmp != pChn->pInstrument))
+ {
+ // FT2 doesn't change the sample in this case,
+ // but still uses the sample info from the old one (bug?)
+ returnAfterVolumeAdjust = true;
+ }
// Update Volume
if (bUpdVol)
@@ -437,23 +453,11 @@
if(penv && penv->nMixPlug)
pChn->nVolume = pChn->GetVSTVolume();
}
-
}
- // bInstrumentChanged is used for IT carry-on env option
- if (penv != pChn->pHeader)
- {
- bInstrumentChanged = TRUE;
- pChn->pHeader = penv;
- } else
- // Special XM hack
- if ((bPorta) && (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2)) && (penv)
- && (pChn->pInstrument) && (psmp != pChn->pInstrument))
- {
- // FT2 doesn't change the sample in this case,
- // but still uses the sample info from the old one (bug?)
- return;
- }
+ if(returnAfterVolumeAdjust) return;
+
+
// Instrument adjust
pChn->nNewIns = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Rel...@us...> - 2007-11-17 18:31:18
|
Revision: 193
http://modplug.svn.sourceforge.net/modplug/?rev=193&view=rev
Author: Relabsoluness
Date: 2007-11-17 10:31:14 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
Project file update
Modified Paths:
--------------
trunk/OpenMPT/mptrack/mptrack.vcproj
Property Changed:
----------------
trunk/OpenMPT/mptrack/
Property changes on: trunk/OpenMPT/mptrack
___________________________________________________________________
Name: svn:ignore
- *.sln
*.vcproj
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2007-11-17 17:59:58 UTC (rev 192)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2007-11-17 18:31:14 UTC (rev 193)
@@ -499,6 +499,9 @@
RelativePath="..\soundlib\Load_mod.cpp">
</File>
<File
+ RelativePath="..\soundlib\load_mptm.cpp">
+ </File>
+ <File
RelativePath="..\Soundlib\load_mt2.cpp">
</File>
<File
@@ -709,6 +712,9 @@
RelativePath="..\soundlib\tuning.cpp">
</File>
<File
+ RelativePath="..\soundlib\tuningbase.cpp">
+ </File>
+ <File
RelativePath="..\soundlib\tuningCollection.cpp">
</File>
<File
@@ -1067,7 +1073,7 @@
RelativePath="..\soundlib\tuning.h">
</File>
<File
- RelativePath="..\soundlib\tuning_template.h">
+ RelativePath="..\soundlib\tuningbase.h">
</File>
<File
RelativePath="..\soundlib\tuningcollection.h">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Rel...@us...> - 2007-11-17 18:00:04
|
Revision: 192
http://modplug.svn.sourceforge.net/modplug/?rev=192&view=rev
Author: Relabsoluness
Date: 2007-11-17 09:59:58 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
+ Improved VST preset navigation in VST window. Known problem: doesn't update if preset is changed from VSTs own preset navigation.
+ 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.
+ 'key binding not understood'-messages can be disabled with an ini setting.
. Fixed wrong file version in IT compatibility save. (http://lpchip.com/modplug/viewtopic.php?t=1723)
. Fixed possible unnotified overwriting of file occurring for example when dealing with a new file. (http://lpchip.com/modplug/viewtopic.php?t=1813)
. Fixed broken note preview for certain type of instruments in instrument tab. (http://lpchip.com/modplug/viewtopic.php?t=1996)
. Fixed possible crash on channel mode wav export when a channel has a long name. (http://lpchip.com/modplug/viewtopic.php?t=2005)
. Fixed pattern position indicator jump when clicking VST-box in channel header. (http://lpchip.com/modplug/viewtopic.php?t=2014)
. CMainFrame::m_csExecutablePath renamed and should now contain the path of executable directory, not that of the working directory.
/ Tuning related changes/improvements
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
trunk/OpenMPT/mptrack/AbstractVstEditor.h
trunk/OpenMPT/mptrack/AutoSaver.cpp
trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/CommandSet.h
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.h
trunk/OpenMPT/mptrack/Draw_pat.cpp
trunk/OpenMPT/mptrack/InputHandler.cpp
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
trunk/OpenMPT/mptrack/OrderToPatternTable.cpp
trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp
trunk/OpenMPT/mptrack/TuningDialog.cpp
trunk/OpenMPT/mptrack/TuningDialog.h
trunk/OpenMPT/mptrack/View_gen.cpp
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/mptrack/bin/tunings/standard/std_tunings.tc
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/misc_util.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/pattern.cpp
trunk/OpenMPT/mptrack/pattern.h
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/mptrack/serialization_utils.cpp
trunk/OpenMPT/mptrack/serialization_utils.h
trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp
trunk/OpenMPT/mptrack/tuningRatioMapWnd.h
trunk/OpenMPT/mptrack/typedefs.h
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
trunk/OpenMPT/soundlib/mod_specifications.h
trunk/OpenMPT/soundlib/modcommand.h
trunk/OpenMPT/soundlib/tuning.cpp
trunk/OpenMPT/soundlib/tuning.h
trunk/OpenMPT/soundlib/tuningCollection.cpp
trunk/OpenMPT/soundlib/tuningcollection.h
trunk/OpenMPT/soundlib/wavConverter.h
Added Paths:
-----------
trunk/OpenMPT/soundlib/load_mptm.cpp
trunk/OpenMPT/soundlib/tuningbase.cpp
trunk/OpenMPT/soundlib/tuningbase.h
Removed Paths:
-------------
trunk/OpenMPT/mptrack/bin/tunings/local_tunings.tc
trunk/OpenMPT/soundlib/tuning_template.h
Property Changed:
----------------
trunk/OpenMPT/mptrack/
Property changes on: trunk/OpenMPT/mptrack
___________________________________________________________________
Name: svn:ignore
+ *.sln
*.vcproj
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -21,6 +21,10 @@
ON_COMMAND(ID_PRESET_RANDOM, OnRandomizePreset)
ON_COMMAND(ID_VSTMACRO_INFO, OnMacroInfo)
ON_COMMAND(ID_VSTINPUT_INFO, OnInputInfo)
+ ON_COMMAND(ID_PREVIOUSVSTPRESET, OnSetPreviousVSTPreset)
+ ON_COMMAND(ID_NEXTVSTPRESET, OnSetNextVSTPreset)
+ ON_COMMAND(ID_VSTPRESETBACKWARDJUMP,OnVSTPresetBackwardJump)
+ ON_COMMAND(ID_VSTPRESETFORWARDJUMP, OnVSTPresetForwardJump)
ON_COMMAND_RANGE(ID_PRESET_SET, ID_PRESET_SET+MAX_PLUGPRESETS, OnSetPreset)
ON_MESSAGE(WM_MOD_KEYCOMMAND, OnCustomKeyMsg) //rewbs.customKeys
ON_COMMAND_RANGE(ID_PLUGSELECT, ID_PLUGSELECT+MAX_MIXPLUGINS, OnToggleEditor) //rewbs.patPlugName
@@ -36,7 +40,7 @@
m_pInputMenu = new CMenu();
m_pOutputMenu = new CMenu();
m_pMacroMenu = new CMenu();
-
+
m_pPresetMenu = new CMenu();
m_pPresetMenuGroup.SetSize(0);
@@ -137,17 +141,50 @@
UpdateOutputMenu();
UpdateMacroMenu();
UpdateOptionsMenu();
+ UpdatePresetField();
::SetMenu(m_hWnd, m_pMenu->m_hMenu);
}
return;
}
+void CAbstractVstEditor::UpdatePresetField()
+//------------------------------------------
+{
+ if(m_pVstPlugin->GetNumPrograms() > 0 && m_pMenu->GetMenuItemCount() < 5)
+ {
+ m_pMenu->InsertMenu(4, MF_BYPOSITION, ID_VSTPRESETBACKWARDJUMP, (LPCTSTR)"<<");
+ m_pMenu->InsertMenu(5, MF_BYPOSITION, ID_PREVIOUSVSTPRESET, (LPCTSTR)"<");
+ m_pMenu->InsertMenu(6, MF_BYPOSITION, ID_NEXTVSTPRESET, (LPCTSTR)">");
+ m_pMenu->InsertMenu(7, MF_BYPOSITION, ID_VSTPRESETFORWARDJUMP, (LPCTSTR)">>");
+ m_pMenu->InsertMenu(8, MF_BYPOSITION|MF_DISABLED, 0, "");
+ }
+
+ long index = m_pVstPlugin->GetCurrentProgram();
+ char name[256+6];
+ memset(name, ' ', 6);
+ itoa(index, name, 10);
+ size_t i = 4;
+ if(index < 1000) i = 3;
+ if(index < 100) i = 2;
+ if(index < 10) i = 1;
+ name[i] = ':'; name[i+1] = ' ';
+
+ m_pVstPlugin->GetProgramNameIndexed(index, -1, name+i+2);
+
+ m_pMenu->ModifyMenu(8, MF_BYPOSITION, 0, name);
+ DrawMenuBar();
+}
+
+
void CAbstractVstEditor::OnSetPreset(UINT nID)
+//---------------------------------------------
{
int nIndex=nID-ID_PRESET_SET;
if (nIndex>=0)
{
m_pVstPlugin->SetCurrentProgram(nIndex);
+ UpdatePresetField();
+
//SetupMenu();
}
}
@@ -254,8 +291,8 @@
switch(wParam)
{
- case kcVSTGUIPrevPreset: OnSetPreset(-1+ID_PRESET_SET+m_pVstPlugin->GetCurrentProgram()); return wParam;
- case kcVSTGUINextPreset: OnSetPreset( 1+ID_PRESET_SET+m_pVstPlugin->GetCurrentProgram()); return wParam;
+ case kcVSTGUIPrevPreset: OnSetPreviousVSTPreset(); return wParam;
+ case kcVSTGUINextPreset: OnSetNextVSTPreset(); return wParam;
case kcVSTGUIRandParams: OnRandomizePreset() ; return wParam;
}
if (wParam>=kcVSTGUIStartNotes && wParam<=kcVSTGUIEndNotes)
@@ -301,6 +338,8 @@
char s[256];
char sname[256];
+
+
if (m_pPresetMenu->m_hMenu) // We rebuild menu from scratch
{ // So remove any exiting menus...
if (curProg == m_nCurProg) //.. unless menu exists and is accurate,
@@ -603,6 +642,30 @@
m_nInstrument = (nID-ID_SELECTINST);
}
+void CAbstractVstEditor::OnSetPreviousVSTPreset()
+//--------------------------------------------
+{
+ OnSetPreset(-1+ID_PRESET_SET+m_pVstPlugin->GetCurrentProgram());
+}
+
+void CAbstractVstEditor::OnSetNextVSTPreset()
+//----------------------------------------
+{
+ OnSetPreset(1+ID_PRESET_SET+m_pVstPlugin->GetCurrentProgram());
+}
+
+void CAbstractVstEditor::OnVSTPresetBackwardJump()
+//------------------------------------------------
+{
+ OnSetPreset(max(ID_PRESET_SET+m_pVstPlugin->GetCurrentProgram()-10, ID_PRESET_SET));
+}
+
+void CAbstractVstEditor::OnVSTPresetForwardJump()
+//----------------------------------------------------
+{
+ OnSetPreset(min(10+ID_PRESET_SET+m_pVstPlugin->GetCurrentProgram(), ID_PRESET_SET+m_pVstPlugin->GetNumPrograms()-1));
+}
+
void CAbstractVstEditor::PrepareToLearnMacro(UINT nID)
{
m_nLearnMacro = (nID-ID_LEARN_MACRO_FROM_PLUGGUI);
Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.h
===================================================================
--- trunk/OpenMPT/mptrack/AbstractVstEditor.h 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/AbstractVstEditor.h 2007-11-17 17:59:58 UTC (rev 192)
@@ -20,6 +20,8 @@
void SetLearnMacro(int inMacro);
int GetLearnMacro();
+ void UpdatePresetField();
+
afx_msg void OnLoadPreset();
afx_msg void OnSavePreset();
afx_msg void OnRandomizePreset();
@@ -29,6 +31,10 @@
afx_msg void OnBypassPlug();
afx_msg void OnRecordAutomation();
afx_msg void OnPassKeypressesToPlug();
+ afx_msg void OnSetPreviousVSTPreset();
+ afx_msg void OnSetNextVSTPreset();
+ afx_msg void OnVSTPresetBackwardJump();
+ afx_msg void OnVSTPresetForwardJump();
afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //rewbs.customKeys
//Overridden methods:
Modified: trunk/OpenMPT/mptrack/AutoSaver.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AutoSaver.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/AutoSaver.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -185,7 +185,7 @@
if (pModDoc->m_bHasValidPath) { // Check that the file has a user-chosen path
name = pModDoc->GetPathName();
} else { // if it doesnt, put it in executable dir
- name = CMainFrame::m_csExecutablePath + "\\" + pModDoc->GetTitle();
+ name = CMainFrame::m_csExecutableDirectoryPath + pModDoc->GetTitle();
}
} else {
@@ -263,7 +263,7 @@
CString fullPath = pModDoc->GetPathName();
path = fullPath.Left(fullPath.GetLength()-pModDoc->GetTitle().GetLength()); //remove file name if necessary
} else {
- path = CMainFrame::m_csExecutablePath + "\\";
+ path = CMainFrame::m_csExecutableDirectoryPath;
}
} else {
path = m_csPath;
Modified: trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -171,7 +171,8 @@
if(!m_pSndFile || !pModDoc) return;
- // Stop player
+
+ // Stop player (is this necessary?)
CModDoc *pActiveMod = NULL;
HWND followSong = pMainFrm->GetFollowSong(pModDoc);
if(pMainFrm->IsPlaying()){
@@ -181,9 +182,7 @@
EnterCriticalSection(&applying);
- MODCOMMAND *p = NULL,*newp = NULL;
- MODCHANNELSETTINGS settings[MAX_BASECHANNELS];
- UINT i,j,k,nChannels,newpat[MAX_BASECHANNELS],newMemory[4][MAX_BASECHANNELS];
+ UINT i,nChannels,newpat[MAX_BASECHANNELS],newMemory[4][MAX_BASECHANNELS];
// Count new number of channels , copy pattern pointers & manager internal store memory
nChannels = 0;
@@ -514,7 +513,7 @@
InvalidateRect(NULL,FALSE);
}
-void CChannelManagerDlg::OnTabSelchange(NMHDR* header, LRESULT* pResult)
+void CChannelManagerDlg::OnTabSelchange(NMHDR* /*header*/, LRESULT* /*pResult*/)
{
if(!show) return;
@@ -557,7 +556,7 @@
InvalidateRect(NULL, FALSE);
}
-void DrawChannelButton(HDC hdc, LPRECT lpRect, LPCSTR lpszText, BOOL bActivate, BOOL bEnable, DWORD dwFlags, HBRUSH markBrush)
+void DrawChannelButton(HDC hdc, LPRECT lpRect, LPCSTR lpszText, BOOL bActivate, BOOL bEnable, DWORD dwFlags, HBRUSH /*markBrush*/)
{
RECT rect;
rect = (*lpRect);
@@ -609,27 +608,27 @@
CRect wnd,btn;
GetWindowRect(&wnd);
- if(button = GetDlgItem(IDC_BUTTON1)){
+ if((button = GetDlgItem(IDC_BUTTON1)) != 0){
button->GetWindowRect(&btn);
button->SetWindowPos(NULL,btn.left-wnd.left-3,wnd.Height()-btn.Height()*2-6,0,0,SWP_NOSIZE | SWP_NOZORDER);
}
- if(button = GetDlgItem(IDC_BUTTON2)){
+ if((button = GetDlgItem(IDC_BUTTON2)) != 0){
button->GetWindowRect(&btn);
button->SetWindowPos(NULL,btn.left-wnd.left-3,wnd.Height()-btn.Height()*2-6,0,0,SWP_NOSIZE | SWP_NOZORDER);
}
- if(button = GetDlgItem(IDC_BUTTON3)){
+ if((button = GetDlgItem(IDC_BUTTON3)) != 0){
button->GetWindowRect(&btn);
button->SetWindowPos(NULL,btn.left-wnd.left-3,wnd.Height()-btn.Height()*2-6,0,0,SWP_NOSIZE | SWP_NOZORDER);
}
- if(button = GetDlgItem(IDC_BUTTON4)){
+ if((button = GetDlgItem(IDC_BUTTON4)) != 0){
button->GetWindowRect(&btn);
button->SetWindowPos(NULL,btn.left-wnd.left-3,wnd.Height()-btn.Height()*2-6,0,0,SWP_NOSIZE | SWP_NOZORDER);
}
- if(button = GetDlgItem(IDC_BUTTON5)){
+ if((button = GetDlgItem(IDC_BUTTON5)) != 0){
button->GetWindowRect(&btn);
button->SetWindowPos(NULL,btn.left-wnd.left-3,wnd.Height()-btn.Height()*2-6,0,0,SWP_NOSIZE | SWP_NOZORDER);
}
- if(button = GetDlgItem(IDC_BUTTON6)){
+ if((button = GetDlgItem(IDC_BUTTON6)) != 0){
button->GetWindowRect(&btn);
button->SetWindowPos(NULL,btn.left-wnd.left-3,wnd.Height()-btn.Height()*2-6,0,0,SWP_NOSIZE | SWP_NOZORDER);
}
@@ -856,9 +855,9 @@
CSoundFile * m_pSndFile = pModDoc ? pModDoc->GetSoundFile() : NULL;
if(pModDoc && m_pSndFile){
- UINT nChannels = m_pSndFile->m_nChannels;
+ //UINT nChannels = m_pSndFile->m_nChannels;
UINT nColns = CM_NB_COLS;
- UINT nLines = nChannels / nColns + (nChannels % nColns ? 1 : 0);
+ //UINT nLines = nChannels / nColns + (nChannels % nColns ? 1 : 0);
int x = point.x - client.left;
int y = point.y - client.top;
@@ -905,7 +904,7 @@
if(order) nChannelsOld = 0;
}
-LRESULT CChannelManagerDlg::OnMouseLeave(WPARAM wparam, LPARAM lparam)
+LRESULT CChannelManagerDlg::OnMouseLeave(WPARAM /*wparam*/, LPARAM /*lparam*/)
{
if(!m_hWnd || show == FALSE) return 0;
@@ -917,7 +916,7 @@
return 0;
}
-LRESULT CChannelManagerDlg::OnMouseHover(WPARAM wparam, LPARAM lparam)
+LRESULT CChannelManagerDlg::OnMouseHover(WPARAM /*wparam*/, LPARAM /*lparam*/)
{
if(!m_hWnd || show == FALSE) return 0;
@@ -954,7 +953,7 @@
LeaveCriticalSection(&applying);
}
-void CChannelManagerDlg::OnLButtonUp(UINT nFlags,CPoint point)
+void CChannelManagerDlg::OnLButtonUp(UINT /*nFlags*/,CPoint point)
{
if(!m_hWnd || show == FALSE) return;
@@ -1034,7 +1033,7 @@
LeaveCriticalSection(&applying);
}
-void CChannelManagerDlg::OnRButtonUp(UINT nFlags,CPoint point)
+void CChannelManagerDlg::OnRButtonUp(UINT /*nFlags*/,CPoint /*point*/)
{
if(!m_hWnd || show == FALSE) return;
@@ -1186,7 +1185,7 @@
return CModControlDlg::OnMouseWheel(nFlags, zDelta, pt);
}
-BOOL CCtrlPatterns::OnToolTip(UINT id, NMHDR *pNMHDR, LRESULT *pResult)
+BOOL CCtrlPatterns::OnToolTip(UINT /*id*/, NMHDR *pNMHDR, LRESULT* /*pResult*/)
//---------------------------------------------------------------------
{
TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -5,6 +5,8 @@
#include <stdio.h>
#include <stdlib.h>
+bool CCommandSet::s_bShowErrorOnUnknownKeybinding = true;
+
CCommandSet::CCommandSet(void)
{
// Which keybinding rules to enforce?
@@ -23,7 +25,6 @@
enforceRule[krPropagateSampleManipulation] = true;
// enforceRule[krCheckContextHierarchy] = true;
-
commands.SetSize(kcNumCommands);
SetupCommands();
SetupContextHierarchy();
@@ -3120,11 +3121,11 @@
CString err;
if (errorCount<10) {
err.Format("Line %d in key binding file %s was not understood.", l, fileName);
- ::MessageBox(NULL, err, "", MB_ICONEXCLAMATION|MB_OK);
+ if(s_bShowErrorOnUnknownKeybinding) ::MessageBox(NULL, err, "", MB_ICONEXCLAMATION|MB_OK);
Log(err);
} else if (errorCount==10) {
err.Format("Too many errors detected, not reporting any more.");
- ::MessageBox(NULL, err, "", MB_ICONEXCLAMATION|MB_OK);
+ if(s_bShowErrorOnUnknownKeybinding) ::MessageBox(NULL, err, "", MB_ICONEXCLAMATION|MB_OK);
Log(err);
}
}
Modified: trunk/OpenMPT/mptrack/CommandSet.h
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.h 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/CommandSet.h 2007-11-17 17:59:58 UTC (rev 192)
@@ -1053,8 +1053,10 @@
//CArray<CArray<bool,bool>, CArray<bool,bool> > m_isParentContext;
bool m_isParentContext[kCtxMaxInputContexts][kCtxMaxInputContexts];
bool enforceRule[kNumRules];
+
+public:
+ static bool s_bShowErrorOnUnknownKeybinding;
-public:
CCommandSet(void);
~CCommandSet(void);
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -2435,18 +2435,18 @@
sel -= 1;
CTuningCollection* tc = 0;
- if(sel < CSoundFile::s_TuningsSharedStandard.GetNumTunings())
- tc = &CSoundFile::s_TuningsSharedStandard;
+ if(sel < CSoundFile::GetStandardTunings().GetNumTunings())
+ tc = &CSoundFile::GetStandardTunings();
else
{
- sel -= CSoundFile::s_TuningsSharedStandard.GetNumTunings();
- if(sel < CSoundFile::s_TuningsSharedLocal.GetNumTunings())
- tc = &CSoundFile::s_TuningsSharedLocal;
+ sel -= CSoundFile::GetStandardTunings().GetNumTunings();
+ if(sel < CSoundFile::GetLocalTunings().GetNumTunings())
+ tc = &CSoundFile::GetLocalTunings();
else
{
- sel -= CSoundFile::s_TuningsSharedLocal.GetNumTunings();
- if(sel < m_pSndFile->m_TuningsTuneSpecific.GetNumTunings())
- tc = &m_pSndFile->m_TuningsTuneSpecific;
+ sel -= CSoundFile::GetLocalTunings().GetNumTunings();
+ if(sel < m_pSndFile->GetTuneSpecificTunings().GetNumTunings())
+ tc = &m_pSndFile->GetTuneSpecificTunings();
}
}
@@ -2463,17 +2463,17 @@
//Case: Chosen tuning editor to be displayed.
//Creating vector for the CTuningDialog.
vector<CTuningCollection*> v;
- v.push_back(&m_pSndFile->s_TuningsSharedStandard);
- v.push_back(&m_pSndFile->s_TuningsSharedLocal);
- v.push_back(&m_pSndFile->m_TuningsTuneSpecific);
+ v.push_back(&m_pSndFile->GetStandardTunings());
+ v.push_back(&m_pSndFile->GetLocalTunings());
+ v.push_back(&m_pSndFile->GetTuneSpecificTunings());
CTuningDialog td(this, v, pInstH->pTuning);
td.DoModal();
- if(td.GetModifiedStatus(&m_pSndFile->s_TuningsSharedLocal))
+ if(td.GetModifiedStatus(&m_pSndFile->GetLocalTunings()))
{
if(MsgBox(IDS_APPLY_TUNING_MODIFICATIONS, this, "", MB_OKCANCEL) == IDOK)
m_pSndFile->SaveStaticTunings();
}
- if(td.GetModifiedStatus(&m_pSndFile->m_TuningsTuneSpecific))
+ if(td.GetModifiedStatus(&m_pSndFile->GetTuneSpecificTunings()))
{
m_pModDoc->SetModified();
}
@@ -2500,29 +2500,29 @@
return;
}
- for(size_t i = 0; i < CSoundFile::s_TuningsSharedStandard.GetNumTunings(); i++)
+ for(size_t i = 0; i < CSoundFile::GetStandardTunings().GetNumTunings(); i++)
{
- if(penv->pTuning == &CSoundFile::s_TuningsSharedStandard.GetTuning(i))
+ if(penv->pTuning == &CSoundFile::GetStandardTunings().GetTuning(i))
{
m_ComboTuning.SetCurSel(i+1);
return;
}
}
- for(size_t i = 0; i < CSoundFile::s_TuningsSharedLocal.GetNumTunings(); i++)
+ for(size_t i = 0; i < CSoundFile::GetLocalTunings().GetNumTunings(); i++)
{
- if(penv->pTuning == &CSoundFile::s_TuningsSharedLocal.GetTuning(i))
+ if(penv->pTuning == &CSoundFile::GetLocalTunings().GetTuning(i))
{
- m_ComboTuning.SetCurSel(i+CSoundFile::s_TuningsSharedStandard.GetNumTunings()+1);
+ m_ComboTuning.SetCurSel(i+CSoundFile::GetStandardTunings().GetNumTunings()+1);
return;
}
}
- for(size_t i = 0; i < m_pSndFile->m_TuningsTuneSpecific.GetNumTunings(); i++)
+ for(size_t i = 0; i < m_pSndFile->GetTuneSpecificTunings().GetNumTunings(); i++)
{
- if(penv->pTuning == &m_pSndFile->m_TuningsTuneSpecific.GetTuning(i))
+ if(penv->pTuning == &m_pSndFile->GetTuneSpecificTunings().GetTuning(i))
{
- m_ComboTuning.SetCurSel(i+CSoundFile::s_TuningsSharedStandard.GetNumTunings() + CSoundFile::s_TuningsSharedLocal.GetNumTunings()+1);
+ m_ComboTuning.SetCurSel(i+CSoundFile::GetStandardTunings().GetNumTunings() + CSoundFile::GetLocalTunings().GetNumTunings()+1);
return;
}
}
@@ -2637,17 +2637,17 @@
m_ComboTuning.DeleteString(0);
m_ComboTuning.AddString("OMPT IT behavior"); //<-> Instrument pTuning pointer == NULL
- for(size_t i = 0; i<CSoundFile::s_TuningsSharedStandard.GetNumTunings(); i++)
+ for(size_t i = 0; i<CSoundFile::GetStandardTunings().GetNumTunings(); i++)
{
- m_ComboTuning.AddString(CSoundFile::s_TuningsSharedStandard.GetTuning(i).GetName().c_str());
+ m_ComboTuning.AddString(CSoundFile::GetStandardTunings().GetTuning(i).GetName().c_str());
}
- for(size_t i = 0; i<CSoundFile::s_TuningsSharedLocal.GetNumTunings(); i++)
+ for(size_t i = 0; i<CSoundFile::GetLocalTunings().GetNumTunings(); i++)
{
- m_ComboTuning.AddString(CSoundFile::s_TuningsSharedLocal.GetTuning(i).GetName().c_str());
+ m_ComboTuning.AddString(CSoundFile::GetLocalTunings().GetTuning(i).GetName().c_str());
}
- for(size_t i = 0; i<m_pSndFile->m_TuningsTuneSpecific.GetNumTunings(); i++)
+ for(size_t i = 0; i<m_pSndFile->GetTuneSpecificTunings().GetNumTunings(); i++)
{
- m_ComboTuning.AddString(m_pSndFile->m_TuningsTuneSpecific.GetTuning(i).GetName().c_str());
+ m_ComboTuning.AddString(m_pSndFile->GetTuneSpecificTunings().GetTuning(i).GetName().c_str());
}
m_ComboTuning.AddString("Control tunings...");
m_ComboTuning.SetCurSel(0);
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.h
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.h 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.h 2007-11-17 17:59:58 UTC (rev 192)
@@ -5,7 +5,9 @@
class CNoteMapWnd;
class CCtrlInstruments;
+using std::pair;
+
//===============================
class CNoteMapWnd: public CStatic
//===============================
Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Draw_pat.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -7,7 +7,7 @@
#include "view_pat.h"
#include "EffectVis.h" //rewbs.fxvis
#include "ChannelManagerDlg.h"
-#include "../soundlib/tuning_template.h"
+#include "../soundlib/tuningbase.h"
#include <string>
using std::string;
@@ -322,7 +322,7 @@
{
if(pTuning)
{
- string noteStr = pTuning->GetNoteName(static_cast<CTuning::STEPTYPE>(note-NOTE_MIDDLEC));
+ string noteStr = pTuning->GetNoteName(note-NOTE_MIDDLEC);
noteStr.resize(3, ' ');
DrawLetter(x, y, noteStr[0]);
DrawLetter(x + pfnt->nNoteWidth/2, y, noteStr[1]);
Modified: trunk/OpenMPT/mptrack/InputHandler.cpp
===================================================================
--- trunk/OpenMPT/mptrack/InputHandler.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/InputHandler.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -19,6 +19,7 @@
//Init CommandSet and Load defaults
activeCommandSet = new CCommandSet();
+ CCommandSet::s_bShowErrorOnUnknownKeybinding = (CMainFrame::GetMainFrame()->GetPrivateProfileLong("Misc", "ShowErrorOnUnknownKeybinding", 1, theApp.GetConfigFileName()) != 0);
CString workingDir;
char wd[255];
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -260,7 +260,7 @@
CAutoSaver *CMainFrame::m_pAutoSaver = NULL; //rewbs.autosave
CPerformanceCounter *CMainFrame::m_pPerfCounter = NULL;
-CString CMainFrame::m_csExecutablePath = "";
+CString CMainFrame::m_csExecutableDirectoryPath = "";
static UINT indicators[] =
{
@@ -278,16 +278,17 @@
CMainFrame::CMainFrame()
//----------------------
{
- char wd[255];
- _getdcwd(_getdrive(), wd, 255);
- m_csExecutablePath = wd; //Assume working dir is executable path at this stage.
+ {
+ char path[_MAX_PATH];
+ char exedrive[_MAX_DRIVE];
+ char exedir[_MAX_DIR];
+ GetModuleFileName(NULL, path, MAX_PATH);
+ _splitpath(path, exedrive, exedir, NULL, NULL);
+ memset(path, 0, sizeof(path));
+ _makepath(path, exedrive, exedir, NULL, NULL);
+ m_csExecutableDirectoryPath = path; //path should end with \
+ }
- //Relabs.note: m_csExecutablePath doesn't give right path
- //at least for debug builds.
- #ifdef DEBUG
- m_csExecutablePath += "\\bin";
- #endif
-
m_bModTreeHasFocus = false; //rewbs.customKeys
m_pNoteMapHasFocus = NULL; //rewbs.customKeys
m_bOptionsLocked = false; //rewbs.customKeys
@@ -614,7 +615,6 @@
title += CString(" ") + GetFullVersionString();
SetTitle(title);
OnUpdateFrameTitle(false);
-
// Load Chords
theApp.LoadChords(Chords);
@@ -664,6 +664,7 @@
delete m_pPerfCounter;
CChannelManagerDlg::DestroySharedInstance();
+ CSoundFile::DeleteStaticdata();
}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
@@ -1903,7 +1904,7 @@
if (m_pSndFile)
{
//m_pSndFile->LoopPattern(-1);
- //Relabs.note: Commented above line - why loop should be disabled when pausing?
+ //Commented above line - why loop should be disabled when pausing?
m_pSndFile->m_dwSongFlags &= ~SONG_PAUSED;
if (m_pSndFile == &m_WaveFile) {
@@ -2939,3 +2940,4 @@
}
}
}
+
Modified: trunk/OpenMPT/mptrack/Mainfrm.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainfrm.h 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/Mainfrm.h 2007-11-17 17:59:58 UTC (rev 192)
@@ -168,7 +168,7 @@
#define NUM_VUMETER_PENS 32
-// Pattern Setup
+// Pattern Setup (contains also non-pattern related settings)
#define PATTERN_PLAYNEWNOTE 0x01
#define PATTERN_LARGECOMMENTS 0x02
#define PATTERN_STDHIGHLIGHT 0x04
@@ -207,6 +207,7 @@
#define PATTERN_SYNCMUTE 0x1000000
#define PATTERN_AUTODELAY 0x2000000
+
// Keyboard Setup
enum {
KEYBOARD_CUSTOM=0,
@@ -356,7 +357,7 @@
CString m_csRegExt;
CString m_csRegSettings;
CString m_csRegWindow;
- static CString m_csExecutablePath;
+ static CString m_csExecutableDirectoryPath; //To contain path of executable directory
// Globals
static UINT m_nLastOptionsPage, m_nFilterIndex;
static BOOL gbMdiMaximize;
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -107,6 +107,7 @@
// -> DESC="channels management dlg"
ReinitRecordState();
// -! NEW_FEATURE#0015
+ m_ShowSavedialog = false;
}
@@ -342,10 +343,10 @@
case MOD_TYPE_DSM:
case MOD_TYPE_AMF:
case MOD_TYPE_PSM:
- m_SndFile.m_nType = MOD_TYPE_S3M;
+ m_SndFile.ChangeModTypeTo(MOD_TYPE_S3M);
break;
default:
- m_SndFile.m_nType = MOD_TYPE_IT;
+ m_SndFile.ChangeModTypeTo(MOD_TYPE_IT);
}
// -> CODE#0015
@@ -523,8 +524,9 @@
ErrorBox(IDS_ERR_SAVESONG, CMainFrame::GetMainFrame());
return FALSE;
}
- if ((!lpszPathName) || (!lpszPathName[0]))
+ if ((!lpszPathName) || (!lpszPathName[0]) || m_ShowSavedialog)
{
+ m_ShowSavedialog = false;
_splitpath(m_strPathName, drive, path, fname, NULL);
if (!fname[0]) strcpy(fname, m_strTitle);
strcpy(s, drive);
@@ -1351,7 +1353,7 @@
// -> DESC="wav export update"
UINT p = 0,n = 1;
DWORD flags[MAX_BASECHANNELS];
- CHAR channel[MAX_CHANNELNAME+2];
+ CHAR channel[MAX_CHANNELNAME+10];
// Channel mode : save song in multiple wav files (one for each enabled channels)
if(wsdlg.m_bChannelMode){
@@ -1423,8 +1425,6 @@
if(!wsdlg.m_bChannelMode || !(flags[i] & CHN_MUTE)){
// rewbs.fix3239
m_SndFile.SetCurrentPos(0);
- //Relabs.note: Since I removed pattern loop disabling from certain
- //methods, making sure that pattern loop is off.
m_SndFile.m_dwSongFlags &= ~SONG_PATTERNLOOP;
if (wsdlg.m_bSelectPlay) {
m_SndFile.SetCurrentOrder(wsdlg.m_nMinOrder);
@@ -1628,7 +1628,6 @@
}
END_CRITICAL();
//m_SndFile.m_dwSongFlags &= ~(SONG_STEP|SONG_PAUSED);
- //Relabs.note: Added SONG_PATTERNLOOP.
m_SndFile.m_dwSongFlags &= ~(SONG_STEP|SONG_PAUSED|SONG_PATTERNLOOP);
pMainFrm->PlayMod(this, m_hWndFollow, m_dwNotifyType);
}
@@ -1705,7 +1704,6 @@
pMainFrm->PauseMod();
//m_SndFile.m_dwSongFlags &= ~SONG_STEP;
- //Relabs.hack: Added SONG_PATTERNLOOP
m_SndFile.m_dwSongFlags &= ~(SONG_STEP|SONG_PATTERNLOOP);
m_SndFile.SetCurrentPos(0);
pMainFrm->ResetElapsedTime();
@@ -3013,29 +3011,37 @@
void CModDoc::ChangeFileExtension(UINT nNewType)
//----------------------------------------------
{
- CHAR path[_MAX_PATH], drive[_MAX_PATH], fname[_MAX_FNAME];
- _splitpath(GetPathName(), drive, path, fname, NULL);
+ //Not making path if path is empty(case only(?) for new file)
+ if(GetPathName().GetLength() > 0)
+ {
+ CHAR path[_MAX_PATH], drive[_MAX_PATH], fname[_MAX_FNAME];
+ _splitpath(GetPathName(), drive, path, fname, NULL);
- CString newPath = drive;
- newPath += path;
+ CString newPath = drive;
+ newPath += path;
- //Catch case where we don't have a filename yet.
- if (fname[0] == 0) {
- newPath += GetTitle();
- } else {
- newPath += fname;
+ //Catch case where we don't have a filename yet.
+ if (fname[0] == 0) {
+ newPath += GetTitle();
+ } else {
+ newPath += fname;
+ }
+
+ switch(nNewType)
+ {
+ case MOD_TYPE_XM: newPath += ".xm"; break;
+ case MOD_TYPE_IT: m_SndFile.m_dwSongFlags & SONG_ITPROJECT ? newPath+=".itp" : newPath+=".it"; break;
+ case MOD_TYPE_MPT: newPath += ".mptm"; break;
+ case MOD_TYPE_S3M: newPath += ".s3m"; break;
+ case MOD_TYPE_MOD: newPath += ".mod"; break;
+ default: ASSERT(false);
+ }
+ SetPathName(newPath, FALSE);
+ if(GetSoundFile() && GetSoundFile()->GetType() != nNewType) m_ShowSavedialog = true;
+ //Forcing savedialog to appear after extension change - otherwise
+ //unnotified file overwriting may occur.
}
- switch(nNewType)
- {
- case MOD_TYPE_XM: newPath += ".xm"; break;
- case MOD_TYPE_IT: m_SndFile.m_dwSongFlags & SONG_ITPROJECT ? newPath+=".itp" : newPath+=".it"; break;
- case MOD_TYPE_MPT: newPath += ".mptm"; break;
- case MOD_TYPE_S3M: newPath += ".s3m"; break;
- case MOD_TYPE_MOD: newPath += ".mod"; break;
- default: ASSERT(false);
- }
- SetPathName(newPath, FALSE);
UpdateAllViews(NULL, HINT_MODTYPE);
}
@@ -3090,7 +3096,6 @@
CString message;
message.Format("Param %d can already be controlled with macro %X", paramToUse, checkMacro);
CMainFrame::GetMainFrame()->MessageBox(message, "Macro exists for this param",MB_ICONINFORMATION | MB_OK);
- //Relabs.expl: Modified to prevent notification box go 'under' ompt to block key messages.
return;
}
}
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2007-11-17 17:59:58 UTC (rev 192)
@@ -89,6 +89,8 @@
DWORD m_dwNotifyType;
PATTERNUNDOBUFFER PatternUndo[MAX_UNDO_LEVEL];
+ bool m_ShowSavedialog;
+
// -> CODE#0015
// -> DESC="channels management dlg"
BYTE MultiRecordMask[(MAX_CHANNELS+7)/8];
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -1389,10 +1389,6 @@
BOOL CModDoc::ExpandPattern(UINT nPattern)
//----------------------------------------
{
-
- MODCOMMAND *newPattern, *oldPattern;
- UINT nRows, nChns;
-
// -> CODE#0008
// -> DESC="#define to set pattern size"
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -189,7 +189,28 @@
//0,/*rewbs.smoothVST*/ ,0/*rewbs.velocity*/,
};
+static void ShowChangesDialog()
+//-----------------------------
+{
+ CString firstOpenMessage = "OpenMPT version " + CMainFrame::GetFullVersionString();
+ firstOpenMessage += ". This is a development build primarily aimed for testing.\n\nChanges:\n\n"
+ "[New] Windows keys can be used as modifiers in the keyboard configuration(disables Windows start menu pop-up if used in the active keyboard configuration).\n"
+ "[New] Name filter in plugin selection dialog.\n"
+ "[Imp] Improved preset navigation in VST window.\n"
+ "[Imp] Improvements in IT compatible play.\n"
+ "[Imp] Improvements in user defined tuning modes.\n"
+ "[Fix] Fixed possible unnotified file overwriting when saving unsaved file.\n"
+ "[Fix] Fixed wrong version number in IT files saved with compatibility save.\n"
+ "[Fix] Fixed broken note preview for certain type of instruments in instrument tab.\n"
+ "[Fix] Fixed possible crash when exporting wav in channel mode with long channel name.\n"
+ "[Fix] Fixed channel position jump when clicking VST box in channel header.\n"
+ "[Fix] Fixed possible searching of wrong parameter in pattern search.\n"
+ "[Misc] Update check disabled and miscellaneous other changes.";
+ CMainFrame::GetMainFrame()->MessageBox(firstOpenMessage, "OpenMPT v." + CMainFrame::GetFullVersionString(), MB_ICONINFORMATION);
+}
+
+
/////////////////////////////////////////////////////////////////////////////
// MPTRACK Command Line options
@@ -424,6 +445,7 @@
}
void CTrackApp::LoadRegistryDLS()
+//-------------------------------
{
CHAR szFileNameX[_MAX_PATH];
HKEY keyX;
@@ -649,6 +671,7 @@
m_szConfigFileName[0] = 0;
m_szStringsFileName[0] = 0;
+
if (GetModuleFileName(NULL, m_szConfigFileName, sizeof(m_szConfigFileName)))
{
CHAR szDrive[_MAX_DRIVE]="", szDir[_MAX_PATH]="";
@@ -786,6 +809,7 @@
m_dwTimeStarted = timeGetTime();
m_bInitialized = TRUE;
+ /*
if (CMainFrame::gnCheckForUpdates) {
try {
UpdateCheck();
@@ -795,10 +819,12 @@
// we will end up here if the dll cannot be foung (e.g. on win98).
}
}
+ */
- // Open settings if this is the previous execution was with an earlier version.
+ // Open settings if the previous execution was with an earlier version.
if (!cmdInfo.m_bNoSettingsOnNewVersion && CMainFrame::gcsPreviousVersion < CMainFrame::GetFullVersionString()) {
StopSplashScreen();
+ ShowChangesDialog();
m_pMainWnd->PostMessage(WM_COMMAND, ID_VIEW_OPTIONS);
}
@@ -1576,12 +1602,12 @@
m_bmp.LoadBitmap(MAKEINTRESOURCE(IDB_MPTRACK));
wsprintf(s, "Build Date: %s", gszBuildDate);
SetDlgItemText(IDC_EDIT2, s);
- SetDlgItemText(IDC_EDIT3, CString("Open Modplug Tracker, version ") + CMainFrame::GetFullVersionString());
+ SetDlgItemText(IDC_EDIT3, CString("Open Modplug Tracker, version ") + CMainFrame::GetFullVersionString() + " (development build)");
m_heContact.SetWindowText(
"Contact / Discussion:\r\n\
http://modplug.sourceforge.net/forum\r\n\
-\r\n\Updates:\r\n\
+\r\nUpdates:\r\n\
http://modplug.sourceforge.net/builds/#dev");
char *pArrCredit = {
@@ -1591,7 +1617,7 @@
"|"
"Contributors:|"
"Robin Fernandes: ro...@so... (2004-2007)|"
- "Ahti Leppan: rel...@us... (2005-2007)|"
+ "Ahti Lepp\xE4nen: aa...@dn... (2005-2007)|"
"Sergiy Pylypenko: x.p...@gm... (2007)|"
"Eric Chavanon: co...@er... (2004-2005)|"
"Trevor Nunes: mo...@pl... (2004)|"
@@ -1635,6 +1661,7 @@
//--------------------------
{
if (gpAboutDlg) return;
+ ShowChangesDialog();
gpAboutDlg = new CAboutDlg();
gpAboutDlg->Create(IDD_ABOUTBOX, m_pMainWnd);
}
@@ -2960,6 +2987,7 @@
//rewbs.crashHandler
LRESULT CTrackApp::ProcessWndProcException(CException* e, const MSG* pMsg)
+//-----------------------------------------------------------------------
{
// TODO: Add your specialized code here and/or call the base class
Log("Unhandled Exception\n");
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2007-11-17 17:59:58 UTC (rev 192)
@@ -15,6 +15,7 @@
#include "resource.h" // main symbols
#include "sndfile.h"
#include <windows.h>
+#include <Specstrings.h> // In VC2003, '__in' was undefined in winhttp.h
#include <winhttp.h>
class CModDoc;
Modified: trunk/OpenMPT/mptrack/OrderToPatternTable.cpp
===================================================================
--- trunk/OpenMPT/mptrack/OrderToPatternTable.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/OrderToPatternTable.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -9,7 +9,7 @@
{
if(memLength < sizeof(s_Version) + sizeof(size_t)) return 0;
WORD version = 0;
- size_t s = 0;
+ uint32 s = 0;
DWORD memPos = 0;
memcpy(&version, src, sizeof(version));
memPos += sizeof(version);
@@ -55,7 +55,7 @@
//Version
fwrite(&s_Version, sizeof(s_Version), 1, f);
- const size_t s = size();
+ const uint32 s = size();
//Size
fwrite(&s, sizeof(s), 1, f);
//Values
Modified: trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -42,7 +42,7 @@
{
char buffer[10];
GetDlgItemText(IDC_EDIT_FACTOR, buffer, 9);
- float factor = static_cast<float>(atof(buffer));
+ float factor = ConvertStrTo<float>(buffer);
if(factor > 0)
{
WORD (*array)[MAX_ENVPOINTS] = NULL;
@@ -69,7 +69,7 @@
{
for(UINT i = 0; i<*arraySize; i++)
{
- (*array)[i] *= factor;
+ (*array)[i] = static_cast<WORD>(factor * (*array)[i]);
//Checking that the order of points is preserved.
if(i > 0 && (*array)[i] <= (*array)[i-1])
Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp
===================================================================
--- trunk/OpenMPT/mptrack/TuningDialog.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/TuningDialog.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -5,13 +5,23 @@
#include "misc_util.h"
#include ".\tuningdialog.h"
-const string CTuningDialog::s_stringTypeGEN = "General";
-const string CTuningDialog::s_stringTypeRP = "Ratio periodic";
-const string CTuningDialog::s_stringTypeTET = "TET";
-
const CTuningDialog::TUNINGTREEITEM CTuningDialog::s_notFoundItemTuning = TUNINGTREEITEM();
const HTREEITEM CTuningDialog::s_notFoundItemTree = NULL;
+using CTuning::UNOTEINDEXTYPE;
+using CTuning::RATIOTYPE;
+#define TT_GENERAL CTuning::TT_GENERAL
+#define TT_GROUPGEOMETRIC CTuning::TT_GROUPGEOMETRIC
+#define TT_GEOMETRIC CTuning::TT_GEOMETRIC
+#define EM_CONST CTuning::EM_CONST
+#define EM_CONST_STRICT CTuning::EM_CONST_STRICT
+#define TUNINGTYPE CTuning::TUNINGTYPE
+#define NOTEINDEXTYPE CTuning::NOTEINDEXTYPE
+#define EM_ALLOWALL CTuning::EM_ALLOWALL
+
+using namespace std;
+
+
/*
TODOS:
-Clear tuning
@@ -144,9 +154,11 @@
//--------------------------------
{
CDialog::OnInitDialog();
-
+
m_RatioMapWnd.Init(this, 0);
+ SetDlgItemText(IDC_TUNINGTYPE_DESC, "");
+
//-->Creating treeview
m_TreeItemTuningItemMap.ClearMapping();
for(size_t i = 0; i<m_TuningCollections.size(); i++)
@@ -158,9 +170,9 @@
m_pActiveTuningCollection = GetpTuningCollection(m_pActiveTuning);
//Adding tuning type names to corresponding combobox.
- m_CombobTuningType.AddString(s_stringTypeGEN.c_str());
- m_CombobTuningType.AddString(s_stringTypeRP.c_str());
- m_CombobTuningType.AddString(s_stringTypeTET.c_str());
+ m_CombobTuningType.AddString(CTuning::s_TuningTypeStrGeneral);
+ m_CombobTuningType.AddString(CTuning::s_TuningTypeStrGroupGeometric);
+ m_CombobTuningType.AddString(CTuning::s_TuningTypeStrGeometric);
m_ButtonSet.EnableWindow(FALSE);
@@ -169,8 +181,11 @@
m_EditTuningCollectionEditMask.ShowWindow(SW_SHOW);
//#endif
+ m_EditSteps.SetLimitText(2);
m_EditFineTuneSteps.SetLimitText(3);
+ if(m_pActiveTuning) m_RatioMapWnd.m_nNote = m_RatioMapWnd.m_nNoteCentre + m_pActiveTuning->GetValidityRange().first + (m_pActiveTuning->GetValidityRange().second - m_pActiveTuning->GetValidityRange().first)/2 + 1;
+
UpdateView();
return TRUE;
@@ -245,15 +260,16 @@
m_RatioMapWnd.Invalidate();
UpdateRatioMapEdits(m_RatioMapWnd.GetShownCentre());
- const CTuning::STEPTYPE period = m_pActiveTuning->GetPeriod();
- const CTuning::RATIOTYPE periodRatio = m_pActiveTuning->GetPeriodRatio();
+
+ const UNOTEINDEXTYPE period = m_pActiveTuning->GetGroupSize();
+ const RATIOTYPE GroupRatio = m_pActiveTuning->GetGroupRatio();
if(period > 0)
{
m_EditSteps.EnableWindow();
m_EditSteps.SetWindowText(Stringify(period).c_str());
m_EditRatioPeriod.EnableWindow();
- m_EditRatioPeriod.SetWindowText(Stringify(periodRatio).c_str());
+ m_EditRatioPeriod.SetWindowText(Stringify(GroupRatio).c_str());
}
else //case: m_pActiveTuning is of type general.
{
@@ -266,11 +282,11 @@
bool enableControls = true;
- if(m_pActiveTuning->GetEditMask() == CTuning::EM_CONST ||
- m_pActiveTuning->GetEditMask() == CTuning::EM_CONST_STRICT)
+ if(m_pActiveTuning->GetEditMask() == EM_CONST ||
+ m_pActiveTuning->GetEditMask() == EM_CONST_STRICT)
{
CheckDlgButton(IDC_CHECK_READONLY, MF_CHECKED);
- if(m_pActiveTuning->GetEditMask() == CTuning::EM_CONST_STRICT)
+ if(m_pActiveTuning->GetEditMask() == EM_CONST_STRICT)
m_ButtonReadOnly.EnableWindow(FALSE);
else
m_ButtonReadOnly.EnableWindow(TRUE);
@@ -315,6 +331,8 @@
m_EditFineTuneSteps.SetWindowText("");
m_EditName.SetWindowText("");
+ SetDlgItemText(IDC_TUNINGTYPE_DESC, "");
+
m_CombobTuningType.SetCurSel(-1);
m_ButtonReadOnly.EnableWindow(FALSE);
@@ -407,81 +425,78 @@
{
if(m_CombobTuningType.GetCount() < 3) m_DoErrorExit = true;
- if(m_pActiveTuning->GetTuningType() == CTuning::TT_TET)
+ if(m_pActiveTuning->GetTuningType() == TT_GEOMETRIC)
m_CombobTuningType.SetCurSel(2);
else
- if(m_pActiveTuning->GetTuningType() == CTuning::TT_RATIOPERIODIC)
+ if(m_pActiveTuning->GetTuningType() == TT_GROUPGEOMETRIC)
m_CombobTuningType.SetCurSel(1);
else
m_CombobTuningType.SetCurSel(0);
}
+ UpdateTuningDescription();
}
-CTuning::CTUNINGTYPE CTuningDialog::GetTuningTypeFromStr(const string& str) const
+TUNINGTYPE CTuningDialog::GetTuningTypeFromStr(const string& str) const
//--------------------------------------------------------------------------------
{
- if(str == s_stringTypeTET)
- return CTuning::TT_TET;
- if(str == s_stringTypeRP)
- return CTuning::TT_RATIOPERIODIC;
- return CTuning::TT_GENERAL;
+ return CTuning::GetTuningType(str.c_str());
}
void CTuningDialog::OnCbnSelchangeComboTtype()
//--------------------------------------------
{
- if(m_pActiveTuning == NULL)
- return;
-
-
- const CTuning::CTUNINGTYPE oldType = m_pActiveTuning->GetTuningType();
- const size_t BS = 20;
- char buffer[BS];
- m_CombobTuningType.GetWindowText(buffer, BS);
- const string strNewType = buffer;
- CTuning::CTUNINGTYPE newType = GetTuningTypeFromStr(strNewType);
- if(!m_pActiveTuning->DoesTypeInclude(newType))
+ if(m_pActiveTuning != NULL)
{
- if(MessageBox("This will change the ratio values; continue?", 0, MB_YESNO) == IDYES)
+ const TUNINGTYPE oldType = m_pActiveTuning->GetTuningType();
+ const size_t BS = 20;
+ char buffer[BS];
+ m_CombobTuningType.GetWindowText(buffer, BS);
+ const string strNewType = buffer;
+ TUNINGTYPE newType = GetTuningTypeFromStr(strNewType);
+ if(!m_pActiveTuning->IsOfType(newType))
{
- m_ModifiedTCs[GetpTuningCollection(m_pActiveTuning)] = true;
+ if(MessageBox("This action may change the ratio values; continue?", 0, MB_YESNO) == IDYES)
+ {
+ m_ModifiedTCs[GetpTuningCollection(m_pActiveTuning)] = true;
- const size_t BS = 20;
- char buffer[BS];
- m_EditSteps.GetWindowText(buffer, BS);
- CTuning::STEPTYPE steps = static_cast<CTuning::STEPTYPE>(atoi(buffer));
+ const size_t BS = 20;
+ char buffer[BS];
+ m_EditSteps.GetWindowText(buffer, BS);
+ NOTEINDEXTYPE steps = ConvertStrTo<NOTEINDEXTYPE>(buffer);
- m_EditRatioPeriod.GetWindowText(buffer, BS);
- CTuning::RATIOTYPE pr = static_cast<CTuning::RATIOTYPE>(atof(buffer));
+ m_EditRatioPeriod.GetWindowText(buffer, BS);
+ RATIOTYPE pr = ConvertStrTo<RATIOTYPE>(buffer);
- if(steps <= 0)
- steps = 1;
- if(pr <= 0)
- pr = 1;
+ if(steps <= 0)
+ steps = 1;
+ if(pr <= 0)
+ pr = 1;
- if(newType == CTuning::TT_RATIOPERIODIC)
- m_pActiveTuning->CreateRatioPeriodic(steps, pr);
- else
- if(newType == CTuning::TT_TET)
- m_pActiveTuning->CreateTET(steps, pr);
-
- UpdateView(UM_TUNINGDATA);
- }
- else //Not wanting to discard current values.
- {
- //Restoring tuning type combobox.
- if(oldType == CTuning::TT_TET)
- m_CombobTuningType.SetCurSel(2);
- else
+ if(newType == TT_GROUPGEOMETRIC)
+ m_pActiveTuning->CreateGroupGeometric(steps, pr, 0);
+ else
+ if(newType == TT_GEOMETRIC)
+ m_pActiveTuning->CreateGeometric(steps, pr);
+
+ UpdateView(UM_TUNINGDATA);
+ }
+ else //Not wanting to discard current values.
{
- if(oldType == CTuning::TT_RATIOPERIODIC)
- m_CombobTuningType.SetCurSel(1);
- else
- m_CombobTuningType.SetCurSel(0);
+ //Restoring tuning type combobox.
+ if(oldType == TT_GEOMETRIC)
+ m_CombobTuningType.SetCurSel(2);
+ else
+ {
+ if(oldType == TT_GROUPGEOMETRIC)
+ m_CombobTuningType.SetCurSel(1);
+ else
+ m_CombobTuningType.SetCurSel(0);
+ }
}
}
}
+ UpdateTuningDescription();
}
@@ -509,7 +524,7 @@
if(!m_pActiveTuning)
return;
- const CTuning::STEPTYPE currentNote = m_RatioMapWnd.GetShownCentre();
+ const NOTEINDEXTYPE currentNote = m_RatioMapWnd.GetShownCentre();
const size_t BS = 5;
char buffer[BS];
m_EditNotename.GetWindowText(buffer, BS);
@@ -541,7 +556,7 @@
if(!m_pActiveTuning)
return;
- const CTuning::STEPTYPE currentNote = m_RatioMapWnd.GetShownCentre();
+ const NOTEINDEXTYPE currentNote = m_RatioMapWnd.GetShownCentre();
const size_t BS = 12;
char buffer[BS];
@@ -549,7 +564,7 @@
string str = buffer;
if(str.length() > 0)
{
- m_pActiveTuning->SetRatio(currentNote, static_cast<CTuning::RATIOTYPE>(atof(buffer)));
+ m_pActiveTuning->SetRatio(currentNote, ConvertStrTo<RATIOTYPE>(buffer));
m_ModifiedTCs[GetpTuningCollection(m_pActiveTuning)] = true;
UpdateTuningType();
m_RatioMapWnd.Invalidate();
@@ -568,21 +583,21 @@
const size_t BS = 20;
char buffer[BS];
m_EditMiscActions.GetWindowText(buffer, BS);
- m_pActiveTuning->Multiply(static_cast<CTuning::RATIOTYPE>(atof(buffer)));
+ m_pActiveTuning->Multiply(ConvertStrTo<RATIOTYPE>(buffer));
m_ModifiedTCs[GetpTuningCollection(m_pActiveTuning)] = true;
m_EditMiscActions.SetWindowText("");
m_RatioMapWnd.Invalidate();
}
}
-void CTuningDialog::UpdateRatioMapEdits(const CTuning::STEPTYPE& note)
+void CTuningDialog::UpdateRatioMapEdits(const NOTEINDEXTYPE& note)
//-----------------------------------------------------------
{
if(m_pActiveTuning == NULL)
return;
m_RatioEditApply = false;
- m_EditRatio.SetWindowText(Stringify(m_pActiveTuning->GetFrequencyRatio(note)).c_str());
+ m_EditRatio.SetWindowText(Stringify(m_pActiveTuning->GetRatio(note)).c_str());
m_NoteEditApply = false;
m_EditNotename.SetWindowText(m_pActiveTuning->GetNoteName(note).c_str());
@@ -625,12 +640,12 @@
if(ext == CTuning::s_FileExtension)
{
if(pT != NULL)
- failure = pT->SerializeBinary(fout);
+ failure = pT->Serialize(fout);
}
else //Case: Saving tuning collection.
if(ext == CTuningCollection::s_FileExtension)
if(pTC != NULL)
- failure = pTC->SerializeBinary(fout);
+ failure = pTC->Serialize(fout);
fout.close();
EndWaitCursor();
@@ -663,13 +678,12 @@
if(ext == CTuning::s_FileExtension)
{
ifstream fin(dlg.GetPathName(), ios::binary);
- CTuning* pT = new CTuningRTI;
- failure = pT->UnSerializeBinary(fin);
+ CTuning* pT = CTuningRTI::UnserializeOLD(fin);
+ if(pT == 0) {fin.clear(); fin.seekg(0); pT = CTuning::Unserialize(fin);}
fin.close();
- if(failure)
- delete pT;
- else
+ if(pT)
{
+ failure = false;
m_TempTunings.AddTuning(pT);
m_pActiveTuning = pT;
@@ -686,7 +700,7 @@
//directly replace some collection.
CTuningCollection* pNewTCol = new CTuningCollection;
pNewTCol->SetSavefilePath(static_cast<LPCTSTR>(dlg.GetPathName()));
- failure = pNewTCol->UnSerializeBinary();
+ failure = pNewTCol->Unserialize();
if(failure)
{
delete pNewTCol; pNewTCol = 0;
@@ -702,10 +716,8 @@
}
}
-
-
if(failure)
- ErrorBox(IDS_ERR_FILEOPEN, this);
+ ErrorBox(IDS_OPERATION_FAIL, this);
}
void CTuningDialog::OnEnChangeEditFinetunesteps()
@@ -722,7 +734,7 @@
const BYTE BS = 5;
char buffer[BS];
m_EditFineTuneSteps.GetWindowText(buffer, BS);
- m_EditFineTuneSteps.SetWindowText(Stringify(m_pActiveTuning->SetFineStepCount(static_cast<CTuning::FINESTEPTYPE>(atoi(buffer)))).c_str());
+ m_EditFineTuneSteps.SetWindowText(Stringify(m_pActiveTuning->SetFineStepCount(ConvertStrTo<CTuning::USTEPINDEXTYPE>(buffer))).c_str());
m_ModifiedTCs[GetpTuningCollection(m_pActiveTuning)] = true;
m_EditFineTuneSteps.Invalidate();
}
@@ -737,14 +749,14 @@
if(IsDlgButtonChecked(IDC_CHECK_READONLY))
{
- if(m_pActiveTuning->SetEditMask(CTuning::EM_CONST))
+ if(m_pActiveTuning->SetEditMask(EM_CONST))
CheckDlgButton(IDC_CHECK_READONLY, MF_UNCHECKED);
else
UpdateView(UM_TUNINGDATA);
}
else
{
- if(m_pActiveTuning->SetEditMask(CTuning::EM_ALLOWALL))
+ if(m_pActiveTuning->SetEditMask(EM_ALLOWALL))
CheckDlgButton(IDC_CHECK_READONLY, MF_CHECKED);
else
UpdateView(UM_TUNINGDATA);
@@ -777,7 +789,7 @@
const size_t BS = 20;
char buffer[BS];
m_EditSteps.GetWindowText(buffer, BS);
- m_pActiveTuning->ChangePeriod(static_cast<CTuning::STEPTYPE>(atoi(buffer)));
+ m_pActiveTuning->ChangeGroupsize(ConvertStrTo<UNOTEINDEXTYPE>(buffer));
m_ModifiedTCs[GetpTuningCollection(m_pActiveTuning)] = true;
UpdateView(UM_TUNINGDATA);
}
@@ -792,7 +804,7 @@
const size_t BS = 20;
char buffer[BS];
m_EditRatioPeriod.GetWindowText(buffer, BS);
- m_pActiveTuning->ChangePeriodRatio(static_cast<CTuning::RATIOTYPE>(atof(buffer)));
+ m_pActiveTuning->ChangeGroupRatio(ConvertStrTo<RATIOTYPE>(buffer));
m_ModifiedTCs[GetpTuningCollection(m_pActiveTuning)] = true;
UpdateView(UM_TUNINGDATA);
}
@@ -847,7 +859,7 @@
CTuningCollection& rCurTCol = *m_TuningCollections.at(i);
for(size_t j = 0; j<rCurTCol.GetNumTunings(); j++)
{
- if(pT == &rCurTCol.GetTuning(static_cast<unsigned short>(j)))
+ if(pT == &rCurTCol.GetTuning(j))
{
return &rCurTCol;
}
@@ -863,7 +875,7 @@
//This methods gets called when selected item in the treeview
//changes.
- //TODO: This gets called before killfocus messages of edits, this
+ //TODO: This gets called before killfocus messages of edits, which
// can be a problem.
LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR);
@@ -903,7 +915,6 @@
//----------------------------------------------------------------------------
{
LPNMTREEVIEW pNMTreeView = reinterpret_cast<LPNMTREEVIEW>(pNMHDR);
- // TODO: Add your control notification handler code here
*pResult = 0;
if(pNMTreeView->itemOld.mask & TVIF_HANDLE && pNMTreeView->itemOld.hItem)
{
@@ -1243,7 +1254,7 @@
if(!m_pActiveTuningCollection)
return;
- if(m_pActiveTuningCollection->SerializeBinary())
+ if(m_pActiveTuningCollection->Serialize())
{
MsgBox(IDS_OPERATION_FAIL, this, NULL, MB_ICONINFORMATION);
}
@@ -1254,7 +1265,33 @@
}
}
+void CTuningDialog::UpdateTuningDescription()
+//-------------------------------------------
+{
+ switch(m_CombobTuningType.GetCurSel())
+ {
+ case 0:
+ SetDlgItemText(IDC_TUNINGTYPE_DESC, CTuning::GetTuningTypeDescription(TT_GENERAL));
+ break;
+ case 1:
+ SetDlgItemText(IDC_TUNINGTYPE_DESC, CTuning::GetTuningTypeDescription(TT_GROUPGEOMETRIC));
+ break;
+
+ case 2:
+ SetDlgItemText(IDC_TUNINGTYPE_DESC, CTuning::GetTuningTypeDescription(TT_GEOMETRIC));
+ break;
+
+ default:
+ if(m_pActiveTuning)
+ SetDlgItemText(IDC_TUNINGTYPE_DESC, m_pActiveTuning->GetTuningTypeDescription());
+ else
+ SetDlgItemText(IDC_TUNINGTYPE_DESC, "Unknown type");
+ break;
+ }
+}
+
+
////////////////////////////////////////////////////////
//***************
//CTuningTreeCtrl
Modified: trunk/OpenMPT/mptrack/TuningDialog.h
===================================================================
--- trunk/OpenMPT/mptrack/TuningDialog.h 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/TuningDialog.h 2007-11-17 17:59:58 UTC (rev 192)
@@ -42,7 +42,7 @@
void RemoveValue_1(const T1& a)
{
- vector<T1>::iterator iter = find(m_T1.begin(), m_T1.end(), a);
+ typename vector<T1>::iterator iter = find(m_T1.begin(), m_T1.end(), a);
if(iter != m_T1.end())
{
m_T2.erase(m_T2.begin() + (iter-m_T1.begin()));
@@ -52,7 +52,7 @@
void RemoveValue_2(const T2& b)
{
- vector<T2>::iterator iter = find(m_T2.begin(), m_T2.end(), b);
+ typename vector<T2>::iterator iter = find(m_T2.begin(), m_T2.end(), b);
if(iter != m_T2.end())
{
m_T1.erase(m_T1.begin() + (iter-m_T2.begin()));
@@ -62,7 +62,7 @@
T2 GetMapping_12(const T1& a) const
{
- vector<T1>::const_iterator iter = find(m_T1.begin(), m_T1.end(), a);
+ typename vector<T1>::const_iterator iter = find(m_T1.begin(), m_T1.end(), a);
if(iter != m_T1.end())
{
return m_T2[iter-m_T1.begin()];
@@ -73,7 +73,7 @@
T1 GetMapping_21(const T2& b) const
{
- vector<T2>::const_iterator iter = find(m_T2.begin(), m_T2.end(), b);
+ typename vector<T2>::const_iterator iter = find(m_T2.begin(), m_T2.end(), b);
if(iter != m_T2.end())
{
return m_T1[iter-m_T2.begin()];
@@ -102,8 +102,7 @@
CTuningDialog& m_rParentDialog;
public:
CTuningTreeCtrl(CTuningDialog* parent) : m_rParentDialog(*parent) {}
- //Note: Parent address may be given in initialiser list so
- //do not use it.
+ //Note: Parent address may be given in its initializer list.
void SetDragging(bool state = true) {m_Dragging = state;}
bool IsDragging() {return m_Dragging;}
@@ -198,7 +197,7 @@
BOOL OnInitDialog();
void AddTuningCollection(CTuningCollection* pTC) {if(pTC) m_TuningCollections.push_back(pTC);}
- void UpdateRatioMapEdits(const CTuning::STEPTYPE&);
+ void UpdateRatioMapEdits(const CTuning::NOTEINDEXTYPE&);
bool GetModifiedStatus(const CTuningCollection* const pTc) const;
@@ -209,8 +208,10 @@
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
private:
- CTuning::CTUNINGTYPE GetTuningTypeFromStr(const string& str) const;
+ CTuning::TUNINGTYPE GetTuningTypeFromStr(const string& str) const;
+ void UpdateTuningDescription();
+
void UpdateView(const int UpdateMask = 0);
void UpdateTuningType();
@@ -222,16 +223,17 @@
void OnEndDrag(HTREEITEM dragDestItem);
- CTuningCollection* GetpTuningCollection(const CTuning* const) const;
//Returns pointer to the tuning collection where tuning given as argument
//belongs to.
-
- CTuningCollection* GetpTuningCollection(HTREEITEM ti) const;
+ CTuningCollection* GetpTuningCollection(const CTuning* const) const;
+
//Returns the address of corresponding tuningcollection; if it points
//to tuning-entry, returning the owning tuningcollection
-
- bool IsDeletable(const CTuningCollection* const pTC) const;
+ CTuningCollection* GetpTuningCollection(HTREEITEM ti) const;
+
//Checks whether tuning collection can be deleted.
+ bool IsDeletable(const CTuningCollection* const pTC) const;
+
private:
CTuningRatioMapWnd m_RatioMapWnd;
@@ -273,10 +275,6 @@
CTuningTreeCtrl m_TreeCtrlTuning;
private:
- static const string s_stringTypeGEN;
- static const string s_stringTypeRP;
- static const string s_stringTypeTET;
-
typedef CTuningTreeItem TUNINGTREEITEM;
typedef CBijectiveMap<HTREEITEM, TUNINGTREEITEM> TREETUNING_MAP;
TREETUNING_MAP m_TreeItemTuningItemMap;
@@ -299,13 +297,14 @@
TT_TUNING
};
+
+ //To indicate whether to apply changes made to
+ //those edit boxes(they are modified by certain activities
+ //in case which the modifications should not be applied to
+ //tuning data.
bool m_NoteEditApply;
bool m_RatioEditApply;
- //To indicate whether to apply changes made to
- //to those edit boxes(they are modified by non-user
- //activies and in these cases the value should be applied
- //to the tuning data.
-
+
enum
{
UM_TUNINGDATA = 1, //UM <-> Update Mask
@@ -317,9 +316,9 @@
bool AddTuning(CTuningCollection*, CTuning* pT = NULL);
- bool m_DoErrorExit;
//Flag to prevent multiple exit error-messages.
-
+ bool m_DoErrorExit;
+
void DoErrorExit();
Modified: trunk/OpenMPT/mptrack/View_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_gen.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/View_gen.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -965,6 +965,7 @@
if ((pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)) && (nChn < pSndFile->m_nChannels) && (strncmp(s, pSndFile->ChnSettings[nChn].szName, MAX_CHANNELNAME)))
{
memcpy(pSndFile->ChnSettings[nChn].szName, s, MAX_CHANNELNAME);
+ pSndFile->ChnSettings[nChn].szName[ARRAYELEMCOUNT(pSndFile->ChnSettings[nChn].szName)-1] = 0;
pModDoc->SetModified();
pModDoc->UpdateAllViews(this, HINT_MODCHANNELS | (m_nActiveTab << 24));
}
@@ -989,6 +990,7 @@
if ((pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)) && (nChn < pSndFile->m_nChannels) && (strncmp(s, pSndFile->ChnSettings[nChn].szName, MAX_CHANNELNAME)))
{
memcpy(pSndFile->ChnSettings[nChn].szName, s, MAX_CHANNELNAME);
+ pSndFile->ChnSettings[nChn].szName[ARRAYELEMCOUNT(pSndFile->ChnSettings[nChn].szName)-1] = 0;
pModDoc->SetModified();
pModDoc->UpdateAllViews(this, HINT_MODCHANNELS | (m_nActiveTab << 24));
}
@@ -1013,6 +1015,7 @@
if ((pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)) && (nChn < pSndFile->m_nChannels) && (strncmp(s, pSndFile->ChnSettings[nChn].szName, MAX_CHANNELNAME)))
{
memcpy(pSndFile->ChnSettings[nChn].szName, s, MAX_CHANNELNAME);
+ pSndFile->ChnSettings[nChn].szName[ARRAYELEMCOUNT(pSndFile->ChnSettings[nChn].szName)-1] = 0;
pModDoc->SetModified();
pModDoc->UpdateAllViews(this, HINT_MODCHANNELS | (m_nActiveTab << 24));
}
@@ -1037,6 +1040,7 @@
if ((pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)) && (nChn < pSndFile->m_nChannels) && (strncmp(s, pSndFile->ChnSettings[nChn].szName, MAX_CHANNELNAME)))
{
memcpy(pSndFile->ChnSettings[nChn].szName, s, MAX_CHANNELNAME);
+ pSndFile->ChnSettings[nChn].szName[ARRAYELEMCOUNT(pSndFile->ChnSettings[nChn].szName)-1] = 0;
pModDoc->SetModified();
pModDoc->UpdateAllViews(this, HINT_MODCHANNELS | (m_nActiveTab << 24));
}
Modified: trunk/OpenMPT/mptrack/View_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.cpp 2007-07-11 20:36:02 UTC (rev 191)
+++ trunk/OpenMPT/mptrack/View_ins.cpp 2007-11-17 17:59:58 UTC (rev 192)
@@ -2361,7 +2361,7 @@
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
CModDoc *pModDoc = GetDocument();
- if ((pModDoc) && (pMainFrm) && (note<128))
+ if ((pModDoc) && (pMainFrm) && (note > 0) && (note<128))
{
CHAR s[64];
const size_t sizeofS = sizeof(s) / sizeof(s[0]);
@@ -2387,13 +2387,13 @@
}
*/
INSTRUMENTHEADER *penv = pModDoc->GetSoundFile()->Headers[m_nInstrument];
- if ((!penv) || (!penv->Keyboard[note])) return;
+ if ((!penv) || (!penv->Keyboard[note-1] && !penv->nMixPlug)) return;
m_baPlayingNote[note] = true; //rewbs.instViewNNA
m_nPlayingChannel= pModDoc->PlayNote(note, m_nInstrument, 0, FALSE); //rewbs.instViewNNA
s[0] = 0;
if ((note) && (note <= 120))
{
- const string temp = pModDoc->GetSoundFile()->GetNoteName(static_cast<CTuning::STEPTYPE>(note), m_nInstrument);
+ const string temp = pModDoc->GetSoundFile()->GetNoteName(note, m_nInstrument);
...
[truncated message content] |
|
From: <re...@us...> - 2007-07-11 20:36:37
|
Revision: 191
http://svn.sourceforge.net/modplug/?rev=191&view=rev
Author: rewbs
Date: 2007-07-11 13:36:02 -0700 (Wed, 11 Jul 2007)
Log Message:
-----------
. <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)
. <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)
. <rewbs> Fix a couple of pixels on D# in the pattern editor small font bitmap. (http://lpchip.com/modplug/viewtopic.php?t=1781)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/mptrack.vcproj
trunk/OpenMPT/mptrack/res/view_pat.bmp
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2007-06-17 18:42:09 UTC (rev 190)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2007-07-11 20:36:02 UTC (rev 191)
@@ -2236,7 +2236,17 @@
return gFXInfo[ndx].dwEffect;
}
+UINT CModDoc::GetEffectMaskFromIndex(UINT ndx)
+//-------------------------------------------------------
+{
+ if (ndx >= MAX_FXINFO) {
+ return 0;
+ }
+ return gFXInfo[ndx].dwParamValue;
+
+}
+
BOOL CModDoc::GetEffectInfo(UINT ndx, LPSTR s, BOOL bXX, DWORD *prangeMin, DWORD *prangeMax)
//------------------------------------------------------------------------------------------
{
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2007-06-17 18:42:09 UTC (rev 190)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2007-07-11 20:36:02 UTC (rev 191)
@@ -125,6 +125,7 @@
BOOL GetEffectInfo(UINT ndx, LPSTR s, BOOL bXX=FALSE, DWORD *prangeMin=NULL, DWORD *prangeMax=NULL);
LONG GetIndexFromEffect(UINT command, UINT param);
UINT GetEffectFromIndex(UINT ndx, int &refParam);
+ UINT GetEffectMaskFromIndex(UINT ndx);
BOOL GetEffectNameEx(LPSTR pszName, UINT ndx, UINT param);
BOOL IsExtendedEffect(UINT ndx) const;
UINT MapValueToPos(UINT ndx, UINT param);
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2007-06-17 18:42:09 UTC (rev 190)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2007-07-11 20:36:02 UTC (rev 191)
@@ -787,7 +787,13 @@
m_bInitialized = TRUE;
if (CMainFrame::gnCheckForUpdates) {
- UpdateCheck();
+ try {
+ UpdateCheck();
+ } catch (...) {
+ // Could not do update check. Don't compain - do nothing.
+ // Assuming winhttp.dll is set as delay-load in the project settings,
+ // we will end up here if the dll cannot be foung (e.g. on win98).
+ }
}
// Open settings if this is the previous execution was with an earlier version.
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2007-06-17 18:42:09 UTC (rev 190)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2007-07-11 20:36:02 UTC (rev 191)
@@ -2189,7 +2189,7 @@
CString processMethod = (m_pEffect->flags & effFlagsCanReplacing) ? "processReplacing" : "process";
CVstPluginManager::ReportPlugException("The plugin %s threw an exception in %s. It has automatically been set to \"Bypass\".", m_pMixStruct->Info.szName, processMethod);
ClearVSTEvents();
- SetEvent(processCalled);
+// SetEvent(processCalled);
}
//mix outputs of multi-output VSTs:
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-06-17 18:42:09 UTC (rev 190)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-07-11 20:36:02 UTC (rev 191)
@@ -753,17 +753,21 @@
m_nVol = combo->GetItemData(combo->GetCurSel());
}
// Effect
- m_nParam = 0;
- if (((combo = (CComboBox *)GetDlgItem(IDC_COMBO5)) != NULL) && (m_pModDoc))
- {
- int n = -1;
- m_nCommand = m_pModDoc->GetEffectFromIndex(combo->GetItemData(combo->GetCurSel()), n);
- if (n >= 0) m_nParam = n;
+ int effectIndex = -1;
+ if (((combo = (CComboBox *)GetDlgItem(IDC_COMBO5)) != NULL) && (m_pModDoc)) {
+ int n = -1; // unused parameter adjustment
+ effectIndex = combo->GetItemData(combo->GetCurSel());
+ m_nCommand = m_pModDoc->GetEffectFromIndex(effectIndex, n);
}
// Param
- if ((combo = (CComboBox *)GetDlgItem(IDC_COMBO6)) != NULL)
- {
- m_nParam |= combo->GetItemData(combo->GetCurSel());
+ m_nParam = 0;
+ if ((combo = (CComboBox *)GetDlgItem(IDC_COMBO6)) != NULL) {
+ m_nParam = combo->GetItemData(combo->GetCurSel());
+
+ // Apply parameter value mask if required (e.g. SDx has mask D0).
+ if (effectIndex > -1) {
+ m_nParam |= m_pModDoc->GetEffectMaskFromIndex(effectIndex);
+ }
}
// Min/Max channels
if (!m_bReplace)
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2007-06-17 18:42:09 UTC (rev 190)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2007-07-11 20:36:02 UTC (rev 191)
@@ -257,6 +257,7 @@
};
+
//=======================================
class CEditCommand: public CPropertySheet
//=======================================
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2007-06-17 18:42:09 UTC (rev 190)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2007-07-11 20:36:02 UTC (rev 191)
@@ -1133,10 +1133,10 @@
CONTROL "",IDC_TABCTRL1,"SysTabControl32",0x0,0,0,412,14
END
-IDD_EDIT_FIND DIALOG 0, 0, 182, 145
+IDD_EDIT_FIND DIALOGEX 0, 0, 182, 145
STYLE DS_SETFONT | WS_CHILD | WS_CAPTION
CAPTION "Find"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
GROUPBOX "Search for:",IDC_STATIC,4,4,174,107
CONTROL "Note",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
@@ -1161,8 +1161,8 @@
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 | WS_VSCROLL |
- WS_TABSTOP
+ 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",
@@ -1264,7 +1264,6 @@
CAPTION "Effect"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
- LTEXT "Value:",IDC_TEXT1,103,3,115,8
COMBOBOX IDC_COMBO1,0,15,102,83,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
@@ -1276,6 +1275,7 @@
CONTROL "",IDC_SLIDER2,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | NOT WS_VISIBLE | WS_TABSTOP,134,0,43,12
LTEXT "Effect Type:",IDC_STATIC,54,1,19,8,NOT WS_VISIBLE
+ LTEXT "Value:",IDC_TEXT1,103,3,23,8
END
IDD_SAMPLE_AMPLIFY DIALOGEX 0, 0, 175, 66
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2007-06-17 18:42:09 UTC (rev 190)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2007-07-11 20:36:02 UTC (rev 191)
@@ -51,6 +51,7 @@
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\xsoundlib\Debug"
+ DelayLoadDLLs="winhttp.dll"
GenerateDebugInformation="TRUE"
AssemblyDebug="1"
ProgramDatabaseFile=".\Debug/mptrack.pdb"
@@ -95,7 +96,9 @@
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/EHsc"
- InlineFunctionExpansion="1"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="2"
OptimizeForWindowsApplication="TRUE"
AdditionalIncludeDirectories="..\unlha,..\unzip,..\unrar,..\soundlib,..\include,..\xsoundlib"
PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,ENABLE_MMX,ENABLE_EQ,MODPLUG_TRACKER,NO_PACKING,HAVE_DOT_NET,ENABLE_AMD,ENABLE_SSE,ENABLE_AMDNOW"
@@ -868,9 +871,6 @@
RelativePath=".\res\moddoc.ico">
</File>
<File
- RelativePath=".\res\modplthingmorecontrast.bmp">
- </File>
- <File
RelativePath=".\res\MPTRACK.bmp">
</File>
<File
@@ -895,9 +895,6 @@
RelativePath=".\Res\smptoolb.bmp">
</File>
<File
- RelativePath=".\Res\splash.bmp">
- </File>
- <File
RelativePath=".\res\splashno.bmp">
</File>
<File
@@ -992,6 +989,9 @@
RelativePath=".\mod2wave.h">
</File>
<File
+ RelativePath="..\soundlib\modcommand.h">
+ </File>
+ <File
RelativePath=".\moddoc.h">
</File>
<File
Modified: trunk/OpenMPT/mptrack/res/view_pat.bmp
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <re...@us...> - 2007-06-17 18:42:13
|
Revision: 190
http://svn.sourceforge.net/modplug/?rev=190&view=rev
Author: rewbs
Date: 2007-06-17 11:42:09 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
+ <rewbs> Add name filter to plugin selection dialog. Useful when you have hundreds of plugins.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/Vstplug.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/resource.h
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2007-06-17 16:24:14 UTC (rev 189)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2007-06-17 18:42:09 UTC (rev 190)
@@ -985,10 +985,11 @@
//
BEGIN_MESSAGE_MAP(CSelectPluginDlg, CDialog)
- ON_NOTIFY(TVN_SELCHANGED, IDC_TREE1, OnSelChanged)
- ON_NOTIFY(NM_DBLCLK, IDC_TREE1, OnSelDblClk)
- ON_COMMAND(IDC_BUTTON1, OnAddPlugin)
- ON_COMMAND(IDC_BUTTON2, OnRemovePlugin)
+ ON_NOTIFY(TVN_SELCHANGED, IDC_TREE1, OnSelChanged)
+ ON_NOTIFY(NM_DBLCLK, IDC_TREE1, OnSelDblClk)
+ ON_COMMAND(IDC_BUTTON1, OnAddPlugin)
+ ON_COMMAND(IDC_BUTTON2, OnRemovePlugin)
+ ON_EN_CHANGE(IDC_NAMEFILTER, OnNameFilterChanged)
ON_WM_SIZE()
ON_WM_GETMINMAXINFO()
END_MESSAGE_MAP()
@@ -996,7 +997,9 @@
void CSelectPluginDlg::DoDataExchange(CDataExchange* pDX)
//-------------------------------------------------------
{
+ CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_TREE1, m_treePlugins);
+ DDX_Text(pDX, IDC_NAMEFILTER, m_sNameFilter);
}
@@ -1199,6 +1202,14 @@
CDialog::OnCancel();
}
+void CSelectPluginDlg::OnNameFilterChanged()
+//-------------------------------------
+{
+ GetDlgItem(IDC_NAMEFILTER)->GetWindowText(m_sNameFilter);
+ m_sNameFilter = m_sNameFilter.MakeLower();
+ UpdatePluginsList();
+}
+
VOID CSelectPluginDlg::UpdatePluginsList(DWORD forceSelect/*=0*/)
//---------------------------------------------------------------
{
@@ -1231,18 +1242,31 @@
PVSTPLUGINLIB p = pManager->GetFirstPlugin();
while (p)
{
- if (p->dwPluginId1 == kDmoMagic)
- {
+ if (p->dwPluginId1 == kDmoMagic) {
tvis.hParent = hDmo;
- } else
- {
+ } else {
tvis.hParent = (p->bIsInstrument) ? hSynth : hVst;
}
+
+ // Apply name filter
+ if (m_sNameFilter != "") {
+ CString displayName = p->szLibraryName;
+ if (displayName.MakeLower().Find(m_sNameFilter) == -1) {
+ p = p->pNext;
+ continue;
+ }
+ }
+
tvis.hInsertAfter = TVI_SORT;
tvis.item.pszText = p->szLibraryName;
tvis.item.lParam = (LPARAM)p;
HTREEITEM h = m_treePlugins.InsertItem(&tvis);
+ //If filter is active, expand nodes.
+ if (m_sNameFilter != "") {
+ m_treePlugins.EnsureVisible(h);
+ }
+
//Which plugin should be selected?
if (m_pPlugin) {
@@ -1279,8 +1303,7 @@
}
}
m_treePlugins.SetRedraw(TRUE);
- if (cursel)
- {
+ if (cursel) {
m_treePlugins.SelectItem(cursel);
m_treePlugins.SetItemState(cursel, TVIS_BOLD, TVIS_BOLD);
m_treePlugins.EnsureVisible(cursel);
@@ -1400,11 +1423,13 @@
void CSelectPluginDlg::OnSize(UINT nType, int cx, int cy)
+//-------------------------------------------------------
{
CDialog::OnSize(nType, cx, cy);
if (m_treePlugins) {
- m_treePlugins.MoveWindow(11,11, cx-105, cy-40, FALSE);
+ m_treePlugins.MoveWindow(11, 33, cx-105, cy-63, FALSE);
+ ::MoveWindow(GetDlgItem(IDC_NAMEFILTER)->m_hWnd, 50, 11, cx-145, 21, FALSE);
::MoveWindow(GetDlgItem(IDC_TEXT1)->m_hWnd, 11,cy-25, cx-22, 25, FALSE);
::MoveWindow(GetDlgItem(IDOK)->m_hWnd, cx-85, 11, 75, 23, FALSE);
::MoveWindow(GetDlgItem(IDCANCEL)->m_hWnd, cx-85, 39, 75, 23, FALSE);
Modified: trunk/OpenMPT/mptrack/Vstplug.h
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.h 2007-06-17 16:24:14 UTC (rev 189)
+++ trunk/OpenMPT/mptrack/Vstplug.h 2007-06-17 18:42:09 UTC (rev 190)
@@ -232,6 +232,7 @@
PSNDMIXPLUGIN m_pPlugin;
CModDoc *m_pModDoc;
CTreeCtrl m_treePlugins;
+ CString m_sNameFilter;
public:
CSelectPluginDlg(CModDoc *pModDoc, int nPlugSlot, CWnd *parent); //rewbs.plugDocAware
@@ -244,6 +245,7 @@
virtual VOID OnCancel();
afx_msg void OnAddPlugin();
afx_msg void OnRemovePlugin();
+ afx_msg void OnNameFilterChanged();
afx_msg void OnSelChanged(NMHDR *pNotifyStruct, LRESULT * result);
afx_msg void OnSelDblClk(NMHDR *pNotifyStruct, LRESULT * result);
DECLARE_MESSAGE_MAP()
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2007-06-17 16:24:14 UTC (rev 189)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2007-06-17 18:42:09 UTC (rev 190)
@@ -1621,14 +1621,16 @@
CAPTION "Mix Plugins"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
+ EDITTEXT IDC_NAMEFILTER,28,7,127,14,ES_AUTOHSCROLL
+ CONTROL "Tree1",IDC_TREE1,"SysTreeView32",TVS_DISABLEDRAGDROP |
+ TVS_SHOWSELALWAYS | WS_TABSTOP,7,21,148,126,
+ WS_EX_CLIENTEDGE
DEFPUSHBUTTON "Add to Song",IDOK,161,7,50,14
+ PUSHBUTTON "New plugin...",IDC_BUTTON1,161,46,50,14,BS_MULTILINE
+ PUSHBUTTON "Remove",IDC_BUTTON2,161,63,50,14
PUSHBUTTON "Cancel",IDCANCEL,161,132,50,14
LTEXT "",IDC_TEXT1,7,151,204,8
- PUSHBUTTON "New plugin...",IDC_BUTTON1,161,46,50,14,BS_MULTILINE
- PUSHBUTTON "Remove",IDC_BUTTON2,161,63,50,14
- CONTROL "Tree1",IDC_TREE1,"SysTreeView32",TVS_DISABLEDRAGDROP |
- TVS_SHOWSELALWAYS | WS_TABSTOP,7,7,148,140,
- WS_EX_CLIENTEDGE
+ LTEXT "Filter:",IDC_STATIC,8,9,18,8
END
IDD_PLUGINEDITOR DIALOGEX 0, 0, 187, 95
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2007-06-17 16:24:14 UTC (rev 189)
+++ trunk/OpenMPT/mptrack/resource.h 2007-06-17 18:42:09 UTC (rev 190)
@@ -789,6 +789,7 @@
#define IDC_TEXT_RPB 2301
#define IDC_SPIN_RPB 2302
#define IDC_EDIT_RPB 2303
+#define IDC_NAMEFILTER 2304
#define ID_FILE_NEWMOD 32771
#define ID_FILE_NEWXM 32772
#define ID_FILE_NEWS3M 32773
@@ -1015,7 +1016,7 @@
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 515
#define _APS_NEXT_COMMAND_VALUE 59211
-#define _APS_NEXT_CONTROL_VALUE 2304
+#define _APS_NEXT_CONTROL_VALUE 2305
#define _APS_NEXT_SYMED_VALUE 901
#endif
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <re...@us...> - 2007-06-17 16:24:19
|
Revision: 189
http://svn.sourceforge.net/modplug/?rev=189&view=rev
Author: rewbs
Date: 2007-06-17 09:24:14 -0700 (Sun, 17 Jun 2007)
Log Message:
-----------
Applying Pelya's patch with minor formatting and variable/method name changes. Thanks Pelya!
+ <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.
+ <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.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/InputHandler.cpp
trunk/OpenMPT/mptrack/InputHandler.h
trunk/OpenMPT/packageTemplate/Installation.txt
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2007-05-27 17:47:34 UTC (rev 188)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2007-06-17 16:24:14 UTC (rev 189)
@@ -2814,7 +2814,8 @@
for (int k=0; k<commands[curCmd].kcList.GetSize(); k++)
{
curKc = commands[curCmd].kcList[k];
- if ((!curKc.mod) || (curKc.code!=VK_SHIFT && curKc.code!=VK_CONTROL && curKc.code!=VK_MENU && curKc.code!=0))
+ if ((!curKc.mod) || (curKc.code!=VK_SHIFT && curKc.code!=VK_CONTROL && curKc.code!=VK_MENU && curKc.code!=0 &&
+ curKc.code!=VK_LWIN && curKc.code!=VK_RWIN )) // Feature: use Windows keys as modifier keys
{
report+="Error! " + GetCommandText((CommandID)curCmd) + " must be a modifier (shift/ctrl/alt), but is currently " + GetKeyText(inKc.mod, inKc.code) + "\r\n";
//replace with dummy
@@ -2880,6 +2881,7 @@
case VK_SHIFT: return HOTKEYF_SHIFT;
case VK_MENU: return HOTKEYF_ALT;
case VK_CONTROL: return HOTKEYF_CONTROL;
+ case VK_LWIN: case VK_RWIN: return HOTKEYF_EXT; // Feature: use Windows keys as modifier keys
default: /*DEBUG: ASSERT(false);*/ return 0; //can only get modifier for modifier key
}
@@ -2897,9 +2899,6 @@
//Clear map
memset(km, -1, sizeof(kcNull)*KeyMapSize);
-// km.RemoveAll();
-// km.InitHashTable(700423);
-
//Copy commandlist content into map:
for (UINT cmd=0; cmd<kcNumCommands; cmd++)
@@ -3216,6 +3215,7 @@
if (mod & HOTKEYF_SHIFT) text.Append("Shift+");
if (mod & HOTKEYF_CONTROL) text.Append("Ctrl+");
if (mod & HOTKEYF_ALT) text.Append("Alt+");
+ if (mod & HOTKEYF_EXT) text.Append("Win+"); // Feature: use Windows keys as modifier keys
return text;
}
@@ -3436,4 +3436,4 @@
return conflict;
}
-//end rewbs.customKeys
\ No newline at end of file
+//end rewbs.customKeys
Modified: trunk/OpenMPT/mptrack/InputHandler.cpp
===================================================================
--- trunk/OpenMPT/mptrack/InputHandler.cpp 2007-05-27 17:47:34 UTC (rev 188)
+++ trunk/OpenMPT/mptrack/InputHandler.cpp 2007-06-17 16:24:14 UTC (rev 189)
@@ -35,6 +35,8 @@
//Get Keymap
activeCommandSet->GenKeyMap(keyMap);
+ SetupSpecialKeyInterception(); // Feature: use Windows keys as modifier keys, intercept special keys
+ m_nSkipGeneratedKeypresses = 0;
m_bDistinguishControls = false;
m_bDistinguishShifts = false;
@@ -54,38 +56,37 @@
//--------------------------------------------------------------
-
-
CommandID CInputHandler::GeneralKeyEvent(InputTargetContext context, int code, WPARAM wParam , LPARAM lParam)
-
{
CommandID executeCommand = kcNull;
KeyEventType keyEventType;
- if (code == HC_ACTION)
- {
+ if (code == HC_ACTION) {
//Get the KeyEventType (key up, key down, key repeat)
DWORD scancode = lParam >> 16;
- if ((scancode & 0xC000) == 0xC000) keyEventType = kKeyEventUp;
- else if ((scancode & 0xC000) == 0x0000) keyEventType = kKeyEventDown;
- else keyEventType = kKeyEventRepeat;
+ if ((scancode & 0xC000) == 0xC000) {
+ keyEventType = kKeyEventUp;
+ } else if ((scancode & 0xC000) == 0x0000) {
+ keyEventType = kKeyEventDown;
+ } else {
+ keyEventType = kKeyEventRepeat;
+ }
- //Catch modifier change (ctrl, alt, shift) - Only check on keyDown or keyUp.
- if (keyEventType == kKeyEventUp || keyEventType == kKeyEventDown)
- {
+ // Catch modifier change (ctrl, alt, shift) - Only check on keyDown or keyUp.
+ // NB: we want to catch modifiers even when the input handler is locked
+ if (keyEventType == kKeyEventUp || keyEventType == kKeyEventDown) {
scancode =(lParam >> 16) & 0x1FF;
CatchModifierChange(wParam, keyEventType, scancode);
}
- if (keyEventType == kKeyEventUp)
- keyEventType=kKeyEventUp;
-
- if (!Bypass()) // If bypassing, we want to catch modifiers but not execute commands
+ if (!InterceptSpecialKeys( wParam, lParam ) && !Bypass()) {
+ // only execute command when the input handler is not locked
+ // and the input is not a consequence of special key interception.
executeCommand = keyMap[context][modifierMask][wParam][keyEventType];
+ }
}
- if (m_pMainFrm && executeCommand != kcNull)
- {
+ if (m_pMainFrm && executeCommand != kcNull) {
m_pMainFrm->PostMessage(WM_MOD_KEYCOMMAND, executeCommand, wParam);
}
@@ -111,7 +112,65 @@
return executeCommand;
}
+// Feature: use Windows keys as modifier keys, intercept special keys
+bool CInputHandler::InterceptSpecialKeys( UINT nChar , UINT nFlags )
+{
+ KeyEventType keyEventType = GetKeyEventType( HIWORD(nFlags) );
+ enum { VK_NonExistentKey = VK_F24+1 };
+
+ if( nChar == VK_NonExistentKey ) {
+ return true;
+ } else if( m_bInterceptWindowsKeys && ( nChar == VK_LWIN || nChar == VK_RWIN ) ) {
+ if( keyEventType == kKeyEventDown ) {
+ INPUT inp[2];
+ inp[0].type = inp[1].type = INPUT_KEYBOARD;
+ inp[0].ki.time = inp[1].ki.time = 0;
+ inp[0].ki.dwExtraInfo = inp[0].ki.dwExtraInfo = 0;
+ inp[0].ki.wVk = inp[1].ki.wVk = VK_NonExistentKey;
+ inp[0].ki.wScan = inp[1].ki.wScan = 0;
+ inp[0].ki.dwFlags = 0;
+ inp[1].ki.dwFlags = KEYEVENTF_KEYUP;
+ SendInput( 2, inp, sizeof(INPUT) );
+ }
+ }
+
+ if( ( nChar == VK_NUMLOCK && m_bInterceptNumLock ) ||
+ ( nChar == VK_CAPITAL && m_bInterceptCapsLock ) ||
+ ( nChar == VK_SCROLL && m_bInterceptScrollLock ) ) {
+ if( m_nSkipGeneratedKeypresses > 0 ) {
+ m_nSkipGeneratedKeypresses -- ;
+ return true;
+ } else if( keyEventType == kKeyEventDown ) {
+ m_nSkipGeneratedKeypresses = 2;
+ INPUT inp[2];
+ inp[0].type = inp[1].type = INPUT_KEYBOARD;
+ inp[0].ki.time = inp[1].ki.time = 0;
+ inp[0].ki.dwExtraInfo = inp[0].ki.dwExtraInfo = 0;
+ inp[0].ki.wVk = inp[1].ki.wVk = nChar;
+ inp[0].ki.wScan = inp[1].ki.wScan = 0;
+ inp[0].ki.dwFlags = KEYEVENTF_KEYUP;
+ inp[1].ki.dwFlags = 0;
+ SendInput( 2, inp, sizeof(INPUT) );
+ }
+ }
+ return false;
+};
+void CInputHandler::SetupSpecialKeyInterception()
+{
+ m_bInterceptWindowsKeys = m_bInterceptNumLock = m_bInterceptCapsLock = m_bInterceptScrollLock = false;
+ for( int context=0; context<sizeof(keyMap)/sizeof(keyMap[0]); context++ )
+ for( int mod=0; mod<sizeof(keyMap[0])/sizeof(keyMap[0][0]); mod++ )
+ for( int key=0; key<sizeof(keyMap[0][0])/sizeof(keyMap[0][0][0]); key++ )
+ for( int kevent=0; kevent<sizeof(keyMap[0][0][0])/sizeof(keyMap[0][0][0][0]); kevent++ ) {
+ if( keyMap[context][mod][key][kevent] == kcNull ) continue;
+ if( mod == HOTKEYF_EXT ) m_bInterceptWindowsKeys = true;
+ if( key == VK_NUMLOCK ) m_bInterceptNumLock = true;
+ if( key == VK_CAPITAL ) m_bInterceptCapsLock = true;
+ if( key == VK_SCROLL ) m_bInterceptScrollLock = true;
+ };
+};
+
//--------------------------------------------------------------
//Deal with Modifier keypresses. Private surouting used above.
bool CInputHandler::CatchModifierChange(WPARAM wParam, KeyEventType keyEventType, int scancode)
@@ -156,6 +215,9 @@
*/ tempModifierMask |= HOTKEYF_ALT;
break;
// }
+ case VK_LWIN: case VK_RWIN: // Feature: use Windows keys as modifier keys
+ tempModifierMask |= HOTKEYF_EXT;
+ break;
}
if (tempModifierMask) //This keypress just changed the modifier mask
@@ -236,9 +298,9 @@
if (mask & HOTKEYF_CONTROL) Log("Ctrl On"); else Log("Ctrl --");
if (mask & HOTKEYF_SHIFT) Log("\tShft On"); else Log("\tShft --");
if (mask & HOTKEYF_ALT) Log("\tAlt On\n"); else Log("\tAlt --\n");
+ if (mask & HOTKEYF_EXT) Log("\tWin On\n"); else Log("\tWin --\n"); // Feature: use Windows keys as modifier keys
}
-
KeyEventType CInputHandler::GetKeyEventType(UINT nFlags)
{
if (nFlags & TRANSITIONBIT) //Key released
@@ -439,6 +501,7 @@
{
activeCommandSet->Copy(newSet);
activeCommandSet->GenKeyMap(keyMap);
+ SetupSpecialKeyInterception(); // Feature: use Windows keys as modifier keys, intercept special keys
UpdateMainMenu();
}
@@ -488,4 +551,4 @@
return true;
return false;
-}
\ No newline at end of file
+}
Modified: trunk/OpenMPT/mptrack/InputHandler.h
===================================================================
--- trunk/OpenMPT/mptrack/InputHandler.h 2007-05-27 17:47:34 UTC (rev 188)
+++ trunk/OpenMPT/mptrack/InputHandler.h 2007-06-17 16:24:14 UTC (rev 189)
@@ -66,6 +66,10 @@
bool m_bNoAltMenu;
bool m_bDistinguishControls, m_bDistinguishShifts, m_bDistinguishAlts;
bool CatchModifierChange(WPARAM wParam, KeyEventType keyEventType, int scancode);
+ bool m_bInterceptWindowsKeys, m_bInterceptNumLock, m_bInterceptCapsLock, m_bInterceptScrollLock;
+ int m_nSkipGeneratedKeypresses;
+ bool InterceptSpecialKeys( UINT nChar , UINT nFlags );
+ void SetupSpecialKeyInterception();
public:
CCommandSet *activeCommandSet;
@@ -88,3 +92,4 @@
bool SetITEffects(void);
};
+
Modified: trunk/OpenMPT/packageTemplate/Installation.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/Installation.txt 2007-05-27 17:47:34 UTC (rev 188)
+++ trunk/OpenMPT/packageTemplate/Installation.txt 2007-06-17 16:24:14 UTC (rev 189)
@@ -1,5 +1,6 @@
OpenMPT development build - Installation notes
----------------------------------------------
-. If you have an existing installation of OpenMPT and wish to re-use its settings, copy your mptrack.ini to this directory.
-. If not, you're done: just launch mptrack.exe.
+. If you have an existing installation of OpenMPT and wish to re-use its settings,
+ copy your mptrack.ini and plugin.cache to the directory into which you extract the archive.
+. If not, you're done: just extract the archive and launch mptrack.exe.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <re...@us...> - 2007-05-27 17:47:43
|
Revision: 188
http://svn.sourceforge.net/modplug/?rev=188&view=rev
Author: rewbs
Date: 2007-05-27 10:47:34 -0700 (Sun, 27 May 2007)
Log Message:
-----------
v1.17.02.48
. <Relabs> Fix song cleanup issue (http://lpchip.com/modplug/viewtopic.php?t=1711)
. <Relabs> Pitch/Tempo lock fix (broken in .46 and .47) (http://lpchip.com/modplug/viewtopic.php?t=1646)
/ <Relabs> Pattern manager channel reordering behviour changes / fixes. (http://lpchip.com/modplug/viewtopic.php?t=1148)
. <pelya> Fix bad horizontal scrolling in pattern editor when positioning the cursor with the mouse. (http://lpchip.com/modplug/viewtopic.php?t=1650)
. <rewbs> Fix odd "play row" behaviour when using 1 tick-per-row (http://lpchip.com/modplug/viewtopic.php?t=1038).
. <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)
. <rewbs> Fix occasional colour issues with orderlist (http://lpchip.com/modplug/viewtopic.php?t=867)
. <rewbs> Fix impossible horizontal scrolling in pattern editor when playing with follow song on
. <rewbs> Grey out "Trim" option in sample editor context menu if there's no selection. (http://lpchip.com/modplug/viewtopic.php?t=908)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_pat.h
trunk/OpenMPT/mptrack/Ctrl_seq.cpp
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/bin/mptrack.exe
trunk/OpenMPT/mptrack/bin/version
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/packageTemplate/default.mkb
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_pat.h 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/mptrack/Ctrl_pat.h 2007-05-27 17:47:34 UTC (rev 188)
@@ -11,12 +11,12 @@
protected:
HFONT m_hFont;
COLORREF colorText, colorTextSel;
- int m_cxFont, m_cyFont, m_nXScroll, m_nScrollPos, m_nDropPos;
//m_nXScroll : The order at the beginning of shown orderlist?
//m_nScrollPos: The same as order?
- BYTE m_nOrderlistMargins;
+ int m_cxFont, m_cyFont, m_nXScroll, m_nScrollPos, m_nDropPos;
//To tell how many orders('orderboxes') to show at least
//on both sides of current order(when updating orderslist position).
+ BYTE m_nOrderlistMargins;
UINT m_nDragOrder;
BOOL m_bScrolling, m_bDragging, m_bShift;
CModDoc *m_pModDoc;
Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2007-05-27 17:47:34 UTC (rev 188)
@@ -467,8 +467,13 @@
int nOrder = ((nIndex >= 0) && (nIndex < pSndFile->Order.size())) ? pSndFile->Order[nIndex] : -1;
if ((rect.right = rect.left + m_cxFont) > rcClient.right) rect.right = rcClient.right;
rect.right--;
- FillRect(dc.m_hDC, &rect, (bHighLight) ? CMainFrame::brushHighLight : CMainFrame::brushWindow);
+ if (bHighLight) {
+ FillRect(dc.m_hDC, &rect, CMainFrame::brushHighLight);
+ } else {
+ FillRect(dc.m_hDC, &rect, CMainFrame::brushWindow);
+ }
+
//Drawing the shown pattern-indicator or drag position.
if (nIndex == ((m_bDragging) ? (int)m_nDropPos : m_nScrollPos))
{
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2007-05-27 17:47:34 UTC (rev 188)
@@ -1006,8 +1006,9 @@
HWND hWnd = ::GetFocus();
if (hWnd != NULL) {
- TCHAR szClassName[512];
- textboxHasFocus = GetClassName(hWnd, szClassName, 6) && _tcsicmp(szClassName, _T("Edit")) == 0;
+ TCHAR activeWindowClassName[512];
+ GetClassName(hWnd, activeWindowClassName, 6);
+ textboxHasFocus = _tcsicmp(activeWindowClassName, _T("Edit")) == 0;
if (textboxHasFocus) {
handledByTextBox = m_InputHandler->isKeyPressHandledByTextBox(wParam);
}
@@ -1752,7 +1753,7 @@
COLORREF crBkgnd = GetSysColor(COLOR_WINDOW);
if (brushHighLight) DeleteObject(brushHighLight);
brushHighLight = CreateSolidBrush(GetSysColor(COLOR_HIGHLIGHT));
- if (brushHighLightRed) DeleteObject(brushHighLight);
+ if (brushHighLightRed) DeleteObject(brushHighLightRed);
brushHighLightRed = CreateSolidBrush(RGB(0xFF,0x00,0x00));
if (brushWindow) DeleteObject(brushWindow);
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-27 17:47:34 UTC (rev 188)
@@ -1573,10 +1573,9 @@
SetDlgItemText(IDC_EDIT3, CString("Open Modplug Tracker, version ") + CMainFrame::GetFullVersionString());
m_heContact.SetWindowText(
-"Contact:\r\n\
-MPC forums: http://lpchip.com/modplug/\r\n\
-Robin Fernandes: mailto:mo...@so...\r\n\r\n\
-Updates:\r\n\
+"Contact / Discussion:\r\n\
+http://modplug.sourceforge.net/forum\r\n\
+\r\n\Updates:\r\n\
http://modplug.sourceforge.net/builds/#dev");
char *pArrCredit = {
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2007-05-27 17:47:34 UTC (rev 188)
@@ -222,9 +222,22 @@
}
-BOOL CViewPattern::SetCurrentRow(UINT row, BOOL bWrap)
-//----------------------------------------------------
+// This should be used instead of consecutive calls to SetCurrentRow() then SetCurrentColumn()
+BOOL CViewPattern::SetCursorPosition(UINT nrow, UINT ncol, BOOL bWrap)
+//--------------------------------------------------------------------------
{
+ // Set row, but do not update scroll position yet
+ // as there is another position update on the way:
+ SetCurrentRow(nrow, bWrap, false);
+ // Now set column and update scroll position:
+ SetCurrentColumn(ncol);
+ return TRUE;
+}
+
+
+BOOL CViewPattern::SetCurrentRow(UINT row, BOOL bWrap, BOOL bUpdateHorizontalScrollbar)
+//-------------------------------------------------------------------------------------
+{
CSoundFile *pSndFile;
CModDoc *pModDoc = GetDocument();
if (!pModDoc) return FALSE;
@@ -296,7 +309,8 @@
// Fix: If cursor isn't on screen move both scrollbars to make it visible
InvalidateRow();
m_nRow = row;
- UpdateScrollbarPositions(); //UpdateScrollbarPositions( false ); // default behavior is to move only vertical scrollbar
+ // Fix: Horizontal scrollbar pos screwed when selecting with mouse
+ UpdateScrollbarPositions(bUpdateHorizontalScrollbar);
InvalidateRow();
int sel = m_dwCursor | (m_nRow << 16);
int sel0 = sel;
@@ -350,7 +364,7 @@
// Assume that m_nRow and m_dwCursor are valid
// When we switching to other tab the CViewPattern object is deleted
// and when switching back new one is created
-BOOL CViewPattern::UpdateScrollbarPositions( bool UpdateHorizontalScrollbar )
+BOOL CViewPattern::UpdateScrollbarPositions( BOOL UpdateHorizontalScrollbar )
{
// HACK - after new CViewPattern object created SetCurrentRow() and SetCurrentColumn() are called -
// just skip first two calls of UpdateScrollbarPositions() if pModDoc->GetOldPatternScrollbarsPos() is valid
@@ -1012,8 +1026,8 @@
SetCurSel(m_dwStartSel, m_dwStartSel);
} else
{
- SetCurrentRow(m_dwStartSel >> 16);
- SetCurrentColumn(m_dwStartSel & 0xFFFF);
+ // Fix: Horizontal scrollbar pos screwed when selecting with mouse
+ SetCursorPosition( m_dwStartSel >> 16, m_dwStartSel & 0xFFFF );
}
}
}
@@ -1071,8 +1085,8 @@
if ((m_nMidRow) && (m_dwBeginSel == m_dwEndSel))
{
DWORD dwPos = m_dwBeginSel;
- SetCurrentRow(dwPos >> 16);
- SetCurrentColumn(dwPos & 0xFFFF);
+ // Fix: Horizontal scrollbar pos screwed when selecting with mouse
+ SetCursorPosition( dwPos >> 16, dwPos & 0xFFFF );
//UpdateIndicator();
}
}
@@ -1165,8 +1179,8 @@
|| ((m_nMenuParam & 0xFFFF) > (m_dwEndSel & 0xFFFF)))
{
if (pt.y > m_szHeader.cy) { //ensure we're not clicking header
- SetCurrentRow(m_nMenuParam >> 16);
- SetCurrentColumn(m_nMenuParam & 0xFFFF);
+ // Fix: Horizontal scrollbar pos screwed when selecting with mouse
+ SetCursorPosition( m_nMenuParam >> 16, m_nMenuParam & 0xFFFF );
}
}
UINT nChn = (m_nMenuParam & 0xFFFF) >> 3;
@@ -1299,8 +1313,8 @@
DragToSel(dwPos, TRUE);
} else
{
- SetCurrentRow(dwPos >> 16);
- SetCurrentColumn(dwPos & 0xFFFF);
+ // Fix: Horizontal scrollbar pos screwed when selecting with mouse
+ SetCursorPosition( dwPos >> 16, dwPos & 0xFFFF );
}
}
}
@@ -1514,8 +1528,8 @@
//rewbs.customKeys
DWORD finalPos = (min(m_dwEndSel >> 16, m_dwBeginSel >> 16) << 16 | (m_dwEndSel & 0xFFFF));
SetCurSel(finalPos, finalPos);
- SetCurrentColumn(finalPos & 0xFFFF);
- SetCurrentRow(finalPos >> 16);
+ // Fix: Horizontal scrollbar pos screwed when selecting with mouse
+ SetCursorPosition( finalPos >> 16, finalPos & 0xFFFF );
//end rewbs.customKeys
pModDoc->SetModified();
@@ -2347,8 +2361,8 @@
if (y2<0) y2=0;
if (y2>=nRows) y2=nRows-1;
if (c2 >= 3) c2 = 4;
- SetCurrentRow(y1);
- SetCurrentColumn((x1<<3)|c1);
+ // Fix: Horizontal scrollbar pos screwed when selecting with mouse
+ SetCursorPosition( y1, (x1<<3)|c1 );
SetCurSel((y1<<16)|(x1<<3)|c1, (y2<<16)|(x2<<3)|c2);
InvalidatePattern();
CSoundFile::FreePattern(pOldPattern);
@@ -2769,7 +2783,7 @@
if (nOrd < pSndFile->Order.size()) SendCtrlMessage(CTRLMSG_SETCURRENTORDER, nOrd);
updateOrderList = false;
}
- if (nRow != m_nRow) SetCurrentRow((nRow < pSndFile->PatternSize[nPat]) ? nRow : 0);
+ if (nRow != m_nRow) SetCurrentRow((nRow < pSndFile->PatternSize[nPat]) ? nRow : 0, FALSE, FALSE);
}
SetPlayCursor(0xFFFF, 0);
} else
@@ -3064,8 +3078,8 @@
if (/*(pState->nPattern == m_nPattern) && */(pState->cbStruct == sizeof(PATTERNVIEWSTATE)))
{
SetCurrentPattern(pState->nPattern);
- SetCurrentRow(pState->nRow);
- SetCurrentColumn(pState->nCursor);
+ // Fix: Horizontal scrollbar pos screwed when selecting with mouse
+ SetCursorPosition( pState->nRow, pState->nCursor );
SetCurSel(pState->dwBeginSel, pState->dwEndSel);
}
}
@@ -4917,3 +4931,4 @@
+
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/mptrack/View_pat.h 2007-05-27 17:47:34 UTC (rev 188)
@@ -73,18 +73,8 @@
CPatternGotoDialog *m_pGotoWnd;
SIZE m_szHeader, m_szCell;
UINT m_nPattern, m_nRow, m_nMidRow, m_nPlayPat, m_nPlayRow, m_nSpacing, m_nAccelChar, m_nLastPlayedRow, m_nLastPlayedOrder;
-
-// -> CODE#0012
-// -> DESC="midi keyboard split"
-// UINT CViewPattern::GetCurrentSplitInstrument() const;
-// UINT CViewPattern::GetCurrentSplitNote() const;
-// UINT CViewPattern::GetCurrentOctaveModifier() const;
-// UINT CViewPattern::GetCurrentOctaveLink() const;
-// UINT CViewPattern::GetCurrentSplitVolume() const;
-// rewbs.merge: inverted message direction
UINT m_nSplitInstrument, m_nSplitNote, m_nOctaveModifier, m_nSplitVolume;
BOOL m_bOctaveLink;
-// -! NEW_FEATURE#0012
int m_nXScroll, m_nYScroll;
DWORD m_nDragItem, m_nMenuParam, m_nDetailLevel;
@@ -149,12 +139,13 @@
void InvalidateChannelsHeaders();
void SetCurSel(DWORD dwBegin, DWORD dwEnd);
BOOL SetCurrentPattern(UINT npat, int nrow=-1);
- BOOL SetCurrentRow(UINT nrow, BOOL bWrap=FALSE);
+ BOOL SetCurrentRow(UINT nrow, BOOL bWrap=FALSE, BOOL bUpdateHorizontalScrollbar=TRUE );
BOOL SetCurrentColumn(UINT ncol);
+ // This should be used instead of consecutive calls to SetCurrentRow() then SetCurrentColumn()
+ BOOL SetCursorPosition(UINT nrow, UINT ncol, BOOL bWrap=FALSE );
BOOL DragToSel(DWORD dwPos, BOOL bScroll, BOOL bNoMove=FALSE);
BOOL SetPlayCursor(UINT nPat, UINT nRow);
-// Fix: If cursor isn't on screen move scrollbars to make it visible
- BOOL UpdateScrollbarPositions( bool UpdateHorizontalScrollbar=true );
+ BOOL UpdateScrollbarPositions( BOOL bUpdateHorizontalScrollbar=TRUE );
// -> CODE#0014
// -> DESC="vst wet/dry slider"
// BOOL EnterNote(UINT nNote, UINT nIns=0, BOOL bCheck=FALSE, int vol=-1, BOOL bMultiCh=FALSE);
@@ -354,3 +345,4 @@
#endif
+
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2007-05-27 17:47:34 UTC (rev 188)
@@ -1321,7 +1321,8 @@
if (pins->uFlags & CHN_STEREO) ::AppendMenu(hMenu, MF_STRING, ID_SAMPLE_MONOCONVERT, "Convert to mono");
}
- ::AppendMenu(hMenu, MF_STRING, ID_SAMPLE_TRIM, "Trim\t" + ih->GetKeyTextFromCommand(kcSampleTrim));
+ ::AppendMenu(hMenu, MF_STRING|(m_dwEndSel>m_dwBeginSel)?0:MF_GRAYED,
+ ID_SAMPLE_TRIM, "Trim\t" + ih->GetKeyTextFromCommand(kcSampleTrim));
::AppendMenu(hMenu, MF_STRING, ID_EDIT_CUT, "Cut\t" + ih->GetKeyTextFromCommand(kcEditCut));
::AppendMenu(hMenu, MF_STRING, ID_EDIT_COPY, "Copy\t" + ih->GetKeyTextFromCommand(kcEditCopy));
}
Modified: trunk/OpenMPT/mptrack/bin/mptrack.exe
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/bin/version
===================================================================
--- trunk/OpenMPT/mptrack/bin/version 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/mptrack/bin/version 2007-05-27 17:47:34 UTC (rev 188)
@@ -1 +1 @@
-1.17.02.47
\ No newline at end of file
+1.17.02.48
\ No newline at end of file
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2007-05-27 17:47:34 UTC (rev 188)
@@ -1926,7 +1926,7 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,17,2,47
+ FILEVERSION 1,17,2,48
PRODUCTVERSION 0,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@@ -1944,7 +1944,7 @@
BEGIN
VALUE "CompanyName", "Olivier Lapicque / OpenMPT team"
VALUE "FileDescription", "OpenMPT / ModPlug Tracker"
- VALUE "FileVersion", "1, 17, 2, 47"
+ VALUE "FileVersion", "1, 17, 2, 48"
VALUE "InternalName", "Modplug Tracker"
VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2007 GPL."
VALUE "LegalTrademarks", "M.O.D.P.L.U.G"
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/packageTemplate/History.txt 2007-05-27 17:47:34 UTC (rev 188)
@@ -6,8 +6,19 @@
-: known issue / regression
/: change
?: other
-(tx XYZ): thanks to XYZ for telling me about the bug
+(tx XYZ): thanks to XYZ for telling us about the bug
+v1.17.02.48
+ . <Relabs> Fix song cleanup issue (http://lpchip.com/modplug/viewtopic.php?t=1711)
+ . <Relabs> Pitch/Tempo lock fix (broken in .46 and .47) (http://lpchip.com/modplug/viewtopic.php?t=1646)
+ / <Relabs> Pattern manager channel reordering behviour changes / fixes. (http://lpchip.com/modplug/viewtopic.php?t=1148)
+ . <pelya> Fix bad horizontal scrolling in pattern editor when positioning the cursor with the mouse. (http://lpchip.com/modplug/viewtopic.php?t=1650)
+ . <rewbs> Fix odd "play row" behaviour when using 1 tick-per-row (http://lpchip.com/modplug/viewtopic.php?t=1038).
+ . <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)
+ . <rewbs> Fix occasional colour issues with orderlist (http://lpchip.com/modplug/viewtopic.php?t=867)
+ . <rewbs> Fix impossible horizontal scrolling in pattern editor when playing with follow song on
+ . <rewbs> Grey out "Trim" option in sample editor context menu if there's no selection. (http://lpchip.com/modplug/viewtopic.php?t=908)
+
v1.17.02.47
? <rewbs> An update checker was introduced in the previous version. If you had any problems with the update notification, please report a bug.
. <pelya> Save pattern scrollbar position when switching to other tabs
Modified: trunk/OpenMPT/packageTemplate/default.mkb
===================================================================
--- trunk/OpenMPT/packageTemplate/default.mkb 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/packageTemplate/default.mkb 2007-05-27 17:47:34 UTC (rev 188)
@@ -1,4 +1,4 @@
-//-------- Modplug Tracker key binding definition file -------
+//-------- OpenMPT key binding definition file -------
//-Format is: -
//- Context:Command ID:Modifiers:Key:KeypressEventType //Comments -
//----------------------------------------------------------------------
@@ -9,7 +9,7 @@
0:1349:2:83:1 //File/Save: Ctrl+S (KeyDown)
0:1030:0:116:1 //Play song/Pause song: F5 (KeyDown)
0:1031:0:119:1 //Pause song: F8 (KeyDown)
-0:1375:0:27:1 //Stop Song: Esc (KeyDown)
+0:1375:0:27:1 //Stop Song: ESC (KeyDown)
0:1029:0:117:1 //Play song from start: F6 (KeyDown)
0:1027:0:118:5 //Play pattern from start: F7 (KeyDown|KeyHold)
0:1026:2:118:5 //Play pattern from cursor: Ctrl+F7 (KeyDown|KeyHold)
@@ -17,9 +17,9 @@
0:1359:2:90:1 //Undo: Ctrl+Z (KeyDown)
0:1360:2:88:1 //Cut: Ctrl+X (KeyDown)
0:1361:2:67:1 //Copy: Ctrl+C (KeyDown)
-0:1361:2:45:1 //Copy: Ctrl+Ins (KeyDown)
+0:1361:2:45:1 //Copy: Ctrl+INSERT (KeyDown)
0:1362:2:86:1 //Paste: Ctrl+V (KeyDown)
-0:1362:1:45:1 //Paste: Shift+Ins (KeyDown)
+0:1362:1:45:1 //Paste: Shift+INSERT (KeyDown)
0:1364:2:53:1 //SelectAll: Ctrl+5 (KeyDown)
0:1365:2:70:1 //Find: Ctrl+F (KeyDown)
0:1366:0:114:1 //Find Next: F3 (KeyDown)
@@ -31,45 +31,52 @@
0:1368:2:113:1 //Toggle Tree View: Ctrl+F2 (KeyDown)
0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown)
0:1370:0:112:1 //Help (to do): F1 (KeyDown)
-0:1032:2:111:5 //Previous instrument: Ctrl+ (KeyDown|KeyHold)
-0:1032:2:38:5 //Previous instrument: Ctrl+Up (KeyDown|KeyHold)
-0:1033:2:106:5 //Next instrument: Ctrl+Num * (KeyDown|KeyHold)
-0:1033:2:40:5 //Next instrument: Ctrl+Down (KeyDown|KeyHold)
-0:1036:0:111:1 //Previous octave: (KeyDown)
-0:1037:0:106:1 //Next octave: Num * (KeyDown)
-0:1034:2:37:5 //Previous order: Ctrl+Left (KeyDown|KeyHold)
-0:1035:2:39:5 //Next order: Ctrl+Right (KeyDown|KeyHold)
+0:1032:2:111:5 //Previous instrument: Ctrl+NUM DIVIDE (KeyDown|KeyHold)
+0:1032:2:38:5 //Previous instrument: Ctrl+UP (KeyDown|KeyHold)
+0:1033:2:106:5 //Next instrument: Ctrl+NUMMULT (KeyDown|KeyHold)
+0:1033:2:40:5 //Next instrument: Ctrl+DOWN (KeyDown|KeyHold)
+0:1036:0:111:1 //Previous octave: NUM DIVIDE (KeyDown)
+0:1037:0:106:1 //Next octave: NUMMULT (KeyDown)
+0:1034:2:37:5 //Previous order: Ctrl+LEFT (KeyDown|KeyHold)
+0:1035:2:39:5 //Next order: Ctrl+RIGHT (KeyDown|KeyHold)
//----( General Context [bottom] (1) )------------
//----( Pattern Context [bottom] (2) )------------
-2:1017:0:34:1 //Jump down by highlight1: Page Down (KeyDown)
-2:1018:0:33:1 //Jump up by highlight1: Page Up (KeyDown)
-2:1338:4:34:1 //Jump down by highlight2: Alt+Page Down (KeyDown)
-2:1339:4:33:1 //Jump up by highlight2: Alt+Page Up (KeyDown)
-2:1340:6:34:5 //Snap down to highlight2: Ctrl+Alt+Page Down (KeyDown|KeyHold)
-2:1341:6:33:5 //Snap up to highlight2: Ctrl+Alt+Page Up (KeyDown|KeyHold)
-2:1038:0:40:5 //Navigate down: Down (KeyDown|KeyHold)
-2:1039:0:38:1 //Navigate up: Up (KeyDown)
-2:1040:0:37:5 //Navigate left: Left (KeyDown|KeyHold)
-2:1041:0:39:5 //Navigate right: Right (KeyDown|KeyHold)
-2:1042:0:9:1 //Navigate to next channel: Tab (KeyDown)
-2:1043:1:9:1 //Navigate to previous channel: Shift+Tab (KeyDown)
-2:1044:0:36:1 //Go to first channel: Home (KeyDown)
-2:1045:2:36:1 //Go to first row: Ctrl+Home (KeyDown)
-2:1046:6:36:1 //Go to first row of first channel: Ctrl+Alt+Home (KeyDown)
-2:1047:0:35:1 //Go to last channel: End (KeyDown)
-2:1048:2:35:1 //Go to last row: Ctrl+End (KeyDown)
-2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+End (KeyDown)
+2:1017:0:34:5 //Jump down by measure: PGDOWN (KeyDown|KeyHold)
+2:1018:0:33:5 //Jump up by measure: PGUP (KeyDown|KeyHold)
+2:1338:4:34:5 //Jump down by beat: Alt+PGDOWN (KeyDown|KeyHold)
+2:1339:4:33:5 //Jump up by beat: Alt+PGUP (KeyDown|KeyHold)
+2:1340:6:34:5 //Snap down to beat: Ctrl+Alt+PGDOWN (KeyDown|KeyHold)
+2:1341:6:33:5 //Snap up to beat: Ctrl+Alt+PGUP (KeyDown|KeyHold)
+2:1038:0:40:5 //Navigate down by 1 row: DOWN (KeyDown|KeyHold)
+2:1039:0:38:5 //Navigate up by 1 row: UP (KeyDown|KeyHold)
+2:1691:4:40:5 //Navigate down by spacing: Alt+DOWN (KeyDown|KeyHold)
+2:1692:4:38:5 //Navigate up by spacing: Alt+UP (KeyDown|KeyHold)
+2:1040:0:37:5 //Navigate left: LEFT (KeyDown|KeyHold)
+2:1041:0:39:5 //Navigate right: RIGHT (KeyDown|KeyHold)
+2:1042:0:9:5 //Navigate to next channel: TAB (KeyDown|KeyHold)
+2:1043:1:9:5 //Navigate to previous channel: Shift+TAB (KeyDown|KeyHold)
+2:1044:0:36:1 //Go to first channel: HOME (KeyDown)
+2:1045:2:36:1 //Go to first row: Ctrl+HOME (KeyDown)
+2:1046:6:36:1 //Go to first row of first channel: Ctrl+Alt+HOME (KeyDown)
+2:1047:0:35:1 //Go to last channel: END (KeyDown)
+2:1048:2:35:1 //Go to last row: Ctrl+END (KeyDown)
+2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+END (KeyDown)
+2:1050:1:16:1 //Selection key: Shift (KeyDown)
+2:1051:2:17:1 //Copy select key: Ctrl (KeyDown)
2:1011:2:76:1 //Select channel / Select all: Ctrl+L (KeyDown)
-2:1003:0:13:1 //Quick copy: Enter (KeyDown)
-2:1004:0:32:5 //Quick paste: Space (KeyDown|KeyHold)
-2:1001:2:32:1 //Enable recording: Ctrl+Space (KeyDown)
-2:1002:2:13:5 //Play row: Ctrl+Enter (KeyDown|KeyHold)
-2:1317:4:18:1 //Set row jump on note entry: Alt+Alt (KeyDown)
-2:1685:2:9:1 //Switch to order list: Ctrl+Tab (KeyDown)
+2:1663:0:122:1 //Toggle follow song: F11 (KeyDown)
+2:1003:0:13:5 //Quick copy: ENTER (KeyDown|KeyHold)
+2:1004:0:32:5 //Quick paste: SPACE (KeyDown|KeyHold)
+2:1001:2:32:1 //Enable recording: Ctrl+SPACE (KeyDown)
+2:1002:2:13:5 //Play row: Ctrl+ENTER (KeyDown|KeyHold)
+2:1317:4:18:1 //Set row jump on note entry: Alt (KeyDown)
+2:1685:2:9:1 //Switch to order list: Ctrl+TAB (KeyDown)
2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown)
2:1062:0:93:1 //Show note properties: Application (KeyDown)
+2:1005:0:121:5 //Mute current channel: F10 (KeyDown|KeyHold)
+2:1006:2:121:5 //Solo current channel: Ctrl+F10 (KeyDown|KeyHold)
2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold)
2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold)
2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold)
@@ -78,19 +85,20 @@
2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown)
2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown)
2:1016:4:66:1 //Open effect visualizer: Alt+B (KeyDown)
+2:1766:2:71:1 //Go to row/channel/...: Ctrl+G (KeyDown)
2:1013:2:73:1 //Apply current instrument: Ctrl+I (KeyDown)
2:1660:4:69:5 //Grow selection: Alt+E (KeyDown|KeyHold)
2:1661:4:68:5 //Shrink selection: Alt+D (KeyDown|KeyHold)
-2:1058:0:46:1 //Clear field: Del (KeyDown)
+2:1058:0:46:1 //Clear field: DELETE (KeyDown)
2:1664:1:190:1 //Clear field (IT Style): Shift+. (KeyDown)
-2:1059:2:46:1 //Clear row and step: Ctrl+Del (KeyDown)
-2:1665:1:46:5 //Clear field and step (IT Style): Shift+Del (KeyDown|KeyHold)
-2:1061:0:8:5 //Delete rows: Backspace (KeyDown|KeyHold)
-2:1377:2:8:5 //Delete all rows: Ctrl+Backspace (KeyDown|KeyHold)
-2:1378:0:45:1 //Insert Row: Ins (KeyDown)
-2:1379:2:45:1 //Insert All Rows: Ctrl+Ins (KeyDown)
-2:1055:0:109:5 //Previous pattern: Num - (KeyDown|KeyHold)
-2:1054:0:107:5 //Next pattern: Num + (KeyDown|KeyHold)
+2:1059:2:46:1 //Clear row and step: Ctrl+DELETE (KeyDown)
+2:1665:1:46:5 //Clear field and step (IT Style): Shift+DELETE (KeyDown|KeyHold)
+2:1061:0:8:5 //Delete rows: BACKSPACE (KeyDown|KeyHold)
+2:1377:2:8:5 //Delete all rows: Ctrl+BACKSPACE (KeyDown|KeyHold)
+2:1378:0:45:1 //Insert Row: INSERT (KeyDown)
+2:1379:2:45:1 //Insert All Rows: Ctrl+INSERT (KeyDown)
+2:1055:0:109:5 //Previous pattern: NUM SUB (KeyDown|KeyHold)
+2:1054:0:107:5 //Next pattern: NUM PLUS (KeyDown|KeyHold)
//----( Pattern Context [bottom] - Note Col (3) )------------
3:1064:0:81:1 //Base octave C: Q (KeyDown)
@@ -115,7 +123,7 @@
3:1083:0:75:1 //Base octave +1 G: K (KeyDown)
3:1084:0:76:1 //Base octave +1 G#: L (KeyDown)
3:1085:0:186:1 //Base octave +2 A: ; (KeyDown)
-3:1086:0:222:1 //Base octave +2 A#: ' (KeyDown)
+3:1086:0:222:1 //Base octave +2 A#: # (KeyDown)
3:1087:0:220:1 //Base octave +2 B: \ (KeyDown)
3:1088:0:90:1 //Base octave +2 C: Z (KeyDown)
3:1089:0:88:1 //Base octave +2 C#: X (KeyDown)
@@ -128,70 +136,70 @@
3:1096:0:190:1 //Base octave +2 G#: . (KeyDown)
3:1097:0:191:1 //Base octave +3 A: / (KeyDown)
3:1212:0:48:1 //Set octave 0: 0 (KeyDown)
-3:1212:0:96:1 //Set octave 0: Num 0 (KeyDown)
+3:1212:0:96:1 //Set octave 0: NUM 0 (KeyDown)
3:1213:0:49:1 //Set octave 1: 1 (KeyDown)
-3:1213:0:97:1 //Set octave 1: Num 1 (KeyDown)
+3:1213:0:97:1 //Set octave 1: NUM 1 (KeyDown)
3:1214:0:50:1 //Set octave 2: 2 (KeyDown)
-3:1214:0:98:1 //Set octave 2: Num 2 (KeyDown)
+3:1214:0:98:1 //Set octave 2: NUM 2 (KeyDown)
3:1215:0:51:1 //Set octave 3: 3 (KeyDown)
-3:1215:0:99:1 //Set octave 3: Num 3 (KeyDown)
+3:1215:0:99:1 //Set octave 3: NUM 3 (KeyDown)
3:1216:0:52:1 //Set octave 4: 4 (KeyDown)
-3:1216:0:100:1 //Set octave 4: Num 4 (KeyDown)
+3:1216:0:100:1 //Set octave 4: NUM 4 (KeyDown)
3:1217:0:53:1 //Set octave 5: 5 (KeyDown)
-3:1217:0:101:1 //Set octave 5: Num 5 (KeyDown)
+3:1217:0:101:1 //Set octave 5: NUM 5 (KeyDown)
3:1218:0:54:1 //Set octave 6: 6 (KeyDown)
-3:1218:0:102:1 //Set octave 6: Num 6 (KeyDown)
+3:1218:0:102:1 //Set octave 6: NUM 6 (KeyDown)
3:1219:0:55:1 //Set octave 7: 7 (KeyDown)
-3:1219:0:103:1 //Set octave 7: Num 7 (KeyDown)
+3:1219:0:103:1 //Set octave 7: NUM 7 (KeyDown)
3:1220:0:56:1 //Set octave 8: 8 (KeyDown)
-3:1220:0:104:1 //Set octave 8: Num 8 (KeyDown)
+3:1220:0:104:1 //Set octave 8: NUM 8 (KeyDown)
3:1221:0:57:1 //Set octave 9: 9 (KeyDown)
-3:1221:0:105:1 //Set octave 9: Num 9 (KeyDown)
-3:1316:1:16:1 //Chord Modifier: Shift+Shift (KeyDown)
-3:1200:0:192:1 //Note cut: ` (KeyDown)
+3:1221:0:105:1 //Set octave 9: NUM 9 (KeyDown)
+3:1316:1:16:1 //Chord Modifier: Shift (KeyDown)
+3:1200:0:192:1 //Note cut: ' (KeyDown)
3:1201:0:187:1 //Note off: = (KeyDown)
//----( Pattern Context [bottom] - Ins Col (4) )------------
-4:1202:0:96:1 //Set instrument digit 0: Num 0 (KeyDown)
+4:1202:0:96:1 //Set instrument digit 0: NUM 0 (KeyDown)
4:1202:0:48:1 //Set instrument digit 0: 0 (KeyDown)
-4:1203:0:97:1 //Set instrument digit 1: Num 1 (KeyDown)
+4:1203:0:97:1 //Set instrument digit 1: NUM 1 (KeyDown)
4:1203:0:49:1 //Set instrument digit 1: 1 (KeyDown)
-4:1204:0:98:1 //Set instrument digit 2: Num 2 (KeyDown)
+4:1204:0:98:1 //Set instrument digit 2: NUM 2 (KeyDown)
4:1204:0:50:1 //Set instrument digit 2: 2 (KeyDown)
-4:1205:0:99:1 //Set instrument digit 3: Num 3 (KeyDown)
+4:1205:0:99:1 //Set instrument digit 3: NUM 3 (KeyDown)
4:1205:0:51:1 //Set instrument digit 3: 3 (KeyDown)
-4:1206:0:100:1 //Set instrument digit 4: Num 4 (KeyDown)
+4:1206:0:100:1 //Set instrument digit 4: NUM 4 (KeyDown)
4:1206:0:52:1 //Set instrument digit 4: 4 (KeyDown)
-4:1207:0:101:1 //Set instrument digit 5: Num 5 (KeyDown)
+4:1207:0:101:1 //Set instrument digit 5: NUM 5 (KeyDown)
4:1207:0:53:1 //Set instrument digit 5: 5 (KeyDown)
-4:1208:0:102:1 //Set instrument digit 6: Num 6 (KeyDown)
+4:1208:0:102:1 //Set instrument digit 6: NUM 6 (KeyDown)
4:1208:0:54:1 //Set instrument digit 6: 6 (KeyDown)
-4:1209:0:103:1 //Set instrument digit 7: Num 7 (KeyDown)
+4:1209:0:103:1 //Set instrument digit 7: NUM 7 (KeyDown)
4:1209:0:55:1 //Set instrument digit 7: 7 (KeyDown)
4:1210:0:56:1 //Set instrument digit 8: 8 (KeyDown)
-4:1211:0:105:1 //Set instrument digit 9: Num 9 (KeyDown)
+4:1211:0:105:1 //Set instrument digit 9: NUM 9 (KeyDown)
4:1211:0:57:1 //Set instrument digit 9: 9 (KeyDown)
//----( Pattern Context [bottom] - Vol Col (5) )------------
5:1222:0:48:1 //Set volume digit 0: 0 (KeyDown)
-5:1222:0:96:1 //Set volume digit 0: Num 0 (KeyDown)
+5:1222:0:96:1 //Set volume digit 0: NUM 0 (KeyDown)
5:1223:0:49:1 //Set volume digit 1: 1 (KeyDown)
-5:1223:0:97:1 //Set volume digit 1: Num 1 (KeyDown)
+5:1223:0:97:1 //Set volume digit 1: NUM 1 (KeyDown)
5:1224:0:50:1 //Set volume digit 2: 2 (KeyDown)
-5:1224:0:98:1 //Set volume digit 2: Num 2 (KeyDown)
+5:1224:0:98:1 //Set volume digit 2: NUM 2 (KeyDown)
5:1225:0:51:1 //Set volume digit 3: 3 (KeyDown)
-5:1225:0:99:1 //Set volume digit 3: Num 3 (KeyDown)
+5:1225:0:99:1 //Set volume digit 3: NUM 3 (KeyDown)
5:1226:0:52:1 //Set volume digit 4: 4 (KeyDown)
-5:1226:0:100:1 //Set volume digit 4: Num 4 (KeyDown)
+5:1226:0:100:1 //Set volume digit 4: NUM 4 (KeyDown)
5:1227:0:53:1 //Set volume digit 5: 5 (KeyDown)
-5:1227:0:101:1 //Set volume digit 5: Num 5 (KeyDown)
+5:1227:0:101:1 //Set volume digit 5: NUM 5 (KeyDown)
5:1228:0:54:1 //Set volume digit 6: 6 (KeyDown)
-5:1228:0:102:1 //Set volume digit 6: Num 6 (KeyDown)
+5:1228:0:102:1 //Set volume digit 6: NUM 6 (KeyDown)
5:1229:0:55:1 //Set volume digit 7: 7 (KeyDown)
-5:1229:0:103:1 //Set volume digit 7: Num 7 (KeyDown)
+5:1229:0:103:1 //Set volume digit 7: NUM 7 (KeyDown)
5:1230:0:56:1 //Set volume digit 8: 8 (KeyDown)
5:1231:0:57:1 //Set volume digit 9: 9 (KeyDown)
-5:1231:0:105:1 //Set volume digit 9: Num 9 (KeyDown)
+5:1231:0:105:1 //Set volume digit 9: NUM 9 (KeyDown)
5:1232:0:86:1 //Vol command - volume: V (KeyDown)
5:1233:0:80:1 //Vol command - pan: P (KeyDown)
5:1234:0:67:1 //Vol command - vol slide up: C (KeyDown)
@@ -214,25 +222,25 @@
//----( Pattern Context [bottom] - Param Col (7) )------------
7:1247:0:48:1 //FX Param digit 0: 0 (KeyDown)
-7:1247:0:96:1 //FX Param digit 0: Num 0 (KeyDown)
+7:1247:0:96:1 //FX Param digit 0: NUM 0 (KeyDown)
7:1248:0:49:1 //FX Param digit 1: 1 (KeyDown)
-7:1248:0:97:1 //FX Param digit 1: Num 1 (KeyDown)
+7:1248:0:97:1 //FX Param digit 1: NUM 1 (KeyDown)
7:1249:0:50:1 //FX Param digit 2: 2 (KeyDown)
-7:1249:0:98:1 //FX Param digit 2: Num 2 (KeyDown)
+7:1249:0:98:1 //FX Param digit 2: NUM 2 (KeyDown)
7:1250:0:51:1 //FX Param digit 3: 3 (KeyDown)
-7:1250:0:99:1 //FX Param digit 3: Num 3 (KeyDown)
+7:1250:0:99:1 //FX Param digit 3: NUM 3 (KeyDown)
7:1251:0:52:1 //FX Param digit 4: 4 (KeyDown)
-7:1251:0:100:1 //FX Param digit 4: Num 4 (KeyDown)
+7:1251:0:100:1 //FX Param digit 4: NUM 4 (KeyDown)
7:1252:0:53:1 //FX Param digit 5: 5 (KeyDown)
-7:1252:0:101:1 //FX Param digit 5: Num 5 (KeyDown)
+7:1252:0:101:1 //FX Param digit 5: NUM 5 (KeyDown)
7:1253:0:54:1 //FX Param digit 6: 6 (KeyDown)
-7:1253:0:102:1 //FX Param digit 6: Num 6 (KeyDown)
+7:1253:0:102:1 //FX Param digit 6: NUM 6 (KeyDown)
7:1254:0:55:1 //FX Param digit 7: 7 (KeyDown)
-7:1254:0:103:1 //FX Param digit 7: Num 7 (KeyDown)
+7:1254:0:103:1 //FX Param digit 7: NUM 7 (KeyDown)
7:1255:0:56:1 //FX Param digit 8: 8 (KeyDown)
-7:1255:0:104:1 //FX Param digit 8: Num 8 (KeyDown)
+7:1255:0:104:1 //FX Param digit 8: NUM 8 (KeyDown)
7:1256:0:57:1 //FX Param digit 9: 9 (KeyDown)
-7:1256:0:105:1 //FX Param digit 9: Num 9 (KeyDown)
+7:1256:0:105:1 //FX Param digit 9: NUM 9 (KeyDown)
7:1257:0:65:1 //FX Param digit A: A (KeyDown)
7:1258:0:66:1 //FX Param digit B: B (KeyDown)
7:1259:0:67:1 //FX Param digit C: C (KeyDown)
@@ -242,12 +250,12 @@
//----( Sample Context [bottom] (8) )------------
8:1380:2:84:1 //Trim sample around loop points: Ctrl+T (KeyDown)
-8:1383:0:8:1 //Silence sample selection: Backspace (KeyDown)
+8:1383:0:8:1 //Silence sample selection: BACKSPACE (KeyDown)
8:1385:3:65:1 //Amplify Sample: Shift+Ctrl+A (KeyDown)
8:1381:3:82:1 //Reverse sample: Shift+Ctrl+R (KeyDown)
-8:1382:0:46:1 //Delete sample selection: Del (KeyDown)
-8:1386:0:107:1 //Zoom Out: Num + (KeyDown)
-8:1387:0:109:1 //Zoom In: Num - (KeyDown)
+8:1382:0:46:1 //Delete sample selection: DELETE (KeyDown)
+8:1386:0:107:1 //Zoom Out: NUM PLUS (KeyDown)
+8:1387:0:109:1 //Zoom In: NUM SUB (KeyDown)
//----( Instrument Context [bottom] (9) )------------
@@ -257,13 +265,16 @@
//----( Unknown Context (12) )------------
-//----( General Context [top] (13) )------------
+//----( Plugin GUI Context (13) )------------
-//----( Pattern Context [top] (14) )------------
+//----( General Context [top] (14) )------------
-//----( Sample Context [top] (15) )------------
+//----( Pattern Context [top] (15) )------------
-//----( Instrument Context [top] (16) )------------
+//----( Sample Context [top] (16) )------------
-//----( Comments Context [top] (17) )------------
+//----( Instrument Context [top] (17) )------------
+//----( Comments Context [top] (18) )------------
+
+//----( Unknown Context (19) )------------
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2007-05-25 22:09:32 UTC (rev 187)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2007-05-27 17:47:34 UTC (rev 188)
@@ -203,11 +203,9 @@
if (m_nMaxMixChannels > MAX_CHANNELS) m_nMaxMixChannels = MAX_CHANNELS;
if (gdwMixingFreq < 4000) gdwMixingFreq = 4000;
if (gdwMixingFreq > MAX_SAMPLE_RATE) gdwMixingFreq = MAX_SAMPLE_RATE;
- //rewbs.resamplerConf
- //gnVolumeRampSamples = (gdwMixingFreq * VOLUMERAMPLEN) / 100000;
- //if (gnVolumeRampSamples < 8) gnVolumeRampSamples = 8; //
- gnVolumeRampSamples = CMainFrame::glVolumeRampSamples;
- //end rewbs.resamplerConf
+ // Start with ramping disabled to avoid clicks on first read.
+ // Ramping is now set after the first read in CSoundFile::Read();
+ gnVolumeRampSamples = 0;
gnDryROfsVol = gnDryLOfsVol = 0;
#ifndef NO_REVERB
gnRvbROfsVol = gnRvbLOfsVol = 0;
@@ -394,6 +392,8 @@
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 )
+ gnVolumeRampSamples = CMainFrame::glVolumeRampSamples;
}
MixDone:
if (lRead) memset(lpBuffer, (gnBitsPerSample == 8) ? 0x80 : 0, lRead * lSampleSize);
@@ -731,19 +731,19 @@
// Should we process tick0 effects?
if (!m_nMusicSpeed) m_nMusicSpeed = 1;
m_dwSongFlags |= SONG_FIRSTTICK;
+
+ //End of row? stop pattern step (aka "play row").
+ if (m_nTickCount >= m_nMusicSpeed * (m_nPatternDelay+1) + m_nFrameDelay - 1) {
+ #ifdef MODPLUG_TRACKER
+ if (m_dwSongFlags & SONG_STEP) {
+ m_dwSongFlags &= ~SONG_STEP;
+ m_dwSongFlags |= SONG_PAUSED;
+ }
+ #endif // MODPLUG_TRACKER
+ }
+
if (m_nTickCount)
{
- //End of row? stop pattern step (aka "play row").
- if (m_nTickCount >= m_nMusicSpeed * (m_nPatternDelay+1) + m_nFrameDelay - 1) {
- #ifdef MODPLUG_TRACKER
- if (m_dwSongFlags & SONG_STEP) {
- m_dwSongFlags &= ~SONG_STEP;
- m_dwSongFlags |= SONG_PAUSED;
- }
- #endif // MODPLUG_TRACKER
- }
-
-
m_dwSongFlags &= ~SONG_FIRSTTICK;
if ((!(m_nType & MOD_TYPE_XM)) && (m_nTickCount < m_nMusicSpeed * (1 + m_nPatternDelay)))
{
@@ -1884,7 +1884,7 @@
VOID CSoundFile::ApplyGlobalVolume(int SoundBuffer[], long lTotalSampleCount)
-//--------------------------------------------------------
+//---------------------------------------------------------------------------
{
long delta=0;
long step=0;
@@ -1915,6 +1915,7 @@
m_nSamplesToGlobalVolRampDest--;
} else {
SoundBuffer[pos] = _muldiv(SoundBuffer[pos], m_nGlobalVolume, MAX_GLOBAL_VOLUME);
+ m_lHighResRampingGlobalVolume = m_nGlobalVolume<<VOLUMERAMPPRECISION;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2007-05-25 22:09:38
|
Revision: 187
http://svn.sourceforge.net/modplug/?rev=187&view=rev
Author: relabsoluness
Date: 2007-05-25 15:09:32 -0700 (Fri, 25 May 2007)
Log Message:
-----------
. <Relabs> Fixed 'cleanup samples' - yet another ridiculous bug from the 'RC3' branch.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Modedit.cpp
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2007-05-18 17:54:56 UTC (rev 186)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2007-05-25 22:09:32 UTC (rev 187)
@@ -36,7 +36,7 @@
if(m_SndFile.m_nType == MOD_TYPE_MPT)
{
- if(::MessageBox(NULL, "Convertion from MPT to any other modtype makes certain features unavailable and is not assured to work properly; Do the convertion anyway? If yes, backupping the mod might be a good idea",
+ if(::MessageBox(NULL, "Convertion from MPTm to any other modtype makes certain features unavailable and is not guaranteed to work properly; Do the convertion anyway?",
"Notice", MB_YESNO) != IDYES)
return FALSE;
}
@@ -710,7 +710,7 @@
}
}
EndWaitCursor();
- if (nExt && !(m_SndFile.m_nType & MOD_TYPE_IT) && (m_SndFile.m_dwSongFlags&SONG_ITPROJECT))
+ if (nExt && !((m_SndFile.m_nType & MOD_TYPE_IT) && (m_SndFile.m_dwSongFlags&SONG_ITPROJECT)))
{ //We don't remove an instrument's unused samples in an ITP.
wsprintf(s, "OpenMPT detected %d sample(s) referenced by an instrument,\n"
"but not used in the song. Do you want to remove them ?", nExt);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2007-05-18 17:55:01
|
Revision: 186
http://svn.sourceforge.net/modplug/?rev=186&view=rev
Author: relabsoluness
Date: 2007-05-18 10:54:56 -0700 (Fri, 18 May 2007)
Log Message:
-----------
/ <Relabs> Commented a few lines from CChannelManagerDlg::OnApply which caused buggy behavior when reordering channels while playing. I didn't understand what was the intended purpose of those lines so maybe something else got broken.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp
Modified: trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp 2007-05-16 19:53:38 UTC (rev 185)
+++ trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp 2007-05-18 17:54:56 UTC (rev 186)
@@ -218,7 +218,7 @@
}
- // Redistribute channel setting & update manager internal store memory
+ // Update manager internal store memory
for(i = 0 ; i < nChannels ; i++){
if(i != newpat[i]){
memory[0][i] = newMemory[0][newpat[i]];
@@ -228,13 +228,14 @@
memory[3][i] = i;
}
+ /*
if(pActiveMod == pModDoc){
i = m_pSndFile->GetCurrentPos();
m_pSndFile->m_dwSongFlags &= ~SONG_STEP;
m_pSndFile->SetCurrentPos(0);
m_pSndFile->SetCurrentPos(i);
}
-
+ */
END_CRITICAL();
EndWaitCursor();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2007-05-16 19:58:33
|
Revision: 185
http://svn.sourceforge.net/modplug/?rev=185&view=rev
Author: relabsoluness
Date: 2007-05-16 12:53:38 -0700 (Wed, 16 May 2007)
Log Message:
-----------
. <Relabs> Pitch/Tempo lock fix(broken in .46 and .47)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2007-05-13 11:17:15 UTC (rev 184)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2007-05-16 19:53:38 UTC (rev 185)
@@ -1024,7 +1024,7 @@
if (!m_bInitialized) dwHintMask |= HINT_MODTYPE;
if (dwHintMask & HINT_MODTYPE)
{
- BOOL bITonly = ((m_pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (m_pSndFile->m_nInstruments)) ? TRUE : FALSE;
+ BOOL bITandMPT = ((m_pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (m_pSndFile->m_nInstruments)) ? TRUE : FALSE;
//rewbs.instroVSTi
BOOL bITandXM = (((m_pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) || (m_pSndFile->m_nType == MOD_TYPE_XM)) && (m_pSndFile->m_nInstruments)) ? TRUE : FALSE;
bool bMPTOnly = ((m_pSndFile->m_nType == MOD_TYPE_MPT) && (m_pSndFile->m_nInstruments)) ? TRUE : FALSE;
@@ -1034,7 +1034,7 @@
::EnableWindow(::GetDlgItem(m_hWnd, IDC_EDIT2), bITandXM);
m_SliderAttack.EnableWindow(bITandXM);
m_EditName.EnableWindow(bITandXM);
- m_EditFileName.EnableWindow(bITonly);
+ m_EditFileName.EnableWindow(bITandMPT);
m_CbnMidiCh.EnableWindow(bITandXM);
m_CbnMixPlug.EnableWindow(bITandXM);
m_SpinMidiPR.EnableWindow(bITandXM);
@@ -1044,32 +1044,32 @@
m_NoteMap.EnableWindow(bITandXM);
m_CbnResampling.EnableWindow(bITandXM);
- m_ComboNNA.EnableWindow(bITonly);
- m_SliderVolSwing.EnableWindow(bITonly);
- m_SliderPanSwing.EnableWindow(bITonly);
- m_SliderCutSwing.EnableWindow(bITonly);
- m_SliderResSwing.EnableWindow(bITonly);
- m_CbnFilterMode.EnableWindow(bITonly);
- m_ComboDCT.EnableWindow(bITonly);
- m_ComboDCA.EnableWindow(bITonly);
- m_ComboPPC.EnableWindow(bITonly);
- m_SpinPPS.EnableWindow(bITonly);
- m_EditGlobalVol.EnableWindow(bITonly);
- m_SpinGlobalVol.EnableWindow(bITonly);
- m_EditPanning.EnableWindow(bITonly);
- m_SpinPanning.EnableWindow(bITonly);
- m_CheckPanning.EnableWindow(bITonly);
- m_EditPPS.EnableWindow(bITonly);
- m_CheckCutOff.EnableWindow(bITonly);
- m_CheckResonance.EnableWindow(bITonly);
- m_CheckHighpass.EnableWindow(bITonly);
- m_SliderCutOff.EnableWindow(bITonly);
- m_SliderResonance.EnableWindow(bITonly);
+ m_ComboNNA.EnableWindow(bITandMPT);
+ m_SliderVolSwing.EnableWindow(bITandMPT);
+ m_SliderPanSwing.EnableWindow(bITandMPT);
+ m_SliderCutSwing.EnableWindow(bITandMPT);
+ m_SliderResSwing.EnableWindow(bITandMPT);
+ m_CbnFilterMode.EnableWindow(bITandMPT);
+ m_ComboDCT.EnableWindow(bITandMPT);
+ m_ComboDCA.EnableWindow(bITandMPT);
+ m_ComboPPC.EnableWindow(bITandMPT);
+ m_SpinPPS.EnableWindow(bITandMPT);
+ m_EditGlobalVol.EnableWindow(bITandMPT);
+ m_SpinGlobalVol.EnableWindow(bITandMPT);
+ m_EditPanning.EnableWindow(bITandMPT);
+ m_SpinPanning.EnableWindow(bITandMPT);
+ m_CheckPanning.EnableWindow(bITandMPT);
+ m_EditPPS.EnableWindow(bITandMPT);
+ m_CheckCutOff.EnableWindow(bITandMPT);
+ m_CheckResonance.EnableWindow(bITandMPT);
+ m_CheckHighpass.EnableWindow(bITandMPT);
+ m_SliderCutOff.EnableWindow(bITandMPT);
+ m_SliderResonance.EnableWindow(bITandMPT);
m_SpinInstrument.SetRange(1, m_pSndFile->m_nInstruments);
m_SpinInstrument.EnableWindow((m_pSndFile->m_nInstruments) ? TRUE : FALSE);
m_ComboTuning.EnableWindow(bMPTOnly);
- m_EditPitchTempoLock.EnableWindow(bMPTOnly);
- m_CheckPitchTempoLock.EnableWindow(bMPTOnly);
+ m_EditPitchTempoLock.EnableWindow(bITandMPT);
+ m_CheckPitchTempoLock.EnableWindow(bITandMPT);
}
if (dwHintMask & (HINT_INSTRUMENT|HINT_MODTYPE))
{
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2007-05-13 11:17:15 UTC (rev 184)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2007-05-16 19:53:38 UTC (rev 185)
@@ -1420,12 +1420,12 @@
{
freq = GetFreqFromPeriod(period, pChn->nC4Speed, nPeriodFrac);
}
- else //In this case: m_nType == MOD_TYPE_MPT
+ else //In this case: m_nType == MOD_TYPE_MPT and using custom tunings.
{
m_nRow;
if(pChn->m_CalculateFreq || (pChn->m_ReCalculateFreqOnFirstTick && m_nTickCount == 0))
{
- pChn->m_Freq = static_cast<UINT>(pChn->nC4Speed * vibratoFactor * pChn->pHeader->pTuning->GetFrequencyRatio(pChn->nNote - NOTE_MIDDLEC + arpeggioSteps, static_cast<CTuning::FINESTEPTYPE>(pChn->nFineTune)+pChn->m_PortamentoFineSteps));
+ pChn->m_Freq = pChn->nC4Speed * vibratoFactor * pChn->pHeader->pTuning->GetFrequencyRatio(pChn->nNote - NOTE_MIDDLEC + arpeggioSteps, static_cast<CTuning::FINESTEPTYPE>(pChn->nFineTune)+pChn->m_PortamentoFineSteps);
if(!pChn->m_CalculateFreq)
pChn->m_ReCalculateFreqOnFirstTick = false;
else
@@ -1433,17 +1433,13 @@
}
freq = pChn->m_Freq;
-
- //Doing instrument specific things.
- if(pChn->pHeader)
- {
- //Pitch/Tempo lock (yet another feature from MPT23 :)
- if(pChn->pHeader->wPitchToTempoLock)
- freq *= static_cast<UINT>((float)m_nMusicTempo / (float)pChn->pHeader->wPitchToTempoLock);
- }
}
+ //Applying Pitch/Tempo lock.
+ if(m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT) && pChn->pHeader && pChn->pHeader->wPitchToTempoLock)
+ freq *= (float)m_nMusicTempo / (float)pChn->pHeader->wPitchToTempoLock;
+
if ((m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (freq < 256))
{
pChn->nFadeOutVol = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <re...@us...> - 2007-05-13 11:17:22
|
Revision: 184
http://svn.sourceforge.net/modplug/?rev=184&view=rev
Author: rewbs
Date: 2007-05-13 04:17:15 -0700 (Sun, 13 May 2007)
Log Message:
-----------
v1.17.02.47
. <pelya> Save pattern scrollbar position when switching to other tabs
. <pelya> If the cursor is moved but it is not on screen, move both horizontal and vertical scrollbars to make it visible.
. <rewbs> Fix saturation on old modules (introduced in 1.17.02.46). Loading tracks with no saved mixlevel setting defaults to 'original'. Starting new IT, MPTM, ITP or XM defaults to '117RC3'. Starting new MOD or S3M defaults to 'original'.
. <rewbs> Tree view FX list now starts with FX01 instead of FX00.
/ <Relabs> Pattern skipping behavior returned to that of .45
. <pelya & rewbs> intenal: ifdefs for compilation on vs2005
. <Relabs> intenal: VS Edit&Continue fix (gone broken in 'RC3'branch)
/ <Relabs> Minor modifications(cleanup of channel state reset code, removed unused orderundo-vector.)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp
trunk/OpenMPT/mptrack/SoundFilePlayConfig.h
trunk/OpenMPT/mptrack/TuningDialog.h
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/mptrack/View_tre.cpp
trunk/OpenMPT/mptrack/bin/mptrack.exe
trunk/OpenMPT/mptrack/bin/version
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/mptrack.vcproj
trunk/OpenMPT/mptrack/patternContainer.cpp
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/mod_specifications.h
Added Paths:
-----------
trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2007-05-13 11:17:15 UTC (rev 184)
@@ -101,7 +101,8 @@
MODCHANNEL *p = m_SndFile.Chn;
if (((DWORD)p) & 7) Log("MODCHANNEL is not aligned (0x%08X)\n", p);
#endif
-
+// Fix: save pattern scrollbar position when switching to other tab
+ m_szOldPatternScrollbarsPos = CSize(-10,-10);
// -> CODE#0015
// -> DESC="channels management dlg"
ReinitRecordState();
@@ -134,20 +135,22 @@
m_SndFile.Create(NULL, this, 0);
m_SndFile.ChangeModTypeTo(CTrackApp::GetDefaultDocType());
-// -> CODE#0023
-// -> DESC="IT project files (.itp)"
- if(CTrackApp::IsProject()) m_SndFile.m_dwSongFlags |= SONG_ITPROJECT;
-// -! NEW_FEATURE#0023
+ if(CTrackApp::IsProject()) {
+ m_SndFile.m_dwSongFlags |= SONG_ITPROJECT;
+ }
- if (m_SndFile.m_nType & (MOD_TYPE_XM|MOD_TYPE_IT | MOD_TYPE_MPT)) m_SndFile.m_dwSongFlags |= SONG_LINEARSLIDES;
- //rewbs.MacroGUI: enable embedded macros by default.
- if (m_SndFile.m_nType & (MOD_TYPE_XM|MOD_TYPE_IT | MOD_TYPE_MPT)) m_SndFile.m_dwSongFlags |= SONG_EMBEDMIDICFG;
+ if (m_SndFile.m_nType & (MOD_TYPE_XM | MOD_TYPE_IT | MOD_TYPE_MPT)) {
+ m_SndFile.m_dwSongFlags |= SONG_LINEARSLIDES;
+ m_SndFile.m_dwSongFlags |= SONG_EMBEDMIDICFG;
+ }
+
+ // Refresh mix levels now that the correct mod type has been set
+ m_SndFile.m_nMixLevels=m_SndFile.GetModSpecifications()->defaultMixLevels;
+ m_SndFile.m_pConfig->SetMixLevels(m_SndFile.m_nMixLevels);
+
theApp.GetDefaultMidiMacro(&m_SndFile.m_MidiCfg);
-// -> CODE#0015
-// -> DESC="channels management dlg"
ReinitRecordState();
-// -! NEW_FEATURE#0015
InitializeMod();
SetModifiedFlag(FALSE);
return TRUE;
@@ -3119,3 +3122,4 @@
SetModified();
}
}
+
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2007-05-13 11:17:15 UTC (rev 184)
@@ -219,9 +219,14 @@
BOOL RemoveChannels(BOOL bChnMask[MAX_CHANNELS]);
bool m_bHasValidPath; //becomes true if document is loaded or saved.
+// Fix: save pattern scrollbar position when switching to other tab
+ CSize GetOldPatternScrollbarsPos() const { return m_szOldPatternScrollbarsPos; };
+ void SetOldPatternScrollbarsPos( CSize s ){ m_szOldPatternScrollbarsPos = s; };
// protected members
protected:
+ CSize m_szOldPatternScrollbarsPos;
+
BOOL InitializeMod();
void* GetChildFrame(); //rewbs.customKeys
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-13 11:17:15 UTC (rev 184)
@@ -858,7 +858,7 @@
CString localVersion = CMainFrame::GetFullVersionString();
if (remoteVersion > localVersion) {
CString message;
- message.Format("New version available: %s (you are using %). Would you like more information?", remoteVersion, localVersion);
+ message.Format("New version available: %s (you are using %s). Would you like more information?", remoteVersion, localVersion);
if (AfxMessageBox(message, MB_ICONQUESTION|MB_YESNO ) == IDYES) {
CString URL;
URL.Format("http://openmpt.xwiki.com/xwiki/bin/view/Development/Builds?currentVersion=%s", localVersion);
@@ -1577,16 +1577,17 @@
MPC forums: http://lpchip.com/modplug/\r\n\
Robin Fernandes: mailto:mo...@so...\r\n\r\n\
Updates:\r\n\
-http://lpchip.com/modplug/viewtopic.php?t=18");
+http://modplug.sourceforge.net/builds/#dev");
char *pArrCredit = {
"OpenMPT / Modplug Tracker|"
- "Copyright \xA9 2004-2005 GPL|"
+ "Copyright \xA9 2004-2007 GPL|"
"Copyright \xA9 1997-2003 Olivier Lapicque (ol...@mo...)|"
"|"
- "Development:|"
- "Robin Fernandes: mo...@so... (2004-2006)|"
- "rel...@us... (2005-2006)|"
+ "Contributors:|"
+ "Robin Fernandes: ro...@so... (2004-2007)|"
+ "Ahti Leppan: rel...@us... (2005-2007)|"
+ "Sergiy Pylypenko: x.p...@gm... (2007)|"
"Eric Chavanon: co...@er... (2004-2005)|"
"Trevor Nunes: mo...@pl... (2004)|"
"Olivier Lapicque: ol...@mo... (1997-2003)|"
@@ -1605,8 +1606,8 @@
"http://tinyurl.com/4yze8||"
"...and to the following for ideas, testing and support:|"
"LPChip, Ganja, Diamond, Nofold, Goor00,|"
- "Georg, Skilletaudio, Squirrel Havoc, Snu,|"
- "Anboi, Sam Zen, BooT-SectoR-ViruZ, 33, Waxhead,|"
+ "Georg, Skilletaudio, Squirrel Havoc, Snu, Anboi,|"
+ "Sam Zen, BooT-SectoR-ViruZ, 33, Waxhead, Jojo,|"
"all at the MPC forums.|"
"||||||"
};
Modified: trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp
===================================================================
--- trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2007-05-13 11:17:15 UTC (rev 184)
@@ -1,17 +1,14 @@
#include "stdafx.h"
#include ".\soundfileplayconfig.h"
-CSoundFilePlayConfig::CSoundFilePlayConfig(void)
-{
- SetPluginMixLevels(mixLevels_117RC3);
+CSoundFilePlayConfig::CSoundFilePlayConfig(void) {
setVSTiVolume(1.0f);
}
-CSoundFilePlayConfig::~CSoundFilePlayConfig(void)
-{
+CSoundFilePlayConfig::~CSoundFilePlayConfig(void) {
}
-void CSoundFilePlayConfig::SetPluginMixLevels(int mixLevelType) {
+void CSoundFilePlayConfig::SetMixLevels(int mixLevelType) {
switch (mixLevelType)
{
// Olivier's version gives us floats in [-0.5; 0.5] and slightly saturates VSTis.
@@ -119,7 +116,6 @@
void CSoundFilePlayConfig::setVSTiVolume(float inVSTiVolume) {
m_VSTiVolume = inVSTiVolume;
- m_VSTiGainFactor = m_VSTiAttenuation*m_VSTiVolume;
}
float CSoundFilePlayConfig::getVSTiAttenuation() {
@@ -127,8 +123,7 @@
}
void CSoundFilePlayConfig::setVSTiAttenuation(float inVSTiAttenuation) {
- m_VSTiAttenuation=inVSTiAttenuation;
- m_VSTiGainFactor = m_VSTiAttenuation*m_VSTiVolume;
+ m_VSTiAttenuation = inVSTiAttenuation;
}
float CSoundFilePlayConfig::getIntToFloat() {
Modified: trunk/OpenMPT/mptrack/SoundFilePlayConfig.h
===================================================================
--- trunk/OpenMPT/mptrack/SoundFilePlayConfig.h 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/SoundFilePlayConfig.h 2007-05-13 11:17:15 UTC (rev 184)
@@ -27,7 +27,7 @@
CSoundFilePlayConfig(void);
~CSoundFilePlayConfig(void);
- void SetPluginMixLevels(int mixLevelType);
+ void SetMixLevels(int mixLevelType);
//getters/setters
float getIntToFloat();
@@ -72,7 +72,6 @@
float m_FloatToInt;
float m_VSTiAttenuation;
float m_VSTiVolume;
- float m_VSTiGainFactor; // always m_VSTiAttenuation * m_VSTiVolume. No public setter.
float m_normalSamplePreAmp;
float m_normalVSTiVol;
Modified: trunk/OpenMPT/mptrack/TuningDialog.h
===================================================================
--- trunk/OpenMPT/mptrack/TuningDialog.h 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/TuningDialog.h 2007-05-13 11:17:15 UTC (rev 184)
@@ -83,10 +83,10 @@
}
private:
+ //Elements are collected to two arrays so that elements with the
+ //same index are mapped to each other.
vector<T1> m_T1;
vector<T2> m_T2;
- //Elements are collected to two arrays so that elements with the
- //same index are mapped to each other.
T1 m_NotFoundT1;
T2 m_NotFoundT2;
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2007-05-13 11:17:15 UTC (rev 184)
@@ -229,8 +229,6 @@
CModDoc *pModDoc = GetDocument();
if (!pModDoc) return FALSE;
pSndFile = pModDoc->GetSoundFile();
- CRect rect;
- UINT yofs = GetYScrollPos();
if ((bWrap) && (pSndFile->PatternSize[m_nPattern]))
{
@@ -295,43 +293,11 @@
//end rewbs.fix3168
if ((row >= pSndFile->PatternSize[m_nPattern]) || (!m_szCell.cy)) return FALSE;
- GetClientRect(&rect);
- rect.top += m_szHeader.cy;
- int numrows = (rect.bottom - rect.top - 1) / m_szCell.cy;
- if (numrows < 1) numrows = 1;
- if (m_nMidRow)
- {
- UINT newofs = row;
- InvalidateRow();
- if (newofs != yofs)
- {
- CSize sz;
- sz.cx = 0;
- sz.cy = (int)(newofs - yofs) * m_szCell.cy;
- OnScrollBy(sz, TRUE);
- }
- m_nRow = row;
- InvalidateRow();
- } else
- {
- InvalidateRow();
- if (row < yofs)
- {
- CSize sz;
- sz.cx = 0;
- sz.cy = (int)(row - yofs) * m_szCell.cy;
- OnScrollBy(sz, TRUE);
- } else
- if (row > yofs + (UINT)numrows - 1)
- {
- CSize sz;
- sz.cx = 0;
- sz.cy = (int)(row - yofs - numrows + 1) * m_szCell.cy;
- OnScrollBy(sz, TRUE);
- }
- m_nRow = row;
- InvalidateRow();
- }
+ // Fix: If cursor isn't on screen move both scrollbars to make it visible
+ InvalidateRow();
+ m_nRow = row;
+ UpdateScrollbarPositions(); //UpdateScrollbarPositions( false ); // default behavior is to move only vertical scrollbar
+ InvalidateRow();
int sel = m_dwCursor | (m_nRow << 16);
int sel0 = sel;
if ((m_dwStatus & (PATSTATUS_KEYDRAGSEL|PATSTATUS_MOUSEDRAGSEL))
@@ -373,34 +339,90 @@
if ((m_dwStatus & (PATSTATUS_KEYDRAGSEL|PATSTATUS_MOUSEDRAGSEL))
&& (!(m_dwStatus & PATSTATUS_DRAGNDROPEDIT))) sel0 = m_dwStartSel;
SetCurSel(sel0, sel);
- int xofs = GetXScrollPos();
- int nchn = ncol >> 3;
- if (nchn < xofs)
+ // Fix: If cursor isn't on screen move both scrollbars to make it visible
+ UpdateScrollbarPositions();
+ UpdateIndicator();
+ return TRUE;
+}
+
+// Fix: If cursor isn't on screen move scrollbars to make it visible
+// Fix: save pattern scrollbar position when switching to other tab
+// Assume that m_nRow and m_dwCursor are valid
+// When we switching to other tab the CViewPattern object is deleted
+// and when switching back new one is created
+BOOL CViewPattern::UpdateScrollbarPositions( bool UpdateHorizontalScrollbar )
+{
+// HACK - after new CViewPattern object created SetCurrentRow() and SetCurrentColumn() are called -
+// just skip first two calls of UpdateScrollbarPositions() if pModDoc->GetOldPatternScrollbarsPos() is valid
+ CModDoc *pModDoc = GetDocument();
+ if (pModDoc)
{
- CSize size(0,0);
- size.cx = nchn * m_szCell.cx - GetScrollPos(SB_HORZ);
- UpdateWindow();
- if (OnScrollBy(size, TRUE)) UpdateWindow();
+ CSize scroll = pModDoc->GetOldPatternScrollbarsPos();
+ if( scroll.cx >= 0 )
+ {
+ OnScrollBy( scroll );
+ scroll.cx = -1;
+ pModDoc->SetOldPatternScrollbarsPos( scroll );
+ return TRUE;
+ } else
+ if( scroll.cx >= -1 )
+ {
+ scroll.cx = -2;
+ pModDoc->SetOldPatternScrollbarsPos( scroll );
+ return TRUE;
+ }
+ }
+ CSize scroll(0,0);
+ UINT row = GetCurrentRow();
+ UINT yofs = GetYScrollPos();
+ CRect rect;
+ GetClientRect(&rect);
+ rect.top += m_szHeader.cy;
+ int numrows = (rect.bottom - rect.top - 1) / m_szCell.cy;
+ if (numrows < 1) numrows = 1;
+ if (m_nMidRow)
+ {
+ if (row != yofs)
+ {
+ scroll.cy = (int)(row - yofs) * m_szCell.cy;
+ }
} else
- if (nchn > xofs)
{
- CRect rect;
- GetClientRect(&rect);
- UINT nw = GetColumnWidth();
- int maxcol = (rect.right - m_szHeader.cx) / nw;
- if ((nchn >= (xofs+maxcol)) && (maxcol >= 0))
+ if (row < yofs)
{
- CSize size(0,0);
- size.cx = (nchn - maxcol + 1) * m_szCell.cx - GetScrollPos(SB_HORZ);
- UpdateWindow();
- if (OnScrollBy(size, TRUE)) UpdateWindow();
+ scroll.cy = (int)(row - yofs) * m_szCell.cy;
+ } else
+ if (row > yofs + (UINT)numrows - 1)
+ {
+ scroll.cy = (int)(row - yofs - numrows + 1) * m_szCell.cy;
}
}
- UpdateIndicator();
+
+ if( UpdateHorizontalScrollbar )
+ {
+ UINT ncol = GetCurrentColumn();
+ UINT xofs = GetXScrollPos();
+ int nchn = ncol >> 3;
+ if (nchn < xofs)
+ {
+ scroll.cx = (int)(nchn - xofs) * m_szCell.cx;
+ } else
+ if (nchn > xofs)
+ {
+ int maxcol = (rect.right - m_szHeader.cx) / m_szCell.cx;
+ if ((nchn >= (xofs+maxcol)) && (maxcol >= 0))
+ {
+ scroll.cx = (int)(nchn - xofs - maxcol + 1) * m_szCell.cx;
+ }
+ }
+ }
+ if( scroll.cx != 0 || scroll.cy != 0 )
+ {
+ OnScrollBy(scroll, TRUE);
+ }
return TRUE;
}
-
DWORD CViewPattern::GetDragItem(CPoint point, LPRECT lpRect)
//----------------------------------------------------------
{
@@ -622,6 +644,13 @@
void CViewPattern::OnDestroy()
//----------------------------
{
+// Fix: save pattern scrollbar position when switching to other tab
+// When we switching to other tab the CViewPattern object is deleted
+ CModDoc *pModDoc = GetDocument();
+ if (pModDoc)
+ {
+ pModDoc->SetOldPatternScrollbarsPos(CSize(m_nXScroll*m_szCell.cx, m_nYScroll*m_szCell.cy));
+ };
if (m_pEffectVis) {
m_pEffectVis->DoClose();
delete m_pEffectVis;
@@ -4887,3 +4916,4 @@
+
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/View_pat.h 2007-05-13 11:17:15 UTC (rev 184)
@@ -153,6 +153,8 @@
BOOL SetCurrentColumn(UINT ncol);
BOOL DragToSel(DWORD dwPos, BOOL bScroll, BOOL bNoMove=FALSE);
BOOL SetPlayCursor(UINT nPat, UINT nRow);
+// Fix: If cursor isn't on screen move scrollbars to make it visible
+ BOOL UpdateScrollbarPositions( bool UpdateHorizontalScrollbar=true );
// -> CODE#0014
// -> DESC="vst wet/dry slider"
// BOOL EnterNote(UINT nNote, UINT nIns=0, BOOL bCheck=FALSE, int vol=-1, BOOL bMultiCh=FALSE);
@@ -351,3 +353,4 @@
#endif
+
Modified: trunk/OpenMPT/mptrack/View_tre.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_tre.cpp 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/View_tre.cpp 2007-05-13 11:17:15 UTC (rev 184)
@@ -672,7 +672,7 @@
{
pInfo->hEffects = InsertItem("Plugins", IMAGE_FOLDER, IMAGE_FOLDER, pInfo->hSong, TVI_LAST);
}
- wsprintf(s, "FX%d: %s", iFx, pPlugin->Info.szName);
+ wsprintf(s, "FX%d: %s", iFx+1, pPlugin->Info.szName);
pInfo->tiEffects[iFx] = InsertItem(s, IMAGE_WAVEOUT, IMAGE_WAVEOUT, pInfo->hEffects, TVI_LAST);
nFx++;
}
Modified: trunk/OpenMPT/mptrack/bin/mptrack.exe
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/bin/version
===================================================================
--- trunk/OpenMPT/mptrack/bin/version 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/bin/version 2007-05-13 11:17:15 UTC (rev 184)
@@ -1 +1 @@
-1.17.02.46
\ No newline at end of file
+1.17.02.47
\ No newline at end of file
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-05-13 11:17:15 UTC (rev 184)
@@ -384,7 +384,7 @@
sel = m_PlugMixBox.GetCurSel();
if (sel >= 0) {
m_pSndFile->m_nMixLevels = m_PlugMixBox.GetItemData(sel);
- m_pSndFile->m_pConfig->SetPluginMixLevels(m_pSndFile->m_nMixLevels);
+ m_pSndFile->m_pConfig->SetMixLevels(m_pSndFile->m_nMixLevels);
m_pSndFile->RecalculateGainForAllPlugs();
}
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2007-05-13 11:17:15 UTC (rev 184)
@@ -1926,7 +1926,7 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,17,2,46
+ FILEVERSION 1,17,2,47
PRODUCTVERSION 0,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
@@ -1944,7 +1944,7 @@
BEGIN
VALUE "CompanyName", "Olivier Lapicque / OpenMPT team"
VALUE "FileDescription", "OpenMPT / ModPlug Tracker"
- VALUE "FileVersion", "1, 17, 2, 46"
+ VALUE "FileVersion", "1, 17, 2, 47"
VALUE "InternalName", "Modplug Tracker"
VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2007 GPL."
VALUE "LegalTrademarks", "M.O.D.P.L.U.G"
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2007-05-13 11:17:15 UTC (rev 184)
@@ -1079,6 +1079,9 @@
RelativePath=".\tuningRatioMapWnd.h">
</File>
<File
+ RelativePath=".\typedefs.h">
+ </File>
+ <File
RelativePath=".\view_com.h">
</File>
<File
Modified: trunk/OpenMPT/mptrack/patternContainer.cpp
===================================================================
--- trunk/OpenMPT/mptrack/patternContainer.cpp 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/mptrack/patternContainer.cpp 2007-05-13 11:17:15 UTC (rev 184)
@@ -59,10 +59,10 @@
return m_Patterns.size();
}
+//NOTE: Various methods around the code are, unsurprisingly, bounded to the way things
+//were handled with 0xFE and 0xFF, so changing these return values might cause problems.
UINT CPatternContainer::GetInvalidIndex() const {return m_rSndFile.m_nType == MOD_TYPE_MPT ? LIMIT_UINT_MAX : 0xFF;}
UINT CPatternContainer::GetIgnoreIndex() const {return m_rSndFile.m_nType == MOD_TYPE_MPT ? LIMIT_UINT_MAX-1 : 0xFE;}
-//NOTE: Various methods around the code are, unsurprisingly, bounded to the way things
-//were handled with 0xFE and 0xFF, so changing these return values might cause problems.
UINT CPatternContainer::GetPatternNumberLimitMax() const
//-------------------------------------------------------
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/packageTemplate/History.txt 2007-05-13 11:17:15 UTC (rev 184)
@@ -8,6 +8,18 @@
?: other
(tx XYZ): thanks to XYZ for telling me about the bug
+v1.17.02.47
+ ? <rewbs> An update checker was introduced in the previous version. If you had any problems with the update notification, please report a bug.
+ . <pelya> Save pattern scrollbar position when switching to other tabs
+ . <pelya> If the cursor is moved but it is not on screen, move both horizontal and vertical scrollbars to make it visible.
+ . <rewbs> Fix saturation on old modules (introduced in 1.17.02.46). Loading tracks with no saved mixlevel setting defaults to 'original'.
+ Starting new IT, MPTM, ITP or XM defaults to '117RC3'. Starting new MOD or S3M defaults to 'original'.
+ . <rewbs> Tree view FX list now starts with FX01 instead of FX00.
+ / <Relabs> Pattern skipping behavior returned to that of .45
+ . <pelya & rewbs> internal: ifdefs for compilation on vs2005
+ . <Relabs> internal: VS Edit&Continue fix (gone broken in 'RC3'branch)
+ / <Relabs> Minor modifications(cleanup of channel state reset code, removed unused orderundo-vector.)
+
v1.17.02.46
+ <Relabsoluness> Experimental MPTm format:
--> Internally, it is still very close to the IT-based format.
@@ -680,4 +692,4 @@
Questions/comments/bug reports?
-------------------------------
-Visit http://www.modplug.com/forums, or write to ro...@so....
\ No newline at end of file
+Visit http://modplug.sourceforge.net/forum.
\ No newline at end of file
Added: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb
===================================================================
--- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb (rev 0)
+++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2007-05-13 11:17:15 UTC (rev 184)
@@ -0,0 +1,269 @@
+//-------- OpenMPT key binding definition file -------
+//-Format is: -
+//- Context:Command ID:Modifiers:Key:KeypressEventType //Comments -
+//----------------------------------------------------------------------
+
+//----( Global Context (0) )------------
+0:1347:2:78:1 //File/New: Ctrl+N (KeyDown)
+0:1346:2:79:1 //File/Open: Ctrl+O (KeyDown)
+0:1349:2:83:1 //File/Save: Ctrl+S (KeyDown)
+0:1030:0:116:1 //Play song/Pause song: F5 (KeyDown)
+0:1031:0:119:1 //Pause song: F8 (KeyDown)
+0:1375:0:27:1 //Stop Song: ESC (KeyDown)
+0:1029:0:117:1 //Play song from start: F6 (KeyDown)
+0:1027:0:118:5 //Play pattern from start: F7 (KeyDown|KeyHold)
+0:1026:2:118:5 //Play pattern from cursor: Ctrl+F7 (KeyDown|KeyHold)
+0:1376:0:120:1 //Toggle Midi Record: F9 (KeyDown)
+0:1359:2:90:1 //Undo: Ctrl+Z (KeyDown)
+0:1360:2:88:1 //Cut: Ctrl+X (KeyDown)
+0:1361:2:67:1 //Copy: Ctrl+C (KeyDown)
+0:1361:2:45:1 //Copy: Ctrl+EINFG (KeyDown)
+0:1362:2:86:1 //Paste: Ctrl+V (KeyDown)
+0:1362:1:45:1 //Paste: Shift+EINFG (KeyDown)
+0:1364:2:53:1 //SelectAll: Ctrl+5 (KeyDown)
+0:1365:2:70:1 //Find: Ctrl+F (KeyDown)
+0:1366:0:114:1 //Find Next: F3 (KeyDown)
+0:1021:4:71:1 //View General: Alt+G (KeyDown)
+0:1022:4:80:1 //View Pattern: Alt+P (KeyDown)
+0:1023:4:83:1 //View Samples: Alt+S (KeyDown)
+0:1024:4:78:1 //View Instruments: Alt+N (KeyDown)
+0:1025:1:120:1 //View Comments: Shift+F9 (KeyDown)
+0:1368:2:113:1 //Toggle Tree View: Ctrl+F2 (KeyDown)
+0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown)
+0:1370:0:112:1 //Help (to do): F1 (KeyDown)
+0:1032:2:111:5 //Previous instrument: Ctrl+ (ZEHNERTASTATUR) (KeyDown|KeyHold)
+0:1032:2:38:5 //Previous instrument: Ctrl+NACH-OBEN (KeyDown|KeyHold)
+0:1033:2:106:5 //Next instrument: Ctrl+ (ZEHNERTASTATUR) (KeyDown|KeyHold)
+0:1033:2:40:5 //Next instrument: Ctrl+NACH-UNTEN (KeyDown|KeyHold)
+0:1036:0:111:1 //Previous octave: (ZEHNERTASTATUR) (KeyDown)
+0:1037:0:106:1 //Next octave: (ZEHNERTASTATUR) (KeyDown)
+0:1034:2:37:5 //Previous order: Ctrl+NACH-LINKS (KeyDown|KeyHold)
+0:1035:2:39:5 //Next order: Ctrl+NACH-RECHTS (KeyDown|KeyHold)
+
+//----( General Context [bottom] (1) )------------
+
+//----( Pattern Context [bottom] (2) )------------
+2:1338:0:34:5 //Jump down by beat: BILD-NACH-UNTEN (KeyDown|KeyHold)
+2:1339:0:33:5 //Jump up by beat: BILD-NACH-OBEN (KeyDown|KeyHold)
+2:1340:6:34:5 //Snap down to beat: Ctrl+Alt+BILD-NACH-UNTEN (KeyDown|KeyHold)
+2:1341:6:33:5 //Snap up to beat: Ctrl+Alt+BILD-NACH-OBEN (KeyDown|KeyHold)
+2:1038:0:40:5 //Navigate down by 1 row: NACH-UNTEN (KeyDown|KeyHold)
+2:1039:0:38:5 //Navigate up by 1 row: NACH-OBEN (KeyDown|KeyHold)
+2:1040:0:37:5 //Navigate left: NACH-LINKS (KeyDown|KeyHold)
+2:1041:0:39:5 //Navigate right: NACH-RECHTS (KeyDown|KeyHold)
+2:1042:0:9:1 //Navigate to next channel: TABULATOR (KeyDown)
+2:1043:1:9:1 //Navigate to previous channel: Shift+TABULATOR (KeyDown)
+2:1044:0:36:1 //Go to first channel: POS1 (KeyDown)
+2:1045:2:36:1 //Go to first row: Ctrl+POS1 (KeyDown)
+2:1046:6:36:1 //Go to first row of first channel: Ctrl+Alt+POS1 (KeyDown)
+2:1047:0:35:1 //Go to last channel: ENDE (KeyDown)
+2:1048:2:35:1 //Go to last row: Ctrl+ENDE (KeyDown)
+2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+ENDE (KeyDown)
+2:1050:1:16:1 //Selection key: Shift+UMSCHALT (KeyDown)
+2:1011:2:76:1 //Select channel / Select all: Ctrl+L (KeyDown)
+2:1003:0:13:1 //Quick copy: EINGABE (KeyDown)
+2:1004:0:32:5 //Quick paste: LEER (KeyDown|KeyHold)
+2:1001:2:32:1 //Enable recording: Ctrl+LEER (KeyDown)
+2:1002:2:13:5 //Play row: Ctrl+EINGABE (KeyDown|KeyHold)
+2:1317:4:18:1 //Set row jump on note entry: Alt (KeyDown)
+2:1685:2:9:1 //Switch to order list: Ctrl+TABULATOR (KeyDown)
+2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown)
+2:1062:0:93:1 //Show note properties: ANWENDUNG (KeyDown)
+2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold)
+2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold)
+2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold)
+2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold)
+2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown)
+2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown)
+2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown)
+2:1016:4:66:1 //Open effect visualizer: Alt+B (KeyDown)
+2:1013:2:73:1 //Apply current instrument: Ctrl+I (KeyDown)
+2:1660:4:69:5 //Grow selection: Alt+E (KeyDown|KeyHold)
+2:1661:4:68:5 //Shrink selection: Alt+D (KeyDown|KeyHold)
+2:1059:2:46:1 //Clear row and step: Ctrl+ENTF (KeyDown)
+2:1665:0:46:1 //Clear field and step (IT Style): ENTF (KeyDown)
+2:1061:0:8:5 //Delete rows: R\xDCCK (KeyDown|KeyHold)
+2:1377:2:8:5 //Delete all rows: Ctrl+R\xDCCK (KeyDown|KeyHold)
+2:1378:0:45:1 //Insert Row: EINFG (KeyDown)
+2:1379:2:45:1 //Insert All Rows: Ctrl+EINFG (KeyDown)
+2:1055:0:109:5 //Previous pattern: - (ZEHNERTASTATUR) (KeyDown|KeyHold)
+2:1054:0:107:5 //Next pattern: + (ZEHNERTASTATUR) (KeyDown|KeyHold)
+
+//----( Pattern Context [bottom] - Note Col (3) )------------
+3:1064:0:81:1 //Base octave C: Q (KeyDown)
+3:1065:0:87:1 //Base octave C#: W (KeyDown)
+3:1066:0:69:1 //Base octave D: E (KeyDown)
+3:1067:0:82:1 //Base octave D#: R (KeyDown)
+3:1068:0:84:1 //Base octave E: T (KeyDown)
+3:1069:0:90:1 //Base octave F: Z (KeyDown)
+3:1070:0:85:1 //Base octave F#: U (KeyDown)
+3:1071:0:73:1 //Base octave G: I (KeyDown)
+3:1072:0:79:1 //Base octave G#: O (KeyDown)
+3:1073:0:80:1 //Base octave +1 A: P (KeyDown)
+3:1074:0:186:1 //Base octave +1 A#: \xFC (KeyDown)
+3:1075:0:187:1 //Base octave +1 B: + (KeyDown)
+3:1076:0:65:1 //Base octave +1 C: A (KeyDown)
+3:1077:0:83:1 //Base octave +1 C#: S (KeyDown)
+3:1078:0:68:1 //Base octave +1 D: D (KeyDown)
+3:1079:0:70:1 //Base octave +1 D#: F (KeyDown)
+3:1080:0:71:1 //Base octave +1 E: G (KeyDown)
+3:1081:0:72:1 //Base octave +1 F: H (KeyDown)
+3:1082:0:74:1 //Base octave +1 F#: J (KeyDown)
+3:1083:0:75:1 //Base octave +1 G: K (KeyDown)
+3:1084:0:76:1 //Base octave +1 G#: L (KeyDown)
+3:1085:0:192:1 //Base octave +2 A: \xF6 (KeyDown)
+3:1086:0:222:1 //Base octave +2 A#: \xE4 (KeyDown)
+3:1087:0:191:1 //Base octave +2 B: # (KeyDown)
+3:1088:0:89:1 //Base octave +2 C: Y (KeyDown)
+3:1089:0:88:1 //Base octave +2 C#: X (KeyDown)
+3:1090:0:67:1 //Base octave +2 D: C (KeyDown)
+3:1091:0:86:1 //Base octave +2 D#: V (KeyDown)
+3:1092:0:66:1 //Base octave +2 E: B (KeyDown)
+3:1093:0:78:1 //Base octave +2 F: N (KeyDown)
+3:1094:0:77:1 //Base octave +2 F#: M (KeyDown)
+3:1095:0:188:1 //Base octave +2 G: , (KeyDown)
+3:1096:0:190:1 //Base octave +2 G#: . (KeyDown)
+3:1097:0:189:1 //Base octave +3 A: - (KeyDown)
+3:1212:0:48:1 //Set octave 0: 0 (KeyDown)
+3:1212:0:96:1 //Set octave 0: 0 (ZEHNERTASTATUR) (KeyDown)
+3:1213:0:49:1 //Set octave 1: 1 (KeyDown)
+3:1213:0:97:1 //Set octave 1: 1 (ZEHNERTASTATUR) (KeyDown)
+3:1214:0:50:1 //Set octave 2: 2 (KeyDown)
+3:1214:0:98:1 //Set octave 2: 2 (ZEHNERTASTATUR) (KeyDown)
+3:1215:0:51:1 //Set octave 3: 3 (KeyDown)
+3:1215:0:99:1 //Set octave 3: 3 (ZEHNERTASTATUR) (KeyDown)
+3:1216:0:52:1 //Set octave 4: 4 (KeyDown)
+3:1216:0:100:1 //Set octave 4: 4 (ZEHNERTASTATUR) (KeyDown)
+3:1217:0:53:1 //Set octave 5: 5 (KeyDown)
+3:1217:0:101:1 //Set octave 5: 5 (ZEHNERTASTATUR) (KeyDown)
+3:1218:0:54:1 //Set octave 6: 6 (KeyDown)
+3:1218:0:102:1 //Set octave 6: 6 (ZEHNERTASTATUR) (KeyDown)
+3:1219:0:55:1 //Set octave 7: 7 (KeyDown)
+3:1219:0:103:1 //Set octave 7: 7 (ZEHNERTASTATUR) (KeyDown)
+3:1220:0:56:1 //Set octave 8: 8 (KeyDown)
+3:1220:0:104:1 //Set octave 8: 8 (ZEHNERTASTATUR) (KeyDown)
+3:1221:0:57:1 //Set octave 9: 9 (KeyDown)
+3:1221:0:105:1 //Set octave 9: 9 (ZEHNERTASTATUR) (KeyDown)
+3:1316:1:16:1 //Chord Modifier: Shift+UMSCHALT (KeyDown)
+3:1200:0:220:1 //Note cut: ZIRKUMFLEX (KeyDown)
+3:1201:0:221:1 //Note off: AKUT (KeyDown)
+
+//----( Pattern Context [bottom] - Ins Col (4) )------------
+4:1202:0:96:1 //Set instrument digit 0: 0 (ZEHNERTASTATUR) (KeyDown)
+4:1202:0:48:1 //Set instrument digit 0: 0 (KeyDown)
+4:1203:0:97:1 //Set instrument digit 1: 1 (ZEHNERTASTATUR) (KeyDown)
+4:1203:0:49:1 //Set instrument digit 1: 1 (KeyDown)
+4:1204:0:98:1 //Set instrument digit 2: 2 (ZEHNERTASTATUR) (KeyDown)
+4:1204:0:50:1 //Set instrument digit 2: 2 (KeyDown)
+4:1205:0:99:1 //Set instrument digit 3: 3 (ZEHNERTASTATUR) (KeyDown)
+4:1205:0:51:1 //Set instrument digit 3: 3 (KeyDown)
+4:1206:0:100:1 //Set instrument digit 4: 4 (ZEHNERTASTATUR) (KeyDown)
+4:1206:0:52:1 //Set instrument digit 4: 4 (KeyDown)
+4:1207:0:101:1 //Set instrument digit 5: 5 (ZEHNERTASTATUR) (KeyDown)
+4:1207:0:53:1 //Set instrument digit 5: 5 (KeyDown)
+4:1208:0:102:1 //Set instrument digit 6: 6 (ZEHNERTASTATUR) (KeyDown)
+4:1208:0:54:1 //Set instrument digit 6: 6 (KeyDown)
+4:1209:0:103:1 //Set instrument digit 7: 7 (ZEHNERTASTATUR) (KeyDown)
+4:1209:0:55:1 //Set instrument digit 7: 7 (KeyDown)
+4:1210:0:56:1 //Set instrument digit 8: 8 (KeyDown)
+4:1211:0:105:1 //Set instrument digit 9: 9 (ZEHNERTASTATUR) (KeyDown)
+4:1211:0:57:1 //Set instrument digit 9: 9 (KeyDown)
+
+//----( Pattern Context [bottom] - Vol Col (5) )------------
+5:1222:0:48:1 //Set volume digit 0: 0 (KeyDown)
+5:1222:0:96:1 //Set volume digit 0: 0 (ZEHNERTASTATUR) (KeyDown)
+5:1223:0:49:1 //Set volume digit 1: 1 (KeyDown)
+5:1223:0:97:1 //Set volume digit 1: 1 (ZEHNERTASTATUR) (KeyDown)
+5:1224:0:50:1 //Set volume digit 2: 2 (KeyDown)
+5:1224:0:98:1 //Set volume digit 2: 2 (ZEHNERTASTATUR) (KeyDown)
+5:1225:0:51:1 //Set volume digit 3: 3 (KeyDown)
+5:1225:0:99:1 //Set volume digit 3: 3 (ZEHNERTASTATUR) (KeyDown)
+5:1226:0:52:1 //Set volume digit 4: 4 (KeyDown)
+5:1226:0:100:1 //Set volume digit 4: 4 (ZEHNERTASTATUR) (KeyDown)
+5:1227:0:53:1 //Set volume digit 5: 5 (KeyDown)
+5:1227:0:101:1 //Set volume digit 5: 5 (ZEHNERTASTATUR) (KeyDown)
+5:1228:0:54:1 //Set volume digit 6: 6 (KeyDown)
+5:1228:0:102:1 //Set volume digit 6: 6 (ZEHNERTASTATUR) (KeyDown)
+5:1229:0:55:1 //Set volume digit 7: 7 (KeyDown)
+5:1229:0:103:1 //Set volume digit 7: 7 (ZEHNERTASTATUR) (KeyDown)
+5:1230:0:56:1 //Set volume digit 8: 8 (KeyDown)
+5:1231:0:57:1 //Set volume digit 9: 9 (KeyDown)
+5:1231:0:105:1 //Set volume digit 9: 9 (ZEHNERTASTATUR) (KeyDown)
+5:1232:0:86:1 //Vol command - volume: V (KeyDown)
+5:1233:0:80:1 //Vol command - pan: P (KeyDown)
+5:1234:0:67:1 //Vol command - vol slide up: C (KeyDown)
+5:1235:0:68:1 //Vol command - vol slide down: D (KeyDown)
+5:1236:0:65:1 //Vol command - vol fine slide up: A (KeyDown)
+5:1237:0:66:1 //Vol command - vol fine slide down: B (KeyDown)
+5:1238:0:85:1 //Vol command - vibrato speed: U (KeyDown)
+5:1239:0:72:1 //Vol command - vibrato: H (KeyDown)
+5:1240:0:76:1 //Vol command - XM pan left: L (KeyDown)
+5:1241:0:82:1 //Vol command - XM pan right: R (KeyDown)
+5:1242:0:71:1 //Vol command - Portamento: G (KeyDown)
+5:1243:0:70:1 //Vol command - Portamento Up: F (KeyDown)
+5:1244:0:69:1 //Vol command - Portamento Down: E (KeyDown)
+5:1245:1:186:1 //Vol command - Velocity: Shift+\xFC (KeyDown)
+5:1246:0:79:1 //Vol command - Offset: O (KeyDown)
+
+//----( Pattern Context [bottom] - FX Col (6) )------------
+6:1294:0:220:1 //FX midi macro slide: ZIRKUMFLEX (KeyDown)
+6:1295:1:186:1 //FX pseudo-velocity (experimental): Shift+\xFC (KeyDown)
+
+//----( Pattern Context [bottom] - Param Col (7) )------------
+7:1247:0:48:1 //FX Param digit 0: 0 (KeyDown)
+7:1247:0:96:1 //FX Param digit 0: 0 (ZEHNERTASTATUR) (KeyDown)
+7:1248:0:49:1 //FX Param digit 1: 1 (KeyDown)
+7:1248:0:97:1 //FX Param digit 1: 1 (ZEHNERTASTATUR) (KeyDown)
+7:1249:0:50:1 //FX Param digit 2: 2 (KeyDown)
+7:1249:0:98:1 //FX Param digit 2: 2 (ZEHNERTASTATUR) (KeyDown)
+7:1250:0:51:1 //FX Param digit 3: 3 (KeyDown)
+7:1250:0:99:1 //FX Param digit 3: 3 (ZEHNERTASTATUR) (KeyDown)
+7:1251:0:52:1 //FX Param digit 4: 4 (KeyDown)
+7:1251:0:100:1 //FX Param digit 4: 4 (ZEHNERTASTATUR) (KeyDown)
+7:1252:0:53:1 //FX Param digit 5: 5 (KeyDown)
+7:1252:0:101:1 //FX Param digit 5: 5 (ZEHNERTASTATUR) (KeyDown)
+7:1253:0:54:1 //FX Param digit 6: 6 (KeyDown)
+7:1253:0:102:1 //FX Param digit 6: 6 (ZEHNERTASTATUR) (KeyDown)
+7:1254:0:55:1 //FX Param digit 7: 7 (KeyDown)
+7:1254:0:103:1 //FX Param digit 7: 7 (ZEHNERTASTATUR) (KeyDown)
+7:1255:0:56:1 //FX Param digit 8: 8 (KeyDown)
+7:1255:0:104:1 //FX Param digit 8: 8 (ZEHNERTASTATUR) (KeyDown)
+7:1256:0:57:1 //FX Param digit 9: 9 (KeyDown)
+7:1256:0:105:1 //FX Param digit 9: 9 (ZEHNERTASTATUR) (KeyDown)
+7:1257:0:65:1 //FX Param digit A: A (KeyDown)
+7:1258:0:66:1 //FX Param digit B: B (KeyDown)
+7:1259:0:67:1 //FX Param digit C: C (KeyDown)
+7:1260:0:68:1 //FX Param digit D: D (KeyDown)
+7:1261:0:69:1 //FX Param digit E: E (KeyDown)
+7:1262:0:70:1 //FX Param digit F: F (KeyDown)
+
+//----( Sample Context [bottom] (8) )------------
+8:1380:2:84:1 //Trim sample around loop points: Ctrl+T (KeyDown)
+8:1383:0:8:1 //Silence sample selection: R\xDCCK (KeyDown)
+8:1385:3:65:1 //Amplify Sample: Shift+Ctrl+A (KeyDown)
+8:1381:3:82:1 //Reverse sample: Shift+Ctrl+R (KeyDown)
+8:1382:0:46:1 //Delete sample selection: ENTF (KeyDown)
+8:1386:0:107:1 //Zoom Out: + (ZEHNERTASTATUR) (KeyDown)
+8:1387:0:109:1 //Zoom In: - (ZEHNERTASTATUR) (KeyDown)
+
+//----( Instrument Context [bottom] (9) )------------
+
+//----( Comments Context [bottom] (10) )------------
+
+//----( Unknown Context (11) )------------
+
+//----( Unknown Context (12) )------------
+
+//----( Plugin GUI Context (13) )------------
+
+//----( General Context [top] (14) )------------
+
+//----( Pattern Context [top] (15) )------------
+
+//----( Sample Context [top] (16) )------------
+
+//----( Instrument Context [top] (17) )------------
+
+//----( Comments Context [top] (18) )------------
+
+//----( Unknown Context (19) )------------
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2007-05-13 11:17:15 UTC (rev 184)
@@ -656,8 +656,6 @@
}
// Leave
- //m_nType = MOD_TYPE_IT; Relabs.note: Moved to the beginning of loading(April 2007)
-
m_nMaxPeriod = 0xF000;
m_nMinPeriod = 8;
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2007-05-13 11:17:15 UTC (rev 184)
@@ -435,7 +435,6 @@
memset(&m_SongEQ, 0, sizeof(m_SongEQ));
m_lTotalSampleCount=0;
- m_nMixLevels=mixLevels_117RC3;
m_pConfig = new CSoundFilePlayConfig();
BuildDefaultInstrument();
@@ -484,6 +483,7 @@
m_nMaxOrderPosition = 0;
m_lpszPatternNames = NULL;
m_lpszSongComments = NULL;
+ m_nMixLevels = mixLevels_original; // Will be overridden if appropriate.
memset(Ins, 0, sizeof(Ins));
memset(ChnMix, 0, sizeof(ChnMix));
memset(Chn, 0, sizeof(Chn));
@@ -588,8 +588,10 @@
}
#endif
} else {
+ // New song
m_dwCreatedWithVersion = CMainFrame::GetFullVersionNumeric();
}
+
// Adjust song names
for (UINT iSmp=0; iSmp<MAX_SAMPLES; iSmp++)
{
@@ -690,7 +692,9 @@
}
}
}
- m_pConfig->SetPluginMixLevels(m_nMixLevels);
+
+ // Set up mix levels
+ m_pConfig->SetMixLevels(m_nMixLevels);
RecalculateGainForAllPlugs();
if (m_nType)
@@ -699,8 +703,6 @@
return TRUE;
}
-
-
return FALSE;
}
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2007-05-13 11:17:15 UTC (rev 184)
@@ -819,13 +819,13 @@
double GetPlaybackTimeAt(ORDERINDEX, ROWINDEX);
#ifndef TRADITIONAL_MODCOMMAND
- void OnSetEffect(MODCOMMAND& mc, EFFECT_ID);
//When adding a modeffect to pattern, this is to be called to
//do the actual adding and this can do modifications if needed.
+ void OnSetEffect(MODCOMMAND& mc, EFFECT_ID);
- void OnSetEffectParam(MODCOMMAND& mc, EFFECT_PARAM);
//When adding a modeffect parameter to pattern, this is to be called to
//do the actual adding and this can do modifications if needed.
+ void OnSetEffectParam(MODCOMMAND& mc, EFFECT_PARAM);
#endif
virtual bool GetModSpecificFlag(BYTE i)
@@ -866,9 +866,6 @@
bitset<8> m_ModFlags;
const CModSpecifications* m_pModSpecs;
-
-
-
public: // Static Members
static UINT m_nXBassDepth, m_nXBassRange;
static float m_nMaxSample;
@@ -947,21 +944,15 @@
BOOL Destroy();
UINT GetType() const { return m_nType; }
+
//Return the number of channels in the pattern. In 1.17.02.45
//it returned the number of channels with volume != 0
- UINT GetNumChannels() const {return m_nChannels;}
-
-
+ UINT GetNumChannels() const {return m_nChannels;}
+
BOOL SetMasterVolume(UINT vol, BOOL bAdjustAGC=FALSE);
UINT GetMasterVolume() const { return m_nMasterVolume; }
UINT GetNumPatterns() const;
UINT GetNumInstruments() const {return m_nInstruments;}
- //Relabs.note: The above method didn't seem to work
- //reasonably nor any reference to it seemed to exist.
- //Replaced it so that it now really returns the
- //number of instruments, not the number of samples
- //within the range of maximum instrument number
-
UINT GetNumSamples() const { return m_nSamples; }
UINT GetCurrentPos() const;
UINT GetCurrentPattern() const { return m_nPattern; }
@@ -969,6 +960,8 @@
UINT GetSongComments(LPSTR s, UINT cbsize, UINT linesize=32);
UINT GetRawSongComments(LPSTR s, UINT cbsize, UINT linesize=32);
UINT GetMaxPosition() const;
+ const CModSpecifications * GetModSpecifications() {return m_pModSpecs;}
+
double GetCurrentBPM() const;
int FindOrder(PATTERNINDEX pat, UINT startFromOrder=0, bool direction=true); //rewbs.playSongFromCursor
void DontLoopPattern(int nPat, int nRow=0); //rewbs.playSongFromCursor
Modified: trunk/OpenMPT/soundlib/mod_specifications.h
===================================================================
--- trunk/OpenMPT/soundlib/mod_specifications.h 2007-05-12 20:04:56 UTC (rev 183)
+++ trunk/OpenMPT/soundlib/mod_specifications.h 2007-05-13 11:17:15 UTC (rev 184)
@@ -21,6 +21,7 @@
uint16 modNameLengthMax; //Meaning 'usable letters', possible null character is not included.
SAMPLEINDEX samplesMax;
INSTRUMENTINDEX instrumentsMax;
+ BYTE defaultMixLevels;
};
enum {
@@ -53,6 +54,7 @@
256, //Max mod name length
4000, //SamplesMax
256, //instrumentMax
+ mixLevels_117RC3, //defaultMixLevels
};
@@ -73,6 +75,7 @@
20, //Max mod name length
31, //SamplesMax
0, //instrumentMax
+ mixLevels_original, //defaultMixLevels
};
@@ -91,7 +94,7 @@
20, //Max mod name length
31, //SamplesMax
256, //instrumentMax
-
+ mixLevels_117RC3, //defaultMixLevels
};
const CModSpecifications S3M_SPECS =
@@ -109,6 +112,7 @@
27, //Max mod name length
31, //SamplesMax
0, //instrumentMax
+ mixLevels_original, //defaultMixLevels
};
const CModSpecifications IT_SPECS =
@@ -126,6 +130,7 @@
25, //Max mod name length(in ittech.txt: "0000: \xB3'I'\xB3'M'\xB3'P'\xB3'M'\xB3 Song Name, max 26 characters, includes NULL \xB3")
256, //SamplesMax
256, //instrumentMax
+ mixLevels_117RC3, //defaultMixLevels
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2007-05-12 20:04:58
|
Revision: 183
http://svn.sourceforge.net/modplug/?rev=183&view=rev
Author: relabsoluness
Date: 2007-05-12 13:04:56 -0700 (Sat, 12 May 2007)
Log Message:
-----------
/ <Relabs> VS Edit&Continue fix(gone broken in 'RC3'branch)
/ <Relabs> Pattern skipping behavior returned to that of .45
/ <Relabs> Minor modifications(cleanup of channel state reset code, removed unused orderundo-vector.)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_seq.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2007-05-09 19:57:16 UTC (rev 182)
+++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2007-05-12 20:04:56 UTC (rev 183)
@@ -207,7 +207,6 @@
pSndFile->m_nCurrentPattern = pSndFile->m_nNextPattern = m_nScrollPos;
pMainFrm->ResetNotificationBuffer(); //rewbs.toCheck
pSndFile->m_nNextRow = 0;
- pSndFile->ResetChannelSettings(CHNRESET_BASIC);
END_CRITICAL();
} else
if (m_pParent->GetFollowSong())
@@ -217,13 +216,7 @@
pSndFile->m_nCurrentPattern = m_nScrollPos;
pSndFile->SetCurrentOrder(m_nScrollPos);
pSndFile->m_dwSongFlags |= dwPaused;
- pSndFile->ResetChannelSettings(CHNRESET_BASIC);
-
- //if (!(dwPaused & SONG_PATTERNLOOP)) pSndFile->GetLength(TRUE);
- //Relabs.note: Commented above line for it seems to cause
- //significant slowdown when changing patterns without
- //pattern-loop enabled. What is it's purpose anyway?
-
+ if (!(dwPaused & SONG_PATTERNLOOP)) pSndFile->GetLength(TRUE);
if (bIsPlaying) pMainFrm->ResetNotificationBuffer();
END_CRITICAL();
}
Modified: trunk/OpenMPT/mptrack/Mainfrm.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainfrm.h 2007-05-09 19:57:16 UTC (rev 182)
+++ trunk/OpenMPT/mptrack/Mainfrm.h 2007-05-12 20:04:56 UTC (rev 183)
@@ -632,11 +632,8 @@
};
-//const CHAR gszBuildDate[] = __TIMESTAMP__;
-const string buildDateTime = string(__DATE__) + string(" ") + string(__TIME__);
+const CHAR gszBuildDate[] = __DATE__ " " __TIME__;
-
-
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2007-05-09 19:57:16 UTC (rev 182)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2007-05-12 20:04:56 UTC (rev 183)
@@ -97,8 +97,6 @@
m_lpszLog = NULL;
m_hWndFollow = NULL;
memset(PatternUndo, 0, sizeof(PatternUndo));
- vector<BYTE> temp; temp.resize(MAX_UNDO_LEVEL, 0);
- OrderUndo.resize(m_SndFile.Order.size(), temp);
#ifdef _DEBUG
MODCHANNEL *p = m_SndFile.Chn;
if (((DWORD)p) & 7) Log("MODCHANNEL is not aligned (0x%08X)\n", p);
@@ -2814,11 +2812,6 @@
BEGIN_CRITICAL();
- m_SndFile.SetCurrentPos(0);
- //Relabs.note: Dirty hack to try to make replay pattern to be
- //more like 'play song from start' - a little clean up for
- //these playback calls would be nice (March 2007).
-
// Cut instruments/samples
for (UINT i=0; i<MAX_CHANNELS; i++)
{
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2007-05-09 19:57:16 UTC (rev 182)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2007-05-12 20:04:56 UTC (rev 183)
@@ -88,7 +88,6 @@
HWND m_hWndFollow;
DWORD m_dwNotifyType;
PATTERNUNDOBUFFER PatternUndo[MAX_UNDO_LEVEL];
- vector<vector<BYTE> > OrderUndo;
// -> CODE#0015
// -> DESC="channels management dlg"
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2007-05-09 19:57:16 UTC (rev 182)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2007-05-12 20:04:56 UTC (rev 183)
@@ -462,7 +462,7 @@
if (i >= nRemainingChannels)
{
m_SndFile.Chn[i].dwFlags |= CHN_MUTE;
- m_SndFile.SetChannelSettingsToDefault(i);
+ m_SndFile.InitChannel(i);
}
}
}
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-09 19:57:16 UTC (rev 182)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-12 20:04:56 UTC (rev 183)
@@ -1568,7 +1568,7 @@
CDialog::OnInitDialog();
m_bmp.SubclassDlgItem(IDC_BITMAP1, this);
m_bmp.LoadBitmap(MAKEINTRESOURCE(IDB_MPTRACK));
- wsprintf(s, "Build Date: %s", buildDateTime.c_str());
+ wsprintf(s, "Build Date: %s", gszBuildDate);
SetDlgItemText(IDC_EDIT2, s);
SetDlgItemText(IDC_EDIT3, CString("Open Modplug Tracker, version ") + CMainFrame::GetFullVersionString());
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2007-05-09 19:57:16 UTC (rev 182)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2007-05-12 20:04:56 UTC (rev 183)
@@ -2419,7 +2419,7 @@
BeginWaitCursor();
//First adding channel as the last channel...
if (pModDoc->ChangeNumChannels(pSndFile->m_nChannels+1)) {
- pSndFile->SetChannelSettingsToDefault(pSndFile->m_nChannels-1);
+ pSndFile->InitChannel(pSndFile->m_nChannels-1);
//...and then moving it to right position.
pSndFile->MoveChannel(pSndFile->m_nChannels-1, nChn);
@@ -2443,7 +2443,7 @@
BeginWaitCursor();
if (pModDoc->ChangeNumChannels(pSndFile->m_nChannels+1)) {
- pSndFile->SetChannelSettingsToDefault(pSndFile->m_nChannels-1);
+ pSndFile->InitChannel(pSndFile->m_nChannels-1);
pSndFile->MoveChannel(pSndFile->m_nChannels-1, nChn);
pModDoc->SetModified();
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2007-05-09 19:57:16 UTC (rev 182)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2007-05-12 20:04:56 UTC (rev 183)
@@ -1039,10 +1039,10 @@
//---------------------------------------
{
UINT i, nPattern;
- BYTE resetMask = (!nPos) ? CHNRESET_TOTAL : CHNRESET_MOST;
+ BYTE resetMask = (!nPos) ? CHNRESET_SETPOS_FULL : CHNRESET_SETPOS_BASIC;
for (i=0; i<MAX_CHANNELS; i++)
- ResetChannelSettings(i, resetMask);
+ ResetChannelState(i, resetMask);
if (!nPos)
{
@@ -1341,61 +1341,33 @@
}
-bool CSoundFile::SetChannelSettingsToDefault(UINT nch)
+bool CSoundFile::InitChannel(UINT nch)
//-------------------------------------
{
- //This is used to set default setting to new channels,
- //so that a new channel for example won't have some plug in when created - might not do all defaultings,
- //though.
-
- if(nch > MAX_BASECHANNELS) return true;
+ if(nch >= MAX_BASECHANNELS) return true;
- ResetChannelSettings(nch, CHNRESET_TOTAL);
-
ChnSettings[nch].nPan = 128;
ChnSettings[nch].nVolume = 64;
ChnSettings[nch].dwFlags = 0;
ChnSettings[nch].nMixPlugin = 0;
ChnSettings[nch].szName[0] = 0;
- Chn[nch].dwFlags = ChnSettings[nch].dwFlags;
- Chn[nch].nPan = ChnSettings[nch].nPan;
- Chn[nch].nGlobalVol = ChnSettings[nch].nVolume;
+ ResetChannelState(nch, CHNRESET_TOTAL);
m_pModDoc->Record1Channel(nch,FALSE);
m_pModDoc->Record2Channel(nch,FALSE);
m_bChannelMuteTogglePending[nch] = false;
-
return false;
}
-void CSoundFile::ResetChannelSettings(CHANNELINDEX i, BYTE resetMask)
+void CSoundFile::ResetChannelState(CHANNELINDEX i, BYTE resetMask)
//-------------------------------------------------------
{
- //Relabs.Hack
if(i >= MAX_CHANNELS) return;
- if(resetMask & CHNRESET_BASIC)
+ if(resetMask & 2)
{
- if(i < MAX_BASECHANNELS)
- {
- //Chn[i].dwFlags = ChnSettings[i].dwFlags;
- Chn[i].nPan = ChnSettings[i].nPan;
- Chn[i].nGlobalVol = ChnSettings[i].nVolume;
- }
- else
- {
- Chn[i].dwFlags = 0;
- Chn[i].nPan = 128;
- Chn[i].nGlobalVol = 64;
- }
-
- }
- if(resetMask == CHNRESET_BASIC) return;
-
- if(resetMask & CHNRESET_MOST)
- {
Chn[i].nNote = Chn[i].nNewNote = Chn[i].nNewIns = 0;
Chn[i].pInstrument = NULL;
Chn[i].pHeader = NULL;
@@ -1407,9 +1379,8 @@
Chn[i].dwFlags |= CHN_KEYOFF|CHN_NOTEFADE;
Chn[i].nTremorCount = 0;
}
- if(resetMask == CHNRESET_MOST) return;
- if(resetMask & CHNRESET_TOTAL)
+ if(resetMask & 4)
{
Chn[i].nPeriod = 0;
Chn[i].nPos = Chn[i].nLength = 0;
@@ -1427,17 +1398,26 @@
Chn[i].nLeftRamp = Chn[i].nRightRamp = 0;
Chn[i].nVolume = 256;
}
-}
-void CSoundFile::ResetChannelSettings(BYTE resetMask)
-//-------------------------------------
-{
- for(CHANNELINDEX i = 0; i<GetNumChannels(); i++)
- ResetChannelSettings(i, resetMask);
+ if(resetMask & 1)
+ {
+ if(i < MAX_BASECHANNELS)
+ {
+ Chn[i].dwFlags = ChnSettings[i].dwFlags;
+ Chn[i].nPan = ChnSettings[i].nPan;
+ Chn[i].nGlobalVol = ChnSettings[i].nVolume;
+ }
+ else
+ {
+ Chn[i].dwFlags = 0;
+ Chn[i].nPan = 128;
+ Chn[i].nGlobalVol = 64;
+ }
+
+ }
}
-
CHANNELINDEX CSoundFile::ReArrangeChannels(const std::vector<CHANNELINDEX>& newOrder)
//-------------------------------------------------------------------
{
@@ -1515,7 +1495,7 @@
}
else
{
- SetChannelSettingsToDefault(i);
+ InitChannel(i);
}
}
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2007-05-09 19:57:16 UTC (rev 182)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2007-05-12 20:04:56 UTC (rev 183)
@@ -604,9 +604,10 @@
//<----
} MODCHANNEL;
-#define CHNRESET_BASIC 1
-#define CHNRESET_MOST 3
-#define CHNRESET_TOTAL 255
+#define CHNRESET_CHNSETTINGS 1 // 1 b
+#define CHNRESET_SETPOS_BASIC 2 // 10 b
+#define CHNRESET_SETPOS_FULL 7 //111 b
+#define CHNRESET_TOTAL 255 //11111111b
typedef struct _MODCHANNELSETTINGS
@@ -1001,17 +1002,10 @@
BOOL GetPatternName(UINT nPat, LPSTR lpszName, UINT cbSize=MAX_PATTERNNAME) const;
CHANNELINDEX ReArrangeChannels(const std::vector<CHANNELINDEX>& fromToArray);
bool MoveChannel(UINT chn_from, UINT chn_to);
- bool SetChannelSettingsToDefault(UINT nch);
-
- //Sets default channels settings from MODCHANNELSETTINGS to current
- //channel settings. Flag can be used to tell whether to completely
- //reset channels, not only a few settings(for maintaining old behavior).
- void ResetChannelSettings(CHANNELINDEX chn, BYTE resetStyle);
- //For all channels.
- void ResetChannelSettings(BYTE resetStyle);
+ bool InitChannel(UINT nch);
+ void ResetChannelState(CHANNELINDEX chn, BYTE resetStyle);
-
// Module Loaders
BOOL ReadXM(LPCBYTE lpStream, DWORD dwMemLength);
BOOL ReadS3M(LPCBYTE lpStream, DWORD dwMemLength);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <re...@us...> - 2007-05-09 19:57:23
|
Revision: 182
http://svn.sourceforge.net/modplug/?rev=182&view=rev
Author: rewbs
Date: 2007-05-09 12:57:16 -0700 (Wed, 09 May 2007)
Log Message:
-----------
<pelya & rewbs> Fix compilation in VS2k5 (http://forums.microsoft.com/msdn/showpost.aspx?postid=8663&siteid=1)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mainbar.cpp
trunk/OpenMPT/mptrack/Mainbar.h
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/mptrack/View_ins.h
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/View_smp.h
Modified: trunk/OpenMPT/mptrack/Mainbar.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mainbar.cpp 2007-05-07 13:34:49 UTC (rev 181)
+++ trunk/OpenMPT/mptrack/Mainbar.cpp 2007-05-09 19:57:16 UTC (rev 182)
@@ -930,7 +930,11 @@
}
+#if _MSC_VER >= 1400
+LRESULT CModTreeBar::OnNcHitTest(CPoint point)
+#else
UINT CModTreeBar::OnNcHitTest(CPoint point)
+#endif
//-----------------------------------------
{
CRect rect;
Modified: trunk/OpenMPT/mptrack/Mainbar.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainbar.h 2007-05-07 13:34:49 UTC (rev 181)
+++ trunk/OpenMPT/mptrack/Mainbar.h 2007-05-09 19:57:16 UTC (rev 182)
@@ -116,7 +116,11 @@
protected:
//{{AFX_MSG(CModTreeBar)
afx_msg void OnNcPaint();
+#if _MSC_VER >= 1400
+ afx_msg LRESULT OnNcHitTest(CPoint point);
+#else
afx_msg UINT OnNcHitTest(CPoint point);
+#endif
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
Modified: trunk/OpenMPT/mptrack/View_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.cpp 2007-05-07 13:34:49 UTC (rev 181)
+++ trunk/OpenMPT/mptrack/View_ins.cpp 2007-05-09 19:57:16 UTC (rev 182)
@@ -1699,7 +1699,11 @@
}
+#if _MSC_VER >= 1400
+LRESULT CViewInstrument::OnNcHitTest(CPoint point)
+#else
UINT CViewInstrument::OnNcHitTest(CPoint point)
+#endif
//---------------------------------------------
{
CRect rect;
Modified: trunk/OpenMPT/mptrack/View_ins.h
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.h 2007-05-07 13:34:49 UTC (rev 181)
+++ trunk/OpenMPT/mptrack/View_ins.h 2007-05-09 19:57:16 UTC (rev 182)
@@ -98,7 +98,11 @@
afx_msg BOOL OnEraseBkgnd(CDC *) { return TRUE; }
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
+#if _MSC_VER >= 1400
+ afx_msg LRESULT OnNcHitTest(CPoint point);
+#else
afx_msg UINT OnNcHitTest(CPoint point);
+#endif
afx_msg void OnNcPaint();
afx_msg void OnPrevInstrument();
afx_msg void OnNextInstrument();
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2007-05-07 13:34:49 UTC (rev 181)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2007-05-09 19:57:16 UTC (rev 182)
@@ -1406,7 +1406,11 @@
}
+#if _MSC_VER >= 1400
+LRESULT CViewSample::OnNcHitTest(CPoint point)
+#else
UINT CViewSample::OnNcHitTest(CPoint point)
+#endif
//-----------------------------------------
{
CRect rect;
Modified: trunk/OpenMPT/mptrack/View_smp.h
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.h 2007-05-07 13:34:49 UTC (rev 181)
+++ trunk/OpenMPT/mptrack/View_smp.h 2007-05-09 19:57:16 UTC (rev 182)
@@ -59,7 +59,11 @@
afx_msg BOOL OnEraseBkgnd(CDC *) { return TRUE; }
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS* lpncsp);
+#if _MSC_VER >= 1400
+ afx_msg LRESULT OnNcHitTest(CPoint point);
+#else
afx_msg UINT OnNcHitTest(CPoint point);
+#endif
afx_msg void OnNcPaint();
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <re...@us...> - 2007-05-07 13:39:03
|
Revision: 181
http://svn.sourceforge.net/modplug/?rev=181&view=rev
Author: rewbs
Date: 2007-05-07 06:34:49 -0700 (Mon, 07 May 2007)
Log Message:
-----------
. <rewbs> Fix odd window position on very first startup (before mptrack.ini is created).
Modified Paths:
--------------
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/bin/mptrack.exe
trunk/OpenMPT/packageTemplate/History.txt
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2007-05-07 11:41:47 UTC (rev 180)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2007-05-07 13:34:49 UTC (rev 181)
@@ -2933,7 +2933,8 @@
if (bShow && !IsWindowVisible() && firstShow) {
firstShow = false;
WINDOWPLACEMENT wpl;
- GetPrivateProfileStruct("Display", "WindowPlacement", &wpl, sizeof(WINDOWPLACEMENT), theApp.GetConfigFileName());
- SetWindowPlacement(&wpl);
+ if (GetPrivateProfileStruct("Display", "WindowPlacement", &wpl, sizeof(WINDOWPLACEMENT), theApp.GetConfigFileName())) {
+ SetWindowPlacement(&wpl);
+ }
}
}
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-07 11:41:47 UTC (rev 180)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-07 13:34:49 UTC (rev 181)
@@ -858,7 +858,7 @@
CString localVersion = CMainFrame::GetFullVersionString();
if (remoteVersion > localVersion) {
CString message;
- message.Format("New version available: %s. Would you like more information?", remoteVersion);
+ message.Format("New version available: %s (you are using %). Would you like more information?", remoteVersion, localVersion);
if (AfxMessageBox(message, MB_ICONQUESTION|MB_YESNO ) == IDYES) {
CString URL;
URL.Format("http://openmpt.xwiki.com/xwiki/bin/view/Development/Builds?currentVersion=%s", localVersion);
Modified: trunk/OpenMPT/mptrack/bin/mptrack.exe
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2007-05-07 11:41:47 UTC (rev 180)
+++ trunk/OpenMPT/packageTemplate/History.txt 2007-05-07 13:34:49 UTC (rev 181)
@@ -31,6 +31,7 @@
+ <rewbs> New mixmode (called 1.17RC3): bypass global preamp, force soft panning, provide explicit dB value for sample attenuation. WARNING: this mixmode is subject to change.
+ <rewbs> Check for updates on startup. To disable, set CheckForUpdates=0 in mptrack.ini.
. <rewbs> Plugin list window remembers its position/size even on cancel.
+ . <rewbs> Fix odd window position on very first startup (before mptrack.ini is created).
. <Relabsoluness> When opening instruments, load dialog didn't remember its previous path.
. <Relabsoluness> In general tab, it was possible to give longer modname than the fileformat could save.
. <Relabsoluness> Instruments associates with VSTis no longer also need to be associated to a sample in order to play.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <re...@us...> - 2007-05-07 11:44:18
|
Revision: 180
http://svn.sourceforge.net/modplug/?rev=180&view=rev
Author: rewbs
Date: 2007-05-07 04:41:47 -0700 (Mon, 07 May 2007)
Log Message:
-----------
+ <rewbs> Check for updates on startup.
/ <rewbs> Delete CPU specific binaries.
/ <rewbs> Update package template
/ <rewbs> Misc internal renames
Modified Paths:
--------------
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp
trunk/OpenMPT/mptrack/SoundFilePlayConfig.h
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/Vstplug.h
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/mptrack.vcproj
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
Added Paths:
-----------
trunk/OpenMPT/mptrack/bin/mptrack.exe
trunk/OpenMPT/packageTemplate/Installation.txt
trunk/OpenMPT/packageTemplate/tunings/
trunk/OpenMPT/packageTemplate/tunings/standard/
trunk/OpenMPT/packageTemplate/tunings/standard/std_tunings.tc
Removed Paths:
-------------
trunk/OpenMPT/mptrack/bin/mptrack_Generic.exe
trunk/OpenMPT/mptrack/bin/mptrack_P3.exe
trunk/OpenMPT/mptrack/bin/mptrack_P4-Athlon64.exe
trunk/OpenMPT/mptrack/bin/mptrack_athlon32.exe
trunk/OpenMPT/mptrack/bin/testSvnCommitList3
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2007-05-07 11:41:47 UTC (rev 180)
@@ -86,6 +86,7 @@
ON_COMMAND(ID_MIDI_RECORD, OnMidiRecord)
ON_COMMAND(ID_PLAYER_PAUSE, OnPlayerPause)
ON_COMMAND_EX(IDD_TREEVIEW, OnBarCheck)
+ ON_COMMAND_EX(ID_NETLINK_OPENMPTWIKI, OnInternetLink)
ON_COMMAND_EX(ID_NETLINK_MODPLUG, OnInternetLink)
ON_COMMAND_EX(ID_NETLINK_UT, OnInternetLink)
ON_COMMAND_EX(ID_NETLINK_OSMUSIC, OnInternetLink)
@@ -140,6 +141,8 @@
LONG CMainFrame::glTreeSplitRatio = 128;
HHOOK CMainFrame::ghKbdHook = NULL;
CString CMainFrame::gcsPreviousVersion = "";
+CString CMainFrame::gcsInstallGUID = "";
+int CMainFrame::gnCheckForUpdates = 1;
DWORD CMainFrame::gnHotKeyMask = 0;
// Audio Setup
//rewbs.resamplerConf
@@ -361,7 +364,9 @@
CString iniFile = theApp.GetConfigFileName();
CHAR collectedString[INIBUFFERSIZE];
- gcsPreviousVersion = GetPrivateProfileCString("Version", "Version", "", theApp.GetConfigFileName());
+ gcsPreviousVersion = GetPrivateProfileCString("Version", "Version", "", iniFile);
+ gcsInstallGUID = GetPrivateProfileCString("Version", "InstallGUID", "", iniFile);
+ gnCheckForUpdates = GetPrivateProfileInt("Version", "CheckForUpdates", 1, iniFile);
gbMdiMaximize = GetPrivateProfileLong("Display", "MDIMaximize", true, iniFile);
glTreeWindowWidth = GetPrivateProfileLong("Display", "MDITreeWidth", 160, iniFile);
glTreeSplitRatio = GetPrivateProfileLong("Display", "MDITreeRatio", 128, iniFile);
@@ -375,7 +380,7 @@
gnPlugWindowY = GetPrivateProfileInt("Display", "PlugSelectWindowY", 273, iniFile);
gnPlugWindowWidth = GetPrivateProfileInt("Display", "PlugSelectWindowWidth", 370, iniFile);
gnPlugWindowHeight = GetPrivateProfileInt("Display", "PlugSelectWindowHeight", 332, iniFile);
- gnPlugWindowLast = GetPrivateProfileInt("Display", "PlugSelectWindowLast", 0, iniFile);
+ gnPlugWindowLast = GetPrivateProfileDWord("Display", "PlugSelectWindowLast", 0, iniFile);
CHAR s[16];
for (int ncol=0; ncol<MAX_MODCOLORS; ncol++) {
@@ -848,6 +853,8 @@
CString version = CMainFrame::GetFullVersionString();
WritePrivateProfileString("Version", "Version", version, iniFile);
+ WritePrivateProfileString("Version", "InstallGUID", gcsInstallGUID, iniFile);
+ WritePrivateProfileLong("Version", "CheckForUpdates", gnCheckForUpdates, iniFile);
WINDOWPLACEMENT wpl;
wpl.length = sizeof(WINDOWPLACEMENT);
@@ -2686,6 +2693,7 @@
switch(nID)
{
// case ID_NETLINK_MODPLUG: pszURL = "http://www.modplug.com"; break;
+ case ID_NETLINK_OPENMPTWIKI:pszURL = "http://openmpt.xwiki.com/"; break;
case ID_NETLINK_UT: pszURL = "http://www.united-trackers.org"; break;
case ID_NETLINK_OSMUSIC: pszURL = "http://www.osmusic.net/"; break;
// case ID_NETLINK_HANDBOOK: pszURL = "http://www.modplug.com/mods/handbook/handbook.htm"; break;
Modified: trunk/OpenMPT/mptrack/Mainfrm.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainfrm.h 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/Mainfrm.h 2007-05-07 11:41:47 UTC (rev 180)
@@ -366,6 +366,8 @@
static HHOOK ghKbdHook;
static DWORD gdwNotificationType;
static CString gcsPreviousVersion;
+ static CString gcsInstallGUID;
+ static int gnCheckForUpdates;
// Audio Setup
static DWORD m_dwSoundSetup, m_dwRate, m_dwQuality, m_nSrcMode, m_nBitsPerSample, m_nPreAmp, gbLoopSong, m_nChannels;
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2007-05-07 11:41:47 UTC (rev 180)
@@ -552,6 +552,7 @@
m_hBladeEnc = NULL;
m_hLameEnc = NULL;
m_hACMInst = NULL;
+ m_pRequestContext = NULL;
m_hAlternateResourceHandle = NULL;
m_szConfigFileName[0] = 0;
for (UINT i=0; i<MAX_DLS_BANKS; i++) gpDLSBanks[i] = NULL;
@@ -785,7 +786,11 @@
m_dwTimeStarted = timeGetTime();
m_bInitialized = TRUE;
- // Check previous version number
+ if (CMainFrame::gnCheckForUpdates) {
+ UpdateCheck();
+ }
+
+ // Open settings if this is the previous execution was with an earlier version.
if (!cmdInfo.m_bNoSettingsOnNewVersion && CMainFrame::gcsPreviousVersion < CMainFrame::GetFullVersionString()) {
StopSplashScreen();
m_pMainWnd->PostMessage(WM_COMMAND, ID_VIEW_OPTIONS);
@@ -795,6 +800,185 @@
return TRUE;
}
+void __stdcall CTrackApp::InternetRequestCallback( HINTERNET hInternet, DWORD_PTR userData, DWORD dwInternetStatus,
+ LPVOID lpvStatusInformation, DWORD dwStatusInformationLength)
+//-----------------------------------------------------------------------------------------------------
+{
+
+ REQUEST_CONTEXT *pRequestContext = (REQUEST_CONTEXT*)userData;
+ if (pRequestContext->hRequest == NULL) {
+ return;
+ }
+
+ DWORD versionBytesToRead = 10;
+
+ switch (dwInternetStatus) {
+ case WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE:
+ if (!WinHttpReceiveResponse(pRequestContext->hRequest, NULL)) {
+ CleanupInternetRequest(pRequestContext);
+ return;
+ }
+ break;
+ case WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE:
+ {
+ DWORD dwDownloaded = 0;
+ if (!WinHttpQueryDataAvailable(pRequestContext->hRequest, &dwDownloaded)) {
+ Log("Error %u in WinHttpQueryDataAvailable.\n",GetLastError());
+ CleanupInternetRequest(pRequestContext);
+ return;
+ }
+ if (dwDownloaded<versionBytesToRead) {
+ Log("Downloaded %d bytes, expected at least %d\n", dwDownloaded, versionBytesToRead);
+ CleanupInternetRequest(pRequestContext);
+ return;
+ }
+ break;
+ }
+ case WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE:
+ {
+ DWORD dwRead = 0;
+ pRequestContext->lpBuffer = new char[versionBytesToRead+1];
+ ZeroMemory(pRequestContext->lpBuffer, versionBytesToRead+1);
+
+ if (!WinHttpReadData(pRequestContext->hRequest, (LPVOID)pRequestContext->lpBuffer, versionBytesToRead, &dwRead)) {
+ Log("Error %u in WinHttpReadData.\n", GetLastError());
+ CleanupInternetRequest(pRequestContext);
+ return;
+ }
+ if (dwRead<versionBytesToRead) {
+ Log("Read %d bytes, expected at least %d\n", dwRead, versionBytesToRead);
+ CleanupInternetRequest(pRequestContext);
+ return;
+ }
+ break;
+ }
+ case WINHTTP_CALLBACK_STATUS_READ_COMPLETE:
+ {
+ CString remoteVersion = pRequestContext->lpBuffer;
+ CString localVersion = CMainFrame::GetFullVersionString();
+ if (remoteVersion > localVersion) {
+ CString message;
+ message.Format("New version available: %s. Would you like more information?", remoteVersion);
+ if (AfxMessageBox(message, MB_ICONQUESTION|MB_YESNO ) == IDYES) {
+ CString URL;
+ URL.Format("http://openmpt.xwiki.com/xwiki/bin/view/Development/Builds?currentVersion=%s", localVersion);
+ CTrackApp::OpenURL(URL);
+ }
+ }
+ CleanupInternetRequest(pRequestContext);
+ break;
+ }
+ default:
+ Log("Unhandled callback - status %d given", dwInternetStatus);
+ break;
+ }
+
+}
+
+void CTrackApp::CleanupInternetRequest(REQUEST_CONTEXT *pRequestContext)
+//-------------------------------------------------------------------------
+{
+ if (pRequestContext != NULL) {
+ if (pRequestContext->lpBuffer != NULL) {
+ delete[] pRequestContext->lpBuffer;
+ pRequestContext->lpBuffer = NULL;
+ }
+
+ if (pRequestContext->postData != NULL) {
+ delete[] pRequestContext->postData;
+ pRequestContext->postData = NULL;
+ }
+
+ if (pRequestContext->hRequest != NULL) {
+ WinHttpSetStatusCallback(pRequestContext->hRequest, NULL, NULL, NULL);
+ WinHttpCloseHandle(pRequestContext->hRequest);
+ pRequestContext->hRequest = NULL;
+ }
+
+ if (pRequestContext->hConnection != NULL) {
+ WinHttpCloseHandle(pRequestContext->hConnection);
+ pRequestContext->hConnection = NULL;
+ }
+
+ if (pRequestContext->hSession != NULL) {
+ WinHttpCloseHandle(pRequestContext->hSession);
+ pRequestContext->hSession = NULL;
+ }
+ }
+}
+
+void CTrackApp::UpdateCheck()
+//---------------------------
+{
+ m_pRequestContext = new REQUEST_CONTEXT();
+ m_pRequestContext->hSession = NULL;
+ m_pRequestContext->hConnection = NULL;
+ m_pRequestContext->hRequest = NULL;
+ m_pRequestContext->lpBuffer = NULL;
+ m_pRequestContext->postData = NULL;
+
+ // Prepare post data
+ if (CMainFrame::gcsInstallGUID == "") {
+ //No GUID found in INI file - generate one.
+ GUID guid;
+ CoCreateGuid(&guid);
+ BYTE* Str;
+ UuidToString((UUID*)&guid, &Str);
+ CMainFrame::gcsInstallGUID.Format("%s", (LPTSTR)Str);
+ RpcStringFree(&Str);
+ }
+
+ CString csPostData;
+ csPostData.Format("install_id=%s&install_version=%s", CMainFrame::gcsInstallGUID, CMainFrame::GetFullVersionString());
+ int length = csPostData.GetLength();
+ m_pRequestContext->postData = new char[length+1];
+ strcpy(m_pRequestContext->postData, csPostData);
+
+ m_pRequestContext->hSession = WinHttpOpen( L"OpenMPT/1.17", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,
+ WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, WINHTTP_FLAG_ASYNC);
+ if (m_pRequestContext->hSession==NULL) {
+ CleanupInternetRequest(m_pRequestContext);
+ return;
+ }
+
+ m_pRequestContext->hConnection = WinHttpConnect(m_pRequestContext->hSession, L"www.soal.org", INTERNET_DEFAULT_HTTP_PORT, 0);
+ if (m_pRequestContext->hConnection==NULL) {
+ CleanupInternetRequest(m_pRequestContext);
+ return;
+ }
+
+ m_pRequestContext->hRequest = WinHttpOpenRequest(m_pRequestContext->hConnection, L"POST", L"openmpt/OpenMPTversionCheck.php5",
+ NULL, NULL, NULL, 0);
+ if (m_pRequestContext->hRequest==NULL) {
+ CleanupInternetRequest(m_pRequestContext);
+ return;
+ }
+
+ if (!WinHttpAddRequestHeaders(m_pRequestContext->hRequest, L"Content-Type:application/x-www-form-urlencoded\r\n\r\n",
+ -1L, WINHTTP_ADDREQ_FLAG_ADD)) {
+ CleanupInternetRequest(m_pRequestContext);
+ return;
+ }
+
+ WINHTTP_STATUS_CALLBACK pCallback = WinHttpSetStatusCallback(m_pRequestContext->hRequest,
+ static_cast<WINHTTP_STATUS_CALLBACK>(InternetRequestCallback),
+ WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS,
+ NULL);
+ if (pCallback == WINHTTP_INVALID_STATUS_CALLBACK) {
+ Log("Error %d in WinHttpSetStatusCallback.\n", WINHTTP_INVALID_STATUS_CALLBACK);
+ CleanupInternetRequest(m_pRequestContext);
+ return;
+ }
+
+ if (!WinHttpSendRequest(m_pRequestContext->hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, m_pRequestContext->postData, length, length, (DWORD_PTR)m_pRequestContext)) {
+ CleanupInternetRequest(m_pRequestContext);
+ return;
+ }
+}
+
+
+
+
int CTrackApp::ExitInstance()
//---------------------------
{
@@ -846,6 +1030,10 @@
// Uninitialize ACM
UninitializeACM();
+ // Cleanup the internet request, in case it is still active.
+ CleanupInternetRequest(m_pRequestContext);
+ delete m_pRequestContext;
+
return CWinApp::ExitInstance();
}
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2007-05-07 11:41:47 UTC (rev 180)
@@ -14,6 +14,8 @@
#include "resource.h" // main symbols
#include "sndfile.h"
+#include <windows.h>
+#include <winhttp.h>
class CModDoc;
class CVstPluginManager;
@@ -94,6 +96,17 @@
/////////////////////////////////////////////////////////////////////////////
+// Internet connection context
+
+typedef struct REQUEST_CONTEXT {
+ HINTERNET hSession;
+ HINTERNET hConnection;
+ HINTERNET hRequest;
+ LPSTR lpBuffer; // Buffer for storing read data
+ LPSTR postData;
+} REQUEST_CONTEXT;
+
+/////////////////////////////////////////////////////////////////////////////
// CTrackApp:
// See mptrack.cpp for the implementation of this class
//
@@ -107,10 +120,7 @@
protected:
static UINT m_nDefaultDocType;
static LPMIDILIBSTRUCT glpMidiLibrary;
-// -> CODE#0023
-// -> DESC="IT project files (.itp)"
static BOOL m_nProject;
-// -! NEW_FEATURE#0023
public:
static MEMORYSTATUS gMemStatus;
@@ -127,6 +137,8 @@
CHAR m_szConfigFileName[_MAX_PATH];
CHAR m_szPluginCacheFileName[_MAX_PATH];
CHAR m_szStringsFileName[_MAX_PATH];
+ // Internet request context
+ REQUEST_CONTEXT *m_pRequestContext;
public:
CTrackApp();
@@ -168,6 +180,10 @@
protected:
VOID StartSplashScreen();
VOID StopSplashScreen();
+ VOID UpdateCheck();
+ static void __stdcall InternetRequestCallback( HINTERNET hInternet, DWORD_PTR dwContext, DWORD dwInternetStatus,
+ LPVOID lpvStatusInformation, DWORD dwStatusInformationLength);
+ static void CleanupInternetRequest(REQUEST_CONTEXT *pRequestContext);
// Localized strings
public:
Modified: trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp
===================================================================
--- trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2007-05-07 11:41:47 UTC (rev 180)
@@ -3,7 +3,7 @@
CSoundFilePlayConfig::CSoundFilePlayConfig(void)
{
- SetPluginMixLevels(plugmix_mode_117RC3);
+ SetPluginMixLevels(mixLevels_117RC3);
setVSTiVolume(1.0f);
}
@@ -15,13 +15,13 @@
switch (mixLevelType)
{
// Olivier's version gives us floats in [-0.5; 0.5] and slightly saturates VSTis.
- case plugmix_mode_original:
+ case mixLevels_original:
setVSTiAttenuation(NO_ATTENUATION);
setIntToFloat(1.0f/static_cast<float>(1<<28));
setFloatToInt(static_cast<float>(1<<28));
setGlobalVolumeAppliesToMaster(false);
setUseGlobalPreAmp(true);
- setTreatPanLikeBalance(false);
+ setForceSoftPanning(false);
setDisplayDBValues(false);
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(100.0);
@@ -30,13 +30,13 @@
// Ericus' version gives us floats in [-0.06;0.06] and requires attenuation to
// avoid massive VSTi saturation.
- case plugmix_mode_117RC1:
+ case mixLevels_117RC1:
setVSTiAttenuation(32.0f);
setIntToFloat(1.0f/static_cast<float>(0x07FFFFFFF));
setFloatToInt(static_cast<float>(0x07FFFFFFF));
setGlobalVolumeAppliesToMaster(false);
setUseGlobalPreAmp(true);
- setTreatPanLikeBalance(false);
+ setForceSoftPanning(false);
setDisplayDBValues(false);
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(100.0);
@@ -46,13 +46,13 @@
// 117RC2 gives us floats in [-1.0; 1.0] and hopefully plays VSTis at
// the right volume... but we attenuate by 2x to approx. match sample volume.
- case plugmix_mode_117RC2:
+ case mixLevels_117RC2:
setVSTiAttenuation(2.0f);
setIntToFloat(1.0f/static_cast<float>(MIXING_CLIPMAX));
setFloatToInt(static_cast<float>(MIXING_CLIPMAX));
setGlobalVolumeAppliesToMaster(true);
setUseGlobalPreAmp(true);
- setTreatPanLikeBalance(false);
+ setForceSoftPanning(false);
setDisplayDBValues(false);
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(100.0);
@@ -63,13 +63,13 @@
// treats panning as balance to avoid saturation on loud sample (and because I think it's better :),
// and allows display of attenuation in decibels.
default:
- case plugmix_mode_117RC3:
+ case mixLevels_117RC3:
setVSTiAttenuation(1.0f);
setIntToFloat(1.0f/static_cast<float>(MIXING_CLIPMAX));
setFloatToInt(static_cast<float>(MIXING_CLIPMAX));
setGlobalVolumeAppliesToMaster(true);
setUseGlobalPreAmp(false);
- setTreatPanLikeBalance(true);
+ setForceSoftPanning(true);
setDisplayDBValues(true);
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(128.0);
@@ -78,13 +78,13 @@
// FOR TEST PURPOSES ONLY:
/*
- case plugmix_mode_Test:
+ case mixLevels_Test:
setVSTiAttenuation(1.0f);
setIntToFloat(1.0f/static_cast<float>(MIXING_CLIPMAX));
setFloatToInt(static_cast<float>(MIXING_CLIPMAX));
setGlobalVolumeAppliesToMaster(true);
setUseGlobalPreAmp(false);
- setTreatPanLikeBalance(true);
+ setForceSoftPanning(true);
setDisplayDBValues(true);
setNormalSamplePreAmp(128.0);
setNormalVSTiVol(128.0);
@@ -158,12 +158,12 @@
}
-bool CSoundFilePlayConfig::getTreatPanLikeBalance() {
- return m_treatPanLikeBalance;
+bool CSoundFilePlayConfig::getForceSoftPanning() {
+ return m_forceSoftPanning;
}
-void CSoundFilePlayConfig::setTreatPanLikeBalance(bool inTreatPanLikeBalance) {
- m_treatPanLikeBalance=inTreatPanLikeBalance;
+void CSoundFilePlayConfig::setForceSoftPanning(bool inForceSoftPanning) {
+ m_forceSoftPanning=inForceSoftPanning;
}
void CSoundFilePlayConfig::setDisplayDBValues(bool in) {
Modified: trunk/OpenMPT/mptrack/SoundFilePlayConfig.h
===================================================================
--- trunk/OpenMPT/mptrack/SoundFilePlayConfig.h 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/SoundFilePlayConfig.h 2007-05-07 11:41:47 UTC (rev 180)
@@ -13,11 +13,11 @@
};
enum {
- plugmix_mode_original = 0,
- plugmix_mode_117RC1 = 1,
- plugmix_mode_117RC2 = 2,
- plugmix_mode_117RC3 = 3,
- plugmix_mode_Test = 4,
+ mixLevels_original = 0,
+ mixLevels_117RC1 = 1,
+ mixLevels_117RC2 = 2,
+ mixLevels_117RC3 = 3,
+ mixLevels_Test = 4,
};
// Class used to store settings for a song file.
@@ -49,8 +49,8 @@
void setUseGlobalPreAmp(bool);
bool getUseGlobalPreAmp();
- void setTreatPanLikeBalance(bool);
- bool getTreatPanLikeBalance();
+ void setForceSoftPanning(bool);
+ bool getForceSoftPanning();
void setDisplayDBValues(bool);
bool getDisplayDBValues();
@@ -80,7 +80,7 @@
bool m_globalVolumeAppliesToMaster;
bool m_ignorePreAmp;
- bool m_treatPanLikeBalance;
+ bool m_forceSoftPanning;
bool m_displayDBValues;
DWORD m_LastSavedWithVersion;
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2007-05-07 11:41:47 UTC (rev 180)
@@ -1185,7 +1185,20 @@
}
}
+VOID CSelectPluginDlg::OnCancel()
+//---------------------------
+{
+ //remember window size:
+ RECT rect;
+ GetWindowRect(&rect);
+ CMainFrame::GetMainFrame()->gnPlugWindowX = rect.left;
+ CMainFrame::GetMainFrame()->gnPlugWindowY = rect.top;
+ CMainFrame::GetMainFrame()->gnPlugWindowWidth = rect.right - rect.left;
+ CMainFrame::GetMainFrame()->gnPlugWindowHeight = rect.bottom - rect.top;
+ CDialog::OnCancel();
+}
+
VOID CSelectPluginDlg::UpdatePluginsList(DWORD forceSelect/*=0*/)
//---------------------------------------------------------------
{
Modified: trunk/OpenMPT/mptrack/Vstplug.h
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.h 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/Vstplug.h 2007-05-07 11:41:47 UTC (rev 180)
@@ -241,6 +241,7 @@
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();
virtual VOID OnOK();
+ virtual VOID OnCancel();
afx_msg void OnAddPlugin();
afx_msg void OnRemovePlugin();
afx_msg void OnSelChanged(NMHDR *pNotifyStruct, LRESULT * result);
Added: trunk/OpenMPT/mptrack/bin/mptrack.exe
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/mptrack/bin/mptrack.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/OpenMPT/mptrack/bin/mptrack_Generic.exe
===================================================================
(Binary files differ)
Deleted: trunk/OpenMPT/mptrack/bin/mptrack_P3.exe
===================================================================
(Binary files differ)
Deleted: trunk/OpenMPT/mptrack/bin/mptrack_P4-Athlon64.exe
===================================================================
(Binary files differ)
Deleted: trunk/OpenMPT/mptrack/bin/mptrack_athlon32.exe
===================================================================
(Binary files differ)
Deleted: trunk/OpenMPT/mptrack/bin/testSvnCommitList3
===================================================================
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-05-07 11:41:47 UTC (rev 180)
@@ -185,18 +185,18 @@
default: m_TempoModeBox.SetCurSel(0); break;
}
- m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC3"), plugmix_mode_117RC3);
- m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC2"), plugmix_mode_117RC2);
- m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC1"), plugmix_mode_117RC1);
- m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Original"), plugmix_mode_original);
- m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), plugmix_mode_Test);
- switch(m_pSndFile->m_nPlugMixMode)
+ m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("OpenMPT 1.17RC3"), mixLevels_117RC3);
+ 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"), mixLevels_original);
+ //m_PlugMixBox.SetItemData(m_PlugMixBox.AddString("Test"), mixLevels_Test);
+ switch(m_pSndFile->m_nMixLevels)
{
- //case plugmix_mode_Test: m_PlugMixBox.SetCurSel(3); break;
- case plugmix_mode_original: m_PlugMixBox.SetCurSel(3); break;
- case plugmix_mode_117RC1: m_PlugMixBox.SetCurSel(2); break;
- case plugmix_mode_117RC2: m_PlugMixBox.SetCurSel(1); break;
- case plugmix_mode_117RC3:
+ //case mixLevels_Test: 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:
default: m_PlugMixBox.SetCurSel(0); break;
}
@@ -383,8 +383,8 @@
sel = m_PlugMixBox.GetCurSel();
if (sel >= 0) {
- m_pSndFile->m_nPlugMixMode = m_PlugMixBox.GetItemData(sel);
- m_pSndFile->m_pConfig->SetPluginMixLevels(m_pSndFile->m_nPlugMixMode);
+ m_pSndFile->m_nMixLevels = m_PlugMixBox.GetItemData(sel);
+ m_pSndFile->m_pConfig->SetPluginMixLevels(m_pSndFile->m_nMixLevels);
m_pSndFile->RecalculateGainForAllPlugs();
}
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2007-05-07 11:41:47 UTC (rev 180)
@@ -189,6 +189,7 @@
MENUITEM SEPARATOR
POPUP "&Internet"
BEGIN
+ MENUITEM "OpenMPT Wiki", ID_NETLINK_OPENMPTWIKI
MENUITEM "Modplug Central &Forums", ID_NETLINK_FORUMS
MENUITEM "MPT-FR", ID_NETLINK_MPTFR
MENUITEM "&Kvr Audio (plugins)", ID_NETLINK_PLUGINS
@@ -943,7 +944,7 @@
COMBOBOX IDC_COMBO4,156,135,81,51,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
GROUPBOX "Playback",IDC_STATIC,4,99,240,62
- LTEXT "Plugin levels:",IDC_STATIC,111,138,43,10
+ LTEXT "Mix Levels:",IDC_STATIC,111,138,43,10
GROUPBOX "OpenMPT Version Info",IDC_STATIC,4,165,235,44
EDITTEXT IDC_EDIT1,67,175,166,13,ES_AUTOHSCROLL | ES_READONLY,
WS_EX_STATICEDGE
@@ -1399,7 +1400,7 @@
CAPTION "Sound Card"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
- GROUPBOX "",IDC_STATIC,4,3,232,150
+ GROUPBOX "",IDC_STATIC,4,3,232,167
LTEXT "Sound Device:",IDC_STATIC,9,12,79,8
CONTROL "",IDC_COMBO1,"ComboBoxEx32",CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP,10,23,219,96
@@ -1429,8 +1430,10 @@
WS_TABSTOP
CONTROL "Reverse Stereo",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,131,78,62,10
- CONTROL "Headphones",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
+ CONTROL "Soft Panning",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,131,90,64,10
+ LTEXT "Note: The Pre-Amp and Soft Panning settings are ignored by songs with mix levels set to 1.17RC3 or later in Song Properties.",
+ IDC_STATIC,16,150,204,18
END
IDD_MIDIMACRO DIALOGEX 0, 0, 349, 345
@@ -2076,7 +2079,7 @@
IDD_OPTIONS_SOUNDCARD, DIALOG
BEGIN
RIGHTMARGIN, 240
- BOTTOMMARGIN, 156
+ BOTTOMMARGIN, 177
END
IDD_MIDIMACRO, DIALOG
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2007-05-07 11:41:47 UTC (rev 180)
@@ -45,13 +45,14 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
- AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib"
+ AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib winhttp.lib"
OutputFile=".\Debug/mptrack.exe"
Version="5.0"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\xsoundlib\Debug"
GenerateDebugInformation="TRUE"
+ AssemblyDebug="1"
ProgramDatabaseFile=".\Debug/mptrack.pdb"
GenerateMapFile="TRUE"
MapFileName=".\Debug/mptrack.map"
@@ -116,8 +117,8 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
- AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib"
- OutputFile=".\Bin/mptrack_Generic.exe"
+ AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib winhttp.lib"
+ OutputFile=".\Bin/mptrack.exe"
Version="5.0"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
@@ -188,7 +189,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
- AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib"
+ AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib winhttp.lib"
OutputFile=".\Bin/mptrack_P3.exe"
Version="5.0"
LinkIncremental="1"
@@ -260,7 +261,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
- AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib"
+ AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib winhttp.lib"
OutputFile=".\Bin/mptrack_athlon32.exe"
Version="5.0"
LinkIncremental="1"
@@ -332,7 +333,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
- AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib"
+ AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib winhttp.lib"
OutputFile=".\Bin/mptrack_P4-Athlon64.exe"
Version="5.0"
LinkIncremental="1"
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/mptrack/resource.h 2007-05-07 11:41:47 UTC (rev 180)
@@ -544,7 +544,7 @@
#define IDC_EDIT_SPEED 2008
#define IDC_EDIT_GLOBALVOL 2009
#define IDC_EDIT_RESTARTPOS 2010
-#define IDC_SLIDER_SAMPLEPREAMP 2011
+#define IDC_SLIDER_SAMPLEPREAMP 2011
#define IDC_BUTTON_MODTYPE 2012
#define IDC_EDIT_SAMPLEPA 2013
#define IDC_EDIT_MODTYPE 2014
@@ -969,7 +969,7 @@
#define ID_MOVETUNING 36025
#define ID_COPYTUNING 36026
#define ID_REMOVETUNINGCOLLECTION 36027
-#define ID_SHOWTIMEATROW 36028
+#define ID_SHOWTIMEATROW 36028
#define ID_SELECTINST 36100
#define ID_NETLINK_MPTFR 37001
#define ID_PLUG_RECORDAUTOMATION 37003
@@ -1006,6 +1006,7 @@
#define ID_ENVELOPE_TOGGLERELEASENODE 59206
#define ID_Menu59207 59207
#define ID_ENVELOPE_SCALEPOINTS 59208
+#define ID_NETLINK_OPENMPTWIKI 59210
// Next default values for new objects
//
@@ -1013,7 +1014,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 515
-#define _APS_NEXT_COMMAND_VALUE 59209
+#define _APS_NEXT_COMMAND_VALUE 59211
#define _APS_NEXT_CONTROL_VALUE 2304
#define _APS_NEXT_SYMED_VALUE 901
#endif
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/packageTemplate/History.txt 2007-05-07 11:41:47 UTC (rev 180)
@@ -8,6 +8,57 @@
?: other
(tx XYZ): thanks to XYZ for telling me about the bug
+v1.17.02.46
+ + <Relabsoluness> Experimental MPTm format:
+ --> Internally, it is still very close to the IT-based format.
+ --> Order&pattern limit increased to 65000; whole range not tested :) (Note that modeffects such as position jump doesn't cover the whole range unless the #-extension can be used(haven't tested))
+ + <Relabsoluness> User definable tuning modes for instruments:
+ --> Only available for MPTm
+ --> Ratio value as well as note name for every key can be assigned invidually; gives rather free hands for experiments.
+ --> Every instrument can have it's own tuning
+ --> Tunings can be saved to file and loaded from file.
+ --> IMPORTANT: When using tunings, behavior of various modcommands such as portamento have been changed, and new behaviors are still to be decided.
+ + <Relabsoluness> In song properties, option to increase playback compatibility with original Impulse Tracker behavior. Is in no way complete; currently affects only a couple of differences. Many differences are still there.
+ + <Relabsoluness> Ability to load multiple mods/samples/instruments from corresponding load dialogs.
+ --> Known issue: Intermittent failures.
+ + <Relabsoluness> 32-bit float wav import
+ . <Relabsoluness> 24/32-bit PCM wav sample import fixed
+ + <Relabsoluness> Playback control additions: 'Solo on transition' & 'Mute on transition'. Available from pattern view context menu(right click).
+ + <Relabsoluness> Envelope points can be scaled by a factor through context menu on envelopeview(right click)
+ + <Relabsoluness> Calculator of playback time (measured from start) at the beginning of any row of any pattern (uses existing modlength calculator).
+ --> Known limitation: When the row is within pattern loop, doesn't give all possible times.
+ + <rewbs> SCx now sends note-off to VSTis at tick x.
+ + <rewbs> New mixmode (called 1.17RC3): bypass global preamp, force soft panning, provide explicit dB value for sample attenuation. WARNING: this mixmode is subject to change.
+ + <rewbs> Check for updates on startup. To disable, set CheckForUpdates=0 in mptrack.ini.
+ . <rewbs> Plugin list window remembers its position/size even on cancel.
+ . <Relabsoluness> When opening instruments, load dialog didn't remember its previous path.
+ . <Relabsoluness> In general tab, it was possible to give longer modname than the fileformat could save.
+ . <Relabsoluness> Instruments associates with VSTis no longer also need to be associated to a sample in order to play.
+ . <Relabsoluness> Trash characters to empty ITP comments should no longer appear.
+ . <Relabsoluness> Channel state should now be updated correctly when e.g. moving channels through channel manager.
+ . <Relabsoluness> It should no longer be possible to remove all channels from channel manager.
+ / <Relabsoluness> Channel states resetting when jumping between orders from orderlist.
+ --> NOTE: While this fixes a bug (behavior change) introduced in the tuning branch(?), it also changes quite prominent behavior so can annoy people - might need to be modified at some point.
+ / <Relabsoluness> Added version number to the mainframe title.
+ / <Relabsoluness> Changed the 'order message' at the bottom bar of the screen "Position x of y" to "Position x of y (x in hex of y in hex)".
+ / <Relabsoluness> Lots of smaller (internal) changes.
+
+v1.17.02.45
+ + <Relabsoluness & Alex> "Pitch to tempo lock" instrument setting: define the tempo at which your instrument loops correctly, and it will be pitched automatically to match the song's current tempo.
+ + <Relabsoluness> Notification when attempting to modify pattern but pattern record is off.
+ + <Relabsoluness> Orderlist margins: you can define how many slots to keep visible around the active pattern as the orderlist scrolls
+ . <Relabsoluness> Fixes for various unexpected pattern loop state changes.
+ . <Relabsoluness> Fixes to IT Style clear.
+ . <Relabsoluness> Memory management fixes and misc other bug fixes.
+ . <rewbs> ITP loading fixed (I broke it in v1.17.02.44)
+ . <rewbs> Time estimation fixed for tracks with pattern break+XParam.
+ . <rewbs> "Last saved with" version number was not always saved correctly - fixed
+
+v1.17.02.44
+ + <rewbs> Added release section to volume envelope (see: http://openmpt.xwiki.com/xwiki/bin/view/Manual/InstrumentReleaseEnvelope). IT only.
+ . <rewbs> Overflow fixes in file loading functions (see: http://aluigi.altervista.org/adv/mptho-adv.txt)
+ . <rewbs> Greyed out irrelevant items in the orderlist context menu.
+
. v1.17.02.43
+ <rewbs> You can now load up new plugins from anywhere, not just the General tab. Select "Plugin Manager..." from the view menu. This can also be assigned to a global hotkey.
Limitation: currently plugins added to a song in this manner with always be put in the first empty slot. In a future version you'll be able to choose the slot directly from that window.
@@ -16,6 +67,14 @@
. <rewbs> Added channel limit check when adding chans from the pattern editor.
. <rewbs> Fixed instant crash with SampleTank 2.1.
+. v1.17.02.43
+ + <rewbs> You can now load up new plugins from anywhere, not just the General tab. Select "Plugin Manager..." from the view menu. This can also be assigned to a global hotkey.
+ Limitation: currently plugins added to a song in this manner with always be put in the first empty slot. In a future version you'll be able to choose the slot directly from that window.
+ + <rewbs> "Cleanup Plugins" to remove any plugs that are not associated to a channel and not used by an instrument and not used as an output for any used plugs.
+ . <rewbs> Fixed channel limits. Should be able to correctly save IT pattern data with up to 127 chans. There's only space for 64 channel headers though (channel names etc..). XMs restricted to 64 chans.
+ . <rewbs> Added channel limit check when adding chans from the pattern editor.
+ . <rewbs> Fixed instant crash with SampleTank 2.1.
+
. v1.17.02.42
+ <rewbs> "Compatibility export" in file menu: save as 'plain' IT, without all of OpenMPT's crap. IT only for now (not XM).
. <rewbs> Set instrument in pattern editor should work when no note is specified (tx Torvus - http://lpchip.com/modplug/viewtopic.php?t=470)
Added: trunk/OpenMPT/packageTemplate/Installation.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/Installation.txt (rev 0)
+++ trunk/OpenMPT/packageTemplate/Installation.txt 2007-05-07 11:41:47 UTC (rev 180)
@@ -0,0 +1,5 @@
+OpenMPT development build - Installation notes
+----------------------------------------------
+. If you have an existing installation of OpenMPT and wish to re-use its settings, copy your mptrack.ini to this directory.
+. If not, you're done: just launch mptrack.exe.
+
Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb
===================================================================
--- trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2007-05-07 11:41:47 UTC (rev 180)
@@ -9,7 +9,7 @@
0:1349:2:83:1 //File/Save: Ctrl+S (KeyDown)
0:1030:2:119:1 //Play song/Pause song: Ctrl+F8 (KeyDown)
0:1031:0:119:1 //Pause song: F8 (KeyDown)
-0:1375:0:27:1 //Stop Song: Esc (KeyDown)
+0:1375:0:27:1 //Stop Song: ESC (KeyDown)
0:1029:0:116:5 //Play song from start: F5 (KeyDown|KeyHold)
0:1028:0:118:5 //Play song from cursor: F7 (KeyDown|KeyHold)
0:1027:0:117:5 //Play pattern from start: F6 (KeyDown|KeyHold)
@@ -36,49 +36,49 @@
0:1670:6:77:1 //View Channel Manager: Ctrl+Alt+M (KeyDown)
0:1669:3:77:1 //View Plugin Manager: Shift+Ctrl+M (KeyDown)
0:1032:0:219:5 //Previous instrument: [ (KeyDown|KeyHold)
-0:1032:2:38:5 //Previous instrument: Ctrl+Up (KeyDown|KeyHold)
+0:1032:2:38:5 //Previous instrument: Ctrl+UP (KeyDown|KeyHold)
0:1033:0:221:5 //Next instrument: ] (KeyDown|KeyHold)
-0:1033:2:40:5 //Next instrument: Ctrl+Down (KeyDown|KeyHold)
-0:1036:0:111:5 //Previous octave: Num / (KeyDown|KeyHold)
-0:1037:0:106:5 //Next octave: Num * (KeyDown|KeyHold)
-0:1034:2:37:5 //Previous order: Ctrl+Left (KeyDown|KeyHold)
-0:1035:2:39:5 //Next order: Ctrl+Right (KeyDown|KeyHold)
+0:1033:2:40:5 //Next instrument: Ctrl+DOWN (KeyDown|KeyHold)
+0:1036:0:111:5 //Previous octave: NUM DIVIDE (KeyDown|KeyHold)
+0:1037:0:106:5 //Next octave: NUMMULT (KeyDown|KeyHold)
+0:1034:2:37:5 //Previous order: Ctrl+LEFT (KeyDown|KeyHold)
+0:1035:2:39:5 //Next order: Ctrl+RIGHT (KeyDown|KeyHold)
//----( General Context [bottom] (1) )------------
//----( Pattern Context [bottom] (2) )------------
-2:1017:0:34:5 //Jump down by measure: Page Down (KeyDown|KeyHold)
-2:1018:0:33:5 //Jump up by measure: Page Up (KeyDown|KeyHold)
-2:1338:4:34:5 //Jump down by beat: Alt+Page Down (KeyDown|KeyHold)
-2:1339:4:33:5 //Jump up by beat: Alt+Page Up (KeyDown|KeyHold)
-2:1019:2:34:5 //Snap down to measure: Ctrl+Page Down (KeyDown|KeyHold)
-2:1020:2:33:5 //Snap up to measure: Ctrl+Page Up (KeyDown|KeyHold)
-2:1340:6:34:5 //Snap down to beat: Ctrl+Alt+Page Down (KeyDown|KeyHold)
-2:1341:6:33:5 //Snap up to beat: Ctrl+Alt+Page Up (KeyDown|KeyHold)
-2:1038:0:40:5 //Navigate down by 1 row: Down (KeyDown|KeyHold)
-2:1039:0:38:5 //Navigate up by 1 row: Up (KeyDown|KeyHold)
-2:1040:0:37:5 //Navigate left: Left (KeyDown|KeyHold)
-2:1041:0:39:5 //Navigate right: Right (KeyDown|KeyHold)
-2:1042:0:9:5 //Navigate to next channel: Tab (KeyDown|KeyHold)
-2:1043:2:9:5 //Navigate to previous channel: Ctrl+Tab (KeyDown|KeyHold)
-2:1044:0:36:1 //Go to first channel: Home (KeyDown)
-2:1045:2:36:1 //Go to first row: Ctrl+Home (KeyDown)
-2:1046:6:36:1 //Go to first row of first channel: Ctrl+Alt+Home (KeyDown)
-2:1047:0:35:1 //Go to last channel: End (KeyDown)
-2:1048:2:35:1 //Go to last row: Ctrl+End (KeyDown)
-2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+End (KeyDown)
-2:1050:1:16:1 //Selection key: Shift+Shift (KeyDown)
+2:1017:0:34:5 //Jump down by measure: PGDOWN (KeyDown|KeyHold)
+2:1018:0:33:5 //Jump up by measure: PGUP (KeyDown|KeyHold)
+2:1338:4:34:5 //Jump down by beat: Alt+PGDOWN (KeyDown|KeyHold)
+2:1339:4:33:5 //Jump up by beat: Alt+PGUP (KeyDown|KeyHold)
+2:1019:2:34:5 //Snap down to measure: Ctrl+PGDOWN (KeyDown|KeyHold)
+2:1020:2:33:5 //Snap up to measure: Ctrl+PGUP (KeyDown|KeyHold)
+2:1340:6:34:5 //Snap down to beat: Ctrl+Alt+PGDOWN (KeyDown|KeyHold)
+2:1341:6:33:5 //Snap up to beat: Ctrl+Alt+PGUP (KeyDown|KeyHold)
+2:1038:0:40:5 //Navigate down by 1 row: DOWN (KeyDown|KeyHold)
+2:1039:0:38:5 //Navigate up by 1 row: UP (KeyDown|KeyHold)
+2:1040:0:37:5 //Navigate left: LEFT (KeyDown|KeyHold)
+2:1041:0:39:5 //Navigate right: RIGHT (KeyDown|KeyHold)
+2:1042:0:9:5 //Navigate to next channel: TAB (KeyDown|KeyHold)
+2:1043:2:9:5 //Navigate to previous channel: Ctrl+TAB (KeyDown|KeyHold)
+2:1044:0:36:1 //Go to first channel: HOME (KeyDown)
+2:1045:2:36:1 //Go to first row: Ctrl+HOME (KeyDown)
+2:1046:6:36:1 //Go to first row of first channel: Ctrl+Alt+HOME (KeyDown)
+2:1047:0:35:1 //Go to last channel: END (KeyDown)
+2:1048:2:35:1 //Go to last row: Ctrl+END (KeyDown)
+2:1049:6:35:1 //Go to last row of last channel: Ctrl+Alt+END (KeyDown)
+2:1050:1:16:1 //Selection key: Shift (KeyDown)
2:1011:4:76:1 //Select channel / Select all: Alt+L (KeyDown)
2:1663:2:118:1 //Toggle follow song: Ctrl+F7 (KeyDown)
-2:1003:0:13:1 //Quick copy: Enter (KeyDown)
-2:1004:0:32:5 //Quick paste: Space (KeyDown|KeyHold)
+2:1003:0:13:1 //Quick copy: ENTER (KeyDown)
+2:1004:0:32:5 //Quick paste: SPACE (KeyDown|KeyHold)
2:1001:1:120:1 //Enable recording: Shift+F9 (KeyDown)
-2:1002:2:13:1 //Play row: Ctrl+Enter (KeyDown)
-2:1002:0:104:1 //Play row: Num 8 (KeyDown)
+2:1002:2:13:1 //Play row: Ctrl+ENTER (KeyDown)
+2:1002:0:104:1 //Play row: NUM 8 (KeyDown)
2:1002:0:56:1 //Play row: 8 (KeyDown)
-2:1317:4:18:1 //Set row jump on note entry: Alt+Alt (KeyDown)
-2:1685:6:9:1 //Switch to order list: Ctrl+Alt+Tab (KeyDown)
-2:1672:3:13:1 //Insert new pattern: Shift+Ctrl+Enter (KeyDown)
+2:1317:4:18:1 //Set row jump on note entry: Alt (KeyDown)
+2:1685:6:9:1 //Switch to order list: Ctrl+Alt+TAB (KeyDown)
+2:1672:3:13:1 //Insert new pattern: Shift+Ctrl+ENTER (KeyDown)
2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown)
2:1062:0:93:1 //Show note properties: Application (KeyDown)
2:1063:2:93:1 //Show context (right-click) menu: Ctrl+Application (KeyDown)
@@ -95,18 +95,18 @@
2:1013:4:83:1 //Apply current instrument: Alt+S (KeyDown)
2:1660:4:69:1 //Grow selection: Alt+E (KeyDown)
2:1661:4:68:1 //Shrink selection: Alt+D (KeyDown)
-2:1057:0:46:1 //Clear row: Delete (KeyDown)
-2:1058:0:110:1 //Clear field: Num Del (KeyDown)
+2:1057:0:46:1 //Clear row: DELETE (KeyDown)
+2:1058:0:110:1 //Clear field: NUM DECIMAL (KeyDown)
2:1664:1:190:1 //Clear field (IT Style): Shift+. (KeyDown)
-2:1059:2:46:1 //Clear row and step: Ctrl+Delete (KeyDown)
-2:1060:2:110:1 //Clear field and step: Ctrl+Num Del (KeyDown)
+2:1059:2:46:1 //Clear row and step: Ctrl+DELETE (KeyDown)
+2:1060:2:110:1 //Clear field and step: Ctrl+NUM DECIMAL (KeyDown)
2:1665:3:190:1 //Clear field and step (IT Style): Shift+Ctrl+. (KeyDown)
-2:1061:0:8:5 //Delete rows: Backspace (KeyDown|KeyHold)
-2:1377:2:8:5 //Delete all rows: Ctrl+Backspace (KeyDown|KeyHold)
-2:1378:0:45:5 //Insert Row: Insert (KeyDown|KeyHold)
-2:1379:2:45:1 //Insert All Rows: Ctrl+Insert (KeyDown)
-2:1055:0:109:5 //Previous pattern: Num - (KeyDown|KeyHold)
-2:1054:0:107:5 //Next pattern: Num + (KeyDown|KeyHold)
+2:1061:0:8:5 //Delete rows: BACKSPACE (KeyDown|KeyHold)
+2:1377:2:8:5 //Delete all rows: Ctrl+BACKSPACE (KeyDown|KeyHold)
+2:1378:0:45:5 //Insert Row: INSERT (KeyDown|KeyHold)
+2:1379:2:45:1 //Insert All Rows: Ctrl+INSERT (KeyDown)
+2:1055:0:109:5 //Previous pattern: NUM SUB (KeyDown|KeyHold)
+2:1054:0:107:5 //Next pattern: NUM PLUS (KeyDown|KeyHold)
//----( Pattern Context [bottom] - Note Col (3) )------------
3:1064:0:90:1 //Base octave C: Z (KeyDown)
@@ -138,67 +138,67 @@
3:1090:0:79:1 //Base octave +2 D: O (KeyDown)
3:1091:0:48:1 //Base octave +2 D#: 0 (KeyDown)
3:1092:0:80:1 //Base octave +2 E: P (KeyDown)
-3:1212:0:96:1 //Set octave 0: Num 0 (KeyDown)
-3:1213:0:97:1 //Set octave 1: Num 1 (KeyDown)
-3:1214:0:98:1 //Set octave 2: Num 2 (KeyDown)
-3:1215:0:99:1 //Set octave 3: Num 3 (KeyDown)
+3:1212:0:96:1 //Set octave 0: NUM 0 (KeyDown)
+3:1213:0:97:1 //Set octave 1: NUM 1 (KeyDown)
+3:1214:0:98:1 //Set octave 2: NUM 2 (KeyDown)
+3:1215:0:99:1 //Set octave 3: NUM 3 (KeyDown)
3:1216:0:52:1 //Set octave 4: 4 (KeyDown)
-3:1216:0:100:1 //Set octave 4: Num 4 (KeyDown)
-3:1217:0:101:1 //Set octave 5: Num 5 (KeyDown)
-3:1218:0:102:1 //Set octave 6: Num 6 (KeyDown)
-3:1219:0:103:1 //Set octave 7: Num 7 (KeyDown)
-3:1220:0:104:1 //Set octave 8: Num 8 (KeyDown)
-3:1221:0:105:1 //Set octave 9: Num 9 (KeyDown)
-3:1316:1:16:1 //Chord Modifier: Shift+Shift (KeyDown)
+3:1216:0:100:1 //Set octave 4: NUM 4 (KeyDown)
+3:1217:0:101:1 //Set octave 5: NUM 5 (KeyDown)
+3:1218:0:102:1 //Set octave 6: NUM 6 (KeyDown)
+3:1219:0:103:1 //Set octave 7: NUM 7 (KeyDown)
+3:1220:0:104:1 //Set octave 8: NUM 8 (KeyDown)
+3:1221:0:105:1 //Set octave 9: NUM 9 (KeyDown)
+3:1316:1:16:1 //Chord Modifier: Shift (KeyDown)
3:1200:0:49:1 //Note cut: 1 (KeyDown)
-3:1201:0:223:1 //Note off: (KeyDown)
+3:1201:0:223:1 //Note off: ` (KeyDown)
3:1201:0:187:1 //Note off: = (KeyDown)
3:1667:1:49:1 //Note cut (don't remember instrument): Shift+1 (KeyDown)
-3:1668:1:223:1 //Note off (don't remember instrument): Shift+ (KeyDown)
+3:1668:1:223:1 //Note off (don't remember instrument): Shift+` (KeyDown)
//----( Pattern Context [bottom] - Ins Col (4) )------------
-4:1202:0:96:1 //Set instrument digit 0: Num 0 (KeyDown)
+4:1202:0:96:1 //Set instrument digit 0: NUM 0 (KeyDown)
4:1202:0:48:1 //Set instrument digit 0: 0 (KeyDown)
-4:1203:0:97:1 //Set instrument digit 1: Num 1 (KeyDown)
+4:1203:0:97:1 //Set instrument digit 1: NUM 1 (KeyDown)
4:1203:0:49:1 //Set instrument digit 1: 1 (KeyDown)
-4:1204:0:98:1 //Set instrument digit 2: Num 2 (KeyDown)
+4:1204:0:98:1 //Set instrument digit 2: NUM 2 (KeyDown)
4:1204:0:50:1 //Set instrument digit 2: 2 (KeyDown)
-4:1205:0:99:1 //Set instrument digit 3: Num 3 (KeyDown)
+4:1205:0:99:1 //Set instrument digit 3: NUM 3 (KeyDown)
4:1205:0:51:1 //Set instrument digit 3: 3 (KeyDown)
-4:1206:0:100:1 //Set instrument digit 4: Num 4 (KeyDown)
+4:1206:0:100:1 //Set instrument digit 4: NUM 4 (KeyDown)
4:1206:0:52:1 //Set instrument digit 4: 4 (KeyDown)
-4:1207:0:101:1 //Set instrument digit 5: Num 5 (KeyDown)
+4:1207:0:101:1 //Set instrument digit 5: NUM 5 (KeyDown)
4:1207:0:53:1 //Set instrument digit 5: 5 (KeyDown)
-4:1208:0:102:1 //Set instrument digit 6: Num 6 (KeyDown)
+4:1208:0:102:1 //Set instrument digit 6: NUM 6 (KeyDown)
4:1208:0:54:1 //Set instrument digit 6: 6 (KeyDown)
-4:1209:0:103:1 //Set instrument digit 7: Num 7 (KeyDown)
+4:1209:0:103:1 //Set instrument digit 7: NUM 7 (KeyDown)
4:1209:0:55:1 //Set instrument digit 7: 7 (KeyDown)
4:1210:0:56:1 //Set instrument digit 8: 8 (KeyDown)
-4:1210:0:104:1 //Set instrument digit 8: Num 8 (KeyDown)
-4:1211:0:105:1 //Set instrument digit 9: Num 9 (KeyDown)
+4:1210:0:104:1 //Set instrument digit 8: NUM 8 (KeyDown)
+4:1211:0:105:1 //Set instrument digit 9: NUM 9 (KeyDown)
4:1211:0:57:1 //Set instrument digit 9: 9 (KeyDown)
//----( Pattern Context [bottom] - Vol Col (5) )------------
5:1222:0:48:1 //Set volume digit 0: 0 (KeyDown)
-5:1222:0:96:1 //Set volume digit 0: Num 0 (KeyDown)
+5:1222:0:96:1 //Set volume digit 0: NUM 0 (KeyDown)
5:1223:0:49:1 //Set volume digit 1: 1 (KeyDown)
-5:1223:0:97:1 //Set volume digit 1: Num 1 (KeyDown)
+5:1223:0:97:1 //Set volume digit 1: NUM 1 (KeyDown)
5:1224:0:50:1 //Set volume digit 2: 2 (KeyDown)
-5:1224:0:98:1 //Set volume digit 2: Num 2 (KeyDown)
+5:1224:0:98:1 //Set volume digit 2: NUM 2 (KeyDown)
5:1225:0:51:1 //Set volume digit 3: 3 (KeyDown)
-5:1225:0:99:1 //Set volume digit 3: Num 3 (KeyDown)
+5:1225:0:99:1 //Set volume digit 3: NUM 3 (KeyDown)
5:1226:0:52:1 //Set volume digit 4: 4 (KeyDown)
-5:1226:0:100:1 //Set volume digit 4: Num 4 (KeyDown)
+5:1226:0:100:1 //Set volume digit 4: NUM 4 (KeyDown)
5:1227:0:53:1 //Set volume digit 5: 5 (KeyDown)
-5:1227:0:101:1 //Set volume digit 5: Num 5 (KeyDown)
+5:1227:0:101:1 //Set volume digit 5: NUM 5 (KeyDown)
5:1228:0:54:1 //Set volume digit 6: 6 (KeyDown)
-5:1228:0:102:1 //Set volume digit 6: Num 6 (KeyDown)
+5:1228:0:102:1 //Set volume digit 6: NUM 6 (KeyDown)
5:1229:0:55:1 //Set volume digit 7: 7 (KeyDown)
-5:1229:0:103:1 //Set volume digit 7: Num 7 (KeyDown)
+5:1229:0:103:1 //Set volume digit 7: NUM 7 (KeyDown)
5:1230:0:56:1 //Set volume digit 8: 8 (KeyDown)
-5:1230:0:104:1 //Set volume digit 8: Num 8 (KeyDown)
+5:1230:0:104:1 //Set volume digit 8: NUM 8 (KeyDown)
5:1231:0:57:1 //Set volume digit 9: 9 (KeyDown)
-5:1231:0:105:1 //Set volume digit 9: Num 9 (KeyDown)
+5:1231:0:105:1 //Set volume digit 9: NUM 9 (KeyDown)
5:1232:0:86:1 //Vol command - volume: V (KeyDown)
5:1233:0:80:1 //Vol command - pan: P (KeyDown)
5:1234:0:67:1 //Vol command - vol slide up: C (KeyDown)
@@ -216,31 +216,31 @@
5:1246:0:79:1 //Vol command - Offset: O (KeyDown)
//----( Pattern Context [bottom] - FX Col (6) )------------
-6:1294:0:226:1 //FX midi macro slide: \ (KeyDown)
+6:1294:0:220:1 //FX midi macro slide: \ (KeyDown)
6:1295:1:186:1 //FX pseudo-velocity (experimental): Shift+; (KeyDown)
-6:1666:0:222:1 //FX parameter extension command: ' (KeyDown)
+6:1666:0:222:1 //FX parameter extension command: # (KeyDown)
//----( Pattern Context [bottom] - Param Col (7) )------------
7:1247:0:48:1 //FX Param digit 0: 0 (KeyDown)
-7:1247:0:96:1 //FX Param digit 0: Num 0 (KeyDown)
+7:1247:0:96:1 //FX Param digit 0: NUM 0 (KeyDown)
7:1248:0:49:1 //FX Param digit 1: 1 (KeyDown)
-7:1248:0:97:1 //FX Param digit 1: Num 1 (KeyDown)
+7:1248:0:97:1 //FX Param digit 1: NUM 1 (KeyDown)
7:1249:0:50:1 //FX Param digit 2: 2 (KeyDown)
-7:1249:0:98:1 //FX Param digit 2: Num 2 (KeyDown)
+7:1249:0:98:1 //FX Param digit 2: NUM 2 (KeyDown)
7:1250:0:51:1 //FX Param digit 3: 3 (KeyDown)
-7:1250:0:99:1 //FX Param digit 3: Num 3 (KeyDown)
+7:1250:0:99:1 //FX Param digit 3: NUM 3 (KeyDown)
7:1251:0:52:1 //FX Param digit 4: 4 (KeyDown)
-7:1251:0:100:1 //FX Param digit 4: Num 4 (KeyDown)
+7:1251:0:100:1 //FX Param digit 4: NUM 4 (KeyDown)
7:1252:0:53:1 //FX Param digit 5: 5 (KeyDown)
-7:1252:0:101:1 //FX Param digit 5: Num 5 (KeyDown)
+7:1252:0:101:1 //FX Param digit 5: NUM 5 (KeyDown)
7:1253:0:54:1 //FX Param digit 6: 6 (KeyDown)
-7:1253:0:102:1 //FX Param digit 6: Num 6 (KeyDown)
+7:1253:0:102:1 //FX Param digit 6: NUM 6 (KeyDown)
7:1254:0:55:1 //FX Param digit 7: 7 (KeyDown)
-7:1254:0:103:1 //FX Param digit 7: Num 7 (KeyDown)
+7:1254:0:103:1 //FX Param digit 7: NUM 7 (KeyDown)
7:1255:0:56:1 //FX Param digit 8: 8 (KeyDown)
-7:1255:0:104:1 //FX Param digit 8: Num 8 (KeyDown)
+7:1255:0:104:1 //FX Param digit 8: NUM 8 (KeyDown)
7:1256:0:57:1 //FX Param digit 9: 9 (KeyDown)
-7:1256:0:105:1 //FX Param digit 9: Num 9 (KeyDown)
+7:1256:0:105:1 //FX Param digit 9: NUM 9 (KeyDown)
7:1257:0:65:1 //FX Param digit A: A (KeyDown)
7:1258:0:66:1 //FX Param digit B: B (KeyDown)
7:1259:0:67:1 //FX Param digit C: C (KeyDown)
@@ -253,13 +253,13 @@
8:1674:4:83:1 //Save Sample: Alt+S (KeyDown)
8:1675:4:78:1 //New Sample: Alt+N (KeyDown)
8:1380:2:84:1 //Trim sample around loop points: Ctrl+T (KeyDown)
-8:1383:0:8:1 //Silence sample selection: Backspace (KeyDown)
+8:1383:0:8:1 //Silence sample selection: BACKSPACE (KeyDown)
8:1384:3:78:1 //Normalise Sample: Shift+Ctrl+N (KeyDown)
8:1385:3:65:1 //Amplify Sample: Shift+Ctrl+A (KeyDown)
8:1381:3:82:1 //Reverse sample: Shift+Ctrl+R (KeyDown)
-8:1382:0:46:1 //Delete sample selection: Delete (KeyDown)
-8:1386:0:107:1 //Zoom Out: Num + (KeyDown)
-8:1387:0:109:1 //Zoom In: Num - (KeyDown)
+8:1382:0:46:1 //Delete sample selection: DELETE (KeyDown)
+8:1386:0:107:1 //Zoom Out: NUM PLUS (KeyDown)
+8:1387:0:109:1 //Zoom In: NUM SUB (KeyDown)
//----( Instrument Context [bottom] (9) )------------
Added: trunk/OpenMPT/packageTemplate/tunings/standard/std_tunings.tc
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/tunings/standard/std_tunings.tc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2007-05-07 11:41:47 UTC (rev 180)
@@ -638,7 +638,7 @@
case 'RPM.': fadr = reinterpret_cast<BYTE*>(&m_nRowsPerMeasure); break;
case 'C...': fadr = reinterpret_cast<BYTE*>(&m_nChannels); break;
case 'TM..': fadr = reinterpret_cast<BYTE*>(&m_nTempoMode); break;
- case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nPlugMixMode); break;
+ case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nMixLevels); break;
case 'CWV.': fadr = reinterpret_cast<BYTE*>(&m_dwCreatedWithVersion); break;
case 'LSWV': fadr = reinterpret_cast<BYTE*>(&m_dwLastSavedWithVersion); break;
case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSamplePreAmp); break;
@@ -1044,7 +1044,7 @@
case 'RPM.': fadr = reinterpret_cast<BYTE*>(&m_nRowsPerMeasure); break;
case 'C...': fadr = reinterpret_cast<BYTE*>(&m_nChannels); break;
case 'TM..': fadr = reinterpret_cast<BYTE*>(&m_nTempoMode); break;
- case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nPlugMixMode); break;
+ case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nMixLevels); break;
case 'CWV.': fadr = reinterpret_cast<BYTE*>(&m_dwCreatedWithVersion); break;
case 'LSWV': fadr = reinterpret_cast<BYTE*>(&m_dwLastSavedWithVersion); break;
case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSamplePreAmp); break;
@@ -3153,11 +3153,11 @@
fwrite(&size, 1, sizeof(__int16), f);
fwrite(&m_nTempoMode, 1, size, f);
- code = 'PMM.'; //write m_nPlugMixMode
+ code = 'PMM.'; //write m_nMixLevels
fwrite(&code, 1, sizeof(__int32), f);
- size = sizeof(m_nPlugMixMode);
+ size = sizeof(m_nMixLevels);
fwrite(&size, 1, sizeof(__int16), f);
- fwrite(&m_nPlugMixMode, 1, size, f);
+ fwrite(&m_nMixLevels, 1, size, f);
code = 'CWV.'; //write m_dwCreatedWithVersion
fwrite(&code, 1, sizeof(__int32), f);
@@ -4309,7 +4309,7 @@
case 'RPM.': fadr = reinterpret_cast<BYTE*>(&m_nRowsPerMeasure); break;
case 'C...': fadr = reinterpret_cast<BYTE*>(&m_nChannels); break;
case 'TM..': fadr = reinterpret_cast<BYTE*>(&m_nTempoMode); break;
- case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nPlugMixMode); break;
+ case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nMixLevels); break;
case 'CWV.': fadr = reinterpret_cast<BYTE*>(&m_dwCreatedWithVersion); break;
case 'LSWV': fadr = reinterpret_cast<BYTE*>(&m_dwLastSavedWithVersion); break;
case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSamplePreAmp); break;
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2007-05-07 11:41:47 UTC (rev 180)
@@ -641,7 +641,7 @@
case 'RPB.': fadr = reinterpret_cast<BYTE*>(&m_nRowsPerBeat); break;
case 'RPM.': fadr = reinterpret_cast<BYTE*>(&m_nRowsPerMeasure); break;
case 'TM..': fadr = reinterpret_cast<BYTE*>(&m_nTempoMode); break;
- case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nPlugMixMode); break;
+ case 'PMM.': fadr = reinterpret_cast<BYTE*>(&m_nMixLevels); break;
case 'CWV.': fadr = reinterpret_cast<BYTE*>(&m_dwCreatedWithVersion); break;
case 'LSWV': fadr = reinterpret_cast<BYTE*>(&m_dwLastSavedWithVersion); break;
case 'SPA.': fadr = reinterpret_cast<BYTE*>(&m_nSamplePreAmp); break;
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2007-05-07 11:41:47 UTC (rev 180)
@@ -435,7 +435,7 @@
memset(&m_SongEQ, 0, sizeof(m_SongEQ));
m_lTotalSampleCount=0;
- m_nPlugMixMode=plugmix_mode_117RC2;
+ m_nMixLevels=mixLevels_117RC3;
m_pConfig = new CSoundFilePlayConfig();
BuildDefaultInstrument();
@@ -690,7 +690,7 @@
}
}
}
- m_pConfig->SetPluginMixLevels(m_nPlugMixMode);
+ m_pConfig->SetPluginMixLevels(m_nMixLevels);
RecalculateGainForAllPlugs();
if (m_nType)
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2007-05-07 11:41:47 UTC (rev 180)
@@ -897,7 +897,7 @@
UINT m_nRowsPerBeat; // rewbs.betterBPM
UINT m_nRowsPerMeasure; // rewbs.betterBPM
BYTE m_nTempoMode; // rewbs.betterBPM
- BYTE m_nPlugMixMode;
+ BYTE m_nMixLevels;
UINT m_nMusicSpeed, m_nMusicTempo;
UINT m_nNextRow, m_nRow;
UINT m_nPattern,m_nCurrentPattern,m_nNextPattern,m_nRestartPos, m_nSeqOverride;
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2007-05-04 21:47:39 UTC (rev 179)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2007-05-07 11:41:47 UTC (rev 180)
@@ -1618,10 +1618,7 @@
realvol = (pChn->nRealVolume * kChnMasterVol) >> 8;
}
- if (m_pConfig->getTreatPanLikeBalance()) {
- pChn->nNewLeftVol = (realvol * pan) >> 8;
- pChn->nNewRightVol = (realvol * (256 - pan)) >> 8;
- } else {
+ if (m_pConfig->getForceSoftPanning() || gdwSoundSetup & SNDMIX_SOFTPANNING) {
if (pan < 128) {
pChn->nNewLeftVol = (realvol * pan) >> 8;
pChn->nNewRightVol = (realvol * 128) >> 8;
@@ -1629,6 +1626,9 @@
pChn->nNewLeftVol = (realvol * 128) >> 8;
pChn->nNewRightVol = (realvol * (256 - pan)) >> 8;
}
+ } else {
+ pChn->nNewLeftVol = (realvol * pan) >> 8;
+ pChn->nNewRightVol = (realvol * (256 - pan)) >> 8;
}
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2007-05-04 21:47:45
|
Revision: 179
http://svn.sourceforge.net/modplug/?rev=179&view=rev
Author: relabsoluness
Date: 2007-05-04 14:47:39 -0700 (Fri, 04 May 2007)
Log Message:
-----------
Tuning files added to trunk.
Added Paths:
-----------
trunk/OpenMPT/mptrack/bin/tunings/
trunk/OpenMPT/mptrack/bin/tunings/local_tunings.tc
trunk/OpenMPT/mptrack/bin/tunings/standard/
trunk/OpenMPT/mptrack/bin/tunings/standard/std_tunings.tc
Added: trunk/OpenMPT/mptrack/bin/tunings/local_tunings.tc
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/mptrack/bin/tunings/local_tunings.tc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/OpenMPT/mptrack/bin/tunings/standard/std_tunings.tc
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/mptrack/bin/tunings/standard/std_tunings.tc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2007-04-13 22:43:47
|
Revision: 178
http://svn.sourceforge.net/modplug/?rev=178&view=rev
Author: relabsoluness
Date: 2007-04-13 15:43:39 -0700 (Fri, 13 Apr 2007)
Log Message:
-----------
. v1.17.02.46 (Still no binaries)
+ <Relabs> Time calculator for pattern rows using existing modlength calculator function.
. <Relabs> The songtitle limit in general tab should now work properly for every format.
/ <Relabs> Various minor modifications.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/CommandSet.h
trunk/OpenMPT/mptrack/Ctrl_gen.cpp
trunk/OpenMPT/mptrack/Ctrl_gen.h
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/mptrack/pattern.h
trunk/OpenMPT/mptrack/patternContainer.h
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/mptrack/typedefs.h
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/mod_specifications.h
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2007-04-13 22:43:39 UTC (rev 178)
@@ -2268,6 +2268,11 @@
commands[kcSoloChnOnPatTransition].isDummy = false;
commands[kcSoloChnOnPatTransition].Message = "Solo channel on pattern transition";
+ commands[kcTimeAtRow].UID = 1780;
+ commands[kcTimeAtRow].isHidden = false;
+ commands[kcTimeAtRow].isDummy = false;
+ commands[kcTimeAtRow].Message = "Show playback time at current row";
+
#ifdef _DEBUG
for (int i=0; i<kcNumCommands; i++) {
if (commands[i].UID != 0) { // ignore unset UIDs
Modified: trunk/OpenMPT/mptrack/CommandSet.h
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.h 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/CommandSet.h 2007-04-13 22:43:39 UTC (rev 178)
@@ -220,7 +220,8 @@
kcShowMacroConfig,
kcChangeLoopStatus,
kcShowEditMenu,
- kcEndPatternEditMisc=kcShowEditMenu,
+ kcTimeAtRow,
+ kcEndPatternEditMisc=kcTimeAtRow,
kcChannelMute,
kcChannelSolo,
Modified: trunk/OpenMPT/mptrack/Ctrl_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2007-04-13 22:43:39 UTC (rev 178)
@@ -11,6 +11,7 @@
// -> CODE#0015
// -> DESC="channels management dlg"
#include "Ctrl_pat.h"
+#include ".\ctrl_gen.h"
// -! NEW_FEATURE#0015
BEGIN_MESSAGE_MAP(CCtrlGeneral, CModControlDlg)
@@ -33,6 +34,7 @@
ON_EN_CHANGE(IDC_EDIT_SAMPLEPA, OnSamplePAChanged)
ON_CBN_SELCHANGE(IDC_COMBO_RESAMPLING, OnResamplingChanged)
ON_MESSAGE(WM_MOD_UPDATEPOSITION, OnUpdatePosition)
+ ON_EN_SETFOCUS(IDC_EDIT_SONGTITLE, OnEnSetfocusEditSongtitle)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
@@ -83,7 +85,7 @@
if(m_pSndFile)
m_EditTitle.SetLimitText(m_pSndFile->GetModNameLengthMax());
else
- m_EditTitle.SetLimitText(31);
+ m_EditTitle.SetLimitText(25);
// -> CODE#0016
// -> DESC="default tempo update"
@@ -302,20 +304,15 @@
void CCtrlGeneral::OnTitleChanged()
//---------------------------------
{
- CHAR s[35];
if ((!m_pSndFile) || (!m_EditTitle.m_hWnd) || (!m_EditTitle.GetModify())) return;
- memset(s, 0, sizeof(s));
- m_EditTitle.GetWindowText(s, sizeof(s));
- s[25] = 0;
- if (strcmp(m_pSndFile->m_szNames[0], s))
+
+ CString title;
+ m_EditTitle.GetWindowText(title);
+ if(m_pSndFile->SetTitle(title, title.GetLength()) && m_pModDoc)
{
- memcpy(m_pSndFile->m_szNames[0], s, 26);
- if (m_pModDoc)
- {
- m_EditTitle.SetModify(FALSE);
- m_pModDoc->SetModified();
- m_pModDoc->UpdateAllViews(NULL, HINT_MODGENERAL, this);
- }
+ m_EditTitle.SetModify(FALSE);
+ m_pModDoc->SetModified();
+ m_pModDoc->UpdateAllViews(NULL, HINT_MODGENERAL, this);
}
}
@@ -661,7 +658,17 @@
}
+void CCtrlGeneral::OnEnSetfocusEditSongtitle()
+//--------------------------------------------
+{
+ if(m_pSndFile)
+ {
+ m_EditTitle.SetLimitText(m_pSndFile->GetModNameLengthMax());
+ }
+}
+
+
////////////////////////////////////////////////////////////////////////////////
//
// CVuMeter
Modified: trunk/OpenMPT/mptrack/Ctrl_gen.h
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_gen.h 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/Ctrl_gen.h 2007-04-13 22:43:39 UTC (rev 178)
@@ -82,6 +82,7 @@
afx_msg void OnReverbChanged();
afx_msg void OnSurroundChanged();
afx_msg void OnEqualizerChanged();
+ afx_msg void OnEnSetfocusEditSongtitle();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2007-04-13 22:43:39 UTC (rev 178)
@@ -1923,7 +1923,7 @@
//----------------------------------
{
CHAR s[256];
- DWORD dwSongLength = m_SndFile.GetLength(FALSE, TRUE);
+ DWORD dwSongLength = m_SndFile.GetSongTime();
wsprintf(s, "Approximate song length: %dmn%02ds", dwSongLength/60, dwSongLength%60);
CMainFrame::GetMainFrame()->MessageBox(s, NULL, MB_OK|MB_ICONINFORMATION);
}
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2007-04-13 22:43:39 UTC (rev 178)
@@ -13,7 +13,7 @@
#include "CreditStatic.h"
#include "hyperEdit.h"
#include "bladedll.h"
-#include "commctrl.h";
+#include "commctrl.h"
// rewbs.memLeak
#define CRTDBG_MAP_ALLOC
@@ -1382,7 +1382,7 @@
m_bmp.LoadBitmap(MAKEINTRESOURCE(IDB_MPTRACK));
wsprintf(s, "Build Date: %s", buildDateTime.c_str());
SetDlgItemText(IDC_EDIT2, s);
- SetDlgItemText(IDC_EDIT3, CMainFrame::GetFullVersionString());
+ SetDlgItemText(IDC_EDIT3, CString("Open Modplug Tracker, version ") + CMainFrame::GetFullVersionString());
m_heContact.SetWindowText(
"Contact:\r\n\
@@ -1398,7 +1398,7 @@
"|"
"Development:|"
"Robin Fernandes: mo...@so... (2004-2006)|"
- "Relabsoluness: lk...@me... (2005-2006)|"
+ "rel...@us... (2005-2006)|"
"Eric Chavanon: co...@er... (2004-2005)|"
"Trevor Nunes: mo...@pl... (2004)|"
"Olivier Lapicque: ol...@mo... (1997-2003)|"
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2007-04-13 22:43:39 UTC (rev 178)
@@ -104,10 +104,12 @@
ON_COMMAND(ID_CURSORPASTE, OnCursorPaste)
ON_COMMAND(ID_PATTERN_AMPLIFY, OnPatternAmplify)
ON_COMMAND(ID_CLEAR_SELECTION, OnClearSelectionFromMenu)
+ ON_COMMAND(ID_SHOWTIMEATROW, OnShowTimeAtRow)
ON_COMMAND_RANGE(ID_CHANGE_INSTRUMENT, ID_CHANGE_INSTRUMENT+MAX_INSTRUMENTS, OnSelectInstrument)
ON_UPDATE_COMMAND_UI(ID_EDIT_UNDO, OnUpdateUndo)
ON_COMMAND_RANGE(ID_PLUGSELECT, ID_PLUGSELECT+MAX_MIXPLUGINS, OnSelectPlugin) //rewbs.patPlugName
+
//}}AFX_MSG_MAP
ON_WM_INITMENU()
ON_WM_RBUTTONDBLCLK()
@@ -1151,7 +1153,7 @@
BuildPluginCtxMenu(hMenu, nChn, pSndFile);
}
- //------ Header Menu ---------- :
+ //------ Channel Header Menu ---------- :
else if (pt.y <= m_szHeader.cy){
if (ih->ShiftPressed()) {
//Don't bring up menu if shift is pressed, else we won't get button up msg.
@@ -1183,7 +1185,10 @@
AppendMenu(hMenu, MF_SEPARATOR, 0, "");
if (BuildGrowShrinkCtxMenu(hMenu, ih))
AppendMenu(hMenu, MF_SEPARATOR, 0, "");
+ if(BuildMiscCtxMenu(hMenu, ih))
+ AppendMenu(hMenu, MF_SEPARATOR, 0, "");
BuildRowInsDelCtxMenu(hMenu, ih);
+
}
ClientToScreen(&pt);
@@ -3154,6 +3159,7 @@
case kcChannelUnmuteAll: OnUnmuteAll(); return wParam;
case kcToggleChanMuteOnPatTransition: TogglePendingMute((m_dwCursor&0xFFFF)>>3); return wParam;
case kcUnmuteAllChnOnPatTransition: OnPendingUnmuteAllChnFromClick(); return wParam;
+ case kcTimeAtRow: OnShowTimeAtRow(); return wParam;
case kcSoloChnOnPatTransition: PendingSoloChn(GetCurrentChannel()); return wParam;
case kcTransposeUp: OnTransposeUp(); return wParam;
case kcTransposeDown: OnTransposeDown(); return wParam;
@@ -4442,6 +4448,16 @@
return true;
}
+bool CViewPattern::BuildMiscCtxMenu(HMENU hMenu, CInputHandler* ih)
+//-----------------------------------------------------------------
+{
+ if (CMainFrame::m_dwPatternSetup & PATTERN_OLDCTXMENUSTYLE) return false;
+
+ AppendMenu(hMenu, MF_STRING, ID_SHOWTIMEATROW, "Show row play time\t" + ih->GetKeyTextFromCommand(kcTimeAtRow));
+ return true;
+
+}
+
bool CViewPattern::BuildSelectionCtxMenu(HMENU hMenu, CInputHandler* ih)
//----------------------------------------------------------------------
{
@@ -4842,4 +4858,32 @@
}
+void CViewPattern::OnShowTimeAtRow()
+//----------------------------------
+{
+ CModDoc* pModDoc = GetDocument();
+ CSoundFile* pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : 0;
+ if(!pSndFile) return;
+ CString msg;
+ ORDERINDEX currentOrder = SendCtrlMessage(CTRLMSG_GETCURRENTORDER);
+ if(pSndFile->Order[currentOrder] == m_nPattern)
+ {
+ double t = pSndFile->GetPlaybackTimeAt(currentOrder, m_nRow);
+ if(t < 0)
+ msg.Format("Unable to determine the time. Possible cause: No order %d, row %d found from play sequence", currentOrder, m_nRow);
+ else
+ {
+ const uint32 minutes = static_cast<uint32>(t/60);
+ const float seconds = t - minutes*60;
+ msg.Format("Estimate for playback time at order %d(pattern %d), row %d: %d minute(s) %.2f seconds", currentOrder, m_nPattern, m_nRow, minutes, seconds);
+ }
+ }
+ else
+ msg.Format("Unable to determine the time: pattern at current order(=%d) does not correspond to pattern at pattern view(=pattern %d).", currentOrder, m_nPattern);
+
+ MessageBox(msg);
+}
+
+
+
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/View_pat.h 2007-04-13 22:43:39 UTC (rev 178)
@@ -291,6 +291,7 @@
afx_msg void OnClearSelectionFromMenu();
afx_msg void OnSelectInstrument(UINT nid);
afx_msg void OnRunScript();
+ afx_msg void OnShowTimeAtRow();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
@@ -305,6 +306,7 @@
bool BuildRecordCtxMenu(HMENU hMenu, UINT nChn, CModDoc* pModDoc);
bool BuildSoloMuteCtxMenu(HMENU hMenu, CInputHandler* ih, UINT nChn, CSoundFile* pSndFile);
bool BuildRowInsDelCtxMenu(HMENU hMenu, CInputHandler* ih);
+ bool BuildMiscCtxMenu(HMENU hMenu, CInputHandler* ih);
bool BuildSelectionCtxMenu(HMENU hMenu, CInputHandler* ih);
bool BuildGrowShrinkCtxMenu(HMENU hMenu, CInputHandler* ih);
bool BuildNoteInterpolationCtxMenu(HMENU hMenu, CInputHandler* ih, CSoundFile* pSndFile);
Modified: trunk/OpenMPT/mptrack/pattern.h
===================================================================
--- trunk/OpenMPT/mptrack/pattern.h 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/pattern.h 2007-04-13 22:43:39 UTC (rev 178)
@@ -8,8 +8,6 @@
class CPatternContainer;
-typedef size_t ROWINDEX;
-typedef size_t CHANNELINDEX;
//============
class CPattern
Modified: trunk/OpenMPT/mptrack/patternContainer.h
===================================================================
--- trunk/OpenMPT/mptrack/patternContainer.h 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/patternContainer.h 2007-04-13 22:43:39 UTC (rev 178)
@@ -18,7 +18,6 @@
//BEGIN: TYPEDEFS
public:
typedef vector<MODPATTERN> PATTERNVECTOR;
- typedef UINT PATTERNINDEX;
//END: TYPEDEFS
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/resource.h 2007-04-13 22:43:39 UTC (rev 178)
@@ -969,6 +969,7 @@
#define ID_MOVETUNING 36025
#define ID_COPYTUNING 36026
#define ID_REMOVETUNINGCOLLECTION 36027
+#define ID_SHOWTIMEATROW 36028
#define ID_SELECTINST 36100
#define ID_NETLINK_MPTFR 37001
#define ID_PLUG_RECORDAUTOMATION 37003
Modified: trunk/OpenMPT/mptrack/typedefs.h
===================================================================
--- trunk/OpenMPT/mptrack/typedefs.h 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/mptrack/typedefs.h 2007-04-13 22:43:39 UTC (rev 178)
@@ -1,6 +1,8 @@
#ifndef TYPEDEFS_H
#define TYPEDEFS_H
+#include <limits>
+
#ifdef WIN32
typedef __int8 int8;
typedef __int16 int16;
@@ -13,7 +15,18 @@
typedef size_t uint64;
typedef float float32;
+#endif //End WIN32 specific.
-#endif
+typedef uint32 ROWINDEX;
+typedef uint16 CHANNELINDEX;
+typedef uint16 ORDERINDEX;
+typedef uint16 PATTERNINDEX;
+typedef uint16 TEMPO;
+typedef uint16 SAMPLEINDEX;
+typedef uint16 INSTRUMENTINDEX;
+const ORDERINDEX ORDERINDEX_MAX = (std::numeric_limits<ORDERINDEX>::max)();
+const ROWINDEX ROWINDEX_MAX = (std::numeric_limits<ROWINDEX>::max)();
+
+
#endif
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2007-04-13 22:43:39 UTC (rev 178)
@@ -250,6 +250,7 @@
memcpy(&id,lpStream+streamPos,sizeof(DWORD));
if(id != 0x2e697470) return FALSE; // .itp
+ m_nType = MOD_TYPE_IT;
streamPos += sizeof(DWORD);
memcpy(&id,lpStream+streamPos,sizeof(DWORD));
@@ -264,9 +265,10 @@
streamPos += sizeof(DWORD);
// name string
- if (streamPos+len<=dwMemLength && len<=MAX_SAMPLES*32) {
- memcpy(&m_szNames[0],lpStream+streamPos,len);
+ if (streamPos+len<=dwMemLength && len<=sizeof(m_szNames[0])) {
+ memcpy(m_szNames[0],lpStream+streamPos,len);
streamPos += len;
+ m_szNames[0][sizeof(m_szNames[0])-1] = '\0';
}
// Song comments
@@ -654,7 +656,8 @@
}
// Leave
- m_nType = MOD_TYPE_IT;
+ //m_nType = MOD_TYPE_IT; Relabs.note: Moved to the beginning of loading(April 2007)
+
m_nMaxPeriod = 0xF000;
m_nMinPeriod = 8;
@@ -1215,6 +1218,7 @@
// -> CODE#0023
// -> DESC="IT project files (.itp)"
BOOL CSoundFile::SaveITProject(LPCSTR lpszFileName)
+//-------------------------------------------------
{
// Check song type
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2007-04-13 22:43:39 UTC (rev 178)
@@ -71,7 +71,14 @@
}
*/
-DWORD CSoundFile::GetLength(BOOL bAdjust, BOOL bTotal)
+double CSoundFile::GetLength(BOOL bAdjust, BOOL bTotal)
+//-------------------------------------------
+{
+ bool dummy = false;
+ return GetLength(dummy, bAdjust, bTotal);
+}
+
+double CSoundFile::GetLength(bool& targetReached, BOOL bAdjust, BOOL bTotal, ORDERINDEX endOrder, ROWINDEX endRow)
//----------------------------------------------------
{
// -> CODE#0022
@@ -109,6 +116,12 @@
UINT nSpeedCount = 0;
nRow = nNextRow;
nCurrentPattern = nNextPattern;
+ if(nCurrentPattern == endOrder && nRow == endRow)
+ {
+ targetReached = true;
+ goto EndMod;
+ }
+
// Check if pattern is valid
nPattern = Order[nCurrentPattern];
bool positionJumpOnThisRow=false;
@@ -365,6 +378,10 @@
}
}
}
+
+ return dwElapsedTime / 1000.0;
+
+ /*
// -> CODE#0022
// -> DESC="alternative BPM/Speed interpretation method"
// return (UINT)((dwElapsedTime+500.0) / 1000.0);
@@ -375,6 +392,7 @@
return (UINT)((dwElapsedTime + 500.0) / 1000.0);
}
// -! NEW_FEATURE#0022
+ */
}
@@ -442,6 +460,7 @@
}
if (psmp->uFlags & CHN_PANNING) pChn->nPan = psmp->nPan;
}
+
// Reset envelopes
if (bResetEnv)
{
@@ -2611,6 +2630,7 @@
//rewbs.volOffset: moved offset code to own method as it will be used in several places now
void CSoundFile::SampleOffset(UINT nChn, UINT param, bool bPorta)
+//---------------------------------------------------------------
{
MODCHANNEL *pChn = &Chn[nChn];
@@ -3340,3 +3360,4 @@
}
+
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2007-04-13 22:43:39 UTC (rev 178)
@@ -377,7 +377,12 @@
CTuningCollection CSoundFile::s_TuningsSharedLocal("Local Tunings");
-CSoundFile::CSoundFile() : m_TuningsTuneSpecific("Tune specific tunings"), PatternSize(*this), Patterns(*this), Order(*this), m_PlaybackEventer(*this)
+CSoundFile::CSoundFile() :
+ m_TuningsTuneSpecific("Tune specific tunings"),
+ PatternSize(*this), Patterns(*this),
+ Order(*this),
+ m_PlaybackEventer(*this),
+ m_pModSpecs(&IT_SPECS)
//----------------------
{
m_nType = MOD_TYPE_NONE;
@@ -690,6 +695,7 @@
if (m_nType)
{
+ SetModSpecsPointer();
return TRUE;
}
@@ -1531,37 +1537,37 @@
CMainFrame::GetMainFrame()->MessageBox(str , "MoveChannel(...)", MB_OK | MB_ICONINFORMATION);
return true;
}
- std::vector<UINT> newOrder;
- //First creating new order identical to current order...
- for(UINT i = 0; i<m_nChannels; i++)
- {
- newOrder.push_back(i);
+ std::vector<CHANNELINDEX> newOrder;
+ //First creating new order identical to current order...
+ for(UINT i = 0; i<m_nChannels; i++)
+ {
+ newOrder.push_back(i);
+ }
+ //...and then add the move channel effect.
+ if(chnFrom < chnTo)
+ {
+ CHANNELINDEX temp = newOrder[chnFrom];
+ for(UINT i = chnFrom; i<chnTo; i++)
+ {
+ newOrder[i] = newOrder[i+1];
+ }
+ newOrder[chnTo] = temp;
+ }
+ else //case chnFrom > chnTo(can't be equal, since it has been examined earlier.)
+ {
+ CHANNELINDEX temp = newOrder[chnFrom];
+ for(UINT i = chnFrom; i>=chnTo+1; i--)
+ {
+ newOrder[i] = newOrder[i-1];
+ }
+ newOrder[chnTo] = temp;
}
- //...and then add the move channel effect.
- if(chnFrom < chnTo)
- {
- UINT temp = newOrder[chnFrom];
- for(UINT i = chnFrom; i<chnTo; i++)
- {
- newOrder[i] = newOrder[i+1];
- }
- newOrder[chnTo] = temp;
- }
- else //case chnFrom > chnTo(can't be equal, since it has been examined earlier.)
- {
- UINT temp = newOrder[chnFrom];
- for(UINT i = chnFrom; i>=chnTo+1; i--)
- {
- newOrder[i] = newOrder[i-1];
- }
- newOrder[chnTo] = temp;
- }
- if(newOrder.size() != ReArrangeChannels(newOrder))
- {
- CMainFrame::GetMainFrame()->MessageBox("BUG: Channel number changed in MoveChannel()" , "", MB_OK | MB_ICONINFORMATION);
- }
- return false;
+ if(newOrder.size() != ReArrangeChannels(newOrder))
+ {
+ CMainFrame::GetMainFrame()->MessageBox("BUG: Channel number changed in MoveChannel()" , "", MB_OK | MB_ICONINFORMATION);
+ }
+ return false;
}
@@ -2825,74 +2831,38 @@
return string(szNoteNames[abs(note-1)%12]) + Stringify((note-1)/12);
}
-WORD CSoundFile::GetTempoMin() const {return 32;}
-WORD CSoundFile::GetTempoMax() const {return 512;}
-ROWINDEX CSoundFile::GetRowMax() const
-//------------------------------------
+void CSoundFile::SetModSpecsPointer()
+//-----------------------------------
{
- switch(m_nType)
+ switch(GetModType())
{
case MOD_TYPE_MPT:
- return MPTM_SPECS.patternRowsMax;
- case MOD_TYPE_MOD:
- return MOD_SPECS.patternRowsMax;
- case MOD_TYPE_XM:
- return XM_SPECS.patternRowsMax;
+ m_pModSpecs = &MPTM_SPECS;
+ break;
case MOD_TYPE_IT:
- return IT_SPECS.patternRowsMax;
- case MOD_TYPE_S3M:
- return S3M_SPECS.patternRowsMax;
- default:
- return MAX_PATTERN_ROWS;
- }
-}
-
-ROWINDEX CSoundFile::GetRowMin() const
-//------------------------------------
-{
- switch(m_nType)
- {
- case MOD_TYPE_MPT:
- return MPTM_SPECS.patternRowsMin;
- case MOD_TYPE_MOD:
- return MOD_SPECS.patternRowsMin;
+ m_pModSpecs = &IT_SPECS;
+ break;
case MOD_TYPE_XM:
- return XM_SPECS.patternRowsMin;
- case MOD_TYPE_IT:
- return IT_SPECS.patternRowsMin;
+ m_pModSpecs = &XM_SPECS;
+ break;
case MOD_TYPE_S3M:
- return S3M_SPECS.patternRowsMin;
+ m_pModSpecs = &S3M_SPECS;
+ break;
+ case MOD_TYPE_MOD:
default:
- return 2;
+ m_pModSpecs = &MOD_SPECS;
+ break;
}
}
-
-CHANNELINDEX CSoundFile::GetNumChannelMax() const
-//-----------------------------------
-{
- if(m_nType == MOD_TYPE_MPT) return MPTM_SPECS.channelsMax;
- if(m_nType == MOD_TYPE_IT) return max_chans_IT;
- if(m_nType == MOD_TYPE_XM) return max_chans_XM;
- if(m_nType == MOD_TYPE_MOD) return max_chans_MOD;
- if(m_nType == MOD_TYPE_S3M) return max_chans_S3M;
- return 4;
-}
-
-CHANNELINDEX CSoundFile::GetNumChannelMin() const
-//-----------------------------------
-{
- if(m_nType == MOD_TYPE_MPT) return MPTM_SPECS.channelsMin;
- else return 4;
-}
-
void CSoundFile::ChangeModTypeTo(const int& newType)
//---------------------------------------------------
{
const UINT oldInvalidIndex = Patterns.GetInvalidIndex();
const UINT oldIgnoreIndex = Patterns.GetIgnoreIndex();
m_nType = newType;
+ SetModSpecsPointer();
m_ModFlags.reset();
@@ -2900,6 +2870,27 @@
replace(Order.begin(), Order.end(), oldIgnoreIndex, Patterns.GetIgnoreIndex());
}
+bool CSoundFile::SetTitle(const char* titleCandidate, size_t strSize)
+//-------------------------------------------------------------------
+{
+ if(strcmp(m_szNames[0], titleCandidate))
+ {
+ memset(m_szNames[0], 0, sizeof(m_szNames[0]));
+ memcpy(m_szNames[0], titleCandidate, min(sizeof(m_szNames[0])-1, strSize));
+ return true;
+ }
+ return false;
+}
+
+double CSoundFile::GetPlaybackTimeAt(ORDERINDEX ord, ROWINDEX row)
+//----------------------------------------------------------------
+{
+ bool targetReached = false;
+ const double t = GetLength(targetReached, FALSE, TRUE, ord, row);
+ if(targetReached) return t;
+ else return -1; //Given position not found from play sequence.
+}
+
#ifndef TRADITIONAL_MODCOMMAND
void CSoundFile::OnSetEffect(MODCOMMAND& mc, EFFECT_ID eID)
//---------------------------------------------------------
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2007-04-13 22:43:39 UTC (rev 178)
@@ -767,8 +767,6 @@
#include "../mptrack/patternContainer.h"
#include "../mptrack/ordertopatterntable.h"
-typedef CPatternContainer::PATTERNINDEX PATTERNINDEX;
-
#include "../mptrack/playbackEventer.h"
@@ -789,31 +787,35 @@
const BYTE IT_STANDARD = 0;
+
//==============
class CSoundFile
//==============
{
public: //Typedefs
- typedef CPatternContainer::PATTERNINDEX PATTERNINDEX;
typedef UINT MODTYPE;
public: //Get details(TODO?: Move detail asking to a 'controller')
- WORD GetTempoMin() const;
- WORD GetTempoMax() const;
+ TEMPO GetTempoMin() const {return m_pModSpecs->tempoMin;}
+ TEMPO GetTempoMax() const {return m_pModSpecs->tempoMax;}
- ROWINDEX GetRowMax() const;
- ROWINDEX GetRowMin() const;
+ //Using special hack for OMPTs modifed ITs and XMs.
+ ROWINDEX GetRowMax() const {return (GetType() == MOD_TYPE_IT || GetType() == MOD_TYPE_XM) ? 1024 : min(MAX_PATTERN_ROWS, m_pModSpecs->patternRowsMax);}
- CHANNELINDEX GetNumChannelMax() const;
- CHANNELINDEX GetNumChannelMin() const;
+ ROWINDEX GetRowMin() const {return m_pModSpecs->patternRowsMin;}
+ CHANNELINDEX GetNumChannelMax() const {return min(MAX_BASECHANNELS, m_pModSpecs->channelsMax);}
+ CHANNELINDEX GetNumChannelMin() const {return m_pModSpecs->channelsMin;}
+ uint16 GetModNameLengthMax() {return (GetModType() == MOD_TYPE_MPT) ? 25 : m_pModSpecs->modNameLengthMax;}
- size_t GetModNameLengthMax() {return 25;}
+ //Return true if title was changed.
+ bool SetTitle(const char*, size_t strSize);
public: //Misc
void ChangeModTypeTo(const int& newType);
- //
-
+
MODTYPE GetModType() const {return m_nType;}
- //
+
+ //Return value in seconds.
+ double GetPlaybackTimeAt(ORDERINDEX, ROWINDEX);
#ifndef TRADITIONAL_MODCOMMAND
void OnSetEffect(MODCOMMAND& mc, EFFECT_ID);
@@ -853,11 +855,15 @@
void PortamentoMPT(MODCHANNEL*, int);
void PortamentoFineMPT(MODCHANNEL*, int);
+private: //Misc private methods.
+ void SetModSpecsPointer();
+
private: //'Controllers'
CPlaybackEventer m_PlaybackEventer;
private: //Misc data
bitset<8> m_ModFlags;
+ const CModSpecifications* m_pModSpecs;
@@ -910,7 +916,7 @@
MODCHANNELSETTINGS ChnSettings[MAX_BASECHANNELS]; // Channels settings
CPatternContainer Patterns; //Patterns
CPatternSizesMimic PatternSize; // Mimics old PatternsSize-array(is read-only).
- COrderToPatternTable Order; //Order[x] gives the pattern index at order x.
+ COrderToPatternTable Order; // Order[x] gives the index of the pattern located at order x.
MODINSTRUMENT Ins[MAX_SAMPLES]; // Instruments
INSTRUMENTHEADER *Headers[MAX_INSTRUMENTS]; // Instrument Headers
INSTRUMENTHEADER m_defaultInstrument; // Currently only used to get default values for extented properties.
@@ -974,8 +980,18 @@
CString GetPatternViewInstrumentName(UINT nInstr, bool returnEmptyInsteadOfNoName = false) const;
UINT GetMusicSpeed() const { return m_nMusicSpeed; }
UINT GetMusicTempo() const { return m_nMusicTempo; }
- DWORD GetLength(BOOL bAdjust, BOOL bTotal=FALSE);
- DWORD GetSongTime() { return GetLength(FALSE, TRUE); }
+
+ //Get modlength in various cases: total length, length to
+ //specific order&row etc. Return value is in seconds.
+ //NOTE: Also seems to be used for some 'simulate playback'-purposes (Relabs, April 2007)
+ double GetLength(BOOL bAdjust, BOOL bTotal=FALSE);
+private:
+ double GetLength(bool& targetReached, BOOL bAdjust, BOOL bTotal=FALSE, ORDERINDEX ord = ORDERINDEX_MAX, ROWINDEX row = ROWINDEX_MAX);
+
+public:
+ //Returns song length in seconds.
+ DWORD GetSongTime() { return static_cast<DWORD>((m_nTempoMode == tempo_mode_alternative) ? GetLength(FALSE, TRUE)+1.0 : GetLength(FALSE, TRUE)+0.5); }
+
void SetRepeatCount(int n) { m_nRepeatCount = n; }
int GetRepeatCount() const { return m_nRepeatCount; }
BOOL IsPaused() const { return (m_dwSongFlags & SONG_PAUSED) ? TRUE : FALSE; }
@@ -992,7 +1008,6 @@
//channel settings. Flag can be used to tell whether to completely
//reset channels, not only a few settings(for maintaining old behavior).
void ResetChannelSettings(CHANNELINDEX chn, BYTE resetStyle);
-
//For all channels.
void ResetChannelSettings(BYTE resetStyle);
Modified: trunk/OpenMPT/soundlib/mod_specifications.h
===================================================================
--- trunk/OpenMPT/soundlib/mod_specifications.h 2007-04-01 00:28:16 UTC (rev 177)
+++ trunk/OpenMPT/soundlib/mod_specifications.h 2007-04-13 22:43:39 UTC (rev 178)
@@ -7,20 +7,20 @@
{
//NOTE: If changing order, update all initializations below.
char fileExtension[10];
- UINT patternsMax;
- UINT ordersMax;
- UINT channelsMin;
- UINT channelsMax;
+ PATTERNINDEX patternsMax;
+ ORDERINDEX ordersMax;
+ CHANNELINDEX channelsMin;
+ CHANNELINDEX channelsMax;
//NOTE: The two above refer to the user editable pattern channels,
//not to the internal sound channels. Maybe there should be a separate
//setting for those(comment by: Relabs, January 2007).
- UINT tempoMin;
- UINT tempoMax;
- UINT patternRowsMin;
- UINT patternRowsMax;
- UINT modNameLengthMax; //Meaning 'usable letters', possible null character is not included.
- UINT samplesMax;
- UINT instrumentsMax;
+ TEMPO tempoMin;
+ TEMPO tempoMax;
+ ROWINDEX patternRowsMin;
+ ROWINDEX patternRowsMax;
+ uint16 modNameLengthMax; //Meaning 'usable letters', possible null character is not included.
+ SAMPLEINDEX samplesMax;
+ INSTRUMENTINDEX instrumentsMax;
};
enum {
@@ -48,7 +48,7 @@
256, //Channel max
32, //Min tempo
512, //Max tempo
- 2, //Min pattern rows
+ 1, //Min pattern rows
1024, //Max pattern rows
256, //Max mod name length
4000, //SamplesMax
@@ -70,7 +70,7 @@
256, //Max tempo
64, //Min pattern rows
64, //Max pattern rows
- 25, //Max mod name length
+ 20, //Max mod name length
31, //SamplesMax
0, //instrumentMax
};
@@ -87,10 +87,10 @@
32, //Min tempo
256, //Max tempo
4, //Min pattern rows
- 256, //Max pattern rows
- 25, //Max mod name length
+ 256, //Max pattern rows
+ 20, //Max mod name length
31, //SamplesMax
- 256, //instrumentMax
+ 256, //instrumentMax
};
@@ -106,7 +106,7 @@
256, //Max tempo
64, //Min pattern rows
64, //Max pattern rows
- 25, //Max mod name length
+ 27, //Max mod name length
31, //SamplesMax
0, //instrumentMax
};
@@ -125,7 +125,7 @@
256, //Max pattern rows
25, //Max mod name length(in ittech.txt: "0000: \xB3'I'\xB3'M'\xB3'P'\xB3'M'\xB3 Song Name, max 26 characters, includes NULL \xB3")
256, //SamplesMax
- 256, //instrumentMax
+ 256, //instrumentMax
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2007-04-01 00:28:21
|
Revision: 177
http://svn.sourceforge.net/modplug/?rev=177&view=rev
Author: relabsoluness
Date: 2007-03-31 17:28:16 -0700 (Sat, 31 Mar 2007)
Log Message:
-----------
. v1.17.02.46 (Still in progress, no binaries)
<Relabs> . No longer possible to enter a tunename which is longer than the maximum length that can be stored to an IT-file(yet to be fixed for other formats).
<Relabs> . When opening instruments, load dialog didn't remember its previous path.
<Relabs> / Changed the way channels are reset when jumping between patterns in orderlist.
<Relabs> / Added version number to the mainframe title.
<Relabs> ./ Changed the way panning is treated(sndmix.cpp, lines around 1620) since I think for example that the behavior of panbrello had changed for RC2 plugin levels in rev. 174. Please correct if it's wrong now.
<Relabs> / Serialization related tweaking(tuning related). MPTm/tuning files created with this version (likely) won't open in the tuning-branch('RC3') version.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_gen.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_seq.cpp
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/Node.h
trunk/OpenMPT/mptrack/Stdafx.h
trunk/OpenMPT/mptrack/TuningDialog.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/misc_util.cpp
trunk/OpenMPT/mptrack/misc_util.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/serialization_utils.cpp
trunk/OpenMPT/mptrack/serialization_utils.h
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
trunk/OpenMPT/soundlib/mod_specifications.h
trunk/OpenMPT/soundlib/tuning.cpp
trunk/OpenMPT/soundlib/tuningCollection.cpp
trunk/OpenMPT/soundlib/tuning_template.h
trunk/OpenMPT/soundlib/tuningcollection.h
Added Paths:
-----------
trunk/OpenMPT/mptrack/typedefs.h
Modified: trunk/OpenMPT/mptrack/Ctrl_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -80,7 +80,11 @@
{
CModControlDlg::OnInitDialog();
// Song Title
- m_EditTitle.SetLimitText(31);
+ if(m_pSndFile)
+ m_EditTitle.SetLimitText(m_pSndFile->GetModNameLengthMax());
+ else
+ m_EditTitle.SetLimitText(31);
+
// -> CODE#0016
// -> DESC="default tempo update"
// m_SpinTempo.SetRange(32, 255); // 255 bpm max
@@ -98,7 +102,6 @@
m_SliderSamplePreAmp.SetRange(0, MAX_SLIDER_SAMPLE_VOL);
-
// -! BEHAVIOUR_CHANGE#0016
m_ComboResampling.AddString("None");
m_ComboResampling.AddString("Linear");
@@ -299,14 +302,14 @@
void CCtrlGeneral::OnTitleChanged()
//---------------------------------
{
- CHAR s[80];
+ CHAR s[35];
if ((!m_pSndFile) || (!m_EditTitle.m_hWnd) || (!m_EditTitle.GetModify())) return;
memset(s, 0, sizeof(s));
m_EditTitle.GetWindowText(s, sizeof(s));
- s[31] = 0;
+ s[25] = 0;
if (strcmp(m_pSndFile->m_szNames[0], s))
{
- memcpy(m_pSndFile->m_szNames[0], s, 32);
+ memcpy(m_pSndFile->m_szNames[0], s, 26);
if (m_pModDoc)
{
m_EditTitle.SetModify(FALSE);
@@ -723,5 +726,3 @@
SelectObject(hdc, oldpen);
m_nDisplayedVu = m_nVuMeter;
}
-
-
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -1262,9 +1262,10 @@
if (penv)
{
CHAR szPath[_MAX_PATH], szNewPath[_MAX_PATH];
- _splitpath(lpszFileName, szPath, szNewPath, szName, szExt);
+ _splitpath(lpszFileName, szNewPath, szPath, szName, szExt);
strcat(szNewPath, szPath);
strcpy(CMainFrame::m_szCurInsDir, szNewPath);
+
if (!penv->name[0])
{
szName[31] = 0;
Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -207,6 +207,7 @@
pSndFile->m_nCurrentPattern = pSndFile->m_nNextPattern = m_nScrollPos;
pMainFrm->ResetNotificationBuffer(); //rewbs.toCheck
pSndFile->m_nNextRow = 0;
+ pSndFile->ResetChannelSettings(CHNRESET_BASIC);
END_CRITICAL();
} else
if (m_pParent->GetFollowSong())
@@ -216,6 +217,8 @@
pSndFile->m_nCurrentPattern = m_nScrollPos;
pSndFile->SetCurrentOrder(m_nScrollPos);
pSndFile->m_dwSongFlags |= dwPaused;
+ pSndFile->ResetChannelSettings(CHNRESET_BASIC);
+
//if (!(dwPaused & SONG_PATTERNLOOP)) pSndFile->GetLength(TRUE);
//Relabs.note: Commented above line for it seems to cause
//significant slowdown when changing patterns without
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -113,8 +113,8 @@
END_MESSAGE_MAP()
// Static
-static gdwLastLowLatencyTime = 0;
-static gdwLastMixActiveTime = 0;
+static int gdwLastLowLatencyTime = 0;
+static int gdwLastMixActiveTime = 0;
static DWORD gsdwTotalSamples = 0;
static DWORD gdwPlayLatency = 0;
@@ -443,6 +443,7 @@
}
void CMainFrame::LoadRegistrySettings()
+//-------------------------------------
{
HKEY key;
@@ -600,6 +601,16 @@
{
CHAR s[256];
+ //Adding version number to the frame title
+ CString title = GetTitle();
+ #ifdef DEBUG
+ title += CString(" DEBUG");
+ #endif
+ title += CString(" ") + GetFullVersionString();
+ SetTitle(title);
+ OnUpdateFrameTitle(false);
+
+
// Load Chords
theApp.LoadChords(Chords);
// Check for valid sound device
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -1042,6 +1042,7 @@
}
BOOL CModDoc::NoFxChannel(UINT nChn, BOOL bNoFx, BOOL updateMix)
+//--------------------------------------------------------------
{
if (nChn >= m_SndFile.m_nChannels) return FALSE;
if (m_SndFile.m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) SetModified();
@@ -2791,6 +2792,7 @@
void CModDoc::OnPatternRestart()
+//------------------------------
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
CChildFrame *pChildFrm = (CChildFrame *) GetChildFrame();
@@ -2811,6 +2813,12 @@
CModDoc *pModPlaying = pMainFrm->GetModPlaying();
BEGIN_CRITICAL();
+
+ m_SndFile.SetCurrentPos(0);
+ //Relabs.note: Dirty hack to try to make replay pattern to be
+ //more like 'play song from start' - a little clean up for
+ //these playback calls would be nice (March 2007).
+
// Cut instruments/samples
for (UINT i=0; i<MAX_CHANNELS; i++)
{
@@ -2842,6 +2850,7 @@
}
void CModDoc::OnPatternPlay()
+//---------------------------
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
CChildFrame *pChildFrm = (CChildFrame *) GetChildFrame();
@@ -2890,6 +2899,7 @@
}
void CModDoc::OnPatternPlayNoLoop()
+//---------------------------------
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
CChildFrame *pChildFrm = (CChildFrame *) GetChildFrame();
@@ -3115,4 +3125,4 @@
if (bShowLog) ShowLog("Conversion Status", CMainFrame::GetMainFrame());
SetModified();
}
-}
\ No newline at end of file
+}
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -520,10 +520,8 @@
{
if ((m[i].note) || (m[i].instr) || (m[i].volcmd) || (m[i].command)) goto NotEmpty;
}
- BEGIN_CRITICAL();
m_SndFile.Patterns.Remove(ipat);
nPatRemoved++;
- END_CRITICAL();
NotEmpty:
;
}
@@ -2054,3 +2052,4 @@
return nPattern;
}
+
Modified: trunk/OpenMPT/mptrack/Node.h
===================================================================
--- trunk/OpenMPT/mptrack/Node.h 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/Node.h 2007-04-01 00:28:16 UTC (rev 177)
@@ -20,7 +20,7 @@
virtual CString GetLabel() = 0;
virtual HPEN GetBorderPen() = 0;
- ConnectInput(int input, CNode sourceNode, int sourceNodeOutput);
+ int ConnectInput(int input, CNode sourceNode, int sourceNodeOutput);
protected:
int x,y;
Modified: trunk/OpenMPT/mptrack/Stdafx.h
===================================================================
--- trunk/OpenMPT/mptrack/Stdafx.h 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/Stdafx.h 2007-04-01 00:28:16 UTC (rev 177)
@@ -69,6 +69,8 @@
void Log(LPCSTR format,...);
+#include "typedefs.h"
+
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp
===================================================================
--- trunk/OpenMPT/mptrack/TuningDialog.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/TuningDialog.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -1249,6 +1249,7 @@
}
else
{
+ MessageBox("Saving succesful.");
m_ModifiedTCs[m_pActiveTuningCollection] = false;
}
}
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -3472,6 +3472,8 @@
}
}
+
+#ifdef TRADITIONAL_MODCOMMAND
void CViewPattern::TempEnterFX(int c)
//-----------------------------------
{
@@ -3522,7 +3524,53 @@
}
} // end if mainframe & moddoc exist
}
+#else
+void CViewPattern::TempEnterFX(int e /*EFFECT_ID eID*/)
+//-----------------------------------
+{
+ CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
+ CModDoc *pModDoc = GetDocument();
+ CSoundFile *pSndFile = (pModDoc) ? pModDoc->GetSoundFile() : NULL;
+ if(!pSndFile || !pMainFrm)
+ return;
+
+ EFFECT_ID eID = e;
+
+ const ROWINDEX r = m_nRow;
+ const CHANNELINDEX c = GetChanFromCursor(m_dwCursor);
+ const MODCOMMAND *p = pSndFile->Patterns[m_nPattern].GetpModCommand(r, c);
+ MODCOMMAND oldcmd = *p; // This is the command we are about to overwrite
+
+ PrepareUndo(m_dwBeginSel, m_dwEndSel);
+
+ //Checking whether to use the param of previous effect.
+ if (eID)
+ {
+ if ((eID == m_cmdOld.GetEffect()) && (!p->GetEffectParam()) && (!p->GetEffect()))
+ pSndFile->Patterns[m_nPattern].SetModCommandEffectParam(r, c, m_cmdOld.GetEffectParam());
+ else
+ m_cmdOld.SetEffectParam(0);
+
+ m_cmdOld.SetEffectByID(eID);
+ }
+ pSndFile->Patterns[m_nPattern].SetModCommandEffect(r, c, eID);
+
+ if (IsEditingEnabled_bmsg())
+ {
+ DWORD sel = (m_nRow << 16) | m_dwCursor;
+ SetCurSel(sel, sel);
+ sel &= ~7;
+ if(oldcmd != *p)
+ {
+ pModDoc->SetModified();
+ InvalidateArea(sel, sel+5);
+ UpdateIndicator();
+ }
+ }
+}
+#endif
+
void CViewPattern::TempEnterFXparam(int v)
//----------------------------------------
{
@@ -4793,3 +4841,5 @@
return false;
}
+
+
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -785,8 +785,8 @@
CComboBox *combo;
CDialog::OnInitDialog();
combo = (CComboBox *)GetDlgItem(IDC_COMBO1);
- CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
- if ((m_pModDoc) && (m_nPattern < pSndFile->Patterns.Size()) && (combo))
+ CSoundFile *pSndFile = (m_pModDoc) ? m_pModDoc->GetSoundFile() : NULL;
+ if ((pSndFile) && (m_nPattern < pSndFile->Patterns.Size()) && (combo))
{
CHAR s[256];
UINT nrows = pSndFile->PatternSize[m_nPattern];
@@ -794,17 +794,14 @@
// -> CODE#0008
// -> DESC="#define to set pattern size"
// for (UINT irow=32; irow<=256; irow++)
- for (UINT irow=32; irow<=MAX_PATTERN_ROWS; irow++)
+// for (UINT irow=32; irow<=MAX_PATTERN_ROWS; irow++)
+ for (UINT irow=pSndFile->GetRowMin(); irow<=pSndFile->GetRowMax(); irow++)
// -! BEHAVIOUR_CHANGE#0008
{
wsprintf(s, "%d", irow);
combo->AddString(s);
}
- if (nrows < 32)
- {
- wsprintf(s, "%d", nrows);
- combo->SetWindowText(s);
- } else combo->SetCurSel(nrows-32);
+ combo->SetCurSel(nrows-pSndFile->GetRowMin());
wsprintf(s, "Pattern #%d:\x0d\x0a %d rows (%dK)",
m_nPattern,
pSndFile->PatternSize[m_nPattern],
@@ -1272,36 +1269,75 @@
BEGIN_MESSAGE_MAP(CPageEditEffect, CPageEditCommand)
ON_WM_HSCROLL()
ON_CBN_SELCHANGE(IDC_COMBO1, OnCommandChanged)
+ ON_CBN_SELCHANGE(IDC_COMBO2, OnCommand2Changed)
END_MESSAGE_MAP()
void CPageEditEffect::UpdateDialog()
//----------------------------------
{
- CHAR s[128];
- CComboBox *combo;
- CSoundFile *pSndFile;
-
- if ((!m_pModDoc) || (!m_bInitialized)) return;
- pSndFile = m_pModDoc->GetSoundFile();
- if ((combo = (CComboBox *)GetDlgItem(IDC_COMBO1)) != NULL)
- {
- UINT numfx = m_pModDoc->GetNumEffects();
- UINT fxndx = m_pModDoc->GetIndexFromEffect(m_nCommand, m_nParam);
- combo->ResetContent();
- combo->SetItemData(combo->AddString(" None"), (DWORD)-1);
- if (!m_nCommand) combo->SetCurSel(0);
- for (UINT i=0; i<numfx; i++)
+ #ifdef TRADITIONAL_MODCOMMAND
+ CHAR s[128];
+ CComboBox *combo;
+ CSoundFile *pSndFile;
+
+ if ((!m_pModDoc) || (!m_bInitialized)) return;
+ pSndFile = m_pModDoc->GetSoundFile();
+ if ((combo = (CComboBox *)GetDlgItem(IDC_COMBO1)) != NULL)
{
- if (m_pModDoc->GetEffectInfo(i, s, TRUE))
+ UINT numfx = m_pModDoc->GetNumEffects();
+ UINT fxndx = m_pModDoc->GetIndexFromEffect(m_nCommand, m_nParam);
+ combo->ResetContent();
+ combo->SetItemData(combo->AddString(" None"), (DWORD)-1);
+ if (!m_nCommand) combo->SetCurSel(0);
+ for (UINT i=0; i<numfx; i++)
{
- int k = combo->AddString(s);
- combo->SetItemData(k, i);
- if (i == fxndx) combo->SetCurSel(k);
+ if (m_pModDoc->GetEffectInfo(i, s, TRUE))
+ {
+ int k = combo->AddString(s);
+ combo->SetItemData(k, i);
+ if (i == fxndx) combo->SetCurSel(k);
+ }
}
}
- }
- UpdateRange(FALSE);
+ UpdateRange(FALSE);
+ #else //Modcommand testing
+ CHAR s[128];
+ CComboBox *combo = (CComboBox *)GetDlgItem(IDC_COMBO1);
+ CComboBox *combo2 = (CComboBox *)GetDlgItem(IDC_COMBO2);
+ CSoundFile *pSndFile;
+
+ if ((!m_pModDoc) || (!m_bInitialized)) return;
+ pSndFile = m_pModDoc->GetSoundFile();
+ if (combo && combo2)
+ {
+ combo->ResetContent();
+ combo2->ResetContent();
+ combo->SetItemData(combo->AddString(" None"), (DWORD)-1);
+ combo2->SetItemData(combo2->AddString(" None"), (DWORD)-1);
+
+ UINT numfx = m_pModDoc->GetNumEffects();
+ const UINT fxndx1 = m_pModDoc->GetIndexFromEffect(m_pModcommand->GetEffect(0), m_pModcommand->GetEffectParam(0));
+ const UINT fxndx2 = m_pModDoc->GetIndexFromEffect(m_pModcommand->GetEffect(1), m_pModcommand->GetEffectParam(1));
+
+ if(!m_pModcommand->GetEffect(0)) combo->SetCurSel(0);
+ if(!m_pModcommand->GetEffect(1)) combo2->SetCurSel(0);
+
+ for (UINT i=0; i<numfx; i++)
+ {
+ if (m_pModDoc->GetEffectInfo(i, s, TRUE))
+ {
+ int k = combo->AddString(s);
+ combo->SetItemData(k, i);
+ int k2 = combo2->AddString(s);
+ combo2->SetItemData(k2, i);
+ if (i == fxndx1) combo->SetCurSel(k);
+ if (i == fxndx2) combo2->SetCurSel(k2);
+ }
+ }
+ }
+ UpdateRange(FALSE);
+ #endif
}
Modified: trunk/OpenMPT/mptrack/misc_util.cpp
===================================================================
--- trunk/OpenMPT/mptrack/misc_util.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/misc_util.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -1,44 +1,2 @@
#include "stdafx.h"
#include "misc_util.h"
-
-
-bool StringToBinaryStream(ostream& outStream, const string& str)
-//----------------------------------------------------
-{
- if(!outStream.good()) return true;
- size_t size = str.size();
- outStream.write(reinterpret_cast<char*>(&size), sizeof(size));
- outStream << str;
- if(outStream.good())
- return false;
- else
- return true;
-
-}
-
-bool StringFromBinaryStream(istream& inStrm, string& str, const size_t maxSize)
-//---------------------------------------------------------
-{
- if(!inStrm.good()) return true;
- size_t strSize;
- inStrm.read(reinterpret_cast<char*>(&strSize), sizeof(strSize));
-
- if(strSize > maxSize)
- return true;
-
- str.resize(strSize);
-
- //Inefficiently reading to temporary buffer first and
- //then setting that to the string.
- char* buffer = new char[strSize+1];
- inStrm.read(buffer, strSize);
- buffer[strSize] = '\0';
- str = buffer;
- delete[] buffer; buffer = 0;
-
-
- if(inStrm.good())
- return false;
- else
- return true;
-}
Modified: trunk/OpenMPT/mptrack/misc_util.h
===================================================================
--- trunk/OpenMPT/mptrack/misc_util.h 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/misc_util.h 2007-04-01 00:28:16 UTC (rev 177)
@@ -4,21 +4,20 @@
#include <vector>
#include <sstream>
#include <string>
+#include <limits>
using namespace std;
-const UINT STRINGMAXSIZE = 1000;
-const UINT VECTORMAXSIZE = 1000;
-//Default sizelimits to string/vector load methods.
-//Size limits are there to prevent corrupted streams from
-//causing e.g. program to try to load of vector of size 2 000 000 000.
+#include "typedefs.h"
-template<class T>
+template<class T, class SIZETYPE>
bool VectorToBinaryStream(ostream& outStrm, const vector<T>& v)
//------------------------------------------------------------
{
if(!outStrm.good()) return true;
- size_t s = v.size();
+ if((std::numeric_limits<SIZETYPE>::max)() < v.size()) return true;
+
+ SIZETYPE s = static_cast<SIZETYPE>(v.size());
outStrm.write(reinterpret_cast<const char*>(&s), sizeof(s));
vector<T>::const_iterator iter = v.begin();
for(iter; iter != v.end(); iter++)
@@ -30,19 +29,20 @@
return true;
}
-template<class T>
-bool VectorFromBinaryStream(istream& inStrm, vector<T>& v, const size_t maxSize = VECTORMAXSIZE)
+
+template<class T, class SIZETYPE>
+bool VectorFromBinaryStream(istream& inStrm, vector<T>& v, const SIZETYPE maxSize = (std::numeric_limits<SIZETYPE>::max)())
//---------------------------------------------------------
{
if(!inStrm.good()) return true;
- size_t size;
+
+ SIZETYPE size;
inStrm.read(reinterpret_cast<char*>(&size), sizeof(size));
if(size > maxSize)
return true;
v.resize(size);
- ASSERT(v.size() == size);
for(size_t i = 0; i<size; i++)
{
inStrm.read(reinterpret_cast<char*>(&v[i]), sizeof(T));
@@ -53,10 +53,49 @@
return true;
}
-bool StringToBinaryStream(ostream& outStream, const string& str);
-bool StringFromBinaryStream(istream& inStrm, string& str, const size_t maxSize = STRINGMAXSIZE);
+template<class SIZETYPE>
+bool StringToBinaryStream(ostream& outStream, const string& str)
+//--------------------------------------------------------------
+{
+ if(!outStream.good()) return true;
+ if((std::numeric_limits<SIZETYPE>::max)() < str.size()) return true;
+ SIZETYPE size = static_cast<SIZETYPE>(str.size());
+ outStream.write(reinterpret_cast<char*>(&size), sizeof(size));
+ outStream << str;
+ if(outStream.good())
+ return false;
+ else
+ return true;
+}
+
+
+template<class SIZETYPE>
+bool StringFromBinaryStream(istream& inStrm, string& str, const SIZETYPE maxSize = (std::numeric_limits<SIZETYPE>::max)())
+//--------------------------------------------------------------------------------------------
+{
+ if(!inStrm.good()) return true;
+
+ SIZETYPE strSize;
+ inStrm.read(reinterpret_cast<char*>(&strSize), sizeof(strSize));
+
+ if(strSize > maxSize)
+ return true;
+
+ str.resize(strSize);
+
+ //Copying string from stream one character at a time.
+ for(SIZETYPE i = 0; i<strSize; i++)
+ inStrm.read(&str[i], 1);
+
+ if(inStrm.good())
+ return false;
+ else
+ return true;
+}
+
+
template<class T>
inline string Stringify(const T& x)
//--------------------------
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2007-04-01 00:28:16 UTC (rev 177)
@@ -1269,6 +1269,12 @@
CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,104,15,114,12
LTEXT "Effect Type:",IDC_STATIC,0,4,55,8
+ LTEXT "Value:",IDC_TEXT2,183,1,35,8,NOT WS_VISIBLE
+ COMBOBOX IDC_COMBO2,78,0,16,83,CBS_DROPDOWNLIST | CBS_SORT | NOT
+ WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_SLIDER2,"msctls_trackbar32",TBS_BOTH |
+ TBS_NOTICKS | NOT WS_VISIBLE | WS_TABSTOP,134,0,43,12
+ LTEXT "Effect Type:",IDC_STATIC,54,1,19,8,NOT WS_VISIBLE
END
IDD_SAMPLE_AMPLIFY DIALOGEX 0, 0, 175, 66
Modified: trunk/OpenMPT/mptrack/serialization_utils.cpp
===================================================================
--- trunk/OpenMPT/mptrack/serialization_utils.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/serialization_utils.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -1,37 +1,7 @@
#include "stdafx.h"
#include "serialization_utils.h"
-#include "misc_util.h"
-bool ReadTuningMap(istream& fin, map<WORD, string>& shortToTNameMap, const size_t maxNum)
-//----------------------------------------
-{
- typedef map<WORD, string> MAP;
- typedef MAP::iterator MAP_ITER;
- size_t numTuning = 0;
- fin.read(reinterpret_cast<char*>(&numTuning), sizeof(numTuning));
- if(numTuning > maxNum)
- {
- fin.setstate(ios::failbit);
- return true;
- }
- for(size_t i = 0; i<numTuning; i++)
- {
- string temp;
- unsigned short ui;
- if(StringFromBinaryStream(fin, temp))
- {
- fin.setstate(ios::failbit);
- return true;
- }
- fin.read(reinterpret_cast<char*>(&ui), sizeof(ui));
- shortToTNameMap[ui] = temp;
- }
- if(fin.good())
- return false;
- else
- return true;
-}
Modified: trunk/OpenMPT/mptrack/serialization_utils.h
===================================================================
--- trunk/OpenMPT/mptrack/serialization_utils.h 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/mptrack/serialization_utils.h 2007-04-01 00:28:16 UTC (rev 177)
@@ -5,13 +5,49 @@
#include <string>
#include <map>
#include <fstream>
+#include "misc_util.h"
+
+
using namespace std;
const size_t MAX_TUNING_NUM_DEFAULT = 1000;
-bool ReadTuningMap(istream&, map<WORD, string>&, const size_t maxNum = MAX_TUNING_NUM_DEFAULT);
+template<class TUNNUMTYPE, class STRSIZETYPE>
+bool ReadTuningMap(istream& fin, map<WORD, string>& shortToTNameMap, const size_t maxNum = MAX_TUNING_NUM_DEFAULT)
+//----------------------------------------------------------------------------------------
+{
+ //In first versions: SIZETYPE1 == SIZETYPE2 == size_t == uint64.
+ typedef map<WORD, string> MAP;
+ typedef MAP::iterator MAP_ITER;
+ TUNNUMTYPE numTuning = 0;
+ fin.read(reinterpret_cast<char*>(&numTuning), sizeof(numTuning));
+ if(numTuning > maxNum)
+ {
+ fin.setstate(ios::failbit);
+ return true;
+ }
+ for(size_t i = 0; i<numTuning; i++)
+ {
+ string temp;
+ uint16 ui;
+ if(StringFromBinaryStream<STRSIZETYPE>(fin, temp))
+ {
+ fin.setstate(ios::failbit);
+ return true;
+ }
+
+ fin.read(reinterpret_cast<char*>(&ui), sizeof(ui));
+ shortToTNameMap[ui] = temp;
+ }
+ if(fin.good())
+ return false;
+ else
+ return true;
+}
+
+
enum //Serialization Message
{
SM_UNKNOWN = 0,
@@ -19,7 +55,7 @@
};
//==============================================
-class CCharStreamBufFrom : public std::streambuf
+class CCharBufferStreamIn : public std::streambuf
//==============================================
{
private:
@@ -29,7 +65,7 @@
return rv;
}
public:
- CCharStreamBufFrom() {}
+ CCharBufferStreamIn() {}
protected:
streambuf* setbuf(char_type* buffer, std::streamsize count)
Added: trunk/OpenMPT/mptrack/typedefs.h
===================================================================
--- trunk/OpenMPT/mptrack/typedefs.h (rev 0)
+++ trunk/OpenMPT/mptrack/typedefs.h 2007-04-01 00:28:16 UTC (rev 177)
@@ -0,0 +1,19 @@
+#ifndef TYPEDEFS_H
+#define TYPEDEFS_H
+
+#ifdef WIN32
+ typedef __int8 int8;
+ typedef __int16 int16;
+ typedef __int32 int32;
+ typedef __int64 int64;
+
+ typedef unsigned __int8 uint8;
+ typedef unsigned __int16 uint16;
+ typedef unsigned __int32 uint32;
+ typedef size_t uint64;
+
+ typedef float float32;
+
+#endif
+
+#endif
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -3252,12 +3252,13 @@
while ((header.patnum > 0) && (!Patterns[header.patnum-1])) header.patnum--;
//VERSION
- //header.cwtv = 0x888; // We don't use these version info fields any more.
- header.cwtv = 0x88B; // But now they are in use again :)
+ header.cwtv = 0x88C; // Used in OMPT-hack versioning.
header.cmwt = 0x888; // Might come up as "Impulse Tracker 8" file in XMPlay. :)
/*
Version history:
+ 0x88B -> 0x88C: Changed type in which tuning number is printed
+ to file: size_t -> uint16.
0x88A -> 0x88B: Changed order-to-pattern-index table type from BYTE-array to vector<UINT>.
*/
@@ -3836,7 +3837,7 @@
//...and write the map with tuning names replacing
//the addresses.
- const size_t tuningMapSize = tNameToShort_Map.size();
+ const uint16 tuningMapSize = tNameToShort_Map.size();
fout.write(reinterpret_cast<const char*>(&tuningMapSize), sizeof(tuningMapSize));
if(tuningMapSize == 0)
{
@@ -3847,9 +3848,9 @@
for(TNTS_MAP_ITER iter = tNameToShort_Map.begin(); iter != tNameToShort_Map.end(); iter++)
{
if(iter->first)
- StringToBinaryStream(fout, iter->first->GetName());
+ StringToBinaryStream<uint8>(fout, iter->first->GetName());
else //Case: Using original IT tuning.
- StringToBinaryStream(fout, "->MPT_ORIGINAL_IT<-");
+ StringToBinaryStream<uint8>(fout, "->MPT_ORIGINAL_IT<-");
fout.write(reinterpret_cast<const char*>(&(iter->second)), sizeof(iter->second));
}
@@ -4469,7 +4470,9 @@
//START - mpt specific:
//Using member cwtv on pifh as the version number.
- if(pifh->cwtv > 0x889)
+ const uint16 version = pifh->cwtv;
+ try{
+ if(version > 0x889)
{
const char* const cpcMPTStart = reinterpret_cast<const char*>(lpStream + mptStartPos);
@@ -4483,21 +4486,23 @@
//std::streambuf which can be used in the istream
//methods. So this was new to me, and checking this
//might be a good idea.
- CCharStreamBufFrom cbs;
+ CCharBufferStreamIn cbs;
cbs.pubsetbuf((char*)cpcMPTStart, dwMemLength-mptStartPos);
istream fin(&cbs);
if(m_TuningsTuneSpecific.UnSerializeBinary(fin))
{
- ::MessageBox(NULL, "Error occured - loading failed while trying to load tune specific tunings.", 0, MB_OK);
- return FALSE;
+ throw(exception("Error occured - loading failed while trying to load tune specific tunings."));
}
//2. Reading tuning id <-> tuning name map.
typedef map<WORD, string> MAP;
typedef MAP::iterator MAP_ITER;
MAP shortToTNameMap;
- ReadTuningMap(fin, shortToTNameMap);
+ if(version < 0x88C)
+ ReadTuningMap<uint64, uint64>(fin, shortToTNameMap);
+ else
+ ReadTuningMap<uint16, uint8>(fin, shortToTNameMap);
//Read & set tunings for instruments
list<string> notFoundTunings;
@@ -4556,6 +4561,12 @@
//End read&set instrument tunings
} //version condition(MPT)
+ } //try block ends
+ catch(exception& e)
+ {
+ ::MessageBox(0, e.what(), "", MB_ICONERROR);
+ return TRUE; //Return value to be revised.
+ }
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -143,13 +143,13 @@
case CMD_GLOBALVOLSLIDE: command = 'W'; break;
case CMD_PANNING8:
command = 'X';
- if ((bIT) && (m_nType != MOD_TYPE_IT) && (m_nType != MOD_TYPE_XM))
+ if ((bIT) && (!(m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT))) && (m_nType != MOD_TYPE_XM))
{
if (param == 0xA4) { command = 'S'; param = 0x91; } else
if (param <= 0x80) { param <<= 1; if (param > 255) param = 255; } else
command = param = 0;
} else
- if ((!bIT) && ((m_nType == MOD_TYPE_IT) || (m_nType == MOD_TYPE_XM)))
+ if ((!bIT) && ((m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)) || (m_nType == MOD_TYPE_XM)))
{
param >>= 1;
}
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -349,7 +349,7 @@
GET_MPTHEADER_sized_member( nCutSwing , BYTE , CS.. )
GET_MPTHEADER_sized_member( nResSwing , BYTE , RS.. )
GET_MPTHEADER_sized_member( nFilterMode , BYTE , FM.. )
-GET_MPTHEADER_sized_member( wPitchToTempoLock , WORD , PTTL , )
+GET_MPTHEADER_sized_member( wPitchToTempoLock , WORD , PTTL )
GET_MPTHEADER_sized_member( nPitchEnvReleaseNode, BYTE , PERN )
GET_MPTHEADER_sized_member( nPanEnvReleaseNode , BYTE , AERN )
GET_MPTHEADER_sized_member( nVolEnvReleaseNode , BYTE , VERN )
@@ -1033,51 +1033,13 @@
//---------------------------------------
{
UINT i, nPattern;
+ BYTE resetMask = (!nPos) ? CHNRESET_TOTAL : CHNRESET_MOST;
for (i=0; i<MAX_CHANNELS; i++)
- {
- Chn[i].nNote = Chn[i].nNewNote = Chn[i].nNewIns = 0;
- Chn[i].pInstrument = NULL;
- Chn[i].pHeader = NULL;
- Chn[i].nPortamentoDest = 0;
- Chn[i].nCommand = 0;
- Chn[i].nPatternLoopCount = 0;
- Chn[i].nPatternLoop = 0;
- Chn[i].nFadeOutVol = 0;
- Chn[i].dwFlags |= CHN_KEYOFF|CHN_NOTEFADE;
- Chn[i].nTremorCount = 0;
- }
+ ResetChannelSettings(i, resetMask);
+
if (!nPos)
{
- for (i=0; i<MAX_CHANNELS; i++)
- {
- Chn[i].nPeriod = 0;
- Chn[i].nPos = Chn[i].nLength = 0;
- Chn[i].nLoopStart = 0;
- Chn[i].nLoopEnd = 0;
- Chn[i].nROfs = Chn[i].nLOfs = 0;
- Chn[i].pSample = NULL;
- Chn[i].pInstrument = NULL;
- Chn[i].pHeader = NULL;
- Chn[i].nCutOff = 0x7F;
- Chn[i].nResonance = 0;
- Chn[i].nFilterMode = 0;
- Chn[i].nLeftVol = Chn[i].nRightVol = 0;
- Chn[i].nNewLeftVol = Chn[i].nNewRightVol = 0;
- Chn[i].nLeftRamp = Chn[i].nRightRamp = 0;
- Chn[i].nVolume = 256;
- if (i < MAX_BASECHANNELS)
- {
- Chn[i].dwFlags = ChnSettings[i].dwFlags;
- Chn[i].nPan = ChnSettings[i].nPan;
- Chn[i].nGlobalVol = ChnSettings[i].nVolume;
- } else
- {
- Chn[i].dwFlags = 0;
- Chn[i].nPan = 128;
- Chn[i].nGlobalVol = 64;
- }
- }
m_nGlobalVolume = m_nDefaultGlobalVolume;
m_nMusicSpeed = m_nDefaultSpeed;
m_nMusicTempo = m_nDefaultTempo;
@@ -1382,10 +1344,11 @@
if(nch > MAX_BASECHANNELS) return true;
+ ResetChannelSettings(nch, CHNRESET_TOTAL);
+
ChnSettings[nch].nPan = 128;
ChnSettings[nch].nVolume = 64;
ChnSettings[nch].dwFlags = 0;
- ChnSettings[nch].dwFlags &= ~CHN_MUTE; //Unmuting
ChnSettings[nch].nMixPlugin = 0;
ChnSettings[nch].szName[0] = 0;
@@ -1401,8 +1364,74 @@
return false;
}
+void CSoundFile::ResetChannelSettings(CHANNELINDEX i, BYTE resetMask)
+//-------------------------------------------------------
+{
+ //Relabs.Hack
+ if(i >= MAX_CHANNELS) return;
+
+ if(resetMask & CHNRESET_BASIC)
+ {
+ if(i < MAX_BASECHANNELS)
+ {
+ //Chn[i].dwFlags = ChnSettings[i].dwFlags;
+ Chn[i].nPan = ChnSettings[i].nPan;
+ Chn[i].nGlobalVol = ChnSettings[i].nVolume;
+ }
+ else
+ {
+ Chn[i].dwFlags = 0;
+ Chn[i].nPan = 128;
+ Chn[i].nGlobalVol = 64;
+ }
+
+ }
+ if(resetMask == CHNRESET_BASIC) return;
+ if(resetMask & CHNRESET_MOST)
+ {
+ Chn[i].nNote = Chn[i].nNewNote = Chn[i].nNewIns = 0;
+ Chn[i].pInstrument = NULL;
+ Chn[i].pHeader = NULL;
+ Chn[i].nPortamentoDest = 0;
+ Chn[i].nCommand = 0;
+ Chn[i].nPatternLoopCount = 0;
+ Chn[i].nPatternLoop = 0;
+ Chn[i].nFadeOutVol = 0;
+ Chn[i].dwFlags |= CHN_KEYOFF|CHN_NOTEFADE;
+ Chn[i].nTremorCount = 0;
+ }
+ if(resetMask == CHNRESET_MOST) return;
+ if(resetMask & CHNRESET_TOTAL)
+ {
+ Chn[i].nPeriod = 0;
+ Chn[i].nPos = Chn[i].nLength = 0;
+ Chn[i].nLoopStart = 0;
+ Chn[i].nLoopEnd = 0;
+ Chn[i].nROfs = Chn[i].nLOfs = 0;
+ Chn[i].pSample = NULL;
+ Chn[i].pInstrument = NULL;
+ Chn[i].pHeader = NULL;
+ Chn[i].nCutOff = 0x7F;
+ Chn[i].nResonance = 0;
+ Chn[i].nFilterMode = 0;
+ Chn[i].nLeftVol = Chn[i].nRightVol = 0;
+ Chn[i].nNewLeftVol = Chn[i].nNewRightVol = 0;
+ Chn[i].nLeftRamp = Chn[i].nRightRamp = 0;
+ Chn[i].nVolume = 256;
+ }
+}
+
+void CSoundFile::ResetChannelSettings(BYTE resetMask)
+//-------------------------------------
+{
+ for(CHANNELINDEX i = 0; i<GetNumChannels(); i++)
+ ResetChannelSettings(i, resetMask);
+}
+
+
+
CHANNELINDEX CSoundFile::ReArrangeChannels(const std::vector<CHANNELINDEX>& newOrder)
//-------------------------------------------------------------------
{
@@ -2799,9 +2828,47 @@
WORD CSoundFile::GetTempoMin() const {return 32;}
WORD CSoundFile::GetTempoMax() const {return 512;}
-ROWINDEX CSoundFile::GetRowMax() const {return MAX_PATTERN_ROWS;}
-ROWINDEX CSoundFile::GetRowMin() const {return 2;}
+ROWINDEX CSoundFile::GetRowMax() const
+//------------------------------------
+{
+ switch(m_nType)
+ {
+ case MOD_TYPE_MPT:
+ return MPTM_SPECS.patternRowsMax;
+ case MOD_TYPE_MOD:
+ return MOD_SPECS.patternRowsMax;
+ case MOD_TYPE_XM:
+ return XM_SPECS.patternRowsMax;
+ case MOD_TYPE_IT:
+ return IT_SPECS.patternRowsMax;
+ case MOD_TYPE_S3M:
+ return S3M_SPECS.patternRowsMax;
+ default:
+ return MAX_PATTERN_ROWS;
+ }
+}
+ROWINDEX CSoundFile::GetRowMin() const
+//------------------------------------
+{
+ switch(m_nType)
+ {
+ case MOD_TYPE_MPT:
+ return MPTM_SPECS.patternRowsMin;
+ case MOD_TYPE_MOD:
+ return MOD_SPECS.patternRowsMin;
+ case MOD_TYPE_XM:
+ return XM_SPECS.patternRowsMin;
+ case MOD_TYPE_IT:
+ return IT_SPECS.patternRowsMin;
+ case MOD_TYPE_S3M:
+ return S3M_SPECS.patternRowsMin;
+ default:
+ return 2;
+ }
+}
+
+
CHANNELINDEX CSoundFile::GetNumChannelMax() const
//-----------------------------------
{
@@ -2833,3 +2900,30 @@
replace(Order.begin(), Order.end(), oldIgnoreIndex, Patterns.GetIgnoreIndex());
}
+#ifndef TRADITIONAL_MODCOMMAND
+void CSoundFile::OnSetEffect(MODCOMMAND& mc, EFFECT_ID eID)
+//---------------------------------------------------------
+{
+ // Check for MOD/XM Speed/Tempo command
+ if(
+ (GetModType() & (MOD_TYPE_MOD|MOD_TYPE_XM)) &&
+ (eID == CMD_SPEED || eID == CMD_TEMPO)
+ )
+ {
+ UINT maxspd = (GetModType() == MOD_TYPE_XM) ? 0x1F : 0x20;
+ mc.SetEffectByID((mc.GetEffectParam() <= maxspd) ? CMD_SPEED : CMD_TEMPO);
+ }
+ else
+ {
+ mc.SetEffectByID(eID);
+ }
+}
+
+
+void CSoundFile::OnSetEffectParam(MODCOMMAND& mc, EFFECT_PARAM eParam)
+//---------------------------------------------------------
+{
+ mc.SetEffectParam(eParam);
+}
+
+#endif
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2007-04-01 00:28:16 UTC (rev 177)
@@ -604,7 +604,11 @@
//<----
} MODCHANNEL;
+#define CHNRESET_BASIC 1
+#define CHNRESET_MOST 3
+#define CHNRESET_TOTAL 255
+
typedef struct _MODCHANNELSETTINGS
{
UINT nPan;
@@ -802,6 +806,8 @@
CHANNELINDEX GetNumChannelMax() const;
CHANNELINDEX GetNumChannelMin() const;
+ size_t GetModNameLengthMax() {return 25;}
+
public: //Misc
void ChangeModTypeTo(const int& newType);
//
@@ -933,10 +939,12 @@
BOOL Create(LPCBYTE lpStream, CModDoc *pModDoc, DWORD dwMemLength=0);
BOOL Destroy();
UINT GetType() const { return m_nType; }
+
+ //Return the number of channels in the pattern. In 1.17.02.45
+ //it returned the number of channels with volume != 0
UINT GetNumChannels() const {return m_nChannels;}
- //Return the number of channels in the pattern. In 1.17.02.45
- //it returned the number of channels with volume != 0
+
BOOL SetMasterVolume(UINT vol, BOOL bAdjustAGC=FALSE);
UINT GetMasterVolume() const { return m_nMasterVolume; }
UINT GetNumPatterns() const;
@@ -978,6 +986,17 @@
CHANNELINDEX ReArrangeChannels(const std::vector<CHANNELINDEX>& fromToArray);
bool MoveChannel(UINT chn_from, UINT chn_to);
bool SetChannelSettingsToDefault(UINT nch);
+
+
+ //Sets default channels settings from MODCHANNELSETTINGS to current
+ //channel settings. Flag can be used to tell whether to completely
+ //reset channels, not only a few settings(for maintaining old behavior).
+ void ResetChannelSettings(CHANNELINDEX chn, BYTE resetStyle);
+
+ //For all channels.
+ void ResetChannelSettings(BYTE resetStyle);
+
+
// Module Loaders
BOOL ReadXM(LPCBYTE lpStream, DWORD dwMemLength);
BOOL ReadS3M(LPCBYTE lpStream, DWORD dwMemLength);
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -1619,6 +1619,9 @@
}
if (m_pConfig->getTreatPanLikeBalance()) {
+ pChn->nNewLeftVol = (realvol * pan) >> 8;
+ pChn->nNewRightVol = (realvol * (256 - pan)) >> 8;
+ } else {
if (pan < 128) {
pChn->nNewLeftVol = (realvol * pan) >> 8;
pChn->nNewRightVol = (realvol * 128) >> 8;
@@ -1626,9 +1629,6 @@
pChn->nNewLeftVol = (realvol * 128) >> 8;
pChn->nNewRightVol = (realvol * (256 - pan)) >> 8;
}
- } else {
- pChn->nNewLeftVol = (realvol * pan) >> 8;
- pChn->nNewRightVol = (realvol * (256 - pan)) >> 8;
}
} else {
Modified: trunk/OpenMPT/soundlib/mod_specifications.h
===================================================================
--- trunk/OpenMPT/soundlib/mod_specifications.h 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/soundlib/mod_specifications.h 2007-04-01 00:28:16 UTC (rev 177)
@@ -18,7 +18,7 @@
UINT tempoMax;
UINT patternRowsMin;
UINT patternRowsMax;
- UINT modNameLengthMax;
+ UINT modNameLengthMax; //Meaning 'usable letters', possible null character is not included.
UINT samplesMax;
UINT instrumentsMax;
};
@@ -50,32 +50,87 @@
512, //Max tempo
2, //Min pattern rows
1024, //Max pattern rows
- 100, //Max mod name length
+ 256, //Max mod name length
4000, //SamplesMax
256, //instrumentMax
};
-/*
-const CModSpecifications MOD_TYPE_MOD =
+
+const CModSpecifications MOD_SPECS =
{
- "mod",
-
+ //TODO: Set correct values.
+ "mod", //File extension
+ 64, //Pattern max.
+ 128, //Order max.
+ 4, //Channel min
+ 4, //Channel max
+ 32, //Min tempo
+ 256, //Max tempo
+ 64, //Min pattern rows
+ 64, //Max pattern rows
+ 25, //Max mod name length
+ 31, //SamplesMax
+ 0, //instrumentMax
};
-const CModSpecifications MOD_TYPE_XM =
+
+const CModSpecifications XM_SPECS =
{
- "xm",
+ //TODO: Set correct values.
+ "xm", //File extension
+ 64, //Pattern max.
+ 128, //Order max.
+ 4, //Channel min
+ 64, //Channel max
+ 32, //Min tempo
+ 256, //Max tempo
+ 4, //Min pattern rows
+ 256, //Max pattern rows
+ 25, //Max mod name length
+ 31, //SamplesMax
+ 256, //instrumentMax
};
-const CModSpecifications MOD_TYPE_IT =
+const CModSpecifications S3M_SPECS =
{
- "it",
+ //TODO: Set correct values.
+ "s3m", //File extension
+ 240, //Pattern max.
+ 256, //Order max.
+ 4, //Channel min
+ 32, //Channel max
+ 32, //Min tempo
+ 256, //Max tempo
+ 64, //Min pattern rows
+ 64, //Max pattern rows
+ 25, //Max mod name length
+ 31, //SamplesMax
+ 0, //instrumentMax
};
-*/
+const CModSpecifications IT_SPECS =
+{
+ //TODO: Set correct values.
+ "it", //File extension
+ 240, //Pattern max.
+ 256, //Order max.
+ 4, //Channel min
+ 64, //Channel max
+ 32, //Min tempo
+ 256, //Max tempo
+ 4, //Min pattern rows
+ 256, //Max pattern rows
+ 25, //Max mod name length(in ittech.txt: "0000: \xB3'I'\xB3'M'\xB3'P'\xB3'M'\xB3 Song Name, max 26 characters, includes NULL \xB3")
+ 256, //SamplesMax
+ 256, //instrumentMax
+};
+
+
+
+
#endif
Modified: trunk/OpenMPT/soundlib/tuning.cpp
===================================================================
--- trunk/OpenMPT/soundlib/tuning.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/soundlib/tuning.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -8,8 +8,14 @@
//CTuningRTi-statics
const CTuning::SERIALIZATION_MARKER CTuningRTI::s_SerializationBeginMarker("CTRTI_B.");
const CTuning::SERIALIZATION_MARKER CTuningRTI::s_SerializationEndMarker("CTRTI_E.");
-const CTuning::SERIALIZATION_VERSION CTuningRTI::s_SerializationVersion(2);
+const CTuning::SERIALIZATION_VERSION CTuningRTI::s_SerializationVersion(3);
+/*
+Version changes:
+ 2->3: The type for the size_type in the serialisation changed
+ from default(size_t, uint64) to unsigned STEPTYPE. (March 2007)
+*/
+
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
@@ -178,11 +184,12 @@
if(CTuning::SerializeBinary(outStrm) == SERIALIZATION_FAILURE) return SERIALIZATION_FAILURE;
//Main Ratios
- if(VectorToBinaryStream(outStrm, m_RatioTable))
+ if(VectorToBinaryStream<RATIOTYPE, USTEPTYPE>(outStrm, m_RatioTable))
return SERIALIZATION_FAILURE;
+
//Fine ratios
- if(VectorToBinaryStream(outStrm, m_RatioTableFine))
+ if(VectorToBinaryStream<RATIOTYPE, UFINESTEPTYPE>(outStrm, m_RatioTableFine))
return SERIALIZATION_FAILURE;
//m_StepMin
@@ -235,7 +242,7 @@
//Version
inStrm.read(reinterpret_cast<char*>(&version), sizeof(version));
- if(version != 1 && version != s_SerializationVersion)
+ if(version > s_SerializationVersion)
return SERIALIZATION_FAILURE;
//Baseclass Unserialization
@@ -243,14 +250,31 @@
return SERIALIZATION_FAILURE;
//Ratiotable
- if(VectorFromBinaryStream(inStrm, m_RatioTable))
- return SERIALIZATION_FAILURE;
+ if(version < 3)
+ {
+ if(VectorFromBinaryStream<RATIOTYPE, uint64>(inStrm, m_RatioTable))
+ return SERIALIZATION_FAILURE;
+ }
+ else //Version >= 3
+ {
+ if(VectorFromBinaryStream<RATIOTYPE, USTEPTYPE>(inStrm, m_RatioTable))
+ return SERIALIZATION_FAILURE;
+ }
+
//Ratiotable fine
if(version > 1)
{
- if(VectorFromBinaryStream(inStrm, m_RatioTableFine))
- return SERIALIZATION_FAILURE;
+ if(version < 3)
+ {
+ if(VectorFromBinaryStream<RATIOTYPE, uint64>(inStrm, m_RatioTableFine))
+ return SERIALIZATION_FAILURE;
+ }
+ else //Version >= 3
+ {
+ if(VectorFromBinaryStream<RATIOTYPE, UFINESTEPTYPE>(inStrm, m_RatioTableFine))
+ return SERIALIZATION_FAILURE;
+ }
}
Modified: trunk/OpenMPT/soundlib/tuningCollection.cpp
===================================================================
--- trunk/OpenMPT/soundlib/tuningCollection.cpp 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/soundlib/tuningCollection.cpp 2007-04-01 00:28:16 UTC (rev 177)
@@ -5,8 +5,15 @@
//Serializations statics:
const CTuningCollection::SERIALIZATION_MARKER CTuningCollection::s_SerializationBeginMarker = 0x54435348; //ascii of TCSH(TuningCollectionSerialisationHeader) in hex.
const CTuningCollection::SERIALIZATION_MARKER CTuningCollection::s_SerializationEndMarker = 0x54435346; //ascii of TCSF(TuningCollectionSerialisationFooter) in hex.
-const CTuningCollection::SERIALIZATION_MARKER CTuningCollection::s_SerializationVersion = 1;
+const CTuningCollection::SERIALIZATION_MARKER CTuningCollection::s_SerializationVersion = 2;
+/*
+Version history:
+ 1->2: Sizetypes of string serialisation from size_t(uint64)
+ to uint8. (March 2007)
+*/
+
+
const CTuningCollection::SERIALIZATION_RETURN_TYPE CTuningCollection::SERIALIZATION_SUCCESS = false;
const CTuningCollection::SERIALIZATION_RETURN_TYPE CTuningCollection::SERIALIZATION_FAILURE = true;
@@ -29,6 +36,7 @@
CTuningCollection::CTuningCollection(const string& name) : m_Name(name)
//------------------------------------
{
+ if(m_Name.size() > GetNameLengthMax()) m_Name.resize(GetNameLengthMax());
m_EditMask.set();
}
@@ -132,7 +140,7 @@
outStrm.write(reinterpret_cast<const char*>(&s_SerializationVersion), sizeof(s_SerializationVersion));
//3. Name
- if(StringToBinaryStream(outStrm, m_Name))
+ if(StringToBinaryStream<uint8>(outStrm, m_Name))
return SERIALIZATION_FAILURE;
//4. Edit mask
@@ -202,11 +210,19 @@
//2. Serialization version
inStrm.read(reinterpret_cast<char*>(&version), sizeof(version));
- if(version != s_SerializationVersion) return SERIALIZATION_FAILURE;
+ if(version > s_SerializationVersion) return SERIALIZATION_FAILURE;
//3. Name
- if(StringFromBinaryStream(inStrm, m_Name))
- return SERIALIZATION_FAILURE;
+ if(version < 2)
+ {
+ if(StringFromBinaryStream<uint64>(inStrm, m_Name))
+ return SERIALIZATION_FAILURE;
+ }
+ else
+ {
+ if(StringFromBinaryStream<uint8>(inStrm, m_Name))
+ return SERIALIZATION_FAILURE;
+ }
//4. Editmask
__int16 em = 0;
Modified: trunk/OpenMPT/soundlib/tuning_template.h
===================================================================
--- trunk/OpenMPT/soundlib/tuning_template.h 2007-03-14 01:04:11 UTC (rev 176)
+++ trunk/OpenMPT/soundlib/tuning_template.h 2007-04-01 00:28:16 UTC (rev 177)
@@ -68,7 +68,9 @@
*/
//Class defining tuning which is fundamentally based on discrete steps.
-template<class TSTEPTYPE = short int, class TRATIOTYPE = float, class TFINESTEPTYPE = TSTEPTYPE>
+template<class TSTEPTYPE = short int, class TUSTEPTYPE = unsigned short int,
+ class TRATIOTYPE = float,
+ class TFINESTEPTYPE = TSTEPTYPE, class TUFINESTEPTYPE = TUSTEPTYPE>
class CTuningBase
{
//STEPTYPE: Some type that has properties that of 'ordinary' signed and discrete figures.
@@ -81,8 +83,10 @@
public:
//BEING TYPEDEFS:
typedef TSTEPTYPE STEPTYPE;
+ typedef TUSTEPTYPE USTEPTYPE; //Unsigned steptype
typedef TRATIOTYPE RATIOTYPE;
typedef TFINESTEPTYPE FINESTEPTYPE;
+ typedef TUFINESTEPTYPE UFINESTEPTYPE; //Unsigned finesteptype
typedef std::exception TUNINGEXCEPTION;
@@ -103,6 +107,7 @@
typedef std::string NOTESTR;
typedef std::map<STEPTYPE, NOTESTR> NOTENAMEMAP;
+ typedef USTEPTYPE SIZETYPE;
typedef typename NOTENAMEMAP::iterator NNM_ITER;
typedef typename NOTENAMEMAP::const_iterator NNM_CITER;
@@ -277,7 +282,8 @@
CTuningBase& operator=(const CTuningBase&);
CTuningBase(const CTuningBase&);
//When copying tunings, the name must not be exact copy
- //since it is to be unique for every tuning.
+ //since it is to be unique for every tuning, or maybe some
+ //better identification could be introduced.
CTUNINGTYPE GetType() const {return m_TuningType;}
@@ -288,7 +294,7 @@
//BEGIN PRIVATE METHODS
private:
SERIALIZATION_RETURN_TYPE NotenameMapToBinary(ostream&) const;
- SERIALIZATION_RETURN_TYPE NotenameMapFromBinary(istream&);
+ SERIALIZATION_RETURN_TYPE NotenameMapFromBinary(istream&, const SERIALIZATION_VERSION);
bool SetType(const CTUNINGTYPE& tt)
{
@@ -342,63 +348,64 @@
//Specialising tuning for ompt.
-typedef short int MPT_TUNING_STEPTYPE;
-typedef float MPT_TUNING_RATIOTYPE;
-typedef MPT_TUNING_STEPTYPE MPT_TUNING_FINESTEPTYPE;
+typedef CTuningBase<int16, uint16, float32, int16, uint16> CTuning;
-typedef CTuningBase<MPT_TUNING_STEPTYPE, MPT_TUNING_RATIOTYPE, MPT_TUNING_FINESTEPTYPE> CTuning;
-
const CTuning::SERIALIZATION_MARKER CTuning::s_SerializationBeginMarker("CT<sfs>B");
const CTuning::SERIALIZATION_MARKER CTuning::s_SerializationEndMarker("CT<sfs>E");
//<sfs> <-> Short Float Short
-template<class A, class B, class C>
-const CTuningBase<>::SERIALIZATION_MARKER CTuningBase<A, B, C>::s_SerializationBeginMarker("CTB<ABC>");
+template<class A, class B, class C, class D, class E>
+const CTuningBase<>::SERIALIZATION_MARKER CTuningBase<A, B, C, D, E>::s_SerializationBeginMarker("CTB<ABC>");
-template<class A, class B, class C>
-const CTuningBase<>::SERIALIZATION_MARKER CTuningBase<A, B, C>::s_SerializationEndMarker("CTB<ABC>");
+template<class A, class B, class C, class D, class E>
+const CTuningBase<>::SERIALIZATION_MARKER CTuningBase<A, B, C, D, E>::s_SerializationEndMarker("CTB<ABC>");
-template<class A, class B, class C>
-const CTuningBase<>::SERIALIZATION_VERSION CTuningBase<A, B, C>::s_SerializationVersion(3);
+template<class A, class B, class C, class D, class E>
+const CTuningBase<>::SERIALIZATION_VERSION CTuningBase<A, B, C, D, E>::s_SerializationVersion(4);
+/*
+Version history:
+ 3->4: Changed sizetypes in serialisation from size_t(uint64) to
+ smaller types (uint8, USTEPTYPE) (March 2007)
+*/
-template<class A, class B, class C>
-const CTuningBase<>::SERIALIZATION_RETURN_TYPE CTuningBase<A, B, C>::SERIALIZATION_SUCCESS = false;
+template<class A, class B, class C, class D, class E>
+const CTuningBase<>::SERIALIZATION_RETURN_TYPE CTuningBase<A, B, C, D, E>::SERIALIZATION_SUCCESS = false;
-template<class A, class B, class C>
-const CTuningBase<>::SERIALIZATION_RETURN_TYPE CTuningBase<A, B, C>::SERIALIZATION_FAILURE = true;
+template<class A, class B, class C, class D, class E>
+const CTuningBase<>::SERIALIZATION_RETURN_TYPE CTuningBase<A, B, C, D, E>::SERIALIZATION_FAILURE = true;
-template<class A, class B, class C>
-const string CTuningBase<A, B, C>::s_FileExtension = ".tun";
+template<class A, class B, class C, class D, class E>
+const string CTuningBase<A, B, C, D, E>::s_FileExtension = ".tun";
-template<class A, class B, class C>
-const CTuning::CEDITMASK CTuningBase<A, B, C>::EM_MAINRATIOS = 0x1; //1b
-template<class A, class B, class C>
-const CTuning::CEDITMASK CTuningBase<A, B, C>::EM_NOTENAME = 0x2; //10b
-template<class A, class B, class C>
-const CTuning::CEDITMASK CTuningBase<A, B, C>::EM_TYPE = 0x4; //100b
-template<class A, class B, class C>
-const CTuning::CEDITMASK CTuningBase<A, B, C>::EM_NAME = 0x8; //1000b
-template<class A, class B, class C>
-const CTuning::CEDITMASK CTuningBase<A, B, C>::EM_FINETUNE = 0x10; //10000b
-template<class A, class B, class C>
-const CTuning::CEDITMASK CTuningBase<A, B, C>::EM_ALLOWALL = 0xFFFF; //All editing allowed.
-template<class A, class B, class C>
-const CTuning::CEDITMASK CTuningBase<A, B, C>::EM_EDITMASK = 0x8000; //Whether to allow modifications to editmask.
-template<class A, class B, class C>
-const CTuning::CEDITMASK CTuningBase<A, B, C>::EM_CONST = 0x8000; //All editing except changing const status disable.
-template<class A, class B, class C>
-const CTuning::CEDITMASK CTuningBase<A, B, C>::EM_CONST_STRICT = 0; //All bits are zero.
+template<class A, class B, class C, class D, class E>
+const CTuning::CEDITMASK CTuningBase<A, B, C, D, E>::EM_MAINRATIOS = 0x1; //1b
+template<class A, class B, class C, class D, class E>
+const CTuning::CEDITMASK CTuningBase<A, B, C, D, E>::EM_NOTENAME = 0x2; //10b
+template<class A, class B, class C, class D, class E>
+const CTuning::CEDITMASK CTuningBase<A, B, C, D, E>::EM_TYPE = 0x4; //100b
+template<class A, class B, class C, class D, class E>
+const CTuning::CEDITMASK CTuningBase<A, B, C, D, E>::EM_NAME = 0x8; //1000b
+template<class A, class B, class C, class D, class E>
+const CTuning::CEDITMASK CTuningBase<A, B, C, D, E>::EM_FINETUNE = 0x10; //10000b
+template<class A, class B, class C, class D, class E>
+const CTuning::CEDITMASK CTuningBase<A, B, C, D, E>::EM_ALLOWALL = 0xFFFF; //All editing allowed.
+template<class A, class B, class C, class D, class E>
+const CTuning::CEDITMASK CTuningBase<A, B, C, D, E>::EM_EDITMASK = 0x8000; //Whether to allow modifications to editmask.
+template<class A, class B, class C, class D, class E>
+const CTuning::CEDITMASK CTuningBase<A, B, C, D, E>::EM_CONST = 0x8000; //All editing except changing const status disable.
+template<class A, class B, class C, class D, class E>
+const CTuning::CEDITMASK CTuningBase<A, B, C, D, E>::EM_CONST_STRICT = 0; //All bits are zero.
-template<class A, class B, class C>
-const CTuning::CTUNINGTYPE CTuningBase<A, B, C>::TT_GENERAL = 0; //0...00b
-template<class A, class B, class C>
-const CTuning::CTUNINGTYPE CTuningBase<A, B, C>::TT_RATIOPERIODIC = 1; //0...10b
-template<class A, class B, class C>
-const CTuning::CTUNINGTYPE CTuningBase<A, B, C>::TT_TET = 3; //0...11b
+template<class A, class B, class C, class D, class E>
+const CTuning::CTUNINGTYPE CTuningBase<A, B, C, D, E>::TT_GENERAL = 0; //0...00b
+template<class A, class B, class C, class D, class E>
+const CTuning::CTUNINGTYPE CTuningBase<A, B, C, D, E>::TT_RATIOPERIODIC = 1; //0...10b
+template<class A, class B, class C, class D, class E>
+const CTuning::CTUNINGTYPE CTuningBase<A, B, C, D, E>::TT_TET = 3; //0...11b
-template<class A, class B, class C>
-CTuningBase<A,B,C>& CTuningBase<A,B,C>::operator =(const CTuningBase& pt)
+template<class A, class B, class C, class D, class E>
+CTuningBase<A,B,C,D,E>& CTuningBase<A,B,C,D,E>::operator =(const CTuningBase& pt)
//-----------------------------------------------------------------------
{
if(!MayEdit(EM_ALLOWALL))
@@ -437,15 +444,15 @@
return *this;
}
-template<class A, class B, class C>
-CTuningBase<A,B,C>::CTuningBase(const CTuningBase& pt)
+template<class A, class B, class C, class D, class E>
+CTuningBase<A,B,C,D,E>::CTuningBase(const CTuningBase& pt)
//-----------------------------------------------------------------------
{
*this = pt;
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::SetRatio(const STEPTYPE& s, const RATIOTYPE& r)
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::SetRatio(const STEPTYPE& s, const RATIOTYPE& r)
//-----------------------------------------------------------------
{
if(MayEdit(EM_MAINRATIOS))
@@ -461,8 +468,8 @@
}
-template<class A, class B, class C>
-string CTuningBase<A,B,C>::GetTuningTypeStr(const CTUNINGTYPE& tt)
+template<class A, class B, class C, class D, class E>
+string CTuningBase<A,B,C,D,E>::GetTuningTypeStr(const CTUNINGTYPE& tt)
//----------------------------------------------------------------
{
if(tt == TT_GENERAL)
@@ -476,8 +483,8 @@
-template<class A, class B, class C>
-CTuningBase<>::NOTESTR CTuningBase<A,B,C>::GetNoteName(const STEPTYPE& x) const
+template<class A, class B, class C, class D, class E>
+CTuningBase<>::NOTESTR CTuningBase<A,B,C,D,E>::GetNoteName(const STEPTYPE& x) const
//-----------------------------------------------------------------------
{
NNM_CITER i = m_NoteNameMap.find(x);
@@ -488,8 +495,8 @@
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::DoesTypeInclude(const CTUNINGTYPE& type) const
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::DoesTypeInclude(const CTUNINGTYPE& type) const
//-----------------------------------------------------------------------------
{
if(type == TT_GENERAL)
@@ -508,8 +515,8 @@
return false;
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::SetNoteName(const STEPTYPE& n, const string& str)
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::SetNoteName(const STEPTYPE& n, const string& str)
//-----------------------------------------------------------------------
{
if(MayEdit(EM_NOTENAME))
@@ -520,8 +527,8 @@
return true;
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::ClearNoteName(const STEPTYPE& n, const bool eraseAll)
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::ClearNoteName(const STEPTYPE& n, const bool eraseAll)
//-------------------------------------------------------
{
if(MayEdit(EM_NOTENAME))
@@ -545,8 +552,8 @@
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::Multiply(const RATIOTYPE& r)
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::Multiply(const RATIOTYPE& r)
//---------------------------------------------------
{
if(r <= 0 || !MayEdit(EM_MAINRATIOS))
@@ -563,8 +570,8 @@
return false;
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::CreateRatioPeriodic(const STEPTYPE& s, const RATIOTYPE& r)
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::CreateRatioPeriodic(const STEPTYPE& s, const RATIOTYPE& r)
//-------------------------------------------------------------
{
if(s < 1 || r <= 0)
@@ -577,8 +584,8 @@
return CreateRatioPeriodic(v, r);
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::CreateRatioPeriodic(const vector<RATIOTYPE>& v, const RATIOTYPE& r)
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::CreateRatioPeriodic(const vector<RATIOTYPE>& v, const RATIOTYPE& r)
//------------------------------------------------------------------------------------------
{
if(MayEdit(EM_MAINRATIOS) &&
@@ -599,8 +606,8 @@
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::CreateTET(const STEPTYPE& s, const RATIOTYPE& r)
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::CreateTET(const STEPTYPE& s, const RATIOTYPE& r)
//-------------------------------------------------------------------
{
if(MayEdit(EM_MAINRATIOS) &&
@@ -621,8 +628,8 @@
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::ChangePeriod(const STEPTYPE& s)
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::ChangePeriod(const STEPTYPE& s)
//---------------------------------------------------
{
if(!MayEdit(EM_MAINRATIOS) || s < 1)
@@ -638,8 +645,8 @@
}
-template<class A, class B, class C>
-bool CTuningBase<A,B,C>::ChangePeriodRatio(const RATIOTYPE& r)
+template<class A, class B, class C, class D, class E>
+bool CTuningBase<A,B,C,D,E>::ChangePeriodRatio(const RATIOTYPE& r)
//---------------------------------------------------
{
if(!MayEdit(EM_MAINRATIOS) || r <= 0)
@@ -655,8 +662,8 @@
}
-template<class TSTEPTYPE, class TRATIOTYPE, class TFINESTEPTYPE>
-CTuningBase<>::SERIALIZATION_RETURN_TYPE CTuningBase<TSTEPTYPE, TRATIOTYPE, TFINESTEPTYPE>::SerializeBinary(ostream& outStrm, const int mode) const
+template<class A, class B, class C, class D, class E>
+CTuningBase<>::SERIALIZATION_RETURN_TYPE CTuningBase<A, B, C, D, E>::SerializeBinary(ostream& outStrm, const int mode) const
//------------------------------------------------------------------------------------------------------------------------------
{
//Writing the tuning name here.
@@ -667,7 +674,7 @@
outStrm.write(reinterpret_cast<const char*>(&s_SerializationVersion), sizeof(s_SerializationVersion));
//Tuning name
- if(StringToBinaryStream(outStrm, m_TuningName)) return SERIALIZATION_FAILURE;
+ if(StringToBinaryStream<uint8>(outStrm, m_TuningName)) return SERIALIZATION_FAILURE;
//Const mask
const __int16 cm = static_cast<__int16>(m_EditMask.to_ulong());
@@ -693,8 +700,8 @@
}
-template<class TSTEPTYPE, class TRATIOTYPE, class TFINESTEPTYPE>
-CTuningBase<>::SERIALIZATION_RETURN_TYPE CTuningBase<TSTEPTYPE, TRATIOTYPE, TFINESTEPTYPE>::UnSerializeBinary(istream& inStrm, const int mode)
+template<class A, class B, class C, class D, class E>
+CTuningBase<>::SERIALIZATION_RETURN_TYPE CTuningBase<A,B,C,D,E>::UnSerializeBinary(istream& inStrm,...
[truncated message content] |