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-08-05 11:44:18
|
Revision: 676
http://modplug.svn.sourceforge.net/modplug/?rev=676&view=rev
Author: saga-games
Date: 2010-08-05 11:44:10 +0000 (Thu, 05 Aug 2010)
Log Message:
-----------
[Ref] Moved ASSERT_CAN_READ macro to a new file, Loaders.h. Functions and macros that are common between loaders should be placed here in the future.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/mptrack.vcproj
trunk/OpenMPT/mptrack/mptrack_08.vcproj
trunk/OpenMPT/soundlib/LOAD_AMF.CPP
trunk/OpenMPT/soundlib/LOAD_DBM.CPP
trunk/OpenMPT/soundlib/LOAD_DMF.CPP
trunk/OpenMPT/soundlib/LOAD_DSM.CPP
trunk/OpenMPT/soundlib/Load_669.cpp
trunk/OpenMPT/soundlib/Load_ams.cpp
trunk/OpenMPT/soundlib/Load_far.cpp
trunk/OpenMPT/soundlib/Load_gdm.cpp
trunk/OpenMPT/soundlib/Load_imf.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_itp.cpp
trunk/OpenMPT/soundlib/Load_mdl.cpp
trunk/OpenMPT/soundlib/Load_med.cpp
trunk/OpenMPT/soundlib/Load_mid.cpp
trunk/OpenMPT/soundlib/Load_mo3.cpp
trunk/OpenMPT/soundlib/Load_mod.cpp
trunk/OpenMPT/soundlib/Load_mt2.cpp
trunk/OpenMPT/soundlib/Load_mtm.cpp
trunk/OpenMPT/soundlib/Load_okt.cpp
trunk/OpenMPT/soundlib/Load_psm.cpp
trunk/OpenMPT/soundlib/Load_ptm.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/Load_stm.cpp
trunk/OpenMPT/soundlib/Load_ult.cpp
trunk/OpenMPT/soundlib/Load_umx.cpp
trunk/OpenMPT/soundlib/Load_wav.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/load_j2b.cpp
Added Paths:
-----------
trunk/OpenMPT/soundlib/Loaders.h
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2010-08-05 11:44:10 UTC (rev 676)
@@ -795,6 +795,9 @@
RelativePath=".\KeyConfigDlg.h">
</File>
<File
+ RelativePath="..\soundlib\Loaders.h">
+ </File>
+ <File
RelativePath=".\mainbar.h">
</File>
<File
Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2010-08-05 11:44:10 UTC (rev 676)
@@ -1055,6 +1055,10 @@
>
</File>
<File
+ RelativePath="..\soundlib\Loaders.h"
+ >
+ </File>
+ <File
RelativePath=".\mainbar.h"
>
</File>
Modified: trunk/OpenMPT/soundlib/LOAD_AMF.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2010-08-05 11:44:10 UTC (rev 676)
@@ -17,7 +17,7 @@
//
///////////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
//#define AMFLOG
Modified: trunk/OpenMPT/soundlib/LOAD_DBM.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_DBM.CPP 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/LOAD_DBM.CPP 2010-08-05 11:44:10 UTC (rev 676)
@@ -17,7 +17,7 @@
///////////////////////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#define DBM_FILE_MAGIC 0x304d4244
#define DBM_ID_NAME 0x454d414e
Modified: trunk/OpenMPT/soundlib/LOAD_DMF.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_DMF.CPP 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/LOAD_DMF.CPP 2010-08-05 11:44:10 UTC (rev 676)
@@ -11,7 +11,7 @@
// DMF DELUSION DIGITAL MUSIC FILEFORMAT (X-Tracker) //
///////////////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
//#define DMFLOG
Modified: trunk/OpenMPT/soundlib/LOAD_DSM.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_DSM.CPP 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/LOAD_DSM.CPP 2010-08-05 11:44:10 UTC (rev 676)
@@ -11,7 +11,7 @@
// DSIK Internal Format (DSM) module loader //
//////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#pragma pack(1)
Modified: trunk/OpenMPT/soundlib/Load_669.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_669.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_669.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -13,7 +13,7 @@
////////////////////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
Modified: trunk/OpenMPT/soundlib/Load_ams.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_ams.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_ams.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -17,7 +17,7 @@
// AMS (Extreme's Tracker) module loader //
//////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
Modified: trunk/OpenMPT/soundlib/Load_far.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_far.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_far.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -11,7 +11,7 @@
// Farandole (FAR) module loader //
////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
Modified: trunk/OpenMPT/soundlib/Load_gdm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_gdm.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_gdm.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -13,7 +13,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#ifdef MODPLUG_TRACKER
#include "../mptrack/moddoc.h"
#endif // MODPLUG_TRACKER
Modified: trunk/OpenMPT/soundlib/Load_imf.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_imf.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_imf.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -7,7 +7,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#ifdef MODPLUG_TRACKER
#include "../mptrack/moddoc.h"
#endif // MODPLUG_TRACKER
@@ -266,9 +266,6 @@
bool CSoundFile::ReadIMF(const LPCBYTE lpStream, const DWORD dwMemLength)
//-----------------------------------------------------------------------
{
- #define ASSERT_CAN_READ(x) \
- if( dwMemPos > dwMemLength || x > dwMemLength - dwMemPos ) return false;
-
DWORD dwMemPos = 0;
IMFHEADER hdr;
MODSAMPLE *pSample = Samples + 1;
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -8,8 +8,8 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
-#include "it_defs.h"
+#include "Loaders.h"
+#include "IT_DEFS.H"
#include "tuningcollection.h"
#include "../mptrack/moddoc.h"
#include "../mptrack/serialization_utils.h"
Modified: trunk/OpenMPT/soundlib/Load_itp.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_itp.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_itp.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -13,7 +13,7 @@
*/
#include "stdafx.h"
-#include "Sndfile.h"
+#include "Loaders.h"
#include "IT_DEFS.H"
#include "../mptrack/mptrack.h"
#include "../mptrack/version.h"
@@ -28,40 +28,35 @@
{
UINT i,n,nsmp;
DWORD id,len,size;
- DWORD streamPos = 0;
+ DWORD dwMemPos = 0;
DWORD version;
- // Macro used to make sure that given amount of bytes can be read.
- // Returns FALSE from this function if reading is not possible.
- #define ASSERT_CAN_READ(x) \
- if( streamPos > dwMemLength || x > dwMemLength - streamPos ) return false;
-
ASSERT_CAN_READ(12);
// Check file ID
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
if(id != ITP_FILE_ID) return false;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
version = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
m_nType = MOD_TYPE_IT;
// Song name
// name string length
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
len = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// name string
ASSERT_CAN_READ(len);
if (len<=sizeof(m_szNames[0])) {
- memcpy(m_szNames[0],lpStream+streamPos,len);
- streamPos += len;
+ memcpy(m_szNames[0],lpStream+dwMemPos,len);
+ dwMemPos += len;
m_szNames[0][sizeof(m_szNames[0])-1] = '\0';
}
else return false;
@@ -70,61 +65,61 @@
// comment string length
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- streamPos += sizeof(DWORD);
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
+ dwMemPos += sizeof(DWORD);
if(id > uint16_max) return false;
// allocate and copy comment string
ASSERT_CAN_READ(id);
if(id > 0)
{
- ReadMessage(lpStream + streamPos, id - 1, leCR);
+ ReadMessage(lpStream + dwMemPos, id - 1, leCR);
}
- streamPos += id;
+ dwMemPos += id;
// Song global config
ASSERT_CAN_READ(5*4);
// m_dwSongFlags
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
m_dwSongFlags = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
if(!(m_dwSongFlags & SONG_ITPROJECT)) return false;
// m_nDefaultGlobalVolume
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
m_nDefaultGlobalVolume = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// m_nSamplePreAmp
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
m_nSamplePreAmp = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// m_nDefaultSpeed
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
m_nDefaultSpeed = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// m_nDefaultTempo
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
m_nDefaultTempo = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// Song channels data
ASSERT_CAN_READ(2*4);
// m_nChannels
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
m_nChannels = (CHANNELINDEX)id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
if(m_nChannels > 127) return false;
// channel name string length (=MAX_CHANNELNAME)
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
len = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
if(len > MAX_CHANNELNAME) return false;
// Channels' data
@@ -132,87 +127,87 @@
ASSERT_CAN_READ(3*4 + len);
// ChnSettings[i].nPan
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
ChnSettings[i].nPan = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// ChnSettings[i].dwFlags
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
ChnSettings[i].dwFlags = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// ChnSettings[i].nVolume
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
ChnSettings[i].nVolume = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// ChnSettings[i].szName
- memcpy(&ChnSettings[i].szName[0],lpStream+streamPos,len);
+ memcpy(&ChnSettings[i].szName[0],lpStream+dwMemPos,len);
SetNullTerminator(ChnSettings[i].szName);
- streamPos += len;
+ dwMemPos += len;
}
// Song mix plugins
// size of mix plugins data
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- streamPos += sizeof(DWORD);
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
+ dwMemPos += sizeof(DWORD);
// mix plugins
ASSERT_CAN_READ(id);
- streamPos += LoadMixPlugins(lpStream+streamPos, id);
+ dwMemPos += LoadMixPlugins(lpStream+dwMemPos, id);
// Song midi config
// midi cfg data length
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- streamPos += sizeof(DWORD);
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
+ dwMemPos += sizeof(DWORD);
// midi cfg
ASSERT_CAN_READ(id);
if (id<=sizeof(m_MidiCfg)) {
- memcpy(&m_MidiCfg,lpStream+streamPos,id);
- streamPos += id;
+ memcpy(&m_MidiCfg,lpStream+dwMemPos,id);
+ dwMemPos += id;
}
// Song Instruments
// m_nInstruments
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
m_nInstruments = (INSTRUMENTINDEX)id;
if(m_nInstruments > MAX_INSTRUMENTS) return false;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// path string length (=_MAX_PATH)
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
len = id;
if(len > _MAX_PATH) return false;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// instruments' paths
for(i=0; i<m_nInstruments; i++){
ASSERT_CAN_READ(len);
- memcpy(&m_szInstrumentPath[i][0],lpStream+streamPos,len);
+ memcpy(&m_szInstrumentPath[i][0],lpStream+dwMemPos,len);
SetNullTerminator(m_szInstrumentPath[i]);
- streamPos += len;
+ dwMemPos += len;
}
// Song Orders
// size of order array (=MAX_ORDERS)
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
size = id;
if(size > MAX_ORDERS) return false;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// order data
ASSERT_CAN_READ(size);
- Order.ReadAsByte(lpStream+streamPos, size, dwMemLength-streamPos);
- streamPos += size;
+ Order.ReadAsByte(lpStream+dwMemPos, size, dwMemLength-dwMemPos);
+ dwMemPos += size;
@@ -220,38 +215,38 @@
ASSERT_CAN_READ(3*4);
// number of patterns (=MAX_PATTERNS)
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
size = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
if(size > MAX_PATTERNS) return false;
// m_nPatternNames
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
m_nPatternNames = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// pattern name string length (=MAX_PATTERNNAME)
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
len = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// m_lpszPatternNames
if (len<=MAX_PATTERNNAME && m_nPatternNames<=MAX_PATTERNS)
{
m_lpszPatternNames = new char[m_nPatternNames * len];
ASSERT_CAN_READ(m_nPatternNames * len);
- memcpy(&m_lpszPatternNames[0],lpStream+streamPos,m_nPatternNames * len);
+ memcpy(&m_lpszPatternNames[0],lpStream+dwMemPos,m_nPatternNames * len);
}
else return false;
- streamPos += m_nPatternNames * len;
+ dwMemPos += m_nPatternNames * len;
// modcommand data length
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
n = id;
if(n != 6) return false;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
for(PATTERNINDEX npat=0; npat<size; npat++)
{
@@ -260,24 +255,24 @@
// Patterns[npat].GetNumRows()
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
if(id > MAX_PATTERN_ROWS) return false;
Patterns[npat].Resize(id, false);
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// Try to allocate & read only sized patterns
if(Patterns[npat].GetNumRows()){
// Allocate pattern
if(Patterns.Insert(npat, Patterns[npat].GetNumRows())){
- streamPos += m_nChannels * Patterns[npat].GetNumRows() * n;
+ dwMemPos += m_nChannels * Patterns[npat].GetNumRows() * n;
continue;
}
// Pattern data
long datasize = m_nChannels * Patterns[npat].GetNumRows() * n;
//if (streamPos+datasize<=dwMemLength) {
- if(Patterns[npat].ReadITPdata(lpStream, streamPos, datasize, dwMemLength))
+ if(Patterns[npat].ReadITPdata(lpStream, dwMemPos, datasize, dwMemLength))
{
ErrorBox(IDS_ERR_FILEOPEN, NULL);
return false;
@@ -294,17 +289,17 @@
// Read original number of samples
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
if(id > MAX_SAMPLES) return false;
m_nSamples = (SAMPLEINDEX)id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// Read number of embeded samples
ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
if(id > MAX_SAMPLES) return false;
n = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
// Read samples
for(i=0; i<n; i++){
@@ -312,22 +307,22 @@
ASSERT_CAN_READ(4 + sizeof(ITSAMPLESTRUCT) + 4);
// Sample id number
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
nsmp = id;
- streamPos += sizeof(DWORD);
+ dwMemPos += sizeof(DWORD);
if(nsmp < 1 || nsmp >= MAX_SAMPLES)
return false;
// Sample struct
- memcpy(&pis,lpStream+streamPos,sizeof(ITSAMPLESTRUCT));
- streamPos += sizeof(ITSAMPLESTRUCT);
+ memcpy(&pis,lpStream+dwMemPos,sizeof(ITSAMPLESTRUCT));
+ dwMemPos += sizeof(ITSAMPLESTRUCT);
// Sample length
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ memcpy(&id,lpStream+dwMemPos,sizeof(DWORD));
len = id;
- streamPos += sizeof(DWORD);
- if(streamPos >= dwMemLength || len > dwMemLength - streamPos) return false;
+ dwMemPos += sizeof(DWORD);
+ if(dwMemPos >= dwMemLength || len > dwMemLength - dwMemPos) return false;
// Copy sample struct data
if(pis.id == 0x53504D49)
@@ -371,8 +366,8 @@
if (pis.flags & 4) flags |= RSF_STEREO;
}
// Read sample data
- ReadSample(&Samples[nsmp], flags, (LPSTR)(lpStream+streamPos), len);
- streamPos += len;
+ ReadSample(&Samples[nsmp], flags, (LPSTR)(lpStream+dwMemPos), len);
+ dwMemPos += len;
memcpy(m_szNames[nsmp], pis.name, 26);
}
}
@@ -400,9 +395,9 @@
// Extra info data
__int32 fcode = 0;
- LPCBYTE ptr = lpStream + min(streamPos, dwMemLength);
+ LPCBYTE ptr = lpStream + min(dwMemPos, dwMemLength);
- if (streamPos <= dwMemLength - 4) {
+ if (dwMemPos <= dwMemLength - 4) {
fcode = (*((__int32 *)ptr));
}
@@ -459,8 +454,6 @@
}
return true;
-
- #undef ASSERT_CAN_READ
}
Modified: trunk/OpenMPT/soundlib/Load_mdl.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mdl.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_mdl.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -10,7 +10,7 @@
// DigiTracker (MDL) module loader //
//////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
//#define MDL_LOG
Modified: trunk/OpenMPT/soundlib/Load_med.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_med.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_med.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -8,7 +8,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
//#define MED_LOG
Modified: trunk/OpenMPT/soundlib/Load_mid.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mid.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_mid.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -11,7 +11,7 @@
// MIDI loader //
//////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#include "dlsbank.h"
#pragma warning(disable:4244)
Modified: trunk/OpenMPT/soundlib/Load_mo3.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mo3.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_mo3.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -7,7 +7,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#ifdef MODPLUG_TRACKER
#include "../mptrack/moddoc.h"
#endif // MODPLUG_TRACKER
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -9,7 +9,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
Modified: trunk/OpenMPT/soundlib/Load_mt2.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mt2.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_mt2.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -1,5 +1,5 @@
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
//#define MT2DEBUG
Modified: trunk/OpenMPT/soundlib/Load_mtm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mtm.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_mtm.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -9,7 +9,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
//////////////////////////////////////////////////////////
// MTM file support (import only)
Modified: trunk/OpenMPT/soundlib/Load_okt.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_okt.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_okt.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -10,7 +10,7 @@
// Oktalyzer (OKT) module loader //
//////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
// IFF chunk names
#define OKTCHUNKID_CMOD 0x434D4F44
@@ -99,12 +99,11 @@
void Read_OKT_Pattern(const BYTE *lpStream, const DWORD dwMemLength, const PATTERNINDEX nPat, CSoundFile *pSndFile)
//-----------------------------------------------------------------------------------------------------------------
{
- #define ASSERT_CAN_READ(x) \
- if( dwMemPos > dwMemLength || x > dwMemLength - dwMemPos ) return;
+ #define ASSERT_CAN_READ_OKTPAT(x) ASSERT_CAN_READ_PROTOTYPE(dwMemPos, dwMemLength, x, return);
DWORD dwMemPos = 0;
- ASSERT_CAN_READ(2);
+ ASSERT_CAN_READ_OKTPAT(2);
ROWINDEX nRows = CLAMP(BigEndianW(*(uint16 *)(lpStream + dwMemPos)), 1, MAX_PATTERN_ROWS);
dwMemPos += 2;
@@ -119,7 +118,7 @@
m = mrow;
for(CHANNELINDEX nChn = 0; nChn < nChns; nChn++, m++)
{
- ASSERT_CAN_READ(4);
+ ASSERT_CAN_READ_OKTPAT(4);
m->note = lpStream[dwMemPos++];
m->instr = lpStream[dwMemPos++];
int8 fxcmd = lpStream[dwMemPos++];
@@ -263,16 +262,13 @@
}
}
- #undef ASSERT_CAN_READ
+ #undef ASSERT_CAN_READ_OKTPAT
}
bool CSoundFile::ReadOKT(const BYTE *lpStream, const DWORD dwMemLength)
//---------------------------------------------------------------------
{
- #define ASSERT_CAN_READ(x) \
- if( dwMemPos > dwMemLength || x > dwMemLength - dwMemPos ) return false;
-
DWORD dwMemPos = 0;
ASSERT_CAN_READ(8);
@@ -438,6 +434,4 @@
SetModFlag(MSF_COMPATIBLE_PLAY, true);
return true;
-
- #undef ASSERT_CAN_READ
}
Modified: trunk/OpenMPT/soundlib/Load_psm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_psm.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_psm.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -19,7 +19,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#ifdef MODPLUG_TRACKER
#include "../mptrack/moddoc.h"
#endif // MODPLUG_TRACKER
@@ -132,9 +132,6 @@
bool CSoundFile::ReadPSM(const LPCBYTE lpStream, const DWORD dwMemLength)
//-----------------------------------------------------------------------
{
- #define ASSERT_CAN_READ(x) \
- if( dwMemPos > dwMemLength || x > dwMemLength - dwMemPos ) return false;
-
DWORD dwMemPos = 0;
bool bNewFormat = false; // The game "Sinaria" uses a slightly modified PSM structure
@@ -809,8 +806,6 @@
}
return true;
-
- #undef ASSERT_CAN_READ
}
////////////////////////////////
@@ -875,9 +870,6 @@
bool CSoundFile::ReadPSM16(const LPCBYTE lpStream, const DWORD dwMemLength)
//-----------------------------------------------------------------------
{
- #define ASSERT_CAN_READ(x) \
- if( dwMemPos > dwMemLength || x > dwMemLength - dwMemPos ) return false;
-
DWORD dwMemPos = 0;
ASSERT_CAN_READ(sizeof(PSM16HEADER));
@@ -1210,7 +1202,4 @@
}
return true;
-
- #undef ASSERT_CAN_READ
-
}
Modified: trunk/OpenMPT/soundlib/Load_ptm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_ptm.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_ptm.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -12,7 +12,7 @@
// PTM PolyTracker module loader //
//////////////////////////////////////////////
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -9,8 +9,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
-#include "../mptrack/misc_util.h"
+#include "Loaders.h"
#include "../mptrack/version.h"
#ifdef MODPLUG_TRACKER
#include "../mptrack/moddoc.h"
Modified: trunk/OpenMPT/soundlib/Load_stm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_stm.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_stm.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -8,7 +8,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#pragma warning(disable:4244) //"conversion from 'type1' to 'type2', possible loss of data"
Modified: trunk/OpenMPT/soundlib/Load_ult.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_ult.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_ult.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -7,7 +7,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
enum
{
@@ -33,9 +33,6 @@
STATIC_ASSERT(sizeof(ULT_SAMPLE) >= 64);
#pragma pack()
-#define ASSERT_CAN_READ(x) \
- if( dwMemPos > dwMemLength || x > dwMemLength - dwMemPos ) return false;
-
/* Unhandled effects:
5x1 - do not loop sample (x is unused)
5xC - end loop and finish sample
@@ -147,20 +144,22 @@
static int ReadULTEvent(MODCOMMAND *note, const BYTE *lpStream, DWORD *dwMP, const DWORD dwMemLength)
//---------------------------------------------------------------------------------------------------
{
+ #define ASSERT_CAN_READ_ULTENV(x) ASSERT_CAN_READ_PROTOTYPE(dwMemPos, dwMemLength, x, return 0);
+
DWORD dwMemPos = *dwMP;
uint8 b, repeat = 1;
uint8 cmd1, cmd2; // 1 = vol col, 2 = fx col in the original schismtracker code
uint8 param1, param2;
- ASSERT_CAN_READ(1)
+ ASSERT_CAN_READ_ULTENV(1)
b = lpStream[dwMemPos++];
if (b == 0xFC) // repeat event
{
- ASSERT_CAN_READ(2);
+ ASSERT_CAN_READ_ULTENV(2);
repeat = lpStream[dwMemPos++];
b = lpStream[dwMemPos++];
}
- ASSERT_CAN_READ(4)
+ ASSERT_CAN_READ_ULTENV(4)
note->note = (b > 0 && b < 61) ? b + 36 : NOTE_NONE;
note->instr = lpStream[dwMemPos++];
b = lpStream[dwMemPos++];
@@ -231,6 +230,8 @@
*dwMP = dwMemPos;
return repeat;
+
+ #undef ASSERT_CAN_READ_ULTENV
}
// Functor for postfixing ULT patterns (this is easier than just remembering everything WHILE we're reading the pattern events)
@@ -468,5 +469,3 @@
}
return true;
}
-
-#undef ASSERT_CAN_READ
Modified: trunk/OpenMPT/soundlib/Load_umx.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_umx.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_umx.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -7,7 +7,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#define MODMAGIC_OFFSET (20+31*30+130)
Modified: trunk/OpenMPT/soundlib/Load_wav.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_wav.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_wav.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -8,7 +8,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#ifndef WAVE_FORMAT_EXTENSIBLE
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -7,7 +7,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#include "../mptrack/version.h"
#include "../mptrack/misc_util.h"
Added: trunk/OpenMPT/soundlib/Loaders.h
===================================================================
--- trunk/OpenMPT/soundlib/Loaders.h (rev 0)
+++ trunk/OpenMPT/soundlib/Loaders.h 2010-08-05 11:44:10 UTC (rev 676)
@@ -0,0 +1,17 @@
+/*
+ * Loaders.h
+ * ---------
+ * Purpose: Provide common functions for module loaders
+ * Notes : (currently none)
+ * Authors: OpenMPT Devs
+ *
+ */
+
+#include "Sndfile.h"
+
+// Execute "action" if "request" bytes cannot be read from stream
+#define ASSERT_CAN_READ_PROTOTYPE(position, length, request_bytes, action) \
+ if( position > length || request_bytes > length - position) action;
+
+// "Default" macro for checking if x bytes can be read from stream.
+#define ASSERT_CAN_READ(x) ASSERT_CAN_READ_PROTOTYPE(dwMemPos, dwMemLength, x, return false);
Modified: trunk/OpenMPT/soundlib/load_j2b.cpp
===================================================================
--- trunk/OpenMPT/soundlib/load_j2b.cpp 2010-08-04 22:49:32 UTC (rev 675)
+++ trunk/OpenMPT/soundlib/load_j2b.cpp 2010-08-05 11:44:10 UTC (rev 676)
@@ -11,7 +11,7 @@
*/
#include "stdafx.h"
-#include "sndfile.h"
+#include "Loaders.h"
#ifndef ZLIB_WINAPI
#define ZLIB_WINAPI
#endif // ZLIB_WINAPI
@@ -210,9 +210,7 @@
//--------------------------------------------------------------------------------------------------------------------------------------------
{
// version false = AMFF, true = AM
- #define ASSERT_CAN_READ(x) \
- if( dwMemPos > dwMemLength || x > dwMemLength - dwMemPos ) return false;
-
+
DWORD dwMemPos = 0;
ASSERT_CAN_READ(1);
@@ -346,7 +344,6 @@
return true;
- #undef ASSERT_CAN_READ
}
@@ -443,10 +440,7 @@
bool CSoundFile::ReadAM(const LPCBYTE lpStream, const DWORD dwMemLength)
//----------------------------------------------------------------------
{
- #define ASSERT_CAN_READ(x) \
- if( dwMemPos > dwMemLength || x > dwMemLength - dwMemPos ) return false;
- #define ASSERT_CAN_READ_CHUNK(x) \
- if( dwMemPos > dwChunkEnd || x > dwChunkEnd - dwMemPos ) break;
+ #define ASSERT_CAN_READ_CHUNK(x) ASSERT_CAN_READ_PROTOTYPE(dwMemPos, dwChunkEnd, x, break);
DWORD dwMemPos = 0;
@@ -773,16 +767,12 @@
return true;
- #undef ASSERT_CAN_READ
#undef ASSERT_CAN_READ_CHUNK
}
bool CSoundFile::ReadJ2B(const LPCBYTE lpStream, const DWORD dwMemLength)
//-----------------------------------------------------------------------
{
- #define ASSERT_CAN_READ(x) \
- if( dwMemPos > dwMemLength || x > dwMemLength - dwMemPos ) return false;
-
DWORD dwMemPos = 0;
ASSERT_CAN_READ(sizeof(J2BHEADER));
@@ -816,6 +806,4 @@
delete[] bOutput;
return bResult;
-
- #undef ASSERT_CAN_READ
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-08-04 22:49:38
|
Revision: 675
http://modplug.svn.sourceforge.net/modplug/?rev=675&view=rev
Author: saga-games
Date: 2010-08-04 22:49:32 +0000 (Wed, 04 Aug 2010)
Log Message:
-----------
Created tag for version 1.18.03.00
Added Paths:
-----------
tags/1.18.03.00/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-08-04 14:40:22
|
Revision: 674
http://modplug.svn.sourceforge.net/modplug/?rev=674&view=rev
Author: saga-games
Date: 2010-08-04 14:40:15 +0000 (Wed, 04 Aug 2010)
Log Message:
-----------
credits where credits are due
Modified Paths:
--------------
trunk/OpenMPT/packageTemplate/History.txt
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-08-04 00:38:52 UTC (rev 673)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-08-04 14:40:15 UTC (rev 674)
@@ -89,7 +89,7 @@
[Imp] <Jojo> PSM Loader: Small improvements.
[Fix] <Jojo> MTM Loader: The "beats per track" (means lines per pattern) setting is now taken into account.
[Fix] <Jojo> PSM16 Loader: Since the control channels were muted, tempo commands were ignored, effectively slowing down some PSM16 tracks.
- [Fix] <Jojo> MPTM Saver: When deleting patterns using the treeview, it was possible that Parameter Control Notes were not saved properly anymore.
+ [Fix] <re> MPTM Saver: When deleting patterns using the treeview, it was possible that Parameter Control Notes were not saved properly anymore.
Misc
[New] <Jojo> Experimental "panic" button on the main toolbar. At the moment, it just kills all VSTi and sample voices.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-08-04 00:38:59
|
Revision: 673
http://modplug.svn.sourceforge.net/modplug/?rev=673&view=rev
Author: saga-games
Date: 2010-08-04 00:38:52 +0000 (Wed, 04 Aug 2010)
Log Message:
-----------
[Mod] Updated History.txt
Modified Paths:
--------------
trunk/OpenMPT/packageTemplate/History.txt
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-08-04 00:04:08 UTC (rev 672)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-08-04 00:38:52 UTC (rev 673)
@@ -10,7 +10,7 @@
(tx XYZ): thanks to XYZ for telling us about the bug
-v1.18.03.00 (August 2010, revision 666)
+v1.18.03.00 (August 2010, revision 673)
---------------------------------------
General tab
[Imp] <Jojo> To prevent OpenMPT from hanging while switching between plugins (or switching to the general tab), the preset box is only filled when it gets the focus. This makes working with Synth1 a lot easier, since it has an insane amount of presets... :)
@@ -89,6 +89,7 @@
[Imp] <Jojo> PSM Loader: Small improvements.
[Fix] <Jojo> MTM Loader: The "beats per track" (means lines per pattern) setting is now taken into account.
[Fix] <Jojo> PSM16 Loader: Since the control channels were muted, tempo commands were ignored, effectively slowing down some PSM16 tracks.
+ [Fix] <Jojo> MPTM Saver: When deleting patterns using the treeview, it was possible that Parameter Control Notes were not saved properly anymore.
Misc
[New] <Jojo> Experimental "panic" button on the main toolbar. At the moment, it just kills all VSTi and sample voices.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rel...@us...> - 2010-08-04 00:04:14
|
Revision: 672
http://modplug.svn.sourceforge.net/modplug/?rev=672&view=rev
Author: relabsoluness
Date: 2010-08-04 00:04:08 +0000 (Wed, 04 Aug 2010)
Log Message:
-----------
[Fix] MPTM: PCnotes weren't necessarily loaded for all patterns if module had been saved after some patterns were deleted using treeview.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/patternContainer.cpp
Modified: trunk/OpenMPT/soundlib/patternContainer.cpp
===================================================================
--- trunk/OpenMPT/soundlib/patternContainer.cpp 2010-08-03 22:28:34 UTC (rev 671)
+++ trunk/OpenMPT/soundlib/patternContainer.cpp 2010-08-04 00:04:08 UTC (rev 672)
@@ -110,9 +110,9 @@
for(uint16 i = 0; i < nPatterns; i++) if (patc[i])
{
ssb.WriteItem(patc[i], &i, sizeof(i), &WriteModPattern);
- nCount++;
+ nCount = i + 1;
}
- ssb.WriteItem<uint16>(nCount, "num");
+ ssb.WriteItem<uint16>(nCount, "num"); // Index of last pattern + 1.
ssb.FinishWrite();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-08-03 22:28:40
|
Revision: 671
http://modplug.svn.sourceforge.net/modplug/?rev=671&view=rev
Author: saga-games
Date: 2010-08-03 22:28:34 +0000 (Tue, 03 Aug 2010)
Log Message:
-----------
[Ref] Rewrote pattern/envelope paste code a bit using sscanf. At least pattern pasting is more fool-proof now.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/soundlib/Snd_defs.h
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-08-03 17:34:45 UTC (rev 670)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-08-03 22:28:34 UTC (rev 671)
@@ -1027,13 +1027,13 @@
// Clipboard format:
-// Hdr: "ModPlug Tracker S3M\n"
+// Hdr: "ModPlug Tracker S3M\r\n"
// Full: '|C#401v64A06'
// Reset: '|...........'
// Empty: '| '
// End of row: '\n'
-static LPCSTR lpszClipboardPatternHdr = "ModPlug Tracker %3s\x0D\x0A";
+static LPCSTR lpszClipboardPatternHdr = "ModPlug Tracker %3s\r\n";
bool CModDoc::CopyPattern(PATTERNINDEX nPattern, DWORD dwBeginSel, DWORD dwEndSel)
//--------------------------------------------------------------------------------
@@ -1168,8 +1168,8 @@
p[9] = p[10] = p[11] = ' ';
}
}
- *p++ = 0x0D;
- *p++ = 0x0A;
+ *p++ = '\r';
+ *p++ = '\n';
}
*p = 0;
}
@@ -1197,70 +1197,69 @@
{
const TEMPO spdmax = m_SndFile.GetModSpecifications().speedMax;
const DWORD dwMemSize = GlobalSize(hCpy);
+ CHANNELINDEX ncol = (dwBeginSel & 0xFFFF) >> 3, col;
+ const ROWINDEX startRow = (ROWINDEX)(dwBeginSel >> 16);
+ ROWINDEX nrow = startRow;
+ bool bOk = false;
+ bool bPrepareUndo = true; // prepare pattern for undo next time
+ bool bFirstUndo = true; // for chaining undos (see overflow paste)
+ MODTYPE origFormat = MOD_TYPE_IT; // paste format
+ size_t pos, startPos = 0;
MODCOMMAND *m = m_SndFile.Patterns[nPattern];
- UINT nrow = dwBeginSel >> 16;
- UINT ncol = (dwBeginSel & 0xFFFF) >> 3;
- UINT col;
- bool bS3MCommands = false, bOk = false;
- bool bPrepareUndo = true, bFirstUndo = true;
- MODTYPE origFormat = MOD_TYPE_IT;
- UINT len = 0, startLen;
const bool doOverflowPaste = (CMainFrame::m_dwPatternSetup & PATTERN_OVERFLOWPASTE) && (pasteMode != pm_pasteflood) && (pasteMode != pm_pushforwardpaste);
const bool doITStyleMix = (pasteMode == pm_mixpaste_it);
const bool doMixPaste = ((pasteMode == pm_mixpaste) || doITStyleMix);
ORDERINDEX oCurrentOrder; //jojo.echopaste
- ROWINDEX rTemp, startRow;
+ ROWINDEX rTemp;
PATTERNINDEX pTemp;
GetEditPosition(rTemp, pTemp, oCurrentOrder);
- if ((nrow >= m_SndFile.Patterns[nPattern].GetNumRows()) || (ncol >= m_SndFile.m_nChannels)) goto PasteDone;
+ if ((nrow >= m_SndFile.Patterns[nPattern].GetNumRows()) || (ncol >= m_SndFile.GetNumChannels())) goto PasteDone;
m += nrow * m_SndFile.m_nChannels;
-
+
// Search for signature
- for (;;)
+ for (pos = startPos; p[pos] != 0 && pos < dwMemSize; pos++)
{
- if (len + 11 >= dwMemSize) goto PasteDone;
- char c = p[len++];
- if (!c) goto PasteDone;
- if ((c == 0x0D) && (len > 3))
+ CHAR szFormat[4]; // adjust this if the "%3s" part in the format string changes.
+ if(sscanf(p + pos, lpszClipboardPatternHdr, szFormat) > 0)
{
- if(p[len - 3] == 'I') origFormat = MOD_TYPE_IT;
- if(p[len - 3] == 'P') origFormat = MOD_TYPE_MPT;
- if(p[len - 4] == 'S') origFormat = MOD_TYPE_S3M;
- if(p[len - 3] == 'X') origFormat = MOD_TYPE_XM;
- if(p[len - 3] == 'O') origFormat = MOD_TYPE_MOD;
+ if(!strcmp(szFormat, "S3M")) origFormat = MOD_TYPE_S3M;
+ if(!strcmp(szFormat, "XM")) origFormat = MOD_TYPE_XM;
+ if(!strcmp(szFormat, "IT")) origFormat = MOD_TYPE_IT;
+ if(!strcmp(szFormat, "MPT")) origFormat = MOD_TYPE_MPT;
+ if(!strcmp(szFormat, "MOD")) origFormat = MOD_TYPE_MOD;
+ startPos = pos; // start reading patterns from here
break;
}
}
- bS3MCommands = (origFormat & (MOD_TYPE_IT|MOD_TYPE_MPT|MOD_TYPE_S3M)) != 0 ? true : false;
- bOk = true;
- startLen = len;
- startRow = nrow;
+ const bool bS3MCommands = (origFormat & (MOD_TYPE_IT|MOD_TYPE_MPT|MOD_TYPE_S3M)) != 0 ? true : false;
+ pos = startPos;
while ((nrow < m_SndFile.Patterns[nPattern].GetNumRows()))
{
// Search for column separator or end of paste data
- while ((len + 11 >= dwMemSize) || p[len] != '|')
+ while ((pos + 11 >= dwMemSize) || p[pos] != '|')
{
- if (len + 11 >= dwMemSize || !p[len])
+ if (pos + 11 >= dwMemSize || !p[pos])
{
if((pasteMode == pm_pasteflood) && (nrow != startRow)) // prevent infinite loop with malformed clipboard data
- len = startLen; // paste from beginning
+ pos = startPos; // paste from beginning
else
goto PasteDone;
} else
{
- len++;
+ pos++;
}
}
+ bOk = true;
col = ncol;
// Paste columns
- while ((p[len] == '|') && (len + 11 < dwMemSize))
+ while ((p[pos] == '|') && (pos + 11 < dwMemSize))
{
- LPSTR s = p+len+1;
+ LPSTR s = p+pos+1;
// Check valid paste condition. Paste will be skipped if
// -col is not a valid channelindex or
@@ -1434,7 +1433,7 @@
m_SndFile.ConvertCommand(&(m[col]), origFormat, m_SndFile.m_nType);
}
- len += 12;
+ pos += 12;
col++;
}
// Next row
@@ -1477,8 +1476,8 @@
/////////////////////////////////////////////////////////////////////////////////////////
// Copy/Paste envelope
-static LPCSTR pszEnvHdr = "Modplug Tracker Envelope\x0D\x0A";
-static LPCSTR pszEnvFmt = "%d,%d,%d,%d,%d,%d,%d,%d\x0D\x0A";
+static LPCSTR pszEnvHdr = "Modplug Tracker Envelope\r\n";
+static LPCSTR pszEnvFmt = "%d,%d,%d,%d,%d,%d,%d,%d\r\n";
bool CModDoc::CopyEnvelope(UINT nIns, enmEnvelopeTypes nEnv)
//----------------------------------------------------------
@@ -1492,6 +1491,7 @@
if ((nIns < 1) || (nIns > m_SndFile.m_nInstruments) || (!m_SndFile.Instruments[nIns]) || (!pMainFrm)) return false;
BeginWaitCursor();
pIns = m_SndFile.Instruments[nIns];
+ if(pIns == nullptr) return false;
INSTRUMENTENVELOPE *pEnv = nullptr;
@@ -1513,12 +1513,12 @@
for (UINT i = 0; i < pEnv->nNodes; i++)
{
if (strlen(s) >= sizeof(s)-32) break;
- wsprintf(s+strlen(s), "%d,%d\x0D\x0A", pEnv->Ticks[i], pEnv->Values[i]);
+ wsprintf(s+strlen(s), "%d,%d\r\n", pEnv->Ticks[i], pEnv->Values[i]);
}
//Writing release node
if(strlen(s) < sizeof(s) - 32)
- wsprintf(s+strlen(s), "%u\x0D\x0A", pEnv->nReleaseNode);
+ wsprintf(s+strlen(s), "%u\r\n", pEnv->nReleaseNode);
dwMemSize = strlen(s)+1;
if ((pMainFrm->OpenClipboard()) && ((hCpy = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE, dwMemSize))!=NULL))
@@ -1554,28 +1554,13 @@
MODINSTRUMENT *pIns = m_SndFile.Instruments[nIns];
INSTRUMENTENVELOPE *pEnv = nullptr;
- UINT susBegin=0, susEnd=0, loopBegin=0, loopEnd=0, bSus=0, bLoop=0, bCarry=0, nPoints=0, releaseNode = ENV_RELEASE_NODE_UNSET;
+ UINT susBegin = 0, susEnd = 0, loopBegin = 0, loopEnd = 0, bSus = 0, bLoop = 0, bCarry = 0, nPoints = 0, releaseNode = ENV_RELEASE_NODE_UNSET;
DWORD dwMemSize = GlobalSize(hCpy), dwPos = strlen(pszEnvHdr);
- if ((dwMemSize > dwPos) && (!_strnicmp(p, pszEnvHdr, dwPos-2)))
+ if ((dwMemSize > dwPos) && (!_strnicmp(p, pszEnvHdr, dwPos - 2)))
{
- for (UINT h=0; h<8; h++)
- {
- while ((dwPos < dwMemSize) && ((p[dwPos] < '0') || (p[dwPos] > '9'))) dwPos++;
- if (dwPos >= dwMemSize) break;
- int n = atoi(p+dwPos);
- switch(h)
- {
- case 0: nPoints = n; break;
- case 1: susBegin = n; break;
- case 2: susEnd = n; break;
- case 3: loopBegin = n; break;
- case 4: loopEnd = n; break;
- case 5: bSus = n; break;
- case 6: bLoop = n; break;
- case 7: bCarry = n; break;
- }
- while ((dwPos < dwMemSize) && ((p[dwPos] >= '0') && (p[dwPos] <= '9'))) dwPos++;
- }
+ sscanf(p + dwPos, pszEnvFmt, &nPoints, &susBegin, &susEnd, &loopBegin, &loopEnd, &bSus, &bLoop, &bCarry);
+ while ((dwPos < dwMemSize) && (p[dwPos] != '\r') && (p[dwPos] != '\n')) dwPos++;
+
nPoints = min(nPoints, m_SndFile.GetModSpecifications().envelopePointsMax);
if (susEnd >= nPoints) susEnd = 0;
if (susBegin > susEnd) susBegin = susEnd;
@@ -1612,11 +1597,11 @@
while ((dwPos < dwMemSize) && ((p[dwPos] < '0') || (p[dwPos] > '9'))) dwPos++;
if (dwPos >= dwMemSize) break;
int n2 = atoi(p+dwPos);
- if ((n1 < oldn) || (n1 > 0x3FFF)) n1 = oldn+1;
+ if ((n1 < oldn) || (n1 > ENVELOPE_MAX_LENGTH)) n1 = oldn + 1;
pEnv->Ticks[i] = (WORD)n1;
pEnv->Values[i] = (BYTE)n2;
oldn = n1;
- while ((dwPos < dwMemSize) && (p[dwPos] != 0x0D)) dwPos++;
+ while ((dwPos < dwMemSize) && (p[dwPos] != '\r') && (p[dwPos] != '\n')) dwPos++;
if (dwPos >= dwMemSize) break;
}
Modified: trunk/OpenMPT/mptrack/View_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.cpp 2010-08-03 17:34:45 UTC (rev 670)
+++ trunk/OpenMPT/mptrack/View_ins.cpp 2010-08-03 22:28:34 UTC (rev 671)
@@ -260,7 +260,7 @@
{
int mintick = (nPoint) ? envelope->Ticks[nPoint-1] : 0;
int maxtick = envelope->Ticks[nPoint+1];
- if (nPoint + 1 == (int)envelope->nNodes) maxtick = 16383;
+ if (nPoint + 1 == (int)envelope->nNodes) maxtick = ENVELOPE_MAX_LENGTH;
if (nTick < mintick) nTick = mintick;
if (nTick > maxtick) nTick = maxtick;
if (nTick != envelope->Ticks[nPoint])
@@ -767,7 +767,8 @@
}
- if (windowResized || m_bGridForceRedraw || (cachedScrollPos != m_GridScrollPos) || (speed != (UINT)m_GridSpeed)) {
+ if (windowResized || m_bGridForceRedraw || (cachedScrollPos != m_GridScrollPos) || (speed != (UINT)m_GridSpeed))
+ {
m_GridSpeed = speed;
m_GridScrollPos = cachedScrollPos;
Modified: trunk/OpenMPT/soundlib/Snd_defs.h
===================================================================
--- trunk/OpenMPT/soundlib/Snd_defs.h 2010-08-03 17:34:45 UTC (rev 670)
+++ trunk/OpenMPT/soundlib/Snd_defs.h 2010-08-03 22:28:34 UTC (rev 671)
@@ -172,9 +172,10 @@
#define ENV_FILTER 0x10 // filter env enabled (this has to be combined with ENV_ENABLED in the pitch envelope's flags)
// Envelope value boundaries
-#define ENVELOPE_MIN 0
-#define ENVELOPE_MID 32
-#define ENVELOPE_MAX 64
+#define ENVELOPE_MIN 0 // vertical min value of a point
+#define ENVELOPE_MID 32 // vertical middle line
+#define ENVELOPE_MAX 64 // vertical max value of a point
+#define ENVELOPE_MAX_LENGTH 0x3FFF // max envelope length in ticks. note: this value seems to be conservatively low...
// Flags of 'dF..' datafield in extended instrument properties.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-08-03 17:34:51
|
Revision: 670
http://modplug.svn.sourceforge.net/modplug/?rev=670&view=rev
Author: saga-games
Date: 2010-08-03 17:34:45 +0000 (Tue, 03 Aug 2010)
Log Message:
-----------
[Mod] Updated DE_jojo.mkb
Modified Paths:
--------------
trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb
Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb
===================================================================
--- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2010-08-03 15:25:56 UTC (rev 669)
+++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2010-08-03 17:34:45 UTC (rev 670)
@@ -54,10 +54,14 @@
//----( General Context [bottom] (1) )------------
//----( Pattern Context [bottom] (2) )------------
+2:1017:4:34:5 //Jump down by measure: Alt+BILD-NACH-UNTEN (KeyDown|KeyHold)
+2:1018:4:33:5 //Jump up by measure: Alt+BILD-NACH-OBEN (KeyDown|KeyHold)
2:1338:0:34:5 //Jump down by beat: BILD-NACH-UNTEN (KeyDown|KeyHold)
2:1339:0:33:5 //Jump up by beat: BILD-NACH-OBEN (KeyDown|KeyHold)
-2:1340:6:34:5 //Snap down to beat: Ctrl+Alt+BILD-NACH-UNTEN (KeyDown|KeyHold)
-2:1341:6:33:5 //Snap up to beat: Ctrl+Alt+BILD-NACH-OBEN (KeyDown|KeyHold)
+2:1019:6:34:5 //Snap down to measure: Ctrl+Alt+BILD-NACH-UNTEN (KeyDown|KeyHold)
+2:1020:6:33:5 //Snap up to measure: Ctrl+Alt+BILD-NACH-OBEN (KeyDown|KeyHold)
+2:1340:2:34:5 //Snap down to beat: Ctrl+BILD-NACH-UNTEN (KeyDown|KeyHold)
+2:1341:2:33:5 //Snap up to beat: Ctrl+BILD-NACH-OBEN (KeyDown|KeyHold)
2:1038:0:40:5 //Navigate down by 1 row: NACH-UNTEN (KeyDown|KeyHold)
2:1039:0:38:5 //Navigate up by 1 row: NACH-OBEN (KeyDown|KeyHold)
2:1040:0:37:5 //Navigate left: NACH-LINKS (KeyDown|KeyHold)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-08-03 15:26:04
|
Revision: 669
http://modplug.svn.sourceforge.net/modplug/?rev=669&view=rev
Author: saga-games
Date: 2010-08-03 15:25:56 +0000 (Tue, 03 Aug 2010)
Log Message:
-----------
[Ref] Moved ITP loader/saver to its own file, as it does not really have something in common with the IT loader.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/mptrack.vcproj
trunk/OpenMPT/mptrack/mptrack_08.vcproj
trunk/OpenMPT/soundlib/IT_DEFS.H
trunk/OpenMPT/soundlib/Load_it.cpp
Added Paths:
-----------
trunk/OpenMPT/soundlib/Load_itp.cpp
Modified: trunk/OpenMPT/mptrack/mptrack.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.vcproj 2010-08-02 21:40:13 UTC (rev 668)
+++ trunk/OpenMPT/mptrack/mptrack.vcproj 2010-08-03 15:25:56 UTC (rev 669)
@@ -289,6 +289,9 @@
RelativePath="..\soundlib\Load_it.cpp">
</File>
<File
+ RelativePath="..\soundlib\Load_itp.cpp">
+ </File>
+ <File
RelativePath="..\soundlib\load_j2b.cpp">
</File>
<File
Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj
===================================================================
--- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2010-08-02 21:40:13 UTC (rev 668)
+++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2010-08-03 15:25:56 UTC (rev 669)
@@ -389,6 +389,10 @@
>
</File>
<File
+ RelativePath="..\soundlib\Load_itp.cpp"
+ >
+ </File>
+ <File
RelativePath="..\soundlib\load_j2b.cpp"
>
</File>
Modified: trunk/OpenMPT/soundlib/IT_DEFS.H
===================================================================
--- trunk/OpenMPT/soundlib/IT_DEFS.H 2010-08-02 21:40:13 UTC (rev 668)
+++ trunk/OpenMPT/soundlib/IT_DEFS.H 2010-08-03 15:25:56 UTC (rev 669)
@@ -140,9 +140,6 @@
extern BYTE autovibit2xm[8];
extern BYTE autovibxm2it[8];
-#define ITP_VERSION 0x00000102 // v1.02
-#define ITP_FILE_ID 0x2e697470 // .itp ASCII
-
#define IT_CHBI 0x49424843 // "CHBI" magic bytes in the IT header to identify ChibiTracker
enum IT_ReaderBitMasks
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-08-02 21:40:13 UTC (rev 668)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-08-03 15:25:56 UTC (rev 669)
@@ -8,11 +8,6 @@
*/
#include "stdafx.h"
-// -> CODE#0023
-// -> DESC="IT project files (.itp)"
-#include "../mptrack/mptrack.h"
-#include "../mptrack/mainfrm.h"
-// -! NEW_FEATURE#0023
#include "sndfile.h"
#include "it_defs.h"
#include "tuningcollection.h"
@@ -46,8 +41,6 @@
*/
-
-
static bool AreNonDefaultTuningsUsed(CSoundFile& sf)
//--------------------------------------------------
{
@@ -456,448 +449,7 @@
return returnVal; //return offset
}
-// -> CODE#0023
-// -> DESC="IT project files (.itp)"
-bool CSoundFile::ReadITProject(LPCBYTE lpStream, const DWORD dwMemLength)
-//-----------------------------------------------------------------------
-{
- UINT i,n,nsmp;
- DWORD id,len,size;
- DWORD streamPos = 0;
- DWORD version;
- // Macro used to make sure that given amount of bytes can be read.
- // Returns FALSE from this function if reading is not possible.
- #define ASSERT_CAN_READ(x) \
- if( streamPos > dwMemLength || x > dwMemLength - streamPos ) return false;
-
- ASSERT_CAN_READ(12);
-
-// Check file ID
-
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- if(id != ITP_FILE_ID) return false;
- streamPos += sizeof(DWORD);
-
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- version = id;
- streamPos += sizeof(DWORD);
-
- m_nType = MOD_TYPE_IT;
-
-// Song name
-
- // name string length
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- len = id;
- streamPos += sizeof(DWORD);
-
- // name string
- ASSERT_CAN_READ(len);
- if (len<=sizeof(m_szNames[0])) {
- memcpy(m_szNames[0],lpStream+streamPos,len);
- streamPos += len;
- m_szNames[0][sizeof(m_szNames[0])-1] = '\0';
- }
- else return false;
-
-// Song comments
-
- // comment string length
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- streamPos += sizeof(DWORD);
- if(id > uint16_max) return false;
-
- // allocate and copy comment string
- ASSERT_CAN_READ(id);
- if(id > 0)
- {
- ReadMessage(lpStream + streamPos, id - 1, leCR);
- }
- streamPos += id;
-
-// Song global config
- ASSERT_CAN_READ(5*4);
-
- // m_dwSongFlags
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- m_dwSongFlags = id;
- streamPos += sizeof(DWORD);
-
- if(!(m_dwSongFlags & SONG_ITPROJECT)) return false;
-
- // m_nDefaultGlobalVolume
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- m_nDefaultGlobalVolume = id;
- streamPos += sizeof(DWORD);
-
- // m_nSamplePreAmp
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- m_nSamplePreAmp = id;
- streamPos += sizeof(DWORD);
-
- // m_nDefaultSpeed
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- m_nDefaultSpeed = id;
- streamPos += sizeof(DWORD);
-
- // m_nDefaultTempo
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- m_nDefaultTempo = id;
- streamPos += sizeof(DWORD);
-
-// Song channels data
- ASSERT_CAN_READ(2*4);
-
- // m_nChannels
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- m_nChannels = id;
- streamPos += sizeof(DWORD);
- if(m_nChannels > 127) return false;
-
- // channel name string length (=MAX_CHANNELNAME)
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- len = id;
- streamPos += sizeof(DWORD);
- if(len > MAX_CHANNELNAME) return false;
-
- // Channels' data
- for(i=0; i<m_nChannels; i++){
- ASSERT_CAN_READ(3*4 + len);
-
- // ChnSettings[i].nPan
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- ChnSettings[i].nPan = id;
- streamPos += sizeof(DWORD);
-
- // ChnSettings[i].dwFlags
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- ChnSettings[i].dwFlags = id;
- streamPos += sizeof(DWORD);
-
- // ChnSettings[i].nVolume
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- ChnSettings[i].nVolume = id;
- streamPos += sizeof(DWORD);
-
- // ChnSettings[i].szName
- memcpy(&ChnSettings[i].szName[0],lpStream+streamPos,len);
- SetNullTerminator(ChnSettings[i].szName);
- streamPos += len;
- }
-
-// Song mix plugins
- // size of mix plugins data
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- streamPos += sizeof(DWORD);
-
- // mix plugins
- ASSERT_CAN_READ(id);
- streamPos += LoadMixPlugins(lpStream+streamPos, id);
-
-// Song midi config
-
- // midi cfg data length
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- streamPos += sizeof(DWORD);
-
- // midi cfg
- ASSERT_CAN_READ(id);
- if (id<=sizeof(m_MidiCfg)) {
- memcpy(&m_MidiCfg,lpStream+streamPos,id);
- streamPos += id;
- }
-
-// Song Instruments
-
- // m_nInstruments
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- m_nInstruments = id;
- if(m_nInstruments > MAX_INSTRUMENTS) return false;
- streamPos += sizeof(DWORD);
-
- // path string length (=_MAX_PATH)
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- len = id;
- if(len > _MAX_PATH) return false;
- streamPos += sizeof(DWORD);
-
- // instruments' paths
- for(i=0; i<m_nInstruments; i++){
- ASSERT_CAN_READ(len);
- memcpy(&m_szInstrumentPath[i][0],lpStream+streamPos,len);
- SetNullTerminator(m_szInstrumentPath[i]);
- streamPos += len;
- }
-
-// Song Orders
-
- // size of order array (=MAX_ORDERS)
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- size = id;
- if(size > MAX_ORDERS) return false;
- streamPos += sizeof(DWORD);
-
- // order data
- ASSERT_CAN_READ(size);
- Order.ReadAsByte(lpStream+streamPos, size, dwMemLength-streamPos);
- streamPos += size;
-
-
-
-// Song Patterns
-
- ASSERT_CAN_READ(3*4);
- // number of patterns (=MAX_PATTERNS)
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- size = id;
- streamPos += sizeof(DWORD);
- if(size > MAX_PATTERNS) return false;
-
- // m_nPatternNames
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- m_nPatternNames = id;
- streamPos += sizeof(DWORD);
-
- // pattern name string length (=MAX_PATTERNNAME)
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- len = id;
- streamPos += sizeof(DWORD);
-
- // m_lpszPatternNames
- if (len<=MAX_PATTERNNAME && m_nPatternNames<=MAX_PATTERNS)
- {
- m_lpszPatternNames = new char[m_nPatternNames * len];
- ASSERT_CAN_READ(m_nPatternNames * len);
- memcpy(&m_lpszPatternNames[0],lpStream+streamPos,m_nPatternNames * len);
- }
- else return false;
-
- streamPos += m_nPatternNames * len;
-
- // modcommand data length
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- n = id;
- if(n != 6) return false;
- streamPos += sizeof(DWORD);
-
- for(UINT npat=0; npat<size; npat++){
-
- // Free pattern if not empty
- if(Patterns[npat]) { FreePattern(Patterns[npat]); Patterns[npat] = NULL; }
-
- // Patterns[npat].GetNumRows()
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- if(id > MAX_PATTERN_ROWS) return false;
- Patterns[npat].Resize(id, false);
- streamPos += sizeof(DWORD);
-
- // Try to allocate & read only sized patterns
- if(Patterns[npat].GetNumRows()){
-
- // Allocate pattern
- if(Patterns.Insert(npat, Patterns[npat].GetNumRows())){
- streamPos += m_nChannels * Patterns[npat].GetNumRows() * n;
- continue;
- }
-
- // Pattern data
- long datasize = m_nChannels * Patterns[npat].GetNumRows() * n;
- //if (streamPos+datasize<=dwMemLength) {
- if(Patterns[npat].ReadITPdata(lpStream, streamPos, datasize, dwMemLength))
- {
- ErrorBox(IDS_ERR_FILEOPEN, NULL);
- return false;
- }
- //memcpy(Patterns[npat],lpStream+streamPos,datasize);
- //streamPos += datasize;
- //}
- }
- }
-
-// Load embeded samples
-
- ITSAMPLESTRUCT pis;
-
- // Read original number of samples
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- if(id > MAX_SAMPLES) return false;
- m_nSamples = id;
- streamPos += sizeof(DWORD);
-
- // Read number of embeded samples
- ASSERT_CAN_READ(4);
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- if(id > MAX_SAMPLES) return false;
- n = id;
- streamPos += sizeof(DWORD);
-
- // Read samples
- for(i=0; i<n; i++){
-
- ASSERT_CAN_READ(4 + sizeof(ITSAMPLESTRUCT) + 4);
-
- // Sample id number
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- nsmp = id;
- streamPos += sizeof(DWORD);
-
- if(nsmp < 1 || nsmp >= MAX_SAMPLES)
- return false;
-
- // Sample struct
- memcpy(&pis,lpStream+streamPos,sizeof(ITSAMPLESTRUCT));
- streamPos += sizeof(ITSAMPLESTRUCT);
-
- // Sample length
- memcpy(&id,lpStream+streamPos,sizeof(DWORD));
- len = id;
- streamPos += sizeof(DWORD);
- if(streamPos >= dwMemLength || len > dwMemLength - streamPos) return false;
-
- // Copy sample struct data
- if(pis.id == 0x53504D49)
- {
- MODSAMPLE *pSmp = &Samples[nsmp];
- memcpy(pSmp->filename, pis.filename, 12);
- pSmp->uFlags = 0;
- pSmp->nLength = 0;
- pSmp->nLoopStart = pis.loopbegin;
- pSmp->nLoopEnd = pis.loopend;
- pSmp->nSustainStart = pis.susloopbegin;
- pSmp->nSustainEnd = pis.susloopend;
- pSmp->nC5Speed = pis.C5Speed;
- if(!pSmp->nC5Speed) pSmp->nC5Speed = 8363;
- if(pis.C5Speed < 256) pSmp->nC5Speed = 256;
- pSmp->nVolume = pis.vol << 2;
- if(pSmp->nVolume > 256) pSmp->nVolume = 256;
- pSmp->nGlobalVol = pis.gvl;
- if(pSmp->nGlobalVol > 64) pSmp->nGlobalVol = 64;
- if(pis.flags & 0x10) pSmp->uFlags |= CHN_LOOP;
- if(pis.flags & 0x20) pSmp->uFlags |= CHN_SUSTAINLOOP;
- if(pis.flags & 0x40) pSmp->uFlags |= CHN_PINGPONGLOOP;
- if(pis.flags & 0x80) pSmp->uFlags |= CHN_PINGPONGSUSTAIN;
- pSmp->nPan = (pis.dfp & 0x7F) << 2;
- if(pSmp->nPan > 256) pSmp->nPan = 256;
- if(pis.dfp & 0x80) pSmp->uFlags |= CHN_PANNING;
- pSmp->nVibType = autovibit2xm[pis.vit & 7];
- pSmp->nVibRate = pis.vis;
- pSmp->nVibDepth = pis.vid & 0x7F;
- pSmp->nVibSweep = pis.vir;
- if(pis.length){
- pSmp->nLength = pis.length;
- if (pSmp->nLength > MAX_SAMPLE_LENGTH) pSmp->nLength = MAX_SAMPLE_LENGTH;
- UINT flags = (pis.cvt & 1) ? RS_PCM8S : RS_PCM8U;
- if (pis.flags & 2){
- flags += 5;
- if (pis.flags & 4) flags |= RSF_STEREO;
- pSmp->uFlags |= CHN_16BIT;
- }
- else{
- if (pis.flags & 4) flags |= RSF_STEREO;
- }
- // Read sample data
- ReadSample(&Samples[nsmp], flags, (LPSTR)(lpStream+streamPos), len);
- streamPos += len;
- memcpy(m_szNames[nsmp], pis.name, 26);
- }
- }
- }
-
-// Load instruments
-
- CMappedFile f;
- LPBYTE lpFile;
-
- for(i=0; i<m_nInstruments; i++){
-
- if(m_szInstrumentPath[i][0] == '\0' || !f.Open(m_szInstrumentPath[i])) continue;
-
- len = f.GetLength();
- lpFile = f.Lock(len);
- if(!lpFile) { f.Close(); continue; }
-
- ReadInstrumentFromFile(i+1, lpFile, len);
- f.Unlock();
- f.Close();
- }
-
-// Extra info data
-
- __int32 fcode = 0;
- LPCBYTE ptr = lpStream + min(streamPos, dwMemLength);
-
- if (streamPos <= dwMemLength - 4) {
- fcode = (*((__int32 *)ptr));
- }
-
-// Embed instruments' header [v1.01]
- if(version >= 0x00000101 && m_dwSongFlags & SONG_ITPEMBEDIH && fcode == 'EBIH'){
- // jump embeded instrument header tag
- ptr += sizeof(__int32);
-
- // set first instrument's header as current
- i = 1;
-
- // parse file
- while( uintptr_t(ptr - lpStream) <= dwMemLength - 4 && i <= m_nInstruments )
- {
-
- fcode = (*((__int32 *)ptr)); // read field code
-
- switch( fcode )
- {
- case 'MPTS': goto mpts; //:) // reached end of instrument headers
- case 'SEP@': case 'MPTX':
- ptr += sizeof(__int32); // jump code
- i++; // switch to next instrument
- break;
-
- default:
- ptr += sizeof(__int32); // jump field code
- ReadExtendedInstrumentProperty(Instruments[i], fcode, ptr, lpStream + dwMemLength);
- break;
- }
- }
- }
-
- //HACK: if we fail on i <= m_nInstruments above, arrive here without having set fcode as appropriate,
- // hence the code duplication.
- if ( (uintptr_t)(ptr - lpStream) <= dwMemLength - 4 )
- {
- fcode = (*((__int32 *)ptr));
- }
-
- // Song extensions
-mpts:
- if( fcode == 'MPTS' )
- LoadExtendedSongProperties(MOD_TYPE_IT, ptr, lpStream, dwMemLength);
-
- m_nMaxPeriod = 0xF000;
- m_nMinPeriod = 8;
-
- if(m_dwLastSavedWithVersion < MAKE_VERSION_NUMERIC(1, 17, 2, 50))
- {
- SetModFlag(MSF_COMPATIBLE_PLAY, false);
- SetModFlag(MSF_MIDICC_BUGEMULATION, true);
- SetModFlag(MSF_OLDVOLSWING, true);
- }
-
- return true;
-
- #undef ASSERT_CAN_READ
-}
-// -! NEW_FEATURE#0023
-
bool CSoundFile::ReadIT(const LPCBYTE lpStream, const DWORD dwMemLength)
//----------------------------------------------------------------------
{
@@ -1570,259 +1122,7 @@
//#define SAVEITTIMESTAMP
#pragma warning(disable:4100)
-// -> CODE#0023
-// -> DESC="IT project files (.itp)"
-bool CSoundFile::SaveITProject(LPCSTR lpszFileName)
-//-------------------------------------------------
-{
-// Check song type
- if(!(m_dwSongFlags & SONG_ITPROJECT)) return false;
-
- UINT i,j = 0;
- for(i = 0 ; i < m_nInstruments ; i++) { if(m_szInstrumentPath[i][0] != '\0' || !Instruments[i+1]) j++; }
- if(m_nInstruments && j != m_nInstruments) return false;
-
-// Open file
-
- FILE *f;
-
- if((!lpszFileName) || ((f = fopen(lpszFileName, "wb")) == NULL)) return false;
-
-
-// File ID
-
- DWORD id = ITP_FILE_ID;
- fwrite(&id, 1, sizeof(id), f);
-
- id = ITP_VERSION;
- fwrite(&id, 1, sizeof(id), f);
-
-// Song name
-
- // name string length
- id = 27;
- fwrite(&id, 1, sizeof(id), f);
-
- // song name
- fwrite(&m_szNames[0], 1, 27, f);
-
-// Song comments
-
- // comment string length
- id = m_lpszSongComments ? strlen(m_lpszSongComments)+1 : 0;
- fwrite(&id, 1, sizeof(id), f);
-
- // comment string
- if(m_lpszSongComments) fwrite(&m_lpszSongComments[0], 1, strlen(m_lpszSongComments)+1, f);
-
-// Song global config
-
- id = m_dwSongFlags;
- fwrite(&id, 1, sizeof(id), f);
- id = m_nDefaultGlobalVolume;
- fwrite(&id, 1, sizeof(id), f);
- id = m_nSamplePreAmp;
- fwrite(&id, 1, sizeof(id), f);
- id = m_nDefaultSpeed;
- fwrite(&id, 1, sizeof(id), f);
- id = m_nDefaultTempo;
- fwrite(&id, 1, sizeof(id), f);
-
-// Song channels data
-
- // number of channels
- id = m_nChannels;
- fwrite(&id, 1, sizeof(id), f);
-
- // channel name string length
- id = MAX_CHANNELNAME;
- fwrite(&id, 1, sizeof(id), f);
-
- // channel config data
- for(i=0; i<m_nChannels; i++){
- id = ChnSettings[i].nPan;
- fwrite(&id, 1, sizeof(id), f);
- id = ChnSettings[i].dwFlags;
- fwrite(&id, 1, sizeof(id), f);
- id = ChnSettings[i].nVolume;
- fwrite(&id, 1, sizeof(id), f);
- fwrite(&ChnSettings[i].szName[0], 1, MAX_CHANNELNAME, f);
- }
-
-// Song mix plugins
-
- // mix plugins data length
- id = SaveMixPlugins(NULL, TRUE);
- fwrite(&id, 1, sizeof(id), f);
-
- // mix plugins data
- SaveMixPlugins(f, FALSE);
-
-// Song midi config
-
- // midi cfg data length
- id = sizeof(MODMIDICFG);
- fwrite(&id, 1, sizeof(id), f);
-
- // midi cfg
- fwrite(&m_MidiCfg, 1, sizeof(MODMIDICFG), f);
-
-// Song Instruments
-
- // number of instruments
- id = m_nInstruments;
- fwrite(&id, 1, sizeof(id), f);
-
- // path name string length
- id = _MAX_PATH;
- fwrite(&id, 1, sizeof(id), f);
-
- // instruments' path
- for(i=0; i<m_nInstruments; i++) fwrite(&m_szInstrumentPath[i][0], 1, _MAX_PATH, f);
-
-// Song Orders
-
- // order array size
- id = Order.size();
- fwrite(&id, 1, sizeof(id), f);
-
- // order array
- Order.WriteAsByte(f, MAX_ORDERS);
-
-// Song Patterns
-
- // number of patterns
- id = MAX_PATTERNS;
- fwrite(&id, 1, sizeof(id), f);
-
- // number of pattern name strings
- id = m_nPatternNames;
- fwrite(&id, 1, sizeof(id), f);
-
- // length of a pattern name string
- id = MAX_PATTERNNAME;
- fwrite(&id, 1, sizeof(id), f);
- fwrite(&m_lpszPatternNames[0], 1, m_nPatternNames * MAX_PATTERNNAME, f);
-
- // modcommand data length
- id = sizeof(MODCOMMAND_ORIGINAL);
- fwrite(&id, 1, sizeof(id), f);
-
- // patterns data content
- for(UINT npat=0; npat<MAX_PATTERNS; npat++){
- // pattern size (number of rows)
- id = Patterns[npat] ? Patterns[npat].GetNumRows() : 0;
- fwrite(&id, 1, sizeof(id), f);
- // pattern data
- 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
-
- // Write original number of samples
- id = m_nSamples;
- fwrite(&id, 1, sizeof(id), f);
-
- BOOL sampleUsed[MAX_SAMPLES];
- memset(&sampleUsed,0,MAX_SAMPLES * sizeof(BOOL));
-
- // Mark samples used in instruments
- for(i=0; i<m_nInstruments; i++){
- if(Instruments[i+1]){
- MODINSTRUMENT *p = Instruments[i+1];
- for(j=0; j<128; j++) if(p->Keyboard[j]) sampleUsed[p->Keyboard[j]] = TRUE;
- }
- }
-
- // Count samples not used in any instrument
- i = 0;
- for(j=1; j<=m_nSamples; j++) if(!sampleUsed[j] && Samples[j].pSample) i++;
-
- id = i;
- fwrite(&id, 1, sizeof(id), f);
-
- // Write samples not used in any instrument
- ITSAMPLESTRUCT itss;
- for(UINT nsmp=1; nsmp<=m_nSamples; nsmp++){
- if(!sampleUsed[nsmp] && Samples[nsmp].pSample){
-
- MODSAMPLE *psmp = &Samples[nsmp];
- memset(&itss, 0, sizeof(itss));
- memcpy(itss.filename, psmp->filename, 12);
- memcpy(itss.name, m_szNames[nsmp], 26);
-
- itss.id = 0x53504D49;
- itss.gvl = (BYTE)psmp->nGlobalVol;
- itss.flags = 0x00;
-
- if(psmp->uFlags & CHN_LOOP) itss.flags |= 0x10;
- if(psmp->uFlags & CHN_SUSTAINLOOP) itss.flags |= 0x20;
- if(psmp->uFlags & CHN_PINGPONGLOOP) itss.flags |= 0x40;
- if(psmp->uFlags & CHN_PINGPONGSUSTAIN) itss.flags |= 0x80;
- itss.C5Speed = psmp->nC5Speed;
- if (!itss.C5Speed) itss.C5Speed = 8363;
- itss.length = psmp->nLength;
- itss.loopbegin = psmp->nLoopStart;
- itss.loopend = psmp->nLoopEnd;
- itss.susloopbegin = psmp->nSustainStart;
- itss.susloopend = psmp->nSustainEnd;
- itss.vol = psmp->nVolume >> 2;
- itss.dfp = psmp->nPan >> 2;
- itss.vit = autovibxm2it[psmp->nVibType & 7];
- itss.vis = min(psmp->nVibRate, 64);
- itss.vid = min(psmp->nVibDepth, 32);
- itss.vir = min(psmp->nVibSweep, 255); //(psmp->nVibSweep < 64) ? psmp->nVibSweep * 4 : 255;
- if (psmp->uFlags & CHN_PANNING) itss.dfp |= 0x80;
- if ((psmp->pSample) && (psmp->nLength)) itss.cvt = 0x01;
- UINT flags = RS_PCM8S;
-
- if(psmp->uFlags & CHN_STEREO){
- flags = RS_STPCM8S;
- itss.flags |= 0x04;
- }
- if(psmp->uFlags & CHN_16BIT){
- itss.flags |= 0x02;
- flags = (psmp->uFlags & CHN_STEREO) ? RS_STPCM16S : RS_PCM16S;
- }
-
- id = nsmp;
- fwrite(&id, 1, sizeof(id), f);
-
- itss.samplepointer = NULL;
- fwrite(&itss, 1, sizeof(ITSAMPLESTRUCT), f);
-
- id = WriteSample(NULL, psmp, flags);
- fwrite(&id, 1, sizeof(id), f);
- WriteSample(f, psmp, flags);
- }
- }
-
-// Embed instruments' header [v1.01]
-
- if(m_dwSongFlags & SONG_ITPEMBEDIH){
- // embeded instrument header tag
- __int32 code = 'EBIH';
- fwrite(&code, 1, sizeof(__int32), f);
-
- // instruments' header
- for(i=0; i<m_nInstruments; i++){
- if(Instruments[i+1]) WriteInstrumentHeaderStruct(Instruments[i+1], f);
- // write separator tag
- code = 'SEP@';
- fwrite(&code, 1, sizeof(__int32), f);
- }
- }
-
- SaveExtendedSongProperties(f);
-
-// Close file
- fclose(f);
- return true;
-}
-// -! NEW_FEATURE#0023
-
bool CSoundFile::SaveIT(LPCSTR lpszFileName, UINT nPacking)
//-------------------------------------------------------------
{
Added: trunk/OpenMPT/soundlib/Load_itp.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_itp.cpp (rev 0)
+++ trunk/OpenMPT/soundlib/Load_itp.cpp 2010-08-03 15:25:56 UTC (rev 669)
@@ -0,0 +1,729 @@
+/*
+ * Load_itp.cpp
+ * ------------
+ * Purpose: Load and save Impulse Tracker Project (ITP) files.
+ * Notes : Despite its name, ITP is not a format supported by Impulse Tracker.
+ * In fact, it's a format invented by the OpenMPT team to allow people to work
+ * with the IT format, but keeping the instrument files with big samples separate
+ * from the pattern data, to keep the work files small and handy.
+ * The current design of the format is quite flawed, though, so expect this to
+ * change in the (far?) future.
+ * Authors: OpenMPT Devs
+ *
+ */
+
+#include "stdafx.h"
+#include "Sndfile.h"
+#include "IT_DEFS.H"
+#include "../mptrack/mptrack.h"
+#include "../mptrack/version.h"
+
+
+#define ITP_VERSION 0x00000102 // v1.02
+#define ITP_FILE_ID 0x2e697470 // .itp ASCII
+
+
+bool CSoundFile::ReadITProject(LPCBYTE lpStream, const DWORD dwMemLength)
+//-----------------------------------------------------------------------
+{
+ UINT i,n,nsmp;
+ DWORD id,len,size;
+ DWORD streamPos = 0;
+ DWORD version;
+
+ // Macro used to make sure that given amount of bytes can be read.
+ // Returns FALSE from this function if reading is not possible.
+ #define ASSERT_CAN_READ(x) \
+ if( streamPos > dwMemLength || x > dwMemLength - streamPos ) return false;
+
+ ASSERT_CAN_READ(12);
+
+ // Check file ID
+
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ if(id != ITP_FILE_ID) return false;
+ streamPos += sizeof(DWORD);
+
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ version = id;
+ streamPos += sizeof(DWORD);
+
+ m_nType = MOD_TYPE_IT;
+
+ // Song name
+
+ // name string length
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ len = id;
+ streamPos += sizeof(DWORD);
+
+ // name string
+ ASSERT_CAN_READ(len);
+ if (len<=sizeof(m_szNames[0])) {
+ memcpy(m_szNames[0],lpStream+streamPos,len);
+ streamPos += len;
+ m_szNames[0][sizeof(m_szNames[0])-1] = '\0';
+ }
+ else return false;
+
+ // Song comments
+
+ // comment string length
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ streamPos += sizeof(DWORD);
+ if(id > uint16_max) return false;
+
+ // allocate and copy comment string
+ ASSERT_CAN_READ(id);
+ if(id > 0)
+ {
+ ReadMessage(lpStream + streamPos, id - 1, leCR);
+ }
+ streamPos += id;
+
+ // Song global config
+ ASSERT_CAN_READ(5*4);
+
+ // m_dwSongFlags
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ m_dwSongFlags = id;
+ streamPos += sizeof(DWORD);
+
+ if(!(m_dwSongFlags & SONG_ITPROJECT)) return false;
+
+ // m_nDefaultGlobalVolume
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ m_nDefaultGlobalVolume = id;
+ streamPos += sizeof(DWORD);
+
+ // m_nSamplePreAmp
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ m_nSamplePreAmp = id;
+ streamPos += sizeof(DWORD);
+
+ // m_nDefaultSpeed
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ m_nDefaultSpeed = id;
+ streamPos += sizeof(DWORD);
+
+ // m_nDefaultTempo
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ m_nDefaultTempo = id;
+ streamPos += sizeof(DWORD);
+
+ // Song channels data
+ ASSERT_CAN_READ(2*4);
+
+ // m_nChannels
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ m_nChannels = (CHANNELINDEX)id;
+ streamPos += sizeof(DWORD);
+ if(m_nChannels > 127) return false;
+
+ // channel name string length (=MAX_CHANNELNAME)
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ len = id;
+ streamPos += sizeof(DWORD);
+ if(len > MAX_CHANNELNAME) return false;
+
+ // Channels' data
+ for(i=0; i<m_nChannels; i++){
+ ASSERT_CAN_READ(3*4 + len);
+
+ // ChnSettings[i].nPan
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ ChnSettings[i].nPan = id;
+ streamPos += sizeof(DWORD);
+
+ // ChnSettings[i].dwFlags
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ ChnSettings[i].dwFlags = id;
+ streamPos += sizeof(DWORD);
+
+ // ChnSettings[i].nVolume
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ ChnSettings[i].nVolume = id;
+ streamPos += sizeof(DWORD);
+
+ // ChnSettings[i].szName
+ memcpy(&ChnSettings[i].szName[0],lpStream+streamPos,len);
+ SetNullTerminator(ChnSettings[i].szName);
+ streamPos += len;
+ }
+
+ // Song mix plugins
+ // size of mix plugins data
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ streamPos += sizeof(DWORD);
+
+ // mix plugins
+ ASSERT_CAN_READ(id);
+ streamPos += LoadMixPlugins(lpStream+streamPos, id);
+
+ // Song midi config
+
+ // midi cfg data length
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ streamPos += sizeof(DWORD);
+
+ // midi cfg
+ ASSERT_CAN_READ(id);
+ if (id<=sizeof(m_MidiCfg)) {
+ memcpy(&m_MidiCfg,lpStream+streamPos,id);
+ streamPos += id;
+ }
+
+ // Song Instruments
+
+ // m_nInstruments
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ m_nInstruments = (INSTRUMENTINDEX)id;
+ if(m_nInstruments > MAX_INSTRUMENTS) return false;
+ streamPos += sizeof(DWORD);
+
+ // path string length (=_MAX_PATH)
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ len = id;
+ if(len > _MAX_PATH) return false;
+ streamPos += sizeof(DWORD);
+
+ // instruments' paths
+ for(i=0; i<m_nInstruments; i++){
+ ASSERT_CAN_READ(len);
+ memcpy(&m_szInstrumentPath[i][0],lpStream+streamPos,len);
+ SetNullTerminator(m_szInstrumentPath[i]);
+ streamPos += len;
+ }
+
+ // Song Orders
+
+ // size of order array (=MAX_ORDERS)
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ size = id;
+ if(size > MAX_ORDERS) return false;
+ streamPos += sizeof(DWORD);
+
+ // order data
+ ASSERT_CAN_READ(size);
+ Order.ReadAsByte(lpStream+streamPos, size, dwMemLength-streamPos);
+ streamPos += size;
+
+
+
+ // Song Patterns
+
+ ASSERT_CAN_READ(3*4);
+ // number of patterns (=MAX_PATTERNS)
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ size = id;
+ streamPos += sizeof(DWORD);
+ if(size > MAX_PATTERNS) return false;
+
+ // m_nPatternNames
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ m_nPatternNames = id;
+ streamPos += sizeof(DWORD);
+
+ // pattern name string length (=MAX_PATTERNNAME)
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ len = id;
+ streamPos += sizeof(DWORD);
+
+ // m_lpszPatternNames
+ if (len<=MAX_PATTERNNAME && m_nPatternNames<=MAX_PATTERNS)
+ {
+ m_lpszPatternNames = new char[m_nPatternNames * len];
+ ASSERT_CAN_READ(m_nPatternNames * len);
+ memcpy(&m_lpszPatternNames[0],lpStream+streamPos,m_nPatternNames * len);
+ }
+ else return false;
+
+ streamPos += m_nPatternNames * len;
+
+ // modcommand data length
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ n = id;
+ if(n != 6) return false;
+ streamPos += sizeof(DWORD);
+
+ for(PATTERNINDEX npat=0; npat<size; npat++)
+ {
+ // Free pattern if not empty
+ if(Patterns[npat]) { FreePattern(Patterns[npat]); Patterns[npat] = NULL; }
+
+ // Patterns[npat].GetNumRows()
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ if(id > MAX_PATTERN_ROWS) return false;
+ Patterns[npat].Resize(id, false);
+ streamPos += sizeof(DWORD);
+
+ // Try to allocate & read only sized patterns
+ if(Patterns[npat].GetNumRows()){
+
+ // Allocate pattern
+ if(Patterns.Insert(npat, Patterns[npat].GetNumRows())){
+ streamPos += m_nChannels * Patterns[npat].GetNumRows() * n;
+ continue;
+ }
+
+ // Pattern data
+ long datasize = m_nChannels * Patterns[npat].GetNumRows() * n;
+ //if (streamPos+datasize<=dwMemLength) {
+ if(Patterns[npat].ReadITPdata(lpStream, streamPos, datasize, dwMemLength))
+ {
+ ErrorBox(IDS_ERR_FILEOPEN, NULL);
+ return false;
+ }
+ //memcpy(Patterns[npat],lpStream+streamPos,datasize);
+ //streamPos += datasize;
+ //}
+ }
+ }
+
+ // Load embeded samples
+
+ ITSAMPLESTRUCT pis;
+
+ // Read original number of samples
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ if(id > MAX_SAMPLES) return false;
+ m_nSamples = (SAMPLEINDEX)id;
+ streamPos += sizeof(DWORD);
+
+ // Read number of embeded samples
+ ASSERT_CAN_READ(4);
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ if(id > MAX_SAMPLES) return false;
+ n = id;
+ streamPos += sizeof(DWORD);
+
+ // Read samples
+ for(i=0; i<n; i++){
+
+ ASSERT_CAN_READ(4 + sizeof(ITSAMPLESTRUCT) + 4);
+
+ // Sample id number
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ nsmp = id;
+ streamPos += sizeof(DWORD);
+
+ if(nsmp < 1 || nsmp >= MAX_SAMPLES)
+ return false;
+
+ // Sample struct
+ memcpy(&pis,lpStream+streamPos,sizeof(ITSAMPLESTRUCT));
+ streamPos += sizeof(ITSAMPLESTRUCT);
+
+ // Sample length
+ memcpy(&id,lpStream+streamPos,sizeof(DWORD));
+ len = id;
+ streamPos += sizeof(DWORD);
+ if(streamPos >= dwMemLength || len > dwMemLength - streamPos) return false;
+
+ // Copy sample struct data
+ if(pis.id == 0x53504D49)
+ {
+ MODSAMPLE *pSmp = &Samples[nsmp];
+ memcpy(pSmp->filename, pis.filename, 12);
+ pSmp->uFlags = 0;
+ pSmp->nLength = 0;
+ pSmp->nLoopStart = pis.loopbegin;
+ pSmp->nLoopEnd = pis.loopend;
+ pSmp->nSustainStart = pis.susloopbegin;
+ pSmp->nSustainEnd = pis.susloopend;
+ pSmp->nC5Speed = pis.C5Speed;
+ if(!pSmp->nC5Speed) pSmp->nC5Speed = 8363;
+ if(pis.C5Speed < 256) pSmp->nC5Speed = 256;
+ pSmp->nVolume = pis.vol << 2;
+ if(pSmp->nVolume > 256) pSmp->nVolume = 256;
+ pSmp->nGlobalVol = pis.gvl;
+ if(pSmp->nGlobalVol > 64) pSmp->nGlobalVol = 64;
+ if(pis.flags & 0x10) pSmp->uFlags |= CHN_LOOP;
+ if(pis.flags & 0x20) pSmp->uFlags |= CHN_SUSTAINLOOP;
+ if(pis.flags & 0x40) pSmp->uFlags |= CHN_PINGPONGLOOP;
+ if(pis.flags & 0x80) pSmp->uFlags |= CHN_PINGPONGSUSTAIN;
+ pSmp->nPan = (pis.dfp & 0x7F) << 2;
+ if(pSmp->nPan > 256) pSmp->nPan = 256;
+ if(pis.dfp & 0x80) pSmp->uFlags |= CHN_PANNING;
+ pSmp->nVibType = autovibit2xm[pis.vit & 7];
+ pSmp->nVibRate = pis.vis;
+ pSmp->nVibDepth = pis.vid & 0x7F;
+ pSmp->nVibSweep = pis.vir;
+ if(pis.length){
+ pSmp->nLength = pis.length;
+ if (pSmp->nLength > MAX_SAMPLE_LENGTH) pSmp->nLength = MAX_SAMPLE_LENGTH;
+ UINT flags = (pis.cvt & 1) ? RS_PCM8S : RS_PCM8U;
+ if (pis.flags & 2){
+ flags += 5;
+ if (pis.flags & 4) flags |= RSF_STEREO;
+ pSmp->uFlags |= CHN_16BIT;
+ }
+ else{
+ if (pis.flags & 4) flags |= RSF_STEREO;
+ }
+ // Read sample data
+ ReadSample(&Samples[nsmp], flags, (LPSTR)(lpStream+streamPos), len);
+ streamPos += len;
+ memcpy(m_szNames[nsmp], pis.name, 26);
+ }
+ }
+ }
+
+ // Load instruments
+
+ CMappedFile f;
+ LPBYTE lpFile;
+
+ for(INSTRUMENTINDEX i = 0; i < m_nInstruments; i++)
+ {
+
+ if(m_szInstrumentPath[i][0] == '\0' || !f.Open(m_szInstrumentPath[i])) continue;
+
+ len = f.GetLength();
+ lpFile = f.Lock(len);
+ if(!lpFile) { f.Close(); continue; }
+
+ ReadInstrumentFromFile(i+1, lpFile, len);
+ f.Unlock();
+ f.Close();
+ }
+
+ // Extra info data
+
+ __int32 fcode = 0;
+ LPCBYTE ptr = lpStream + min(streamPos, dwMemLength);
+
+ if (streamPos <= dwMemLength - 4) {
+ fcode = (*((__int32 *)ptr));
+ }
+
+ // Embed instruments' header [v1.01]
+ if(version >= 0x00000101 && m_dwSongFlags & SONG_ITPEMBEDIH && fcode == 'EBIH'){
+ // jump embeded instrument header tag
+ ptr += sizeof(__int32);
+
+ // set first instrument's header as current
+ i = 1;
+
+ // parse file
+ while( uintptr_t(ptr - lpStream) <= dwMemLength - 4 && i <= m_nInstruments )
+ {
+
+ fcode = (*((__int32 *)ptr)); // read field code
+
+ switch( fcode )
+ {
+ case 'MPTS': goto mpts; //:) // reached end of instrument headers
+ case 'SEP@': case 'MPTX':
+ ptr += sizeof(__int32); // jump code
+ i++; // switch to next instrument
+ break;
+
+ default:
+ ptr += sizeof(__int32); // jump field code
+ ReadExtendedInstrumentProperty(Instruments[i], fcode, ptr, lpStream + dwMemLength);
+ break;
+ }
+ }
+ }
+
+ //HACK: if we fail on i <= m_nInstruments above, arrive here without having set fcode as appropriate,
+ // hence the code duplication.
+ if ( (uintptr_t)(ptr - lpStream) <= dwMemLength - 4 )
+ {
+ fcode = (*((__int32 *)ptr));
+ }
+
+ // Song extensions
+mpts:
+ if( fcode == 'MPTS' )
+ LoadExtendedSongProperties(MOD_TYPE_IT, ptr, lpStream, dwMemLength);
+
+ m_nMaxPeriod = 0xF000;
+ m_nMinPeriod = 8;
+
+ if(m_dwLastSavedWithVersion < MAKE_VERSION_NUMERIC(1, 17, 2, 50))
+ {
+ SetModFlag(MSF_COMPATIBLE_PLAY, false);
+ SetModFlag(MSF_MIDICC_BUGEMULATION, true);
+ SetModFlag(MSF_OLDVOLSWING, true);
+ }
+
+ return true;
+
+ #undef ASSERT_CAN_READ
+}
+
+
+#ifndef MODPLUG_NO_FILESAVE
+
+bool CSoundFile::SaveITProject(LPCSTR lpszFileName)
+//-------------------------------------------------
+{
+ // Check song type
+
+ if(!(m_dwSongFlags & SONG_ITPROJECT)) return false;
+
+ UINT i,j = 0;
+ for(i = 0 ; i < m_nInstruments ; i++) { if(m_szInstrumentPath[i][0] != '\0' || !Instruments[i+1]) j++; }
+ if(m_nInstruments && j != m_nInstruments) return false;
+
+ // Open file
+
+ FILE *f;
+
+ if((!lpszFileName) || ((f = fopen(lpszFileName, "wb")) == NULL)) return false;
+
+
+ // File ID
+
+ DWORD id = ITP_FILE_ID;
+ fwrite(&id, 1, sizeof(id), f);
+
+ id = ITP_VERSION;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // Song name
+
+ // name string length
+ id = 27;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // song name
+ fwrite(&m_szNames[0], 1, 27, f);
+
+ // Song comments
+
+ // comment string length
+ id = m_lpszSongComments ? strlen(m_lpszSongComments)+1 : 0;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // comment string
+ if(m_lpszSongComments) fwrite(&m_lpszSongComments[0], 1, strlen(m_lpszSongComments)+1, f);
+
+ // Song global config
+
+ id = m_dwSongFlags;
+ fwrite(&id, 1, sizeof(id), f);
+ id = m_nDefaultGlobalVolume;
+ fwrite(&id, 1, sizeof(id), f);
+ id = m_nSamplePreAmp;
+ fwrite(&id, 1, sizeof(id), f);
+ id = m_nDefaultSpeed;
+ fwrite(&id, 1, sizeof(id), f);
+ id = m_nDefaultTempo;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // Song channels data
+
+ // number of channels
+ id = m_nChannels;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // channel name string length
+ id = MAX_CHANNELNAME;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // channel config data
+ for(i=0; i<m_nChannels; i++){
+ id = ChnSettings[i].nPan;
+ fwrite(&id, 1, sizeof(id), f);
+ id = ChnSettings[i].dwFlags;
+ fwrite(&id, 1, sizeof(id), f);
+ id = ChnSettings[i].nVolume;
+ fwrite(&id, 1, sizeof(id), f);
+ fwrite(&ChnSettings[i].szName[0], 1, MAX_CHANNELNAME, f);
+ }
+
+ // Song mix plugins
+
+ // mix plugins data length
+ id = SaveMixPlugins(NULL, TRUE);
+ fwrite(&id, 1, sizeof(id), f);
+
+ // mix plugins data
+ SaveMixPlugins(f, FALSE);
+
+ // Song midi config
+
+ // midi cfg data length
+ id = sizeof(MODMIDICFG);
+ fwrite(&id, 1, sizeof(id), f);
+
+ // midi cfg
+ fwrite(&m_MidiCfg, 1, sizeof(MODMIDICFG), f);
+
+ // Song Instruments
+
+ // number of instruments
+ id = m_nInstruments;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // path name string length
+ id = _MAX_PATH;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // instruments' path
+ for(i=0; i<m_nInstruments; i++) fwrite(&m_szInstrumentPath[i][0], 1, _MAX_PATH, f);
+
+ // Song Orders
+
+ // order array size
+ id = Order.size();
+ fwrite(&id, 1, sizeof(id), f);
+
+ // order array
+ Order.WriteAsByte(f, MAX_ORDERS);
+
+ // Song Patterns
+
+ // number of patterns
+ id = MAX_PATTERNS;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // number of pattern name strings
+ id = m_nPatternNames;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // length of a pattern name string
+ id = MAX_PATTERNNAME;
+ fwrite(&id, 1, sizeof(id), f);
+ fwrite(&m_lpszPatternNames[0], 1, m_nPatternNames * MAX_PATTERNNAME, f);
+
+ // modcommand data length
+ id = sizeof(MODCOMMAND_ORIGINAL);
+ fwrite(&id, 1, sizeof(id), f);
+
+ // patterns data content
+ for(UINT npat=0; npat<MAX_PATTERNS; npat++){
+ // pattern size (number of rows)
+ id = Patterns[npat] ? Patterns[npat].GetNumRows() : 0;
+ fwrite(&id, 1, sizeof(id), f);
+ // pattern data
+ 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
+
+ // Write original number of samples
+ id = m_nSamples;
+ fwrite(&id, 1, sizeof(id), f);
+
+ vector<bool> sampleUsed(m_nSamples, false);
+
+ // Mark samples used in instruments
+ for(i=0; i<m_nInstruments; i++)
+ {
+ if(Instruments[i + 1] != nullptr)
+ {
+ MODINSTRUMENT *p = Instruments[i + 1];
+ for(j = 0; j < 128; j++)
+ {
+ if(p->Keyboard[j] > 0 && p->Keyboard[j] <= m_nSamples)
+ sampleUsed[p->Keyboard[j] - 1] = true;
+ }
+ }
+ }
+
+ // Count samples not used in any instrument
+ i = 0;
+ for(j = 1; j <= m_nSamples; j++)
+ if(!sampleUsed[j - 1] && Samples[j].pSample) i++;
+
+ id = i;
+ fwrite(&id, 1, sizeof(id), f);
+
+ // Write samples not used in any instrument (help, this looks like duplicate code!)
+ ITSAMPLESTRUCT itss;
+ for(UINT nsmp=1; nsmp<=m_nSamples; nsmp++)
+ {
+ if(!sampleUsed[nsmp - 1] && Samples[nsmp].pSample)
+ {
+
+ MODSAMPLE *psmp = &Samples[nsmp];
+ memset(&itss, 0, sizeof(itss));
+ memcpy(itss.filename, psmp->filename, 12);
+ memcpy(itss.name, m_szNames[nsmp], 26);
+
+ itss.id = 0x53504D49;
+ itss.gvl = (BYTE)psmp->nGlobalVol;
+ itss.flags = 0x00;
+
+ if(psmp->uFlags & CHN_LOOP) itss.flags |= 0x10;
+ if(psmp->uFlags & CHN_SUSTAINLOOP) itss.flags |= 0x20;
+ if(psmp->uFlags & CHN_PINGPONGLOOP) itss.flags |= 0x40;
+ if(psmp->uFlags & CHN_PINGPONGSUSTAIN) itss.flags |= 0x80;
+ itss.C5Speed = psmp->nC5Speed;
+ if (!itss.C5Speed) itss.C5Speed = 8363;
+ itss.length = psmp->nLength;
+ itss.loopbegin = psmp->nLoopStart;
+ itss.loopend = psmp->nLoopEnd;
+ itss.susloopbegin = psmp->nSustainStart;
+ itss.susloopend = psmp->nSustainEnd;
+ itss.vol = (BYTE)(psmp->nVolume >> 2);
+ itss.dfp = (BYTE)(psmp->nPan >> 2);
+ itss.vit = autovibxm2it[psmp->nVibType & 7];
+ itss.vis = min(psmp->nVibRate, 64);
+ itss.vid = min(psmp->nVibDepth, 32);
+ itss.vir = min(psmp->nVibSweep, 255); //(psmp->nVibSweep < 64) ? psmp->nVibSweep * 4 : 255;
+ if (psmp->uFlags & CHN_PANNING) itss.dfp |= 0x80;
+ if ((psmp->pSample) && (psmp->nLength)) itss.cvt = 0x01;
+ UINT flags = RS_PCM8S;
+
+ if(psmp->uFlags & CHN_STEREO)
+ {
+ flags = RS_STPCM8S;
+ itss.flags |= 0x04;
+ }
+ if(psmp->uFlags & CHN_16BIT)
+ {
+ itss.flags |= 0x02;
+ flags = (psmp->uFlags & CHN_STEREO) ? RS_STPCM16S : RS_PCM16S;
+ }
+
+ id = nsmp;
+ fwrite(&id, 1, sizeof(id), f);
+
+ itss.samplepointer = NULL;
+ fwrite(&itss, 1, sizeof(ITSAMPLESTRUCT), f);
+
+ id = WriteSample(NULL, psmp, flags);
+ fwrite(&id, 1, sizeof(id), f);
+ WriteSample(f, psmp, flags);
+ }
+ }
+
+ // Embed instruments' header [v1.01]
+
+ if(m_dwSongFlags & SONG_ITPEMBEDIH){
+ // embeded instrument header tag
+ __int32 code = 'EBIH';
+ fwrite(&code, 1, sizeof(__int32), f);
+
+ // instruments' header
+ for(i=0; i<m_nInstruments; i++){
+ if(Instruments[i+1]) WriteInstrumentHeaderStruct(Instruments[i+1], f);
+ // write separator tag
+ code = 'SEP@';
+ fwrite(&code, 1, sizeof(__int32), f);
+ }
+ }
+
+ SaveExtendedSongProperties(f);
+
+ // Close file
+ fclose(f);
+ return true;
+}
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-08-02 21:40:19
|
Revision: 668
http://modplug.svn.sourceforge.net/modplug/?rev=668&view=rev
Author: saga-games
Date: 2010-08-02 21:40:13 +0000 (Mon, 02 Aug 2010)
Log Message:
-----------
[Imp] Removed warning when converting from MPTM to another format (the possibility of losing data is always there, and there's a log for that anyway). Instrument tunings are now also removed properly when converting from MPTM.
[Fix] Channel names in AMS files (Extreme's Tracker) are now loaded properly.
[Ref] Some changes here and there.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/soundlib/Load_ams.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/Message.cpp
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-08-01 22:20:31 UTC (rev 667)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-08-02 21:40:13 UTC (rev 668)
@@ -460,7 +460,7 @@
if(m_SndFile.instrumentModified[i]) { unsavedInstrument = true; break; }
}
- if(unsavedInstrument && ::MessageBox(NULL,"Do you want to save modified instruments ?",NULL,MB_ICONQUESTION | MB_YESNO | MB_APPLMODAL) == IDYES){
+ if(unsavedInstrument && ::MessageBox(NULL,"Do you want to save modified instruments?",NULL,MB_ICONQUESTION | MB_YESNO | MB_APPLMODAL) == IDYES){
for(INSTRUMENTINDEX i = 0 ; i < m_SndFile.m_nInstruments ; i++){
if(m_SndFile.m_szInstrumentPath[i][0] != '\0'){
@@ -2042,7 +2042,8 @@
double bpm = CMainFrame::GetMainFrame()->GetApproxBPM();
- switch(m_SndFile.m_nTempoMode) {
+ switch(m_SndFile.m_nTempoMode)
+ {
case tempo_mode_alternative:
Message.Format("Using alternative tempo interpretation.\n\nAssuming:\n. %d ticks per second\n. %d ticks per row\n. %d rows per beat\nthe tempo is approximately: %.20g BPM",
m_SndFile.m_nMusicTempo, m_SndFile.m_nMusicSpeed, m_SndFile.m_nRowsPerBeat, bpm);
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2010-08-01 22:20:31 UTC (rev 667)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2010-08-02 21:40:13 UTC (rev 668)
@@ -218,8 +218,8 @@
// operations
public:
- BOOL ChangeModType(MODTYPE wType);
- BOOL ChangeNumChannels(UINT nNewChannels, const bool showCancelInRemoveDlg = true);
+ bool ChangeModType(MODTYPE wType);
+ bool ChangeNumChannels(UINT nNewChannels, const bool showCancelInRemoveDlg = true);
BOOL ConvertInstrumentsToSamples();
UINT RemovePlugs(const bool (&keepMask)[MAX_MIXPLUGINS]);
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-08-01 22:20:31 UTC (rev 667)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-08-02 21:40:13 UTC (rev 668)
@@ -19,8 +19,6 @@
static char THIS_FILE[] = __FILE__;
#endif
-#define str_mptm_conversion_warning GetStrI18N(_TEXT("Conversion from mptm to any other moduletype may makes certain features unavailable and is not guaranteed to work properly. Do the conversion anyway?"))
-
const size_t Pow10Table[10] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000};
// Return D'th digit(character) of given value.
@@ -37,7 +35,7 @@
//////////////////////////////////////////////////////////////////////
// Module type conversion
-BOOL CModDoc::ChangeModType(MODTYPE nNewType)
+bool CModDoc::ChangeModType(MODTYPE nNewType)
//-------------------------------------------
{
CHAR s[256];
@@ -50,10 +48,11 @@
// This is because ITP is a HACK and doesn't genuinely change m_nType,
// but uses flages instead.
ChangeFileExtension(nNewType);
- return TRUE;
+ return true;
}
- if(nNewType == nOldType) return TRUE;
+ if(nNewType == nOldType)
+ return true;
const bool oldTypeIsMOD = (nOldType == MOD_TYPE_MOD), oldTypeIsXM = (nOldType == MOD_TYPE_XM),
oldTypeIsS3M = (nOldType == MOD_TYPE_S3M), oldTypeIsIT = (nOldType == MOD_TYPE_IT),
@@ -70,40 +69,38 @@
const CModSpecifications& specs = m_SndFile.GetModSpecifications(nNewType);
- if(oldTypeIsMPT)
- {
- if(::MessageBox(NULL, str_mptm_conversion_warning, 0, MB_YESNO) != IDYES)
- return FALSE;
+ /*
+ Incomplete list of MPTm-only features and extensions in the old formats:
- /*
- Incomplete list of MPTm-only features and extensions in the old formats:
+ Features only available for MPTm:
+ -User definable tunings.
+ -Extended pattern range
+ -Extended sequence
+ -Multiple sequences ("songs")
+ -Pattern-specific time signatures
+ -Pattern effects :xy, S7D, S7E
+ -Long instrument envelopes
+ -Envelope release node (this was previously also usable in the IT format, but is deprecated in that format)
- Features only available for MPTm:
- -User definable tunings.
- -Extended pattern range
- -Extended sequence
- -Multiple sequences
+ Extended features in IT/XM/S3M/MOD(not all listed below are available in all of those formats):
+ -plugs
+ -Extended ranges for
+ -sample count
+ -instrument count
+ -pattern count
+ -sequence size
+ -Row count
+ -channel count
+ -tempo limits
+ -Extended sample/instrument properties.
+ -MIDI mapping directives
+ -Versioninfo
+ -channel names
+ -pattern names
+ -Alternative tempomodes
+ -For more info, see e.g. SaveExtendedSongProperties(), SaveExtendedInstrumentProperties()
+ */
- Extended features in IT/XM/S3M/MOD(not all listed below are available in all of those formats):
- -plugs
- -Extended ranges for
- -sample count
- -instrument count
- -pattern count
- -sequence size
- -Row count
- -channel count
- -tempo limits
- -Extended sample/instrument properties.
- -MIDI mapping directives
- -Versioninfo
- -channel names
- -pattern names
- -Alternative tempomodes
- -For more info, see e.g. SaveExtendedSongProperties(), SaveExtendedInstrumentProperties()
- */
- }
-
// Check if conversion to 64 rows is necessary
for (UINT ipat=0; ipat<m_SndFile.Patterns.Size(); ipat++)
{
@@ -114,7 +111,7 @@
if (::MessageBox(NULL,
"This operation will convert all instruments to samples,\n"
"and resize all patterns to 64 rows.\n"
- "Do you want to continue?", "Warning", MB_YESNO | MB_ICONQUESTION) != IDYES) return FALSE;
+ "Do you want to continue?", "Warning", MB_YESNO | MB_ICONQUESTION) != IDYES) return false;
BeginWaitCursor();
BEGIN_CRITICAL();
// Converting instruments to samples
@@ -278,7 +275,7 @@
if (oldTypeIsIT_MPT && newTypeIsXM)
{
bool bBrokenNoteMap = false, bBrokenSustainLoop = false;
- for(INSTRUMENTINDEX nIns = 1; nIns <= m_SndFile.m_nInstruments; nIns++)
+ for(INSTRUMENTINDEX nIns = 1; nIns <= m_SndFile.GetNumInstruments(); nIns++)
{
MODINSTRUMENT *pIns = m_SndFile.Instruments[nIns];
if (pIns)
@@ -314,6 +311,24 @@
if (bBrokenSustainLoop) AddToLog("WARNING: Sustain loops were converted to sustain points.\n");
}
+ // Instrument tunings
+ if(oldTypeIsMPT)
+ {
+ bool bFirstWarn = true;
+ for(INSTRUMENTINDEX nIns = 1; nIns <= m_SndFile.GetNumInstruments(); nIns++)
+ {
+ if(m_SndFile.Instruments[nIns] != nullptr && m_SndFile.Instruments[nIns]->pTuning != nullptr)
+ {
+ m_SndFile.Instruments[nIns]->SetTuning(nullptr);
+ if(bFirstWarn)
+ {
+ AddToLog("WARNING: Instrument tunings will be lost!\n");
+ bFirstWarn = false;
+ }
+ }
+ }
+ }
+
if(newTypeIsMOD)
{
// Not supported in MOD format
@@ -396,7 +411,7 @@
GetSampleUndo()->ClearUndo();
UpdateAllViews(NULL, HINT_MODTYPE | HINT_MODGENERAL);
EndWaitCursor();
- return TRUE;
+ return true;
}
// Trim envelopes and remove release nodes.
@@ -437,7 +452,7 @@
// Change the number of channels
-BOOL CModDoc::ChangeNumChannels(UINT nNewChannels, const bool showCancelInRemoveDlg)
+bool CModDoc::ChangeNumChannels(UINT nNewChannels, const bool showCancelInRemoveDlg)
//----------------------------------------------------------------------------------
{
const CHANNELINDEX maxChans = m_SndFile.GetModSpecifications().channelsMax;
@@ -446,10 +461,10 @@
CString error;
error.Format("Error: Max number of channels for this file type is %d", maxChans);
::AfxMessageBox(error, MB_OK|MB_ICONEXCLAMATION);
- return FALSE;
+ return false;
}
- if (nNewChannels == m_SndFile.m_nChannels) return FALSE;
+ if (nNewChannels == m_SndFile.m_nChannels) return false;
if (nNewChannels < m_SndFile.m_nChannels)
{
UINT nChnToRemove = 0;
@@ -466,7 +481,7 @@
CRemoveChannelsDlg rem(&m_SndFile, nChnToRemove, showCancelInRemoveDlg);
CheckUnusedChannels(rem.m_bChnMask, nFound);
- if (rem.DoModal() != IDOK) return FALSE;
+ if (rem.DoModal() != IDOK) return false;
// Removing selected channels
RemoveChannels(rem.m_bChnMask);
@@ -483,7 +498,7 @@
{
END_CRITICAL();
AddToLog("ERROR: Not enough memory to create new channels!\nPattern Data is corrupted!\n");
- return FALSE;
+ return false;
}
for (UINT j=0; j<m_SndFile.Patterns[i].GetNumRows(); j++)
{
@@ -507,7 +522,7 @@
SetModified();
GetPatternUndo()->ClearUndo();
UpdateAllViews(NULL, HINT_MODTYPE);
- return TRUE;
+ return true;
}
Modified: trunk/OpenMPT/soundlib/Load_ams.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_ams.cpp 2010-08-01 22:20:31 UTC (rev 667)
+++ trunk/OpenMPT/soundlib/Load_ams.cpp 2010-08-02 21:40:13 UTC (rev 668)
@@ -139,7 +139,7 @@
BYTE chnnamlen = lpStream[dwMemPos++];
if ((chnnamlen) && (chnnamlen < MAX_CHANNELNAME))
{
- memcpy(ChnSettings[cNam].szName, lpStream + dwMemPos + 1, chnnamlen);
+ memcpy(ChnSettings[cNam].szName, lpStream + dwMemPos, chnnamlen);
SpaceToNullStringFixed(ChnSettings[cNam].szName, chnnamlen);
}
dwMemPos += chnnamlen;
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-08-01 22:20:31 UTC (rev 667)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-08-02 21:40:13 UTC (rev 668)
@@ -380,7 +380,7 @@
insfile[iSmp] = ((DWORD)LittleEndianW(*((LPWORD)(s+0x0E)))) << 4;
insfile[iSmp] += ((DWORD)(BYTE)s[0x0D]) << 20;
- if (insfile[iSmp] > dwMemLength) insfile[iSmp] &= 0xFFFF;
+ if (insfile[iSmp] > dwMemLength) insfile[iSmp] &= 0xFFFF; // wtf? whose idea was this?
if(Samples[iSmp].nLoopEnd < 2)
Samples[iSmp].nLoopStart = Samples[iSmp].nLoopEnd = 0;
Modified: trunk/OpenMPT/soundlib/Message.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Message.cpp 2010-08-01 22:20:31 UTC (rev 667)
+++ trunk/OpenMPT/soundlib/Message.cpp 2010-08-02 21:40:13 UTC (rev 668)
@@ -151,7 +151,7 @@
// [in] data: pointer to the data in memory that is going to be read
// [in] length: number of characters that should be read, not including a possible trailing null terminator (it is automatically appended).
// [in] lineLength: The fixed length of a line.
-// [in] lineEndingLength: The padding space between two fikxed lines. (there could for example be a null char after every line)
+// [in] lineEndingLength: The padding space between two fixed lines. (there could for example be a null char after every line)
// [in] pTextConverter: Pointer to a callback function which can be used to pre-process the read characters, if necessary (nullptr otherwise).
// [out] returns true on success.
bool CSoundFile::ReadFixedLineLengthMessage(const BYTE *data, const size_t length, const size_t lineLength, const size_t lineEndingLength, void (*pTextConverter)(char &))
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-08-01 22:20:31 UTC (rev 667)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-08-02 21:40:13 UTC (rev 668)
@@ -972,7 +972,7 @@
// [in] data: pointer to the data in memory that is going to be read
// [in] length: number of characters that should be read, not including a possible trailing null terminator (it is automatically appended).
// [in] lineLength: The fixed length of a line.
- // [in] lineEndingLength: The padding space between two fikxed lines. (there could for example be a null char after every line)
+ // [in] lineEndingLength: The padding space between two fixed lines. (there could for example be a null char after every line)
// [in] pTextConverter: Pointer to a callback function which can be used to pre-process the read characters, if necessary (nullptr otherwise).
// [out] returns true on success.
bool ReadFixedLineLengthMessage(const BYTE *data, const size_t length, const size_t lineLength, const size_t lineEndingLength, void (*pTextConverter)(char &) = nullptr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-08-01 22:20:38
|
Revision: 667
http://modplug.svn.sourceforge.net/modplug/?rev=667&view=rev
Author: saga-games
Date: 2010-08-01 22:20:31 +0000 (Sun, 01 Aug 2010)
Log Message:
-----------
[Mod] Updated FR_mpt_(legovitch).mkb
Modified Paths:
--------------
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_(legovitch).mkb
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-08-01 14:18:25 UTC (rev 666)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-08-01 22:20:31 UTC (rev 667)
@@ -96,6 +96,7 @@
[Mod] <Jojo> In the mod type dialog, the "misc flags" can now be toggled using check buttons instead of an edit field.
[Mod] <Jojo> Various file loaders / savers: A new logging mechanism is used to display only one message box with errors and warnings instead of many message boxes.
[Mod] <Jojo> Updated DE_jojo.mkb to include new shortcuts, remapped a few others (for IT-style).
+ [Mod] <Jojo> Updated FR_mpt_(legovitch).mkb.
[Fix] <Jojo> Colour Setup: Some colours in the MPT default colour scheme were not set up properly when switching between presets.
Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_(legovitch).mkb
===================================================================
--- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_(legovitch).mkb 2010-08-01 14:18:25 UTC (rev 666)
+++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_(legovitch).mkb 2010-08-01 22:20:31 UTC (rev 667)
@@ -23,6 +23,7 @@
0:1362:1:45:1 //Paste: Shift+INS (KeyDown)
0:1363:6:86:1 //Mix Paste: Ctrl+Alt+V (KeyDown)
0:1793:7:86:1 //Paste Flood: Shift+Ctrl+Alt+V (KeyDown)
+0:1820:5:86:1 //Push Forward Paste: Shift+Alt+V (KeyDown)
0:1364:2:53:1 //SelectAll: Ctrl+( (KeyDown)
0:1365:2:70:1 //Find: Ctrl+F (KeyDown)
0:1366:6:70:1 //Find Next: Ctrl+Alt+F (KeyDown)
@@ -212,6 +213,7 @@
5:1229:0:55:1 //Set volume digit 7: \xE8 (KeyDown)
5:1229:0:103:1 //Set volume digit 7: 7 (PAVE NUM.) (KeyDown)
5:1230:0:56:1 //Set volume digit 8: _ (KeyDown)
+5:1230:0:104:1 //Set volume digit 8: 8 (PAVE NUM.) (KeyDown)
5:1231:0:57:1 //Set volume digit 9: \xE7 (KeyDown)
5:1231:0:105:1 //Set volume digit 9: 9 (PAVE NUM.) (KeyDown)
5:1232:0:86:1 //Vol command - volume: V (KeyDown)
@@ -227,12 +229,11 @@
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)
+6:1295:0:191:1 //FX combined note delay and note cut: : (KeyDown)
6:1666:6:51:1 //FX parameter extension command: Ctrl+Alt+" (KeyDown)
//----( Pattern Context [bottom] - Param Col (7) )------------
@@ -310,6 +311,8 @@
13:1783:2:34:1 //Plugin preset forward jump: Ctrl+PG.SUIV (KeyDown)
13:1765:6:82:1 //Randomize plugin parameters: Ctrl+Alt+R (KeyDown)
13:1839:6:80:1 //Toggle parameter recording: Ctrl+Alt+P (KeyDown)
+13:1840:6:75:1 //Pass key presses to plugin: Ctrl+Alt+K (KeyDown)
+13:1841:6:66:1 //Bypass plugin: Ctrl+Alt+B (KeyDown)
//----( General Context [top] (14) )------------
@@ -318,6 +321,13 @@
//----( Sample Context [top] (16) )------------
//----( Instrument Context [top] (17) )------------
+17:1851:2:68:1 //Duplicate instrument: Ctrl+D (KeyDown)
+17:1850:2:69:1 //Edit sample map: Ctrl+E (KeyDown)
+17:1849:6:69:1 //Edit current sample: Ctrl+Alt+E (KeyDown)
+17:1843:2:65:1 //Transpose +1 (note map): Ctrl+A (KeyDown)
+17:1842:2:81:1 //Transpose -1 (note map): Ctrl+Q (KeyDown)
+17:1845:6:65:1 //Transpose +12 (note map): Ctrl+Alt+A (KeyDown)
+17:1844:6:81:1 //Transpose -12 (note map): Ctrl+Alt+Q (KeyDown)
//----( Comments Context [top] (18) )------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-08-01 14:18:32
|
Revision: 666
http://modplug.svn.sourceforge.net/modplug/?rev=666&view=rev
Author: saga-games
Date: 2010-08-01 14:18:25 +0000 (Sun, 01 Aug 2010)
Log Message:
-----------
[Fix] Colour Setup: Some colours in the MPT default colour scheme were not set up properly when switching between presets.
[Imp] Instrument Editor: When pasting an envelope with a release node, it's now ignored in formats that don't support it.
[Imp] Sample Editor: Reduced change of a conflict when using the shift key while drawing samples.
[Mod] Invert loop (.MOD effect) is now ignored on 16-bit samples (only important during editing, since .MODs can only contain 8-bit samples anyway)
[Mod] In the mod type dialog, the "misc flags" can now be toggled using check buttons instead of an edit field. Should be a lot more intuitive.
[Mod] Updated panic button bitmap.
[Mod] Updated history.txt
[Mod] OpenMPT: Version is now 1.18.03.00 (release version)
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/Moptions.cpp
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/mptrack/dlg_misc.h
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/mptrack/res/MAINBAR.BMP
trunk/OpenMPT/mptrack/resource.h
trunk/OpenMPT/mptrack/version.h
trunk/OpenMPT/packageTemplate/History.txt
trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html
trunk/OpenMPT/soundlib/Snd_fx.cpp
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-07-29 13:43:09 UTC (rev 665)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-08-01 14:18:25 UTC (rev 666)
@@ -1609,7 +1609,8 @@
if(dwPos < dwMemSize)
{
BYTE r = static_cast<BYTE>(atoi(p + dwPos));
- if(r == 0 || r >= nPoints) r = ENV_RELEASE_NODE_UNSET;
+ if(r == 0 || r >= nPoints || !m_SndFile.GetModSpecifications().hasReleaseNode)
+ r = ENV_RELEASE_NODE_UNSET;
pEnv->nReleaseNode = r;
}
}
Modified: trunk/OpenMPT/mptrack/Moptions.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moptions.cpp 2010-07-29 13:43:09 UTC (rev 665)
+++ trunk/OpenMPT/mptrack/Moptions.cpp 2010-08-01 14:18:25 UTC (rev 666)
@@ -399,6 +399,7 @@
CustomColors[MODCOLOR_TEXTCURROW] = RGB(0x00, 0x00, 0x00);
CustomColors[MODCOLOR_BACKSELECTED] = RGB(0x00, 0x00, 0x00);
CustomColors[MODCOLOR_TEXTSELECTED] = RGB(0xFF, 0xFF, 0xFF);
+ CustomColors[MODCOLOR_SAMPLE] = RGB(0xFF, 0x00, 0x00);
CustomColors[MODCOLOR_BACKPLAYCURSOR] = RGB(0xFF, 0xFF, 0x80);
CustomColors[MODCOLOR_TEXTPLAYCURSOR] = RGB(0x00, 0x00, 0x00);
CustomColors[MODCOLOR_BACKHILIGHT] = RGB(0xE0, 0xE8, 0xE0);
@@ -408,6 +409,7 @@
CustomColors[MODCOLOR_PANNING] = RGB(0x00, 0x80, 0x80);
CustomColors[MODCOLOR_PITCH] = RGB(0x80, 0x80, 0x00);
CustomColors[MODCOLOR_GLOBALS] = RGB(0x80, 0x00, 0x00);
+ CustomColors[MODCOLOR_ENVELOPES] = RGB(0x00, 0x00, 0xFF);
CustomColors[MODCOLOR_VUMETER_LO] = RGB(0x00, 0xC8, 0x00);
CustomColors[MODCOLOR_VUMETER_MED] = RGB(0xFF, 0xC8, 0x00);
CustomColors[MODCOLOR_VUMETER_HI] = RGB(0xE1, 0x00, 0x00);
@@ -492,6 +494,7 @@
CustomColors[MODCOLOR_TEXTCURROW] = RGB(0x00, 0x00, 0x00);
CustomColors[MODCOLOR_BACKSELECTED] = RGB(0x00, 0x00, 0x00);
CustomColors[MODCOLOR_TEXTSELECTED] = RGB(0xDD, 0xD7, 0xCC);
+ CustomColors[MODCOLOR_SAMPLE] = RGB(0x00, 0xFF, 0x00);
CustomColors[MODCOLOR_BACKPLAYCURSOR] = RGB(0xA9, 0x99, 0x7A);
CustomColors[MODCOLOR_TEXTPLAYCURSOR] = RGB(0x00, 0x00, 0x00);
CustomColors[MODCOLOR_BACKHILIGHT] = RGB(0xCE, 0xC5, 0xB5);
@@ -501,7 +504,6 @@
CustomColors[MODCOLOR_PANNING] = RGB(0x00, 0x68, 0x68);
CustomColors[MODCOLOR_PITCH] = RGB(0x62, 0x62, 0x00);
CustomColors[MODCOLOR_GLOBALS] = RGB(0x66, 0x00, 0x00);
- CustomColors[MODCOLOR_SAMPLE] = RGB(0x00, 0xFF, 0x00);
CustomColors[MODCOLOR_ENVELOPES] = RGB(0xFF, 0x00, 0x00);
CustomColors[MODCOLOR_VUMETER_LO] = RGB(0x00, 0xC8, 0x00);
CustomColors[MODCOLOR_VUMETER_MED] = RGB(0xFF, 0xC8, 0x00);
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2010-07-29 13:43:09 UTC (rev 665)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2010-08-01 14:18:25 UTC (rev 666)
@@ -1361,7 +1361,7 @@
bool oldsel = (m_dwBeginSel != m_dwEndSel) ? true : false;
// shift + click = update selection
- if(CMainFrame::GetInputHandler()->ShiftPressed())
+ if(!m_bDrawingEnabled && CMainFrame::GetInputHandler()->ShiftPressed())
{
oldsel = true;
m_dwEndDrag = ScreenToSample(point.x);
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-07-29 13:43:09 UTC (rev 665)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2010-08-01 14:18:25 UTC (rev 666)
@@ -131,9 +131,8 @@
// -> CODE#0023
// -> DESC="IT project files (.itp)"
DDX_Control(pDX, IDC_CHECK6, m_CheckBox6);
- DDX_Control(pDX, IDC_CHECK_PT1X, m_CheckBoxPT1x);
- DDX_Control(pDX, IDC_EDIT_FLAGS, m_EditFlag);
// -! NEW_FEATURE#0023
+ DDX_Control(pDX, IDC_CHECK_PT1X, m_CheckBoxPT1x);
//}}AFX_DATA_MAP
}
@@ -203,8 +202,6 @@
SetDlgItemText(IDC_EDIT_CREATEDWITH, MptVersion::ToStr(m_pSndFile->m_dwCreatedWithVersion));
SetDlgItemText(IDC_EDIT_SAVEDWITH, MptVersion::ToStr(m_pSndFile->m_dwLastSavedWithVersion));
- m_EditFlag.SetLimitText(16);
-
UpdateDialog();
EnableToolTips(TRUE);
@@ -273,39 +270,24 @@
const bool XMorITorMPT = ((m_TypeBox.GetItemData(m_TypeBox.GetCurSel()) & (MOD_TYPE_XM | MOD_TYPE_IT | MOD_TYPE_MPT)) != 0);
const bool ITorMPT = ((m_TypeBox.GetItemData(m_TypeBox.GetCurSel()) & (MOD_TYPE_IT | MOD_TYPE_MPT)) != 0);
- const bool XM = m_TypeBox.GetItemData(m_TypeBox.GetCurSel()) == MOD_TYPE_XM;
- // Misc Flags box
- CWnd* p = GetDlgItem(IDC_EDIT_FLAGS);
- if(p) p->ShowWindow(XMorITorMPT);
- p = GetDlgItem(IDC_FLAG_EXPLANATIONS);
- if(p)
+ // Misc Flags
+ if(ITorMPT)
{
- p->ShowWindow(XMorITorMPT);
- if(ITorMPT)
- p->SetWindowText("1. Enable more IT compatible playback.\n"
- "2. Use old random variation behavior for instruments.\n"
- "3. Enable plugin volume command bug emulation.");
- else if(XM) p->SetWindowText("1. Enable more FT2 compatible playback.\n"
- "2. Unused\n"
- "3. Plugin volume command bug");
- }
-
- GetDlgItem(IDC_FLAGEDITTITLE)->ShowWindow(XMorITorMPT);
- GetDlgItem(IDC_FRAME_MPTEXT)->ShowWindow(XMorITorMPT);
- if(XMorITorMPT)
+ GetDlgItem(IDC_CHK_COMPATPLAY)->SetWindowText(_T("More Impulse Tracker compatible playback"));
+ } else
{
- char str[17] = "0000000000000000";
- const uint16 f = m_pSndFile->GetModFlags();
- BYTE lastTrue = 0, i;
- for(i = 0; i<16; i++)
- {
- if((f & (1 << i)) != 0) {str[i] = '1'; lastTrue = i;}
- }
- str[max(3, lastTrue+1)] = 0;
- SetDlgItemText(IDC_EDIT_FLAGS, str);
+ GetDlgItem(IDC_CHK_COMPATPLAY)->SetWindowText(_T("More Fasttracker 2 compatible playback"));
}
+ GetDlgItem(IDC_CHK_COMPATPLAY)->ShowWindow(XMorITorMPT);
+ GetDlgItem(IDC_CHK_MIDICCBUG)->ShowWindow(XMorITorMPT);
+ GetDlgItem(IDC_CHK_OLDRANDOM)->ShowWindow(ITorMPT);
+
+ CheckDlgButton(IDC_CHK_COMPATPLAY, m_pSndFile->GetModFlag(MSF_COMPATIBLE_PLAY));
+ CheckDlgButton(IDC_CHK_MIDICCBUG, m_pSndFile->GetModFlag(MSF_MIDICC_BUGEMULATION));
+ CheckDlgButton(IDC_CHK_OLDRANDOM, m_pSndFile->GetModFlag(MSF_OLDVOLSWING));
+
// Mixmode Box
GetDlgItem(IDC_TEXT_MIXMODE)->ShowWindow(XMorITorMPT);
m_PlugMixBox.ShowWindow(XMorITorMPT);
@@ -485,14 +467,10 @@
if(m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_XM))
{
- uint16 val = 0;
- char str[18]; memset(str, 0, 18);
- GetDlgItemText(IDC_EDIT_FLAGS, str, 17);
- for(size_t i = 0; i<strlen(str); i++)
- {
- if(str[i] != '0') val |= (1 << i);
- }
- m_pSndFile->SetModFlags(val);
+ m_pSndFile->SetModFlags(0);
+ if(IsDlgButtonChecked(IDC_CHK_COMPATPLAY)) m_pSndFile->SetModFlag(MSF_COMPATIBLE_PLAY, true);
+ if(IsDlgButtonChecked(IDC_CHK_MIDICCBUG)) m_pSndFile->SetModFlag(MSF_MIDICC_BUGEMULATION, true);
+ if(IsDlgButtonChecked(IDC_CHK_OLDRANDOM)) m_pSndFile->SetModFlag(MSF_OLDVOLSWING, true);
}
m_pSndFile->m_nRowsPerBeat = GetDlgItemInt(IDC_ROWSPERBEAT);
@@ -557,6 +535,15 @@
case IDC_COMBO_MIXLEVELS:
strTipText = "Mixing method of sample and VST levels.";
break;
+ case IDC_CHK_COMPATPLAY:
+ strTipText = "Play commands as the original tracker would play them (recommended)";
+ break;
+ case IDC_CHK_MIDICCBUG:
+ strTipText = "Emulate an old bug which sent wrong volume messages to VSTis (not recommended)";
+ break;
+ case IDC_CHK_OLDRANDOM:
+ strTipText = "Use old (buggy) random volume / panning variation algorithm (not recommended)";
+ break;
}
if (pNMHDR->code == TTN_NEEDTEXTA)
Modified: trunk/OpenMPT/mptrack/dlg_misc.h
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.h 2010-07-29 13:43:09 UTC (rev 665)
+++ trunk/OpenMPT/mptrack/dlg_misc.h 2010-08-01 14:18:25 UTC (rev 666)
@@ -12,7 +12,6 @@
public:
CComboBox m_TypeBox, m_ChannelsBox, m_TempoModeBox, m_PlugMixBox;
CButton m_CheckBox1, m_CheckBox2, m_CheckBox3, m_CheckBox4, m_CheckBox5, m_CheckBoxPT1x;
- CEdit m_EditFlag;
CSoundFile *m_pSndFile;
UINT m_nChannels;
MODTYPE m_nType;
@@ -23,8 +22,6 @@
CButton m_CheckBox6;
// -! NEW_FEATURE#0023
- CButton m_CheckBoxITCompatiblePlay;
-
public:
CModTypeDlg(CSoundFile *pSndFile, CWnd *parent):CDialog(IDD_MODDOC_MODTYPE, parent) { m_pSndFile = pSndFile; m_nType = MOD_TYPE_NONE; m_nChannels = 0; }
bool VerifyData();
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2010-07-29 13:43:09 UTC (rev 665)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2010-08-01 14:18:25 UTC (rev 666)
@@ -612,7 +612,7 @@
END
IDD_CONTROL_INSTRUMENTS DIALOGEX 0, 0, 558, 173
-STYLE DS_SETFONT | WS_CHILD
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
EDITTEXT IDC_EDIT_INSTRUMENT,87,7,29,12,ES_AUTOHSCROLL | ES_NUMBER
@@ -694,7 +694,7 @@
GROUPBOX "Tuning (experimental)",IDC_STATIC,364,28,92,28
END
-IDD_MODDOC_MODTYPE DIALOGEX 0, 0, 262, 317
+IDD_MODDOC_MODTYPE DIALOGEX 0, 0, 262, 311
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Song Properties"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
@@ -703,33 +703,35 @@
PUSHBUTTON "Cancel",IDCANCEL,204,24,50,14
COMBOBOX IDC_COMBO1,12,18,108,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COMBO2,126,18,66,77,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Embed instrument parameters in ITP",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,36,174,8
- CONTROL "Linear Frequency Slides",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,72,91,10
- CONTROL "Old Effects (IT)",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,72,66,10
- CONTROL "Fast Volume Slides (S3M)",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,84,96,10
- CONTROL "Compatible Gxx (IT)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,84,84,10
- CONTROL "Extended filter range",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,96,81,10
- CONTROL "ProTracker 1.x Mode (MOD)",IDC_CHECK_PT1X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,96,108,10
- RTEXT "Mix Levels:",IDC_TEXT_MIXMODE,18,134,81,8
- COMBOBOX IDC_COMBO_MIXLEVELS,108,132,84,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- RTEXT "Miscellaneous flags(0/1):",IDC_FLAGEDITTITLE,18,150,81,12,SS_CENTERIMAGE
- EDITTEXT IDC_EDIT_FLAGS,108,150,84,12,ES_AUTOHSCROLL
- COMBOBOX IDC_COMBO_TEMPOMODE,36,222,108,77,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- EDITTEXT IDC_ROWSPERBEAT,156,222,24,12,ES_AUTOHSCROLL | ES_NUMBER
- EDITTEXT IDC_ROWSPERMEASURE,156,240,24,12,ES_AUTOHSCROLL | ES_NUMBER
- EDITTEXT IDC_EDIT_CREATEDWITH,78,276,166,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_STATICEDGE
- EDITTEXT IDC_EDIT_SAVEDWITH,78,294,166,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_STATICEDGE
+ CONTROL "&Embed instrument parameters in ITP",IDC_CHECK6,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,36,174,8
+ CONTROL "&Linear Frequency Slides",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,72,91,10
+ CONTROL "&Old Effects (IT)",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,72,66,10
+ CONTROL "Fast &Volume Slides (S3M)",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,84,96,10
+ CONTROL "Compatible &Gxx (IT)",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,84,84,10
+ CONTROL "Extended &filter range",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,96,81,10
+ CONTROL "&ProTracker 1.x Mode (MOD)",IDC_CHECK_PT1X,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,96,108,10
+ LTEXT "Mix Levels:",IDC_TEXT_MIXMODE,18,134,42,8
+ COMBOBOX IDC_COMBO_MIXLEVELS,60,132,84,51,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "More &compatible playback",IDC_CHK_COMPATPLAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,150,222,12
+ CONTROL "Plugin volume command &bug emulation",IDC_CHK_MIDICCBUG,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,162,222,12
+ CONTROL "Old &random variation behaviour for instruments",IDC_CHK_OLDRANDOM,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,174,222,12
+ COMBOBOX IDC_COMBO_TEMPOMODE,36,217,108,77,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ EDITTEXT IDC_ROWSPERBEAT,156,217,24,12,ES_AUTOHSCROLL | ES_NUMBER
+ EDITTEXT IDC_ROWSPERMEASURE,156,234,24,12,ES_AUTOHSCROLL | ES_NUMBER
+ EDITTEXT IDC_EDIT_CREATEDWITH,78,271,166,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_STATICEDGE
+ EDITTEXT IDC_EDIT_SAVEDWITH,78,289,166,13,ES_AUTOHSCROLL | ES_READONLY,WS_EX_STATICEDGE
GROUPBOX "Type",IDC_FRAME_MODTYPE,6,6,192,48
GROUPBOX "Playback",IDC_FRAME_MODFLAGS,6,60,246,54
- GROUPBOX "Extended Playback Options (OpenMPT only)",IDC_FRAME_MPTEXT,6,120,246,84
- LTEXT "",IDC_FLAG_EXPLANATIONS,18,168,222,26
- GROUPBOX "Tempo",IDC_FRAME_TEMPOMODE,6,210,246,48
- LTEXT "Mode:",IDC_TEXT_TEMPOMODE,12,224,21,8
- LTEXT "Rows/beat",IDC_TEXT_ROWSPERBEAT,186,224,36,8
- LTEXT "Rows/measure",IDC_TEXT_ROWSPERMEASURE,186,242,49,8
- GROUPBOX "OpenMPT Version Info",IDC_FRAME_MPTVERSION,6,263,246,48
- RTEXT "IDC_TEXT_CREATEDWITH",IDC_TEXT_CREATEDWITH,18,278,54,8
- RTEXT "IDC_TEXT_SAVEDWITH",IDC_TEXT_SAVEDWITH,18,295,54,8
+ GROUPBOX "Extended Playback Options (OpenMPT only)",IDC_FRAME_MPTEXT,6,120,246,78
+ GROUPBOX "Tempo",IDC_FRAME_TEMPOMODE,6,204,246,48
+ LTEXT "Mode:",IDC_TEXT_TEMPOMODE,12,218,21,8
+ LTEXT "Rows/beat",IDC_TEXT_ROWSPERBEAT,186,218,36,8
+ LTEXT "Rows/measure",IDC_TEXT_ROWSPERMEASURE,186,236,49,8
+ GROUPBOX "OpenMPT Version Info",IDC_FRAME_MPTVERSION,6,257,246,48
+ RTEXT "IDC_TEXT_CREATEDWITH",IDC_TEXT_CREATEDWITH,18,273,54,8
+ RTEXT "IDC_TEXT_SAVEDWITH",IDC_TEXT_SAVEDWITH,18,289,54,8
END
IDD_SHOWLOG DIALOG 0, 0, 300, 106
@@ -807,7 +809,7 @@
PUSHBUTTON "Clone...",IDC_CLONEPLUG,103,207,34,13,NOT WS_VISIBLE,WS_EX_STATICEDGE
PUSHBUTTON "<<",IDC_BUTTON5,11,191,18,13,NOT WS_TABSTOP,WS_EX_STATICEDGE
PUSHBUTTON ">>",IDC_BUTTON4,32,191,18,13,NOT WS_TABSTOP,WS_EX_STATICEDGE
- EDITTEXT IDC_EDIT13,310,191,96,13,ES_CENTER | ES_AUTOHSCROLL
+ EDITTEXT IDC_EDIT13,312,191,94,13,ES_CENTER | ES_AUTOHSCROLL
COMBOBOX IDC_COMBO8,16,239,102,68,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Load",IDC_BUTTON6,122,239,27,13,0,WS_EX_STATICEDGE
PUSHBUTTON "Save",IDC_BUTTON8,154,239,27,13,0,WS_EX_STATICEDGE
@@ -820,6 +822,7 @@
CONTROL "Expand",IDC_CHECK12,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,199,271,37,10
CONTROL "Dry mix",IDC_CHECK11,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,199,286,37,10
COMBOBOX IDC_COMBO9,285,241,62,99,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Gain: x 1.0",IDC_STATIC2,353,241,37,14,SS_CENTERIMAGE
CONTROL "",IDC_SPIN10,"msctls_updown32",UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS,392,242,9,11
COMBOBOX IDC_COMBO7,285,261,117,68,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_SLIDER10,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,314,282,88,14,WS_EX_STATICEDGE
@@ -841,16 +844,15 @@
LTEXT "Effect:",IDC_STATIC,216,146,29,8
LTEXT "Effect:",IDC_STATIC,319,146,29,8
CTEXT "Display name",IDC_STATIC,263,191,48,13,SS_CENTERIMAGE,WS_EX_STATICEDGE
+ CTEXT "I/O Type:",IDC_STATIC,263,208,47,13,SS_CENTERIMAGE,WS_EX_STATICEDGE
+ CONTROL "",IDC_TEXT6,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | WS_GROUP,312,208,95,13,WS_EX_STATICEDGE
+ GROUPBOX "Factory preset",IDC_STATIC,11,226,177,34
CTEXT "Parameter",IDC_STATIC,16,266,43,13,SS_CENTERIMAGE,WS_EX_STATICEDGE
+ GROUPBOX "",IDC_STATIC,11,255,177,49
+ GROUPBOX "Mix settings",IDC_STATIC,193,226,214,78
+ CTEXT "Mix mode",IDC_STATIC,245,241,37,13,SS_CENTERIMAGE,WS_EX_STATICEDGE
CTEXT "Output to",IDC_STATIC,245,261,37,13,SS_CENTERIMAGE,WS_EX_STATICEDGE
- CONTROL "",IDC_TEXT6,"Static",SS_LEFTNOWORDWRAP | SS_CENTERIMAGE | WS_GROUP,311,208,96,13,WS_EX_STATICEDGE
CTEXT "Wet Dry Ratio",IDC_STATIC8,245,282,65,14,SS_CENTERIMAGE,WS_EX_STATICEDGE
- CTEXT "Mix mode",IDC_STATIC,245,241,37,13,SS_CENTERIMAGE,WS_EX_STATICEDGE
- LTEXT "Gain: x 1.0",IDC_STATIC2,353,241,34,14,SS_CENTERIMAGE
- GROUPBOX "Mix settings",IDC_STATIC,193,226,214,78
- GROUPBOX "Factory preset",IDC_STATIC,11,226,177,34
- GROUPBOX "",IDC_STATIC,11,255,177,49
- CTEXT "I/O Type:",IDC_STATIC,263,208,47,13,SS_CENTERIMAGE,WS_EX_STATICEDGE
END
IDD_EDIT_FIND DIALOGEX 0, 0, 182, 145
@@ -1246,18 +1248,18 @@
RTEXT "--",IDC_TEXT2,260,89,22,8
END
-IDD_SELECTMIXPLUGIN DIALOGEX 0, 0, 243, 220
-STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+IDD_SELECTMIXPLUGIN DIALOGEX 0, 0, 249, 220
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Mix Plugins"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- LTEXT "Filter:",IDC_STATIC_VSTNAMEFILTER,8,9,18,8
- EDITTEXT IDC_NAMEFILTER,28,7,152,14,ES_AUTOHSCROLL
+ LTEXT "Filter:",IDC_STATIC_VSTNAMEFILTER,6,9,18,8
+ EDITTEXT IDC_NAMEFILTER,30,6,150,14,ES_AUTOHSCROLL
CONTROL "Tree1",IDC_TREE1,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_HSCROLL | WS_TABSTOP,6,24,174,180,WS_EX_CLIENTEDGE
- DEFPUSHBUTTON "Add to Song",IDOK,187,6,50,14
- PUSHBUTTON "New plugin...",IDC_BUTTON1,188,23,50,14,BS_MULTILINE
- PUSHBUTTON "Remove",IDC_BUTTON2,188,40,50,14
- PUSHBUTTON "Cancel",IDCANCEL,186,189,50,14
+ DEFPUSHBUTTON "Add to Song",IDOK,187,6,53,14
+ PUSHBUTTON "New plugin...",IDC_BUTTON1,188,23,52,14,BS_MULTILINE
+ PUSHBUTTON "Remove",IDC_BUTTON2,188,40,52,14
+ PUSHBUTTON "Cancel",IDCANCEL,186,189,54,14
LTEXT "IDC_TEXT_CURRENT_VSTPLUG",IDC_TEXT_CURRENT_VSTPLUG,6,208,234,8
END
@@ -1594,7 +1596,7 @@
IDD_MODDOC_MODTYPE, DIALOG
BEGIN
RIGHTMARGIN, 248
- BOTTOMMARGIN, 310
+ BOTTOMMARGIN, 304
END
IDD_SHOWLOG, DIALOG
@@ -1707,7 +1709,7 @@
IDD_SELECTMIXPLUGIN, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 236
+ RIGHTMARGIN, 242
TOPMARGIN, 7
BOTTOMMARGIN, 213
END
Modified: trunk/OpenMPT/mptrack/res/MAINBAR.BMP
===================================================================
(Binary files differ)
Modified: trunk/OpenMPT/mptrack/resource.h
===================================================================
--- trunk/OpenMPT/mptrack/resource.h 2010-07-29 13:43:09 UTC (rev 665)
+++ trunk/OpenMPT/mptrack/resource.h 2010-08-01 14:18:25 UTC (rev 666)
@@ -841,9 +841,9 @@
#define IDC_BUTTON_REMOVE 2318
#define IDC_CHECK_MIDILEARN 2319
#define IDC_MIDIPLAYCONTROL 2320
-#define IDC_FLAG_EXPLANATIONS 2321
-#define IDC_FLAGEDITTITLE 2322
-#define IDC_EDIT_FLAGS 2323
+#define IDC_CHK_COMPATPLAY 2321
+#define IDC_CHK_MIDICCBUG 2322
+#define IDC_CHK_OLDRANDOM 2323
#define IDC_CHECKCAPTURE 2324
#define IDC_SPINMOVEMAPPING 2325
#define IDC_BUTTON_HALF 2326
@@ -1208,7 +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
+#define ID_PANIC 60451
// Next default values for new objects
//
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-07-29 13:43:09 UTC (rev 665)
+++ trunk/OpenMPT/mptrack/version.h 2010-08-01 14:18:25 UTC (rev 666)
@@ -14,8 +14,8 @@
//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 02
-#define VER_MINORMINOR 07
+#define VER_MINOR 03
+#define VER_MINORMINOR 00
//Creates version number from version parts that appears in version string.
//For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of
Modified: trunk/OpenMPT/packageTemplate/History.txt
===================================================================
--- trunk/OpenMPT/packageTemplate/History.txt 2010-07-29 13:43:09 UTC (rev 665)
+++ trunk/OpenMPT/packageTemplate/History.txt 2010-08-01 14:18:25 UTC (rev 666)
@@ -10,211 +10,298 @@
(tx XYZ): thanks to XYZ for telling us about the bug
+v1.18.03.00 (August 2010, revision 666)
+---------------------------------------
+General tab
+ [Imp] <Jojo> To prevent OpenMPT from hanging while switching between plugins (or switching to the general tab), the preset box is only filled when it gets the focus. This makes working with Synth1 a lot easier, since it has an insane amount of presets... :)
+ [Mod] <Jojo> Changed tab order of the lower panel (now it's more logical to me)
+
+Sequence editor
+ [Imp] <Jojo> When inserting patterns at an empty position, the position counter is not increased anymore.
+ [Imp] <Jojo> Improved sequence name display in context menu for empty sequences.
+
+Pattern tab::pattern editing
+ [Imp] <Jojo> 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.
+ [Fix] <Jojo> When the first column of a pattern selection (larger than one selection field) was the parameter column, PCNote values in this column were not reset properly.
+ [Fix] <Jojo> Pattern Editor: Transposing notes up/down doesn't allow notes which are actually supported by the current module format (f.e. notes below C-1 in XMs) anymore.
+ [Fix] <Jojo> Keyboard shortcut for toggling record state didn't save the change, so it was reset with every new module.
+
+Pattern tab::Note properties
+ [Imp] <Jojo> Effect info now shows the real finetune values for E5x in MOD/XM and E2x in S3M instead of just 0...15.
+ [Imp] <Jojo> Set envelope position effect (Lxx in XM) is now explained better.
+ [Fix] <Jojo> 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 than 256 sample slots.
+
+Sample tab
+ [New] <Jojo> It's now also possible to create sample selections using Shift + click (this is still behaving a bit non-obvious if you don't know what you're doing :).
+ [New] <Jojo> Sample Drawing: Horizontal lines can now be drawn by holding down the shift key.
+ [Imp] <Jojo> Finetune range is now limited from -8 to 7 for MOD files.
+ [Imp] <Jojo> When hovering the relative note and finetune controls, the actual C-5 frequency is now also shown for MOD files. Previously, this only worked for XM files.
+ [Fix] <Jojo> When using the spin button next to the finetune or frequency control, the module was not marked as modified.
+
+Instrument tab
+ [New] <Jojo> Pressing Ctrl while dragging a point in the envelope editor now also moves the tail of the envelope.
+ [Imp] <Jojo> More helpful value display for the panning envelope in the status bar with indication what's left and what's right.
+ [Imp] <Jojo> If an instrument is not initialized yet, this is done automatically now, so that changes done to the instrument are not lost, although it looks like they are actually applied (f.e. when trying to edit a previously deleted instrument).
+ [Imp] <Jojo> Fadeout values up to 32767 are allowed again for XM files, as FT2 can actually handle them (and other apps like Milky support them as well)
+ [Imp] <Jojo> Panning ranges from 0 to 256 again for MPTM, and from 0 to 64 for IT files (previously, it ranged from 0 to 255).
+ [Imp] <Jojo> Sample Map accepts various new shortcuts now.
+ [Imp] <Jojo> When pasting an envelope with a release node, it's now ignored in formats that don't support it.
+ [Reg] <Jojo> Envelope release nodes cannot be enabled for IT files anymore, but they are still played for compatibility. (One has to start removing the crap from the old formats at some point...)
+
+Treeview
+ [Imp] <Jojo> Treeview: Ask for confirmation when deleting patterns, samples, instruments, sequences.
+ [Fix] <Jojo> Deleting a sample from the treeview and then applying undo for this sample in the sample editor crashed OpenMPT.
+
+Mod conversion
+ [Imp] <Jojo> Some improvements with converting note cuts, ECx/SCx and EDx/SDx.
+ [Imp] <Jojo> When converting to XM, rogue note delays are removed from the patterns to avoid interference with a FT2 bug.
+ [Imp] <Jojo> Envelope release nodes are now removed when converting from MPTM.
+ [Fix] <Jojo> When converting to MPTM, "+++" separator patterns are not recognized as sub tune indicators anymore, as that was quite annoying.
+ [Fix] <Jojo> Channel settings were not reset properly for MOD/XM/S3M, only the first channel was fixed. (tx Sam_Zen)
+ [Fix] <Jojo> Extra fine portamento was not converted properly when converting from IT/MPTM/S3M to XM.
+
+Playback (see also format-specific changes below)
+ [Mod] <Jojo> Invert loop (.MOD effect) is now ignored on 16-bit samples (only important during editing, since .MODs can only contain 8-bit samples anyway)
+ [Fix] <Jojo> The Pattern Loop command did not work properly on rows > 255
+
+IT::Saving
+ [Imp] <Jojo> If a plugin is specified for an IT instrument and no MIDI channel is assigned, the plugin 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)
+ [Imp] <Jojo> If filter envelopes are used, a different value for the cmwt ("compatible with") field is now used in compatibility export (like in SchismTracker).
+ [Fix] <Jojo> Instrument panning was not converted properly.
+
+XM
+ [Fix] <Jojo> 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.
+ [Fix] <Jojo> 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...
+
+XM::Saving
+ [Imp] <Jojo> Panbrello is not saved anymore in compatibility mode.
+ [Fix] <Jojo> 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.
+ [Fix] <Jojo> Saving XM files with 127 channels (sigh) was broken.
+
+S3M
+ [Fix] <Jojo> Samples with very short loops (4 bytes) are now loaded properly. Fixes "a tiny problem.s3m" by \slash.
+ [Fix] <Jojo> Notes with an SD0 effect were not ignored properly when there was a row delay effect on the same row. Now they should be ignored in any case.
+
+Other modules
+ [Imp] <Jojo> Song messages are now loaded with more accuracy for some formats.
+ [Imp] <Jojo> J2B Loader: J2B files with extended instrument settings and multiple samples per instrument work properly now. Such J2B files were not used in the game but have been created by JJ2 players using MOD2J2B.
+ [Imp] <Jojo> OKT Loader: Completely new IFF-based loader, translated from SchismTracker code with permission from Storlek. This loader is a *lot* more accurate, but still misses a few pattern effects.
+ [Imp] <Jojo> PSM Loader: Small improvements.
+ [Fix] <Jojo> MTM Loader: The "beats per track" (means lines per pattern) setting is now taken into account.
+ [Fix] <Jojo> PSM16 Loader: Since the control channels were muted, tempo commands were ignored, effectively slowing down some PSM16 tracks.
+
+Misc
+ [New] <Jojo> Experimental "panic" button on the main toolbar. At the moment, it just kills all VSTi and sample voices.
+ [Imp] <Jojo> Added mnemonic codes to the wave export controls.
+ [Mod] <Jojo> In the mod type dialog, the "misc flags" can now be toggled using check buttons instead of an edit field.
+ [Mod] <Jojo> Various file loaders / savers: A new logging mechanism is used to display only one message box with errors and warnings instead of many message boxes.
+ [Mod] <Jojo> Updated DE_jojo.mkb to include new shortcuts, remapped a few others (for IT-style).
+ [Fix] <Jojo> Colour Setup: Some colours in the MPT default colour scheme were not set up properly when switching between presets.
+
+
v1.18.02.00 (May 2010, revision 610)
------------------------------------
+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.
-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.
-
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.
+ [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
- [New] <Jojo> Key shortcut + context menu entry for toggling the plugin editor of the PC note that's under the cursor.
- [Imp] <Jojo> Overflow paste now only uses one undo step.
- [Imp] <Jojo> Instead of simply ignoring note off/cut/fade when working with .MOD files, it is converted to C00.
- [Fix] <rewbs> Effect visualizer is now aware of PC notes (bug 3836).
- [Fix] <Jojo> When using MIDI record or split keyboard settings, volume data was writting into the volume column in MOD format.
- [Fix] <Jojo> When converting PC Notes to MIDI Macros, the instrument index is now also cleaned as well. Noticable for example when pasting PC notes into an IT module.
- [Fix] <Jojo> Now, plugin slot 100 can also be automated using PC Notes.
- [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.
-
+ [New] <Jojo> Extended context menu for PC Notes
+ [New] <Jojo> Key shortcut + context menu entry for toggling the plugin editor of the PC note that's under the cursor.
+ [Imp] <Jojo> Overflow paste now only uses one undo step.
+ [Imp] <Jojo> Instead of simply ignoring note off/cut/fade when working with .MOD files, it is converted to C00.
+ [Fix] <rewbs> Effect visualizer is now aware of PC notes (bug 3836).
+ [Fix] <Jojo> When using MIDI record or split keyboard settings, volume data was written into the volume column in MOD format.
+ [Fix] <Jojo> When converting PC Notes to MIDI Macros, the instrument index is now also cleaned as well. Noticeable for example when pasting PC notes into an IT module.
+ [Fix] <Jojo> Now, plugin slot 100 can also be automated using PC Notes.
+ [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
- [New] <Jojo> When the PT1x mode or the S3M "Amiga" flag are enabled, dodgy notes (i.e lower than C-4 or higher than B-6) are marked red.
- [Imp] <Jojo> The status bar shows plugin and parameter names for PC notes now as well.
- [Imp] <Jojo> Effect vis: Make use of song's own row highlighting variables instead of fixed global ones.
- [Fix] <Jojo> The status bar ("Position x of y") only the showed order length for the first subtune if subtunes were separated by an "---" order item.
- [Fix] <Jojo> Changing a channel plugin in MOD/S3M files doesn't mark them as modified anymore.
- [Fix] <Jojo> When working with multiple sequences, switching to the pattern editor for the first time automatically marked the document as modified.
+ [New] <Jojo> When the PT1x mode or the S3M "Amiga" flag are enabled, dodgy notes (i.e lower than C-4 or higher than B-6) are marked red.
+ [Imp] <Jojo> The status bar shows plugin and parameter names for PC notes now as well.
+ [Imp] <Jojo> Effect vis: Make use of song's own row highlighting variables instead of fixed global ones.
+ [Fix] <Jojo> The status bar ("Position x of y") only the showed order length for the first sub tune if sub tunes were separated by an "---" order item.
+ [Fix] <Jojo> Changing a channel plugin in MOD/S3M files doesn't mark them as modified anymore.
+ [Fix] <Jojo> When working with multiple sequences, switching to the pattern editor for the first time automatically marked the document as modified.
Pattern tab::Note properties
- [Imp] <Jojo> Don't allow values > 63 for "break to row" commands in MOD/S3M.
- [Imp] <Jojo> Since the behaviour of sliding commands with both nibbles set varies from tracker to tracker, "undefined" is always shown in the note properties in such cases.
- [Fix] <Jojo> In the note properties, the Gxx effect for XM files was not limited properly.
- [Fix] <Jojo> In Note Properties, the waveform display for S [345]x (and equivalent MOD/XM effeects) was not always fully visible ("continue" addition was cut off)
- [Fix] <Jojo> Display "fine" / "extra fine" portamento effects properly (S3M/IT/MPTM), display SFx macro properly, display MOD effects with no memory properly.
+ [Imp] <Jojo> Don't allow values > 63 for "break to row" commands in MOD/S3M.
+ [Imp] <Jojo> Since the behaviour of sliding commands with both nibbles set varies from tracker to tracker, "undefined" is always shown in the note properties in such cases.
+ [Fix] <Jojo> In the note properties, the Gxx effect for XM files was not limited properly.
+ [Fix] <Jojo> In Note Properties, the waveform display for S [345]x (and equivalent MOD/XM effects) was not always fully visible ("continue" addition was cut off)
+ [Fix] <Jojo> Display "fine" / "extra fine" portamento effects properly (S3M/IT/MPTM), display SFx macro properly, display MOD effects with no memory properly.
Pattern tab::Find/replace
- [Fix] <Jojo> Find/Replace didn't work properly when replacing PC Notes with something that's not a PC Note.
- [Fix] <Jojo> Instead of turning "Follow Song" off, the Find/Replace dialog toggled it.
-
+ [Fix] <Jojo> Find/Replace didn't work properly when replacing PC Notes with something that's not a PC Note.
+ [Fix] <Jojo> Instead of turning "Follow Song" off, the Find/Replace dialog toggled it.
+
Sample tab
- [New] <Jojo> Shift+New = Clone sample slot
- [New] <Jojo> Option to not ask for RAW import settings again (settings are remembered independently for all modules)
- [Imp] <Jojo> Remember previous settings in RAW import dialog
- [Imp] <Jojo> When enabling (sustain) loop and no loop points are set yet, automatically set loop to full sample length or the currently selected part of the sample.
- [Imp] <Jojo> Sample name and filename are now properly limited in length.
- [Fix] <Jojo> When applying time stretch / pitch shift to an 8-bit sample and selecting the sample partly lead to partial upsampling, instead of upsampling the whole sample.
- [Fix] <Jojo> Sample Undo: If no custom value was set, the default value was set ridiculously high (tx Paul Legovitch)
- [Fix] <Jojo> Sample Undo: Fixed another possible problem when undoing actions with very little memory left.
- [Fix] <Jojo> It was not possible to create the last sample slot (i.e. pressing "new sample" with a MOD file that had 30 samples would result in an error, although MOD supports 31 samples).
- [Fix] <Jojo> When loading an extremely short raw file (f.e. 1 byte) twice, it crashed OpenMPT.
-
+ [New] <Jojo> Shift+New = Clone sample slot
+ [New] <Jojo> Option to not ask for RAW import settings again (settings are remembered independently for all modules)
+ [Imp] <Jojo> Remember previous settings in RAW import dialog
+ [Imp] <Jojo> When enabling (sustain) loop and no loop points are set yet, automatically set loop to full sample length or the currently selected part of the sample.
+ [Imp] <Jojo> Sample name and filename are now properly limited in length.
+ [Fix] <Jojo> When applying time stretch / pitch shift to an 8-bit sample and selecting the sample partly lead to partial upsampling, instead of upsampling the whole sample.
+ [Fix] <Jojo> Sample Undo: If no custom value was set, the default value was set ridiculously high (tx Paul Legovitch)
+ [Fix] <Jojo> Sample Undo: Fixed another possible problem when undoing actions with very little memory left.
+ [Fix] <Jojo> It was not possible to create the last sample slot (i.e. pressing "new sample" with a MOD file that had 30 samples would result in an error, although MOD supports 31 samples).
+ [Fix] <Jojo> When loading an extremely short raw file (f.e. 1 byte) twice, it crashed OpenMPT.
+
Instrument tab
- [New] <Jojo> Envelope zooming. Might still look very weird (especially the first tick and around loop points). Includes two new keyboard shortcuts.
- [New] <Jojo> Transpose Up/Down for sample map.
- [New] <Jojo> VST/Instrument handling: The IT instrument note mapping is now also applied to VST instruments (before, it was just available for samples). This way, VST instruments can be transposed easily.
- [Imp] <Jojo> When pasting an envelope, it's now also automatically enabled.
- [Imp] <Jojo> Instrument name and filename are now properly limited in length.
- [Imp] <Jojo> "Scale envelope points" is now always available for scaling the values of the points (y axis).
- [Fix] <Jojo> The panning spin button ranged from 0 to 256, however when saving to .IT, 256 was wrapping over to 0. Panning is now limited from 0 to 255.
- [Fix] <Jojo> It was impossible to assign plugin slot 100 to an instrument.
+ [New] <Jojo> Envelope zooming. Might still look very weird (especially the first tick and around loop points). Includes two new keyboard shortcuts.
+ [New] <Jojo> Transpose Up/Down for sample map.
+ [New] <Jojo> VST/Instrument handling: The IT instrument note mapping is now also applied to VST instruments (before, it was just available for samples). This way, VST instruments can be transposed easily.
+ [Imp] <Jojo> When pasting an envelope, it's now also automatically enabled.
+ [Imp] <Jojo> Instrument name and filename are now properly limited in length.
+ [Imp] <Jojo> "Scale envelope points" is now always available for scaling the values of the points (y axis).
+ [Fix] <Jojo> The panning spin button ranged from 0 to 256, however when saving to .IT, 256 was wrapping over to 0. Panning is now limited from 0 to 255.
+ [Fix] <Jojo> It was impossible to assign plugin slot 100 to an instrument.
Comments tab
- [Fix] <Jojo> Correct C-5 frequency is now also shown if the module is an XM file.
- [Fix] <Jojo> When editing sample / instrument names, they are limited properly in length now.
+ [Fix] <Jojo> Correct C-5 frequency is now also shown if the module is an XM file.
+ [Fix] <Jojo> When editing sample / instrument names, they are limited properly in length now.
Treeview
- [New] <Jojo> Sequences can now be copied to other modules by simply dragging the sequence header into the the other module's sequence header. Does only work between two different modules, not within the same module, and it will not copy the pattern contents.
- [Imp] <Jojo> Display sequence index next to sequence names.
- [Imp] <Jojo> Improved order dragging; It is now also possible to drag an order into a non-MPTM module. In that case, the old orderlist will be replaced.
- [Imp] <Jojo> J2B files were not shown in treeview.
- [Fix] <Jojo> Soundfont samples were not playing correctly anymore. Note that soundfont samples in the MIDI library still don't work.
- [Fix] <Jojo> A crash could occour if the instrument library path was too long (f.e. because of malicious strings in the [Paths] section of the INI file)
- [Fix] <Jojo> "Bypass" action for VSTs didn't set the document as modified.
- [Fix] <Jojo> Right-Click on module -> Close didn't ask for confirmation when the document was modified.
- [Fix] <Jojo> Insert/Duplicate sequence actions didn't set the document modified. Grey out those two actions if no additional sequences can be added.
+ [New] <Jojo> Sequences can now be copied to other modules by simply dragging the sequence header into the the other module's sequence header. Does only work between two different modules, not within the same module, and it will not copy the pattern contents.
+ [Imp] <Jojo> Display sequence index next to sequence names.
+ [Imp] <Jojo> Improved order dragging; It is now also possible to drag an order into a non-MPTM module. In that case, the old orderlist will be replaced.
+ [Imp] <Jojo> J2B files were not shown in treeview.
+ [Fix] <Jojo> Soundfont samples were not playing correctly anymore. Note that soundfont samples in the MIDI library still don't work.
+ [Fix] <Jojo> A crash could occour if the instrument library path was too long (f.e. because of malicious strings in the [Paths] section of the INI file)
+ [Fix] <Jojo> "Bypass" action for VSTs didn't set the document as modified.
+ [Fix] <Jojo> Right-Click on module -> Close didn't ask for confirmation when the document was modified.
+ [Fix] <Jojo> Insert/Duplicate sequence actions didn't set the document modified. Grey out those two actions if no additional sequences can be added.
VST
- [New] <Jojo> VST/Instrument handling: The IT instrument note mapping is now also applied to VST instruments (before, it was just available for samples). This way, VST instruments can be transposed easily.
- [Imp] <Jojo> VST Editor: Instead of just saying the user that the plugin has to be assigned to an instrument to play notes, they are queried now whether they want to automatically add an instrument.
- [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).
-
+ [New] <Jojo> VST/Instrument handling: The IT instrument note mapping is now also applied to VST instruments (before, it was just available for samples). This way, VST instruments can be transposed easily.
+ [Imp] <Jojo> VST Editor: Instead of just saying the user that the plugin has to be assigned to an instrument to play notes, they are queried now whether they want to automatically add an instrument.
+ [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).
+
Mod conversion
- [Fix] <Jojo> When converting from MOD to S3M or IT, the Invert Loop effect was not removed.
- [Fix] <Jojo> When converting from MPTM to another format, the first sequence name is removed and the sequence is now sized properly when merging multiple sequences (tx Skaven).
- [Fix] <Jojo> When converting between XM and IT, the sample autovibrato "sweep" factor is now fixed a bit (since sweep = 0 equals "no sweep" in XM, and "no vibrato" in IT).
- [Fix] <Jojo> When removing instruments from the treeview and converting the module to a different format which also supports instruments, OpenMPT crashed.
- [Fix] <Jojo> When converting to MOD/S3M, the extended filter range flag was not deactivated.
- [Fix] <Jojo> S00 (IT/S3M) does not equal E00 (MOD/XM), as Exx doesn't have effect memory. Trying to convert S00 to the last used value now.
- [Fix] <Jojo> If necessary (S3M), reset restart position attribute when converting
- [Fix] <re> Merging multiple sequences didn't properly convert '---'/'+++' orders.
-
+ [Fix] <Jojo> When converting from MOD to S3M or IT, the Invert Loop effect was not removed.
+ [Fix] <Jojo> When converting from MPTM to another format, the first sequence name is removed and the sequence is now sized properly when merging multiple sequences (tx Skaven).
+ [Fix] <Jojo> When converting between XM and IT, the sample autovibrato "sweep" factor is now fixed a bit (since sweep = 0 equals "no sweep" in XM, and "no vibrato" in IT).
+ [Fix] <Jojo> When removing instruments from the treeview and converting the module to a different format which also supports instruments, OpenMPT crashed.
+ [Fix] <Jojo> When converting to MOD/S3M, the extended filter range flag was not deactivated.
+ [Fix] <Jojo> S00 (IT/S3M) does not equal E00 (MOD/XM), as Exx doesn't have effect memory. Trying to convert S00 to the last used value now.
+ [Fix] <Jojo> If necessary (S3M), reset restart position attribute when converting
+ [Fix] <re> Merging multiple sequences didn't properly convert '---'/'+++' orders.
+
IT
- [Imp] <Jojo> IT Saver: Compatibility export saves stereo samples again, as other tracker like Schism also support this.
- [Fix] <Jojo> IT Saver: Fixed IT sample flags which could potentionally cause IT to screw up on loading/saving MPT-made modules with samples that are not used by an instrument.
- [Fix] <Jojo> IT Loader: ChibiTracker uses \n instead of \r in the IT comment text, which was not handled properly.
- [Fix] <Jojo> (fix from SchismTracker) IT Loader: Ignore stereo sample flag when loading old IT files (older than IT 2.14) since Impulse Tracker did not reset this flag when importing stereo samples back then.
- [Fix] <Jojo> ITI/ITS Loader: Sample flags were not reset when a sample slot was overwritten when loading ITI or ITS files. That way, it was possible that f.e. the bidi loop flag was not disabled when loading a new sample that had a normal loop.
- [Fix] <Jojo> S3M/IT compatibility: Note Cut really cuts notes and does not just mute them (so that following volume commands could restore the sample)
- [Fix] <Jojo> IT Compatibility: Always reset autovibrato settings when there's an instrument number (fix from SchismTracker)
- [Fix] <Jojo> IT Compatibility: S77 / S79/ S7B are supposed to pause the envelope, not disable it.
- [Fix] <Jojo> IT Compatibility: ignore slide commands with both nibbles set (f.e. D55, PA1, ...)
- [Fix] <Jojo> IT Compatibility: Default Vibrato/Tremolo/Panbrello waveform values to sine waveform if out of range (e.g. S35)
+ [Imp] <Jojo> IT Saver: Compatibility export saves stereo samples again, as other tracker like Schism also support this.
+ [Fix] <Jojo> IT Saver: Fixed IT sample flags which could potentially cause IT to screw up on loading/saving MPT-made modules with samples that are not used by an instrument.
+ [Fix] <Jojo> IT Loader: ChibiTracker uses \n instead of \r in the IT comment text, which was not handled properly.
+ [Fix] <Jojo> (fix from SchismTracker) IT Loader: Ignore stereo sample flag when loading old IT files (older than IT 2.14) since Impulse Tracker did not reset this flag when importing stereo samples back then.
+ [Fix] <Jojo> ITI/ITS Loader: Sample flags were not reset when a sample slot was overwritten when loading ITI or ITS files. That way, it was possible that f.e. the bidi loop flag was not disabled when loading a new sample that had a normal loop.
+ [Fix] <Jojo> S3M/IT compatibility: Note Cut really cuts notes and does not just mute them (so that following volume commands could restore the sample)
+ [Fix] <Jojo> IT Compatibility: Always reset autovibrato settings when there's an instrument number (fix from SchismTracker)
+ [Fix] <Jojo> IT Compatibility: S77 / S79/ S7B are supposed to pause the envelope, not disable it.
+ [Fix] <Jojo> IT Compatibility: ignore slide commands with both nibbles set (f.e. D55, PA1, ...)
+ [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] <re> Fixes to instrument envelope flag handling (broken in 1.18.00.00).
-
+ [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 (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.
- [Fix] <Jojo> XM Compatibility: Volume column doesn't have an effect memory, most effects with param = 0 are useless. Those are ignored in compatibility mode playback and also when exporting the file in compatibility mode.
- [Fix] <Jojo> XM Compatibility: Improved handling of the situation when a 3xx effect was used, but previously no note was playing.
- [Fix] <Jojo> XM Compatibility: New instrument + tone portamento = ignore new instrument (fixes partytime.xm by cancer)
-
+ [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.
+ [Fix] <Jojo> XM Compatibility: Volume column doesn't have an effect memory, most effects with param = 0 are useless. Those are ignored in compatibility mode playback and also when exporting the file in compatibility mode.
+ [Fix] <Jojo> XM Compatibility: Improved handling of the situation when a 3xx effect was used, but previously no note was playing.
+ [Fix] <Jojo> XM Compatibility: New instrument + tone portamento = ignore new instrument (fixes partytime.xm by cancer)
+
MOD
- [Imp] <Jojo> Module creation: When creating a new .MOD, it has 31 sample slots by default.
- [Imp] <Jojo> Playback: When the PT1x flag is activated, Amiga note range limits are automatically taken into account.
- [Fix] <Jojo> MOD Saving: Samples were shifted badly if the sample size was odd. (wow, this is an OLD bug!)
- [Fix] <Jojo> MOD Saving: If a sample had loop points set, but loop disabled, they were still saved in the .MOD file, resulting in the loop being enabled automatically.
- [Fix] <Jojo> MOD Loader: Very short loops (4-8 bytes long) are not ignored anymore. This fixes "Crew Generation" by Necros.
-
+ [Imp] <Jojo> Module creation: When creating a new .MOD, it has 31 sample slots by default.
+ [Imp] <Jojo> Playback: When the PT1x flag is activated, Amiga note range limits are automatically taken into account.
+ [Fix] <Jojo> MOD Saving: Samples were shifted badly if the sample size was odd. (wow, this is an OLD bug!)
+ [Fix] <Jojo> MOD Saving: If a sample had loop points set, but loop disabled, they were still saved in the .MOD file, resulting in the loop being enabled automatically.
+ [Fix] <Jojo> MOD Loader: Very short loops (4-8 bytes long) are not ignored anymore. This fixes "Crew Generation" by Necros.
+
S3M
- [Imp] <Jojo> S3M Loader: Display a message if an S3M file contains Adlib instruments (rare).
- [Fix] <Jojo> S3M Playback: In ST3, muted channels are completely ignored, not even effects are interpreted. Let's try this in MPT, too.
- [Fix] <Jojo> S3M Compatibility: Slightly better handling of vibrato/tremolo waveform types (although the ST3 help screen says that continuous vibrato/tremolo is possible, it does actually not work.)
- [Reg] <Jojo> Cannot create S3M files with more than 100 patterns anymore, because...
- [Fix] <Jojo> ... it was possible to create S3M files where the 256 parapointers were not enough, resulting in incomplete/broken files.
- [Fix] <Jojo> S3M/IT Compatibility: Note Cut really cuts notes and does not just mute them (so that following volume commands could restore the sample)
-
-Other modules:
- [Imp] <Jojo> MT2 Loader (MadTracker): Make use of the "lines per beat" header field. Release node is not set anymore for each and every instrument envelope. MT2 files are now loaded as IT files by default (instead of XM) because of their extended instrument properties (NNAs, filters, etc) - I wonder what this breaks, but I don't bother much because MT2 support was already 100% broken before this. :) Some MT example tunes sound a bit better now at least.
- [Fix] <Jojo> PTM Loader: Fixed an unhandled null pointer exception that occured when loading some unsupported RAR files.
- [Fix] <Jojo> PSM16 Loader: Fix for note cut on tick 0 (warbot tune from Silverball)
- [Fix] <Jojo> Threw out the old ULT loader in favor of Storlek's loader from SchismTracker (used with permission from the author himself). This is a lot more accurate than MPT's old loader.
- [Fix] <Jojo> DBM Loader: Various fixes to increase import precision and an endianness fix
- [Fix] <Jojo> AMF DSM Loader: Made some changes to the pattern reader, which elimiante the strange "vC7" commands in the pattern. I have found no hints on whether my fix is correct or not, apart from the fact that those AMF files that I have play a lot better now. And it makes kind of sense...
- [Fix] <Jojo> IMF Loader: Some fixes copied from Schism (copied from MikMod)
+ [Imp] <Jojo> S3M Loader: Display a message if an S3M file contains Adlib instruments (rare).
+ [Fix] <Jojo> S3M Playback: In ST3, muted channels are completely ignored, not even effects are interpreted. Let's try this in MPT, too.
+ [Fix] <Jojo> S3M Compatibility: Slightly better handling of vibrato/tremolo waveform types (although the ST3 help screen says that continuous vibrato/tremolo is possible, it does actually not work.)
+ [Reg] <Jojo> Cannot create S3M files with more than 100 patterns anymore, because...
+ [Fix] <Jojo> ... it was possible to create S3M files where the 256 parapointers were not enough, resulting in incomplete/broken files.
+ [Fix] <Jojo> S3M/IT Compatibility: Note Cut really cuts notes and does not just mute them (so that following volume commands could restore the sample)
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.
+ [New] <rewbs> Added combined note delay & note cut command for MPTM only (":xy" means delay until tick x and play for y ticks).
+ [New] <Joj...
[truncated message content] |
|
From: <sag...@us...> - 2010-07-29 13:43:15
|
Revision: 665
http://modplug.svn.sourceforge.net/modplug/?rev=665&view=rev
Author: saga-games
Date: 2010-07-29 13:43:09 +0000 (Thu, 29 Jul 2010)
Log Message:
-----------
[Fix] The panic button could lead to crashes with some plugins like Superwave P8 (tx Rakib)
[Ref] Small changes here and there.
[Mod] OpenMPT: Version is now 1.18.02.07
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/version.h
trunk/OpenMPT/soundlib/Sndmix.cpp
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-28 23:19:58 UTC (rev 664)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-29 13:43:09 UTC (rev 665)
@@ -503,7 +503,7 @@
DefineKeyCommand(kcPrevDocument, 1693, kcVisible, kcNoDummy, _T("Previous Document"));
DefineKeyCommand(kcNextDocument, 1694, kcVisible, kcNoDummy, _T("Next Document"));
//time saving HACK:
- for(size_t j = kcVSTGUIStartNotes; j <= kcVSTGUINoteStopA_3; j++)
+ for(size_t j = kcVSTGUIStartNotes; j <= kcVSTGUIEndNoteStops; j++)
{
DefineKeyCommand((CommandID)j, 1695 + j - kcVSTGUIStartNotes, kcHidden, kcNoDummy, _T("Auto Note in some context"));
}
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-07-28 23:19:58 UTC (rev 664)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-07-29 13:43:09 UTC (rev 665)
@@ -2709,8 +2709,10 @@
// Panic button. At the moment, it just resets all VSTi and sample notes.
if(m_pModPlaying && m_pModPlaying->GetSoundFile())
{
+ BEGIN_CRITICAL();
+ m_pModPlaying->GetSoundFile()->ResetChannels();
m_pModPlaying->GetSoundFile()->StopAllVsti();
- m_pModPlaying->GetSoundFile()->ResetChannels();
+ END_CRITICAL();
}
}
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-07-28 23:19:58 UTC (rev 664)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-07-29 13:43:09 UTC (rev 665)
@@ -335,7 +335,7 @@
if(m_SndFile.m_nRestartPos > 0 && !CSoundFile::GetModSpecifications(nNewType).hasRestartPos)
{
m_SndFile.m_nRestartPos = 0;
- AddToLog("WARNING: Restart position is not support by the new format.\n");
+ AddToLog("WARNING: Restart position is not supported by the new format.\n");
}
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-07-28 23:19:58 UTC (rev 664)
+++ trunk/OpenMPT/mptrack/version.h 2010-07-29 13:43:09 UTC (rev 665)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 18
#define VER_MINOR 02
-#define VER_MINORMINOR 06
+#define VER_MINORMINOR 07
//Creates version number from version parts that appears in version string.
//For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of
Modified: trunk/OpenMPT/soundlib/Sndmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndmix.cpp 2010-07-28 23:19:58 UTC (rev 664)
+++ trunk/OpenMPT/soundlib/Sndmix.cpp 2010-07-29 13:43:09 UTC (rev 665)
@@ -883,14 +883,15 @@
// Master Volume + Pre-Amplification / Attenuation setup
DWORD nMasterVol;
{
- int nchn32 = 0;
+ /*int nchn32 = 0;
MODCHANNEL *pChn = Chn;
for (UINT nChn=0; nChn<m_nChannels; nChn++,pChn++)
{
//if(!(pChn->dwFlags & CHN_MUTE)) //removed by rewbs: fix http://www.modplug.com/forum/viewtopic.php?t=3358
nchn32++;
}
- nchn32 = CLAMP(nchn32, 1, 31);
+ nchn32 = CLAMP(nchn32, 1, 31);*/
+ int nchn32 = CLAMP(m_nChannels, 1, 31);
DWORD mastervol;
@@ -970,8 +971,7 @@
else
{
pChn->nPan += pChn->nPanSwing;
- if(pChn->nPan > 256) pChn->nPan = 256;
- if(pChn->nPan < 0) pChn->nPan = 0;
+ pChn->nPan = CLAMP(pChn->nPan, 0, 256);
pChn->nPanSwing = 0;
pChn->nRealPan = pChn->nPan;
}
@@ -1009,7 +1009,7 @@
if (pChn->dwFlags & CHN_TREMOLO)
{
UINT trempos = pChn->nTremoloPos;
- // IT compatibility: Why would want to not execute tremolo at volume 0?
+ // IT compatibility: Why would you not want to execute tremolo at volume 0?
if (vol > 0 || IsCompatibleMode(TRK_IMPULSETRACKER))
{
// IT compatibility: We don't need a different attenuation here because of the different tables we're going to use
@@ -1103,18 +1103,18 @@
// and release envelope beginning.
if (pIns->VolEnv.nReleaseNode != ENV_RELEASE_NODE_UNSET
&& pChn->nVolEnvPosition>=pIns->VolEnv.Ticks[pIns->VolEnv.nReleaseNode]
- && pChn->nVolEnvValueAtReleaseJump != NOT_YET_RELEASED) {
+ && pChn->nVolEnvValueAtReleaseJump != NOT_YET_RELEASED)
+ {
int envValueAtReleaseJump = pChn->nVolEnvValueAtReleaseJump;
int envValueAtReleaseNode = pIns->VolEnv.Values[pIns->VolEnv.nReleaseNode] << 2;
//If we have just hit the release node, force the current env value
//to be that of the release node. This works around the case where
// we have another node at the same position as the release node.
- if (pChn->nVolEnvPosition==pIns->VolEnv.Ticks[pIns->VolEnv.nReleaseNode]) {
- envvol=envValueAtReleaseNode;
- }
+ if (pChn->nVolEnvPosition == pIns->VolEnv.Ticks[pIns->VolEnv.nReleaseNode])
+ envvol = envValueAtReleaseNode;
- int relativeVolumeChange = (envvol-envValueAtReleaseNode)*2;
+ int relativeVolumeChange = (envvol - envValueAtReleaseNode) * 2;
envvol = envValueAtReleaseJump + relativeVolumeChange;
}
vol = (vol * CLAMP(envvol, 0, 512)) >> 8;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-28 23:20:04
|
Revision: 664
http://modplug.svn.sourceforge.net/modplug/?rev=664&view=rev
Author: saga-games
Date: 2010-07-28 23:19:58 +0000 (Wed, 28 Jul 2010)
Log Message:
-----------
[Fix] XM Loader: Compatibility flag was set too early.
[Imp] Instrument Editor: Sample Map accepts various new shortcuts now.
[Mod] Updated DE_jojo.mkb to include new shortcuts, remapped a few others (for IT-style).
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/CommandSet.h
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.h
trunk/OpenMPT/mptrack/KeyConfigDlg.cpp
trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb
trunk/OpenMPT/soundlib/Load_xm.cpp
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-28 18:28:58 UTC (rev 663)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-28 23:19:58 UTC (rev 664)
@@ -125,7 +125,7 @@
DefineKeyCommand(kcCopySelectOff, 1053, kcHidden, kcNoDummy, _T("Copy deselect key"));
DefineKeyCommand(kcNextPattern, 1054, kcVisible, kcNoDummy, _T("Next pattern"));
DefineKeyCommand(kcPrevPattern, 1055, kcVisible, kcNoDummy, _T("Previous pattern"));
- //DefineKeyCommand(kcPrevPattern, 1056, kcVisible, kcNoDummy, _T("Wipe selection"));
+ //DefineKeyCommand(kcClearSelection, 1056, kcVisible, kcNoDummy, _T("Wipe selection"));
DefineKeyCommand(kcClearRow, 1057, kcVisible, kcNoDummy, _T("Clear row"));
DefineKeyCommand(kcClearField, 1058, kcVisible, kcNoDummy, _T("Clear field"));
DefineKeyCommand(kcClearRowStep, 1059, kcVisible, kcNoDummy, _T("Clear row and step"));
@@ -588,6 +588,17 @@
DefineKeyCommand(kcVSTGUIToggleRecordParams, 1839, kcVisible, kcNoDummy, _T("Toggle parameter recording"));
DefineKeyCommand(kcVSTGUIToggleSendKeysToPlug, 1840, kcVisible, kcNoDummy, _T("Pass key presses to plugin"));
DefineKeyCommand(kcVSTGUIBypassPlug, 1841, kcVisible, kcNoDummy, _T("Bypass plugin"));
+ DefineKeyCommand(kcInsNoteMapTransposeDown, 1842, kcVisible, kcNoDummy, _T("Transpose -1 (note map)"));
+ DefineKeyCommand(kcInsNoteMapTransposeUp, 1843, kcVisible, kcNoDummy, _T("Transpose +1 (note map)"));
+ DefineKeyCommand(kcInsNoteMapTransposeOctDown, 1844, kcVisible, kcNoDummy, _T("Transpose -12 (note map)"));
+ DefineKeyCommand(kcInsNoteMapTransposeOctUp, 1845, kcVisible, kcNoDummy, _T("Transpose +12 (note map)"));
+ DefineKeyCommand(kcInsNoteMapCopyCurrentNote, 1846, kcVisible, kcNoDummy, _T("Map all notes to selected note"));
+ DefineKeyCommand(kcInsNoteMapCopyCurrentSample, 1847, kcVisible, kcNoDummy, _T("Map all notes to selected sample"));
+ DefineKeyCommand(kcInsNoteMapReset, 1848, kcVisible, kcNoDummy, _T("Reset note mapping"));
+ DefineKeyCommand(kcInsNoteMapEditSample, 1849, kcVisible, kcNoDummy, _T("Edit current sample"));
+ DefineKeyCommand(kcInsNoteMapEditSampleMap, 1850, kcVisible, kcNoDummy, _T("Edit sample map"));
+ DefineKeyCommand(kcInstrumentCtrlDuplicate, 1851, kcVisible, kcNoDummy, _T("Duplicate instrument"));
+ // Add new key commands here.
#ifdef _DEBUG
for(size_t i = 0; i < kcNumCommands; i++)
Modified: trunk/OpenMPT/mptrack/CommandSet.h
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.h 2010-07-28 18:28:58 UTC (rev 663)
+++ trunk/OpenMPT/mptrack/CommandSet.h 2010-07-28 23:19:58 UTC (rev 664)
@@ -573,7 +573,17 @@
kcInstrumentCtrlLoad=kcStartInstrumentCtrlMisc,
kcInstrumentCtrlSave,
kcInstrumentCtrlNew,
- kcEndInstrumentCtrlMisc=kcInstrumentCtrlNew,
+ kcInstrumentCtrlDuplicate,
+ kcInsNoteMapEditSampleMap,
+ kcInsNoteMapEditSample,
+ kcInsNoteMapCopyCurrentNote,
+ kcInsNoteMapCopyCurrentSample,
+ kcInsNoteMapReset,
+ kcInsNoteMapTransposeUp,
+ kcInsNoteMapTransposeDown,
+ kcInsNoteMapTransposeOctUp,
+ kcInsNoteMapTransposeOctDown,
+ kcEndInstrumentCtrlMisc=kcInsNoteMapTransposeOctDown,
kcStartSampleMisc,
kcSampleLoad=kcStartSampleMisc,
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-07-28 18:28:58 UTC (rev 663)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-07-28 23:19:58 UTC (rev 664)
@@ -61,6 +61,12 @@
if (ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT) != kcNull)
return true; // Mapped to a command, no need to pass message on.
+
+ // a bit of a hack...
+ ctx = (InputTargetContext)(kCtxCtrlInstruments);
+
+ if (ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT) != kcNull)
+ return true; // Mapped to a command, no need to pass message on.
}
}
@@ -154,7 +160,7 @@
dc.IntersectClipRect(&rcClient);
if ((m_pModDoc) && (m_cxFont > 0) && (m_cyFont > 0))
{
- BOOL bFocus = (::GetFocus() == m_hWnd) ? TRUE : FALSE;
+ bool bFocus = (::GetFocus() == m_hWnd);
CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
MODINSTRUMENT *pIns = pSndFile->Instruments[m_nInstrument];
CHAR s[64];
@@ -165,7 +171,7 @@
int ypaint = 0;
for (int ynote=0; ynote<nNotes; ynote++, ypaint+=m_cyFont, nPos++)
{
- BOOL bHighLight;
+ bool bHighLight;
// Note
s[0] = 0;
@@ -176,7 +182,7 @@
rect.SetRect(0, ypaint, m_cxFont, ypaint+m_cyFont);
DrawButtonRect(hdc, &rect, s, FALSE, FALSE);
// Mapped Note
- bHighLight = ((bFocus) && (nPos == (int)m_nNote) /*&& (!m_bIns)*/) ? TRUE : FALSE;
+ bHighLight = ((bFocus) && (nPos == (int)m_nNote) /*&& (!m_bIns)*/);
rect.left = rect.right;
rect.right = m_cxFont*2-1;
strcpy(s, "...");
@@ -203,7 +209,7 @@
dc.SetTextColor((bHighLight) ? colorTextSel : colorText);
dc.DrawText(s, -1, &rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
// Sample
- bHighLight = ((bFocus) && (nPos == (int)m_nNote) /*&& (m_bIns)*/) ? TRUE : FALSE;
+ bHighLight = ((bFocus) && (nPos == (int)m_nNote) /*&& (m_bIns)*/);
rect.left = rcClient.left + m_cxFont*2+3;
rect.right = rcClient.right;
strcpy(s, " ..");
@@ -254,15 +260,18 @@
void CNoteMapWnd::OnLButtonDown(UINT, CPoint pt)
//----------------------------------------------
{
- if ((pt.x >= m_cxFont) && (pt.x < m_cxFont*2) && (m_bIns)) {
- m_bIns = FALSE;
+ if ((pt.x >= m_cxFont) && (pt.x < m_cxFont*2) && (m_bIns))
+ {
+ m_bIns = false;
InvalidateRect(NULL, FALSE);
}
- if ((pt.x > m_cxFont*2) && (pt.x <= m_cxFont*3) && (!m_bIns)) {
- m_bIns = TRUE;
+ if ((pt.x > m_cxFont*2) && (pt.x <= m_cxFont*3) && (!m_bIns))
+ {
+ m_bIns = true;
InvalidateRect(NULL, FALSE);
}
- if ((pt.x >= 0) && (m_cyFont)) {
+ if ((pt.x >= 0) && (m_cyFont))
+ {
CRect rcClient;
GetClientRect(&rcClient);
int nNotes = (rcClient.bottom + m_cyFont - 1) / m_cyFont;
@@ -290,9 +299,11 @@
CHAR s[64];
CSoundFile *pSndFile;
MODINSTRUMENT *pIns;
+ CInputHandler* ih = CMainFrame::GetInputHandler();
pSndFile = m_pModDoc->GetSoundFile();
pIns = pSndFile->Instruments[m_nInstrument];
+
if (pIns)
{
HMENU hMenu = ::CreatePopupMenu();
@@ -300,7 +311,7 @@
if (hMenu)
{
- AppendMenu(hMenu, MF_STRING, ID_INSTRUMENT_SAMPLEMAP, "Edit Sample &Map");
+ AppendMenu(hMenu, MF_STRING, ID_INSTRUMENT_SAMPLEMAP, "Edit Sample &Map\t" + ih->GetKeyTextFromCommand(kcInsNoteMapEditSampleMap));
if (hSubMenu)
{
BYTE smpused[(MAX_SAMPLES+7)/8];
@@ -321,24 +332,24 @@
AppendMenu(hSubMenu, MF_STRING, ID_NOTEMAP_EDITSAMPLE+j, s);
}
}
- AppendMenu(hMenu, MF_POPUP, (UINT)hSubMenu, "&Edit Sample");
+ AppendMenu(hMenu, MF_POPUP, (UINT)hSubMenu, "&Edit Sample\t" + ih->GetKeyTextFromCommand(kcInsNoteMapEditSample));
AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);
}
- wsprintf(s, "Map all notes to &sample %d", pIns->Keyboard[m_nNote]);
+ wsprintf(s, "Map all notes to &sample %d\t" + ih->GetKeyTextFromCommand(kcInsNoteMapCopyCurrentSample), pIns->Keyboard[m_nNote]);
AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_COPY_SMP, s);
if(pSndFile->GetType() != MOD_TYPE_XM)
{
if(pIns->NoteMap[m_nNote] < NOTE_MIN_SPECIAL)
- wsprintf(s, "Map all ¬es to %s", pSndFile->GetNoteName(pIns->NoteMap[m_nNote], m_nInstrument).c_str());
+ wsprintf(s, "Map all ¬es to %s\t" + ih->GetKeyTextFromCommand(kcInsNoteMapCopyCurrentNote), pSndFile->GetNoteName(pIns->NoteMap[m_nNote], m_nInstrument).c_str());
else
- wsprintf(s, "Map all ¬es to %s", szSpecialNoteNames[pIns->NoteMap[m_nNote] - NOTE_MIN_SPECIAL]);
+ wsprintf(s, "Map all ¬es to %s\t" + ih->GetKeyTextFromCommand(kcInsNoteMapCopyCurrentNote), szSpecialNoteNames[pIns->NoteMap[m_nNote] - NOTE_MIN_SPECIAL]);
AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_COPY_NOTE, s);
- AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_TRANS_UP, "Transpose map &up");
- AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_TRANS_DOWN, "Transpose map &down");
+ AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_TRANS_UP, "Transpose map &up\t" + ih->GetKeyTextFromCommand(kcInsNoteMapTransposeUp));
+ AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_TRANS_DOWN, "Transpose map &down\t" + ih->GetKeyTextFromCommand(kcInsNoteMapTransposeDown));
}
- AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_RESET, "&Reset note mapping");
- AppendMenu(hMenu, MF_STRING, ID_INSTRUMENT_DUPLICATE, "Duplicate &Instrument\tShift+New");
+ AppendMenu(hMenu, MF_STRING, ID_NOTEMAP_RESET, "&Reset note mapping\t" + ih->GetKeyTextFromCommand(kcInsNoteMapReset));
+ AppendMenu(hMenu, MF_STRING, ID_INSTRUMENT_DUPLICATE, "Duplicate &Instrument\t" + ih->GetKeyTextFromCommand(kcInstrumentCtrlDuplicate));
SetMenuDefaultItem(hMenu, ID_INSTRUMENT_SAMPLEMAP, FALSE);
ClientToScreen(&pt);
::TrackPopupMenu(hMenu, TPM_LEFTALIGN|TPM_RIGHTBUTTON, pt.x, pt.y, 0, m_hWnd, NULL);
@@ -411,6 +422,7 @@
MODINSTRUMENT *pIns;
pSndFile = m_pModDoc->GetSoundFile();
+ if(pSndFile == nullptr) return;
pIns = pSndFile->Instruments[m_nInstrument];
if (pIns)
{
@@ -503,11 +515,15 @@
return NULL;
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
+ CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
+ MODINSTRUMENT *pIns = nullptr;
+ if(pSndFile)
+ {
+ pIns = pSndFile->Instruments[m_nInstrument];
+ }
- //Handle notes
+ // Handle notes
-
-
if (wParam>=kcInsNoteMapStartNotes && wParam<=kcInsNoteMapEndNotes)
{
//Special case: number keys override notes if we're in the sample # column.
@@ -524,6 +540,26 @@
StopNote(m_nPlayingNote);
return wParam;
}
+
+ // Other shortcuts
+
+ switch(wParam)
+ {
+ case kcInsNoteMapTransposeDown: MapTranspose(-1); return wParam;
+ case kcInsNoteMapTransposeUp: MapTranspose(1); return wParam;
+ case kcInsNoteMapTransposeOctDown: MapTranspose(-12); return wParam;
+ case kcInsNoteMapTransposeOctUp: MapTranspose(12); return wParam;
+
+ case kcInsNoteMapCopyCurrentSample: OnMapCopySample(); return wParam;
+ case kcInsNoteMapCopyCurrentNote: OnMapCopyNote(); return wParam;
+ case kcInsNoteMapReset: OnMapReset(); return wParam;
+
+ case kcInsNoteMapEditSample: if(pIns) OnEditSample(pIns->Keyboard[m_nNote] + ID_NOTEMAP_EDITSAMPLE); return wParam;
+ case kcInsNoteMapEditSampleMap: OnEditSampleMap(); return wParam;
+
+ // Parent shortcuts (also displayed in context menu of this control)
+ case kcInstrumentCtrlDuplicate: OnInstrumentDuplicate(); return wParam;
+ }
return NULL;
}
@@ -538,11 +574,11 @@
if (!m_bIns && (pSndFile->m_nType & (MOD_TYPE_IT|MOD_TYPE_MPT)))
{
UINT n = pIns->NoteMap[m_nNote];
- BOOL bOk = FALSE;
+ bool bOk = false;
if ((note > 0) && (note <= NOTE_MAX))
{
n = note;
- bOk = TRUE;
+ bOk = true;
}
if (n != pIns->NoteMap[m_nNote])
{
@@ -565,26 +601,30 @@
{
CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
MODINSTRUMENT *pIns = pSndFile->Instruments[m_nInstrument];
- if ((pIns) && (m_nNote < NOTE_MAX)) {
+ if ((pIns) && (m_nNote < NOTE_MAX))
+ {
- if ((m_bIns) && (((c >= '0') && (c <= '9')) || (c == ' '))) { //in sample # column
-
+ if ((m_bIns) && (((c >= '0') && (c <= '9')) || (c == ' '))) //in sample # column
+ {
UINT n = m_nOldIns;
- if (c != ' ') {
- n = (10*pIns->Keyboard[m_nNote] + (c - '0')) % 10000;
+ if (c != ' ')
+ {
+ n = (10 * pIns->Keyboard[m_nNote] + (c - '0')) % 10000;
if ((n >= MAX_SAMPLES) || ((pSndFile->m_nSamples < 1000) && (n >= 1000))) n = (n % 1000);
if ((n >= MAX_SAMPLES) || ((pSndFile->m_nSamples < 100) && (n >= 100))) n = (n % 100); else
if ((n > 31) && (pSndFile->m_nSamples < 32) && (n % 10)) n = (n % 10);
}
- if (n != pIns->Keyboard[m_nNote]) {
+ if (n != pIns->Keyboard[m_nNote])
+ {
pIns->Keyboard[m_nNote] = n;
m_pModDoc->SetModified();
InvalidateRect(NULL, FALSE);
PlayNote(m_nNote+1);
}
- if (c == ' ') {
+ if (c == ' ')
+ {
if (m_nNote < NOTE_MAX - 1) m_nNote++;
InvalidateRect(NULL, FALSE);
PlayNote(m_nNote);
@@ -592,27 +632,30 @@
return true;
}
- else if ((!m_bIns) && (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) { //in note column
-
+ else if ((!m_bIns) && (pSndFile->m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT))) //in note column
+ {
UINT n = pIns->NoteMap[m_nNote];
- if ((c >= '0') && (c <= '9')) {
- if (n) {
+ if ((c >= '0') && (c <= '9'))
+ {
+ if (n)
n = ((n-1) % 12) + (c-'0')*12 + 1;
- } else {
+ else
n = (m_nNote % 12) + (c-'0')*12 + 1;
- }
- } else if (c == ' ') {
+ } else if (c == ' ')
+ {
n = (m_nOldNote) ? m_nOldNote : m_nNote+1;
}
- if (n != pIns->NoteMap[m_nNote]) {
+ if (n != pIns->NoteMap[m_nNote])
+ {
pIns->NoteMap[m_nNote] = n;
m_pModDoc->SetModified();
InvalidateRect(NULL, FALSE);
}
- if (c == ' ') {
+ if (c == ' ')
+ {
SetCurrentNote(m_nNote+1);
}
@@ -627,7 +670,7 @@
bool CNoteMapWnd::HandleNav(WPARAM k)
//------------------------------------
{
- BOOL bRedraw = FALSE;
+ bool bRedraw = false;
//HACK: handle numpad (convert numpad number key to normal number key)
if ((k >= VK_NUMPAD0) && (k <= VK_NUMPAD9)) return HandleChar(k-VK_NUMPAD0+'0');
@@ -635,26 +678,26 @@
switch(k)
{
case VK_RIGHT:
- if (!m_bIns) { m_bIns = TRUE; bRedraw = TRUE; } else
- if (m_nNote < NOTE_MAX - 1) { m_nNote++; m_bIns = FALSE; bRedraw = TRUE; }
+ if (!m_bIns) { m_bIns = true; bRedraw = true; } else
+ if (m_nNote < NOTE_MAX - 1) { m_nNote++; m_bIns = false; bRedraw = true; }
break;
case VK_LEFT:
- if (m_bIns) { m_bIns = FALSE; bRedraw = TRUE; } else
- if (m_nNote) { m_nNote--; m_bIns = TRUE; bRedraw = TRUE; }
+ if (m_bIns) { m_bIns = false; bRedraw = true; } else
+ if (m_nNote) { m_nNote--; m_bIns = true; bRedraw = true; }
break;
case VK_UP:
- if (m_nNote > 0) { m_nNote--; bRedraw = TRUE; }
+ if (m_nNote > 0) { m_nNote--; bRedraw = true; }
break;
case VK_DOWN:
- if (m_nNote < NOTE_MAX - 1) { m_nNote++; bRedraw = TRUE; }
+ if (m_nNote < NOTE_MAX - 1) { m_nNote++; bRedraw = true; }
break;
case VK_PRIOR:
- if (m_nNote > 3) { m_nNote-=3; bRedraw = TRUE; } else
- if (m_nNote > 0) { m_nNote = 0; bRedraw = TRUE; }
+ if (m_nNote > 3) { m_nNote -= 3; bRedraw = true; } else
+ if (m_nNote > 0) { m_nNote = 0; bRedraw = true; }
break;
case VK_NEXT:
- if (m_nNote+3 < NOTE_MAX) { m_nNote+=3; bRedraw = TRUE; } else
- if (m_nNote < NOTE_MAX - 1) { m_nNote = NOTE_MAX - 1; bRedraw = TRUE; }
+ if (m_nNote+3 < NOTE_MAX) { m_nNote += 3; bRedraw = true; } else
+ if (m_nNote < NOTE_MAX - 1) { m_nNote = NOTE_MAX - 1; bRedraw = true; }
break;
case VK_TAB:
return true;
@@ -2528,6 +2571,8 @@
case kcInstrumentCtrlLoad: OnInstrumentOpen(); return wParam;
case kcInstrumentCtrlSave: OnInstrumentSave(); return wParam;
case kcInstrumentCtrlNew: OnInstrumentNew(); return wParam;
+
+ case kcInstrumentCtrlDuplicate: OnInstrumentDuplicate(); return wParam;
}
return 0;
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.h
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.h 2010-07-28 18:28:58 UTC (rev 663)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.h 2010-07-28 23:19:58 UTC (rev 664)
@@ -13,7 +13,8 @@
protected:
CModDoc *m_pModDoc;
CCtrlInstruments *m_pParent;
- UINT m_nInstrument, m_nNote, m_bIns, m_nOldNote, m_nOldIns;
+ UINT m_nInstrument, m_nNote, m_nOldNote, m_nOldIns;
+ bool m_bIns;
int m_nPlayingNote;
HFONT m_hFont;
int m_cxFont, m_cyFont;
@@ -23,7 +24,18 @@
void MapTranspose(int nAmount);
public:
- CNoteMapWnd() { m_nPlayingNote=-1; m_nNote = NOTE_MIDDLEC - 1; m_pModDoc = NULL; m_nInstrument = 0; m_bIns = FALSE; m_cxFont = m_cyFont = 0; m_hFont = NULL; m_nOldNote = m_nOldIns = 0; m_pParent = NULL; }
+ CNoteMapWnd()
+ {
+ m_nPlayingNote = -1;
+ m_nNote = NOTE_MIDDLEC - 1;
+ m_pModDoc = nullptr;
+ m_nInstrument = 0;
+ m_bIns = false;
+ m_cxFont = m_cyFont = 0;
+ m_hFont = NULL;
+ m_nOldNote = m_nOldIns = 0;
+ m_pParent = NULL;
+ }
BOOL SetCurrentInstrument(CModDoc *pModDoc, UINT nIns);
BOOL SetCurrentNote(UINT nNote);
VOID Init(CCtrlInstruments *pParent) { m_pParent = pParent; }
Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp
===================================================================
--- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2010-07-28 18:28:58 UTC (rev 663)
+++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2010-07-28 23:19:58 UTC (rev 664)
@@ -304,11 +304,13 @@
commandCategories.Add(*newCat);
delete newCat;
- newCat = new CommandCategory(" Instrument [Top]", kCtxCtrlInstruments);
+ newCat = new CommandCategory(" Instrument Editor", kCtxCtrlInstruments);
+ for (int c=kcStartInstrumentCtrlMisc; c<=kcEndInstrumentCtrlMisc; c++)
+ newCat->commands.Add(c);
commandCategories.Add(*newCat);
delete newCat;
- newCat = new CommandCategory(" Instrument Editor", kCtxViewInstruments);
+ newCat = new CommandCategory(" Envelope Editor", kCtxViewInstruments);
for (int c=kcStartInstrumentMisc; c<=kcEndInstrumentMisc; c++)
newCat->commands.Add(c);
commandCategories.Add(*newCat);
@@ -355,7 +357,7 @@
// Fills command list and automatically selects first command.
void COptionsKeyboard::OnCategorySelChanged()
-//----------------------------------------
+//-------------------------------------------
{
CommandID nCmd = (CommandID)m_lbnCommandKeys.GetItemData( m_lbnCommandKeys.GetCurSel() );
int nCat = m_cmbCategory.GetItemData( m_cmbCategory.GetCurSel() );
@@ -385,7 +387,7 @@
// Fills key choice list and automatically selects first key choice
void COptionsKeyboard::OnCommandKeySelChanged()
-//----------------------------------------
+//---------------------------------------------
{
CommandID nCmd = (CommandID)m_lbnCommandKeys.GetItemData( m_lbnCommandKeys.GetCurSel() );
CString str;
Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb
===================================================================
--- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2010-07-28 18:28:58 UTC (rev 663)
+++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2010-07-28 23:19:58 UTC (rev 664)
@@ -31,15 +31,17 @@
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:1021:0:112:1 //View General: F1 (KeyDown)
0:1022:4:80:1 //View Pattern: Alt+P (KeyDown)
+0:1022:0:113:1 //View Pattern: F2 (KeyDown)
0:1023:4:83:1 //View Samples: Alt+S (KeyDown)
0:1024:4:78:1 //View Instruments: Alt+N (KeyDown)
+0:1024:0:115:1 //View Instruments: F4 (KeyDown)
0:1025:1:120:1 //View Comments: Shift+F9 (KeyDown)
0:1025:4:67:1 //View Comments: Alt+C (KeyDown)
0:1368:2:113:1 //Toggle Tree View: Ctrl+F2 (KeyDown)
0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown)
-0:1781:2:114:1 //View MIDI mapping: Ctrl+F3 (KeyDown)
-0:1370:0:112:1 //Help (to do): F1 (KeyDown)
+0:1781:1:112:1 //View MIDI mapping: Shift+F1 (KeyDown)
0:1032:2:111:5 //Previous instrument: Ctrl+ (ZEHNERTASTATUR) (KeyDown|KeyHold)
0:1032:2:38:5 //Previous instrument: Ctrl+NACH-OBEN (KeyDown|KeyHold)
0:1033:2:106:5 //Next instrument: Ctrl+ (ZEHNERTASTATUR) (KeyDown|KeyHold)
@@ -85,6 +87,7 @@
2:1772:2:93:1 //Show pattern properties window: Ctrl+ANWENDUNG (KeyDown)
2:1819:2:69:1 //Split Keyboard Settings dialog: Ctrl+E (KeyDown)
2:1780:2:80:1 //Show playback time at current row: Ctrl+P (KeyDown)
+2:1005:2:85:1 //Mute current channel: Ctrl+U (KeyDown)
2:1786:2:82:1 //Reset channel: Ctrl+R (KeyDown)
2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold)
2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold)
@@ -317,6 +320,16 @@
//----( Sample Context [top] (16) )------------
//----( Instrument Context [top] (17) )------------
+17:1851:2:68:1 //Duplicate instrument: Ctrl+D (KeyDown)
+17:1850:3:69:1 //Edit sample map: Shift+Ctrl+E (KeyDown)
+17:1849:2:69:1 //Edit current sample: Ctrl+E (KeyDown)
+17:1846:3:77:1 //Map all notes to selected note: Shift+Ctrl+M (KeyDown)
+17:1847:2:77:1 //Map all notes to selected sample: Ctrl+M (KeyDown)
+17:1848:2:82:1 //Reset note mapping: Ctrl+R (KeyDown)
+17:1843:2:81:1 //Transpose +1 (note map): Ctrl+Q (KeyDown)
+17:1842:2:65:1 //Transpose -1 (note map): Ctrl+A (KeyDown)
+17:1845:3:81:1 //Transpose +12 (note map): Shift+Ctrl+Q (KeyDown)
+17:1844:3:65:1 //Transpose -12 (note map): Shift+Ctrl+A (KeyDown)
//----( Comments Context [top] (18) )------------
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-07-28 18:28:58 UTC (rev 663)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-07-28 23:19:58 UTC (rev 664)
@@ -245,8 +245,6 @@
UINT unused_samples; // dito
bool bMadeWithModPlug = false, bProbablyMadeWithModPlug = false, bProbablyMPT109 = false, bIsFT2 = false;
- // set this here already because XMs compressed with BoobieSqueezer will exit the function early
- SetModFlag(MSF_COMPATIBLE_PLAY, true);
m_nChannels = 0;
if ((!lpStream) || (dwMemLength < 0xAA)) return false; // the smallest XM I know is 174 Bytes
@@ -292,6 +290,9 @@
dwMemPos = xmheader.size + 60;
+ // set this here already because XMs compressed with BoobieSqueezer will exit the function early
+ SetModFlag(MSF_COMPATIBLE_PLAY, true);
+
if(xmheader.xmversion >= 0x0104)
{
if (dwMemPos + 8 >= dwMemLength) return true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-28 18:29:07
|
Revision: 663
http://modplug.svn.sourceforge.net/modplug/?rev=663&view=rev
Author: saga-games
Date: 2010-07-28 18:28:58 +0000 (Wed, 28 Jul 2010)
Log Message:
-----------
[Ref] Simplified the ~2600 lines of keycommand definitions to ~500 lines by using a simple function instead of five lines of c&p code per keycommand.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/CommandSet.cpp
trunk/OpenMPT/mptrack/CommandSet.h
Modified: trunk/OpenMPT/mptrack/CommandSet.cpp
===================================================================
--- trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-27 21:55:26 UTC (rev 662)
+++ trunk/OpenMPT/mptrack/CommandSet.cpp 2010-07-28 18:28:58 UTC (rev 663)
@@ -49,2559 +49,563 @@
//commands.RemoveAll();
}
+
//-------------------------------------------------------
// Setup
//-------------------------------------------------------
+
+// Helper function for setting up commands
+inline void CCommandSet::DefineKeyCommand(CommandID kc, UINT uid, enmKcVisibility visibility, enmKcDummy dummy, CString message)
+//------------------------------------------------------------------------------------------------------------------------------
+{
+ commands[kc].UID = uid;
+ commands[kc].isHidden = (visibility == kcHidden) ? true : false;
+ commands[kc].isDummy = (dummy == kcDummy) ? true : false;
+ commands[kc].Message = message;
+}
+
//Get command descriptions etc.. loaded up.
void CCommandSet::SetupCommands()
+//-------------------------------
{ //TODO: make this hideous list a bit nicer, with a constructor or somthing.
//NOTE: isHidden implies automatically set, since the user will not be able to see it.
- commands[kcPatternRecord].UID = 1001;
- commands[kcPatternRecord].isHidden = false;
- commands[kcPatternRecord].isDummy = false;
- commands[kcPatternRecord].Message = "Enable recording";
-
- commands[kcPatternPlayRow].UID = 1002;
- commands[kcPatternPlayRow].isHidden = false;
- commands[kcPatternPlayRow].isDummy = false;
- commands[kcPatternPlayRow].Message = "Play row";
-
- commands[kcCursorCopy].UID = 1003;
- commands[kcCursorCopy].isHidden = false;
- commands[kcCursorCopy].isDummy = false;
- commands[kcCursorCopy].Message = "Quick copy";
-
- commands[kcCursorPaste].UID = 1004;
- commands[kcCursorPaste].isHidden = false;
- commands[kcCursorPaste].isDummy = false;
- commands[kcCursorPaste].Message = "Quick paste";
-
- commands[kcChannelMute].UID = 1005;
- commands[kcChannelMute].isHidden = false;
- commands[kcChannelMute].isDummy = false;
- commands[kcChannelMute].Message = "Mute current channel";
-
- commands[kcChannelSolo].UID = 1006;
- commands[kcChannelSolo].isHidden = false;
- commands[kcChannelSolo].isDummy = false;
- commands[kcChannelSolo].Message = "Solo current channel";
-
- commands[kcTransposeUp].UID = 1007;
- commands[kcTransposeUp].isHidden = false;
- commands[kcTransposeUp].isDummy = false;
- commands[kcTransposeUp].Message = "Transpose +1";
-
- commands[kcTransposeDown].UID = 1008;
- commands[kcTransposeDown].isHidden = false;
- commands[kcTransposeDown].isDummy = false;
- commands[kcTransposeDown].Message = "Transpose -1";
-
- commands[kcTransposeOctUp].UID = 1009;
- commands[kcTransposeOctUp].isHidden = false;
- commands[kcTransposeOctUp].isDummy = false;
- commands[kcTransposeOctUp].Message = "Transpose +12";
-
- commands[kcTransposeOctDown].UID = 1010;
- commands[kcTransposeOctDown].isHidden = false;
- commands[kcTransposeOctDown].isDummy = false;
- commands[kcTransposeOctDown].Message = "Transpose -12";
-
- commands[kcSelectColumn].UID = 1011;
- commands[kcSelectColumn].isHidden = false;
- commands[kcSelectColumn].isDummy = false;
- commands[kcSelectColumn].Message = "Select channel / Select all";
-
- commands[kcPatternAmplify].UID = 1012;
- commands[kcPatternAmplify].isHidden = false;
- commands[kcPatternAmplify].isDummy = false;
- commands[kcPatternAmplify].Message = "Amplify selection";
-
- commands[kcPatternSetInstrument].UID = 1013;
- commands[kcPatternSetInstrument].isHidden = false;
- commands[kcPatternSetInstrument].isDummy = false;
- commands[kcPatternSetInstrument].Message = "Apply current instrument";
-
- commands[kcPatternInterpolateVol].UID = 1014;
- commands[kcPatternInterpolateVol].isHidden = false;
- commands[kcPatternInterpolateVol].isDummy = false;
- commands[kcPatternInterpolateVol].Message = "Interpolate volume";
-
- commands[kcPatternInterpolateEffect].UID = 1015;
- commands[kcPatternInterpolateEffect].isHidden = false;
- commands[kcPatternInterpolateEffect].isDummy = false;
- commands[kcPatternInterpolateEffect].Message = "Interpolate effect";
-
- commands[kcPatternVisualizeEffect].UID = 1016;
- commands[kcPatternVisualizeEffect].isHidden = false;
- commands[kcPatternVisualizeEffect].isDummy = false;
- commands[kcPatternVisualizeEffect].Message = "Open effect visualizer";
-
- commands[kcPatternJumpDownh1].UID = 1017;
- commands[kcPatternJumpDownh1].isHidden = false;
- commands[kcPatternJumpDownh1].isDummy = false;
- commands[kcPatternJumpDownh1].Message = "Jump down by measure";
-
- commands[kcPatternJumpUph1].UID = 1018;
- commands[kcPatternJumpUph1].isHidden = false;
- commands[kcPatternJumpUph1].isDummy = false;
- commands[kcPatternJumpUph1].Message = "Jump up by measure";
-
- commands[kcPatternSnapDownh1].UID = 1019;
- commands[kcPatternSnapDownh1].isHidden = false;
- commands[kcPatternSnapDownh1].isDummy = false;
- commands[kcPatternSnapDownh1].Message = "Snap down to measure";
-
- commands[kcPatternSnapUph1].UID = 1020;
- commands[kcPatternSnapUph1].isHidden = false;
- commands[kcPatternSnapUph1].isDummy = false;
- commands[kcPatternSnapUph1].Message = "Snap up to measure";
-
- commands[kcViewGeneral].UID = 1021;
- commands[kcViewGeneral].isHidden = false;
- commands[kcViewGeneral].isDummy = false;
- commands[kcViewGeneral].Message = "View General";
-
- commands[kcViewPattern].UID = 1022;
- commands[kcViewPattern].isHidden = false;
- commands[kcViewPattern].isDummy = false;
- commands[kcViewPattern].Message = "View Pattern";
-
- commands[kcViewSamples].UID = 1023;
- commands[kcViewSamples].isHidden = false;
- commands[kcViewSamples].isDummy = false;
- commands[kcViewSamples].Message = "View Samples";
-
- commands[kcViewInstruments].UID = 1024;
- commands[kcViewInstruments].isHidden = false;
- commands[kcViewInstruments].isDummy = false;
- commands[kcViewInstruments].Message = "View Instruments";
-
- commands[kcViewComments].UID = 1025;
- commands[kcViewComments].isHidden = false;
- commands[kcViewComments].isDummy = false;
- commands[kcViewComments].Message = "View Comments";
-
- commands[kcPlayPatternFromCursor].UID = 1026;
- commands[kcPlayPatternFromCursor].isHidden = false;
- commands[kcPlayPatternFromCursor].isDummy = false;
- commands[kcPlayPatternFromCursor].Message = "Play pattern from cursor";
-
- commands[kcPlayPatternFromStart].UID = 1027;
- commands[kcPlayPatternFromStart].isHidden = false;
- commands[kcPlayPatternFromStart].isDummy = false;
- commands[kcPlayPatternFromStart].Message = "Play pattern from start";
-
- commands[kcPlaySongFromCursor].UID = 1028;
- commands[kcPlaySongFromCursor].isHidden = false;
- commands[kcPlaySongFromCursor].isDummy = false;
- commands[kcPlaySongFromCursor].Message = "Play song from cursor";
-
- commands[kcPlaySongFromStart].UID = 1029;
- commands[kcPlaySongFromStart].isHidden = false;
- commands[kcPlaySongFromStart].isDummy = false;
- commands[kcPlaySongFromStart].Message = "Play song from start";
-
- commands[kcPlayPauseSong].UID = 1030;
- commands[kcPlayPauseSong].isHidden = false;
- commands[kcPlayPauseSong].isDummy = false;
- commands[kcPlayPauseSong].Message = "Play song/Pause song";
-
- commands[kcPauseSong].UID = 1031;
- commands[kcPauseSong].isHidden = false;
- commands[kcPauseSong].isDummy = false;
- commands[kcPauseSong].Message = "Pause song";
-
- commands[kcPrevInstrument].UID = 1032;
- commands[kcPrevInstrument].isHidden = false;
- commands[kcPrevInstrument].isDummy = false;
- commands[kcPrevInstrument].Message = "Previous instrument";
-
- commands[kcNextInstrument].UID = 1033;
- commands[kcNextInstrument].isHidden = false;
- commands[kcNextInstrument].isDummy = false;
- commands[kcNextInstrument].Message = "Next instrument";
-
- commands[kcPrevOrder].UID = 1034;
- commands[kcPrevOrder].isHidden = false;
- commands[kcPrevOrder].isDummy = false;
- commands[kcPrevOrder].Message = "Previous order";
-
- commands[kcNextOrder].UID = 1035;
- commands[kcNextOrder].isHidden = false;
- commands[kcNextOrder].isDummy = false;
- commands[kcNextOrder].Message = "Next order";
-
- commands[kcPrevOctave].UID = 1036;
- commands[kcPrevOctave].isHidden = false;
- commands[kcPrevOctave].isDummy = false;
- commands[kcPrevOctave].Message = "Previous octave";
-
- commands[kcNextOctave].UID = 1037;
- commands[kcNextOctave].isHidden = false;
- commands[kcNextOctave].isDummy = false;
- commands[kcNextOctave].Message = "Next octave";
-
- commands[kcNavigateDown].UID = 1038;
- commands[kcNavigateDown].isHidden = false;
- commands[kcNavigateDown].isDummy = false;
- commands[kcNavigateDown].Message = "Navigate down by 1 row";
-
- commands[kcNavigateUp].UID = 1039;
- commands[kcNavigateUp].isHidden = false;
- commands[kcNavigateUp].isDummy = false;
- commands[kcNavigateUp].Message = "Navigate up by 1 row";
-
- commands[kcNavigateLeft].UID = 1040;
- commands[kcNavigateLeft].isHidden = false;
- commands[kcNavigateLeft].isDummy = false;
- commands[kcNavigateLeft].Message = "Navigate left";
-
- commands[kcNavigateRight].UID = 1041;
- commands[kcNavigateRight].isHidden = false;
- commands[kcNavigateRight].isDummy = false;
- commands[kcNavigateRight].Message = "Navigate right";
-
- commands[kcNavigateNextChan].UID = 1042;
- commands[kcNavigateNextChan].isHidden = false;
- commands[kcNavigateNextChan].isDummy = false;
- commands[kcNavigateNextChan].Message = "Navigate to next channel";
-
- commands[kcNavigatePrevChan].UID = 1043;
- commands[kcNavigatePrevChan].isHidden = false;
- commands[kcNavigatePrevChan].isDummy = false;
- commands[kcNavigatePrevChan].Message = "Navigate to previous channel";
-
- commands[kcHomeHorizontal].UID = 1044;
- commands[kcHomeHorizontal].isHidden = false;
- commands[kcHomeHorizontal].isDummy = false;
- commands[kcHomeHorizontal].Message = "Go to first channel";
-
- commands[kcHomeVertical].UID = 1045;
- commands[kcHomeVertical].isHidden = false;
- commands[kcHomeVertical].isDummy = false;
- commands[kcHomeVertical].Message = "Go to first row";
-
- commands[kcHomeAbsolute].UID = 1046;
- commands[kcHomeAbsolute].isHidden = false;
- commands[kcHomeAbsolute].isDummy = false;
- commands[kcHomeAbsolute].Message = "Go to first row of first channel";
-
- commands[kcEndHorizontal].UID = 1047;
- commands[kcEndHorizontal].isHidden = false;
- commands[kcEndHorizontal].isDummy = false;
- commands[kcEndHorizontal].Message = "Go to last channel";
-
- commands[kcEndVertical].UID = 1048;
- commands[kcEndVertical].isHidden = false;
- commands[kcEndVertical].isDummy = false;
- commands[kcEndVertical].Message = "Go to last row";
-
- commands[kcEndAbsolute].UID = 1049;
- commands[kcEndAbsolute].isHidden = false;
- commands[kcEndAbsolute].isDummy = false;
- commands[kcEndAbsolute].Message = "Go to last row of last channel";
-
- commands[kcSelect].UID = 1050;
- commands[kcSelect].isHidden = false;
- commands[kcSelect].isDummy = false;
- commands[kcSelect].Message = "Selection key";
-
- commands[kcCopySelect].UID = 1051;
- commands[kcCopySelect].isHidden = false;
- commands[kcCopySelect].isDummy = false;
- commands[kcCopySelect].Message = "Copy select key";
-
- commands[kcSelectOff].UID = 1052;
- commands[kcSelectOff].isHidden = true;
- commands[kcSelectOff].isDummy = false;
- commands[kcSelectOff].Message = "Deselect";
-
- commands[kcCopySelectOff].UID = 1053;
- commands[kcCopySelectOff].isHidden = true;
- commands[kcCopySelectOff].isDummy = false;
- commands[kcCopySelectOff].Message = "Copy deselect key";
-
- commands[kcNextPattern].UID = 1054;
- commands[kcNextPattern].isHidden = false;
- commands[kcNextPattern].isDummy = false;
- commands[kcNextPattern].Message = "Next pattern";
-
- commands[kcPrevPattern].UID = 1055;
- commands[kcPrevPattern].isHidden = false;
- commands[kcPrevPattern].isDummy = false;
- commands[kcPrevPattern].Message = "Previous pattern";
-
-/* commands[kcClearSelection].UID = 1056;
- commands[kcClearSelection].isHidden = false;
- commands[kcClearSelection].isDummy = false;
- commands[kcClearSelection].Message = "Wipe selection";*/
-
- commands[kcClearRow].UID = 1057;
- commands[kcClearRow].isHidden = false;
- commands[kcClearRow].isDummy = false;
- commands[kcClearRow].Message = "Clear row";
-
- commands[kcClearField].UID = 1058;
- commands[kcClearField].isHidden = false;
- commands[kcClearField].isDummy = false;
- commands[kcClearField].Message = "Clear field";
-
- commands[kcClearRowStep].UID = 1059;
- commands[kcClearRowStep].isHidden = false;
- commands[kcClearRowStep].isDummy = false;
- commands[kcClearRowStep].Message = "Clear row and step";
-
- commands[kcClearFieldStep].UID = 1060;
- commands[kcClearFieldStep].isHidden = false;
- commands[kcClearFieldStep].isDummy = false;
- commands[kcClearFieldStep].Message = "Clear field and step";
-
- commands[kcDeleteRows].UID = 1061;
- commands[kcDeleteRows].isHidden = false;
- commands[kcDeleteRows].isDummy = false;
- commands[kcDeleteRows].Message = "Delete rows";
-
- commands[kcShowNoteProperties].UID = 1062;
- commands[kcShowNoteProperties].isHidden = false;
- commands[kcShowNoteProperties].isDummy = false;
- commands[kcShowNoteProperties].Message = "Show note properties";
-
- commands[kcShowEditMenu].UID = 1063;
- commands[kcShowEditMenu].isHidden = false;
- commands[kcShowEditMenu].isDummy = false;
- commands[kcShowEditMenu].Message = "Show context (right-click) menu";
-
- commands[kcVPNoteC_0].UID = 1064;
- commands[kcVPNoteC_0].isHidden = false;
- commands[kcVPNoteC_0].isDummy = false;
- commands[kcVPNoteC_0].Message = "Base octave C";
-
- commands[kcVPNoteCS0].UID = 1065;
- commands[kcVPNoteCS0].isHidden = false;
- commands[kcVPNoteCS0].isDummy = false;
- commands[kcVPNoteCS0].Message = "Base octave C#";
-
- commands[kcVPNoteD_0].UID = 1066;
- commands[kcVPNoteD_0].isHidden = false;
- commands[kcVPNoteD_0].isDummy = false;
- commands[kcVPNoteD_0].Message = "Base octave D";
-
- commands[kcVPNoteDS0].UID = 1067;
- commands[kcVPNoteDS0].isHidden = false;
- commands[kcVPNoteDS0].isDummy = false;
- commands[kcVPNoteDS0].Message = "Base octave D#";
-
- commands[kcVPNoteE_0].UID = 1068;
- commands[kcVPNoteE_0].isHidden = false;
- commands[kcVPNoteE_0].isDummy = false;
- commands[kcVPNoteE_0].Message = "Base octave E";
-
- commands[kcVPNoteF_0].UID = 1069;
- commands[kcVPNoteF_0].isHidden = false;
- commands[kcVPNoteF_0].isDummy = false;
- commands[kcVPNoteF_0].Message = "Base octave F";
-
- commands[kcVPNoteFS0].UID = 1070;
- commands[kcVPNoteFS0].isHidden = false;
- commands[kcVPNoteFS0].isDummy = false;
- commands[kcVPNoteFS0].Message = "Base octave F#";
-
- commands[kcVPNoteG_0].UID = 1071;
- commands[kcVPNoteG_0].isHidden = false;
- commands[kcVPNoteG_0].isDummy = false;
- commands[kcVPNoteG_0].Message = "Base octave G";
-
- commands[kcVPNoteGS0].UID = 1072;
- commands[kcVPNoteGS0].isHidden = false;
- commands[kcVPNoteGS0].isDummy = false;
- commands[kcVPNoteGS0].Message = "Base octave G#";
-
- commands[kcVPNoteA_1].UID = 1073;
- commands[kcVPNoteA_1].isHidden = false;
- commands[kcVPNoteA_1].isDummy = false;
- commands[kcVPNoteA_1].Message = "Base octave A";
-
- commands[kcVPNoteAS1].UID = 1074;
- commands[kcVPNoteAS1].isHidden = false;
- commands[kcVPNoteAS1].isDummy = false;
- commands[kcVPNoteAS1].Message = "Base octave A#";
-
- commands[kcVPNoteB_1].UID = 1075;
- commands[kcVPNoteB_1].isHidden = false;
- commands[kcVPNoteB_1].isDummy = false;
- commands[kcVPNoteB_1].Message = "Base octave B";
-
- commands[kcVPNoteC_1].UID = 1076;
- commands[kcVPNoteC_1].isHidden = false;
- commands[kcVPNoteC_1].isDummy = false;
- commands[kcVPNoteC_1].Message = "Base octave +1 C";
-
- commands[kcVPNoteCS1].UID = 1077;
- commands[kcVPNoteCS1].isHidden = false;
- commands[kcVPNoteCS1].isDummy = false;
- commands[kcVPNoteCS1].Message = "Base octave +1 C#";
-
- commands[kcVPNoteD_1].UID = 1078;
- commands[kcVPNoteD_1].isHidden = false;
- commands[kcVPNoteD_1].isDummy = false;
- commands[kcVPNoteD_1].Message = "Base octave +1 D";
-
- commands[kcVPNoteDS1].UID = 1079;
- commands[kcVPNoteDS1].isHidden = false;
- commands[kcVPNoteDS1].isDummy = false;
- commands[kcVPNoteDS1].Message = "Base octave +1 D#";
-
- commands[kcVPNoteE_1].UID = 1080;
- commands[kcVPNoteE_1].isHidden = false;
- commands[kcVPNoteE_1].isDummy = false;
- commands[kcVPNoteE_1].Message = "Base octave +1 E";
-
- commands[kcVPNoteF_1].UID = 1081;
- commands[kcVPNoteF_1].isHidden = false;
- commands[kcVPNoteF_1].isDummy = false;
- commands[kcVPNoteF_1].Message = "Base octave +1 F";
-
- commands[kcVPNoteFS1].UID = 1082;
- commands[kcVPNoteFS1].isHidden = false;
- commands[kcVPNoteFS1].isDummy = false;
- commands[kcVPNoteFS1].Message = "Base octave +1 F#";
-
- commands[kcVPNoteG_1].UID = 1083;
- commands[kcVPNoteG_1].isHidden = false;
- commands[kcVPNoteG_1].isDummy = false;
- commands[kcVPNoteG_1].Message = "Base octave +1 G";
-
- commands[kcVPNoteGS1].UID = 1084;
- commands[kcVPNoteGS1].isHidden = false;
- commands[kcVPNoteGS1].isDummy = false;
- commands[kcVPNoteGS1].Message = "Base octave +1 G#";
-
- commands[kcVPNoteA_2].UID = 1085;
- commands[kcVPNoteA_2].isHidden = false;
- commands[kcVPNoteA_2].isDummy = false;
- commands[kcVPNoteA_2].Message = "Base octave +1 A";
-
- commands[kcVPNoteAS2].UID = 1086;
- commands[kcVPNoteAS2].isHidden = false;
- commands[kcVPNoteAS2].isDummy = false;
- commands[kcVPNoteAS2].Message = "Base octave +1 A#";
-
- commands[kcVPNoteB_2].UID = 1087;
- commands[kcVPNoteB_2].isHidden = false;
- commands[kcVPNoteB_2].isDummy = false;
- commands[kcVPNoteB_2].Message = "Base octave +1 B";
-
- commands[kcVPNoteC_2].UID = 1088;
- commands[kcVPNoteC_2].isHidden = false;
- commands[kcVPNoteC_2].isDummy = false;
- commands[kcVPNoteC_2].Message = "Base octave +2 C";
-
- commands[kcVPNoteCS2].UID = 1089;
- commands[kcVPNoteCS2].isHidden = false;
- commands[kcVPNoteCS2].isDummy = false;
- commands[kcVPNoteCS2].Message = "Base octave +2 C#";
-
- commands[kcVPNoteD_2].UID = 1090;
- commands[kcVPNoteD_2].isHidden = false;
- commands[kcVPNoteD_2].isDummy = false;
- commands[kcVPNoteD_2].Message = "Base octave +2 D";
-
- commands[kcVPNoteDS2].UID = 1091;
- commands[kcVPNoteDS2].isHidden = false;
- commands[kcVPNoteDS2].isDummy = false;
- commands[kcVPNoteDS2].Message = "Base octave +2 D#";
-
- commands[kcVPNoteE_2].UID = 1092;
- commands[kcVPNoteE_2].isHidden = false;
- commands[kcVPNoteE_2].isDummy = false;
- commands[kcVPNoteE_2].Message = "Base octave +2 E";
-
- commands[kcVPNoteF_2].UID = 1093;
- commands[kcVPNoteF_2].isHidden = false;
- commands[kcVPNoteF_2].isDummy = false;
- commands[kcVPNoteF_2].Message = "Base octave +2 F";
-
- commands[kcVPNoteFS2].UID = 1094;
- commands[kcVPNoteFS2].isHidden = false;
- commands[kcVPNoteFS2].isDummy = false;
- commands[kcVPNoteFS2].Message = "Base octave +2 F#";
-
- commands[kcVPNoteG_2].UID = 1095;
- commands[kcVPNoteG_2].isHidden = false;
- commands[kcVPNoteG_2].isDummy = false;
- commands[kcVPNoteG_2].Message = "Base octave +2 G";
-
- commands[kcVPNoteGS2].UID = 1096;
- commands[kcVPNoteGS2].isHidden = false;
- commands[kcVPNoteGS2].isDummy = false;
- commands[kcVPNoteGS2].Message = "Base octave +2 G#";
-
- commands[kcVPNoteA_3].UID = 1097;
- commands[kcVPNoteA_3].isHidden = false;
- commands[kcVPNoteA_3].isDummy = false;
- commands[kcVPNoteA_3].Message = "Base octave +2 A";
-
- commands[kcVPNoteStopC_0].UID = 1098;
- commands[kcVPNoteStopC_0].isHidden = true;
- commands[kcVPNoteStopC_0].isDummy = false;
- commands[kcVPNoteStopC_0].Message = "Stop base octave C";
-
- commands[kcVPNoteStopCS0].UID = 1099;
- commands[kcVPNoteStopCS0].isHidden = true;
- commands[kcVPNoteStopCS0].isDummy = false;
- commands[kcVPNoteStopCS0].Message = "Stop base octave C#";
-
- commands[kcVPNoteStopD_0].UID = 1100;
- commands[kcVPNoteStopD_0].isHidden = true;
- commands[kcVPNoteStopD_0].isDummy = false;
- commands[kcVPNoteStopD_0].Message = "Stop base octave D";
-
- commands[kcVPNoteStopDS0].UID = 1101;
- commands[kcVPNoteStopDS0].isHidden = true;
- commands[kcVPNoteStopDS0].isDummy = false;
- commands[kcVPNoteStopDS0].Message = "Stop base octave D#";
-
- commands[kcVPNoteStopE_0].UID = 1102;
- commands[kcVPNoteStopE_0].isHidden = true;
- commands[kcVPNoteStopE_0].isDummy = false;
- commands[kcVPNoteStopE_0].Message = "Stop base octave E";
-
- commands[kcVPNoteStopF_0].UID = 1103;
- commands[kcVPNoteStopF_0].isHidden = true;
- commands[kcVPNoteStopF_0].isDummy = false;
- commands[kcVPNoteStopF_0].Message = "Stop base octave F";
-
- commands[kcVPNoteStopFS0].UID = 1104;
- commands[kcVPNoteStopFS0].isHidden = true;
- commands[kcVPNoteStopFS0].isDummy = false;
- commands[kcVPNoteStopFS0].Message = "Stop base octave F#";
-
- commands[kcVPNoteStopG_0].UID = 1105;
- commands[kcVPNoteStopG_0].isHidden = true;
- commands[kcVPNoteStopG_0].isDummy = false;
- commands[kcVPNoteStopG_0].Message = "Stop base octave G";
-
- commands[kcVPNoteStopGS0].UID = 1106;
- commands[kcVPNoteStopGS0].isHidden = true;
- commands[kcVPNoteStopGS0].isDummy = false;
- commands[kcVPNoteStopGS0].Message = "Stop base octave G#";
-
- commands[kcVPNoteStopA_1].UID = 1107;
- commands[kcVPNoteStopA_1].isHidden = true;
- commands[kcVPNoteStopA_1].isDummy = false;
- commands[kcVPNoteStopA_1].Message = "Stop base octave +1 A";
-
- commands[kcVPNoteStopAS1].UID = 1108;
- commands[kcVPNoteStopAS1].isHidden = true;
- commands[kcVPNoteStopAS1].isDummy = false;
- commands[kcVPNoteStopAS1].Message = "Stop base octave +1 A#";
-
- commands[kcVPNoteStopB_1].UID = 1109;
- commands[kcVPNoteStopB_1].isHidden = true;
- commands[kcVPNoteStopB_1].isDummy = false;
- commands[kcVPNoteStopB_1].Message = "Stop base octave +1 B";
-
- commands[kcVPNoteStopC_1].UID = 1110;
- commands[kcVPNoteStopC_1].isHidden = true;
- commands[kcVPNoteStopC_1].isDummy = false;
- commands[kcVPNoteStopC_1].Message = "Stop base octave +1 C";
-
- commands[kcVPNoteStopCS1].UID = 1111;
- commands[kcVPNoteStopCS1].isHidden = true;
- commands[kcVPNoteStopCS1].isDummy = false;
- commands[kcVPNoteStopCS1].Message = "Stop base octave +1 C#";
-
- commands[kcVPNoteStopD_1].UID = 1112;
- commands[kcVPNoteStopD_1].isHidden = true;
- commands[kcVPNoteStopD_1].isDummy = false;
- commands[kcVPNoteStopD_1].Message = "Stop base octave +1 D";
-
- commands[kcVPNoteStopDS1].UID = 1113;
- commands[kcVPNoteStopDS1].isHidden = true;
- commands[kcVPNoteStopDS1].isDummy = false;
- commands[kcVPNoteStopDS1].Message = "Stop base octave +1 D#";
-
- commands[kcVPNoteStopE_1].UID = 1114;
- commands[kcVPNoteStopE_1].isHidden = true;
- commands[kcVPNoteStopE_1].isDummy = false;
- commands[kcVPNoteStopE_1].Message = "Stop base octave +1 E";
-
- commands[kcVPNoteStopF_1].UID = 1115;
- commands[kcVPNoteStopF_1].isHidden = true;
- commands[kcVPNoteStopF_1].isDummy = false;
- commands[kcVPNoteStopF_1].Message = "Stop base octave +1 F";
-
- commands[kcVPNoteStopFS1].UID = 1116;
- commands[kcVPNoteStopFS1].isHidden = true;
- commands[kcVPNoteStopFS1].isDummy = false;
- commands[kcVPNoteStopFS1].Message = "Stop base octave +1 F#";
-
- commands[kcVPNoteStopG_1].UID = 1117;
- commands[kcVPNoteStopG_1].isHidden = true;
- commands[kcVPNoteStopG_1].isDummy = false;
- commands[kcVPNoteStopG_1].Message = "Stop base octave +1 G";
-
- commands[kcVPNoteStopGS1].UID = 1118;
- commands[kcVPNoteStopGS1].isHidden = true;
- commands[kcVPNoteStopGS1].isDummy = false;
- commands[kcVPNoteStopGS1].Message = "Stop base octave +1 G#";
-
- commands[kcVPNoteStopA_2].UID = 1119;
- commands[kcVPNoteStopA_2].isHidden = true;
- commands[kcVPNoteStopA_2].isDummy = false;
- commands[kcVPNoteStopA_2].Message = "Stop base octave +2 A";
-
- commands[kcVPNoteStopAS2].UID = 1120;
- commands[kcVPNoteStopAS2].isHidden = true;
- commands[kcVPNoteStopAS2].isDummy = false;
- commands[kcVPNoteStopAS2].Message = "Stop base octave +2 A#";
-
- commands[kcVPNoteStopB_2].UID = 1121;
- commands[kcVPNoteStopB_2].isHidden = true;
- commands[kcVPNoteStopB_2].isDummy = false;
- commands[kcVPNoteStopB_2].Message = "Stop base octave +2 B";
-
- commands[kcVPNoteStopC_2].UID = 1122;
- commands[kcVPNoteStopC_2].isHidden = true;
- commands[kcVPNoteStopC_2].isDummy = false;
- commands[kcVPNoteStopC_2].Message = "Stop base octave +2 C";
-
- commands[kcVPNoteStopCS2].UID = 1123;
- commands[kcVPNoteStopCS2].isHidden = true;
- commands[kcVPNoteStopCS2].isDummy = false;
- commands[kcVPNoteStopCS2].Message = "Stop base octave +2 C#";
-
- commands[kcVPNoteStopD_2].UID = 1124;
- commands[kcVPNoteStopD_2].isHidden = true;
- commands[kcVPNoteStopD_2].isDummy = false;
- commands[kcVPNoteStopD_2].Message = "Stop base octave +2 D";
-
- commands[kcVPNoteStopDS2].UID = 1125;
- commands[kcVPNoteStopDS2].isHidden = true;
- commands[kcVPNoteStopDS2].isDummy = false;
- commands[kcVPNoteStopDS2].Message = "Stop base octave +2 D#";
-
- commands[kcVPNoteStopE_2].UID = 1126;
- commands[kcVPNoteStopE_2].isHidden = true;
- commands[kcVPNoteStopE_2].isDummy = false;
- commands[kcVPNoteStopE_2].Message = "Stop base octave +2 E";
-
- commands[kcVPNoteStopF_2].UID = 1127;
- commands[kcVPNoteStopF_2].isHidden = true;
- commands[kcVPNoteStopF_2].isDummy = false;
- commands[kcVPNoteStopF_2].Message = "Stop base octave +2 F";
-
- commands[kcVPNoteStopFS2].UID = 1128;
- commands[kcVPNoteStopFS2].isHidden = true;
- commands[kcVPNoteStopFS2].isDummy = false;
- commands[kcVPNoteStopFS2].Message = "Stop base octave +2 F#";
-
- commands[kcVPNoteStopG_2].UID = 1129;
- commands[kcVPNoteStopG_2].isHidden = true;
- commands[kcVPNoteStopG_2].isDummy = false;
- commands[kcVPNoteStopG_2].Message = "Stop base octave +2 G";
-
- commands[kcVPNoteStopGS2].UID = 1130;
- commands[kcVPNoteStopGS2].isHidden = true;
- commands[kcVPNoteStopGS2].isDummy = false;
- commands[kcVPNoteStopGS2].Message = "Stop base octave +2 G#";
-
- commands[kcVPNoteStopA_3].UID = 1131;
- commands[kcVPNoteStopA_3].isHidden = true;
- commands[kcVPNoteStopA_3].isDummy = false;
- commands[kcVPNoteStopA_3].Message = "Stop base octave +3 A";
-
-
- commands[kcVPChordC_0].UID = 1132;
- commands[kcVPChordC_0].isHidden = true;
- commands[kcVPChordC_0].isDummy = false;
- commands[kcVPChordC_0].Message = "base octave chord C";
-
- commands[kcVPChordCS0].UID = 1133;
- commands[kcVPChordCS0].isHidden = true;
- commands[kcVPChordCS0].isDummy = false;
- commands[kcVPChordCS0].Message = "base octave chord C#";
-
- commands[kcVPChordD_0].UID = 1134;
- commands[kcVPChordD_0].isHidden = true;
- commands[kcVPChordD_0].isDummy = false;
- commands[kcVPChordD_0].Message = "base octave chord D";
-
- commands[kcVPChordDS0].UID = 1135;
- commands[kcVPChordDS0].isHidden = true;
- commands[kcVPChordDS0].isDummy = false;
- commands[kcVPChordDS0].Message = "base octave chord D#";
-
- commands[kcVPChordE_0].UID = 1136;
- commands[kcVPChordE_0].isHidden = true;
- commands[kcVPChordE_0].isDummy = false;
- commands[kcVPChordE_0].Message = "base octave chord E";
-
- commands[kcVPChordF_0].UID = 1137;
- commands[kcVPChordF_0].isHidden = true;
- commands[kcVPChordF_0].isDummy = false;
- commands[kcVPChordF_0].Message = "base octave chord F";
-
- commands[kcVPChordFS0].UID = 1138;
- commands[kcVPChordFS0].isHidden = true;
- commands[kcVPChordFS0].isDummy = false;
- commands[kcVPChordFS0].Message = "base octave chord F#";
-
- commands[kcVPChordG_0].UID = 1139;
- commands[kcVPChordG_0].isHidden = true;
- commands[kcVPChordG_0].isDummy = false;
- commands[kcVPChordG_0].Message = "base octave chord G";
-
- commands[kcVPChordGS0].UID = 1140;
- commands[kcVPChordGS0].isHidden = true;
- commands[kcVPChordGS0].isDummy = false;
- commands[kcVPChordGS0].Message = "base octave chord G#";
-
- commands[kcVPChordA_1].UID = 1141;
- commands[kcVPChordA_1].isHidden = true;
- commands[kcVPChordA_1].isDummy = false;
- commands[kcVPChordA_1].Message = "base octave +1 chord A";
-
- commands[kcVPChordAS1].UID = 1142;
- commands[kcVPChordAS1].isHidden = true;
- commands[kcVPChordAS1].isDummy = false;
- commands[kcVPChordAS1].Message = "base octave +1 chord A#";
-
- commands[kcVPChordB_1].UID = 1143;
- commands[kcVPChordB_1].isHidden = true;
- commands[kcVPChordB_1].isDummy = false;
- commands[kcVPChordB_1].Message = "base octave +1 chord B";
-
- commands[kcVPChordC_1].UID = 1144;
- commands[kcVPChordC_1].isHidden = true;
- commands[kcVPChordC_1].isDummy = false;
- commands[kcVPChordC_1].Message = "base octave +1 chord C";
-
- commands[kcVPChordCS1].UID = 1145;
- commands[kcVPChordCS1].isHidden = true;
- commands[kcVPChordCS1].isDummy = false;
- commands[kcVPChordCS1].Message = "base octave +1 chord C#";
-
- commands[kcVPChordD_1].UID = 1146;
- commands[kcVPChordD_1].isHidden = true;
- commands[kcVPChordD_1].isDummy = false;
- commands[kcVPChordD_1].Message = "base octave +1 chord D";
-
- commands[kcVPChordDS1].UID = 1147;
- commands[kcVPChordDS1].isHidden = true;
- commands[kcVPChordDS1].isDummy = false;
- commands[kcVPChordDS1].Message = "base octave +1 chord D#";
-
- commands[kcVPChordE_1].UID = 1148;
- commands[kcVPChordE_1].isHidden = true;
- commands[kcVPChordE_1].isDummy = false;
- commands[kcVPChordE_1].Message = "base octave +1 chord E";
-
- commands[kcVPChordF_1].UID = 1149;
- commands[kcVPChordF_1].isHidden = true;
- commands[kcVPChordF_1].isDummy = false;
- commands[kcVPChordF_1].Message = "base octave +1 chord F";
-
- commands[kcVPChordFS1].UID = 1150;
- commands[kcVPChordFS1].isHidden = true;
- commands[kcVPChordFS1].isDummy = false;
- commands[kcVPChordFS1].Message = "base octave +1 chord F#";
-
- commands[kcVPChordG_1].UID = 1151;
- commands[kcVPChordG_1].isHidden = true;
- commands[kcVPChordG_1].isDummy = false;
- commands[kcVPChordG_1].Message = "base octave +1 chord G";
-
- commands[kcVPChordGS1].UID = 1152;
- commands[kcVPChordGS1].isHidden = true;
- commands[kcVPChordGS1].isDummy = false;
- commands[kcVPChordGS1].Message = "base octave +1 chord G#";
-
- commands[kcVPChordA_2].UID = 1153;
- commands[kcVPChordA_2].isHidden = true;
- commands[kcVPChordA_2].isDummy = false;
- commands[kcVPChordA_2].Message = "base octave +2 chord A";
-
- commands[kcVPChordAS2].UID = 1154;
- commands[kcVPChordAS2].isHidden = true;
- commands[kcVPChordAS2].isDummy = false;
- commands[kcVPChordAS2].Message = "base octave +2 chord A#";
-
- commands[kcVPChordB_2].UID = 1155;
- commands[kcVPChordB_2].isHidden = true;
- commands[kcVPChordB_2].isDummy = false;
- commands[kcVPChordB_2].Message = "base octave +2 chord B";
-
- commands[kcVPChordC_2].UID = 1156;
- commands[kcVPChordC_2].isHidden = true;
- commands[kcVPChordC_2].isDummy = false;
- commands[kcVPChordC_2].Message = "base octave +2 chord C";
-
- commands[kcVPChordCS2].UID = 1157;
- commands[kcVPChordCS2].isHidden = true;
- commands[kcVPChordCS2].isDummy = false;
- commands[kcVPChordCS2].Message = "base octave +2 chord C#";
-
- commands[kcVPChordD_2].UID = 1158;
- commands[kcVPChordD_2].isHidden = true;
- commands[kcVPChordD_2].isDummy = false;
- commands[kcVPChordD_2].Message = "base octave +2 chord D";
-
- commands[kcVPChordDS2].UID = 1159;
- commands[kcVPChordDS2].isHidden = true;
- commands[kcVPChordDS2].isDummy = false;
- commands[kcVPChordDS2].Message = "base octave +2 chord D#";
-
- commands[kcVPChordE_2].UID = 1160;
- commands[kcVPChordE_2].isHidden = true;
- commands[kcVPChordE_2].isDummy = false;
- commands[kcVPChordE_2].Message = "base octave +2 chord E";
-
- commands[kcVPChordF_2].UID = 1161;
- commands[kcVPChordF_2].isHidden = true;
- commands[kcVPChordF_2].isDummy = false;
- commands[kcVPChordF_2].Message = "base octave +2 chord F";
-
- commands[kcVPChordFS2].UID = 1162;
- commands[kcVPChordFS2].isHidden = true;
- commands[kcVPChordFS2].isDummy = false;
- commands[kcVPChordFS2].Message = "base octave +2 chord F#";
-
- commands[kcVPChordG_2].UID = 1163;
- commands[kcVPChordG_2].isHidden = true;
- commands[kcVPChordG_2].isDummy = false;
- commands[kcVPChordG_2].Message = "base octave +2 chord G";
-
- commands[kcVPChordGS2].UID = 1164;
- commands[kcVPChordGS2].isHidden = true;
- commands[kcVPChordGS2].isDummy = false;
- commands[kcVPChordGS2].Message = "base octave +2 chord G#";
-
- commands[kcVPChordA_3].UID = 1165;
- commands[kcVPChordA_3].isHidden = true;
- commands[kcVPChordA_3].isDummy = false;
- commands[kcVPChordA_3].Message = "base octave chord +3 A";
-
-
- commands[kcVPChordStopC_0].UID = 1166;
- commands[kcVPChordStopC_0].isHidden = true;
- commands[kcVPChordStopC_0].isDummy = false;
- commands[kcVPChordStopC_0].Message = "Stop base octave chord C";
-
- commands[kcVPChordStopCS0].UID = 1167;
- commands[kcVPChordStopCS0].isHidden = true;
- commands[kcVPChordStopCS0].isDummy = false;
- commands[kcVPChordStopCS0].Message = "Stop base octave chord C#";
-
- commands[kcVPChordStopD_0].UID = 1168;
- commands[kcVPChordStopD_0].isHidden = true;
- commands[kcVPChordStopD_0].isDummy = false;
- commands[kcVPChordStopD_0].Message = "Stop base octave chord D";
-
- commands[kcVPChordStopDS0].UID = 1169;
- commands[kcVPChordStopDS0].isHidden = true;
- commands[kcVPChordStopDS0].isDummy = false;
- commands[kcVPChordStopDS0].Message = "Stop base octave chord D#";
-
- commands[kcVPChordStopE_0].UID = 1170;
- commands[kcVPChordStopE_0].isHidden = true;
- commands[kcVPChordStopE_0].isDummy = false;
- commands[kcVPChordStopE_0].Message = "Stop base octave chord E";
-
- commands[kcVPChordStopF_0].UID = 1171;
- commands[kcVPChordStopF_0].isHidden = true;
- commands[kcVPChordStopF_0].isDummy = false;
- commands[kcVPChordStopF_0].Message = "Stop base octave chord F";
-
- commands[kcVPChordStopFS0].UID = 1172;
- commands[kcVPChordStopFS0].isHidden = true;
- commands[kcVPChordStopFS0].isDummy = false;
- commands[kcVPChordStopFS0].Message = "Stop base octave chord F#";
-
- commands[kcVPChordStopG_0].UID = 1173;
- commands[kcVPChordStopG_0].isHidden = true;
- commands[kcVPChordStopG_0].isDummy = false;
- commands[kcVPChordStopG_0].Message = "Stop base octave chord G";
-
- commands[kcVPChordStopGS0].UID = 1174;
- commands[kcVPChordStopGS0].isHidden = true;
- commands[kcVPChordStopGS0].isDummy = false;
- commands[kcVPChordStopGS0].Message = "Stop base octave chord G#";
-
- commands[kcVPChordStopA_1].UID = 1175;
- commands[kcVPChordStopA_1].isHidden = true;
- commands[kcVPChordStopA_1].isDummy = false;
- commands[kcVPChordStopA_1].Message = "Stop base octave +1 chord A";
-
- commands[kcVPChordStopAS1].UID = 1176;
- commands[kcVPChordStopAS1].isHidden = true;
- commands[kcVPChordStopAS1].isDummy = false;
- commands[kcVPChordStopAS1].Message = "Stop base octave +1 chord A#";
-
- commands[kcVPChordStopB_1].UID = 1177;
- commands[kcVPChordStopB_1].isHidden = true;
- commands[kcVPChordStopB_1].isDummy = false;
- commands[kcVPChordStopB_1].Message = "Stop base octave +1 chord B";
-
- commands[kcVPChordStopC_1].UID = 1178;
- commands[kcVPChordStopC_1].isHidden = true;
- commands[kcVPChordStopC_1].isDummy = false;
- commands[kcVPChordStopC_1].Message = "Stop base octave +1 chord C";
-
- commands[kcVPChordStopCS1].UID = 1179;
- commands[kcVPChordStopCS1].isHidden = true;
- commands[kcVPChordStopCS1].isDummy = false;
- commands[kcVPChordStopCS1].Message = "Stop base octave +1 chord C#";
-
- commands[kcVPChordStopD_1].UID = 1180;
- commands[kcVPChordStopD_1].isHidden = true;
- commands[kcVPChordStopD_1].isDummy = false;
- commands[kcVPChordStopD_1].Message = "Stop base octave +1 chord D";
-
- commands[kcVPChordStopDS1].UID = 1181;
- commands[kcVPChordStopDS1].isHidden = true;
- commands[kcVPChordStopDS1].isDummy = false;
- commands[kcVPChordStopDS1].Message = "Stop base octave +1 chord D#";
-
- commands[kcVPChordStopE_1].UID = 1182;
- commands[kcVPChordStopE_1].isHidden = true;
- commands[kcVPChordStopE_1].isDummy = false;
- commands[kcVPChordStopE_1].Message = "Stop base octave +1 chord E";
-
- commands[kcVPChordStopF_1].UID = 1183;
- commands[kcVPChordStopF_1].isHidden = true;
- commands[kcVPChordStopF_1].isDummy = false;
- commands[kcVPChordStopF_1].Message = "Stop base octave +1 chord F";
-
- commands[kcVPChordStopFS1].UID = 1184;
- commands[kcVPChordStopFS1].isHidden = true;
- commands[kcVPChordStopFS1].isDummy = false;
- commands[kcVPChordStopFS1].Message = "Stop base octave +1 chord F#";
-
- commands[kcVPChordStopG_1].UID = 1185;
- commands[kcVPChordStopG_1].isHidden = true;
- commands[kcVPChordStopG_1].isDummy = false;
- commands[kcVPChordStopG_1].Message = "Stop base octave +1 chord G";
-
- commands[kcVPChordStopGS1].UID = 1186;
- commands[kcVPChordStopGS1].isHidden = true;
- commands[kcVPChordStopGS1].isDummy = false;
- commands[kcVPChordStopGS1].Message = "Stop base octave +1 chord G#";
-
- commands[kcVPChordStopA_2].UID = 1187;
- commands[kcVPChordStopA_2].isHidden = true;
- commands[kcVPChordStopA_2].isDummy = false;
- commands[kcVPChordStopA_2].Message = "Stop base octave +2 chord A";
-
- commands[kcVPChordStopAS2].UID = 1188;
- commands[kcVPChordStopAS2].isHidden = true;
- commands[kcVPChordStopAS2].isDummy = false;
- commands[kcVPChordStopAS2].Message = "Stop base octave +2 chord A#";
-
- commands[kcVPChordStopB_2].UID = 1189;
- commands[kcVPChordStopB_2].isHidden = true;
- commands[kcVPChordStopB_2].isDummy = false;
- commands[kcVPChordStopB_2].Message = "Stop base octave +2 chord B";
-
- commands[kcVPChordStopC_2].UID = 1190;
- commands[kcVPChordStopC_2].isHidden = true;
- commands[kcVPChordStopC_2].isDummy = false;
- commands[kcVPChordStopC_2].Message = "Stop base octave +2 chord C";
-
- commands[kcVPChordStopCS2].UID = 1191;
- commands[kcVPChordStopCS2].isHidden = true;
- commands[kcVPChordStopCS2].isDummy = false;
- commands[kcVPChordStopCS2].Message = "Stop base octave +2 chord C#";
-
- commands[kcVPChordStopD_2].UID = 1192;
- commands[kcVPChordStopD_2].isHidden = true;
- commands[kcVPChordStopD_2].isDummy = false;
- commands[kcVPChordStopD_2].Message = "Stop base octave +2 chord D";
-
- commands[kcVPChordStopDS2].UID = 1193;
- commands[kcVPChordStopDS2].isHidden = true;
- commands[kcVPChordStopDS2].isDummy = false;
- commands[kcVPChordStopDS2].Message = "Stop base octave +2 chord D#";
-
- commands[kcVPChordStopE_2].UID = 1194;
- commands[kcVPChordStopE_2].isHidden = true;
- commands[kcVPChordStopE_2].isDummy = false;
- commands[kcVPChordStopE_2].Message = "Stop base octave +2 chord E";
-
- commands[kcVPChordStopF_2].UID = 1195;
- commands[kcVPChordStopF_2].isHidden = true;
- commands[kcVPChordStopF_2].isDummy = false;
- commands[kcVPChordStopF_2].Message = "Stop base octave +2 chord F";
-
- commands[kcVPChordStopFS2].UID = 1196;
- commands[kcVPChordStopFS2].isHidden = true;
- commands[kcVPChordStopFS2].isDummy = false;
- commands[kcVPChordStopFS2].Message = "Stop base octave +2 chord F#";
-
- commands[kcVPChordStopG_2].UID = 1197;
- commands[kcVPChordStopG_2].isHidden = true;
- commands[kcVPChordStopG_2].isDummy = false;
- commands[kcVPChordStopG_2].Message = "Stop base octave +2 chord G";
-
- commands[kcVPChordStopGS2].UID = 1198;
- commands[kcVPChordStopGS2].isHidden = true;
- commands[kcVPChordStopGS2].isDummy = false;
- commands[kcVPChordStopGS2].Message = "Stop base octave +2 chord G#";
-
- commands[kcVPChordStopA_3].UID = 1199;
- commands[kcVPChordStopA_3].isHidden = true;
- commands[kcVPChordStopA_3].isDummy = false;
- commands[kcVPChordStopA_3].Message = "Stop base octave +3 chord A";
-
- commands[kcNoteCut].UID = 1200;
- commands[kcNoteCut].isHidden = false;
- commands[kcNoteCut].isDummy = false;
- commands[kcNoteCut].Message = "Note Cut";
-
- commands[kcNoteOff].UID = 1201;
- commands[kcNoteOff].isHidden = false;
- commands[kcNoteOff].isDummy = false;
- commands[kcNoteOff].Message = "Note Off";
-
- commands[kcSetIns0].UID = 1202;
- commands[kcSetIns0].isHidden = false;
- commands[kcSetIns0].isDummy = false;
- commands[kcSetIns0].Message = "Set instrument digit 0";
-
- commands[kcSetIns1].UID = 1203;
- commands[kcSetIns1].isHidden = false;
- commands[kcSetIns1].isDummy = false;
- commands[kcSetIns1].Message = "Set instrument digit 1";
-
- commands[kcSetIns2].UID = 1204;
- commands[kcSetIns2].isHidden = false;
- commands[kcSetIns2].isDummy = false;
- commands[kcSetIns2].Message = "Set instrument digit 2";
-
- commands[kcSetIns3].UID = 1205;
- commands[kcSetIns3].isHidden = false;
- commands[kcSetIns3].isDummy = false;
- commands[kcSetIns3].Message = "Set instrument digit 3";
-
- commands[kcSetIns4].UID = 1206;
- commands[kcSetIns4].isHidden = false;
- commands[kcSetIns4].isDummy = false;
- commands[kcSetIns4].Message = "Set instrument digit 4";
-
- commands[kcSetIns5].UID = 1207;
- commands[kcSetIns5].isHidden = false;
- commands[kcSetIns5].isDummy = false;
- commands[kcSetIns5].Message = "Set instrument digit 5";
-
- commands[kcSetIns6].UID = 1208;
- commands[kcSetIns6].isHidden = false;
- commands[kcSetIns6].isDummy = false;
- commands[kcSetIns6].Message = "Set instrument digit 6";
-
- commands[kcSetIns7].UID = 1209;
- commands[kcSetIns7].isHidden = false;
- commands[kcSetIns7].isDummy = false;
- commands[kcSetIns7].Message = "Set instrument digit 7";
-
- commands[kcSetIns8].UID = 1210;
- commands[kcSetIns8].isHidden = false;
- commands[kcSetIns8].isDummy = false;
- commands[kcSetIns8].Message = "Set instrument digit 8";
-
- commands[kcSetIns9].UID = 1211;
- commands[kcSetIns9].isHidden = false;
- commands[kcSetIns9].isDummy = false;
- commands[kcSetIns9].Message = "Set instrument digit 9";
-
- commands[kcSetOctave0].UID = 1212;
- commands[kcSetOctave0].isHidden = false;
- commands[kcSetOctave0].isDummy = false;
- commands[kcSetOctave0].Message = "Set octave 0";
-
- commands[kcSetOctave1].UID = 1213;
- commands[kcSetOctave1].isHidden = false;
- commands[kcSetOctave1].isDummy = false;
- commands[kcSetOctave1].Message = "Set octave 1";
-
- commands[kcSetOctave2].UID = 1214;
- commands[kcSetOctave2].isHidden = false;
- commands[kcSetOctave2].isDummy = false;
- commands[kcSetOctave2].Message = "Set octave 2";
-
- commands[kcSetOctave3].UID = 1215;
- commands[kcSetOctave3].isHidden = false;
- commands[kcSetOctave3].isDummy = false;
- commands[kcSetOctave3].Message = "Set octave 3";
-
- commands[kcSetOctave4].UID = 1216;
- commands[kcSetOctave4].isHidden = false;
- commands[kcSetOctave4].isDummy = false;
- commands[kcSetOctave4].Message = "Set octave 4";
-
- commands[kcSetOctave5].UID = 1217;
- commands[kcSetOctave5].isHidden = false;
- commands[kcSetOctave5].isDummy = false;
- commands[kcSetOctave5].Message = "Set octave 5";
-
- commands[kcSetOctave6].UID = 1218;
- commands[kcSetOctave6].isHidden = false;
- commands[kcSetOctave6].isDummy = false;
- commands[kcSetOctave6].Message = "Set octave 6";
-
- commands[kcSetOctave7].UID = 1219;
- commands[kcSetOctave7].isHidden = false;
- commands[kcSetOctave7].isDummy = false;
- commands[kcSetOctave7].Message = "Set octave 7";
-
- commands[kcSetOctave8].UID = 1220;
- commands[kcSetOctave8].isHidden = false;
- commands[kcSetOctave8].isDummy = false;
- commands[kcSetOctave8].Message = "Set octave 8";
-
- commands[kcSetOctave9].UID = 1221;
- commands[kcSetOctave9].isHidden = false;
- commands[kcSetOctave9].isDummy = false;
- commands[kcSetOctave9].Message = "Set octave 9";
-
- commands[kcSetVolume0].UID = 1222;
- commands[kcSetVolume0].isHidden = false;
- commands[kcSetVolume0].isDummy = false;
- commands[kcSetVolume0].Message = "Set volume digit 0";
-
- commands[kcSetVolume1].UID = 1223;
- commands[kcSetVolume1].isHidden = false;
- commands[kcSetVolume1].isDummy = false;
- commands[kcSetVolume1].Message = "Set volume digit 1";
-
- commands[kcSetVolume2].UID = 1224;
- commands[kcSetVolume2].isHidden = false;
- commands[kcSetVolume2].isDummy = false;
- commands[kcSetVolume2].Message = "Set volume digit 2";
-
- commands[kcSetVolume3].UID = 1225;
- commands[kcSetVolume3].isHidden = false;
- commands[kcSetVolume3].isDummy = false;
- commands[kcSetVolume3].Message = "Set volume digit 3";
-
- commands[kcSetVolume4].UID = 1226;
- commands[kcSetVolume4].isHidden = false;
- commands[kcSetVolume4].isDummy = false;
- commands[kcSetVolume4].Message = "Set volume digit 4";
-
- commands[kcSetVolume5].UID = 1227;
- commands[kcSetVolume5].isHidden = false;
- commands[kcSetVolume5].isDummy = false;
- commands[kcSetVolume5].Message = "Set volume digit 5";
-
- commands[kcSetVolume6].UID = 1228;
- commands[kcSetVolume6].isHidden = false;
- commands[kcSetVolume6].isDummy = false;
- commands[kcSetVolume6].Message = "Set volume digit 6";
-
- commands[kcSetVolume7].UID = 1229;
- commands[kcSetVolume7].isHidden = false;
- commands[kcSetVolume7].isDummy = false;
- commands[kcSetVolume7].Message = "Set volume digit 7";
-
- commands[kcSetVolume8].UID = 1230;
- commands[kcSetVolume8].isHidden = false;
- commands[kcSetVolume8].isDummy = false;
- commands[kcSetVolume8].Message = "Set volume digit 8";
-
- commands[kcSetVolume9].UID = 1231;
- commands[kcSetVolume9].isHidden = false;
- commands[kcSetVolume9].isDummy = false;
- commands[kcSetVolume9].Message = "Set volume digit 9";
-
- commands[kcSetVolumeVol].UID = 1232;
- commands[kcSetVolumeVol].isHidden = false;
- commands[kcSetVolumeVol].isDummy = false;
- commands[kcSetVolumeVol].Message = "Vol command - volume";
-
- commands[kcSetVolumePan].UID = 1233;
- commands[kcSetVolumePan].isHidden = false;
- commands[kcSetVolumePan].isDummy = false;
- commands[kcSetVolumePan].Message = "Vol command - pan";
-
- commands[kcSetVolumeVolSlideUp].UID = 1234;
- commands[kcSetVolumeVolSlideUp].isHidden = false;
- commands[kcSetVolumeVolSlideUp].isDummy = false;
- commands[kcSetVolumeVolSlideUp].Message = "Vol command - vol slide up";
-
- commands[kcSetVolumeVolSlideDown].UID = 1235;
- commands[kcSetVolumeVolSlideDown].isHidden = false;
- commands[kcSetVolumeVolSlideDown].isDummy = false;
- commands[kcSetVolumeVolSlideDown].Message = "Vol command - vol slide down";
-
- commands[kcSetVolumeFineVolUp].UID = 1236;
- commands[kcSetVolumeFineVolUp].isHidden = false;
- commands[kcSetVolumeFineVolUp].isDummy = false;
- commands[kcSetVolumeFineVolUp].Message = "Vol command - vol fine slide up";
-
- commands[kcSetVolumeFineVolDown].UID = 1237;
- commands[kcSetVolumeFineVolDown].isHidden = false;
- commands[kcSetVolumeFineVolDown].isDummy = false;
- commands[kcSetVolumeFineVolDown].Message = "Vol command - vol fine slide down";
-
- commands[kcSetVolumeVibratoSpd].UID = 1238;
- commands[kcSetVolumeVibratoSpd].isHidden = false;
- commands[kcSetVolumeVibratoSpd].isDummy = false;
- commands[kcSetVolumeVibratoSpd].Message = "Vol command - vibrato speed";
-
- commands[kcSetVolumeVibrato].UID = 1239;
- commands[kcSetVolumeVibrato].isHidden = false;
- commands[kcSetVolumeVibrato].isDummy = false;
- commands[kcSetVolumeVibrato].Message = "Vol command - vibrato";
-
- commands[kcSetVolumeXMPanLeft].UID = 1240;
- commands[kcSetVolumeXMPanLeft].isHidden = false;
- commands[kcSetVolumeXMPanLeft].isDummy = false;
- commands[kcSetVolumeXMPanLeft].Message = "Vol command - XM pan left";
-
- commands[kcSetVolumeXMPanRight].UID = 1241;
- commands[kcSetVolumeXMPanRight].isHidden = false;
- commands[kcSetVolumeXMPanRight].isDummy = false;
- commands[kcSetVolumeXMPanRight].Message = "Vol command - XM pan right";
-
- commands[kcSetVolumePortamento].UID = 1242;
- commands[kcSetVolumePortamento].isHidden = false;
- commands[kcSetVolumePortamento].isDummy = false;
- commands[kcSetVolumePortamento].Message = "Vol command - Portamento";
-
- commands[kcSetVolumeITPortaUp].UID = 1243;
- commands[kcSetVolumeITPortaUp].isHidden = false;
- commands[kcSetVolumeITPortaUp].isDummy = false;
- commands[kcSetVolumeITPortaUp].Message = "Vol command - Portamento Up";
-
- commands[kcSetVolumeITPortaDown].UID = 1244;
- commands[kcSetVolumeITPortaDown].isHidden = false;
- commands[kcSetVolumeITPortaDown].isDummy = false;
- commands[kcSetVolumeITPortaDown].Message = "Vol command - Portamento Down";
-
- commands[kcSetVolumeITUnused].UID = 1245;
- commands[kcSetVolumeITUnused].isHidden = true;
- commands[kcSetVolumeITUnused].isDummy = false;
- commands[kcSetVolumeITUnused].Message = "Vol command - Unused";
-
- commands[kcSetVolumeITOffset].UID = 1246;
- commands[kcSetVolumeITOffset].isHidden = false;
- commands[kcSetVolumeITOffset].isDummy = false;
- commands[kcSetVolumeITOffset].Message = "Vol command - Offset";
-
- commands[kcSetFXParam0].UID = 1247;
- commands[kcSetFXParam0].isHidden = false;
- commands[kcSetFXParam0].isDummy = false;
- commands[kcSetFXParam0].Message = "FX Param digit 0";
-
- commands[kcSetFXParam1].UID = 1248;
- commands[kcSetFXParam1].isHidden = false;
- commands[kcSetFXParam1].isDummy = false;
- commands[kcSetFXParam1].Message = "FX Param digit 1";
-
- commands[kcSetFXParam2].UID = 1249;
- commands[kcSetFXParam2].isHidden = false;
- commands[kcSetFXParam2].isDummy = false;
- commands[kcSetFXParam2].Message = "FX Param digit 2";
-
- commands[kcSetFXParam3].UID = 1250;
- commands[kcSetFXParam3].isHidden = false;
- commands[kcSetFXParam3].isDummy = false;
- commands[kcSetFXParam3].Message = "FX Param digit 3";
-
- commands[kcSetFXParam4].UID = 1251;
- commands[kcSetFXParam4].isHidden = false;
- commands[kcSetFXParam4].isDummy = false;
- commands[kcSetFXParam4].Message = "FX Param digit 4";
-
- commands[kcSetFXParam5].UID = 1252;
- commands[kcSetFXParam5].isHidden = false;
- commands[kcSetFXParam5].isDummy = false;
- commands[kcSetFXParam5].Message = "FX Param digit 5";
-
- commands[kcSetFXParam6].UID = 1253;
- commands[kcSetFXParam6].isHidden = false;
- commands[kcSetFXParam6].isDummy = false;
- commands[kcSetFXParam6].Message = "FX Param digit 6";
-
- commands[kcSetFXParam7].UID = 1254;
- commands[kcSetFXParam7].isHidden = false;
- commands[kcSetFXParam7].isDummy = false;
- commands[kcSetFXParam7].Message = "FX Param digit 7";
-
- commands[kcSetFXParam8].UID = 1255;
- commands[kcSetFXParam8].isHidden = false;
- commands[kcSetFXParam8].isDummy = false;
- commands[kcSetFXParam8].Message = "FX Param digit 8";
-
- commands[kcSetFXParam9].UID = 1256;
- commands[kcSetFXParam9].isHidden = false;
- commands[kcSetFXParam9].isDummy = false;
- commands[kcSetFXParam9].Message = "FX Param digit 9";
-
- commands[kcSetFXParamA].UID = 1257;
- commands[kcSetFXParamA].isHidden = false;
- commands[kcSetFXParamA].isDummy = false;
- commands[kcSetFXParamA].Message = "FX Param digit A";
-
- commands[kcSetFXParamB].UID = 1258;
- commands[kcSetFXParamB].isHidden = false;
- commands[kcSetFXParamB].isDummy = false;
- commands[kcSetFXParamB].Message = "FX Param digit B";
-
- commands[kcSetFXParamC].UID = 1259;
- commands[kcSetFXParamC].isHidden = false;
- commands[kcSetFXParamC].isDummy = false;
- commands[kcSetFXParamC].Message = "FX Param digit C";
-
- commands[kcSetFXParamD].UID = 1260;
- commands[kcSetFXParamD].isHidden = false;
- commands[kcSetFXParamD].isDummy = false;
- commands[kcSetFXParamD].Message = "FX Param digit D";
-
- commands[kcSetFXParamE].UID = 1261;
- commands[kcSetFXParamE].isHidden = false;
- commands[kcSetFXParamE].isDummy = false;
- commands[kcSetFXParamE].Message = "FX Param digit E";
-
- commands[kcSetFXParamF].UID = 1262;
- commands[kcSetFXParamF].isHidden = false;
- commands[kcSetFXParamF].isDummy = false;
- commands[kcSetFXParamF].Message = "FX Param digit F";
-
- commands[kcSetFXarp].UID = 1263;
- commands[kcSetFXarp].isHidden = true;
- commands[kcSetFXarp].isDummy = false;
- commands[kcSetFXarp].Message = "FX arpeggio";
-
- commands[kcSetFXportUp].UID = 1264;
- commands[kcSetFXportUp].isHidden = true;
- commands[kcSetFXportUp].isDummy = false;
- commands[kcSetFXportUp].Message = "FX portamentao Up";
-
- commands[kcSetFXportDown].UID = 1265;
- commands[kcSetFXportDown].isHidden = true;
- commands[kcSetFXportDown].isDummy = false;
- commands[kcSetFXportDown].Message = "FX portamentao Down";
-
- commands[kcSetFXport].UID = 1266;
- commands[kcSetFXport].isHidden = true;
- commands[kcSetFXport].isDummy = false;
- commands[kcSetFXport].Message = "FX portamentao";
-
- commands[kcSetFXvibrato].UID = 1267;
- commands[kcSetFXvibrato].isHidden = true;
- commands[kcSetFXvibrato].isDummy = false;
- commands[kcSetFXvibrato].Message = "FX vibrato";
-
- commands[kcSetFXportSlide].UID = 1268;
- commands[kcSetFXportSlide].isHidden = true;
- commands[kcSetFXportSlide].isDummy = false;
- commands[kcSetFXportSlide].Message = "FX portamento slide";
-
- commands[kcSetFXvibSlide].UID = 1269;
- commands[kcSetFXvibSlide].isHidden = true;
- commands[kcSetFXvibSlide].isDummy = false;
- commands[kcSetFXvibSlide].Message = "FX vibrato slide";
-
- commands[kcSetFXtremolo].UID = 1270;
- commands[kcSetFXtremolo].isHidden = true;
- commands[kcSetFXtremolo].isDummy = false;
- commands[kcSetFXtremolo].Message = "FX tremolo";
-
- commands[kcSetFXpan].UID = 1271;
- commands[kcSetFXpan].isHidden = true;
- commands[kcSetFXpan].isDummy = false;
- commands[kcSetFXpan].Message = "FX pan";
-
- commands[kcSetFXoffset].UID = 1272;
- commands[kcSetFXoffset].isHidden = true;
- commands[kcSetFXoffset].isDummy = false;
- commands[kcSetFXoffset].Message = "FX offset";
-
- commands[kcSetFXvolSlide].UID = 1273;
- commands[kcSetFXvolSlide].isHidden = true;
- commands[kcSetFXvolSlide].isDummy = false;
- commands[kcSetFXvolSlide].Message = "FX Volume slide";
-
- commands[kcSetFXgotoOrd].UID = 1274;
- commands[kcSetFXgotoOrd].isHidden = true;
- commands[kcSetFXgotoOrd].isDummy = false;
- commands[kcSetFXgotoOrd].Message = "FX go to order";
-
- commands[kcSetFXsetVol].UID = 1275;
- commands[kcSetFXsetVol].isHidden = true;
- commands[kcSetFXsetVol].isDummy = false;
- commands[kcSetFXsetVol].Message = "FX set volume";
-
- commands[kcSetFXgotoRow].UID = 1276;
- commands[kcSetFXgotoRow].isHidden = true;
- commands[kcSetFXgotoRow].isDummy = false;
- commands[kcSetFXgotoRow].Message = "FX go to row";
-
- commands[kcSetFXretrig].UID = 1277;
- commands[kcSetFXretrig].isHidden = true;
- commands[kcSetFXretrig].isDummy = false;
- commands[kcSetFXretrig].Message = "FX retrigger";
-
- commands[kcSetFXspeed].UID = 1278;
- commands[kcSetFXspeed].isHidden = true;
- commands[kcSetFXspeed].isDummy = false;
- commands[kcSetFXspeed].Message = "FX set speed";
-
- commands[kcSetFXtempo].UID = 1279;
- commands[kcSetFXtempo].isHidden = true;
- commands[kcSetFXtempo].isDummy = false;
- commands[kcSetFXtempo].Message = "FX set tempo";
-
- commands[kcSetFXtremor].UID = 1280;
- commands[kcSetFXtremor].isHidden = true;
- commands[kcSetFXtremor].isDummy = false;
- commands[kcSetFXtremor].Message = "FX tremor";
-
- commands[kcSetFXextendedMOD].UID = 1281;
- commands[kcSetFXextendedMOD].isHidden = true;
- commands[kcSetFXextendedMOD].isDummy = false;
- commands[kcSetFXextendedMOD].Message = "FX extended MOD cmds";
-
- commands[kcSetFXextendedS3M].UID = 1282;
- commands[kcSetFXextendedS3M].isHidden = true;
- commands[kcSetFXextendedS3M].isDummy = false;
- commands[kcSetFXextendedS3M].Message = "FX extended S3M cmds";
-
- commands[kcSetFXchannelVol].UID = 1283;
- commands[kcSetFXchannelVol].isHidden = true;
- commands[kcSetFXchannelVol].isDummy = false;
- commands[kcSetFXchannelVol].Message = "FX set channel vol";
-
- commands[kcSetFXchannelVols].UID = 1284;
- commands[kcSetFXchannelVols].isHidden = true;
- commands[kcSetFXchannelVols].isDummy = false;
- commands[kcSetFXchannelVols].Message = "FX channel vol slide";
-
- commands[kcSetFXglobalVol].UID = 1285;
- commands[kcSetFXglobalVol].isHidden = true;
- commands[kcSetFXglobalVol].isDummy = false;
- commands[kcSetFXglobalVol].Message = "FX set global volume";
-
- commands[kcSetFXglobalVols].UID = 1286;
- commands[kcSetFXglobalVols].isHidden = true;
- commands[kcSetFXglobalVols].isDummy = false;
- commands[kcSetFXglobalVols].Message = "FX global volume slide";
-
- commands[kcSetFXkeyoff].UID = 1287;
- commands[kcSetFXkeyoff].isHidden = true;
- commands[kcSetFXkeyoff].isDummy = false;
- commands[kcSetFXkeyoff].Message = "FX Some XM Command :D";
-
- commands[kcSetFXfineVib].UID = 1288;
- commands[kcSetFXfineVib].isHidden = true;
- commands[kcSetFXfineVib].isDummy = false;
- commands[kcSetFXfineVib].Message = "FX fine vibrato";
-
- commands[kcSetFXpanbrello].UID = 1289;
- commands[kcSetFXpanbrello].isHidden = true;
- commands[kcSetFXpanbrello].isDummy = false;
- commands[kcSetFXpanbrello].Message = "FX set panbrello";
-
- commands[kcSetFXextendedXM].UID = 1290;
- commands[kcSetFXextendedXM].isHidden = true;
- commands[kcSetFXextendedXM].isDummy = false;
- commands[kcSetFXextendedXM].Message = "FX extended XM effects ";
-
- commands[kcSetFXpanSlide].UID = 1291;
- commands[kcSetFXpanSlide].isHidden = true;
- commands[kcSetFXpanSlide].isDummy = false;
- commands[kcSetFXpanSlide].Message = "FX pan slide";
-
- commands[kcSetFXsetEnvPos].UID = 1292;
- commands[kcSetFXsetEnvPos].isHidden = true;
- commands[kcSetFXsetEnvPos].isDummy = false;
- commands[kcSetFXsetEnvPos].Message = "FX set envelope position (XM only)";
-
- commands[kcSetFXmacro].UID = 1293;
- commands[kcSetFXmacro].isHidden = true;
- commands[kcSetFXmacro].isDummy = false;
- commands[kcSetFXmacro].Message = "FX midi macro";
-
- commands[kcSetFXmacroSlide].UID = 1294;
- commands[kcSetFXmacroSlide].isHidden = false;
- commands[kcSetFXmacroSlide].isDummy = false;
- commands[kcSetFXmacroSlide].Message = "FX midi macro slide";
-
- commands[kcSetFXdelaycut].UID = 1295;
- commands[kcSetFXdelaycut].isHidden = false;
- commands[kcSetFXdelaycut].isDummy = false;
- commands[kcSetFXdelaycut].Message = "FX combined note delay and note cut";
-
- commands[kcPatternJumpDownh1Select].UID = 1296;
- commands[kcPatternJumpDownh1Select].isHidden = true;
- commands[kcPatternJumpDownh1Select].isDummy = false;
- commands[kcPatternJumpDownh1Select].Message = "kcPatternJumpDownh1Select";
-
- commands[kcPatternJumpUph1Select].UID = 1297;
- commands[kcPatternJumpUph1Select].isHidden = true;
- commands[kcPatternJumpUph1Select].isDummy = false;
- commands[kcPatternJumpUph1Select].Message = "kcPatternJumpUph1Select";
-
- commands[kcPatternSnapDownh1Select].UID = 1298;
- commands[kcPatternSnapDownh1Select].isHidden = true;
- commands[kcPatternSnapDownh1Select].isDummy = false;
- commands[kcPatternSnapDownh1Select].Message = "kcPatternSnapDownh1Select";
-
- commands[kcPatternSnapUph1Select].UID = 1299;
- commands[kcPatternSnapUph1Select].isHidden = true;
- commands[kcPatternSnapUph1Select].isDummy = false;
- commands[kcPatternSnapUph1Select].Message = "kcPatternSnapUph1Select";
-
- commands[kcNavigateDownSelect].UID = 1300;
- commands[kcNavigateDownSelect].isHidden = true;
- commands[kcNavigateDownSelect].isDummy = false;
- commands[kcNavigateDownSelect].Message = "kcNavigateDownSelect";
-
- commands[kcNavigateUpSelect].UID = 1301;
- commands[kcNavigateUpSelect].isHidden = true;
- commands[kcNavigateUpSelect].isDummy = false;
- commands[kcNavigateUpSelect].Message = "kcNavigateUpSelect";
-
- commands[kcNavigateLeftSelect].UID = 1302;
- commands[kcNavigateLeftSelect].isHidden = true;
- commands[kcNavigateLeftSelect].isDummy = false;
- commands[kcNavigateLeftSelect].Message = "kcNavigateLeftSelect";
-
- commands[kcNavigateRightSelect].UID = 1303;
- commands[kcNavigateRightSelect].isHidden = true;
- commands[kcNavigateRightSelect].isDummy = false;
- commands[kcNavigateRightSelect].Message = "kcNavigateRightSelect";
-
- commands[kcNavigateNextChanSelect].UID = 1304;
- commands[kcNavigateNextChanSelect].isHidden = true;
- commands[kcNavigateNextChanSelect].isDummy = false;
- commands[kcNavigateNextChanSelect].Message = "kcNavigateNextChanSelect";
-
- commands[kcNavigatePrevChanSelect].UID = 1305;
- commands[kcNavigatePrevChanSelect].isHidden = true;
- commands[kcNavigatePrevChanSelect].isDummy = false;
- commands[kcNavigatePrevChanSelect].Message = "kcNavigatePrevChanSelect";
-
- commands[kcHomeHorizontalSelect].UID = 1306;
- commands[kcHomeHorizontalSelect].isHidden = true;
- commands[kcHomeHorizontalSelect].isDummy = false;
- commands[kcHomeHorizontalSelect].Message = "kcHomeHorizontalSelect";
-
- commands[kcHomeVerticalSelect].UID = 1307;
- commands[kcHomeVerticalSelect].isHidden = true;
- commands[kcHomeVerticalSelect].isDummy = false;
- commands[kcHomeVerticalSelect].Message = "kcHomeVerticalSelect";
-
- commands[kcHomeAbsoluteSelect].UID = 1308;
- commands[kcHomeAbsoluteSelect].isHidden = true;
- commands[kcHomeAbsoluteSelect].isDummy = false;
- commands[kcHomeAbsoluteSelect].Message = "kcHomeAbsoluteSelect";
-
- commands[kcEndHorizontalSelect].UID = 1309;
- commands[kcEndHorizontalSelect].isHidden = true;
- commands[kcEndHorizontalSelect].isDummy = false;
- commands[kcEndHorizontalSelect].Message = "kcEndH...
[truncated message content] |
|
From: <sag...@us...> - 2010-07-27 21:55:33
|
Revision: 662
http://modplug.svn.sourceforge.net/modplug/?rev=662&view=rev
Author: saga-games
Date: 2010-07-27 21:55:26 +0000 (Tue, 27 Jul 2010)
Log Message:
-----------
[New] Sample Editor / Sample Drawing: Horizontal lines can now be drawn by holding down the shift key.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/View_smp.h
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2010-07-26 20:09:53 UTC (rev 661)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2010-07-27 21:55:26 UTC (rev 662)
@@ -107,6 +107,7 @@
memset(m_dwNotifyPos, 0, sizeof(m_dwNotifyPos));
memset(m_NcButtonState, 0, sizeof(m_NcButtonState));
m_bmpEnvBar.Create(IDB_SMPTOOLBAR, 20, 0, RGB(192,192,192));
+ m_lastDrawPoint.SetPoint(-1, -1);
}
@@ -1310,6 +1311,17 @@
{
if(m_dwEndDrag < len)
{
+ // Shift = draw horizontal lines
+ if(CMainFrame::GetInputHandler()->ShiftPressed())
+ {
+ if(m_lastDrawPoint.y != -1)
+ point.y = m_lastDrawPoint.y;
+ m_lastDrawPoint = point;
+ } else
+ {
+ m_lastDrawPoint.SetPoint(-1, -1);
+ }
+
if(pSndFile->Samples[m_nSample].GetElementarySampleSize() == 2)
SetSampleData<int16, uint16>(pSndFile->Samples[m_nSample].pSample, point, old);
else if(pSndFile->Samples[m_nSample].GetElementarySampleSize() == 1)
@@ -1364,6 +1376,7 @@
// set initial point for sample drawing
if (m_bDrawingEnabled)
{
+ m_lastDrawPoint = point;
pModDoc->GetSampleUndo()->PrepareUndo(m_nSample, sundo_replace);
if(pSndFile->Samples[m_nSample].GetElementarySampleSize() == 2)
SetInitialDrawPoint<int16, uint16>(pSndFile->Samples[m_nSample].pSample, point);
@@ -1390,6 +1403,7 @@
m_dwStatus &= ~SMPSTATUS_MOUSEDRAG;
ReleaseCapture();
}
+ m_lastDrawPoint.SetPoint(-1, -1);
}
Modified: trunk/OpenMPT/mptrack/View_smp.h
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.h 2010-07-26 20:09:53 UTC (rev 661)
+++ trunk/OpenMPT/mptrack/View_smp.h 2010-07-27 21:55:26 UTC (rev 662)
@@ -21,8 +21,10 @@
DWORD m_dwMenuParam;
DWORD m_NcButtonState[SMP_LEFTBAR_BUTTONS];
DWORD m_dwNotifyPos[MAX_CHANNELS];
- bool m_bDrawingEnabled;
+ bool m_bDrawingEnabled; // sample drawing mode enabled?
+ CPoint m_lastDrawPoint; // for drawing horizontal lines
+
public:
CViewSample();
DECLARE_SERIAL(CViewSample)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-26 20:10:00
|
Revision: 661
http://modplug.svn.sourceforge.net/modplug/?rev=661&view=rev
Author: saga-games
Date: 2010-07-26 20:09:53 +0000 (Mon, 26 Jul 2010)
Log Message:
-----------
[Fix] Mod Conversion: Extra fine portamento was not converted properly when converting from IT/MPTM/S3M to XM.
[Imp] Orderlist: Improved sequence name display in context menu.
[Ref] Removed some old, unused code.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.h
trunk/OpenMPT/mptrack/Ctrl_seq.cpp
trunk/OpenMPT/soundlib/modcommand.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-07-23 23:58:27 UTC (rev 660)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2010-07-26 20:09:53 UTC (rev 661)
@@ -727,7 +727,6 @@
ON_COMMAND(IDC_CHECK1, OnSetPanningChanged)
ON_COMMAND(IDC_CHECK2, OnEnableCutOff)
ON_COMMAND(IDC_CHECK3, OnEnableResonance)
-// ON_COMMAND(IDC_CHECK4, OnToggleHighpass)
ON_COMMAND(IDC_INSVIEWPLG, TogglePluginEditor) //rewbs.instroVSTi
ON_EN_CHANGE(IDC_EDIT_INSTRUMENT, OnInstrumentChanged)
ON_EN_CHANGE(IDC_SAMPLE_NAME, OnNameChanged)
@@ -792,7 +791,6 @@
DDX_Control(pDX, IDC_CHECK1, m_CheckPanning);
DDX_Control(pDX, IDC_CHECK2, m_CheckCutOff);
DDX_Control(pDX, IDC_CHECK3, m_CheckResonance);
- DDX_Control(pDX, IDC_CHECK4, m_CheckHighpass);
DDX_Control(pDX, IDC_SLIDER1, m_SliderVolSwing);
DDX_Control(pDX, IDC_SLIDER2, m_SliderPanSwing);
DDX_Control(pDX, IDC_SLIDER3, m_SliderCutOff);
@@ -1149,7 +1147,6 @@
m_EditPPS.EnableWindow(bITandMPT);
m_CheckCutOff.EnableWindow(bITandMPT);
m_CheckResonance.EnableWindow(bITandMPT);
- m_CheckHighpass.EnableWindow(bITandMPT);
m_SliderCutOff.EnableWindow(bITandMPT);
m_SliderResonance.EnableWindow(bITandMPT);
m_SpinInstrument.SetRange(1, m_pSndFile->m_nInstruments);
@@ -1231,7 +1228,6 @@
{
m_CheckCutOff.SetCheck((pIns->nIFC & 0x80) ? TRUE : FALSE);
m_CheckResonance.SetCheck((pIns->nIFR & 0x80) ? TRUE : FALSE);
- //m_CheckHighpass.SetCheck(pIns->nFilterMode);
m_SliderVolSwing.SetPos(pIns->nVolSwing);
m_SliderPanSwing.SetPos(pIns->nPanSwing);
m_SliderResSwing.SetPos(pIns->nResSwing);
@@ -2308,40 +2304,7 @@
}
}
-/*
-void CCtrlInstruments::OnToggleHighpass()
-//----------------------------------------
-{
- BOOL bHighpass = IsDlgButtonChecked(IDC_CHECK4);
- if (!m_pModDoc) {
- return;
- }
-
- CSoundFile *pSndFile = m_pModDoc->GetSoundFile();
- MODINSTRUMENT *pIns = pSndFile->Instruments[m_nInstrument];
-
- if (pIns) {
- if (bHighpass) {
- pIns->nFilterMode = FLTMODE_HIGHPASS;
- } else {
- pIns->nFilterMode = 0;
- }
-
- for (UINT i=0; i<MAX_CHANNELS; i++) {
- if (pSndFile->Chn[i].pModInstrument == pIns) {
- pSndFile->Chn[i].nFilterMode = pIns->nFilterMode;
- }
- }
- }
- m_pSndFile->instrumentModified[m_nInstrument-1] = TRUE;
- m_pModDoc->UpdateAllViews(NULL, HINT_INSNAMES, this);
- m_pModDoc->SetModified();
- SwitchToView();
-
-}
-*/
-
void CCtrlInstruments::OnVScroll(UINT nCode, UINT nPos, CScrollBar *pSB)
//----------------------------------------------------------------------
{
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.h
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.h 2010-07-23 23:58:27 UTC (rev 660)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.h 2010-07-26 20:09:53 UTC (rev 661)
@@ -72,7 +72,7 @@
CSpinButtonCtrl m_SpinMidiPR, m_SpinPPS, m_SpinMidiBK;
CComboBox m_ComboNNA, m_ComboDCT, m_ComboDCA, m_ComboPPC, m_CbnMidiCh, m_CbnMixPlug, m_CbnResampling, m_CbnFilterMode, m_CbnPluginVelocityHandling, m_CbnPluginVolumeHandling;
CEdit m_EditName, m_EditFileName, m_EditGlobalVol, m_EditPanning, m_EditPPS;
- CButton m_CheckPanning, m_CheckCutOff, m_CheckResonance, m_CheckHighpass;
+ CButton m_CheckPanning, m_CheckCutOff, m_CheckResonance;
CSliderCtrl m_SliderVolSwing, m_SliderPanSwing, m_SliderCutSwing, m_SliderResSwing,
m_SliderCutOff, m_SliderResonance;
CNoteMapWnd m_NoteMap;
@@ -163,7 +163,6 @@
afx_msg void OnEnableCutOff();
afx_msg void OnEnableResonance();
- //afx_msg void OnToggleHighpass();
afx_msg void OnEditSampleMap();
afx_msg void TogglePluginEditor(); //rewbs.instroVSTi
afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //rewbs.customKeys
Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2010-07-23 23:58:27 UTC (rev 660)
+++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2010-07-26 20:09:53 UTC (rev 661)
@@ -1068,7 +1068,10 @@
for(SEQUENCEINDEX i = 0; i < numSequences; i++)
{
CString str;
- str.Format(TEXT("%u: %s"), i, (LPCTSTR)pSndFile->Order.GetSequence(i).m_sName);
+ if(pSndFile->Order.GetSequence(i).m_sName.IsEmpty())
+ str.Format(TEXT("Sequence %u"), i);
+ else
+ str.Format(TEXT("%u: %s"), i, (LPCTSTR)pSndFile->Order.GetSequence(i).m_sName);
const UINT flags = (pSndFile->Order.GetCurrentSequenceIndex() == i) ? MF_STRING|MF_CHECKED : MF_STRING;
AppendMenu(menuSequence, flags, ID_SEQUENCE_ITEM + i, str);
}
Modified: trunk/OpenMPT/soundlib/modcommand.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.cpp 2010-07-23 23:58:27 UTC (rev 660)
+++ trunk/OpenMPT/soundlib/modcommand.cpp 2010-07-26 20:09:53 UTC (rev 661)
@@ -230,8 +230,15 @@
} else
if (m->param >= 0xE0)
{
- m->command = CMD_MODCMDEX;
- m->param = (((m->param & 0x0F)+3) >> 2) | 0x10;
+ if(newTypeIsXM)
+ {
+ m->command = CMD_XFINEPORTAUPDOWN;
+ m->param = 0x10 | (m->param & 0x0F);
+ } else
+ {
+ m->command = CMD_MODCMDEX;
+ m->param = (((m->param & 0x0F) + 3) >> 2) | 0x10;
+ }
} else m->command = CMD_PORTAMENTOUP;
break;
case CMD_PORTAMENTODOWN:
@@ -242,8 +249,15 @@
} else
if (m->param >= 0xE0)
{
- m->command = CMD_MODCMDEX;
- m->param = (((m->param & 0x0F)+3) >> 2) | 0x20;
+ if(newTypeIsXM)
+ {
+ m->command = CMD_XFINEPORTAUPDOWN;
+ m->param = 0x20 | (m->param & 0x0F);
+ } else
+ {
+ m->command = CMD_MODCMDEX;
+ m->param = (((m->param & 0x0F) + 3) >> 2) | 0x20;
+ }
} else m->command = CMD_PORTAMENTODOWN;
break;
case CMD_SPEED:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-23 23:58:33
|
Revision: 660
http://modplug.svn.sourceforge.net/modplug/?rev=660&view=rev
Author: saga-games
Date: 2010-07-23 23:58:27 +0000 (Fri, 23 Jul 2010)
Log Message:
-----------
[Fix] Pattern Editor: Shortcut for toggling record state didn't save the change, so it was reset with every new module.
[Mod] OpenMPT: Version is now 1.18.02.06
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_pat.cpp
trunk/OpenMPT/mptrack/version.h
Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2010-07-23 23:57:46 UTC (rev 659)
+++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2010-07-23 23:58:27 UTC (rev 660)
@@ -323,11 +323,11 @@
}
if (dwHintMask & (HINT_MODTYPE|HINT_PATNAMES))
{
- UINT nPat;
- if (dwHintMask&HINT_PATNAMES)
- nPat = (dwHintMask >> HINT_SHIFT_PAT);
+ PATTERNINDEX nPat;
+ if (dwHintMask & HINT_PATNAMES)
+ nPat = (PATTERNINDEX)(dwHintMask >> HINT_SHIFT_PAT);
else
- nPat = SendViewMessage(VIEWMSG_GETCURRENTPATTERN);
+ nPat = (PATTERNINDEX)SendViewMessage(VIEWMSG_GETCURRENTPATTERN);
m_pSndFile->GetPatternName(nPat, s, sizeof(s));
m_EditPatName.SetWindowText(s);
BOOL bXMIT = (m_pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)) ? TRUE : FALSE;
@@ -436,6 +436,7 @@
case CTRLMSG_SETRECORD:
if (lParam >= 0) m_bRecord = (BOOL)(lParam); else m_bRecord = !m_bRecord;
m_ToolBar.SetState(IDC_PATTERN_RECORD, ((m_bRecord) ? TBSTATE_CHECKED : 0)|TBSTATE_ENABLED);
+ CMainFrame::gbPatternRecord = m_bRecord;
SendViewMessage(VIEWMSG_SETRECORD, m_bRecord);
break;
@@ -927,7 +928,7 @@
{
UINT nState = m_ToolBar.GetState(IDC_PATTERN_RECORD);
m_bRecord = ((nState & TBSTATE_CHECKED) != 0);
- CMainFrame::gbPatternRecord=m_bRecord;
+ CMainFrame::gbPatternRecord = m_bRecord;
SendViewMessage(VIEWMSG_SETRECORD, m_bRecord);
SwitchToView();
}
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-07-23 23:57:46 UTC (rev 659)
+++ trunk/OpenMPT/mptrack/version.h 2010-07-23 23:58:27 UTC (rev 660)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 18
#define VER_MINOR 02
-#define VER_MINORMINOR 05
+#define VER_MINORMINOR 06
//Creates version number from version parts that appears in version string.
//For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-23 23:57:52
|
Revision: 659
http://modplug.svn.sourceforge.net/modplug/?rev=659&view=rev
Author: saga-games
Date: 2010-07-23 23:57:46 +0000 (Fri, 23 Jul 2010)
Log Message:
-----------
[Fix] IT/MPTM Loaders: Mod flags were not imported properly if all of them were 0 (was broken since revision 650)
[Mod] IT/MPTM/XM Loaders/Savers: Also using the logging mechanism instead of message boxes here. Removed some warning messages from some other loaders.
Revision Links:
--------------
http://modplug.svn.sourceforge.net/modplug/?rev=650&view=rev
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_gdm.cpp
trunk/OpenMPT/soundlib/Load_imf.cpp
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_psm.cpp
trunk/OpenMPT/soundlib/Load_xm.cpp
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/soundlib/Load_gdm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_gdm.cpp 2010-07-23 22:44:37 UTC (rev 658)
+++ trunk/OpenMPT/soundlib/Load_gdm.cpp 2010-07-23 23:57:46 UTC (rev 659)
@@ -256,14 +256,7 @@
if(iPatternLength > dwMemLength || iPatternsOffset > dwMemLength - iPatternLength) break;
if(Patterns.Insert(iPat, 64))
- {
-#ifdef MODPLUG_TRACKER
- CString s;
- s.Format(TEXT("Allocating patterns failed starting from pattern %u"), iPat);
- if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
-#endif // MODPLUG_TRACKER
break;
- }
// position in THIS pattern
DWORD iPatternPos = iPatternsOffset + 2;
Modified: trunk/OpenMPT/soundlib/Load_imf.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_imf.cpp 2010-07-23 22:44:37 UTC (rev 658)
+++ trunk/OpenMPT/soundlib/Load_imf.cpp 2010-07-23 23:57:46 UTC (rev 659)
@@ -367,14 +367,8 @@
dwMemPos += 4;
if(Patterns.Insert(nPat, nrows))
- {
-#ifdef MODPLUG_TRACKER
- CString s;
- s.Format(TEXT("Allocating patterns failed starting from pattern %u"), nPat);
- if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
-#endif // MODPLUG_TRACKER
break;
- }
+
row_data = Patterns[nPat];
row = 0;
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-07-23 22:44:37 UTC (rev 658)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-07-23 23:57:46 UTC (rev 659)
@@ -23,13 +23,12 @@
#include <list>
#include "../mptrack/version.h"
-#define str_MBtitle (GetStrI18N((_TEXT("Saving IT"))))
#define str_tooMuchPatternData (GetStrI18N((_TEXT("Warning: File format limit was reached. Some pattern data may not get written to file."))))
#define str_pattern (GetStrI18N((_TEXT("pattern"))))
-#define str_PatternSetTruncationNote (GetStrI18N((_TEXT("The module contains %u patterns but only %u patterns can be loaded in this OpenMPT version."))))
-#define str_SequenceTruncationNote (GetStrI18N((_TEXT("Module has sequence of length %u; it will be truncated to maximum supported length, %u."))))
-#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.")
+#define str_PatternSetTruncationNote (GetStrI18N((_TEXT("The module contains %u patterns but only %u patterns can be loaded in this OpenMPT version.\n"))))
+#define str_SequenceTruncationNote (GetStrI18N((_TEXT("Module has sequence of length %u; it will be truncated to maximum supported length, %u.\n"))))
+#define str_LoadingIncompatibleVersion TEXT("The file informed that it is incompatible with this version of OpenMPT. Loading was terminated.\n")
+#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.\n")
const uint16 verMptFileVer = 0x890;
const uint16 verMptFileVerLoadLimit = 0x1000; // If cwtv-field is greater or equal to this value,
@@ -113,7 +112,10 @@
TNTS_MAP_ITER iter = tNameToShort_Map.find(sf.Instruments[i]->pTuning);
if(iter == tNameToShort_Map.end()) //Should never happen
{
- MessageBox(0, "Error: 210807_1", 0, MB_ICONERROR);
+#ifdef MODPLUG_TRACKER
+ if(sf.GetpModDoc())
+ sf.GetpModDoc()->AddToLog(_T("Error: 210807_1\n"));
+#endif // MODPLUG_TRACKER
return;
}
srlztn::Binarywrite(oStrm, iter->second);
@@ -200,7 +202,7 @@
#ifdef MODPLUG_TRACKER
if(csf.GetpModDoc() != nullptr)
{
- string erm = string("Tuning ") + str + string(" used by the module was not found.");
+ string erm = string("Tuning ") + str + string(" used by the module was not found.\n");
csf.GetpModDoc()->AddToLog(erm.c_str());
csf.GetpModDoc()->SetModified(); //The tuning is changed so the modified flag is set.
}
@@ -885,6 +887,7 @@
if(m_dwLastSavedWithVersion < MAKE_VERSION_NUMERIC(1, 17, 2, 50))
{
+ SetModFlag(MSF_COMPATIBLE_PLAY, false);
SetModFlag(MSF_MIDICC_BUGEMULATION, true);
SetModFlag(MSF_OLDVOLSWING, true);
}
@@ -1350,7 +1353,7 @@
{
#ifdef MODPLUG_TRACKER
CString s;
- s.Format(TEXT("Allocating patterns failed starting from pattern %u"), npat);
+ s.Format(TEXT("Allocating patterns failed starting from pattern %u\n"), npat);
if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(s);
#endif // MODPLUG_TRACKER
break;
@@ -1539,7 +1542,7 @@
if (ssb.m_Status & srlztn::SNT_FAILURE)
{
#ifdef MODPLUG_TRACKER
- if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(_T("Unknown error occured while deserializing file."));
+ if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(_T("Unknown error occured while deserializing file.\n"));
#endif // MODPLUG_TRACKER
}
}
@@ -1548,7 +1551,7 @@
if(GetTuneSpecificTunings().Deserialize(iStrm))
{
#ifdef MODPLUG_TRACKER
- if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(_T("Error occured - loading failed while trying to load tune specific tunings."));
+ if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(_T("Error occured - loading failed while trying to load tune specific tunings.\n"));
#endif // MODPLUG_TRACKER
}
else
@@ -2298,8 +2301,14 @@
buf[len++] = 0;
if(patinfo[0] > uint16_max - len)
{
- CString str; str.Format("%s (%s %u)", str_tooMuchPatternData, str_pattern, npat);
- MessageBox(0, str, str_MBtitle, MB_ICONWARNING);
+#ifdef MODPLUG_TRACKER
+ if(GetpModDoc())
+ {
+ CString str;
+ str.Format("%s (%s %u)\n", str_tooMuchPatternData, str_pattern, npat);
+ GetpModDoc()->AddToLog(str);
+ }
+#endif // MODPLUG_TRACKER
break;
}
else
@@ -2426,7 +2435,12 @@
ssb.FinishWrite();
if (ssb.m_Status & srlztn::SNT_FAILURE)
- AfxMessageBox("Error occured in writing MPTM extensions.", MB_ICONERROR);
+ {
+#ifdef MODPLUG_TRACKER
+ if(GetpModDoc())
+ GetpModDoc()->AddToLog("Error occured in writing MPTM extensions.\n");
+#endif // MODPLUG_TRACKER
+ }
//Last 4 bytes should tell where the hack mpt things begin.
if(!fout.good())
@@ -3611,7 +3625,12 @@
{
const size_t objectsize = GetMIDIMapper().GetSerializationSize();
if(objectsize > size_t(int16_max))
- MessageBox(NULL, "Datafield overflow with MIDI to plugparam mappings; data won't be written.", NULL, MB_ICONERROR);
+ {
+#ifdef MODPLUG_TRACKER
+ if(GetpModDoc())
+ GetpModDoc()->AddToLog("Datafield overflow with MIDI to plugparam mappings; data won't be written.\n");
+#endif // MODPLUG_TRACKER
+ }
else
{
code = 'MIMA';
@@ -3700,6 +3719,8 @@
if(pInterpretMptMade != NULL)
*pInterpretMptMade = true;
+ // HACK: Reset mod flags to default values here, as they are not always written.
+ m_ModFlags = 0;
// Case macros.
#define CASE(id, data) \
Modified: trunk/OpenMPT/soundlib/Load_psm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_psm.cpp 2010-07-23 22:44:37 UTC (rev 658)
+++ trunk/OpenMPT/soundlib/Load_psm.cpp 2010-07-23 23:57:46 UTC (rev 659)
@@ -529,14 +529,7 @@
dwPatternOffset += 2;
if(Patterns.Insert(nPat, patternSize))
- {
-#ifdef MODPLUG_TRACKER
- CString s;
- s.Format(TEXT("Allocating patterns failed starting from pattern %u"), nPat);
- if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
-#endif // MODPLUG_TRACKER
break;
- }
// Read pattern.
MODCOMMAND *row_data;
@@ -1016,14 +1009,7 @@
dwMemPos += sizeof(PSM16PATHEADER);
if(Patterns.Insert(nPat, phdr->numRows))
- {
-#ifdef MODPLUG_TRACKER
- CString s;
- s.Format(TEXT("Allocating patterns failed starting from pattern %u"), nPat);
- if(m_pModDoc != nullptr) m_pModDoc->AddToLog(s);
-#endif // MODPLUG_TRACKER
break;
- }
MODCOMMAND *row_data;
ROWINDEX iRow = 0;
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-07-23 22:44:37 UTC (rev 658)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-07-23 23:57:46 UTC (rev 659)
@@ -16,7 +16,6 @@
#pragma warning(disable:4244) //conversion from 'type1' to 'type2', possible loss of data
-#define str_MBtitle (GetStrI18N((_TEXT("Saving XM"))))
#define str_tooMuchPatternData (GetStrI18N((_TEXT("Warning: File format limit was reached. Some pattern data may not get written to file."))))
#define str_pattern (GetStrI18N((_TEXT("pattern"))))
@@ -723,6 +722,7 @@
#ifndef MODPLUG_NO_FILESAVE
+#include "../mptrack/Moddoc.h" // for logging errors
bool CSoundFile::SaveXM(LPCSTR lpszFileName, UINT nPacking, const bool bCompatibilityExport)
//------------------------------------------------------------------------------------------
@@ -731,10 +731,10 @@
if(len > s.size() - x) /*Buffer running out? Make it larger.*/ \
s.resize(s.size() + 10*1024, 0); \
\
- if(len > uint16_max - (UINT)x) /*Reaching the limits of file format?*/ \
+ if((len > uint16_max - (UINT)x) && GetpModDoc()) /*Reaching the limits of file format?*/ \
{ \
- CString str; str.Format("%s (%s %u)", str_tooMuchPatternData, str_pattern, i); \
- MessageBox(0, str, str_MBtitle, MB_ICONWARNING); \
+ CString str; str.Format("%s (%s %u)\n", str_tooMuchPatternData, str_pattern, i); \
+ GetpModDoc()->AddToLog(str); \
break; \
}
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-07-23 22:44:37 UTC (rev 658)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-07-23 23:57:46 UTC (rev 659)
@@ -622,12 +622,12 @@
BOOL Create(LPCBYTE lpStream, CModDoc *pModDoc, DWORD dwMemLength=0);
BOOL Destroy();
MODTYPE GetType() const { return m_nType; }
- inline bool TypeIsIT_MPT() const {return (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) != 0;}
- inline bool TypeIsIT_MPT_XM() const {return (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_XM)) != 0;}
- inline bool TypeIsS3M_IT_MPT() const {return (m_nType & (MOD_TYPE_S3M | MOD_TYPE_IT | MOD_TYPE_MPT)) != 0;}
- inline bool TypeIsXM_MOD() const {return (m_nType & (MOD_TYPE_XM | MOD_TYPE_MOD)) != 0;}
- inline bool TypeIsMOD_S3M() const {return (m_nType & (MOD_TYPE_MOD | MOD_TYPE_S3M)) != 0;}
- CModDoc* GetpModDoc() {return m_pModDoc;}
+ inline bool TypeIsIT_MPT() const { return (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) != 0; }
+ inline bool TypeIsIT_MPT_XM() const { return (m_nType & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_XM)) != 0; }
+ inline bool TypeIsS3M_IT_MPT() const { return (m_nType & (MOD_TYPE_S3M | MOD_TYPE_IT | MOD_TYPE_MPT)) != 0; }
+ inline bool TypeIsXM_MOD() const { return (m_nType & (MOD_TYPE_XM | MOD_TYPE_MOD)) != 0; }
+ inline bool TypeIsMOD_S3M() const { return (m_nType & (MOD_TYPE_MOD | MOD_TYPE_S3M)) != 0; }
+ CModDoc* GetpModDoc() const { return m_pModDoc; }
void SetMasterVolume(UINT vol, bool adjustAGC = false);
UINT GetMasterVolume() const { return m_nMasterVolume; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-23 22:44:44
|
Revision: 658
http://modplug.svn.sourceforge.net/modplug/?rev=658&view=rev
Author: saga-games
Date: 2010-07-23 22:44:37 +0000 (Fri, 23 Jul 2010)
Log Message:
-----------
[Fix] Treeview: Deleting a sample from the treeview and then applying undo for this sample in the sample editor crashed OpenMPT.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/View_smp.cpp
trunk/OpenMPT/mptrack/View_tre.cpp
Modified: trunk/OpenMPT/mptrack/View_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_smp.cpp 2010-07-18 23:05:20 UTC (rev 657)
+++ trunk/OpenMPT/mptrack/View_smp.cpp 2010-07-23 22:44:37 UTC (rev 658)
@@ -1683,8 +1683,8 @@
if ((m_dwBeginSel >= m_dwEndSel)
|| (m_dwEndSel - m_dwBeginSel + 4 >= len))
{
- if (MessageBox("Remove this sample ?", "Remove Sample", MB_YESNOCANCEL | MB_ICONQUESTION) != IDYES) return;
- pModDoc->GetSampleUndo()->PrepareUndo(m_nSample, sundo_delete, 0, pSmp->nLength);
+ if (MessageBox("Remove this sample?", "Remove Sample", MB_YESNOCANCEL | MB_ICONQUESTION) != IDYES) return;
+ pModDoc->GetSampleUndo()->PrepareUndo(m_nSample, sundo_replace);
BEGIN_CRITICAL();
pSndFile->DestroySample(m_nSample);
END_CRITICAL();
@@ -2081,12 +2081,12 @@
void CViewSample::OnChar(UINT /*nChar*/, UINT, UINT /*nFlags*/)
-//-----------------------------------------------------
+//-------------------------------------------------------------
{
}
void CViewSample::PlayNote(UINT note, const uint32 nStartPos)
-//------------------------------------------------------------
+//-----------------------------------------------------------
{
CMainFrame *pMainFrm = CMainFrame::GetMainFrame();
CModDoc *pModDoc = GetDocument();
@@ -2567,7 +2567,7 @@
}
LRESULT CViewSample::OnCustomKeyMsg(WPARAM wParam, LPARAM /*lParam*/)
-//---------------------------------------------------------------
+//-------------------------------------------------------------------
{
if (wParam == kcNull)
return NULL;
@@ -2608,12 +2608,12 @@
case kcNoteCut: PlayNote(NOTE_NOTECUT); return wParam;
}
- if (wParam>=kcSampStartNotes && wParam<=kcSampEndNotes)
+ if (wParam >= kcSampStartNotes && wParam <= kcSampEndNotes)
{
- PlayNote(wParam-kcSampStartNotes+1+pMainFrm->GetBaseOctave()*12);
+ PlayNote(wParam - kcSampStartNotes + 1 + pMainFrm->GetBaseOctave() * 12);
return wParam;
}
- if (wParam>=kcSampStartNoteStops && wParam<=kcSampEndNoteStops)
+ if (wParam >= kcSampStartNoteStops && wParam <= kcSampEndNoteStops)
{
m_dwStatus &= ~SMPSTATUS_KEYDOWN;
return wParam;
Modified: trunk/OpenMPT/mptrack/View_tre.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_tre.cpp 2010-07-18 23:05:20 UTC (rev 657)
+++ trunk/OpenMPT/mptrack/View_tre.cpp 2010-07-23 22:44:37 UTC (rev 658)
@@ -1403,14 +1403,15 @@
case MODITEM_SEQUENCE:
if (pModDoc && pSndFile)
{
- wsprintf(s, _T("Delete sequence %d?"), modItemID & 0xFFFF);
+ wsprintf(s, _T("Remove sequence %d?"), modItemID);
if(MessageBox(s, _T("Confirmation"), MB_YESNO | MB_DEFBUTTON2) == IDNO) break;
- pSndFile->Order.RemoveSequence((SEQUENCEINDEX)(modItemID & 0xFFFF));
+ pSndFile->Order.RemoveSequence((SEQUENCEINDEX)(modItemID));
pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, NULL);
}
break;
case MODITEM_ORDER:
+ // might be slightly annoying to ask for confirmation here, and it's rather easy to restore the orderlist anyway.
if ((pModDoc) && (pModDoc->RemoveOrder((SEQUENCEINDEX)(modItemID >> 16), (ORDERINDEX)(modItemID & 0xFFFF))))
{
pModDoc->UpdateAllViews(NULL, HINT_MODSEQUENCE, NULL);
@@ -1418,27 +1419,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)))
+ wsprintf(s, _T("Remove pattern %d?"), modItemID);
+ if (pModDoc == nullptr || MessageBox(s, _T("Confirmation"), MB_YESNO | MB_DEFBUTTON2) == IDNO) break;
+ if (pModDoc->RemovePattern((PATTERNINDEX)modItemID))
{
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)))
+ wsprintf(s, _T("Remove sample %d?"), modItemID);
+ if (pModDoc == nullptr || MessageBox(s, _T("Confirmation"), MB_YESNO | MB_DEFBUTTON2) == IDNO) break;
+ pModDoc->GetSampleUndo()->PrepareUndo((SAMPLEINDEX)modItemID, sundo_replace);
+ if (pModDoc->RemoveSample((SAMPLEINDEX)modItemID))
{
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)))
+ wsprintf(s, _T("Remove instrument %d?"), modItemID);
+ if (pModDoc == nullptr || MessageBox(s, _T("Confirmation"), MB_YESNO | MB_DEFBUTTON2) == IDNO) break;
+ if (pModDoc->RemoveInstrument((INSTRUMENTINDEX)modItemID))
{
pModDoc->UpdateAllViews(NULL, (UINT(modItemID) << HINT_SHIFT_INS) | HINT_MODTYPE|HINT_ENVELOPE|HINT_INSTRUMENT);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-18 23:05:26
|
Revision: 657
http://modplug.svn.sourceforge.net/modplug/?rev=657&view=rev
Author: saga-games
Date: 2010-07-18 23:05:20 +0000 (Sun, 18 Jul 2010)
Log Message:
-----------
[Fix] Saving XM files with 127 channels (sigh) was broken.
[Mod] OpenMPT: Version is now 1.18.02.05
Modified Paths:
--------------
trunk/OpenMPT/mptrack/version.h
trunk/OpenMPT/soundlib/Load_xm.cpp
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-07-18 22:40:22 UTC (rev 656)
+++ trunk/OpenMPT/mptrack/version.h 2010-07-18 23:05:20 UTC (rev 657)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 18
#define VER_MINOR 02
-#define VER_MINORMINOR 04
+#define VER_MINORMINOR 05
//Creates version number from version parts that appears in version string.
//For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of
Modified: trunk/OpenMPT/soundlib/Load_xm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_xm.cpp 2010-07-18 22:40:22 UTC (rev 656)
+++ trunk/OpenMPT/soundlib/Load_xm.cpp 2010-07-18 23:05:20 UTC (rev 657)
@@ -766,7 +766,7 @@
xmheader.restartpos = LittleEndianW(m_nRestartPos);
xmheader.channels = (m_nChannels + 1) & 0xFFFE; // avoid odd channel count for FT2 compatibility
- if(m_nChannels & 1) bAddChannel = true;
+ if((m_nChannels & 1) && m_nChannels < MAX_BASECHANNELS) bAddChannel = true;
if(bCompatibilityExport && xmheader.channels > 32)
xmheader.channels = 32;
if(xmheader.channels > MAX_BASECHANNELS) xmheader.channels = MAX_BASECHANNELS;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-18 22:40:28
|
Revision: 656
http://modplug.svn.sourceforge.net/modplug/?rev=656&view=rev
Author: saga-games
Date: 2010-07-18 22:40:22 +0000 (Sun, 18 Jul 2010)
Log Message:
-----------
[Imp] Sample Editor: When hovering the relative note and finetune controls, the actual C-5 frequency is now also shown for MOD files. Previously, this only worked for XM files.
[Imp] Sample Editor: Finetune range is now limited from -8 to 7 for MOD files.
[Fix] Sample Editor: When using the spin button next to the finetune or frequency control, the module was not marked as modified.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Ctrl_smp.cpp
Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-07-18 22:00:53 UTC (rev 655)
+++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2010-07-18 22:40:22 UTC (rev 656)
@@ -504,7 +504,7 @@
case IDC_EDIT5:
case IDC_SPIN5:
case IDC_COMBO_BASENOTE:
- if ((m_pSndFile) && (m_pSndFile->m_nType & MOD_TYPE_XM) && (m_nSample))
+ if ((m_pSndFile) && (m_pSndFile->m_nType & (MOD_TYPE_XM|MOD_TYPE_MOD)) && (m_nSample))
{
MODSAMPLE *pSmp = &m_pSndFile->Samples[m_nSample];
UINT nFreqHz = CSoundFile::TransposeToFrequency(pSmp->RelativeTone, pSmp->nFineTune);
@@ -645,7 +645,10 @@
transp = CSoundFile::FrequencyToTranspose(pSmp->nC5Speed) >> 7;
} else
{
- SetDlgItemInt(IDC_EDIT5, (int)pSmp->nFineTune);
+ int ftune = ((int)pSmp->nFineTune);
+ // MOD finetune range -8 to 7 translates to -128 to 112
+ if(m_pSndFile->m_nType & MOD_TYPE_MOD) ftune >>= 4;
+ SetDlgItemInt(IDC_EDIT5, ftune);
transp = (int)pSmp->RelativeTone;
}
int basenote = 60 - transp;
@@ -2450,6 +2453,8 @@
}
} else
{
+ if(m_pSndFile->m_nType & MOD_TYPE_MOD)
+ n = MOD2XMFineTune(n);
if ((n >= -128) && (n <= 127))
{
m_pSndFile->Samples[m_nSample].nFineTune = (signed char)n;
@@ -2956,11 +2961,21 @@
m_EditFineTune.SetWindowText(s);
} else
{
- LONG d = CLAMP(pSmp->nFineTune + pos * ((m_pSndFile->GetType() & MOD_TYPE_MOD) ? 16 : 1), -128, 127);
- pSmp->nFineTune = (signed char)d;
- wsprintf(s, "%d", d);
- m_EditFineTune.SetWindowText(s);
+ int ftune = (int)pSmp->nFineTune;
+ // MOD finetune range -8 to 7 translates to -128 to 112
+ if(m_pSndFile->GetType() & MOD_TYPE_MOD)
+ {
+ ftune = CLAMP((ftune >> 4) + pos, -8, 7);
+ pSmp->nFineTune = MOD2XMFineTune((signed char)ftune);
+ }
+ else
+ {
+ ftune = CLAMP(ftune + pos, -128, 127);
+ pSmp->nFineTune = (signed char)ftune;
+ }
+ SetDlgItemInt(IDC_EDIT5, ftune, TRUE);
}
+ bRedraw = true;
m_SpinFineTune.SetPos(0);
}
if ((nCode == SB_ENDSCROLL) || (nCode == SB_THUMBPOSITION)) SwitchToView();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-18 22:01:00
|
Revision: 655
http://modplug.svn.sourceforge.net/modplug/?rev=655&view=rev
Author: saga-games
Date: 2010-07-18 22:00:53 +0000 (Sun, 18 Jul 2010)
Log Message:
-----------
[Mod] Updated internet links.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/MainFrm.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
Modified: trunk/OpenMPT/mptrack/MainFrm.cpp
===================================================================
--- trunk/OpenMPT/mptrack/MainFrm.cpp 2010-07-17 22:19:07 UTC (rev 654)
+++ trunk/OpenMPT/mptrack/MainFrm.cpp 2010-07-18 22:00:53 UTC (rev 655)
@@ -2749,7 +2749,7 @@
void CMainFrame::OnReportBug()
//----------------------------
{
- CTrackApp::OpenURL("http://www.lpchip.com/modplug/");
+ CTrackApp::OpenURL("http://openmpt.com/bugreport/");
return;
}
//end rewbs.reportBug
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2010-07-17 22:19:07 UTC (rev 654)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2010-07-18 22:00:53 UTC (rev 655)
@@ -1825,7 +1825,7 @@
m_heContact.SetWindowText(
"Contact / Discussion:\r\n\
-http://modplug.sourceforge.net/forum\r\n\
+http://openmpt.com/forum/\r\n\
\r\nUpdates:\r\n\
http://sourceforge.net/projects/modplug/");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-17 22:19:13
|
Revision: 654
http://modplug.svn.sourceforge.net/modplug/?rev=654&view=rev
Author: saga-games
Date: 2010-07-17 22:19:07 +0000 (Sat, 17 Jul 2010)
Log Message:
-----------
[Reg] Envelope release nodes cannot be enabled for IT files anymore, but they are still played for compatibility. (One has to start removing the crap from the old formats at some point...)
[Imp] Mod Conversion: Envelope release nodes are now removed when converting from MPTM.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.h
trunk/OpenMPT/mptrack/Modedit.cpp
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/mod_specifications.h
Modified: trunk/OpenMPT/mptrack/Moddoc.h
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.h 2010-07-17 20:34:45 UTC (rev 653)
+++ trunk/OpenMPT/mptrack/Moddoc.h 2010-07-17 22:19:07 UTC (rev 654)
@@ -51,7 +51,7 @@
STATIC_ASSERT( (HINT_MASK_ITEM & HINT_MASK_FLAGS) == 0 );
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// NOTE : be carefull when adding new flags !!!
+// NOTE : be careful when adding new flags !!!
// -------------------------------------------------------------------------------------------------------------------------
// those flags are passed through a 32bits parameter which can also contain instrument/sample/pattern row... number :
// HINT_SAMPLEINFO & HINT_SAMPLEDATA & HINT_SMPNAMES : can be used with a sample number 12bit coded (passed as bit 20 to 31)
@@ -172,7 +172,7 @@
void SetShowSaveDialog(bool b) {m_ShowSavedialog = b;}
void PostMessageToAllViews(UINT uMsg, WPARAM wParam=0, LPARAM lParam=0);
void SendMessageToActiveViews(UINT uMsg, WPARAM wParam=0, LPARAM lParam=0);
- UINT GetModType() const { return m_SndFile.m_nType; }
+ MODTYPE GetModType() const { return m_SndFile.m_nType; }
INSTRUMENTINDEX GetNumInstruments() const { return m_SndFile.m_nInstruments; }
SAMPLEINDEX GetNumSamples() const { return m_SndFile.m_nSamples; }
BOOL AddToLog(LPCSTR lpszLog);
@@ -334,7 +334,7 @@
//}}AFX_VIRTUAL
// for mod conversion
- bool UpdateEnvelopes(INSTRUMENTENVELOPE *mptEnv);
+ uint8 UpdateEnvelopes(INSTRUMENTENVELOPE *mptEnv);
// Implementation
Modified: trunk/OpenMPT/mptrack/Modedit.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Modedit.cpp 2010-07-17 20:34:45 UTC (rev 653)
+++ trunk/OpenMPT/mptrack/Modedit.cpp 2010-07-17 22:19:07 UTC (rev 654)
@@ -379,15 +379,17 @@
m_SndFile.m_nDefaultTempo = CLAMP(m_SndFile.m_nDefaultTempo, specs.tempoMin, specs.tempoMax);
m_SndFile.m_nDefaultSpeed = CLAMP(m_SndFile.m_nDefaultSpeed, specs.speedMin, specs.speedMax);
- bool bTrimmedEnvelopes = false;
+ uint8 trimmedEnvelopes = 0;
for(INSTRUMENTINDEX i = 1; i <= m_SndFile.m_nInstruments; i++) if(m_SndFile.Instruments[i] != nullptr)
{
- bTrimmedEnvelopes |= UpdateEnvelopes(&(m_SndFile.Instruments[i]->VolEnv));
- bTrimmedEnvelopes |= UpdateEnvelopes(&(m_SndFile.Instruments[i]->PanEnv));
- bTrimmedEnvelopes |= UpdateEnvelopes(&(m_SndFile.Instruments[i]->PitchEnv));
+ trimmedEnvelopes |= UpdateEnvelopes(&(m_SndFile.Instruments[i]->VolEnv));
+ trimmedEnvelopes |= UpdateEnvelopes(&(m_SndFile.Instruments[i]->PanEnv));
+ trimmedEnvelopes |= UpdateEnvelopes(&(m_SndFile.Instruments[i]->PitchEnv));
}
- if(bTrimmedEnvelopes == true)
+ if(trimmedEnvelopes & 1)
AddToLog("WARNING: Instrument envelopes have been shortened.\n");
+ if(trimmedEnvelopes & 2)
+ AddToLog("WARNING: Instrument envelope release nodes are not supported by the new format.\n");
SetModified();
GetPatternUndo()->ClearUndo();
@@ -397,25 +399,36 @@
return TRUE;
}
-bool CModDoc::UpdateEnvelopes(INSTRUMENTENVELOPE *mptEnv)
-//-------------------------------------------------------
+// Trim envelopes and remove release nodes.
+// If bit 0 of the return value is set, the envelope has been shortened.
+// If bit 1 of the return value is set, the envelope's release node has been removed.
+uint8 CModDoc::UpdateEnvelopes(INSTRUMENTENVELOPE *mptEnv)
+//--------------------------------------------------------
{
// shorten instrument envelope if necessary (for mod conversion)
const UINT iEnvMax = m_SndFile.GetModSpecifications().envelopePointsMax;
- bool bResult = false;
+ uint8 result = 0;
- #define TRIMENV(i) if(i > iEnvMax) {i = iEnvMax; bResult = true;}
+ #define TRIMENV(i) if(i > iEnvMax) { i = iEnvMax; result |= 1; }
TRIMENV(mptEnv->nNodes);
TRIMENV(mptEnv->nLoopStart);
TRIMENV(mptEnv->nLoopEnd);
TRIMENV(mptEnv->nSustainStart);
TRIMENV(mptEnv->nSustainEnd);
- if(mptEnv->nReleaseNode != ENV_RELEASE_NODE_UNSET) TRIMENV(mptEnv->nReleaseNode);
+ if(mptEnv->nReleaseNode != ENV_RELEASE_NODE_UNSET)
+ {
+ TRIMENV(mptEnv->nReleaseNode);
+ if(!m_SndFile.GetModSpecifications().hasReleaseNode)
+ {
+ mptEnv->nReleaseNode = ENV_RELEASE_NODE_UNSET;
+ result |= 2;
+ }
+ }
#undef TRIMENV
- return bResult;
+ return result;
}
Modified: trunk/OpenMPT/mptrack/View_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.cpp 2010-07-17 20:34:45 UTC (rev 653)
+++ trunk/OpenMPT/mptrack/View_ins.cpp 2010-07-17 22:19:07 UTC (rev 654)
@@ -472,6 +472,17 @@
if(envelope == nullptr) return false;
if(nPoint < 1 || nPoint > (int)EnvGetLastPoint()) return false;
+ // Don't allow release nodes in IT/XM. GetDocument()/... nullptr check is done in GetEnvelopePtr, so no need to check twice.
+ if(!GetDocument()->GetSoundFile()->GetModSpecifications().hasReleaseNode)
+ {
+ if(envelope->nReleaseNode != ENV_RELEASE_NODE_UNSET)
+ {
+ envelope->nReleaseNode = ENV_RELEASE_NODE_UNSET;
+ return true;
+ }
+ return false;
+ }
+
if (envelope->nReleaseNode == nPoint)
{
envelope->nReleaseNode = ENV_RELEASE_NODE_UNSET;
@@ -1619,22 +1630,26 @@
void CViewInstrument::OnRButtonDown(UINT, CPoint pt)
//--------------------------------------------------
{
- CModDoc *pModDoc = GetDocument();
+ const CModDoc *pModDoc = GetDocument();
+ if(!pModDoc) return;
+ const CSoundFile *pSndFile = GetDocument()->GetSoundFile();
+ if(!pSndFile) return;
+
CMenu Menu;
if (m_dwStatus & INSSTATUS_DRAGGING) return;
if ((pModDoc) && (Menu.LoadMenu(IDR_ENVELOPES)))
{
CMenu* pSubMenu = Menu.GetSubMenu(0);
- if (pSubMenu!=NULL)
+ if (pSubMenu != NULL)
{
- CSoundFile *pSndFile = pModDoc->GetSoundFile();
- UINT maxpoint = (pSndFile->m_nType == MOD_TYPE_XM) ? 11 : 24;
- UINT lastpoint = EnvGetLastPoint();
m_nDragItem = ScreenToPoint(pt.x, pt.y) + 1;
+ const UINT maxpoint = (pSndFile->m_nType == MOD_TYPE_XM) ? 11 : 24;
+ const UINT lastpoint = EnvGetLastPoint();
+ const bool forceRelease = !pSndFile->GetModSpecifications().hasReleaseNode && (EnvGetReleaseNode() != ENV_RELEASE_NODE_UNSET);
pSubMenu->EnableMenuItem(ID_ENVELOPE_INSERTPOINT, (lastpoint < maxpoint) ? MF_ENABLED : MF_GRAYED);
pSubMenu->EnableMenuItem(ID_ENVELOPE_REMOVEPOINT, ((m_nDragItem) && (lastpoint > 0)) ? MF_ENABLED : MF_GRAYED);
pSubMenu->EnableMenuItem(ID_ENVELOPE_CARRY, (pSndFile->GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT)) ? MF_ENABLED : MF_GRAYED);
- pSubMenu->EnableMenuItem(ID_ENVELOPE_TOGGLERELEASENODE, (pSndFile->GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT) && m_nEnv == ENV_VOLUME) ? MF_ENABLED : MF_GRAYED);
+ pSubMenu->EnableMenuItem(ID_ENVELOPE_TOGGLERELEASENODE, ((pSndFile->GetModSpecifications().hasReleaseNode && m_nEnv == ENV_VOLUME) || forceRelease) ? MF_ENABLED : MF_GRAYED);
pSubMenu->CheckMenuItem(ID_ENVELOPE_SETLOOP, (EnvGetLoop()) ? MF_CHECKED : MF_UNCHECKED);
pSubMenu->CheckMenuItem(ID_ENVELOPE_SUSTAIN, (EnvGetSustain()) ? MF_CHECKED : MF_UNCHECKED);
pSubMenu->CheckMenuItem(ID_ENVELOPE_CARRY, (EnvGetCarry()) ? MF_CHECKED : MF_UNCHECKED);
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2010-07-17 20:34:45 UTC (rev 653)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2010-07-17 22:19:07 UTC (rev 654)
@@ -557,7 +557,7 @@
public: // for Editing
CModDoc* m_pModDoc;
- UINT m_nType;
+ MODTYPE m_nType;
CHANNELINDEX m_nChannels;
SAMPLEINDEX m_nSamples;
INSTRUMENTINDEX m_nInstruments;
Modified: trunk/OpenMPT/soundlib/mod_specifications.h
===================================================================
--- trunk/OpenMPT/soundlib/mod_specifications.h 2010-07-17 20:34:45 UTC (rev 653)
+++ trunk/OpenMPT/soundlib/mod_specifications.h 2010-07-17 22:19:07 UTC (rev 654)
@@ -15,7 +15,7 @@
bool HasVolCommand(MODCOMMAND::VOLCMD volcmd) const;
bool HasCommand(MODCOMMAND::COMMAND cmd) const;
- //NOTE: If changing order, update all initializations below.
+ // NOTE: If changing order, update all initializations below.
char fileExtension[6]; // File extension without dot.
MODCOMMAND::NOTE noteMin; // Minimum note index (index starts from 1)
MODCOMMAND::NOTE noteMax; // Maximum note index (index starts from 1)
@@ -30,11 +30,11 @@
TEMPO tempoMax;
ROWINDEX patternRowsMin;
ROWINDEX patternRowsMax;
- uint16 modNameLengthMax; //Meaning 'usable letters', possible null character is not included.
- uint16 sampleNameLengthMax; //Dito
- uint16 sampleFilenameLengthMax; //Dito
- uint16 instrNameLengthMax; //Dito
- uint16 instrFilenameLengthMax; //Dito
+ uint16 modNameLengthMax; // Meaning 'usable letters', possible null character is not included.
+ uint16 sampleNameLengthMax; // Dito
+ uint16 sampleFilenameLengthMax; // Dito
+ uint16 instrNameLengthMax; // Dito
+ uint16 instrFilenameLengthMax; // Dito
SAMPLEINDEX samplesMax;
INSTRUMENTINDEX instrumentsMax;
BYTE defaultMixLevels;
@@ -43,6 +43,7 @@
UINT speedMax; // Maximum ticks per frame
bool hasComments; // True if format has a comments field
UINT envelopePointsMax; // Maximum number of points of each envelope
+ bool hasReleaseNode; // Envelope release node
char commands[MAX_EFFECTS + 1]; // An array holding all commands this format supports; commands that are not supported are marked with "?"
char volcommands[MAX_VOLCMDS + 1]; // dito, but for volume column
bool hasIgnoreIndex; // Does "+++" pattern exist?
@@ -61,33 +62,34 @@
NOTE: If changing limits, see whether:
-savefile format and GUI methods can handle new values(might not be a small task :).
*/
- "MPTm", //File extension
- 1, //Minimum note index
- NOTE_MAX, //Maximum note index
- true, //Has notecut.
- true, //Has noteoff.
- true, //Has notefade.
- 4000, //Pattern max.
- 4000, //Order max.
- 1, //Channel min
- 127, //Channel max
- 32, //Min tempo
- 512, //Max tempo
- 1, //Min pattern rows
- 1024, //Max pattern rows
- 25, //Max mod name length
- 26, //Max sample name length
- 12, //Max sample filename length
- 26, //Max instrument name length
- 12, //Max instrument filename length
- 4000, //SamplesMax
- 256, //instrumentMax
- mixLevels_117RC3, //defaultMixLevels
- 200, //Max MIDI mapping directives
- 1, //Min Speed
- 255, //Max Speed
- true, //Has song comments
- MAX_ENVPOINTS, //Envelope point count
+ "MPTm", // File extension
+ 1, // Minimum note index
+ NOTE_MAX, // Maximum note index
+ true, // Has notecut.
+ true, // Has noteoff.
+ true, // Has notefade.
+ 4000, // Pattern max.
+ 4000, // Order max.
+ 1, // Channel min
+ 127, // Channel max
+ 32, // Min tempo
+ 512, // Max tempo
+ 1, // Min pattern rows
+ 1024, // Max pattern rows
+ 25, // Max mod name length
+ 26, // Max sample name length
+ 12, // Max sample filename length
+ 26, // Max instrument name length
+ 12, // Max instrument filename length
+ 4000, // SamplesMax
+ 256, // instrumentMax
+ mixLevels_117RC3, // defaultMixLevels
+ 200, // Max MIDI mapping directives
+ 1, // Min Speed
+ 255, // Max Speed
+ true, // Has song comments
+ MAX_ENVPOINTS, // Envelope point count
+ true, // Has envelope release node
" JFEGHLKRXODB?CQATI?SMNVW?UY?P?Z\\:#", // Supported Effects
" vpcdabuhlrgfe?o", // Supported Volume Column commands
true, // Has "+++" pattern
@@ -100,34 +102,35 @@
const CModSpecifications mod =
{
- //TODO: Set correct values.
- "mod", //File extension
- 37, //Minimum note index
- 108, //Maximum note index
- false, //No notecut.
- false, //No noteoff.
- false, //No notefade.
- 64, //Pattern max.
- 128, //Order max.
- 4, //Channel min
- 32, //Channel max
- 32, //Min tempo
- 255, //Max tempo
- 64, //Min pattern rows
- 64, //Max pattern rows
- 20, //Max mod name length
- 22, //Max sample name length
- 0, //Max sample filename length
- 0, //Max instrument name length
- 0, //Max instrument filename length
- 31, //SamplesMax
- 0, //instrumentMax
- mixLevels_original, //defaultMixLevels
- 0, //Max MIDI mapping directives
- 1, //Min Speed
- 31, //Max Speed
- false, //No song comments
- 0, //No instrument envelopes
+ // TODO: Set correct values.
+ "mod", // File extension
+ 37, // Minimum note index
+ 108, // Maximum note index
+ false, // No notecut.
+ false, // No noteoff.
+ false, // No notefade.
+ 64, // Pattern max.
+ 128, // Order max.
+ 4, // Channel min
+ 32, // Channel max
+ 32, // Min tempo
+ 255, // Max tempo
+ 64, // Min pattern rows
+ 64, // Max pattern rows
+ 20, // Max mod name length
+ 22, // Max sample name length
+ 0, // Max sample filename length
+ 0, // Max instrument name length
+ 0, // Max instrument filename length
+ 31, // SamplesMax
+ 0, // instrumentMax
+ mixLevels_original, // defaultMixLevels
+ 0, // Max MIDI mapping directives
+ 1, // Min Speed
+ 31, // Max Speed
+ false, // No song comments
+ 0, // No instrument envelopes
+ false, // No envelope release node
" 0123456789ABCD?FF?E???????????????", // Supported Effects
" ???????????????", // Supported Volume Column commands
false, // Doesn't have "+++" pattern
@@ -138,34 +141,35 @@
// MOD with MPT extensions.
const CModSpecifications modEx =
{
- //TODO: Set correct values.
- "mod", //File extension
- 37, //Minimum note index
- 108, //Maximum note index
- false, //No notecut.
- false, //No noteoff.
- false, //No notefade.
- 64, //Pattern max.
- 128, //Order max.
- 4, //Channel min
- 32, //Channel max
- 32, //Min tempo
- 255, //Max tempo
- 64, //Min pattern rows
- 64, //Max pattern rows
- 20, //Max mod name length
- 22, //Max sample name length
- 0, //Max sample filename length
- 0, //Max instrument name length
- 0, //Max instrument filename length
- 31, //SamplesMax
- 0, //instrumentMax
- mixLevels_original, //defaultMixLevels
- 0, //Max MIDI mapping directives
- 1, //Min Speed
- 31, //Max Speed
- false, //No song comments
- 0, //No instrument envelopes
+ // TODO: Set correct values.
+ "mod", // File extension
+ 37, // Minimum note index
+ 108, // Maximum note index
+ false, // No notecut.
+ false, // No noteoff.
+ false, // No notefade.
+ 64, // Pattern max.
+ 128, // Order max.
+ 4, // Channel min
+ 32, // Channel max
+ 32, // Min tempo
+ 255, // Max tempo
+ 64, // Min pattern rows
+ 64, // Max pattern rows
+ 20, // Max mod name length
+ 22, // Max sample name length
+ 0, // Max sample filename length
+ 0, // Max instrument name length
+ 0, // Max instrument filename length
+ 31, // SamplesMax
+ 0, // instrumentMax
+ mixLevels_original, // defaultMixLevels
+ 0, // Max MIDI mapping directives
+ 1, // Min Speed
+ 31, // Max Speed
+ false, // No song comments
+ 0, // No instrument envelopes
+ false, // No envelope release node
" 0123456789ABCD?FF?E???????????????", // Supported Effects
" ???????????????", // Supported Volume Column commands
true, // Has "+++" pattern
@@ -175,34 +179,35 @@
const CModSpecifications xm =
{
- //TODO: Set correct values.
- "xm", //File extension
- 13, //Minimum note index
- 108, //Maximum note index
- false, //No notecut.
- true, //Has noteoff.
- false, //No notefade.
- 255, //Pattern max.
- 255, //Order max.
- 1, //Channel min
- 32, //Channel max
- 32, //Min tempo
- 255, //Max tempo
- 1, //Min pattern rows
- 256, //Max pattern rows
- 20, //Max mod name length
- 22, //Max sample name length
- 0, //Max sample filename length
- 22, //Max instrument name length
- 0, //Max instrument filename length
- 128 * 16, //SamplesMax (actually 16 per instrument)
- 128, //instrumentMax
- mixLevels_original, //defaultMixLevels
- 0, //Max MIDI mapping directives
- 1, //Min Speed
- 31, //Max Speed
- false, //No song comments
- 12, //Envelope point count
+ // TODO: Set correct values.
+ "xm", // File extension
+ 13, // Minimum note index
+ 108, // Maximum note index
+ false, // No notecut.
+ true, // Has noteoff.
+ false, // No notefade.
+ 255, // Pattern max.
+ 255, // Order max.
+ 1, // Channel min
+ 32, // Channel max
+ 32, // Min tempo
+ 255, // Max tempo
+ 1, // Min pattern rows
+ 256, // Max pattern rows
+ 20, // Max mod name length
+ 22, // Max sample name length
+ 0, // Max sample filename length
+ 22, // Max instrument name length
+ 0, // Max instrument filename length
+ 128 * 16, // SamplesMax (actually 16 per instrument)
+ 128, // instrumentMax
+ mixLevels_original, // defaultMixLevels
+ 0, // Max MIDI mapping directives
+ 1, // Min Speed
+ 31, // Max Speed
+ false, // No song comments
+ 12, // Envelope point count
+ false, // No envelope release node
" 0123456789ABCDRFFTE???GHK??XPL????", // Supported Effects
" vpcdabuhlrg????", // Supported Volume Column commands
false, // Doesn't have "+++" pattern
@@ -213,34 +218,35 @@
// XM with MPT extensions
const CModSpecifications xmEx =
{
- //TODO: Set correct values.
- "xm", //File extension
- 13, //Minimum note index
- 108, //Maximum note index
- false, //No notecut.
- true, //Has noteoff.
- false, //No notefade.
- 255, //Pattern max.
- 256, //Order max.
- 1, //Channel min
- 127, //Channel max
- 32, //Min tempo
- 512, //Max tempo
- 1, //Min pattern rows
- 1024, //Max pattern rows
- 20, //Max mod name length
- 22, //Max sample name length
- 0, //Max sample filename length
- 22, //Max instrument name length
- 0, //Max instrument filename length
- 4000, //SamplesMax (actually 16 per instrument(256*16=4096), but limited to MAX_SAMPLES=4000)
- 256, //instrumentMax
- mixLevels_117RC3, //defaultMixLevels
- 200, //Max MIDI mapping directives
- 1, //Min Speed
- 31, //Max Speed
- true, //Has song comments
- 12, //Envelope point count
+ // TODO: Set correct values.
+ "xm", // File extension
+ 13, // Minimum note index
+ 108, // Maximum note index
+ false, // No notecut.
+ true, // Has noteoff.
+ false, // No notefade.
+ 255, // Pattern max.
+ 256, // Order max.
+ 1, // Channel min
+ 127, // Channel max
+ 32, // Min tempo
+ 512, // Max tempo
+ 1, // Min pattern rows
+ 1024, // Max pattern rows
+ 20, // Max mod name length
+ 22, // Max sample name length
+ 0, // Max sample filename length
+ 22, // Max instrument name length
+ 0, // Max instrument filename length
+ 4000, // SamplesMax (actually 16 per instrument(256*16=4096), but limited to MAX_SAMPLES=4000)
+ 256, // instrumentMax
+ mixLevels_117RC3, // defaultMixLevels
+ 200, // Max MIDI mapping directives
+ 1, // Min Speed
+ 31, // Max Speed
+ true, // Has song comments
+ 12, // Envelope point count
+ false, // No envelope release node
" 0123456789ABCDRFFTE???GHK?YXPLZ\\?#", // Supported Effects
" vpcdabuhlrgfe?o", // Supported Volume Column commands
true, // Has "+++" pattern
@@ -250,34 +256,35 @@
const CModSpecifications s3m =
{
- //TODO: Set correct values.
- "s3m", //File extension
- 13, //Minimum note index
- 120, //Maximum note index
- true, //Has notecut.
- false, //No noteoff.
- false, //No notefade.
- 99, //Pattern max.
- 255, //Order max.
- 1, //Channel min
- 32, //Channel max
- 32, //Min tempo
- 255, //Max tempo
- 64, //Min pattern rows
- 64, //Max pattern rows
- 27, //Max mod name length
- 27, //Max sample name length
- 12, //Max sample filename length
- 0, //Max instrument name length
- 0, //Max instrument filename length
- 99, //SamplesMax
- 0, //instrumentMax
- mixLevels_original, //defaultMixLevels
- 0, //Max MIDI mapping directives
- 1, //Min Speed
- 255, //Max Speed
- false, //No song comments
- 0, //No instrument envelopes
+ // TODO: Set correct values.
+ "s3m", // File extension
+ 13, // Minimum note index
+ 120, // Maximum note index
+ true, // Has notecut.
+ false, // No noteoff.
+ false, // No notefade.
+ 99, // Pattern max.
+ 255, // Order max.
+ 1, // Channel min
+ 32, // Channel max
+ 32, // Min tempo
+ 255, // Max tempo
+ 64, // Min pattern rows
+ 64, // Max pattern rows
+ 27, // Max mod name length
+ 27, // Max sample name length
+ 12, // Max sample filename length
+ 0, // Max instrument name length
+ 0, // Max instrument filename length
+ 99, // SamplesMax
+ 0, // instrumentMax
+ mixLevels_original, // defaultMixLevels
+ 0, // Max MIDI mapping directives
+ 1, // Min Speed
+ 255, // Max Speed
+ false, // No song comments
+ 0, // No instrument envelopes
+ false, // No envelope release node
" JFEGHLKRXODB?CQATI?SMNVW?U????????", // Supported Effects
" vp?????????????", // Supported Volume Column commands
true, // Has "+++" pattern
@@ -288,34 +295,35 @@
// S3M with MPT extensions
const CModSpecifications s3mEx =
{
- //TODO: Set correct values.
- "s3m", //File extension
- 13, //Minimum note index
- NOTE_MAX, //Maximum note index
- true, //Has notecut.
- false, //No noteoff.
- false, //No notefade.
- 99, //Pattern max.
- 255, //Order max.
- 1, //Channel min
- 32, //Channel max
- 32, //Min tempo
- 255, //Max tempo
- 64, //Min pattern rows
- 64, //Max pattern rows
- 27, //Max mod name length
- 27, //Max sample name length
- 12, //Max sample filename length
- 0, //Max instrument name length
- 0, //Max instrument filename length
- 99, //SamplesMax
- 0, //instrumentMax
- mixLevels_original, //defaultMixLevels
- 0, //Max MIDI mapping directives
- 1, //Min Speed
- 255, //Max Speed
- false, //No song comments
- 0, //No instrument envelopes
+ // TODO: Set correct values.
+ "s3m", // File extension
+ 13, // Minimum note index
+ NOTE_MAX, // Maximum note index
+ true, // Has notecut.
+ false, // No noteoff.
+ false, // No notefade.
+ 99, // Pattern max.
+ 255, // Order max.
+ 1, // Channel min
+ 32, // Channel max
+ 32, // Min tempo
+ 255, // Max tempo
+ 64, // Min pattern rows
+ 64, // Max pattern rows
+ 27, // Max mod name length
+ 27, // Max sample name length
+ 12, // Max sample filename length
+ 0, // Max instrument name length
+ 0, // Max instrument filename length
+ 99, // SamplesMax
+ 0, // instrumentMax
+ mixLevels_original, // defaultMixLevels
+ 0, // Max MIDI mapping directives
+ 1, // Min Speed
+ 255, // Max Speed
+ false, // No song comments
+ 0, // No instrument envelopes
+ false, // No envelope release node
" JFEGHLKRXODB?CQATI?SMNVW?UY?P?Z\\?#", // Supported Effects
" vp?????????????", // Supported Volume Column commands
true, // Has "+++" pattern
@@ -325,34 +333,35 @@
const CModSpecifications it =
{
- //TODO: Set correct values.
- "it", //File extension
- 1, //Minimum note index
- 120, //Maximum note index
- true, //Has notecut.
- true, //Has noteoff.
- true, //Has notefade.
- 200, //Pattern max.
- 256, //Order max.
- 1, //Channel min
- 64, //Channel max
- 32, //Min tempo
- 255, //Max tempo
- 1, //Min pattern rows
- 200, //Max pattern rows
- 25, //Max mod name length
- 25, //Max sample name length
- 12, //Max sample filename length
- 25, //Max instrument name length
- 12, //Max instrument filename length
- 99, //SamplesMax
- 99, //instrumentMax
- mixLevels_original, //defaultMixLevels
- 0, //Max MIDI mapping directives
- 1, //Min Speed
- 255, //Max Speed
- true, //Has song comments
- 25, //Envelope point count
+ // TODO: Set correct values.
+ "it", // File extension
+ 1, // Minimum note index
+ 120, // Maximum note index
+ true, // Has notecut.
+ true, // Has noteoff.
+ true, // Has notefade.
+ 200, // Pattern max.
+ 256, // Order max.
+ 1, // Channel min
+ 64, // Channel max
+ 32, // Min tempo
+ 255, // Max tempo
+ 1, // Min pattern rows
+ 200, // Max pattern rows
+ 25, // Max mod name length
+ 25, // Max sample name length
+ 12, // Max sample filename length
+ 25, // Max instrument name length
+ 12, // Max instrument filename length
+ 99, // SamplesMax
+ 99, // instrumentMax
+ mixLevels_original, // defaultMixLevels
+ 0, // Max MIDI mapping directives
+ 1, // Min Speed
+ 255, // Max Speed
+ true, // Has song comments
+ 25, // Envelope point count
+ false, // No envelope release node
" JFEGHLKRXODB?CQATI?SMNVW?UY?P?Z???", // Supported Effects
" vpcdab?h??gfe??", // Supported Volume Column commands
true, // Has "+++" pattern
@@ -362,34 +371,35 @@
const CModSpecifications itEx =
{
- //TODO: Set correct values.
- "it", //File extension
- 1, //Minimum note index
- NOTE_MAX, //Maximum note index
- true, //Has notecut.
- true, //Has noteoff.
- true, //Has notefade.
- 240, //Pattern max.
- 256, //Order max.
- 1, //Channel min
- 127, //Channel max
- 32, //Min tempo
- 512, //Max tempo
- 1, //Min pattern rows
- 1024, //Max pattern rows
- 25, //Max mod name length
- 25, //Max sample name length
- 12, //Max sample filename length
- 25, //Max instrument name length
- 12, //Max instrument filename length
- 4000, //SamplesMax
- 256, //instrumentMax
- mixLevels_117RC3, //defaultMixLevels
- 200, //Max MIDI mapping directives
- 1, //Min Speed
- 255, //Max Speed
- true, //Has song comments
- 25, //Envelope point count
+ // TODO: Set correct values.
+ "it", // File extension
+ 1, // Minimum note index
+ NOTE_MAX, // Maximum note index
+ true, // Has notecut.
+ true, // Has noteoff.
+ true, // Has notefade.
+ 240, // Pattern max.
+ 256, // Order max.
+ 1, // Channel min
+ 127, // Channel max
+ 32, // Min tempo
+ 512, // Max tempo
+ 1, // Min pattern rows
+ 1024, // Max pattern rows
+ 25, // Max mod name length
+ 25, // Max sample name length
+ 12, // Max sample filename length
+ 25, // Max instrument name length
+ 12, // Max instrument filename length
+ 4000, // SamplesMax
+ 256, // instrumentMax
+ mixLevels_117RC3, // defaultMixLevels
+ 200, // Max MIDI mapping directives
+ 1, // Min Speed
+ 255, // Max Speed
+ true, // Has song comments
+ 25, // Envelope point count
+ false, // No envelope release node
" JFEGHLKRXODB?CQATI?SMNVW?UY?P?Z\\?#", // Supported Effects
" vpcdab?h??gfe?o", // Supported Volume Column commands
true, // Has "+++" pattern
@@ -397,7 +407,7 @@
true, // Supports plugins
};
-} //namespace ModSpecs
+} // namespace ModSpecs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-17 20:34:53
|
Revision: 653
http://modplug.svn.sourceforge.net/modplug/?rev=653&view=rev
Author: saga-games
Date: 2010-07-17 20:34:45 +0000 (Sat, 17 Jul 2010)
Log Message:
-----------
[Fix] IT Loader: The compatiblity flag was not reset properly for MPT-made modules since revision 650.
Revision Links:
--------------
http://modplug.svn.sourceforge.net/modplug/?rev=650&view=rev
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-07-17 18:28:51 UTC (rev 652)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-07-17 20:34:45 UTC (rev 653)
@@ -1501,6 +1501,7 @@
if(m_dwLastSavedWithVersion < MAKE_VERSION_NUMERIC(1, 17, 2, 50))
{
+ SetModFlag(MSF_COMPATIBLE_PLAY, false);
SetModFlag(MSF_MIDICC_BUGEMULATION, true);
SetModFlag(MSF_OLDVOLSWING, true);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2010-07-17 18:28:58
|
Revision: 652
http://modplug.svn.sourceforge.net/modplug/?rev=652&view=rev
Author: saga-games
Date: 2010-07-17 18:28:51 +0000 (Sat, 17 Jul 2010)
Log Message:
-----------
[Imp] IT Saver: If filter envelopes are used, a different value for the cmwt field is now used in compatiblity export (like in SchismTracker).
[Ref] Mod Savers: From now on, the CModDoc text log system should be used for displaying warnings during saving, so that unnecessary messageboxes are not shown anymore during autosave.
[Mod] OpenMPT: Version is now 1.18.02.04
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Moddoc.cpp
trunk/OpenMPT/mptrack/version.h
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_mod.cpp
Modified: trunk/OpenMPT/mptrack/Moddoc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Moddoc.cpp 2010-07-16 23:18:40 UTC (rev 651)
+++ trunk/OpenMPT/mptrack/Moddoc.cpp 2010-07-17 18:28:51 UTC (rev 652)
@@ -424,6 +424,7 @@
return bOk;
}
BeginWaitCursor();
+ ClearLog();
switch(nType)
{
case MOD_TYPE_MOD: bOk = m_SndFile.SaveMod(lpszPathName, dwPacking); break;
@@ -436,6 +437,7 @@
if (bOk)
{
if (nType == m_SndFile.m_nType) SetPathName(lpszPathName);
+ ShowLog();
} else
{
if(nType == MOD_TYPE_IT && m_SndFile.m_dwSongFlags & SONG_ITPROJECT) ::MessageBox(NULL,"ITP projects need to have a path set for each instrument...",NULL,MB_ICONERROR | MB_OK);
@@ -1757,6 +1759,7 @@
FileDlgResult files = CTrackApp::ShowOpenSaveFileDialog(false, ext, filename, pattern, CMainFrame::GetWorkingDirectory(DIR_MODS));
if(files.abort) return;
+ ClearLog();
switch (type)
{
case MOD_TYPE_MOD:
@@ -1771,6 +1774,7 @@
m_SndFile.SaveCompatIT(files.first_file.c_str());
break;
}
+ ShowLog();
}
Modified: trunk/OpenMPT/mptrack/version.h
===================================================================
--- trunk/OpenMPT/mptrack/version.h 2010-07-16 23:18:40 UTC (rev 651)
+++ trunk/OpenMPT/mptrack/version.h 2010-07-17 18:28:51 UTC (rev 652)
@@ -15,7 +15,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 18
#define VER_MINOR 02
-#define VER_MINORMINOR 03
+#define VER_MINORMINOR 04
//Creates version number from version parts that appears in version string.
//For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-07-16 23:18:40 UTC (rev 651)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-07-17 18:28:51 UTC (rev 652)
@@ -2502,8 +2502,18 @@
header.smpnum = m_nSamples;
MptVersion::VersionNum vVersion = MptVersion::num;
- header.cwtv = 0x5000 | (WORD)((vVersion >> 16) & 0x0FFF); // format: txyy (t = tracker ID, x = version major, yy = version minor), e.g. 0x5117 (OpenMPT = 5, 117 = v1.17)
- header.cmwt = 0x0214; // Common compatible tracker :)
+ header.cwtv = LittleEndianW(0x5000 | (WORD)((vVersion >> 16) & 0x0FFF)); // format: txyy (t = tracker ID, x = version major, yy = version minor), e.g. 0x5117 (OpenMPT = 5, 117 = v1.17)
+ header.cmwt = LittleEndianW(0x0214); // Common compatible tracker :)
+ // hack from schism tracker:
+ for(INSTRUMENTINDEX nIns = 1; nIns <= GetNumInstruments(); nIns++)
+ {
+ if(Instruments[nIns] && Instruments[nIns]->PitchEnv.dwFlags & ENV_FILTER)
+ {
+ header.cmwt = LittleEndianW(0x0217);
+ break;
+ }
+ }
+
header.flags = 0x0001;
header.special = 0x0006;
if (m_nInstruments) header.flags |= 0x04;
Modified: trunk/OpenMPT/soundlib/Load_mod.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_mod.cpp 2010-07-16 23:18:40 UTC (rev 651)
+++ trunk/OpenMPT/soundlib/Load_mod.cpp 2010-07-17 18:28:51 UTC (rev 652)
@@ -453,12 +453,16 @@
return true;
#else
return bSamplesPresent;
-#endif
+#endif // MODPLUG_TRACKER
}
#ifndef MODPLUG_NO_FILESAVE
+#ifdef MODPLUG_TRACKER
+#include "../mptrack/moddoc.h"
+#endif // MODPLUG_TRACKER
+
bool CSoundFile::SaveMod(LPCSTR lpszFileName, UINT nPacking, const bool bCompatibilityExport)
//-------------------------------------------------------------------------------------------
{
@@ -588,14 +592,19 @@
} //end for all patterns
//Check for unsaved patterns
- for (UINT ipat=nbp; ipat<MAX_PATTERNS; ipat++)
+#ifdef MODPLUG_TRACKER
+ if(GetpModDoc() != nullptr)
{
- if (Patterns[ipat])
+ for(UINT ipat = nbp; ipat < MAX_PATTERNS; ipat++)
{
- AfxMessageBox("Warning: this track contains at least 1 pattern after the highest pattern number referred to in the sequence.\r\nSuch patterns will not be saved in the .mod format.");
- break;
+ if(Patterns[ipat])
+ {
+ GetpModDoc()->AddToLog(_T("Warning: This track contains at least one pattern after the highest pattern number referred to in the sequence. Such patterns are not saved in the .mod format.\n"));
+ break;
+ }
}
}
+#endif
// Writing instruments
for (UINT ismpd = 1; ismpd <= 31; ismpd++) if (inslen[ismpd])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|