From e5880fe5900af32f6e63e55f716a6d22bfd7b524 Mon Sep 17 00:00:00 2001 From: rexx <67599507+r-ex@users.noreply.github.com> Date: Fri, 20 May 2022 20:33:37 +0100 Subject: [PATCH] rename SQFuncRegistration to ScriptFunctionBinding_t --- r5dev/squirrel/sqvm.cpp | 2 +- r5dev/squirrel/sqvm.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/r5dev/squirrel/sqvm.cpp b/r5dev/squirrel/sqvm.cpp index 77cd1a42..cf405563 100644 --- a/r5dev/squirrel/sqvm.cpp +++ b/r5dev/squirrel/sqvm.cpp @@ -318,7 +318,7 @@ SQBool SQVM_LoadScript(HSQUIRRELVM v, const SQChar* szScriptPath, const SQChar* //--------------------------------------------------------------------------------- SQRESULT SQVM_RegisterFunction(HSQUIRRELVM v, const SQChar* szName, const SQChar* szHelpString, const SQChar* szRetValType, const SQChar* szArgTypes, void* pFunction) { - SQFuncRegistration* sqFunc = new SQFuncRegistration(); + ScriptFunctionBinding_t* sqFunc = new ScriptFunctionBinding_t(); sqFunc->m_szScriptName = szName; sqFunc->m_szNativeName = szName; diff --git a/r5dev/squirrel/sqvm.h b/r5dev/squirrel/sqvm.h index 68053aef..80489aae 100644 --- a/r5dev/squirrel/sqvm.h +++ b/r5dev/squirrel/sqvm.h @@ -37,7 +37,7 @@ struct SQVM }; typedef SQVM* HSQUIRRELVM; -struct SQFuncRegistration +struct ScriptFunctionBinding_t { const SQChar* m_szScriptName; // 00 const SQChar* m_szNativeName; // 08 @@ -57,9 +57,9 @@ struct SQFuncRegistration std::int32_t padding3; // 5C void* m_pFunction; // 60 - SQFuncRegistration() + ScriptFunctionBinding_t() { - memset(this, '\0', sizeof(SQFuncRegistration)); + memset(this, '\0', sizeof(ScriptFunctionBinding_t)); this->padding2 = 6; } }; @@ -91,7 +91,7 @@ inline CMemory p_SQVM_WarningCmd; inline auto v_SQVM_WarningCmd = p_SQVM_WarningCmd.RCast(); inline CMemory p_SQVM_RegisterFunc; -inline auto v_SQVM_RegisterFunc = p_SQVM_RegisterFunc.RCast(); +inline auto v_SQVM_RegisterFunc = p_SQVM_RegisterFunc.RCast(); inline CMemory p_SQVM_CompileError; inline auto v_SQVM_CompileError = p_SQVM_CompileError.RCast(); @@ -234,7 +234,7 @@ class HSQVM : public IDetour v_SQVM_LoadScript = p_SQVM_LoadScript.RCast(); /*48 8B C4 48 89 48 08 55 41 56 48 8D 68*/ v_SQVM_LoadRson = p_SQVM_LoadRson.RCast(); /*4C 8B DC 49 89 5B 08 57 48 81 EC A0 00 00 00 33*/ v_SQVM_WarningCmd = p_SQVM_WarningCmd.RCast(); /*40 53 48 83 EC 30 33 DB 48 8D 44 24 ?? 4C 8D 4C 24 ??*/ - v_SQVM_RegisterFunc = p_SQVM_RegisterFunc.RCast(); /*48 83 EC 38 45 0F B6 C8*/ + v_SQVM_RegisterFunc = p_SQVM_RegisterFunc.RCast(); /*48 83 EC 38 45 0F B6 C8*/ v_SQVM_CompileError = p_SQVM_CompileError.RCast(); /*48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 41 56 48 81 EC ? ? ? ? 48 8B D9 4C 8B F2*/ #if !defined (CLIENT_DLL) v_SQVM_InitializeSVGlobalScriptStructs = p_SQVM_InitializeSVGlobalScriptStructs.RCast(); /*48 89 74 24 ?? 57 48 83 EC 30 48 8B 3D ?? ?? ?? ?? 48 8B F1*/