]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/all.qh
Add an item dumping command
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / all.qh
1 #ifndef ALL_H
2 #define ALL_H
3
4 const int MAX_ITEMS = 23;
5 entity ITEMS[MAX_ITEMS];
6
7 #define ITEMS_FOREACH(pred, body) do {      \
8     for (int i = 0; i < ITEM_COUNT; i++) {  \
9         const entity it = ITEMS[i];         \
10         if (pred) { body }                  \
11     }                                       \
12 } while(0)
13
14 void RegisterItems();
15 void Dump_Items();
16
17 #ifdef CSQC
18 void ReadItems()
19 {
20 /*
21     const int flags = read();
22     for (int i = 0; i < MAX_ITEMS; i++) {
23         if (flags & BIT(i)) {
24             self.items[i] = read();
25         }
26     }
27 */
28 }
29 #endif
30
31 #ifdef SVQC
32 void WriteItems()
33 {
34
35 }
36 #endif
37
38 #endif