1 //
2 // Copyright(C) 1993-1996 Id Software, Inc.
3 // Copyright(C) 1993-2008 Raven Software
4 // Copyright(C) 2005-2014 Simon Howard
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 
17 // sounds.h
18 
19 #ifndef __SOUNDSH__
20 #define __SOUNDSH__
21 
22 #include "i_sound.h"
23 
24 #define MAX_SND_DIST 	1600
25 #define MAX_CHANNELS	16
26 
27 // Music identifiers
28 
29 typedef enum
30 {
31     mus_e1m1,
32     mus_e1m2,
33     mus_e1m3,
34     mus_e1m4,
35     mus_e1m5,
36     mus_e1m6,
37     mus_e1m7,
38     mus_e1m8,
39     mus_e1m9,
40 
41     mus_e2m1,
42     mus_e2m2,
43     mus_e2m3,
44     mus_e2m4,
45     mus_e2m5,
46     mus_e2m6,
47     mus_e2m7,
48     mus_e2m8,
49     mus_e2m9,
50 
51     mus_e3m1,
52     mus_e3m2,
53     mus_e3m3,
54     mus_e3m4,
55     mus_e3m5,
56     mus_e3m6,
57     mus_e3m7,
58     mus_e3m8,
59     mus_e3m9,
60 
61     mus_e4m1,
62     mus_e4m2,
63     mus_e4m3,
64     mus_e4m4,
65     mus_e4m5,
66     mus_e4m6,
67     mus_e4m7,
68     mus_e4m8,
69     mus_e4m9,
70 
71     mus_e5m1,
72     mus_e5m2,
73     mus_e5m3,
74     mus_e5m4,
75     mus_e5m5,
76     mus_e5m6,
77     mus_e5m7,
78     mus_e5m8,
79     mus_e5m9,
80 
81     mus_e6m1,
82     mus_e6m2,
83     mus_e6m3,
84 
85     mus_titl,
86     mus_intr,
87     mus_cptd,
88     NUMMUSIC
89 } musicenum_t;
90 
91 #if 0
92 typedef struct
93 {
94     char name[8];
95 } musicinfo_t;
96 
97 typedef struct sfxinfo_s
98 {
99     char name[8];
100     struct sfxinfo_s *link;     // Make alias for another sound
101     unsigned short priority;    // Higher priority takes precendence
102     int usefulness;             // Determines when a sound should be cached out
103     void *snd_ptr;
104     int lumpnum;
105     int numchannels;            // total number of channels a sound type may occupy
106 } sfxinfo_t;
107 
108 #endif
109 
110 typedef struct
111 {
112     mobj_t *mo;
113     int sound_id;
114     int handle;
115     int pitch;
116     int priority;
117 } channel_t;
118 
119 typedef struct
120 {
121     int id;
122     unsigned short priority;
123     char *name;
124     mobj_t *mo;
125     int distance;
126 } ChanInfo_t;
127 
128 typedef struct
129 {
130     int channelCount;
131     int musicVolume;
132     int soundVolume;
133     ChanInfo_t chan[8];
134 } SoundInfo_t;
135 
136 // Sound identifiers
137 
138 typedef enum
139 {
140     sfx_None,
141     sfx_gldhit,
142     sfx_gntful,
143     sfx_gnthit,
144     sfx_gntpow,
145     sfx_gntact,
146     sfx_gntuse,
147     sfx_phosht,
148     sfx_phohit,
149     sfx_phopow,
150     sfx_lobsht,
151     sfx_lobhit,
152     sfx_lobpow,
153     sfx_hrnsht,
154     sfx_hrnhit,
155     sfx_hrnpow,
156     sfx_ramphit,
157     sfx_ramrain,
158     sfx_bowsht,
159     sfx_stfhit,
160     sfx_stfpow,
161     sfx_stfcrk,
162     sfx_impsit,
163     sfx_impat1,
164     sfx_impat2,
165     sfx_impdth,
166     sfx_impact,
167     sfx_imppai,
168     sfx_mumsit,
169     sfx_mumat1,
170     sfx_mumat2,
171     sfx_mumdth,
172     sfx_mumact,
173     sfx_mumpai,
174     sfx_mumhed,
175     sfx_bstsit,
176     sfx_bstatk,
177     sfx_bstdth,
178     sfx_bstact,
179     sfx_bstpai,
180     sfx_clksit,
181     sfx_clkatk,
182     sfx_clkdth,
183     sfx_clkact,
184     sfx_clkpai,
185     sfx_snksit,
186     sfx_snkatk,
187     sfx_snkdth,
188     sfx_snkact,
189     sfx_snkpai,
190     sfx_kgtsit,
191     sfx_kgtatk,
192     sfx_kgtat2,
193     sfx_kgtdth,
194     sfx_kgtact,
195     sfx_kgtpai,
196     sfx_wizsit,
197     sfx_wizatk,
198     sfx_wizdth,
199     sfx_wizact,
200     sfx_wizpai,
201     sfx_minsit,
202     sfx_minat1,
203     sfx_minat2,
204     sfx_minat3,
205     sfx_mindth,
206     sfx_minact,
207     sfx_minpai,
208     sfx_hedsit,
209     sfx_hedat1,
210     sfx_hedat2,
211     sfx_hedat3,
212     sfx_heddth,
213     sfx_hedact,
214     sfx_hedpai,
215     sfx_sorzap,
216     sfx_sorrise,
217     sfx_sorsit,
218     sfx_soratk,
219     sfx_soract,
220     sfx_sorpai,
221     sfx_sordsph,
222     sfx_sordexp,
223     sfx_sordbon,
224     sfx_sbtsit,
225     sfx_sbtatk,
226     sfx_sbtdth,
227     sfx_sbtact,
228     sfx_sbtpai,
229     sfx_plroof,
230     sfx_plrpai,
231     sfx_plrdth,                 // Normal
232     sfx_gibdth,                 // Extreme
233     sfx_plrwdth,                // Wimpy
234     sfx_plrcdth,                // Crazy
235     sfx_itemup,
236     sfx_wpnup,
237     sfx_telept,
238     sfx_doropn,
239     sfx_dorcls,
240     sfx_dormov,
241     sfx_artiup,
242     sfx_switch,
243     sfx_pstart,
244     sfx_pstop,
245     sfx_stnmov,
246     sfx_chicpai,
247     sfx_chicatk,
248     sfx_chicdth,
249     sfx_chicact,
250     sfx_chicpk1,
251     sfx_chicpk2,
252     sfx_chicpk3,
253     sfx_keyup,
254     sfx_ripslop,
255     sfx_newpod,
256     sfx_podexp,
257     sfx_bounce,
258     sfx_volsht,
259     sfx_volhit,
260     sfx_burn,
261     sfx_splash,
262     sfx_gloop,
263     sfx_respawn,
264     sfx_blssht,
265     sfx_blshit,
266     sfx_chat,
267     sfx_artiuse,
268     sfx_gfrag,
269     sfx_waterfl,
270 
271     // Monophonic sounds
272 
273     sfx_wind,
274     sfx_amb1,
275     sfx_amb2,
276     sfx_amb3,
277     sfx_amb4,
278     sfx_amb5,
279     sfx_amb6,
280     sfx_amb7,
281     sfx_amb8,
282     sfx_amb9,
283     sfx_amb10,
284     sfx_amb11,
285     NUMSFX
286 } sfxenum_t;
287 
288 extern sfxinfo_t S_sfx[];
289 extern musicinfo_t S_music[][2];
290 
291 #endif
292