]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/main.qh
Merge branch 'master' into TimePath/scoreboard_elo
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qh
index 48f7621879e63ace51b83a5904b4db03aebfdede..ab3758ee8531a2119c555600eb9f7110f5258f99 100644 (file)
@@ -1,18 +1,11 @@
-#ifndef CLIENT_MAIN_H
-#define CLIENT_MAIN_H
+#pragma once
 
-#include "../common/constants.qh"
+#include <common/constants.qh>
+#include <common/weapons/all.qh>
 
 // --------------------------------------------------------------------------
 // MENU Functionality
 
-const float DATABUF_PING = 0;
-#define DATABUF_CAPTURES (1*maxclients)
-#define DATABUF_DEATHS (2*maxclients)
-#define DATABUF_RETURNS (3*maxclients)
-
-#define DATABUF_NEXT (5*maxclients)
-
 // --------------------------------------------------------------------------
 // Onslaught
 
@@ -37,39 +30,23 @@ float gametype;
 
 float FONT_USER = 8;
 
-// --------------------------------------------------------------------------
-// Scoreboard stuff
-
-const int MAX_HUD_FIELDS = 16;
 
-const int SP_END = -1;
+vector OFFSET_CURSOR = '0 0 0';
+vector SIZE_CURSOR = '32 32 0';
+void draw_cursor(vector pos, vector ofs, string img, vector col, float a);
+void draw_cursor_normal(vector pos, vector col, float a);
+void LoadMenuSkinValues();
 
-const int SP_PING = -2;
-const int SP_NAME = -3;
-const int SP_KDRATIO = -4;
-const int SP_CLRATIO = -5;
-const int SP_PL = -6;
-const int SP_FRAGS = -7;
-const int SP_SUM = -8;
+// --------------------------------------------------------------------------
+// Scoreboard stuff
 
-const int SP_SEPARATOR = -100;
+const int MAX_HUD_FIELDS = MAX_SCORE;
 
-float hud_field[MAX_HUD_FIELDS + 1];
+PlayerScoreField hud_field[MAX_HUD_FIELDS + 1];
 float hud_size[MAX_HUD_FIELDS + 1];
 string hud_title[MAX_HUD_FIELDS + 1];
 int hud_num_fields;
 
-string scores_label[MAX_SCORE];
-int scores_flags[MAX_SCORE];
-string teamscores_label[MAX_SCORE];
-int teamscores_flags[MAX_SCORE];
-.int scores[MAX_SCORE];
-.float teamscores[MAX_TEAMSCORE];
-
-#define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
-#define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
-
-
 vector hud_fontsize;
 
 float RANKINGS_RECEIVED_CNT;
@@ -86,17 +63,17 @@ entity teamslots[17];    // 17 teams (including "spectator team")
 
 .void(entity) draw;
 .void(entity) draw2d;
-.void() entremove;
+.void(entity) entremove;
 float drawframetime;
 vector view_origin, view_forward, view_right, view_up;
 
-float button_zoom;
-float spectatorbutton_zoom;
-float button_attack2;
+bool button_zoom;
+bool spectatorbutton_zoom;
+bool button_attack2;
 
-int activeweapon;
-int switchingweapon;
-#define switchweapon STAT(SWITCHWEAPON)
+Weapon activeweapon;
+Weapon switchingweapon;
+Weapon switchweapon;
 float current_viewzoom;
 float zoomin_effect;
 float warmup_stage;
@@ -122,6 +99,7 @@ float camera_roll;
 vector camera_direction;
 
 void centerprint_hud(string strMessage);
+void centerprint_kill(float id);
 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
 
 const float ALPHA_MIN_VISIBLE = 0.003;
@@ -135,17 +113,9 @@ const int HOOK_END =      2;
 
 .float ping, ping_packetloss, ping_movementloss;
 
-float g_balance_mortar_bouncefactor;
-float g_balance_mortar_bouncestop;
-float g_balance_electro_secondary_bouncefactor;
-float g_balance_electro_secondary_bouncestop;
 float g_trueaim_minrange;
 
-entity entcs_receiver[255]; // 255 is the engine limit on maxclients
-
 float hud;
 float view_quality;
 int framecount;
 .float health;
-
-#endif