]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/sounds/all.qh
Merge branch 'master' into terencehill/hud_cleanups
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / sounds / all.qh
1 #ifndef SOUNDS_ALL_H
2 #define SOUNDS_ALL_H
3
4 #include "sound.qh"
5
6 REGISTRY(Sounds, BITS(8))
7 REGISTER_REGISTRY(RegisterSounds)
8
9 #define SOUND(name, path) \
10     string SND_##name##_get() { return path; } \
11     REGISTER(RegisterSounds, SND, Sounds, name, m_id, NEW(Sound, SND_##name##_get))
12
13 // Used in places where a string is required
14 #define SND(id) (SND_##id.sound_str())
15
16 STATIC_INIT(RegisterSounds_precache) {
17     FOREACH(Sounds, true, LAMBDA({
18         it.sound_precache(it);
19     }));
20 }
21
22 SOUND(Null, "misc/null.wav");
23 #include "all.inc"
24
25 #endif