terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
Texture2D.cs
Go to the documentation of this file.
1using System;
8
9namespace UnityEngine
10{
11 // Token: 0x0200004B RID: 75
12 [NativeHeader("Runtime/Graphics/GeneratedTextures.h")]
13 [NativeHeader("Runtime/Graphics/Texture2D.h")]
15 public sealed class Texture2D : Texture
16 {
17 // Token: 0x17000034 RID: 52
18 // (get) Token: 0x0600010F RID: 271 RVA: 0x000036CC File Offset: 0x000018CC
20 {
21 [NativeName("GetTextureFormat")]
22 get
23 {
24 throw new MissingMethodException();
25 }
26 }
27
28 // Token: 0x17000035 RID: 53
29 // (get) Token: 0x06000110 RID: 272 RVA: 0x000036E0 File Offset: 0x000018E0
30 [StaticAccessor("builtintex", StaticAccessorType.DoubleColon)]
31 public static Texture2D whiteTexture
32 {
33 get
34 {
35 throw new MissingMethodException();
36 }
37 }
38
39 // Token: 0x06000111 RID: 273 RVA: 0x000036F4 File Offset: 0x000018F4
40 [FreeFunction("Texture2DScripting::Create")]
41 private static bool Internal_CreateImpl([Writable] Texture2D mono, int w, int h, int mipCount, GraphicsFormat format, TextureCreationFlags flags, IntPtr nativeTex)
42 {
43 throw new MissingMethodException();
44 }
45
46 // Token: 0x06000112 RID: 274 RVA: 0x00003708 File Offset: 0x00001908
47 private static void Internal_Create([Writable] Texture2D mono, int w, int h, int mipCount, GraphicsFormat format, TextureCreationFlags flags, IntPtr nativeTex)
48 {
49 throw new MissingMethodException();
50 }
51
52 // Token: 0x17000036 RID: 54
53 // (get) Token: 0x06000113 RID: 275 RVA: 0x0000371C File Offset: 0x0000191C
54 public override bool isReadable
55 {
56 get
57 {
58 throw new MissingMethodException();
59 }
60 }
61
62 // Token: 0x06000114 RID: 276 RVA: 0x00003730 File Offset: 0x00001930
63 [NativeName("Apply")]
65 {
66 throw new MissingMethodException();
67 }
68
69 // Token: 0x06000115 RID: 277 RVA: 0x00003744 File Offset: 0x00001944
70 [NativeName("SetPixel")]
71 private void SetPixelImpl(int image, int mip, int x, int y, Color color)
72 {
73 throw new MissingMethodException();
74 }
75
76 // Token: 0x06000116 RID: 278 RVA: 0x00003758 File Offset: 0x00001958
77 [NativeName("GetPixelBilinear")]
78 private Color GetPixelBilinearImpl(int image, int mip, float u, float v)
79 {
80 throw new MissingMethodException();
81 }
82
83 // Token: 0x06000117 RID: 279 RVA: 0x0000376C File Offset: 0x0000196C
84 private IntPtr GetWritableImageData(int frame)
85 {
86 throw new MissingMethodException();
87 }
88
89 // Token: 0x06000118 RID: 280 RVA: 0x00003780 File Offset: 0x00001980
91 {
92 throw new MissingMethodException();
93 }
94
95 // Token: 0x06000119 RID: 281 RVA: 0x00003794 File Offset: 0x00001994
97 {
98 bool flag = base.ValidateFormat(format);
99 return Mathf.IsPowerOfTwo(width);
100 }
101
102 // Token: 0x0600011A RID: 282 RVA: 0x000037BC File Offset: 0x000019BC
104 {
105 if (!true)
106 {
107 }
108 base..ctor();
109 bool flag = this.ValidateFormat(textureFormat, width, height);
110 if (!true)
111 {
112 }
113 if (!true)
114 {
115 }
117 }
118
119 // Token: 0x0600011B RID: 283 RVA: 0x000037EC File Offset: 0x000019EC
122 {
123 }
124
125 // Token: 0x0600011C RID: 284 RVA: 0x000037FC File Offset: 0x000019FC
127 public Texture2D(int width, int height)
128 {
129 if (!true)
130 {
131 }
132 }
133
134 // Token: 0x0600011D RID: 285 RVA: 0x0000380C File Offset: 0x00001A0C
136 public void SetPixel(int x, int y, Color color)
137 {
138 }
139
140 // Token: 0x0600011E RID: 286 RVA: 0x00003824 File Offset: 0x00001A24
142 public Color GetPixelBilinear(float u, float v)
143 {
144 long num = 0L;
145 long num2 = 0L;
146 return this.GetPixelBilinearImpl((int)num, (int)num2, u, v);
147 }
148
149 // Token: 0x0600011F RID: 287 RVA: 0x00003840 File Offset: 0x00001A40
151 {
152 /*
153An exception occurred when decompiling this method (0600011F)
154
155ICSharpCode.Decompiler.DecompilerException: Error decompiling Unity.Collections.NativeArray`1<T> UnityEngine.Texture2D::GetRawTextureData<T>()
156
157 ---> System.Exception: Basic block has to end with unconditional control flow.
158{
159 Block_0:
160 stloc:uint64(var_0_06, call:uint64(Texture2D::GetRawImageDataSize, ldloc:Texture2D(this)))
161 stloc:int64(var_1_08, ldc.i4:int64(0))
162 stloc:void*(var_2_15, call:void*(native int::op_Explicit, call:native int(Texture2D::GetWritableImageData, ldloc:Texture2D(this), ldloc:int64[exp:int32](var_1_08))))
163 stloc:UnityException(var_3_1D, call:UnityException(Texture::CreateNonReadableException, ldloc:Texture2D[exp:Texture](this), ldloc:Texture2D[exp:Texture](this)))
164}
165
166 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
167 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
168 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
169 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
170 --- End of inner exception stack trace ---
171 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
172 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
173*/;
174 }
175
176 // Token: 0x06000120 RID: 288 RVA: 0x0000386C File Offset: 0x00001A6C
177 public void Apply([DefaultValue("true")] bool updateMipmaps, [DefaultValue("false")] bool makeNoLongerReadable)
178 {
179 throw new MissingMethodException();
180 }
181
182 // Token: 0x06000121 RID: 289 RVA: 0x00003888 File Offset: 0x00001A88
184 public void Apply()
185 {
186 long num = 0L;
187 this.Apply(true, num != 0L);
188 }
189
190 // Token: 0x06000122 RID: 290 RVA: 0x000038A0 File Offset: 0x00001AA0
191 private void SetPixelImpl_Injected(int image, int mip, int x, int y, Color color)
192 {
193 throw new MissingMethodException();
194 }
195
196 // Token: 0x06000123 RID: 291 RVA: 0x000038B4 File Offset: 0x00001AB4
197 private void GetPixelBilinearImpl_Injected(int image, int mip, float u, float v, [Out] Color ret)
198 {
199 throw new MissingMethodException();
200 }
201
202 // Token: 0x04000212 RID: 530
203 internal const int streamingMipmapsPriorityMin = -128;
204
205 // Token: 0x04000213 RID: 531
206 internal const int streamingMipmapsPriorityMax = 127;
207 }
208}
class f__AnonymousType0<< Count > j__TPar
Color GetPixelBilinear(float u, float v)
Definition Texture2D.cs:142
Color GetPixelBilinearImpl(int image, int mip, float u, float v)
Definition Texture2D.cs:78
static bool Internal_CreateImpl([Writable] Texture2D mono, int w, int h, int mipCount, GraphicsFormat format, TextureCreationFlags flags, IntPtr nativeTex)
Definition Texture2D.cs:41
TextureFormat format
Definition Texture2D.cs:20
const int streamingMipmapsPriorityMax
Definition Texture2D.cs:206
static Texture2D whiteTexture
Definition Texture2D.cs:32
bool ValidateFormat(TextureFormat format, int width, int height)
Definition Texture2D.cs:96
void GetPixelBilinearImpl_Injected(int image, int mip, float u, float v, [Out] Color ret)
Definition Texture2D.cs:197
void ApplyImpl(bool updateMipmaps, bool makeNoLongerReadable)
Definition Texture2D.cs:64
Texture2D(int width, int height, TextureFormat textureFormat, bool mipChain)
Definition Texture2D.cs:121
override bool isReadable
Definition Texture2D.cs:55
void SetPixelImpl(int image, int mip, int x, int y, Color color)
Definition Texture2D.cs:71
Texture2D(int width, int height)
Definition Texture2D.cs:127
void Apply([DefaultValue("true")] bool updateMipmaps, [DefaultValue("false")] bool makeNoLongerReadable)
Definition Texture2D.cs:177
IntPtr GetWritableImageData(int frame)
Definition Texture2D.cs:84
ulong GetRawImageDataSize()
Definition Texture2D.cs:90
static void Internal_Create([Writable] Texture2D mono, int w, int h, int mipCount, GraphicsFormat format, TextureCreationFlags flags, IntPtr nativeTex)
Definition Texture2D.cs:47
void SetPixel(int x, int y, Color color)
Definition Texture2D.cs:136
NativeArray< T > GetRawTextureData< T >()
Definition Texture2D.cs:150
const int streamingMipmapsPriorityMin
Definition Texture2D.cs:203
void SetPixelImpl_Injected(int image, int mip, int x, int y, Color color)
Definition Texture2D.cs:191
Texture2D(int width, int height, TextureFormat textureFormat, int mipCount, bool linear, IntPtr nativeTex)
Definition Texture2D.cs:103
virtual int width
Definition Texture.cs:41
virtual int height
Definition Texture.cs:56
static bool IsPowerOfTwo(int value)
Definition Mathf.cs:20