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
Viewport.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x020003AD RID: 941
9 public struct Viewport
10 {
11 // Token: 0x17000355 RID: 853
12 // (get) Token: 0x06001932 RID: 6450 RVA: 0x0006AD38 File Offset: 0x00068F38
13 // (set) Token: 0x06001933 RID: 6451 RVA: 0x0006AD4C File Offset: 0x00068F4C
14 [DataMember]
15 public int Height
16 {
17 get
18 {
19 return this.height;
20 }
21 set
22 {
24 }
25 }
26
27 // Token: 0x17000356 RID: 854
28 // (get) Token: 0x06001934 RID: 6452 RVA: 0x0006AD60 File Offset: 0x00068F60
29 // (set) Token: 0x06001935 RID: 6453 RVA: 0x0006AD74 File Offset: 0x00068F74
30 [DataMember]
31 public float MaxDepth
32 {
33 get
34 {
35 /*
36An exception occurred when decompiling this method (06001934)
37
38ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Microsoft.Xna.Framework.Graphics.Viewport::get_MaxDepth()
39
40 ---> System.Exception: Basic block has to end with unconditional control flow.
41{
42 Block_0:
43 stloc:float32(var_0_06, ldfld:float32(Viewport::maxDepth, ldloc:valuetype Microsoft.Xna.Framework.Graphics.Viewport&(this)))
44}
45
46 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
47 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
48 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
49 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
50 --- End of inner exception stack trace ---
51 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
52 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
53*/;
54 }
55 set
56 {
57 }
58 }
59
60 // Token: 0x17000357 RID: 855
61 // (get) Token: 0x06001936 RID: 6454 RVA: 0x0006AD84 File Offset: 0x00068F84
62 // (set) Token: 0x06001937 RID: 6455 RVA: 0x0006AD98 File Offset: 0x00068F98
63 [DataMember]
64 public float MinDepth
65 {
66 get
67 {
68 /*
69An exception occurred when decompiling this method (06001936)
70
71ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Microsoft.Xna.Framework.Graphics.Viewport::get_MinDepth()
72
73 ---> System.Exception: Basic block has to end with unconditional control flow.
74{
75 Block_0:
76 stloc:float32(var_0_06, ldfld:float32(Viewport::minDepth, ldloc:valuetype Microsoft.Xna.Framework.Graphics.Viewport&(this)))
77}
78
79 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
80 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
81 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
82 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
83 --- End of inner exception stack trace ---
84 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
85 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
86*/;
87 }
88 set
89 {
90 }
91 }
92
93 // Token: 0x17000358 RID: 856
94 // (get) Token: 0x06001938 RID: 6456 RVA: 0x0006ADA8 File Offset: 0x00068FA8
95 // (set) Token: 0x06001939 RID: 6457 RVA: 0x0006ADBC File Offset: 0x00068FBC
96 [DataMember]
97 public int Width
98 {
99 get
100 {
101 return this.width;
102 }
103 set
104 {
106 }
107 }
108
109 // Token: 0x17000359 RID: 857
110 // (get) Token: 0x0600193A RID: 6458 RVA: 0x0006ADD0 File Offset: 0x00068FD0
111 // (set) Token: 0x0600193B RID: 6459 RVA: 0x0006ADE4 File Offset: 0x00068FE4
112 [DataMember]
113 public int Y
114 {
115 get
116 {
117 return this.y;
118 }
119 set
120 {
121 this.y = value;
122 }
123 }
124
125 // Token: 0x1700035A RID: 858
126 // (get) Token: 0x0600193C RID: 6460 RVA: 0x000021DB File Offset: 0x000003DB
127 // (set) Token: 0x0600193D RID: 6461 RVA: 0x0006ADF8 File Offset: 0x00068FF8
128 [DataMember]
129 public int X
130 {
131 get
132 {
133 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
134 }
135 set
136 {
137 this.x = value;
138 }
139 }
140
141 // Token: 0x1700035B RID: 859
142 // (get) Token: 0x0600193E RID: 6462 RVA: 0x0006AE0C File Offset: 0x0006900C
143 public float AspectRatio
144 {
145 get
146 {
147 /*
148An exception occurred when decompiling this method (0600193E)
149
150ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Microsoft.Xna.Framework.Graphics.Viewport::get_AspectRatio()
151
152 ---> System.Exception: Basic block has to end with unconditional control flow.
153{
154 Block_0:
155 brtrue(IL_0000, logicnot:bool(ldfld:int32[exp:bool](Viewport::width, ldloc:valuetype Microsoft.Xna.Framework.Graphics.Viewport&(this))))
156}
157
158 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
159 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
160 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
161 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
162 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
163 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
164 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
165 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
166 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
167 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
168 --- End of inner exception stack trace ---
169 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
170 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
171*/;
172 }
173 }
174
175 // Token: 0x1700035C RID: 860
176 // (get) Token: 0x0600193F RID: 6463 RVA: 0x0006AE28 File Offset: 0x00069028
177 // (set) Token: 0x06001940 RID: 6464 RVA: 0x0006AE50 File Offset: 0x00069050
179 {
180 get
181 {
182 /*
183An exception occurred when decompiling this method (0600193F)
184
185ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Rectangle Microsoft.Xna.Framework.Graphics.Viewport::get_Bounds()
186
187 ---> System.Exception: Basic block has to end with unconditional control flow.
188{
189 Block_0:
190 stloc:int32(var_0_06, ldfld:int32(Viewport::x, ldloc:valuetype Microsoft.Xna.Framework.Graphics.Viewport&(this)))
191 stloc:int32(var_1_0D, ldfld:int32(Viewport::width, ldloc:valuetype Microsoft.Xna.Framework.Graphics.Viewport&(this)))
192 stloc:int32(var_2_14, ldfld:int32(Viewport::width, ldloc:valuetype Microsoft.Xna.Framework.Graphics.Viewport&(this)))
193 stloc:float32(var_3_1B, ldfld:float32(Viewport::minDepth, ldloc:valuetype Microsoft.Xna.Framework.Graphics.Viewport&(this)))
194}
195
196 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
197 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
198 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
199 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
200 --- End of inner exception stack trace ---
201 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
202 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
203*/;
204 }
205 set
206 {
207 this.x = value;
208 }
209 }
210
211 // Token: 0x1700035D RID: 861
212 // (get) Token: 0x06001941 RID: 6465 RVA: 0x0006AE64 File Offset: 0x00069064
214 {
215 get
216 {
217 int num = this.x;
218 int num2 = this.width;
219 int num3 = this.width;
220 float num4 = this.minDepth;
221 if (!true)
222 {
223 }
224 return GraphicsDevice.GetTitleSafeArea(num, num2, num3, (int)num4);
225 }
226 }
227
228 // Token: 0x06001942 RID: 6466 RVA: 0x0006AE9C File Offset: 0x0006909C
229 public Viewport(int x, int y, int width, int height)
230 {
231 this.x = x;
232 this.width = y;
234 this.minDepth = (float)height;
235 }
236
237 // Token: 0x06001943 RID: 6467 RVA: 0x0006AEC8 File Offset: 0x000690C8
238 public Viewport(int x, int y, int width, int height, float minDepth, float maxDepth)
239 {
240 this.x = x;
241 this.width = y;
243 this.minDepth = (float)height;
244 }
245
246 // Token: 0x06001944 RID: 6468 RVA: 0x0006AEF4 File Offset: 0x000690F4
247 public Viewport(Rectangle bounds)
248 {
249 this.x = bounds;
250 }
251
252 // Token: 0x06001945 RID: 6469 RVA: 0x0006AF08 File Offset: 0x00069108
254 {
255 float m = view.M31;
256 float m2 = view.M32;
257 float m3 = view.M11;
258 float m4 = view.M12;
259 float m5 = projection.M31;
260 float m6 = projection.M32;
261 float m7 = projection.M11;
262 float m8 = projection.M12;
263 if (!true)
264 {
265 }
266 float num = source.X;
267 float num2 = source.Y;
268 if (!true)
269 {
270 }
271 int num3 = this.x;
272 int num4 = this.y;
273 float num5 = this.minDepth;
274 float num6 = this.maxDepth;
275 return 1;
276 }
277
278 // Token: 0x06001946 RID: 6470 RVA: 0x0006AF88 File Offset: 0x00069188
280 {
281 float m = view.M31;
282 float m2 = view.M32;
283 float m3 = view.M11;
284 float m4 = view.M12;
285 float m5 = projection.M31;
286 float m6 = projection.M32;
287 float m7 = projection.M11;
288 float m8 = projection.M12;
289 if (!true)
290 {
291 }
292 float num = source.X;
293 float num2 = source.Y;
296 float num3 = this.minDepth;
297 float num4 = this.maxDepth;
298 int num5 = this.x;
299 int num6 = this.y;
300 int num7 = this.width;
301 int num8 = this.height;
302 if (!true)
303 {
304 return;
305 }
306 }
307
308 // Token: 0x06001947 RID: 6471 RVA: 0x000021DB File Offset: 0x000003DB
309 private static bool WithinEpsilon(float a, float b)
310 {
311 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
312 }
313
314 // Token: 0x06001948 RID: 6472 RVA: 0x0006B028 File Offset: 0x00069228
315 public override string ToString()
316 {
317 string text;
318 string text2;
319 string text3;
320 string text4;
321 string text5;
322 string text6;
323 if (("{X:" == null || "{X:" != null) && (text == null || text != null) && (" Y:" == null || " Y:" != null) && (text2 == null || text2 != null) && (" Width:" == null || " Width:" != null) && (text3 == null || text3 != null) && (" Height:" == null || " Height:" != null) && (text4 == null || text4 != null) && " MinDepth:" != null && (text5 == null || text5 != null) && (" MaxDepth:" == null || " MaxDepth:" != null) && (text6 == null || text6 != null) && ("}" == null || "}" != null))
324 {
325 string text7;
326 return text7;
327 }
328 throw new ArrayTypeMismatchException();
329 }
330
331 // Token: 0x04002793 RID: 10131
332 private int x;
333
334 // Token: 0x04002794 RID: 10132
335 private int y;
336
337 // Token: 0x04002795 RID: 10133
338 private int width;
339
340 // Token: 0x04002796 RID: 10134
341 private int height;
342
343 // Token: 0x04002797 RID: 10135
344 private float minDepth;
345
346 // Token: 0x04002798 RID: 10136
347 private float maxDepth;
348 }
349}
class f__AnonymousType0<< Count > j__TPar
static Rectangle GetTitleSafeArea(int x, int y, int width, int height)
Vector3 Project(Vector3 source, Matrix projection, Matrix view, Matrix world)
Definition Viewport.cs:253
Viewport(int x, int y, int width, int height)
Definition Viewport.cs:229
Vector3 Unproject(Vector3 source, Matrix projection, Matrix view, Matrix world)
Definition Viewport.cs:279
Viewport(int x, int y, int width, int height, float minDepth, float maxDepth)
Definition Viewport.cs:238
static bool WithinEpsilon(float a, float b)
Definition Viewport.cs:309
static Matrix Invert(Matrix matrix)
Definition Matrix.cs:971