]> icculus.org git repositories - divverent/nexuiz.git/blob - menu/sound.qc
grappling hook
[divverent/nexuiz.git] / menu / sound.qc
1 ///////////////////////////////////////////////
2 // Sound Source File
3 ///////////////////////
4 // This file belongs to dpmod/darkplaces
5 // AK contains all manager constants, etc.
6 ///////////////////////////////////////////////
7
8 void(void) snd_init =
9 {
10         snd_loadsound(SOUND_SELECT, SOUND_ENFORCELOADING);
11         snd_loadsound(SOUND_INCREASE, SOUND_ENFORCELOADING);
12         snd_loadsound(SOUND_DECREASE, SOUND_ENFORCELOADING);
13         snd_loadsound(SOUND_ACTION, SOUND_ENFORCELOADING);
14         snd_loadsound(SOUND_STARTGAME, SOUND_ENFORCELOADING);
15         snd_loadsound(SOUND_ENDGAME, SOUND_ENFORCELOADING);
16 };
17
18 void(void) snd_frame =
19 {
20 };
21
22 void(void) snd_toggle =
23 {
24 };
25
26 void(float keynr, float ascii) snd_keydown =
27 {
28 };
29
30 void(void) snd_shutdown =
31 {
32         snd_unloadsound(SOUND_SELECT);
33         snd_unloadsound(SOUND_INCREASE);
34         snd_unloadsound(SOUND_DECREASE);
35         snd_unloadsound(SOUND_ACTION);
36         snd_unloadsound(SOUND_STARTGAME);
37         snd_unloadsound(SOUND_ENDGAME);
38 };
39
40 void(string sound_name) snd_play =
41 {
42         localsound(sound_name);
43 };
44
45 string(string sound_name, float complain) snd_loadsound =
46 {
47         string c;
48
49         c = precache_sound(sound_name);
50
51         if(c == "" && complain)
52                 error("Couldn't load ", sound_name, " !\n");
53         return c;
54 };
55
56 void(string sound_name) snd_unloadsound =
57 {
58         // FIXME: there is now free/unload sound at the moment
59         // at least non that works the way it should
60 };
61