You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(10) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
| 2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(2) |
Oct
(9) |
Nov
(1) |
Dec
(4) |
| 2009 |
Jan
(9) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(6) |
Jun
(18) |
Jul
(33) |
Aug
(39) |
Sep
(33) |
Oct
(24) |
Nov
(23) |
Dec
(22) |
| 2010 |
Jan
(29) |
Feb
(32) |
Mar
(51) |
Apr
(17) |
May
(31) |
Jun
(21) |
Jul
(32) |
Aug
(28) |
Sep
(35) |
Oct
(27) |
Nov
(11) |
Dec
(13) |
| 2011 |
Jan
(14) |
Feb
(13) |
Mar
(27) |
Apr
(27) |
May
(28) |
Jun
(20) |
Jul
(43) |
Aug
(52) |
Sep
(66) |
Oct
(61) |
Nov
(11) |
Dec
(8) |
| 2012 |
Jan
(20) |
Feb
(30) |
Mar
(38) |
Apr
(21) |
May
(33) |
Jun
(21) |
Jul
(25) |
Aug
(9) |
Sep
(24) |
Oct
(42) |
Nov
(27) |
Dec
(41) |
| 2013 |
Jan
(20) |
Feb
(35) |
Mar
(156) |
Apr
(298) |
May
(258) |
Jun
(201) |
Jul
(105) |
Aug
(60) |
Sep
(193) |
Oct
(245) |
Nov
(280) |
Dec
(194) |
| 2014 |
Jan
(63) |
Feb
(202) |
Mar
(200) |
Apr
(23) |
May
(53) |
Jun
(105) |
Jul
(18) |
Aug
(26) |
Sep
(110) |
Oct
(187) |
Nov
(97) |
Dec
(74) |
| 2015 |
Jan
(45) |
Feb
(55) |
Mar
(116) |
Apr
(116) |
May
(193) |
Jun
(164) |
Jul
(50) |
Aug
(111) |
Sep
(98) |
Oct
(71) |
Nov
(103) |
Dec
(63) |
| 2016 |
Jan
(33) |
Feb
(101) |
Mar
(182) |
Apr
(139) |
May
(140) |
Jun
(103) |
Jul
(165) |
Aug
(286) |
Sep
(208) |
Oct
(127) |
Nov
(97) |
Dec
(54) |
| 2017 |
Jan
(64) |
Feb
(335) |
Mar
(202) |
Apr
(212) |
May
(139) |
Jun
(127) |
Jul
(294) |
Aug
(154) |
Sep
(170) |
Oct
(152) |
Nov
(156) |
Dec
(62) |
| 2018 |
Jan
(168) |
Feb
(237) |
Mar
(196) |
Apr
(174) |
May
(174) |
Jun
(161) |
Jul
(127) |
Aug
(88) |
Sep
(149) |
Oct
(66) |
Nov
(52) |
Dec
(135) |
| 2019 |
Jan
(146) |
Feb
(126) |
Mar
(104) |
Apr
(58) |
May
(60) |
Jun
(28) |
Jul
(197) |
Aug
(129) |
Sep
(141) |
Oct
(148) |
Nov
(63) |
Dec
(100) |
| 2020 |
Jan
(74) |
Feb
(37) |
Mar
(59) |
Apr
(154) |
May
(194) |
Jun
(133) |
Jul
(313) |
Aug
(197) |
Sep
(49) |
Oct
(162) |
Nov
(143) |
Dec
(57) |
| 2021 |
Jan
(120) |
Feb
(107) |
Mar
(314) |
Apr
(157) |
May
(524) |
Jun
(169) |
Jul
(72) |
Aug
(133) |
Sep
(135) |
Oct
(146) |
Nov
(198) |
Dec
(325) |
| 2022 |
Jan
(409) |
Feb
(249) |
Mar
(138) |
Apr
(95) |
May
(102) |
Jun
(221) |
Jul
(66) |
Aug
(120) |
Sep
(192) |
Oct
(131) |
Nov
(53) |
Dec
(171) |
| 2023 |
Jan
(357) |
Feb
(82) |
Mar
(168) |
Apr
(218) |
May
(196) |
Jun
(86) |
Jul
(115) |
Aug
(49) |
Sep
(190) |
Oct
(102) |
Nov
(45) |
Dec
(76) |
| 2024 |
Jan
(86) |
Feb
(50) |
Mar
(324) |
Apr
(209) |
May
(197) |
Jun
(232) |
Jul
(194) |
Aug
(247) |
Sep
(219) |
Oct
(266) |
Nov
(328) |
Dec
(304) |
| 2025 |
Jan
(191) |
Feb
(115) |
Mar
(137) |
Apr
(32) |
May
(126) |
Jun
(403) |
Jul
(213) |
Aug
(203) |
Sep
(148) |
Oct
(109) |
Nov
(191) |
Dec
(209) |
| 2026 |
Jan
(127) |
Feb
(123) |
Mar
(160) |
Apr
(141) |
May
(45) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <sag...@us...> - 2010-06-18 23:03:35
|
Revision: 626
http://modplug.svn.sourceforge.net/modplug/?rev=626&view=rev
Author: saga-games
Date: 2010-06-18 23:03:29 +0000 (Fri, 18 Jun 2010)
Log Message:
-----------
[Imp] S3M Loader: More intelligent "short loop" detection to avoid problems with the 4-byte loops in S3M files created with PSM2S3M which should not be there.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_s3m.cpp
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-06-15 21:08:42 UTC (rev 625)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-06-18 23:03:29 UTC (rev 626)
@@ -388,7 +388,11 @@
if ((Samples[iSmp].nLoopStart >= Samples[iSmp].nLoopEnd) || (Samples[iSmp].nLoopEnd - Samples[iSmp].nLoopStart < 1))
Samples[iSmp].nLoopStart = Samples[iSmp].nLoopEnd = 0;
Samples[iSmp].nPan = 0x80;
- //ASSERT(iLooplength == 0 || iLooplength > 4);
+
+ // attempt to fix samples which are not supposed to have loops (for example in S3M files made with PSM2S3M)
+ if(Samples[iSmp].nLoopEnd <= 4 && Samples[iSmp].nLength > 8)
+ Samples[iSmp].uFlags &= ~CHN_LOOP;
+
} else if(s[0] >= S3I_TYPE_ADMEL)
{
bHasAdlibPatches = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-15 21:08:49
|
Revision: 625
http://modplug.svn.sourceforge.net/modplug/?rev=625&view=rev
Author: saga-games
Date: 2010-06-15 21:08:42 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
[Fix] XM Compatibility: Prevent notes to be stopped after a fadeout. This way, a portamento effect can pick up a faded instrument which is long enough. This occours for example in the bassline (channel 11) of jt_burn.xm. Not tested with many XMs yet, I hope this won't break anything else...
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-06-15 18:40:15 UTC (rev 624)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-06-15 21:08:42 UTC (rev 625)
@@ -740,7 +740,7 @@
if(!bPorta && pSmp && IsCompatibleMode(TRK_IMPULSETRACKER)) pChn->nC5Speed = pSmp->nC5Speed;
// XM Compatibility: Ignore notes with portamento if there was no note playing.
- if(bPorta && (pChn->pCurrentSample == nullptr) && IsCompatibleMode(TRK_FASTTRACKER2))
+ if(bPorta && (pChn->nInc == 0) && IsCompatibleMode(TRK_FASTTRACKER2))
{
pChn->nPeriod = 0;
return;
@@ -3540,7 +3540,7 @@
//--------------------------------
{
MODCHANNEL *pChn = &Chn[nChn];
- BOOL bKeyOn = (pChn->dwFlags & CHN_KEYOFF) ? FALSE : TRUE;
+ const bool bKeyOn = (pChn->dwFlags & CHN_KEYOFF) ? false : true;
pChn->dwFlags |= CHN_KEYOFF;
//if ((!pChn->pModInstrument) || (!(pChn->dwFlags & CHN_VOLENV)))
if ((pChn->pModInstrument) && (!(pChn->dwFlags & CHN_VOLENV)))
@@ -3550,34 +3550,35 @@
if (!pChn->nLength) return;
if ((pChn->dwFlags & CHN_SUSTAINLOOP) && (pChn->pModSample) && (bKeyOn))
{
- MODSAMPLE *psmp = pChn->pModSample;
- if (psmp->uFlags & CHN_LOOP)
+ const MODSAMPLE *pSmp = pChn->pModSample;
+ if (pSmp->uFlags & CHN_LOOP)
{
- if (psmp->uFlags & CHN_PINGPONGLOOP)
+ if (pSmp->uFlags & CHN_PINGPONGLOOP)
pChn->dwFlags |= CHN_PINGPONGLOOP;
else
pChn->dwFlags &= ~(CHN_PINGPONGLOOP|CHN_PINGPONGFLAG);
pChn->dwFlags |= CHN_LOOP;
- pChn->nLength = psmp->nLength;
- pChn->nLoopStart = psmp->nLoopStart;
- pChn->nLoopEnd = psmp->nLoopEnd;
+ pChn->nLength = pSmp->nLength;
+ pChn->nLoopStart = pSmp->nLoopStart;
+ pChn->nLoopEnd = pSmp->nLoopEnd;
if (pChn->nLength > pChn->nLoopEnd) pChn->nLength = pChn->nLoopEnd;
} else
{
pChn->dwFlags &= ~(CHN_LOOP|CHN_PINGPONGLOOP|CHN_PINGPONGFLAG);
- pChn->nLength = psmp->nLength;
+ pChn->nLength = pSmp->nLength;
}
}
if (pChn->pModInstrument)
{
MODINSTRUMENT *pIns = pChn->pModInstrument;
- if (((pIns->VolEnv.dwFlags & ENV_LOOP) || (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2))) && (pIns->nFadeOut)) {
+ if (((pIns->VolEnv.dwFlags & ENV_LOOP) || (m_nType & (MOD_TYPE_XM|MOD_TYPE_MT2))) && (pIns->nFadeOut))
+ {
pChn->dwFlags |= CHN_NOTEFADE;
}
- if (pIns->VolEnv.nReleaseNode != ENV_RELEASE_NODE_UNSET) {
- pChn->nVolEnvValueAtReleaseJump=getVolEnvValueFromPosition(pChn->nVolEnvPosition, pIns);
- pChn->nVolEnvPosition= pIns->VolEnv.Ticks[pIns->VolEnv.nReleaseNode];
+ if (pIns->VolEnv.nReleaseNode != ENV_RELEASE_NODE_UNSET)
+ {
+ pChn->nVolEnvValueAtReleaseJump = getVolEnvValueFromPosition(pChn->nVolEnvPosition, pIns); pChn->nVolEnvPosition= pIns->VolEnv.Ticks[pIns->VolEnv.nReleaseNode];
}
}
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-06-15 18:40:15 UTC (rev 624)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-06-15 21:08:42 UTC (rev 625)
@@ -930,7 +930,10 @@
MODINSTRUMENT *pIns = pChn->pModInstrument;
- if ((pChn->dwFlags & CHN_NOTEFADE) && (!(pChn->nFadeOutVol|pChn->nRightVol|pChn->nLeftVol)))
+ // XM Compatibility: Prevent notes to be stopped after a fadeout. This way, a portamento effect can pick up a faded instrument which is long enough.
+ // This occours for example in the bassline (channel 11) of jt_burn.xm. I hope this won't break anything else...
+ // I also suppose this could decrease mixing performance a bit, but hey, which CPU can't handle 32 muted channels these days... :-)
+ if ((pChn->dwFlags & CHN_NOTEFADE) && (!(pChn->nFadeOutVol|pChn->nRightVol|pChn->nLeftVol)) && (!IsCompatibleMode(TRK_FASTTRACKER2)))
{
pChn->nLength = 0;
pChn->nROfs = pChn->nLOfs = 0;
@@ -1672,7 +1675,7 @@
// Volume Sustain ?
if ((pIns->VolEnv.dwFlags & ENV_SUSTAIN) && (!(pChn->dwFlags & CHN_KEYOFF)))
{
- if (pChn->nVolEnvPosition == (UINT)pIns->VolEnv.Ticks[pIns->VolEnv.nSustainEnd]+1)
+ if (pChn->nVolEnvPosition == (UINT)pIns->VolEnv.Ticks[pIns->VolEnv.nSustainEnd] + 1)
pChn->nVolEnvPosition = pIns->VolEnv.Ticks[pIns->VolEnv.nSustainStart];
} else
// End of Envelope ?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-15 18:40:22
|
Revision: 624
http://modplug.svn.sourceforge.net/modplug/?rev=624&view=rev
Author: saga-games
Date: 2010-06-15 18:40:15 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
[Imp] Mod Conversion: Some improvements with converting note cuts, ECx/SCx and EDx/SDx.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Sndfile.cpp
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-06-15 16:36:36 UTC (rev 623)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-06-15 18:40:15 UTC (rev 624)
@@ -1504,7 +1504,7 @@
ChnSettings[nChn].nVolume = 64;
ChnSettings[nChn].dwFlags = 0;
ChnSettings[nChn].nMixPlugin = 0;
- ChnSettings[nChn].szName[0] = 0;
+ strcpy(ChnSettings[nChn].szName, "");
ResetChannelState(nChn, CHNRESET_TOTAL);
@@ -3332,6 +3332,8 @@
case 0x90: m->command = CMD_RETRIG; m->param = 0x80 | (m->param & 0x0F); break;
case 0xA0: if (m->param & 0x0F) { m->command = CMD_VOLUMESLIDE; m->param = (m->param << 4) | 0x0F; } else m->command = 0; break;
case 0xB0: if (m->param & 0x0F) { m->command = CMD_VOLUMESLIDE; m->param |= 0xF0; } else m->command = 0; break;
+ case 0xC0: if (m->param == 0xC0) { m->command = CMD_NONE; m->note = NOTE_NOTECUT; } // this does different things in IT and ST3
+ case 0xD0: if (m->param == 0xD0) { m->command = CMD_NONE; } // dito
// rest are the same
}
}
@@ -3493,10 +3495,18 @@
// Convert S3M / IT / MPTM to MOD / XM
else if(oldTypeIsS3M_IT_MPT && newTypeIsMOD_XM)
{
- // convert note cut/off/fade
- if(m->note == NOTE_NOTECUT || m->note == NOTE_FADE)
+ if(m->note == NOTE_NOTECUT)
+ {
+ // convert note cut to EC0
+ m->note = NOTE_NONE;
+ m->command = CMD_MODCMDEX;
+ m->param = 0xC0;
+ } else if(m->note == NOTE_FADE)
+ {
+ // convert note fade to note off
m->note = NOTE_KEYOFF;
-
+ }
+
switch(m->command)
{
case CMD_S3MCMDEX:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-15 16:36:43
|
Revision: 623
http://modplug.svn.sourceforge.net/modplug/?rev=623&view=rev
Author: saga-games
Date: 2010-06-15 16:36:36 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
[Fix] Note Properties: Fixed a null pointer related crash when accessing the note properties of malicious and not-so-malicious modules (f.e. jt_pools.xm) which have more samples than MAX_INSTRUMENTS (256).
Modified Paths:
--------------
trunk/OpenMPT/mptrack/dlg_misc.cpp
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-06-13 17:54:27 UTC (rev 622)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-06-15 16:36:36 UTC (rev 623)
@@ -1391,13 +1391,13 @@
{
// instrument / sample
combo->SetItemData(combo->AddString("No Instrument"), 0);
- UINT max = max(pSndFile->m_nInstruments, pSndFile->m_nSamples); // instrument / sample mode
- for (UINT i = 1; i <= max; i++)
+ const UINT nmax = pSndFile->GetNumInstruments() ? pSndFile->GetNumInstruments() : pSndFile->GetNumSamples();
+ for (UINT i = 1; i <= nmax; i++)
{
wsprintf(s, "%02d: ", i);
int k = strlen(s);
// instrument / sample
- if (pSndFile->m_nInstruments)
+ if (pSndFile->GetNumInstruments())
{
if (pSndFile->Instruments[i])
memcpy(s+k, pSndFile->Instruments[i]->name, 32);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-13 17:54:33
|
Revision: 622
http://modplug.svn.sourceforge.net/modplug/?rev=622&view=rev
Author: saga-games
Date: 2010-06-13 17:54:27 +0000 (Sun, 13 Jun 2010)
Log Message:
-----------
[Fix] Pattern Editor: When the first column of a pattern selection (larger than one selection field) was the param column, PCNote values in this column were not reset properly.
[Fix] Pattern Editor: Inserting a pattern in MOD or S3M format behaved wrong since rev. 616.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_pat.cpp
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-06-12 13:17:16 UTC (rev 621)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-06-13 17:54:27 UTC (rev 622)
@@ -890,45 +890,58 @@
UINT chn = i >> 3;
if ((chn >= pSndFile->m_nChannels) || (row >= pSndFile->Patterns[m_nPattern].GetNumRows())) continue;
MODCOMMAND *m = &p[row * pSndFile->m_nChannels + chn];
- switch(i & 7) {
- case 0: // Clear note
- if (rm.note) {
- if(m->IsPcNote())
- { // Clear whole row if clearing PC note
- m->Clear();
- invalidateAllCols = true;
- }
- else
- {
- m->note = NOTE_NONE;
- if (ITStyle) m->instr = 0;
- }
-
+ switch(i & 7)
+ {
+ case NOTE_COLUMN: // Clear note
+ if (rm.note)
+ {
+ if(m->IsPcNote())
+ { // Clear whole row if clearing PC note
+ m->Clear();
+ invalidateAllCols = true;
}
- break;
- case 1: // Clear instrument
- if (rm.instrument) {
- m->instr = 0;
+ else
+ {
+ m->note = NOTE_NONE;
+ if (ITStyle) m->instr = 0;
}
- break;
- case 2: // Clear volume
- if (rm.volume) {
- m->volcmd = m->vol = 0;
+ }
+ break;
+ case INST_COLUMN: // Clear instrument
+ if (rm.instrument)
+ m->instr = 0;
+ break;
+ case VOL_COLUMN: // Clear volume
+ if (rm.volume)
+ m->volcmd = m->vol = 0;
+ break;
+ case EFFECT_COLUMN: // Clear Command
+ if (rm.command)
+ {
+ m->command = 0;
+ if(m->IsPcNote())
+ {
+ m->SetValueEffectCol(0);
+ invalidateAllCols = true;
}
- break;
- case 3: // Clear Command
- if (rm.command) {
- m->command = 0;
- if(m->IsPcNote()) m->SetValueEffectCol(0);
+ }
+ break;
+ case PARAM_COLUMN: // Clear Command Param
+ if (rm.parameter)
+ {
+ m->param = 0;
+ if(m->IsPcNote())
+ {
+ m->SetValueEffectCol(0);
+ // first column => update effect column char
+ if(i == (m_dwBeginSel & 0xFFFF))
+ {
+ m_dwBeginSel--;
+ }
}
- break;
- case 4: // Clear Command Param
- if (rm.parameter) {
- m->param = 0;
- }
- break;
+ }
+ break;
} //end switch
-
} //end selected columns
} //end selected rows
@@ -1548,12 +1561,10 @@
{
if (r + nrows >= maxrow)
{
- m->note = m->instr = 0;
- m->volcmd = m->vol = 0;
- m->command = m->param = 0;
+ m->Clear();
} else
{
- *m = *(m+pSndFile->m_nChannels*nrows);
+ *m = *(m + pSndFile->m_nChannels * nrows);
}
}
}
@@ -1616,12 +1627,10 @@
{
if (r <= row)
{
- m->note = m->instr = 0;
- m->volcmd = m->vol = 0;
- m->command = m->param = 0;
+ m->Clear();
} else
{
- *m = *(m-pSndFile->m_nChannels);
+ *m = *(m - pSndFile->m_nChannels);
}
}
}
@@ -4539,7 +4548,7 @@
void CViewPattern::OnClearField(int field, bool step, bool ITStyle)
-//--------------------------------------------------
+//-----------------------------------------------------------------
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
CModDoc *pModDoc = GetDocument();
@@ -4547,7 +4556,7 @@
if ((pModDoc) && (pMainFrm))
{
//if we have a selection we want to do something different
- if (m_dwBeginSel!=m_dwEndSel)
+ if (m_dwBeginSel != m_dwEndSel)
{
OnClearSelection(ITStyle);
return;
@@ -4561,12 +4570,12 @@
switch(field)
{
- case 0: if(p->IsPcNote()) p->Clear(); else {p->note = NOTE_NONE; if (ITStyle) p->instr = 0;} break; //Note
- case 1: p->instr = 0; break; //instr
- case 2: p->vol = 0; p->volcmd = 0; break; //Vol
- case 3: p->command = 0; break; //Effect
- case 4: p->param = 0; break; //Param
- default: p->Clear(); //If not specified, delete them all! :)
+ case NOTE_COLUMN: if(p->IsPcNote()) p->Clear(); else {p->note = NOTE_NONE; if (ITStyle) p->instr = 0;} break; //Note
+ case INST_COLUMN: p->instr = 0; break; //instr
+ case VOL_COLUMN: p->vol = 0; p->volcmd = 0; break; //Vol
+ case EFFECT_COLUMN: p->command = 0; break; //Effect
+ case PARAM_COLUMN: p->param = 0; break; //Param
+ default: p->Clear(); //If not specified, delete them all! :)
}
if((field == 3 || field == 4) && (p->IsPcNote()))
p->SetValueEffectCol(0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-12 13:17:22
|
Revision: 621
http://modplug.svn.sourceforge.net/modplug/?rev=621&view=rev
Author: saga-games
Date: 2010-06-12 13:17:16 +0000 (Sat, 12 Jun 2010)
Log Message:
-----------
[Fix] Mod Conversion: When converting to MPTM, "+++" separator patterns are not recognized as subtune indicators anymore, as that was quite annoying.
[Fix] XM Saver: Completely empty patterns are loaded as empty 64-row patterns in FT2, regardless of their original size. This is now being circumvented by adding a D00 effect at the end of such patterns.
[Imp] Note Properties: Set envelope position effect (Lxx in XM) is now explained properly.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/ModSequence.cpp
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-06-11 17:52:43 UTC (rev 620)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-06-12 13:17:16 UTC (rev 621)
@@ -2722,6 +2722,10 @@
}
break;
+ case CMD_SETENVPOSITION:
+ wsprintf(s, "Tick %d", param);
+ break;
+
case CMD_MIDI:
if (param < 0x80)
{
@@ -2788,7 +2792,7 @@
case 0x0A: strcpy(s, "7A: Pan Env On"); break;
case 0x0B: strcpy(s, "7B: Pitch Env Off"); break;
case 0x0C: strcpy(s, "7C: Pitch Env On"); break;
- // intentional fall-through follows
+ // intentional fall-through for non-MPT modules follows
case 0x0D: if(m_SndFile.GetType() == MOD_TYPE_MPT) { strcpy(s, "7D: Force Pitch Env"); break; }
case 0x0E: if(m_SndFile.GetType() == MOD_TYPE_MPT) { strcpy(s, "7E: Force Filter Env"); break; }
default: wsprintf(s, "%02X: undefined", param); break;
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-06-11 17:52:43 UTC (rev 620)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-06-12 13:17:16 UTC (rev 621)
@@ -826,6 +826,8 @@
{
MODCOMMAND *p = Patterns[i];
UINT len = 0;
+ // Empty patterns are always loaded as 64-row patterns in FT2, regardless of their real size...
+ bool emptyPatNeedsFixing = (Patterns[i].GetNumRows() != 64);
memset(&xmph, 0, sizeof(xmph));
xmph[0] = 9;
@@ -876,6 +878,19 @@
}
}
}
+
+ // no need to fix non-empty patterns
+ if(!p->IsEmpty())
+ emptyPatNeedsFixing = false;
+
+ // apparently, completely empty patterns are loaded as empty 64-row patterns in FT2, regardless of their original size.
+ // We have to avoid this, so we add a "break to row 0" command in the last row.
+ if(j == 1 && emptyPatNeedsFixing)
+ {
+ command = 0x0D;
+ param = 0;
+ }
+
if ((note) && (p->instr) && (vol > 0x0F) && (command) && (param))
{
s[len++] = note;
Modified: trunk/OpenMPT/soundlib/ModSequence.cpp
===================================================================
--- trunk/OpenMPT/soundlib/ModSequence.cpp 2010-06-11 17:52:43 UTC (rev 620)
+++ trunk/OpenMPT/soundlib/ModSequence.cpp 2010-06-12 13:17:16 UTC (rev 621)
@@ -396,7 +396,7 @@
const ORDERINDEX nLengthTt = GetLengthTailTrimmed();
for(ORDERINDEX nOrd = 0; nOrd < nLengthTt; nOrd++)
{
- if(!m_pSndFile->Patterns.IsValidIndex(At(nOrd)))
+ if(!m_pSndFile->Patterns.IsValidPat(At(nOrd)) && At(nOrd) != GetIgnoreIndex())
{
hasSepPatterns = true;
break;
@@ -414,7 +414,7 @@
for(ORDERINDEX nOrd = 0; nOrd < GetLengthTailTrimmed(); nOrd++)
{
// end of subsong?
- if(!m_pSndFile->Patterns.IsValidIndex(At(nOrd)))
+ if(!m_pSndFile->Patterns.IsValidPat(At(nOrd)) && At(nOrd) != GetIgnoreIndex())
{
ORDERINDEX oldLength = GetLengthTailTrimmed();
// remove all separator patterns between current and next subsong first
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-11 17:52:49
|
Revision: 620
http://modplug.svn.sourceforge.net/modplug/?rev=620&view=rev
Author: saga-games
Date: 2010-06-11 17:52:43 +0000 (Fri, 11 Jun 2010)
Log Message:
-----------
[Imp] IT Saver: If a mixplug is specified for an IT instrument and no MIDI channel is assigned, the mixplug is written into the IT instrument header (in MPT 1.16's old manner), so that MPT 1.16 / XMPlay / BASS can make us of "FX Send" again. (tx Skaven)
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-06-09 19:44:45 UTC (rev 619)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-06-11 17:52:43 UTC (rev 620)
@@ -2048,12 +2048,20 @@
memcpy(iti.name, pIns->name, 26);
iti.mbank = pIns->wMidiBank;
iti.mpr = pIns->nMidiProgram;
- iti.mch = pIns->nMidiChannel;
+ if(pIns->nMidiChannel || pIns->nMixPlug == 0)
+ {
+ // default. prefer midi channel over mixplug to keep the semantics intact.
+ iti.mch = pIns->nMidiChannel;
+ } else
+ {
+ // keep compatibility with MPT 1.16's instrument format if possible, as XMPlay/BASS also uses this.
+ iti.mch = pIns->nMixPlug + 128;
+ }
iti.nna = pIns->nNNA;
//if (pIns->nDCT<DCT_PLUGIN) iti.dct = pIns->nDCT; else iti.dct =0;
iti.dct = pIns->nDCT; //rewbs.instroVSTi: will other apps barf if they get an unknown DCT?
iti.dca = pIns->nDNA;
- iti.fadeout = min(pIns->nFadeOut >> 5 , 256);
+ iti.fadeout = min(pIns->nFadeOut >> 5, 256);
iti.pps = pIns->nPPS;
iti.ppc = pIns->nPPC;
iti.gbv = (BYTE)(pIns->nGlobalVol << 1);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-09 19:44:52
|
Revision: 619
http://modplug.svn.sourceforge.net/modplug/?rev=619&view=rev
Author: saga-games
Date: 2010-06-09 19:44:45 +0000 (Wed, 09 Jun 2010)
Log Message:
-----------
[Imp] Song Length Estimation: Also taking the weird E60 bug into account here... (though this is still not very precise).
[Ref] Song Length Estimation: Using vectors instead of large fixed-size arrays.
[Imp] Treeview: Ask for confirmation when deleting things
[Mod] Paste code: Changing the IsEmpty call back to old behaviour. It doesn't seem to make a difference, but let's better be safe than sorry.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/View_tre.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-06-06 16:33:09 UTC (rev 618)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-06-09 19:44:45 UTC (rev 619)
@@ -1399,7 +1399,7 @@
// if the original modcommand was empty as otherwise the unchanged parts
// of the old modcommand would falsely be interpreted being of type
// origFormat and ConvertCommand could change them.
- if (origFormat != m_SndFile.m_nType && (doMixPaste == false || origModCmd.IsEmpty()))
+ if (origFormat != m_SndFile.m_nType && (doMixPaste == false || origModCmd.IsEmpty(false)))
m_SndFile.ConvertCommand(&(m[col]), origFormat, m_SndFile.m_nType);
}
Modified: trunk/OpenMPT/mptrack/View_tre.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_tre.cpp 2010-06-06 16:33:09 UTC (rev 618)
+++ trunk/OpenMPT/mptrack/View_tre.cpp 2010-06-09 19:44:45 UTC (rev 619)
@@ -1393,6 +1393,7 @@
const uint64 modItem = GetModItem(hItem);
const uint32 modItemType = GetModItemType(modItem);
const uint32 modItemID = GetModItemID(modItem);
+ TCHAR s[64];
PMODTREEDOCINFO pInfo = DocInfo[m_nDocNdx];
CModDoc *pModDoc = (pInfo) ? pInfo->pModDoc : nullptr;
@@ -1402,12 +1403,16 @@
case MODITEM_SEQUENCE:
if (pModDoc && pSndFile)
{
+ wsprintf(s, _T("Delete sequence %d?"), modItemID & 0xFFFF);
+ if(MessageBox(s, _T("Confirmation"), MB_YESNO | MB_DEFBUTTON2) == IDNO) break;
pSndFile->Order.RemoveSequence((SEQUENCEINDEX)(modItemID & 0xFFFF));
pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, NULL);
}
break;
case MODITEM_ORDER:
+ wsprintf(s, _T("Delete order %d?"), modItemID & 0xFFFF);
+ if(MessageBox(s, _T("Confirmation"), MB_YESNO | MB_DEFBUTTON2) == IDNO) break;
if ((pModDoc) && (pModDoc->RemoveOrder((SEQUENCEINDEX)(modItemID >> 16), (ORDERINDEX)(modItemID & 0xFFFF))))
{
pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, NULL);
@@ -1415,25 +1420,28 @@
break;
case MODITEM_PATTERN:
+ wsprintf(s, _T("Delete pattern %d?"), modItemID & 0xFFFF);
+ if(MessageBox(s, _T("Confirmation"), MB_YESNO | MB_DEFBUTTON2) == IDNO) break;
if ((pModDoc) && (pModDoc->RemovePattern((PATTERNINDEX)modItemID)))
{
- //pModDoc->UpdateAllViews(NULL, (dwItem << 16)|HINT_PATTERNDATA|HINT_PATNAMES);
pModDoc->UpdateAllViews(NULL, (UINT(modItemID) << HINT_SHIFT_PAT) | HINT_PATTERNDATA|HINT_PATNAMES);
}
break;
case MODITEM_SAMPLE:
+ wsprintf(s, _T("Delete sample %d?"), modItemID & 0xFFFF);
+ if(MessageBox(s, _T("Confirmation"), MB_YESNO | MB_DEFBUTTON2) == IDNO) break;
if ((pModDoc) && (pModDoc->RemoveSample((SAMPLEINDEX)modItemID)))
{
- //pModDoc->UpdateAllViews(NULL, (dwItem << 16) | HINT_SMPNAMES|HINT_SAMPLEDATA|HINT_SAMPLEINFO);
pModDoc->UpdateAllViews(NULL, (UINT(modItemID) << HINT_SHIFT_SMP) | HINT_SMPNAMES|HINT_SAMPLEDATA|HINT_SAMPLEINFO);
}
break;
case MODITEM_INSTRUMENT:
+ wsprintf(s, _T("Delete instrument %d?"), modItemID & 0xFFFF);
+ if(MessageBox(s, _T("Confirmation"), MB_YESNO | MB_DEFBUTTON2) == IDNO) break;
if ((pModDoc) && (pModDoc->RemoveInstrument((INSTRUMENTINDEX)modItemID)))
{
- //pModDoc->UpdateAllViews(NULL, (dwItem << 16)|HINT_MODTYPE|HINT_ENVELOPE|HINT_INSTRUMENT);
pModDoc->UpdateAllViews(NULL, (UINT(modItemID) << HINT_SHIFT_INS) | HINT_MODTYPE|HINT_ENVELOPE|HINT_INSTRUMENT);
}
break;
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-06-06 16:33:09 UTC (rev 618)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-06-09 19:44:45 UTC (rev 619)
@@ -89,29 +89,30 @@
// -> DESC="alternative BPM/Speed interpretation method"
// UINT dwElapsedTime=0, nRow=0, nCurrentPattern=0, nNextPattern=0, nPattern=Order[0];
ROWINDEX nRow = 0;
+ ROWINDEX nNextPatStartRow = 0; // FT2 E60 bug
ORDERINDEX nCurrentPattern = 0;
ORDERINDEX nNextPattern = 0;
PATTERNINDEX nPattern = Order[0];
double dElapsedTime=0.0;
// -! NEW_FEATURE#0022
- UINT nMusicSpeed=m_nDefaultSpeed, nMusicTempo=m_nDefaultTempo, nNextRow=0;
+ UINT nMusicSpeed = m_nDefaultSpeed, nMusicTempo = m_nDefaultTempo, nNextRow = 0;
UINT nMaxRow = 0, nMaxPattern = 0;
LONG nGlbVol = m_nDefaultGlobalVolume, nOldGlbVolSlide = 0;
- BYTE samples[MAX_CHANNELS];
- BYTE instr[MAX_CHANNELS];
- UINT notes[MAX_CHANNELS];
- BYTE vols[MAX_CHANNELS];
- BYTE oldparam[MAX_CHANNELS];
- UINT chnvols[MAX_CHANNELS];
- double patloop[MAX_CHANNELS];
+ vector<BYTE> instr;
+ vector<UINT> notes;
+ vector<BYTE> vols;
+ vector<BYTE> oldparam;
+ vector<UINT> chnvols;
+ vector<double> patloop;
+ vector<ROWINDEX> patloopstart;
- memset(instr, 0, sizeof(instr));
- memset(notes, 0, sizeof(notes));
- memset(vols, 0xFF, sizeof(vols));
- memset(patloop, 0, sizeof(patloop));
- memset(oldparam, 0, sizeof(oldparam));
- memset(chnvols, 64, sizeof(chnvols));
- memset(samples, 0, sizeof(samples));
+ notes.resize(m_nChannels, 0);
+ instr.resize(m_nChannels, 0);
+ vols.resize(m_nChannels, 0xFF);
+ oldparam.resize(m_nChannels, 0);
+ chnvols.resize(m_nChannels, 64);
+ patloop.resize(m_nChannels, 0);
+ patloopstart.resize(m_nChannels, 0);
for(CHANNELINDEX icv = 0; icv < m_nChannels; icv++) chnvols[icv] = ChnSettings[icv].nVolume;
nMaxRow = m_nNextRow;
nMaxPattern = m_nNextPattern;
@@ -183,6 +184,8 @@
{
nNextPattern = nCurrentPattern + 1;
nNextRow = 0;
+ if(IsCompatibleMode(TRK_FASTTRACKER2)) nNextRow = nNextPatStartRow; // FT2 E60 bug
+ nNextPatStartRow = 0;
}
if (!nRow)
{
@@ -221,6 +224,7 @@
case CMD_POSITIONJUMP:
positionJumpOnThisRow=true;
nNextPattern = (ORDERINDEX)param;
+ nNextPatStartRow = 0; // FT2 E60 bug
// see http://lpchip.com/modplug/viewtopic.php?t=2769 - FastTracker resets Dxx if Bxx is called _after_ Dxx
if(!patternBreakOnThisRow || (GetType() == MOD_TYPE_XM))
nNextRow = 0;
@@ -233,9 +237,10 @@
break;
// Pattern Break
case CMD_PATTERNBREAK:
- patternBreakOnThisRow=true;
+ patternBreakOnThisRow = true;
//Try to check next row for XPARAM
nextRow = nullptr;
+ nNextPatStartRow = 0; // FT2 E60 bug
if (nRow < Patterns[nPattern].GetNumRows() - 1)
{
nextRow = Patterns[nPattern] + (nRow+1) * m_nChannels + nChn;
@@ -268,7 +273,7 @@
break;
// Set Tempo
case CMD_TEMPO:
- if ((bAdjust) && (m_nType & (MOD_TYPE_S3M|MOD_TYPE_IT | MOD_TYPE_MPT)))
+ if ((bAdjust) && (m_nType & (MOD_TYPE_S3M | MOD_TYPE_IT | MOD_TYPE_MPT)))
{
if (param) pChn->nOldTempo = (BYTE)param; else param = pChn->nOldTempo;
}
@@ -276,10 +281,10 @@
// Tempo Slide
if ((param & 0xF0) == 0x10)
{
- nMusicTempo += (param & 0x0F) * (nMusicSpeed-1); //rewbs.tempoSlideFix
+ nMusicTempo += (param & 0x0F) * (nMusicSpeed - 1); //rewbs.tempoSlideFix
} else
{
- nMusicTempo -= (param & 0x0F) * (nMusicSpeed-1); //rewbs.tempoSlideFix
+ nMusicTempo -= (param & 0x0F) * (nMusicSpeed - 1); //rewbs.tempoSlideFix
}
// -> CODE#0010
// -> DESC="add extended parameter mechanism to pattern effects"
@@ -298,8 +303,15 @@
if ((param & 0xF0) == 0xE0) nSpeedCount = (param & 0x0F) * nMusicSpeed; else
if ((param & 0xF0) == 0x60)
{
- if (param & 0x0F) dElapsedTime += (dElapsedTime - patloop[nChn]) * (double)(param & 0x0F);
- else patloop[nChn] = dElapsedTime;
+ if (param & 0x0F)
+ {
+ dElapsedTime += (dElapsedTime - patloop[nChn]) * (double)(param & 0x0F);
+ nNextPatStartRow = patloopstart[nChn]; // FT2 E60 bug
+ } else
+ {
+ patloop[nChn] = dElapsedTime;
+ patloopstart[nChn] = nRow;
+ }
}
break;
case CMD_XFINEPORTAUPDOWN:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-06 16:33:15
|
Revision: 618
http://modplug.svn.sourceforge.net/modplug/?rev=618&view=rev
Author: saga-games
Date: 2010-06-06 16:33:09 +0000 (Sun, 06 Jun 2010)
Log Message:
-----------
[Fix] XM Compatibility: Various fixes to the pattern loop command (E6x), including a crucial FT2 bug: When E60 is used on a pattern row x, the following pattern also starts from row x instead of the beginning of the pattern, unless there was a Dxx or Cxx effect.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-06-06 12:40:17 UTC (rev 617)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-06-06 16:33:09 UTC (rev 618)
@@ -236,16 +236,20 @@
patternBreakOnThisRow=true;
//Try to check next row for XPARAM
nextRow = nullptr;
- if (nRow < Patterns[nPattern].GetNumRows()-1) {
+ if (nRow < Patterns[nPattern].GetNumRows() - 1)
+ {
nextRow = Patterns[nPattern] + (nRow+1) * m_nChannels + nChn;
}
- if (nextRow && nextRow->command == CMD_XPARAM) {
+ if (nextRow && nextRow->command == CMD_XPARAM)
+ {
nNextRow = (param<<8) + nextRow->param;
- } else {
+ } else
+ {
nNextRow = param;
}
- if (!positionJumpOnThisRow) {
+ if (!positionJumpOnThisRow)
+ {
nNextPattern = nCurrentPattern + 1;
}
if (bAdjust)
@@ -1912,6 +1916,7 @@
// Position Jump
case CMD_POSITIONJUMP:
+ m_nNextPatStartRow = 0; // FT2 E60 bug
nPosJump = param;
if((m_dwSongFlags & SONG_PATTERNLOOP && m_nSeqOverride == 0))
{
@@ -1927,6 +1932,7 @@
// Pattern Break
case CMD_PATTERNBREAK:
+ m_nNextPatStartRow = 0; // FT2 E60 bug
m = NULL;
if (m_nRow < Patterns[m_nPattern].GetNumRows()-1)
{
@@ -1990,7 +1996,7 @@
// Pattern Break / Position Jump only if no loop running
if ((nBreakRow >= 0) || (nPosJump >= 0))
{
- BOOL bNoLoop = FALSE;
+ bool bNoLoop = false;
if (nPosJump < 0) nPosJump = m_nCurrentPattern+1;
if (nBreakRow < 0) nBreakRow = 0;
@@ -2011,7 +2017,7 @@
if (gdwSoundSetup & SNDMIX_NOBACKWARDJUMPS)
#endif
// Backward jump disabled
- bNoLoop = TRUE;
+ bNoLoop = true;
}
}
}
@@ -2032,7 +2038,7 @@
}
m_nNextPattern = nPosJump;
m_nNextRow = (UINT)nBreakRow;
- m_bPatternTransitionOccurred=true;
+ m_bPatternTransitionOccurred = true;
}
} //Ends condition (nBreakRow >= 0) || (nPosJump >= 0)
}
@@ -3640,8 +3646,8 @@
pChn->nPatternLoopCount--;
if(!pChn->nPatternLoopCount)
{
- //IT compatibility 10. Pattern loops (+ same fix for XM and MOD files)
- if(IsCompatibleMode(TRK_IMPULSETRACKER | TRK_FASTTRACKER2 | TRK_PROTRACKER))
+ //IT compatibility 10. Pattern loops (+ same fix for MOD files)
+ if(IsCompatibleMode(TRK_IMPULSETRACKER | TRK_PROTRACKER))
pChn->nPatternLoop = m_nRow + 1;
return -1;
@@ -3661,6 +3667,7 @@
}
pChn->nPatternLoopCount = param;
}
+ m_nNextPatStartRow = pChn->nPatternLoop; // Nasty FT2 E60 bug emulation!
return pChn->nPatternLoop;
} else
{
@@ -3990,12 +3997,12 @@
return nPlugin;
}
-UINT CSoundFile::GetBestMidiChan(MODCHANNEL *pChn) {
-//--------------------------------------------------
- if (pChn && pChn->pModInstrument) {
- if (pChn->pModInstrument->nMidiChannel) {
- return (pChn->pModInstrument->nMidiChannel-1)&0x0F;
- }
+UINT CSoundFile::GetBestMidiChan(MODCHANNEL *pChn)
+//------------------------------------------------
+{
+ if (pChn && pChn->pModInstrument && pChn->pModInstrument->nMidiChannel)
+ {
+ return (pChn->pModInstrument->nMidiChannel - 1) & 0x0F;
}
return 0;
}
@@ -4003,11 +4010,13 @@
void CSoundFile::HandlePatternTransitionEvents()
//----------------------------------------------
{
- if (m_bPatternTransitionOccurred) {
+ if (m_bPatternTransitionOccurred)
+ {
// MPT sequence override
if ((m_nSeqOverride > 0) && (m_nSeqOverride <= Order.size()))
{
- if (m_dwSongFlags & SONG_PATTERNLOOP) {
+ if (m_dwSongFlags & SONG_PATTERNLOOP)
+ {
m_nPattern = Order[m_nSeqOverride-1];
}
m_nNextPattern = m_nSeqOverride - 1;
@@ -4015,7 +4024,8 @@
}
// Channel mutes
- for (UINT chan=0; chan<m_nChannels; chan++) {
+ for (UINT chan=0; chan<m_nChannels; chan++)
+ {
if (m_bChannelMuteTogglePending[chan])
{
if(m_pModDoc)
@@ -4023,8 +4033,6 @@
m_bChannelMuteTogglePending[chan]=false;
}
}
-
-
m_bPatternTransitionOccurred=false;
}
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-06-06 12:40:17 UTC (rev 617)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-06-06 16:33:09 UTC (rev 618)
@@ -539,6 +539,7 @@
m_nPattern = 0;
m_nCurrentPattern = 0;
m_nNextPattern = 0;
+ m_nNextPatStartRow = 0;
m_nSeqOverride = 0;
m_nRestartPos = 0;
m_nMinPeriod = 16;
@@ -1226,6 +1227,7 @@
m_nBufferCount = 0;
m_nPatternDelay = 0;
m_nFrameDelay = 0;
+ m_nNextPatStartRow = 0;
//m_nSeqOverride = 0;
}
@@ -1272,6 +1274,7 @@
m_nTotalCount = 0;
m_nPatternDelay = 0;
m_nFrameDelay = 0;
+ m_nNextPatStartRow = 0;
}
//m_dwSongFlags &= ~(SONG_PATTERNLOOP|SONG_CPUVERYHIGH|SONG_FADINGSONG|SONG_ENDREACHED|SONG_GLOBALFADE);
m_dwSongFlags &= ~(SONG_CPUVERYHIGH|SONG_FADINGSONG|SONG_ENDREACHED|SONG_GLOBALFADE);
@@ -1381,6 +1384,7 @@
m_nPatternDelay = 0;
m_nFrameDelay = 0;
m_nBufferCount = 0;
+ m_nNextPatStartRow = 0;
m_dwSongFlags |= SONG_PATTERNLOOP;
// m_nSeqOverride = 0;
}
@@ -1397,6 +1401,7 @@
m_nPatternDelay = 0;
m_nFrameDelay = 0;
m_nBufferCount = 0;
+ m_nNextPatStartRow = 0;
m_dwSongFlags &= ~SONG_PATTERNLOOP;
//m_nSeqOverride = 0;
}
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-06-06 12:40:17 UTC (rev 617)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-06-06 16:33:09 UTC (rev 618)
@@ -566,6 +566,7 @@
BYTE m_nMixLevels;
UINT m_nMusicSpeed, m_nMusicTempo;
ROWINDEX m_nNextRow, m_nRow;
+ ROWINDEX m_nNextPatStartRow; // for FT2's E60 bug
PATTERNINDEX m_nPattern;
ORDERINDEX m_nCurrentPattern, m_nNextPattern, m_nRestartPos, m_nSeqOverride;
//NOTE: m_nCurrentPattern and m_nNextPattern refer to order index - not pattern index.
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-06-06 12:40:17 UTC (rev 617)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-06-06 16:33:09 UTC (rev 618)
@@ -625,7 +625,7 @@
BOOL CSoundFile::ProcessRow()
//---------------------------
{
- if (++m_nTickCount >= m_nMusicSpeed * (m_nPatternDelay+1) + m_nFrameDelay)
+ if (++m_nTickCount >= m_nMusicSpeed * (m_nPatternDelay + 1) + m_nFrameDelay)
{
HandlePatternTransitionEvents();
m_nPatternDelay = 0;
@@ -758,8 +758,16 @@
if (m_nNextRow >= Patterns[m_nPattern].GetNumRows())
{
if (!(m_dwSongFlags & SONG_PATTERNLOOP)) m_nNextPattern = m_nCurrentPattern + 1;
+ m_bPatternTransitionOccurred = true;
m_nNextRow = 0;
- m_bPatternTransitionOccurred=true;
+
+ // FT2 idiosyncrasy: When E60 is used on a pattern row x, the following pattern also starts from row x
+ // instead of the beginning of the pattern, unless there was a Dxx or Cxx effect.
+ if(IsCompatibleMode(TRK_FASTTRACKER2))
+ {
+ m_nNextRow = m_nNextPatStartRow;
+ m_nNextPatStartRow = 0;
+ }
}
// Reset channel values
MODCHANNEL *pChn = Chn;
@@ -786,14 +794,16 @@
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) {
+#ifdef MODPLUG_TRACKER
+ if (m_nTickCount >= m_nMusicSpeed * (m_nPatternDelay + 1) + m_nFrameDelay - 1)
+ {
+ if (m_dwSongFlags & SONG_STEP)
+ {
m_dwSongFlags &= ~SONG_STEP;
m_dwSongFlags |= SONG_PAUSED;
}
- #endif // MODPLUG_TRACKER
}
+#endif // MODPLUG_TRACKER
if (m_nTickCount)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-06 12:40:24
|
Revision: 617
http://modplug.svn.sourceforge.net/modplug/?rev=617&view=rev
Author: saga-games
Date: 2010-06-06 12:40:17 +0000 (Sun, 06 Jun 2010)
Log Message:
-----------
[Imp] Note Properties: Show the real finetune values for E5x in MOD/XM and E2x in S3M.
[Fix] The Pattern Loop command did not work properly for rows > 255.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-06-05 13:13:51 UTC (rev 616)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-06-06 12:40:17 UTC (rev 617)
@@ -16,6 +16,8 @@
#include "modsmp_ctrl.h"
#include "CleanupSong.h"
+extern WORD S3MFineTuneTable[16];
+
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
@@ -2118,7 +2120,7 @@
{CMD_MODCMDEX, 0xF0,0x20, 0, MOD_TYPE_MODXM, "Fine porta down"},
{CMD_MODCMDEX, 0xF0,0x30, 0, MOD_TYPE_MODXM, "Glissando Control"},
{CMD_MODCMDEX, 0xF0,0x40, 0, MOD_TYPE_MODXM, "Vibrato waveform"},
- {CMD_MODCMDEX, 0xF0,0x50, 0, MOD_TYPE_MOD, "Set finetune"},
+ {CMD_MODCMDEX, 0xF0,0x50, 0, MOD_TYPE_MODXM, "Set finetune"},
{CMD_MODCMDEX, 0xF0,0x60, 0, MOD_TYPE_MODXM, "Pattern loop"},
{CMD_MODCMDEX, 0xF0,0x70, 0, MOD_TYPE_MODXM, "Tremolo waveform"},
{CMD_MODCMDEX, 0xF0,0x80, 0, MOD_TYPE_MODXM, "Set panning"},
@@ -2803,7 +2805,10 @@
strcpy(s, "smooth");
else
strcpy(s, "semitones");
- break;
+ break;
+ case 0x20: // set finetune
+ wsprintf(s, "%dHz", S3MFineTuneTable[param & 0x0F]);
+ break;
case 0x30: // vibrato waveform
case 0x40: // tremolo waveform
case 0x50: // panbrello waveform
@@ -2884,6 +2889,13 @@
case 0x07: case 0x0F: strcpy(s, "square wave (cont.)"); break;
}
break;
+ case 0x50: // set finetune
+ {
+ int8 nFinetune = (param & 0x0F) << 4;
+ if(m_SndFile.GetType() & MOD_TYPE_XM) nFinetune += 128;
+ wsprintf(s, "%d", nFinetune);
+ }
+ break;
case 0x60: // pattern loop
if((param & 0x0F) == 0x00)
strcpy(s, "loop start");
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-06-05 13:13:51 UTC (rev 616)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-06-06 12:40:17 UTC (rev 617)
@@ -223,7 +223,8 @@
BYTE nCutOff, nResonance;
int nRetrigCount, nRetrigParam;
BYTE nTremorCount, nTremorParam;
- BYTE nPatternLoop, nPatternLoopCount;
+ ROWINDEX nPatternLoop;
+ BYTE nPatternLoopCount;
BYTE nRowNote, nRowInstr;
BYTE nRowVolCmd, nRowVolume;
BYTE nRowCommand, nRowParam;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-05 13:13:58
|
Revision: 616
http://modplug.svn.sourceforge.net/modplug/?rev=616&view=rev
Author: saga-games
Date: 2010-06-05 13:13:51 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
[Imp] Orderlist Editor: When inserting patterns at an empty position, the position counter is not increased anymore.
[Imp] Pattern Editor: Just like in MPT 1.16, it is now possible again to interpolate between an effect and "nothing". In that case, the same value as the already existing one is repeated between the two rows.
[New] Experimental "panic" button on the mainbar. At the moment, it just kills all VSTi and sample voices.
[Imp] Added mnemonic codes to the wave export controls.
[Fix] S3M Loader: Very short sample loops (4 byte) were not loaded properly. Fixes "a tiny problem.s3m" by \slash.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_pat.cpp
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mainbar.cpp
trunk/OpenMPT/mptrack/Mainfrm.h
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/res/MAINBAR.BMP
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/soundlib/Load_s3m.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2010-06-05 12:45:27 UTC (rev 615)
+++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2010-06-05 13:13:51 UTC (rev 616)
@@ -785,11 +785,12 @@
{
rows = pSndFile->Patterns[pat].GetNumRows();
rows = CLAMP(rows, pSndFile->GetModSpecifications().patternRowsMin, pSndFile->GetModSpecifications().patternRowsMax);
+ nCurOrd++; // only if the current oder is already occupied, create a new pattern at the next position.
}
- PATTERNINDEX nNewPat = m_pModDoc->InsertPattern(nCurOrd + 1, rows);
+ PATTERNINDEX nNewPat = m_pModDoc->InsertPattern(nCurOrd, rows);
if ((nNewPat != PATTERNINDEX_INVALID) && (nNewPat < pSndFile->Patterns.Size()))
{
- m_OrderList.SetCurSel(nCurOrd + 1);
+ m_OrderList.SetCurSel(nCurOrd);
m_OrderList.InvalidateRect(NULL, FALSE);
SetCurrentPattern(nNewPat);
m_pModDoc->SetModified();
@@ -879,12 +880,8 @@
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
if (pMainFrm) pMainFrm->PauseMod(m_pModDoc);
CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
- for (UINT i=0; i<MAX_CHANNELS; i++)
- {
- pSndFile->Chn[i].nLength = 0;
- pSndFile->Chn[i].nROfs = 0;
- pSndFile->Chn[i].nLOfs = 0;
- }
+ if(pSndFile)
+ pSndFile->ResetChannels();
}
SwitchToView();
}
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-06-05 12:45:27 UTC (rev 615)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-06-05 13:13:51 UTC (rev 616)
@@ -89,6 +89,7 @@
ON_COMMAND(ID_ADD_SOUNDBANK, OnAddDlsBank)
ON_COMMAND(ID_IMPORT_MIDILIB, OnImportMidiLib)
ON_COMMAND(ID_MIDI_RECORD, OnMidiRecord)
+ ON_COMMAND(ID_PANIC, OnPanic)
ON_COMMAND(ID_PLAYER_PAUSE, OnPlayerPause)
ON_COMMAND_EX(IDD_TREEVIEW, OnBarCheck)
ON_COMMAND_EX(ID_NETLINK_OPENMPTWIKI, OnInternetLink)
@@ -2701,6 +2702,18 @@
}
+void CMainFrame::OnPanic()
+//------------------------
+{
+ // Panic button. At the moment, it just resets all VSTi and sample notes.
+ if(m_pModPlaying && m_pModPlaying->GetSoundFile())
+ {
+ m_pModPlaying->GetSoundFile()->StopAllVsti();
+ m_pModPlaying->GetSoundFile()->ResetChannels();
+ }
+}
+
+
void CMainFrame::OnPrevOctave()
//-----------------------------
{
Modified: trunk/OpenMPT/mptrack/Mainbar.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mainbar.cpp 2010-06-05 12:45:27 UTC (rev 615)
+++ trunk/OpenMPT/mptrack/Mainbar.cpp 2010-06-05 13:13:51 UTC (rev 616)
@@ -210,6 +210,8 @@
// ID_CONTEXT_HELP,
ID_SEPARATOR, //rewbs.reportBug
ID_REPORT_BUG, //rewbs.reportBug
+ ID_SEPARATOR,
+ ID_PANIC,
};
@@ -227,7 +229,7 @@
if (!CToolBar::Create(parent, dwStyle)) return FALSE;
if (!LoadBitmap(IDB_MAINBAR)) return FALSE;
- if (!SetButtons(MainButtons, sizeof(MainButtons)/sizeof(UINT))) return FALSE;
+ if (!SetButtons(MainButtons, ARRAYELEMCOUNT(MainButtons))) return FALSE;
nCurrentSpeed = 6;
nCurrentTempo = 125;
Modified: trunk/OpenMPT/mptrack/Mainfrm.h
===================================================================
--- trunk/OpenMPT/mptrack/Mainfrm.h 2010-06-05 12:45:27 UTC (rev 615)
+++ trunk/OpenMPT/mptrack/Mainfrm.h 2010-06-05 13:13:51 UTC (rev 616)
@@ -684,6 +684,7 @@
afx_msg void OnPrevOctave();
afx_msg void OnNextOctave();
afx_msg void OnOctaveChanged();
+ afx_msg void OnPanic();
afx_msg void OnReportBug(); //rewbs.customKeys
afx_msg BOOL OnInternetLink(UINT nID);
afx_msg LRESULT OnUpdatePosition(WPARAM, LPARAM lParam);
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-06-05 12:45:27 UTC (rev 615)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-06-05 13:13:51 UTC (rev 616)
@@ -1098,7 +1098,6 @@
if ((!bItemSelected) || (!m_nDragItem)) return;
InvalidateRect(&m_rcDragItem, FALSE);
DWORD nItemNo = m_nDragItem & 0xFFFF;
- CSoundFile *pSndFile = pModDoc->GetSoundFile();
switch(m_nDragItem & DRAGITEM_MASK)
{
case DRAGITEM_CHNHEADER:
@@ -1282,7 +1281,7 @@
if (m_nDragItem)
{
DWORD nItem = GetDragItem(point, NULL);
- BOOL b = (nItem == m_nDragItem) ? TRUE : FALSE;
+ bool b = (nItem == m_nDragItem) ? true : false;
if (b != m_bInItemRect)
{
m_bInItemRect = b;
@@ -1441,20 +1440,25 @@
}
const CHANNELINDEX nNumChn = pModDoc->GetNumChannels();
- UINT nChn = current ? (m_dwCursor&0xFFFF)>>3 : (m_nMenuParam&0xFFFF)>>3;
- if (nChn >= nNumChn) {
+ const CHANNELINDEX nChn = current ? (m_dwCursor&0xFFFF)>>3 : (m_nMenuParam&0xFFFF)>>3;
+ if (nChn >= nNumChn)
+ {
return;
}
- if (pModDoc->IsChannelSolo(nChn)) {
+ if (pModDoc->IsChannelSolo(nChn))
+ {
bool nChnIsOnlyUnMutedChan=true;
- for (UINT i=0; i<nNumChn; i++){ //check status of all other chans
- if (i!=nChn && !pModDoc->IsChannelMuted(i)) {
+ for (CHANNELINDEX i = 0; i < nNumChn; i++) //check status of all other chans
+ {
+ if (i != nChn && !pModDoc->IsChannelMuted(i))
+ {
nChnIsOnlyUnMutedChan=false; //found a channel that isn't muted!
break;
}
}
- if (nChnIsOnlyUnMutedChan) { //this is the only playable channel and it is already soloed -> uunMute all
+ if (nChnIsOnlyUnMutedChan) // this is the only playable channel and it is already soloed -> uunMute all
+ {
OnUnmuteAll();
return;
}
@@ -2183,31 +2187,32 @@
bool changed = false;
CArray<UINT,UINT> validChans;
- if (type==EFFECT_COLUMN || type==PARAM_COLUMN) {
+ if (type==EFFECT_COLUMN || type==PARAM_COLUMN)
+ {
CArray<UINT,UINT> moreValidChans;
ListChansWhereColSelected(EFFECT_COLUMN, validChans);
ListChansWhereColSelected(PARAM_COLUMN, moreValidChans);
//CArrayUtils<UINT>::Merge(validChans, moreValidChans); //Causes unresolved external, not sure why yet.
validChans.Append(moreValidChans); //for now we'll just interpolate the same data several times. :)
- } else {
+ } else
+ {
ListChansWhereColSelected(type, validChans);
}
int nValidChans = validChans.GetCount();
//for all channels where type is selected
- for (int chnIdx=0; chnIdx<nValidChans; chnIdx++) {
+ for (int chnIdx=0; chnIdx<nValidChans; chnIdx++)
+ {
UINT nchn = validChans[chnIdx];
UINT row0 = GetSelectionStartRow();
UINT row1 = GetSelectionEndRow();
- if (!IsInterpolationPossible(row0, row1, nchn, type, pSndFile)) {
+ if (!IsInterpolationPossible(row0, row1, nchn, type, pSndFile))
continue; //skip chans where interpolation isn't possible
- }
- if (!changed) { //ensure we save undo buffer only before any channels are interpolated
+ if (!changed) //ensure we save undo buffer only before any channels are interpolated
PrepareUndo(m_dwBeginSel, m_dwEndSel);
- }
bool doPCinterpolation = false;
@@ -2220,7 +2225,8 @@
MODCOMMAND::NOTE PCnote = 0;
uint16 PCinst = 0, PCparam = 0;
- switch(type) {
+ switch(type)
+ {
case NOTE_COLUMN:
vsrc = srcCmd.note;
vdest = destCmd.note;
@@ -2232,6 +2238,14 @@
vdest = destCmd.vol;
vcmd = srcCmd.volcmd;
verr = (distance * 63) / 128;
+ if(srcCmd.volcmd == VOLCMD_NONE)
+ {
+ vsrc = vdest;
+ vcmd = destCmd.volcmd;
+ } else if(destCmd.volcmd == VOLCMD_NONE)
+ {
+ vdest = vsrc;
+ }
break;
case PARAM_COLUMN:
case EFFECT_COLUMN:
@@ -2252,6 +2266,14 @@
vsrc = srcCmd.param;
vdest = destCmd.param;
vcmd = srcCmd.command;
+ if(srcCmd.command == CMD_NONE)
+ {
+ vsrc = vdest;
+ vcmd = destCmd.command;
+ } else if(destCmd.command == CMD_NONE)
+ {
+ vdest = vsrc;
+ }
}
verr = (distance * 63) / 128;
break;
@@ -3128,6 +3150,7 @@
const bool bLiveRecord = IsLiveRecord(*pModDoc, *pSndFile);
ModCommandPos editpos = GetEditPos(*pSndFile, bLiveRecord);
MODCOMMAND* p = GetModCommand(*pSndFile, editpos);
+ pModDoc->GetPatternUndo()->PrepareUndo(editpos.nPat, editpos.nChn, editpos.nRow, editpos.nChn, editpos.nRow);
p->Set(NOTE_PCS, mappedIndex, static_cast<uint16>(paramIndex), static_cast<uint16>((paramValue * MODCOMMAND::maxColumnValue)/127));
if(bLiveRecord == false)
InvalidateRow(editpos.nRow);
@@ -5185,12 +5208,12 @@
//---------------------------------------------------
-bool CViewPattern::IsInterpolationPossible(UINT startRow, UINT endRow,
- UINT chan, PatternColumns colType, CSoundFile* pSndFile) {
-//---------------------------------------------------------------------------------------
- if (startRow == endRow) {
+bool CViewPattern::IsInterpolationPossible(ROWINDEX startRow, ROWINDEX endRow, CHANNELINDEX chan,
+ PatternColumns colType, CSoundFile* pSndFile)
+//--------------------------------------------------------------------------------------
+{
+ if (startRow == endRow)
return false;
- }
bool result = false;
const MODCOMMAND startRowMC = *pSndFile->Patterns[m_nPattern].GetpModCommand(startRow, chan);
@@ -5200,21 +5223,22 @@
if(colType == EFFECT_COLUMN && (startRowMC.IsPcNote() || endRowMC.IsPcNote()))
return true;
- switch (colType) {
+ switch (colType)
+ {
case NOTE_COLUMN:
startRowCmd = startRowMC.note;
endRowCmd = endRowMC.note;
- result = (startRowCmd>0 && endRowCmd>0);
+ result = (startRowCmd >= NOTE_MIN && endRowCmd >= NOTE_MIN);
break;
case EFFECT_COLUMN:
startRowCmd = startRowMC.command;
endRowCmd = endRowMC.command;
- result = (startRowCmd == endRowCmd) && (startRowCmd>0 && endRowCmd>0);
+ result = (startRowCmd == endRowCmd && startRowCmd != CMD_NONE) || (startRowCmd != CMD_NONE && endRowCmd == CMD_NONE) || (startRowCmd == CMD_NONE && endRowCmd != CMD_NONE);
break;
case VOL_COLUMN:
startRowCmd = startRowMC.volcmd;
endRowCmd = endRowMC.volcmd;
- result = (startRowCmd == endRowCmd) && (startRowCmd>0 && endRowCmd>0);
+ result = (startRowCmd == endRowCmd && startRowCmd != VOLCMD_NONE) || (startRowCmd != VOLCMD_NONE && endRowCmd == VOLCMD_NONE) || (startRowCmd == VOLCMD_NONE && endRowCmd != VOLCMD_NONE);
break;
default:
result = false;
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2010-06-05 12:45:27 UTC (rev 615)
+++ trunk/OpenMPT/mptrack/View_pat.h 2010-06-05 13:13:51 UTC (rev 616)
@@ -346,7 +346,7 @@
static CHANNELINDEX GetChanFromCursor(DWORD cursor);
static UINT GetColTypeFromCursor(DWORD cursor);
- bool IsInterpolationPossible(UINT startRow, UINT endRow, UINT chan, PatternColumns colType, CSoundFile* pSndFile);
+ bool IsInterpolationPossible(ROWINDEX startRow, ROWINDEX endRow, CHANNELINDEX chan, PatternColumns colType, CSoundFile* pSndFile);
void Interpolate(PatternColumns type);
// Return true if recording live (i.e. editing while following playback).
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2010-06-05 12:45:27 UTC (rev 615)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2010-06-05 13:13:51 UTC (rev 616)
@@ -294,24 +294,24 @@
GROUPBOX "Render",IDC_STATIC,6,6,192,114
COMBOBOX IDC_COMBO1,18,18,54,82,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO2,78,18,73,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "Change Player Options",IDC_PLAYEROPTIONS,18,36,81,14,BS_CENTER
- CONTROL "Normalize Output (experimental)",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,84,168,12
- CONTROL "High quality resampling",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,112,36,84,10
- CONTROL "Slow render (for Kontakt+DFD)",IDC_GIVEPLUGSIDLETIME,
+ PUSHBUTTON "Change Player &Options",IDC_PLAYEROPTIONS,18,36,81,14,BS_CENTER
+ CONTROL "&Normalize Output (experimental)",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,84,168,12
+ CONTROL "&High quality resampling",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,112,36,84,10
+ CONTROL "Slow &render (for Kontakt+DFD)",IDC_GIVEPLUGSIDLETIME,
"Button",BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE | WS_TABSTOP,18,97,168,12
GROUPBOX "Limit",IDC_STATIC,6,126,192,90
- CONTROL "Limit file size to: (KBytes)",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,138,111,11
+ CONTROL "Limit file &size to: (KBytes)",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,138,111,11
EDITTEXT IDC_EDIT1,138,138,50,12,ES_AUTOHSCROLL
- CONTROL "Limit song length to: (seconds)",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,158,111,10
+ CONTROL "Limit song &length to: (seconds)",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,158,111,10
EDITTEXT IDC_EDIT2,138,157,50,12,ES_AUTOHSCROLL
LTEXT "Play:",IDC_STATIC,18,174,37,8
- CONTROL "Entire song",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,18,186,104,10
- CONTROL "From position",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,18,199,58,10
+ CONTROL "&Entire song",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,18,186,104,10
+ CONTROL "From &position",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,18,199,58,10
EDITTEXT IDC_EDIT3,78,198,24,12,ES_AUTOHSCROLL | ES_NUMBER
CTEXT "to",IDC_STATIC,105,200,8,8
EDITTEXT IDC_EDIT4,117,198,24,12,ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "Channel mode (one file per channel)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,168,12
- CONTROL "Instrument mode (one file per instrument)",IDC_CHECK6,
+ CONTROL "&Channel mode (one file per channel)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,168,12
+ CONTROL "&Instrument mode (one file per instrument)",IDC_CHECK6,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,168,12
END
@@ -1876,10 +1876,10 @@
MENUITEM "&Close", ID_FILE_CLOSE
MENUITEM "&Save\tCtrl+S", ID_FILE_SAVE
MENUITEM "Save &As...", ID_FILE_SAVE_AS
- MENUITEM "Save as &Wave...", ID_FILE_SAVEASWAVE
- MENUITEM "Save as M&P3...", ID_FILE_SAVEASMP3
+ MENUITEM "Export &unraped...", ID_FILE_SAVECOMPAT
+ MENUITEM "Export as &Wave...", ID_FILE_SAVEASWAVE
+ MENUITEM "Export as M&P3...", ID_FILE_SAVEASMP3
MENUITEM "Export as M&IDI...", ID_FILE_SAVEMIDI
- MENUITEM "Export &unraped...", ID_FILE_SAVECOMPAT
MENUITEM SEPARATOR
MENUITEM "Import &MIDI Library...", ID_IMPORT_MIDILIB
MENUITEM "Add Sound &Bank...", ID_ADD_SOUNDBANK
@@ -2380,6 +2380,11 @@
IDS_SOUNDTOUCH_LOADFAILURE "Unable to load OpenMPT_soundtouch_i16.dll."
END
+STRINGTABLE
+BEGIN
+ ID_PANIC "Kill all VSTi and sample voices\nStop all hanging VSTi and sample voices"
+END
+
#endif // Englisch (USA) resources
/////////////////////////////////////////////////////////////////////////////
Modified: trunk/OpenMPT/mptrack/res/MAINBAR.BMP
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2010-06-05 12:45:27 UTC (rev 615)
+++ trunk/OpenMPT/mptrack/resource.h 2010-06-05 13:13:51 UTC (rev 616)
@@ -1208,6 +1208,7 @@
#define ID_PATTERN_EDIT_PCNOTE_PLUGIN 60448
#define ID_ENVELOPE_ZOOM_IN 60449
#define ID_ENVELOPE_ZOOM_OUT 60450
+#define ID_PANIC 60451
// Next default values for new objects
//
@@ -1215,7 +1216,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 526
-#define _APS_NEXT_COMMAND_VALUE 60451
+#define _APS_NEXT_COMMAND_VALUE 60452
#define _APS_NEXT_CONTROL_VALUE 2428
#define _APS_NEXT_SYMED_VALUE 901
#endif
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-06-05 12:45:27 UTC (rev 615)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-06-05 13:13:51 UTC (rev 616)
@@ -382,7 +382,7 @@
insfile[iSmp] += ((DWORD)(BYTE)s[0x0D]) << 20;
if (insfile[iSmp] > dwMemLength) insfile[iSmp] &= 0xFFFF;
- if(Samples[iSmp].nLoopEnd <= 4)
+ if(Samples[iSmp].nLoopEnd < 2)
Samples[iSmp].nLoopStart = Samples[iSmp].nLoopEnd = 0;
if ((Samples[iSmp].nLoopStart >= Samples[iSmp].nLoopEnd) || (Samples[iSmp].nLoopEnd - Samples[iSmp].nLoopStart < 1))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-05 12:45:34
|
Revision: 615
http://modplug.svn.sourceforge.net/modplug/?rev=615&view=rev
Author: saga-games
Date: 2010-06-05 12:45:27 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
[Ref] Quite a bit of refactoring...
[Imp] To make the menus a bit more consistent, WAV and MP3 menu points are now also called "Export as" instead of "Save as".
[Mod] Updated muParser vc2008 project file
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CleanupSong.cpp
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/InputHandler.cpp
trunk/OpenMPT/mptrack/Undo.cpp
trunk/OpenMPT/mptrack/Undo.h
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/muParser/build/msvc2008/muparser_muParser.vcproj
trunk/OpenMPT/soundlib/Load_mo3.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/modcommand.h
trunk/OpenMPT/soundlib/pattern.cpp
Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -388,26 +388,32 @@
}
for (PATTERNINDEX nPat = maxpat; nPat < maxPatIndex; nPat++) if ((pSndFile->Patterns[nPat]) && (nPat >= nMinToRemove))
{
- MODCOMMAND *m = pSndFile->Patterns[nPat];
- UINT ncmd = pSndFile->m_nChannels * pSndFile->Patterns[nPat].GetNumRows();
- for (UINT i=0; i<ncmd; i++)
+ const MODCOMMAND *m = pSndFile->Patterns[nPat];
+ bool bEmptyPat = true;
+ size_t ncmd = pSndFile->m_nChannels * pSndFile->Patterns[nPat].GetNumRows();
+ for (size_t i = 0; i < ncmd; i++)
{
- if ((m[i].note) || (m[i].instr) || (m[i].volcmd) || (m[i].command)) goto NotEmpty;
+ if(m[i].IsEmpty())
+ {
+ bEmptyPat = false;
+ break;
+ }
}
- pSndFile->Patterns.Remove(nPat);
- nPatRemoved++;
-NotEmpty:
- ;
+ if(bEmptyPat)
+ {
+ pSndFile->Patterns.Remove(nPat);
+ nPatRemoved++;
+ }
}
- UINT bWaste = 0;
+ UINT nWaste = 0;
for (UINT ichk=0; ichk < maxPatIndex; ichk++)
{
- if ((pSndFile->Patterns[ichk]) && (!bPatUsed[ichk])) bWaste++;
+ if ((pSndFile->Patterns[ichk]) && (!bPatUsed[ichk])) nWaste++;
}
- if ((bRemove) && (bWaste))
+ if ((bRemove) && (nWaste))
{
EndWaitCursor();
- wsprintf(s, "%d pattern%s present in file, but not used in the song\nDo you want to reorder the sequence list and remove these patterns?", bWaste, (bWaste == 1) ? "" : "s");
+ wsprintf(s, "%d pattern%s present in file, but not used in the song\nDo you want to reorder the sequence list and remove these patterns?", nWaste, (nWaste == 1) ? "" : "s");
if (m_wParent->MessageBox(s, "Pattern Cleanup", MB_YESNO) != IDYES) return false;
BeginWaitCursor();
}
@@ -431,7 +437,7 @@
}
}
// Add unused patterns at the end
- if ((!bRemove) || (!bWaste))
+ if ((!bRemove) || (!nWaste))
{
for(PATTERNINDEX iadd = 0; iadd < maxPatIndex; iadd++)
{
@@ -539,7 +545,7 @@
MODCOMMAND *p = pSndFile->Patterns[nPat];
if (p)
{
- UINT jmax = pSndFile->Patterns[nPat].GetNumRows() * pSndFile->m_nChannels;
+ UINT jmax = pSndFile->Patterns[nPat].GetNumRows() * pSndFile->GetNumChannels();
for (UINT j=0; j<jmax; j++, p++)
{
if ((p->note) && (p->note <= NOTE_MAX))
@@ -706,7 +712,7 @@
for (PATTERNINDEX nPat = 0; nPat < pSndFile->Patterns.Size(); nPat++) if (pSndFile->Patterns[nPat])
{
MODCOMMAND *m = pSndFile->Patterns[nPat];
- for(UINT len = pSndFile->Patterns[nPat].GetNumRows() * pSndFile->m_nChannels; len; m++, len--)
+ for(UINT len = pSndFile->Patterns[nPat].GetNumRows() * pSndFile->GetNumChannels(); len; m++, len--)
{
if(m->instr <= pSndFile->m_nSamples) m->instr = (BYTE)nSampleMap[m->instr];
}
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -1812,12 +1812,12 @@
commands[kcFileSaveAs].isDummy = false;
commands[kcFileSaveAsWave].UID = 1351;
- commands[kcFileSaveAsWave].Message = "File/Save as Wave";
+ commands[kcFileSaveAsWave].Message = "File/Export as Wave";
commands[kcFileSaveAsWave].isHidden = false;
commands[kcFileSaveAsWave].isDummy = false;
commands[kcFileSaveAsMP3].UID = 1352;
- commands[kcFileSaveAsMP3].Message = "File/Save as MP3";
+ commands[kcFileSaveAsMP3].Message = "File/Export as MP3";
commands[kcFileSaveAsMP3].isHidden = false;
commands[kcFileSaveAsMP3].isDummy = false;
Modified: trunk/OpenMPT/mptrack/InputHandler.cpp
===================================================================
--- trunk/OpenMPT/mptrack/InputHandler.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/mptrack/InputHandler.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -420,8 +420,8 @@
case ID_FILE_CLOSE: s="&Close\t"; c=kcFileClose; break;
case ID_FILE_SAVE: s="&Save\t"; c=kcFileSave; break;
case ID_FILE_SAVE_AS: s="Save &As...\t"; c=kcFileSaveAs; break;
- case ID_FILE_SAVEASWAVE: s="Save as &Wave...\t"; c=kcFileSaveAsWave; break;
- case ID_FILE_SAVEASMP3: s="Save as M&P3...\t"; c=kcFileSaveAsMP3; break;
+ case ID_FILE_SAVEASWAVE: s="Export as &Wave...\t"; c=kcFileSaveAsWave; break;
+ case ID_FILE_SAVEASMP3: s="Export as M&P3...\t"; c=kcFileSaveAsMP3; break;
case ID_FILE_SAVEMIDI: s="Export as M&IDI...\t"; c=kcFileSaveMidi; break;
case ID_FILE_SAVECOMPAT: s="Compatibility &Export...\t"; c=kcFileExportCompat; break;
case ID_IMPORT_MIDILIB: s="Import &MIDI Library...\t"; c=kcFileImportMidiLib; break;
Modified: trunk/OpenMPT/mptrack/Undo.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Undo.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/mptrack/Undo.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -33,13 +33,13 @@
// Create undo point.
// Parameter list:
// - pattern: Pattern of which an undo step should be created from.
-// - x: first channel
-// - y: first row
-// - cx: width
-// - cy: height
-// - linkToPrevious: Don't create a separate undo step, but link this to the previous undo event.
-bool CPatternUndo::PrepareUndo(PATTERNINDEX pattern, UINT x, UINT y, UINT cx, UINT cy, bool linkToPrevious)
-//---------------------------------------------------------------------------------------------------------
+// - firstChn: first channel, 0-based.
+// - firstRow: first row, 0-based.
+// - numChns: width
+// - numRows: height
+// - linkToPrevious: Don't create a separate undo step, but link this to the previous undo event. Useful for commands that modify several patterns at once.
+bool CPatternUndo::PrepareUndo(PATTERNINDEX pattern, CHANNELINDEX firstChn, ROWINDEX firstRow, CHANNELINDEX numChns, ROWINDEX numRows, bool linkToPrevious)
+//---------------------------------------------------------------------------------------------------------------------------------------------------------
{
if(m_pModDoc == nullptr) return false;
CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
@@ -47,16 +47,16 @@
PATTERNUNDOBUFFER sUndo;
MODCOMMAND *pUndoData, *pPattern;
- UINT nRows;
+ ROWINDEX nRows;
if (!pSndFile->Patterns.IsValidPat(pattern)) return false;
nRows = pSndFile->Patterns[pattern].GetNumRows();
pPattern = pSndFile->Patterns[pattern];
- if ((y >= nRows) || (cx < 1) || (cy < 1) || (x >= pSndFile->m_nChannels)) return false;
- if (y + cy >= nRows) cy = nRows - y;
- if (x + cx >= pSndFile->m_nChannels) cx = pSndFile->m_nChannels - x;
+ if ((firstRow >= nRows) || (numChns < 1) || (numRows < 1) || (firstChn >= pSndFile->m_nChannels)) return false;
+ if (firstRow + numRows >= nRows) numRows = nRows - firstRow;
+ if (firstChn + numChns >= pSndFile->m_nChannels) numChns = pSndFile->m_nChannels - firstChn;
- pUndoData = new MODCOMMAND[cx * cy];
+ pUndoData = new MODCOMMAND[numChns * numRows];
if (!pUndoData) return false;
const bool bUpdate = !CanUndo(); // update undo status?
@@ -69,17 +69,17 @@
sUndo.pattern = pattern;
sUndo.patternsize = pSndFile->Patterns[pattern].GetNumRows();
- sUndo.column = x;
- sUndo.row = y;
- sUndo.cx = cx;
- sUndo.cy = cy;
+ sUndo.firstChannel = firstChn;
+ sUndo.firstRow = firstRow;
+ sUndo.numChannels = numChns;
+ sUndo.numRows = numRows;
sUndo.pbuffer = pUndoData;
sUndo.linkToPrevious = linkToPrevious;
- pPattern += x + y * pSndFile->m_nChannels;
- for (UINT iy = 0; iy < cy; iy++)
+ pPattern += firstChn + firstRow * pSndFile->m_nChannels;
+ for(ROWINDEX iy = 0; iy < numRows; iy++)
{
- memcpy(pUndoData, pPattern, cx * sizeof(MODCOMMAND));
- pUndoData += cx;
+ memcpy(pUndoData, pPattern, numChns * sizeof(MODCOMMAND));
+ pUndoData += numChns;
pPattern += pSndFile->m_nChannels;
}
@@ -99,7 +99,7 @@
// Restore an undo point. Returns which pattern has been modified.
-// linkedFromPrevious is true if a connected undo even is going to be deleted.
+// linkedFromPrevious is true if a connected undo event is going to be deleted (can only be called internally).
PATTERNINDEX CPatternUndo::Undo(bool linkedFromPrevious)
//------------------------------------------------------
{
@@ -128,7 +128,7 @@
nPattern = pUndo->pattern;
nRows = pUndo->patternsize;
- if(pUndo->column + pUndo->cx <= pSndFile->m_nChannels)
+ if(pUndo->firstChannel + pUndo->numChannels <= pSndFile->m_nChannels)
{
if((!pSndFile->Patterns[nPattern]) || (pSndFile->Patterns[nPattern].GetNumRows() < nRows))
{
@@ -147,12 +147,12 @@
pUndoData = pUndo->pbuffer;
pPattern = pSndFile->Patterns[nPattern];
if (!pSndFile->Patterns[nPattern]) return PATTERNINDEX_INVALID;
- pPattern += pUndo->column + (pUndo->row * pSndFile->m_nChannels);
- for(UINT iy = 0; iy < pUndo->cy; iy++)
+ pPattern += pUndo->firstChannel + (pUndo->firstRow * pSndFile->m_nChannels);
+ for(ROWINDEX iy = 0; iy < pUndo->numRows; iy++)
{
- memcpy(pPattern, pUndoData, pUndo->cx * sizeof(MODCOMMAND));
+ memcpy(pPattern, pUndoData, pUndo->numChannels * sizeof(MODCOMMAND));
pPattern += pSndFile->m_nChannels;
- pUndoData += pUndo->cx;
+ pUndoData += pUndo->numChannels;
}
}
Modified: trunk/OpenMPT/mptrack/Undo.h
===================================================================
--- trunk/OpenMPT/mptrack/Undo.h 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/mptrack/Undo.h 2010-06-05 12:45:27 UTC (rev 615)
@@ -18,8 +18,8 @@
{
PATTERNINDEX pattern;
ROWINDEX patternsize;
- UINT column, row;
- UINT cx, cy;
+ CHANNELINDEX firstChannel, numChannels;
+ ROWINDEX firstRow, numRows;
MODCOMMAND *pbuffer;
bool linkToPrevious;
};
@@ -42,7 +42,7 @@
// Pattern undo functions
void ClearUndo();
- bool PrepareUndo(PATTERNINDEX pattern, UINT x, UINT y, UINT cx, UINT cy, bool linkToPrevious = false);
+ bool PrepareUndo(PATTERNINDEX pattern, CHANNELINDEX firstChn, ROWINDEX firstRow, CHANNELINDEX numChns, ROWINDEX numRows, bool linkToPrevious = false);
PATTERNINDEX Undo();
bool CanUndo();
void RemoveLastUndoStep();
@@ -69,7 +69,7 @@
// We will differentiate between different types of undo actions so that we don't have to copy the whole sample everytime.
enum sampleUndoTypes
{
- sundo_none = 0, // no changes to sample itself, e.g. loop point update
+ sundo_none, // no changes to sample itself, e.g. loop point update
sundo_update, // silence, amplify, normalize, dc offset - update complete sample section
sundo_delete, // delete part of the sample
sundo_invert, // invert sample phase, apply again to undo
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -2828,73 +2828,13 @@
//rewbs.smoothVST
UINT CVstPlugin::GetZxxParameter(UINT nParam)
-//--------------------------------------------------------
+//-------------------------------------------
{
return (UINT) (GetParameter(nParam) * 127.0f+0.5f);
}
//end rewbs.smoothVST
-//rewbs.VSTCompliance: not keeping Eric's preset load/save
-// code as he is not using the standard fxp format.
-/*
-// -> CODE#0002
-// -> DESC="VST plugins presets"
-BOOL CVstPlugin::SavePreset(LPCSTR lpszFileName)
-{
- FILE *f;
- UINT nParams = (m_pEffect->numParams > 0) ? m_pEffect->numParams : 0;
-
- if((!lpszFileName) || (!nParams) || ((f = fopen(lpszFileName, "wb")) == NULL)) return FALSE;
-
- CHAR name[256];
- if(!GetDefaultEffectName(&name[0])) wsprintf(&name[0],"unknown");
-
- DWORD nLen = strlen(name) + 1;
- fwrite(&nLen, 1, sizeof(DWORD), f); // name string length
- fwrite(&name[0], 1, nLen, f); // name string
- nLen = nParams;
- fwrite(&nLen, 1, sizeof(DWORD), f); // number of params
-
- for(UINT i=0; i<nParams; i++){
- FLOAT p = GetParameter(i);
- fwrite(&p, 1, sizeof(FLOAT), f); // i'th param
- }
-
- fclose(f);
- return TRUE;
-}
-
-BOOL CVstPlugin::LoadPreset(LPCSTR lpszFileName)
-{
- FILE *f;
- UINT nParams = (m_pEffect->numParams > 0) ? m_pEffect->numParams : 0;
-
- if((!lpszFileName) || ((f = fopen(lpszFileName, "r")) == NULL)) return FALSE;
-
- FLOAT p;
- DWORD nLen;
- CHAR name[256];
- CHAR ename[256];
-
- fread(&nLen, 1, sizeof(DWORD), f); // name string length
- fread(&name[0], 1, nLen, f); // name string
- fread(&nLen, 1, sizeof(DWORD), f); // number of params
-
- if(!GetDefaultEffectName(&ename[0])) wsprintf(&ename[0],"unknown");
- if(strcmp(name,ename) != 0 || nLen != nParams) { fclose(f); return FALSE; }
-
- for(UINT i=0; i<nParams; i++){
- fread(&p, 1, sizeof(FLOAT), f); // i'th param
- SetParameter(i, p);
- }
-
- fclose(f);
- return TRUE;
-}
-// -! NEW_FEATURE#0002
-*/
-
void CVstPlugin::SaveAllParameters()
//----------------------------------
{
@@ -3097,15 +3037,13 @@
bool CVstPlugin::Bypass(bool bypass)
//-----------------------------------
{
- if (bypass) {
+ if (bypass)
m_pMixStruct->Info.dwInputRouting |= MIXPLUG_INPUTF_BYPASS;
- } else {
- m_pMixStruct->Info.dwInputRouting &=~ MIXPLUG_INPUTF_BYPASS;
- }
+ else
+ m_pMixStruct->Info.dwInputRouting &= ~MIXPLUG_INPUTF_BYPASS;
- if (m_pModDoc) {
+ if (m_pModDoc)
m_pModDoc->UpdateAllViews(NULL, HINT_MIXPLUGINS, NULL);
- }
return bypass;
}
Modified: trunk/OpenMPT/muParser/build/msvc2008/muparser_muParser.vcproj
===================================================================
--- trunk/OpenMPT/muParser/build/msvc2008/muparser_muParser.vcproj 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/muParser/build/msvc2008/muparser_muParser.vcproj 2010-06-05 12:45:27 UTC (rev 615)
@@ -216,7 +216,7 @@
BufferSecurityCheck="true"
RuntimeTypeInfo="true"
ObjectFile="obj\vc_static_dbg\muParser\"
- ProgramDataBaseFileName="..\..\lib\muparserd.pdb"
+ ProgramDataBaseFileName="..\..\lib\muparser.pdb"
WarningLevel="4"
SuppressStartupBanner="true"
DebugInformationFormat="3"
@@ -235,7 +235,7 @@
/>
<Tool
Name="VCLibrarianTool"
- OutputFile="..\..\lib\muparserd.lib"
+ OutputFile="..\..\lib\muparser.lib"
SuppressStartupBanner="true"
/>
<Tool
Modified: trunk/OpenMPT/soundlib/Load_mo3.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mo3.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/soundlib/Load_mo3.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -34,15 +34,15 @@
if(lpStream[3] > 31) return false;
#ifdef MODPLUG_TRACKER
- if(m_pModDoc != nullptr) m_pModDoc->AddToLog(GetStrI18N(__TEXT("The file appears to be a MO3 file, but this OpenMPT build does not support loading MO3 files.")));
+ if(m_pModDoc != nullptr) m_pModDoc->AddToLog(GetStrI18N(_TEXT("The file appears to be a MO3 file, but this OpenMPT build does not support loading MO3 files.")));
#endif // MODPLUG_TRACKER
return false;
#else
- bool b_result = false; // result of trying to load the module, false == fail.
+ bool bResult = false; // result of trying to load the module, false == fail.
int iLen = static_cast<int>(dwMemLength);
- void ** mo3Stream = (void **)&lpStream;
+ void **mo3Stream = (void **)&lpStream;
// try to load unmo3.dll dynamically.
HMODULE unmo3 = LoadLibrary(_TEXT("unmo3.dll"));
@@ -54,24 +54,26 @@
}
else //case: dll loaded succesfully.
{
- UNMO3_DECODE UNMO3_Decode = (UNMO3_DECODE)GetProcAddress(unmo3, "UNMO3_Decode");
- UNMO3_FREE UNMO3_Free = (UNMO3_FREE)GetProcAddress(unmo3, "UNMO3_Free");
+ UNMO3_DECODE UNMO3_Decode = (UNMO3_DECODE)GetProcAddress(unmo3, _TEXT("UNMO3_Decode"));
+ UNMO3_FREE UNMO3_Free = (UNMO3_FREE)GetProcAddress(unmo3, _TEXT("UNMO3_Free"));
- if(UNMO3_Decode != NULL && UNMO3_Free != NULL) {
- if(UNMO3_Decode(mo3Stream, &iLen) == 0) {
+ if(UNMO3_Decode != NULL && UNMO3_Free != NULL)
+ {
+ if(UNMO3_Decode(mo3Stream, &iLen) == 0)
+ {
/* if decoding was successful, mo3Stream and iLen will keep the new
pointers now. */
if(iLen > 0)
{
- b_result = true;
+ bResult = true;
if ((!ReadXM((const BYTE *)*mo3Stream, (DWORD)iLen))
&& (!ReadIT((const BYTE *)*mo3Stream, (DWORD)iLen))
&& (!ReadS3M((const BYTE *)*mo3Stream, (DWORD)iLen))
#ifndef FASTSOUNDLIB
&& (!ReadMTM((const BYTE *)*mo3Stream, (DWORD)iLen))
- #endif
- && (!ReadMod((const BYTE *)*mo3Stream, (DWORD)iLen))) b_result = false;
+ #endif // FASTSOUNDLIB
+ && (!ReadMod((const BYTE *)*mo3Stream, (DWORD)iLen))) bResult = false;
}
UNMO3_Free(*mo3Stream);
@@ -79,8 +81,6 @@
}
FreeLibrary(unmo3);
}
- return b_result;
+ return bResult;
#endif // NO_MO3_SUPPORT
}
-
-
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -1868,7 +1868,7 @@
// Set Channel Global Volume
case CMD_CHANNELVOLUME:
- if (m_nTickCount) break;
+ if ((m_dwSongFlags & SONG_FIRSTTICK) == 0) break;
if (param <= 64)
{
pChn->nGlobalVol = param;
@@ -1913,7 +1913,8 @@
// Position Jump
case CMD_POSITIONJUMP:
nPosJump = param;
- if((m_dwSongFlags & SONG_PATTERNLOOP && m_nSeqOverride == 0)) {
+ if((m_dwSongFlags & SONG_PATTERNLOOP && m_nSeqOverride == 0))
+ {
m_nSeqOverride = param + 1;
//Releasing pattern loop after position jump could cause
//instant jumps - modifying behavior so that now position jumps
@@ -1927,16 +1928,20 @@
// Pattern Break
case CMD_PATTERNBREAK:
m = NULL;
- if (m_nRow < Patterns[m_nPattern].GetNumRows()-1) {
+ if (m_nRow < Patterns[m_nPattern].GetNumRows()-1)
+ {
m = Patterns[m_nPattern] + (m_nRow+1) * m_nChannels + nChn;
}
- if (m && m->command == CMD_XPARAM) {
+ if (m && m->command == CMD_XPARAM)
+ {
nBreakRow = (param<<8) + m->param;
- } else {
+ } else
+ {
nBreakRow = param;
}
- if((m_dwSongFlags & SONG_PATTERNLOOP)) {
+ if((m_dwSongFlags & SONG_PATTERNLOOP))
+ {
//If song is set to loop and a pattern break occurs we should stay on the same pattern.
//Use nPosJump to force playback to "jump to this pattern" rather than move to next, as by default.
//rewbs.to
@@ -1944,25 +1949,22 @@
}
break;
- // Midi Controller
+ // Midi Controller (on first tick only)
case CMD_MIDI:
if(!(m_dwSongFlags & SONG_FIRSTTICK)) break;
- if (param < 0x80){
+ if (param < 0x80)
ProcessMidiMacro(nChn, &m_MidiCfg.szMidiSFXExt[pChn->nActiveMacro << 5], param);
- } else {
+ else
ProcessMidiMacro(nChn, &m_MidiCfg.szMidiZXXExt[(param & 0x7F) << 5], 0);
- }
break;
- //rewbs.smoothVST: Smooth Macro slide
+ // Midi Controller (smooth, i.e. on every tick)
case CMD_SMOOTHMIDI:
- if (param < 0x80) {
+ if (param < 0x80)
ProcessSmoothMidiMacro(nChn, &m_MidiCfg.szMidiSFXExt[pChn->nActiveMacro << 5], param);
- } else {
+ else
ProcessSmoothMidiMacro(nChn, &m_MidiCfg.szMidiZXXExt[(param & 0x7F) << 5], 0);
- }
break;
- //rewbs.smoothVST end
// IMF Commands
case CMD_NOTESLIDEUP:
@@ -2040,7 +2042,8 @@
void CSoundFile::resetEnvelopes(MODCHANNEL* pChn, int envToReset)
//---------------------------------------------------------------
{
- switch (envToReset) {
+ switch (envToReset)
+ {
case ENV_RESET_ALL:
pChn->nVolEnvPosition = 0;
pChn->nPanEnvPosition = 0;
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -1149,11 +1149,11 @@
{
double bpm;
- if (m_nTempoMode == tempo_mode_modern) { // With modern mode, we trust that true bpm
- bpm = static_cast<double>(m_nMusicTempo); // is be close enough to what user chose.
- } // This avoids oscillation due to tick-to-tick corrections.
-
- else { //with other modes, we calculate it:
+ if (m_nTempoMode == tempo_mode_modern) // With modern mode, we trust that true bpm
+ { // is close enough to what user chose.
+ bpm = static_cast<double>(m_nMusicTempo); // This avoids oscillation due to tick-to-tick corrections.
+ } else
+ { //with other modes, we calculate it:
double ticksPerBeat = m_nMusicSpeed*m_nRowsPerBeat; //ticks/beat = ticks/row * rows/beat
double samplesPerBeat = m_nSamplesPerTick*ticksPerBeat; //samps/beat = samps/tick * ticks/beat
bpm = gdwMixingFreq/samplesPerBeat*60; //beats/sec = samps/sec / samps/beat
@@ -1204,7 +1204,7 @@
MODCOMMAND *p = Patterns[Order[nPattern]];
if ((p) && (nRow < Patterns[Order[nPattern]].GetNumRows()))
{
- BOOL bOk = FALSE;
+ bool bOk = false;
while ((!bOk) && (nRow > 0))
{
UINT n = nRow * m_nChannels;
@@ -1212,7 +1212,7 @@
{
if (p[n].note)
{
- bOk = TRUE;
+ bOk = true;
break;
}
}
@@ -1360,7 +1360,7 @@
m_nBufferCount = 0;
for (UINT i=0; i<MAX_CHANNELS; i++)
{
- Chn[i].nROfs = Chn[i].nLOfs = 0;
+ Chn[i].nROfs = Chn[i].nLOfs = Chn[i].nLength = 0;
}
}
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-06-05 12:45:27 UTC (rev 615)
@@ -478,7 +478,7 @@
// Is compatible mode for a specific tracker turned on?
// Hint 1: No need to poll for MOD_TYPE_MPT, as it will automatically be linked with MOD_TYPE_IT when using TRK_IMPULSETRACKER
// Hint 2: Always returns true for MOD / S3M format (if that is the format of the current file)
- bool IsCompatibleMode(MODTYPE type)
+ bool IsCompatibleMode(MODTYPE type) const
{
if(GetType() & type & (MOD_TYPE_MOD | MOD_TYPE_S3M))
return true; // S3M and MOD format don't have compatibility flags, so we will always return true
@@ -1154,10 +1154,10 @@
typedef struct MODFORMATINFO
{
- DWORD dwFormatId; // MOD_TYPE_XXXX
- LPCSTR lpszFormatName; // "ProTracker"
- LPCSTR lpszExtension; // ".xxx"
- DWORD dwPadding;
+ MODTYPE mtFormatId; // MOD_TYPE_XXXX
+ LPCSTR lpszFormatName; // "ProTracker"
+ LPCSTR lpszExtension; // ".xxx"
+ DWORD dwPadding;
} MODFORMATINFO;
extern MODFORMATINFO gModFormatInfo[MAX_MODTYPE];
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -49,7 +49,7 @@
LONG gnDryROfsVol = 0;
LONG gnDryLOfsVol = 0;
int gbInitPlugins = 0;
-int gbInitTables = 0;
+bool gbInitTables = 0;
typedef DWORD (MPPASMCALL * LPCONVERTPROC)(LPVOID, int *, DWORD);
@@ -218,7 +218,7 @@
if (!gbInitTables)
{
SndMixInitializeTables();
- gbInitTables = 1;
+ gbInitTables = true;
}
#endif
if (m_nMaxMixChannels > MAX_CHANNELS) m_nMaxMixChannels = MAX_CHANNELS;
@@ -681,11 +681,13 @@
m_nMusicSpeed = m_nDefaultSpeed;
m_nMusicTempo = m_nDefaultTempo;
m_nGlobalVolume = m_nDefaultGlobalVolume;
- for (UINT i=0; i<MAX_CHANNELS; i++) {
+ for (UINT i=0; i<MAX_CHANNELS; i++)
+ {
Chn[i].dwFlags |= CHN_NOTEFADE | CHN_KEYOFF;
Chn[i].nFadeOutVol = 0;
- if (i < m_nChannels) {
+ if (i < m_nChannels)
+ {
Chn[i].nGlobalVol = ChnSettings[i].nVolume;
Chn[i].nVolume = ChnSettings[i].nVolume;
Chn[i].nPan = ChnSettings[i].nPan;
@@ -696,7 +698,8 @@
Chn[i].nOldHiOffset = 0;
Chn[i].nPortamentoDest = 0;
- if (!Chn[i].nLength) {
+ if (!Chn[i].nLength)
+ {
Chn[i].dwFlags = ChnSettings[i].dwFlags;
Chn[i].nLoopStart = 0;
Chn[i].nLoopEnd = 0;
@@ -715,7 +718,8 @@
m_nCurrentPattern = nRestartPosOverride;
m_dwSongFlags &= ~SONG_BREAKTOROW;
//If restart pos points to +++, move along
- while (Order[m_nCurrentPattern] == Order.GetIgnoreIndex()) {
+ while (Order[m_nCurrentPattern] == Order.GetIgnoreIndex())
+ {
m_nCurrentPattern++;
}
//Check for end of song or bad pattern
@@ -726,19 +730,18 @@
return FALSE;
}
- } else {
+ } else
+ {
m_nCurrentPattern++;
}
- if (m_nCurrentPattern < Order.size()) {
+ if (m_nCurrentPattern < Order.size())
m_nPattern = Order[m_nCurrentPattern];
- } else {
+ else
m_nPattern = Order.GetInvalidPatIndex();
- }
- if ((m_nPattern < Patterns.Size()) && (!Patterns[m_nPattern])) {
+ if ((m_nPattern < Patterns.Size()) && (!Patterns[m_nPattern]))
m_nPattern = Order.GetIgnoreIndex();
- }
}
m_nNextPattern = m_nCurrentPattern;
@@ -1184,7 +1187,8 @@
}
}
// vol is 14-bits
- if (vol) {
+ if (vol)
+ {
// IMPORTANT: pChn->nRealVolume is 14 bits !!!
// -> _muldiv( 14+8, 6+6, 18); => RealVolume: 14-bit result (22+12-20)
@@ -1192,11 +1196,14 @@
//Don't let global volume affect level of sample if
//global volume is going to be applied to master output anyway.
- if (pChn->dwFlags&CHN_SYNCMUTE) {
+ if (pChn->dwFlags & CHN_SYNCMUTE)
+ {
pChn->nRealVolume = 0;
- } else if (m_pConfig->getGlobalVolumeAppliesToMaster()) {
+ } else if (m_pConfig->getGlobalVolumeAppliesToMaster())
+ {
pChn->nRealVolume = _muldiv(vol*MAX_GLOBAL_VOLUME, pChn->nGlobalVol * pChn->nInsVol, 1 << 20);
- } else {
+ } else
+ {
pChn->nRealVolume = _muldiv(vol * m_nGlobalVolume, pChn->nGlobalVol * pChn->nInsVol, 1 << 20);
}
}
@@ -1901,7 +1908,7 @@
if (nRampLength < (LONG)gnVolumeRampSamples) nRampLength = gnVolumeRampSamples;
}
}
-#endif
+#endif // FASTSOUNDLIB
pChn->nRightRamp = nRightDelta / nRampLength;
pChn->nLeftRamp = nLeftDelta / nRampLength;
pChn->nRightVol = pChn->nNewRightVol - ((pChn->nRightRamp * nRampLength) >> VOLUMERAMPPRECISION);
@@ -1931,7 +1938,7 @@
// Note change but no sample
if (pChn->nLeftVU > 128) pChn->nLeftVU = 0;
if (pChn->nRightVU > 128) pChn->nRightVU = 0;
-#endif
+#endif // ENABLE_STEREOVU
if (pChn->nVUMeter > 0xFF) pChn->nVUMeter = 0;
pChn->nLeftVol = pChn->nRightVol = 0;
pChn->nLength = 0;
Modified: trunk/OpenMPT/soundlib/modcommand.h
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.h 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/soundlib/modcommand.h 2010-06-05 12:45:27 UTC (rev 615)
@@ -52,15 +52,21 @@
void Clear() {memset(this, 0, sizeof(MODCOMMAND));}
// Returns true if modcommand is empty, false otherwise.
- bool IsEmpty() const {return (this->note == 0 && this->instr == 0 && this->volcmd == 0 && this->command == 0);}
- //bool IsEmpty() const {return (*this == Empty());}
+ // If ignoreEffectValues is true (default), effect values are ignored are ignored if there is no effect command present.
+ bool IsEmpty(bool ignoreEffectValues = true) const
+ {
+ if(ignoreEffectValues)
+ return (this->note == 0 && this->instr == 0 && this->volcmd == 0 && this->command == 0);
+ else
+ return (*this == Empty());
+ }
// Returns true if instrument column represents plugin index.
bool IsInstrPlug() const {return IsPcNote();}
// Returns true if and only if note is NOTE_PC or NOTE_PCS.
- bool IsPcNote() const {return note == NOTE_PC || note == NOTE_PCS;}
- static bool IsPcNote(NOTE note_id) {return note_id == NOTE_PC || note_id == NOTE_PCS;}
+ bool IsPcNote() const { return note == NOTE_PC || note == NOTE_PCS; }
+ static bool IsPcNote(NOTE note_id) { return note_id == NOTE_PC || note_id == NOTE_PCS; }
// Swap volume and effect column (doesn't do any conversion as it's mainly for importing formats with multiple effect columns, so beware!)
void SwapEffects()
Modified: trunk/OpenMPT/soundlib/pattern.cpp
===================================================================
--- trunk/OpenMPT/soundlib/pattern.cpp 2010-06-03 20:39:27 UTC (rev 614)
+++ trunk/OpenMPT/soundlib/pattern.cpp 2010-06-05 12:45:27 UTC (rev 615)
@@ -116,7 +116,6 @@
//---------------------
{
MODCOMMAND *newPattern, *oldPattern;
- UINT nRows, nChns;
CSoundFile& sndFile = m_rPatternContainer.GetSoundFile();
if(sndFile.m_pModDoc == NULL) return true;
@@ -126,21 +125,21 @@
if ((!m_ModCommands) || (m_Rows > sndFile.GetModSpecifications().patternRowsMax / 2)) return true;
rModDoc.BeginWaitCursor();
- nRows = m_Rows;
- nChns = sndFile.m_nChannels;
- newPattern = CSoundFile::AllocatePattern(nRows*2, nChns);
+ const ROWINDEX nRows = m_Rows;
+ const CHANNELINDEX nChns = sndFile.m_nChannels;
+ newPattern = CSoundFile::AllocatePattern(nRows * 2, nChns);
if (!newPattern) return true;
- const UINT nPattern = m_rPatternContainer.GetIndex(this);
- rModDoc.GetPatternUndo()->PrepareUndo(nPattern, 0,0, nChns, nRows);
+ const PATTERNINDEX nPattern = m_rPatternContainer.GetIndex(this);
+ rModDoc.GetPatternUndo()->PrepareUndo(nPattern, 0, 0, nChns, nRows);
oldPattern = m_ModCommands;
- for (UINT y=0; y<nRows; y++)
+ for (ROWINDEX y = 0; y < nRows; y++)
{
- memcpy(newPattern+y*2*nChns, oldPattern+y*nChns, nChns*sizeof(MODCOMMAND));
+ memcpy(newPattern + y * 2 * nChns, oldPattern + y * nChns, nChns * sizeof(MODCOMMAND));
}
m_ModCommands = newPattern;
m_Rows = nRows * 2;
- CSoundFile::FreePattern(oldPattern); oldPattern= NULL;
+ CSoundFile::FreePattern(oldPattern); oldPattern = nullptr;
rModDoc.SetModified();
rModDoc.UpdateAllViews(NULL, HINT_PATTERNDATA | (nPattern << HINT_SHIFT_PAT), NULL);
rModDoc.EndWaitCursor();
@@ -150,8 +149,6 @@
bool CPattern::Shrink()
//---------------------
{
- UINT nRows, nChns;
-
CSoundFile& sndFile = m_rPatternContainer.GetSoundFile();
if(sndFile.m_pModDoc == NULL) return true;
@@ -160,16 +157,16 @@
if (!m_ModCommands || m_Rows < sndFile.GetModSpecifications().patternRowsMin * 2) return true;
rModDoc.BeginWaitCursor();
- nRows = m_Rows;
- nChns = sndFile.m_nChannels;
- const UINT nPattern = m_rPatternContainer.GetIndex(this);
- rModDoc.GetPatternUndo()->PrepareUndo(nPattern, 0,0, nChns, nRows);
+ ROWINDEX nRows = m_Rows;
+ const CHANNELINDEX nChns = sndFile.m_nChannels;
+ const PATTERNINDEX nPattern = m_rPatternContainer.GetIndex(this);
+ rModDoc.GetPatternUndo()->PrepareUndo(nPattern, 0, 0, nChns, nRows);
nRows /= 2;
- for (UINT y=0; y<nRows; y++)
+ for (ROWINDEX y = 0; y < nRows; y++)
{
MODCOMMAND *psrc = sndFile.Patterns[nPattern] + (y * 2 * nChns);
MODCOMMAND *pdest = sndFile.Patterns[nPattern] + (y * nChns);
- for (UINT x=0; x<nChns; x++)
+ for (CHANNELINDEX x = 0; x < nChns; x++)
{
pdest[x] = psrc[x];
if ((!pdest[x].note) && (!pdest[x].instr))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-03 20:39:34
|
Revision: 614
http://modplug.svn.sourceforge.net/modplug/?rev=614&view=rev
Author: saga-games
Date: 2010-06-03 20:39:27 +0000 (Thu, 03 Jun 2010)
Log Message:
-----------
[Mod] Removed outdated mptrack.exe from repository.
[Mod] Minor changes to install script.
[Mod] Shuffled some lines in History.txt
Modified Paths:
--------------
trunk/OpenMPT/installer/install.iss
trunk/OpenMPT/packageTemplate/History.txt
Removed Paths:
-------------
trunk/OpenMPT/mptrack/bin/mptrack.exe
Modified: trunk/OpenMPT/installer/install.iss
===================================================================
--- trunk/OpenMPT/installer/install.iss 2010-06-02 21:42:47 UTC (rev 613)
+++ trunk/OpenMPT/installer/install.iss 2010-06-03 20:39:27 UTC (rev 614)
@@ -5,7 +5,6 @@
; ISPP is needed for automated version retrieval.
; To download and install ISPP, get the Inno Setup QuickStart Pack from http://www.jrsoftware.org/isdl.php#qsp
-#include "Builtins.iss"
#define GetAppVersion StringChange(GetFileProductVersion("..\mptrack\bin\mptrack.exe"), ",", ".")
#define GetAppVersionShort Copy(GetAppVersion, 1, 4)
@@ -251,15 +250,3 @@
end;
end;
end;
-
-
-
-
-
-
-
-
-
-
-
-
Deleted: trunk/OpenMPT/mptrack/bin/mptrack.exe
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-06-02 21:42:47 UTC (rev 613)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-06-03 20:39:27 UTC (rev 614)
@@ -130,11 +130,10 @@
[Fix] <Jojo> IT Compatibility: Default Vibrato/Tremolo/Panbrello waveform values to sine waveform if out of range (e.g. S35)
IT/MPTM/ITP, Instrument extension handling:
- [Fix] <Jojo> ITP Loader: Instruments flags in ITP files with embedded instrument headers were loaded wrong since revision 415.
[Fix] <re> Fixes to instrument envelope flag handling (broken in 1.18.00.00).
XM
- [Imp] <Jojo> XM Loader: Improved detection of an old version of MPT.
+ [Imp] <Jojo> XM Loader: Improved detection of an old version of MPT (1.09?).
[Fix] <Jojo> XM Loader: Some XMs not made with ModPlug were recognized as files made with MPT.
[Fix] <Jojo> XM Loader: The last XM instrument was not always loaded.
[Fix] <Jojo> XM Loader: Early versions of Skale Tracker (R.I.P.) apparently did stupid things to XM instrument headers, so mpt failed to load such modules. Tested the fix with a few hundred XMs and apparently only one XM (IFULOVE.XM) that I have has a header size that is different from the struct size - and that's the one that caused problems.
@@ -169,6 +168,7 @@
MPTM
[New] <rewbs> Added combined note delay & note cut command for MPTM only (":xy" means delay until tick x and play for y ticks).
[New] <Jojo> MPTM command S7D explicitely enforces pitch envelope, S7E enforces filter envelope.
+ [Fix] <Jojo> MPTM Saving: A missing null pointer check crashed OpenMPT when trying to access a deleted instrument slot.
Module cleanup
[Imp] <Jojo> In the cleanup dialog, mutually exclusive items are now automatically unchecked, to avoid confusion.
@@ -178,12 +178,12 @@
Wave Export
[New] <Jojo> It is now also possible to render by instrument (i.e. one wave file per instrument).
+ [Imp] <Jojo> The "render by channel" mode ignores empty channels now.
[Imp] <Jojo> When switching to another task and switching back to OpenMPT, it is now less likely that the infamous "OpenMPT does not respond" dialog from Windows occours.
Misc
[New] <Jojo> INI Settings: When portable mode is enabled, the most common paths in mptrack.ini are now translated to relative paths (if possible). Plugin paths are not translated to relative paths (yet).
[New] <Jojo> Modules in gzip archives (single-file .gz archives) can now be imported, just to satisfy my laziness when downloading gzipped modules from Amiga Music Preservation. :-P
- [Imp] <Jojo> The wave export "render by channel" mode ignores empty channels now.
[Imp] <Jojo> Mod Loaders: Instead of creating messageboxes in various places, errors are now written to the log and one messagebox is shown for each file.
[Imp] <Jojo> Binary files are now less often falsely recognized as early MOD files (15 samples without header): If the orderlist contains orderlist items > 128, loading is cancelled.
[Imp] <Jojo> Song Properties: Tooltips are shown for various controls.
@@ -191,7 +191,6 @@
[Reg] <rewbs> Removed old "velocity" volume command, which was experimental and unused.
[Mod] <Jojo> Replaced default VU-meter colours for the MPT scheme by more pleasant colours that were already used for the other themes.
[Mod] <Jojo> Updated internet links (ModPlug Central Forums link is now a permalink)
- [Fix] <Jojo> MPTM Saving: A missing null pointer check crashed OpenMPT when trying to access a deleted instrument slot.
[Fix] <Jojo> Multi window edit: When (un)muting a channel from the general tab in window 1, it was instantly shown in the pattern editor of window 2, but not vice versa.
[Fix] <Jojo> Channel Manager: When removing channels using the channel manager, their names were not cleared properly.
[Fix] <Jojo> Song Length Detection: *Much* more accurate song length detection!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-06-02 21:42:54
|
Revision: 613
http://modplug.svn.sourceforge.net/modplug/?rev=613&view=rev
Author: saga-games
Date: 2010-06-02 21:42:47 +0000 (Wed, 02 Jun 2010)
Log Message:
-----------
[Imp] Installer: Version info is now set automatically. To use this new functionally, ISPP is used (see instructions in install.iss)
Modified Paths:
--------------
trunk/OpenMPT/installer/install.iss
Modified: trunk/OpenMPT/installer/install.iss
===================================================================
--- trunk/OpenMPT/installer/install.iss 2010-05-30 20:46:59 UTC (rev 612)
+++ trunk/OpenMPT/installer/install.iss 2010-06-02 21:42:47 UTC (rev 613)
@@ -3,10 +3,16 @@
; http://sagamusix.de/
; http://sagagames.de/
+; ISPP is needed for automated version retrieval.
+; To download and install ISPP, get the Inno Setup QuickStart Pack from http://www.jrsoftware.org/isdl.php#qsp
+#include "Builtins.iss"
+#define GetAppVersion StringChange(GetFileProductVersion("..\mptrack\bin\mptrack.exe"), ",", ".")
+#define GetAppVersionShort Copy(GetAppVersion, 1, 4)
+
[Setup]
AppId={{67903736-E9BB-4664-B148-F62BCAB4FA42}
-AppVerName=OpenMPT 1.18
-AppVersion=1.18.02.00
+AppVerName=OpenMPT {#GetAppVersionShort}
+AppVersion={#GetAppVersion}
AppName=OpenMPT
AppPublisher=OpenMPT Devs / Olivier Lapicque
AppPublisherURL=http://openmpt.com/
@@ -16,7 +22,7 @@
DefaultGroupName=OpenMPT
AllowNoIcons=yes
OutputDir=.\
-OutputBaseFilename=OpenMPT Setup
+OutputBaseFilename=OpenMPT-{#GetAppVersion}-Setup
Compression=lzma2
SolidCompression=yes
WizardImageFile=install-big.bmp
@@ -252,3 +258,8 @@
+
+
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-30 20:47:07
|
Revision: 612
http://modplug.svn.sourceforge.net/modplug/?rev=612&view=rev
Author: saga-games
Date: 2010-05-30 20:46:59 +0000 (Sun, 30 May 2010)
Log Message:
-----------
[Ref] Getting rid of the deprecated PatternSize[] array.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CleanupSong.cpp
trunk/OpenMPT/mptrack/Ctrl_pat.cpp
trunk/OpenMPT/mptrack/Draw_pat.cpp
trunk/OpenMPT/mptrack/EffectVis.cpp
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/PatternGotoDialog.cpp
trunk/OpenMPT/mptrack/Undo.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/mod2midi.cpp
trunk/OpenMPT/soundlib/LOAD_AMF.CPP
trunk/OpenMPT/soundlib/Load_ams.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_mdl.cpp
trunk/OpenMPT/soundlib/Load_mid.cpp
trunk/OpenMPT/soundlib/Load_mod.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/ModSequence.cpp
trunk/OpenMPT/soundlib/Snd_fx.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -389,7 +389,7 @@
for (PATTERNINDEX nPat = maxpat; nPat < maxPatIndex; nPat++) if ((pSndFile->Patterns[nPat]) && (nPat >= nMinToRemove))
{
MODCOMMAND *m = pSndFile->Patterns[nPat];
- UINT ncmd = pSndFile->m_nChannels * pSndFile->PatternSize[nPat];
+ UINT ncmd = pSndFile->m_nChannels * pSndFile->Patterns[nPat].GetNumRows();
for (UINT i=0; i<ncmd; i++)
{
if ((m[i].note) || (m[i].instr) || (m[i].volcmd) || (m[i].command)) goto NotEmpty;
@@ -474,7 +474,7 @@
pSndFile->m_lpszPatternNames = lpszoldpatnames;
if (s[0]) pSndFile->SetPatternName(k, s);
}
- nPatRows[k] = pSndFile->PatternSize[i];
+ nPatRows[k] = pSndFile->Patterns[i].GetNumRows();
pPatterns[k] = pSndFile->Patterns[i];
} else
if (pSndFile->Patterns[i])
@@ -539,7 +539,7 @@
MODCOMMAND *p = pSndFile->Patterns[nPat];
if (p)
{
- UINT jmax = pSndFile->PatternSize[nPat] * pSndFile->m_nChannels;
+ UINT jmax = pSndFile->Patterns[nPat].GetNumRows() * pSndFile->m_nChannels;
for (UINT j=0; j<jmax; j++, p++)
{
if ((p->note) && (p->note <= NOTE_MAX))
@@ -706,7 +706,7 @@
for (PATTERNINDEX nPat = 0; nPat < pSndFile->Patterns.Size(); nPat++) if (pSndFile->Patterns[nPat])
{
MODCOMMAND *m = pSndFile->Patterns[nPat];
- for(UINT len = pSndFile->PatternSize[nPat] * pSndFile->m_nChannels; len; m++, len--)
+ for(UINT len = pSndFile->Patterns[nPat].GetNumRows() * pSndFile->m_nChannels; len; m++, len--)
{
if(m->instr <= pSndFile->m_nSamples) m->instr = (BYTE)nSampleMap[m->instr];
}
@@ -813,7 +813,7 @@
for (PATTERNINDEX iPat = 0; iPat < pSndFile->Patterns.Size(); iPat++) if (pSndFile->Patterns[iPat])
{
MODCOMMAND *p = pSndFile->Patterns[iPat];
- UINT nLen = pSndFile->m_nChannels * pSndFile->PatternSize[iPat];
+ UINT nLen = pSndFile->m_nChannels * pSndFile->Patterns[iPat].GetNumRows();
while (nLen--)
{
if (p->instr)
Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -783,7 +783,7 @@
ROWINDEX rows = 64;
if ((pat < pSndFile->Patterns.Size()) && (pSndFile->Patterns[pat]) && (pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)))
{
- rows = pSndFile->PatternSize[pat];
+ rows = pSndFile->Patterns[pat].GetNumRows();
rows = CLAMP(rows, pSndFile->GetModSpecifications().patternRowsMin, pSndFile->GetModSpecifications().patternRowsMax);
}
PATTERNINDEX nNewPat = m_pModDoc->InsertPattern(nCurOrd + 1, rows);
@@ -824,7 +824,7 @@
ROWINDEX rows = 64;
if (nCurPat < pSndFile->Patterns.Size() && pReplaceIndex[nCurPat] == PATTERNINDEX_INVALID)
{
- rows = pSndFile->PatternSize[nCurPat];
+ rows = pSndFile->Patterns[nCurPat].GetNumRows();
rows = CLAMP(rows, pSndFile->GetModSpecifications().patternRowsMin, pSndFile->GetModSpecifications().patternRowsMax);
PATTERNINDEX nNewPat = m_pModDoc->InsertPattern(nInsertWhere + i, rows);
@@ -832,8 +832,8 @@
{
MODCOMMAND *pSrc = pSndFile->Patterns[nCurPat];
MODCOMMAND *pDest = pSndFile->Patterns[nNewPat];
- UINT n = pSndFile->PatternSize[nCurPat];
- if (pSndFile->PatternSize[nNewPat] < n) n = pSndFile->PatternSize[nNewPat];
+ UINT n = pSndFile->Patterns[nCurPat].GetNumRows();
+ if (pSndFile->Patterns[nNewPat].GetNumRows() < n) n = pSndFile->Patterns[nNewPat].GetNumRows();
n *= pSndFile->m_nChannels;
if (n) memcpy(pDest, pSrc, n * sizeof(MODCOMMAND));
bSuccess = true;
Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Draw_pat.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -460,7 +460,7 @@
yofs = GetYScrollPos();
pSndFile = pModDoc->GetSoundFile();
nColumnWidth = m_szCell.cx;
- nrows = (pSndFile->Patterns[m_nPattern]) ? pSndFile->PatternSize[m_nPattern] : 0;
+ nrows = (pSndFile->Patterns[m_nPattern]) ? pSndFile->Patterns[m_nPattern].GetNumRows() : 0;
ncols = pSndFile->GetNumChannels();
xpaint = m_szHeader.cx;
ypaint = rcClient.top;
@@ -582,7 +582,7 @@
}
if ((bPrevPatFound) && (nPrevPat < pSndFile->Patterns.Size()) && (pSndFile->Patterns[nPrevPat]))
{
- UINT nPrevRows = pSndFile->PatternSize[nPrevPat];
+ UINT nPrevRows = pSndFile->Patterns[nPrevPat].GetNumRows();
UINT n = (nSkip < nPrevRows) ? nSkip : nPrevRows;
ypaint += (nSkip-n)*m_szCell.cy;
@@ -630,7 +630,7 @@
}
if ((bNextPatFound) && (nNextPat < pSndFile->Patterns.Size()) && (pSndFile->Patterns[nNextPat]))
{
- UINT nNextRows = pSndFile->PatternSize[nNextPat];
+ UINT nNextRows = pSndFile->Patterns[nNextPat].GetNumRows();
UINT n = ((UINT)nVisRows < nNextRows) ? nVisRows : nNextRows;
m_Dib.SetBlendMode(0x80);
@@ -1068,7 +1068,7 @@
y1 += dy;
y2 += dy;
nChannels = pSndFile->m_nChannels;
- nRows = pSndFile->PatternSize[m_nPattern];
+ nRows = pSndFile->Patterns[m_nPattern].GetNumRows();
if (x1 < GetXScrollPos()) bLeft = false;
if (x1 >= nChannels) x1 = nChannels - 1;
if (x1 < 0) { x1 = 0; c1 = 0; bLeft = false; }
@@ -1149,7 +1149,7 @@
CSoundFile *pSndFile = pModDoc->GetSoundFile();
SIZE sizeTotal, sizePage, sizeLine;
sizeTotal.cx = m_szHeader.cx + pSndFile->m_nChannels * m_szCell.cx;
- sizeTotal.cy = m_szHeader.cy + pSndFile->PatternSize[m_nPattern] * m_szCell.cy;
+ sizeTotal.cy = m_szHeader.cy + pSndFile->Patterns[m_nPattern].GetNumRows() * m_szCell.cy;
sizeLine.cx = m_szCell.cx;
sizeLine.cy = m_szCell.cy;
sizePage.cx = sizeLine.cx * 2;
@@ -1375,7 +1375,7 @@
CSoundFile *pSndFile = pModDoc->GetSoundFile();
int yofs = GetYScrollPos() - m_nMidRow;
if (n == -1) n = m_nRow;
- if ((n < yofs) || (n >= (int)pSndFile->PatternSize[m_nPattern])) return;
+ if ((n < yofs) || (n >= (int)pSndFile->Patterns[m_nPattern].GetNumRows())) return;
CRect rect;
GetClientRect(&rect);
rect.left = m_szHeader.cx;
@@ -1431,7 +1431,7 @@
s[0] = 0;
if ((!(m_dwStatus & (PATSTATUS_KEYDRAGSEL/*|PATSTATUS_MOUSEDRAGSEL*/))) //rewbs.xinfo: update indicator even when dragging
&& (m_dwBeginSel == m_dwEndSel) && (pSndFile->Patterns[m_nPattern])
- && (m_nRow < pSndFile->PatternSize[m_nPattern]) && (nChn < pSndFile->m_nChannels))
+ && (m_nRow < pSndFile->Patterns[m_nPattern].GetNumRows()) && (nChn < pSndFile->m_nChannels))
{
MODCOMMAND *m = &pSndFile->Patterns[m_nPattern][m_nRow*pSndFile->m_nChannels+nChn];
Modified: trunk/OpenMPT/mptrack/EffectVis.cpp
===================================================================
--- trunk/OpenMPT/mptrack/EffectVis.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/EffectVis.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -599,16 +599,16 @@
//Check pattern, start row and channel exist
MODCOMMAND *pcmd = m_pSndFile->Patterns[m_nPattern];
- if (!pcmd || (m_startRow >= m_pSndFile->PatternSize[m_nPattern]) || (m_nChan >= m_pSndFile->m_nChannels))
+ if (!pcmd || (m_startRow >= m_pSndFile->Patterns[m_nPattern].GetNumRows()) || (m_nChan >= m_pSndFile->m_nChannels))
{
DoClose();
return;
}
//Check end exists
- if ( (m_endRow >= m_pSndFile->PatternSize[m_nPattern]) )
+ if ( (m_endRow >= m_pSndFile->Patterns[m_nPattern].GetNumRows()) )
{
- m_endRow = m_pSndFile->PatternSize[m_nPattern]-1;
+ m_endRow = m_pSndFile->Patterns[m_nPattern].GetNumRows()-1;
//ensure we still have some rows to process
if (m_endRow <= m_startRow)
{
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -352,7 +352,7 @@
{
m_SndFile.m_nType = MOD_TYPE_MOD;
for (UINT i=0; i<m_SndFile.Patterns.Size(); i++)
- if ((m_SndFile.Patterns[i]) && (m_SndFile.PatternSize[i] != 64))
+ if ((m_SndFile.Patterns[i]) && (m_SndFile.Patterns[i].GetNumRows() != 64))
m_SndFile.m_nType = MOD_TYPE_XM;
}
break;
@@ -1295,7 +1295,7 @@
UINT CModDoc::GetPatternSize(PATTERNINDEX nPat) const
//---------------------------------------------------
{
- if ((nPat < m_SndFile.Patterns.Size()) && (m_SndFile.Patterns[nPat])) return m_SndFile.PatternSize[nPat];
+ if ((nPat < m_SndFile.Patterns.Size()) && (m_SndFile.Patterns[nPat])) return m_SndFile.Patterns[nPat].GetNumRows();
return 0;
}
@@ -3079,7 +3079,7 @@
if (pat >= m_SndFile.Patterns.Size()) {
pat=0;
}
- if (row >= pSndFile->PatternSize[pat]) {
+ if (row >= pSndFile->Patterns[pat].GetNumRows()) {
row=0;
}
//end rewbs.fix3185
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -107,7 +107,7 @@
// Check if conversion to 64 rows is necessary
for (UINT ipat=0; ipat<m_SndFile.Patterns.Size(); ipat++)
{
- if ((m_SndFile.Patterns[ipat]) && (m_SndFile.PatternSize[ipat] != 64)) b64++;
+ if ((m_SndFile.Patterns[ipat]) && (m_SndFile.Patterns[ipat].GetNumRows() != 64)) b64++;
}
if (((m_SndFile.m_nInstruments) || (b64)) && (nNewType & (MOD_TYPE_MOD|MOD_TYPE_S3M)))
{
@@ -126,12 +126,12 @@
// Resizing all patterns to 64 rows
UINT nPatCvt = 0;
UINT i = 0;
- for (i=0; i<m_SndFile.Patterns.Size(); i++) if ((m_SndFile.Patterns[i]) && (m_SndFile.PatternSize[i] != 64))
+ for (i=0; i<m_SndFile.Patterns.Size(); i++) if ((m_SndFile.Patterns[i]) && (m_SndFile.Patterns[i].GetNumRows() != 64))
{
- if(m_SndFile.PatternSize[i] < 64)
+ if(m_SndFile.Patterns[i].GetNumRows() < 64)
{
// try to save short patterns by inserting a pattern break.
- m_SndFile.TryWriteEffect(i, m_SndFile.PatternSize[i] - 1, CMD_PATTERNBREAK, 0, false, CHANNELINDEX_INVALID, false, true);
+ m_SndFile.TryWriteEffect(i, m_SndFile.Patterns[i].GetNumRows() - 1, CMD_PATTERNBREAK, 0, false, CHANNELINDEX_INVALID, false, true);
}
m_SndFile.Patterns[i].Resize(64, false);
if (b64 < 5)
@@ -180,7 +180,7 @@
UINT nChannel = m_SndFile.m_nChannels - 1;
- for (UINT len = m_SndFile.PatternSize[nPat] * m_SndFile.m_nChannels; len; m++, len--)
+ for (UINT len = m_SndFile.Patterns[nPat].GetNumRows() * m_SndFile.m_nChannels; len; m++, len--)
{
nChannel = (nChannel + 1) % m_SndFile.m_nChannels; // 0...Channels - 1
@@ -466,14 +466,14 @@
for (UINT i=0; i<m_SndFile.Patterns.Size(); i++) if (m_SndFile.Patterns[i])
{
MODCOMMAND *p = m_SndFile.Patterns[i];
- MODCOMMAND *newp = CSoundFile::AllocatePattern(m_SndFile.PatternSize[i], nNewChannels);
+ MODCOMMAND *newp = CSoundFile::AllocatePattern(m_SndFile.Patterns[i].GetNumRows(), nNewChannels);
if (!newp)
{
END_CRITICAL();
AddToLog("ERROR: Not enough memory to create new channels!\nPattern Data is corrupted!\n");
return FALSE;
}
- for (UINT j=0; j<m_SndFile.PatternSize[i]; j++)
+ for (UINT j=0; j<m_SndFile.Patterns[i].GetNumRows(); j++)
{
memcpy(&newp[j*nNewChannels], &p[j*m_SndFile.m_nChannels], m_SndFile.m_nChannels*sizeof(MODCOMMAND));
}
@@ -526,7 +526,7 @@
for (i=0; i<m_SndFile.Patterns.Size(); i++) if (m_SndFile.Patterns[i])
{
MODCOMMAND *p = m_SndFile.Patterns[i];
- MODCOMMAND *newp = CSoundFile::AllocatePattern(m_SndFile.PatternSize[i], nRemainingChannels);
+ MODCOMMAND *newp = CSoundFile::AllocatePattern(m_SndFile.Patterns[i].GetNumRows(), nRemainingChannels);
if (!newp)
{
END_CRITICAL();
@@ -534,7 +534,7 @@
return true;
}
MODCOMMAND *tmpsrc = p, *tmpdest = newp;
- for (UINT j=0; j<m_SndFile.PatternSize[i]; j++)
+ for (UINT j=0; j<m_SndFile.Patterns[i].GetNumRows(); j++)
{
for (UINT k=0; k<m_SndFile.m_nChannels; k++, tmpsrc++)
{
@@ -579,7 +579,7 @@
for (UINT i=0; i<m_SndFile.Patterns.Size(); i++) if (m_SndFile.Patterns[i])
{
MODCOMMAND *p = m_SndFile.Patterns[i];
- for (UINT j=m_SndFile.m_nChannels*m_SndFile.PatternSize[i]; j; j--, p++) if (p->instr)
+ for (UINT j=m_SndFile.m_nChannels*m_SndFile.Patterns[i].GetNumRows(); j; j--, p++) if (p->instr)
{
UINT instr = p->instr;
UINT note = p->note;
@@ -1039,7 +1039,7 @@
for (UINT row=0; row<nrows; row++)
{
MODCOMMAND *m = m_SndFile.Patterns[nPattern];
- if ((row + (dwBeginSel >> 16)) >= m_SndFile.PatternSize[nPattern]) break;
+ if ((row + (dwBeginSel >> 16)) >= m_SndFile.Patterns[nPattern].GetNumRows()) break;
m += (row+(dwBeginSel >> 16))*m_SndFile.m_nChannels;
m += (colmin >> 3);
for (UINT col=0; col<ncols; col++, m++, p+=12)
@@ -1184,7 +1184,7 @@
PATTERNINDEX pTemp;
GetEditPosition(rTemp, pTemp, oCurrentOrder);
- if ((nrow >= m_SndFile.PatternSize[nPattern]) || (ncol >= m_SndFile.m_nChannels)) goto PasteDone;
+ if ((nrow >= m_SndFile.Patterns[nPattern].GetNumRows()) || (ncol >= m_SndFile.m_nChannels)) goto PasteDone;
m += nrow * m_SndFile.m_nChannels;
// Search for signature
@@ -1209,7 +1209,7 @@
startLen = len;
startRow = nrow;
- while ((nrow < m_SndFile.PatternSize[nPattern]))
+ while ((nrow < m_SndFile.Patterns[nPattern].GetNumRows()))
{
// Search for column separator or end of paste data
while ((len + 11 >= dwMemSize) || p[len] != '|')
@@ -1245,7 +1245,7 @@
// Before changing anything in this pattern, we have to create an undo point.
if(bPrepareUndo)
{
- GetPatternUndo()->PrepareUndo(nPattern, 0, 0, m_SndFile.m_nChannels, m_SndFile.PatternSize[nPattern], !bFirstUndo);
+ GetPatternUndo()->PrepareUndo(nPattern, 0, 0, m_SndFile.m_nChannels, m_SndFile.Patterns[nPattern].GetNumRows(), !bFirstUndo);
bPrepareUndo = false;
bFirstUndo = false;
}
@@ -1257,7 +1257,7 @@
// push channel data below paste point first.
if(pasteMode == pm_pushforwardpaste)
{
- for(ROWINDEX nPushRow = m_SndFile.PatternSize[nPattern] - 1 - nrow; nPushRow > 0; nPushRow--)
+ for(ROWINDEX nPushRow = m_SndFile.Patterns[nPattern].GetNumRows() - 1 - nrow; nPushRow > 0; nPushRow--)
{
m[col + nPushRow * m_SndFile.m_nChannels] = m[col + (nPushRow - 1) * m_SndFile.m_nChannels];
}
@@ -1414,7 +1414,7 @@
// If Paste Flood is enabled, this won't be called due to obvious reasons.
if(doOverflowPaste)
{
- while(nrow >= m_SndFile.PatternSize[nPattern])
+ while(nrow >= m_SndFile.Patterns[nPattern].GetNumRows())
{
nrow = 0;
ORDERINDEX oNextOrder = m_SndFile.Order.GetNextOrderIgnoringSkips(oCurrentOrder);
@@ -1618,7 +1618,7 @@
for (PATTERNINDEX ipat = 0; ipat < m_SndFile.Patterns.Size(); ipat++) if (m_SndFile.Patterns.IsValidPat(ipat))
{
MODCOMMAND *p = m_SndFile.Patterns[ipat] + iRst;
- UINT len = m_SndFile.PatternSize[ipat];
+ UINT len = m_SndFile.Patterns[ipat].GetNumRows();
for (UINT idata = 0; idata < len; idata++, p += m_SndFile.m_nChannels)
{
if (!p->IsEmpty())
Modified: trunk/OpenMPT/mptrack/PatternGotoDialog.cpp
===================================================================
--- trunk/OpenMPT/mptrack/PatternGotoDialog.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/PatternGotoDialog.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -76,7 +76,7 @@
}
//Does pattern have enough rows?
- if (validated && m_pSndFile->PatternSize[m_nPattern] <= m_nRow) {
+ if (validated && m_pSndFile->Patterns[m_nPattern].GetNumRows() <= m_nRow) {
validated=false;
}
Modified: trunk/OpenMPT/mptrack/Undo.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Undo.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/Undo.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -50,7 +50,7 @@
UINT nRows;
if (!pSndFile->Patterns.IsValidPat(pattern)) return false;
- nRows = pSndFile->PatternSize[pattern];
+ nRows = pSndFile->Patterns[pattern].GetNumRows();
pPattern = pSndFile->Patterns[pattern];
if ((y >= nRows) || (cx < 1) || (cy < 1) || (x >= pSndFile->m_nChannels)) return false;
if (y + cy >= nRows) cy = nRows - y;
@@ -68,7 +68,7 @@
}
sUndo.pattern = pattern;
- sUndo.patternsize = pSndFile->PatternSize[pattern];
+ sUndo.patternsize = pSndFile->Patterns[pattern].GetNumRows();
sUndo.column = x;
sUndo.row = y;
sUndo.cx = cx;
@@ -130,7 +130,7 @@
nRows = pUndo->patternsize;
if(pUndo->column + pUndo->cx <= pSndFile->m_nChannels)
{
- if((!pSndFile->Patterns[nPattern]) || (pSndFile->PatternSize[nPattern] < nRows))
+ if((!pSndFile->Patterns[nPattern]) || (pSndFile->Patterns[nPattern].GetNumRows() < nRows))
{
MODCOMMAND *newPattern = CSoundFile::AllocatePattern(nRows, pSndFile->m_nChannels);
MODCOMMAND *oldPattern = pSndFile->Patterns[nPattern];
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -254,7 +254,7 @@
if (!pModDoc) return FALSE;
pSndFile = pModDoc->GetSoundFile();
- if ((bWrap) && (pSndFile->PatternSize[m_nPattern]))
+ if ((bWrap) && (pSndFile->Patterns[m_nPattern].GetNumRows()))
{
if ((int)row < (int)0)
{
@@ -269,26 +269,26 @@
{
const ORDERINDEX prevOrd = pSndFile->Order.GetPreviousOrderIgnoringSkips(nCurOrder);
const PATTERNINDEX nPrevPat = pSndFile->Order[prevOrd];
- if ((nPrevPat < pSndFile->Patterns.Size()) && (pSndFile->PatternSize[nPrevPat]))
+ if ((nPrevPat < pSndFile->Patterns.Size()) && (pSndFile->Patterns[nPrevPat].GetNumRows()))
{
SendCtrlMessage(CTRLMSG_SETCURRENTORDER, prevOrd);
if (SetCurrentPattern(nPrevPat))
- return SetCurrentRow(pSndFile->PatternSize[nPrevPat] + (int)row);
+ return SetCurrentRow(pSndFile->Patterns[nPrevPat].GetNumRows() + (int)row);
}
}
row = 0;
} else
if (CMainFrame::m_dwPatternSetup & PATTERN_WRAP)
{
- if ((int)row < (int)0) row += pSndFile->PatternSize[m_nPattern];
- row %= pSndFile->PatternSize[m_nPattern];
+ if ((int)row < (int)0) row += pSndFile->Patterns[m_nPattern].GetNumRows();
+ row %= pSndFile->Patterns[m_nPattern].GetNumRows();
}
} else //row >= 0
- if (row >= pSndFile->PatternSize[m_nPattern])
+ if (row >= pSndFile->Patterns[m_nPattern].GetNumRows())
{
if (m_dwStatus & (PATSTATUS_KEYDRAGSEL|PATSTATUS_MOUSEDRAGSEL))
{
- row = pSndFile->PatternSize[m_nPattern]-1;
+ row = pSndFile->Patterns[m_nPattern].GetNumRows()-1;
} else
if (CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL)
{
@@ -297,19 +297,19 @@
{
const ORDERINDEX nextOrder = pSndFile->Order.GetNextOrderIgnoringSkips(nCurOrder);
const PATTERNINDEX nextPat = pSndFile->Order[nextOrder];
- if ((nextPat < pSndFile->Patterns.Size()) && (pSndFile->PatternSize[nextPat]))
+ if ((nextPat < pSndFile->Patterns.Size()) && (pSndFile->Patterns[nextPat].GetNumRows()))
{
- const ROWINDEX newRow = row - pSndFile->PatternSize[m_nPattern];
+ const ROWINDEX newRow = row - pSndFile->Patterns[m_nPattern].GetNumRows();
SendCtrlMessage(CTRLMSG_SETCURRENTORDER, nextOrder);
if (SetCurrentPattern(nextPat))
return SetCurrentRow(newRow);
}
}
- row = pSndFile->PatternSize[m_nPattern]-1;
+ row = pSndFile->Patterns[m_nPattern].GetNumRows()-1;
} else
if (CMainFrame::m_dwPatternSetup & PATTERN_WRAP)
{
- row %= pSndFile->PatternSize[m_nPattern];
+ row %= pSndFile->Patterns[m_nPattern].GetNumRows();
}
}
}
@@ -317,11 +317,11 @@
//rewbs.fix3168
if ( (static_cast<int>(row)<0) && !(CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL))
row = 0;
- if (row >= pSndFile->PatternSize[m_nPattern] && !(CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL))
- row = pSndFile->PatternSize[m_nPattern]-1;
+ if (row >= pSndFile->Patterns[m_nPattern].GetNumRows() && !(CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL))
+ row = pSndFile->Patterns[m_nPattern].GetNumRows()-1;
//end rewbs.fix3168
- if ((row >= pSndFile->PatternSize[m_nPattern]) || (!m_szCell.cy)) return FALSE;
+ if ((row >= pSndFile->Patterns[m_nPattern].GetNumRows()) || (!m_szCell.cy)) return FALSE;
// Fix: If cursor isn't on screen move both scrollbars to make it visible
InvalidateRow();
m_nRow = row;
@@ -526,7 +526,7 @@
if (!bScroll) return TRUE;
// Scroll to row
row = dwPos >> 16;
- if (row < (int)pSndFile->PatternSize[m_nPattern])
+ if (row < (int)pSndFile->Patterns[m_nPattern].GetNumRows())
{
row += m_nMidRow;
rect.top += m_szHeader.cy;
@@ -760,7 +760,7 @@
DWORD startSel = ((m_dwBeginSel>>16)<(m_dwEndSel>>16)) ? m_dwBeginSel : m_dwEndSel;
DWORD endSel = ((m_dwBeginSel>>16)<(m_dwEndSel>>16)) ? m_dwEndSel : m_dwBeginSel;
- pModDoc->GetPatternUndo()->PrepareUndo(m_nPattern, 0, 0, pSndFile->m_nChannels, pSndFile->PatternSize[m_nPattern]);
+ pModDoc->GetPatternUndo()->PrepareUndo(m_nPattern, 0, 0, pSndFile->m_nChannels, pSndFile->Patterns[m_nPattern].GetNumRows());
int finalDest = (startSel>>16)+((endSel>>16)-(startSel>>16))*2;
for (int row=finalDest; row>(int)(startSel >> 16); row-=2)
@@ -769,7 +769,7 @@
for (UINT i=(startSel & 0xFFFF); i<=(endSel & 0xFFFF); i++) if ((i & 7) < 5)
{
UINT chn = i >> 3;
- if ((chn >= pSndFile->m_nChannels) || (row >= pSndFile->PatternSize[m_nPattern])) continue;
+ if ((chn >= pSndFile->m_nChannels) || (row >= pSndFile->Patterns[m_nPattern].GetNumRows())) continue;
MODCOMMAND *dest = &p[row * pSndFile->m_nChannels + chn];
MODCOMMAND *src = &p[(row-offset/2) * pSndFile->m_nChannels + chn];
MODCOMMAND *blank= &p[(row-1) * pSndFile->m_nChannels + chn];
@@ -788,7 +788,7 @@
}
m_dwBeginSel = startSel;
- m_dwEndSel = (min(finalDest,pSndFile->PatternSize[m_nPattern]-1)<<16) | (endSel&0xFFFF);
+ m_dwEndSel = (min(finalDest,pSndFile->Patterns[m_nPattern].GetNumRows()-1)<<16) | (endSel&0xFFFF);
InvalidatePattern(FALSE);
pModDoc->SetModified();
@@ -810,7 +810,7 @@
DWORD startSel = ((m_dwBeginSel>>16)<(m_dwEndSel>>16))?m_dwBeginSel:m_dwEndSel;
DWORD endSel = ((m_dwBeginSel>>16)<(m_dwEndSel>>16))?m_dwEndSel:m_dwBeginSel;
- pModDoc->GetPatternUndo()->PrepareUndo(m_nPattern, 0, 0, pSndFile->m_nChannels, pSndFile->PatternSize[m_nPattern]);
+ pModDoc->GetPatternUndo()->PrepareUndo(m_nPattern, 0, 0, pSndFile->m_nChannels, pSndFile->Patterns[m_nPattern].GetNumRows());
int finalDest = (startSel>>16)+((endSel>>16)-(startSel>>16))/2;
@@ -822,8 +822,8 @@
for (UINT i=(startSel & 0xFFFF); i<=(endSel & 0xFFFF); i++) if ((i & 7) < 5)
{
UINT chn = i >> 3;
- if ((chn >= pSndFile->m_nChannels) || (srcRow >= pSndFile->PatternSize[m_nPattern])
- || (row >= pSndFile->PatternSize[m_nPattern])) continue;
+ if ((chn >= pSndFile->m_nChannels) || (srcRow >= pSndFile->Patterns[m_nPattern].GetNumRows())
+ || (row >= pSndFile->Patterns[m_nPattern].GetNumRows())) continue;
MODCOMMAND *dest = &p[row * pSndFile->m_nChannels + chn];
MODCOMMAND *src = &p[srcRow * pSndFile->m_nChannels + chn];
//memcpy(dest/*+(i%5)*/, src/*+(i%5)*/, /*sizeof(MODCOMMAND) - (i-chn)*/ sizeof(BYTE));
@@ -849,7 +849,7 @@
}
}
m_dwBeginSel = startSel;
- m_dwEndSel = (min(finalDest,pSndFile->PatternSize[m_nPattern]-1)<<16) | (endSel& 0xFFFF);
+ m_dwEndSel = (min(finalDest,pSndFile->Patterns[m_nPattern].GetNumRows()-1)<<16) | (endSel& 0xFFFF);
InvalidatePattern(FALSE);
pModDoc->SetModified();
@@ -888,7 +888,7 @@
for (UINT i=(m_dwBeginSel & 0xFFFF); i<=(m_dwEndSel & 0xFFFF); i++) if ((i & 7) < 5) { // for all selected cols
UINT chn = i >> 3;
- if ((chn >= pSndFile->m_nChannels) || (row >= pSndFile->PatternSize[m_nPattern])) continue;
+ if ((chn >= pSndFile->m_nChannels) || (row >= pSndFile->Patterns[m_nPattern].GetNumRows())) continue;
MODCOMMAND *m = &p[row * pSndFile->m_nChannels + chn];
switch(i & 7) {
case 0: // Clear note
@@ -1297,7 +1297,7 @@
if ((pModDoc) && (m_nPattern < pModDoc->GetSoundFile()->Patterns.Size()))
{
UINT row = dwPos >> 16;
- UINT max = pModDoc->GetSoundFile()->PatternSize[m_nPattern];
+ UINT max = pModDoc->GetSoundFile()->Patterns[m_nPattern].GetNumRows();
if ((row) && (row >= max)) row = max-1;
dwPos &= 0xFFFF;
dwPos |= (row << 16);
@@ -1337,7 +1337,7 @@
if (pModDoc)
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- SetCurSel(0, ((pSndFile->PatternSize[m_nPattern]-1) << 16)
+ SetCurSel(0, ((pSndFile->Patterns[m_nPattern].GetNumRows()-1) << 16)
| ((pSndFile->m_nChannels - 1) << 3)
| (4));
}
@@ -1352,7 +1352,7 @@
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
SetCurSel(m_nMenuParam & 0xFFF8,
- ((pSndFile->PatternSize[m_nPattern]-1) << 16)
+ ((pSndFile->Patterns[m_nPattern].GetNumRows()-1) << 16)
| ((m_nMenuParam & 0xFFF8)+4));
}
}
@@ -1366,7 +1366,7 @@
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
DWORD dwBeginSel = m_dwCursor & 0xFFF8;
- DWORD dwEndSel = ((pSndFile->PatternSize[m_nPattern]-1) << 16) | ((m_dwCursor & 0xFFF8)+4);
+ DWORD dwEndSel = ((pSndFile->Patterns[m_nPattern].GetNumRows()-1) << 16) | ((m_dwCursor & 0xFFF8)+4);
// If column is already selected, select the current pattern
if ((dwBeginSel == m_dwBeginSel) && (dwEndSel == m_dwEndSel))
{
@@ -1533,7 +1533,7 @@
pSndFile = pModDoc->GetSoundFile();
if (!pSndFile->Patterns[m_nPattern]) return;
row = m_dwBeginSel >> 16;
- maxrow = pSndFile->PatternSize[m_nPattern];
+ maxrow = pSndFile->Patterns[m_nPattern].GetNumRows();
if (colmax >= pSndFile->m_nChannels) colmax = pSndFile->m_nChannels-1;
if (colmin > colmax) return;
pModDoc->GetPatternUndo()->PrepareUndo(m_nPattern, 0,0, pSndFile->m_nChannels, maxrow);
@@ -1599,7 +1599,7 @@
pSndFile = pModDoc->GetSoundFile();
if (!pSndFile->Patterns[m_nPattern]) return;
row = m_dwBeginSel >> 16;
- maxrow = pSndFile->PatternSize[m_nPattern];
+ maxrow = pSndFile->Patterns[m_nPattern].GetNumRows();
if (colmax >= pSndFile->m_nChannels) colmax = pSndFile->m_nChannels-1;
if (colmin > colmax) return;
pModDoc->GetPatternUndo()->PrepareUndo(m_nPattern, 0,0, pSndFile->m_nChannels, maxrow);
@@ -1639,7 +1639,7 @@
pSndFile = pModDoc->GetSoundFile();
if (!pSndFile->Patterns[m_nPattern]) return;
row = m_nRow;
- maxrow = pSndFile->PatternSize[m_nPattern];
+ maxrow = pSndFile->Patterns[m_nPattern].GetNumRows();
colmin = (m_dwBeginSel & 0xFFFF) >> 3;
colmax = (m_dwEndSel & 0xFFFF) >> 3;
@@ -1780,7 +1780,7 @@
for (UINT nPat=nPatStart; nPat<nPatEnd; nPat++)
{
LPMODCOMMAND m = pSndFile->Patterns[nPat];
- DWORD len = pSndFile->m_nChannels * pSndFile->PatternSize[nPat];
+ DWORD len = pSndFile->m_nChannels * pSndFile->Patterns[nPat].GetNumRows();
if ((!m) || (!len)) continue;
UINT n = 0;
if ((m_bContinueSearch) && (nPat == nPatStart) && (nPat == m_nPattern))
@@ -1995,7 +1995,7 @@
if ((pMainFrm) && (pModDoc))
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- if ((!pSndFile->PatternSize[m_nPattern]) || (!pSndFile->Patterns[m_nPattern])) return;
+ if ((!pSndFile->Patterns[m_nPattern].GetNumRows()) || (!pSndFile->Patterns[m_nPattern])) return;
// Cut instrument/sample
BEGIN_CRITICAL();
for (UINT i=pSndFile->m_nChannels; i<MAX_CHANNELS; i++)
@@ -2015,7 +2015,7 @@
if (CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL)
SetCurrentRow(GetCurrentRow()+1, TRUE);
else
- SetCurrentRow((GetCurrentRow()+1) % pSndFile->PatternSize[m_nPattern], FALSE);
+ SetCurrentRow((GetCurrentRow()+1) % pSndFile->Patterns[m_nPattern].GetNumRows(), FALSE);
SetFocus();
}
}
@@ -2029,7 +2029,7 @@
if (pModDoc)
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- if ((!pSndFile->PatternSize[m_nPattern]) || (!pSndFile->Patterns[m_nPattern])) return;
+ if ((!pSndFile->Patterns[m_nPattern].GetNumRows()) || (!pSndFile->Patterns[m_nPattern])) return;
MODCOMMAND *m = pSndFile->Patterns[m_nPattern] + m_nRow * pSndFile->m_nChannels + ((m_dwCursor & 0xFFFF) >> 3);
switch(m_dwCursor & 7)
{
@@ -2332,7 +2332,7 @@
MODCOMMAND *pcmd = pSndFile->Patterns[m_nPattern];
if ((!pcmd) || (col0 > col1) || (col1 >= pSndFile->m_nChannels)
- || (row0 > row1) || (row1 >= pSndFile->PatternSize[m_nPattern])) return FALSE;
+ || (row0 > row1) || (row1 >= pSndFile->Patterns[m_nPattern].GetNumRows())) return FALSE;
PrepareUndo(m_dwBeginSel, m_dwEndSel);
for (UINT row=row0; row <= row1; row++)
{
@@ -2369,7 +2369,7 @@
if ((pModDoc = GetDocument()) == NULL || !(IsEditingEnabled_bmsg())) return;
pSndFile = pModDoc->GetSoundFile();
nChannels = pSndFile->m_nChannels;
- nRows = pSndFile->PatternSize[m_nPattern];
+ nRows = pSndFile->Patterns[m_nPattern].GetNumRows();
pOldPattern = pSndFile->Patterns[m_nPattern];
if ((nChannels < 1) || (nRows < 1) || (!pOldPattern)) return;
dx = (int)((m_dwDragPos & 0xFFF8) >> 3) - (int)((m_dwStartSel & 0xFFF8) >> 3);
@@ -2736,8 +2736,8 @@
ROWINDEX firstRow = (m_dwBeginSel >> 16), lastRow = (m_dwEndSel >> 16);
firstChannel = CLAMP(firstChannel, 0, pSndFile->m_nChannels - 1);
lastChannel = CLAMP(lastChannel, 0, pSndFile->m_nChannels - 1);
- firstRow = CLAMP(firstRow, 0, pSndFile->PatternSize[m_nPattern] - 1);
- lastRow = CLAMP(lastRow, 0, pSndFile->PatternSize[m_nPattern] - 1);
+ firstRow = CLAMP(firstRow, 0, pSndFile->Patterns[m_nPattern].GetNumRows() - 1);
+ lastRow = CLAMP(lastRow, 0, pSndFile->Patterns[m_nPattern].GetNumRows() - 1);
for (CHANNELINDEX nChn = firstChannel; nChn <= lastChannel; nChn++)
{
@@ -2939,7 +2939,7 @@
if (nOrd < pSndFile->Order.size()) SendCtrlMessage(CTRLMSG_SETCURRENTORDER, nOrd);
updateOrderList = false;
}
- if (nRow != m_nRow) SetCurrentRow((nRow < pSndFile->PatternSize[nPat]) ? nRow : 0, FALSE, FALSE);
+ if (nRow != m_nRow) SetCurrentRow((nRow < pSndFile->Patterns[nPat].GetNumRows()) ? nRow : 0, FALSE, FALSE);
}
SetPlayCursor(0xFFFF, 0);
} else
@@ -3385,7 +3385,7 @@
if (pModDoc)
{
CSoundFile *pSndFile = pModDoc->GetSoundFile();
- pModDoc->CopyPattern(m_nPattern, 0, ((pSndFile->PatternSize[m_nPattern]-1)<<16)|(pSndFile->m_nChannels<<3));
+ pModDoc->CopyPattern(m_nPattern, 0, ((pSndFile->Patterns[m_nPattern].GetNumRows()-1)<<16)|(pSndFile->m_nChannels<<3));
}
}
break;
@@ -4285,7 +4285,7 @@
if((m_nSpacing > 0) && (m_nSpacing <= MAX_SPACING))
{
- if(nRow + m_nSpacing < pSndFile->PatternSize[nPat] || (CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL))
+ if(nRow + m_nSpacing < pSndFile->Patterns[nPat].GetNumRows() || (CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL))
{
SetCurrentRow(nRow + m_nSpacing, (CMainFrame::m_dwPatternSetup & PATTERN_CONTSCROLL) ? true: false);
m_bLastNoteEntryBlocked=false;
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -53,7 +53,7 @@
// Find extension resolution (8 to 24 bits)
UINT n = 1;
- while(n < 4 && nCmdRow+n < pSndFile->PatternSize[nPat]){
+ while(n < 4 && nCmdRow+n < pSndFile->Patterns[nPat].GetNumRows()){
i = (nCmdRow+n) * pSndFile->m_nChannels + nChannel;
if(pSndFile->Patterns[nPat][i].command != CMD_XPARAM) break;
n++;
@@ -1032,7 +1032,7 @@
if ((pSndFile) && (m_nPattern < pSndFile->Patterns.Size()) && (combo))
{
CHAR s[256];
- UINT nrows = pSndFile->PatternSize[m_nPattern];
+ UINT nrows = pSndFile->Patterns[m_nPattern].GetNumRows();
// -> CODE#0008
// -> DESC="#define to set pattern size"
@@ -1048,9 +1048,9 @@
combo->SetCurSel(nrows - specs.patternRowsMin);
wsprintf(s, "Pattern #%d:\x0d\x0a %d row%s (%dK)",
m_nPattern,
- pSndFile->PatternSize[m_nPattern],
- (pSndFile->PatternSize[m_nPattern] == 1) ? "" : "s",
- (pSndFile->PatternSize[m_nPattern] * pSndFile->m_nChannels * sizeof(MODCOMMAND))/1024);
+ pSndFile->Patterns[m_nPattern].GetNumRows(),
+ (pSndFile->Patterns[m_nPattern].GetNumRows() == 1) ? "" : "s",
+ (pSndFile->Patterns[m_nPattern].GetNumRows() * pSndFile->m_nChannels * sizeof(MODCOMMAND))/1024);
SetDlgItemText(IDC_TEXT1, s);
}
return TRUE;
@@ -1193,7 +1193,7 @@
UINT nChannel = (dwCursor & 0xFFFF) >> 3;
if ((nPat >= pSndFile->Patterns.Size()) || (!m_pModDoc)
- || (nRow >= pSndFile->PatternSize[nPat]) || (nChannel >= pSndFile->m_nChannels)
+ || (nRow >= pSndFile->Patterns[nPat].GetNumRows()) || (nChannel >= pSndFile->m_nChannels)
|| (!pSndFile->Patterns[nPat])) return FALSE;
m_Command = pSndFile->Patterns[nPat][nRow * pSndFile->m_nChannels + nChannel];
m_nRow = nRow;
@@ -1237,7 +1237,7 @@
{
CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
if ((m_nPattern >= pSndFile->Patterns.Size()) || (!m_pModDoc)
- || (m_nRow >= pSndFile->PatternSize[m_nPattern])
+ || (m_nRow >= pSndFile->Patterns[m_nPattern].GetNumRows())
|| (m_nChannel >= pSndFile->m_nChannels)
|| (!pSndFile->Patterns[m_nPattern])) return;
MODCOMMAND *m = pSndFile->Patterns[m_nPattern]+m_nRow*pSndFile->m_nChannels+m_nChannel;
@@ -1261,7 +1261,7 @@
{
CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
if ((m_nPattern >= pSndFile->Patterns.Size()) || (!m_pModDoc)
- || (m_nRow >= pSndFile->PatternSize[m_nPattern])
+ || (m_nRow >= pSndFile->Patterns[m_nPattern].GetNumRows())
|| (m_nChannel >= pSndFile->m_nChannels)
|| (!pSndFile->Patterns[m_nPattern])) return;
MODCOMMAND *m = pSndFile->Patterns[m_nPattern]+m_nRow*pSndFile->m_nChannels+m_nChannel;
@@ -1284,7 +1284,7 @@
{
CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
if ((m_nPattern >= pSndFile->Patterns.Size()) || (!m_pModDoc)
- || (m_nRow >= pSndFile->PatternSize[m_nPattern])
+ || (m_nRow >= pSndFile->Patterns[m_nPattern].GetNumRows())
|| (m_nChannel >= pSndFile->m_nChannels)
|| (!pSndFile->Patterns[m_nPattern])) return;
MODCOMMAND *m = pSndFile->Patterns[m_nPattern]+m_nRow*pSndFile->m_nChannels+m_nChannel;
Modified: trunk/OpenMPT/mptrack/mod2midi.cpp
===================================================================
--- trunk/OpenMPT/mptrack/mod2midi.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/mptrack/mod2midi.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -424,7 +424,7 @@
{
int pattern_break = -1;
UINT nPat = m_pSndFile->Order[nOrder];
- if ((nPat >= m_pSndFile->Patterns.Size()) || (nPat == m_pSndFile->Order.GetIgnoreIndex()) || (!m_pSndFile->Patterns[nPat]) || (nRow >= m_pSndFile->PatternSize[nPat]))
+ if ((nPat >= m_pSndFile->Patterns.Size()) || (nPat == m_pSndFile->Order.GetIgnoreIndex()) || (!m_pSndFile->Patterns[nPat]) || (nRow >= m_pSndFile->Patterns[nPat].GetNumRows()))
{
nOrder++;
nRow = 0;
@@ -527,7 +527,7 @@
} else
{
nRow++;
- if (nRow >= m_pSndFile->PatternSize[nPat])
+ if (nRow >= m_pSndFile->Patterns[nPat].GetNumRows())
{
nRow = 0;
nOrder++;
Modified: trunk/OpenMPT/soundlib/LOAD_AMF.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2010-05-30 20:46:59 UTC (rev 612)
@@ -385,7 +385,7 @@
// Create the patterns from the list of tracks
for (UINT iPat=0; iPat<pfh->numorders; iPat++)
{
- MODCOMMAND *p = AllocatePattern(PatternSize[iPat], m_nChannels);
+ MODCOMMAND *p = AllocatePattern(Patterns[iPat].GetNumRows(), m_nChannels);
if (!p) break;
Patterns[iPat] = p;
for (UINT iChn=0; iChn<m_nChannels; iChn++)
@@ -399,7 +399,7 @@
realtrk--;
if ((realtrk < realtrackcnt) && (pTrackData[realtrk]))
{
- AMF_Unpack(p+iChn, pTrackData[realtrk], PatternSize[iPat], m_nChannels);
+ AMF_Unpack(p+iChn, pTrackData[realtrk], Patterns[iPat].GetNumRows(), m_nChannels);
}
}
}
Modified: trunk/OpenMPT/soundlib/Load_ams.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_ams.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Load_ams.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -156,7 +156,7 @@
if (!m) return true;
const BYTE *p = lpStream + dwMemPos;
UINT row = 0, i = 0;
- while ((row < PatternSize[iPat]) && (i+2 < len))
+ while ((row < Patterns[iPat].GetNumRows()) && (i+2 < len))
{
BYTE b0 = p[i++];
BYTE b1 = p[i++];
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -700,7 +700,7 @@
// Free pattern if not empty
if(Patterns[npat]) { FreePattern(Patterns[npat]); Patterns[npat] = NULL; }
- // PatternSize[npat]
+ // Patterns[npat].GetNumRows()
ASSERT_CAN_READ(4);
memcpy(&id,lpStream+streamPos,sizeof(DWORD));
if(id > MAX_PATTERN_ROWS) return false;
@@ -708,16 +708,16 @@
streamPos += sizeof(DWORD);
// Try to allocate & read only sized patterns
- if(PatternSize[npat]){
+ if(Patterns[npat].GetNumRows()){
// Allocate pattern
- if(Patterns.Insert(npat, PatternSize[npat])){
- streamPos += m_nChannels * PatternSize[npat] * n;
+ if(Patterns.Insert(npat, Patterns[npat].GetNumRows())){
+ streamPos += m_nChannels * Patterns[npat].GetNumRows() * n;
continue;
}
// Pattern data
- long datasize = m_nChannels * PatternSize[npat] * n;
+ long datasize = m_nChannels * Patterns[npat].GetNumRows() * n;
//if (streamPos+datasize<=dwMemLength) {
if(Patterns[npat].ReadITPdata(lpStream, streamPos, datasize, dwMemLength))
{
@@ -1728,11 +1728,11 @@
// patterns data content
for(UINT npat=0; npat<MAX_PATTERNS; npat++){
// pattern size (number of rows)
- id = Patterns[npat] ? PatternSize[npat] : 0;
+ id = Patterns[npat] ? Patterns[npat].GetNumRows() : 0;
fwrite(&id, 1, sizeof(id), f);
// pattern data
- if(Patterns[npat] && PatternSize[npat]) Patterns[npat].WriteITPdata(f);
- //fwrite(Patterns[npat], 1, m_nChannels * PatternSize[npat] * sizeof(MODCOMMAND_ORIGINAL), f);
+ if(Patterns[npat] && Patterns[npat].GetNumRows()) Patterns[npat].WriteITPdata(f);
+ //fwrite(Patterns[npat], 1, m_nChannels * Patterns[npat].GetNumRows() * sizeof(MODCOMMAND_ORIGINAL), f);
}
// Song lonely (instrument-less) samples
@@ -2161,15 +2161,15 @@
if (!Patterns[npat]) continue;
patpos[npat] = dwPos;
patinfo[0] = 0;
- patinfo[1] = PatternSize[npat];
+ patinfo[1] = Patterns[npat].GetNumRows();
patinfo[2] = 0;
patinfo[3] = 0;
// Check for empty pattern
- if (PatternSize[npat] == 64)
+ if (Patterns[npat].GetNumRows() == 64)
{
MODCOMMAND *pzc = Patterns[npat];
- UINT nz = PatternSize[npat] * m_nChannels;
+ UINT nz = Patterns[npat].GetNumRows() * m_nChannels;
UINT iz = 0;
for (iz=0; iz<nz; iz++)
{
@@ -2187,7 +2187,7 @@
memset(chnmask, 0xFF, sizeof(chnmask));
memset(lastvalue, 0, sizeof(lastvalue));
MODCOMMAND *m = Patterns[npat];
- for (UINT row=0; row<PatternSize[npat]; row++)
+ for (UINT row=0; row<Patterns[npat].GetNumRows(); row++)
{
UINT len = 0;
for (UINT ch=0; ch<m_nChannels; ch++, m++)
@@ -2760,14 +2760,14 @@
if (!Patterns[npat]) continue;
patpos[npat] = dwPos;
patinfo[0] = 0;
- patinfo[1] = PatternSize[npat];
+ patinfo[1] = Patterns[npat].GetNumRows();
patinfo[2] = 0;
patinfo[3] = 0;
// Check for empty pattern
- if (PatternSize[npat] == 64)
+ if (Patterns[npat].GetNumRows() == 64)
{
MODCOMMAND *pzc = Patterns[npat];
- UINT nz = PatternSize[npat] * nChannels;
+ UINT nz = Patterns[npat].GetNumRows() * nChannels;
UINT iz = 0;
for (iz=0; iz<nz; iz++)
{
@@ -2785,7 +2785,7 @@
memset(chnmask, 0xFF, sizeof(chnmask));
memset(lastvalue, 0, sizeof(lastvalue));
MODCOMMAND *m = Patterns[npat];
- for (UINT row=0; row<PatternSize[npat]; row++)
+ for (UINT row=0; row<Patterns[npat].GetNumRows(); row++)
{
len = 0;
for (UINT ch = 0; ch < m_nChannels; ch++, m++)
Modified: trunk/OpenMPT/soundlib/Load_mdl.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mdl.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Load_mdl.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -533,11 +533,11 @@
{
for (UINT ipat=0; ipat<npatterns; ipat++)
{
- if ((Patterns[ipat] = AllocatePattern(PatternSize[ipat], m_nChannels)) == NULL) break;
+ if ((Patterns[ipat] = AllocatePattern(Patterns[ipat].GetNumRows(), m_nChannels)) == NULL) break;
for (UINT chn=0; chn<m_nChannels; chn++) if ((patterntracks[ipat*32+chn]) && (patterntracks[ipat*32+chn] <= ntracks))
{
MODCOMMAND *m = Patterns[ipat] + chn;
- UnpackMDLTrack(m, m_nChannels, PatternSize[ipat], patterntracks[ipat*32+chn], lpStream+dwTrackPos);
+ UnpackMDLTrack(m, m_nChannels, Patterns[ipat].GetNumRows(), patterntracks[ipat*32+chn], lpStream+dwTrackPos);
}
}
}
Modified: trunk/OpenMPT/soundlib/Load_mid.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mid.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Load_mid.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -628,7 +628,7 @@
// Allocate current pattern if not allocated yet
if (!Patterns[pat])
{
- Patterns[pat] = AllocatePattern(PatternSize[pat], m_nChannels);
+ Patterns[pat] = AllocatePattern(Patterns[pat].GetNumRows(), m_nChannels);
if (!Patterns[pat]) break;
}
dwGlobalFlags |= MIDIGLOBAL_SONGENDED;
@@ -1199,7 +1199,7 @@
}
}
- if ((++row) >= PatternSize[pat])
+ if ((++row) >= Patterns[pat].GetNumRows())
{
pat++;
if (pat >= MAX_PATTERNS-1) break;
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -542,7 +542,7 @@
{
MODCOMMAND *m = Patterns[ipat];
for (UINT i=0; i<64; i++) { //for all rows
- if (i < PatternSize[ipat]) { //if row exists
+ if (i < Patterns[ipat].GetNumRows()) { //if row exists
LPBYTE p=s;
for (UINT c=0; c<m_nChannels; c++,p+=4,m++)
{
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -488,7 +488,7 @@
for(PATTERNINDEX nPat = 0; nPat < Patterns.Size(); nPat++) if(Patterns[nPat])
{
MODCOMMAND *m = Patterns[nPat];
- for(UINT len = PatternSize[nPat] * m_nChannels; len; m++, len--)
+ for(UINT len = Patterns[nPat].GetNumRows() * m_nChannels; len; m++, len--)
{
if(m->command == CMD_MIDI)
{
@@ -642,7 +642,7 @@
{
len = 2;
MODCOMMAND *p = Patterns[i];
- for (UINT row=0; row<64; row++) if (row < PatternSize[i])
+ for (UINT row=0; row<64; row++) if (row < Patterns[i].GetNumRows())
{
for (UINT j=0; j<m_nChannels; j++)
{
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -829,9 +829,9 @@
memset(&xmph, 0, sizeof(xmph));
xmph[0] = 9;
- xmph[5] = (BYTE)(PatternSize[i] & 0xFF);
- xmph[6] = (BYTE)(PatternSize[i] >> 8);
- for (UINT j = m_nChannels * PatternSize[i]; j > 0; j--, p++)
+ xmph[5] = (BYTE)(Patterns[i].GetNumRows() & 0xFF);
+ xmph[6] = (BYTE)(Patterns[i].GetNumRows() >> 8);
+ for (UINT j = m_nChannels * Patterns[i].GetNumRows(); j > 0; j--, p++)
{
// Don't write more than 32 channels
if(bCompatibilityExport && m_nChannels - ((j - 1) % m_nChannels) > 32) continue;
@@ -916,8 +916,8 @@
{
memset(&xmph, 0, sizeof(xmph));
xmph[0] = 9;
- xmph[5] = (BYTE)(PatternSize[i] & 0xFF);
- xmph[6] = (BYTE)(PatternSize[i] >> 8);
+ xmph[5] = (BYTE)(Patterns[i].GetNumRows() & 0xFF);
+ xmph[6] = (BYTE)(Patterns[i].GetNumRows() >> 8);
fwrite(xmph, 1, 9, f);
}
// Writing instruments
Modified: trunk/OpenMPT/soundlib/ModSequence.cpp
===================================================================
--- trunk/OpenMPT/soundlib/ModSequence.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/ModSequence.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -448,7 +448,7 @@
if(m_pSndFile->Patterns.IsValidPat(copyPat))
{
MODCOMMAND *m = m_pSndFile->Patterns[copyPat];
- for (UINT len = m_pSndFile->PatternSize[copyPat] * m_pSndFile->m_nChannels; len; m++, len--)
+ for (UINT len = m_pSndFile->Patterns[copyPat].GetNumRows() * m_pSndFile->m_nChannels; len; m++, len--)
{
if(m->command == CMD_POSITIONJUMP && m->param >= startOrd)
{
@@ -512,21 +512,21 @@
if(!m_pSndFile->Patterns.IsValidPat(nPat)) continue;
MODCOMMAND *m = m_pSndFile->Patterns[nPat];
- for (UINT len = 0; len < m_pSndFile->PatternSize[nPat] * m_pSndFile->m_nChannels; m++, len++)
+ for (UINT len = 0; len < m_pSndFile->Patterns[nPat].GetNumRows() * m_pSndFile->m_nChannels; m++, len++)
{
if(m->command == CMD_POSITIONJUMP)
{
if(patternsFixed[nPat] != SEQUENCEINDEX_INVALID && patternsFixed[nPat] != removedSequences)
{
// Oops, some other sequence uses this pattern already.
- const PATTERNINDEX nNewPat = m_pSndFile->Patterns.Insert(m_pSndFile->PatternSize[nPat]);
+ const PATTERNINDEX nNewPat = m_pSndFile->Patterns.Insert(m_pSndFile->Patterns[nPat].GetNumRows());
if(nNewPat != SEQUENCEINDEX_INVALID)
{
// could create new pattern - copy data over and continue from here.
At(nFirstOrder + nOrd) = nNewPat;
MODCOMMAND *pSrc = m_pSndFile->Patterns[nPat];
MODCOMMAND *pDest = m_pSndFile->Patterns[nNewPat];
- memcpy(pDest, pSrc, m_pSndFile->PatternSize[nPat] * m_pSndFile->m_nChannels * sizeof(MODCOMMAND));
+ memcpy(pDest, pSrc, m_pSndFile->Patterns[nPat].GetNumRows() * m_pSndFile->m_nChannels * sizeof(MODCOMMAND));
m = pDest + len;
patternsFixed.resize(max(nNewPat + 1, (PATTERNINDEX)patternsFixed.size()), SEQUENCEINDEX_INVALID);
nPat = nNewPat;
Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -163,7 +163,7 @@
continue;
}
// Should never happen
- if (nRow >= PatternSize[nPattern])
+ if (nRow >= Patterns[nPattern].GetNumRows())
nRow = 0;
//Check whether target reached.
@@ -179,7 +179,7 @@
// Update next position
nNextRow = nRow + 1;
- if (nNextRow >= PatternSize[nPattern])
+ if (nNextRow >= Patterns[nPattern].GetNumRows())
{
nNextPattern = nCurrentPattern + 1;
nNextRow = 0;
@@ -236,7 +236,7 @@
patternBreakOnThisRow=true;
//Try to check next row for XPARAM
nextRow = nullptr;
- if (nRow < PatternSize[nPattern]-1) {
+ if (nRow < Patterns[nPattern].GetNumRows()-1) {
nextRow = Patterns[nPattern] + (nRow+1) * m_nChannels + nChn;
}
if (nextRow && nextRow->command == CMD_XPARAM) {
@@ -1652,7 +1652,7 @@
// -> CODE#0010
// -> DESC="add extended parameter mechanism to pattern effects"
m = NULL;
- if (m_nRow < PatternSize[m_nPattern]-1) {
+ if (m_nRow < Patterns[m_nPattern].GetNumRows()-1) {
m = Patterns[m_nPattern] + (m_nRow+1) * m_nChannels + nChn;
}
if (m && m->command == CMD_XPARAM) {
@@ -1927,7 +1927,7 @@
// Pattern Break
case CMD_PATTERNBREAK:
m = NULL;
- if (m_nRow < PatternSize[m_nPattern]-1) {
+ if (m_nRow < Patterns[m_nPattern].GetNumRows()-1) {
m = Patterns[m_nPattern] + (m_nRow+1) * m_nChannels + nChn;
}
if (m && m->command == CMD_XPARAM) {
@@ -3239,12 +3239,12 @@
MODCOMMAND *m;
m = NULL;
- if(m_nRow < PatternSize[m_nPattern]-1) m = Patterns[m_nPattern] + (m_nRow+1) * m_nChannels + nChn;
+ if(m_nRow < Patterns[m_nPattern].GetNumRows()-1) m = Patterns[m_nPattern] + (m_nRow+1) * m_nChannels + nChn;
if(m && m->command == CMD_XPARAM){
UINT tmp = m->param;
m = NULL;
- if(m_nRow < PatternSize[m_nPattern]-2) m = Patterns[m_nPattern] + (m_nRow+2) * m_nChannels + nChn;
+ if(m_nRow < Patterns[m_nPattern].GetNumRows()-2) m = Patterns[m_nPattern] + (m_nRow+2) * m_nChannels + nChn;
if(m && m->command == CMD_XPARAM) param = (param<<16) + (tmp<<8) + m->param;
else param = (param<<8) + tmp;
@@ -3711,7 +3711,7 @@
const MODPATTERN& p = Patterns[nPat];
if (p)
{
- UINT len = PatternSize[nPat] * m_nChannels;
+ UINT len = Patterns[nPat].GetNumRows() * m_nChannels;
UINT pos = (nOrd == nStartOrder) ? nStartRow : 0;
pos *= m_nChannels;
while (pos < len)
@@ -3742,14 +3742,14 @@
// Treat only case with jumps in the same pattern
if (nJumpOrder > nStartOrder) return TRUE;
- if ((nJumpOrder < nStartOrder) || (nJumpRow >= PatternSize[nStartOrder])
+ if ((nJumpOrder < nStartOrder) || (nJumpRow >= Patterns[nStartOrder].GetNumRows())
|| (!(Patterns[nStartOrder])) || (nStartRow >= MAX_PATTERN_ROWS) || (nJumpRow >= MAX_PATTERN_ROWS)) return FALSE;
// See if the pattern is being played backward
BYTE row_hist[MAX_PATTERN_ROWS];
memset(row_hist, 0, sizeof(row_hist));
- UINT nRows = PatternSize[nStartOrder], row = nJumpRow;
+ UINT nRows = Patterns[nStartOrder].GetNumRows(), row = nJumpRow;
if (nRows > MAX_PATTERN_ROWS) nRows = MAX_PATTERN_ROWS;
row_hist[nStartRow] = TRUE;
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -432,13 +432,7 @@
CTuning* MODINSTRUMENT::s_DefaultTuning = 0;
-const ROWINDEX CPatternSizesMimic::operator [](const int i) const
-//-----------------------------------------------------------
-{
- return m_rSndFile.Patterns[i].GetNumRows();
-}
-
//////////////////////////////////////////////////////////
// CSoundFile
@@ -448,7 +442,7 @@
CSoundFile::CSoundFile() :
- PatternSize(*this), Patterns(*this),
+ Patterns(*this),
Order(*this),
m_PlaybackEventer(*this),
m_pModSpecs(&ModSpecs::itEx),
@@ -567,7 +561,7 @@
memset(m_MixPlugins, 0, sizeof(m_MixPlugins));
memset(&m_SongEQ, 0, sizeof(m_SongEQ));
ResetMidiCfg();
- //for (UINT npt=0; npt<Patterns.Size(); npt++) PatternSize[npt] = 64;
+ //for (UINT npt=0; npt<Patterns.Size(); npt++) Patterns[npt].GetNumRows() = 64;
for (CHANNELINDEX nChn = 0; nChn < MAX_BASECHANNELS; nChn++)
{
InitChannel(nChn);
@@ -1133,7 +1127,7 @@
while ((i < Order.size()) && (Order[i] != Order.GetInvalidPatIndex()))
{
- if (Order[i] < Patterns.Size()) max += PatternSize[Order[i]];
+ if (Order[i] < Patterns.Size()) max += Patterns[Order[i]].GetNumRows();
i++;
}
return max;
@@ -1146,7 +1140,7 @@
UINT pos = 0;
for (UINT i=0; i<m_nCurrentPattern; i++) if (Order[i] < Patterns.Size())
- pos += PatternSize[Order[i]];
+ pos += Patterns[Order[i]].GetNumRows();
return pos + m_nRow;
}
@@ -1192,14 +1186,14 @@
if (ord == Order.GetInvalidPatIndex()) break;
if (ord < Patterns.Size())
{
- if (nPos < (UINT)PatternSize[ord]) break;
- nPos -= PatternSize[ord];
+ if (nPos < (UINT)Patterns[ord].GetNumRows()) break;
+ nPos -= Patterns[ord].GetNumRows();
}
}
// Buggy position ?
if ((nPattern >= Order.size())
|| (Order[nPattern] >= Patterns.Size())
- || (nPos >= PatternSize[Order[nPattern]]))
+ || (nPos >= Patterns[Order[nPattern]].GetNumRows()))
{
nPos = 0;
nPattern = 0;
@@ -1208,7 +1202,7 @@
if ((nRow) && (Order[nPattern] < Patterns.Size()))
{
MODCOMMAND *p = Patterns[Order[nPattern]];
- if ((p) && (nRow < PatternSize[Order[nPattern]]))
+ if ((p) && (nRow < Patterns[Order[nPattern]].GetNumRows()))
{
BOOL bOk = FALSE;
while ((!bOk) && (nRow > 0))
@@ -1380,7 +1374,7 @@
m_dwSongFlags &= ~SONG_PATTERNLOOP;
} else
{
- if ((nRow < 0) || (nRow >= (int)PatternSize[nPat])) nRow = 0;
+ if ((nRow < 0) || (nRow >= (int)Patterns[nPat].GetNumRows())) nRow = 0;
m_nPattern = nPat;
m_nRow = m_nNextRow = nRow;
m_nTickCount = m_nMusicSpeed;
@@ -1396,7 +1390,7 @@
//----------------------------------------------------------------
{
if ((nPat < 0) || (nPat >= Patterns.Size()) || (!Patterns[nPat])) nPat = 0;
- if ((nRow < 0) || (nRow >= (int)PatternSize[nPat])) nRow = 0;
+ if ((nRow < 0) || (nRow >= (int)Patterns[nPat].GetNumRows())) nRow = 0;
m_nPattern = nPat;
m_nRow = m_nNextRow = nRow;
m_nTickCount = m_nMusicSpeed;
@@ -1620,7 +1614,7 @@
if (Patterns[nPat])
{
MODCOMMAND *p = Patterns[nPat];
- MODCOMMAND *newp = CSoundFile::AllocatePattern(PatternSize[nPat], nRemainingChannels);
+ MODCOMMAND *newp = CSoundFile::AllocatePattern(Patterns[nPat].GetNumRows(), nRemainingChannels);
if (!newp)
{
END_CRITICAL();
@@ -1628,7 +1622,7 @@
return 0;
}
MODCOMMAND *tmpsrc = p, *tmpdest = newp;
- for (ROWINDEX nRow = 0; nRow<PatternSize[nPat]; nRow++) //Scrolling rows
+ for (ROWINDEX nRow = 0; nRow<Patterns[nPat].GetNumRows(); nRow++) //Scrolling rows
{
for (CHANNELINDEX nChn = 0; nChn < nRemainingChannels; nChn++, tmpdest++) //Scrolling channels.
{
@@ -2762,7 +2756,7 @@
for (UINT i=0; i<Patterns.Size(); i++) if (Patterns[i])
{
MODCOMMAND *m = Patterns[i];
- for (UINT j=m_nChannels*PatternSize[i]; j; m++, j--)
+ for (UINT j=m_nChannels*Patterns[i].GetNumRows(); j; m++, j--)
{
if (m->instr == nSample && !m->IsPcNote()) return true;
}
@@ -2779,7 +2773,7 @@
for (UINT i=0; i<Patterns.Size(); i++) if (Patterns[i])
{
MODCOMMAND *m = Patterns[i];
- for (UINT j=m_nChannels*PatternSize[i]; j; m++, j--)
+ for (UINT j=m_nChannels*Patterns[i].GetNumRows(); j; m++, j--)
{
if (m->instr == nInstr && !m->IsPcNote()) return true;
}
@@ -2802,7 +2796,7 @@
MODCOMMAND *p = Patterns[ipat];
if (p)
{
- UINT jmax = PatternSize[ipat] * m_nChannels;
+ UINT jmax = Patterns[ipat].GetNumRows() * m_nChannels;
for (UINT j=0; j<jmax; j++, p++)
{
if ((p->note) && (p->note <= NOTE_MAX))
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-05-30 20:46:59 UTC (rev 612)
@@ -446,16 +446,6 @@
class CSoundFile;
-//======================
-class CPatternSizesMimic
-//======================
-{
-public:
- const ROWINDEX operator[](const int i) const;
- CPatternSizesMimic(const CSoundFile& csf) : m_rSndFile(csf) {}
-private:
- const CSoundFile& m_rSndFile;
-};
//Note: These are bit indeces. MSF <-> Mod(Specific)Flag.
//If changing these, ChangeModTypeTo() might need modification.
@@ -592,7 +582,6 @@
MODCHANNEL Chn[MAX_CHANNELS]; // Channels
MODCHANNELSETTINGS ChnSettings[MAX_BASECHANNELS]; // Channels settings
CPatternContainer Patterns; // Patterns
- CPatternSizesMimic PatternSize; // Mimics old PatternsSize-array(is read-only).
ModSequenceSet Order; // Modsequences. Order[x] returns an index of a pattern located at order x.
MODSAMPLE Samples[MAX_SAMPLES]; // Sample Headers
MODINSTRUMENT *Instruments[MAX_INSTRUMENTS]; // Instrument Headers
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-05-30 20:42:33 UTC (rev 611)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-05-30 20:46:59 UTC (rev 612)
@@ -750,9 +750,9 @@
// Weird stuff?
if ((m_nPattern >= Patterns.Size()) || (!Patterns[m_nPattern])) return FALSE;
// Should never happen
- if (m_nRow >= PatternSize[m_nPattern]) m_nRow = 0;
+ if (m_nRow >= Patterns[m_nPattern].GetNumRows()) m_nRow = 0;
m_nNextRow = m_nRow + 1;
- if (m_nNextRow >= PatternSize[m_nPattern])
+ if (m_nNextRow >= Patterns[m_nPattern].GetNumRows())
{
if (!(m_dwSongFlags & SONG_PATTERNLOOP)) m_nNextPattern = m_nCurrentPattern + 1;
m_nNextRow = 0;
@@ -1978,7 +1978,7 @@
// For now there is no difference between mute and sync mute with VSTis.
if (pChn->dwFlags & (CHN_MUTE|CHN_SYNCMUTE)) return;
if ((!m_nInstruments) || (m_nPattern >= Patterns.Size())
- || (m_nRow >= PatternSize[m_nPattern]) || (!Patterns[m_nPattern])) return;
+ || (m_nRow >= Patterns[m_nPattern].GetNumRows()) || (!Patterns[m_nPattern])) return;
const MODCOMMAND::NOTE note = pChn->nRowNote;
const MODCOMMAND::INSTR instr = pChn->nRowInstr;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-30 20:42:40
|
Revision: 611
http://modplug.svn.sourceforge.net/modplug/?rev=611&view=rev
Author: saga-games
Date: 2010-05-30 20:42:33 +0000 (Sun, 30 May 2010)
Log Message:
-----------
Updated muParser files to most recent version. Still unused...
Modified Paths:
--------------
trunk/OpenMPT/muParser/build/autoconf/aclocal.m4
trunk/OpenMPT/muParser/build/autoconf/acregen.sh
trunk/OpenMPT/muParser/build/autoconf/autoconf_inc.m4
trunk/OpenMPT/muParser/build/autoconf/configure.ac
trunk/OpenMPT/muParser/build/makefile.bcc
trunk/OpenMPT/muParser/build/makefile.mingw
trunk/OpenMPT/muParser/build/makefile.vc
trunk/OpenMPT/muParser/build/makefile.wat
trunk/OpenMPT/muParser/include/muParser.h
trunk/OpenMPT/muParser/include/muParserBase.h
trunk/OpenMPT/muParser/include/muParserBytecode.h
trunk/OpenMPT/muParser/include/muParserComplex.h
trunk/OpenMPT/muParser/include/muParserDef.h
trunk/OpenMPT/muParser/include/muParserFixes.h
trunk/OpenMPT/muParser/include/muParserTest.h
trunk/OpenMPT/muParser/src/muParser.cpp
trunk/OpenMPT/muParser/src/muParserBase.cpp
trunk/OpenMPT/muParser/src/muParserBytecode.cpp
trunk/OpenMPT/muParser/src/muParserComplex.cpp
trunk/OpenMPT/muParser/src/muParserError.cpp
trunk/OpenMPT/muParser/src/muParserInt.cpp
trunk/OpenMPT/muParser/src/muParserTest.cpp
trunk/OpenMPT/muParser/src/muParserTokenReader.cpp
Added Paths:
-----------
trunk/OpenMPT/muParser/Changes.txt
trunk/OpenMPT/muParser/Credits.txt
trunk/OpenMPT/muParser/Install.txt
trunk/OpenMPT/muParser/build/msvc2003/
trunk/OpenMPT/muParser/build/msvc2003/muparser_muParser.vcproj
trunk/OpenMPT/muParser/build/msvc2005/
trunk/OpenMPT/muParser/build/msvc2005/muparser_muParser.vcproj
trunk/OpenMPT/muParser/build/msvc2008/
trunk/OpenMPT/muParser/build/msvc2008/muparser_muParser.vcproj
Removed Paths:
-------------
trunk/OpenMPT/muParser/Makefile.in
trunk/OpenMPT/muParser/build/msvc8/
trunk/OpenMPT/muParser/build/msvc9/
trunk/OpenMPT/muParser/configure
Added: trunk/OpenMPT/muParser/Changes.txt
===================================================================
--- trunk/OpenMPT/muParser/Changes.txt (rev 0)
+++ trunk/OpenMPT/muParser/Changes.txt 2010-05-30 20:42:33 UTC (rev 611)
@@ -0,0 +1,354 @@
+
+ __________
+ _____ __ __\______ \_____ _______ ______ ____ _______
+ / \ | | \| ___/\__ \ \_ __ \/ ___/_/ __ \\_ __ \
+ | Y Y \| | /| | / __ \_| | \/\___ \ \ ___/ | | \/
+ |__|_| /|____/ |____| (____ /|__| /____ > \___ >|__|
+ \/ \/ \/ \/
+
+ Copyright (C) 2010
+ Ingo Berg
+
+History:
+--------
+
+Rev 1.00 : July 21 2004
+-----------------------
+
+ * Initial release
+
+
+Rev 1.01 : July 23 2004
+-----------------------
+
+ * Support for user defined functions has been added; new functions: AddFun(), ClearFun(),
+ InitFunctions().
+ * Built in constants have been removed; the parser contained undocumented built in
+ constants pi, e.
+ There was the possibility of name conflicts with user defined variables.
+ * Setting multiple variables with SetVar can now be done with a map of names and pointers as the only
+ argument. For this reason, a new type Parser::varmap_type was added. The old version that took 3
+ arguments (array of names, array of pointers, and array length) is now marked as deprecated.
+ * The names of logarithm functions have changed. The new names are: log2 for base 2, log10 or log for
+ base 10, and ln for base e.
+
+
+Rev 1.02 : July 30 2004
+-----------------------
+
+ * Support for user defined constants added; new functions: InitConst(), AddConst(), SetConst(),
+ ClearConst().
+ * Single variables can now be added using AddVar(); you have now the choice of adding them either
+ one by one or all at the same time using SetVar(const varmap_type &a_vVar).
+ * Internal handling of variables changed, is now similar to function handling.
+ * Virtual destructor added; InitFun(), InitConst() are now virtual too thus making it possible to
+ derive new parsers with a modified set of default functions and constants.
+ * Support for user defined functions with 2 or 3 parameters added; bytecode format changed to hold
+ function parameter count.
+
+
+Rev 1.03 : August 10 2004
+-------------------------
+
+ * Support for user-defined unary post value operators added; new functions: AddPostOp(), InitPostOp(),
+ ClearPostOp().
+ * Minor changes to the bytecode parsing routine.
+ * User defined functions can now have up to four parameters.
+ * Performance optimized: simple formula optimization added; (precalculation of constant parts of the
+ expression).
+ * Bug fixes: Multi-arg function parameters, constant name lookup, unary minus did not work correctly.
+
+
+Rev 1.04 : August 16 2004
+-------------------------
+
+ * Support for functions with variable number of arguments added.
+ * Internal structure changed; new: ParserBase.h, ParserBase.cpp; removed: ParserException.h;
+ changed: Parser.h, Parser.cpp.
+ * Bug in the bytecode calculation function fixed (affected the unary minus operator).
+ * Optimizer can be deactivated; new function: EnableOptimizer(bool bStat).
+
+
+Rev 1.05 : August 20 2004
+-------------------------
+
+ * Variable/constant names will now be checked for invalid characters.
+ * Querying the names of all variables used in an expression is now possible; new function: GetUsedVar().
+ * Disabling bytecode parsing is now possible; new function: EnableByteCode(bool bStat).
+ * Predefined functions with variable number of arguments added: sum, avg, min, max.
+ * Unary prefix operators added; new functions: AddPrefixOp(...), ClearPrefixOp().
+ * Postfix operator interface names changed; new function names: AddPostfixOp(...), ClearPostfixOp().
+ * Hardcoded sign operators removed in favor of prefix operators; bytecode format changed accordingly.
+ * Internal changes: static array removed in Command code calculation routine; misc. changes.
+
+
+Rev 1.06 : August 20 2004
+-------------------------
+
+ * Volatile functions added; All overloaded AddFun(...) functions can now take a third parameter
+ indicating that the function can not be optimized.
+ * Internal changes: muParserStack.h simplified; refactorings
+ * Parser is now distributed under the MIT License; all comments changed accordingly.
+
+
+Rev 1.07 : September 4 2004
+---------------------------
+
+ * Improved portability; Changes to make life for MSVC 6 user easier, there are probably still some
+ issues left.
+ * Improved portability; Changes in order to allow compiling on BCB.
+ * New function; value_type Diff(value_type *a_Var, value_type a_fPos) 4th order Differentiation with
+ respect to a certain variable; added in muParser.h.
+
+
+Rev 1.08 : November, 2004
+-------------------------
+
+ * unpublished; experimental template version with respect to data type and underlying string
+ type (string <-> widestring).
+
+
+Rev 1.09 : November 20, 2004
+----------------------------
+
+ * New member function: RemoveVar(...) can be used for removing a single variable from the internal storage.
+ * Internal structure changed; changing base datatype at compile time is now possible.
+ * Bug fix: Postfix operator parsing could fail in certain cases; This has been fixed now.
+ * Internal change: Removed most dependancies from the C-string libraries.
+ * Internal change: Bytecode is now stored in a seperate class: ParserByteCode.h.
+ * Internal change: GetUsedVar() does no longer require that variables are defined at time of call.
+ * Internal change: Error treatment changed. ParserException is no longer derived from std::runtime_error;
+ Internal treatment of Error messages changed.
+ * New functions in Parser interface; ValidNameChars(), ValidOprtChars() and ValidPrefixOprtChars()
+ they are used for defining the charset allowed for variable-, operator- and function names.
+
+
+Rev 1.10 : December 30, 2004
+----------------------------
+
+Release Notes:
+This version does not contain major new feature compared to V1.07 but its internal structure has
+changed significantly. The String parsing routine is slower than the one of V1.07 but bytecode
+parsing is equally fast. On the other hand the error messages of V1.09 are more flexible and you
+can change its value datatype. It should work on 64-bit systems. For this reason I supply both
+versions for download. If you use V1.07 and are happy with it there is no need for updating
+your version.
+
+ * New example program: Archive now contains two demo programs: One for standard C++ and one for
+ managed C++.
+ * New member function: RemoveVar(...) can be used for removing a single variable from the internal storage.
+ * New member function: GetVar() can be used for querying the variable names and pointers of all
+ variables defined in the parser.
+ * New member function: GetConst() can be used for querying all defined constants and their values.
+ * New member function: GetFunDef() can be used for querying all defined functions and the number of
+ arguments they expect.
+ * Internal structure changed; hanging base datatype at compile time is now possible.
+ * Bugfix: Postfix operator parsing could fail in certain cases; This has been fixed now.
+ * Bugfix: Variable names must will now be tested if they conflict with constant or function names.
+ * Internal change: Removed most dependencies from the C-string libraries.
+ * Internal change: Bytecode is now stored in a separate class: ParserByteCode.h
+ * Internal change: GetUsedVar() does no longer require that variables are defined at time of call.
+ * Internal change: Error treatment changed. ParserException is no longer derived from
+ std::runtime_error; Internal treatment of Error messages changed.
+ * New functions in Parser interface: ValidNameChars(), ValidOprtChars() and ValidPrefixOprtChars()
+ they are used for defining the charset allowed for variable-, operator- and
+ function names.
+
+
+Rev 1.2 / 1.21: April, 2005
+---------------------------
+
+Release Notes:
+First of all the interface has changed so this version is not backwards compatible.
+After receiving a couple of questions about it, this version features support for user defined binary
+operators. Consequently the built in operators can now be turned off, thus you can deactivate them and
+write complete customized parser subclasses that only contain the functionality you want. Another new
+feature is the introduction of callback functions taking string arguments, implicit generation of
+variables and the Assignement operator.
+
+ Functionality
+ * New built in operator: xor; Logical xor.
+ * New built in operator: Assignement operator; Defining variables in terms of other variables/constants
+ * New feature: Strings as arguments for callback functions
+ * New feature: User defined binary operators
+ * New feature: ParserInt a class with a sample implementation for
+ integer numbers.
+ * New feature: Callbacks to value regognition functions.
+
+ * Removed: all predefined postfix operators have been removed.
+ * New project file: Now comes with a ready to use windows DLL.
+ * New project file: Makefile for cygwin now included.
+ * New example: Example3 shows usage of the DLL.
+
+ Interface changes
+ * New member function: DefineOprt For adding user defined binary operators.
+ * New member function: EnableBuiltInOprt(bool) Enables/Disables built in binary operators.
+ * New member function: AddValIdent(...) to add callbacks for custom value recognition functions.
+ * Removed: SetVar(), SetConst().
+ * Renamed: Most interface functions have been renamed
+ * Changed: The type for multiargument callbacks multfun_type has changed. It no longer takes a std::vector as input.
+
+ Internal changes
+ * new class muParserTokenReader.h encapsulates the token identification and token assignement.
+ * Internal handling of function callbacks unified as a result the performance of the bytecode evaluation increased.
+
+
+Rev 1.22: October, 2005
+-----------------------
+
+Release notes:
+
+All features of Version 1.22 are similar to Version 1.21. Version 1.22 fixes a compilation issue with gcc 4.0. In
+order to fix this issue I rewrote part of the library to remove some unnecessary templates. This should make the
+code cleaner. The Borland Project files have been removed. If you want to use it with Borland either use the dll version or create your own project files. I can't do it since I don't have this compiler at hand.
+
+Changes:
+
+ Project Changes:
+ * Borland project files removed
+ (The code should still compile with BCB but I cant provide you with project files)
+
+ Internal Changes:
+ * unnecessary template files have been removed:
+ - new files: muParserError.cpp, muParserTokenReader.cpp, muParserCallback.cpp
+ - removed Files: muIParserTypes.h
+
+
+Rev 1.23: 19. October, 2005
+---------------------------
+
+Changes:
+
+ Bugfixes:
+ * Variable factory examples in Example1.cpp and Example3.cpp contained a subtle bug.
+
+ New features:
+ * Added a MSVC6 project file and introduced muParserFixes.h in order to make it compile with MSVC6
+
+
+Rev 1.24: 29. October, 2005
+---------------------------
+
+Changes:
+
+ Compatibility improvements:
+ * parser now works on 64 bit compilers
+ * (bytecode base datatype can now be changed freely)
+
+
+Rev 1.25: 5. February, 2006
+---------------------------
+
+ Build system: (special thanks to Francesco Montorsi for implementing it!)
+ * created a bakefile-based build system which adds support for the following win32 compilers:
+ -> MS visual C++ (6 and .NET)
+ -> BorlandC++ (5 or greater)
+ -> Mingw32 (tested with gcc 3.2)
+ -> Watcom (not tested)
+ and for GCC on Unix (using a standard autoconf's configure script).
+
+ Compatibility improvements:
+ * fixed some small warnings when using -Wall with GCC on Unix
+ * added inclusion guards for win32-specific portions of code
+ * added fixes that remove compiler warnings on Intel C++ and the Solaris C++ compiler.
+
+
+Rev 1.26: (unofficial release)
+---------------------------
+
+ New Features:
+ * Unary operator precedence can now be changed by the user.
+
+
+Rev 1.27:
+---------------------------
+
+ Build system:
+ * Modified build\ directory layout introducing some subfolders
+ for the various IDE supported
+ * Project files for BCB and MSVC7 added
+ * Switched to use bakefile 0.2.1 which now correctly creates the
+ "make uninstall" target for autoconf's Makefile.in
+ * Now the library debug builds are named "muparserd" instead of "muparser"
+ to allow multiple mixed release/debug builds to coexist; so e.g. on Windows
+ when building with DEBUG=1, you'll get "muparserd.lib" instead of "muparser.lib"
+
+ New Features:
+ * Factory functions can now take a user defined pointer
+ * String functions can now be used with up to two additional
+ double parameters
+ * Support for UNICODE character types added
+ * Infix operator priority can now be changed by the user
+
+ Bugfixes:
+ * An internal error was raised when evaluating an empty
+ expressions
+ * The error message raised in case of name collisions between
+ implicitely defined variables and postfix operators did contain
+ misleading data.
+
+
+Rev 1.28: 02. July, 2007
+---------------------------
+
+ Library changes:
+ * Interface for the dynamic library changed and extended to create an interface
+ using pure C functions only.
+ * mupInit() removed
+
+ Build system:
+ * MSVC7 Project files removed in favor of MSVC8
+
+ Bugfixes:
+ * The dynamic library did not build on other systems than linux due to a misplaced
+ preprocessor definition. This is fixed now.
+
+Rev 1.29: Januar 2008
+---------------------
+
+ Unrelease Version available only via SVN.
+
+
+Rev 1.30: 09.06.2008
+--------------------
+
+ Changes:
+ * Epsilon of the numerical differentiation algorithm changed to allow greater accuracy.
+
+ New features:
+ * Setting thousands separator and decimal separator is now possible
+
+ Bugfixes:
+ * The dll interface did not provide a callback for functions without any arguments.
+
+Rev 1.31cp: 15.01.2010 (Maintainance release for CodeProject)
+----------------------
+
+ Changes:
+ * Archive structure changed
+ * C# wrapper added
+ * Fixed issued that prevented compiling with VS2010 Beta2
+
+Rev 1.32: 29.01.2010
+--------------------
+
+ Changes:
+ * "example3" renamed to "example2"
+ * Project/Makefiles files are now provided for:
+ - msvc2003
+ - msvc2005
+ - msvc2008
+ - watcom (makefile)
+ - mingw (makefile)
+ - bcc (makefile)
+ * Project files for borland cpp builder were removed
+
+ New features:
+ * Added function returning muparsers version number
+ * Added function for resetting the locale
+
+ Bugfixes:
+ * Changes example1 in order to fix issues with irritating memory leak reports.
+ Added conditional code for memory leak detection with MSVC in example1.
+ (see: http://www.codeproject.com/KB/recipes/FastMathParser.aspx?msg=3286367#xx3286367xx)
+ * Fixed some warnings for gcc
Added: trunk/OpenMPT/muParser/Credits.txt
===================================================================
--- trunk/OpenMPT/muParser/Credits.txt (rev 0)
+++ trunk/OpenMPT/muParser/Credits.txt 2010-05-30 20:42:33 UTC (rev 611)
@@ -0,0 +1,28 @@
+######################################################################
+# #
+# __________ #
+# _____ __ __\______ \_____ _______ ______ ____ _______ #
+# / \ | | \| ___/\__ \ \_ __ \/ ___/_/ __ \\_ __ \ #
+# | Y Y \| | /| | / __ \_| | \/\___ \ \ ___/ | | \/ #
+# |__|_| /|____/ |____| (____ /|__| /____ > \___ >|__| #
+# \/ \/ \/ \/ #
+# #
+# Copyright (C) 2010 #
+# Ingo Berg #
+# #
+######################################################################
+
+Credits:
+--------
+
+I'd like to thank all the people contacting me with suggestions and
+bug reports. Your feedback is always welcome and helps to improve this
+project.
+
+Especially I'd like to thank:
+-----------------------------
+
+Francesco Montorsi for setting up the new parser build system as well
+as the SVN server at sourceforge. Ion Vasilief for Feedback,
+suggestions and help with the MSVC6 adaptation, Giampaolo Belini for
+his help in fixing bugs.
Added: trunk/OpenMPT/muParser/Install.txt
===================================================================
--- trunk/OpenMPT/muParser/Install.txt (rev 0)
+++ trunk/OpenMPT/muParser/Install.txt 2010-05-30 20:42:33 UTC (rev 611)
@@ -0,0 +1,126 @@
+
+ __________
+ _____ __ __\______ \_____ _______ ______ ____ _______
+ / \ | | \| ___/\__ \ \_ __ \/ ___/_/ __ \\_ __ \
+ | Y Y \| | /| | / __ \_| | \/\___ \ \ ___/ | | \/
+ |__|_| /|____/ |____| (____ /|__| /____ > \___ >|__|
+ \/ \/ \/ \/
+
+ Mathematical expressions parser library
+ Copyright (C) 2010 Ingo Berg (muparser{at}gmx.de)
+
+
+
+ Contents
+ ========
+
+ 1. Installation on win32
+ 2. Installation on unix
+ 2.1 Other miscellaneous info Unix-specific
+ 3. Where to ask for help
+
+
+
+ 1. Installation on win32
+ ========================
+
+ muParser supports various win32 command-line compilers:
+ -> mingw
+ -> borland
+ -> watcom
+ -> microsoft CL
+ and provides also the project files for MSVC6 IDE.
+
+ In order to compile muParser from makefiles, open an MSDOS
+ prompt and then move to the muParser/build directory and
+ type:
+
+ mingw32-make -fmakefile.mingw for mingw
+ nmake -fmakefile.vc for msvc
+ make -fmakefile.bcc for borland
+ wmake -fmakefile.wat for watcom
+
+ All makefiles supports the following options:
+
+ # Set to 1 to build debug version [0,1]
+ # 0 - Release
+ # 1 - Debug
+ DEBUG = 0
+
+ # Set to 1 to build shared (DLL) version [0,1]
+ # 0 - Static
+ # 1 - DLL
+ SHARED = 0
+
+ # Set to 1 to compile samples [0,1]
+ SAMPLES = 1
+
+ The muParser library is created in the 'lib' folder and the sample
+ binaries are created in samples\example1 or samples\example2.
+
+ NOTE: samples\example1 can be compiled *only* when building
+ muParser as a STATIC library (SHARED=0).
+ samples\example2 can be compiled *only* when building
+ muParser as a SHARED library (SHARED=1).
+
+
+
+ 2. Installation on Unix/Linux
+ =============================
+
+ muParser can be installed just extracting the sources somewhere
+ and then, from a terminal, typing:
+
+ cd [path to muParser]
+ ./configure [--enable-shared=yes/no] [--enable-samples=yes/no]
+ [--enable-debug=yes/no]
+ make
+ [sudo*] make install
+ [sudo*] ldconfig
+ cd samples/example1
+ ./example1
+
+ * = this command must be executed with root permissions and thus
+ you have to use 'sudo' or just 'su' to gain root access.
+ Note that installation and ldconfig are not strictly required unless
+ you built in shared mode.
+
+ The "make" step will create the muParser library in 'lib' and the
+ sample binary in samples/example1.
+ The samples/example2 is win32-specific and thus won't be built.
+
+
+
+ 2.1 Other miscellaneous info Unix-specific
+ ==========================================
+
+ If you don't like to have your muParser folder filled by temporary
+ files created by GCC, then you can do the following:
+
+ mkdir mybuild && cd mybuild && ../configure && make
+
+ to put all object files in the "mybuild" directory.
+
+ If you want to use muParser library in your programs, you can use
+ the pkg-config program (this works only if muParser was installed
+ with 'make install' !). The commands:
+
+ pkg-config muparser --cflags
+ pkg-config muparser --libs
+
+ will return all useful info you need to build your programs against
+ muParser !
+
+
+
+ 3. Where to ask for help
+ ========================
+
+ If you find problems with either compilation, installation or usage
+ of muParser, then you can ask in the muParser forum at:
+
+ https://sourceforge.net/forum/forum.php?forum_id=462843
+
+ For more info about muParser, visit:
+ http://sourceforge.net/projects/muparser/
+ http://muparser.sourceforge.net
Deleted: trunk/OpenMPT/muParser/Makefile.in
===================================================================
--- trunk/OpenMPT/muParser/Makefile.in 2010-05-29 12:29:26 UTC (rev 610)
+++ trunk/OpenMPT/muParser/Makefile.in 2010-05-30 20:42:33 UTC (rev 611)
@@ -1,345 +0,0 @@
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.1 (http://bakefile.sourceforge.net)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-
-@MAKE_SET@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-INSTALL = @INSTALL@
-SHARED_LD_CXX = @SHARED_LD_CXX@
-LIBEXT = @LIBEXT@
-LIBPREFIX = @LIBPREFIX@
-SO_SUFFIX = @SO_SUFFIX@
-DLLIMP_SUFFIX = @DLLIMP_SUFFIX@
-EXEEXT = @EXEEXT@
-LN_S = @LN_S@
-SETFILE = @SETFILE@
-PIC_FLAG = @PIC_FLAG@
-SONAME_FLAG = @SONAME_FLAG@
-STRIP = @STRIP@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_DIR = @INSTALL_DIR@
-BK_DEPS = @BK_DEPS@
-srcdir = @srcdir@
-top_builddir = @top_builddir@
-libdir = @libdir@
-DLLPREFIX = @DLLPREFIX@
-LIBS = @LIBS@
-AR = @AR@
-AROPTIONS = @AROPTIONS@
-RANLIB = @RANLIB@
-CXX = @CXX@
-CXXFLAGS = @CXXFLAGS@
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-
-### Variables: ###
-
-DESTDIR =
-MUPARSER_LIB_CXXFLAGS = $(____DEBUG) $(____SHARED) $(____SHARED_0) \
- -I$(srcdir)/include $(CPPFLAGS) $(CXXFLAGS)
-MUPARSER_LIB_OBJECTS = \
- muParser_lib_muParserBytecode.o \
- muParser_lib_muParserTest.o \
- muParser_lib_muParser.o \
- muParser_lib_muParserDLL.o \
- muParser_lib_muParserInt.o \
- muParser_lib_muParserTokenReader.o \
- muParser_lib_muParserError.o \
- muParser_lib_muParserCallback.o \
- muParser_lib_muParserBase.o
-MUPARSER_LIB_HEADERS = \
- include/muParserError.h \
- include/muParserFixes.h \
- include/muParserStack.h \
- include/muParserBytecode.h \
- include/muParserToken.h \
- include/muParserBase.h \
- include/muParserTest.h \
- include/muParserTokenReader.h \
- include/muParserCallback.h \
- include/muParser.h \
- include/muParserDLL.h \
- include/muParserDef.h \
- include/muParserInt.h
-MUPARSER_DLL_CXXFLAGS = $(____DEBUG) $(____SHARED) $(____SHARED_0) \
- -I$(srcdir)/include $(PIC_FLAG) $(CPPFLAGS) $(CXXFLAGS)
-MUPARSER_DLL_OBJECTS = \
- muParser_dll_muParserBytecode.o \
- muParser_dll_muParserTest.o \
- muParser_dll_muParser.o \
- muParser_dll_muParserDLL.o \
- muParser_dll_muParserInt.o \
- muParser_dll_muParserTokenReader.o \
- muParser_dll_muParserError.o \
- muParser_dll_muParserCallback.o \
- muParser_dll_muParserBase.o
-MUPARSER_DLL_HEADERS = \
- include/muParserError.h \
- include/muParserFixes.h \
- include/muParserStack.h \
- include/muParserBytecode.h \
- include/muParserToken.h \
- include/muParserBase.h \
- include/muParserTest.h \
- include/muParserTokenReader.h \
- include/muParserCallback.h \
- include/muParser.h \
- include/muParserDLL.h \
- include/muParserDef.h \
- include/muParserInt.h
-EXAMPLE1_CXXFLAGS = $(____DEBUG) -I$(srcdir)/include $(CPPFLAGS) $(CXXFLAGS)
-EXAMPLE1_OBJECTS = \
- example1_Example1.o
-
-### Conditionally set variables: ###
-
-@COND_DEPS_TRACKING_0@CXXC = $(CXX)
-@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
-@COND_DEBUG_0@DEBUG_BUILD_POSTFIX =
-@COND_DEBUG_1@DEBUG_BUILD_POSTFIX = d
-@COND_SHARED_0@__muParser_lib___depname = \
-@COND_SHARED_0@ $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT)
-@COND_SHARED_0@__install_muParser_lib___depname = install_muParser_lib
-@COND_SHARED_0@__uninstall_muParser_lib___depname = uninstall_muParser_lib
-@COND_SHARED_0@__install_muParser_lib_headers___depname = \
-@COND_SHARED_0@ install_muParser_lib_headers
-@COND_SHARED_0@__uninstall_muParser_lib_headers___depname = \
-@COND_SHARED_0@ uninstall_muParser_lib_headers
-COND_SHARED_1___muParser_dll___depname = \
- $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
-@COND_SHARED_1@__muParser_dll___depname = $(COND_SHARED_1___muParser_dll___depname)
-@COND_SHARED_1@__install_muParser_dll___depname = install_muParser_dll
-@COND_SHARED_1@__uninstall_muParser_dll___depname = uninstall_muParser_dll
-COND_PLATFORM_MACOSX_1___muParser_dll___macinstnamecmd = -install_name \
- $(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2)
-@COND_PLATFORM_MACOSX_1@__muParser_dll___macinstnamecmd = $(COND_PLATFORM_MACOSX_1___muParser_dll___macinstnamecmd)
-@COND_SHARED_1@__install_muParser_dll_headers___depname = \
-@COND_SHARED_1@ install_muParser_dll_headers
-@COND_SHARED_1@__uninstall_muParser_dll_headers___depname = \
-@COND_SHARED_1@ uninstall_muParser_dll_headers
-COND_PLATFORM_OS2_1___muParser_dll___importlib = -import \
- $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_PLATFORM_OS2_1@__muParser_dll___importlib = $(COND_PLATFORM_OS2_1___muParser_dll___importlib)
-COND_WINDOWS_IMPLIB_1___muParser_dll___importlib = \
- -Wl,--out-implib=$(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_WINDOWS_IMPLIB_1@__muParser_dll___importlib = $(COND_WINDOWS_IMPLIB_1___muParser_dll___importlib)
-@COND_PLATFORM_MACOSX_0_USE_SOVERSION_1@__muParser_dll___targetsuf2 \
-@COND_PLATFORM_MACOSX_0_USE_SOVERSION_1@ = .$(SO_SUFFIX).0
-@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__muParser_dll___targetsuf2 \
-@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@ = .0.$(SO_SUFFIX)
-@COND_USE_SOVERSION_0@__muParser_dll___targetsuf2 = .$(SO_SUFFIX)
-@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
-@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@ = \
-@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@ .$(SO_SUFFIX).0.0.0
-@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
-@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@ = .0.0.0.$(SO_SUFFIX)
-@COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
-@COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1@ = -0.$(SO_SUFFIX)
-@COND_USE_SOVERSION_0@__muParser_dll___targetsuf3 = .$(SO_SUFFIX)
-COND_USE_SOVERLINUX_1___muParser_dll___soname_flags = \
- $(SONAME_FLAG)$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2)
-@COND_USE_SOVERLINUX_1@__muParser_dll___soname_flags = $(COND_USE_SOVERLINUX_1___muParser_dll___soname_flags)
-COND_USE_SOVERSOLARIS_1___muParser_dll___soname_flags = \
- $(SONAME_FLAG)$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
-@COND_USE_SOVERSOLARIS_1@__muParser_dll___soname_flags = $(COND_USE_SOVERSOLARIS_1___muParser_dll___soname_flags)
-COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_cmd = (cd \
- $(top_builddir)/lib/; rm -f \
- $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) \
- $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \
- $(LN_S) \
- $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) \
- $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \
- $(LN_S) \
- $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) \
- $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX))
-@COND_USE_SOSYMLINKS_1@__muParser_dll___so_symlinks_cmd = $(COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_cmd)
-COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_inst_cmd = rm -f \
- $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) \
- $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \
- $(LN_S) \
- $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) \
- $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \
- $(LN_S) \
- $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) \
- $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_USE_SOSYMLINKS_1@__muParser_dll___so_symlinks_inst_cmd = $(COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_inst_cmd)
-COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_uninst_cmd = rm -f \
- $(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) \
- $(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_USE_SOSYMLINKS_1@__muParser_dll___so_symlinks_uninst_cmd = $(COND_USE_SOSYMLINKS_1___muParser_dll___so_symlinks_uninst_cmd)
-@COND_PLATFORM_MACOSX_1@__muParser_dll___macver = \
-@COND_PLATFORM_MACOSX_1@ -compatibility_version 1 -current_version 1
-@COND_SAMPLES_1@__example1___depname = \
-@COND_SAMPLES_1@ $(top_builddir)/samples/example1/example1$(EXEEXT)
-@COND_PLATFORM_MAC_1@__example1___mac_setfilecmd = \
-@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL \
-@COND_PLATFORM_MAC_1@ $(top_builddir)/samples/example1/example1$(EXEEXT)
-@COND_SHARED_0@____SHARED =
-@COND_SHARED_1@____SHARED = -DMUPARSER_DLL
-@COND_SHARED_0@____SHARED_0 =
-@COND_SHARED_1@____SHARED_0 = -DMUPARSERLIB_EXPORTS
-@COND_DEBUG_0@____DEBUG = -DNDEBUG
-@COND_DEBUG_1@____DEBUG =
-
-### Targets: ###
-
-all: $(__muParser_lib___depname) $(__muParser_dll___depname) $(__example1___depname)
-
-install: all $(__install_muParser_lib___depname) $(__install_muParser_lib_headers___depname) $(__install_muParser_dll___depname) $(__install_muParser_dll_headers___depname)
- $(INSTALL_DIR) $(libdir)/pkgconfig
- $(INSTALL_DATA) build/autoconf/muparser.pc $(libdir)/pkgconfig
-
-uninstall: $(__uninstall_muParser_lib___depname) $(__uninstall_muParser_lib_headers___depname) $(__uninstall_muParser_dll___depname) $(__uninstall_muParser_dll_headers___depname)
-
-install-strip: install
- $(STRIP) $(DESTDIR)$(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
-
-clean:
- rm -rf ./.deps ./.pch
- rm -f ./*.o
- rm -f $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT)
- rm -f $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
- rm -f $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
- rm -f $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2)
- rm -f $(top_builddir)/samples/example1/example1$(EXEEXT)
-
-distclean: clean
- rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
- rm -f build/autoconf/muparser.pc
-
-@COND_SHARED_0@$(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT): $(MUPARSER_LIB_OBJECTS)
-@COND_SHARED_0@ rm -f $@
-@COND_SHARED_0@ $(AR) $(AROPTIONS) $@ $(MUPARSER_LIB_OBJECTS)
-@COND_SHARED_0@ $(RANLIB) $@
-
-@COND_SHARED_0@install_muParser_lib:
-@COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(libdir)
-@COND_SHARED_0@ $(INSTALL_DATA) $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT) $(DESTDIR)$(libdir)
-
-@COND_SHARED_0@uninstall_muParser_lib:
-@COND_SHARED_0@ rm -f $(DESTDIR)$(libdir)/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT)
-
-@COND_SHARED_0@install_muParser_lib_headers:
-@COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(prefix)
-@COND_SHARED_0@ for f in $(MUPARSER_LIB_HEADERS); do \
-@COND_SHARED_0@ if test ! -d $(DESTDIR)$(prefix)/`dirname $$f` ; then \
-@COND_SHARED_0@ $(INSTALL_DIR) $(DESTDIR)$(prefix)/`dirname $$f`; \
-@COND_SHARED_0@ fi; \
-@COND_SHARED_0@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(prefix)/$$f; \
-@COND_SHARED_0@ done
-
-@COND_SHARED_0@uninstall_muParser_lib_headers:
-@COND_SHARED_0@ for f in $(MUPARSER_LIB_HEADERS); do \
-@COND_SHARED_0@ rm -f $(DESTDIR)$(prefix)/$$f; \
-@COND_SHARED_0@ done
-
-@COND_SHARED_1@$(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3): $(MUPARSER_DLL_OBJECTS)
-@COND_SHARED_1@ $(SHARED_LD_CXX) $@ $(MUPARSER_DLL_OBJECTS) $(LDFLAGS) $(__muParser_dll___macinstnamecmd) $(__muParser_dll___importlib) $(__muParser_dll___soname_flags) $(__muParser_dll___macver) $(LIBS)
-@COND_SHARED_1@
-@COND_SHARED_1@ $(__muParser_dll___so_symlinks_cmd)
-
-@COND_SHARED_1@install_muParser_dll:
-@COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir)
-@COND_SHARED_1@ $(INSTALL_DATA) $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir)
-@COND_SHARED_1@ $(INSTALL_PROGRAM) $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) $(DESTDIR)$(libdir)
-@COND_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__muParser_dll___so_symlinks_inst_cmd))
-
-@COND_SHARED_1@uninstall_muParser_dll:
-@COND_SHARED_1@ rm -f $(DESTDIR)$(libdir)/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_SHARED_1@ rm -f $(DESTDIR)$(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
-@COND_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__muParser_dll___so_symlinks_uninst_cmd))
-
-@COND_SHARED_1@install_muParser_dll_headers:
-@COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(prefix)
-@COND_SHARED_1@ for f in $(MUPARSER_DLL_HEADERS); do \
-@COND_SHARED_1@ if test ! -d $(DESTDIR)$(prefix)/`dirname $$f` ; then \
-@COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(prefix)/`dirname $$f`; \
-@COND_SHARED_1@ fi; \
-@COND_SHARED_1@ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(prefix)/$$f; \
-@COND_SHARED_1@ done
-
-@COND_SHARED_1@uninstall_muParser_dll_headers:
-@COND_SHARED_1@ for f in $(MUPARSER_DLL_HEADERS); do \
-@COND_SHARED_1@ rm -f $(DESTDIR)$(prefix)/$$f; \
-@COND_SHARED_1@ done
-
-@COND_SAMPLES_1@$(top_builddir)/samples/example1/example1$(EXEEXT): $(EXAMPLE1_OBJECTS) $(__muParser_lib___depname)
-@COND_SAMPLES_1@ $(CXX) -o $@ $(EXAMPLE1_OBJECTS) -L$(top_builddir)/lib $(LDFLAGS) -L$(srcdir)/lib $(LIBS) -lmuparser$(DEBUG_BUILD_POSTFIX)
-@COND_SAMPLES_1@
-@COND_SAMPLES_1@ $(__example1___mac_setfilecmd)
-
-lib: $(__muParser_lib___depname) $(__muParser_dll___depname)
-
-samples: $(__example1___depname)
-
-documentation:
- ( cd $(srcdir)/docs && doxygen )
-
-muParser_lib_muParserBytecode.o: $(srcdir)/src/muParserBytecode.cpp
- $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserBytecode.cpp
-
-muParser_lib_muParserTest.o: $(srcdir)/src/muParserTest.cpp
- $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserTest.cpp
-
-muParser_lib_muParser.o: $(srcdir)/src/muParser.cpp
- $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParser.cpp
-
-muParser_lib_muParserDLL.o: $(srcdir)/src/muParserDLL.cpp
- $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserDLL.cpp
-
-muParser_lib_muParserInt.o: $(srcdir)/src/muParserInt.cpp
- $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserInt.cpp
-
-muParser_lib_muParserTokenReader.o: $(srcdir)/src/muParserTokenReader.cpp
- $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserTokenReader.cpp
-
-muParser_lib_muParserError.o: $(srcdir)/src/muParserError.cpp
- $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserError.cpp
-
-muParser_lib_muParserCallback.o: $(srcdir)/src/muParserCallback.cpp
- $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserCallback.cpp
-
-muParser_lib_muParserBase.o: $(srcdir)/src/muParserBase.cpp
- $(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserBase.cpp
-
-muParser_dll_muParserBytecode.o: $(srcdir)/src/muParserBytecode.cpp
- $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserBytecode.cpp
-
-muParser_dll_muParserTest.o: $(srcdir)/src/muParserTest.cpp
- $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserTest.cpp
-
-muParser_dll_muParser.o: $(srcdir)/src/muParser.cpp
- $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParser.cpp
-
-muParser_dll_muParserDLL.o: $(srcdir)/src/muParserDLL.cpp
- $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserDLL.cpp
-
-muParser_dll_muParserInt.o: $(srcdir)/src/muParserInt.cpp
- $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserInt.cpp
-
-muParser_dll_muParserTokenReader.o: $(srcdir)/src/muParserTokenReader.cpp
- $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserTokenReader.cpp
-
-muParser_dll_muParserError.o: $(srcdir)/src/muParserError.cpp
- $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserError.cpp
-
-muParser_dll_muParserCallback.o: $(srcdir)/src/muParserCallback.cpp
- $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserCallback.cpp
-
-muParser_dll_muParserBase.o: $(srcdir)/src/muParserBase.cpp
- $(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserBase.cpp
-
-example1_Example1.o: $(srcdir)/samples/example1/Example1.cpp
- $(CXXC) -c -o $@ $(EXAMPLE1_CXXFLAGS) $(srcdir)/samples/example1/Example1.cpp
-
-
-# Include dependency info, if present:
-@IF_GNU_MAKE@-include .deps/*.d
-
-.PHONY: all install uninstall clean distclean install_muParser_lib uninstall_muParser_lib install_muParser_lib_headers uninstall_muParser_lib_headers install_muParser_dll uninstall_muParser_dll install_muParser_dll_headers uninstall_muParser_dll_headers lib samples
Modified: trunk/OpenMPT/muParser/build/autoconf/aclocal.m4
===================================================================
--- trunk/OpenMPT/muParser/build/autoconf/aclocal.m4 2010-05-29 12:29:26 UTC (rev 610)
+++ trunk/OpenMPT/muParser/build/autoconf/aclocal.m4 2010-05-30 20:42:33 UTC (rev 611)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.11 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,15 +11,843 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+AC_DEFUN([AC_BAKEFILE_CREATE_FILE_DLLAR_SH],
+[
+dnl ===================== dllar.sh begins here =====================
+dnl (Created by merge-scripts.py from dllar.sh
+dnl file do not edit here!)
+D='$'
+cat <<EOF >dllar.sh
+#!/bin/sh
+#
+# dllar - a tool to build both a .dll and an .a file
+# from a set of object (.o) files for EMX/OS2.
+#
+# Written by Andrew Zabolotny, bi...@fr...
+# Ported to Unix like shell by Stefan Neis, Ste...@t-...
+#
+# This script will accept a set of files on the command line.
+# All the public symbols from the .o files will be exported into
+# a .DEF file, then linker will be run (through gcc) against them to
+# build a shared library consisting of all given .o files. All libraries
+# (.a) will be first decompressed into component .o files then act as
+# described above. You can optionally give a description (-d "description")
+# which will be put into .DLL. To see the list of accepted options (as well
+# as command-line format) simply run this program without options. The .DLL
+# is built to be imported by name (there is no guarantee that new versions
+# of the library you build will have same ordinals for same symbols).
+#
+# dllar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# dllar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with dllar; see the file COPYING. If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# To successfuly run this program you will need:
+# - Current drive should have LFN support (HPFS, ext2, network, etc)
+# (Sometimes dllar generates filenames which won't fit 8.3 scheme)
+# - gcc
+# (used to build the .dll)
+# - emxexp
+# (used to create .def file from .o files)
+# - emximp
+# (used to create .a file from .def file)
+# - GNU text utilites (cat, sort, uniq)
+# used to process emxexp output
+# - GNU file utilities (mv, rm)
+# - GNU sed
+# - lxlite (optional, see flag below)
+# (used for general .dll cleanup)
+#
+
+flag_USE_LXLITE=1;
+
+#
+# helper functions
+# basnam, variant of basename, which does _not_ remove the path, _iff_
+# second argument (suffix to remove) is given
+basnam(){
+ case ${D}# in
+ 1)
+ echo ${D}1 | sed 's/.*\\///' | sed 's/.*\\\\//'
+ ;;
+ 2)
+ echo ${D}1 | sed 's/'${D}2'${D}//'
+ ;;
+ *)
+ echo "error in basnam ${D}*"
+ exit 8
+ ;;
+ esac
+}
+
+# Cleanup temporary files and output
+CleanUp() {
+ cd ${D}curDir
+ for i in ${D}inputFiles ; do
+ case ${D}i in
+ *!)
+ rm -rf \`basnam ${D}i !\`
+ ;;
+ *)
+ ;;
+ esac
+ done
+
+ # Kill result in case of failure as there is just to many stupid make/nmake
+ # things out there which doesn't do this.
+ if @<:@ ${D}# -eq 0 @:>@; then
+ rm -f ${D}arcFile ${D}arcFile2 ${D}defFile ${D}dllFile
+ fi
+}
+
+# Print usage and exit script with rc=1.
+PrintHelp() {
+ echo 'Usage: dllar.sh @<:@-o@<:@utput@:>@ output_file@:>@ @<:@-i@<:@mport@:>@ importlib_name@:>@'
+ echo ' @<:@-name-mangler-script script.sh@:>@'
+ echo ' @<:@-d@<:@escription@:>@ "dll descrption"@:>@ @<:@-cc "CC"@:>@ @<:@-f@<:@lags@:>@ "CFLAGS"@:>@'
+ echo ' @<:@-ord@<:@inals@:>@@:>@ -ex@<:@clude@:>@ "symbol(s)"'
+ echo ' @<:@-libf@<:@lags@:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"@:>@ @<:@-nocrt@<:@dll@:>@@:>@ @<:@-nolxl@<:@ite@:>@@:>@'
+ echo ' @<:@*.o@:>@ @<:@*.a@:>@'
+ echo '*> "output_file" should have no extension.'
+ echo ' If it has the .o, .a or .dll extension, it is automatically removed.'
+ echo ' The import library name is derived from this and is set to "name".a,'
+ echo ' unless overridden by -import'
+ echo '*> "importlib_name" should have no extension.'
+ echo ' If it has the .o, or .a extension, it is automatically removed.'
+ echo ' This name is used as the import library name and may be longer and'
+ echo ' more descriptive than the DLL name which has to follow the old '
+ echo ' 8.3 convention of FAT.'
+ echo '*> "script.sh may be given to override the output_file name by a'
+ echo ' different name. It is mainly useful if the regular make process'
+ echo ' of some package does not take into account OS/2 restriction of'
+ echo ' DLL name lengths. It takes the importlib name as input and is'
+ echo ' supposed to procude a shorter name as output. The script should'
+ echo ' expect to get importlib_name without extension and should produce'
+ echo ' a (max.) 8 letter name without extension.'
+ echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)'
+ echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)'
+ echo ' These flags will be put at the start of GCC command line.'
+ echo '*> -ord@<:@inals@:>@ tells dllar to export entries by ordinals. Be careful.'
+ echo '*> -ex@<:@clude@:>@ defines symbols which will not be exported. You can define'
+ echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".'
+ echo ' If the last character of a symbol is "*", all symbols beginning'
+ echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).'
+ echo '*> -libf@<:@lags@:>@ can be used to add INITGLOBAL/INITINSTANCE and/or'
+ echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.'
+ echo '*> -nocrt@<:@dll@:>@ switch will disable linking the library against emx''s'
+ echo ' C runtime DLLs.'
+ echo '*> -nolxl@<:@ite@:>@ switch will disable running lxlite on the resulting DLL.'
+ echo '*> All other switches (for example -L./ or -lmylib) will be passed'
+ echo ' unchanged to GCC at the end of command line.'
+ echo '*> If you create a DLL from a library and you do not specify -o,'
+ echo ' the basename for DLL and import library will be set to library name,'
+ echo ' the initial library will be renamed to 'name'_s.a (_s for static)'
+ echo ' i.e. "dllar gcc.a" will create gcc.dll and gcc.a, and the initial'
+ echo ' library will be renamed into gcc_s.a.'
+ echo '--------'
+ echo 'Example:'
+ echo ' dllar -o gcc290.dll libgcc.a -d "GNU C runtime library" -ord'
+ echo ' -ex "__main __ctordtor*" -libf "INITINSTANCE TERMINSTANCE"'
+ CleanUp
+ exit 1
+}
+
+# Execute a command.
+# If exit code of the commnad <> 0 CleanUp() is called and we'll exit the script.
+# @Uses Whatever CleanUp() uses.
+doCommand() {
+ echo "${D}*"
+ eval ${D}*
+ rcCmd=${D}?
+
+ if @<:@ ${D}rcCmd -ne 0 @:>@; then
+ echo "command failed, exit code="${D}rcCmd
+ CleanUp
+ exit ${D}rcCmd
+ fi
+}
+
+# main routine
+# setup globals
+cmdLine=${D}*
+outFile=""
+outimpFile=""
+inputFiles=""
+renameScript=""
+description=""
+CC=gcc.exe
+CFLAGS="-s -Zcrtdll"
+EXTRA_CFLAGS=""
+EXPORT_BY_ORDINALS=0
+exclude_symbols=""
+library_flags=""
+curDir=\`pwd\`
+curDirS=curDir
+case ${D}curDirS in
+*/)
+ ;;
+*)
+ curDirS=${D}{curDirS}"/"
+ ;;
+esac
+# Parse commandline
+libsToLink=0
+omfLinking=0
+while @<:@ ${D}1 @:>@; do
+ case ${D}1 in
+ -ord*)
+ EXPORT_BY_ORDINALS=1;
+ ;;
+ -o*)
+ shift
+ outFile=${D}1
+ ;;
+ -i*)
+ shift
+ outimpFile=${D}1
+ ;;
+ -name-mangler-script)
+ shift
+ renameScript=${D}1
+ ;;
+ -d*)
+ shift
+ description=${D}1
+ ;;
+ -f*)
+ shift
+ CFLAGS=${D}1
+ ;;
+ -c*)
+ shift
+ CC=${D}1
+ ;;
+ -h*)
+ PrintHelp
+ ;;
+ -ex*)
+ shift
+ exclude_symbols=${D}{exclude_symbols}${D}1" "
+ ;;
+ -libf*)
+ shift
+ library_flags=${D}{library_flags}${D}1" "
+ ;;
+ -nocrt*)
+ CFLAGS="-s"
+ ;;
+ -nolxl*)
+ flag_USE_LXLITE=0
+ ;;
+ -* | /*)
+ case ${D}1 in
+ -L* | -l*)
+ libsToLink=1
+ ;;
+ -Zomf)
+ omfLinking=1
+ ;;
+ *)
+ ;;
+ esac
+ EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
+ ;;
+ *.dll)
+ EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`"
+ if @<:@ ${D}omfLinking -eq 1 @:>@; then
+ EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib"
+ else
+ EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a"
+ fi
+ ;;
+ *)
+ found=0;
+ if @<:@ ${D}libsToLink -ne 0 @:>@; then
+ EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
+ else
+ for file in ${D}1 ; do
+ if @<:@ -f ${D}file @:>@; then
+ inputFiles="${D}{inputFiles} ${D}file"
+ found=1
+ fi
+ done
+ if @<:@ ${D}found -eq 0 @:>@; then
+ echo "ERROR: No file(s) found: "${D}1
+ exit 8
+ fi
+ fi
+ ;;
+ esac
+ shift
+done # iterate cmdline words
+
+#
+if @<:@ -z "${D}inputFiles" @:>@; then
+ echo "dllar: no input files"
+ PrintHelp
+fi
+
+# Now extract all .o files from .a files
+newInputFiles=""
+for file in ${D}inputFiles ; do
+ case ${D}file in
+ *.a | *.lib)
+ case ${D}file in
+ *.a)
+ suffix=".a"
+ AR="ar"
+ ;;
+ *.lib)
+ suffix=".lib"
+ AR="emxomfar"
+ EXTRA_CFLAGS="${D}EXTRA_CFLAGS -Zomf"
+ ;;
+ *)
+ ;;
+ esac
+ dirname=\`basnam ${D}file ${D}suffix\`"_%"
+ mkdir ${D}dirname
+ if @<:@ ${D}? -ne 0 @:>@; then
+ echo "Failed to create subdirectory ./${D}dirname"
+ CleanUp
+ exit 8;
+ fi
+ # Append '!' to indicate archive
+ newInputFiles="${D}newInputFiles ${D}{dirname}!"
+ doCommand "cd ${D}dirname; ${D}AR x ../${D}file"
+ cd ${D}curDir
+ found=0;
+ for subfile in ${D}dirname/*.o* ; do
+ if @<:@ -f ${D}subfile @:>@; then
+ found=1
+ if @<:@ -s ${D}subfile @:>@; then
+ # FIXME: This should be: is file size > 32 byte, _not_ > 0!
+ newInputFiles="${D}newInputFiles ${D}subfile"
+ fi
+ fi
+ done
+ if @<:@ ${D}found -eq 0 @:>@; then
+ echo "WARNING: there are no files in archive \\'${D}file\\'"
+ fi
+ ;;
+ *)
+ newInputFiles="${D}{newInputFiles} ${D}file"
+ ;;
+ esac
+done
+inputFiles="${D}newInputFiles"
+
+# Output filename(s).
+do_backup=0;
+if @<:@ -z ${D}outFile @:>@; then
+ do_backup=1;
+ set outFile ${D}inputFiles; outFile=${D}2
+fi
+
+# If it is an archive, remove the '!' and the '_%' suffixes
+case ${D}outFile in
+*_%!)
+ outFile=\`basnam ${D}outFile _%!\`
+ ;;
+*)
+ ;;
+esac
+case ${D}outFile in
+*.dll)
+ outFile=\`basnam ${D}outFile .dll\`
+ ;;
+*.DLL)
+ outFile=\`basnam ${D}outFile .DLL\`
+ ;;
+*.o)
+ outFile=\`basnam ${D}outFile .o\`
+ ;;
+*.obj)
+ outFile=\`basnam ${D}outFile .obj\`
+ ;;
+*.a)
+ outFile=\`basnam ${D}outFile .a\`
+ ;;
+*.lib)
+ outFile=\`basnam ${D}outFile .lib\`
+ ;;
+*)
+ ;;
+esac
+case ${D}outimpFile in
+*.a)
+ outimpFile=\`basnam ${D}outimpFile .a\`
+ ;;
+*.lib)
+ outimpFile=\`basnam ${D}outimpFile .lib\`
+ ;;
+*)
+ ;;
+esac
+if @<:@ -z ${D}outimpFile @:>@; then
+ outimpFile=${D}outFile
+fi
+defFile="${D}{outFile}.def"
+arcFile="${D}{outimpFile}.a"
+arcFile2="${D}{outimpFile}.lib"
+
+#create ${D}dllFile as something matching 8.3 restrictions,
+if @<:@ -z ${D}renameScript @:>@ ; then
+ dllFile="${D}outFile"
+else
+ dllFile=\`${D}renameScript ${D}outimpFile\`
+fi
+
+if @<:@ ${D}do_backup -ne 0 @:>@ ; then
+ if @<:@ -f ${D}arcFile @:>@ ; then
+ doCommand "mv ${D}arcFile ${D}{outFile}_s.a"
+ fi
+ if @<:@ -f ${D}arcFile2 @:>@ ; then
+ doCommand "mv ${D}arcFile2 ${D}{outFile}_s.lib"
+ fi
+fi
+
+# Extract public symbols from all the object files.
+tmpdefFile=${D}{defFile}_%
+rm -f ${D}tmpdefFile
+for file in ${D}inputFiles ; do
+ case ${D}file in
+ *!)
+ ;;
+ *)
+ doCommand "emxexp -u ${D}file >> ${D}tmpdefFile"
+ ;;
+ esac
+done
+
+# Create the def file.
+rm -f ${D}defFile
+echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile
+dllFile="${D}{dllFile}.dll"
+if @<:@ ! -z ${D}description @:>@; then
+ echo "DESCRIPTION \\"${D}{description}\\"" >> ${D}defFile
+fi
+echo "EXPORTS" >> ${D}defFile
+
+doCommand "cat ${D}tmpdefFile | sort.exe | uniq.exe > ${D}{tmpdefFile}%"
+grep -v "^ *;" < ${D}{tmpdefFile}% | grep -v "^ *${D}" >${D}tmpdefFile
+
+# Checks if the export is ok or not.
+for word in ${D}exclude_symbols; do
+ grep -v ${D}word < ${D}tmpdefFile >${D}{tmpdefFile}%
+ mv ${D}{tmpdefFile}% ${D}tmpdefFile
+done
+
+
+if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then
+ sed "=" < ${D}tmpdefFile | \\
+ sed '
+ N
+ : loop
+ s/^\\(@<:@0-9@:>@\\+\\)\\(@<:@^;@:>@*\\)\\(;.*\\)\\?/\\2 @\\1 NONAME/
+ t loop
+ ' > ${D}{tmpdefFile}%
+ grep -v "^ *${D}" < ${D}{tmpdefFile}% > ${D}tmpdefFile
+else
+ rm -f ${D}{tmpdefFile}%
+fi
+cat ${D}tmpdefFile >> ${D}defFile
+rm -f ${D}tmpdefFile
+
+# Do linking, create implib, and apply lxlite.
+gccCmdl="";
+for file in ${D}inputFiles ; do
+ case ${D}file in
+ *!)
+ ;;
+ *)
+ gccCmdl="${D}gccCmdl ${D}file"
+ ;;
+ esac
+done
+doCommand "${D}CC ${D}CFLAGS -Zdll -o ${D}dllFile ${D}defFile ${D}gccCmdl ${D}EXTRA_CFLAGS"
+touch "${D}{outFile}.dll"
+
+doCommand "emximp -o ${D}arcFile ${D}defFile"
+if @<:@ ${D}flag_USE_LXLITE -ne 0 @:>@; then
+ add_flags="";
+ if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then
+ add_flags="-ynd"
+ fi
+ doCommand "lxlite -cs -t: -mrn -mln ${D}add_flags ${D}dllFile"
+fi
+doCommand "emxomf -s -l ${D}arcFile"
+
+# Successful exit.
+CleanUp 1
+exit 0
+EOF
+dnl ===================== dllar.sh ends here =====================
+])
+
+dnl
+dnl This file is part of Bakefile (http://www.bakefile.org)
+dnl
+dnl Copyright (C) 2003-2007 Vaclav Slavik, David Elliott and others
+dnl
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the "Software"),
+dnl to deal in the Software without restriction, including without limitation
+dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
+dnl and/or sell copies of the Software, and to permit persons to whom the
+dnl Software is furnished to do so, subject to the following conditions:
+dnl
+dnl The above copyright notice and this permission notice shall be included in
+dnl all copies or substantial portions of the Software.
+dnl
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+dnl DEALINGS IN THE SOFTWARE.
+dnl
+dnl $Id: bakefile-lang.m4 1278 2008-11-17 22:26:10Z vadz $
+dnl
+dnl Compiler detection macros by David Elliott and Vadim Zeitlin
+dnl
+
+
+dnl ===========================================================================
+dnl Macros to detect different C/C++ compilers
+dnl ===========================================================================
+
+dnl Based on autoconf _AC_LANG_COMPILER_GNU
+dnl _AC_BAKEFILE_LANG_COMPILER(NAME, LANG, SYMBOL, IF-YES, IF-NO)
+AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER],
+[
+ AC_LANG_PUSH($2)
+ AC_CACHE_CHECK(
+ [whether we are using the $1 $2 compiler],
+ [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3],
+ [AC_TRY_COMPILE(
+ [],
+ [
+ #ifndef $3
+ choke me
+ #endif
+ ],
+ [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=yes],
+ [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=no]
+ )
+ ]
+ )
+ if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3" = "xyes"; then
+ :; $4
+ else
+ :; $5
+ fi
+ AC_LANG_POP($2)
+])
+
+dnl More specific version of the above macro checking whether the compiler
+dnl version is at least the given one (assumes that we do use this compiler)
+dnl
+dnl _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(NAME, LANG, SYMBOL, VER, VERMSG, IF-YES, IF-NO)
+AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER_LATER_THAN],
+[
+ AC_LANG_PUSH($2)
+ AC_CACHE_CHECK(
+ [whether we are using $1 $2 compiler v$5 or later],
+ [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4],
+ [AC_TRY_COMPILE(
+ [],
+ [
+ #ifndef $3 || $3 < $4
+ choke me
+ #endif
+ ],
+ [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=yes],
+ [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=no]
+ )
+ ]
+ )
+ if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4" = "xyes"; then
+ :; $6
+ else
+ :; $7
+ fi
+ AC_LANG_POP($2)
+])
+
+dnl CodeWarrior Metrowerks compiler defines __MWERKS__ for both C and C++
+AC_DEFUN([AC_BAKEFILE_PROG_MWCC],
+[
+ _AC_BAKEFILE_LANG_COMPILER(Metrowerks, C, __MWERKS__, MWCC=yes)
+])
+
+AC_DEFUN([AC_BAKEFILE_PROG_MWCXX],
+[
+ _AC_BAKEFILE_LANG_COMPILER(Metrowerks, C++, __MWERKS__, MWCXX=yes)
+])
+
+dnl IBM xlC compiler defines __xlC__ for both C and C++
+AC_DEFUN([AC_BAKEFILE_PROG_XLCC],
+[
+ _AC_BAKEFILE_LANG_COMPILER([IBM xlC], C, __xlC__, XLCC=yes)
+])
+
+AC_DEFUN([AC_BAKEFILE_PROG_XLCXX],
+[
+ _AC_BAKEFILE_LANG_COMPILER([IBM xlC], C++, __xlC__, XLCXX=yes)
+])
+
+dnl recent versions of SGI mipsPro compiler define _SGI_COMPILER_VERSION
+dnl
+dnl NB: old versions define _COMPILER_VERSION but this could probably be
+dnl defined by other compilers too so don't test for it to be safe
+AC_DEFUN([AC_BAKEFILE_PROG_SGICC],
+[
+ _AC_BAKEFILE_LANG_COMPILER(SGI, C, _SGI_COMPILER_VERSION, SGICC=yes)
+])
+
+AC_DEFUN([AC_BAKEFILE_PROG_SGICXX],
+[
+ _AC_BAKEFILE_LANG_COMPILER(SGI, C++, _SGI_COMPILER_VERSION, SGICXX=yes)
+])
+
+dnl Sun compiler defines __SUNPRO_C/__SUNPRO_CC
+AC_DEFUN([AC_BAKEFILE_PROG_SUNCC],
+[
+ _AC_BAKEFILE_LANG_COMPILER(Sun, C, __SUNPRO_C, SUNCC=yes)
+])
+
+AC_DEFUN([AC_BAKEFILE_PROG_SUNCXX],
+[
+ _AC_BAKEFILE_LANG_COMPILER(Sun, C++, __SUNPRO_CC, SUNCXX=yes)
+])
+
+dnl Intel icc compiler defines __INTEL_COMPILER for both C and C++
+AC_DEFUN([AC_BAKEFILE_PROG_INTELCC],
+[
+ _AC_BAKEFILE_LANG_COMPILER(Intel, C, __I...
[truncated message content] |
|
From: <sag...@us...> - 2010-05-29 12:29:50
|
Revision: 610
http://modplug.svn.sourceforge.net/modplug/?rev=610&view=rev
Author: saga-games
Date: 2010-05-29 12:29:26 +0000 (Sat, 29 May 2010)
Log Message:
-----------
[Mod] Updated installer script.
[Mod] Added example songs to package template.
Modified Paths:
--------------
trunk/OpenMPT/installer/install.iss
trunk/OpenMPT/installer/packageTemplate/readme.txt
trunk/OpenMPT/packageTemplate/readme.txt
Added Paths:
-----------
trunk/OpenMPT/packageTemplate/ExampleSongs/
trunk/OpenMPT/packageTemplate/ExampleSongs/coda - control.it
trunk/OpenMPT/packageTemplate/ExampleSongs/coda - doilies.it
trunk/OpenMPT/packageTemplate/ExampleSongs/coda - silver gardener.it
trunk/OpenMPT/packageTemplate/ExampleSongs/lsnk - meander.it
trunk/OpenMPT/packageTemplate/ExampleSongs/nobuyuki - enlilsong1.it
trunk/OpenMPT/packageTemplate/ExampleSongs/smh - on the moon.it
trunk/OpenMPT/packageTemplate/ExampleSongs/xaimus - digital sentience.it
trunk/OpenMPT/packageTemplate/ExampleSongs/xaimus - drunk in toronto.it
Modified: trunk/OpenMPT/installer/install.iss
===================================================================
--- trunk/OpenMPT/installer/install.iss 2010-05-24 17:07:27 UTC (rev 609)
+++ trunk/OpenMPT/installer/install.iss 2010-05-29 12:29:26 UTC (rev 610)
@@ -6,7 +6,7 @@
[Setup]
AppId={{67903736-E9BB-4664-B148-F62BCAB4FA42}
AppVerName=OpenMPT 1.18
-AppVersion=1.18.01.00
+AppVersion=1.18.02.00
AppName=OpenMPT
AppPublisher=OpenMPT Devs / Olivier Lapicque
AppPublisherURL=http://openmpt.com/
@@ -22,8 +22,9 @@
WizardImageFile=install-big.bmp
WizardSmallImageFile=install-small.bmp
CreateUninstallRegKey=not IsTaskSelected('portable')
+;LicenseFile=license.txt
+;The following setting is recommended by the Aero wizard guidelines.
DisableWelcomePage=yes
-;LicenseFile=license.txt
[Tasks]
; icons and install mode
@@ -38,8 +39,6 @@
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
-; you may want to change the base paths here
-
; note: packageTemplate\ contains files specific for the "install package".
; for files that are common with the "zip package", use ..\packageTemplate\
@@ -48,6 +47,9 @@
Source: "..\mptrack\bin\mptrack.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\mptrack\bin\OpenMPT_SoundTouch_i16.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\mptrack\bin\unmo3.dll"; DestDir: "{app}"; Flags: ignoreversion
+
+Source: "..\packageTemplate\ExampleSongs\*.*"; DestDir: "{app}\ExampleSongs\"; Flags: ignoreversion
+
Source: "packageTemplate\readme.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\packageTemplate\history.txt"; DestDir: "{app}"; Flags: ignoreversion
@@ -94,7 +96,7 @@
[Run]
; duh
-Filename: "{app}\mptrack.exe"; Description: "{cm:LaunchProgram,OpenMPT}"; Flags: nowait postinstall skipifsilent
+Filename: "{app}\mptrack.exe"; Parameters: """{app}\ExampleSongs\xaimus - digital sentience.it"""; Description: "{cm:LaunchProgram,OpenMPT}"; Flags: nowait postinstall skipifsilent
[UninstallDelete]
; internet shortcut has to be deleted manually
@@ -246,3 +248,7 @@
+
+
+
+
Modified: trunk/OpenMPT/installer/packageTemplate/readme.txt
===================================================================
--- trunk/OpenMPT/installer/packageTemplate/readme.txt 2010-05-24 17:07:27 UTC (rev 609)
+++ trunk/OpenMPT/installer/packageTemplate/readme.txt 2010-05-29 12:29:26 UTC (rev 610)
@@ -37,6 +37,8 @@
Impulse Tracker) and country-specific layouts.
soundtouch(folder): SoundTouch readme and copying.txt
ReleaseNotesImages(folder): Images using in the release notes document.
+ExampleSongs(folder): A set of module files which should give an impression of
+ what can be done in OpenMPT with only a few kilobytes.
history.txt: Version history.
mptrack.exe: Main executable.
OpenMPT_SoundTouch_i16.dll: Slightly customized SoundTouch library used in time
Property changes on: trunk/OpenMPT/packageTemplate/ExampleSongs
___________________________________________________________________
Added: tsvn:logminsize
+ 10
Added: trunk/OpenMPT/packageTemplate/ExampleSongs/coda - control.it
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/ExampleSongs/coda - control.it
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/OpenMPT/packageTemplate/ExampleSongs/coda - doilies.it
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/ExampleSongs/coda - doilies.it
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/OpenMPT/packageTemplate/ExampleSongs/coda - silver gardener.it
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/ExampleSongs/coda - silver gardener.it
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/OpenMPT/packageTemplate/ExampleSongs/lsnk - meander.it
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/ExampleSongs/lsnk - meander.it
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/OpenMPT/packageTemplate/ExampleSongs/nobuyuki - enlilsong1.it
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/ExampleSongs/nobuyuki - enlilsong1.it
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/OpenMPT/packageTemplate/ExampleSongs/smh - on the moon.it
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/ExampleSongs/smh - on the moon.it
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/OpenMPT/packageTemplate/ExampleSongs/xaimus - digital sentience.it
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/ExampleSongs/xaimus - digital sentience.it
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/OpenMPT/packageTemplate/ExampleSongs/xaimus - drunk in toronto.it
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/ExampleSongs/xaimus - drunk in toronto.it
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/OpenMPT/packageTemplate/readme.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/readme.txt 2010-05-24 17:07:27 UTC (rev 609)
+++ trunk/OpenMPT/packageTemplate/readme.txt 2010-05-29 12:29:26 UTC (rev 610)
@@ -46,6 +46,8 @@
extraKeymaps(folder):
soundtouch(folder): SoundTouch readme and copying.txt
ReleaseNotesImages(folder): Images using in the release notes document.
+ExampleSongs(folder): A set of module files which should give an impression of
+ what can be done in OpenMPT with only a few kilobytes.
history.txt: Version history.
mptrack.exe: Main executable.
open_settings_folder.bat: Opens settings folder.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-24 17:07:34
|
Revision: 609
http://modplug.svn.sourceforge.net/modplug/?rev=609&view=rev
Author: saga-games
Date: 2010-05-24 17:07:27 +0000 (Mon, 24 May 2010)
Log Message:
-----------
[Fix] IsEmpty() did not always work as expected since it also compared the effect values, chaning the behaviour of some tracker functions (quick fix before making a release...).
Modified Paths:
--------------
trunk/OpenMPT/soundlib/modcommand.h
Modified: trunk/OpenMPT/soundlib/modcommand.h
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.h 2010-05-23 23:58:24 UTC (rev 608)
+++ trunk/OpenMPT/soundlib/modcommand.h 2010-05-24 17:07:27 UTC (rev 609)
@@ -52,7 +52,8 @@
void Clear() {memset(this, 0, sizeof(MODCOMMAND));}
// Returns true if modcommand is empty, false otherwise.
- bool IsEmpty() const {return (*this == Empty());}
+ bool IsEmpty() const {return (this->note == 0 && this->instr == 0 && this->volcmd == 0 && this->command == 0);}
+ //bool IsEmpty() const {return (*this == Empty());}
// Returns true if instrument column represents plugin index.
bool IsInstrPlug() const {return IsPcNote();}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-23 23:58:30
|
Revision: 608
http://modplug.svn.sourceforge.net/modplug/?rev=608&view=rev
Author: saga-games
Date: 2010-05-23 23:58:24 +0000 (Sun, 23 May 2010)
Log Message:
-----------
[Mod] Updated installer script. Hint: Needs the latest version of InnoSetup to compile.
[Mod] The old mpt classic keymap by diamond is now maintained by nobuyuki. Some keys have been updated or moved.
Modified Paths:
--------------
trunk/OpenMPT/installer/install.iss
Added Paths:
-----------
trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(nobuyuki).mkb
Removed Paths:
-------------
trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb
Modified: trunk/OpenMPT/installer/install.iss
===================================================================
--- trunk/OpenMPT/installer/install.iss 2010-05-23 21:49:03 UTC (rev 607)
+++ trunk/OpenMPT/installer/install.iss 2010-05-23 23:58:24 UTC (rev 608)
@@ -17,11 +17,12 @@
AllowNoIcons=yes
OutputDir=.\
OutputBaseFilename=OpenMPT Setup
-Compression=lzma
+Compression=lzma2
SolidCompression=yes
WizardImageFile=install-big.bmp
WizardSmallImageFile=install-small.bmp
CreateUninstallRegKey=not IsTaskSelected('portable')
+DisableWelcomePage=yes
;LicenseFile=license.txt
[Tasks]
@@ -39,6 +40,9 @@
[Files]
; you may want to change the base paths here
+; note: packageTemplate\ contains files specific for the "install package".
+; for files that are common with the "zip package", use ..\packageTemplate\
+
; preserve file type order for best solid compression results (first binary, then text)
; home folder
Source: "..\mptrack\bin\mptrack.exe"; DestDir: "{app}"; Flags: ignoreversion
@@ -86,7 +90,7 @@
; enable portable mode
Filename: "{app}\mptrack.ini"; Section: "Paths"; Key: "UseAppDataDirectory"; String: "0"; Flags: createkeyifdoesntexist; Tasks: portable
; internet shortcut
-Filename: "{app}\ModPlug Central.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.lpchip.com/modplug/"; Flags: createkeyifdoesntexist;
+Filename: "{app}\ModPlug Central.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://openmpt.com/forum/"; Flags: createkeyifdoesntexist;
[Run]
; duh
@@ -240,3 +244,5 @@
end;
end;
+
+
Deleted: trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb
===================================================================
--- trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb 2010-05-23 21:49:03 UTC (rev 607)
+++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(diamond).mkb 2010-05-23 23:58:24 UTC (rev 608)
@@ -1,307 +0,0 @@
-//-------- Modplug Tracker key binding definition file -------
-//-Format is: -
-//- Context:Command ID:Modifiers:Key:KeypressEventType //Comments -
-//----------------------------------------------------------------------
-version:1
-
-//----( 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+Ins (KeyDown)
-0:1362:2:86:1 //Paste: Ctrl+V (KeyDown)
-0:1362:1:45:1 //Paste: Shift+Ins (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+ (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)
-
-//----( 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: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:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown)
-2:1062:0:93:1 //Show note properties: Application (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:1058:0:46:1 //Clear field: Del (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)
-
-//----( 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:89:1 //Base octave F: Y (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:219:1 //Base octave +1 A#: [ (KeyDown)
-3:1075:0:221: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:186: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)
-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: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:1213:0:49:1 //Set octave 1: 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:1215:0:51:1 //Set octave 3: 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:1217:0:53:1 //Set octave 5: 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:1219:0:55:1 //Set octave 7: 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: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: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:48:1 //Set instrument digit 0: 0 (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:50:1 //Set instrument digit 2: 2 (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:52:1 //Set instrument digit 4: 4 (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:54:1 //Set instrument digit 6: 6 (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: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:1223:0:49:1 //Set volume digit 1: 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:1225:0:51:1 //Set volume digit 3: 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:1227:0:53:1 //Set volume digit 5: 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:1229:0:55:1 //Set volume digit 7: 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: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+; (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: \ (KeyDown)
-6:1295:1:186:1 //FX pseudo-velocity (experimental): Shift+; (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:1248:0:49:1 //FX Param digit 1: 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:1250:0:51:1 //FX Param digit 3: 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:1252:0:53:1 //FX Param digit 5: 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:1254:0:55:1 //FX Param digit 7: 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:1256:0:57:1 //FX Param digit 9: 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)
-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: 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)
-
-//----( 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) )------------
-
-//----( Orderlist (19) )------------
-19:1802:0:46:5 //Delete Order: DELETE (KeyDown|KeyHold)
-19:1803:0:45:5 //Insert Order: INSERT (KeyDown|KeyHold)
-19:1804:0:13:5 //Edit Pattern: ENTER (KeyDown|KeyHold)
-19:1805:0:9:5 //Switch to pattern editor: TAB (KeyDown|KeyHold)
-19:1794:0:37:5 //Previous Order: LEFT (KeyDown|KeyHold)
-19:1794:0:38:5 //Previous Order: UP (KeyDown|KeyHold)
-19:1795:0:39:5 //Next Order: RIGHT (KeyDown|KeyHold)
-19:1795:0:40:5 //Next Order: DOWN (KeyDown|KeyHold)
-19:1796:0:36:5 //First Order: HOME (KeyDown|KeyHold)
-19:1797:0:35:5 //Last Order: END (KeyDown|KeyHold)
-19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold)
-19:1807:0:96:5 //Pattern index digit 0: NUM 0 (KeyDown|KeyHold)
-19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold)
-19:1808:0:97:5 //Pattern index digit 1: NUM 1 (KeyDown|KeyHold)
-19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold)
-19:1809:0:98:5 //Pattern index digit 2: NUM 2 (KeyDown|KeyHold)
-19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold)
-19:1810:0:99:5 //Pattern index digit 3: NUM 3 (KeyDown|KeyHold)
-19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold)
-19:1811:0:100:5 //Pattern index digit 4: NUM 4 (KeyDown|KeyHold)
-19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold)
-19:1812:0:101:5 //Pattern index digit 5: NUM 5 (KeyDown|KeyHold)
-19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold)
-19:1813:0:102:5 //Pattern index digit 6: NUM 6 (KeyDown|KeyHold)
-19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold)
-19:1814:0:103:5 //Pattern index digit 7: NUM 7 (KeyDown|KeyHold)
-19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold)
-19:1815:0:104:5 //Pattern index digit 8: NUM 8 (KeyDown|KeyHold)
-19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold)
-19:1816:0:105:5 //Pattern index digit 9: NUM 9 (KeyDown|KeyHold)
-19:1817:0:107:5 //Increase pattern index : NUM PLUS (KeyDown|KeyHold)
-19:1817:0:187:5 //Increase pattern index : + (KeyDown|KeyHold)
-19:1818:0:109:1 //Decrease pattern index: NUM SUB (KeyDown)
-19:1818:0:189:1 //Decrease pattern index: - (KeyDown)
Added: trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(nobuyuki).mkb
===================================================================
--- trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(nobuyuki).mkb (rev 0)
+++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(nobuyuki).mkb 2010-05-23 23:58:24 UTC (rev 608)
@@ -0,0 +1,305 @@
+//-------- OpenMPT key binding definition file -------
+//-Format is: -
+//- Context:Command ID:Modifiers:Key:KeypressEventType //Comments -
+//----------------------------------------------------------------------
+version:1
+
+//----( 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+Insert (KeyDown)
+0:1362:2:86:1 //Paste: Ctrl+V (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)
+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+Num / (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: Num / (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)
+
+//----( General Context [bottom] (1) )------------
+
+//----( Pattern Context [bottom] (2) )------------
+2:1017:4:34:1 //Jump down by measure: Alt+Page Down (KeyDown)
+2:1018:4:33:1 //Jump up by measure: Alt+Page Up (KeyDown)
+2:1338:0:34:5 //Jump down by beat: Page Down (KeyDown|KeyHold)
+2:1339:0:33:5 //Jump up by beat: 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: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:1050:1:16:1 //Selection key: Shift+Shift (KeyDown)
+2:1011:2:76:1 //Select channel / Select all: Ctrl+L (KeyDown)
+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:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown)
+2:1062:0:93:1 //Show note properties: Application (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:1058:1:190:1 //Clear field: Shift+. (KeyDown)
+2:1664:0:46:1 //Clear field (IT Style): Delete (KeyDown)
+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:220:1 //Insert All Rows: Ctrl+\ (KeyDown)
+2:1055:0:109:5 //Previous pattern: Num - (KeyDown|KeyHold)
+2:1054:0:107:5 //Next pattern: Num + (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:89:1 //Base octave F: Y (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 A: P (KeyDown)
+3:1074:0:219:1 //Base octave A#: [ (KeyDown)
+3:1075:0:221:1 //Base octave 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:186:1 //Base octave +1 A: ; (KeyDown)
+3:1086:0:222:1 //Base octave +1 A#: ' (KeyDown)
+3:1087:0:220:1 //Base octave +1 B: \ (KeyDown)
+3:1088:0:90:1 //Base octave +2 C: Z (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:191:1 //Base octave +2 A: / (KeyDown)
+3:1212:0:48:1 //Set octave 0: 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:1214:0:50:1 //Set octave 2: 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:1216:0:52:1 //Set octave 4: 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:1218:0:54:1 //Set octave 6: 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:1220:0:56:1 //Set octave 8: 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:1667:0:192:1 //Note Cut (don't remember instrument): ` (KeyDown)
+3:1668:0:187:1 //Note Off (don't remember instrument): = (KeyDown)
+
+//----( Pattern Context [bottom] - Ins Col (4) )------------
+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:49:1 //Set instrument digit 1: 1 (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:51:1 //Set instrument digit 3: 3 (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:53:1 //Set instrument digit 5: 5 (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: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: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:1223:0:49:1 //Set volume digit 1: 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:1225:0:51:1 //Set volume digit 3: 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:1227:0:53:1 //Set volume digit 5: 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:1229:0:55:1 //Set volume digit 7: 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: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:1246:0:79:1 //Vol command - Offset: O (KeyDown)
+
+//----( Pattern Context [bottom] - FX Col (6) )------------
+6:1294:0:220:1 //FX midi macro slide: \ (KeyDown)
+6:1295:1:186:1 //FX combined note delay and note cut: Shift+; (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:1248:0:49:1 //FX Param digit 1: 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:1250:0:51:1 //FX Param digit 3: 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:1252:0:53:1 //FX Param digit 5: 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:1254:0:55:1 //FX Param digit 7: 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:1256:0:57:1 //FX Param digit 9: 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)
+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: 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: Delete (KeyDown)
+8:1386:0:107:1 //Zoom Out: Num + (KeyDown)
+8:1387:0:109:1 //Zoom In: Num - (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) )------------
+
+//----( Orderlist (19) )------------
+19:1802:0:46:5 //Delete Order: Delete (KeyDown|KeyHold)
+19:1803:0:45:5 //Insert Order: Insert (KeyDown|KeyHold)
+19:1804:0:13:5 //Edit Pattern: Enter (KeyDown|KeyHold)
+19:1805:0:9:5 //Switch to pattern editor: Tab (KeyDown|KeyHold)
+19:1794:0:37:5 //Previous Order: Left (KeyDown|KeyHold)
+19:1794:0:38:5 //Previous Order: Up (KeyDown|KeyHold)
+19:1795:0:39:5 //Next Order: Right (KeyDown|KeyHold)
+19:1795:0:40:5 //Next Order: Down (KeyDown|KeyHold)
+19:1796:0:36:5 //First Order: Home (KeyDown|KeyHold)
+19:1797:0:35:5 //Last Order: End (KeyDown|KeyHold)
+19:1807:0:48:5 //Pattern index digit 0: 0 (KeyDown|KeyHold)
+19:1807:0:96:5 //Pattern index digit 0: Num 0 (KeyDown|KeyHold)
+19:1808:0:49:5 //Pattern index digit 1: 1 (KeyDown|KeyHold)
+19:1808:0:97:5 //Pattern index digit 1: Num 1 (KeyDown|KeyHold)
+19:1809:0:50:5 //Pattern index digit 2: 2 (KeyDown|KeyHold)
+19:1809:0:98:5 //Pattern index digit 2: Num 2 (KeyDown|KeyHold)
+19:1810:0:51:5 //Pattern index digit 3: 3 (KeyDown|KeyHold)
+19:1810:0:99:5 //Pattern index digit 3: Num 3 (KeyDown|KeyHold)
+19:1811:0:52:5 //Pattern index digit 4: 4 (KeyDown|KeyHold)
+19:1811:0:100:5 //Pattern index digit 4: Num 4 (KeyDown|KeyHold)
+19:1812:0:53:5 //Pattern index digit 5: 5 (KeyDown|KeyHold)
+19:1812:0:101:5 //Pattern index digit 5: Num 5 (KeyDown|KeyHold)
+19:1813:0:54:5 //Pattern index digit 6: 6 (KeyDown|KeyHold)
+19:1813:0:102:5 //Pattern index digit 6: Num 6 (KeyDown|KeyHold)
+19:1814:0:55:5 //Pattern index digit 7: 7 (KeyDown|KeyHold)
+19:1814:0:103:5 //Pattern index digit 7: Num 7 (KeyDown|KeyHold)
+19:1815:0:56:5 //Pattern index digit 8: 8 (KeyDown|KeyHold)
+19:1815:0:104:5 //Pattern index digit 8: Num 8 (KeyDown|KeyHold)
+19:1816:0:57:5 //Pattern index digit 9: 9 (KeyDown|KeyHold)
+19:1816:0:105:5 //Pattern index digit 9: Num 9 (KeyDown|KeyHold)
+19:1817:0:107:5 //Increase pattern index : Num + (KeyDown|KeyHold)
+19:1817:0:187:5 //Increase pattern index : = (KeyDown|KeyHold)
+19:1818:0:109:5 //Decrease pattern index: Num - (KeyDown|KeyHold)
+19:1818:0:189:5 //Decrease pattern index: - (KeyDown|KeyHold)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2010-05-23 21:49:10
|
Revision: 607
http://modplug.svn.sourceforge.net/modplug/?rev=607&view=rev
Author: relabsoluness
Date: 2010-05-23 21:49:03 +0000 (Sun, 23 May 2010)
Log Message:
-----------
[Mod] Version: Changed to 1.18.02.00, increased mptm file version.
[Mod] General: Removed changes-dialog since there are separate release notes.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/version.h
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/soundlib/Load_it.cpp
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-05-23 15:32:59 UTC (rev 606)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-05-23 21:49:03 UTC (rev 607)
@@ -236,28 +236,6 @@
static void ShowChangesDialog()
//-----------------------------
{
- const char* const firstOpenMessage = "OpenMPT build " MPT_VERSION_STR ".\n\n"
- "Some changes since version 1.17.02.54:\n\n"
- "[New] Pattern tab: New paste modes: overflow, push forward and flood.\n"
- "[Mod] Pattern tab: Keyboard split is now accessible from key shortcut or menu.\n"
- "[Imp] Pattern tab: Numerous improvements including better effect descriptions in note properties.\n"
- "[New] Sequence editor: Can now handle order selections including delete/copy/cut/paste functionality.\n"
- "[New] Sequence editor: Can render selected patterns to wave directly from orderlist.\n"
- "[New] Envelope editor: Numerous improvements including ability to insert and remove points easily and editing envelopes with the keyboard.\n"
- "[New] Sample tab: sample undo, sample draw, resize sample, DC offset removal, batch export, better loop point handling when deleting selections. Play sample from given position with Ctrl + left mouse button.\n"
- "[New] MPTM: New parameter controls for controlling plug params from pattern.\n"
- "[New] MPTM: Can have envelope points up to 240 and multiple sequences.\n"
- "[New] MIDI mapping: Editing a plug param in its editor while holding shift key will now open MIDI mapping dialog.\n"
- "[New] MIDI mapping: Can now record MIDI mapping changes to pattern.\n"
- "[Imp] MOD/S3M/XM/IT: Numerous improvements to load, save and playback compatibility.\n"
- "[New] Input: Can import J2B (RIFF AM / RIFF AMFF), PSM16, IMF, GDM and SCL files. Improved PSM and ULT import.\n"
- "[New] Setup: New default directories: plugins and plugin presets, sharable colour schemes\n"
- "[New] Cleanup: New option compo cleanup, rearrange samples is back, can merge sequences.\n"
- "[Mod] Misc: Program settings are now by default stored in %APPDATA%\\OpenMPT\n"
- "\n"
- "and many more. See history.txt for more details.";
-
- CMainFrame::GetMainFrame()->MessageBox(firstOpenMessage, "OpenMPT " MPT_VERSION_STR, MB_ICONINFORMATION);
}
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-05-23 15:32:59 UTC (rev 606)
+++ trunk/OpenMPT/mptrack/version.h 2010-05-23 21:49:03 UTC (rev 607)
@@ -14,7 +14,7 @@
//Version definitions. The only thing that needs to be changed when changing version number.
#define VER_MAJORMAJOR 1
#define VER_MAJOR 18
-#define VER_MINOR 01
+#define VER_MINOR 02
#define VER_MINORMINOR 00
//Creates version number from version parts that appears in version string.
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-05-23 15:32:59 UTC (rev 606)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-05-23 21:49:03 UTC (rev 607)
@@ -9,9 +9,10 @@
[Var]: other
(tx XYZ): thanks to XYZ for telling us about the bug
-Changes from revisions [476, 606]
----------------------------------
+v1.18.02.00 (May 2010)
+----------------------
+
General tab
[Imp] <Jojo> Disabled tempo slider for MOD files (it was just confusing)
[Imp] <Jojo> Disabled global volume slider for MOD files, instead enabled the sample pre-amp slider (so it is also possible to make output louder)
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-05-23 15:32:59 UTC (rev 606)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-05-23 21:49:03 UTC (rev 607)
@@ -31,13 +31,14 @@
#define str_LoadingIncompatibleVersion TEXT("The file informed that it is incompatible with this version of OpenMPT. Loading was terminated.")
#define str_LoadingMoreRecentVersion TEXT("The loaded file was made with a more recent OpenMPT version and this version may not be able to load all the features or play the file correctly.")
-const uint16 verMptFileVer = 0x88F;
+const uint16 verMptFileVer = 0x890;
const uint16 verMptFileVerLoadLimit = 0x1000; // If cwtv-field is greater or equal to this value,
// the MPTM file will not be loaded.
/*
MPTM version history for cwtv-field in IT header:
-0x88E(1.17.02.50) -> 0x88F(1.18.01.00):
+0x88F(1.18.01.00) -> 0x890(1.18.02.00): Removed volume command velocity :xy, added delay-cut command :xy.
+0x88E(1.17.02.50) -> 0x88F(1.18.01.00): Numerous changes
0x88D(1.17.02.49) -> 0x88E(1.17.02.50): Changed ID to that of IT and undone the orderlist change done in
0x88A->0x88B. Now extended orderlist is saved as extension.
0x88C(1.17.02.48) -> 0x88D(1.17.02.49): Some tuning related changes - that part fails to read on older versions.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-23 15:33:05
|
Revision: 606
http://modplug.svn.sourceforge.net/modplug/?rev=606&view=rev
Author: saga-games
Date: 2010-05-23 15:32:59 +0000 (Sun, 23 May 2010)
Log Message:
-----------
[Fix] Pattern editor: Jumping between patterns also stops VSTi notes now.
[Fix] Pattern editor: When deleting all patterns via the treeview and then switching to the pattern editor, pattern 0 is not created automatically anymore, to avoid confusion.
[Imp] Wave Convert: When switching to another task and switching back to OpenMPT, it is now less likely that the infamous "OpenMPT does not respond" dialog from Windows occours.
[Mod] Added some unfinished code for the VST file selection command. As it's unfinished, it's commented out of course.
[Ref] A bit more refactoring
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mod2wave.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/View_pat.h
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/soundlib/Fastmix.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mod2wave.cpp 2010-05-22 15:56:50 UTC (rev 605)
+++ trunk/OpenMPT/mptrack/Mod2wave.cpp 2010-05-23 15:32:59 UTC (rev 606)
@@ -700,6 +700,8 @@
UINT nBytesPerSample = (CSoundFile::gnBitsPerSample * CSoundFile::gnChannels) / 8;
// For calculating the remaining time
DWORD dwStartTime = timeGetTime();
+ // For giving away some processing time every now and then
+ DWORD dwSleepTime = dwStartTime;
CMainFrame::GetMainFrame()->InitRenderer(m_pSndFile); //rewbs.VSTTimeInfo
for (UINT n=0; ; n++)
@@ -763,14 +765,22 @@
{
DWORD l = (DWORD)(ullSamples / CSoundFile::gdwMixingFreq);
+ const DWORD dwCurrentTime = timeGetTime();
DWORD timeRemaining = 0; // estimated remainig time
if((ullSamples > 0) && (ullSamples < max))
{
- timeRemaining = static_cast<DWORD>(((timeGetTime() - dwStartTime) * (max - ullSamples) / ullSamples) / 1000);
+ timeRemaining = static_cast<DWORD>(((dwCurrentTime - dwStartTime) * (max - ullSamples) / ullSamples) / 1000);
}
wsprintf(s, "Writing file... (%uKB, %umn%02us, %umn%02us remaining)", datahdr.length >> 10, l / 60, l % 60, timeRemaining / 60, timeRemaining % 60);
SetDlgItemText(IDC_TEXT1, s);
+
+ // Give windows some time to redraw the window, if necessary (else, the infamous "OpenMPT does not respond" will pop up)
+ if ((!m_bGivePlugsIdleTime) && (dwCurrentTime > dwSleepTime + 1000))
+ {
+ Sleep(1);
+ dwSleepTime = dwCurrentTime;
+ }
}
if ((progress != NULL) && ((DWORD)(ullSamples >> 14) != pos))
{
@@ -782,6 +792,7 @@
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
+
if (m_bAbort)
{
ok = IDCANCEL;
@@ -977,6 +988,7 @@
}
static DWORD oldsndcfg = CSoundFile::gdwSoundSetup;
oldrepeat = m_pSndFile->GetRepeatCount();
+ const DWORD dwSongTime = m_pSndFile->GetSongTime();
CSoundFile::gdwMixingFreq = wfxSrc.nSamplesPerSec;
CSoundFile::gnBitsPerSample = 16;
// CSoundFile::SetResamplingMode(SRCMODE_POLYPHASE); //rewbs.resamplerConf - we don't want this anymore.
@@ -998,7 +1010,7 @@
// calculate maximum samples
uint64 max = ullMaxSamples;
- uint64 l = m_pSndFile->GetSongTime() * wfxSrc.nSamplesPerSec;
+ uint64 l = dwSongTime * wfxSrc.nSamplesPerSec;
if (l < max) max = l;
if (progress != NULL)
{
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-05-22 15:56:50 UTC (rev 605)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-05-23 15:32:59 UTC (rev 606)
@@ -163,10 +163,9 @@
m_nPlayRow = 0;
m_nMidRow = 0;
m_nDragItem = 0;
- m_bDragging = FALSE;
- m_bInItemRect = FALSE;
- m_bRecord = TRUE;
- m_bContinueSearch = FALSE;
+ m_bDragging = false;
+ m_bInItemRect = false;
+ m_bContinueSearch = false;
m_dwBeginSel = m_dwEndSel = m_dwCursor = m_dwStartSel = m_dwDragPos = 0;
//m_dwStatus = 0;
m_dwStatus = PATSTATUS_PLUGNAMESINHEADERS;
@@ -193,7 +192,7 @@
{
CSoundFile *pSndFile;
CModDoc *pModDoc = GetDocument();
- BOOL bUpdateScroll;
+ bool bUpdateScroll = false;
pSndFile = pModDoc ? pModDoc->GetSoundFile() : NULL;
if ( (!pModDoc) || (!pSndFile) || (npat >= pSndFile->Patterns.Size()) ) return FALSE;
@@ -203,18 +202,18 @@
while ((npat > 0) && (!pSndFile->Patterns[npat])) npat--;
if (!pSndFile->Patterns[npat])
{
- pSndFile->Patterns.Insert(npat, 64);
+ // Changed behaviour here. Previously, an empty pattern was inserted and the user most likely didn't notice that. Now, we just return an error.
+ //pSndFile->Patterns.Insert(npat, 64);
+ return FALSE;
}
-
- bUpdateScroll = FALSE;
m_nPattern = npat;
- if ((nrow >= 0) && (nrow != (int)m_nRow) && (nrow < (int)pSndFile->PatternSize[m_nPattern]))
+ if ((nrow >= 0) && (nrow != (int)m_nRow) && (nrow < (int)pSndFile->Patterns[m_nPattern].GetNumRows()))
{
m_nRow = nrow;
- bUpdateScroll = TRUE;
+ bUpdateScroll = true;
}
- if (m_nRow >= pSndFile->PatternSize[m_nPattern]) m_nRow = 0;
+ if (m_nRow >= pSndFile->Patterns[m_nPattern].GetNumRows()) m_nRow = 0;
int sel = m_dwCursor | (m_nRow << 16);
SetCurSel(sel, sel);
UpdateSizes();
@@ -363,7 +362,7 @@
{
ncol += (((ncol & 0x07) - m_nDetailLevel) << 3) - (m_nDetailLevel+1);
}
- if ((ncol >> 3) >= pSndFile->m_nChannels) return FALSE;
+ if ((ncol >> 3) >= pSndFile->GetNumChannels()) return FALSE;
m_dwCursor = ncol;
int sel = m_dwCursor | (m_nRow << 16);
int sel0 = sel;
@@ -461,7 +460,7 @@
CModDoc *pModDoc = GetDocument();
CSoundFile *pSndFile;
CRect rcClient, rect, plugRect; //rewbs.patPlugNames
- UINT n, nmax;
+ UINT n;
int xofs, yofs;
if (!pModDoc) return 0;
@@ -471,7 +470,7 @@
rect.SetRect(m_szHeader.cx, 0, m_szHeader.cx + GetColumnWidth() - 2, m_szHeader.cy);
plugRect.SetRect(m_szHeader.cx, m_szHeader.cy-PLUGNAME_HEIGHT, m_szHeader.cx + GetColumnWidth() - 2, m_szHeader.cy); //rewbs.patPlugNames
pSndFile = pModDoc->GetSoundFile();
- nmax = pSndFile->m_nChannels;
+ const UINT nmax = pSndFile->GetNumChannels();
// Checking channel headers
//rewbs.patPlugNames
if (m_dwStatus & PATSTATUS_PLUGNAMESINHEADERS)
@@ -980,11 +979,13 @@
if (/*(m_bDragging) ||*/ (!pModDoc)) return;
SetFocus();
m_nDragItem = GetDragItem(point, &m_rcDragItem);
- m_bDragging = TRUE;
- m_bInItemRect = TRUE;
+ m_bDragging = true;
+ m_bInItemRect = true;
SetCapture();
- if ((point.x >= m_szHeader.cx) && (point.y <= m_szHeader.cy)) {
- if (nFlags & MK_CONTROL) {
+ if ((point.x >= m_szHeader.cx) && (point.y <= m_szHeader.cy))
+ {
+ if (nFlags & MK_CONTROL)
+ {
TogglePendingMute((GetPositionFromPoint(point)&0xFFFF)>>3);
}
}
@@ -1059,10 +1060,10 @@
//-------------------------------------------------------
{
CModDoc *pModDoc = GetDocument();
- BOOL bItemSelected = m_bInItemRect;
+ const bool bItemSelected = m_bInItemRect;
if (/*(!m_bDragging) ||*/ (!pModDoc)) return;
- m_bDragging = FALSE;
- m_bInItemRect = FALSE;
+ m_bDragging = false;
+ m_bInItemRect = false;
ReleaseCapture();
m_dwStatus &= ~PATSTATUS_MOUSEDRAGSEL;
// Drag & Drop Editing
@@ -1109,7 +1110,7 @@
}
else if (!(nFlags&MK_CONTROL))
{
- pModDoc->MuteChannel(nItemNo, (pSndFile->ChnSettings[nItemNo].dwFlags & CHN_MUTE) ? false : true);
+ pModDoc->MuteChannel(nItemNo, !pModDoc->IsChannelMuted(nItemNo));
pModDoc->UpdateAllViews(this, HINT_MODCHANNELS | ((nItemNo / CHANNELS_IN_TAB) << HINT_SHIFT_CHNTAB));
}
break;
@@ -1163,15 +1164,16 @@
m_dwStatus &= ~(PATSTATUS_DRAGNDROPEDIT|PATSTATUS_MOUSEDRAGSEL);
if (m_bDragging)
{
- m_bDragging = FALSE;
- m_bInItemRect = FALSE;
+ m_bDragging = false;
+ m_bInItemRect = false;
ReleaseCapture();
}
SetCursor(CMainFrame::curArrow);
return;
}
- if ((hMenu = ::CreatePopupMenu()) == NULL) {
+ if ((hMenu = ::CreatePopupMenu()) == NULL)
+ {
return;
}
@@ -1398,7 +1400,7 @@
}
void CViewPattern::OnMuteChannel(BOOL current)
-//--------------------------------
+//--------------------------------------------
{
CModDoc *pModDoc = GetDocument();
if (pModDoc)
@@ -1693,7 +1695,7 @@
m_cmdReplace.param = pageReplace.m_nParam;
m_dwReplaceFlags = pageReplace.m_dwFlags;
m_cInstrRelChange = pageReplace.cInstrRelChange;
- m_bContinueSearch = FALSE;
+ m_bContinueSearch = false;
OnEditFindNext();
}
}
@@ -1932,7 +1934,7 @@
}
EndSearch:
if (m_dwReplaceFlags & PATSEARCH_REPLACEALL) InvalidatePattern();
- m_bContinueSearch = TRUE;
+ m_bContinueSearch = true;
EndWaitCursor();
// Display search results
//m_dwReplaceFlags &= ~PATSEARCH_REPLACEALL;
Modified: trunk/OpenMPT/mptrack/View_pat.h
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.h 2010-05-22 15:56:50 UTC (rev 605)
+++ trunk/OpenMPT/mptrack/View_pat.h 2010-05-23 15:32:59 UTC (rev 606)
@@ -88,7 +88,7 @@
int m_nXScroll, m_nYScroll;
DWORD m_nDragItem, m_nMenuParam, m_nDetailLevel;
- BOOL m_bDragging, m_bInItemRect, m_bRecord, m_bContinueSearch, m_bWholePatternFitsOnScreen;
+ bool m_bDragging, m_bInItemRect, m_bContinueSearch, m_bWholePatternFitsOnScreen;
RECT m_rcDragItem;
DWORD m_dwStatus, m_dwCursor;
DWORD m_dwBeginSel, m_dwEndSel, m_dwStartSel, m_dwDragPos;
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2010-05-22 15:56:50 UTC (rev 605)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2010-05-23 15:32:59 UTC (rev 606)
@@ -185,7 +185,7 @@
PVSTPLUGINLIB CVstPluginManager::AddPlugin(LPCSTR pszDllPath, BOOL bCache, const bool checkFileExistence, CString* const errStr)
-//-----------------------------------------------------------------------------------------------------------
+//------------------------------------------------------------------------------------------------------------------------------
{
if(checkFileExistence && (PathFileExists(pszDllPath) == FALSE))
{
@@ -444,7 +444,7 @@
BOOL CVstPluginManager::CreateMixPlugin(PSNDMIXPLUGIN pMixPlugin, CSoundFile* pSndFile)
-//---------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------
{
UINT nMatch=0;
PVSTPLUGINLIB pFound = NULL;
@@ -457,15 +457,15 @@
{
if (pMixPlugin)
{
- BOOL b1=FALSE, b2=FALSE;
+ bool b1 = false, b2 = false;
if ((p->dwPluginId1 == pMixPlugin->Info.dwPluginId1)
&& (p->dwPluginId2 == pMixPlugin->Info.dwPluginId2))
{
- b1 = TRUE;
+ b1 = true;
}
if (!_strnicmp(p->szLibraryName, pMixPlugin->Info.szLibraryName, 64))
{
- b2 = TRUE;
+ b2 = true;
}
if ((b1) && (b2))
{
@@ -645,7 +645,7 @@
Log("VST plugin to host: Eff: 0x%.8X, Opcode = %d, Index = %d, Value = %d, PTR = %.8X, OPT = %.3f\n",(int)effect, opcode,index,value,(int)ptr,opt);
#endif
- enum HostCanDo
+ enum enmHostCanDo
{
HostDoNotKnow = 0,
HostCanDo = 1,
@@ -991,7 +991,51 @@
break;
// open a fileselector window with VstFileSelect* in <ptr>
case audioMasterOpenFileSelector:
- Log("VST plugin to host: Get Directory\n");
+ {
+ /*
+ VstFileSelect *pFileSel = (VstFileSelect *)ptr;
+ ASSERT(false);
+
+ if(pFileSel->command != kVstDirectorySelect)
+ {
+ std::string extensions;
+ for(size_t i = 0; i < pFileSel->nbFileTypes; i++)
+ {
+ VstFileType *pType = &(pFileSel->fileTypes[i]);
+ extensions += pType->name;
+ extensions += "|";
+#if (defined(WIN32) || defined(WINDOWS))
+ extensions += "*.";
+ extensions += pType->dosType;
+#elif defined(MAC)
+ extensions += "*";
+ extensions += pType->macType;
+#elif defined(UNIX)
+ extensions += "*.";
+ extensions += pType->unixType;
+#else
+ #error Platform-specific code missing
+#endif
+ extensions += "|";
+ }
+
+ FileDlgResult files = CTrackApp::ShowOpenSaveFileDialog(
+ pFileSel->command == kVstFileSave ? false : true,
+ "", "", extensions, pFileSel->initialPath,
+ pFileSel->command == kVstMultipleFilesLoad
+ );
+ if(files.abort)
+ return 0;
+ // todo: retrieve filenames etc.
+ //strcpy(pFileSel->returnPath, files.first_file.c_str());
+ //pFileSel->sizeReturnPath = files.first_file.length();
+ return 1;
+
+ } else */
+ {
+ Log("VST plugin to host: Get Directory\n");
+ }
+ }
break;
//---from here VST 2.2 extension opcodes------------------------------------------------------
@@ -1130,6 +1174,7 @@
};
bool CSelectPluginDlg::VerifyPlug(PVSTPLUGINLIB plug)
+//---------------------------------------------------
{
CString s;
for (int p=0; p<NUM_PROBLEMPLUGS; p++)
@@ -1837,7 +1882,7 @@
}
bool CVstPlugin::SaveProgram(CString fileName)
-//------------------------------------
+//--------------------------------------------
{
if (!(m_pEffect))
return false;
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-05-22 15:56:50 UTC (rev 605)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-05-23 15:32:59 UTC (rev 606)
@@ -9,7 +9,7 @@
[Var]: other
(tx XYZ): thanks to XYZ for telling us about the bug
-Changes from revisions [476, 605]
+Changes from revisions [476, 606]
---------------------------------
General tab
@@ -23,6 +23,7 @@
Sequence editor
[New] <Jojo> "Select All" shortcut also works here now.
[Imp] <Jojo> Sequence menu also allows to insert empty sequences now.
+ [Fix] <Jojo> Jumping between patterns also stops VSTi notes now.
Pattern tab::pattern editing
[New] <Jojo> Extended context menu for PC Notes
@@ -36,6 +37,7 @@
[Fix] <Jojo> When pasting pattern data that exactly reached the pattern end with overflow paste enabled, a redundant undo point was created.
[Fix] <Jojo> Entered (volume) effects are now properly validated (makes a difference f.e. in MOD format where it was previously possible to enter effects like Hxx)
[Fix] <Jojo> Mix Paste: When in MPT behaviour mode, empty FX commands were not overwritten properly when there previously was an effect in that field but only the effect number (and not the param value) was reset.
+ [Fix] <Jojo> When deleting all patterns via the treeview and then switching to the pattern editor, pattern 0 is not created automatically anymore, to avoid confusion.
[Reg] <Jojo> Creating a selection using the Shift key + Mouse click now only works if there was previously no selection made; This seems reasonable as the old shift-behaviour seems to be widely used.
Pattern tab::GUI
@@ -173,10 +175,13 @@
[Fix] <Jojo> Because of an error in pattern count retrival, the last pattern was not checked when looking for unused samples which sometimes resulted in deleted samples (although they were actually used).
[Fix] <re> Fixed a memory leak in pattern name handling.
+Wave Export
+ [New] <Jojo> It is now also possible to render by instrument (i.e. one wave file per instrument).
+ [Imp] <Jojo> When switching to another task and switching back to OpenMPT, it is now less likely that the infamous "OpenMPT does not respond" dialog from Windows occours.
+
Misc
[New] <Jojo> INI Settings: When portable mode is enabled, the most common paths in mptrack.ini are now translated to relative paths (if possible). Plugin paths are not translated to relative paths (yet).
[New] <Jojo> Modules in gzip archives (single-file .gz archives) can now be imported, just to satisfy my laziness when downloading gzipped modules from Amiga Music Preservation. :-P
- [New] <Jojo> Wave export can now also render by instrument (i.e. one wave file per instrument).
[Imp] <Jojo> The wave export "render by channel" mode ignores empty channels now.
[Imp] <Jojo> Mod Loaders: Instead of creating messageboxes in various places, errors are now written to the log and one messagebox is shown for each file.
[Imp] <Jojo> Binary files are now less often falsely recognized as early MOD files (15 samples without header): If the orderlist contains orderlist items > 128, loading is cancelled.
Modified: trunk/OpenMPT/soundlib/Fastmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Fastmix.cpp 2010-05-22 15:56:50 UTC (rev 605)
+++ trunk/OpenMPT/soundlib/Fastmix.cpp 2010-05-23 15:32:59 UTC (rev 606)
@@ -1748,7 +1748,8 @@
}
//didn't manage to get flag from instrument header, use channel flags.
- if (pChannel->dwFlags & CHN_HQSRC) {
+ if (pChannel->dwFlags & CHN_HQSRC)
+ {
if (gdwSoundSetup & SNDMIX_SPLINESRCMODE) return MIXNDX_HQSRC;
if (gdwSoundSetup & SNDMIX_POLYPHASESRCMODE) return MIXNDX_KAISERSRC;
if (gdwSoundSetup & SNDMIX_FIRFILTERSRCMODE) return MIXNDX_FIRFILTERSRC;
@@ -1762,7 +1763,7 @@
extern int gbInitPlugins;
-VOID CSoundFile::ProcessPlugins(UINT nCount)
+void CSoundFile::ProcessPlugins(UINT nCount)
//------------------------------------------
{
// Setup float inputs
@@ -1782,7 +1783,8 @@
}*/
//We should only ever reach this point if the song is playing.
- if (!pPlugin->pMixPlugin->IsSongPlaying()) {
+ if (!pPlugin->pMixPlugin->IsSongPlaying())
+ {
//Plugin doesn't know it is in a song that is playing;
//we must have added it during playback. Initialise it!
pPlugin->pMixPlugin->NotifySongPlaying(true);
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-22 15:56:50 UTC (rev 605)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-23 15:32:59 UTC (rev 606)
@@ -768,13 +768,14 @@
}
if ((m_nRestartPos >= Order.size()) || (Order[m_nRestartPos] >= Patterns.Size())) m_nRestartPos = 0;
- // Load plugins only when m_pModDoc != 0. (can be == 0 for example when examining module samples in treeview.
+ // plugin loader
string sNotFound;
bool bSearchIDs[MAX_MIXPLUGINS];
memset(bSearchIDs, false, MAX_MIXPLUGINS * sizeof(bool));
UINT iShowNotFound = 0;
+ // Load plugins only when m_pModDoc != 0. (can be == 0 for example when examining module samples in treeview.
if (gpMixPluginCreateProc && GetpModDoc())
{
for (PLUGINDEX iPlug = 0; iPlug < MAX_MIXPLUGINS; iPlug++)
@@ -1237,9 +1238,8 @@
void CSoundFile::SetCurrentOrder(ORDERINDEX nOrder)
-//-----------------------------------------------
+//-------------------------------------------------
{
- //while ((nPos < Order.size()) && (Order[nPos] == 0xFE)) nPos++;
while ((nOrder < Order.size()) && (Order[nOrder] == Order.GetIgnoreIndex())) nOrder++;
if ((nOrder >= Order.size()) || (Order[nOrder] >= Patterns.Size())) return;
for (CHANNELINDEX j = 0; j < MAX_CHANNELS; j++)
@@ -1259,6 +1259,12 @@
}
Chn[j].nTremorCount = 0;
}
+
+#ifndef NO_VST
+ // Stop hanging notes from VST instruments as well
+ StopAllVsti();
+#endif // NO_VST
+
if (!nOrder)
{
SetCurrentPos(0);
@@ -1320,28 +1326,32 @@
void CSoundFile::StopAllVsti()
//----------------------------
{
- for (UINT iPlug=0; iPlug<MAX_MIXPLUGINS; iPlug++) {
+ for (UINT iPlug=0; iPlug<MAX_MIXPLUGINS; iPlug++)
+ {
if (!m_MixPlugins[iPlug].pMixPlugin)
continue; //most common branch
IMixPlugin *pPlugin = m_MixPlugins[iPlug].pMixPlugin;
- if (m_MixPlugins[iPlug].pMixState) {
+ if (m_MixPlugins[iPlug].pMixState)
+ {
pPlugin->HardAllNotesOff();
}
}
- m_lTotalSampleCount=GetSampleOffset();
+ m_lTotalSampleCount = GetSampleOffset();
}
void CSoundFile::RecalculateGainForAllPlugs()
//------------------------------------------
{
- for (UINT iPlug=0; iPlug<MAX_MIXPLUGINS; iPlug++) {
+ for (UINT iPlug=0; iPlug<MAX_MIXPLUGINS; iPlug++)
+ {
if (!m_MixPlugins[iPlug].pMixPlugin)
continue; //most common branch
IMixPlugin *pPlugin = m_MixPlugins[iPlug].pMixPlugin;
- if (m_MixPlugins[iPlug].pMixState) {
+ if (m_MixPlugins[iPlug].pMixState)
+ {
pPlugin->RecalculateGain();
}
}
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-05-22 15:56:50 UTC (rev 605)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-05-23 15:32:59 UTC (rev 606)
@@ -755,11 +755,11 @@
public:
// Real-time sound functions
- VOID SuspendPlugins(); //rewbs.VSTCompliance
- VOID ResumePlugins(); //rewbs.VSTCompliance
- VOID StopAllVsti(); //rewbs.VSTCompliance
- VOID RecalculateGainForAllPlugs();
- VOID ResetChannels();
+ void SuspendPlugins(); //rewbs.VSTCompliance
+ void ResumePlugins(); //rewbs.VSTCompliance
+ void StopAllVsti(); //rewbs.VSTCompliance
+ void RecalculateGainForAllPlugs();
+ void ResetChannels();
UINT Read(LPVOID lpBuffer, UINT cbBuffer);
UINT ReadMix(LPVOID lpBuffer, UINT cbBuffer, CSoundFile *, DWORD *, LPBYTE ps=NULL);
UINT CreateStereoMix(int count);
@@ -767,8 +767,8 @@
BOOL FadeSong(UINT msec);
BOOL GlobalFadeSong(UINT msec);
UINT GetTotalTickCount() const { return m_nTotalCount; }
- VOID ResetTotalTickCount() { m_nTotalCount = 0;}
- VOID ProcessPlugins(UINT nCount);
+ void ResetTotalTickCount() { m_nTotalCount = 0;}
+ void ProcessPlugins(UINT nCount);
public:
// Mixer Config
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-22 15:56:56
|
Revision: 605
http://modplug.svn.sourceforge.net/modplug/?rev=605&view=rev
Author: saga-games
Date: 2010-05-22 15:56:50 +0000 (Sat, 22 May 2010)
Log Message:
-----------
[Fix] Even if an instrument was muted, a VSTi assigned to this instrument was still playing in the pattern. This also fixes a problem with wave export + instrument mode.
Modified Paths:
--------------
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-05-22 15:27:35 UTC (rev 604)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-05-22 15:56:50 UTC (rev 605)
@@ -9,7 +9,7 @@
[Var]: other
(tx XYZ): thanks to XYZ for telling us about the bug
-Changes from revisions [476, 604]
+Changes from revisions [476, 605]
---------------------------------
General tab
@@ -100,6 +100,7 @@
[Imp] <Jojo> VST Editor: Added shortcuts for "toggle bypass", "pass keys to plug" and "record params to pattern"
[Mod] <Jojo> VST Editor: Changed number of patches per sub menu from 100 to 128. Now, one sub menu equals ones MIDI bank (more logical)
[Fix] <Jojo> VST Editor: Preset names starting with ' ' >= char > 'A' were cropped (i.e. "123ABC" was displayed as "ABC")
+ [Fix] <Jojo> Even if an instrument was muted, a VSTi assigned to this instrument was still playing in the pattern.
[Fix] <re> Some VSTs that previously wouldn't load might now load fine.
[Fix] <re> Returned host CanDo-values were wrong (since pre RC1 era).
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-05-22 15:27:35 UTC (rev 604)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-05-22 15:56:50 UTC (rev 605)
@@ -2000,15 +2000,24 @@
if ((instr) && (instr < MAX_INSTRUMENTS))
pIns = Instruments[instr];
- if ((pIns) && (pIns->nMidiChannel >= 1) && (pIns->nMidiChannel <= 16)) {
- UINT nPlugin = GetBestPlugin(nChn, PRIORITISE_INSTRUMENT, RESPECT_MUTES);
- if ((nPlugin) && (nPlugin <= MAX_MIXPLUGINS)) {
- pPlugin = m_MixPlugins[nPlugin-1].pMixPlugin;
+ if (pIns)
+ {
+ // Check instrument plugins
+ if ((pIns->nMidiChannel >= 1) && (pIns->nMidiChannel <= 16))
+ {
+ UINT nPlugin = GetBestPlugin(nChn, PRIORITISE_INSTRUMENT, RESPECT_MUTES);
+ if ((nPlugin) && (nPlugin <= MAX_MIXPLUGINS))
+ {
+ pPlugin = m_MixPlugins[nPlugin-1].pMixPlugin;
+ }
}
+
+ // Muted instrument?
+ if (pIns && (pIns->dwFlags & INS_MUTE)) return;
}
- //Do couldn't find a valid plugin
- if (pPlugin == NULL) return;
+ // Do couldn't find a valid plugin
+ if (pPlugin == nullptr) return;
if(GetModFlag(MSF_MIDICC_BUGEMULATION))
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-22 15:27:42
|
Revision: 604
http://modplug.svn.sourceforge.net/modplug/?rev=604&view=rev
Author: saga-games
Date: 2010-05-22 15:27:35 +0000 (Sat, 22 May 2010)
Log Message:
-----------
[Fix] Autosaver: Added a CSoundFile verification, so that it would not complain that autosaving failed in *extremely* rare situations (for example when trying to load a non-existing file. A "file not found" messagebox would be shown and the autosaver could kick in while this box is still shown. Yep, very rare, but I actually managed to trigger this.
[Imp] Wave Export: In channel mode, unused channels are not exported anymore.
[Fix] Wave Export: Small fixes with related refactoring.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/AutoSaver.cpp
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/packageTemplate/History.txt
Modified: trunk/OpenMPT/mptrack/AutoSaver.cpp
===================================================================
--- trunk/OpenMPT/mptrack/AutoSaver.cpp 2010-05-22 13:45:17 UTC (rev 603)
+++ trunk/OpenMPT/mptrack/AutoSaver.cpp 2010-05-22 15:27:35 UTC (rev 604)
@@ -72,11 +72,14 @@
while (posDocument) { //for all open documents
pModDoc = (CModDoc*)(pDocTemplate->GetNextDoc(posDocument));
- if (pModDoc && pModDoc->ModifiedSinceLastAutosave()) {
- if (SaveSingleFile(pModDoc)) {
+ if (pModDoc && pModDoc->ModifiedSinceLastAutosave() && pModDoc->GetSoundFile())
+ {
+ if (SaveSingleFile(pModDoc))
+ {
CleanUpBackups(pModDoc);
- } else {
- m_bEnabled=false;
+ } else
+ {
+ m_bEnabled = false;
AfxMessageBox("Warning: Autosave failed and has been disabled. Please:\n- Review your autosave paths\n- Check available diskspace & filesystem access rights\n- If you are using the ITP format, ensure all instruments exist as independant .iti files");
success = false;
}
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-22 13:45:17 UTC (rev 603)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-22 15:27:35 UTC (rev 604)
@@ -1451,17 +1451,27 @@
TCHAR sFilenameAdd[_MAX_PATH] = _T("");
int nRenderPasses = 1;
- DWORD flags[MAX_BASECHANNELS];
+ // Channel mode
+ bool unusedChannels[MAX_BASECHANNELS];
+ vector<DWORD> channelFlags;
+ // Instrument mode
vector<bool> instrMuteState;
- // Channel mode : save song in multiple wav files (one for each enabled channels)
+ // Channel mode: save song in multiple wav files (one for each enabled channels)
if(wsdlg.m_bChannelMode)
{
- nRenderPasses = m_SndFile.m_nChannels;
- for(int i = 0; i < nRenderPasses ; i++)
+ // Don't save empty channels
+ memset(unusedChannels, false, sizeof(unusedChannels));
+ CheckUnusedChannels(unusedChannels);
+
+ nRenderPasses = m_SndFile.GetNumChannels();
+ channelFlags.resize(nRenderPasses, 0);
+ for(CHANNELINDEX i = 0; i < m_SndFile.GetNumChannels(); i++)
{
// Save channels' flags
- flags[i] = m_SndFile.ChnSettings[i].dwFlags;
+ channelFlags[i] = m_SndFile.ChnSettings[i].dwFlags;
+ // Ignore muted channels
+ if(channelFlags[i] & CHN_MUTE) unusedChannels[i] = true;
// Mute each channel
m_SndFile.ChnSettings[i].dwFlags |= CHN_MUTE;
}
@@ -1472,7 +1482,7 @@
if(m_SndFile.GetNumInstruments() == 0)
{
nRenderPasses = m_SndFile.GetNumSamples();
- instrMuteState.resize(nRenderPasses);
+ instrMuteState.resize(nRenderPasses, false);
for(SAMPLEINDEX i = 0; i < m_SndFile.GetNumSamples(); i++)
{
instrMuteState[i] = IsSampleMuted(i + 1);
@@ -1481,7 +1491,7 @@
} else
{
nRenderPasses = m_SndFile.GetNumInstruments();
- instrMuteState.resize(nRenderPasses);
+ instrMuteState.resize(nRenderPasses, false);
for(INSTRUMENTINDEX i = 0; i < m_SndFile.GetNumInstruments(); i++)
{
instrMuteState[i] = IsInstrumentMuted(i + 1);
@@ -1509,6 +1519,9 @@
// Re-mute previously processed channel
if(i > 0) m_SndFile.ChnSettings[i - 1].dwFlags |= CHN_MUTE;
+ // Was this channel actually muted? Don't process it then.
+ if(unusedChannels[i] == true)
+ continue;
// Add channel number & name (if available) to path string
if(strlen(m_SndFile.ChnSettings[i].szName) > 0)
wsprintf(sFilenameAdd, "-%03d_%s.wav", i + 1, m_SndFile.ChnSettings[i].szName);
@@ -1557,29 +1570,24 @@
_tcscpy(sFilenameAdd, _T(""));
}
- // Render song (or current channel if channel mode and channel not initially disabled)
- if(!(wsdlg.m_bChannelMode || wsdlg.m_bInstrumentMode) || !(flags[i] & CHN_MUTE))
+ // Render song (or current channel, or current sample/instrument)
+ m_SndFile.SetCurrentPos(0);
+ m_SndFile.m_dwSongFlags &= ~SONG_PATTERNLOOP;
+ if (wsdlg.m_bSelectPlay)
{
- // rewbs.fix3239
- m_SndFile.SetCurrentPos(0);
- m_SndFile.m_dwSongFlags &= ~SONG_PATTERNLOOP;
- if (wsdlg.m_bSelectPlay)
- {
- m_SndFile.SetCurrentOrder(wsdlg.m_nMinOrder);
- m_SndFile.m_nCurrentPattern = wsdlg.m_nMinOrder;
- m_SndFile.GetLength(TRUE, FALSE);
- m_SndFile.m_nMaxOrderPosition = wsdlg.m_nMaxOrder + 1;
- }
- //end rewbs.fix3239
- if( dwcdlg.DoModal() != IDOK ) break; // UPDATE#03
+ m_SndFile.SetCurrentOrder(wsdlg.m_nMinOrder);
+ m_SndFile.m_nCurrentPattern = wsdlg.m_nMinOrder;
+ m_SndFile.GetLength(TRUE, FALSE);
+ m_SndFile.m_nMaxOrderPosition = wsdlg.m_nMaxOrder + 1;
}
+ if(dwcdlg.DoModal() != IDOK) break;
}
// Restore channels' flags
if(wsdlg.m_bChannelMode)
{
for(int i = 0 ; i < nRenderPasses ; i++)
- m_SndFile.ChnSettings[i].dwFlags = flags[i];
+ m_SndFile.ChnSettings[i].dwFlags = channelFlags[i];
}
// Restore instruments' / samples' flags
if(wsdlg.m_bInstrumentMode)
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2010-05-22 13:45:17 UTC (rev 603)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2010-05-22 15:27:35 UTC (rev 604)
@@ -287,7 +287,7 @@
void LearnMacro(int macro, long param);
void SetElapsedTime(ORDERINDEX nOrd, ROWINDEX nRow, bool bReset = false);
- BOOL RemoveChannels(BOOL bChnMask[MAX_CHANNELS]);
+ bool RemoveChannels(bool bChnMask[MAX_BASECHANNELS]);
bool HasMPTHacks(bool autofix = false);
@@ -311,7 +311,7 @@
BOOL InitializeMod();
void* GetChildFrame(); //rewbs.customKeys
- void CheckUnusedChannels(BOOL mask[MAX_CHANNELS], CHANNELINDEX maxRemoveCount);
+ void CheckUnusedChannels(bool mask[MAX_BASECHANNELS], CHANNELINDEX maxRemoveCount = MAX_BASECHANNELS);
// Overrides
// ClassWizard generated virtual function overrides
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-05-22 13:45:17 UTC (rev 603)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-05-22 15:27:35 UTC (rev 604)
@@ -499,7 +499,7 @@
}
-BOOL CModDoc::RemoveChannels(BOOL m_bChnMask[MAX_CHANNELS])
+bool CModDoc::RemoveChannels(bool m_bChnMask[MAX_BASECHANNELS])
//---------------------------------------------------------
//To remove all channels whose index corresponds to true value at m_bChnMask[] array. Code is almost non-modified copy of
//the code which was in CModDoc::ChangeNumChannels(UINT nNewChannels) - the only differences are the lines before
@@ -518,7 +518,7 @@
if(nRemainingChannels == m_SndFile.m_nChannels) str.Format("No channels chosen to be removed.");
else str.Format("No removal done - channel number is already at minimum.");
CMainFrame::GetMainFrame()->MessageBox(str , "Remove channel", MB_OK | MB_ICONINFORMATION);
- return FALSE;
+ return false;
}
BeginWaitCursor();
@@ -531,7 +531,7 @@
{
END_CRITICAL();
AddToLog("ERROR: Not enough memory to resize patterns!\nPattern Data is corrupted!");
- return TRUE;
+ return true;
}
MODCOMMAND *tmpsrc = p, *tmpdest = newp;
for (UINT j=0; j<m_SndFile.PatternSize[i]; j++)
@@ -568,7 +568,7 @@
SetModified();
GetPatternUndo()->ClearUndo();
UpdateAllViews(NULL, HINT_MODTYPE);
- return FALSE;
+ return false;
}
@@ -1607,22 +1607,23 @@
}
-void CModDoc::CheckUnusedChannels(BOOL mask[MAX_CHANNELS], CHANNELINDEX maxRemoveCount)
+void CModDoc::CheckUnusedChannels(bool mask[MAX_BASECHANNELS], CHANNELINDEX maxRemoveCount)
//-------------------------------------------------------------------------------------
{
// Checking for unused channels
- for (int iRst=m_SndFile.m_nChannels-1; iRst>=0; iRst--) //rewbs.removeChanWindowCleanup
+ const int nChannels = m_SndFile.GetNumChannels();
+ for(int iRst = nChannels - 1; iRst >= 0; iRst--)
{
- mask[iRst] = TRUE;
- for (UINT ipat=0; ipat<m_SndFile.Patterns.Size(); ipat++) if (m_SndFile.Patterns[ipat])
+ mask[iRst] = true;
+ for (PATTERNINDEX ipat = 0; ipat < m_SndFile.Patterns.Size(); ipat++) if (m_SndFile.Patterns.IsValidPat(ipat))
{
MODCOMMAND *p = m_SndFile.Patterns[ipat] + iRst;
UINT len = m_SndFile.PatternSize[ipat];
- for (UINT idata=0; idata<len; idata++, p+=m_SndFile.m_nChannels)
+ for (UINT idata = 0; idata < len; idata++, p += m_SndFile.m_nChannels)
{
- if (*((LPDWORD)p))
+ if (!p->IsEmpty())
{
- mask[iRst] = FALSE;
+ mask[iRst] = false;
break;
}
}
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-05-22 13:45:17 UTC (rev 603)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-05-22 15:27:35 UTC (rev 604)
@@ -2529,8 +2529,8 @@
str.Format("Remove channel %d?\nNote: Affects all patterns and no undo", nChn+1);
if(CMainFrame::GetMainFrame()->MessageBox(str , "Remove channel", MB_YESNO | MB_ICONQUESTION) == IDYES)
{
- BOOL chnMask[MAX_CHANNELS];
- for(CHANNELINDEX i = 0; i < MAX_CHANNELS; chnMask[i] = FALSE, i++) {}
+ bool chnMask[MAX_BASECHANNELS];
+ for(CHANNELINDEX i = 0; i < MAX_BASECHANNELS; i++) {chnMask[i] = false;}
chnMask[nChn] = TRUE;
pModDoc->RemoveChannels(chnMask);
SetCurrentPattern(m_nPattern); //Updating the screen.
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-05-22 13:45:17 UTC (rev 603)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-05-22 15:27:35 UTC (rev 604)
@@ -674,7 +674,7 @@
void CRemoveChannelsDlg::OnOK()
//-----------------------------
{
- memset(m_bChnMask, 0, sizeof(m_bChnMask));
+ memset(m_bChnMask, false, sizeof(m_bChnMask));
int nCount = m_RemChansList.GetSelCount();
CArray<int,int> aryListBoxSel;
aryListBoxSel.SetSize(nCount);
@@ -682,7 +682,7 @@
for (int n=0; n<nCount; n++)
{
- m_bChnMask[aryListBoxSel[n]]++;
+ m_bChnMask[aryListBoxSel[n]] = true;
}
if ((static_cast<UINT>(nCount) == m_nRemove && nCount > 0) || (m_nRemove == 0 && (m_pSndFile->GetNumChannels() >= nCount + m_pSndFile->GetModSpecifications().channelsMin)))
CDialog::OnOK();
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2010-05-22 13:45:17 UTC (rev 603)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2010-05-22 15:27:35 UTC (rev 604)
@@ -87,7 +87,7 @@
{
public:
CSoundFile *m_pSndFile;
- BOOL m_bChnMask[MAX_CHANNELS];
+ bool m_bChnMask[MAX_BASECHANNELS];
UINT m_nChannels, m_nRemove;
CListBox m_RemChansList; //rewbs.removeChansDlgCleanup
bool m_ShowCancel;
@@ -97,7 +97,7 @@
{ m_pSndFile = pSndFile;
m_nChannels = m_pSndFile->m_nChannels;
m_nRemove = nChns;
- memset(m_bChnMask, 0, sizeof(m_bChnMask));
+ memset(m_bChnMask, false, sizeof(m_bChnMask));
m_ShowCancel = showCancel;
}
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-05-22 13:45:17 UTC (rev 603)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-05-22 15:27:35 UTC (rev 604)
@@ -9,7 +9,7 @@
[Var]: other
(tx XYZ): thanks to XYZ for telling us about the bug
-Changes from revisions [476, 602]
+Changes from revisions [476, 604]
---------------------------------
General tab
@@ -176,6 +176,7 @@
[New] <Jojo> INI Settings: When portable mode is enabled, the most common paths in mptrack.ini are now translated to relative paths (if possible). Plugin paths are not translated to relative paths (yet).
[New] <Jojo> Modules in gzip archives (single-file .gz archives) can now be imported, just to satisfy my laziness when downloading gzipped modules from Amiga Music Preservation. :-P
[New] <Jojo> Wave export can now also render by instrument (i.e. one wave file per instrument).
+ [Imp] <Jojo> The wave export "render by channel" mode ignores empty channels now.
[Imp] <Jojo> Mod Loaders: Instead of creating messageboxes in various places, errors are now written to the log and one messagebox is shown for each file.
[Imp] <Jojo> Binary files are now less often falsely recognized as early MOD files (15 samples without header): If the orderlist contains orderlist items > 128, loading is cancelled.
[Imp] <Jojo> Song Properties: Tooltips are shown for various controls.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-22 13:45:23
|
Revision: 603
http://modplug.svn.sourceforge.net/modplug/?rev=603&view=rev
Author: saga-games
Date: 2010-05-22 13:45:17 +0000 (Sat, 22 May 2010)
Log Message:
-----------
[Fix] Wave Conversion: Sample / instrument mute state was not always updated properly when using the "render by instrument" mode.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-22 13:36:09 UTC (rev 602)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-22 13:45:17 UTC (rev 603)
@@ -1469,7 +1469,6 @@
// Instrument mode: Same as channel mode, but renders per instrument (or sample)
if(wsdlg.m_bInstrumentMode)
{
- // render by instrument (or sample)
if(m_SndFile.GetNumInstruments() == 0)
{
nRenderPasses = m_SndFile.GetNumSamples();
@@ -1507,13 +1506,14 @@
// Channel mode
if(wsdlg.m_bChannelMode)
{
+ // Re-mute previously processed channel
+ if(i > 0) m_SndFile.ChnSettings[i - 1].dwFlags |= CHN_MUTE;
+
// Add channel number & name (if available) to path string
if(strlen(m_SndFile.ChnSettings[i].szName) > 0)
wsprintf(sFilenameAdd, "-%03d_%s.wav", i + 1, m_SndFile.ChnSettings[i].szName);
else
wsprintf(sFilenameAdd, "-%03d.wav", i + 1);
- // Re-mute previously processed channel
- if(i > 0) m_SndFile.ChnSettings[i - 1].dwFlags |= CHN_MUTE;
// Unmute channel to process
m_SndFile.ChnSettings[i].dwFlags &= ~CHN_MUTE;
}
@@ -1522,6 +1522,9 @@
{
if(m_SndFile.GetNumInstruments() == 0)
{
+ // Re-mute previously processed sample
+ if(i > 0) MuteSample((SAMPLEINDEX)i, true);
+
if(m_SndFile.Samples[i + 1].pSample == nullptr || !m_SndFile.IsSampleUsed((SAMPLEINDEX)(i + 1)))
continue;
// Add sample number & name (if available) to path string
@@ -1529,20 +1532,19 @@
wsprintf(sFilenameAdd, "-%03d_%s.wav", i + 1, m_SndFile.m_szNames[i + 1]);
else
wsprintf(sFilenameAdd, "-%03d.wav", i + 1);
- // Re-mute previously processed sample
- if(i > 0) MuteSample((SAMPLEINDEX)i, true);
// Unmute sample to process
MuteSample((SAMPLEINDEX)(i + 1), false);
} else
{
+ // Re-mute previously processed instrument
+ if(i > 0) MuteInstrument((INSTRUMENTINDEX)i, true);
+
if(m_SndFile.Instruments[i + 1] == nullptr || !m_SndFile.IsInstrumentUsed((INSTRUMENTINDEX)(i + 1)))
continue;
if(strlen(m_SndFile.Instruments[i + 1]->name) > 0)
wsprintf(sFilenameAdd, "-%03d_%s.wav", i + 1, m_SndFile.Instruments[i + 1]->name);
else
wsprintf(sFilenameAdd, "-%03d.wav", i + 1);
- // Re-mute previously processed instrument
- if(i > 0) MuteInstrument((INSTRUMENTINDEX)i, true);
// Unmute instrument to process
MuteInstrument((INSTRUMENTINDEX)(i + 1), false);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-05-22 13:36:22
|
Revision: 602
http://modplug.svn.sourceforge.net/modplug/?rev=602&view=rev
Author: saga-games
Date: 2010-05-22 13:36:09 +0000 (Sat, 22 May 2010)
Log Message:
-----------
[New] Wave export can now also render by instrument (i.e. one wave file per instrument).
[Imp] General tab: The "output to" dropdown list also shows the actual plugin name (instead of just the library name) now.
[Mod] Updated release notes
[Mod] Some datatype changes in r574 were wrong in theory (but did not change anything because of the way C++ work), but I reverted them anyway.
[Ref] Some more refactoring
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mod2wave.cpp
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/View_gen.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/misc_util.h
trunk/OpenMPT/mptrack/mod2wave.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
trunk/OpenMPT/soundlib/Sndfile.cpp
Added Paths:
-----------
trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.18/cleanup.png
Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mod2wave.cpp 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/mptrack/Mod2wave.cpp 2010-05-22 13:36:09 UTC (rev 602)
@@ -10,6 +10,7 @@
extern UINT nMixingRates[NUMMIXRATE];
extern LPCSTR gszChnCfgNames[3];
+// this converts a buffer of 32-bit integer sample data to 32 bit floating point
static void __cdecl M2W_32ToFloat(void *pBuffer, long nCount)
{
// const float _ki2f = 1.0f / (FLOAT)(ULONG)(0x80000000); //olivier
@@ -50,6 +51,8 @@
BEGIN_MESSAGE_MAP(CWaveConvert, CDialog)
ON_COMMAND(IDC_CHECK1, OnCheck1)
ON_COMMAND(IDC_CHECK2, OnCheck2)
+ ON_COMMAND(IDC_CHECK4, OnCheckChannelMode)
+ ON_COMMAND(IDC_CHECK6, OnCheckInstrMode)
ON_COMMAND(IDC_RADIO1, UpdateDialog)
ON_COMMAND(IDC_RADIO2, UpdateDialog)
ON_COMMAND(IDC_PLAYEROPTIONS, OnPlayerOptions) //rewbs.resamplerConf
@@ -104,11 +107,7 @@
CHAR s[128];
CDialog::OnInitDialog();
- if (m_bSelectPlay) {
- CheckDlgButton(IDC_RADIO2, MF_CHECKED);
- } else {
- CheckDlgButton(IDC_RADIO1, MF_CHECKED);
- }
+ CheckRadioButton(IDC_RADIO1, IDC_RADIO2, m_bSelectPlay ? IDC_RADIO2 : IDC_RADIO1);
CheckDlgButton(IDC_CHECK3, MF_CHECKED); // HQ resampling
CheckDlgButton(IDC_CHECK5, MF_UNCHECKED); // rewbs.NoNormalize
@@ -116,6 +115,7 @@
// -> CODE#0024
// -> DESC="wav export update"
CheckDlgButton(IDC_CHECK4, MF_UNCHECKED);
+ CheckDlgButton(IDC_CHECK6, MF_UNCHECKED);
// -! NEW_FEATURE#0024
SetDlgItemInt(IDC_EDIT3, m_nMinOrder);
@@ -230,6 +230,22 @@
}
+// Channel render is mutually exclusive with instrument render
+void CWaveConvert::OnCheckChannelMode()
+//-------------------------------------
+{
+ CheckDlgButton(IDC_CHECK6, MF_UNCHECKED);
+}
+
+
+// Channel render is mutually exclusive with instrument render
+void CWaveConvert::OnCheckInstrMode()
+//-----------------------------------
+{
+ CheckDlgButton(IDC_CHECK4, MF_UNCHECKED);
+}
+
+
void CWaveConvert::OnOK()
//-----------------------
{
@@ -242,9 +258,11 @@
//m_bHighQuality = IsDlgButtonChecked(IDC_CHECK3) ? true : false; //rewbs.resamplerConf - we don't want this anymore.
m_bNormalize = IsDlgButtonChecked(IDC_CHECK5) ? true : false;
m_bGivePlugsIdleTime = IsDlgButtonChecked(IDC_GIVEPLUGSIDLETIME) ? true : false;
- if (m_bGivePlugsIdleTime) {
+ if (m_bGivePlugsIdleTime)
+ {
if (MessageBox("You only need slow render if you are experiencing dropped notes with a Kontakt based sampler with Direct-From-Disk enabled.\nIt will make rendering *very* slow.\n\nAre you sure you want to enable slow render?",
- "Really enable slow render?", MB_YESNO) == IDNO ) {
+ "Really enable slow render?", MB_YESNO) == IDNO )
+ {
CheckDlgButton(IDC_GIVEPLUGSIDLETIME, BST_UNCHECKED);
return;
}
@@ -252,8 +270,9 @@
// -> CODE#0024
// -> DESC="wav export update"
- m_bChannelMode = IsDlgButtonChecked(IDC_CHECK4) ? TRUE : FALSE;
+ m_bChannelMode = IsDlgButtonChecked(IDC_CHECK4) ? true : false;
// -! NEW_FEATURE#0024
+ m_bInstrumentMode= IsDlgButtonChecked(IDC_CHECK6) ? true : false;
// WaveFormatEx
DWORD dwFormat = m_CbnSampleFormat.GetItemData(m_CbnSampleFormat.GetCurSel());
@@ -542,7 +561,7 @@
{
m_FileTags.comments = m_pSndFile->m_lpszSongComments;
// convert \r to \n, remove bad characters
- for(UINT i = 0; i < m_FileTags.comments.length(); i++)
+ for(size_t i = 0; i < m_FileTags.comments.length(); i++)
{
if(m_FileTags.comments.substr(i, 1) == "\r")
m_FileTags.comments.replace(i, 1, "\n");
@@ -550,7 +569,7 @@
m_FileTags.comments.replace(i, 1, " ");
}
- /*UINT spos;
+ /*size_t spos;
while((spos = m_FileTags.comments.find("\r")) != string::npos)
{
m_FileTags.comments.replace(spos, 1, "\n");
@@ -700,7 +719,8 @@
}
}*/
- if (m_bGivePlugsIdleTime) {
+ if (m_bGivePlugsIdleTime)
+ {
Sleep(20);
}
@@ -992,6 +1012,7 @@
pos = 0;
pcmBufSize = WAVECONVERTBUFSIZE;
bFinished = FALSE;
+
// Writing File
CMainFrame::GetMainFrame()->InitRenderer(m_pSndFile); //rewbs.VSTTimeInfo
for (n=0; ; n++)
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-05-22 13:36:09 UTC (rev 602)
@@ -1424,7 +1424,7 @@
void CModDoc::OnFileWaveConvert(ORDERINDEX nMinOrder, ORDERINDEX nMaxOrder)
//-------------------------------------------------------------------------
{
- TCHAR fname[_MAX_FNAME]="";
+ TCHAR fname[_MAX_FNAME] = _T("");
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
if ((!pMainFrm) || (!m_SndFile.GetType())) return;
@@ -1441,60 +1441,128 @@
// will set default dir here because there's no setup option for export dir yet (feel free to add one...)
CMainFrame::SetDefaultDirectory(files.workingDirectory.c_str(), DIR_EXPORT, true);
- TCHAR s[_MAX_PATH];
- strcpy(s, files.first_file.c_str());
+ TCHAR sFilename[_MAX_PATH];
+ strcpy(sFilename, files.first_file.c_str());
// Saving as wave file
- UINT p = 0, n = 1;
+
+ // Keep position of the caracter just before ".wav" in path string
+ size_t p = strlen(sFilename) - 4;
+ TCHAR sFilenameAdd[_MAX_PATH] = _T("");
+
+ int nRenderPasses = 1;
DWORD flags[MAX_BASECHANNELS];
- CHAR channel[MAX_CHANNELNAME+10];
+ vector<bool> instrMuteState;
// Channel mode : save song in multiple wav files (one for each enabled channels)
- if(wsdlg.m_bChannelMode){
- n = m_SndFile.m_nChannels;
- for(UINT i = 0 ; i < n ; i++){
+ if(wsdlg.m_bChannelMode)
+ {
+ nRenderPasses = m_SndFile.m_nChannels;
+ for(int i = 0; i < nRenderPasses ; i++)
+ {
// Save channels' flags
flags[i] = m_SndFile.ChnSettings[i].dwFlags;
// Mute each channel
m_SndFile.ChnSettings[i].dwFlags |= CHN_MUTE;
}
- // Keep position of the caracter just before ".wav" in path string
- p = strlen(s) - 4;
}
+ // Instrument mode: Same as channel mode, but renders per instrument (or sample)
+ if(wsdlg.m_bInstrumentMode)
+ {
+ // render by instrument (or sample)
+ if(m_SndFile.GetNumInstruments() == 0)
+ {
+ nRenderPasses = m_SndFile.GetNumSamples();
+ instrMuteState.resize(nRenderPasses);
+ for(SAMPLEINDEX i = 0; i < m_SndFile.GetNumSamples(); i++)
+ {
+ instrMuteState[i] = IsSampleMuted(i + 1);
+ MuteSample(i + 1, true);
+ }
+ } else
+ {
+ nRenderPasses = m_SndFile.GetNumInstruments();
+ instrMuteState.resize(nRenderPasses);
+ for(INSTRUMENTINDEX i = 0; i < m_SndFile.GetNumInstruments(); i++)
+ {
+ instrMuteState[i] = IsInstrumentMuted(i + 1);
+ MuteInstrument(i + 1, true);
+ }
+ }
+ }
- CDoWaveConvert dwcdlg(&m_SndFile, s, &wsdlg.WaveFormat.Format, wsdlg.m_bNormalize, pMainFrm);
+ CDoWaveConvert dwcdlg(&m_SndFile, sFilename, &wsdlg.WaveFormat.Format, wsdlg.m_bNormalize, pMainFrm);
dwcdlg.m_dwFileLimit = static_cast<DWORD>(wsdlg.m_dwFileLimit);
dwcdlg.m_bGivePlugsIdleTime = wsdlg.m_bGivePlugsIdleTime;
dwcdlg.m_dwSongLimit = wsdlg.m_dwSongLimit;
dwcdlg.m_nMaxPatterns = (wsdlg.m_bSelectPlay) ? wsdlg.m_nMaxOrder - wsdlg.m_nMinOrder + 1 : 0;
//if(wsdlg.m_bHighQuality) CSoundFile::SetResamplingMode(SRCMODE_POLYPHASE);
- BOOL bplaying = FALSE;
UINT pos = m_SndFile.GetCurrentPos();
- bplaying = TRUE;
pMainFrm->PauseMod();
- for(UINT i = 0 ; i < n ; i++){
+ for(int i = 0 ; i < nRenderPasses ; i++)
+ {
// Channel mode
- if(wsdlg.m_bChannelMode){
+ if(wsdlg.m_bChannelMode)
+ {
// Add channel number & name (if available) to path string
- if(m_SndFile.ChnSettings[i].szName[0] >= 0x20)
- wsprintf(channel, "-%03d_%s.wav", i+1,m_SndFile.ChnSettings[i].szName);
+ if(strlen(m_SndFile.ChnSettings[i].szName) > 0)
+ wsprintf(sFilenameAdd, "-%03d_%s.wav", i + 1, m_SndFile.ChnSettings[i].szName);
else
- wsprintf(channel, "-%03d.wav", i+1);
- s[p] = '\0';
- strcat(s,channel);
+ wsprintf(sFilenameAdd, "-%03d.wav", i + 1);
+ // Re-mute previously processed channel
+ if(i > 0) m_SndFile.ChnSettings[i - 1].dwFlags |= CHN_MUTE;
// Unmute channel to process
m_SndFile.ChnSettings[i].dwFlags &= ~CHN_MUTE;
}
+ // Instrument mode
+ if(wsdlg.m_bInstrumentMode)
+ {
+ if(m_SndFile.GetNumInstruments() == 0)
+ {
+ if(m_SndFile.Samples[i + 1].pSample == nullptr || !m_SndFile.IsSampleUsed((SAMPLEINDEX)(i + 1)))
+ continue;
+ // Add sample number & name (if available) to path string
+ if(strlen(m_SndFile.m_szNames[i + 1]) > 0)
+ wsprintf(sFilenameAdd, "-%03d_%s.wav", i + 1, m_SndFile.m_szNames[i + 1]);
+ else
+ wsprintf(sFilenameAdd, "-%03d.wav", i + 1);
+ // Re-mute previously processed sample
+ if(i > 0) MuteSample((SAMPLEINDEX)i, true);
+ // Unmute sample to process
+ MuteSample((SAMPLEINDEX)(i + 1), false);
+ } else
+ {
+ if(m_SndFile.Instruments[i + 1] == nullptr || !m_SndFile.IsInstrumentUsed((INSTRUMENTINDEX)(i + 1)))
+ continue;
+ if(strlen(m_SndFile.Instruments[i + 1]->name) > 0)
+ wsprintf(sFilenameAdd, "-%03d_%s.wav", i + 1, m_SndFile.Instruments[i + 1]->name);
+ else
+ wsprintf(sFilenameAdd, "-%03d.wav", i + 1);
+ // Re-mute previously processed instrument
+ if(i > 0) MuteInstrument((INSTRUMENTINDEX)i, true);
+ // Unmute instrument to process
+ MuteInstrument((INSTRUMENTINDEX)(i + 1), false);
+ }
+ }
+ if(_tcslen(sFilenameAdd) > 0)
+ {
+ SanitizeFilename(sFilenameAdd);
+ sFilename[p] = 0;
+ _tcscat(sFilename, sFilenameAdd);
+ _tcscpy(sFilenameAdd, _T(""));
+ }
// Render song (or current channel if channel mode and channel not initially disabled)
- if(!wsdlg.m_bChannelMode || !(flags[i] & CHN_MUTE)){
+ if(!(wsdlg.m_bChannelMode || wsdlg.m_bInstrumentMode) || !(flags[i] & CHN_MUTE))
+ {
// rewbs.fix3239
m_SndFile.SetCurrentPos(0);
m_SndFile.m_dwSongFlags &= ~SONG_PATTERNLOOP;
- if (wsdlg.m_bSelectPlay) {
+ if (wsdlg.m_bSelectPlay)
+ {
m_SndFile.SetCurrentOrder(wsdlg.m_nMinOrder);
m_SndFile.m_nCurrentPattern = wsdlg.m_nMinOrder;
m_SndFile.GetLength(TRUE, FALSE);
@@ -1503,15 +1571,31 @@
//end rewbs.fix3239
if( dwcdlg.DoModal() != IDOK ) break; // UPDATE#03
}
-
- // Re-mute processed channel
- if(wsdlg.m_bChannelMode) m_SndFile.ChnSettings[i].dwFlags |= CHN_MUTE;
}
// Restore channels' flags
- if(wsdlg.m_bChannelMode){
- for(UINT i = 0 ; i < n ; i++) m_SndFile.ChnSettings[i].dwFlags = flags[i];
+ if(wsdlg.m_bChannelMode)
+ {
+ for(int i = 0 ; i < nRenderPasses ; i++)
+ m_SndFile.ChnSettings[i].dwFlags = flags[i];
}
+ // Restore instruments' / samples' flags
+ if(wsdlg.m_bInstrumentMode)
+ {
+ if(m_SndFile.GetNumInstruments() == 0)
+ {
+ for(SAMPLEINDEX i = 0; i < m_SndFile.GetNumSamples(); i++)
+ {
+ MuteSample(i + 1, instrMuteState[i]);
+ }
+ } else
+ {
+ for(INSTRUMENTINDEX i = 0; i < m_SndFile.GetNumInstruments(); i++)
+ {
+ MuteInstrument(i + 1, instrMuteState[i]);
+ }
+ }
+ }
m_SndFile.SetCurrentPos(pos);
m_SndFile.GetLength(TRUE);
@@ -1626,11 +1710,10 @@
ext = ModSpecs::mod.fileExtension;
pattern = FileFilterMOD;
if( AfxMessageBox(GetStrI18N(TEXT(
- "Compared to regular MOD save, compatibility export makes "
- "small adjustments to the save file in order to make the file compatible with "
- "ProTracker and other Amiga-based trackers. Note that this feature is not complete and the "
- "file is not guaranteed to be free of MPT-specific features.\n\n "
- "Important: beginning of some samples may be adjusted in the process. Proceed?")), MB_ICONINFORMATION|MB_YESNO) != IDYES
+ "Compared to regular MOD save, compatibility export adjust the beginning of oneshot samples "
+ "in order to make the file compatible with ProTracker and other Amiga-based trackers. "
+ "Note that this feature does not remove effects \"invented\" by other PC-based trackers (f.e. panning commands)."
+ "\n\n Proceed?")), MB_ICONINFORMATION|MB_YESNO) != IDYES
)
return;
break;
Modified: trunk/OpenMPT/mptrack/View_gen.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-22 13:36:09 UTC (rev 602)
@@ -538,12 +538,19 @@
m_CbnOutput.SetRedraw(FALSE);
m_CbnOutput.ResetContent();
m_CbnOutput.SetItemData(m_CbnOutput.AddString("Default"), 0);
- for (UINT iOut=m_nCurrentPlugin+1; iOut<MAX_MIXPLUGINS; iOut++)
+ for (PLUGINDEX iOut = m_nCurrentPlugin + 1; iOut < MAX_MIXPLUGINS; iOut++)
{
PSNDMIXPLUGIN p = &pSndFile->m_MixPlugins[iOut];
- if (p->Info.szLibraryName[0])
+ if (p->Info.dwPluginId1)
{
- wsprintf(s, "FX%d: %s", iOut+1, p->Info.szLibraryName);
+ if(!strcmp(p->Info.szLibraryName, p->Info.szName) || strlen(p->Info.szName) == 0)
+ {
+ wsprintf(s, "FX%d: %s", iOut + 1, p->Info.szLibraryName);
+ } else
+ {
+ wsprintf(s, "FX%d: %s (%s)", iOut + 1, p->Info.szLibraryName, p->Info.szName);
+ }
+
int n = m_CbnOutput.AddString(s);
m_CbnOutput.SetItemData(n, 0x80|iOut);
if ((pSndFile->m_MixPlugins[m_nCurrentPlugin].Info.dwOutputRouting & 0x80)
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2010-05-22 13:36:09 UTC (rev 602)
@@ -1404,14 +1404,16 @@
if (pModDoc)
{
UINT nChn = current ? (m_dwCursor&0xFFFF)>>3 : (m_nMenuParam&0xFFFF)>>3;
- pModDoc->SoloChannel(nChn, FALSE); //rewbs.merge: recover old solo/mute behaviour
+ pModDoc->SoloChannel(nChn, false); //rewbs.merge: recover old solo/mute behaviour
pModDoc->MuteChannel(nChn, !pModDoc->IsChannelMuted(nChn));
//If we just unmuted a channel, make sure none are still considered "solo".
- if (!pModDoc->IsChannelMuted(nChn)) {
- UINT nNumChn = pModDoc->GetNumChannels();
- for (UINT i=0; i<nNumChn; i++){
- pModDoc->SoloChannel(i, FALSE);
+ if(!pModDoc->IsChannelMuted(nChn))
+ {
+ const CHANNELINDEX nNumChn = pModDoc->GetNumChannels();
+ for(CHANNELINDEX i = 0; i < nNumChn; i++)
+ {
+ pModDoc->SoloChannel(i, false);
}
}
@@ -1436,7 +1438,7 @@
return;
}
- UINT nNumChn = pModDoc->GetNumChannels();
+ const CHANNELINDEX nNumChn = pModDoc->GetNumChannels();
UINT nChn = current ? (m_dwCursor&0xFFFF)>>3 : (m_nMenuParam&0xFFFF)>>3;
if (nChn >= nNumChn) {
return;
@@ -1455,7 +1457,8 @@
return;
}
}
- for (UINT i=0; i<nNumChn; i++) {
+ for(CHANNELINDEX i = 0; i < nNumChn; i++)
+ {
pModDoc->MuteChannel(i, !(i == nChn)); //mute all chans except nChn, unmute nChn
pModDoc->SoloChannel(i, (i == nChn)); //unsolo all chans except nChn, solo nChn
}
@@ -1506,11 +1509,11 @@
CModDoc *pModDoc = GetDocument();
if (pModDoc)
{
- UINT nChns = pModDoc->GetNumChannels();
- for (UINT i=0; i<nChns; i++)
+ const CHANNELINDEX nChns = pModDoc->GetNumChannels();
+ for(CHANNELINDEX i = 0; i < nChns; i++)
{
- pModDoc->MuteChannel(i, FALSE);
- pModDoc->SoloChannel(i, FALSE); //rewbs.merge: binary solo/mute behaviour
+ pModDoc->MuteChannel(i, false);
+ pModDoc->SoloChannel(i, false); //rewbs.merge: binary solo/mute behaviour
}
InvalidateChannelsHeaders();
}
Modified: trunk/OpenMPT/mptrack/misc_util.h
===================================================================
--- trunk/OpenMPT/mptrack/misc_util.h 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/mptrack/misc_util.h 2010-05-22 13:36:09 UTC (rev 602)
@@ -112,7 +112,7 @@
inline void SanitizeFilename(char (&buffer)[size])
{
STATIC_ASSERT(size > 0);
- for(int i = 0; i < size; i++)
+ for(size_t i = 0; i < size; i++)
{
if( buffer[i] == '\\' ||
buffer[i] == '\"' ||
@@ -123,7 +123,7 @@
buffer[i] == '>' ||
buffer[i] == '*')
{
- for(int j = i + 1; j < size; j++)
+ for(size_t j = i + 1; j < size; j++)
{
buffer[j - 1] = buffer[j];
}
Modified: trunk/OpenMPT/mptrack/mod2wave.h
===================================================================
--- trunk/OpenMPT/mptrack/mod2wave.h 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/mptrack/mod2wave.h 2010-05-22 13:36:09 UTC (rev 602)
@@ -20,8 +20,9 @@
// -> CODE#0024
// -> DESC="wav export update"
- BOOL m_bChannelMode;
+ bool m_bChannelMode; // Render by channel
// -! NEW_FEATURE#0024
+ bool m_bInstrumentMode; // Render by instrument
public:
CWaveConvert(CWnd *parent, ORDERINDEX nMinOrder = ORDERINDEX_INVALID, ORDERINDEX nMaxOrder = ORDERINDEX_INVALID);
@@ -33,6 +34,8 @@
virtual void OnOK();
afx_msg void OnCheck1();
afx_msg void OnCheck2();
+ afx_msg void OnCheckChannelMode();
+ afx_msg void OnCheckInstrMode();
afx_msg void OnFormatChanged();
afx_msg void OnPlayerOptions(); //rewbs.resamplerConf
DECLARE_MESSAGE_MAP()
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2010-05-22 13:36:09 UTC (rev 602)
@@ -284,33 +284,35 @@
PUSHBUTTON "Default Settings",IDC_BUTTON_DEFAULT_RESAMPLING,186,180,66,12
END
-IDD_WAVECONVERT DIALOGEX 0, 0, 262, 197
+IDD_WAVECONVERT DIALOGEX 0, 0, 262, 221
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Wave Convert"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
DEFPUSHBUTTON "OK",IDOK,204,12,50,14
PUSHBUTTON "Cancel",IDCANCEL,204,30,50,14
- GROUPBOX "Render",IDC_STATIC,6,6,192,90
+ GROUPBOX "Render",IDC_STATIC,6,6,192,114
COMBOBOX IDC_COMBO1,18,18,54,82,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO2,78,18,73,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Change Player Options",IDC_PLAYEROPTIONS,18,36,81,14,BS_CENTER
- CONTROL "Channel mode (one file per channel)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,168,8
- CONTROL "Normalize Output (experimental)",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,119,10
+ CONTROL "Normalize Output (experimental)",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,84,168,12
CONTROL "High quality resampling",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,112,36,84,10
CONTROL "Slow render (for Kontakt+DFD)",IDC_GIVEPLUGSIDLETIME,
- "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE | WS_TABSTOP,18,78,133,8
- GROUPBOX "Limit",IDC_STATIC,6,102,192,90
- CONTROL "Limit file size to: (KBytes)",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,114,111,11
- EDITTEXT IDC_EDIT1,138,114,50,12,ES_AUTOHSCROLL
- CONTROL "Limit song length to: (seconds)",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,134,111,10
- EDITTEXT IDC_EDIT2,138,133,50,12,ES_AUTOHSCROLL
- LTEXT "Play:",IDC_STATIC,18,150,37,8
- CONTROL "Entire song",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,18,162,104,10
- CONTROL "From position",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,18,175,58,10
- EDITTEXT IDC_EDIT3,78,174,19,12,ES_AUTOHSCROLL | ES_NUMBER
- CTEXT "to",IDC_STATIC,102,176,8,8
- EDITTEXT IDC_EDIT4,114,174,19,12,ES_AUTOHSCROLL | ES_NUMBER
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE | WS_TABSTOP,18,97,168,12
+ GROUPBOX "Limit",IDC_STATIC,6,126,192,90
+ CONTROL "Limit file size to: (KBytes)",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,138,111,11
+ EDITTEXT IDC_EDIT1,138,138,50,12,ES_AUTOHSCROLL
+ CONTROL "Limit song length to: (seconds)",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,158,111,10
+ EDITTEXT IDC_EDIT2,138,157,50,12,ES_AUTOHSCROLL
+ LTEXT "Play:",IDC_STATIC,18,174,37,8
+ CONTROL "Entire song",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,18,186,104,10
+ CONTROL "From position",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,18,199,58,10
+ EDITTEXT IDC_EDIT3,78,198,24,12,ES_AUTOHSCROLL | ES_NUMBER
+ CTEXT "to",IDC_STATIC,105,200,8,8
+ EDITTEXT IDC_EDIT4,117,198,24,12,ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "Channel mode (one file per channel)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,54,168,12
+ CONTROL "Instrument mode (one file per instrument)",IDC_CHECK6,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,66,168,12
END
IDD_PROGRESS DIALOG 0, 0, 186, 55
@@ -1532,7 +1534,7 @@
IDD_WAVECONVERT, DIALOG
BEGIN
RIGHTMARGIN, 211
- BOTTOMMARGIN, 194
+ BOTTOMMARGIN, 218
END
IDD_OPTIONS_KEYBOARD, DIALOG
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-05-22 13:36:09 UTC (rev 602)
@@ -9,12 +9,13 @@
[Var]: other
(tx XYZ): thanks to XYZ for telling us about the bug
-Changes from revisions [476, 599]
+Changes from revisions [476, 602]
---------------------------------
General tab
[Imp] <Jojo> Disabled tempo slider for MOD files (it was just confusing)
[Imp] <Jojo> Disabled global volume slider for MOD files, instead enabled the sample pre-amp slider (so it is also possible to make output louder)
+ [Imp] <Jojo> The "output to" dropdown list also shows the actual plugin name (instead of just the library name) now.
[Fix] <Jojo> Moving a plugin in MOD/S3M files doesn't mark them as modified anymore. The channel fx dropdown lists are now also disabled for those module types.
[Fix] <Jojo> The restart position edit control is disabled for S3M files.
[Fix] <coda> The background colour of the tabs in the channel configuration is now also correct when using WinXP Luna or Vista/Win7 Aero.
@@ -174,6 +175,7 @@
Misc
[New] <Jojo> INI Settings: When portable mode is enabled, the most common paths in mptrack.ini are now translated to relative paths (if possible). Plugin paths are not translated to relative paths (yet).
[New] <Jojo> Modules in gzip archives (single-file .gz archives) can now be imported, just to satisfy my laziness when downloading gzipped modules from Amiga Music Preservation. :-P
+ [New] <Jojo> Wave export can now also render by instrument (i.e. one wave file per instrument).
[Imp] <Jojo> Mod Loaders: Instead of creating messageboxes in various places, errors are now written to the log and one messagebox is shown for each file.
[Imp] <Jojo> Binary files are now less often falsely recognized as early MOD files (15 samples without header): If the orderlist contains orderlist items > 128, loading is cancelled.
[Imp] <Jojo> Song Properties: Tooltips are shown for various controls.
@@ -187,6 +189,7 @@
[Fix] <Jojo> Song Length Detection: *Much* more accurate song length detection!
[Fix] <Jojo/re> Instrument IO: Flags from old ITI/XI files should also be loaded correctly now (broken in 1.18.00.00)
[Fix] <Jojo> Plugin Editor: Changing a plugin parameter in MOD/S3M files doesn't mark them as modified anymore.
+ [Fix] <Jojo> When using the "close file" shortcut several times in a row so that multiple messageboxes popped up, it was possible to crash OpenMPT.
[Reg] <Jojo> Removed AutodetectITplaystyle option, since the tracker detection works reliably enough now. Tracker detection can not be ignored anymore now.
Installer/release package
Modified: trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
===================================================================
--- trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html 2010-05-22 13:36:09 UTC (rev 602)
@@ -19,8 +19,14 @@
a:visited { color: #909; text-decoration: none; }
a:hover { text-decoration: underline; }
- div img, h1
+ .screenshots
{
+ float:right;
+ text-align:right;
+ }
+
+ .screenshots img, h1
+ {
border: 1px solid #ccc;
padding: 3px;
background: #eee;
@@ -78,7 +84,8 @@
<h2>What's new?</h2>
<h3>General</h3>
- <div style="float:right;">
+ <div class="screenshots">
+ <a href="ReleaseNotesImages/1.18/cleanup.png"><img src="ReleaseNotesImages/1.18/cleanup.png" width="183" height="84" alt="Cleanup dialog" title="Cleanup dialog (click to view big screenshot)" /></a><br />
<img src="ReleaseNotesImages/1.18/treeview.png" width="183" height="338" alt="Improved treeview" title="Improved treeview" />
</div>
<ul>
@@ -104,11 +111,21 @@
A friendly reminder: The autosave and backup options should always be enabled; You will be very glad about them once OpenMPT <i>really</i> crashes
or you accidentally overwrite a file.</li>
<li>New and <strong>updated keymaps</strong> with many new shortcuts!</li>
+ <li>The new <strong>cleanup dialog</strong> replaces the cleanup menu and offers more options. For example, the <strong>rearrange samples</strong> function is available again.</li>
<li><strong>Redesigned</strong> several dialogs.</li>
</ul>
+
+ <h3>Treeview</h3>
+ <ul>
+ <li>It is very simple to <strong>switch to another module</strong> now: Simply click the module name!</li>
+ <li><strong>Closing a module</strong> is almost as simple: Right-click the module name and select the appropriate context menu entry.</li>
+ <li>Sample and instrument <strong>playback indicators</strong>.</li>
+ <li><strong>Improved icons</strong>: Mute status is now displayed.</li>
+ <li><strong>Sequence control</strong> including copying a sequence to another module.</li>
+ </ul>
<h3>Pattern Editor</h3>
- <div style="float:right;">
+ <div class="screenshots">
<img src="ReleaseNotesImages/1.18/orderlist.png" width="348" height="167" alt="New orderlist" title="New orderlist" />
</div>
<ul>
Added: trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.18/cleanup.png
===================================================================
(Binary files differ)
Property changes on: trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.18/cleanup.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-21 21:01:28 UTC (rev 601)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2010-05-22 13:36:09 UTC (rev 602)
@@ -1845,7 +1845,7 @@
case RS_PCM16D:
case RS_PCM16S:
{
- uint16 *p = (uint16 *)pSample;
+ int16 *p = (int16 *)pSample;
int s_old = 0, s_ofs;
len = nLen * 2;
bufcount = 0;
@@ -1861,11 +1861,11 @@
}
if (nFlags == RS_PCM16D)
{
- *((uint16 *)(&buffer[bufcount])) = (uint16)(s_new - s_old);
+ *((int16 *)(&buffer[bufcount])) = (int16)(s_new - s_old);
s_old = s_new;
} else
{
- *((uint16 *)(&buffer[bufcount])) = (uint16)(s_new + s_ofs);
+ *((int16 *)(&buffer[bufcount])) = (int16)(s_new + s_ofs);
}
bufcount += 2;
if (bufcount >= sizeof(buffer) - 1)
@@ -1896,11 +1896,11 @@
p += 2;
if (nFlags == RS_STPCM8D)
{
- buffer[bufcount++] = (uint8)(s_new - s_old);
+ buffer[bufcount++] = (int8)(s_new - s_old);
s_old = s_new;
} else
{
- buffer[bufcount++] = (uint8)(s_new + s_ofs);
+ buffer[bufcount++] = (int8)(s_new + s_ofs);
}
if (bufcount >= sizeof(buffer))
{
@@ -1932,11 +1932,11 @@
p += 2;
if (nFlags == RS_STPCM16D)
{
- *((uint16 *)(&buffer[bufcount])) = (uint16)(s_new - s_old);
+ *((int16 *)(&buffer[bufcount])) = (int16)(s_new - s_old);
s_old = s_new;
} else
{
- *((uint16 *)(&buffer[bufcount])) = (uint16)(s_new + s_ofs);
+ *((int16 *)(&buffer[bufcount])) = (int16)(s_new + s_ofs);
}
bufcount += 2;
if (bufcount >= sizeof(buffer))
@@ -1979,11 +1979,11 @@
}
if (nFlags == RS_PCM8D)
{
- buffer[bufcount++] = (uint8)(s_new - s_old);
+ buffer[bufcount++] = (int8)(s_new - s_old);
s_old = s_new;
} else
{
- buffer[bufcount++] = (uint8)(s_new + s_ofs);
+ buffer[bufcount++] = (int8)(s_new + s_ofs);
}
if (bufcount >= sizeof(buffer))
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|