Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
all.qh
Go to the documentation of this file.
1#pragma once
2
3#include "waypointsprites.qh"
4
5REGISTRY(Waypoints, BITS(7))
6REGISTER_REGISTRY(Waypoints)
7REGISTRY_CHECK(Waypoints)
8
10#define REGISTER_WAYPOINT_(id, init) REGISTER(Waypoints, WP, id, m_id, init)
11
13 ATTRIB(Waypoint, m_id, int, 0);
16 ATTRIB(Waypoint, m_icon, string);
19 CONSTRUCTOR(Waypoint, string _netname, string _name, string _icon, vector _color, int _blink) {
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
31REGISTRY(RadarIcons, BITS(7))
32REGISTER_REGISTRY(RadarIcons)
33REGISTRY_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
38REGISTER_WAYPOINT(Null, "", "", '0 0 0', 1);
39REGISTRY_DEFINE_GET(Waypoints, WP_Null)
40
42REGISTRY_DEFINE_GET(RadarIcons, RADARICON_NONE)
43
45REGISTER_RADARICON(FLAGCARRIER, 1);
46
49
50REGISTER_RADARICON(WAYPOINT, 1);
52REGISTER_RADARICON(CONTROLPOINT, 1);
53REGISTER_RADARICON(GENERATOR, 1);
54REGISTER_RADARICON(OBJECTIVE, 1);
55REGISTER_RADARICON(DOMPOINT, 1);
57
62
63#include "all.inc"
#define BITS(n)
Definition bits.qh:9
Definition buffs.qh:17
ATTRIB(Waypoint, netname, string)
vector m_color
Definition all.qh:17
Waypoint(string _netname, string _name, string _icon, vector _color, int _blink)
Definition all.qh:19
int m_id
Definition all.qh:13
int m_blink
Definition all.qh:18
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:44
string netname
Definition powerups.qc:20
string m_name
Definition scores.qh:142
#define REGISTER_RADARICON(id, num)
Definition all.qh:36
int m_radaricon
Definition all.qh:35
#define REGISTER_WAYPOINT(id, text, icon, color, blink)
Definition all.qh:29
#define CLASS(...)
Definition oo.qh:145
#define ENDCLASS(cname)
Definition oo.qh:281
#define CONSTRUCTOR(cname,...)
Definition oo.qh:213
#define CONSTRUCT(cname,...)
Definition oo.qh:123
#define REGISTER_REGISTRY(id)
Definition registry.qh:229
#define REGISTRY(id, max)
Declare a new registry.
Definition registry.qh:26
#define REGISTRY_CHECK(id)
Definition registry.qh:175
#define REGISTRY_DEFINE_GET(id, null)
Definition registry.qh:40
vector
Definition self.qh:92