Use actual size of static array initializers
This commit is contained in:
@@ -89,6 +89,8 @@ namespace Il2CppInspector
|
||||
// One assembly may contain multiple modules
|
||||
public Dictionary<string, Il2CppCodeGenModule> Modules { get; private set; }
|
||||
|
||||
public List<Il2CppTypeDefinitionSizes> TypeDefinitionSizes { get; private set; }
|
||||
|
||||
// Status update callback
|
||||
private EventHandler<string> OnStatusUpdate { get; set; }
|
||||
private void StatusUpdate(string status) => OnStatusUpdate?.Invoke(this, status);
|
||||
@@ -424,6 +426,9 @@ namespace Il2CppInspector
|
||||
GenericMethodInvokerIndices.Add(MethodSpecs[tableEntry.genericMethodIndex], tableEntry.indices.invokerIndex);
|
||||
}
|
||||
|
||||
TypeDefinitionSizes = Image.ReadMappedObjectPointerArray<Il2CppTypeDefinitionSizes>(
|
||||
MetadataRegistration.typeDefinitionsSizes, (int) MetadataRegistration.typeDefinitionsSizesCount);
|
||||
|
||||
// Plugin hook to pre-process binary
|
||||
isModified |= PluginHooks.PostProcessBinary(this).IsStreamModified;
|
||||
}
|
||||
|
||||
@@ -291,4 +291,12 @@ namespace Il2CppInspector
|
||||
[Version(Min = 27.1)]
|
||||
public int adjustorThunk;
|
||||
}
|
||||
|
||||
public class Il2CppTypeDefinitionSizes
|
||||
{
|
||||
public uint instanceSize;
|
||||
public int nativeSize;
|
||||
public uint staticFieldsSize;
|
||||
public uint threadStaticFieldsSize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace Il2CppInspector
|
||||
public Il2CppMethodSpec[] MethodSpecs => Binary.MethodSpecs;
|
||||
public Dictionary<Il2CppMethodSpec, ulong> GenericMethodPointers { get; }
|
||||
public Dictionary<Il2CppMethodSpec, int> GenericMethodInvokerIndices => Binary.GenericMethodInvokerIndices;
|
||||
public List<Il2CppTypeDefinitionSizes> TypeDefinitionSizes => Binary.TypeDefinitionSizes;
|
||||
|
||||
// TODO: Finish all file access in the constructor and eliminate the need for this
|
||||
public IFileFormatStream BinaryImage => Binary.Image;
|
||||
|
||||
Reference in New Issue
Block a user