Plugins: Add PreProcessBinary, PostProcessBinary, PostProcessAppModel
This commit is contained in:
@@ -259,7 +259,8 @@ namespace Il2CppInspector
|
|||||||
CodeRegistration = Image.ReadMappedObject<Il2CppCodeRegistration>(codeRegistration);
|
CodeRegistration = Image.ReadMappedObject<Il2CppCodeRegistration>(codeRegistration);
|
||||||
MetadataRegistration = Image.ReadMappedObject<Il2CppMetadataRegistration>(metadataRegistration);
|
MetadataRegistration = Image.ReadMappedObject<Il2CppMetadataRegistration>(metadataRegistration);
|
||||||
|
|
||||||
// TODO: Plugin hook PreProcessBinary
|
// Plugin hook to pre-process binary
|
||||||
|
isModified |= PluginHooks.PreProcessBinary(this).IsStreamModified;
|
||||||
|
|
||||||
// Do basic validatation that MetadataRegistration and CodeRegistration are sane
|
// Do basic validatation that MetadataRegistration and CodeRegistration are sane
|
||||||
/*
|
/*
|
||||||
@@ -381,7 +382,8 @@ namespace Il2CppInspector
|
|||||||
GenericMethodInvokerIndices.Add(MethodSpecs[tableEntry.genericMethodIndex], tableEntry.indices.invokerIndex);
|
GenericMethodInvokerIndices.Add(MethodSpecs[tableEntry.genericMethodIndex], tableEntry.indices.invokerIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Plugin hook PostProcessBinary
|
// Plugin hook to pre-process binary
|
||||||
|
isModified |= PluginHooks.PostProcessBinary(this).IsStreamModified;
|
||||||
}
|
}
|
||||||
|
|
||||||
// IL2CPP API exports
|
// IL2CPP API exports
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ namespace Il2CppInspector
|
|||||||
|
|
||||||
// Get all metadata strings
|
// Get all metadata strings
|
||||||
var pluginGetStringsResult = PluginHooks.GetStrings(this);
|
var pluginGetStringsResult = PluginHooks.GetStrings(this);
|
||||||
if (pluginGetStringsResult.FullyProcessed && !pluginGetStringsResult.IsInvalid)
|
if (pluginGetStringsResult.IsDataModified && !pluginGetStringsResult.IsInvalid)
|
||||||
Strings = pluginGetStringsResult.Strings;
|
Strings = pluginGetStringsResult.Strings;
|
||||||
|
|
||||||
else {
|
else {
|
||||||
@@ -247,7 +247,7 @@ namespace Il2CppInspector
|
|||||||
|
|
||||||
// Get all string literals
|
// Get all string literals
|
||||||
var pluginGetStringLiteralsResult = PluginHooks.GetStringLiterals(this);
|
var pluginGetStringLiteralsResult = PluginHooks.GetStringLiterals(this);
|
||||||
if (pluginGetStringLiteralsResult.FullyProcessed)
|
if (pluginGetStringLiteralsResult.IsDataModified)
|
||||||
StringLiterals = pluginGetStringLiteralsResult.StringLiterals.ToArray();
|
StringLiterals = pluginGetStringLiteralsResult.StringLiterals.ToArray();
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -272,7 +272,8 @@ namespace Il2CppInspector.Model
|
|||||||
// Restore stdout
|
// Restore stdout
|
||||||
Console.SetOut(stdout);
|
Console.SetOut(stdout);
|
||||||
|
|
||||||
// TODO: Plugin hook PostProcessAppModel
|
// Plugin hook to post-process model
|
||||||
|
PluginHooks.PostProcessAppModel(this);
|
||||||
|
|
||||||
// This is to allow this method to be chained after a new expression
|
// This is to allow this method to be chained after a new expression
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
Reference in New Issue
Block a user