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
XNAWorldCameraSettings.cs
Go to the documentation of this file.
1using System;
2using Terraria;
3using UnityEngine;
4
5// Token: 0x0200030E RID: 782
8{
9 // Token: 0x0600124A RID: 4682 RVA: 0x00058F58 File Offset: 0x00057158
11 {
12 if (!true)
13 {
14 }
15 base..ctor();
16 }
17
18 // Token: 0x0600124B RID: 4683 RVA: 0x00058F70 File Offset: 0x00057170
20 {
21 if (!true)
22 {
23 }
24 base..ctor();
25 this.Camera = camera;
30 float physicalHeight = defaultSettings.PhysicalHeight;
32 float dpi = defaultSettings.DPI;
33 this.DPI = dpi;
34 }
35
36 // Token: 0x0600124C RID: 4684 RVA: 0x00058FC8 File Offset: 0x000571C8
37 public override void UpdateViewport(Rect newVeiwport)
38 {
39 float zoomScale = this._zoomScale;
40 base.UpdateViewport(newVeiwport);
41 Camera camera = this.Camera;
43 if (!this._wasInMenus)
44 {
45 float maxPixelScale = this.MaxPixelScale;
46 float maxPixelScale2 = this.MaxPixelScale;
47 float maxPixelScale3 = this.MaxPixelScale;
48 return;
49 }
50 }
51
52 // Token: 0x170001C5 RID: 453
53 // (get) Token: 0x0600124D RID: 4685 RVA: 0x00059028 File Offset: 0x00057228
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 if (lastVPPIOverridden)
67 {
68 float lastVPPI = this._lastVPPI;
69 float vppi = this.VPPI;
70 return true;
71 }
72 }
73 }
74
75 // Token: 0x0600124E RID: 4686 RVA: 0x00059094 File Offset: 0x00057294
77 {
78 int nativeWidth = this.NativeWidth;
79 int nativeHeight = this.NativeHeight;
81 float vppi = this.VPPI;
82 float zoomScale = this._zoomScale;
85 this._wasInMenus = zoomScale != null;
86 long num = 0L;
87 base.UpdatePixelScale(num != 0L);
88 }
89
90 // Token: 0x170001C6 RID: 454
91 // (get) Token: 0x0600124F RID: 4687 RVA: 0x000590E8 File Offset: 0x000572E8
92 public float MaxPixelScale
93 {
94 get
95 {
96 /*
97An exception occurred when decompiling this method (0600124F)
98
99ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single XNAWorldCameraSettings::get_MaxPixelScale()
100
101 ---> System.Exception: Basic block has to end with unconditional control flow.
102{
103 Block_0:
104 stloc:int32(var_0_06, callgetter:int32(XNAWorldCameraSettings::get_NativeHeight, ldloc:XNAWorldCameraSettings(this)))
105 stloc:float32(var_1_0D, ldfld:float32(DeviceVPPICalculator::VPPI, ldloc:XNAWorldCameraSettings[exp:DeviceVPPICalculator](this)))
106 stloc:float32(var_2_14, ldfld:float32(DeviceVPPICalculator::DPI, ldloc:XNAWorldCameraSettings[exp:DeviceVPPICalculator](this)))
107 stloc:int32(var_3_1B, callgetter:int32(XNAWorldCameraSettings::get_NativeWidth, ldloc:XNAWorldCameraSettings(this)))
108 stloc:float32(var_4_22, ldfld:float32(DeviceVPPICalculator::VPPI, ldloc:XNAWorldCameraSettings[exp:DeviceVPPICalculator](this)))
109 stloc:float32(var_5_2A, ldfld:float32(DeviceVPPICalculator::DPI, ldloc:XNAWorldCameraSettings[exp:DeviceVPPICalculator](this)))
110}
111
112 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
113 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
114 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
115 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
116 --- End of inner exception stack trace ---
117 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
118 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
119*/;
120 }
121 }
122
123 // Token: 0x170001C7 RID: 455
124 // (get) Token: 0x06001250 RID: 4688 RVA: 0x00059120 File Offset: 0x00057320
125 public float MinPixelScale
126 {
127 get
128 {
129 /*
130An exception occurred when decompiling this method (06001250)
131
132ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single XNAWorldCameraSettings::get_MinPixelScale()
133
134 ---> System.Exception: Basic block has to end with unconditional control flow.
135{
136 Block_0:
137 stloc:int32(var_0_06, callgetter:int32(XNAWorldCameraSettings::get_NativeHeight, ldloc:XNAWorldCameraSettings(this)))
138 stloc:int32(var_1_0D, callgetter:int32(XNAWorldCameraSettings::get_NativeWidth, ldloc:XNAWorldCameraSettings(this)))
139}
140
141 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
142 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
143 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
144 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
145 --- End of inner exception stack trace ---
146 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
147 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
148*/;
149 }
150 }
151
152 // Token: 0x170001C8 RID: 456
153 // (get) Token: 0x06001251 RID: 4689 RVA: 0x0005913C File Offset: 0x0005733C
154 public int MaxWorldWidth
155 {
156 get
157 {
158 float vppi = this.VPPI;
159 float dpi = this.DPI;
160 float maxPixelScale = this.MaxPixelScale;
161 return this.NativeWidth;
162 }
163 }
164
165 // Token: 0x170001C9 RID: 457
166 // (get) Token: 0x06001252 RID: 4690 RVA: 0x00059164 File Offset: 0x00057364
167 public int MaxWorldHeight
168 {
169 get
170 {
171 float vppi = this.VPPI;
172 float dpi = this.DPI;
173 float maxPixelScale = this.MaxPixelScale;
174 return this.NativeHeight;
175 }
176 }
177
178 // Token: 0x170001CA RID: 458
179 // (get) Token: 0x06001253 RID: 4691 RVA: 0x0005918C File Offset: 0x0005738C
180 private int NativeWidth
181 {
182 get
183 {
184 if (!true)
185 {
186 }
187 return Screen.width;
188 }
189 }
190
191 // Token: 0x170001CB RID: 459
192 // (get) Token: 0x06001254 RID: 4692 RVA: 0x000591A4 File Offset: 0x000573A4
193 public int NativeHeight
194 {
195 get
196 {
197 if (!true)
198 {
199 }
200 return Screen.height;
201 }
202 }
203
204 // Token: 0x06001255 RID: 4693 RVA: 0x000591BC File Offset: 0x000573BC
205 public void ApplyCamera()
206 {
207 if (!true)
208 {
209 }
210 bool gameMenu = Main.gameMenu;
211 float physicalHeight = this.PhysicalHeight;
212 int num = 1;
213 this._wasInMenus = num != 0;
215 float physicalHeight2 = this.PhysicalHeight;
216 int num2 = 16256;
217 this._zoomScale = (float)num2;
218 }
219
220 // Token: 0x040021DC RID: 8668
222
223 // Token: 0x040021DD RID: 8669
224 public bool MagnifyActive;
225
226 // Token: 0x040021DE RID: 8670
228
229 // Token: 0x040021DF RID: 8671
231
232 // Token: 0x040021E0 RID: 8672
234
235 // Token: 0x040021E1 RID: 8673
237
238 // Token: 0x040021E2 RID: 8674
240
241 // Token: 0x040021E3 RID: 8675
243
244 // Token: 0x040021E4 RID: 8676
246
247 // Token: 0x040021E5 RID: 8677
249
250 // Token: 0x040021E6 RID: 8678
251 private float _lastVPPI;
252
253 // Token: 0x040021E7 RID: 8679
254 private float _lastZoomScale;
255
256 // Token: 0x040021E8 RID: 8680
257 private bool _wasInMenus;
258
259 // Token: 0x040021E9 RID: 8681
260 public int _cameraWidth;
261
262 // Token: 0x040021EA RID: 8682
263 public int _cameraHeight;
264
265 // Token: 0x040021EB RID: 8683
267
268 // Token: 0x040021EC RID: 8684
270
271 // Token: 0x040021ED RID: 8685
273}
class f__AnonymousType0<< Count > j__TPar
AnimationCurve PhysicalToVPPICurve
static bool gameMenu
Definition Main.cs:2673
static int height
Definition Screen.cs:28
static int width
Definition Screen.cs:17
override void UpdateViewport(Rect newVeiwport)
XNAWorldCameraSettings(Camera camera, XNAWorldCameraSettings defaultSettings)