Commit Graph

9 Commits

Author SHA1 Message Date
Peace-Maker
891fa5352e Add support for the "fastcall" calling convention
Callee cleans the stack and first two arguments are passed in registers ecx and edx.
You could emulate this by choosing stdcall and setting the custom_registers on the arguments manually, but this is easier.
2019-06-20 02:14:07 +02:00
Peace-Maker
e0583c514b Fix adding arguments multiple times when reloading a gamedata file
If the Functions section was parsed before and the gamedata file is loaded again,
the arguments were all added again instead of keeping the old number of arguments.
2018-08-08 01:01:56 +02:00
Peace-Maker
50390f48e7 Fix defining virtual hooks in gamedata "Functions" section #1
The "offset" key wasn't included in the validation of having the target function set.
2018-05-20 10:48:56 +02:00
Peace-Maker
3e2471f93a Fix saving arguments in wrong order when parsing "Functions" section in gamedata
ke::HashMap doesn't keep the order the elements are added of course. Switch to a vector structure instead.
2018-04-21 11:50:07 +02:00
Peace-Maker
dc12453b02 Fix build against SourceMod 1.9 2018-04-21 10:16:20 +02:00
Peace-Maker
556290e088 Fix typos in "Functions" section parsing
Some registers were upper case and HookParamType_CBaseEntity didn't follow the naming scheme of the other types.
2018-04-21 09:40:17 +02:00
Peace-Maker
cd5b306d48 Fix linux build with clang 2018-04-18 00:47:45 +02:00
Peace-Maker
b365b775c9 Fix linux build 2018-01-27 17:24:02 +01:00
Peace-Maker
aa3018a27d Add support to define function signatures in gamedata
A "Functions" section is parsed in gamedata files that allow you to define the signature of functions including metadata like the calling convention and specifying the register an argument is passed in.
A new native DHookCreateFromConf can be used to setup a hook or detour from one of that function sections in the "Functions" section.
2018-01-25 17:18:30 +01:00