添加23 22版本头文件

This commit is contained in:
Perfare 2020-02-27 16:48:47 +08:00
parent 26e75c9add
commit 2deabe5433
2 changed files with 147 additions and 2 deletions

View file

@ -277,6 +277,144 @@ struct Il2CppClass
VirtualInvokeData vtable[255];
};
";
public readonly static string HeaderV22 =
@"struct Il2CppClass_1
{
void* image;
void* gc_desc;
const char* name;
const char* namespaze;
Il2CppType* byval_arg;
Il2CppType* this_arg;
Il2CppClass* element_class;
Il2CppClass* castClass;
Il2CppClass* declaringType;
Il2CppClass* parent;
void *generic_class;
void* typeDefinition;
void* fields;
void* events;
void* properties;
void* methods;
Il2CppClass** nestedTypes;
Il2CppClass** implementedInterfaces;
void* interfaceOffsets;
};
struct Il2CppClass_2
{
void* rgctx_data;
Il2CppClass** typeHierarchy;
uint32_t cctor_started;
uint32_t cctor_finished;
uint64_t cctor_thread;
int32_t genericContainerIndex;
int32_t customAttributeIndex;
uint32_t instance_size;
uint32_t actualSize;
uint32_t element_size;
int32_t native_size;
uint32_t static_fields_size;
uint32_t thread_static_fields_size;
int32_t thread_static_fields_offset;
uint32_t flags;
uint32_t token;
uint16_t method_count;
uint16_t property_count;
uint16_t field_count;
uint16_t event_count;
uint16_t nested_type_count;
uint16_t vtable_count;
uint16_t interfaces_count;
uint16_t interface_offsets_count;
uint8_t typeHierarchyDepth;
uint8_t genericRecursionDepth;
uint8_t rank;
uint8_t minimumAlignment;
uint8_t packingSize;
uint8_t bitflags1;
uint8_t bitflags2;
};
struct Il2CppClass
{
Il2CppClass_1 _1;
void* static_fields;
Il2CppClass_2 _2;
VirtualInvokeData vtable[255];
};
";
public readonly static string HeaderV21 =
@"struct Il2CppClass_1
{
void* image;
void* gc_desc;
const char* name;
const char* namespaze;
Il2CppType* byval_arg;
Il2CppType* this_arg;
Il2CppClass* element_class;
Il2CppClass* castClass;
Il2CppClass* declaringType;
Il2CppClass* parent;
void *generic_class;
void* typeDefinition;
void* fields;
void* events;
void* properties;
void* methods;
Il2CppClass** nestedTypes;
Il2CppClass** implementedInterfaces;
VirtualInvokeData* vtable;
void* interfaceOffsets;
};
struct Il2CppClass_2
{
void* rgctx_data;
Il2CppClass** typeHierarchy;
uint32_t cctor_started;
uint32_t cctor_finished;
uint64_t cctor_thread;
int32_t genericContainerIndex;
int32_t customAttributeIndex;
uint32_t instance_size;
uint32_t actualSize;
uint32_t element_size;
int32_t native_size;
uint32_t static_fields_size;
uint32_t thread_static_fields_size;
int32_t thread_static_fields_offset;
uint32_t flags;
uint32_t token;
uint16_t method_count;
uint16_t property_count;
uint16_t field_count;
uint16_t event_count;
uint16_t nested_type_count;
uint16_t vtable_count;
uint16_t interfaces_count;
uint16_t interface_offsets_count;
uint8_t typeHierarchyDepth;
uint8_t rank;
uint8_t minimumAlignment;
uint8_t packingSize;
uint8_t bitflags1;
uint8_t bitflags2;
};
struct Il2CppClass
{
Il2CppClass_1 _1;
void* static_fields;
Il2CppClass_2 _2;
VirtualInvokeData vtable[255];
};
";
}
}

View file

@ -291,6 +291,12 @@ namespace Il2CppDumper
sb.Append(HeaderConstants.GenericHeader);
switch (il2Cpp.Version)
{
case 22f:
sb.Append(HeaderConstants.HeaderV22);
break;
case 23f:
sb.Append(HeaderConstants.HeaderV240);
break;
case 24f:
sb.Append(HeaderConstants.HeaderV240);
break;
@ -300,9 +306,10 @@ namespace Il2CppDumper
case 24.2f:
sb.Append(HeaderConstants.HeaderV242);
break;
//TODO
default:
sb.Append(HeaderConstants.HeaderV242);
break;
Console.WriteLine($"WARNING: This il2cpp version [{il2Cpp.Version}] does not support generating .h files");
return;
}
sb.Append(preHeader);
sb.Append(headerStruct);