C++: Output *__TypeInfo double-indirected to avoid having to call init_il2cpp() repeatedly

This commit is contained in:
Katy Coe
2020-09-09 17:49:05 +02:00
parent d81cf7fef6
commit 2c5e34c724
2 changed files with 9 additions and 6 deletions

View File

@@ -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]";.
/// </summary>
internal static string CppProjFilters {
get {
@@ -328,7 +327,7 @@ namespace Il2CppInspector.Properties {
/// &lt;Configuration&gt;Release&lt;/Configuration&gt;
/// &lt;Platform&gt;Win32&lt;/Platform&gt;
/// &lt;/ProjectConfiguration&gt;
/// &lt;ProjectConfiguration [rest of string was truncated]&quot;;.
/// &lt;ProjectCon [rest of string was truncated]&quot;;.
/// </summary>
internal static string CppProjTemplate {
get {

View File

@@ -314,6 +314,7 @@ void Run()
&lt;ClInclude Include="appdata\il2cpp-api-functions.h" /&gt;
&lt;ClInclude Include="appdata\il2cpp-api-functions-ptr.h" /&gt;
&lt;ClInclude Include="appdata\il2cpp-functions.h" /&gt;
&lt;ClInclude Include="appdata\il2cpp-metadata-version.h" /&gt;
&lt;ClInclude Include="appdata\il2cpp-types-ptr.h" /&gt;
&lt;ClInclude Include="appdata\il2cpp-types.h" /&gt;
&lt;ClInclude Include="framework\helpers.h" /&gt;
@@ -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
}</value>
@@ -1303,6 +1304,9 @@ void Run();</value>
&lt;ClInclude Include="appdata\il2cpp-functions.h"&gt;
&lt;Filter&gt;appdata&lt;/Filter&gt;
&lt;/ClInclude&gt;
&lt;ClInclude Include="appdata\il2cpp-metadata-version.h"&gt;
&lt;Filter&gt;appdata&lt;/Filter&gt;
&lt;/ClInclude&gt;
&lt;ClInclude Include="appdata\il2cpp-types.h"&gt;
&lt;Filter&gt;appdata&lt;/Filter&gt;
&lt;/ClInclude&gt;