Added compiler wrappers and detours

This commit is contained in:
ineed bots
2023-09-08 12:55:24 -06:00
parent 4bddc60b05
commit d57945fece
5 changed files with 5078 additions and 20 deletions

View File

@ -14,23 +14,6 @@ namespace game
}
}
// void __usercall ScriptCompile(scriptInstance_t inst@<eax>, sval_u a2, unsigned int filePosId, unsigned int fileCountId, unsigned int scriptId, PrecacheEntry *entries, int entriesCount)
void ScriptCompile(scriptInstance_t inst, sval_u val, unsigned int filePosId, unsigned int fileCountId, unsigned int scriptId, PrecacheEntry * entries, int entriesCount, void* call_addr)
{
__asm
{
push entriesCount;
push entries;
push scriptId;
push fileCountId;
push filePosId;
push val;
mov eax, inst;
call call_addr;
add esp, 0x18;
}
}
// void __usercall Scr_LoadAnimTreeAtIndex(scriptInstance_t inst@<ecx>, int a2@<eax>, int a3, int (__cdecl *a4)(int), int a5)
void Scr_LoadAnimTreeAtIndex(scriptInstance_t inst, int user, unsigned int index, void* (__cdecl* Alloc)(int), int modCheckSum, void* call_addr)
{