This is a large refactor that splits our mega-template into a few smaller ones. First off, the PLUGIN_GLOBALVARS() helpers were put in the SourceHook namespace.
- HookHandlerImpl: Responsible for the lowered delegates (post-vafmt), can be used independently of other templates added here. Relies on parent HookManager class to handle the unlowered original invocation logic. (As a template parameter)
- HookCoreImpl: Adds a public interface & glue layer beterrn managers and HookHandlerImpl
- HookImpl: non-varardic hook manager
- FmtHookImpl: format-string hook manager
FmtHookImpl was tested by hooking IVEngineServer::ClientCommand.
This allows us to specify the SH pointer and the Plugin ID pointer in the template, so when the plugin uses Hook<> it doesn't have to touch g_PLID or g_SHPtr.
Also added a little struct that wraps ISourceHook->xHookById methods.
Introduces one massive template for generating SourceHook managers.
The goal is for this to simplify the definition of SourceHooks long-term by replacing macros with templates.
This introduces some new templates for metaprogramming, but they're hidden away in the SourceHook::metaprogramming namespace.
Tested on Windows 32 bit and Linux 32 bit TF2.
Rather than hardcode a bunch of SDK stuff, this is an attempt to move
SDK information to a declarative model. Each SDK gets a manifest, and
the manifests are stored in a shared repository.
Manifests encode stuff like "what platforms does this SDK build on" and
"what link flags do I need on each architecture".
This will hopefully reduce the complexity of the build scripts, since
going forward we only have to add new manifests, rather than figure out
how to attach more gunk into the build logic.
Current implementation isn't used anywhere in the s2 provider and due to the removal of MemAllocScratch & MemFreeScratch I guess this could be obsoleted