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