// needs to be done so early because of the constants they create
static_init();
static_init_late();
+ static_init_precache();
// precaches
string MDL_##name##_get() { return path; } \
REGISTER(RegisterModels, MDL, Models, name, m_id, NEW(Model, MDL_##name##_get))
-STATIC_INIT(RegisterModels_precache) {
+PRECACHE(Models) {
FOREACH(Models, true, LAMBDA({
it.model_precache(it);
}));
// Used in places where a string is required
#define SND(id) (SND_##id.sound_str())
-STATIC_INIT(RegisterSounds_precache) {
+PRECACHE(Sounds) {
FOREACH(Sounds, true, LAMBDA({
it.sound_precache(it);
}));
#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)
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
// needs to be done so early because of the constants they create
static_init();
static_init_late();
+ static_init_precache();
RegisterSLCategories();
// needs to be done so early because of the constants they create
static_init();
static_init_late();
+ static_init_precache();
MapInfo_Enumerate();
MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
InitGameplayMode();
static_init_late();
+ static_init_precache();
readlevelcvars();
GrappleHookInit();