aboutsummaryrefslogtreecommitdiff
path: root/src/fastfwd.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove years from copyright headersGravatar Michael Smith 2025-04-071-4/+4
| | | | | | | | 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.
* 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-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Revise syntax macros and add a ton of branch hintsGravatar Michael Smith 2024-08-231-25/+21
| | | | | | | | | 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!
* Disable fastfwd outside L4D so SPT doesn't breakGravatar Michael Smith 2024-05-211-0/+7
|
* Rethink mem_loadoffset, and consequently, kill itGravatar Michael Smith 2024-01-211-5/+5
| | | | | | | | | 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.
* Add fast-forward gaps for checking item spawnsGravatar Michael Smith 2023-12-051-0/+5
| | | | | | This complicates things greatly! Therefore, it's a separate commit to the baseline fast-forward functionality, to keep the confusing stuff relatively contained.
* Add a way to fast-forward game timeGravatar Matthew Wozniak 2023-11-261-0/+249
This will be mostly useful for skipping cutscenes in Left 4 Dead games. It may work in other games, but probably won't really be as useful. Committer's note: this was adapted a fair bit from woz's original code, hence the joint copyright, but he did most the hard work of figuring out how to get this deep into the engine's call stack. Thanks! bill also provided a fair bit of help figuring out missing gamedata and fixing compatibility with L4D2 2147 and later. Also thanks!