@@ -38,7 +38,7 @@ public abstract class Il2Cpp : BinaryStream
38
38
39
39
protected Il2Cpp ( Stream stream ) : base ( stream ) { }
40
40
41
- public void SetProperties ( float version , long maxMetadataUsages )
41
+ public void SetProperties ( double version , long maxMetadataUsages )
42
42
{
43
43
Version = version ;
44
44
this . maxMetadataUsages = maxMetadataUsages ;
@@ -48,12 +48,12 @@ protected bool AutoPlusInit(ulong codeRegistration, ulong metadataRegistration)
48
48
{
49
49
if ( codeRegistration != 0 && metadataRegistration != 0 )
50
50
{
51
- if ( Version == 24.2f )
51
+ if ( Version == 24.2 )
52
52
{
53
53
pCodeRegistration = MapVATR < Il2CppCodeRegistration > ( codeRegistration ) ;
54
54
if ( pCodeRegistration . reversePInvokeWrapperCount > 0x30000 ) //TODO
55
55
{
56
- Version = 24.4f ;
56
+ Version = 24.4 ;
57
57
codeRegistration -= PointerSize * 3 ;
58
58
Console . WriteLine ( $ "Change il2cpp version to: { Version } ") ;
59
59
}
@@ -64,7 +64,7 @@ protected bool AutoPlusInit(ulong codeRegistration, ulong metadataRegistration)
64
64
var genericMethodPointersCount = genericMethodTable . Max ( x => x . indices . methodIndex ) + 1 ;
65
65
if ( pCodeRegistration . reversePInvokeWrapperCount == genericMethodPointersCount )
66
66
{
67
- Version = 24.3f ;
67
+ Version = 24.3 ;
68
68
codeRegistration -= Is32Bit ? 8u : 16u ;
69
69
Console . WriteLine ( $ "Change il2cpp version to: { Version } ") ;
70
70
}
@@ -83,22 +83,22 @@ protected bool AutoPlusInit(ulong codeRegistration, ulong metadataRegistration)
83
83
public virtual void Init ( ulong codeRegistration , ulong metadataRegistration )
84
84
{
85
85
pCodeRegistration = MapVATR < Il2CppCodeRegistration > ( codeRegistration ) ;
86
- if ( Version == 27f )
86
+ if ( Version == 27 )
87
87
{
88
88
if ( pCodeRegistration . reversePInvokeWrapperCount > 0x30000 ) //TODO
89
89
{
90
- Version = 27.1f ;
90
+ Version = 27.1 ;
91
91
codeRegistration -= PointerSize ;
92
92
Console . WriteLine ( $ "Change il2cpp version to: { Version } ") ;
93
93
Console . WriteLine ( "CodeRegistration : {0:x}" , codeRegistration ) ;
94
94
pCodeRegistration = MapVATR < Il2CppCodeRegistration > ( codeRegistration ) ;
95
95
}
96
96
}
97
- if ( Version == 24.2f )
97
+ if ( Version == 24.2 )
98
98
{
99
99
if ( pCodeRegistration . reversePInvokeWrapperCount > 0x30000 ) //TODO
100
100
{
101
- Version = 24.4f ;
101
+ Version = 24.4 ;
102
102
codeRegistration -= PointerSize * 3 ;
103
103
Console . WriteLine ( $ "Change il2cpp version to: { Version } ") ;
104
104
Console . WriteLine ( "CodeRegistration : {0:x}" , codeRegistration ) ;
@@ -108,7 +108,7 @@ public virtual void Init(ulong codeRegistration, ulong metadataRegistration)
108
108
{
109
109
if ( pCodeRegistration . codeGenModules == 0 ) //TODO
110
110
{
111
- Version = 24.3f ;
111
+ Version = 24.3 ;
112
112
Console . WriteLine ( $ "Change il2cpp version to: { Version } ") ;
113
113
pCodeRegistration = MapVATR < Il2CppCodeRegistration > ( codeRegistration ) ;
114
114
}
@@ -156,7 +156,7 @@ public virtual void Init(ulong codeRegistration, ulong metadataRegistration)
156
156
types [ i ] . Init ( ) ;
157
157
typeDic . Add ( pTypes [ i ] , types [ i ] ) ;
158
158
}
159
- if ( Version >= 24.2f )
159
+ if ( Version >= 24.2 )
160
160
{
161
161
var pCodeGenModules = MapVATR < ulong > ( pCodeRegistration . codeGenModules , pCodeRegistration . codeGenModulesCount ) ;
162
162
codeGenModules = new Dictionary < string , Il2CppCodeGenModule > ( pCodeGenModules . Length , StringComparer . Ordinal ) ;
@@ -270,7 +270,7 @@ public Il2CppType GetIl2CppType(ulong pointer)
270
270
271
271
public ulong GetMethodPointer ( string imageName , Il2CppMethodDefinition methodDef )
272
272
{
273
- if ( Version >= 24.2f )
273
+ if ( Version >= 24.2 )
274
274
{
275
275
var methodToken = methodDef . token ;
276
276
var ptrs = codeGenModuleMethodPointers [ imageName ] ;
0 commit comments