annotate include/ptform.h @ 19:84565bb86869

Makefile Added clean rule
author darius
date Thu, 23 Apr 1998 22:59:21 +0000
parents 55420dceb8e0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
1 /*
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
2 --> The Protracker Enums
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
3 -> For MikMod 3.0
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
4 */
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
5
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
6 #ifndef _PTFORM_H_
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
7 #define _PTFORM_H_
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
8
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
9 #ifdef __cplusplus
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
10 extern "C" {
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
11 #endif
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
12
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
13
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
14 extern UWORD mytab[12],logtab[104];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
15 extern UBYTE VibratoTable[32],avibtab[128];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
16 extern SBYTE PanbrelloTable[256];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
17 extern ULONG lintab[768];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
18
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
19
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
20 /**************************************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
21 ****** Unitrack stuff: ****************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
22 **************************************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
23
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
24 // The UniTrack stuff is generally for internal use only, but would be
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
25 // required in making a tracker or a module player tha scrolls pattern
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
26 // data.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
27
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
28 // prototypes:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
29
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
30 extern void UniSetRow(UBYTE *t);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
31 extern UBYTE UniGetByte(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
32 extern UBYTE *UniFindRow(UBYTE *t,UWORD row);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
33 extern void UniReset(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
34 extern void UniWrite(UBYTE data);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
35 extern void UniNewline(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
36 extern UBYTE *UniDup(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
37 extern void UniSkipOpcode(UBYTE op);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
38 extern BOOL UniInit(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
39 extern void UniCleanup(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
40 extern UWORD TrkLen(UBYTE *t);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
41 extern BOOL MyCmp(UBYTE *a, UBYTE *b, UWORD l);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
42 extern void UniInstrument(UBYTE ins);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
43 extern void UniNote(UBYTE note);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
44 extern void UniPTEffect(UBYTE eff, UBYTE dat);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
45 extern void UniVolEffect(UWORD eff, UBYTE dat);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
46
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
47
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
48 // Enumaerated UniMod Commands
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
49
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
50 enum
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
51 { UNI_NOTE = 1,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
52 UNI_INSTRUMENT,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
53 UNI_PTEFFECT0,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
54 UNI_PTEFFECT1,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
55 UNI_PTEFFECT2,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
56 UNI_PTEFFECT3,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
57 UNI_PTEFFECT4,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
58 UNI_PTEFFECT5,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
59 UNI_PTEFFECT6,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
60 UNI_PTEFFECT7,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
61 UNI_PTEFFECT8,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
62 UNI_PTEFFECT9,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
63 UNI_PTEFFECTA,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
64 UNI_PTEFFECTB,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
65 UNI_PTEFFECTC,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
66 UNI_PTEFFECTD,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
67 UNI_PTEFFECTE,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
68 UNI_PTEFFECTF,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
69 UNI_S3MEFFECTA,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
70 UNI_S3MEFFECTD,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
71 UNI_S3MEFFECTE,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
72 UNI_S3MEFFECTF,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
73 UNI_S3MEFFECTI,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
74 UNI_S3MEFFECTQ,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
75 UNI_S3MEFFECTR,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
76 UNI_S3MEFFECTT,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
77 UNI_S3MEFFECTU,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
78 UNI_KEYOFF,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
79 UNI_KEYFADE,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
80 UNI_VOLEFFECTS,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
81 UNI_XMEFFECT4,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
82 UNI_XMEFFECTA,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
83 UNI_XMEFFECTE1,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
84 UNI_XMEFFECTE2,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
85 UNI_XMEFFECTEA,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
86 UNI_XMEFFECTEB,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
87 UNI_XMEFFECTG,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
88 UNI_XMEFFECTH,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
89 UNI_XMEFFECTL,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
90 UNI_XMEFFECTP,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
91 UNI_XMEFFECTX1,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
92 UNI_XMEFFECTX2,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
93 UNI_ITEFFECTG, // Porta to Note .. no kick=0;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
94 UNI_ITEFFECTH, // IT specific Vibrato
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
95 UNI_ITEFFECTI, // IT tremor (xy not incremeneted)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
96 UNI_ITEFFECTM, // Set Channel Volume
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
97 UNI_ITEFFECTN, // Slide / Fineslide Channel Volume
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
98 UNI_ITEFFECTP, // Slide / Fineslide Channel Panning
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
99 UNI_ITEFFECTU, // IT fine vibrato
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
100 UNI_ITEFFECTW, // Slide / Fineslide Global volume
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
101 UNI_ITEFFECTY, // The Satanic Panbrello
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
102 UNI_ITEFFECTS0,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
103 UNI_LAST
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
104 };
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
105
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
106
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
107 // IT / S3M Extended SS effects:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
108
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
109 enum
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
110 { SS_GLISSANDO = 1,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
111 SS_FINETUNE,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
112 SS_VIBWAVE,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
113 SS_TREMWAVE,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
114 SS_PANWAVE,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
115 SS_FRAMEDELAY,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
116 SS_S7EFFECTS,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
117 SS_PANNING,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
118 SS_SURROUND,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
119 SS_HIOFFSET,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
120 SS_PATLOOP,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
121 SS_NOTECUT,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
122 SS_NOTEDELAY,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
123 SS_PATDELAY
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
124 };
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
125
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
126
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
127 // IT Volume column effects
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
128
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
129 enum
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
130 { VOL_VOLUME = 1,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
131 VOL_PANNING,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
132 VOL_VOLSLIDE,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
133 VOL_PITCHSLIDEDN,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
134 VOL_PITCHSLIDEUP,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
135 VOL_PORTAMENTO,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
136 VOL_VIBRATO
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
137 };
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
138
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
139
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
140 /**************************************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
141 ****** Instrument stuff: **************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
142 **************************************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
143
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
144
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
145 // Instrument format flags
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
146 #define IF_OWNPAN 1
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
147 #define IF_PITCHPAN 2
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
148
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
149 // Envelope flags:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
150
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
151 #define EF_ON 1
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
152 #define EF_SUSTAIN 2
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
153 #define EF_LOOP 4
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
154 #define EF_VOLENV 8
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
155
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
156 // New Note Action Flags
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
157
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
158 #define NNA_CUT 0
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
159 #define NNA_CONTINUE 1
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
160 #define NNA_OFF 2
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
161 #define NNA_FADE 3
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
162
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
163 #define DCT_OFF 0
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
164 #define DCT_NOTE 1
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
165 #define DCT_SAMPLE 2
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
166 #define DCT_INST 3
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
167
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
168 #define DCA_CUT 0
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
169 #define DCA_OFF 1
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
170 #define DCA_FADE 2
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
171
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
172 #define KEY_KICK 0
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
173 #define KEY_OFF 1
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
174 #define KEY_FADE 2
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
175 #define KEY_KILL 3
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
176
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
177 #define AV_IT 1 // IT vs. XM vibrato info
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
178
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
179
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
180 typedef struct ENVPT
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
181 { SWORD pos;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
182 SWORD val;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
183 } ENVPT;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
184
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
185
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
186 typedef struct INSTRUMENT
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
187 {
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
188 UBYTE flags;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
189
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
190 UBYTE samplenumber[120];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
191 UBYTE samplenote[120];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
192
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
193 UBYTE nnatype;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
194 UBYTE dca; // duplicate check action
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
195 UBYTE dct; // duplicate check type
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
196 UBYTE globvol;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
197 UWORD panning; // instrument-based panning var
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
198
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
199 UBYTE pitpansep; // pitch pan separation (0 to 255)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
200 UBYTE pitpancenter; // pitch pan center (0 to 119)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
201 UBYTE rvolvar; // random volume varations (0 - 100%)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
202 UBYTE rpanvar; // random panning varations (0 - 100%)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
203
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
204 UWORD volfade;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
205
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
206 UBYTE volflg; // bit 0: on 1: sustain 2: loop
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
207 UBYTE volpts;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
208 UBYTE volsusbeg;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
209 UBYTE volsusend;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
210 UBYTE volbeg;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
211 UBYTE volend;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
212 ENVPT volenv[32];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
213
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
214 UBYTE panflg; // bit 0: on 1: sustain 2: loop
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
215 UBYTE panpts;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
216 UBYTE pansusbeg;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
217 UBYTE pansusend;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
218 UBYTE panbeg;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
219 UBYTE panend;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
220 ENVPT panenv[32];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
221
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
222 UBYTE pitflg; // bit 0: on 1: sustain 2: loop
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
223 UBYTE pitpts;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
224 UBYTE pitsusbeg;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
225 UBYTE pitsusend;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
226 UBYTE pitbeg;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
227 UBYTE pitend;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
228 ENVPT pitenv[32];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
229
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
230 // UBYTE vibtype;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
231 // UBYTE vibsweep;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
232 // UBYTE vibdepth;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
233 // UBYTE vibrate;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
234
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
235 CHAR *insname;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
236
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
237 } INSTRUMENT;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
238
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
239
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
240
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
241 /**************************************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
242 ****** Player stuff: ******************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
243 **************************************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
244
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
245 typedef struct ENVPR
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
246 { UBYTE flg; // envelope flag
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
247 UBYTE pts; // number of envelope points
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
248 UBYTE susbeg; // envelope sustain index begin
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
249 UBYTE susend; // envelope sustain index end
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
250 UBYTE beg; // envelope loop begin
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
251 UBYTE end; // envelope loop end
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
252 SWORD p; // current envelope counter
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
253 UWORD a; // envelope index a
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
254 UWORD b; // envelope index b
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
255 ENVPT *env; // envelope points
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
256 } ENVPR;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
257
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
258
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
259
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
260 // Struct MP_VOICE - Used by NNA only player (audio control. AUDTMP is
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
261 // used for full effects control).
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
262 typedef struct MP_VOICE
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
263 { INSTRUMENT *i;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
264 SAMPLE *s;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
265 UBYTE sample; // which instrument number
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
266
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
267 SWORD volume; // output volume (vol + sampcol + instvol)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
268 UWORD panning; // panning position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
269 SBYTE chanvol; // channel's "global" volume
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
270 UWORD fadevol; // fading volume rate
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
271 UWORD period; // period to play the sample at
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
272
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
273 UBYTE volflg; // volume envelope settings
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
274 UBYTE panflg; // panning envelope settings
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
275 UBYTE pitflg; // pitch envelope settings
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
276
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
277 UBYTE keyoff; // if true = fade out and stuff
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
278 UBYTE kick; // if true = sample has to be restarted
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
279 UBYTE note; // the audible note (as heard, direct rep of period)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
280 UBYTE nna; // New note action type + master/slave flags
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
281 SWORD handle; // which sample-handle
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
282 SLONG start; // The start byte index in the sample
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
283
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
284
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
285 // ----------------------------------
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
286 // Below here is info NOT in MP_CONTROL!!
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
287 // ----------------------------------
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
288
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
289 ENVPR venv;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
290 ENVPR penv;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
291 ENVPR cenv;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
292
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
293 UWORD avibpos; // autovibrato pos
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
294 UWORD aswppos; // autovibrato sweep pos
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
295
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
296 ULONG totalvol; // total volume of channel (before global mixings)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
297
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
298 BOOL mflag;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
299 SWORD masterchn;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
300 struct MP_CONTROL *master;// index of "master" effects channel
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
301 } MP_VOICE;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
302
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
303
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
304 typedef struct MP_CONTROL
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
305 { INSTRUMENT *i;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
306 SAMPLE *s;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
307 UBYTE sample; // which sample number
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
308 UBYTE note; // the audible note (as heard, direct rep of period)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
309 SWORD outvolume; // output volume (vol + sampcol + instvol)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
310 SBYTE chanvol; // channel's "global" volume
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
311 UWORD fadevol; // fading volume rate
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
312 UWORD panning; // panning position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
313 UBYTE kick; // if true = sample has to be restarted
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
314 UBYTE muted; // if set, channel not played
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
315 UWORD period; // period to play the sample at
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
316 UBYTE nna; // New note action type + master/slave flags
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
317
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
318 UBYTE volflg; // volume envelope settings
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
319 UBYTE panflg; // panning envelope settings
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
320 UBYTE pitflg; // pitch envelope settings
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
321
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
322 UBYTE keyoff; // if true = fade out and stuff
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
323 SWORD handle; // which sample-handle
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
324 UBYTE notedelay; // (used for note delay)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
325 SLONG start; // The starting byte index in the sample
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
326
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
327 struct MP_VOICE *slave;// Audio Slave of current effects control channel
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
328 UBYTE slavechn; // Audio Slave of current effects control channel
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
329 UBYTE anote; // the note that indexes the audible (note seen in tracker)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
330 SWORD ownper;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
331 SWORD ownvol;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
332 UBYTE dca; // duplicate check action
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
333 UBYTE dct; // duplicate check type
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
334 UBYTE *row; // row currently playing on this channel
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
335 SBYTE retrig; // retrig value (0 means don't retrig)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
336 ULONG speed; // what finetune to use
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
337 SWORD volume; // amiga volume (0 t/m 64) to play the sample at
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
338
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
339 SBYTE tmpvolume; // tmp volume
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
340 UWORD tmpperiod; // tmp period
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
341 UWORD wantedperiod; // period to slide to (with effect 3 or 5)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
342 UBYTE pansspd; // panslide speed
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
343 UWORD slidespeed; //
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
344 UWORD portspeed; // noteslide speed (toneportamento)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
345
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
346 UBYTE s3mtremor; // s3m tremor (effect I) counter
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
347 UBYTE s3mtronof; // s3m tremor ontime/offtime
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
348 UBYTE s3mvolslide; // last used volslide
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
349 UBYTE s3mrtgspeed; // last used retrig speed
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
350 UBYTE s3mrtgslide; // last used retrig slide
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
351
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
352 UBYTE glissando; // glissando (0 means off)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
353 UBYTE wavecontrol; //
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
354
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
355 SBYTE vibpos; // current vibrato position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
356 UBYTE vibspd; // "" speed
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
357 UBYTE vibdepth; // "" depth
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
358
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
359 SBYTE trmpos; // current tremolo position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
360 UBYTE trmspd; // "" speed
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
361 UBYTE trmdepth; // "" depth
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
362
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
363 UBYTE fslideupspd;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
364 UBYTE fslidednspd;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
365 UBYTE fportupspd; // fx E1 (extra fine portamento up) data
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
366 UBYTE fportdnspd; // fx E2 (extra fine portamento dn) data
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
367 UBYTE ffportupspd; // fx X1 (extra fine portamento up) data
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
368 UBYTE ffportdnspd; // fx X2 (extra fine portamento dn) data
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
369
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
370 ULONG hioffset; // last used high order of sample offset
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
371 UWORD soffset; // last used low order of sample-offset (effect 9)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
372
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
373 UBYTE sseffect; // last used Sxx effect
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
374 UBYTE ssdata; // last used Sxx data info
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
375 UBYTE chanvolslide; // last used channel volume slide
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
376
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
377 UBYTE panbwave; // current panbrello waveform
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
378 UBYTE panbpos; // current panbrello position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
379 SBYTE panbspd; // "" speed
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
380 UBYTE panbdepth; // "" depth
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
381
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
382 UWORD newsamp; // set to 1 upon a sample / inst change
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
383 UBYTE voleffect; // Volume Column Effect Memory as used by Impulse Tracker
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
384 UBYTE voldata; // Volume Column Data Memory
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
385 } MP_CONTROL;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
386
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
387
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
388 /******************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
389 ******** MikMod UniMod type: **************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
390 *******************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
391
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
392 // UniMod flags
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
393 #define UF_XMPERIODS 1 // XM periods / finetuning
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
394 #define UF_LINEAR 2 // LINEAR periods (UF_XMPERIODS must be set as well)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
395 #define UF_INST 4 // Instruments are used
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
396 #define UF_NNA 8 // New Note Actions used (set numvoices rather than numchn)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
397
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
398
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
399 typedef struct UNIMOD
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
400 {
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
401 // This section of elements are all file-storage related.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
402 // all of this information can be found in the UNIMOD disk format.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
403 // For further details about there variables, see the MikMod Docs.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
404
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
405 UWORD flags; // See UniMod Flags above
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
406 UBYTE numchn; // number of module channels
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
407 UBYTE numvoices; // max # voices used for full NNA playback
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
408 UWORD numpos; // number of positions in this song
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
409 UWORD numpat; // number of patterns in this song
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
410 UWORD numtrk; // number of tracks
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
411 UWORD numins; // number of instruments
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
412 UWORD numsmp; // number of samples
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
413 UWORD reppos; // restart position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
414 UBYTE initspeed; // initial song speed
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
415 UBYTE inittempo; // initial song tempo
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
416 UBYTE initvolume; // initial global volume (0 - 128)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
417 UWORD panning[64]; // 64 panning positions
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
418 UBYTE chanvol[64]; // 64 channel positions
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
419 CHAR *songname; // name of the song
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
420 CHAR *composer; // name of the composer
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
421 CHAR *comment; // module comments
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
422 UBYTE **tracks; // array of numtrk pointers to tracks
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
423 UWORD *patterns; // array of Patterns [pointers to tracks for each channel].
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
424 UWORD *pattrows; // array of number of rows for each pattern
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
425 UWORD *positions; // all positions
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
426 INSTRUMENT *instruments; // all instruments
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
427 SAMPLE *samples; // all samples
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
428
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
429 // following are the player-instance variables. They are in no way file
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
430 // storage related - they are for internal replay use only.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
431
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
432 // All following variables can be modified at any time.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
433
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
434 CHAR *modtype; // string type of module loaded
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
435 UBYTE bpm; // current beats-per-minute speed
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
436 UWORD sngspd; // current song speed
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
437 SWORD volume; // song volume (0-128) (or user volume)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
438 BOOL extspd; // extended speed flag (default enabled)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
439 BOOL panflag; // panning flag (default enabled)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
440 BOOL loop; // loop module ? (default disabled)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
441 BOOL forbid; // if true, no player update!
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
442
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
443 // The following variables are considered useful for reading, and should
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
444 // should not be directly modified by the end user.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
445
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
446 MP_CONTROL *control; // Effects Channel information (pf->numchn alloc'ed)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
447 MP_VOICE *voice; // Audio Voice information (md_numchn alloc'ed)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
448 UWORD numrow; // number of rows on current pattern
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
449 UWORD vbtick; // tick counter (counts from 0 to sngspd)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
450 UWORD patpos; // current row number
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
451 SWORD sngpos; // current song position. This should not
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
452 // be modified directly. Use MikMod_NextPosition,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
453 // MikMod_PrevPosition, and MikMod_SetPosition.
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
454
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
455 // The following variables should not be modified, and have information
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
456 // that is pretty useless outside the internal player, so just ignore :)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
457
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
458 UBYTE globalslide; // global volume slide rate
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
459 UWORD pat_reppos; // patternloop position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
460 UWORD pat_repcnt; // times to loop
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
461 UWORD patbrk; // position where to start a new pattern
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
462 UBYTE patdly; // patterndelay counter (command memory)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
463 UBYTE patdly2; // patterndelay counter (real one)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
464 SWORD posjmp; // flag to indicate a position jump is needed...
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
465 // changed since 1.00: now also indicates the
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
466 // direction the position has to jump to:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
467 // 0: Don't do anything
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
468 // 1: Jump back 1 position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
469 // 2: Restart on current position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
470 // 3: Jump forward 1 position
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
471
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
472 } UNIMOD;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
473
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
474
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
475 /***************************************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
476 ****** Loader stuff: *******************************
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
477 ****************************************************/
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
478
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
479 // loader structure:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
480
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
481 typedef struct MLOADER
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
482 { struct MLOADER *next;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
483 CHAR *type;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
484 CHAR *version;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
485 BOOL (*Init)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
486 BOOL (*Test)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
487 BOOL (*Load)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
488 void (*Cleanup)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
489 CHAR *(*LoadTitle)(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
490 } MLOADER;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
491
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
492 // public loader variables:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
493
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
494 extern FILE *modfp;
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
495 extern UWORD finetune[16];
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
496 extern UNIMOD of; // static unimod loading space
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
497 extern UWORD npertab[60]; // used by the original MOD loaders
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
498
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
499 // main loader prototypes:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
500
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
501 void ML_InfoLoader(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
502 void ML_RegisterLoader(MLOADER *ldr);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
503 UNIMOD *MikMod_LoadSongFP(FILE *fp, int maxchan);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
504 UNIMOD *MikMod_LoadSong(CHAR *filename, int maxchan);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
505 void MikMod_FreeSong(UNIMOD *mf);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
506
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
507
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
508 // other loader prototypes: (used by the loader modules)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
509
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
510 BOOL InitTracks(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
511 void AddTrack(UBYTE *tr);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
512 BOOL ReadComment(UWORD len);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
513 BOOL AllocPositions(int total);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
514 BOOL AllocPatterns(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
515 BOOL AllocTracks(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
516 BOOL AllocInstruments(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
517 BOOL AllocSamples(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
518 CHAR *DupStr(CHAR *s, UWORD len);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
519
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
520
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
521 // Declare external loaders:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
522
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
523 extern MLOADER load_uni; // Internal UniMod Loader (Current version of UniMod only)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
524 extern MLOADER load_mod; // Standard 31-instrument Module loader (Protracker, StarTracker, FastTracker, etc)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
525 extern MLOADER load_m15; // 15-instrument (SoundTracker and Ultimate SoundTracker)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
526 extern MLOADER load_mtm; // Multi-Tracker Module (by Renaissance)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
527 extern MLOADER load_s3m; // ScreamTracker 3 (by Future Crew)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
528 extern MLOADER load_stm; // ScreamTracker 2 (by Future Crew)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
529 extern MLOADER load_ult; // UltraTracker
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
530 extern MLOADER load_xm; // FastTracker 2 (by Trition)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
531 extern MLOADER load_it; // Impulse Tracker (by Jeffrey Lim)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
532 extern MLOADER load_669; // 669 and Extended-669 (by Tran / Renaissance)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
533 extern MLOADER load_dsm; // DSIK internal module format
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
534 extern MLOADER load_med; // MMD0 and MMD1 Amiga MED modules (by OctaMED)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
535 extern MLOADER load_far; // Farandole Composer Module
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
536
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
537 // used to convert c4spd to linear XM periods (IT loader).
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
538 extern UWORD getlinearperiod(UBYTE note, ULONG fine);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
539 extern ULONG getfrequency(UBYTE flags, ULONG period);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
540
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
541
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
542 #define MP_HandleTick Player_HandleTick
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
543 #define ML_LoadFN(x,y) MikMod_LoadSong(x,y)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
544 #define ML_LoadFP(x,y) MikMod_LoadSongFP(x,y)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
545 #define MP_PlayStart(x) Player_Start(x)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
546 #define MP_PlayStop Player_Stop
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
547
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
548
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
549 // MikMod Player Prototypes:
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
550 // ===========================================================
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
551 // This batch of prototypes affects the currently ACTIVE module
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
552 // set with MikMod_PlayStart)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
553
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
554 extern void Player_Start(UNIMOD *mf);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
555 extern BOOL Player_Active(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
556 extern void Player_Stop(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
557 extern void Player_TogglePause(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
558 extern void Player_NextPosition(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
559 extern void Player_PrevPosition(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
560 extern void Player_SetPosition(UWORD pos);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
561 extern void Player_Mute(SLONG arg1, ...);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
562 extern void Player_UnMute(SLONG arg1, ...);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
563 extern void Player_ToggleMute(SLONG arg1, ...);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
564 extern BOOL Player_Muted(int chan);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
565 extern void Player_HandleTick(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
566 extern void Player_SetVolume(int volume);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
567 extern UNIMOD *Player_GetUnimod(void);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
568
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
569 extern BOOL Player_Init(UNIMOD *mf); // internal use only [by loader]
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
570 extern void Player_Exit(UNIMOD *mf); // internal use only [by loader]
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
571
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
572 // This batch of prototypes adheres closely to the old MikMod 2.10
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
573 // naming, and affects ANY specified module (need not be active,
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
574 // only loaded and initialized)
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
575
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
576 extern BOOL MP_Playing(UNIMOD *mf);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
577 extern void MP_TogglePause(UNIMOD *mf);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
578 extern void MP_NextPosition(UNIMOD *mf);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
579 extern void MP_PrevPosition(UNIMOD *mf);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
580 extern void MP_SetPosition(UNIMOD *mf, UWORD pos);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
581 extern void MP_Mute(UNIMOD *mf, SLONG arg1, ...);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
582 extern void MP_UnMute(UNIMOD *mf, SLONG arg1, ...);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
583 extern void MP_ToggleMute(UNIMOD *mf, SLONG arg1, ...);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
584 extern BOOL MP_Muted(UNIMOD *mf, int chan);
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
585
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
586 #ifdef __cplusplus
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
587 }
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
588 #endif
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
589
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
590 #endif
55420dceb8e0 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
591