Age | Commit message (Collapse) | Author |
|
Last fix was apparently enough to make the release work, but not enough
to actually work in general, lol. With any luck, it's actually good now.
|
|
I screwed things up even more than I thought!
|
|
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.
|
|
My new programming style is branch hints. All non-confusing branches
must be hinted when I can be bothered. It's faster, sometimes, maybe.
Also, start trying to use more signed sizes in at least some of the
places where it makes sense. Unsigned sizes are surprisingly
error-prone!
|
|
- As much as possible avoid dragging system headers into translation
units. This should avoid namespace pollution and, hopefully, speed up
builds a little bit.
- Avoid leaning on the UCRT so much on Windows - prefer native win32
calls and native file handles except where doing so is inconvenient
(in particular, for stat(), which we might try and replace later).
- Also, switch from SystemFunction036 to ProcessPrng on Windows. This
requires us to generate a stub for bcryptprimitives.dll because
Microsoft haven't bothered to provide a link library, but the function
is better-documented and seems to be a more direct under-the-hood call
as well. Apparently it's what's used by the major web browsers these
days, which seems like a good indication it's stable and trusted.
- Lastly, remove a bunch of functions and macros and stuff that weren't
actually being used. It seems good to try and keep the scope of
OS-dependent stuff relatively contained and only add to it when
actually required.
|
|
Suggested by bill. Having something semantically pointer-sized that's
only ever used for stuff that's always 32-bit doesn't really make sense.
Note that I intentionally did not add a copyright line for myself in
hud.c because, I mean, come on. I'll just say I waive any claim to that
tiny trivial change.
|
|
Because why not.
|
|
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.
|
|
Spotted by Bill the other day.
|
|
|
|
|
|
I still haven't bothered to flesh out all the possible indices for
GetEngineBuildNumber but we're back to being able to use it to detect
The Last Stand (as a result of some old version testing Aciidz did -
thanks again!). This means we can do away with the terrible map file-
based hotfix. Also, turns out sst_l4d_testwarp doesn't work if the
plugin gets loaded early via VDF because certain SendTable offsets start
out negated, so we work around that too now.
|
|
This was a lot more code than expected, but it might be finally close to
time to release the next beta...
We'll see if any more rabbit holes present themselves to jump into,
though.
|