Registry: use BITS everywhere
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qh
1 #ifndef CLIENT_HUD_H
2 #define CLIENT_HUD_H
3
4 #include "../common/weapons/all.qh"
5
6 bool HUD_Radar_Clickable();
7 void HUD_Radar_Mouse();
8
9 REGISTRY(hud_panels, BITS(6))
10 REGISTER_REGISTRY(Registerhud_panels)
11
12 #define REGISTER_HUD_PANEL(id, draw_func, name, configflags, showflags) \
13         void draw_func(); \
14         REGISTER(Registerhud_panels, HUD_PANEL, hud_panels, id, m_id, new(hud_panel)) { \
15                 this.panel_id = this.m_id; \
16                 this.panel_draw = draw_func; \
17                 this.panel_name = #name; \
18                 this.panel_configflags = configflags; \
19                 this.panel_showflags = showflags; \
20         }
21
22 #define HUD_PANEL(NAME) HUD_PANEL_##NAME
23
24 // draw the background/borders
25 #define HUD_Panel_DrawBg(theAlpha) do {                                                                                                                                                         \
26         if(panel.current_panel_bg != "0" && panel.current_panel_bg != "")                                                                                               \
27                 draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel.current_panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * theAlpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER));\
28 } while(0)
29
30 int panel_order[hud_panels_MAX];
31 string hud_panelorder_prev;
32
33 bool hud_draw_maximized;
34 bool hud_panel_radar_maximized;
35 bool hud_panel_radar_mouse;
36 float hud_panel_radar_bottom;
37 bool hud_panel_radar_temp_hidden;
38 bool chat_panel_modified;
39 bool radar_panel_modified;
40
41 float HUD_Radar_InputEvent(float bInputType, float nPrimary, float nSecondary);
42 void HUD_Radar_Hide_Maximized();
43
44 void HUD_Reset (void);
45 void HUD_Main (void);
46
47 int vote_yescount;
48 int vote_nocount;
49 int vote_needed;
50 int vote_highlighted; // currently selected vote
51
52 int vote_active; // is there an active vote?
53 int vote_prev; // previous state of vote_active to check for a change
54 float vote_alpha;
55 float vote_change; // "time" when vote_active changed
56
57 float hud_panel_quickmenu;
58
59 vector mousepos;
60 vector panel_click_distance; // mouse cursor distance from the top left corner of the panel (saved only upon a click)
61 vector panel_click_resizeorigin; // coordinates for opposite point when resizing
62 float resizeCorner; // 1 = topleft, 2 = topright, 3 = bottomleft, 4 = bottomright
63 entity highlightedPanel;
64 float highlightedAction; // 0 = nothing, 1 = move, 2 = resize
65
66 const float BORDER_MULTIPLIER = 0.25;
67 float scoreboard_bottom;
68 int weapon_accuracy[Weapons_MAX];
69
70 int complain_weapon;
71 string complain_weapon_name;
72 float complain_weapon_type;
73 float complain_weapon_time;
74
75 int ps_primary, ps_secondary;
76 int ts_primary, ts_secondary;
77
78 int last_switchweapon;
79 int last_activeweapon;
80 float weapontime;
81 float weaponprevtime;
82
83 float teamnagger;
84
85 float hud_configure_checkcollisions;
86 float hud_configure_prev;
87 vector hud_configure_gridSize;
88 vector hud_configure_realGridSize;
89
90 int hudShiftState;
91 const int S_SHIFT = 1;
92 const int S_CTRL = 2;
93 const int S_ALT = 4;
94
95 float menu_enabled; // 1 showing the entire HUD, 2 showing only the clicked panel
96
97 float hud_fade_alpha;
98
99 string hud_skin_path;
100 string hud_skin_prev;
101
102 vector myteamcolors;
103
104 entity highlightedPanel_backup;
105 vector panel_pos_backup;
106 vector panel_size_backup;
107
108 vector panel_size_copied;
109
110 entity panel;
111 entityclass(HUDPanel);
112 class(HUDPanel) .string panel_name;
113 class(HUDPanel) .int panel_id;
114 class(HUDPanel) .vector current_panel_pos;
115 class(HUDPanel) .vector current_panel_size;
116 class(HUDPanel) .string current_panel_bg;
117 class(HUDPanel) .float current_panel_bg_alpha;
118 class(HUDPanel) .float current_panel_bg_border;
119 class(HUDPanel) .vector current_panel_bg_color;
120 class(HUDPanel) .float current_panel_bg_color_team;
121 class(HUDPanel) .float current_panel_bg_padding;
122 class(HUDPanel) .float current_panel_fg_alpha;
123 class(HUDPanel) .float update_time;
124 float panel_enabled;
125 vector panel_pos;
126 vector panel_size;
127 string panel_bg_str; // "_str" vars contain the raw value of the cvar, non-"_str" contains what hud.qc code should use
128 vector panel_bg_color;
129 string panel_bg_color_str;
130 float panel_bg_color_team;
131 string panel_bg_color_team_str;
132 float panel_fg_alpha;
133 float panel_bg_alpha;
134 string panel_bg_alpha_str;
135 float panel_bg_border;
136 string panel_bg_border_str;
137 float panel_bg_padding;
138 string panel_bg_padding_str;
139
140 class(HUDPanel) .void() panel_draw;
141
142 // chat panel can be reduced / moved while the mapvote is active
143 // let know the mapvote panel about chat pos and size
144 float chat_posy;
145 float chat_sizey;
146
147 float current_player;
148
149 float stringwidth_colors(string s, vector theSize);
150 float stringwidth_nocolors(string s, vector theSize);
151 float GetPlayerColorForce(int i);
152 int GetPlayerColor(int i);
153 string GetPlayerName(int i);
154 void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag);
155
156 .int panel_showflags;
157 const int PANEL_SHOW_NEVER    = 0x00;
158 const int PANEL_SHOW_MAINGAME = 0x01;
159 const int PANEL_SHOW_MINIGAME = 0x02;
160 const int PANEL_SHOW_MAPVOTE  = 0x04;
161 const int PANEL_SHOW_ALWAYS   = 0xff;
162 bool HUD_Panel_CheckFlags(int showflags);
163
164 .int panel_configflags;
165 const int PANEL_CONFIG_NO    = 0x00;
166 const int PANEL_CONFIG_MAIN  = 0x01;
167
168
169 // prev_* vars contain the health/armor at the previous FRAME
170 // set to -1 when player is dead or was not playing
171 int prev_health, prev_armor;
172 float health_damagetime, armor_damagetime;
173 int health_beforedamage, armor_beforedamage;
174 // old_p_* vars keep track of previous values when smoothing value changes of the progressbar
175 int old_p_health, old_p_armor;
176 float old_p_healthtime, old_p_armortime;
177 // prev_p_* vars contain the health/armor progressbar value at the previous FRAME
178 // set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
179 int prev_p_health, prev_p_armor;
180
181 void HUD_ItemsTime();
182
183 REGISTER_HUD_PANEL(WEAPONS,         HUD_Weapons,        weapons,        PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
184 REGISTER_HUD_PANEL(AMMO,            HUD_Ammo,           ammo,           PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
185 REGISTER_HUD_PANEL(POWERUPS,        HUD_Powerups,       powerups,       PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
186 REGISTER_HUD_PANEL(HEALTHARMOR,     HUD_HealthArmor,    healtharmor,    PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
187 REGISTER_HUD_PANEL(NOTIFY,          HUD_Notify,         notify,         PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS & ~PANEL_SHOW_MAPVOTE)
188 REGISTER_HUD_PANEL(TIMER,           HUD_Timer,          timer,          PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS & ~PANEL_SHOW_MAPVOTE)
189 REGISTER_HUD_PANEL(RADAR,           HUD_Radar,          radar,          PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
190 REGISTER_HUD_PANEL(SCORE,           HUD_Score,          score,          PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS & ~PANEL_SHOW_MAPVOTE)
191 REGISTER_HUD_PANEL(RACETIMER,       HUD_RaceTimer,      racetimer,      PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
192 REGISTER_HUD_PANEL(VOTE,            HUD_Vote,           vote,           PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS  )
193 REGISTER_HUD_PANEL(MODICONS,        HUD_ModIcons,       modicons,       PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
194 REGISTER_HUD_PANEL(PRESSEDKEYS,     HUD_PressedKeys,    pressedkeys,    PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
195 REGISTER_HUD_PANEL(CHAT,            HUD_Chat,           chat,           PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS  )
196 REGISTER_HUD_PANEL(ENGINEINFO,      HUD_EngineInfo,     engineinfo,     PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS  )
197 REGISTER_HUD_PANEL(INFOMESSAGES,    HUD_InfoMessages,   infomessages,   PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
198 REGISTER_HUD_PANEL(PHYSICS,         HUD_Physics,        physics,        PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
199 REGISTER_HUD_PANEL(CENTERPRINT,     HUD_CenterPrint,    centerprint,    PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
200 REGISTER_HUD_PANEL(MINIGAME_BOARD,  HUD_MinigameBoard,  minigameboard,  PANEL_CONFIG_NO  , PANEL_SHOW_MINIGAME)
201 REGISTER_HUD_PANEL(MINIGAME_STATUS, HUD_MinigameStatus, minigamestatus, PANEL_CONFIG_NO  , PANEL_SHOW_MINIGAME)
202 REGISTER_HUD_PANEL(MINIGAME_HELP,   HUD_MinigameHelp,   minigamehelp,   PANEL_CONFIG_NO  , PANEL_SHOW_MINIGAME)
203 REGISTER_HUD_PANEL(MINIGAME_MENU,   HUD_MinigameMenu,   minigamemenu,   PANEL_CONFIG_NO  , PANEL_SHOW_ALWAYS  )
204 REGISTER_HUD_PANEL(MAPVOTE,         MapVote_Draw,       mapvote,        PANEL_CONFIG_NO  , PANEL_SHOW_MAPVOTE )
205 REGISTER_HUD_PANEL(ITEMSTIME,       HUD_ItemsTime,      itemstime,      PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
206 REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
207 // always add new panels to the end of list
208
209 // Because calling lots of functions in QC apparently cuts fps in half on many machines:
210 // ----------------------
211 // MACRO HELL STARTS HERE
212 // ----------------------
213 // Little help for the poor people who have to make sense of this: Start from the bottom ;)
214
215 // Get value for panel.current_panel_bg: if "" fetch default, else use panel_bg_str
216 // comment on last line of macro: // we probably want to see a background in config mode at all times...
217 #define HUD_Panel_GetBg() do {                                                                                      \
218         string panel_bg;                                                                                                \
219         if (!autocvar__hud_configure && panel_bg_str == "0") {                                                          \
220                 panel_bg = "0";                                                                                             \
221         } else {                                                                                                        \
222                 if (panel_bg_str == "") {                                                                                   \
223                         panel_bg_str = autocvar_hud_panel_bg;                                                                   \
224                 }                                                                                                           \
225                 if (panel_bg_str == "0" && !autocvar__hud_configure) {                                                      \
226                         panel_bg = "0";                                                                                         \
227                 } else {                                                                                                    \
228                         if (panel_bg_str == "0" && autocvar__hud_configure)                                                     \
229                                 panel_bg_alpha_str = "0";                                                                           \
230                         panel_bg = strcat(hud_skin_path, "/", panel_bg_str);                                                    \
231                         if (precache_pic(panel_bg) == "") {                                                                     \
232                                 panel_bg = strcat(hud_skin_path, "/", "border_default");                                            \
233                                 if (precache_pic(panel_bg) == "") {                                                                 \
234                                         panel_bg = strcat("gfx/hud/default/", "border_default");                                        \
235                                 }                                                                                                   \
236                         }                                                                                                       \
237                 }                                                                                                           \
238         }                                                                                                               \
239         if (panel.current_panel_bg)                                                                                     \
240                 strunzone(panel.current_panel_bg);                                                                          \
241         panel.current_panel_bg = strzone(panel_bg);                                                                     \
242 } while(0)
243
244 // Get value for panel_bg_color: if "" fetch default, else use panel_bg_color. Convert pants, shirt or teamcolor into a vector.
245 #define HUD_Panel_GetColor() do {                                                                                   \
246         if ((teamplay) && panel_bg_color_team) {                                                                        \
247                 if (autocvar__hud_configure && myteam == NUM_SPECTATOR)                                                     \
248                         panel_bg_color = '1 0 0' * panel_bg_color_team;                                                         \
249                 else                                                                                                        \
250                         panel_bg_color = myteamcolors * panel_bg_color_team;                                                    \
251         } else if (autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && panel_bg_color_team) {          \
252                 panel_bg_color = '1 0 0' * panel_bg_color_team;                                                             \
253         } else {                                                                                                        \
254                 if (panel_bg_color_str == "") {                                                                             \
255                         panel_bg_color = autocvar_hud_panel_bg_color;                                                           \
256                 } else {                                                                                                    \
257                         if (panel_bg_color_str == "shirt") {                                                                    \
258                                 panel_bg_color = colormapPaletteColor(floor(stof(getplayerkeyvalue(current_player, "colors")) / 16), 0); \
259                         } else if (panel_bg_color_str == "pants") {                                                             \
260                                 panel_bg_color = colormapPaletteColor(stof(getplayerkeyvalue(current_player, "colors")) % 16, 1); \
261                         } else {                                                                                                \
262                                 panel_bg_color = stov(panel_bg_color_str);                                                          \
263                         }                                                                                                       \
264                 }                                                                                                           \
265         }                                                                                                               \
266 } while(0)
267
268 // Get value for panel_bg_color_team: if "" fetch default, else use panel_bg_color_team_str
269 #define HUD_Panel_GetColorTeam() do {                                                                               \
270         if (panel_bg_color_team_str == "") {                                                                            \
271                 panel_bg_color_team = autocvar_hud_panel_bg_color_team;                                                     \
272         } else {                                                                                                        \
273                 panel_bg_color_team = stof(panel_bg_color_team_str);                                                        \
274         }                                                                                                               \
275 } while(0)
276
277 // Get value for panel_bg_alpha: if "" fetch default, else use panel_bg_alpha. Also do various menu dialog fadeout/in checks, and minalpha checks
278 // comment on line 3 of macro: // do not set a minalpha cap when showing the config dialog for this panel
279 #define HUD_Panel_GetBgAlpha() do {                                                                                 \
280         if (panel_bg_alpha_str == "") {                                                                                 \
281                 panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);                                                     \
282         }                                                                                                               \
283         panel_bg_alpha = stof(panel_bg_alpha_str);                                                                      \
284         if (autocvar__hud_configure) {                                                                                  \
285                 if (!panel_enabled)                                                                                         \
286                         panel_bg_alpha = 0.25;                                                                                  \
287                 else if (menu_enabled == 2 && panel == highlightedPanel)                                                    \
288                         panel_bg_alpha = (1 - autocvar__menu_alpha) * max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha;\
289                 else                                                                                                        \
290                         panel_bg_alpha = max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha);                                \
291         }                                                                                                               \
292 } while(0)
293
294 // Get value for panel_fg_alpha. Also do various minalpha checks
295 // comment on line 2 of macro: // ALWAYS show disabled panels at 0.25 alpha when in config mode
296 #define HUD_Panel_GetFgAlpha() do {                                                                                 \
297         panel_fg_alpha = autocvar_hud_panel_fg_alpha;                                                                   \
298         if (autocvar__hud_configure && !panel_enabled)                                                                  \
299                 panel_fg_alpha = 0.25;                                                                                      \
300 } while(0)
301
302 // Get border. See comments above, it's similar.
303 #define HUD_Panel_GetBorder() do {                                                                                  \
304         if (panel_bg_border_str == "") {                                                                                \
305                 panel_bg_border = autocvar_hud_panel_bg_border;                                                             \
306         } else {                                                                                                        \
307                 panel_bg_border = stof(panel_bg_border_str);                                                                \
308         }                                                                                                               \
309 } while(0)
310
311 // Get padding. See comments above, it's similar.
312 // last line is a port of the old function, basically always make sure the panel contents are at least 5 pixels tall/wide, to disallow extreme padding values
313 #define HUD_Panel_GetPadding() do {                                                                                 \
314         if (panel_bg_padding_str == "") {                                                                               \
315                 panel_bg_padding = autocvar_hud_panel_bg_padding;                                                           \
316         } else {                                                                                                        \
317                 panel_bg_padding = stof(panel_bg_padding_str);                                                              \
318         }                                                                                                               \
319         panel_bg_padding = min(min(panel_size.x, panel_size.y)/2 - 5, panel_bg_padding);                                \
320 } while(0)
321
322 // return smoothly faded pos and size of given panel when a dialog is active
323 // don't center too wide panels, it doesn't work with different resolutions
324 #define HUD_Panel_UpdatePosSize_ForMenu() do { \
325         vector menu_enable_size = panel_size; \
326         float max_panel_width = 0.52 * vid_conwidth; \
327         if(panel_size.x > max_panel_width) \
328         { \
329                 menu_enable_size.x = max_panel_width; \
330                 menu_enable_size.y = panel_size.y * (menu_enable_size.x / panel_size.x); \
331         } \
332         vector menu_enable_pos = eX * (panel_bg_border + 0.5 * max_panel_width) + eY * 0.5 * vid_conheight - 0.5 * menu_enable_size; \
333         panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * menu_enable_pos; \
334         panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * menu_enable_size; \
335 } while(0)
336
337 // Scale the pos and size vectors to absolute coordinates
338 #define HUD_Panel_ScalePosSize() do {                                                                               \
339         panel_pos.x *= vid_conwidth;  panel_pos.y *= vid_conheight;                                                     \
340         panel_size.x *= vid_conwidth; panel_size.y *= vid_conheight;                                                    \
341 } while(0)
342
343 // NOTE: in hud_configure mode cvars must be reloaded every frame
344 #define HUD_Panel_UpdateCvars() do {                                                                                \
345         if (panel.update_time <= time) {                                                                                \
346                 if (autocvar__hud_configure) panel_enabled = cvar(strcat("hud_panel_", panel.panel_name));                  \
347                 panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos")));                              \
348                 panel_size = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_size")));                            \
349                 HUD_Panel_ScalePosSize();                                                                                   \
350                 panel_bg_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg"));                                  \
351                 panel_bg_color_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_color"));                      \
352                 panel_bg_color_team_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_color_team"));            \
353                 panel_bg_alpha_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_alpha"));                      \
354                 panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_border"));                    \
355                 panel_bg_padding_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_padding"));                  \
356                 HUD_Panel_GetBg();                                                                                          \
357                 if (panel.current_panel_bg != "0") {                                                                        \
358                         HUD_Panel_GetColorTeam();                                                                               \
359                         HUD_Panel_GetColor();                                                                                   \
360                         HUD_Panel_GetBgAlpha();                                                                                 \
361                         HUD_Panel_GetBorder();                                                                                  \
362                 }                                                                                                           \
363                 HUD_Panel_GetFgAlpha();                                                                                     \
364                 HUD_Panel_GetPadding();                                                                                     \
365                 panel.current_panel_bg_alpha = panel_bg_alpha;                                                              \
366                 panel.current_panel_fg_alpha = panel_fg_alpha;                                                              \
367                 if (menu_enabled == 2 && panel == highlightedPanel) {                                                       \
368                         HUD_Panel_UpdatePosSize_ForMenu();                                                                      \
369                 } else {                                                                                                    \
370                         panel_bg_alpha *= hud_fade_alpha;                                                                       \
371                         panel_fg_alpha *= hud_fade_alpha;                                                                       \
372                 }                                                                                                           \
373                 panel.current_panel_pos = panel_pos;                                                                        \
374                 panel.current_panel_size = panel_size;                                                                      \
375                 panel.current_panel_bg_border = panel_bg_border;                                                            \
376                 panel.current_panel_bg_color = panel_bg_color;                                                              \
377                 panel.current_panel_bg_color_team = panel_bg_color_team;                                                    \
378                 panel.current_panel_bg_padding = panel_bg_padding;                                                          \
379                 panel.update_time = (autocvar__hud_configure) ? time : time + autocvar_hud_panel_update_interval;           \
380         } else {                                                                                                        \
381                 panel_pos = panel.current_panel_pos;                                                                        \
382                 panel_size = panel.current_panel_size;                                                                      \
383                 panel_bg_alpha = panel.current_panel_bg_alpha * hud_fade_alpha;                                             \
384                 panel_bg_border = panel.current_panel_bg_border;                                                            \
385                 panel_bg_color = panel.current_panel_bg_color;                                                              \
386                 panel_bg_color_team = panel.current_panel_bg_color_team;                                                    \
387                 panel_bg_padding = panel.current_panel_bg_padding;                                                          \
388                 panel_fg_alpha = panel.current_panel_fg_alpha * hud_fade_alpha;                                             \
389         }                                                                                                               \
390 } while(0)
391
392 #define HUD_Panel_UpdatePosSize() do {                                                                              \
393         panel_enabled = cvar(strcat("hud_panel_", panel.panel_name));                                                   \
394         panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos")));                                  \
395         panel_size = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_size")));                                \
396         HUD_Panel_ScalePosSize();                                                                                       \
397         if (menu_enabled == 2 && panel == highlightedPanel) {                                                           \
398                 HUD_Panel_UpdatePosSize_ForMenu();                                                                          \
399         }                                                                                                               \
400         panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_border"));                        \
401         HUD_Panel_GetBorder();                                                                                          \
402 } while(0)
403
404 const int NOTIFY_MAX_ENTRIES = 10;
405 const float NOTIFY_ICON_MARGIN = 0.02;
406
407 int notify_index;
408 int notify_count;
409 float notify_times[NOTIFY_MAX_ENTRIES];
410 string notify_attackers[NOTIFY_MAX_ENTRIES];
411 string notify_victims[NOTIFY_MAX_ENTRIES];
412 string notify_icons[NOTIFY_MAX_ENTRIES];
413
414 void HUD_Notify_Push(string icon, string attacker, string victim);
415
416 var void HUD_ModIcons_GameType(vector pos, vector size);
417 void HUD_ModIcons_SetFunc();
418 #endif