summaryrefslogtreecommitdiffhomepage
path: root/compile.bat
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2024-08-22 00:02:48 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2024-08-23 20:40:01 +0100
commitcf0354eb8e043fcd9c6c17756701972f948a16f1 (patch)
treede931afc161f43e95d040ae655a6a2081aeb4ff2 /compile.bat
parent78323e416f79ef9c26bbd742082627bc45e116c1 (diff)
Rewrite the gamedata and entprops systems entirely
This removes the horrible janky old KeyValues parser and replaces it with a couple of trivial ad-hoc text parsers. In doing so, make the format of the actual gamedata files more human-friendly too. We also gain support for nested SendTables in mkentprops, which are required to get at various things like player velocity. And, the actual string matching is made more efficient (or, at least, more scalable) by way of a cool radix tree thing which generates a bunch of switch cases on distinct characters.
Diffstat (limited to 'compile.bat')
-rw-r--r--compile.bat14
1 files changed, 6 insertions, 8 deletions
diff --git a/compile.bat b/compile.bat
index f36d17d..ca632ed 100644
--- a/compile.bat
+++ b/compile.bat
@@ -115,13 +115,13 @@ if %host64%==1 (
%HOSTCC% -fuse-ld=lld -municode -O2 %warnings% -D_CRT_SECURE_NO_WARNINGS -include stdbool.h ^
-L.build %lbcryptprimitives_host% -o .build/codegen.exe src/build/codegen.c src/build/cmeta.c src/os.c || goto :end
%HOSTCC% -fuse-ld=lld -municode -O2 %warnings% -D_CRT_SECURE_NO_WARNINGS -include stdbool.h ^
--L.build %lbcryptprimitives_host% -o .build/mkgamedata.exe src/build/mkgamedata.c src/kv.c src/os.c || goto :end
-%HOSTCC% -fuse-ld=lld -municode -O2 %warnings% -D_CRT_SECURE_NO_WARNINGS -include stdbool.h ^
--L.build %lbcryptprimitives_host% -o .build/mkentprops.exe src/build/mkentprops.c src/kv.c src/os.c || goto :end
+-L.build %lbcryptprimitives_host% -o .build/mkgamedata.exe src/build/mkgamedata.c src/os.c || goto :end
+%HOSTCC% -fuse-ld=lld -municode -O2 -g %warnings% -D_CRT_SECURE_NO_WARNINGS -include stdbool.h ^
+-L.build %lbcryptprimitives_host% -o .build/mkentprops.exe src/build/mkentprops.c src/os.c || goto :end
.build\codegen.exe%src% || goto :end
-.build\mkgamedata.exe gamedata/engine.kv gamedata/gamelib.kv gamedata/inputsystem.kv ^
-gamedata/matchmaking.kv gamedata/vgui2.kv gamedata/vguimatsurface.kv || goto :end
-.build\mkentprops.exe gamedata/entprops.kv || goto :end
+.build\mkgamedata.exe gamedata/engine.txt gamedata/gamelib.txt gamedata/inputsystem.txt ^
+gamedata/matchmaking.txt gamedata/vgui2.txt gamedata/vguimatsurface.txt || goto :end
+.build\mkentprops.exe gamedata/entprops.txt || goto :end
llvm-rc /FO .build\dll.res src\dll.rc || goto :end
for %%b in (%src%) do ( call :cc %%b || goto :end )
:: we need different library names for debugging because Microsoft...
@@ -143,8 +143,6 @@ del .build\sst.lib
:: special case: test must be 32-bit
%HOSTCC% -fuse-ld=lld -m32 -O2 -g -L.build -lbcryptprimitives -include test/test.h -o .build/hook.test.exe test/hook.test.c || goto :end
.build\hook.test.exe || goto :end
-%HOSTCC% -fuse-ld=lld -O2 -g -include test/test.h -o .build/kv.test.exe test/kv.test.c || goto :end
-.build\kv.test.exe || goto :end
%HOSTCC% -fuse-ld=lld -O2 -g -include test/test.h -o .build/x86.test.exe test/x86.test.c || goto :end
.build\x86.test.exe || goto :end