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