From 513705e33f59273c5b463c0da874a0066e8d0589 Mon Sep 17 00:00:00 2001 From: F1F7Y <64418963+F1F7Y@users.noreply.github.com> Date: Fri, 7 Jul 2023 12:28:35 +0200 Subject: Memory class renaming (#469) - Renames `MemoryAddress` to `CMemoryAddress` - Renames `CMemoryAddress::As` to `CMemoryAddress::RCast` --- NorthstarDLL/squirrel/squirrel.cpp | 142 ++++++++++++++++++------------------- 1 file changed, 71 insertions(+), 71 deletions(-) (limited to 'NorthstarDLL/squirrel') diff --git a/NorthstarDLL/squirrel/squirrel.cpp b/NorthstarDLL/squirrel/squirrel.cpp index 3bb5c154..0dd23cd7 100644 --- a/NorthstarDLL/squirrel/squirrel.cpp +++ b/NorthstarDLL/squirrel/squirrel.cpp @@ -701,37 +701,37 @@ ON_DLL_LOAD_RELIESON("client.dll", ClientSquirrel, ConCommand, (CModule module)) { AUTOHOOK_DISPATCH_MODULE(client.dll) - g_pSquirrel->__sq_defconst = module.Offset(0x12120).As(); + g_pSquirrel->__sq_defconst = module.Offset(0x12120).RCast(); g_pSquirrel->__sq_defconst = g_pSquirrel->__sq_defconst; - g_pSquirrel->__sq_compilebuffer = module.Offset(0x3110).As(); - g_pSquirrel->__sq_pushroottable = module.Offset(0x5860).As(); - g_pSquirrel->__sq_compilefile = module.Offset(0xF950).As(); + g_pSquirrel->__sq_compilebuffer = module.Offset(0x3110).RCast(); + g_pSquirrel->__sq_pushroottable = module.Offset(0x5860).RCast(); + g_pSquirrel->__sq_compilefile = module.Offset(0xF950).RCast(); g_pSquirrel->__sq_compilebuffer = g_pSquirrel->__sq_compilebuffer; g_pSquirrel->__sq_pushroottable = g_pSquirrel->__sq_pushroottable; g_pSquirrel->__sq_compilefile = g_pSquirrel->__sq_compilefile; - g_pSquirrel->__sq_call = module.Offset(0x8650).As(); + g_pSquirrel->__sq_call = module.Offset(0x8650).RCast(); g_pSquirrel->__sq_call = g_pSquirrel->__sq_call; - g_pSquirrel->__sq_newarray = module.Offset(0x39F0).As(); - g_pSquirrel->__sq_arrayappend = module.Offset(0x3C70).As(); + g_pSquirrel->__sq_newarray = module.Offset(0x39F0).RCast(); + g_pSquirrel->__sq_arrayappend = module.Offset(0x3C70).RCast(); g_pSquirrel->__sq_newarray = g_pSquirrel->__sq_newarray; g_pSquirrel->__sq_arrayappend = g_pSquirrel->__sq_arrayappend; - g_pSquirrel->__sq_newtable = module.Offset(0x3960).As(); - g_pSquirrel->__sq_newslot = module.Offset(0x70B0).As(); + g_pSquirrel->__sq_newtable = module.Offset(0x3960).RCast(); + g_pSquirrel->__sq_newslot = module.Offset(0x70B0).RCast(); g_pSquirrel->__sq_newtable = g_pSquirrel->__sq_newtable; g_pSquirrel->__sq_newslot = g_pSquirrel->__sq_newslot; - g_pSquirrel->__sq_pushstring = module.Offset(0x3440).As(); - g_pSquirrel->__sq_pushinteger = module.Offset(0x36A0).As(); - g_pSquirrel->__sq_pushfloat = module.Offset(0x3800).As(); - g_pSquirrel->__sq_pushbool = module.Offset(0x3710).As(); - g_pSquirrel->__sq_pushasset = module.Offset(0x3560).As(); - g_pSquirrel->__sq_pushvector = module.Offset(0x3780).As(); - g_pSquirrel->__sq_pushobject = module.Offset(0x83D0).As(); - g_pSquirrel->__sq_raiseerror = module.Offset(0x8470).As(); + g_pSquirrel->__sq_pushstring = module.Offset(0x3440).RCast(); + g_pSquirrel->__sq_pushinteger = module.Offset(0x36A0).RCast(); + g_pSquirrel->__sq_pushfloat = module.Offset(0x3800).RCast(); + g_pSquirrel->__sq_pushbool = module.Offset(0x3710).RCast(); + g_pSquirrel->__sq_pushasset = module.Offset(0x3560).RCast(); + g_pSquirrel->__sq_pushvector = module.Offset(0x3780).RCast(); + g_pSquirrel->__sq_pushobject = module.Offset(0x83D0).RCast(); + g_pSquirrel->__sq_raiseerror = module.Offset(0x8470).RCast(); g_pSquirrel->__sq_pushstring = g_pSquirrel->__sq_pushstring; g_pSquirrel->__sq_pushinteger = g_pSquirrel->__sq_pushinteger; g_pSquirrel->__sq_pushfloat = g_pSquirrel->__sq_pushfloat; @@ -741,16 +741,16 @@ ON_DLL_LOAD_RELIESON("client.dll", ClientSquirrel, ConCommand, (CModule module)) g_pSquirrel->__sq_pushobject = g_pSquirrel->__sq_pushobject; g_pSquirrel->__sq_raiseerror = g_pSquirrel->__sq_raiseerror; - g_pSquirrel->__sq_getstring = module.Offset(0x60C0).As(); - g_pSquirrel->__sq_getinteger = module.Offset(0x60E0).As(); - g_pSquirrel->__sq_getfloat = module.Offset(0x6100).As(); - g_pSquirrel->__sq_getbool = module.Offset(0x6130).As(); - g_pSquirrel->__sq_get = module.Offset(0x7C30).As(); - g_pSquirrel->__sq_getasset = module.Offset(0x6010).As(); - g_pSquirrel->__sq_getuserdata = module.Offset(0x63D0).As(); - g_pSquirrel->__sq_getvector = module.Offset(0x6140).As(); - g_pSquirrel->__sq_getthisentity = module.Offset(0x12F80).As(); - g_pSquirrel->__sq_getobject = module.Offset(0x6160).As(); + g_pSquirrel->__sq_getstring = module.Offset(0x60C0).RCast(); + g_pSquirrel->__sq_getinteger = module.Offset(0x60E0).RCast(); + g_pSquirrel->__sq_getfloat = module.Offset(0x6100).RCast(); + g_pSquirrel->__sq_getbool = module.Offset(0x6130).RCast(); + g_pSquirrel->__sq_get = module.Offset(0x7C30).RCast(); + g_pSquirrel->__sq_getasset = module.Offset(0x6010).RCast(); + g_pSquirrel->__sq_getuserdata = module.Offset(0x63D0).RCast(); + g_pSquirrel->__sq_getvector = module.Offset(0x6140).RCast(); + g_pSquirrel->__sq_getthisentity = module.Offset(0x12F80).RCast(); + g_pSquirrel->__sq_getobject = module.Offset(0x6160).RCast(); g_pSquirrel->__sq_getstring = g_pSquirrel->__sq_getstring; g_pSquirrel->__sq_getinteger = g_pSquirrel->__sq_getinteger; g_pSquirrel->__sq_getfloat = g_pSquirrel->__sq_getfloat; @@ -762,27 +762,27 @@ ON_DLL_LOAD_RELIESON("client.dll", ClientSquirrel, ConCommand, (CModule module)) g_pSquirrel->__sq_getthisentity = g_pSquirrel->__sq_getthisentity; g_pSquirrel->__sq_getobject = g_pSquirrel->__sq_getobject; - g_pSquirrel->__sq_createuserdata = module.Offset(0x38D0).As(); - g_pSquirrel->__sq_setuserdatatypeid = module.Offset(0x6490).As(); + g_pSquirrel->__sq_createuserdata = module.Offset(0x38D0).RCast(); + g_pSquirrel->__sq_setuserdatatypeid = module.Offset(0x6490).RCast(); g_pSquirrel->__sq_createuserdata = g_pSquirrel->__sq_createuserdata; g_pSquirrel->__sq_setuserdatatypeid = g_pSquirrel->__sq_setuserdatatypeid; - g_pSquirrel->__sq_GetEntityConstant_CBaseEntity = module.Offset(0x3E49B0).As(); - g_pSquirrel->__sq_getentityfrominstance = module.Offset(0x114F0).As(); + g_pSquirrel->__sq_GetEntityConstant_CBaseEntity = module.Offset(0x3E49B0).RCast(); + g_pSquirrel->__sq_getentityfrominstance = module.Offset(0x114F0).RCast(); g_pSquirrel->__sq_GetEntityConstant_CBaseEntity = g_pSquirrel->__sq_GetEntityConstant_CBaseEntity; g_pSquirrel->__sq_getentityfrominstance = g_pSquirrel->__sq_getentityfrominstance; // Message buffer stuff g_pSquirrel->messageBuffer = g_pSquirrel->messageBuffer; - g_pSquirrel->__sq_getfunction = module.Offset(0x572FB0).As(); + g_pSquirrel->__sq_getfunction = module.Offset(0x572FB0).RCast(); g_pSquirrel->__sq_getfunction = g_pSquirrel->__sq_getfunction; - g_pSquirrel->__sq_stackinfos = module.Offset(0x35970).As(); + g_pSquirrel->__sq_stackinfos = module.Offset(0x35970).RCast(); g_pSquirrel->__sq_stackinfos = g_pSquirrel->__sq_stackinfos; // Structs - g_pSquirrel->__sq_pushnewstructinstance = module.Offset(0x5400).As(); - g_pSquirrel->__sq_sealstructslot = module.Offset(0x5530).As(); + g_pSquirrel->__sq_pushnewstructinstance = module.Offset(0x5400).RCast(); + g_pSquirrel->__sq_sealstructslot = module.Offset(0x5530).RCast(); g_pSquirrel->__sq_pushnewstructinstance = g_pSquirrel->__sq_pushnewstructinstance; g_pSquirrel->__sq_sealstructslot = g_pSquirrel->__sq_sealstructslot; @@ -817,7 +817,7 @@ ON_DLL_LOAD_RELIESON("client.dll", ClientSquirrel, ConCommand, (CModule module)) StubUnsafeSQFuncs(); StubUnsafeSQFuncs(); - g_pSquirrel->__sq_getfunction = module.Offset(0x6CB0).As(); + g_pSquirrel->__sq_getfunction = module.Offset(0x6CB0).RCast(); g_pSquirrel->__sq_getfunction = g_pSquirrel->__sq_getfunction; SquirrelFunctions s = {}; @@ -829,55 +829,55 @@ ON_DLL_LOAD_RELIESON("server.dll", ServerSquirrel, ConCommand, (CModule module)) { AUTOHOOK_DISPATCH_MODULE(server.dll) - g_pSquirrel->__sq_defconst = module.Offset(0x1F550).As(); + g_pSquirrel->__sq_defconst = module.Offset(0x1F550).RCast(); - g_pSquirrel->__sq_compilebuffer = module.Offset(0x3110).As(); - g_pSquirrel->__sq_pushroottable = module.Offset(0x5840).As(); - g_pSquirrel->__sq_call = module.Offset(0x8620).As(); - g_pSquirrel->__sq_compilefile = module.Offset(0x1CD80).As(); + g_pSquirrel->__sq_compilebuffer = module.Offset(0x3110).RCast(); + g_pSquirrel->__sq_pushroottable = module.Offset(0x5840).RCast(); + g_pSquirrel->__sq_call = module.Offset(0x8620).RCast(); + g_pSquirrel->__sq_compilefile = module.Offset(0x1CD80).RCast(); - g_pSquirrel->__sq_newarray = module.Offset(0x39F0).As(); - g_pSquirrel->__sq_arrayappend = module.Offset(0x3C70).As(); + g_pSquirrel->__sq_newarray = module.Offset(0x39F0).RCast(); + g_pSquirrel->__sq_arrayappend = module.Offset(0x3C70).RCast(); - g_pSquirrel->__sq_newtable = module.Offset(0x3960).As(); - g_pSquirrel->__sq_newslot = module.Offset(0x7080).As(); + g_pSquirrel->__sq_newtable = module.Offset(0x3960).RCast(); + g_pSquirrel->__sq_newslot = module.Offset(0x7080).RCast(); - g_pSquirrel->__sq_pushstring = module.Offset(0x3440).As(); - g_pSquirrel->__sq_pushinteger = module.Offset(0x36A0).As(); - g_pSquirrel->__sq_pushfloat = module.Offset(0x3800).As(); - g_pSquirrel->__sq_pushbool = module.Offset(0x3710).As(); - g_pSquirrel->__sq_pushasset = module.Offset(0x3560).As(); - g_pSquirrel->__sq_pushvector = module.Offset(0x3780).As(); - g_pSquirrel->__sq_pushobject = module.Offset(0x83A0).As(); + g_pSquirrel->__sq_pushstring = module.Offset(0x3440).RCast(); + g_pSquirrel->__sq_pushinteger = module.Offset(0x36A0).RCast(); + g_pSquirrel->__sq_pushfloat = module.Offset(0x3800).RCast(); + g_pSquirrel->__sq_pushbool = module.Offset(0x3710).RCast(); + g_pSquirrel->__sq_pushasset = module.Offset(0x3560).RCast(); + g_pSquirrel->__sq_pushvector = module.Offset(0x3780).RCast(); + g_pSquirrel->__sq_pushobject = module.Offset(0x83A0).RCast(); - g_pSquirrel->__sq_raiseerror = module.Offset(0x8440).As(); + g_pSquirrel->__sq_raiseerror = module.Offset(0x8440).RCast(); - g_pSquirrel->__sq_getstring = module.Offset(0x60A0).As(); - g_pSquirrel->__sq_getinteger = module.Offset(0x60C0).As(); - g_pSquirrel->__sq_getfloat = module.Offset(0x60E0).As(); - g_pSquirrel->__sq_getbool = module.Offset(0x6110).As(); - g_pSquirrel->__sq_getasset = module.Offset(0x5FF0).As(); - g_pSquirrel->__sq_getuserdata = module.Offset(0x63B0).As(); - g_pSquirrel->__sq_getvector = module.Offset(0x6120).As(); - g_pSquirrel->__sq_get = module.Offset(0x7C00).As(); + g_pSquirrel->__sq_getstring = module.Offset(0x60A0).RCast(); + g_pSquirrel->__sq_getinteger = module.Offset(0x60C0).RCast(); + g_pSquirrel->__sq_getfloat = module.Offset(0x60E0).RCast(); + g_pSquirrel->__sq_getbool = module.Offset(0x6110).RCast(); + g_pSquirrel->__sq_getasset = module.Offset(0x5FF0).RCast(); + g_pSquirrel->__sq_getuserdata = module.Offset(0x63B0).RCast(); + g_pSquirrel->__sq_getvector = module.Offset(0x6120).RCast(); + g_pSquirrel->__sq_get = module.Offset(0x7C00).RCast(); - g_pSquirrel->__sq_getthisentity = module.Offset(0x203B0).As(); - g_pSquirrel->__sq_getobject = module.Offset(0x6140).As(); + g_pSquirrel->__sq_getthisentity = module.Offset(0x203B0).RCast(); + g_pSquirrel->__sq_getobject = module.Offset(0x6140).RCast(); - g_pSquirrel->__sq_createuserdata = module.Offset(0x38D0).As(); - g_pSquirrel->__sq_setuserdatatypeid = module.Offset(0x6470).As(); + g_pSquirrel->__sq_createuserdata = module.Offset(0x38D0).RCast(); + g_pSquirrel->__sq_setuserdatatypeid = module.Offset(0x6470).RCast(); - g_pSquirrel->__sq_GetEntityConstant_CBaseEntity = module.Offset(0x418AF0).As(); - g_pSquirrel->__sq_getentityfrominstance = module.Offset(0x1E920).As(); + g_pSquirrel->__sq_GetEntityConstant_CBaseEntity = module.Offset(0x418AF0).RCast(); + g_pSquirrel->__sq_getentityfrominstance = module.Offset(0x1E920).RCast(); g_pSquirrel->logger = NS::log::SCRIPT_SV; // Message buffer stuff - g_pSquirrel->__sq_getfunction = module.Offset(0x6C85).As(); - g_pSquirrel->__sq_stackinfos = module.Offset(0x35920).As(); + g_pSquirrel->__sq_getfunction = module.Offset(0x6C85).RCast(); + g_pSquirrel->__sq_stackinfos = module.Offset(0x35920).RCast(); // Structs - g_pSquirrel->__sq_pushnewstructinstance = module.Offset(0x53e0).As(); - g_pSquirrel->__sq_sealstructslot = module.Offset(0x5510).As(); + g_pSquirrel->__sq_pushnewstructinstance = module.Offset(0x53e0).RCast(); + g_pSquirrel->__sq_sealstructslot = module.Offset(0x5510).RCast(); MAKEHOOK( module.Offset(0x1DD10), -- cgit v1.2.3