]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/gamesettings.qh
Registry: overflow check
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / gamesettings.qh
index 5085d3b4a94c3e9cc1f9aeff37174297bab92550..7c7dc70db94987fd0a9ec17da3cffec0f9333713 100644 (file)
@@ -2,14 +2,11 @@
 #ifndef GAMESETTINGS_H
 #define GAMESETTINGS_H
 
-void RegisterSettings();
-const int MAX_SETTINGS = 24;
-Lazy SETTINGS[MAX_SETTINGS], SETTINGS_first, SETTINGS_last;
-int SETTINGS_COUNT;
+REGISTRY(Settings, BIT(3))
+REGISTER_REGISTRY(RegisterSettings)
 #define REGISTER_SETTINGS(id, impl) \
     LAZY_NEW(id, impl) \
-    REGISTER(RegisterSettings, MENU, SETTINGS, SETTINGS_COUNT, id, m_id, NEW(Lazy, LAZY(id)))
-REGISTER_REGISTRY(RegisterSettings)
+    REGISTER(RegisterSettings, MENU, Settings, id, m_id, NEW(Lazy, LAZY(id)))
 
 #endif
 #endif