]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 8112afb5320f0ae1a41188bd02b98e2bb1c8a26c..97f6271237356036fbe891e0317cab05b0cf8f78 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 7b74d2dd7fa56752889ee75f6abb3cdbb1e08115..8b5fc51533d19832701ff2d96f73f9ff82930886 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 dde4461821ee9feef7e501d25961931082a79028..987d166febc5fbf3de666a0db8596b5bfa8315ce 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 000ef8bcc9f45106d9c33e38c085c1e66653ebb3..112b1ad8dad31a6c828bc3fd66a958b7fbf5ec25 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 7c5c74130e41d8e7cf3dd27ade14b5748eef38bc..0de69a02d850a478906840ff353ed81902061059 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 82c43e2e27a0be796c16d9e008312715d3be540b..6325a8ab3c6651481938e9999f23ecc5f63aae5c 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 eb7d4787777c0435b67721dd874aff64a87592e7..8247f6a28c9f1b1c7d7b4dd3268bc301eee1ebcd 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 cfc192c845375f3f028f4a4683ab3a3e79291aef..226934edbd733126eeff1a54055ea471410f2e3f 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 0da1b69d2cb71e59a7a48687176f4e97c80ed7f0..5a6a137375c468abfa83e092565addda636393b0 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 acff23a281506392846aa0930d6abd43116f8666..bebf60c77ec06399a4a02d9d6e61b3cd7c65fe58 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 4ddc049ba167395173809af150f5cd88707525ac..6a2101fc777dbd0da522b070fdfa9b49dddf7af0 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 5796157ef9d4317b28b3d39244e707b40dd817dc..ae4f6c277fb3fcfcd51b6a52c05e4df74ef9b3c4 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 36ec4f7b8c2525c2712566410ae80be9977ab50f..fc78f3a80f4db48feb7e879058d42fd00d156f00 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 b8823e6296d4de67aed98f1f2da417aa00ff0381..0bc85a441db9d6e83570061748ba23efa7a05c9e 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 28b81fc51ffc9e85c917ff69f34e748bbc18c3a9..a4a4b687f9921ef430f086b472e464016c7ff0fa 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 8a4133e50ab798a42708012525c11be11da895f9..cb7b4c645c586d38fbd4eff1c675ca0432082d8a 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef MAPVOTING_H
 #define MAPVOTING_H
 
+#include "../common/constants.qh"
+
 int mv_num_maps;
 
 float mv_active;
index d74a24a320142d35e7da242c19f24586ca1e08fe..70ec94db4683167f83ecb7865edb9293db85ce3c 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 c376085e07aaea1aa3b105e90ec7f06942014d91..1eea25d8fcdd0d038c4ea46f7dddb464c1994823 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 6d2ddf87d5a431b3cf4c901b60881d868fb0e25b..25fc5da2942264695b26e02bdeffbb74365650a1 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 e1d85b3dd26776f46cffbf4f15140f6cf3756d90..74064c7ecbaf8802093a923dc2ad5498cd712e95 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 4f80c71d8f117c1baad11b787d832c40bab8987f..de177a533e5b5bb1024bb9a735470faef72ac0e8 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 c6d871807f2e7c190af068a4ff192b760d3de57b..9f0db018dd3fbe2139e3db8a3dd190bc1857ee04 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 c0326eb786a854bb2fe69655614752d7dcd67953..e1c5addb49f0474861188f571b5f0520c7a2e181 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 c6edf5040dbd1056b6f639fb4123bdcd0514ffe6..7fe0e49a7cadf4a86a7feb4020ea1cf1ea3bd109 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 4d4478ca15b9f33ea1ad8ff16b40815fb5dd3d49..0d7df029a433c2a9dc3c6bf99f9bf0bf9b3a1dba 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 662a673d7999f901922507b07bc2fe8b974564d3..989bca3aed718a9ffc31068763bf35d07a072f7d 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 1822acb5e467a2934b7c60aa80353d5c7d019636..88b4339fbf917c16cfbb68e1484abc8310e9ac34 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 42366687e9254c1f46f8db04a1b339455e7013a9..9fb1b38bfca1bbae35d600f1f53eff31b932a504 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 95692e87c706cc5ea8aa9030618a3ddd6024c3cc..93a7a8954356c526014e20aa55ac07a1103e79b8 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 0f19c90662bc13f4dc3c580a617185d9435af0bb..012f05ead8ce3231b96b23263ebe9668a10ac6f7 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 7e509e91ea8345d9b52914aa4414a50d66941f35..e8d3ddb4f75e5db4a7ea77f054af778627d48557 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 26e709320778a9892ae0493a7452d3a8d5d28257..0188dd7c8d61df5f4d105d601a9f5bb7f3dd19bc 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 113b14b37f7598d65c70607085dbeaadf84fdfe8..11b851f8a70e6b395f439f9acfd7e2fe9cd0e908 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 788dd871eed84f74e2050375211ef9eca122ee20..c26f42af42355ac724b55d0b19a61a3a31653353 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 1d306fede6d6ce8733529821d373a7e16a371a0f..e8a2311cde2acb665bfd52b59cead02f070683fc 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 a629de6078cb9306fad799d63237bef310467714..8003fd8b9b0d0b049741327152ac0af42939cfe2 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 0bb09b4e737a9eea3a87a2f20f9f65ff8bf7e6ea..02875f6eab9fa0ba920e4b25a4a22dd6856d035f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef GENERIC_H
 #define GENERIC_H
 
+#include "../constants.qh"
 #include "markup.qh"
 #include "rpn.qh"
 
index 17c5f89bcddf9968f07ddef29f0e0fadd99abc33..f464cdc32c5b8dce7efa1c7de08ce2ad78deaf79 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef COUNTING_H
 #define COUNTING_H
 
+#include "util.qh"
+
 // ===============================================
 //  Time processing and counting functions/macros
 // ===============================================
index fc7fdbb7845a4f42259d5704c4efba9b0edabc6a..134103b89f3f9b49ea014916403ea772452ebf4b 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 096c2e5ea43a864874c37b9ce437215f8ae95e88..72c5ea870dcb832692268b55e7b17079ad576d2b 100644 (file)
@@ -1,6 +1,6 @@
 #include "monsters.qh"
 
-#include "all.qh"
+#include "all.inc"
 
 // MONSTER PLUGIN SYSTEM
 entity monster_info[MON_MAXCOUNT];
index 6fa9dfaf71a095a69a5d0f143e090d3f4ac0d13e..4aa1f7ef4c0625e6d007c6da9e7a0b97dee9445f 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 505e2e2d541085369e74426b890bd9305f3fdc92..2b2aa857b806e9b7cd9efecb8da9b7017dcfb61e 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef NADES_H
 #define NADES_H
 
+#include "teams.qh"
+
 .float healer_lifetime;
 .float healer_radius;
 
index 1cb1adf51f368e9e97ad2d3b5afebc2cbb8595ee..dda68d7913e314afee190d9f47367975fa2b128e 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[@]