aboutsummaryrefslogtreecommitdiff
path: root/src/portalcolours.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove years from copyright headersGravatar Michael Smith 2025-04-071-1/+1
| | | | | | | | 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.
* Rewrite and redesign codegen and feature systemGravatar Michael Smith 2025-04-061-22/+12
| | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+4
| | | | | | | | | 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!
* Add a half-decent custom crosshairGravatar Michael Smith 2024-01-211-38/+9
|
* Perform very minor load/unload optimisationsGravatar Michael Smith 2023-08-301-0/+1
| | | | Because why not.
* Only register portal colour cvars in PortalGravatar Michael Smith 2023-08-301-4/+8
|
* Refactor the RGBA colour struct into engineapi.hGravatar Michael Smith 2023-05-041-8/+6
| | | | | | 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.
* Move towards C23, improve events and vcall macrosGravatar Michael Smith 2022-09-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+11
|
* Solve the error logging situationGravatar Michael Smith 2022-06-021-3/+3
|
* Add last-minute SteamPipe Portal colour supportv0.4-BETAGravatar Michael Smith 2022-05-311-0/+5
|
* Add basic Portal crosshair colour customisationGravatar Michael Smith 2022-05-301-0/+147
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.