mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-10 06:31:44 +00:00
Misc. QuakeC workflow improvements (#73)
* REPO: Update progs.src standards, consolidate both ssqc to one src file * FTEQCC: Optimize SSQC with -O3 * PROGS: Globally disable useless fastarrays on standard * TOOLS: Consolidate Linux and macOS build scripts into one * Remove some debug stuff * ACTIONS: Change build script reference name
This commit is contained in:
parent
595a9a5dd9
commit
244f21bf79
15 changed files with 136 additions and 197 deletions
2
.github/workflows/compile-and-release.yml
vendored
2
.github/workflows/compile-and-release.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
working-directory: ./tools
|
||||
run: |
|
||||
sudo -i
|
||||
./qc-compiler-lin.sh
|
||||
./qc-compiler-gnu.sh
|
||||
echo "QC COMPILE STATUS - ${{ job.status }}."
|
||||
- name: Zip Progs
|
||||
working-directory: ./build
|
||||
|
|
22
progs/csqc.src
Normal file
22
progs/csqc.src
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma noref 1
|
||||
#pragma target fte_5768
|
||||
#pragma progs_dat "../build/fte/csprogs.dat"
|
||||
|
||||
#pragma includedir "../source/client/"
|
||||
#pragma includedir "../source/shared/"
|
||||
|
||||
#includelist
|
||||
defs/fte.qc
|
||||
shared_defs.qc
|
||||
sound_enhanced.qc
|
||||
weapon_stats.qc
|
||||
defs/custom.qc
|
||||
menu.qc
|
||||
achievements.qc
|
||||
hud.qc
|
||||
chat.qc
|
||||
user_input.qc
|
||||
view_model.qc
|
||||
particles.qc
|
||||
main.qc
|
||||
#endlist
|
|
@ -1,15 +0,0 @@
|
|||
../../build/fte/csprogs.dat
|
||||
|
||||
../source/client/defs/fte.qc
|
||||
../source/shared/defs/custom.qc
|
||||
../source/shared/sound_enhanced.qc
|
||||
../source/shared/weapon_defines.qc
|
||||
../source/client/defs/custom.qc
|
||||
../source/client/menu.qc
|
||||
../source/client/achievements.qc
|
||||
../source/client/hud.qc
|
||||
../source/client/chat.qc
|
||||
../source/client/user_input.qc
|
||||
../source/client/view_model.qc
|
||||
../source/client/particles.qc
|
||||
../source/client/main.qc
|
|
@ -1,55 +0,0 @@
|
|||
../../build/fte/qwprogs.dat
|
||||
|
||||
../source/server/defs/fte.qc
|
||||
../source/shared/defs/custom.qc
|
||||
../source/server/defs/custom.qc
|
||||
../source/shared/weapon_defines.qc
|
||||
../source/server/utilities/math.qc
|
||||
../source/server/clientfuncs.qc
|
||||
../source/server/hash_table.qc
|
||||
|
||||
../source/server/dummies.qc
|
||||
../source/server/rounds.qc
|
||||
../source/server/main.qc
|
||||
../source/server/utilities/weapon_utilities.qc
|
||||
../source/server/utilities/game_restart.qc
|
||||
../source/server/utilities/command_parser.qc
|
||||
../source/server/player.qc
|
||||
../source/server/damage.qc
|
||||
|
||||
../source/server/entities/sub_functions.qc
|
||||
../source/server/entities/sounds.qc
|
||||
../source/server/entities/triggers.qc
|
||||
../source/server/entities/spawn_points.qc
|
||||
../source/server/entities/explosive_barrel.qc
|
||||
../source/server/entities/teleporter.qc
|
||||
../source/server/entities/map_entities.qc
|
||||
../source/server/entities/func.qc
|
||||
../source/server/entities/traps.qc
|
||||
../source/server/entities/lights.qc
|
||||
../source/server/entities/pack_a_punch.qc
|
||||
../source/server/entities/mystery_box.qc
|
||||
../source/server/entities/doors.qc
|
||||
../source/server/entities/window.qc
|
||||
../source/server/entities/machines.qc
|
||||
../source/server/entities/wall_weapon.qc
|
||||
|
||||
../source/server/weapons/frames_core.qc
|
||||
../source/server/weapons/rocket_launcher.qc
|
||||
../source/server/weapons/ray_gun.qc
|
||||
../source/server/weapons/tesla.qc
|
||||
../source/server/weapons/flamethrower.qc
|
||||
../source/server/weapons/grenade_launcher.qc
|
||||
../source/server/weapons/bouncing_betty.qc
|
||||
../source/server/weapons/weapon_core.qc
|
||||
|
||||
../source/server/entities/powerups.qc
|
||||
|
||||
../source/server/ai/pathfind_code.qc
|
||||
../source/server/ai/ai_core.qc
|
||||
../source/server/ai/fte/waypoints_core.qc
|
||||
../source/server/ai/zombie_core.qc
|
||||
../source/server/ai/crawler_core.qc
|
||||
../source/server/ai/dog_core.qc
|
||||
|
||||
../source/server/utilities/map_compatibility.qc
|
74
progs/ssqc.src
Normal file
74
progs/ssqc.src
Normal file
|
@ -0,0 +1,74 @@
|
|||
#ifdef FTE
|
||||
#pragma progs_dat "../build/fte/qwprogs.dat"
|
||||
#pragma target fte_5768
|
||||
#else
|
||||
#pragma progs_dat "../build/standard/progs.dat"
|
||||
#pragma flag disable fastarrays
|
||||
#endif
|
||||
|
||||
#pragma warning disable Q208
|
||||
#pragma noref 1
|
||||
|
||||
#pragma includedir "../source/server/"
|
||||
#pragma includedir "../source/shared/"
|
||||
|
||||
#includelist
|
||||
#ifdef FTE
|
||||
defs/fte.qc
|
||||
#else
|
||||
defs/standard.qc
|
||||
#endif
|
||||
shared_defs.qc
|
||||
defs/custom.qc
|
||||
weapon_stats.qc
|
||||
utilities/math.qc
|
||||
clientfuncs.qc
|
||||
hash_table.qc
|
||||
dummies.qc
|
||||
rounds.qc
|
||||
main.qc
|
||||
utilities/weapon_utilities.qc
|
||||
utilities/game_restart.qc
|
||||
utilities/command_parser.qc
|
||||
player.qc
|
||||
damage.qc
|
||||
entities/sub_functions.qc
|
||||
entities/sounds.qc
|
||||
entities/triggers.qc
|
||||
entities/spawn_points.qc
|
||||
entities/explosive_barrel.qc
|
||||
entities/teleporter.qc
|
||||
entities/map_entities.qc
|
||||
entities/func.qc
|
||||
entities/traps.qc
|
||||
entities/lights.qc
|
||||
entities/pack_a_punch.qc
|
||||
entities/mystery_box.qc
|
||||
entities/doors.qc
|
||||
entities/window.qc
|
||||
entities/machines.qc
|
||||
entities/wall_weapon.qc
|
||||
weapons/frames_core.qc
|
||||
weapons/rocket_launcher.qc
|
||||
weapons/ray_gun.qc
|
||||
weapons/tesla.qc
|
||||
weapons/flamethrower.qc
|
||||
weapons/grenade_launcher.qc
|
||||
weapons/bouncing_betty.qc
|
||||
weapons/weapon_core.qc
|
||||
entities/powerups.qc
|
||||
#ifdef FTE
|
||||
ai/pathfind_code.qc
|
||||
#endif
|
||||
ai/ai_core.qc
|
||||
#ifdef FTE
|
||||
ai/fte/waypoints_core.qc
|
||||
#else
|
||||
ai/standard/waypoints_func.qc
|
||||
ai/standard/waypoints_core.qc
|
||||
#endif
|
||||
ai/zombie_core.qc
|
||||
ai/crawler_core.qc
|
||||
ai/dog_core.qc
|
||||
utilities/map_compatibility.qc
|
||||
#endlist
|
|
@ -1,57 +0,0 @@
|
|||
../../build/standard/progs.dat
|
||||
|
||||
#pragma warning disable Q208
|
||||
|
||||
../source/server/defs/standard.qc
|
||||
../source/shared/defs/custom.qc
|
||||
../source/server/defs/custom.qc
|
||||
../source/shared/weapon_defines.qc
|
||||
../source/server/utilities/math.qc
|
||||
../source/server/clientfuncs.qc
|
||||
../source/server/hash_table.qc
|
||||
|
||||
../source/server/dummies.qc
|
||||
../source/server/rounds.qc
|
||||
../source/server/main.qc
|
||||
../source/server/utilities/weapon_utilities.qc
|
||||
../source/server/utilities/game_restart.qc
|
||||
../source/server/utilities/command_parser.qc
|
||||
../source/server/player.qc
|
||||
../source/server/damage.qc
|
||||
|
||||
../source/server/entities/sub_functions.qc
|
||||
../source/server/entities/sounds.qc
|
||||
../source/server/entities/triggers.qc
|
||||
../source/server/entities/spawn_points.qc
|
||||
../source/server/entities/explosive_barrel.qc
|
||||
../source/server/entities/teleporter.qc
|
||||
../source/server/entities/map_entities.qc
|
||||
../source/server/entities/func.qc
|
||||
../source/server/entities/traps.qc
|
||||
../source/server/entities/lights.qc
|
||||
../source/server/entities/pack_a_punch.qc
|
||||
../source/server/entities/mystery_box.qc
|
||||
../source/server/entities/doors.qc
|
||||
../source/server/entities/window.qc
|
||||
../source/server/entities/machines.qc
|
||||
../source/server/entities/wall_weapon.qc
|
||||
|
||||
../source/server/weapons/frames_core.qc
|
||||
../source/server/weapons/rocket_launcher.qc
|
||||
../source/server/weapons/ray_gun.qc
|
||||
../source/server/weapons/tesla.qc
|
||||
../source/server/weapons/flamethrower.qc
|
||||
../source/server/weapons/grenade_launcher.qc
|
||||
../source/server/weapons/bouncing_betty.qc
|
||||
../source/server/weapons/weapon_core.qc
|
||||
|
||||
../source/server/entities/powerups.qc
|
||||
|
||||
../source/server/ai/ai_core.qc
|
||||
../source/server/ai/standard/waypoints_func.qc
|
||||
../source/server/ai/standard/waypoints_core.qc
|
||||
../source/server/ai/zombie_core.qc
|
||||
../source/server/ai/crawler_core.qc
|
||||
../source/server/ai/dog_core.qc
|
||||
|
||||
../source/server/utilities/map_compatibility.qc
|
|
@ -147,9 +147,9 @@ float K_LEFTDOWN, K_RIGHTDOWN, K_BACKDOWN, K_FORWARDDOWN;
|
|||
#define P_FLOP 16
|
||||
#define P_STAMIN 32
|
||||
|
||||
vector TEXT_LIGHTBLUE = [(2/255), (118/255), (181/255)];
|
||||
vector TEXT_ORANGE = [(235/255), (189/255), 0];
|
||||
vector TEXT_GREEN = [0, (230/255), (34/255)];
|
||||
vector TEXT_LIGHTBLUE = [0, 0.46, 0.70];
|
||||
vector TEXT_ORANGE = [0.92, 0.74, 0];
|
||||
vector TEXT_GREEN = [0, 0.90, 0.13];
|
||||
vector TEXT_RED = [1, 0, 0];
|
||||
|
||||
float screenflash_type;
|
||||
|
|
|
@ -92,6 +92,7 @@ void() Particles_MuzzleflashCallback =
|
|||
pointparticles(particleeffectnum("weapons.impact"), particle_position, '0 0 0', 1);
|
||||
pointparticles(particleeffectnum("weapons.impact_decal"), particle_position, '0 0 0', 1);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// This struct must be ordered linearly for fast array lookups. Do NOT skip indexes.
|
||||
|
|
|
@ -26,15 +26,6 @@
|
|||
|
||||
*/
|
||||
|
||||
// FTEQCC currently has an optimization bug with -fastarrays
|
||||
// that leads to corruption with the weapon list. Disable
|
||||
// if we're not on FTE.
|
||||
#ifndef FTE
|
||||
|
||||
#pragma flag disable fastarrays
|
||||
|
||||
#endif // FTE
|
||||
|
||||
// TODO: Actually implement some of these..
|
||||
// Frame types, generalized.
|
||||
#define ANIM_FIRE 0
|
||||
|
@ -447,10 +438,3 @@ void Weapon_RemoveWeapon(float slot)
|
|||
Weapon_AssignWeapon(slot, 0, 0, 0);
|
||||
Weapon_FixUpList();
|
||||
};
|
||||
|
||||
// Re-enable fast array optimization.
|
||||
#ifndef FTE
|
||||
|
||||
#pragma flag enable fastarrays
|
||||
|
||||
#endif // FTE
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
shared/defs/custom.qc
|
||||
shared/shared_defs.qc
|
||||
|
||||
shared definitions
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
shared/weapon_defines.qc
|
||||
shared/weapon_stats.qc
|
||||
|
||||
all weapon stats are stored here
|
||||
|
29
tools/qc-compiler-gnu.sh
Executable file
29
tools/qc-compiler-gnu.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
FTEQCC=fteqcc-cli-lin
|
||||
|
||||
# Switch to macOS fteqcc binary if on that platform.
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
FTEQCC=fteqcc-cli-mac
|
||||
fi
|
||||
|
||||
cd ../
|
||||
|
||||
# generate hash table
|
||||
echo "Generating Hash Table.."
|
||||
python3 bin/qc_hash_generator.py -i tools/asset_conversion_table.csv -o source/server/hash_table.qc
|
||||
|
||||
# create build directories
|
||||
mkdir -p build/{fte,standard}
|
||||
|
||||
cd bin/
|
||||
|
||||
# build..
|
||||
echo "Compiling FTE CSQC.."
|
||||
./$FTEQCC -srcfile ../progs/csqc.src | grep -E -i "warning |error |defined |not |unknown |branches"
|
||||
echo "Compiling FTE SSQC.."
|
||||
./$FTEQCC -O3 -DFTE -srcfile ../progs/ssqc.src | grep -E -i "warning |error |defined |not |unknown |branches"
|
||||
echo "Compiling Standard/Id SSQC.."
|
||||
./$FTEQCC -O3 -srcfile ../progs/ssqc.src | grep -E -i "warning |error |defined |not |unknown |branches"
|
||||
|
||||
echo "End of script."
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd ../
|
||||
|
||||
# generate hash table
|
||||
echo "Generating Hash Table.."
|
||||
python3 bin/qc_hash_generator.py -i tools/asset_conversion_table.csv -o source/server/hash_table.qc
|
||||
|
||||
# create build directories
|
||||
mkdir -p build/{fte,standard}
|
||||
|
||||
cd bin/
|
||||
|
||||
# build..
|
||||
echo "Compiling FTE CSQC.."
|
||||
./fteqcc-cli-lin -srcfile ../progs/fte-client.src | grep -E -i "warning |error |defined |not |unknown |branches"
|
||||
echo "Compiling FTE SSQC.."
|
||||
./fteqcc-cli-lin -O2 -srcfile ../progs/fte-server.src | grep -E -i "warning |error |defined |not |unknown |branches"
|
||||
echo "Compiling Standard/Id SSQC.."
|
||||
./fteqcc-cli-lin -O2 -srcfile ../progs/standard.src | grep -E -i "warning |error |defined |not |unknown |branches"
|
||||
|
||||
echo "End of script."
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd ../
|
||||
|
||||
# generate hash table
|
||||
echo "Generating Hash Table.."
|
||||
python3 bin/qc_hash_generator.py -i tools/asset_conversion_table.csv -o source/server/hash_table.qc
|
||||
|
||||
# create build directories
|
||||
mkdir -p build/{fte,standard}
|
||||
|
||||
cd bin/
|
||||
|
||||
# build..
|
||||
echo "Compiling FTE CSQC.."
|
||||
./fteqcc-cli-mac -srcfile ../progs/fte-client.src | grep -E -i "warning |error |defined |not |unknown |branches"
|
||||
echo "Compiling FTE SSQC.."
|
||||
./fteqcc-cli-mac -O2 -srcfile ../progs/fte-server.src | grep -E -i "warning |error |defined |not |unknown |branches"
|
||||
echo "Compiling Standard/Id SSQC.."
|
||||
./fteqcc-cli-mac -O2 -srcfile ../progs/standard.src | grep -E -i "warning |error |defined |not |unknown |branches"
|
||||
|
||||
echo "End of script."
|
|
@ -14,11 +14,11 @@ CD bin/
|
|||
|
||||
REM ****** build.. ******
|
||||
echo Compiling FTE CSQC..
|
||||
fteqcc-cli-win.exe -srcfile ../progs/fte-client.src
|
||||
fteqcc-cli-win.exe -srcfile ../progs/csqc.src
|
||||
echo Compiling FTE SSQC..
|
||||
fteqcc-cli-win.exe -O2 -srcfile ../progs/fte-server.src
|
||||
fteqcc-cli-win.exe -O3 -DFTE -srcfile ../progs/ssqc.src
|
||||
echo Compiling Standard/Id SSQC..
|
||||
fteqcc-cli-win.exe -O2 -srcfile ../progs/standard.src
|
||||
fteqcc-cli-win.exe -O3 -srcfile ../progs/ssqc.src
|
||||
|
||||
echo End of script.
|
||||
pause
|
Loading…
Reference in a new issue