Plugins: Add hook TODOs

This commit is contained in:
Katy Coe
2020-12-21 23:02:32 +01:00
parent 3e27cd25e9
commit b9409e7425
7 changed files with 18 additions and 0 deletions

View File

@@ -183,6 +183,8 @@ namespace Il2CppInspector.CLI
// Enable plugin // Enable plugin
PluginManager.AsInstance.ManagedPlugins.First(p => p.Plugin == plugin).Enabled = true; PluginManager.AsInstance.ManagedPlugins.First(p => p.Plugin == plugin).Enabled = true;
// TODO: Plugin hook OptionsChanged
} }
return true; return true;
} }

View File

@@ -197,7 +197,12 @@ namespace Il2CppInspector
private bool InitImpl(LoadOptions loadOptions, EventHandler<string> statusCallback) { private bool InitImpl(LoadOptions loadOptions, EventHandler<string> statusCallback) {
LoadOptions = loadOptions; LoadOptions = loadOptions;
OnStatusUpdate = statusCallback; OnStatusUpdate = statusCallback;
// TODO: Plugin hook PreProcessFile
return Init(); return Init();
// TODO: Plugin hook PostProcessFile
} }
// Confirm file is valid and set up RVA mappings // Confirm file is valid and set up RVA mappings

View File

@@ -259,6 +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
// Do basic validatation that MetadataRegistration and CodeRegistration are sane // Do basic validatation that MetadataRegistration and CodeRegistration are sane
/* /*
* GlobalMethodPointers (<= 24.1) must be a series of pointers in il2cpp or .text, and in sequential order * GlobalMethodPointers (<= 24.1) must be a series of pointers in il2cpp or .text, and in sequential order
@@ -378,6 +380,8 @@ namespace Il2CppInspector
GenericMethodPointers.Add(MethodSpecs[tableEntry.genericMethodIndex], genericMethodPointers[tableEntry.indices.methodIndex]); GenericMethodPointers.Add(MethodSpecs[tableEntry.genericMethodIndex], genericMethodPointers[tableEntry.indices.methodIndex]);
GenericMethodInvokerIndices.Add(MethodSpecs[tableEntry.genericMethodIndex], tableEntry.indices.invokerIndex); GenericMethodInvokerIndices.Add(MethodSpecs[tableEntry.genericMethodIndex], tableEntry.indices.invokerIndex);
} }
// TODO: Plugin hook PostProcessBinary
} }
// IL2CPP API exports // IL2CPP API exports

View File

@@ -313,6 +313,8 @@ namespace Il2CppInspector
// Merge all metadata usage references into a single distinct list // Merge all metadata usage references into a single distinct list
MetadataUsages = buildMetadataUsages(); MetadataUsages = buildMetadataUsages();
// TODO: Plugin hook PostProcessPackage
} }
// Get a method pointer if available // Get a method pointer if available

View File

@@ -272,6 +272,8 @@ namespace Il2CppInspector.Model
// Restore stdout // Restore stdout
Console.SetOut(stdout); Console.SetOut(stdout);
// TODO: Plugin hook PostProcessAppModel
// 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;
} }

View File

@@ -60,6 +60,8 @@ namespace Il2CppInspector.GUI
private void okButton_Click(object sender, RoutedEventArgs e) { private void okButton_Click(object sender, RoutedEventArgs e) {
// Closes dialog box automatically // Closes dialog box automatically
DialogResult = true; DialogResult = true;
// TODO: Plugin hook OptionsChanged (and make sure it works when clicking close icon as well)
} }
// Select a file path // Select a file path

View File

@@ -34,6 +34,7 @@ namespace Il2CppInspector
// Assert // Assert
// Check VTable offset is accurate // Check VTable offset is accurate
// Note: this is for 2020.1 and below; it changed to 0x138 in 2020.2
Assert.AreEqual(0x130, app.GetVTableOffset()); Assert.AreEqual(0x130, app.GetVTableOffset());
// BufferedStream.Flush() // BufferedStream.Flush()