]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/all.qh
Merge branch 'master' into terencehill/tooltips_cleanup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / all.qh
index c42139e25f6a1b4f4c12cba0e350e8ec2daac506..3f8c603e7ab2aabeb75c74f438a00e73bba7593b 100644 (file)
@@ -1,25 +1,20 @@
-#include "../registry.qh"
-
 #ifndef ITEMS_ALL_H
 #define ITEMS_ALL_H
 
 void RegisterItems();
 const int MAX_ITEMS = 24;
-entity ITEMS[MAX_ITEMS];
+entity ITEMS[MAX_ITEMS], ITEMS_first, ITEMS_last;
 int ITEM_COUNT;
 /** If you register a new item, make sure to add it to all.inc */
-#define REGISTER_ITEM(id, class) REGISTER(RegisterItems, ITEM, ITEMS, ITEM_COUNT, id, class, m_id)
+#define REGISTER_ITEM(id, class) REGISTER(RegisterItems, ITEM, ITEMS, ITEM_COUNT, id, m_id, NEW(class))
 REGISTER_REGISTRY(RegisterItems)
 
-#define ITEMS_FOREACH(pred, body) do {      \
-    for (int i = 0; i < ITEM_COUNT; i++) {  \
-        const noref entity it = ITEMS[i];   \
-        if (pred) { body }                  \
-    }                                       \
-} while(0)
-
 void Dump_Items();
 
+#ifndef MENUQC
+string Item_Model(string item_mdl);
+#endif
+
 #endif
 
 #include "inventory.qh"