From 2c5e34c72442c734608e44c91074d3eef822491b Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Wed, 9 Sep 2020 17:49:05 +0200 Subject: [PATCH] C++: Output *__TypeInfo double-indirected to avoid having to call init_il2cpp() repeatedly --- .../Properties/Resources.Designer.cs | 5 ++--- Il2CppInspector.Common/Properties/Resources.resx | 10 +++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Il2CppInspector.Common/Properties/Resources.Designer.cs b/Il2CppInspector.Common/Properties/Resources.Designer.cs index 3feb28f..261cc07 100644 --- a/Il2CppInspector.Common/Properties/Resources.Designer.cs +++ b/Il2CppInspector.Common/Properties/Resources.Designer.cs @@ -307,8 +307,7 @@ namespace Il2CppInspector.Properties { /// <Filter>framework</Filter> /// </ClCompile> /// <ClCompile Include="framework\il2cpp-init.cpp"> - /// <Filter>framework</Filter> - /// [rest of string was truncated]";. + /// <Filter>framework< [rest of string was truncated]";. /// internal static string CppProjFilters { get { @@ -328,7 +327,7 @@ namespace Il2CppInspector.Properties { /// <Configuration>Release</Configuration> /// <Platform>Win32</Platform> /// </ProjectConfiguration> - /// <ProjectConfiguration [rest of string was truncated]";. + /// <ProjectCon [rest of string was truncated]";. /// internal static string CppProjTemplate { get { diff --git a/Il2CppInspector.Common/Properties/Resources.resx b/Il2CppInspector.Common/Properties/Resources.resx index 11bf449..4bd51e7 100644 --- a/Il2CppInspector.Common/Properties/Resources.resx +++ b/Il2CppInspector.Common/Properties/Resources.resx @@ -314,6 +314,7 @@ void Run() <ClInclude Include="appdata\il2cpp-api-functions.h" /> <ClInclude Include="appdata\il2cpp-api-functions-ptr.h" /> <ClInclude Include="appdata\il2cpp-functions.h" /> + <ClInclude Include="appdata\il2cpp-metadata-version.h" /> <ClInclude Include="appdata\il2cpp-types-ptr.h" /> <ClInclude Include="appdata\il2cpp-types.h" /> <ClInclude Include="framework\helpers.h" /> @@ -1180,7 +1181,7 @@ namespace app { #undef DO_APP_FUNC // TypeInfo pointers -#define DO_TYPEDEF(a, n) extern n ## __Class* n ## __TypeInfo +#define DO_TYPEDEF(a, n) extern n ## __Class** n ## __TypeInfo namespace app { #include "il2cpp-types-ptr.h" } @@ -1209,7 +1210,7 @@ namespace app { #undef DO_APP_FUNC // TypeInfo pointers -#define DO_TYPEDEF(a, n) n ## __Class* n ## __TypeInfo +#define DO_TYPEDEF(a, n) n ## __Class** n ## __TypeInfo namespace app { #include "il2cpp-types-ptr.h" } @@ -1234,7 +1235,7 @@ void init_il2cpp() #undef DO_APP_FUNC // Define TypeInfo variables - #define DO_TYPEDEF(a, n) n ## __TypeInfo = *(n ## __Class**) (baseAddress + a); + #define DO_TYPEDEF(a, n) n ## __TypeInfo = (n ## __Class**) (baseAddress + a); #include "il2cpp-types-ptr.h" #undef DO_TYPEDEF } @@ -1303,6 +1304,9 @@ void Run(); <ClInclude Include="appdata\il2cpp-functions.h"> <Filter>appdata</Filter> </ClInclude> + <ClInclude Include="appdata\il2cpp-metadata-version.h"> + <Filter>appdata</Filter> + </ClInclude> <ClInclude Include="appdata\il2cpp-types.h"> <Filter>appdata</Filter> </ClInclude>