aboutsummaryrefslogtreecommitdiff
path: root/src/gametype.h
Commit message (Collapse)AuthorAgeFilesLines
* Improve gamedata codegen and fix spurious casesGravatar Michael Smith 2025-10-111-1/+1
| | | | | The old GAMESPECIFIC mechanism had worked in practice but was technically a little bit incorrect, oops.
* Handle negated gamedata tag matches properlyGravatar Michael Smith 2025-10-111-6/+0
| | | | | | | 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.
* Get it sort-of-mostly working in "Old Engine" HL2Gravatar Michael Smith 2025-10-011-26/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we're at it, come up with a way for certain gamedata matches to be Windows-only. Somewhat reduces ifdef usage, although does not entirely remove it of course. Tested in HL2 2707. Haven't tested other HL2 builds, or Episode 1. Doesn't seem to work in DMoMM yet either; not sure why. A big list of stuff still to fix follows. Hidden cvars are currently an issue. We still need to figure out what to do with the flag bits because FCVAR_HIDDEN just doesn't exist in OE and there's some other flag with the same value instead. We also need to do something about the flag setting in fixes.c since HIDDEN is again not a thing, and also DEVONLY is not a thing either. When the plugin is autoloaded, all the initial log text gets eaten, because there's some stupid crap we have to do to trick the engine into displaying coloured text otherwise it just won't. Not even stuff from Warning(). Very stupid, but Hayden already figured out a solution, so that'll be done in another upcoming commit. Apparently raw mouse input breaks the menu. We might need to bump up the priority on making that hook only be active when there's no UI open - something I wanted to do anyway due to the demo drive issues. Big thanks to Hayden for doing a lot of the initial groundwork on this, particularly the cvar registration stuff. He gets a copyright notice in con_.c even though I ended up doing a lot of stuff differently because quite a bit of his work is still in there. Don't blame him for the self-modifying code though, that was my crazy idea. Sorry, but, in my defence... Well, it works.
* Add some useful info printouts to debug buildsGravatar Michael Smith 2025-04-301-35/+46
| | | | | | | | | | | | | | | | | | | | 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.
* Remove years from copyright headersGravatar Michael Smith 2025-04-071-3/+3
| | | | | | | | 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.
* Add L4D1_1015plus and L4D1_1022plus gametype tagsGravatar Hayden K 2025-04-061-2/+4
| | | | | | | | | | 1022 is the update that adds Mac support and introduces some of the already known vtable changes (this update is similar to 2040 for L4D2 in that regard), the tag will also see some use in some upcoming features. The 1015 tag is questionably necessary, but will be used for at least one feature (it's also the update that adds the newer matchmaking interfaces used in l4dreset.c, but having the tag available doesn't help anything there).
* Rename L4D2_2147plus gametype tag to L4D2_2125plusGravatar Hayden K 2025-04-061-1/+2
| | | | | | | Turns out the cvar we use to detect 2147 was actually added in 2125. Since renaming it doesn't currently break anything (and 2125 was a fairly notable code shuffling update, given it was the first update with a native Linux build of the game), it makes most sense to just do this.
* Rewrite and redesign codegen and feature systemGravatar Michael Smith 2025-04-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add basic button input HUDGravatar Matthew Wozniak 2024-09-141-10/+11
| | | | | | | | | | | | Committer's note: this is heavily modified from the original code contributed by woz (and somewhat improved by bill and aciidz). Copyright notices reflect joint authorship accordingly. woz still gets commit authorship though because it feels wrong to yoink that from someone. :^) And yes, the original code was written in 2022. Time flies. A lot of the code is still kind of hacky and ugly and I'd like to improve it later but there's other things to do so that can wait.
* Make L4D2 2147 gametype include all later versionsGravatar Michael Smith 2023-11-261-3/+3
|
* Improve L4D2 and Portal gametype detectionGravatar Willian Henrique 2023-05-041-1/+5
| | | | | | Adds tags for L4D2 2147 and Portal 3420. Committer's note: really the gamedata system might benefit from improvement in the future to support things like numerical ranges, but this will do for now.
* Fix GetEngineBuildNumber and entity property stuffGravatar Michael Smith 2022-05-151-0/+1
| | | | | | | | | | 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.
* HOTFIX: Fix L4D2 2.0.0.0 crashingv0.3-HOTFIXGravatar Michael Smith 2022-05-061-0/+2
| | | | Idiotic problems require idiotic solutions.
* Add entity property finding and L4D warp testingGravatar Michael Smith 2022-05-031-10/+21
| | | | | | | | 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.
* Centralise engine access, add Portal FOV changerGravatar Michael Smith 2022-04-301-9/+14
| | | | | | | | | | | | | | | - A bunch of stuff is now defined in one header, engineapi.h - engineapi.c is responsible for setting up any interfaces/stuff that's used in more than one place - mkgamedata is pretty much rewritten and now supports nested conditionals - gamedata variables no longer have the gamedata_ prefix because it was just annoyingly long all the time - vcall macros are somewhat revamped and support dynamic (gamedata) indices - Portal 1 FOV can be set anywhere from 75-120 using fov_desired - tested in both the main versions currently used by runners - A few typos were also fixed ("intput," "writeable," "indexes")
* Reorganise sst.c, add Portal 1 game typeGravatar Michael Smith 2022-04-261-2/+3
|
* Fix L4D1 and L4DS crash regressionsGravatar Michael Smith 2022-03-261-0/+1
| | | | Chalk this up to improper testing and being tired and not using brain.
* Clean up gameinfo_init() and other random stuffGravatar Michael Smith 2022-03-241-6/+11
| | | | | | | | | | | | | | | - Just ask the engine for the game directory instead of doing the stupid argv sniffing hacks from the early days of trying to get the damn thing working. - Also add some other path variables, functions and whatnot, and do some other minor tidying up. - Also also, another damn copyright year, somebody please help me. Unfortunate negative effect off this change: con_init() no longer reports the game name, because it has to happen before gameinfo_init(). I've decided I don't really care, though.
* Spruce up text and fix some copyright yearsGravatar Michael Smith 2022-03-191-2/+2
| | | | Sometimes, you just want to Unicode.
* Fix Left 4 Dead 2 Survivors crashingGravatar Michael Smith 2022-01-171-5/+9
|
* Initial public snapshotGravatar Michael Smith 2021-11-201-0/+38
With code from Bill. Thanks Bill!