1 #ifndef WAYPOINTS_ALL_H
2 #define WAYPOINTS_ALL_H
4 #include "waypointsprites.qh"
6 REGISTRY(Waypoints, BITS(6))
7 #define Waypoints_from(i) _Waypoints_from(i, WP_Null)
8 REGISTER_REGISTRY(RegisterWaypoints)
9 /** If you register a new waypoint, make sure to add it to all.inc */
10 #define REGISTER_WAYPOINT_(id, init) REGISTER(RegisterWaypoints, WP, Waypoints, id, m_id, init)
12 CLASS(Waypoint, Object)
13 ATTRIB(Waypoint, m_id, int, 0)
14 ATTRIB(Waypoint, netname, string, string_null)
15 ATTRIB(Waypoint, m_name, string, string_null)
16 ATTRIB(Waypoint, m_color, vector, '1 1 1')
17 ATTRIB(Waypoint, m_blink, int, 1)
18 CONSTRUCTOR(Waypoint, string _netname, string _name, vector _color, int _blink) {
20 this.netname = _netname;
22 this.m_color = _color;
23 this.m_blink = _blink;
27 #define REGISTER_WAYPOINT(id, text, color, blink) REGISTER_WAYPOINT_(id, NEW(Waypoint, #id, text, color, blink))
29 REGISTRY(RadarIcons, BITS(7))
30 #define RadarIcons_from(i) _RadarIcons_from(i, RADARICON_NONE)
31 REGISTER_REGISTRY(RegisterRadarIcons)
33 #define REGISTER_RADARICON(id, num) REGISTER(RegisterRadarIcons, RADARICON, RadarIcons, id, m_id, new(RadarIcon)) { make_pure(this); this.m_radaricon = num; this.netname = #id; }
35 REGISTER_WAYPOINT(Null, "", '0 0 0', 1);
37 REGISTER_RADARICON(NONE, 0);
38 REGISTER_RADARICON(FLAG, 1);
39 REGISTER_RADARICON(FLAGCARRIER, 1);
41 // TODO make these 3 and 4, and make images for them
42 REGISTER_RADARICON(HERE, 1);
43 REGISTER_RADARICON(DANGER, 1);
45 REGISTER_RADARICON(WAYPOINT, 1);
46 REGISTER_RADARICON(HELPME, 1);
47 REGISTER_RADARICON(CONTROLPOINT, 1);
48 REGISTER_RADARICON(GENERATOR, 1);
49 REGISTER_RADARICON(OBJECTIVE, 1);
50 REGISTER_RADARICON(DOMPOINT, 1);
51 REGISTER_RADARICON(TAGGED, 1);
53 REGISTER_RADARICON(Buff, 1);
54 REGISTER_RADARICON(Item, 1);
55 REGISTER_RADARICON(Vehicle, 1);
56 REGISTER_RADARICON(Weapon, 1);