]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/hud.qh
Merge branch 'terencehill/vec2_optimizations' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / hud.qh
index 58e6a1b7d8bfe56db29384455cdca7db4df0fb7b..467a5b33b9f5c23f67ea80dc46b8595c8074629d 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <common/weapons/_all.qh>
 
+void Hud_Dynamic_Frame();
+
 bool HUD_Radar_Clickable();
 void HUD_Radar_Mouse();
 
@@ -48,9 +50,9 @@ float HUD_Radar_InputEvent(float bInputType, float nPrimary, float nSecondary);
 void HUD_Radar_Hide_Maximized();
 
 float HUD_GetRowCount(int item_count, vector size, float item_aspect);
-vector HUD_Get_Num_Color (float x, float maxvalue);
-void DrawNumIcon(vector myPos, vector mySize, float x, string icon, bool vertical, bool icon_right_align, vector color, float theAlpha);
-void DrawNumIcon_expanding(vector myPos, vector mySize, float x, string icon, bool vertical, int icon_right_align, vector color, float theAlpha, float fadelerp);
+vector HUD_Get_Num_Color (float hp, float maxvalue);
+void DrawNumIcon(vector myPos, vector mySize, float theTime, string icon, bool vertical, bool icon_right_align, vector color, float theAlpha);
+void DrawNumIcon_expanding(vector myPos, vector mySize, float theTime, string icon, bool vertical, int icon_right_align, vector color, float theAlpha, float fadelerp);
 void HUD_Panel_DrawHighlight(vector pos, vector mySize, vector color, float theAlpha, int drawflag);
 vector HUD_GetTableSize_BestItemAR(int item_count, vector psize, float item_aspect);
 
@@ -167,9 +169,9 @@ vector cl_followmodel_ofs;
 float cl_followmodel_time;
 
 vector hud_scale;
-vector hud_scale_current;
+vector hud_scale_current = '1 1 0';
 vector hud_shift;
-vector hud_shift_current;
+vector hud_shift_current = '0 0 0';
 vector hud_scale_center;
 
 float stringwidth_colors(string s, vector theSize);
@@ -354,7 +356,7 @@ REGISTER_HUD_PANEL(SCOREBOARD,      Scoreboard_Draw,    scoreboard,     PANEL_CO
                new_size.x = max_panel_width; \
                new_size.y = panel_size.y * (new_size.x / panel_size.x); \
        } \
-       vector new_pos = eX * (panel_bg_border + 0.5 * max_panel_width) + eY * 0.5 * vid_conheight - 0.5 * new_size; \
+       vector new_pos = vec2(panel_bg_border + 0.5 * max_panel_width, 0.5 * vid_conheight) - 0.5 * new_size; \
        panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * new_pos; \
        panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * new_size; \
 } MACRO_END