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
XNAUICameraSettings.cs
Go to the documentation of this file.
1using System;
2using UnityEngine;
3
4// Token: 0x0200030A RID: 778
7{
8 // Token: 0x0600120A RID: 4618 RVA: 0x00057DA8 File Offset: 0x00055FA8
10 {
11 if (!true)
12 {
13 }
14 base..ctor();
15 }
16
17 // Token: 0x0600120B RID: 4619 RVA: 0x00057DC0 File Offset: 0x00055FC0
18 public XNAUICameraSettings(Camera camera, XNAUICameraSettings defaultSettings)
19 {
20 if (!true)
21 {
22 }
23 base..ctor();
24 this.Camera = camera;
27 float physicalHeight = defaultSettings.PhysicalHeight;
29 float dpi = defaultSettings.DPI;
30 this.DPI = dpi;
31 }
32
33 // Token: 0x0600120C RID: 4620 RVA: 0x00057E08 File Offset: 0x00056008
34 public override void UpdateViewport(Rect newVeiwport)
35 {
36 base.UpdateViewport(newVeiwport);
37 Camera camera = this.Camera;
38 }
39
40 // Token: 0x0600120D RID: 4621 RVA: 0x00057E24 File Offset: 0x00056024
41 private static bool RectRoughlyEqual(Rect a, Rect b)
42 {
43 if (!true)
44 {
45 }
46 if (!true)
47 {
48 }
49 return true;
50 }
51
52 // Token: 0x170001B1 RID: 433
53 // (get) Token: 0x0600120E RID: 4622 RVA: 0x00057E3C File Offset: 0x0005603C
55 {
56 get
57 {
58 float x = this._lastScreenResolution.x;
59 int nativeWidth = this.NativeWidth;
60 float y = this._lastScreenResolution.y;
61 int nativeHeight = this.NativeHeight;
64 float lastZoomScale = this._lastZoomScale;
65 float zoomScale = this._zoomScale;
66 float xmin = this._lastSafeRegion.m_XMin;
67 float ymin = this._lastSafeRegion.m_YMin;
68 float width = this._lastSafeRegion.m_Width;
69 float height = this._lastSafeRegion.m_Height;
71 return true;
72 }
73 }
74
75 // Token: 0x0600120F RID: 4623 RVA: 0x00057EEC File Offset: 0x000560EC
77 {
78 int nativeWidth = this.NativeWidth;
79 int nativeHeight = this.NativeHeight;
81 float vppi = this.VPPI;
85 base.UpdatePixelScale(true);
86 }
87
88 // Token: 0x06001210 RID: 4624 RVA: 0x00057F34 File Offset: 0x00056134
89 public float GetMinResolution()
90 {
91 /*
92An exception occurred when decompiling this method (06001210)
93
94ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single XNAUICameraSettings::GetMinResolution()
95
96 ---> System.Exception: Basic block has to end with unconditional control flow.
97{
98 IL_0000:
99 stloc:Rect(var_0_06, call:Rect(XNAUICameraSettings::GetViewportSafeRegion, ldloc:XNAUICameraSettings(this)))
100 stloc:float32(var_1_0D, callgetter:float32(Rect::get_width, ldloc:Rect[exp:valuetype [UnityEngine.CoreModule]UnityEngine.Rect&](var_0_06)))
101 stloc:float32(var_2_14, callgetter:float32(Rect::get_height, ldloc:Rect[exp:valuetype [UnityEngine.CoreModule]UnityEngine.Rect&](var_0_06)))
102 brtrue(IL_0000, ldc.i4:bool(1))
103}
104
105 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
106 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
107 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
108 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
109 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
110 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
111 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
112 --- End of inner exception stack trace ---
113 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
114 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
115*/;
116 }
117
118 // Token: 0x06001211 RID: 4625 RVA: 0x00057F58 File Offset: 0x00056158
119 public float GetMaxResolution()
120 {
121 /*
122An exception occurred when decompiling this method (06001211)
123
124ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single XNAUICameraSettings::GetMaxResolution()
125
126 ---> System.Exception: Basic block has to end with unconditional control flow.
127{
128 Block_0:
129 stloc:float32(var_0_10, callgetter:float32(Keyframe::get_time, callgetter:valuetype [UnityEngine.CoreModule]UnityEngine.Keyframe[][exp:valuetype [UnityEngine.CoreModule]UnityEngine.Keyframe&](AnimationCurve::get_keys, ldfld:AnimationCurve(DeviceVPPICalculator::PhysicalToResolution, ldloc:XNAUICameraSettings[exp:DeviceVPPICalculator](this)))))
130 stloc:float32(var_1_17, ldfld:float32(DeviceVPPICalculator::PhysicalHeight, ldloc:XNAUICameraSettings[exp:DeviceVPPICalculator](this)))
131 stloc:float32(var_2_28, callgetter:float32(Keyframe::get_value, callgetter:valuetype [UnityEngine.CoreModule]UnityEngine.Keyframe[][exp:valuetype [UnityEngine.CoreModule]UnityEngine.Keyframe&](AnimationCurve::get_keys, ldfld:AnimationCurve(DeviceVPPICalculator::PhysicalToResolution, ldloc:XNAUICameraSettings[exp:DeviceVPPICalculator](this)))))
132}
133
134 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
135 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
136 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
137 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
138 --- End of inner exception stack trace ---
139 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
140 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
141*/;
142 }
143
144 // Token: 0x170001B2 RID: 434
145 // (get) Token: 0x06001212 RID: 4626 RVA: 0x00057F90 File Offset: 0x00056190
146 private int NativeWidth
147 {
148 get
149 {
150 if (!true)
151 {
152 }
153 return Screen.width;
154 }
155 }
156
157 // Token: 0x170001B3 RID: 435
158 // (get) Token: 0x06001213 RID: 4627 RVA: 0x00057FA8 File Offset: 0x000561A8
159 private int NativeHeight
160 {
161 get
162 {
163 if (!true)
164 {
165 }
166 return Screen.height;
167 }
168 }
169
170 // Token: 0x06001214 RID: 4628 RVA: 0x00057FC0 File Offset: 0x000561C0
172 {
173 if (!true)
174 {
175 }
176 int width = Screen.width;
177 int height = Screen.height;
178 int width2 = Screen.width;
179 int height2 = Screen.height;
180 Rect safeArea = base.GetSafeArea();
181 float xMin = safeArea.xMin;
182 float xMin2 = safeArea.xMin;
183 float xMax = safeArea.xMax;
184 float xMax2 = safeArea.xMax;
185 float yMin = safeArea.yMin;
186 float yMin2 = safeArea.yMin;
187 float yMax = safeArea.yMax;
188 float yMax2 = safeArea.yMax;
189 return safeArea;
190 }
191
192 // Token: 0x06001215 RID: 4629 RVA: 0x00058048 File Offset: 0x00056248
193 public void ApplyCamera()
194 {
197 int num = 16256;
198 this._zoomScale = (float)num;
201 float height = viewportSafeRegion2.height;
202 float pixelScale = this.PixelScale;
203 float width = viewportSafeRegion2.width;
204 float height2 = viewportSafeRegion2.height;
205 if (num == 0)
206 {
207 }
209 float pixelScale2 = this.PixelScale;
210 if (32640 == 0)
211 {
212 }
213 int cameraWidth = this._cameraWidth;
214 int cameraHeight = this._cameraHeight;
215 float xmin = this._cameraSafeRegion.m_XMin;
216 float ymin = this._cameraSafeRegion.m_YMin;
217 float width2 = this._cameraSafeRegion.m_Width;
219 this._cameraSafeRegion = 43139072;
220 int nativeHeight = this.NativeHeight;
221 float pixelScale3 = this.PixelScale;
222 int num2 = 32640;
224 int nativeWidth = this.NativeWidth;
225 int nativeHeight2 = this.NativeHeight;
226 int num3 = this.realVirtualScreenHeight;
227 if (cameraWidth == 0)
228 {
229 }
230 int num4 = 32640;
232 int nativeWidth2 = this.NativeWidth;
233 int num5 = this.realVirtualScreenWidth;
234 int num6 = 65408;
236 int nativeHeight3 = this.NativeHeight;
237 int num7 = this.realVirtualScreenHeight;
238 Camera camera = this.Camera;
240 if (num6 == 0)
241 {
242 }
243 Transform transform = this.Camera.transform;
244 int num8 = this.realVirtualScreenWidth;
245 int nativeWidth3 = this.NativeWidth;
246 int num9 = this.realVirtualScreenWidth;
248 if (num6 == 0)
249 {
250 }
251 int height4 = Screen.height;
253 int num12 = this.realVirtualScreenWidth;
255 Camera camera2 = this.Camera;
256 }
257
258 // Token: 0x04002195 RID: 8597
260
261 // Token: 0x04002196 RID: 8598
263
264 // Token: 0x04002197 RID: 8599
266
267 // Token: 0x04002198 RID: 8600
268 private float _lastVPPI;
269
270 // Token: 0x04002199 RID: 8601
271 private float _lastZoomScale;
272
273 // Token: 0x0400219A RID: 8602
275
276 // Token: 0x0400219B RID: 8603
277 public int _cameraWidth;
278
279 // Token: 0x0400219C RID: 8604
280 public int _cameraHeight;
281
282 // Token: 0x0400219D RID: 8605
284
285 // Token: 0x0400219E RID: 8606
286 public float _safeRegionMinX;
287
288 // Token: 0x0400219F RID: 8607
289 public float _safeRegionMinY;
290
291 // Token: 0x040021A0 RID: 8608
293
294 // Token: 0x040021A1 RID: 8609
296
297 // Token: 0x040021A2 RID: 8610
299
300 // Token: 0x040021A3 RID: 8611
302}
class f__AnonymousType0<< Count > j__TPar
AnimationCurve PhysicalToVPPICurve
static int height
Definition Screen.cs:28
static int width
Definition Screen.cs:17
override void UpdateViewport(Rect newVeiwport)
XNAUICameraSettings(Camera camera, XNAUICameraSettings defaultSettings)
static bool RectRoughlyEqual(Rect a, Rect b)
float m_XMin
Definition Rect.cs:522
float m_Height
Definition Rect.cs:534
float m_YMin
Definition Rect.cs:526
float m_Width
Definition Rect.cs:530