aboutsummaryrefslogtreecommitdiff
path: root/src/sst.c
Commit message (Collapse)AuthorAgeFilesLines
* Add update changelog and bump zip dateGravatar Michael Smith 2023-06-101-1/+11
| | | | | | The zip date is tomorrow as that's the expected release date pending some testing and hearing back from Portal people re official approval for use in runs. With any luck it won't need to be bumped further.
* Prune some comments and tidy up other minor thingsGravatar Michael Smith 2023-06-101-17/+11
|
* Adapt vote reset code into fast campaign resettingGravatar Michael Smith 2023-06-031-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is kind of a breaking change but the other code was obviously never released or relied on by anyone - it will be pushed at the same time as this in fact. It still seems worth having the original committed separately to show the progression of development of the feature, however. Technically the standalone vote cooldown resetting could also be added back if ever desired however there doesn't seem to be that much of a use case for that at the moment. This feature ought to be a lot more convenient now as it allows for resetting back to a set starting point no matter where the player is in a run. It isn't universally useful as All Campaigns Legacy solo runs require switching to a different type of server and Main Campaigns co-op runs require restarting the game after Swamp Fever to work around the god mode bug, however it is still useful in a good few situations. Unfortunately this turned out to be pretty complex to implement, first requiring a bunch of interop with valve's rather wacky KeyValues stuff, and then requiring a bunch of especially difficult reverse engineering of L4D1 v1.0.0.5 because it doesn't use said KeyValues stuff and does something else completely different instead. A side effect of all this work is that the nag removal hack is now part of the KeyValues stuff in kvsys.c, which is kind of a comfier place for it than just kind of dumped in the middle of sst.c.
* Improve os_dlfile() interfaceGravatar Michael Smith 2023-05-211-1/+1
| | | | | | Might as well return the length since we have it anyway. Also this maybe fixes the totally busted Linux code but it's still untested and probably doesn't work for reasons that will be discovered later on.
* Add a hack for features to distinguish VDF loadingGravatar Michael Smith 2023-05-171-0/+3
|
* Do some pedantic spring cleaningGravatar Michael Smith 2023-05-161-22/+1
| | | | | | | | | | | | | | | | | | | | | | | - Use const in more places where it makes sense - not absolutely everywhere because it can get a bit annoying - Make all the instruction search loops a bit more readable by casting the function pointer into a temporary variable to loop over - Add a few more doc comments and fix a typo or two - Make that RTTI thing flexibly-sized, finally - Don't include gamedata.h in vcall.h for no reason; consequently include gamedata.h in a bunch of places where it was implictly pulled in before - Fix dbg_toghidra() and ent_getedict() having mismatched return types between their headers and respective source files - Remove that one broken, hacky, secret Portal non-feature that probably nobody even ended up using; it can be implemented properly later if required
* Refactor the RGBA colour struct into engineapi.hGravatar Michael Smith 2023-05-041-5/+3
| | | | | | In both the engine and SST it's used in more places than just console printing, so it makes more sense to give it a more appropriate nanme and location.
* Fix deferred init for Portal 2 compatibilityGravatar Michael Smith 2023-01-151-28/+22
| | | | Thanks Bill for figuring out what the problem was.
* Add basic mouse input scalingGravatar Michael Smith 2022-12-251-32/+31
|
* Fix some lingering idiocyGravatar Michael Smith 2022-09-131-1/+0
| | | | | | Thanks Aciidz for pointing out the strings with no newline in them, and thanks Clang for warning me I wasn't using a function for ages while I was too lazy to delete it.
* Move towards C23, improve events and vcall macrosGravatar Michael Smith 2022-09-131-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add magical feature codegen system, at long lastGravatar Michael Smith 2022-08-101-54/+16
|
* Add event systemGravatar Michael Smith 2022-07-231-1/+7
|
* Split custom demo data into its own file/featureGravatar Michael Smith 2022-07-231-3/+3
| | | | Copyright note: the stuff Bill wrote is all still in the other file.
* Add stuff to track keypressesGravatar Willian Henrique 2022-07-231-1/+1
| | | | | | Committer's note: this is somewhat adapted from Bill's original code, written a while back, but he gets full credit for actually doing the hard part.
* Add keybind lookup codeGravatar Michael Smith 2022-07-231-1/+3
| | | | Also centralise NEXT_INSN macro, into its own header at least for now.
* Add alias management plus input filtering skeletonGravatar Michael Smith 2022-07-231-2/+7
| | | | | Some of the alias stuff was kind of stolen from earlier figuring-out Bill did. More Bill code is also on the way. :^)
* Add update detection, clean up minor stuffGravatar Michael Smith 2022-06-271-0/+28
|
* Solve the error logging situationGravatar Michael Smith 2022-06-021-18/+18
|
* Add basic Portal crosshair colour customisationGravatar Michael Smith 2022-05-301-4/+5
| | | | | | | | | | | Currently only works in 3420 and 5135 and uses hardcoded offsets with a byte pattern sanity check. Future work includes making it more widely compatible, and also doing the crazy thing I wanted to do but gave up on wherein the actual textures and stuff get patched in memory to sync up all the colours. Oh also, a couple of vtables were erroneously made executable, so I went ahead and fixed that while I was at it.
* Remove some dodgy whitespaceGravatar Michael Smith 2022-05-261-1/+1
|
* Fix wonky comparisons in CreateInterfaceGravatar Michael Smith 2022-05-251-1/+1
| | | | | A stupid, stupid bug I'd probably never have caught for years and years. Thanks Evan Lin in the Portal Discord for pointing it out!
* Properly solve load order issues via deferred initGravatar Michael Smith 2022-05-191-43/+86
|
* Add a quick stopgap hack for Portal purposesGravatar Michael Smith 2022-05-191-0/+24
| | | | | | | | | | People want to be able to write a scheduled-release passphrase to demos to prove that said demos were recorded during a timeboxed event. Ideally this is something that'd be part of the custom demo data and general RTA run management stuff that's planned, but of course that doesn't exist yet. When it does exist, we'd probably want rid of this nonsense, so it's marked hidden and I don't plan to document it anywhere "official." It's just here for people who really need it in the short term.
* Rerun L4D1 console spam fix after config loadingGravatar Michael Smith 2022-05-121-0/+16
| | | | | | This was the simplest way I could think of to solve this issue. Thanks again Aciidz for pointing the issue out, and thanks Turtle Rock for shipping such a broken game.
* Further clean up engine API initialisationGravatar Michael Smith 2022-05-121-8/+1
|
* Add entity property finding and L4D warp testingGravatar Michael Smith 2022-05-031-2/+3
| | | | | | | | 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-36/+32
| | | | | | | | | | | | | | | - 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-100/+99
|
* Add engine_no_focus_sleep backport, fix codegenGravatar Michael Smith 2022-04-251-14/+30
| | | | Default gamedata values actually work the way they're supposed to now.
* Fix some egregious and sloppy mistakesGravatar Michael Smith 2022-04-061-1/+1
| | | | | | Thanks Aciidz and Bill for spotting these. Lesson (ostensibly) learned: Don't program while sleep-deprived!
* Add auto VDF installationGravatar Michael Smith 2022-03-241-0/+81
| | | | Breaks the Linux build because I can't file paths brain I need sleeping
* Clean up gameinfo_init() and other random stuffGravatar Michael Smith 2022-03-241-10/+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.
* Work around plugin unloading bug in old branchesGravatar Michael Smith 2022-03-231-1/+70
| | | | | This also introduces some stuff for interacting with the current plugin list. Other plugin management utilies are Coming Soon...
* Add m_rawinput reimplementation to replace RInputGravatar Michael Smith 2022-03-211-1/+11
| | | | | It's archive so you can set m_rawinput 1, load SST via VDF and then never think about it again.
* Spruce up text and fix some copyright yearsGravatar Michael Smith 2022-03-191-2/+2
| | | | Sometimes, you just want to Unicode.
* Extend nag removal to L4DS tooGravatar Michael Smith 2022-01-181-1/+1
| | | | | This was a smaller oversight in the crash fix commit. I'd thought about it, but forgotten to do it.
* Tidy up stubs, make vstdlib a stub, build on LinuxGravatar Michael Smith 2022-01-061-23/+10
| | | | | | Important note: it doesn't WORK on Linux, and there's tons of warnings and stuff, but it's easier to work on when all the compiler output and whatnot is there.
* Add Windows release automation and bump to v0.2v0.2-BETAGravatar Michael Smith 2021-12-301-1/+1
| | | | Preparing for the January beta release.
* Add custom demo packet stuffGravatar Michael Smith 2021-12-271-0/+2
| | | | | This is more old code that wasn't part of the initial release. Figure I might as well throw it in for later.
* Reintroduce autojump codeGravatar Michael Smith 2021-12-271-2/+4
|
* Block the plugin nag dialog in newer L4D2 buildsGravatar Michael Smith 2021-12-271-1/+50
|
* Unhide useful commands and allow cheats in lobbiesGravatar Michael Smith 2021-12-261-0/+2
| | | | | | | | | | | | | This is done through a new "fixes" file which will probably become one of those silly dumping grounds that every project has to have somewhere to put random miscellaneous crap in. These are mainly hidden in L4D2 but they just get unilaterally unhidden if they exist, just to be sure they're accessible. As a bonus, it turns out that unhiding a single cvar also allows us to set sv_cheats 1 in Left 4 Dead 2, bringing an end to the need to port- forward a listen server for co-op practice.
* Initial public snapshotGravatar Michael Smith 2021-11-201-0/+206
With code from Bill. Thanks Bill!