Make client includes order insensitive
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 1 May 2015 13:46:42 +0000 (23:46 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 1 May 2015 13:46:42 +0000 (23:46 +1000)
53 files changed:
qcsrc/client/announcer.qh [new file with mode: 0644]
qcsrc/client/casings.qc
qcsrc/client/casings.qh [new file with mode: 0644]
qcsrc/client/command/cl_cmd.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/csqcmodel_hooks.qh [new file with mode: 0644]
qcsrc/client/damage.qc
qcsrc/client/damage.qh
qcsrc/client/defs.qh
qcsrc/client/effects.qh [new file with mode: 0644]
qcsrc/client/gibs.qc
qcsrc/client/hook.qc
qcsrc/client/hook.qh [new file with mode: 0644]
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/hud_config.qc
qcsrc/client/hud_config.qh [new file with mode: 0644]
qcsrc/client/laser.qc
qcsrc/client/laser.qh [new file with mode: 0644]
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/client/mapvoting.qc
qcsrc/client/mapvoting.qh
qcsrc/client/miscfunctions.qc
qcsrc/client/modeleffects.qc
qcsrc/client/particles.qc
qcsrc/client/player_skeleton.qc
qcsrc/client/player_skeleton.qh
qcsrc/client/scoreboard.qc
qcsrc/client/scoreboard.qh
qcsrc/client/shownames.qc
qcsrc/client/shownames.qh
qcsrc/client/target_music.qc
qcsrc/client/teamradar.qc
qcsrc/client/tturrets.qc
qcsrc/client/tuba.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/client/vehicles/vehicles.qh
qcsrc/client/view.qc
qcsrc/client/wall.qc
qcsrc/client/waypointsprites.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/buffs.qh
qcsrc/common/command/generic.qh
qcsrc/common/counting.qh
qcsrc/common/mapinfo.qh
qcsrc/common/monsters/all.inc [new file with mode: 0644]
qcsrc/common/monsters/all.qh [deleted file]
qcsrc/common/monsters/monsters.qc
qcsrc/common/monsters/monsters.qh
qcsrc/common/nades.qh
qcsrc/common/notifications.qh
qcsrc/test/compilationunit.sh [new file with mode: 0755]

diff --git a/qcsrc/client/announcer.qh b/qcsrc/client/announcer.qh
new file mode 100644 (file)
index 0000000..620b845
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef ANNOUNCER_H
+#define ANNOUNCER_H
+
+void Announcer();
+
+#endif
index 8112afb..97f6271 100644 (file)
@@ -1,4 +1,8 @@
 #if defined(CSQC)
+       #include "autocvars.qh"
+       #include "../common/util.qh"
+       #include "defs.qh"
+       #include "main.qh"
        #include "movetypes.qh"
        #include "prandom.qh"
        #include "rubble.qh"
diff --git a/qcsrc/client/casings.qh b/qcsrc/client/casings.qh
new file mode 100644 (file)
index 0000000..dafe66a
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef CASINGS_H
+#define CASINGS_H
+
+void Casings_Precache();
+
+void Ent_Casing(float isNew);
+
+#endif
index 7b74d2d..8b5fc51 100644 (file)
@@ -3,8 +3,19 @@
 //  Last updated: December 28th, 2011
 // ==============================================
 
+#include "cl_cmd.qh"
+
+#include "../../common/mapinfo.qh"
 #include "../../common/command/generic.qh"
 #include "../../common/command/shared_defs.qh"
+#include "../autocvars.qh"
+#include "../defs.qh"
+#include "../hud.qh"
+#include "../hud_config.qh"
+#include "../main.qh"
+#include "../mapvoting.qh"
+#include "../miscfunctions.qh"
+#include "../scoreboard.qh"
 
 void DrawDebugModel()
 {
index dde4461..987d166 100644 (file)
@@ -1,13 +1,17 @@
 #if defined(CSQC)
+       #include "defs.qh"
        #include "gibs.qh"
        #include "miscfunctions.qh"
        #include "player_skeleton.qh"
        #include "sortlist.qh"
+       #include "main.qh"
 
+       #include "../client/autocvars.qh"
        #include "../client/weapons/projectile.qh"
 
        #include "../common/animdecide.qh"
        #include "../common/csqcmodel_settings.qh"
+       #include "../common/teams.qh"
 
        #include "../csqcmodellib/cl_model.qh"
        #include "../csqcmodellib/cl_player.qh"
diff --git a/qcsrc/client/csqcmodel_hooks.qh b/qcsrc/client/csqcmodel_hooks.qh
new file mode 100644 (file)
index 0000000..8995880
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef CSQCMODEL_HOOKS
+#define CSQCMODEL_HOOKS
+
+void CSQCPlayer_Precache();
+
+#endif
index 000ef8b..112b1ad 100644 (file)
@@ -1,19 +1,26 @@
 #if defined(CSQC)
        #include "../dpdefs/csprogsdefs.qh"
-       #include "defs.qh"
        #include "../common/constants.qh"
        #include "../common/util.qh"
+       #include "../common/deathtypes.qh"
        #include "../common/weapons/weapons.qh"
+       #include "vehicles/vehicles.qh"
        #include "autocvars.qh"
-       #include "../common/deathtypes.qh"
+       #include "defs.qh"
        #include "damage.qh"
+       #include "gibs.qh"
        #include "movetypes.qh"
        #include "prandom.qh"
-       #include "vehicles/vehicles.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
 
+.entity tag_entity;
+
+.float cnt;
+.int state;
+.bool isplayermodel;
+
 void DamageEffect_Think()
 {
        // if particle distribution is enabled, slow ticrate by total number of damages
index 7c5c741..0de69a0 100644 (file)
@@ -2,4 +2,7 @@
 #define DAMAGE_H
 
 .float total_damages; // number of effects which currently are attached to a player
+
+void Ent_DamageInfo(float isNew);
+
 #endif
index 82c43e2..6325a8a 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef DEFS_H
-#define DEFS_H
+#ifndef CLIENT_DEFS_H
+#define CLIENT_DEFS_H
 
 // Additional OPTIONAL Fields and Globals
 //float                intermission;
diff --git a/qcsrc/client/effects.qh b/qcsrc/client/effects.qh
new file mode 100644 (file)
index 0000000..0bebdb9
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef EFFECTS_H
+#define EFFECTS_H
+
+void Net_ReadArc();
+
+#endif
index eb7d478..8247f6a 100644 (file)
@@ -1,5 +1,19 @@
 #include "gibs.qh"
 
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "rubble.qh"
+#include "../common/constants.qh"
+#include "../common/util.qh"
+
+.float scale;
+.float alpha;
+.float cnt;
+.float gravity;
+
 void Gib_Delete()
 {
        remove(self);
index cfc192c..226934e 100644 (file)
@@ -1,6 +1,15 @@
+#include "hook.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
 #include "hud.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
 #include "noise.qh"
+#include "../common/teams.qh"
 #include "../warpzonelib/common.qh"
+#include "../warpzonelib/mathlib.qh"
+#include "../csqcmodellib/interpolate.qh"
 
 entityclass(Hook)
 class(Hook) .float HookType; // ENT_CLIENT_*
diff --git a/qcsrc/client/hook.qh b/qcsrc/client/hook.qh
new file mode 100644 (file)
index 0000000..8401dce
--- /dev/null
@@ -0,0 +1,9 @@
+#ifndef HOOK_H
+#define HOOK_H
+
+void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg);
+void Hook_Precache();
+
+void Ent_ReadHook(float bIsNew, float type);
+
+#endif
index 0da1b69..5a6a137 100644 (file)
@@ -1,10 +1,23 @@
+#include "hud.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hud_config.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
 #include "scoreboard.qh"
+#include "sortlist.qh"
 #include "teamradar.qh"
 #include "../common/buffs.qh"
+#include "../common/constants.qh"
 #include "../common/counting.qh"
+#include "../common/deathtypes.qh"
 #include "../common/mapinfo.qh"
 #include "../common/nades.qh"
+#include "../common/stats.qh"
+#include "../csqcmodellib/cl_player.qh"
 #include "../server/t_items.qh"
+#include "../warpzonelib/mathlib.qh"
 
 /*
 ==================
@@ -1485,17 +1498,6 @@ void HUD_Powerups(void)
 // Health/armor (#3)
 //
 
-// prev_* vars contain the health/armor at the previous FRAME
-// set to -1 when player is dead or was not playing
-int prev_health, prev_armor;
-float health_damagetime, armor_damagetime;
-int health_beforedamage, armor_beforedamage;
-// old_p_* vars keep track of previous values when smoothing value changes of the progressbar
-int old_p_health, old_p_armor;
-float old_p_healthtime, old_p_armortime;
-// prev_p_* vars contain the health/armor progressbar value at the previous FRAME
-// set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
-int prev_p_health, prev_p_armor;
 
 void HUD_HealthArmor(void)
 {
@@ -2624,15 +2626,6 @@ void HUD_RaceTimer (void)
 
 // Vote window (#9)
 //
-int vote_yescount;
-int vote_nocount;
-int vote_needed;
-int vote_highlighted; // currently selected vote
-
-int vote_active; // is there an active vote?
-int vote_prev; // previous state of vote_active to check for a change
-float vote_alpha;
-float vote_change; // "time" when vote_active changed
 
 void HUD_Vote(void)
 {
index acff23a..bebf60c 100644 (file)
@@ -12,6 +12,19 @@ int HUD_PANEL_LAST;
 int panel_order[HUD_PANEL_MAX];
 string hud_panelorder_prev;
 
+void HUD_Reset (void);
+void HUD_Main (void);
+
+int vote_yescount;
+int vote_nocount;
+int vote_needed;
+int vote_highlighted; // currently selected vote
+
+int vote_active; // is there an active vote?
+int vote_prev; // previous state of vote_active to check for a change
+float vote_alpha;
+float vote_change; // "time" when vote_active changed
+
 float hud_draw_maximized;
 float hud_panel_radar_maximized;
 float chat_panel_modified;
@@ -104,6 +117,25 @@ float current_player;
 
 float GetPlayerColorForce(int i);
 
+float stringwidth_colors(string s, vector theSize);
+int GetPlayerColor(int i);
+string GetPlayerName(int i);
+float stringwidth_nocolors(string s, vector theSize);
+void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag);
+
+
+// prev_* vars contain the health/armor at the previous FRAME
+// set to -1 when player is dead or was not playing
+int prev_health, prev_armor;
+float health_damagetime, armor_damagetime;
+int health_beforedamage, armor_beforedamage;
+// old_p_* vars keep track of previous values when smoothing value changes of the progressbar
+int old_p_health, old_p_armor;
+float old_p_healthtime, old_p_armortime;
+// prev_p_* vars contain the health/armor progressbar value at the previous FRAME
+// set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
+int prev_p_health, prev_p_armor;
+
 
 #define HUD_PANELS(HUD_PANEL)                                                                                                                                                                          \
        HUD_PANEL(WEAPONS      , HUD_Weapons      , weapons)                                                                                                                    \
index 4ddc049..6a2101f 100644 (file)
@@ -1,6 +1,7 @@
 #if defined(CSQC)
        #include "../dpdefs/csprogsdefs.qh"
        #include "defs.qh"
+       #include "miscfunctions.qh"
        #include "../dpdefs/keycodes.qh"
        #include "../common/constants.qh"
        #include "autocvars.qh"
diff --git a/qcsrc/client/hud_config.qh b/qcsrc/client/hud_config.qh
new file mode 100644 (file)
index 0000000..cc1d4d5
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef HUD_CONFIG_H
+#define HUD_CONFIG_H
+
+void HUD_Panel_ExportCfg(string cfgname);
+
+void HUD_Panel_Mouse();
+
+void HUD_Configure_Frame();
+
+void HUD_Configure_PostDraw();
+
+float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary);
+
+#endif
index 5796157..ae4f6c2 100644 (file)
@@ -2,6 +2,7 @@
        #include "../dpdefs/csprogsdefs.qh"
        #include "../common/buffs.qh"
        #include "../csqcmodellib/interpolate.qh"
+       #include "hook.qh"
        #include "main.qh"
        #include "../csqcmodellib/cl_model.qh"
 #elif defined(MENUQC)
diff --git a/qcsrc/client/laser.qh b/qcsrc/client/laser.qh
new file mode 100644 (file)
index 0000000..86210ee
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef LASER_H
+#define LASER_H
+
+void Ent_Laser();
+
+#endif
index 36ec4f7..fc78f3a 100644 (file)
@@ -1,21 +1,50 @@
+#include "main.qh"
+
+#include "casings.qh"
+#include "csqcmodel_hooks.qh"
+#include "damage.qh"
+#include "defs.qh"
+#include "effects.qh"
+#include "gibs.qh"
+#include "hud.qh"
+#include "hud_config.qh"
+#include "hook.qh"
+#include "laser.qh"
 #include "mapvoting.qh"
 #include "modeleffects.qh"
 #include "particles.qh"
 #include "scoreboard.qh"
 #include "shownames.qh"
+#include "sortlist.qh"
 #include "target_music.qh"
 #include "tturrets.qh"
 #include "tuba.qh"
 #include "wall.qh"
 #include "waypointsprites.qh"
+#include "miscfunctions.qh"
+#include "prandom.qh"
 
 #include "vehicles/vehicles.qh"
 
+#include "weapons/projectile.qh"
+
 #include "../server/vehicles/bumblebee.qh"
+#include "../server/t_items.qh"
 
+#include "../common/buffs.qh"
+#include "../common/deathtypes.qh"
+#include "../common/mapinfo.qh"
+#include "../common/notifications.qh"
 #include "../common/net_notice.qh"
+#include "../common/stats.qh"
+#include "../common/teams.qh"
 
+#include "../common/weapons/weapons.qh"
 #include "../common/monsters/monsters.qh"
+#include "../common/nades.qh"
+
+#include "../csqcmodellib/cl_model.qh"
+#include "../csqcmodellib/interpolate.qh"
 
 #include "../warpzonelib/client.qh"
 
index b8823e6..0bc85a4 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MAIN_H
 #define MAIN_H
 
+#include "../common/constants.qh"
+
 // --------------------------------------------------------------------------
 // MENU Functionality
 
@@ -106,6 +108,8 @@ float current_viewzoom;
 float zoomin_effect;
 float warmup_stage;
 
+void Fog_Force();
+
 string getcommandkey(string text, string command);
 
 string vote_called_vote;
index 28b81fc..a4a4b68 100644 (file)
@@ -1,6 +1,15 @@
 #include "mapvoting.qh"
+#include "hud.qh"
+#include "../dpdefs/keycodes.qh"
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "../common/mapinfo.qh"
+#include "miscfunctions.qh"
 #include "scoreboard.qh"
 
+#include "../common/util.qh"
+
 string MapVote_FormatMapItem(int id, string map, float _count, float maxwidth, vector fontsize)
 {
        string pre, post;
index 8a4133e..cb7b4c6 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MAPVOTING_H
 #define MAPVOTING_H
 
+#include "../common/constants.qh"
+
 int mv_num_maps;
 
 float mv_active;
index d74a24a..70ec94d 100644 (file)
@@ -1,8 +1,16 @@
 #include "miscfunctions.qh"
 
+#include "../common/teams.qh"
 #include "../common/urllib.qh"
-
+#include "../common/util.qh"
 #include "../common/command/generic.qh"
+#include "../csqcmodellib/cl_model.qh"
+#include "../warpzonelib/mathlib.qh"
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "main.qh"
+#include "sortlist.qh"
 
 void AuditLists()
 {
index c376085..1eea25d 100644 (file)
@@ -1,5 +1,12 @@
 #include "modeleffects.qh"
 
+#include "defs.qh"
+#include "main.qh"
+
+.float cnt;
+.float scale;
+.float alpha;
+
 void ModelEffect_Draw()
 {
        self.angles = self.angles + frametime * self.avelocity;
index 6d2ddf8..25fc5da 100644 (file)
@@ -1,5 +1,12 @@
 #include "particles.qh"
 
+#include "../common/util.qh"
+#include "autocvars.qh"
+#include "bgmscript.qh"
+#include "main.qh"
+#include "../common/stats.qh"
+#include "../warpzonelib/common.qh"
+
 void Draw_PointParticles()
 {
        float n, i, fail;
index e1d85b3..74064c7 100644 (file)
@@ -1,5 +1,6 @@
 #include "player_skeleton.qh"
 
+#include "../common/csqcmodel_settings.qh"
 #include "../warpzonelib/anglestransform.qh"
 
 class(Skeleton) .float skeleton_info_modelindex;
index 4f80c71..de177a5 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef PLAYER_SKELETON
 #define PLAYER_SKELETON
 
+#include "../common/util.qh"
+
 void free_skeleton_from_frames(entity e);
 void skeleton_from_frames(entity e, float is_dead);
 void skeleton_loadinfo(entity e);
index c6d8718..9f0db01 100644 (file)
@@ -1,5 +1,18 @@
 #include "scoreboard.qh"
 
+#include "autocvars.qh"
+#include "miscfunctions.qh"
+#include "../common/constants.qh"
+#include "../common/counting.qh"
+#include "../common/mapinfo.qh"
+#include "../common/stats.qh"
+#include "../common/teams.qh"
+#include "../common/util.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "main.qh"
+#include "sortlist.qh"
+
 float scoreboard_alpha_bg;
 float scoreboard_alpha_fg;
 float scoreboard_highlight;
index c0326eb..e1c5add 100644 (file)
@@ -7,6 +7,7 @@ float scoreboard_active;
 float scoreboard_fade_alpha;
 
 void Cmd_HUD_SetFields(float argc);
+void HUD_DrawScoreboard();
 void HUD_InitScores();
 void HUD_UpdatePlayerPos(entity pl);
 void HUD_UpdateTeamPos(entity Team);
index c6edf50..7fe0e49 100644 (file)
@@ -9,6 +9,8 @@
        #include "main.qh"
        #include "../csqcmodellib/cl_model.qh"
        #include "shownames.qh"
+       #include "hud.qh"
+       #include "miscfunctions.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
index 4d4478c..0d7df02 100644 (file)
@@ -7,4 +7,7 @@ class(ShowNames) .float armorvalue;
 class(ShowNames) .float sameteam;
 class(ShowNames) .float fadedelay;
 class(ShowNames) .float pointtime;
+
+void Draw_ShowNames_All();
+
 #endif
index 662a673..989bca3 100644 (file)
@@ -1,5 +1,20 @@
 #include "target_music.qh"
 
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "../common/util.qh"
+#include "../common/constants.qh"
+#include "../warpzonelib/common.qh"
+
+.string noise;
+.float cnt;
+.float count;
+.float fade_time;
+.float fade_rate;
+.float lifetime;
+.float volume;
+
 void TargetMusic_Advance()
 {
        // run AFTER all the thinks!
index 1822acb..88b4339 100644 (file)
@@ -1,5 +1,12 @@
 #if defined(CSQC)
+       #include "autocvars.qh"
+       #include "defs.qh"
+       #include "hud.qh"
+       #include "main.qh"
+       #include "miscfunctions.qh"
        #include "teamradar.qh"
+       #include "../common/util.qh"
+       #include "../csqcmodellib/interpolate.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
 #endif
index 4236668..9fb1b38 100644 (file)
@@ -1,7 +1,24 @@
 #include "tturrets.qh"
+
+#include "autocvars.qh"
+#include "defs.qh"
+#include "main.qh"
+#include "hud.qh"
+#include "miscfunctions.qh"
 #include "waypointsprites.qh"
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "teamradar.qh"
 
+#include "../common/teams.qh"
 #include "../server/movelib.qh"
+#include "../warpzonelib/anglestransform.qh"
+#include "../warpzonelib/mathlib.qh"
+
+.vector colormod;
+.float cnt;
+.float alpha;
+.float gravity;
 
 string tid2info_base;
 string tid2info_head;
index 95692e8..93a7a89 100644 (file)
@@ -1,5 +1,11 @@
 #include "tuba.qh"
 
+#include "autocvars.qh"
+#include "main.qh"
+#include "../common/constants.qh"
+#include "../common/util.qh"
+#include "../warpzonelib/mathlib.qh"
+
 #define TUBA_STARTNOTE(i, n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
 
 const int TUBA_MIN = -18;
index 0f19c90..012f05e 100644 (file)
@@ -1,20 +1,21 @@
-#if defined(CSQC)
-    #include "../../dpdefs/csprogsdefs.qh"
-    #include "../defs.qh"
-    #include "../../common/constants.qh"
-    #include "../../common/stats.qh"
-    #include "../../common/util.qh"
-    #include "../../common/buffs.qh"
-    #include "../autocvars.qh"
-    #include "../movetypes.qh"
-    #include "../prandom.qh"
-    #include "../main.qh"
-    #include "vehicles.qh"
-    #include "../../csqcmodellib/cl_model.qh"
-    #include "../../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "../../dpdefs/csprogsdefs.qh"
+#include "../../common/constants.qh"
+#include "../../common/stats.qh"
+#include "../../common/util.qh"
+#include "../../common/buffs.qh"
+#include "../../csqcmodellib/cl_model.qh"
+#include "../../server/t_items.qh"
+#include "../defs.qh"
+#include "../miscfunctions.qh"
+#include "../movetypes.qh"
+#include "../scoreboard.qh"
+#include "../autocvars.qh"
+#include "../movetypes.qh"
+#include "../prandom.qh"
+#include "../main.qh"
+#include "vehicles.qh"
+
+.float cnt;
 
 const string hud_bg = "gfx/vehicles/frame.tga";
 const string hud_sh = "gfx/vehicles/vh-shield.tga";
@@ -51,11 +52,7 @@ const string raptor_bomb = "gfx/vehicles/raptor_bombs.tga";
 const string raptor_drop = "gfx/vehicles/axh-dropcross.tga";
 string raptor_xhair;
 
-void CSQC_WAKIZASHI_HUD();
-void CSQC_SPIDER_HUD();
-void CSQC_RAPTOR_HUD();
-void CSQC_BUMBLE_HUD();
-void CSQC_BUMBLE_GUN_HUD();
+
 
 const int MAX_AXH = 4;
 entity AuxiliaryXhair[MAX_AXH];
index 7e509e9..e8d3ddb 100644 (file)
@@ -6,4 +6,11 @@ void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang);
 void Vehicles_Precache();
 void Net_AuXair2(bool bIsNew);
 void Net_VehicleSetup();
+
+void CSQC_WAKIZASHI_HUD();
+void CSQC_SPIDER_HUD();
+void CSQC_RAPTOR_HUD();
+void CSQC_BUMBLE_HUD();
+void CSQC_BUMBLE_GUN_HUD();
+
 #endif
index 26e7093..0188dd7 100644 (file)
        #include "../common/weapons/weapons.qh"
        #include "../common/mapinfo.qh"
        #include "autocvars.qh"
+       #include "announcer.qh"
        #include "hud.qh"
+       #include "hud_config.qh"
+       #include "hook.qh"
+       #include "mapvoting.qh"
+       #include "miscfunctions.qh"
        #include "scoreboard.qh"
+       #include "shownames.qh"
+       #include "target_music.qh"
        #include "noise.qh"
        #include "main.qh"
+       #include "waypointsprites.qh"
+       #include "vehicles/vehicles.qh"
        #include "../csqcmodellib/cl_player.qh"
 #elif defined(MENUQC)
 #elif defined(SVQC)
index 113b14b..11b851f 100644 (file)
@@ -1,5 +1,15 @@
 #include "wall.qh"
 
+#include "autocvars.qh"
+#include "bgmscript.qh"
+#include "main.qh"
+#include "../common/util.qh"
+#include "../csqcmodellib/interpolate.qh"
+
+.float alpha;
+.float scale;
+.vector movedir;
+
 void Ent_Wall_Draw()
 {
        float f;
index 788dd87..c26f42a 100644 (file)
@@ -1,5 +1,20 @@
 #include "waypointsprites.qh"
 
+#include "autocvars.qh"
+#include "defs.qh"
+#include "hud.qh"
+#include "main.qh"
+#include "miscfunctions.qh"
+#include "teamradar.qh"
+#include "../common/buffs.qh"
+#include "../common/constants.qh"
+#include "../common/teams.qh"
+#include "../common/weapons/weapons.qh"
+#include "../csqcmodellib/interpolate.qh"
+#include "../warpzonelib/mathlib.qh"
+
+.float alpha;
+
 void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, vector rgb, float a, float f)
 {
        vector v1, v2, v3, v4;
index 1d306fe..e8a2311 100644 (file)
@@ -1,5 +1,18 @@
+#include "../../common/constants.qh"
+#include "../../common/nades.qh"
+#include "../../common/util.qh"
+#include "../../csqcmodellib/interpolate.qh"
+#include "../../warpzonelib/anglestransform.qh"
+#include "../autocvars.qh"
+#include "../defs.qh"
+#include "../main.qh"
+#include "../movetypes.qh"
 #include "projectile.qh"
 
+.float alpha;
+.float scale;
+.vector colormod;
+
 void SUB_Stop()
 {
        self.move_velocity = self.move_avelocity = '0 0 0';
index a629de6..8003fd8 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef BUFFS_H
 #define BUFFS_H
 
+#include "util.qh"
+
 entity Buff_Type_first;
 entity Buff_Type_last;
 .entity enemy; // internal next pointer
index 0bb09b4..02875f6 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef GENERIC_H
 #define GENERIC_H
 
+#include "../constants.qh"
 #include "markup.qh"
 #include "rpn.qh"
 
index 17c5f89..f464cdc 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef COUNTING_H
 #define COUNTING_H
 
+#include "util.qh"
+
 // ===============================================
 //  Time processing and counting functions/macros
 // ===============================================
index fc7fdbb..134103b 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MAPINFO_H
 #define MAPINFO_H
 
+#include "util.qh"
+
 int MAPINFO_TYPE_ALL;
 entity MapInfo_Type_first;
 entity MapInfo_Type_last;
diff --git a/qcsrc/common/monsters/all.inc b/qcsrc/common/monsters/all.inc
new file mode 100644 (file)
index 0000000..d30f298
--- /dev/null
@@ -0,0 +1,5 @@
+#include "monster/zombie.qc"
+#include "monster/spider.qc"
+#include "monster/mage.qc"
+#include "monster/wyvern.qc"
+#include "monster/shambler.qc"
diff --git a/qcsrc/common/monsters/all.qh b/qcsrc/common/monsters/all.qh
deleted file mode 100644 (file)
index c79a4e6..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// TODO: include once
-//#ifndef MONSTERS_ALL_H
-//#define MONSTERS_ALL_H
-
-#include "monster/zombie.qc"
-#include "monster/spider.qc"
-#include "monster/mage.qc"
-#include "monster/wyvern.qc"
-#include "monster/shambler.qc"
-
-//#endif
index 096c2e5..72c5ea8 100644 (file)
@@ -1,6 +1,6 @@
 #include "monsters.qh"
 
-#include "all.qh"
+#include "all.inc"
 
 // MONSTER PLUGIN SYSTEM
 entity monster_info[MON_MAXCOUNT];
index 6fa9dfa..4aa1f7e 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MONSTERS_H
 #define MONSTERS_H
 
+#include "../util.qh"
+
 // monster requests
 const int MR_SETUP = 1; // (SERVER) setup monster data
 const int MR_THINK = 2; // (SERVER) logic to run every frame
@@ -64,7 +66,7 @@ int MON_LAST;
        REGISTER_MONSTER_2(MON_##id,func,monsterflags,min_s,max_s,modelname,shortname,mname)
 #endif
 
-#include "all.qh"
+#include "all.inc"
 
 #undef REGISTER_MONSTER
 ACCUMULATE_FUNCTION(RegisterMonsters, register_monsters_done);
index 505e2e2..2b2aa85 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef NADES_H
 #define NADES_H
 
+#include "teams.qh"
+
 .float healer_lifetime;
 .float healer_radius;
 
index 1cb1adf..dda68d7 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef NOTIFICATIONS_H
 #define NOTIFICATIONS_H
 
+#include "autocvars.qh"
 #include "constants.qh"
 #include "teams.qh"
+#include "util.qh"
 
 // ================================================
 //  Unified notification system, written by Samual
diff --git a/qcsrc/test/compilationunit.sh b/qcsrc/test/compilationunit.sh
new file mode 100755 (executable)
index 0000000..b976a4d
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -eu
+cd "$(dirname "$0")"
+cd ..
+
+export QCC=../../../gmqcc/gmqcc
+
+function check() {
+  declare -l base="$1"
+  declare -la predefs=("${!2}")
+  find "$base" -type f -name '*.qc' -print0 | while IFS= read -r -d '' file; do
+    echo "$file"
+    ${QCC} -std=gmqcc -fftepp ${predefs[@]} "$file" >/dev/null
+  done
+}
+
+# TODO: `sort -V` all the includes
+
+clientdefs=("-DCSQC" "common/util-pre.qh" "dpdefs/csprogsdefs.qh")
+check client clientdefs[@]