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/engineapi.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/engineapi.h') diff --git a/src/engineapi.h b/src/engineapi.h index 4489e21..4f96b73 100644 --- a/src/engineapi.h +++ b/src/engineapi.h @@ -1,5 +1,5 @@ /* - * Copyright © 2023 Michael Smith + * Copyright © 2024 Michael Smith * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -96,15 +96,6 @@ struct CMoveData { struct vec3f origin; }; -#define SENDPROP_INT 0 -#define SENDPROP_FLOAT 1 -#define SENDPROP_VEC 2 -#define SENDPROP_VECXY 3 -#define SENDPROP_STR 4 -#define SENDPROP_ARRAY 5 -#define SENDPROP_DTABLE 6 -#define SENDPROP_INT64 7 - // these have to be opaque because, naturally, they're unstable between // branches - access stuff using gamedata offsets as usual struct RecvProp; -- cgit v1.2.3