]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/waypoints/all.qh
Merge branch 'master' into TimePath/notifications
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / waypoints / all.qh
1 #ifndef WAYPOINTS_ALL_H
2 #define WAYPOINTS_ALL_H
3
4 #include "waypointsprites.qh"
5
6 REGISTRY(Waypoints, BITS(6))
7 #define Waypoints_from(i) _Waypoints_from(i, WP_Null)
8 REGISTER_REGISTRY(Waypoints)
9 REGISTRY_CHECK(Waypoints)
10
11 /** If you register a new waypoint, make sure to add it to all.inc */
12 #define REGISTER_WAYPOINT_(id, init) REGISTER(Waypoints, WP, id, m_id, init)
13
14 CLASS(Waypoint, Object)
15     ATTRIB(Waypoint, m_id, int, 0)
16     ATTRIB(Waypoint, netname, string, string_null)
17     ATTRIB(Waypoint, m_name, string, string_null)
18     ATTRIB(Waypoint, m_color, vector, '1 1 1')
19     ATTRIB(Waypoint, m_blink, int, 1)
20     CONSTRUCTOR(Waypoint, string _netname, string _name, vector _color, int _blink) {
21         CONSTRUCT(Waypoint);
22         this.netname = _netname;
23         this.m_name = _name;
24         this.m_color = _color;
25         this.m_blink = _blink;
26     }
27 ENDCLASS(Waypoint)
28
29 #define REGISTER_WAYPOINT(id, text, color, blink) REGISTER_WAYPOINT_(id, NEW(Waypoint, #id, text, color, blink))
30
31 REGISTRY(RadarIcons, BITS(7))
32 #define RadarIcons_from(i) _RadarIcons_from(i, RADARICON_NONE)
33 REGISTER_REGISTRY(RadarIcons)
34 REGISTRY_CHECK(RadarIcons)
35
36 .int m_radaricon;
37 #define REGISTER_RADARICON(id, num) REGISTER(RadarIcons, RADARICON, id, m_id, new_pure(RadarIcon)) { this.m_radaricon = num; this.netname = #id; }
38
39 REGISTER_WAYPOINT(Null, "", '0 0 0', 1);
40
41 REGISTER_RADARICON(NONE,            0);
42 REGISTER_RADARICON(FLAG,            1);
43 REGISTER_RADARICON(FLAGCARRIER,     1);
44
45 REGISTER_RADARICON(HERE,            1);
46 REGISTER_RADARICON(DANGER,          1);
47
48 REGISTER_RADARICON(WAYPOINT,        1);
49 REGISTER_RADARICON(HELPME,          1);
50 REGISTER_RADARICON(CONTROLPOINT,    1);
51 REGISTER_RADARICON(GENERATOR,       1);
52 REGISTER_RADARICON(OBJECTIVE,       1);
53 REGISTER_RADARICON(DOMPOINT,        1);
54 REGISTER_RADARICON(TAGGED,          1);
55
56 REGISTER_RADARICON(Item,            1);
57 REGISTER_RADARICON(Vehicle,         1);
58 REGISTER_RADARICON(Weapon,          1);
59
60 #include "all.inc"
61
62 #endif