aboutsummaryrefslogtreecommitdiff
path: root/src/hook.c
Commit message (Collapse)AuthorAgeFilesLines
* Rethink mem_loadoffset, and consequently, kill itGravatar Michael Smith 2024-01-211-3/+3
| | | | | | | | | 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.
* Get things at least compiling under LinuxGravatar Michael Smith 2023-08-271-25/+20
| | | | | | | | | | | Nothing really works yet, but at least test.h and fastspin are fixed and some of the issues with RTTI and libdl and stuff are maybe kind of sorted, subject to more testing later. The main issue now seems to be the cvar interface not quite lining up and crashing pretty much immediately. That'll probably take a lot more debugging to figure out, which likely still won't be a priority for quite a while.
* Prune some comments and tidy up other minor thingsGravatar Michael Smith 2023-06-101-3/+3
|
* Do some pedantic spring cleaningGravatar Michael Smith 2023-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | - 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
* Add magical feature codegen system, at long lastGravatar Michael Smith 2022-08-101-1/+1
|
* Add update detection, clean up minor stuffGravatar Michael Smith 2022-06-271-5/+11
|
* Solve the error logging situationGravatar Michael Smith 2022-06-021-3/+7
|
* Clean up some random bits and bobsGravatar Michael Smith 2022-05-161-2/+4
|
* Replace udis86 with a very small x86 decoderGravatar Michael Smith 2022-04-241-25/+22
| | | | | | | | | | | | | | | | | | | | | | | | | hook_inline() uses the new x86_len() function to get instruction lengths instead of doing full-blown disassembly, which should be a tiny bit quicker, and also removes the next for about 90KiB of lookup tables and such in the final binary. The code-digging logic in demorecord is also rewritten to be opcode-based rather than mnenmonic based. In general, going forward the plan is to always rely on opcodes and thus avoid a bunch of disassembly work every plugin load. udis86 is still in the tree for now to provide dbg_asmdump(), but it's only compiled into debug builds and left out of releases completely. As such, the whole BSD licence statement is also gone from the distribution LICENCE files. There's now also a dbg_toghidra() which spits out a rebased address to look stuff up for proper reverse engineering, which might be more useful than dbg_asmdump() anyway. If nobody ends up using the latter ever again, udis86 could get chucked completely. We'll see. Also shoehorned into this commit are a couple more forgotten copyright year bumps and some general minor cleanup here and there, because I couldn't be bothered wading through all the diff hunks. Oh, and makebindist.bat now makes an effort to make the zip file timestamps predictable/reproducible. That should be a different commit for sure, but oh well too bad.
* Clean up gameinfo_init() and other random stuffGravatar Michael Smith 2022-03-241-2/+2
| | | | | | | | | | | | | | | - 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.
* Make inline hooking follow jumpsGravatar Michael Smith 2022-03-211-4/+13
|
* Fix hook_inline() breaking after a single callGravatar Willian Henrique 2022-03-191-2/+4
| | | | Committer note: I, mike, am a big dumb idiot. Thanks, Bill.
* Spruce up text and fix some copyright yearsGravatar Michael Smith 2022-03-191-1/+1
| | | | Sometimes, you just want to Unicode.
* Initial public snapshotGravatar Michael Smith 2021-11-201-0/+99
With code from Bill. Thanks Bill!