Cleanup #includes
authorTimePath <andrew.hardaker1995@gmail.com>
Mon, 15 Aug 2016 12:03:17 +0000 (22:03 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 20 Aug 2016 06:13:07 +0000 (16:13 +1000)
156 files changed:
qcsrc/client/_all.inc [new file with mode: 0644]
qcsrc/client/_all.qh
qcsrc/client/commands/_all.inc [new file with mode: 0644]
qcsrc/client/commands/_all.qh [new file with mode: 0644]
qcsrc/client/commands/_mod.inc
qcsrc/client/commands/_mod.qh
qcsrc/client/commands/all.qc [deleted file]
qcsrc/client/commands/all.qh [deleted file]
qcsrc/client/commands/cl_cmd.qc
qcsrc/client/hud/_all.inc [new file with mode: 0644]
qcsrc/client/hud/_all.qh [new file with mode: 0644]
qcsrc/client/hud/_mod.inc
qcsrc/client/hud/_mod.qh
qcsrc/client/hud/all.inc [deleted file]
qcsrc/client/hud/all.qh [deleted file]
qcsrc/client/hud/hud.qc
qcsrc/client/hud/panel.qc [new file with mode: 0644]
qcsrc/client/hud/panel/_all.inc [new file with mode: 0644]
qcsrc/client/hud/panel/_all.qh [new file with mode: 0644]
qcsrc/client/hud/panel/_mod.inc
qcsrc/client/hud/panel/_mod.qh
qcsrc/client/hud/panel/ammo.qh
qcsrc/client/hud/panel/centerprint.qh
qcsrc/client/hud/panel/powerups.qh
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/client/main.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/mutators/_all.inc [new file with mode: 0644]
qcsrc/client/mutators/_all.qh [new file with mode: 0644]
qcsrc/client/mutators/_mod.inc
qcsrc/client/mutators/_mod.qh
qcsrc/client/mutators/events.qc [new file with mode: 0644]
qcsrc/client/progs.inc
qcsrc/client/shownames.qc
qcsrc/client/teamradar.qc
qcsrc/client/view.qc
qcsrc/client/weapons/_all.inc [new file with mode: 0644]
qcsrc/client/weapons/_all.qh [new file with mode: 0644]
qcsrc/common/_all.inc
qcsrc/common/command/_all.inc [new file with mode: 0644]
qcsrc/common/command/_all.qh [new file with mode: 0644]
qcsrc/common/command/_mod.inc
qcsrc/common/command/_mod.qh
qcsrc/common/command/all.qc [deleted file]
qcsrc/common/command/all.qh [deleted file]
qcsrc/common/command/generic.qc
qcsrc/common/command/reg.qc [new file with mode: 0644]
qcsrc/common/command/reg.qh [new file with mode: 0644]
qcsrc/common/gamemodes/_all.inc [new file with mode: 0644]
qcsrc/common/gamemodes/_all.qh [new file with mode: 0644]
qcsrc/common/items/_all.inc [new file with mode: 0644]
qcsrc/common/items/_all.qh [new file with mode: 0644]
qcsrc/common/items/all.qc
qcsrc/common/items/all.qh
qcsrc/common/items/item/_all.inc [new file with mode: 0644]
qcsrc/common/items/item/_all.qh [new file with mode: 0644]
qcsrc/common/monsters/all.qc
qcsrc/common/monsters/all.qh
qcsrc/common/monsters/monster/_all.inc [new file with mode: 0644]
qcsrc/common/monsters/monster/_all.qh [new file with mode: 0644]
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/_all.inc [new file with mode: 0644]
qcsrc/common/mutators/_all.qh [new file with mode: 0644]
qcsrc/common/notifications/all.qh
qcsrc/common/turrets/all.qc
qcsrc/common/turrets/all.qh
qcsrc/common/turrets/turret/_all.inc [new file with mode: 0644]
qcsrc/common/turrets/turret/_all.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/ewheel.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/flac.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/fusionreactor.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/hellion.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/hk.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/machinegun.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/mlrs.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/phaser.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/plasma.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/plasma_dual.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/tesla.qh [new file with mode: 0644]
qcsrc/common/turrets/turret/walker.qh [new file with mode: 0644]
qcsrc/common/vehicles/all.qc
qcsrc/common/vehicles/all.qh
qcsrc/common/vehicles/vehicle/_all.inc [new file with mode: 0644]
qcsrc/common/vehicles/vehicle/_all.qh [new file with mode: 0644]
qcsrc/common/vehicles/vehicle/racer.qh [new file with mode: 0644]
qcsrc/common/vehicles/vehicle/spiderbot.qh [new file with mode: 0644]
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/all.qh
qcsrc/lib/_all.inc
qcsrc/lib/matrix/_all.inc [new file with mode: 0644]
qcsrc/lib/matrix/_all.qh [new file with mode: 0644]
qcsrc/lib/matrix/command.qc
qcsrc/lib/warpzone/server.qc
qcsrc/menu/_all.inc [new file with mode: 0644]
qcsrc/menu/anim/_all.inc [new file with mode: 0644]
qcsrc/menu/anim/_all.qh [new file with mode: 0644]
qcsrc/menu/auto-super.pl [deleted file]
qcsrc/menu/command/_all.inc [new file with mode: 0644]
qcsrc/menu/command/_all.qh [new file with mode: 0644]
qcsrc/menu/command/all.qc
qcsrc/menu/command/menu_cmd.qc
qcsrc/menu/item/_all.inc [new file with mode: 0644]
qcsrc/menu/item/_all.qh [new file with mode: 0644]
qcsrc/menu/mutators/_all.inc [new file with mode: 0644]
qcsrc/menu/mutators/_all.qh [new file with mode: 0644]
qcsrc/menu/progs.inc
qcsrc/menu/xonotic/_all.inc [new file with mode: 0644]
qcsrc/menu/xonotic/_all.qh [new file with mode: 0644]
qcsrc/menu/xonotic/util.qc
qcsrc/server/_all.inc [new file with mode: 0644]
qcsrc/server/bot/_all.inc [new file with mode: 0644]
qcsrc/server/bot/_all.qh [new file with mode: 0644]
qcsrc/server/bot/api.qc
qcsrc/server/bot/default/_all.inc [new file with mode: 0644]
qcsrc/server/bot/default/_all.qh [new file with mode: 0644]
qcsrc/server/bot/default/havocbot/_all.inc [new file with mode: 0644]
qcsrc/server/bot/default/havocbot/_all.qh [new file with mode: 0644]
qcsrc/server/bot/null/bot_null.qc [new file with mode: 0644]
qcsrc/server/bot/null/bot_null.qh [new file with mode: 0644]
qcsrc/server/cl_client.qc
qcsrc/server/command/_all.inc [new file with mode: 0644]
qcsrc/server/command/_all.qh [new file with mode: 0644]
qcsrc/server/command/_mod.inc
qcsrc/server/command/_mod.qh
qcsrc/server/command/all.qc [deleted file]
qcsrc/server/command/all.qh [deleted file]
qcsrc/server/command/banning.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/common.qh
qcsrc/server/command/getreplies.qc
qcsrc/server/command/radarmap.qc
qcsrc/server/command/reg.qc [new file with mode: 0644]
qcsrc/server/command/reg.qh [new file with mode: 0644]
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/_all.inc [new file with mode: 0644]
qcsrc/server/mutators/_all.qh [new file with mode: 0644]
qcsrc/server/mutators/all.qc
qcsrc/server/mutators/gamemode.qh
qcsrc/server/mutators/mutator.qh
qcsrc/server/mutators/mutator/_all.inc [new file with mode: 0644]
qcsrc/server/mutators/mutator/_all.qh [new file with mode: 0644]
qcsrc/server/mutators/mutator/gamemode_lms.qc
qcsrc/server/pathlib/_all.inc
qcsrc/server/pathlib/_all.qh [new file with mode: 0644]
qcsrc/server/pathlib/pathlib.qh
qcsrc/server/progs.inc
qcsrc/server/tests.qh
qcsrc/server/weapons/_all.inc [new file with mode: 0644]
qcsrc/server/weapons/_all.qh [new file with mode: 0644]
qcsrc/tools/auto-super.pl [new file with mode: 0644]
qcsrc/tools/compilationunits.sh
qcsrc/tools/headerstyle.sh

diff --git a/qcsrc/client/_all.inc b/qcsrc/client/_all.inc
new file mode 100644 (file)
index 0000000..0c401ac
--- /dev/null
@@ -0,0 +1,20 @@
+#include <client/_all.qh>
+#include "_mod.inc"
+
+#include "commands/_all.inc"
+#include "hud/_all.inc"
+#include "mutators/_all.inc"
+#include "weapons/_all.inc"
+
+#include <common/_all.inc>
+#include <common/effects/qc/all.qc>
+
+#include <lib/csqcmodel/cl_model.qc>
+#include <lib/csqcmodel/cl_player.qc>
+#include <lib/csqcmodel/interpolate.qc>
+
+#include <lib/warpzone/anglestransform.qc>
+#include <lib/warpzone/common.qc>
+#include <lib/warpzone/client.qc>
+#include <lib/warpzone/server.qc>
+#include <lib/warpzone/util_server.qc>
index 746734d..5e5b55e 100644 (file)
@@ -1,4 +1,5 @@
 #pragma once
+//#include "_mod.qh"
 
 #include <common/util.qh>
 
diff --git a/qcsrc/client/commands/_all.inc b/qcsrc/client/commands/_all.inc
new file mode 100644 (file)
index 0000000..c90682d
--- /dev/null
@@ -0,0 +1,4 @@
+#include <client/commands/_all.qh>
+#include "_mod.inc"
+
+#include <common/command/_all.inc>
diff --git a/qcsrc/client/commands/_all.qh b/qcsrc/client/commands/_all.qh
new file mode 100644 (file)
index 0000000..9b89bcd
--- /dev/null
@@ -0,0 +1,4 @@
+#pragma once
+#include "_mod.qh"
+
+#include <common/command/_all.qh>
index 235f129..49fd90b 100644 (file)
@@ -1,3 +1,2 @@
 // generated file; do not modify
-#include <client/commands/all.qc>
 #include <client/commands/cl_cmd.qc>
index 03df563..9e5aa99 100644 (file)
@@ -1,3 +1,2 @@
 // generated file; do not modify
-#include <client/commands/all.qh>
 #include <client/commands/cl_cmd.qh>
diff --git a/qcsrc/client/commands/all.qc b/qcsrc/client/commands/all.qc
deleted file mode 100644 (file)
index bc15eeb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "all.qh"
-#include <common/command/all.qc>
diff --git a/qcsrc/client/commands/all.qh b/qcsrc/client/commands/all.qh
deleted file mode 100644 (file)
index 2df61f0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-
-#include <common/command/all.qh>
-
-#include "cl_cmd.qh"
index 9b8f58f..4c8e915 100644 (file)
@@ -4,12 +4,12 @@
 //  Last updated: December 28th, 2011
 // ==============================================
 
-#include <common/command/command.qh>
+#include <common/command/_all.qh>
 #include "cl_cmd.qh"
 
 #include "../autocvars.qh"
 #include "../defs.qh"
-#include <client/hud/all.qh>
+#include <client/hud/_all.qh>
 #include "../main.qh"
 #include "../mapvoting.qh"
 #include "../miscfunctions.qh"
@@ -18,8 +18,6 @@
 
 #include <common/mapinfo.qh>
 
-#include <common/command/generic.qh>
-
 void DrawDebugModel(entity this)
 {
        if (time - floor(time) > 0.5)
diff --git a/qcsrc/client/hud/_all.inc b/qcsrc/client/hud/_all.inc
new file mode 100644 (file)
index 0000000..9988f9a
--- /dev/null
@@ -0,0 +1,4 @@
+#include <client/hud/_all.qh>
+#include "_mod.inc"
+
+#include "panel/_all.inc"
diff --git a/qcsrc/client/hud/_all.qh b/qcsrc/client/hud/_all.qh
new file mode 100644 (file)
index 0000000..4ace83e
--- /dev/null
@@ -0,0 +1,4 @@
+#pragma once
+#include "_mod.qh"
+
+#include "panel/_all.qh"
index b90f61b..f400d5d 100644 (file)
@@ -1,3 +1,4 @@
 // generated file; do not modify
 #include <client/hud/hud.qc>
 #include <client/hud/hud_config.qc>
+#include <client/hud/panel.qc>
index ee9ac8f..0ac7251 100644 (file)
@@ -1,3 +1,4 @@
 // generated file; do not modify
 #include <client/hud/hud.qh>
 #include <client/hud/hud_config.qh>
+#include <client/hud/panel.qh>
diff --git a/qcsrc/client/hud/all.inc b/qcsrc/client/hud/all.inc
deleted file mode 100644 (file)
index 8305304..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "panel/weapons.qc"
-#include "panel/ammo.qc"
-#include "panel/powerups.qc"
-#include "panel/healtharmor.qc"
-#include "panel/notify.qc"
-#include "panel/timer.qc"
-#include "panel/radar.qc"
-#include "panel/score.qc"
-#include "panel/racetimer.qc"
-#include "panel/vote.qc"
-#include "panel/modicons.qc"
-#include "panel/pressedkeys.qc"
-#include "panel/chat.qc"
-#include "panel/engineinfo.qc"
-#include "panel/infomessages.qc"
-#include "panel/physics.qc"
-#include "panel/centerprint.qc"
-#include "panel/minigame.qc"
-// #include "panel/mapvote.qc"
-// #include "panel/itemstime.qc"
-#include "panel/quickmenu.qc"
-#include "panel/scoreboard.qc"
diff --git a/qcsrc/client/hud/all.qh b/qcsrc/client/hud/all.qh
deleted file mode 100644 (file)
index 2e458e6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-
-#include "hud.qh"
-#include "hud_config.qh"
index 3a33eb1..760f5d4 100644 (file)
@@ -1,5 +1,7 @@
 #include "hud.qh"
 
+#include "panel/scoreboard.qh"
+
 #include "hud_config.qh"
 #include "../mapvoting.qh"
 #include "../teamradar.qh"
@@ -334,8 +336,6 @@ void DrawNumIcon(vector myPos, vector mySize, float x, string icon, bool vertica
        DrawNumIcon_expanding(myPos, mySize, x, icon, vertical, icon_right_align, color, theAlpha, 0);
 }
 
-#include "all.inc"
-
 /*
 ==================
 Main HUD system
@@ -357,6 +357,8 @@ void HUD_Vehicle()
        }
 }
 
+bool HUD_Minigame_Showpanels();
+
 bool HUD_Panel_CheckFlags(int showflags)
 {
     TC(int, showflags);
@@ -413,6 +415,7 @@ bool Hud_Shake_Update()
        return true;
 }
 
+entity CSQCModel_server2csqc(int i);
 void calc_followmodel_ofs(entity view);
 void Hud_Dynamic_Frame()
 {
diff --git a/qcsrc/client/hud/panel.qc b/qcsrc/client/hud/panel.qc
new file mode 100644 (file)
index 0000000..558f320
--- /dev/null
@@ -0,0 +1 @@
+#include "panel.qh"
diff --git a/qcsrc/client/hud/panel/_all.inc b/qcsrc/client/hud/panel/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/client/hud/panel/_all.qh b/qcsrc/client/hud/panel/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index d495fde..7a95752 100644 (file)
@@ -15,7 +15,7 @@
 #include <client/hud/panel/racetimer.qc>
 #include <client/hud/panel/radar.qc>
 #include <client/hud/panel/score.qc>
+#include <client/hud/panel/scoreboard.qc>
 #include <client/hud/panel/timer.qc>
 #include <client/hud/panel/vote.qc>
 #include <client/hud/panel/weapons.qc>
-#include <client/hud/panel/scoreboard.qc>
index fa9b755..c24b5c0 100644 (file)
@@ -15,7 +15,7 @@
 #include <client/hud/panel/racetimer.qh>
 #include <client/hud/panel/radar.qh>
 #include <client/hud/panel/score.qh>
+#include <client/hud/panel/scoreboard.qh>
 #include <client/hud/panel/timer.qh>
 #include <client/hud/panel/vote.qh>
 #include <client/hud/panel/weapons.qh>
-#include <client/hud/panel/scoreboard.qh>
index 6db88c6..71919d2 100644 (file)
@@ -1,2 +1,4 @@
 #pragma once
 #include "../panel.qh"
+
+void DrawNadeProgressBar(vector myPos, vector mySize, float progress, vector color);
index 6db88c6..1bec93e 100644 (file)
@@ -1,2 +1,4 @@
 #pragma once
 #include "../panel.qh"
+
+void reset_centerprint_messages();
index 6db88c6..3235f8d 100644 (file)
@@ -1,2 +1,4 @@
 #pragma once
 #include "../panel.qh"
+
+void addPowerupItem(string name, string icon, vector color, float currentTime, float lifeTime);
index b2d3588..1ceab88 100644 (file)
@@ -2,7 +2,7 @@
 // QuickMenu (#23)
 
 #include <common/ent_cs.qh>
-#include <client/hud/all.qh>
+#include <client/hud/_all.qh>
 #include <client/mapvoting.qh>
 
 // QUICKMENU_MAXLINES must be <= 10
index c5e4723..b23a770 100644 (file)
@@ -1,7 +1,7 @@
 #include "main.qh"
 
 #include <common/effects/qc/all.qh>
-#include "hud/all.qh"
+#include "hud/_all.qh"
 #include "mapvoting.qh"
 #include "mutators/events.qh"
 #include "hud/panel/scoreboard.qh"
index 19c128a..c397c88 100644 (file)
@@ -1,6 +1,6 @@
 #include "mapvoting.qh"
 
-#include "hud/all.qh"
+#include "hud/_all.qh"
 #include "hud/panel/scoreboard.qh"
 
 #include <common/mapinfo.qh>
index 01b0ee3..9b98332 100644 (file)
@@ -1,8 +1,8 @@
 #include "miscfunctions.qh"
 
-#include "hud/all.qh"
+#include "hud/_all.qh"
 
-#include <common/command/generic.qh>
+#include <common/command/_all.qh>
 
 #include <common/teams.qh>
 
diff --git a/qcsrc/client/mutators/_all.inc b/qcsrc/client/mutators/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/client/mutators/_all.qh b/qcsrc/client/mutators/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index 98fb481..3dfd4f7 100644 (file)
@@ -1 +1,2 @@
 // generated file; do not modify
+#include <client/mutators/events.qc>
index 98fb481..b54ee48 100644 (file)
@@ -1 +1,2 @@
 // generated file; do not modify
+#include <client/mutators/events.qh>
diff --git a/qcsrc/client/mutators/events.qc b/qcsrc/client/mutators/events.qc
new file mode 100644 (file)
index 0000000..c2dbb70
--- /dev/null
@@ -0,0 +1 @@
+#include "events.qh"
index 48579ec..cd08bf1 100644 (file)
@@ -1,28 +1,7 @@
 #include <lib/_all.inc>
 
 #if XONOTIC
-
-#include "_all.qh"
-
-#include "../client/_mod.inc"
-#include "commands/_mod.inc"
-#include "hud/_mod.inc"
-#include "mutators/_mod.inc"
-#include "weapons/_mod.inc"
-
-#include <common/_all.inc>
-#include <common/effects/qc/all.qc>
-
-#include <lib/csqcmodel/cl_model.qc>
-#include <lib/csqcmodel/cl_player.qc>
-#include <lib/csqcmodel/interpolate.qc>
-
-#include <lib/warpzone/anglestransform.qc>
-#include <lib/warpzone/common.qc>
-#include <lib/warpzone/client.qc>
-#include <lib/warpzone/server.qc>
-#include <lib/warpzone/util_server.qc>
-
+#include "_all.inc"
 #endif
 
 #include <ecs/_lib.inc>
index 165b033..9797abf 100644 (file)
@@ -1,6 +1,6 @@
 #include "shownames.qh"
 
-#include "hud/all.qh"
+#include "hud/_all.qh"
 
 #include <common/ent_cs.qh>
 #include <common/constants.qh>
index ab14cd3..84fba6c 100644 (file)
@@ -1,6 +1,6 @@
 #include "teamradar.qh"
 
-#include "hud/all.qh"
+#include "hud/_all.qh"
 
 #include <common/mutators/mutator/waypoints/all.qh>
 
index 339d052..8070d0c 100644 (file)
@@ -1,7 +1,7 @@
 #include "view.qh"
 
 #include "announcer.qh"
-#include "hud/all.qh"
+#include "hud/_all.qh"
 #include "mapvoting.qh"
 #include "shownames.qh"
 #include "hud/panel/scoreboard.qh"
diff --git a/qcsrc/client/weapons/_all.inc b/qcsrc/client/weapons/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/client/weapons/_all.qh b/qcsrc/client/weapons/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index b16c24f..ef1e03e 100644 (file)
@@ -39,11 +39,11 @@ float autocvar_net_connecttimeout = 30;
 #include "t_items.qc"
 #endif
 
-#include "items/_mod.inc"
+#include "items/_all.inc"
     #include "weapons/all.qc"
         #include "monsters/all.qc"
         #include "turrets/all.qc"
         #include "vehicles/all.qc"
 
-#include "mutators/_mod.inc"
-    #include "gamemodes/_mod.inc"
+#include "mutators/_all.inc"
+    #include "gamemodes/_all.inc"
diff --git a/qcsrc/common/command/_all.inc b/qcsrc/common/command/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/common/command/_all.qh b/qcsrc/common/command/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index d2d24f0..e309998 100644 (file)
@@ -1,5 +1,5 @@
 // generated file; do not modify
-#include <common/command/all.qc>
 #include <common/command/generic.qc>
 #include <common/command/markup.qc>
+#include <common/command/reg.qc>
 #include <common/command/rpn.qc>
index 440bdcb..6ca2937 100644 (file)
@@ -1,5 +1,5 @@
 // generated file; do not modify
-#include <common/command/all.qh>
 #include <common/command/generic.qh>
 #include <common/command/markup.qh>
+#include <common/command/reg.qh>
 #include <common/command/rpn.qh>
diff --git a/qcsrc/common/command/all.qc b/qcsrc/common/command/all.qc
deleted file mode 100644 (file)
index dc1c044..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "generic.qc"
-#include "markup.qc"
-#include "rpn.qc"
diff --git a/qcsrc/common/command/all.qh b/qcsrc/common/command/all.qh
deleted file mode 100644 (file)
index 15285b9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#pragma once
-
-#include "command.qh"
-REGISTRY(GENERIC_COMMANDS, BITS(7))
-#define GENERIC_COMMANDS_from(i) _GENERIC_COMMANDS_from(i, NULL)
-REGISTER_REGISTRY(GENERIC_COMMANDS)
-REGISTRY_SORT(GENERIC_COMMANDS)
-
-#define GENERIC_COMMAND(id, description) \
-       CLASS(genericcommand_##id, Command) \
-               ATTRIB(genericcommand_##id, m_name, string, #id); \
-       ATTRIB(genericcommand_##id, m_description, string, description); \
-       ENDCLASS(genericcommand_##id) \
-    REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
-       METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))
-
-STATIC_INIT(GENERIC_COMMANDS_aliases) {
-       FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu")));
-}
-
-#include "generic.qh"
-#include "markup.qh"
-#include "rpn.qh"
index 8f3449b..5693329 100644 (file)
@@ -1,4 +1,5 @@
-#include "all.qh"
+#include "_all.qh"
+#include "reg.qh"
 
 #include "markup.qh"
 #include "rpn.qh"
 #endif
 
 #ifdef SVQC
-       #include <server/command/banning.qh>
-       #include <server/command/cmd.qh>
-       #include <server/command/common.qh>
-       #include <server/command/sv_cmd.qh>
+       #include <server/command/_all.qh>
        #include <common/turrets/config.qh>
        #include <common/weapons/config.qh>
 #endif
diff --git a/qcsrc/common/command/reg.qc b/qcsrc/common/command/reg.qc
new file mode 100644 (file)
index 0000000..c0af5b5
--- /dev/null
@@ -0,0 +1 @@
+#include "reg.qh"
diff --git a/qcsrc/common/command/reg.qh b/qcsrc/common/command/reg.qh
new file mode 100644 (file)
index 0000000..9868e24
--- /dev/null
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "command.qh"
+REGISTRY(GENERIC_COMMANDS, BITS(7))
+#define GENERIC_COMMANDS_from(i) _GENERIC_COMMANDS_from(i, NULL)
+REGISTER_REGISTRY(GENERIC_COMMANDS)
+REGISTRY_SORT(GENERIC_COMMANDS)
+
+#define GENERIC_COMMAND(id, description) \
+       CLASS(genericcommand_##id, Command) \
+               ATTRIB(genericcommand_##id, m_name, string, #id); \
+       ATTRIB(genericcommand_##id, m_description, string, description); \
+       ENDCLASS(genericcommand_##id) \
+    REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
+       METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))
+
+STATIC_INIT(GENERIC_COMMANDS_aliases) {
+       FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu")));
+}
diff --git a/qcsrc/common/gamemodes/_all.inc b/qcsrc/common/gamemodes/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/common/gamemodes/_all.qh b/qcsrc/common/gamemodes/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
diff --git a/qcsrc/common/items/_all.inc b/qcsrc/common/items/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/common/items/_all.qh b/qcsrc/common/items/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index 7a3e500..ab77f30 100644 (file)
@@ -2,7 +2,7 @@
 #define ITEMS_ALL_C
 #include "all.qh"
 
-#include "item/_mod.inc"
+#include "item/_all.inc"
 
 void Dump_Items()
 {
index ff54a3a..73bd502 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <common/command/all.qh>
+#include <common/command/_all.qh>
 
 #include "item.qh"
 
diff --git a/qcsrc/common/items/item/_all.inc b/qcsrc/common/items/item/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/common/items/item/_all.qh b/qcsrc/common/items/item/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index fa3f651..3abacac 100644 (file)
@@ -15,7 +15,7 @@ string M_Model(string m_mdl)
 #include "all.qh"
 
 #define IMPLEMENTATION
-#include "monster/_mod.inc"
+#include "monster/_all.inc"
 #undef IMPLEMENTATION
 
 #ifdef SVQC
index 84f7a0d..d49489f 100644 (file)
@@ -16,4 +16,4 @@ const int MON_FIRST = 1;
 REGISTER_MONSTER(Null, NEW(Monster));
 
 
-#include "monster/_mod.inc"
+#include "monster/_all.inc"
diff --git a/qcsrc/common/monsters/monster/_all.inc b/qcsrc/common/monsters/monster/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/common/monsters/monster/_all.qh b/qcsrc/common/monsters/monster/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index ea46be5..21d5ad7 100644 (file)
@@ -18,8 +18,7 @@
        #include "../turrets/util.qh"
     #include "../vehicles/all.qh"
     #include <server/campaign.qh>
-    #include <server/command/common.qh>
-    #include <server/command/cmd.qh>
+    #include <server/command/_all.qh>
        #include "../triggers/triggers.qh"
     #include <lib/csqcmodel/sv_model.qh>
     #include <server/round_handler.qh>
diff --git a/qcsrc/common/mutators/_all.inc b/qcsrc/common/mutators/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/common/mutators/_all.qh b/qcsrc/common/mutators/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index 983b69f..e66ea3f 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <common/command/all.qh>
+#include <common/command/_all.qh>
 
 #include <common/constants.qh>
 #include <common/teams.qh>
index 469a64c..ec62c24 100644 (file)
@@ -7,7 +7,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_TURRET)
 #endif
 
 #define IMPLEMENTATION
-#include "turret/_mod.inc"
+#include "turret/_all.inc"
 #undef IMPLEMENTATION
 
 #ifdef CSQC
index 476da2d..cbb0379 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <common/command/all.qh>
+#include <common/command/_all.qh>
 #include "config.qh"
 
 #include "turret.qh"
@@ -73,4 +73,4 @@ const int TUR_FIRST = 1;
 
 REGISTER_TURRET(Null, NEW(Turret));
 
-#include "turret/_mod.inc"
+#include "turret/_all.inc"
diff --git a/qcsrc/common/turrets/turret/_all.inc b/qcsrc/common/turrets/turret/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/common/turrets/turret/_all.qh b/qcsrc/common/turrets/turret/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
diff --git a/qcsrc/common/turrets/turret/ewheel.qh b/qcsrc/common/turrets/turret/ewheel.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/flac.qh b/qcsrc/common/turrets/turret/flac.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/fusionreactor.qh b/qcsrc/common/turrets/turret/fusionreactor.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/hellion.qh b/qcsrc/common/turrets/turret/hellion.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/hk.qh b/qcsrc/common/turrets/turret/hk.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/machinegun.qh b/qcsrc/common/turrets/turret/machinegun.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/mlrs.qh b/qcsrc/common/turrets/turret/mlrs.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/phaser.qh b/qcsrc/common/turrets/turret/phaser.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/plasma.qh b/qcsrc/common/turrets/turret/plasma.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/plasma_dual.qh b/qcsrc/common/turrets/turret/plasma_dual.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/tesla.qh b/qcsrc/common/turrets/turret/tesla.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/turrets/turret/walker.qh b/qcsrc/common/turrets/turret/walker.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
index 251df22..5a14b64 100644 (file)
@@ -12,7 +12,7 @@ REGISTER_NET_LINKED(ENT_CLIENT_AUXILIARYXHAIR)
 #endif
 
 #define IMPLEMENTATION
-#include "vehicle/_mod.inc"
+#include "vehicle/_all.inc"
 #undef IMPLEMENTATION
 
 #endif
index 158492f..779076a 100644 (file)
@@ -20,4 +20,4 @@ const int VEH_FIRST = 1;
 
 REGISTER_VEHICLE(Null, NEW(Vehicle));
 
-#include "vehicle/_mod.inc"
+#include "vehicle/_all.inc"
diff --git a/qcsrc/common/vehicles/vehicle/_all.inc b/qcsrc/common/vehicles/vehicle/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/common/vehicles/vehicle/_all.qh b/qcsrc/common/vehicles/vehicle/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
diff --git a/qcsrc/common/vehicles/vehicle/racer.qh b/qcsrc/common/vehicles/vehicle/racer.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/common/vehicles/vehicle/spiderbot.qh b/qcsrc/common/vehicles/vehicle/spiderbot.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
index 2b75ec0..d1bd2d7 100644 (file)
@@ -39,7 +39,7 @@
     #include "../deathtypes/all.qh"
     #include <server/mutators/all.qh>
     #include "../mapinfo.qh"
-    #include <server/command/common.qh>
+    #include <server/command/_all.qh>
     #include <lib/csqcmodel/sv_model.qh>
     #include <server/portals.qh>
     #include <server/g_hook.qh>
index a3f7eb4..113ae83 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <common/command/all.qh>
+#include <common/command/_all.qh>
 #include <common/stats.qh>
 #include "config.qh"
 
index 83a0ebf..cdacdc6 100644 (file)
@@ -122,7 +122,7 @@ void    isnt_bool(float this) { print(ftos(this)); }
 #include "vector.qh"
 #include "yenc.qh"
 
-#include "matrix/_mod.inc"
+#include "matrix/_all.inc"
 
 #ifndef SVQC
 #define objerror_safe(e)
diff --git a/qcsrc/lib/matrix/_all.inc b/qcsrc/lib/matrix/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/lib/matrix/_all.qh b/qcsrc/lib/matrix/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index 27c7ec9..449aa37 100644 (file)
@@ -1,6 +1,6 @@
 #include "command.qh"
 
-#include <common/command/all.qh>
+#include <common/command/_mod.qh>
 
 GENERIC_COMMAND(mx, "Send a matrix command") {
     switch (argv(1)) {
index de692ee..bff2197 100644 (file)
@@ -7,7 +7,7 @@
        #include <common/constants.qh>
        #include <common/triggers/subs.qh>
        #include <common/util.qh>
-       #include <server/command/common.qh>
+       #include <server/command/_all.qh>
        #include <server/constants.qh>
        #include <server/defs.qh>
 #endif
diff --git a/qcsrc/menu/_all.inc b/qcsrc/menu/_all.inc
new file mode 100644 (file)
index 0000000..bebbdcc
--- /dev/null
@@ -0,0 +1,10 @@
+#include <menu/_all.qh>
+#include "_mod.inc"
+
+#include "anim/_all.inc"
+#include "command/_all.inc"
+#include "item/_all.inc"
+#include "mutators/_all.inc"
+#include "xonotic/_all.inc"
+
+#include <common/_all.inc>
diff --git a/qcsrc/menu/anim/_all.inc b/qcsrc/menu/anim/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/menu/anim/_all.qh b/qcsrc/menu/anim/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
diff --git a/qcsrc/menu/auto-super.pl b/qcsrc/menu/auto-super.pl
deleted file mode 100644 (file)
index 00926d0..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-my %classoffile = ();
-my %classes = ();
-my %baseclass = ();
-my %methods = ();
-my %attrs = ();
-my %methodnames = ();
-my %old2new = ();
-
-print STDERR "Scanning...\n";
-for my $f(@ARGV)
-{
-       open my $fh, '<', $f;
-       while(<$fh>)
-       {
-               if(/^CLASS\(([^)]*)\)(?:\s*EXTENDS\(([^)]*)\))?/)
-               {
-                       $classes{$1} = defined($2) ? $2 : "Object";
-                       $classoffile{$f} = $1;
-               }
-               if(/^\s*METHOD\(([^),]*),\s*([^),]*)/)
-               {
-                       $methods{$1}{$2} = $1;
-                       $methodnames{"$1"."_"."$2"} = $f;
-                       $old2new{"$2$1"} = "$1"."_"."$2";
-               }
-               if(/^\s*ATTRIB(?:ARRAY)?\(([^),]*),\s*([^),]*)/)
-               {
-                       $attrs{$1}{$2} = $1;
-               }
-       }
-       close $fh;
-}
-
-# propagate down methods etc.
-print STDERR "Propagating...\n";
-for my $class(keys %classes)
-{
-       print STDERR "$class";
-       my $base = $class;
-       for(;;)
-       {
-               $base = $classes{$base};
-               last if not defined $base;
-               print STDERR " -> $base";
-               while(my ($method, $definingclass) = each %{$methods{$base}})
-               {
-                       $methods{$class}{$method} = $definingclass
-                               if not defined $methods{$class}{$method};
-               }
-               while(my ($attr, $definingclass) = each %{$attrs{$base}})
-               {
-                       $attrs{$class}{$attr} = $definingclass
-                               if not defined $attrs{$class}{$attr};
-               }
-       }
-       print STDERR "\n";
-}
-
-# change all calls to base method to super, complain about skipping
-print STDERR "Fixing...\n";
-for my $f(@ARGV)
-{
-       open my $fh, '<', $f;
-       my $s = do { undef local $/; <$fh>; };
-       my $s0 = $s;
-       close $fh;
-
-       my $class = $classoffile{$f};
-       my $base = $classes{$class};
-       next if not defined $base;
-
-       for(keys %old2new)
-       {
-               $s =~ s/\b$_\b/$old2new{$_}/g;
-       }
-
-       my @methods_super = map { [ $methods{$base}{$_} . "_" . $_, "SUPER($class).$_" ]; } keys %{$methods{$base}};
-       for(@methods_super)
-       {
-               my ($search, $replace) = @$_;
-               my $n = ($s =~ s/\b$search\b/$replace/g);
-               print STDERR "[$f] $search -> $replace... $n replacements\n"
-                       if $n;
-       }
-
-       for(grep { $methodnames{$_} ne $f } keys %methodnames)
-       {
-               if($s =~ /\b$_\b/)
-               {
-                       print STDERR "[$f] calls non-super external method directly: $_\n";
-               }
-       }
-
-       if($s ne $s0)
-       {
-               print STDERR "Rewriting $f...\n";
-               open my $fh, '>', $f;
-               print $fh $s;
-               close $fh;
-       }
-}
diff --git a/qcsrc/menu/command/_all.inc b/qcsrc/menu/command/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/menu/command/_all.qh b/qcsrc/menu/command/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index 2f8df96..63b9b78 100644 (file)
@@ -1,3 +1,3 @@
 #include "all.qh"
 
-#include <common/command/all.qc>
+#include <common/command/_all.inc>
index 0f87cbb..fb0ac17 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "../mutators/events.qh"
 
-#include <common/command/generic.qh>
+#include <common/command/_all.qh>
 
 .entity firstChild, nextSibling;
 
diff --git a/qcsrc/menu/item/_all.inc b/qcsrc/menu/item/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/menu/item/_all.qh b/qcsrc/menu/item/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
diff --git a/qcsrc/menu/mutators/_all.inc b/qcsrc/menu/mutators/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/menu/mutators/_all.qh b/qcsrc/menu/mutators/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index ad08af9..80d1475 100644 (file)
@@ -1,16 +1,7 @@
 #include <lib/_all.inc>
 
 #if XONOTIC
-
-#include "../menu/_mod.inc"
-#include "anim/_mod.inc"
-#include "command/_mod.inc"
-#include "item/_mod.inc"
-#include "mutators/_mod.inc"
-#include "xonotic/_mod.inc"
-
-#include <common/_all.inc>
-
+#include "_all.inc"
 #endif
 
 #if BUILD_MOD
diff --git a/qcsrc/menu/xonotic/_all.inc b/qcsrc/menu/xonotic/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/menu/xonotic/_all.qh b/qcsrc/menu/xonotic/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index 9cc4da8..3ad5754 100644 (file)
@@ -7,7 +7,7 @@
 #include <common/constants.qh>
 #include <common/mapinfo.qh>
 #include <common/util.qh>
-#include <common/command/generic.qh>
+#include <common/command/_all.qh>
 
 float GL_CheckExtension(string ext)
 {
diff --git a/qcsrc/server/_all.inc b/qcsrc/server/_all.inc
new file mode 100644 (file)
index 0000000..d2d15bb
--- /dev/null
@@ -0,0 +1,18 @@
+#include <server/_all.qh>
+#include "_mod.inc"
+
+#include "bot/_all.inc"
+#include "command/_all.inc"
+#include "mutators/_all.inc"
+#include "pathlib/_all.inc"
+#include "weapons/_all.inc"
+
+#include <common/_all.inc>
+#include <common/effects/qc/all.qc>
+
+#include <lib/csqcmodel/sv_model.qc>
+
+#include <lib/warpzone/anglestransform.qc>
+#include <lib/warpzone/common.qc>
+#include <lib/warpzone/server.qc>
+#include <lib/warpzone/util_server.qc>
diff --git a/qcsrc/server/bot/_all.inc b/qcsrc/server/bot/_all.inc
new file mode 100644 (file)
index 0000000..ae3f973
--- /dev/null
@@ -0,0 +1,4 @@
+#include <server/bot/_all.qh>
+#include "_mod.inc"
+
+#include "default/_all.inc"
diff --git a/qcsrc/server/bot/_all.qh b/qcsrc/server/bot/_all.qh
new file mode 100644 (file)
index 0000000..1d31636
--- /dev/null
@@ -0,0 +1,4 @@
+#pragma once
+#include "_mod.qh"
+
+#include "default/_all.qh"
index 85b0e46..274b034 100644 (file)
@@ -1,49 +1 @@
 #include "api.qh"
-
-#if 1
-
-#include "default/_mod.inc"
-#include "default/havocbot/_mod.inc"
-
-#else
-
-bool bot_aim(entity this, float shotspeed, float shotspeedupward, float maxshottime, float applygravity) { return false; }
-void bot_clientconnect(entity this) { }
-void bot_clientdisconnect(entity this) { }
-void bot_cmdhelp(string scmd) { }
-void bot_endgame() { }
-bool bot_fixcount() { return true; }
-void bot_list_commands() { }
-void bot_queuecommand(entity bot, string cmdstring) { }
-void bot_relinkplayerlist() { }
-void bot_resetqueues() { }
-void bot_serverframe() { }
-bool bot_shouldattack(entity this, entity e) { return false; }
-void bot_think(entity this) { }
-
-entity find_bot_by_name(string name) { return NULL; }
-entity find_bot_by_number(float number) { return NULL; }
-
-void havocbot_goalrating_controlpoints(entity this, float ratingscale, vector org, float sradius) { }
-void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius) { }
-void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius) { }
-
-entity navigation_findnearestwaypoint(entity ent, float walkfromwp) { return NULL; }
-void navigation_goalrating_end(entity this) { }
-void navigation_goalrating_start(entity this) { }
-void navigation_markroutes(entity this, entity fixed_source_waypoint) { }
-void navigation_markroutes_inverted(entity fixed_source_waypoint) { }
-void navigation_routerating(entity this, entity e, float f, float rangebias) { }
-
-bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float movemode) { return false; }
-
-void waypoint_remove(entity e) { }
-void waypoint_saveall() { }
-void waypoint_schedulerelinkall() { }
-void waypoint_schedulerelink(entity wp) { }
-void waypoint_spawnforitem(entity e) { }
-void waypoint_spawnforitem_force(entity e, vector org) { }
-void waypoint_spawnforteleporter(entity e, vector destination, float timetaken) { }
-void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken) { }
-entity waypoint_spawn(vector m1, vector m2, float f) { return NULL; }
-#endif
diff --git a/qcsrc/server/bot/default/_all.inc b/qcsrc/server/bot/default/_all.inc
new file mode 100644 (file)
index 0000000..f856187
--- /dev/null
@@ -0,0 +1,4 @@
+#include <server/bot/default/_all.qh>
+#include "_mod.inc"
+
+#include "havocbot/_all.inc"
diff --git a/qcsrc/server/bot/default/_all.qh b/qcsrc/server/bot/default/_all.qh
new file mode 100644 (file)
index 0000000..43706ce
--- /dev/null
@@ -0,0 +1,4 @@
+#pragma once
+#include "_mod.qh"
+
+#include "havocbot/_all.qh"
diff --git a/qcsrc/server/bot/default/havocbot/_all.inc b/qcsrc/server/bot/default/havocbot/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/server/bot/default/havocbot/_all.qh b/qcsrc/server/bot/default/havocbot/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
diff --git a/qcsrc/server/bot/null/bot_null.qc b/qcsrc/server/bot/null/bot_null.qc
new file mode 100644 (file)
index 0000000..75a7bcd
--- /dev/null
@@ -0,0 +1,41 @@
+#include "bot_null.qh"
+
+bool bot_aim(entity this, float shotspeed, float shotspeedupward, float maxshottime, float applygravity) { return false; }
+void bot_clientconnect(entity this) { }
+void bot_clientdisconnect(entity this) { }
+void bot_cmdhelp(string scmd) { }
+void bot_endgame() { }
+bool bot_fixcount() { return true; }
+void bot_list_commands() { }
+void bot_queuecommand(entity bot, string cmdstring) { }
+void bot_relinkplayerlist() { }
+void bot_resetqueues() { }
+void bot_serverframe() { }
+bool bot_shouldattack(entity this, entity e) { return false; }
+void bot_think(entity this) { }
+
+entity find_bot_by_name(string name) { return NULL; }
+entity find_bot_by_number(float number) { return NULL; }
+
+void havocbot_goalrating_controlpoints(entity this, float ratingscale, vector org, float sradius) { }
+void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius) { }
+void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius) { }
+
+entity navigation_findnearestwaypoint(entity ent, float walkfromwp) { return NULL; }
+void navigation_goalrating_end(entity this) { }
+void navigation_goalrating_start(entity this) { }
+void navigation_markroutes(entity this, entity fixed_source_waypoint) { }
+void navigation_markroutes_inverted(entity fixed_source_waypoint) { }
+void navigation_routerating(entity this, entity e, float f, float rangebias) { }
+
+bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float movemode) { return false; }
+
+void waypoint_remove(entity e) { }
+void waypoint_saveall() { }
+void waypoint_schedulerelinkall() { }
+void waypoint_schedulerelink(entity wp) { }
+void waypoint_spawnforitem(entity e) { }
+void waypoint_spawnforitem_force(entity e, vector org) { }
+void waypoint_spawnforteleporter(entity e, vector destination, float timetaken) { }
+void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken) { }
+entity waypoint_spawn(vector m1, vector m2, float f) { return NULL; }
diff --git a/qcsrc/server/bot/null/bot_null.qh b/qcsrc/server/bot/null/bot_null.qh
new file mode 100644 (file)
index 0000000..28709a2
--- /dev/null
@@ -0,0 +1,3 @@
+#pragma once
+
+#include "../api.qh"
index 0a608e9..a280b27 100644 (file)
@@ -2489,6 +2489,8 @@ void DrownPlayer(entity this)
        }
 }
 
+.bool move_qcphysics;
+
 void Player_Physics(entity this)
 {
        set_movetype(this, ((this.move_qcphysics) ? MOVETYPE_NONE : this.move_movetype));
diff --git a/qcsrc/server/command/_all.inc b/qcsrc/server/command/_all.inc
new file mode 100644 (file)
index 0000000..b90bed8
--- /dev/null
@@ -0,0 +1,4 @@
+#include <server/command/_all.qh>
+#include "_mod.inc"
+
+#include <common/command/_all.inc>
diff --git a/qcsrc/server/command/_all.qh b/qcsrc/server/command/_all.qh
new file mode 100644 (file)
index 0000000..9b89bcd
--- /dev/null
@@ -0,0 +1,4 @@
+#pragma once
+#include "_mod.qh"
+
+#include <common/command/_all.qh>
index fa15432..2cabd69 100644 (file)
@@ -1,5 +1,4 @@
 // generated file; do not modify
-#include <server/command/all.qc>
 #include <server/command/banning.qc>
 #include <server/command/cmd.qc>
 #ifdef SVQC
@@ -8,4 +7,5 @@
 #include <server/command/common.qc>
 #include <server/command/getreplies.qc>
 #include <server/command/radarmap.qc>
+#include <server/command/reg.qc>
 #include <server/command/vote.qc>
index 60e34ff..b95b1e0 100644 (file)
@@ -1,8 +1,8 @@
 // generated file; do not modify
-#include <server/command/all.qh>
 #include <server/command/banning.qh>
 #include <server/command/cmd.qh>
 #include <server/command/common.qh>
 #include <server/command/getreplies.qh>
 #include <server/command/radarmap.qh>
+#include <server/command/reg.qh>
 #include <server/command/vote.qh>
diff --git a/qcsrc/server/command/all.qc b/qcsrc/server/command/all.qc
deleted file mode 100644 (file)
index bc15eeb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "all.qh"
-#include <common/command/all.qc>
diff --git a/qcsrc/server/command/all.qh b/qcsrc/server/command/all.qh
deleted file mode 100644 (file)
index cde5ef3..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#pragma once
-
-#include <common/command/command.qh>
-REGISTRY(SERVER_COMMANDS, BITS(7))
-#define SERVER_COMMANDS_from(i) _SERVER_COMMANDS_from(i, NULL)
-REGISTER_REGISTRY(SERVER_COMMANDS)
-REGISTRY_SORT(SERVER_COMMANDS)
-
-#define SERVER_COMMAND(id, description) \
-       CLASS(servercommand_##id, Command) \
-               ATTRIB(servercommand_##id, m_name, string, #id); \
-       ATTRIB(servercommand_##id, m_description, string, description); \
-       ENDCLASS(servercommand_##id) \
-    REGISTER(SERVER_COMMANDS, CMD_SV, id, m_id, NEW(servercommand_##id)); \
-       METHOD(servercommand_##id, m_invokecmd, void(servercommand_##id this, int request, entity caller, int arguments, string command))
-
-STATIC_INIT(SERVER_COMMANDS_aliases) {
-       FOREACH(SERVER_COMMANDS, true, LAMBDA(localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_sv"))));
-}
-
-#include "sv_cmd.qh"
-
-#include "banning.qh"
-#include "cmd.qh"
-#include "common.qh"
-#include "getreplies.qh"
-#include "radarmap.qh"
-#include "vote.qh"
index d6968c2..d450ca4 100644 (file)
@@ -1,5 +1,5 @@
 #include "banning.qh"
-#include <common/command/command.qh>
+#include <common/command/_all.qh>
 #include "banning.qh"
 
 #include "common.qh"
index 13c883f..33f5716 100644 (file)
@@ -1,5 +1,5 @@
 #include "cmd.qh"
-#include <common/command/command.qh>
+#include <common/command/_all.qh>
 
 #include "common.qh"
 #include "vote.qh"
index d980a0f..8f5b619 100644 (file)
@@ -1,5 +1,5 @@
 #include "common.qh"
-#include <common/command/command.qh>
+#include <common/command/_all.qh>
 #include "common.qh"
 
 #include "../scores.qh"
index 63b1c70..0c09006 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include <common/command/command.qh>
+#include <common/command/_all.qh>
 REGISTRY(COMMON_COMMANDS, BITS(7))
 #define COMMON_COMMANDS_from(i) _COMMON_COMMANDS_from(i, NULL)
 REGISTER_REGISTRY(COMMON_COMMANDS)
@@ -21,8 +21,7 @@ STATIC_INIT(COMMON_COMMANDS_aliases) {
 #include "vote.qh"
 #include <common/monsters/spawn.qh>
 
-#include <common/command/generic.qh>
-#include <common/command/command.qh>
+#include <common/command/_all.qh>
 
 // ============================================================
 //  Shared declarations for server commands, written by Samual
index 93ce85a..1274fcf 100644 (file)
@@ -1,5 +1,5 @@
 #include "getreplies.qh"
-#include <common/command/command.qh>
+#include <common/command/_all.qh>
 #include "getreplies.qh"
 
 #include "../race.qh"
index 71f5e27..5f7533d 100644 (file)
@@ -1,5 +1,5 @@
 #include "radarmap.qh"
-#include <common/command/command.qh>
+#include <common/command/_all.qh>
 #include "radarmap.qh"
 
 #include "../g_world.qh"
diff --git a/qcsrc/server/command/reg.qc b/qcsrc/server/command/reg.qc
new file mode 100644 (file)
index 0000000..c0af5b5
--- /dev/null
@@ -0,0 +1 @@
+#include "reg.qh"
diff --git a/qcsrc/server/command/reg.qh b/qcsrc/server/command/reg.qh
new file mode 100644 (file)
index 0000000..b135c04
--- /dev/null
@@ -0,0 +1,18 @@
+#pragma once
+
+REGISTRY(SERVER_COMMANDS, BITS(7))
+#define SERVER_COMMANDS_from(i) _SERVER_COMMANDS_from(i, NULL)
+REGISTER_REGISTRY(SERVER_COMMANDS)
+REGISTRY_SORT(SERVER_COMMANDS)
+
+#define SERVER_COMMAND(id, description) \
+       CLASS(servercommand_##id, Command) \
+               ATTRIB(servercommand_##id, m_name, string, #id); \
+       ATTRIB(servercommand_##id, m_description, string, description); \
+       ENDCLASS(servercommand_##id) \
+    REGISTER(SERVER_COMMANDS, CMD_SV, id, m_id, NEW(servercommand_##id)); \
+       METHOD(servercommand_##id, m_invokecmd, void(servercommand_##id this, int request, entity caller, int arguments, string command))
+
+STATIC_INIT(SERVER_COMMANDS_aliases) {
+       FOREACH(SERVER_COMMANDS, true, LAMBDA(localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_sv"))));
+}
index bb59566..720ad01 100644 (file)
@@ -1,5 +1,5 @@
 #include "sv_cmd.qh"
-#include "all.qh"
+#include "_all.qh"
 
 #include "banning.qh"
 #include "cmd.qh"
index 72bedd9..f93e9c7 100644 (file)
@@ -1,5 +1,5 @@
 #include "vote.qh"
-#include <common/command/command.qh>
+#include <common/command/_all.qh>
 #include "vote.qh"
 
 #include "common.qh"
index fb782ed..a177cdc 100644 (file)
@@ -9,7 +9,7 @@
 #include "weapons/accuracy.qh"
 #include "weapons/csqcprojectile.qh"
 #include "weapons/selection.qh"
-#include "../common/command/generic.qh"
+#include "../common/command/_all.qh"
 #include "../common/constants.qh"
 #include "../common/deathtypes/all.qh"
 #include "../common/mapinfo.qh"
diff --git a/qcsrc/server/mutators/_all.inc b/qcsrc/server/mutators/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/server/mutators/_all.qh b/qcsrc/server/mutators/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index 78ba560..0e8a607 100644 (file)
     #include <common/stats.qh>
     #include <common/teams.qh>
     #include <common/util.qh>
-    #include <common/command/markup.qh>
-    #include <common/command/rpn.qh>
-    #include <common/command/generic.qh>
-    #include <common/command/command.qh>
+    #include <common/command/_all.qh>
     #include <common/net_notice.qh>
     #include <common/animdecide.qh>
     #include <common/monsters/all.qh>
index 1e60b20..85910ce 100644 (file)
 
 #include <server/bot/api.qh>
 
-#include <server/command/vote.qh>
+#include <server/command/_all.qh>
 
 #include <common/monsters/all.qh>
 
-#include <server/command/common.qh>
-
 #include <server/weapons/tracing.qh>
 #include <server/weapons/weaponsystem.qh>
 
index a63321a..5344a91 100644 (file)
@@ -13,8 +13,7 @@
 
 #include <server/bot/api.qh>
 
-#include <server/command/vote.qh>
-#include <server/command/common.qh>
+#include <server/command/_all.qh>
 
 #include <server/weapons/common.qh>
 #include <server/weapons/tracing.qh>
diff --git a/qcsrc/server/mutators/mutator/_all.inc b/qcsrc/server/mutators/mutator/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/server/mutators/mutator/_all.qh b/qcsrc/server/mutators/mutator/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index afd107b..a66a8c5 100644 (file)
@@ -43,7 +43,7 @@ float LMS_NewPlayerLives();
 
 #include <common/mutators/mutator/instagib/items.qc>
 #include <server/campaign.qh>
-#include <server/command/cmd.qh>
+#include <server/command/_all.qh>
 
 int autocvar_g_lms_extra_lives;
 bool autocvar_g_lms_join_anytime;
index 7a06615..73539f9 100644 (file)
@@ -1,6 +1,4 @@
-#ifndef DEBUGPATHING
-       #define DEBUGPATHING 0
-#endif
+#include "pathlib.qh"
 
 #include "costs.qc"
 #include "expandnode.qc"
diff --git a/qcsrc/server/pathlib/_all.qh b/qcsrc/server/pathlib/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
index 339a2e7..4ae0c2c 100644 (file)
@@ -1,5 +1,9 @@
 #pragma once
 
+#ifndef DEBUGPATHING
+       #define DEBUGPATHING 0
+#endif
+
 .entity pathlib_list;
 .entity path_next;
 .entity path_prev;
index c49b604..743f981 100644 (file)
@@ -1,30 +1,7 @@
-#ifndef DEBUGPATHING
-       #define DEBUGPATHING 0
-#endif
-
 #include <lib/_all.inc>
 
 #if XONOTIC
-
-#include "_all.qh"
-
-#include "../server/_mod.inc"
-#include "bot/_mod.inc"
-#include "command/_mod.inc"
-#include "mutators/_mod.inc"
-#include "pathlib/_all.inc"
-#include "weapons/_mod.inc"
-
-#include <common/_all.inc>
-#include <common/effects/qc/all.qc>
-
-#include <lib/csqcmodel/sv_model.qc>
-
-#include <lib/warpzone/anglestransform.qc>
-#include <lib/warpzone/common.qc>
-#include <lib/warpzone/server.qc>
-#include <lib/warpzone/util_server.qc>
-
+#include "_all.inc"
 #endif
 
 #include <ecs/_lib.inc>
index be6445b..ec56918 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "autocvars.qh"
 #include "cl_client.qh"
-#include "command/all.qh"
+#include "command/_all.qh"
 #include "weapons/common.qh"
 #include "weapons/selection.qh"
 #include <common/items/item.qh>
diff --git a/qcsrc/server/weapons/_all.inc b/qcsrc/server/weapons/_all.inc
new file mode 100644 (file)
index 0000000..8bc63f7
--- /dev/null
@@ -0,0 +1,2 @@
+#include "_all.qh"
+#include "_mod.inc"
diff --git a/qcsrc/server/weapons/_all.qh b/qcsrc/server/weapons/_all.qh
new file mode 100644 (file)
index 0000000..947026d
--- /dev/null
@@ -0,0 +1,2 @@
+#pragma once
+#include "_mod.qh"
diff --git a/qcsrc/tools/auto-super.pl b/qcsrc/tools/auto-super.pl
new file mode 100644 (file)
index 0000000..00926d0
--- /dev/null
@@ -0,0 +1,101 @@
+my %classoffile = ();
+my %classes = ();
+my %baseclass = ();
+my %methods = ();
+my %attrs = ();
+my %methodnames = ();
+my %old2new = ();
+
+print STDERR "Scanning...\n";
+for my $f(@ARGV)
+{
+       open my $fh, '<', $f;
+       while(<$fh>)
+       {
+               if(/^CLASS\(([^)]*)\)(?:\s*EXTENDS\(([^)]*)\))?/)
+               {
+                       $classes{$1} = defined($2) ? $2 : "Object";
+                       $classoffile{$f} = $1;
+               }
+               if(/^\s*METHOD\(([^),]*),\s*([^),]*)/)
+               {
+                       $methods{$1}{$2} = $1;
+                       $methodnames{"$1"."_"."$2"} = $f;
+                       $old2new{"$2$1"} = "$1"."_"."$2";
+               }
+               if(/^\s*ATTRIB(?:ARRAY)?\(([^),]*),\s*([^),]*)/)
+               {
+                       $attrs{$1}{$2} = $1;
+               }
+       }
+       close $fh;
+}
+
+# propagate down methods etc.
+print STDERR "Propagating...\n";
+for my $class(keys %classes)
+{
+       print STDERR "$class";
+       my $base = $class;
+       for(;;)
+       {
+               $base = $classes{$base};
+               last if not defined $base;
+               print STDERR " -> $base";
+               while(my ($method, $definingclass) = each %{$methods{$base}})
+               {
+                       $methods{$class}{$method} = $definingclass
+                               if not defined $methods{$class}{$method};
+               }
+               while(my ($attr, $definingclass) = each %{$attrs{$base}})
+               {
+                       $attrs{$class}{$attr} = $definingclass
+                               if not defined $attrs{$class}{$attr};
+               }
+       }
+       print STDERR "\n";
+}
+
+# change all calls to base method to super, complain about skipping
+print STDERR "Fixing...\n";
+for my $f(@ARGV)
+{
+       open my $fh, '<', $f;
+       my $s = do { undef local $/; <$fh>; };
+       my $s0 = $s;
+       close $fh;
+
+       my $class = $classoffile{$f};
+       my $base = $classes{$class};
+       next if not defined $base;
+
+       for(keys %old2new)
+       {
+               $s =~ s/\b$_\b/$old2new{$_}/g;
+       }
+
+       my @methods_super = map { [ $methods{$base}{$_} . "_" . $_, "SUPER($class).$_" ]; } keys %{$methods{$base}};
+       for(@methods_super)
+       {
+               my ($search, $replace) = @$_;
+               my $n = ($s =~ s/\b$search\b/$replace/g);
+               print STDERR "[$f] $search -> $replace... $n replacements\n"
+                       if $n;
+       }
+
+       for(grep { $methodnames{$_} ne $f } keys %methodnames)
+       {
+               if($s =~ /\b$_\b/)
+               {
+                       print STDERR "[$f] calls non-super external method directly: $_\n";
+               }
+       }
+
+       if($s ne $s0)
+       {
+               print STDERR "Rewriting $f...\n";
+               open my $fh, '>', $f;
+               print $fh $s;
+               close $fh;
+       }
+}
index 2fa1782..cccb938 100755 (executable)
@@ -11,7 +11,6 @@ declare -a QCCDEFS=(
     -DNDEBUG=1
     -DXONOTIC=1
     -DWATERMARK="\"$(git describe --tags --dirty='~')\""
-    -DDEBUGPATHING=0
 )
 QCCDEFS="${QCCDEFS[@]}"
 
index daf20eb..e40fb39 100755 (executable)
@@ -28,8 +28,23 @@ function check() {
         echo "$file"
         startswith "$file" "#pragma once"
     done
+    find "$base" -type f -name '_mod.inc' -print0 | sort -z | while read -r -d '' file; do
+        echo "$file"
+        declare -l file_inc="${file%_mod.inc}_all.inc"
+        if [ ! -f "$file_inc" ]; then
+            echo '#include "_all.qh"' > "$file_inc"
+            echo '#include "_mod.inc"' >> "$file_inc"
+        fi
+        declare -l file_qh="${file%_mod.inc}_all.qh"
+        if [ ! -f "$file_qh" ]; then
+            echo '#pragma once' > "$file_qh"
+            echo '#include "_mod.qh"' >> "$file_qh"
+        fi
+    done
 }
 
 check client
 check server
 check menu
+
+# TODO: check that "_mod.(qc|inc)" is not included except by "_all.(qc|inc)"