Declare more ints as ints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qh
1 // --------------------------------------------------------------------------
2 // MENU Functionality
3
4 const float DATABUF_PING = 0;
5 #define DATABUF_CAPTURES (1*maxclients)
6 #define DATABUF_DEATHS (2*maxclients)
7 #define DATABUF_RETURNS (3*maxclients)
8
9 #define DATABUF_NEXT (5*maxclients)
10
11 void() menu_show_error;
12 void() menu_sub_null;
13
14 float menu_visible;
15 var void() menu_show;
16 var float(float bInputType, float nPrimary, float nSecondary) menu_action;
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 drawfont;
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_DEFAULT = 0;
42 float FONT_USER = 8;
43
44 // --------------------------------------------------------------------------
45 // Scoreboard stuff
46
47 const int MAX_HUD_FIELDS = 16;
48
49 const int SP_END = -1;
50
51 const int SP_PING = -2;
52 const int SP_NAME = -3;
53 const int SP_KDRATIO = -4;
54 const int SP_CLRATIO = -5;
55 const int SP_PL = -6;
56 const int SP_FRAGS = -7;
57 const int SP_SUM = -8;
58
59 const int SP_SEPARATOR = -100;
60
61 float hud_field[MAX_HUD_FIELDS + 1];
62 float hud_size[MAX_HUD_FIELDS + 1];
63 string hud_title[MAX_HUD_FIELDS + 1];
64 int hud_num_fields;
65
66 string scores_label[MAX_SCORE];
67 int scores_flags[MAX_SCORE];
68 string teamscores_label[MAX_SCORE];
69 int teamscores_flags[MAX_SCORE];
70 .int scores[MAX_SCORE];
71 .float teamscores[MAX_TEAMSCORE];
72
73 #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
74 #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
75
76
77 vector hud_fontsize;
78
79 float RANKINGS_RECEIVED_CNT;
80 string grecordholder[RANKINGS_CNT];
81 float grecordtime[RANKINGS_CNT];
82 //float csqc_flags;
83
84 entity playerslots[255]; // 255 is engine limit on maxclients
85 entity teamslots[17];    // 17 teams (including "spectator team")
86 .float gotscores;
87 .entity owner;
88 .float ready;
89 .float eliminated;
90
91 .void(void) draw;
92 .void(void) draw2d;
93 .void(void) entremove;
94 float drawframetime;
95 vector view_origin, view_angles, view_forward, view_right, view_up;
96
97 float button_zoom;
98 float spectatorbutton_zoom;
99 float button_attack2;
100
101 float activeweapon;
102 float switchingweapon;
103 float switchweapon;
104 float current_viewzoom;
105 float zoomin_effect;
106 float warmup_stage;
107
108 string getcommandkey(string text, string command);
109
110 string vote_called_vote;
111 float ready_waiting;
112 float ready_waiting_for_me;
113 float vote_waiting;
114 float vote_waiting_for_me;
115
116 float current_zoomfraction;
117
118 float cs_project_is_b0rked;
119 float vid_width, vid_height, vid_pixelheight;
120
121 float camera_active;            // Demo camera is active if set to true
122 float chase_active_backup;
123 float camera_roll;
124 vector camera_direction;
125
126 void centerprint_hud(string strMessage);
127 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
128
129 const float ALPHA_MIN_VISIBLE = 0.003;
130
131 float armorblockpercent;
132
133 //hooks
134 int calledhooks;
135 const int HOOK_START =    1;
136 const int HOOK_END =      2;
137
138 .float ping, ping_packetloss, ping_movementloss;
139
140 float g_balance_mortar_bouncefactor;
141 float g_balance_mortar_bouncestop;
142 float g_balance_electro_secondary_bouncefactor;
143 float g_balance_electro_secondary_bouncestop;
144 float g_trueaim_minrange;
145
146 entity entcs_receiver[255]; // 255 is the engine limit on maxclients
147
148 float hud;
149 float view_quality;
150 int framecount;