From af370088fc178996a46ee508aaa1a2c46318bbf2 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 26 Dec 2025 23:12:11 +0000 Subject: Move to static trampolines and type-safe hooks For some reason the DLL got a tiny little bit bigger again but that's fine. This will make orig_ calls more efficient in the inline case, and also make it harder to screw up and hook the wrong thing by mistake. Self-explanatory-ish, apart from the fact it's a fairly large API change of course. And it relies on some more bonkers assembler directive hackery. But it works! The only complaint one might have is that the featsetup functions no longer take an explicit string which occasionally yields slightly less perfect error messages, but I've decided this isn't really a problem and makes the API nicer to use. It's a tradeoff, innit. --- compile.bat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compile.bat') diff --git a/compile.bat b/compile.bat index 518fd5d..2958186 100644 --- a/compile.bat +++ b/compile.bat @@ -90,7 +90,6 @@ setlocal DisableDelayedExpansion :+ gameserver.c :+ hexcolour.c :+ hook.c -:+ hook.S :+ hud.c :+ inputhud.c :+ kvsys.c @@ -109,7 +108,10 @@ setlocal DisableDelayedExpansion :+ trace.c :+ xhair.c :: just tack these on, whatever (repeated condition because of expansion memes) -if "%dbg%"=="1" set src=%src% src/dbg.c +if "%dbg%"=="1" ( + set src=%src% src/dbg.c + set metasrc=%metasrc% src/dbg.c +) if "%dbg%"=="1" set src=%src% src/udis86.c if "%dbg%"=="0" set src=%src% src/wincrt.c -- cgit v1.2.3-54-g00ecf