mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-07-04 02:01:54 +00:00
Added yacc and animtree detours
This commit is contained in:
73
src/game/clientscript/cscr_yacc_w.cpp
Normal file
73
src/game/clientscript/cscr_yacc_w.cpp
Normal file
@ -0,0 +1,73 @@
|
||||
#include <stdinc.hpp>
|
||||
//#include "codsrc/clientscript/cscr_yacc.hpp"
|
||||
|
||||
namespace game
|
||||
{
|
||||
// unsigned int __usercall LowerCase@<eax>(unsigned int strVal@<ecx>)
|
||||
unsigned int LowerCase(unsigned int strVal, void* call_addr)
|
||||
{
|
||||
unsigned int answer;
|
||||
|
||||
__asm
|
||||
{
|
||||
mov ecx, strVal;
|
||||
call call_addr;
|
||||
mov answer, eax;
|
||||
}
|
||||
|
||||
return answer;
|
||||
}
|
||||
|
||||
// int __usercall StringValue@<eax>(int len@<ecx>, const char *str@<edx>)
|
||||
int StringValue(int len, const char* str_, void* call_addr)
|
||||
{
|
||||
int answer;
|
||||
|
||||
__asm
|
||||
{
|
||||
mov ecx, len;
|
||||
mov edx, str_;
|
||||
call call_addr;
|
||||
mov answer, eax;
|
||||
}
|
||||
|
||||
return answer;
|
||||
}
|
||||
|
||||
// int __usercall yy_try_NUL_trans@<eax>(int yy_current_state@<eax>)
|
||||
int yy_try_NUL_trans(int yy_current_state, void* call_addr)
|
||||
{
|
||||
int answer;
|
||||
|
||||
__asm
|
||||
{
|
||||
mov eax, yy_current_state;
|
||||
call call_addr;
|
||||
mov answer, eax;
|
||||
}
|
||||
|
||||
return answer;
|
||||
}
|
||||
|
||||
// void __usercall yy_flush_buffer(yy_buffer_state *result@<eax>)
|
||||
void yy_flush_buffer(yy_buffer_state* result, void* call_addr)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov eax, result;
|
||||
call call_addr;
|
||||
}
|
||||
}
|
||||
|
||||
// void __usercall ScriptParse(scriptInstance_t a1@<eax>, sval_u *parseData)
|
||||
void ScriptParse(scriptInstance_t a1, sval_u* parseData, void* call_addr)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
push parseData;
|
||||
mov eax, a1;
|
||||
call call_addr;
|
||||
add esp, 0x4;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user