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
GlyphTagHandler.cs
Go to the documentation of this file.
1using System;
7
9{
10 // Token: 0x02000AD9 RID: 2777
12 {
13 // Token: 0x060051A6 RID: 20902 RVA: 0x00280F6C File Offset: 0x0027F16C
15 {
16 /*
17An exception occurred when decompiling this method (060051A6)
18
19ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.UI.Chat.TextSnippet Terraria.GameContent.UI.Chat.GlyphTagHandler::Terraria.UI.Chat.ITagHandler.Parse(System.String,Microsoft.Xna.Framework.Graphics.Color,System.String)
20
21 ---> System.Exception: Basic block has to end with unconditional control flow.
22{
23 Block_0:
24 stloc:string(var_2_10, call:string(string::Concat, ldstr:string("[g:"), ldloc:string(var_1), ldstr:string("]")))
25}
26
27 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
28 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
29 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
30 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
31 --- End of inner exception stack trace ---
32 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
33 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
34*/;
35 }
36
37 // Token: 0x060051A7 RID: 20903 RVA: 0x00280F8C File Offset: 0x0027F18C
38 public static string GenerateTag(int index)
39 {
40 string text;
41 return "[g" + ":" + text + "]";
42 }
43
44 // Token: 0x060051A8 RID: 20904 RVA: 0x00280FB0 File Offset: 0x0027F1B0
45 public static string GenerateTag(string keyname)
46 {
47 if (!true)
48 {
49 }
50 if (!true)
51 {
52 }
53 return GlyphTagHandler.GenerateTag(42174992);
54 }
55
56 // Token: 0x060051A9 RID: 20905 RVA: 0x00280FD0 File Offset: 0x0027F1D0
58 {
59 }
60
61 // Token: 0x060051AA RID: 20906 RVA: 0x00280FE4 File Offset: 0x0027F1E4
62 // Note: this type is marked as 'beforefieldinit'.
64 {
65 }
66
67 // Token: 0x04008A32 RID: 35378
68 private const int GlyphsPerLine = 25;
69
70 // Token: 0x04008A33 RID: 35379
71 private const int MaxGlyphs = 26;
72
73 // Token: 0x04008A34 RID: 35380
74 public static float GlyphsScale;
75
76 // Token: 0x04008A35 RID: 35381
78
79 // Token: 0x02000ADA RID: 2778
80 private class GlyphSnippet : TextSnippet
81 {
82 // Token: 0x060051AB RID: 20907 RVA: 0x00280FF4 File Offset: 0x0027F1F4
83 public GlyphSnippet(int index)
84 : base("")
85 {
87 if (!true)
88 {
89 }
90 this.Color = 1;
91 }
92
93 // Token: 0x060051AC RID: 20908 RVA: 0x00281020 File Offset: 0x0027F220
94 public override bool UniqueDraw(bool justCheckingString, [Out] Vector2 size, SpriteBatch spriteBatch, [Optional] Vector2 position, [Optional] Color color, float scale = 1f)
95 {
96 int num = 1;
97 if (num == 0)
98 {
99 }
100 int glyphIndex = this._glyphIndex;
101 if (num == 0)
102 {
103 }
104 if (34079 == 0)
105 {
106 }
107 if (!true)
108 {
109 return;
110 }
111 }
112
113 // Token: 0x060051AD RID: 20909 RVA: 0x0028104C File Offset: 0x0027F24C
114 public override float GetStringLength(SpriteFont font)
115 {
116 /*
117An exception occurred when decompiling this method (060051AD)
118
119ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.UI.Chat.GlyphTagHandler/GlyphSnippet::GetStringLength(Microsoft.Xna.Framework.Graphics.SpriteFont)
120
121 ---> System.Exception: Basic block has to end with unconditional control flow.
122{
123 IL_0000:
124 brtrue(IL_0000, ldc.i4:bool(1))
125}
126
127 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
128 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
129 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
130 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
131 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
132 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
133 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
134 --- End of inner exception stack trace ---
135 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
136 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
137*/;
138 }
139
140 // Token: 0x04008A36 RID: 35382
141 private int _glyphIndex;
142 }
143 }
144}
class f__AnonymousType0<< Count > j__TPar
override bool UniqueDraw(bool justCheckingString, [Out] Vector2 size, SpriteBatch spriteBatch, [Optional] Vector2 position, [Optional] Color color, float scale=1f)
static Dictionary< string, int > GlyphIndexes
static string GenerateTag(string keyname)
TextSnippet Parse(string text, [Optional] Color baseColor, [Optional] string options)