aboutsummaryrefslogtreecommitdiff
path: root/src/l4d1democompat.c
Commit message (Collapse)AuthorAgeFilesLines
* Tidy up some extensions and remove some ifdefsGravatar Michael Smith 2025-08-031-8/+1
| | | | | | | | | | | | | | | | | | | | | Since this codebase is already extremely nonportable, I've decided to relax the obsessive ifdef-else-error usage around all the extensions. From now on, if there's no alternative to using an extension, we can just use that extension. If it's possible to do something in a relatively portable way, we can still try to do that in order to make the code somewhat reusable, in contexts where that makes sense. I also decided to use langext.h for naked functions and tail calls. If that's used in another codebase build with a different compiler, those just won't work, but that's fine. The benefit is really just that there's less ceremony in places where those are used, because it's likely there'll be a few more such places in the future, and it gets annoying reading all the double-underscore stuff all over the place. I still kind of want to do something about all the _WIN32 ifdefs too, but I've realised that doing so will lead to almost nothing actually being built on Linux. Then again, none of it currently runs on Linux so I guess that's a moot point. Will worry about it later, anyway.
* Use shorter spellings of __asm and __attributeGravatar Michael Smith 2025-08-031-2/+2
| | | | | | | Turns out, there's no need for the trailing underscores. Plus, glibc does some stupid stuff with __attribute__ for non-GCC compilers. Not that that matters here, but it seems like a good practice just to use the forms that never have such problems. And it's shorter too.
* Switch to Intel assembly syntaxGravatar Michael Smith 2025-08-031-6/+6
|
* Make additional use of untyped command callbacksGravatar Michael Smith 2025-08-021-3/+2
|
* Fix L4D1 crash for yet another immediate bugfix releasev0.10-BETAGravatar Michael Smith 2025-05-091-1/+1
| | | | | Every. Single. Time. And having screwed up the zip dates was just a bonus I suppose.
* Add type-safety to virtual calls and accessorsGravatar Michael Smith 2025-04-171-2/+3
| | | | | | | | | | | | This probably should have been the design from the start. It's still possible to use void pointers, and this is done in a couple of places for simplicity, but wherever possible, we have actual structs for things now. Additionally, in places where vtables are fiddled with, e.g. vtable hooks, we have actual struct definitions with vtable pointers so there's need for pointer-casting horror.
* Rework API for inline hookingGravatar Michael Smith 2025-04-161-22/+15
| | | | | | | | | | | | | This both simplifies and complicates things, but probably hopefully maybe simplifies things overall. Certainly in cases like the L4D1 demo thing where there's 3 inline hooks at once, it seems simpler to be able to batch the fallible stuff to avoid rollbacks. In cases where you only need one hook, it's a bit more verbose, but what can you do. Thanks bill for discussing this with me pretty exhaustively and giving a lot of good input. I think both of us still kind of hate it actually.
* Fix mistakes I made integrating Hayden's old codeGravatar Michael Smith 2025-04-091-5/+5
| | | | | Doesn't matter how many history rewrites I do before pushing my local branch, there will always be something I still got wrong.
* 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.
* Make Steam L4D1 demos backwards-compatibleGravatar Hayden K 2025-04-061-0/+186