-
Notifications
You must be signed in to change notification settings - Fork 0
/
mtypes.h
93 lines (72 loc) · 1.89 KB
/
mtypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/***********************************************************
* KRAWALL Soundsystem
* Copyright (c) 2001,2002 Sebastian Kienzl <seb@riot.org>
************************************************************
* $Id$
************************************************************/
#ifndef __MTYPES_H__
#define __MTYPES_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef __attribute__ ((packed)) struct {
unsigned long loopLength;
unsigned char* end;
unsigned long c2Freq;
signed char fineTune;
signed char relativeNote;
unsigned char volDefault;
signed char panDefault;
unsigned char loop;
unsigned char hq;
signed char data[1];
} Sample;
typedef __attribute__ ((packed)) struct {
unsigned short coord, inc;
} EnvNode;
typedef __attribute__ ((packed)) struct {
EnvNode nodes[ 12 ];
unsigned char max;
unsigned char sus;
unsigned char loopStart;
unsigned char flags;
} Envelope;
typedef __attribute__ ((packed)) struct {
unsigned short samples[ 96 ];
Envelope envVol;
Envelope envPan;
unsigned short volFade;
unsigned char vibType;
unsigned char vibSweep;
unsigned char vibDepth;
unsigned char vibRate;
} Instrument;
typedef __attribute__ ((packed)) struct {
unsigned short index[ 16 ];
unsigned char rows;
unsigned char data[1];
} Pattern;
typedef __attribute__ ((packed)) struct {
unsigned char channels;
unsigned char numOrders;
unsigned char songRestart;
unsigned char order[ 256 ];
signed char channelPan[ 32 ];
unsigned char songIndex[ 64 ];
unsigned char volGlobal;
unsigned char initSpeed;
unsigned char initBPM;
unsigned char flagInstrumentBased;
unsigned char flagLinearSlides;
unsigned char flagVolSlides;
unsigned char flagVolOpt;
unsigned char flagAmigaLimits;
unsigned char ___padding;
const Pattern* patterns[1];
} Module;
extern const Sample* const samples[];
extern const Instrument* const instruments[];
#ifdef __cplusplus
}
#endif
#endif