]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/static.qh
Clean out self from wr_checkammo1 & wr_checkammo2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / static.qh
index f7bcdcc296688e5ac8303a424284544561147e16..e1cfeb8721ce54f6b29a9f440e410d2c29bf5626 100644 (file)
@@ -1,19 +1,20 @@
-#ifndef STATIC_H
-#define STATIC_H
+#pragma once
 
-void __static_init() { }
+void __static_init() {}
 #define static_init() CALL_ACCUMULATED_FUNCTION(__static_init)
-void __static_init_late() {  }
+void __static_init_late() {}
 #define static_init_late() CALL_ACCUMULATED_FUNCTION(__static_init_late)
-
-#define REGISTER_REGISTRY(func) ACCUMULATE_FUNCTION(__static_init, func)
+void __static_init_precache() {}
+#define static_init_precache() CALL_ACCUMULATED_FUNCTION(__static_init_precache)
+void __shutdown() {}
+#define shutdownhooks() CALL_ACCUMULATED_FUNCTION(__shutdown)
 
 #define _STATIC_INIT(where, func) \
-    void _static_##func(); \
-    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)
+       void _static_##func(); \
+       ACCUMULATE_FUNCTION(where, _static_##func) \
+       void _static_##func()
 
-#endif
+#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)
+#define SHUTDOWN(func) _STATIC_INIT(__shutdown,                        func##_shutdown)