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
TextureManager.cs
Go to the documentation of this file.
1using System;
5
6namespace Terraria.Graphics
7{
8 // Token: 0x02000734 RID: 1844
9 internal static class TextureManager
10 {
11 // Token: 0x06003D06 RID: 15622 RVA: 0x002383A8 File Offset: 0x002365A8
12 public static void Initialize()
13 {
14 if (!true)
15 {
16 }
17 }
18
19 // Token: 0x06003D07 RID: 15623 RVA: 0x002383B8 File Offset: 0x002365B8
20 public static Texture2D Load(string name)
21 {
22 if (!true)
23 {
24 }
26 return texture2D;
27 }
28
29 // Token: 0x06003D08 RID: 15624 RVA: 0x002383D0 File Offset: 0x002365D0
30 public static Ref<Texture2D> Retrieve(string name)
31 {
32 /*
33An exception occurred when decompiling this method (06003D08)
34
35ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.Ref`1<Microsoft.Xna.Framework.Graphics.Texture2D> Terraria.Graphics.TextureManager::Retrieve(System.String)
36
37 ---> System.Exception: Basic block has to end with unconditional control flow.
38{
39 IL_0000:
40 brtrue(IL_0000, ldc.i4:bool(1))
41}
42
43 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
44 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
45 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
46 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
47 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
48 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
49 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
50 --- End of inner exception stack trace ---
51 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
52 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
53*/;
54 }
55
56 // Token: 0x06003D09 RID: 15625 RVA: 0x002383E0 File Offset: 0x002365E0
57 public static void Run(object context)
58 {
59 if (!true)
60 {
61 }
62 if (!true)
63 {
64 }
65 }
66
67 // Token: 0x06003D0A RID: 15626 RVA: 0x002383FC File Offset: 0x002365FC
68 // Note: this type is marked as 'beforefieldinit'.
70 {
71 }
72
73 // Token: 0x04007BFE RID: 31742
75
76 // Token: 0x04007BFF RID: 31743
78
79 // Token: 0x04007C00 RID: 31744
80 private static Thread _loadThread;
81
82 // Token: 0x04007C01 RID: 31745
83 private static readonly object _loadThreadLock;
84
85 // Token: 0x04007C02 RID: 31746
86 public static Texture2D BlankTexture;
87
88 // Token: 0x02000735 RID: 1845
89 private struct LoadPair
90 {
91 // Token: 0x06003D0B RID: 15627 RVA: 0x0023840C File Offset: 0x0023660C
92 public LoadPair(string path, Ref<Texture2D> textureRef)
93 {
94 this.Path = path;
96 }
97
98 // Token: 0x04007C03 RID: 31747
99 public string Path;
100
101 // Token: 0x04007C04 RID: 31748
103 }
104 }
105}
class f__AnonymousType0<< Count > j__TPar
static Ref< Texture2D > Retrieve(string name)
static readonly object _loadThreadLock
static ConcurrentDictionary< string, Texture2D > _textures
static Texture2D Load(string name)
static ConcurrentQueue< TextureManager.LoadPair > _loadQueue
static void Run(object context)
LoadPair(string path, Ref< Texture2D > textureRef)