<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mike/sst/src/build/mkgamedata.c, branch v0.18-BETA</title>
<subtitle>Source Speedrun Tools: practice tools and handy features for Source Engine games</subtitle>
<id>https://qdb.woz.blue/mike/sst/atom?h=v0.18-BETA</id>
<link rel='self' href='https://qdb.woz.blue/mike/sst/atom?h=v0.18-BETA'/>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/'/>
<updated>2025-11-15T19:31:12+00:00</updated>
<entry>
<title>Fix incorrect gamedata short-circuiting</title>
<updated>2025-11-15T19:31:12+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-11-15T19:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=650bb761d3e5af3f8fa19ac8d22864cc0360d085'/>
<id>urn:sha1:650bb761d3e5af3f8fa19ac8d22864cc0360d085</id>
<content type='text'>
Gamedata bugs are the gift that keeps on giving. This was making vgui
stuff fail in L4D2 because the other outer conditions would match first.

It's perhaps unfortunate that we have to remove short-circuiting in
cases where it would work fine, but who knows, maybe the compiler would
be smart enough to figure it out anyway.

At any rate it's necessary for correctness, so whatever.
</content>
</entry>
<entry>
<title>Improve gamedata codegen and fix spurious cases</title>
<updated>2025-10-11T02:13:18+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-10-11T02:09:35+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=74f1309af5310fbfa346048f8ecfc7fe1e8a4571'/>
<id>urn:sha1:74f1309af5310fbfa346048f8ecfc7fe1e8a4571</id>
<content type='text'>
The old GAMESPECIFIC mechanism had worked in practice but was
technically a little bit incorrect, oops.
</content>
</entry>
<entry>
<title>Handle negated gamedata tag matches properly</title>
<updated>2025-10-11T00:36:16+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-10-11T00:35:54+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=b447f5879d0c4c49d72f167ed2cf0f1e44a52123'/>
<id>urn:sha1:b447f5879d0c4c49d72f167ed2cf0f1e44a52123</id>
<content type='text'>
The NE thing wasn't really correct, because it would match hypothetical
cases where OE and some other tag bit are both set. Now we simply use
!OE instead. The _GAMES_WITH inversion case is correct, because it
doesn't necessarily exclude OE from being included too.
</content>
</entry>
<entry>
<title>Fix indexing edge case in mkgamedata</title>
<updated>2025-06-27T21:52:10+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-06-27T21:45:11+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=36910c88033bcc4b25df5c64ed066c633dc4eac2'/>
<id>urn:sha1:36910c88033bcc4b25df5c64ed066c633dc4eac2</id>
<content type='text'>
This took longer to debug than one might like to admit. In some very
specific cases, the loop condition would fail before the return
condition, causing the rest of the logic to proceed with out-of-bounds
accesses to indents and exprs (which are zero-initialised), in turn
leading to garbage getting dumped into the generated header.

The garbage in question would be line 0, and [argv[0]
</content>
</entry>
<entry>
<title>Add some useful info printouts to debug builds</title>
<updated>2025-04-30T21:55:05+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-04-30T21:55:05+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=7b7cb45f7c1ed307b585ab3506dc57854ec076a6'/>
<id>urn:sha1:7b7cb45f7c1ed307b585ab3506dc57854ec076a6</id>
<content type='text'>
Specifically when building in debug mode, we now:

* Display all features on load, including skipped and internal ones,
  sorted by internal name instead of display name.

* Print the names of all matched gametype tags after the feature list.

* Add an sst_dbg_getcmdcb command to get the address of a command
  callback for quick breakpoint insertion or Ghidra lookup.

* Add an sst_dbg_sendtables command to dump out the full ServerClass
  tree to help get names for entprops.txt. Note: this output is very
  long so you'll likely need to log console output to a file to be able
  to read it all.

There's a bunch of developer experience and debug help stuff I want to
get done eventually. This is just a very small piece, but it's a start.
</content>
</entry>
<entry>
<title>Put some error paths in the fridge</title>
<updated>2025-04-08T00:35:13+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-04-08T00:32:41+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=6c8cd62277a9c81d1d24c146067c405ec90cbfb2'/>
<id>urn:sha1:6c8cd62277a9c81d1d24c146067c405ec90cbfb2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove years from copyright headers</title>
<updated>2025-04-07T20:31:32+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-04-07T20:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=58b495650f7613cdebfe78fff9de2b99556f1998'/>
<id>urn:sha1:58b495650f7613cdebfe78fff9de2b99556f1998</id>
<content type='text'>
They're legally unnecessary as far as I know, and kind of annoying to
maintain on a long-term basis.

This was done with the consent of all 3 other contributors, in case
anyone was wondering.
</content>
</entry>
<entry>
<title>Use C23 void-argument-free prototypes</title>
<updated>2025-04-06T15:41:13+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-03-10T20:37:28+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=daa55cade14146f04814cf8a7ad2028becf4db66'/>
<id>urn:sha1:daa55cade14146f04814cf8a7ad2028becf4db66</id>
<content type='text'>
In the future we can also consider moving to {} instead of {0} for
initialisers, but my old Clang (16) doesn't support this, so it might be
wise to wait longer on that one so people don't need too bleeding-edge
of a compiler just to build this thing.
</content>
</entry>
<entry>
<title>Rewrite and redesign codegen and feature system</title>
<updated>2025-04-06T15:41:13+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-03-10T02:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=244fea664121acf12871ab5858a5fe95a2606b52'/>
<id>urn:sha1:244fea664121acf12871ab5858a5fe95a2606b52</id>
<content type='text'>
Also switch to somewhat proper C23 flags while we're at it.

This is a huge change. It took me forever, in between being really busy.
Sorry about that. But the good news is I'm now free to start integrating
the various patches that have accumulated since last release. Well, at
least in between still being really busy. Gotta manage expectations.

The main benefit of introducing GAMESPECIFIC() is that features
that don't apply to a particular game no longer show up *at all*, and
less time is wasted on init. It also enables a cool optimisation wherein
unnecessary REQUIRE_GAMEDATA() checks can elided at compile time
whenever the gamedata is known up-front to always exist in supported
games.

The DEF_FEAT_CVAR macro family meanwhile makes it easier to manage the
lifecycle of cvars/ccmds, with less manual registering, unhiding and
such.

Originally I was going to try and just hack these features into the
existing codegen abomination, but it just got too terrible. This rewrite
should make it easier to continue tweaking codegen behaviour in future.
It also has slightly better error messages.
</content>
</entry>
<entry>
<title>Rewrite the gamedata and entprops systems entirely</title>
<updated>2024-08-23T19:40:01+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2024-08-21T23:02:48+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=cf0354eb8e043fcd9c6c17756701972f948a16f1'/>
<id>urn:sha1:cf0354eb8e043fcd9c6c17756701972f948a16f1</id>
<content type='text'>
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.
</content>
</entry>
</feed>
