Xonotic
all.qh
Go to the documentation of this file.
1 #pragma once
2 
3 #include "waypointsprites.qh"
4 
5 REGISTRY(Waypoints, BITS(7))
6 REGISTER_REGISTRY(Waypoints)
7 REGISTRY_CHECK(Waypoints)
8 
10 #define REGISTER_WAYPOINT_(id, init) REGISTER(Waypoints, WP, id, m_id, init)
11 
13  ATTRIB(Waypoint, m_id, int, 0);
14  ATTRIB(Waypoint, netname, string);
15  ATTRIB(Waypoint, m_name, string);
16  ATTRIB(Waypoint, m_icon, string);
17  ATTRIB(Waypoint, m_color, vector, '1 1 1');
18  ATTRIB(Waypoint, m_blink, int, 1);
19  CONSTRUCTOR(Waypoint, string _netname, string _name, string _icon, vector _color, int _blink) {
20  CONSTRUCT(Waypoint);
21  this.netname = _netname;
22  this.m_name = _name;
23  this.m_icon = _icon;
24  this.m_color = _color;
25  this.m_blink = _blink;
26  }
28 
29 #define REGISTER_WAYPOINT(id, text, icon, color, blink) REGISTER_WAYPOINT_(id, NEW(Waypoint, #id, text, icon, color, blink))
30 
31 REGISTRY(RadarIcons, BITS(7))
32 REGISTER_REGISTRY(RadarIcons)
33 REGISTRY_CHECK(RadarIcons)
34 
36 #define REGISTER_RADARICON(id, num) REGISTER(RadarIcons, RADARICON, id, m_id, new_pure(RadarIcon)) { this.m_radaricon = num; this.netname = #id; }
37 
38 REGISTER_WAYPOINT(Null, "", "", '0 0 0', 1);
39 REGISTRY_DEFINE_GET(Waypoints, WP_Null)
40 
41 REGISTER_RADARICON(NONE, 0);
42 REGISTRY_DEFINE_GET(RadarIcons, RADARICON_NONE)
43 
44 REGISTER_RADARICON(FLAG, 1);
45 REGISTER_RADARICON(FLAGCARRIER, 1);
46 
47 REGISTER_RADARICON(HERE, 1);
48 REGISTER_RADARICON(DANGER, 1);
49 
50 REGISTER_RADARICON(WAYPOINT, 1);
51 REGISTER_RADARICON(HELPME, 1);
52 REGISTER_RADARICON(CONTROLPOINT, 1);
53 REGISTER_RADARICON(GENERATOR, 1);
54 REGISTER_RADARICON(OBJECTIVE, 1);
55 REGISTER_RADARICON(DOMPOINT, 1);
56 REGISTER_RADARICON(TAGGED, 1);
57 
58 REGISTER_RADARICON(Item, 1);
61 
62 #include "all.inc"
REGISTRY(Weapons, 72) STATIC_INIT(WeaponPickup)
Definition: all.qh:28
#define REGISTER_WAYPOINT(id, text, icon, color, blink)
Definition: all.qh:29
CLASS(Object) Object
Definition: oo.qh:318
#define REGISTER_RADARICON(id, num)
Definition: all.qh:36
#define REGISTRY_CHECK(id)
Definition: registry.qh:175
string netname
Definition: powerups.qc:20
Definition: all.qh:12
#define CONSTRUCT(cname,...)
Definition: oo.qh:111
#define ATTRIB(...)
Definition: oo.qh:136
#define REGISTER_REGISTRY(id)
Definition: registry.qh:212
#define REGISTRY_DEFINE_GET(id, null)
Definition: registry.qh:40
int m_id
Definition: effect.qh:19
int m_radaricon
Definition: all.qh:35
vector(float skel, float bonenum) _skel_get_boneabs_hidden
#define ENDCLASS(cname)
Definition: oo.qh:269
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition: weapon.qh:41
#define CONSTRUCTOR(cname,...)
Definition: oo.qh:201
#define BITS(n)
Definition: bits.qh:9
string m_name
Definition: scores.qh:135