]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/sounds/all.qh
Merge branch 'master' into Mario/balance
[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 #define Sounds_from(i) _Sounds_from(i, SND_Null)
8 REGISTER_REGISTRY(Sounds)
9
10 #define SOUND(name, path) \
11     string SND_##name##_get() { return path; } \
12     REGISTER(Sounds, SND, name, m_id, NEW(Sound, SND_##name##_get))
13
14 /** @deprecated Used in places where a string is required for legacy reasons, prefer using SND_id constants instead */
15 #define SND(id) Sound_fixpath(SND_##id)
16
17 PRECACHE(Sounds) {
18     FOREACH(Sounds, true, it.sound_precache(it));
19 }
20
21 SOUND(Null, "misc/null");
22 #include "all.inc"
23 #include "all.qc"
24 #endif