2002-02-28 21:10:42 +00:00
|
|
|
#ifndef _ITDEFS_H_
|
|
|
|
#define _ITDEFS_H_
|
|
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
|
|
|
|
typedef struct tagITFILEHEADER
|
|
|
|
{
|
2005-12-06 19:55:58 +00:00
|
|
|
DWORD id; /* 0x4D504D49 */
|
|
|
|
CHAR songname[26];
|
|
|
|
WORD reserved1; /* 0x1004 */
|
|
|
|
WORD ordnum;
|
|
|
|
WORD insnum;
|
|
|
|
WORD smpnum;
|
|
|
|
WORD patnum;
|
|
|
|
WORD cwtv;
|
|
|
|
WORD cmwt;
|
|
|
|
WORD flags;
|
|
|
|
WORD special;
|
|
|
|
BYTE globalvol;
|
|
|
|
BYTE mv;
|
|
|
|
BYTE speed;
|
|
|
|
BYTE tempo;
|
|
|
|
BYTE sep;
|
|
|
|
BYTE zero;
|
|
|
|
WORD msglength;
|
|
|
|
DWORD msgoffset;
|
|
|
|
DWORD reserved2;
|
|
|
|
BYTE chnpan[64];
|
|
|
|
BYTE chnvol[64];
|
2002-02-28 21:10:42 +00:00
|
|
|
} ITFILEHEADER;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct tagITENVELOPE
|
|
|
|
{
|
2005-12-06 19:55:58 +00:00
|
|
|
BYTE flags;
|
|
|
|
BYTE num;
|
|
|
|
BYTE lpb;
|
|
|
|
BYTE lpe;
|
|
|
|
BYTE slb;
|
|
|
|
BYTE sle;
|
|
|
|
BYTE data[25*3];
|
|
|
|
BYTE reserved;
|
2002-02-28 21:10:42 +00:00
|
|
|
} ITENVELOPE;
|
|
|
|
|
2002-03-19 04:10:06 +00:00
|
|
|
/* Old Impulse Instrument Format (cmwt < 0x200) */
|
2002-02-28 21:10:42 +00:00
|
|
|
typedef struct tagITOLDINSTRUMENT
|
|
|
|
{
|
2005-12-06 19:55:58 +00:00
|
|
|
DWORD id; /* IMPI = 0x49504D49 */
|
|
|
|
CHAR filename[12]; /* DOS file name */
|
|
|
|
BYTE zero;
|
|
|
|
BYTE flags;
|
|
|
|
BYTE vls;
|
|
|
|
BYTE vle;
|
|
|
|
BYTE sls;
|
|
|
|
BYTE sle;
|
|
|
|
WORD reserved1;
|
|
|
|
WORD fadeout;
|
|
|
|
BYTE nna;
|
|
|
|
BYTE dnc;
|
|
|
|
WORD trkvers;
|
|
|
|
BYTE nos;
|
|
|
|
BYTE reserved2;
|
|
|
|
CHAR name[26];
|
|
|
|
WORD reserved3[3];
|
|
|
|
BYTE keyboard[240];
|
|
|
|
BYTE volenv[200];
|
|
|
|
BYTE nodes[50];
|
2002-02-28 21:10:42 +00:00
|
|
|
} ITOLDINSTRUMENT;
|
|
|
|
|
|
|
|
|
2002-03-19 04:10:06 +00:00
|
|
|
/* Impulse Instrument Format */
|
2002-02-28 21:10:42 +00:00
|
|
|
typedef struct tagITINSTRUMENT
|
|
|
|
{
|
2005-12-06 19:55:58 +00:00
|
|
|
DWORD id;
|
|
|
|
CHAR filename[12];
|
|
|
|
BYTE zero;
|
|
|
|
BYTE nna;
|
|
|
|
BYTE dct;
|
|
|
|
BYTE dca;
|
|
|
|
WORD fadeout;
|
|
|
|
signed char pps;
|
|
|
|
BYTE ppc;
|
|
|
|
BYTE gbv;
|
|
|
|
BYTE dfp;
|
|
|
|
BYTE rv;
|
|
|
|
BYTE rp;
|
|
|
|
WORD trkvers;
|
|
|
|
BYTE nos;
|
|
|
|
BYTE reserved1;
|
|
|
|
CHAR name[26];
|
|
|
|
BYTE ifc;
|
|
|
|
BYTE ifr;
|
|
|
|
BYTE mch;
|
|
|
|
BYTE mpr;
|
|
|
|
WORD mbank;
|
|
|
|
BYTE keyboard[240];
|
|
|
|
ITENVELOPE volenv;
|
|
|
|
ITENVELOPE panenv;
|
|
|
|
ITENVELOPE pitchenv;
|
|
|
|
BYTE dummy[4]; /* was 7, but IT v2.17 saves 554 bytes */
|
2002-02-28 21:10:42 +00:00
|
|
|
} ITINSTRUMENT;
|
|
|
|
|
|
|
|
|
2002-03-19 04:10:06 +00:00
|
|
|
/* IT Sample Format */
|
2002-02-28 21:10:42 +00:00
|
|
|
typedef struct ITSAMPLESTRUCT
|
|
|
|
{
|
2005-12-06 19:55:58 +00:00
|
|
|
DWORD id; /* 0x53504D49 */
|
|
|
|
CHAR filename[12];
|
|
|
|
BYTE zero;
|
|
|
|
BYTE gvl;
|
|
|
|
BYTE flags;
|
|
|
|
BYTE vol;
|
|
|
|
CHAR name[26];
|
|
|
|
BYTE cvt;
|
|
|
|
BYTE dfp;
|
|
|
|
DWORD length;
|
|
|
|
DWORD loopbegin;
|
|
|
|
DWORD loopend;
|
|
|
|
DWORD C5Speed;
|
|
|
|
DWORD susloopbegin;
|
|
|
|
DWORD susloopend;
|
|
|
|
DWORD samplepointer;
|
|
|
|
BYTE vis;
|
|
|
|
BYTE vid;
|
|
|
|
BYTE vir;
|
|
|
|
BYTE vit;
|
2002-02-28 21:10:42 +00:00
|
|
|
} ITSAMPLESTRUCT;
|
|
|
|
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
extern BYTE autovibit2xm[8];
|
|
|
|
extern BYTE autovibxm2it[8];
|
|
|
|
|
|
|
|
#endif
|