]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/static.qh
Precache: defer
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / static.qh
index 49ce802e90f0bb376366e522c0139be3f51600b6..a9f7f53d678dddc5cbb5ffe1dfbc5eefa62aed3e 100644 (file)
@@ -5,6 +5,8 @@ void __static_init() {}
 #define static_init() CALL_ACCUMULATED_FUNCTION(__static_init)
 void __static_init_late() {}
 #define static_init_late() CALL_ACCUMULATED_FUNCTION(__static_init_late)
+void __static_init_precache() {}
+#define static_init_precache() CALL_ACCUMULATED_FUNCTION(__static_init_precache)
 
 #define REGISTER_REGISTRY(func) ACCUMULATE_FUNCTION(__static_init, func)
 
@@ -13,7 +15,8 @@ void __static_init_late() {}
        ACCUMULATE_FUNCTION(where, _static_##func) \
        void _static_##func()
 
-#define STATIC_INIT(func) _STATIC_INIT(__static_init,         func)
-#define STATIC_INIT_LATE(func) _STATIC_INIT(__static_init_late,    func##_late)
+#define STATIC_INIT(func) _STATIC_INIT(__static_init,           func)
+#define STATIC_INIT_LATE(func) _STATIC_INIT(__static_init_late, func##_late)
+#define PRECACHE(func) _STATIC_INIT(__static_init_precache,     func##_precache)
 
 #endif