-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmag_translation.cpp
96 lines (86 loc) · 1.95 KB
/
mag_translation.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#include <stdio.h>
#include <string.h>
struct Il2CppClass;
struct Il2CppType
{
void* data;
unsigned int bits;
};
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;
};
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;
void* rgctx_data;
Il2CppClass_2 _2;
};
struct Il2CppObject
{
Il2CppClass *klass;
void *monitor;
};
extern "C" {
const char* getNamespace(Il2CppObject* object) {
return object->klass->_1.namespaze;
}
const char* getName(Il2CppObject* object) {
return object->klass->_1.name;
}
}