summaryrefslogtreecommitdiffhomepage
path: root/src/sst.c
AgeCommit message (Collapse)Author
2023-05-17Add a hack for features to distinguish VDF loadingMichael Smith
2023-05-16Do some pedantic spring cleaningMichael Smith
- 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
2023-05-04Refactor the RGBA colour struct into engineapi.hMichael Smith
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.
2023-01-15Fix deferred init for Portal 2 compatibilityMichael Smith
Thanks Bill for figuring out what the problem was.
2022-12-25Add basic mouse input scalingMichael Smith
2022-09-13Fix some lingering idiocyMichael Smith
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.
2022-09-13Move towards C23, improve events and vcall macrosMichael Smith
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.
2022-08-10Add magical feature codegen system, at long lastMichael Smith
2022-07-23Add event systemMichael Smith
2022-07-23Split custom demo data into its own file/featureMichael Smith
Copyright note: the stuff Bill wrote is all still in the other file.
2022-07-23Add stuff to track keypressesWillian Henrique
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.
2022-07-23Add keybind lookup codeMichael Smith
Also centralise NEXT_INSN macro, into its own header at least for now.
2022-07-23Add alias management plus input filtering skeletonMichael Smith
Some of the alias stuff was kind of stolen from earlier figuring-out Bill did. More Bill code is also on the way. :^)
2022-06-27Add update detection, clean up minor stuffMichael Smith
2022-06-02Solve the error logging situationMichael Smith
2022-05-30Add basic Portal crosshair colour customisationMichael Smith
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.
2022-05-26Remove some dodgy whitespaceMichael Smith
2022-05-25Fix wonky comparisons in CreateInterfaceMichael Smith
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!
2022-05-19Properly solve load order issues via deferred initMichael Smith
2022-05-19Add a quick stopgap hack for Portal purposesMichael Smith
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.
2022-05-12Rerun L4D1 console spam fix after config loadingMichael Smith
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.
2022-05-12Further clean up engine API initialisationMichael Smith
2022-05-03Add entity property finding and L4D warp testingMichael Smith
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.
2022-04-30Centralise engine access, add Portal FOV changerMichael Smith
- 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")
2022-04-26Reorganise sst.c, add Portal 1 game typeMichael Smith
2022-04-25Add engine_no_focus_sleep backport, fix codegenMichael Smith
Default gamedata values actually work the way they're supposed to now.
2022-04-06Fix some egregious and sloppy mistakesMichael Smith
Thanks Aciidz and Bill for spotting these. Lesson (ostensibly) learned: Don't program while sleep-deprived!
2022-03-24Add auto VDF installationMichael Smith
Breaks the Linux build because I can't file paths brain I need sleeping
2022-03-24Clean up gameinfo_init() and other random stuffMichael Smith
- 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.
2022-03-23Work around plugin unloading bug in old branchesMichael Smith
This also introduces some stuff for interacting with the current plugin list. Other plugin management utilies are Coming Soon...
2022-03-21Add m_rawinput reimplementation to replace RInputMichael Smith
It's archive so you can set m_rawinput 1, load SST via VDF and then never think about it again.
2022-03-19Spruce up text and fix some copyright yearsMichael Smith
Sometimes, you just want to Unicode.
2022-01-18Extend nag removal to L4DS tooMichael Smith
This was a smaller oversight in the crash fix commit. I'd thought about it, but forgotten to do it.
2022-01-06Tidy up stubs, make vstdlib a stub, build on LinuxMichael Smith
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.
2021-12-30Add Windows release automation and bump to v0.2v0.2-BETAMichael Smith
Preparing for the January beta release.
2021-12-27Add custom demo packet stuffMichael Smith
This is more old code that wasn't part of the initial release. Figure I might as well throw it in for later.
2021-12-27Reintroduce autojump codeMichael Smith
2021-12-27Block the plugin nag dialog in newer L4D2 buildsMichael Smith
2021-12-26Unhide useful commands and allow cheats in lobbiesMichael Smith
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.
2021-11-20Initial public snapshotMichael Smith
With code from Bill. Thanks Bill!