Draw: purge SELFPARAM
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qh
1 #ifndef MAIN_H
2 #define MAIN_H
3
4 #include "../common/constants.qh"
5
6 // --------------------------------------------------------------------------
7 // MENU Functionality
8
9 const float DATABUF_PING = 0;
10 #define DATABUF_CAPTURES (1*maxclients)
11 #define DATABUF_DEATHS (2*maxclients)
12 #define DATABUF_RETURNS (3*maxclients)
13
14 #define DATABUF_NEXT (5*maxclients)
15
16 void() menu_show_error;
17 void() menu_sub_null;
18
19 float menu_visible;
20 var void() menu_show;
21 var float(float bInputType, float nPrimary, float nSecondary) menu_action;
22
23 // --------------------------------------------------------------------------
24 // Onslaught
25
26 // Map coordinate base calculations need these
27 vector mi_center;
28 vector mi_scale;
29 // Minimap
30 string minimapname;
31
32 // --------------------------------------------------------------------------
33 // General stuff
34
35 float postinit;
36 float gametype;
37
38 //float sorted_players;
39 //float sorted_teams;
40
41 // Defs
42 //.float ctf_state;
43 //.float health;
44
45 float FONT_USER = 8;
46
47 // --------------------------------------------------------------------------
48 // Scoreboard stuff
49
50 const int MAX_HUD_FIELDS = 16;
51
52 const int SP_END = -1;
53
54 const int SP_PING = -2;
55 const int SP_NAME = -3;
56 const int SP_KDRATIO = -4;
57 const int SP_CLRATIO = -5;
58 const int SP_PL = -6;
59 const int SP_FRAGS = -7;
60 const int SP_SUM = -8;
61
62 const int SP_SEPARATOR = -100;
63
64 float hud_field[MAX_HUD_FIELDS + 1];
65 float hud_size[MAX_HUD_FIELDS + 1];
66 string hud_title[MAX_HUD_FIELDS + 1];
67 int hud_num_fields;
68
69 string scores_label[MAX_SCORE];
70 int scores_flags[MAX_SCORE];
71 string teamscores_label[MAX_SCORE];
72 int teamscores_flags[MAX_SCORE];
73 .int scores[MAX_SCORE];
74 .float teamscores[MAX_TEAMSCORE];
75
76 #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
77 #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
78
79
80 vector hud_fontsize;
81
82 float RANKINGS_RECEIVED_CNT;
83 string grecordholder[RANKINGS_CNT];
84 float grecordtime[RANKINGS_CNT];
85 //float csqc_flags;
86
87 entity playerslots[255]; // 255 is engine limit on maxclients
88 entity teamslots[17];    // 17 teams (including "spectator team")
89 .float gotscores;
90 .entity owner;
91 .float ready;
92 .float eliminated;
93
94 .void(entity) draw;
95 .void(entity) draw2d;
96 .void(void) entremove;
97 float drawframetime;
98 vector view_origin, view_forward, view_right, view_up;
99
100 float button_zoom;
101 float spectatorbutton_zoom;
102 float button_attack2;
103
104 int activeweapon;
105 int switchingweapon;
106 int switchweapon;
107 float current_viewzoom;
108 float zoomin_effect;
109 float warmup_stage;
110
111 void Fog_Force();
112
113 string getcommandkey(string text, string command);
114
115 string vote_called_vote;
116 float ready_waiting;
117 float ready_waiting_for_me;
118 float vote_waiting;
119 float vote_waiting_for_me;
120
121 float current_zoomfraction;
122
123 float cs_project_is_b0rked;
124 float vid_width, vid_height, vid_pixelheight;
125
126 float camera_active;            // Demo camera is active if set to true
127 float chase_active_backup;
128 float camera_roll;
129 vector camera_direction;
130
131 void centerprint_hud(string strMessage);
132 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
133
134 const float ALPHA_MIN_VISIBLE = 0.003;
135
136 float armorblockpercent;
137
138 //hooks
139 int calledhooks;
140 const int HOOK_START =    1;
141 const int HOOK_END =      2;
142
143 .float ping, ping_packetloss, ping_movementloss;
144
145 float g_balance_mortar_bouncefactor;
146 float g_balance_mortar_bouncestop;
147 float g_balance_electro_secondary_bouncefactor;
148 float g_balance_electro_secondary_bouncestop;
149 float g_trueaim_minrange;
150
151 entity entcs_receiver[255]; // 255 is the engine limit on maxclients
152
153 float hud;
154 float view_quality;
155 int framecount;
156 .float health;
157
158 #endif