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
Utils.cs
Go to the documentation of this file.
1using System;
6using System.IO;
10using Cpp2IlInjected;
14using ReLogic.Content;
20
21namespace Terraria
22{
23 // Token: 0x02000465 RID: 1125
24 public static class Utils
25 {
26 // Token: 0x06002B40 RID: 11072 RVA: 0x001B4700 File Offset: 0x001B2900
28 {
29 if (!true)
30 {
31 }
32 return 1;
33 }
34
35 // Token: 0x06002B41 RID: 11073 RVA: 0x000021DB File Offset: 0x000003DB
36 public static double Lerp(double value1, double value2, double amount)
37 {
38 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
39 }
40
41 // Token: 0x06002B42 RID: 11074 RVA: 0x001B4714 File Offset: 0x001B2914
42 public static Vector2 Round(Vector2 input)
43 {
44 if (!true)
45 {
46 }
47 return 1;
48 }
49
50 // Token: 0x06002B43 RID: 11075 RVA: 0x000021DB File Offset: 0x000003DB
51 public static bool IsPowerOfTwo(int x)
52 {
53 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
54 }
55
56 // Token: 0x06002B44 RID: 11076 RVA: 0x001B4734 File Offset: 0x001B2934
57 public static float SmoothStep(float min, float max, float x)
58 {
59 }
60
61 // Token: 0x06002B45 RID: 11077 RVA: 0x001B4744 File Offset: 0x001B2944
62 public static double SmoothStep(double min, double max, double x)
63 {
64 /*
65An exception occurred when decompiling this method (06002B45)
66
67ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Double Terraria.Utils::SmoothStep(System.Double,System.Double,System.Double)
68
69 ---> System.Exception: Basic block has to end with unconditional control flow.
70{
71 IL_0000:
72 brtrue(IL_0000, ldc.i4:bool(1))
73}
74
75 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
76 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
77 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
78 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
79 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
80 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
81 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
82 --- End of inner exception stack trace ---
83 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
84 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
85*/;
86 }
87
88 // Token: 0x06002B46 RID: 11078 RVA: 0x000021DB File Offset: 0x000003DB
89 public static float UnclampedSmoothStep(float min, float max, float x)
90 {
91 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
92 }
93
94 // Token: 0x06002B47 RID: 11079 RVA: 0x000021DB File Offset: 0x000003DB
95 public static double UnclampedSmoothStep(double min, double max, double x)
96 {
97 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
98 }
99
100 // Token: 0x06002B48 RID: 11080 RVA: 0x001B4754 File Offset: 0x001B2954
101 public static Dictionary<string, string> ParseArguements(string[] args)
102 {
103 /*
104An exception occurred when decompiling this method (06002B48)
105
106ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.Dictionary`2<System.String,System.String> Terraria.Utils::ParseArguements(System.String[])
107
108 ---> System.Exception: Basic block has to end with unconditional control flow.
109{
110 IL_003D:
111 brtrue(IL_0000, logicnot:bool(ldloc:int64[exp:bool](var_2_05)))
112}
113
114 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
115 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
116 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
117 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
118 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
119 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
120 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
121 --- End of inner exception stack trace ---
122 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
123 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
124*/;
125 }
126
127 // Token: 0x06002B49 RID: 11081 RVA: 0x001B47A0 File Offset: 0x001B29A0
128 public static void Swap<T>(T t1, T t2)
129 {
130 }
131
132 // Token: 0x06002B4A RID: 11082 RVA: 0x000021DB File Offset: 0x000003DB
133 public static T Clamp<T>(T value, T min, T max) where T : IComparable<T>
134 {
135 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
136 }
137
138 // Token: 0x06002B4B RID: 11083 RVA: 0x001B47B0 File Offset: 0x001B29B0
139 public static float Turn01ToCyclic010(float value)
140 {
141 /*
142An exception occurred when decompiling this method (06002B4B)
143
144ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::Turn01ToCyclic010(System.Single)
145
146 ---> System.Exception: Basic block has to end with unconditional control flow.
147{
148 IL_0000:
149 brtrue(IL_0000, ldc.i4:bool(1))
150}
151
152 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
153 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
154 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
155 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
156 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
157 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
158 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
159 --- End of inner exception stack trace ---
160 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
161 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
162*/;
163 }
164
165 // Token: 0x06002B4C RID: 11084 RVA: 0x000021DB File Offset: 0x000003DB
166 public static float PingPongFrom01To010(float value)
167 {
168 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
169 }
170
171 // Token: 0x06002B4D RID: 11085 RVA: 0x001B47C0 File Offset: 0x001B29C0
172 public static float MultiLerp(float percent, params float[] floats)
173 {
174 }
175
176 // Token: 0x06002B4E RID: 11086 RVA: 0x001B47D0 File Offset: 0x001B29D0
177 public static float WrappedLerp(float value1, float value2, float percent)
178 {
179 }
180
181 // Token: 0x06002B4F RID: 11087 RVA: 0x000021DB File Offset: 0x000003DB
182 public static float GetLerpValue(float from, float to, float t, bool clamped = false)
183 {
184 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
185 }
186
187 // Token: 0x06002B50 RID: 11088 RVA: 0x001B47E0 File Offset: 0x001B29E0
188 public static float Remap(float fromValue, float fromMin, float fromMax, float toMin, float toMax, bool clamped = true)
189 {
190 /*
191An exception occurred when decompiling this method (06002B50)
192
193ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::Remap(System.Single,System.Single,System.Single,System.Single,System.Single,System.Boolean)
194
195 ---> System.Exception: Basic block has to end with unconditional control flow.
196{
197 IL_0003:
198 stloc:float32(var_1_0D, call:float32(MathHelper::Lerp, ldloc:float32(fromMax), ldloc:float32(toMin), ldloc:float32(fromMin)))
199}
200
201 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
202 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
203 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
204 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
205 --- End of inner exception stack trace ---
206 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
207 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
208*/;
209 }
210
211 // Token: 0x06002B51 RID: 11089 RVA: 0x001B47FC File Offset: 0x001B29FC
212 public static void ClampWithinWorld(int minX, int minY, int maxX, int maxY, bool lastValuesInclusiveToIteration = false, int fluffX = 0, int fluffY = 0)
213 {
214 if (!true)
215 {
216 }
217 }
218
219 // Token: 0x06002B52 RID: 11090 RVA: 0x001B480C File Offset: 0x001B2A0C
221 {
222 if (!true)
223 {
224 }
225 if (!true)
226 {
227 }
228 if (!true)
229 {
230 }
234 return 1;
235 }
236
237 // Token: 0x06002B53 RID: 11091 RVA: 0x001B4870 File Offset: 0x001B2A70
239 {
240 if (!true)
241 {
242 }
243 if (!true)
244 {
245 }
246 return 1;
247 }
248
249 // Token: 0x06002B54 RID: 11092 RVA: 0x001B4894 File Offset: 0x001B2A94
250 public static bool SolveQuadratic(float a, float b, float c, [Out] float result1, [Out] float result2)
251 {
252 return true;
253 }
254
255 // Token: 0x06002B55 RID: 11093 RVA: 0x000021DB File Offset: 0x000003DB
256 public static double GetLerpValue(double from, double to, double t, bool clamped = false)
257 {
258 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
259 }
260
261 // Token: 0x06002B56 RID: 11094 RVA: 0x001B48A4 File Offset: 0x001B2AA4
263 {
264 /*
265An exception occurred when decompiling this method (06002B56)
266
267ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::GetDayTimeAs24FloatStartingFromMidnight()
268
269 ---> System.Exception: Basic block has to end with unconditional control flow.
270{
271 IL_0000:
272 brtrue(IL_0000, logicnot:bool(ldc.i4:bool(1)))
273}
274
275 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
276 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
277 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
278 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
279 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
280 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
281 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
282 --- End of inner exception stack trace ---
283 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
284 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
285*/;
286 }
287
288 // Token: 0x06002B57 RID: 11095 RVA: 0x001B48B4 File Offset: 0x001B2AB4
297
298 // Token: 0x06002B58 RID: 11096 RVA: 0x001B48D0 File Offset: 0x001B2AD0
300 {
301 /*
302An exception occurred when decompiling this method (06002B58)
303
304ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Vector2 Terraria.Utils::GetDayTimeAsDirectionIn24HClock(System.Single)
305
306 ---> System.Exception: Basic block has to end with unconditional control flow.
307{
308 IL_0000:
309 brtrue(IL_0000, ldc.i4:bool(1))
310}
311
312 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
313 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
314 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
315 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
316 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
317 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
318 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
319 --- End of inner exception stack trace ---
320 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
321 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
322*/;
323 }
324
325 // Token: 0x06002B59 RID: 11097 RVA: 0x001B48E0 File Offset: 0x001B2AE0
326 public static string[] ConvertMonoArgsToDotNet(string[] brokenArgs)
327 {
328 bool flag = "" != "";
329 return "" + " " + " ";
330 }
331
332 // Token: 0x06002B5A RID: 11098 RVA: 0x000021DB File Offset: 0x000003DB
333 public static T Max<T>(params T[] args) where T : IComparable
334 {
335 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
336 }
337
338 // Token: 0x06002B5B RID: 11099 RVA: 0x001B491C File Offset: 0x001B2B1C
340 {
341 /*
342An exception occurred when decompiling this method (06002B5B)
343
344ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::LineRectangleDistance(Microsoft.Xna.Framework.Rectangle,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2)
345
346 ---> System.Exception: Basic block has to end with unconditional control flow.
347{
348 IL_000B:
349 stloc:float32(var_12_17, call:float32(MathHelper::Min, ldloc:float32(var_8), ldloc:float32(var_10)))
350 stloc:float32(var_14_25, call:float32(MathHelper::Min, ldloc:float32(var_12_17), ldloc:float32(var_12_17)))
351 stloc:float32(var_16_33, call:float32(MathHelper::Min, ldloc:float32(var_14_25), ldloc:float32(var_14_25)))
352}
353
354 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
355 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
356 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
357 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
358 --- End of inner exception stack trace ---
359 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
360 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
361*/;
362 }
363
364 // Token: 0x06002B5C RID: 11100 RVA: 0x001B4960 File Offset: 0x001B2B60
365 public static List<List<TextSnippet>> WordwrapStringSmart(string text, Color c, SpriteFont font, int maxWidth, int maxLines)
366 {
367 if (!true)
368 {
369 }
372 long num = 0L;
373 if (num != 0L)
374 {
375 return;
376 }
377 }
378
379 // Token: 0x06002B5D RID: 11101 RVA: 0x001B4990 File Offset: 0x001B2B90
380 public static string[] WordwrapString(string text, SpriteFont font, int maxWidth, int maxLines, [Out] int lineAmount)
381 {
382 char c;
383 string text2 = c.ToString();
384 char c2;
385 string text3 = c2.ToString();
386 char c3;
387 string text4 = c3.ToString();
388 string text5;
389 return text5;
390 }
391
392 // Token: 0x06002B5E RID: 11102 RVA: 0x000021DB File Offset: 0x000003DB
393 public static Rectangle CenteredRectangle(Vector2 center, Vector2 size)
394 {
395 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
396 }
397
398 // Token: 0x06002B5F RID: 11103 RVA: 0x001B49F8 File Offset: 0x001B2BF8
400 {
401 if (!true)
402 {
403 }
404 if (!true)
405 {
406 }
407 if (!true)
408 {
409 }
410 if (!true)
411 {
412 }
413 if (!true)
414 {
415 }
416 return 1;
417 }
418
419 // Token: 0x06002B60 RID: 11104 RVA: 0x001B4A38 File Offset: 0x001B2C38
420 public static bool FloatIntersect(float r1StartX, float r1StartY, float r1Width, float r1Height, float r2StartX, float r2StartY, float r2Width, float r2Height)
421 {
422 }
423
424 // Token: 0x06002B61 RID: 11105 RVA: 0x001B4A48 File Offset: 0x001B2C48
425 public static long CoinsCount([Out] bool overFlowing, Item[] inv, params int[] ignoreSlots)
426 {
427 return 0L;
428 }
429
430 // Token: 0x06002B62 RID: 11106 RVA: 0x001B4A5C File Offset: 0x001B2C5C
431 public static int[] CoinsSplit(long count)
432 {
433 }
434
435 // Token: 0x06002B63 RID: 11107 RVA: 0x001B4A6C File Offset: 0x001B2C6C
436 public static long CoinsCombineStacks([Out] bool overFlowing, params long[] coinCounts)
437 {
438 return 0L;
439 }
440
441 // Token: 0x06002B64 RID: 11108 RVA: 0x001B4A84 File Offset: 0x001B2C84
442 public static void PoofOfSmoke(Vector2 position)
443 {
444 int num = 1;
445 if (num == 0)
446 {
447 }
448 if (num == 0)
449 {
450 }
451 double num2;
452 Vector2 vector = ((float)num2).ToRotationVector2();
453 double num3;
454 Vector2 vector2 = ((float)num3).ToRotationVector2();
455 }
456
457 // Token: 0x06002B65 RID: 11109 RVA: 0x001B4AD8 File Offset: 0x001B2CD8
458 public static Vector2 ToScreenPosition(this Vector2 worldPosition)
459 {
460 if (!true)
461 {
462 }
463 Vector2 screenPosition = Main.screenPosition;
464 if (!true)
465 {
466 }
467 if (!true)
468 {
469 }
470 return 1;
471 }
472
473 // Token: 0x06002B66 RID: 11110 RVA: 0x001B4AFC File Offset: 0x001B2CFC
474 public static string PrettifyPercentDisplay(float percent, string originalFormat)
475 {
476 if (!true)
477 {
478 }
480 string text;
481 return text + "%";
482 }
483
484 // Token: 0x06002B67 RID: 11111 RVA: 0x001B4B20 File Offset: 0x001B2D20
485 public static void TrimTextIfNeeded(string text, SpriteFont font, float scale, float maxWidth)
486 {
487 int num = 1;
488 if (num == 0)
489 {
490 }
491 string text2;
492 Vector2 vector = font.MeasureString(text2);
493 if (num == 0)
494 {
495 }
496 string text4;
497 string text3 = text4 + "…";
498 }
499
500 // Token: 0x06002B68 RID: 11112 RVA: 0x001B4B60 File Offset: 0x001B2D60
501 public static string FormatWith(string original, object obj)
502 {
503 if (!true)
504 {
505 }
507 if (!true)
508 {
509 }
510 string text;
511 return text;
512 }
513
514 // Token: 0x06002B69 RID: 11113 RVA: 0x001B4B7C File Offset: 0x001B2D7C
515 public static bool TryCreatingDirectory(string folderPath)
516 {
517 }
518
519 // Token: 0x06002B6A RID: 11114 RVA: 0x001B4B94 File Offset: 0x001B2D94
520 public static void OpenFolder(string folderPath)
521 {
522 if (!true)
523 {
524 }
525 long num = 0L;
526 bool flag = FileUtilities.Exists(folderPath, num != 0L);
527 if (!true)
528 {
529 }
532 }
533
534 // Token: 0x06002B6B RID: 11115 RVA: 0x000021DB File Offset: 0x000003DB
535 public static byte[] ToByteArray(this string str)
536 {
537 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
538 }
539
540 // Token: 0x06002B6C RID: 11116 RVA: 0x000021DB File Offset: 0x000003DB
541 public static float NextFloat(this UnifiedRandom r)
542 {
543 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
544 }
545
546 // Token: 0x06002B6D RID: 11117 RVA: 0x000021DB File Offset: 0x000003DB
547 public static float NextFloatDirection(this UnifiedRandom r)
548 {
549 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
550 }
551
552 // Token: 0x06002B6E RID: 11118 RVA: 0x001B4BC0 File Offset: 0x001B2DC0
553 public static float NextFloat(this UnifiedRandom random, FloatRange range)
554 {
555 /*
556An exception occurred when decompiling this method (06002B6E)
557
558ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::NextFloat(Terraria.Utilities.UnifiedRandom,Terraria.Utilities.Terraria.Utilities.FloatRange)
559
560 ---> System.Exception: Basic block has to end with unconditional control flow.
561{
562 IL_0000:
563 brtrue(IL_0000, ldc.i4:bool(1))
564}
565
566 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
567 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
568 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
569 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
570 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
571 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
572 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
573 --- End of inner exception stack trace ---
574 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
575 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
576*/;
577 }
578
579 // Token: 0x06002B6F RID: 11119 RVA: 0x001B4BD0 File Offset: 0x001B2DD0
580 public static T NextFromList<T>(this UnifiedRandom random, params T[] objs)
581 {
582 /*
583An exception occurred when decompiling this method (06002B6F)
584
585ICSharpCode.Decompiler.DecompilerException: Error decompiling T Terraria.Utils::NextFromList<T>(Terraria.Utilities.UnifiedRandom,T[])
586
587 ---> System.Exception: Basic block has to end with unconditional control flow.
588{
589 Block_0:
590 stloc:int32[](var_0_06, ldfld:int32[](UnifiedRandom::SeedArray, ldloc:UnifiedRandom(random)))
591}
592
593 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
594 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
595 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
596 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
597 --- End of inner exception stack trace ---
598 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
599 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
600*/;
601 }
602
603 // Token: 0x06002B70 RID: 11120 RVA: 0x000021DB File Offset: 0x000003DB
604 public static T NextFromCollection<T>(this UnifiedRandom random, List<T> objs)
605 {
606 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
607 }
608
609 // Token: 0x06002B71 RID: 11121 RVA: 0x001B4BE4 File Offset: 0x001B2DE4
610 public static int Next(this UnifiedRandom random, IntRange range)
611 {
612 int num;
613 return num;
614 }
615
616 // Token: 0x06002B72 RID: 11122 RVA: 0x001B4BF4 File Offset: 0x001B2DF4
617 public static Vector2 NextVector2Square(this UnifiedRandom r, float min, float max)
618 {
619 double num = r.NextDouble();
620 double num2 = r.NextDouble();
621 Vector2 vector;
622 return vector;
623 }
624
625 // Token: 0x06002B73 RID: 11123 RVA: 0x001B4C10 File Offset: 0x001B2E10
627 {
628 if (!true)
629 {
630 }
631 double num = r.NextDouble();
632 double num2 = r.NextDouble();
633 return 1;
634 }
635
636 // Token: 0x06002B74 RID: 11124 RVA: 0x001B4C30 File Offset: 0x001B2E30
637 public static Vector2 NextVector2Unit(this UnifiedRandom r, float startRotation = 0f, float rotationRange = 6.2831855f)
638 {
639 if (!true)
640 {
641 }
642 Vector2 vector = ((float)r.NextDouble()).ToRotationVector2();
643 return 1;
644 }
645
646 // Token: 0x06002B75 RID: 11125 RVA: 0x001B4C50 File Offset: 0x001B2E50
648 {
649 /*
650An exception occurred when decompiling this method (06002B75)
651
652ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Vector2 Terraria.Utils::NextVector2Circular(Terraria.Utilities.UnifiedRandom,System.Single,System.Single)
653
654 ---> System.Exception: Basic block has to end with unconditional control flow.
655{
656 IL_0003:
657 stloc:Vector2(var_0_0B, call:Vector2(Utils::NextVector2Unit, ldloc:UnifiedRandom(r), ldloc:float32(circleHalfWidth), ldloc:float32(circleHalfHeight)))
658 stloc:float64(var_3_14, call:float64(UnifiedRandom::NextDouble, ldloc:UnifiedRandom(r)))
659}
660
661 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
662 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
663 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
664 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
665 --- End of inner exception stack trace ---
666 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
667 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
668*/;
669 }
670
671 // Token: 0x06002B76 RID: 11126 RVA: 0x001B4C74 File Offset: 0x001B2E74
673 {
674 /*
675An exception occurred when decompiling this method (06002B76)
676
677ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Vector2 Terraria.Utils::NextVector2CircularEdge(Terraria.Utilities.UnifiedRandom,System.Single,System.Single)
678
679 ---> System.Exception: Basic block has to end with unconditional control flow.
680{
681 IL_0003:
682 stloc:Vector2(var_0_0B, call:Vector2(Utils::NextVector2Unit, ldloc:UnifiedRandom(r), ldloc:float32(circleHalfWidth), ldloc:float32(circleHalfHeight)))
683}
684
685 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
686 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
687 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
688 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
689 --- End of inner exception stack trace ---
690 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
691 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
692*/;
693 }
694
695 // Token: 0x06002B77 RID: 11127 RVA: 0x001B4C90 File Offset: 0x001B2E90
696 public static int Width(this Asset<Texture2D> asset)
697 {
698 }
699
700 // Token: 0x06002B78 RID: 11128 RVA: 0x001B4CA0 File Offset: 0x001B2EA0
701 public static int Height(this Asset<Texture2D> asset)
702 {
703 }
704
705 // Token: 0x06002B79 RID: 11129 RVA: 0x001B4CB0 File Offset: 0x001B2EB0
706 public static Rectangle Frame(this Asset<Texture2D> tex, int horizontalFrames = 1, int verticalFrames = 1, int frameX = 0, int frameY = 0, int sizeOffsetX = 0, int sizeOffsetY = 0)
707 {
708 /*
709An exception occurred when decompiling this method (06002B79)
710
711ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Rectangle Terraria.Utils::Frame(ReLogic.Content.Asset`1<Microsoft.Xna.Framework.Graphics.Texture2D>,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)
712
713 ---> System.Exception: Basic block has to end with unconditional control flow.
714{
715 IL_0005:
716 stloc:int32(var_2_0B, ldfld:int32(int32::m_value, ldloc:int32[exp:int32&](var_1_01)))
717}
718
719 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
720 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
721 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
722 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
723 --- End of inner exception stack trace ---
724 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
725 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
726*/;
727 }
728
729 // Token: 0x06002B7A RID: 11130 RVA: 0x000021DB File Offset: 0x000003DB
730 public static Rectangle OffsetSize(this Rectangle rect, int xSize, int ySize)
731 {
732 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
733 }
734
735 // Token: 0x06002B7B RID: 11131 RVA: 0x001B4CC8 File Offset: 0x001B2EC8
736 public static Vector2 Size(this Asset<Texture2D> tex)
737 {
738 bool isLoaded = tex.IsLoaded;
739 if (!true)
740 {
741 }
742 return 1;
743 }
744
745 // Token: 0x06002B7C RID: 11132 RVA: 0x000021DB File Offset: 0x000003DB
746 public static Rectangle Frame(this Texture2D tex, int horizontalFrames = 1, int verticalFrames = 1, int frameX = 0, int frameY = 0, int sizeOffsetX = 0, int sizeOffsetY = 0)
747 {
748 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
749 }
750
751 // Token: 0x06002B7D RID: 11133 RVA: 0x001B4CE0 File Offset: 0x001B2EE0
752 public static Vector2 OriginFlip(this Rectangle rect, Vector2 origin, SpriteEffects effects)
753 {
754 Vector2 vector;
755 return vector;
756 }
757
758 // Token: 0x06002B7E RID: 11134 RVA: 0x001B4CF0 File Offset: 0x001B2EF0
759 public static Vector2 Size(this Texture2D tex)
760 {
761 int width = tex.Width;
762 int height = tex.Height;
763 Vector2 vector;
764 return vector;
765 }
766
767 // Token: 0x06002B7F RID: 11135 RVA: 0x001B4D0C File Offset: 0x001B2F0C
768 public static void WriteRGB(this BinaryWriter bb, Color c)
769 {
770 }
771
772 // Token: 0x06002B80 RID: 11136 RVA: 0x001B4D1C File Offset: 0x001B2F1C
773 public static void WriteVector2(this BinaryWriter bb, Vector2 v)
774 {
775 }
776
777 // Token: 0x06002B81 RID: 11137 RVA: 0x001B4D2C File Offset: 0x001B2F2C
778 public static void WritePackedVector2(this BinaryWriter bb, Vector2 v)
779 {
780 }
781
782 // Token: 0x06002B82 RID: 11138 RVA: 0x000021DB File Offset: 0x000003DB
783 public static Color ReadRGB(this BinaryReader bb)
784 {
785 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
786 }
787
788 // Token: 0x06002B83 RID: 11139 RVA: 0x000021DB File Offset: 0x000003DB
789 public static Vector2 ReadVector2(this BinaryReader bb)
790 {
791 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
792 }
793
794 // Token: 0x06002B84 RID: 11140 RVA: 0x000021DB File Offset: 0x000003DB
796 {
797 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
798 }
799
800 // Token: 0x06002B85 RID: 11141 RVA: 0x001B4D3C File Offset: 0x001B2F3C
801 public static Vector2 Left(this Rectangle r)
802 {
803 Vector2 vector;
804 return vector;
805 }
806
807 // Token: 0x06002B86 RID: 11142 RVA: 0x001B4D4C File Offset: 0x001B2F4C
808 public static Vector2 Right(this Rectangle r)
809 {
810 Vector2 vector;
811 return vector;
812 }
813
814 // Token: 0x06002B87 RID: 11143 RVA: 0x001B4D5C File Offset: 0x001B2F5C
815 public static Vector2 Top(this Rectangle r)
816 {
817 Vector2 vector;
818 return vector;
819 }
820
821 // Token: 0x06002B88 RID: 11144 RVA: 0x001B4D6C File Offset: 0x001B2F6C
822 public static Vector2 Bottom(this Rectangle r)
823 {
824 Vector2 vector;
825 return vector;
826 }
827
828 // Token: 0x06002B89 RID: 11145 RVA: 0x001B4D7C File Offset: 0x001B2F7C
829 public static Vector2 TopLeft(this Rectangle r)
830 {
831 Vector2 vector;
832 return vector;
833 }
834
835 // Token: 0x06002B8A RID: 11146 RVA: 0x001B4D8C File Offset: 0x001B2F8C
836 public static Vector2 TopRight(this Rectangle r)
837 {
838 Vector2 vector;
839 return vector;
840 }
841
842 // Token: 0x06002B8B RID: 11147 RVA: 0x001B4D9C File Offset: 0x001B2F9C
843 public static Vector2 BottomLeft(this Rectangle r)
844 {
845 Vector2 vector;
846 return vector;
847 }
848
849 // Token: 0x06002B8C RID: 11148 RVA: 0x001B4DAC File Offset: 0x001B2FAC
850 public static Vector2 BottomRight(this Rectangle r)
851 {
852 Vector2 vector;
853 return vector;
854 }
855
856 // Token: 0x06002B8D RID: 11149 RVA: 0x001B4DBC File Offset: 0x001B2FBC
857 public static Vector2 Center(this Rectangle r)
858 {
859 Vector2 vector;
860 return vector;
861 }
862
863 // Token: 0x06002B8E RID: 11150 RVA: 0x001B4DCC File Offset: 0x001B2FCC
864 public static Vector2 Size(this Rectangle r)
865 {
866 Vector2 vector;
867 return vector;
868 }
869
870 // Token: 0x06002B8F RID: 11151 RVA: 0x001B4DDC File Offset: 0x001B2FDC
871 public static float Distance(this Rectangle r, Vector2 point)
872 {
873 int num = 1;
874 if (num == 0)
875 {
876 }
877 if (num == 0)
878 {
879 }
880 if (num == 0)
881 {
882 }
883 Vector2 vector = r.BottomLeft();
884 Vector2 vector2 = r.BottomRight();
885 if (num == 0)
886 {
887 return;
888 }
889 }
890
891 // Token: 0x06002B90 RID: 11152 RVA: 0x001B4E08 File Offset: 0x001B3008
892 public static Vector2 ClosestPointInRect(this Rectangle r, Vector2 point)
893 {
894 int right = r.Right;
895 Vector2 vector;
896 return vector;
897 }
898
899 // Token: 0x06002B91 RID: 11153 RVA: 0x000021DB File Offset: 0x000003DB
900 public static Rectangle Modified(this Rectangle r, int x, int y, int w, int h)
901 {
902 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
903 }
904
905 // Token: 0x06002B92 RID: 11154 RVA: 0x001B4E20 File Offset: 0x001B3020
906 public static bool IntersectsConeFastInaccurate(this Rectangle targetRect, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle)
907 {
908 /*
909An exception occurred when decompiling this method (06002B92)
910
911ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Utils::IntersectsConeFastInaccurate(Microsoft.Xna.Framework.Rectangle,Microsoft.Xna.Framework.Vector2,System.Single,System.Single,System.Single)
912
913 ---> System.Exception: Basic block has to end with unconditional control flow.
914{
915 IL_000D:
916 stloc:float32(var_9_1B, call:float32(Utils::ToRotation, ldloc:Vector2(var_8)))
917}
918
919 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
920 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
921 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
922 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
923 --- End of inner exception stack trace ---
924 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
925 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
926*/;
927 }
928
929 // Token: 0x06002B93 RID: 11155 RVA: 0x001B4E4C File Offset: 0x001B304C
930 public static bool IntersectsConeSlowMoreAccurate(this Rectangle targetRect, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle)
931 {
932 int num = 1;
933 if (num == 0)
934 {
935 }
936 Vector2 vector = coneLength.ToRotationVector2();
937 if (num == 0)
938 {
939 }
940 if (num == 0)
941 {
942 }
943 if (num == 0)
944 {
945 }
946 if (num == 0)
947 {
948 }
949 if (num == 0)
950 {
951 }
952 bool flag;
953 return flag;
954 }
955
956 // Token: 0x06002B94 RID: 11156 RVA: 0x001B4E80 File Offset: 0x001B3080
957 public static bool DoesFitInCone(Vector2 point, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle)
958 {
959 /*
960An exception occurred when decompiling this method (06002B94)
961
962ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Utils::DoesFitInCone(Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2,System.Single,System.Single,System.Single)
963
964 ---> System.Exception: Basic block has to end with unconditional control flow.
965{
966 IL_0008:
967 stloc:float32(var_3_0E, call:float32(Utils::ToRotation, ldloc:Vector2(var_2)))
968}
969
970 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
971 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
972 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
973 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
974 --- End of inner exception stack trace ---
975 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
976 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
977*/;
978 }
979
980 // Token: 0x06002B95 RID: 11157 RVA: 0x001B4EA0 File Offset: 0x001B30A0
981 public static float ToRotation(this Vector2 v)
982 {
983 /*
984An exception occurred when decompiling this method (06002B95)
985
986ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::ToRotation(Microsoft.Xna.Framework.Vector2)
987
988 ---> System.Exception: Basic block has to end with unconditional control flow.
989{
990 IL_0000:
991 brtrue(IL_0000, ldc.i4:bool(1))
992}
993
994 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
995 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
996 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
997 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
998 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
999 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
1000 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
1001 --- End of inner exception stack trace ---
1002 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
1003 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
1004*/;
1005 }
1006
1007 // Token: 0x06002B96 RID: 11158 RVA: 0x001B4EB0 File Offset: 0x001B30B0
1008 public static Vector2 ToRotationVector2(this float f)
1009 {
1010 if (!true)
1011 {
1012 }
1013 return 1;
1014 }
1015
1016 // Token: 0x06002B97 RID: 11159 RVA: 0x001B4EC4 File Offset: 0x001B30C4
1017 public static Vector2 RotatedBy(this Vector2 spinningpoint, double radians, [Optional] Vector2 center)
1018 {
1019 if (!true)
1020 {
1021 }
1022 if (!true)
1023 {
1024 }
1025 return 1;
1026 }
1027
1028 // Token: 0x06002B98 RID: 11160 RVA: 0x001B4EDC File Offset: 0x001B30DC
1029 public static Vector2D RotatedBy(this Vector2D spinningpoint, double radians, [Optional] Vector2D center)
1030 {
1031 if (!true)
1032 {
1033 }
1034 if (!true)
1035 {
1036 }
1037 return 1;
1038 }
1039
1040 // Token: 0x06002B99 RID: 11161 RVA: 0x001B4EF4 File Offset: 0x001B30F4
1042 {
1043 if (!true)
1044 {
1045 }
1046 if (!true)
1047 {
1048 }
1049 return 1;
1050 }
1051
1052 // Token: 0x06002B9A RID: 11162 RVA: 0x001B4F08 File Offset: 0x001B3108
1053 public static Vector2 Floor(this Vector2 vec)
1054 {
1055 Vector2 vector;
1056 return vector;
1057 }
1058
1059 // Token: 0x06002B9B RID: 11163 RVA: 0x001B4F18 File Offset: 0x001B3118
1060 public static bool HasNaNs(this Vector2 vec)
1061 {
1062 if (!true)
1063 {
1064 }
1065 if (!true)
1066 {
1067 }
1068 return true;
1069 }
1070
1071 // Token: 0x06002B9C RID: 11164 RVA: 0x001B4F2C File Offset: 0x001B312C
1072 public static bool Between(this Vector2 vec, Vector2 minimum, Vector2 maximum)
1073 {
1074 }
1075
1076 // Token: 0x06002B9D RID: 11165 RVA: 0x001B4F3C File Offset: 0x001B313C
1077 public static Vector2 ToVector2(this Point p)
1078 {
1079 Vector2 vector;
1080 return vector;
1081 }
1082
1083 // Token: 0x06002B9E RID: 11166 RVA: 0x001B4F4C File Offset: 0x001B314C
1084 public static Vector2 ToVector2(this Point16 p)
1085 {
1086 Vector2 vector;
1087 return vector;
1088 }
1089
1090 // Token: 0x06002B9F RID: 11167 RVA: 0x001B4F5C File Offset: 0x001B315C
1091 public static Vector2D ToVector2D(this Point p)
1092 {
1094 return vector2D;
1095 }
1096
1097 // Token: 0x06002BA0 RID: 11168 RVA: 0x001B4F6C File Offset: 0x001B316C
1098 public static Vector2D ToVector2D(this Point16 p)
1099 {
1101 return vector2D;
1102 }
1103
1104 // Token: 0x06002BA1 RID: 11169 RVA: 0x001B4F7C File Offset: 0x001B317C
1105 public static Vector2 ToWorldCoordinates(this Point p, float autoAddX = 8f, float autoAddY = 8f)
1106 {
1107 if (!true)
1108 {
1109 }
1110 if (!true)
1111 {
1112 }
1113 return 1;
1114 }
1115
1116 // Token: 0x06002BA2 RID: 11170 RVA: 0x001B4F94 File Offset: 0x001B3194
1117 public static Vector2 ToWorldCoordinates(this Point16 p, float autoAddX = 8f, float autoAddY = 8f)
1118 {
1119 if (!true)
1120 {
1121 }
1122 if (!true)
1123 {
1124 }
1125 return 1;
1126 }
1127
1128 // Token: 0x06002BA3 RID: 11171 RVA: 0x001B4FAC File Offset: 0x001B31AC
1130 {
1131 if (!true)
1132 {
1133 }
1134 Vector2 vector;
1135 float num = vector.Length();
1136 if (!true)
1137 {
1138 }
1139 if (!true)
1140 {
1141 return;
1142 }
1143 }
1144
1145 // Token: 0x06002BA4 RID: 11172 RVA: 0x000021DB File Offset: 0x000003DB
1147 {
1148 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1149 }
1150
1151 // Token: 0x06002BA5 RID: 11173 RVA: 0x000021DB File Offset: 0x000003DB
1153 {
1154 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1155 }
1156
1157 // Token: 0x06002BA6 RID: 11174 RVA: 0x000021DB File Offset: 0x000003DB
1159 {
1160 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1161 }
1162
1163 // Token: 0x06002BA7 RID: 11175 RVA: 0x000021DB File Offset: 0x000003DB
1165 {
1166 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1167 }
1168
1169 // Token: 0x06002BA8 RID: 11176 RVA: 0x000021DB File Offset: 0x000003DB
1170 public static Point ToPoint(this Vector2 v)
1171 {
1172 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1173 }
1174
1175 // Token: 0x06002BA9 RID: 11177 RVA: 0x000021DB File Offset: 0x000003DB
1176 public static Point ToPoint(this Vector2D v)
1177 {
1178 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1179 }
1180
1181 // Token: 0x06002BAA RID: 11178 RVA: 0x001B4FD0 File Offset: 0x001B31D0
1182 public static Vector2D ToVector2D(this Vector2 v)
1183 {
1185 return vector2D;
1186 }
1187
1188 // Token: 0x06002BAB RID: 11179 RVA: 0x001B4FE0 File Offset: 0x001B31E0
1189 public static Vector2 SafeNormalize(this Vector2 v, Vector2 defaultValue)
1190 {
1191 if (!true)
1192 {
1193 }
1194 if (!true)
1195 {
1196 return;
1197 }
1198 }
1199
1200 // Token: 0x06002BAC RID: 11180 RVA: 0x001B4FF8 File Offset: 0x001B31F8
1202 {
1203 if (!true)
1204 {
1205 }
1206 Vector2 vector;
1207 float num = vector.LengthSquared();
1208 if (!true)
1209 {
1210 }
1211 return 1;
1212 }
1213
1214 // Token: 0x06002BAD RID: 11181 RVA: 0x001B5024 File Offset: 0x001B3224
1216 {
1217 int num = 1;
1218 if (num == 0)
1219 {
1220 }
1221 if (num == 0)
1222 {
1223 return;
1224 }
1225 }
1226
1227 // Token: 0x06002BAE RID: 11182 RVA: 0x001B5044 File Offset: 0x001B3244
1229 {
1230 if (!true)
1231 {
1232 }
1233 if (!true)
1234 {
1235 }
1236 return 1;
1237 }
1238
1239 // Token: 0x06002BAF RID: 11183 RVA: 0x001B5058 File Offset: 0x001B3258
1240 public static float AngleTo(this Vector2 Origin, Vector2 Target)
1241 {
1242 /*
1243An exception occurred when decompiling this method (06002BAF)
1244
1245ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::AngleTo(Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2)
1246
1247 ---> System.Exception: Basic block has to end with unconditional control flow.
1248{
1249 IL_0000:
1250 brtrue(IL_0000, ldc.i4:bool(1))
1251}
1252
1253 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
1254 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
1255 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
1256 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
1257 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
1258 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
1259 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
1260 --- End of inner exception stack trace ---
1261 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
1262 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
1263*/;
1264 }
1265
1266 // Token: 0x06002BB0 RID: 11184 RVA: 0x001B5068 File Offset: 0x001B3268
1267 public static float AngleFrom(this Vector2 Origin, Vector2 Target)
1268 {
1269 /*
1270An exception occurred when decompiling this method (06002BB0)
1271
1272ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::AngleFrom(Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2)
1273
1274 ---> System.Exception: Basic block has to end with unconditional control flow.
1275{
1276 IL_0000:
1277 brtrue(IL_0000, ldc.i4:bool(1))
1278}
1279
1280 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
1281 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
1282 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
1283 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
1284 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
1285 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
1286 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
1287 --- End of inner exception stack trace ---
1288 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
1289 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
1290*/;
1291 }
1292
1293 // Token: 0x06002BB1 RID: 11185 RVA: 0x001B5078 File Offset: 0x001B3278
1295 {
1296 /*
1297An exception occurred when decompiling this method (06002BB1)
1298
1299ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Vector2 Terraria.Utils::rotateTowards(Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2,System.Single)
1300
1301 ---> System.Exception: Basic block has to end with unconditional control flow.
1302{
1303 IL_0003:
1304 stloc:Vector2(var_4_09, call:Vector2(Utils::ToRotationVector2, ldloc:float32(var_3)))
1305}
1306
1307 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
1308 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
1309 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
1310 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
1311 --- End of inner exception stack trace ---
1312 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
1313 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
1314*/;
1315 }
1316
1317 // Token: 0x06002BB2 RID: 11186 RVA: 0x001B5094 File Offset: 0x001B3294
1318 public static float Distance(this Vector2 Origin, Vector2 Target)
1319 {
1320 if (!true)
1321 {
1322 return;
1323 }
1324 }
1325
1326 // Token: 0x06002BB3 RID: 11187 RVA: 0x001B50A8 File Offset: 0x001B32A8
1327 public static float DistanceSQ(this Vector2 Origin, Vector2 Target)
1328 {
1329 if (!true)
1330 {
1331 return;
1332 }
1333 }
1334
1335 // Token: 0x06002BB4 RID: 11188 RVA: 0x001B50BC File Offset: 0x001B32BC
1336 public static Vector2 DirectionTo(this Vector2 Origin, Vector2 Target)
1337 {
1338 if (!true)
1339 {
1340 }
1341 return 1;
1342 }
1343
1344 // Token: 0x06002BB5 RID: 11189 RVA: 0x001B50D4 File Offset: 0x001B32D4
1345 public static Vector2 DirectionFrom(this Vector2 Origin, Vector2 Target)
1346 {
1347 if (!true)
1348 {
1349 }
1350 return 1;
1351 }
1352
1353 // Token: 0x06002BB6 RID: 11190 RVA: 0x001B50EC File Offset: 0x001B32EC
1354 public static bool WithinRange(this Vector2 Origin, Vector2 Target, float MaxRange)
1355 {
1356 if (!true)
1357 {
1358 return;
1359 }
1360 }
1361
1362 // Token: 0x06002BB7 RID: 11191 RVA: 0x001B5100 File Offset: 0x001B3300
1363 public static Vector2 XY(this Vector4 vec)
1364 {
1365 Vector2 vector;
1366 return vector;
1367 }
1368
1369 // Token: 0x06002BB8 RID: 11192 RVA: 0x001B5110 File Offset: 0x001B3310
1370 public static Vector2 ZW(this Vector4 vec)
1371 {
1372 Vector2 vector;
1373 return vector;
1374 }
1375
1376 // Token: 0x06002BB9 RID: 11193 RVA: 0x001B5120 File Offset: 0x001B3320
1377 public static Vector3 XZW(this Vector4 vec)
1378 {
1379 Vector3 vector;
1380 return vector;
1381 }
1382
1383 // Token: 0x06002BBA RID: 11194 RVA: 0x001B5130 File Offset: 0x001B3330
1384 public static Vector3 YZW(this Vector4 vec)
1385 {
1386 Vector3 vector;
1387 return vector;
1388 }
1389
1390 // Token: 0x06002BBB RID: 11195 RVA: 0x001B5140 File Offset: 0x001B3340
1392 {
1393 Color color;
1394 return color;
1395 }
1396
1397 // Token: 0x06002BBC RID: 11196 RVA: 0x001B5150 File Offset: 0x001B3350
1399 {
1400 Color color;
1401 return color;
1402 }
1403
1404 // Token: 0x06002BBD RID: 11197 RVA: 0x001B5160 File Offset: 0x001B3360
1405 public static string Hex3(this Color color)
1406 {
1407 string text;
1408 string text2;
1409 string text3;
1410 return (text + text2 + text3).ToLower();
1411 }
1412
1413 // Token: 0x06002BBE RID: 11198 RVA: 0x001B517C File Offset: 0x001B337C
1414 public static string Hex4(this Color color)
1415 {
1416 string text;
1417 string text2;
1418 string text3;
1419 string text4;
1420 return (text + text2 + text3 + text4).ToLower();
1421 }
1422
1423 // Token: 0x06002BBF RID: 11199 RVA: 0x000021DB File Offset: 0x000003DB
1424 public static int ToDirectionInt(this bool value)
1425 {
1426 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1427 }
1428
1429 // Token: 0x06002BC0 RID: 11200 RVA: 0x000021DB File Offset: 0x000003DB
1430 public static int ToInt(this bool value)
1431 {
1432 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1433 }
1434
1435 // Token: 0x06002BC1 RID: 11201 RVA: 0x000021DB File Offset: 0x000003DB
1436 public static int ModulusPositive(this int myInteger, int modulusNumber)
1437 {
1438 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1439 }
1440
1441 // Token: 0x06002BC2 RID: 11202 RVA: 0x001B5198 File Offset: 0x001B3398
1442 public static float AngleLerp(this float curAngle, float targetAngle, float amount)
1443 {
1444 /*
1445An exception occurred when decompiling this method (06002BC2)
1446
1447ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::AngleLerp(System.Single,System.Single,System.Single)
1448
1449 ---> System.Exception: Basic block has to end with unconditional control flow.
1450{
1451 Block_0:
1452 stloc:float32(var_3_0A, call:float32(MathHelper::WrapAngle, ldloc:float32(var_1)))
1453}
1454
1455 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
1456 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
1457 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
1458 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
1459 --- End of inner exception stack trace ---
1460 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
1461 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
1462*/;
1463 }
1464
1465 // Token: 0x06002BC3 RID: 11203 RVA: 0x001B51B0 File Offset: 0x001B33B0
1466 public static float AngleTowards(this float curAngle, float targetAngle, float maxChange)
1467 {
1468 /*
1469An exception occurred when decompiling this method (06002BC3)
1470
1471ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::AngleTowards(System.Single,System.Single,System.Single)
1472
1473 ---> System.Exception: Basic block has to end with unconditional control flow.
1474{
1475 Block_0:
1476 stloc:float32(var_3_0A, call:float32(MathHelper::WrapAngle, ldloc:float32(curAngle)))
1477 stloc:float32(var_5_16, call:float32(MathHelper::Clamp, ldloc:float32(var_3_0A), ldloc:float32(curAngle), ldloc:float32(targetAngle)))
1478 stloc:float32(var_7_22, call:float32(MathHelper::WrapAngle, ldloc:float32(var_5_16)))
1479}
1480
1481 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
1482 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
1483 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
1484 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
1485 --- End of inner exception stack trace ---
1486 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
1487 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
1488*/;
1489 }
1490
1491 // Token: 0x06002BC4 RID: 11204 RVA: 0x001B51E0 File Offset: 0x001B33E0
1492 public static bool deepCompare(this int[] firstArray, int[] secondArray)
1493 {
1494 while (firstArray == null)
1495 {
1496 }
1497 }
1498
1499 // Token: 0x06002BC5 RID: 11205 RVA: 0x001B51F4 File Offset: 0x001B33F4
1500 public static List<int> GetTrueIndexes(this bool[] array)
1501 {
1502 }
1503
1504 // Token: 0x06002BC6 RID: 11206 RVA: 0x001B5204 File Offset: 0x001B3404
1505 public static List<int> GetTrueIndexes(params bool[][] arrays)
1506 {
1507 /*
1508An exception occurred when decompiling this method (06002BC6)
1509
1510ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.List`1<System.Int32> Terraria.Utils::GetTrueIndexes(System.Boolean[][])
1511
1512 ---> System.Exception: Basic block has to end with unconditional control flow.
1513{
1514 IL_0000:
1515 brtrue(IL_0000, ldc.i4:bool(1))
1516}
1517
1518 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
1519 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
1520 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
1521 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
1522 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
1523 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
1524 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
1525 --- End of inner exception stack trace ---
1526 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
1527 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
1528*/;
1529 }
1530
1531 // Token: 0x06002BC7 RID: 11207 RVA: 0x001B5218 File Offset: 0x001B3418
1532 public static int Count<T>(this T[] arr, T value)
1533 {
1534 }
1535
1536 // Token: 0x06002BC8 RID: 11208 RVA: 0x001B5228 File Offset: 0x001B3428
1537 public static bool PressingShift(this KeyboardState kb)
1538 {
1539 return true;
1540 }
1541
1542 // Token: 0x06002BC9 RID: 11209 RVA: 0x001B5238 File Offset: 0x001B3438
1543 public static bool PressingControl(this KeyboardState kb)
1544 {
1545 return true;
1546 }
1547
1548 // Token: 0x06002BCA RID: 11210 RVA: 0x001B5248 File Offset: 0x001B3448
1550 {
1551 return array;
1552 }
1553
1554 // Token: 0x06002BCB RID: 11211 RVA: 0x001B5258 File Offset: 0x001B3458
1555 public static bool PlotLine(Point16 p0, Point16 p1, Utils.TileActionAttempt plot, bool jump = true)
1556 {
1557 if (!true)
1558 {
1559 }
1560 bool flag;
1561 return flag;
1562 }
1563
1564 // Token: 0x06002BCC RID: 11212 RVA: 0x001B526C File Offset: 0x001B346C
1565 public static bool PlotLine(Point p0, Point p1, Utils.TileActionAttempt plot, bool jump = true)
1566 {
1567 if (!true)
1568 {
1569 }
1570 bool flag;
1571 return flag;
1572 }
1573
1574 // Token: 0x06002BCD RID: 11213 RVA: 0x001B5280 File Offset: 0x001B3480
1575 private static void PlotLineLength(int x0, int y0, int x1, int y1, int length, bool jump = true)
1576 {
1577 }
1578
1579 // Token: 0x06002BCE RID: 11214 RVA: 0x001B5290 File Offset: 0x001B3490
1580 private static bool PlotLineOffset(Vector2D start, Vector2D end, double halfWidth, int x0, int y0, int x1, int y1, Utils.TileActionAttempt plot, bool jump = true)
1581 {
1583 double num = vector2D.Length();
1585 Point point = vector2D2.ToTileCoordinates();
1586 Point point2;
1587 if (point2 == null)
1588 {
1589 }
1590 if (point2 == null)
1591 {
1592 return;
1593 }
1594 }
1595
1596 // Token: 0x06002BCF RID: 11215 RVA: 0x001B52C8 File Offset: 0x001B34C8
1597 private static bool PlotLineOffsetTale(Vector2D start, Vector2D end, int length, double halfWidth, int x0, int y0, int x1, int y1, Utils.TileActionAttempt plot, bool jump = true)
1598 {
1599 int num = 1;
1600 if (num == 0)
1601 {
1602 }
1604 double num2 = vector2D.Length();
1605 if (num == 0)
1606 {
1607 }
1608 if (num == 0)
1609 {
1610 }
1611 if (length == 0)
1612 {
1613 }
1614 if (length == 0)
1615 {
1616 return;
1617 }
1618 }
1619
1620 // Token: 0x06002BD0 RID: 11216 RVA: 0x001B52F8 File Offset: 0x001B34F8
1621 private static bool PlotLine(int x0, int y0, int x1, int y1, Utils.TileActionAttempt plot, bool jump = true)
1622 {
1623 if (!true)
1624 {
1625 return;
1626 }
1627 }
1628
1629 // Token: 0x06002BD1 RID: 11217 RVA: 0x001B5310 File Offset: 0x001B3510
1630 public static int RandomNext(ulong seed, int bits)
1631 {
1632 /*
1633An exception occurred when decompiling this method (06002BD1)
1634
1635ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.Utils::RandomNext(System.UInt64,System.Int32)
1636
1637 ---> System.Exception: Basic block has to end with unconditional control flow.
1638{
1639 IL_0000:
1640 brtrue(IL_0000, ldc.i4:bool(1))
1641}
1642
1643 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
1644 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
1645 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
1646 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
1647 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
1648 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
1649 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
1650 --- End of inner exception stack trace ---
1651 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
1652 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
1653*/;
1654 }
1655
1656 // Token: 0x06002BD2 RID: 11218 RVA: 0x000021DB File Offset: 0x000003DB
1657 public static ulong RandomNextSeed(ulong seed)
1658 {
1659 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
1660 }
1661
1662 // Token: 0x06002BD3 RID: 11219 RVA: 0x001B5320 File Offset: 0x001B3520
1663 public static float RandomFloat(ulong seed)
1664 {
1665 /*
1666An exception occurred when decompiling this method (06002BD3)
1667
1668ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Utils::RandomFloat(System.UInt64)
1669
1670 ---> System.Exception: Basic block has to end with unconditional control flow.
1671{
1672 IL_0003:
1673 stloc:int32(var_0_14, call:int32(Utils::RandomNext, conv.u8:uint64(ldc.i8:int64[exp:uint64](4720931368828141568)), ldc.i4:int32(24)))
1674}
1675
1676 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
1677 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
1678 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
1679 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
1680 --- End of inner exception stack trace ---
1681 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
1682 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
1683*/;
1684 }
1685
1686 // Token: 0x06002BD4 RID: 11220 RVA: 0x001B5344 File Offset: 0x001B3544
1687 public static int RandomInt(ulong seed, int max)
1688 {
1689 if (!true)
1690 {
1691 }
1692 int num = 31;
1693 return Utils.RandomNext((ulong)4720931368828141568L, num);
1694 }
1695
1696 // Token: 0x06002BD5 RID: 11221 RVA: 0x001B5380 File Offset: 0x001B3580
1697 public static int RandomInt(ulong seed, int min, int max)
1698 {
1699 if (!true)
1700 {
1701 }
1702 return Utils.RandomInt((ulong)4720931368828141568L, (int)seed);
1703 }
1704
1705 // Token: 0x06002BD6 RID: 11222 RVA: 0x001B53A0 File Offset: 0x001B35A0
1706 public static bool PlotTileLineInner(int x, int y)
1707 {
1708 if (!true)
1709 {
1710 }
1711 bool flag;
1712 return flag;
1713 }
1714
1715 // Token: 0x06002BD7 RID: 11223 RVA: 0x001B53B4 File Offset: 0x001B35B4
1716 public static bool PlotTileLine(Vector2 start, Vector2 end, float width, Utils.TileActionAttempt plot)
1717 {
1718 if (!true)
1719 {
1720 }
1721 bool flag;
1722 return flag;
1723 }
1724
1725 // Token: 0x06002BD8 RID: 11224 RVA: 0x001B53C8 File Offset: 0x001B35C8
1726 public static bool PlotTileLine(Vector2D start, Vector2D end, double width, Utils.TileActionAttempt plot)
1727 {
1728 int num = 1;
1729 if (num == 0)
1730 {
1731 }
1733 double num2 = vector2D.Length();
1734 if (num == 0)
1735 {
1736 }
1738 Point point = vector2D2.ToTileCoordinates();
1739 bool flag;
1740 return flag;
1741 }
1742
1743 // Token: 0x06002BD9 RID: 11225 RVA: 0x001B5400 File Offset: 0x001B3600
1744 public static bool PlotTileTale(Vector2D start, Vector2D end, double width, Utils.TileActionAttempt plot)
1745 {
1746 if (!true)
1747 {
1748 }
1750 double num = vector2D.Length();
1751 if (!true)
1752 {
1753 }
1754 bool flag;
1755 return flag;
1756 }
1757
1758 // Token: 0x06002BDA RID: 11226 RVA: 0x001B5420 File Offset: 0x001B3620
1759 public static bool PlotTileArea(int x, int y, Utils.TileActionAttempt plot)
1760 {
1761 if (!true)
1762 {
1763 }
1764 long num = 0L;
1765 bool flag = WorldGen.InWorld(0, x, (int)num);
1766 if (!flag)
1767 {
1768 }
1770 if (!flag)
1771 {
1772 }
1773 return false;
1774 }
1775
1776 // Token: 0x06002BDB RID: 11227 RVA: 0x001B54C8 File Offset: 0x001B36C8
1777 public static int RandomConsecutive(double random, int odds)
1778 {
1779 if (!true)
1780 {
1781 return;
1782 }
1783 }
1784
1785 // Token: 0x06002BDC RID: 11228 RVA: 0x001B54DC File Offset: 0x001B36DC
1786 public static Vector2 RandomVector2(UnifiedRandom random, float min, float max)
1787 {
1788 double num = random.NextDouble();
1789 double num2 = random.NextDouble();
1790 Vector2 vector;
1791 return vector;
1792 }
1793
1794 // Token: 0x06002BDD RID: 11229 RVA: 0x001B54F8 File Offset: 0x001B36F8
1795 public static Vector2D RandomVector2D(UnifiedRandom random, double min, double max)
1796 {
1797 double num = random.NextDouble();
1798 double num2 = random.NextDouble();
1800 return vector2D;
1801 }
1802
1803 // Token: 0x06002BDE RID: 11230 RVA: 0x001B5514 File Offset: 0x001B3714
1804 public static bool IndexInRange<T>(this T[] t, int index)
1805 {
1806 }
1807
1808 // Token: 0x06002BDF RID: 11231 RVA: 0x001B5524 File Offset: 0x001B3724
1809 public static bool IndexInRange<T>(this List<T> t, int index)
1810 {
1811 }
1812
1813 // Token: 0x06002BE0 RID: 11232 RVA: 0x001B5534 File Offset: 0x001B3734
1814 public static T SelectRandom<T>(UnifiedRandom random, params T[] choices)
1815 {
1816 /*
1817An exception occurred when decompiling this method (06002BE0)
1818
1819ICSharpCode.Decompiler.DecompilerException: Error decompiling T Terraria.Utils::SelectRandom<T>(Terraria.Utilities.UnifiedRandom,T[])
1820
1821 ---> System.Exception: Basic block has to end with unconditional control flow.
1822{
1823 Block_0:
1824 stloc:int32[](var_0_06, ldfld:int32[](UnifiedRandom::SeedArray, ldloc:UnifiedRandom(random)))
1825}
1826
1827 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
1828 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
1829 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
1830 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
1831 --- End of inner exception stack trace ---
1832 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
1833 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
1834*/;
1835 }
1836
1837 // Token: 0x06002BE1 RID: 11233 RVA: 0x001B5548 File Offset: 0x001B3748
1838 public static void DrawBorderStringFourWay(SpriteBatch sb, SpriteFont font, string text, float x, float y, Color textColor, Color borderColor, Vector2 origin, float scale = 1f)
1839 {
1840 if (!true)
1841 {
1842 }
1843 if (!true)
1844 {
1845 }
1846 }
1847
1848 // Token: 0x06002BE2 RID: 11234 RVA: 0x001B5564 File Offset: 0x001B3764
1849 public static Vector2 DrawBorderString(SpriteBatch sb, string text, Vector2 pos, Color color, float scale = 1f, float anchorx = 0f, float anchory = 0f, int maxCharactersDisplayed = -1)
1850 {
1851 int stringLength = text._stringLength;
1852 if (stringLength == 0)
1853 {
1854 }
1855 if (stringLength == 0)
1856 {
1857 }
1858 if (stringLength == 0)
1859 {
1860 }
1861 return 16320;
1862 }
1863
1864 // Token: 0x06002BE3 RID: 11235 RVA: 0x001B558C File Offset: 0x001B378C
1865 public static Vector2 DrawBorderStringBig(SpriteBatch spriteBatch, string text, Vector2 pos, Color color, float scale = 1f, float anchorx = 0f, float anchory = 0f, int maxCharactersDisplayed = -1)
1866 {
1867 int stringLength = text._stringLength;
1868 if (stringLength == 0)
1869 {
1870 }
1871 if (stringLength == 0)
1872 {
1873 }
1874 if (stringLength == 0)
1875 {
1876 }
1877 if (stringLength == 0)
1878 {
1879 return;
1880 }
1881 }
1882
1883 // Token: 0x06002BE4 RID: 11236 RVA: 0x001B55B8 File Offset: 0x001B37B8
1884 public static void DrawInvBG(SpriteBatch sb, Rectangle R, [Optional] Color c)
1885 {
1886 if (!true)
1887 {
1888 }
1889 }
1890
1891 // Token: 0x06002BE5 RID: 11237 RVA: 0x001B55C8 File Offset: 0x001B37C8
1892 public static void DrawInvBG(SpriteBatch sb, float x, float y, float w, float h, [Optional] Color c)
1893 {
1894 if (!true)
1895 {
1896 }
1897 }
1898
1899 // Token: 0x06002BE6 RID: 11238 RVA: 0x001B55D8 File Offset: 0x001B37D8
1900 public static void DrawInvBG(SpriteBatch sb, int x, int y, int w, int h, [Optional] Color c)
1901 {
1902 int num = 1;
1903 if (num == 0)
1904 {
1905 }
1906 if (num == 0)
1907 {
1908 }
1909 }
1910
1911 // Token: 0x06002BE7 RID: 11239 RVA: 0x001B56A4 File Offset: 0x001B38A4
1912 public static string ReadEmbeddedResource(string path)
1913 {
1914 if (!false)
1915 {
1916 if (!false)
1917 {
1918 }
1919 throw new OutOfMemoryException();
1920 }
1921 throw new OutOfMemoryException();
1922 }
1923
1924 // Token: 0x06002BE8 RID: 11240 RVA: 0x001B56E4 File Offset: 0x001B38E4
1925 public static void DrawSplicedPanel(SpriteBatch sb, Texture2D texture, int x, int y, int w, int h, int leftEnd, int rightEnd, int topEnd, int bottomEnd, Color c)
1926 {
1927 int width = texture.Width;
1928 int width2 = texture.Width;
1929 int height = texture.Height;
1930 int width3 = texture.Width;
1931 int arraySize = texture.ArraySize;
1932 int width4 = texture.Width;
1933 int arraySize2 = texture.ArraySize;
1934 int height2 = texture.Height;
1935 int width5 = texture.Width;
1936 int arraySize3 = texture.ArraySize;
1937 int width6 = texture.Width;
1938 int arraySize4 = texture.ArraySize;
1939 }
1940
1941 // Token: 0x06002BE9 RID: 11241 RVA: 0x001B575C File Offset: 0x001B395C
1942 public static void DrawSettingsPanel(SpriteBatch spriteBatch, Vector2 position, float width, Color color)
1943 {
1944 if (!true)
1945 {
1946 }
1947 }
1948
1949 // Token: 0x06002BEA RID: 11242 RVA: 0x001B576C File Offset: 0x001B396C
1950 public static void DrawSettings2Panel(SpriteBatch spriteBatch, Vector2 position, float width, Color color)
1951 {
1952 if (!true)
1953 {
1954 }
1955 }
1956
1957 // Token: 0x06002BEB RID: 11243 RVA: 0x001B577C File Offset: 0x001B397C
1958 public static void DrawPanel(Texture2D texture, int edgeWidth, int edgeShove, SpriteBatch spriteBatch, Vector2 position, float width, Color color)
1959 {
1960 int height = texture.Height;
1961 int width2 = texture.Width;
1962 int arraySize = texture.ArraySize;
1963 if (width2 == 0)
1964 {
1965 }
1966 int num = 1;
1967 if (num == 0)
1968 {
1969 }
1970 int width3 = texture.Width;
1971 int value = num.m_value;
1972 int width4 = texture.Width;
1973 int arraySize2 = texture.ArraySize;
1974 }
1975
1976 // Token: 0x06002BEC RID: 11244 RVA: 0x001B57D4 File Offset: 0x001B39D4
1977 public static void DrawRectangle(SpriteBatch sb, Vector2 start, Vector2 end, Color colorStart, Color colorEnd, float width)
1978 {
1979 if (!true)
1980 {
1981 }
1982 Utils.DrawLine(sb, start, end, colorStart, colorEnd, width);
1983 Utils.DrawLine(sb, start, end, colorStart, colorEnd, width);
1984 Utils.DrawLine(sb, start, end, colorStart, colorEnd, width);
1985 Utils.DrawLine(sb, start, end, colorStart, colorEnd, width);
1986 }
1987
1988 // Token: 0x06002BED RID: 11245 RVA: 0x001B5818 File Offset: 0x001B3A18
1990 {
1991 if (!true)
1992 {
1993 }
1994 Vector2 vector;
1995 float num = vector.Length();
1996 if (!true)
1997 {
1998 }
1999 }
2000
2001 // Token: 0x06002BEE RID: 11246 RVA: 0x001B5850 File Offset: 0x001B3A50
2002 public static void DrawLine(SpriteBatch spriteBatch, Point start, Point end, Color color)
2003 {
2004 if (!true)
2005 {
2006 }
2007 }
2008
2009 // Token: 0x06002BEF RID: 11247 RVA: 0x001B5860 File Offset: 0x001B3A60
2010 public static void DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color)
2011 {
2012 if (!true)
2013 {
2014 }
2015 if (!true)
2016 {
2017 }
2018 Vector2 screenPosition = Main.screenPosition;
2019 if (!true)
2020 {
2021 }
2022 if (!true)
2023 {
2024 }
2025 if (!true)
2026 {
2027 }
2028 }
2029
2030 // Token: 0x06002BF0 RID: 11248 RVA: 0x001B589C File Offset: 0x001B3A9C
2031 public static void DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color colorStart, Color colorEnd, float width)
2032 {
2033 if (!true)
2034 {
2035 }
2036 if (!true)
2037 {
2038 }
2039 Vector2 screenPosition = Main.screenPosition;
2040 if (!true)
2041 {
2042 }
2043 if (15744 == 0)
2044 {
2045 }
2046 if (!true)
2047 {
2048 }
2049 }
2050
2051 // Token: 0x06002BF1 RID: 11249 RVA: 0x001B58D8 File Offset: 0x001B3AD8
2052 public static void DrawRectForTilesInWorld(SpriteBatch spriteBatch, Rectangle rect, Color color)
2053 {
2054 if (!true)
2055 {
2056 }
2057 }
2058
2059 // Token: 0x06002BF2 RID: 11250 RVA: 0x001B58E8 File Offset: 0x001B3AE8
2060 public static void DrawRectForTilesInWorld(SpriteBatch spriteBatch, Point start, Point end, Color color)
2061 {
2062 if (!true)
2063 {
2064 }
2065 }
2066
2067 // Token: 0x06002BF3 RID: 11251 RVA: 0x001B58F8 File Offset: 0x001B3AF8
2068 public static void DrawRect(SpriteBatch spriteBatch, Rectangle rect, Color color)
2069 {
2070 if (!true)
2071 {
2072 }
2073 }
2074
2075 // Token: 0x06002BF4 RID: 11252 RVA: 0x001B5908 File Offset: 0x001B3B08
2076 public static void DrawRect(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color)
2077 {
2078 if (!true)
2079 {
2080 }
2081 Utils.DrawLine(spriteBatch, start, end, color);
2082 Utils.DrawLine(spriteBatch, start, end, color);
2083 Utils.DrawLine(spriteBatch, start, end, color);
2084 Utils.DrawLine(spriteBatch, start, end, color);
2085 }
2086
2087 // Token: 0x06002BF5 RID: 11253 RVA: 0x001B593C File Offset: 0x001B3B3C
2089 {
2090 if (!true)
2091 {
2092 }
2093 }
2094
2095 // Token: 0x06002BF6 RID: 11254 RVA: 0x001B594C File Offset: 0x001B3B4C
2096 public static void DrawCursorSingle(SpriteBatch sb, Color color, float rot = float.NaN, float scale = 1f, [Optional] Vector2 manualPosition, int cursorSlot = 0, int specialMode = 0)
2097 {
2098 if (!true)
2099 {
2100 }
2101 if (!true)
2102 {
2103 }
2104 int mouseX = Main.mouseX;
2105 int mouseY = Main.mouseY;
2106 int num = 1;
2107 if (num == 0)
2108 {
2109 }
2110 int value = num.m_value;
2111 if (cursorSlot == 0)
2112 {
2113 return;
2114 }
2115 if (!true)
2116 {
2117 }
2118 bool thickMouse = Main.ThickMouse;
2119 Vector2 vector = Main.DrawThickCursor(true);
2120 long num2;
2121 if (num2 != 0L)
2122 {
2123 if (!true)
2124 {
2125 }
2126 if (!true)
2127 {
2128 }
2129 }
2130 }
2131
2132 // Token: 0x06002BF7 RID: 11255 RVA: 0x001B59C4 File Offset: 0x001B3BC4
2133 // Note: this type is marked as 'beforefieldinit'.
2134 static Utils()
2135 {
2136 }
2137
2138 // Token: 0x06002BF8 RID: 11256 RVA: 0x001B59D4 File Offset: 0x001B3BD4
2141 {
2142 int num = 1;
2143 int value = yVal.m_value;
2144 if (num == 0)
2145 {
2146 }
2147 bool flag;
2148 return flag;
2149 }
2150
2151 // Token: 0x06002BF9 RID: 11257 RVA: 0x001B59F0 File Offset: 0x001B3BF0
2154 {
2155 int value = yVal.m_value;
2157 if (value == 0)
2158 {
2159 }
2160 if (value == 0)
2161 {
2162 }
2164 Point point = vector2D.ToTileCoordinates();
2165 bool flag;
2166 return flag;
2167 }
2168
2169 // Token: 0x0400379F RID: 14239
2170 public const long MaxCoins = 999999999L;
2171
2172 // Token: 0x040037A0 RID: 14240
2174
2175 // Token: 0x040037A1 RID: 14241
2177
2178 // Token: 0x040037A2 RID: 14242
2179 private const ulong RANDOM_MULTIPLIER = 25214903917UL;
2180
2181 // Token: 0x040037A3 RID: 14243
2182 private const ulong RANDOM_ADD = 11UL;
2183
2184 // Token: 0x040037A4 RID: 14244
2185 private const ulong RANDOM_MASK = 281474976710655UL;
2186
2187 // Token: 0x040037A5 RID: 14245
2189
2190 // Token: 0x040037A6 RID: 14246
2192
2193 // Token: 0x040037A7 RID: 14247
2195
2196 // Token: 0x040037A8 RID: 14248
2198
2199 // Token: 0x02000466 RID: 1126
2201 {
2202 // Token: 0x06002BFA RID: 11258 RVA: 0x001B5A2C File Offset: 0x001B3C2C
2203 public TileActionAttempt(object @object, IntPtr method)
2204 {
2206 this.m_target = @object;
2208 this.method_code = this;
2209 }
2210
2211 // Token: 0x06002BFB RID: 11259 RVA: 0x001B5A80 File Offset: 0x001B3C80
2212 public bool Invoke(int x, int y)
2213 {
2214 /*
2215An exception occurred when decompiling this method (06002BFB)
2216
2217ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Utils/TileActionAttempt::Invoke(System.Int32,System.Int32)
2218
2219 ---> System.Exception: Basic block has to end with unconditional control flow.
2220{
2221 Block_0:
2222 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:TileActionAttempt[exp:Delegate](this)))
2223 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:TileActionAttempt[exp:Delegate](this)))
2224 stloc:native int(var_2_14, ldfld:native int(Delegate::method, ldloc:TileActionAttempt[exp:Delegate](this)))
2225}
2226
2227 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
2228 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
2229 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
2230 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
2231 --- End of inner exception stack trace ---
2232 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
2233 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
2234*/;
2235 }
2236
2237 // Token: 0x06002BFC RID: 11260 RVA: 0x000021DB File Offset: 0x000003DB
2238 public IAsyncResult BeginInvoke(int x, int y, AsyncCallback callback, object @object)
2239 {
2240 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
2241 }
2242
2243 // Token: 0x06002BFD RID: 11261 RVA: 0x000021DB File Offset: 0x000003DB
2244 public bool EndInvoke(IAsyncResult result)
2245 {
2246 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
2247 }
2248 }
2249
2250 // Token: 0x02000467 RID: 1127
2252 {
2253 // Token: 0x06002BFE RID: 11262 RVA: 0x001B5AA4 File Offset: 0x001B3CA4
2254 public LaserLineFraming(object @object, IntPtr method)
2255 {
2257 this.m_target = @object;
2259 this.method_code = this;
2260 }
2261
2262 // Token: 0x06002BFF RID: 11263 RVA: 0x001B5AF8 File Offset: 0x001B3CF8
2263 public void Invoke(int stage, [Out] float distanceCovered, [Out] Rectangle frame, [Out] Vector2 origin, [Out] Color color)
2264 {
2267 IntPtr method = this.method;
2268 }
2269
2270 // Token: 0x06002C00 RID: 11264 RVA: 0x000021DB File Offset: 0x000003DB
2271 public IAsyncResult BeginInvoke(int stage, [Out] float distanceCovered, [Out] Rectangle frame, [Out] Vector2 origin, [Out] Color color, AsyncCallback callback, object @object)
2272 {
2273 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
2274 }
2275
2276 // Token: 0x06002C01 RID: 11265 RVA: 0x001B5B1C File Offset: 0x001B3D1C
2277 public void EndInvoke([Out] float distanceCovered, [Out] Rectangle frame, [Out] Vector2 origin, [Out] Color color, IAsyncResult result)
2278 {
2279 }
2280 }
2281
2282 // Token: 0x02000468 RID: 1128
2284 {
2285 // Token: 0x06002C02 RID: 11266 RVA: 0x001B5B2C File Offset: 0x001B3D2C
2286 public ColorLerpMethod(object @object, IntPtr method)
2287 {
2289 this.m_target = @object;
2291 this.method_code = this;
2292 }
2293
2294 // Token: 0x06002C03 RID: 11267 RVA: 0x001B5B80 File Offset: 0x001B3D80
2295 public Color Invoke(float percent)
2296 {
2297 /*
2298An exception occurred when decompiling this method (06002C03)
2299
2300ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Graphics.Color Terraria.Utils/ColorLerpMethod::Invoke(System.Single)
2301
2302 ---> System.Exception: Basic block has to end with unconditional control flow.
2303{
2304 Block_0:
2305 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:ColorLerpMethod[exp:Delegate](this)))
2306 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:ColorLerpMethod[exp:Delegate](this)))
2307 stloc:native int(var_2_14, ldfld:native int(Delegate::method, ldloc:ColorLerpMethod[exp:Delegate](this)))
2308}
2309
2310 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
2311 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
2312 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
2313 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
2314 --- End of inner exception stack trace ---
2315 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
2316 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
2317*/;
2318 }
2319
2320 // Token: 0x06002C04 RID: 11268 RVA: 0x000021DB File Offset: 0x000003DB
2321 public IAsyncResult BeginInvoke(float percent, AsyncCallback callback, object @object)
2322 {
2323 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
2324 }
2325
2326 // Token: 0x06002C05 RID: 11269 RVA: 0x001B5BA4 File Offset: 0x001B3DA4
2328 {
2329 Color color;
2330 return color;
2331 }
2332 }
2333
2334 // Token: 0x02000469 RID: 1129
2335 public struct ChaseResults
2336 {
2337 // Token: 0x040037A9 RID: 14249
2339
2340 // Token: 0x040037AA RID: 14250
2342
2343 // Token: 0x040037AB RID: 14251
2344 public float InterceptionTime;
2345
2346 // Token: 0x040037AC RID: 14252
2348 }
2349
2350 // Token: 0x0200046A RID: 1130
2352 private sealed class <>c__DisplayClass47_0
2353 {
2354 // Token: 0x06002C06 RID: 11270 RVA: 0x001B5BB4 File Offset: 0x001B3DB4
2356 {
2357 }
2358
2359 // Token: 0x06002C07 RID: 11271 RVA: 0x001B5BC8 File Offset: 0x001B3DC8
2361 {
2362 /*
2363An exception occurred when decompiling this method (06002C07)
2364
2365ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String Terraria.Utils/<>c__DisplayClass47_0::<FormatWith>b__0(System.Text.RegularExpressions.Match)
2366
2367 ---> System.Exception: Basic block has to end with unconditional control flow.
2368{
2369 Block_1:
2370 stloc:object(var_2_1C, ldfld:object('<>c__DisplayClass47_0'::obj, ldloc:'<>c__DisplayClass47_0'(this)))
2371}
2372
2373 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
2374 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
2375 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
2376 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
2377 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
2378 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
2379 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
2380 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
2381 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
2382 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
2383 --- End of inner exception stack trace ---
2384 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
2385 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
2386*/;
2387 }
2388
2389 // Token: 0x040037AD RID: 14253
2390 public PropertyDescriptorCollection properties;
2391
2392 // Token: 0x040037AE RID: 14254
2393 public object obj;
2394 }
2395
2396 // Token: 0x0200046B RID: 1131
2398 [StructLayout(3)]
2400 {
2401 // Token: 0x040037AF RID: 14255
2403
2404 // Token: 0x040037B0 RID: 14256
2406
2407 // Token: 0x040037B1 RID: 14257
2409 }
2410
2411 // Token: 0x0200046C RID: 1132
2413 [StructLayout(3)]
2415 {
2416 // Token: 0x040037B2 RID: 14258
2417 public int curLength;
2418
2419 // Token: 0x040037B3 RID: 14259
2420 public int length;
2421
2422 // Token: 0x040037B4 RID: 14260
2424
2425 // Token: 0x040037B5 RID: 14261
2427
2428 // Token: 0x040037B6 RID: 14262
2430
2431 // Token: 0x040037B7 RID: 14263
2432 public double halfWidth;
2433
2434 // Token: 0x040037B8 RID: 14264
2436
2437 // Token: 0x040037B9 RID: 14265
2439
2440 // Token: 0x040037BA RID: 14266
2441 public int x0;
2442
2443 // Token: 0x040037BB RID: 14267
2444 public int y0;
2445
2446 // Token: 0x040037BC RID: 14268
2448
2449 // Token: 0x040037BD RID: 14269
2451 }
2452 }
2453}
class f__AnonymousType0<< Count > j__TPar
static PropertyDescriptorCollection GetProperties(Type componentType)
IntPtr method_code
Definition Delegate.cs:386
IntPtr invoke_impl
Definition Delegate.cs:371
static CultureInfo InvariantCulture
static Microsoft.Xna.Framework.Vector2 screenPosition
Definition Main.cs:1973
static Microsoft.Xna.Framework.Vector2 DrawThickCursor(bool smart=false)
Definition Main.cs:13904
static bool ThickMouse
Definition Main.cs:4013
static int mouseY
Definition Main.cs:601
static int mouseX
Definition Main.cs:587
static void CreateDirectory(string path)
static bool Exists(string path, bool cloud=false)
ColorLerpMethod(object @object, IntPtr method)
Definition Utils.cs:2286
Color Invoke(float percent)
Definition Utils.cs:2295
IAsyncResult BeginInvoke(float percent, AsyncCallback callback, object @object)
Definition Utils.cs:2321
Color EndInvoke(IAsyncResult result)
Definition Utils.cs:2327
IAsyncResult BeginInvoke(int stage, [Out] float distanceCovered, [Out] Rectangle frame, [Out] Vector2 origin, [Out] Color color, AsyncCallback callback, object @object)
Definition Utils.cs:2271
void EndInvoke([Out] float distanceCovered, [Out] Rectangle frame, [Out] Vector2 origin, [Out] Color color, IAsyncResult result)
Definition Utils.cs:2277
LaserLineFraming(object @object, IntPtr method)
Definition Utils.cs:2254
void Invoke(int stage, [Out] float distanceCovered, [Out] Rectangle frame, [Out] Vector2 origin, [Out] Color color)
Definition Utils.cs:2263
TileActionAttempt(object @object, IntPtr method)
Definition Utils.cs:2203
bool EndInvoke(IAsyncResult result)
Definition Utils.cs:2244
bool Invoke(int x, int y)
Definition Utils.cs:2212
IAsyncResult BeginInvoke(int x, int y, AsyncCallback callback, object @object)
Definition Utils.cs:2238
static bool PlotTileArea(int x, int y, Utils.TileActionAttempt plot)
Definition Utils.cs:1759
static Vector2 Vector2FromElipse(Vector2 angleVector, Vector2 elipseSizes)
Definition Utils.cs:399
static Vector2 ZW(this Vector4 vec)
Definition Utils.cs:1370
static double Lerp(double value1, double value2, double amount)
Definition Utils.cs:36
static float Remap(float fromValue, float fromMin, float fromMax, float toMin, float toMax, bool clamped=true)
Definition Utils.cs:188
static Point16 ToTileCoordinates16(this Vector2D vec)
Definition Utils.cs:1152
static Point plotInnerLineMinOffset
Definition Utils.cs:2191
static Regex _substitutionRegex
Definition Utils.cs:2176
static void TrimTextIfNeeded(string text, SpriteFont font, float scale, float maxWidth)
Definition Utils.cs:485
static float NextFloat(this UnifiedRandom random, FloatRange range)
Definition Utils.cs:553
static bool PlotTileLine(Vector2 start, Vector2 end, float width, Utils.TileActionAttempt plot)
Definition Utils.cs:1716
static Vector2 RotatedByRandom(this Vector2 spinninpoint, double maxRadians)
Definition Utils.cs:1041
static Vector2 TopRight(this Rectangle r)
Definition Utils.cs:836
static Vector3 XZW(this Vector4 vec)
Definition Utils.cs:1377
static int[] CoinsSplit(long count)
Definition Utils.cs:431
static bool WithinRange(this Vector2 Origin, Vector2 Target, float MaxRange)
Definition Utils.cs:1354
static Utils.ChaseResults GetChaseResults(Vector2 chaserPosition, float chaserSpeed, Vector2 runnerPosition, Vector2 runnerVelocity)
Definition Utils.cs:220
static int RandomInt(ulong seed, int max)
Definition Utils.cs:1687
static void DrawBorderStringFourWay(SpriteBatch sb, SpriteFont font, string text, float x, float y, Color textColor, Color borderColor, Vector2 origin, float scale=1f)
Definition Utils.cs:1838
static Vector2 DirectionTo(this Vector2 Origin, Vector2 Target)
Definition Utils.cs:1336
static bool TryCreatingDirectory(string folderPath)
Definition Utils.cs:515
static Vector2 Center(this Rectangle r)
Definition Utils.cs:857
static bool IntersectsConeFastInaccurate(this Rectangle targetRect, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle)
Definition Utils.cs:906
static Vector2 RandomVector2(UnifiedRandom random, float min, float max)
Definition Utils.cs:1786
static int ToInt(this bool value)
Definition Utils.cs:1430
static List< int > GetTrueIndexes(params bool[][] arrays)
Definition Utils.cs:1505
static Vector2 Size(this Texture2D tex)
Definition Utils.cs:759
static string ReadEmbeddedResource(string path)
Definition Utils.cs:1912
static string FormatWith(string original, object obj)
Definition Utils.cs:501
const ulong RANDOM_MASK
Definition Utils.cs:2185
static float WrappedLerp(float value1, float value2, float percent)
Definition Utils.cs:177
static void DrawSplicedPanel(SpriteBatch sb, Texture2D texture, int x, int y, int w, int h, int leftEnd, int rightEnd, int topEnd, int bottomEnd, Color c)
Definition Utils.cs:1925
static void WriteVector2(this BinaryWriter bb, Vector2 v)
Definition Utils.cs:773
static Vector2 rotateTowards(Vector2 currentPosition, Vector2 currentVelocity, Vector2 targetPosition, float maxChange)
Definition Utils.cs:1294
static bool IsPowerOfTwo(int x)
Definition Utils.cs:51
static Rectangle Modified(this Rectangle r, int x, int y, int w, int h)
Definition Utils.cs:900
static bool< PlotLineOffset > g__PlotAtOffset(int xVal, int yVal, Utils.<>c__DisplayClass149_0 cpp2il__autoParamName__idx_3)
Definition Utils.cs:2140
static void DrawRectForTilesInWorld(SpriteBatch spriteBatch, Rectangle rect, Color color)
Definition Utils.cs:2052
static bool PressingShift(this KeyboardState kb)
Definition Utils.cs:1537
static bool PlotLine(int x0, int y0, int x1, int y1, Utils.TileActionAttempt plot, bool jump=true)
Definition Utils.cs:1621
static Color MultiplyRGB(this Color firstColor, Color secondColor)
Definition Utils.cs:1391
static Vector2 NextVector2Circular(this UnifiedRandom r, float circleHalfWidth, float circleHalfHeight)
Definition Utils.cs:647
static Vector2D ToVector2D(this Point16 p)
Definition Utils.cs:1098
static float RandomFloat(ulong seed)
Definition Utils.cs:1663
static Vector2 NextVector2FromRectangle(this UnifiedRandom r, Rectangle rect)
Definition Utils.cs:626
static Vector2 ReadPackedVector2(this BinaryReader bb)
Definition Utils.cs:795
static int Count< T >(this T[] arr, T value)
Definition Utils.cs:1532
static Vector2 NextVector2CircularEdge(this UnifiedRandom r, float circleHalfWidth, float circleHalfHeight)
Definition Utils.cs:672
static Rectangle Frame(this Texture2D tex, int horizontalFrames=1, int verticalFrames=1, int frameX=0, int frameY=0, int sizeOffsetX=0, int sizeOffsetY=0)
Definition Utils.cs:746
static Vector2 BottomLeft(this Rectangle r)
Definition Utils.cs:843
static bool SolveQuadratic(float a, float b, float c, [Out] float result1, [Out] float result2)
Definition Utils.cs:250
static string[] WordwrapString(string text, SpriteFont font, int maxWidth, int maxLines, [Out] int lineAmount)
Definition Utils.cs:380
static bool PlotLineOffsetTale(Vector2D start, Vector2D end, int length, double halfWidth, int x0, int y0, int x1, int y1, Utils.TileActionAttempt plot, bool jump=true)
Definition Utils.cs:1597
static Vector2 OriginFlip(this Rectangle rect, Vector2 origin, SpriteEffects effects)
Definition Utils.cs:752
static void DrawInvBG(SpriteBatch sb, Rectangle R, [Optional] Color c)
Definition Utils.cs:1884
static Vector2 BottomRight(this Rectangle r)
Definition Utils.cs:850
static Vector2D RandomVector2D(UnifiedRandom random, double min, double max)
Definition Utils.cs:1795
static void PoofOfSmoke(Vector2 position)
Definition Utils.cs:442
static double GetLerpValue(double from, double to, double t, bool clamped=false)
Definition Utils.cs:256
static bool PlotTileTale(Vector2D start, Vector2D end, double width, Utils.TileActionAttempt plot)
Definition Utils.cs:1744
static Utils.TileActionAttempt plotInnerCall
Definition Utils.cs:2188
static bool deepCompare(this int[] firstArray, int[] secondArray)
Definition Utils.cs:1492
static bool PlotTileLine(Vector2D start, Vector2D end, double width, Utils.TileActionAttempt plot)
Definition Utils.cs:1726
static Point plotInnerLineMaxOffset
Definition Utils.cs:2194
static bool PlotTileLineInner(int x, int y)
Definition Utils.cs:1706
static Vector2 NextVector2Unit(this UnifiedRandom r, float startRotation=0f, float rotationRange=6.2831855f)
Definition Utils.cs:637
static int RandomConsecutive(double random, int odds)
Definition Utils.cs:1777
static Color ReadRGB(this BinaryReader bb)
Definition Utils.cs:783
static string[] ConvertMonoArgsToDotNet(string[] brokenArgs)
Definition Utils.cs:326
static float AngleFrom(this Vector2 Origin, Vector2 Target)
Definition Utils.cs:1267
static Vector2 ToRotationVector2(this float f)
Definition Utils.cs:1008
static Vector2 Left(this Rectangle r)
Definition Utils.cs:801
static float Distance(this Rectangle r, Vector2 point)
Definition Utils.cs:871
static void WriteRGB(this BinaryWriter bb, Color c)
Definition Utils.cs:768
static float NextFloatDirection(this UnifiedRandom r)
Definition Utils.cs:547
static bool FloatIntersect(float r1StartX, float r1StartY, float r1Width, float r1Height, float r2StartX, float r2StartY, float r2Width, float r2Height)
Definition Utils.cs:420
static string Hex3(this Color color)
Definition Utils.cs:1405
static T NextFromList< T >(this UnifiedRandom random, params T[] objs)
Definition Utils.cs:580
static float AngleTowards(this float curAngle, float targetAngle, float maxChange)
Definition Utils.cs:1466
static Vector2 Round(Vector2 input)
Definition Utils.cs:42
static T NextFromCollection< T >(this UnifiedRandom random, List< T > objs)
Definition Utils.cs:604
static float GetLerpValue(float from, float to, float t, bool clamped=false)
Definition Utils.cs:182
static bool DoesFitInCone(Vector2 point, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle)
Definition Utils.cs:957
static float Turn01ToCyclic010(float value)
Definition Utils.cs:139
static Rectangle OffsetSize(this Rectangle rect, int xSize, int ySize)
Definition Utils.cs:730
static Vector2 ClosestPointInRect(this Rectangle r, Vector2 point)
Definition Utils.cs:892
static Vector2 TopLeft(this Rectangle r)
Definition Utils.cs:829
static float DistanceSQ(this Vector2 Origin, Vector2 Target)
Definition Utils.cs:1327
static bool RectangleLineCollision(Vector2 rectTopLeft, Vector2 rectBottomRight, Vector2 lineStart, Vector2 lineEnd)
Definition Utils.cs:1215
static Vector2 Bottom(this Rectangle r)
Definition Utils.cs:822
static Vector2 Size(this Asset< Texture2D > tex)
Definition Utils.cs:736
static Dictionary< SpriteFont, float[]> charLengths
Definition Utils.cs:2173
static double UnclampedSmoothStep(double min, double max, double x)
Definition Utils.cs:95
static bool PlotLineOffset(Vector2D start, Vector2D end, double halfWidth, int x0, int y0, int x1, int y1, Utils.TileActionAttempt plot, bool jump=true)
Definition Utils.cs:1580
static Vector2 Floor(this Vector2 vec)
Definition Utils.cs:1053
static Vector2 DirectionFrom(this Vector2 Origin, Vector2 Target)
Definition Utils.cs:1345
static Vector2 DrawBorderString(SpriteBatch sb, string text, Vector2 pos, Color color, float scale=1f, float anchorx=0f, float anchory=0f, int maxCharactersDisplayed=-1)
Definition Utils.cs:1849
static float SmoothStep(float min, float max, float x)
Definition Utils.cs:57
static double SmoothStep(double min, double max, double x)
Definition Utils.cs:62
static Dictionary< string, string > ParseArguements(string[] args)
Definition Utils.cs:101
static bool IndexInRange< T >(this T[] t, int index)
Definition Utils.cs:1804
static void DrawRect(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color)
Definition Utils.cs:2076
static float Distance(this Vector2 Origin, Vector2 Target)
Definition Utils.cs:1318
static void DrawLine(SpriteBatch spriteBatch, Point start, Point end, Color color)
Definition Utils.cs:2002
static float NextFloat(this UnifiedRandom r)
Definition Utils.cs:541
const ulong RANDOM_MULTIPLIER
Definition Utils.cs:2179
static Vector2 RotatedBy(this Vector2 spinningpoint, double radians, [Optional] Vector2 center)
Definition Utils.cs:1017
const ulong RANDOM_ADD
Definition Utils.cs:2182
static void DrawRectangle(SpriteBatch sb, Vector2 start, Vector2 end, Color colorStart, Color colorEnd, float width)
Definition Utils.cs:1977
static Vector2 NextVector2Square(this UnifiedRandom r, float min, float max)
Definition Utils.cs:617
static Utils()
Definition Utils.cs:2134
static Rectangle Frame(this Asset< Texture2D > tex, int horizontalFrames=1, int verticalFrames=1, int frameX=0, int frameY=0, int sizeOffsetX=0, int sizeOffsetY=0)
Definition Utils.cs:706
static int ModulusPositive(this int myInteger, int modulusNumber)
Definition Utils.cs:1436
static bool PlotLine(Point16 p0, Point16 p1, Utils.TileActionAttempt plot, bool jump=true)
Definition Utils.cs:1555
static bool HasNaNs(this Vector2 vec)
Definition Utils.cs:1060
static int Height(this Asset< Texture2D > asset)
Definition Utils.cs:701
static Vector2 Right(this Rectangle r)
Definition Utils.cs:808
static Point16 ToTileCoordinates16(this Vector2 vec)
Definition Utils.cs:1146
static Vector2 SafeNormalize(this Vector2 v, Vector2 defaultValue)
Definition Utils.cs:1189
static void DrawSettingsPanel(SpriteBatch spriteBatch, Vector2 position, float width, Color color)
Definition Utils.cs:1942
static Color MultiplyRGBA(this Color firstColor, Color secondColor)
Definition Utils.cs:1398
static long CoinsCount([Out] bool overFlowing, Item[] inv, params int[] ignoreSlots)
Definition Utils.cs:425
static Vector2 ReadVector2(this BinaryReader bb)
Definition Utils.cs:789
static float AngleTo(this Vector2 Origin, Vector2 Target)
Definition Utils.cs:1240
static T Max< T >(params T[] args)
Definition Utils.cs:333
static Point ToTileCoordinates(this Vector2D vec)
Definition Utils.cs:1164
static void DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color colorStart, Color colorEnd, float width)
Definition Utils.cs:2031
static void Swap< T >(T t1, T t2)
Definition Utils.cs:128
static void DrawPanel(Texture2D texture, int edgeWidth, int edgeShove, SpriteBatch spriteBatch, Vector2 position, float width, Color color)
Definition Utils.cs:1958
static Vector2 ToVector2(this Point p)
Definition Utils.cs:1077
static Color ColorLerp_BlackToWhite(float percent)
Definition Utils.cs:27
static Vector2D ToVector2D(this Point p)
Definition Utils.cs:1091
static void DrawRect(SpriteBatch spriteBatch, Vector2 topLeft, Vector2 topRight, Vector2 bottomRight, Vector2 bottomLeft, Color color)
Definition Utils.cs:2088
static Vector2 FactorAcceleration(Vector2 currentVelocity, float timeToInterception, Vector2 descendOfProjectile, int framesOfLenience)
Definition Utils.cs:238
static void DrawCursorSingle(SpriteBatch sb, Color color, float rot=float.NaN, float scale=1f, [Optional] Vector2 manualPosition, int cursorSlot=0, int specialMode=0)
Definition Utils.cs:2096
static byte[] ToByteArray(this string str)
Definition Utils.cs:535
static int Width(this Asset< Texture2D > asset)
Definition Utils.cs:696
static T Clamp< T >(T value, T min, T max)
Definition Utils.cs:133
static Vector2 ToWorldCoordinates(this Point p, float autoAddX=8f, float autoAddY=8f)
Definition Utils.cs:1105
static void PlotLineLength(int x0, int y0, int x1, int y1, int length, bool jump=true)
Definition Utils.cs:1575
static string PrettifyPercentDisplay(float percent, string originalFormat)
Definition Utils.cs:474
static Vector2D RotatedBy(this Vector2D spinningpoint, double radians, [Optional] Vector2D center)
Definition Utils.cs:1029
static Vector3 YZW(this Vector4 vec)
Definition Utils.cs:1384
static float AngleLerp(this float curAngle, float targetAngle, float amount)
Definition Utils.cs:1442
static Vector2 GetDayTimeAsDirectionIn24HClock()
Definition Utils.cs:289
static List< int > GetTrueIndexes(this bool[] array)
Definition Utils.cs:1500
static Vector2 ToWorldCoordinates(this Point16 p, float autoAddX=8f, float autoAddY=8f)
Definition Utils.cs:1117
static Vector2 ClosestPointOnLine(this Vector2 P, Vector2 A, Vector2 B)
Definition Utils.cs:1201
static void OpenFolder(string folderPath)
Definition Utils.cs:520
static void DrawRectForTilesInWorld(SpriteBatch spriteBatch, Point start, Point end, Color color)
Definition Utils.cs:2060
static Vector2 ToScreenPosition(this Vector2 worldPosition)
Definition Utils.cs:458
static float GetDayTimeAs24FloatStartingFromMidnight()
Definition Utils.cs:262
static T SelectRandom< T >(UnifiedRandom random, params T[] choices)
Definition Utils.cs:1814
static float PingPongFrom01To010(float value)
Definition Utils.cs:166
static Vector2 Top(this Rectangle r)
Definition Utils.cs:815
static bool PressingControl(this KeyboardState kb)
Definition Utils.cs:1543
static Point ToPoint(this Vector2D v)
Definition Utils.cs:1176
static void DrawInvBG(SpriteBatch sb, float x, float y, float w, float h, [Optional] Color c)
Definition Utils.cs:1892
static void WritePackedVector2(this BinaryWriter bb, Vector2 v)
Definition Utils.cs:778
static string Hex4(this Color color)
Definition Utils.cs:1414
static Vector2 GetDayTimeAsDirectionIn24HClock(float timeFrom0To24)
Definition Utils.cs:299
static ulong RandomNextSeed(ulong seed)
Definition Utils.cs:1657
static long CoinsCombineStacks([Out] bool overFlowing, params long[] coinCounts)
Definition Utils.cs:436
static void DrawRect(SpriteBatch spriteBatch, Rectangle rect, Color color)
Definition Utils.cs:2068
static bool IntersectsConeSlowMoreAccurate(this Rectangle targetRect, Vector2 coneCenter, float coneLength, float coneRotation, float maximumAngle)
Definition Utils.cs:930
static bool Between(this Vector2 vec, Vector2 minimum, Vector2 maximum)
Definition Utils.cs:1072
static R[] MapArray< R, T >(T[] array, Func< T, R > mapper)
Definition Utils.cs:1549
static bool PlotLine(Point p0, Point p1, Utils.TileActionAttempt plot, bool jump=true)
Definition Utils.cs:1565
static int Next(this UnifiedRandom random, IntRange range)
Definition Utils.cs:610
static void DrawLaser(SpriteBatch sb, Texture2D tex, Vector2 start, Vector2 end, Vector2 scale, Utils.LaserLineFraming framing)
Definition Utils.cs:1989
static Vector2 DrawBorderStringBig(SpriteBatch spriteBatch, string text, Vector2 pos, Color color, float scale=1f, float anchorx=0f, float anchory=0f, int maxCharactersDisplayed=-1)
Definition Utils.cs:1865
static Vector2 XY(this Vector4 vec)
Definition Utils.cs:1363
static Vector2 RotateRandom(this Vector2 spinninpoint, double maxRadians)
Definition Utils.cs:1228
static Point ToTileCoordinates(this Vector2 vec)
Definition Utils.cs:1158
static float MultiLerp(float percent, params float[] floats)
Definition Utils.cs:172
static Vector2 ToVector2(this Point16 p)
Definition Utils.cs:1084
static Vector2 Size(this Rectangle r)
Definition Utils.cs:864
static Utils.TileActionAttempt PlotTileLineInnerInstance
Definition Utils.cs:2197
static int RandomInt(ulong seed, int min, int max)
Definition Utils.cs:1697
static List< List< TextSnippet > > WordwrapStringSmart(string text, Color c, SpriteFont font, int maxWidth, int maxLines)
Definition Utils.cs:365
static void DrawInvBG(SpriteBatch sb, int x, int y, int w, int h, [Optional] Color c)
Definition Utils.cs:1900
static float LineRectangleDistance(Rectangle rect, Vector2 lineStart, Vector2 lineEnd)
Definition Utils.cs:339
static Point ToPoint(this Vector2 v)
Definition Utils.cs:1170
static Rectangle CenteredRectangle(Vector2 center, Vector2 size)
Definition Utils.cs:393
static int RandomNext(ulong seed, int bits)
Definition Utils.cs:1630
static void ClampWithinWorld(int minX, int minY, int maxX, int maxY, bool lastValuesInclusiveToIteration=false, int fluffX=0, int fluffY=0)
Definition Utils.cs:212
static float ToRotation(this Vector2 v)
Definition Utils.cs:981
static float UnclampedSmoothStep(float min, float max, float x)
Definition Utils.cs:89
static int ToDirectionInt(this bool value)
Definition Utils.cs:1424
static Vector2D ToVector2D(this Vector2 v)
Definition Utils.cs:1182
static Vector2 MoveTowards(this Vector2 currentPosition, Vector2 targetPosition, float maxAmountAllowedToMove)
Definition Utils.cs:1129
static void DrawSettings2Panel(SpriteBatch spriteBatch, Vector2 position, float width, Color color)
Definition Utils.cs:1950
static void DrawLine(SpriteBatch spriteBatch, Vector2 start, Vector2 end, Color color)
Definition Utils.cs:2010
const long MaxCoins
Definition Utils.cs:2170
static bool InWorld(int x, int y, int fluff=0)
Definition WorldGen.cs:1952
static void StartNewSearch()
Definition Tile.cs:343
Utils.TileActionAttempt plot
Definition Utils.cs:2408
Utils.TileActionAttempt plot
Definition Utils.cs:2450