Xonotic
all.qh
Go to the documentation of this file.
1 #pragma once
2 
3 #include "model.qh"
4 
5 REGISTRY(Models, BITS(9))
6 REGISTER_REGISTRY(Models)
7 
8 #define MODEL(name, path) \
9  string MDL_##name##_get() { return path; } \
10  REGISTER(Models, MDL, name, m_id, NEW(Model, MDL_##name##_get))
11 
12 STATIC_INIT(NULLMDL)
13 {
14  precache_model("null");
15 }
16 
17 PRECACHE(Models) {
18  FOREACH(Models, true, it.model_precache(it));
19 }
20 
21 MODEL(Null, "null");
22 REGISTRY_DEFINE_GET(Models, MDL_Null)
23 #include "all.inc"
REGISTRY(Weapons, 72) STATIC_INIT(WeaponPickup)
Definition: all.qh:28
PRECACHE(Models)
Definition: all.qh:17
#define REGISTER_REGISTRY(id)
Definition: registry.qh:212
#define REGISTRY_DEFINE_GET(id, null)
Definition: registry.qh:40
#define MODEL(name, path)
Definition: all.qh:8
STATIC_INIT(IMPULSES_renumber)
Definition: all.qh:8
#define FOREACH(list, cond, body)
Definition: iter.qh:19
#define BITS(n)
Definition: bits.qh:9