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;
2using System.IO;
4using UnityEngine;
5
7{
8 // Token: 0x020003AA RID: 938
9 public class Texture2D : Texture
10 {
11 // Token: 0x06001911 RID: 6417 RVA: 0x0006A56C File Offset: 0x0006876C
12 public void ResetLoaded()
13 {
14 if (this._textureLoaded)
15 {
17 if (textureAtlas == null)
18 {
20 if (textureAtlas == null)
21 {
22 }
25 if (textureAtlas == null)
26 {
27 }
30 if (textureAtlas == null)
31 {
32 }
34 }
35 }
37 if (textureAtlas2 != null)
38 {
40 int[] textureWidth = textureAtlas2.TextureWidth;
42 int[] textureHeight = textureAtlas2.TextureHeight;
43 this.UnityHeight = textureHeight;
45 {
46 int[] batchTextureIndex = textureAtlas2.BatchTextureIndex;
47 return;
48 }
49 }
50 }
51
52 // Token: 0x1700034E RID: 846
53 // (get) Token: 0x06001912 RID: 6418 RVA: 0x0006A610 File Offset: 0x00068810
55 {
56 get
57 {
58 /*
59An exception occurred when decompiling this method (06001912)
60
61ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Microsoft.Xna.Framework.Graphics.Texture2D::get_UnityTextureWidth()
62
63 ---> System.Exception: Basic block has to end with unconditional control flow.
64{
65 Block_1:
66 stloc:TextureAtlasEntry(var_2_1F, ldfld:TextureAtlasEntry(Texture2D::PackedEntry, ldloc:Texture2D(this)))
67 stloc:int32[](var_3_26, ldfld:int32[](TextureAtlasDB::TextureWidth, ldloc:TextureAtlasDB(var_1_15)))
68}
69
70 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
71 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
72 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
73 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
74 --- End of inner exception stack trace ---
75 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
76 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
77*/;
78 }
79 }
80
81 // Token: 0x06001913 RID: 6419 RVA: 0x0006A644 File Offset: 0x00068844
91
92 // Token: 0x06001914 RID: 6420 RVA: 0x0006A6A0 File Offset: 0x000688A0
93 private void LoadSourceTexture()
94 {
95 if (!this.loadRequested)
96 {
97 this.loadRequested = true;
98 string text = this._sourceLoadAsset + "_A";
99 string text2 = this._sourceLoadAsset + "_P";
100 return;
101 }
102 }
103
104 // Token: 0x1700034F RID: 847
105 // (get) Token: 0x06001915 RID: 6421 RVA: 0x0006A774 File Offset: 0x00068974
107 {
108 get
109 {
110 /*
111An exception occurred when decompiling this method (06001915)
112
113ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Microsoft.Xna.Framework.Graphics.Texture2D::get_UnityTextureHeight()
114
115 ---> System.Exception: Basic block has to end with unconditional control flow.
116{
117 Block_1:
118 stloc:TextureAtlasEntry(var_2_1F, ldfld:TextureAtlasEntry(Texture2D::PackedEntry, ldloc:Texture2D(this)))
119 stloc:int32[](var_3_26, ldfld:int32[](TextureAtlasDB::TextureHeight, ldloc:TextureAtlasDB(var_1_15)))
120}
121
122 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
123 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
124 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
125 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
126 --- End of inner exception stack trace ---
127 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
128 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
129*/;
130 }
131 }
132
133 // Token: 0x17000350 RID: 848
134 // (get) Token: 0x06001916 RID: 6422 RVA: 0x0006A7A8 File Offset: 0x000689A8
136 {
137 get
138 {
139 /*
140An exception occurred when decompiling this method (06001916)
141
142ICSharpCode.Decompiler.DecompilerException: Error decompiling UnityEngine.Texture Microsoft.Xna.Framework.Graphics.Texture2D::get_UnityBindTexture()
143
144 ---> System.Exception: Basic block has to end with unconditional control flow.
145{
146 IL_000A:
147 stloc:RenderTexture(var_2_10, ldfld:RenderTexture(Texture2D::_unityRenderTexture, ldloc:Texture2D(this)))
148 stloc:Texture2D(var_3_17, callgetter:Texture2D(Texture2D::get_UnityTexture, ldloc:Texture2D(this)))
149}
150
151 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
152 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
153 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
154 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
155 --- End of inner exception stack trace ---
156 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
157 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
158*/;
159 }
160 }
161
162 // Token: 0x06001917 RID: 6423 RVA: 0x0006A7CC File Offset: 0x000689CC
191
192 // Token: 0x17000351 RID: 849
193 // (get) Token: 0x06001918 RID: 6424 RVA: 0x0006A88C File Offset: 0x00068A8C
195 {
196 get
197 {
198 if (this._textureLoaded)
199 {
200 return this._unityTexture;
201 }
203 if (textureAtlas != null)
204 {
206 textureAtlas.LoadTexturesAsync(atlasIndex);
207 }
208 string sourceLoadAsset = this._sourceLoadAsset;
209 bool flag = string.IsNullOrEmpty(sourceLoadAsset);
210 this.LoadSourceTexture();
215 int atlasIndex2 = packedEntry.AtlasIndex;
216 Texture2D texture2D2 = textureAtlas2.AltlasAlphaTexture(atlasIndex2);
220 int atlasIndex3 = packedEntry2.AtlasIndex;
221 Texture2D texture2D3 = textureAtlas3.AltlasPalTexture(atlasIndex3);
224 this._textureLoaded = true;
228 return unityTexture2;
229 }
230 }
231
232 // Token: 0x17000352 RID: 850
233 // (get) Token: 0x06001919 RID: 6425 RVA: 0x0006A968 File Offset: 0x00068B68
235 {
236 get
237 {
238 return this._unityAlphaTexture;
239 }
240 }
241
242 // Token: 0x17000353 RID: 851
243 // (get) Token: 0x0600191A RID: 6426 RVA: 0x0006A97C File Offset: 0x00068B7C
245 {
246 get
247 {
248 return this._unityPalTexture;
249 }
250 }
251
252 // Token: 0x0600191B RID: 6427 RVA: 0x000021DB File Offset: 0x000003DB
253 public static int GetBatchId()
254 {
255 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
256 }
257
258 // Token: 0x0600191C RID: 6428 RVA: 0x0006A990 File Offset: 0x00068B90
259 public void RefreshBatchIndex()
260 {
262 if (textureAtlas != null && this.SharedBatching)
263 {
265 int[] batchTextureIndex = textureAtlas.BatchTextureIndex;
266 return;
267 }
268 }
269
270 // Token: 0x17000354 RID: 852
271 // (get) Token: 0x0600191D RID: 6429 RVA: 0x0006A9C0 File Offset: 0x00068BC0
273 {
274 get
275 {
276 /*
277An exception occurred when decompiling this method (0600191D)
278
279ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Rectangle Microsoft.Xna.Framework.Graphics.Texture2D::get_Bounds()
280
281 ---> System.Exception: Basic block has to end with unconditional control flow.
282{
283 Block_0:
284 stloc:int32(var_0_06, ldfld:int32(Texture2D::Width, ldloc:Texture2D(this)))
285 stloc:int32(var_1_0D, ldfld:int32(Texture2D::ArraySize, ldloc:Texture2D(this)))
286}
287
288 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
289 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
290 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
291 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
292 --- End of inner exception stack trace ---
293 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
294 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
295*/;
296 }
297 }
298
299 // Token: 0x0600191E RID: 6430 RVA: 0x0006A9E0 File Offset: 0x00068BE0
300 public Texture2D(string sourceAsset, int width, int height)
301 {
302 this.UnityWidth = width;
303 this.Width = height;
304 }
305
306 // Token: 0x0600191F RID: 6431 RVA: 0x0006A9FC File Offset: 0x00068BFC
307 public Texture2D(Texture2D texture)
308 {
309 this._unityTexture = texture;
311 this.UnityWidth = texture;
313 this._textureLoaded = true;
314 }
315
316 // Token: 0x06001920 RID: 6432 RVA: 0x0006AA2C File Offset: 0x00068C2C
317 public Texture2D(RenderTexture texture)
318 {
319 this._unityRenderTexture = texture;
320 this.UnityWidth = texture;
321 }
322
323 // Token: 0x06001921 RID: 6433 RVA: 0x0006AA48 File Offset: 0x00068C48
333
334 // Token: 0x06001922 RID: 6434 RVA: 0x0006AA80 File Offset: 0x00068C80
338
339 // Token: 0x06001923 RID: 6435 RVA: 0x0006AAC8 File Offset: 0x00068CC8
340 public Texture2D(Texture2D texture, TextureAtlasEntry entry)
341 {
342 do
343 {
344 this.PackedEntry = entry;
345 }
346 while (entry.AttachedTexture == null);
347 Debug.LogError("Texture is already attached");
353 this._unityTexture = texture;
354 this._textureLoaded = true;
355 }
356
357 // Token: 0x06001924 RID: 6436 RVA: 0x0006AB24 File Offset: 0x00068D24
359 {
360 while (!true)
361 {
362 }
363 Debug.LogError("Texture is already attached");
366 int[] textureWidth = textureAtlas.TextureWidth;
367 this.UnityWidth = textureWidth;
368 int[] textureHeight = textureAtlas.TextureHeight;
369 this.UnityHeight = textureHeight;
370 if (textureAtlas != null && this.SharedBatching)
371 {
372 int[] batchTextureIndex = textureAtlas.BatchTextureIndex;
373 return;
374 }
375 }
376
377 // Token: 0x06001925 RID: 6437 RVA: 0x0006AB80 File Offset: 0x00068D80
378 private void CreateEmptyTexture(object data)
379 {
380 int width = this.Width;
381 int arraySize = this.ArraySize;
382 this._textureLoaded = true;
383 }
384
385 // Token: 0x06001926 RID: 6438 RVA: 0x0006ABA4 File Offset: 0x00068DA4
386 public Texture2D(GraphicsDevice device, int width, int height)
387 {
389 this._textureLoaded = true;
390 }
391
392 // Token: 0x06001927 RID: 6439 RVA: 0x0006ABC4 File Offset: 0x00068DC4
393 public Texture2D(GraphicsDevice device, int width, int height, bool mipmap, SurfaceFormat format)
394 {
395 }
396
397 // Token: 0x06001928 RID: 6440 RVA: 0x0006ABD4 File Offset: 0x00068DD4
398 public Texture2D(GraphicsDevice device, int width, int height, bool mipmap, SurfaceFormat format, int arraySize)
399 {
400 }
401
402 // Token: 0x06001929 RID: 6441 RVA: 0x0006ABE4 File Offset: 0x00068DE4
403 internal Texture2D(GraphicsDevice device, int width, int height, bool mipmap, SurfaceFormat format, Texture2D.SurfaceType type)
404 {
405 }
406
407 // Token: 0x0600192A RID: 6442 RVA: 0x0006ABF4 File Offset: 0x00068DF4
408 protected Texture2D(GraphicsDevice device, int width, int height, bool mipmap, SurfaceFormat format, Texture2D.SurfaceType type, bool shared, int arraySize)
409 {
410 int num = 257;
411 this.SharedBatching = num != 0;
412 base..ctor();
413 if (num == 0)
414 {
415 }
416 Debug.Log("Created");
417 this.Width = width;
418 this.ArraySize = height;
420 long num2 = 0L;
421 int num3 = Texture.CalculateMipLevels(width, height, (int)num2);
422 }
423
424 // Token: 0x0600192B RID: 6443 RVA: 0x0006AC90 File Offset: 0x00068E90
425 public void SaveAsPng(Stream stream, int width, int height)
426 {
427 }
428
429 // Token: 0x0600192C RID: 6444 RVA: 0x0006ACA0 File Offset: 0x00068EA0
430 public void SetData<T>(T[] data, int start, int length)
431 {
432 }
433
434 // Token: 0x0600192D RID: 6445 RVA: 0x0006ACB0 File Offset: 0x00068EB0
435 private static void ConvertToABGR(int pixelHeight, int pixelWidth, int[] pixels)
436 {
437 }
438
439 // Token: 0x04002778 RID: 10104
440 public int UnityWidth;
441
442 // Token: 0x04002779 RID: 10105
443 public int UnityHeight;
444
445 // Token: 0x0400277A RID: 10106
446 public readonly int Width;
447
448 // Token: 0x0400277B RID: 10107
449 public readonly int Height;
450
451 // Token: 0x0400277C RID: 10108
452 internal int ArraySize;
453
454 // Token: 0x0400277D RID: 10109
455 internal float TexelWidth;
456
457 // Token: 0x0400277E RID: 10110
458 internal float TexelHeight;
459
460 // Token: 0x0400277F RID: 10111
461 public float TextureOffsetScale;
462
463 // Token: 0x04002780 RID: 10112
464 public bool SharedBatching;
465
466 // Token: 0x04002781 RID: 10113
468
469 // Token: 0x04002782 RID: 10114
471
472 // Token: 0x04002783 RID: 10115
473 private bool loadRequested;
474
475 // Token: 0x04002784 RID: 10116
476 public static bool ignoreLoad;
477
478 // Token: 0x04002785 RID: 10117
479 private bool _textureLoaded;
480
481 // Token: 0x04002786 RID: 10118
483
484 // Token: 0x04002787 RID: 10119
486
487 // Token: 0x04002788 RID: 10120
489
490 // Token: 0x04002789 RID: 10121
492
493 // Token: 0x0400278A RID: 10122
495
496 // Token: 0x0400278B RID: 10123
497 private static int _nextTextureId;
498
499 // Token: 0x0400278C RID: 10124
501
502 // Token: 0x0400278D RID: 10125
504
505 // Token: 0x0400278E RID: 10126
506 private string _sourceLoadAsset;
507
508 // Token: 0x020003AB RID: 939
509 protected internal enum SurfaceType
510 {
511 // Token: 0x04002790 RID: 10128
512 Texture,
513 // Token: 0x04002791 RID: 10129
515 // Token: 0x04002792 RID: 10130
517 }
518
519 // Token: 0x020003AC RID: 940
520 public sealed class TextureLoader : MulticastDelegate
521 {
522 // Token: 0x0600192E RID: 6446 RVA: 0x0006ACC0 File Offset: 0x00068EC0
523 public TextureLoader(object @object, IntPtr method)
524 {
526 this.m_target = @object;
528 this.method_code = this;
529 }
530
531 // Token: 0x0600192F RID: 6447 RVA: 0x0006AD14 File Offset: 0x00068F14
533 {
534 /*
535An exception occurred when decompiling this method (0600192F)
536
537ICSharpCode.Decompiler.DecompilerException: Error decompiling UnityEngine.Texture2D Microsoft.Xna.Framework.Graphics.Texture2D/TextureLoader::Invoke(System.Int32)
538
539 ---> System.Exception: Basic block has to end with unconditional control flow.
540{
541 Block_0:
542 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:TextureLoader[exp:Delegate](this)))
543 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:TextureLoader[exp:Delegate](this)))
544 stloc:native int(var_2_14, ldfld:native int(Delegate::method, ldloc:TextureLoader[exp:Delegate](this)))
545}
546
547 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
548 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
549 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
550 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
551 --- End of inner exception stack trace ---
552 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
553 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
554*/;
555 }
556
557 // Token: 0x06001930 RID: 6448 RVA: 0x000021DB File Offset: 0x000003DB
558 public IAsyncResult BeginInvoke(int data, AsyncCallback callback, object @object)
559 {
560 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
561 }
562
563 // Token: 0x06001931 RID: 6449 RVA: 0x000021DB File Offset: 0x000003DB
565 {
566 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
567 }
568 }
569 }
570}
class f__AnonymousType0<< Count > j__TPar
static bool IsMainThread
IAsyncResult BeginInvoke(int data, AsyncCallback callback, object @object)
Definition Texture2D.cs:558
static void ConvertToABGR(int pixelHeight, int pixelWidth, int[] pixels)
Definition Texture2D.cs:435
void SaveAsPng(Stream stream, int width, int height)
Definition Texture2D.cs:425
Texture2D(Texture2D texture, Texture2D texture2)
Definition Texture2D.cs:324
Texture2D(Texture2D texture, Texture2D texture2, Texture2D texture3)
Definition Texture2D.cs:335
Texture2D(TextureAtlasDB textureAtlas, TextureAtlasEntry entry)
Definition Texture2D.cs:358
Texture2D(GraphicsDevice device, int width, int height, bool mipmap, SurfaceFormat format, Texture2D.SurfaceType type)
Definition Texture2D.cs:403
Texture2D(GraphicsDevice device, int width, int height)
Definition Texture2D.cs:386
Texture2D(Texture2D texture, TextureAtlasEntry entry)
Definition Texture2D.cs:340
Texture2D(GraphicsDevice device, int width, int height, bool mipmap, SurfaceFormat format)
Definition Texture2D.cs:393
void SetData< T >(T[] data, int start, int length)
Definition Texture2D.cs:430
Texture2D(string sourceAsset, int width, int height)
Definition Texture2D.cs:300
Texture2D(GraphicsDevice device, int width, int height, bool mipmap, SurfaceFormat format, Texture2D.SurfaceType type, bool shared, int arraySize)
Definition Texture2D.cs:408
Texture2D(GraphicsDevice device, int width, int height, bool mipmap, SurfaceFormat format, int arraySize)
Definition Texture2D.cs:398
void LoadCallback(Texture2D tex0, Texture2D tex1, Texture2D tex2, int page)
Definition Texture2D.cs:82
static int CalculateMipLevels(int width, int height=0, int depth=0)
Definition Texture.cs:41
DelegateData data
Definition Delegate.cs:401
void LoadTexturesAsync(int index)
static void Log(object message)
Definition Debug.cs:51
static void LogError(object message)
Definition Debug.cs:62
static void UnloadAsset(Object assetToUnload)
Definition Resources.cs:149