Skip to content

Commit

Permalink
添加新版本头
Browse files Browse the repository at this point in the history
  • Loading branch information
Perfare committed Dec 18, 2021
1 parent 9f03520 commit d5e3e5b
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 0 deletions.
109 changes: 109 additions & 0 deletions Il2CppDumper/Outputs/HeaderConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,115 @@ struct Il2CppRuntimeInterfaceOffsetPair
Il2CppClass* interfaceType;
int32_t offset;
};
";

public readonly static string HeaderV29 =
@"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* typeMetadataHandle;
void* interopData;
Il2CppClass* klass;
void* fields;
void* events;
void* properties;
void* methods;
Il2CppClass** nestedTypes;
Il2CppClass** implementedInterfaces;
Il2CppRuntimeInterfaceOffsetPair* interfaceOffsets;
};
struct Il2CppClass_2
{
Il2CppClass** typeHierarchy;
void *unity_user_data;
uint32_t initializationExceptionGCHandle;
uint32_t cctor_started;
uint32_t cctor_finished;
size_t cctor_thread;
void* genericContainerHandle;
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 naturalAligment;
uint8_t packingSize;
uint8_t bitflags1;
uint8_t bitflags2;
};
struct Il2CppClass
{
Il2CppClass_1 _1;
void* static_fields;
Il2CppRGCTXData* rgctx_data;
Il2CppClass_2 _2;
VirtualInvokeData vtable[255];
};
typedef uintptr_t il2cpp_array_size_t;
typedef int32_t il2cpp_array_lower_bound_t;
struct Il2CppArrayBounds
{
il2cpp_array_size_t length;
il2cpp_array_lower_bound_t lower_bound;
};
typedef void (*InvokerMethod)(Il2CppMethodPointer, const MethodInfo*, void*, void**, void*);
struct MethodInfo
{
Il2CppMethodPointer methodPointer;
Il2CppMethodPointer virtualMethodPointer;
InvokerMethod invoker_method;
const char* name;
Il2CppClass *klass;
const Il2CppType *return_type;
const Il2CppType** parameters;
union
{
const Il2CppRGCTXData* rgctx_data;
const void* methodMetadataHandle;
};
union
{
const void* genericMethod;
const void* genericContainerHandle;
};
uint32_t token;
uint16_t flags;
uint16_t iflags;
uint16_t slot;
uint8_t parameters_count;
uint8_t bitflags;
};
";

public readonly static string HeaderV27 =
Expand Down
3 changes: 3 additions & 0 deletions Il2CppDumper/Outputs/StructGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,9 @@ public void WriteScript(string outputDir)
case 27.2:
sb.Append(HeaderConstants.HeaderV27);
break;
case 29:
sb.Append(HeaderConstants.HeaderV29);
break;
default:
Console.WriteLine($"WARNING: This il2cpp version [{il2Cpp.Version}] does not support generating .h files");
return;
Expand Down

0 comments on commit d5e3e5b

Please sign in to comment.