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