aboutsummaryrefslogtreecommitdiff
path: root/src/kv.h
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite the gamedata and entprops systems entirelyGravatar Michael Smith 2024-08-231-95/+0
| | | | | | | | | | | | 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.
* Move towards C23, improve events and vcall macrosGravatar Michael Smith 2022-09-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Another big one. Here's a list of things: - Since the upcoming C23 standardises typeof(), use it as an extension for the time being in order to allow passing arbitrary types as macro/codegen parameters. It wouldn't have been a big leap to do this even without standardisation since it's apparently an easy extension to implement - and also, to be honest, this project is essentially glued to Clang anyway so who cares. - Likewise, bool, true and false are becoming pre-defined, so pre-pre-define them now in order to get the benefit of not having to remember one header everywhere. - Really ungodly/amazing vcall macro stuff now allows us to call C++ virtual functions like regular C functions. It's pretty cool! - Events can now take arbitrary parameters and come in two types: regular events and predicates. All this makes the base code even uglier but makes the feature implementation nicer. In other words, it places more of the cognitive burden on myself and less on other people who might want to contribute. This is a good tradeoff, because I'm a genius.
* Spruce up text and fix some copyright yearsGravatar Michael Smith 2022-03-191-2/+2
| | | | Sometimes, you just want to Unicode.
* Fix some old KV parser issuesGravatar Michael Smith 2022-03-191-13/+14
| | | | | | | - Implement conditionals in the lexer and reject or ignore them in callbacks. This will allow something to use them later if needed. - Make error handling less stupid (return a bool instead of using the state struct).
* Split up os.h, inline functions and fix some typosGravatar Michael Smith 2021-12-301-1/+1
|
* Initial public snapshotGravatar Michael Smith 2021-11-201-0/+96
With code from Bill. Thanks Bill!