2019-06-01, 01:17 AM
Just got this working:
There's still a little way to go automatically detecting and installing the hooks, but the hard part is done.
PHP Code:
HOOK_NATIVE__ printf(const str[], GLOBAL_TAG_TYPES:...)
{
printf("a__ = %d", a__);
printf("f__ = %d", f__);
printf("(%s, %d...)", str, numargs() - 3);
// Need to make this nicer - it won't currently work if any other parameter
// has an underscore in. This secretly adjusts the number given to ` 2` to
// account for the two extra parameters.
return continue(str, ___(1));
}
There's still a little way to go automatically detecting and installing the hooks, but the hard part is done.