From cf0354eb8e043fcd9c6c17756701972f948a16f1 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Thu, 22 Aug 2024 00:02:48 +0100 Subject: 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. --- src/build/vec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/build/vec.h') diff --git a/src/build/vec.h b/src/build/vec.h index 6b4dffb..6dfa645 100644 --- a/src/build/vec.h +++ b/src/build/vec.h @@ -62,7 +62,7 @@ static bool _vec_make_room(struct _vec *v, uint tsize, uint addcnt) { // internal: for reuse by vec0 #define _vec_push(v, val, slack) ( \ ((v)->sz + (slack) < (v)->max || \ - _vec_make_room((struct _vec *)(v), sizeof(val), 1)) && \ + _vec_make_room((struct _vec *)(v), sizeof(val), 1)) && /*NOLINT*/ \ ((v)->data[(v)->sz++ - slack] = (val), true) \ ) -- cgit v1.2.3