Radar icons: fix colour
[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, BIT(6))
7 REGISTER_REGISTRY(RegisterWaypoints)
8 /** If you register a new waypoint, make sure to add it to all.inc */
9 #define REGISTER_WAYPOINT_(id, init) REGISTER(RegisterWaypoints, WP, Waypoints, id, m_id, init)
10
11 CLASS(Waypoint, Object)
12     ATTRIB(Waypoint, m_id, int, 0)
13     ATTRIB(Waypoint, netname, string, string_null)
14     ATTRIB(Waypoint, m_name, string, string_null)
15     ATTRIB(Waypoint, m_color, vector, '1 1 1')
16     ATTRIB(Waypoint, m_blink, int, 1)
17     CONSTRUCTOR(Waypoint, string _netname, string _name, vector _color, int _blink) {
18         CONSTRUCT(Waypoint);
19         this.netname = _netname;
20         this.m_name = _name;
21         this.m_color = _color;
22         this.m_blink = _blink;
23     }
24 ENDCLASS(Waypoint)
25
26 #define REGISTER_WAYPOINT(id, text, color, blink) REGISTER_WAYPOINT_(id, NEW(Waypoint, #id, text, color, blink))
27
28 REGISTRY(RadarIcons, BITS(7))
29 REGISTER_REGISTRY(RegisterRadarIcons)
30 .int m_radaricon;
31 #define REGISTER_RADARICON(id, num) REGISTER(RegisterRadarIcons, RADARICON, RadarIcons, id, m_id, new(RadarIcon)) { this.m_radaricon = num; this.netname = #id; }
32
33 REGISTER_WAYPOINT(Null, "", '0 0 0', 1);
34
35 REGISTER_RADARICON(NONE,            0);
36 REGISTER_RADARICON(FLAG,            1);
37 REGISTER_RADARICON(FLAGCARRIER,     1);
38
39 // TODO make these 3 and 4, and make images for them
40 REGISTER_RADARICON(HERE,            1);
41 REGISTER_RADARICON(DANGER,          1);
42
43 REGISTER_RADARICON(WAYPOINT,        1);
44 REGISTER_RADARICON(HELPME,          1);
45 REGISTER_RADARICON(CONTROLPOINT,    1);
46 REGISTER_RADARICON(GENERATOR,       1);
47 REGISTER_RADARICON(OBJECTIVE,       1);
48 REGISTER_RADARICON(DOMPOINT,        1);
49 REGISTER_RADARICON(TAGGED,          1);
50
51 REGISTER_RADARICON(Buff,            1);
52 REGISTER_RADARICON(Item,            1);
53 REGISTER_RADARICON(Vehicle,         1);
54 REGISTER_RADARICON(Weapon,          1);
55
56 #include "all.inc"
57
58 #endif