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
GUIZoom.cs
Go to the documentation of this file.
1using System;
4using Terraria;
5using UnityEngine;
6
7// Token: 0x0200017A RID: 378
8public class GUIZoom
9{
10 // Token: 0x06000ABD RID: 2749 RVA: 0x00036B38 File Offset: 0x00034D38
12 {
13 /*
14An exception occurred when decompiling this method (06000ABD)
15
16ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single GUIZoom::GetDefaultWorldZoomScale()
17
18 ---> System.Exception: Basic block has to end with unconditional control flow.
19{
20 Block_0:
21 stloc:float32(var_0_06, ldfld:float32(GUIZoom::ZoomValue, ldloc:GUIZoom(this)))
22 stloc:DrPlatformType(var_3_0E, callgetter:DrPlatformType(DrPlatform::get_CurrentPlatform))
23}
24
25 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
26 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
27 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
28 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
29 --- End of inner exception stack trace ---
30 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
31 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
32*/;
33 }
34
35 // Token: 0x06000ABE RID: 2750 RVA: 0x00036B54 File Offset: 0x00034D54
36 public void LoadDefaultZoom()
37 {
40 if (!true)
41 {
42 }
43 }
44
45 // Token: 0x06000ABF RID: 2751 RVA: 0x00036B74 File Offset: 0x00034D74
46 public GUIZoom()
47 {
49 }
50
51 // Token: 0x06000AC0 RID: 2752 RVA: 0x00036BAC File Offset: 0x00034DAC
52 private bool IsCursorOver(Microsoft.Xna.Framework.Vector2 position, [Out] float sliderPosition)
53 {
54 return true;
55 }
56
57 // Token: 0x06000AC1 RID: 2753 RVA: 0x00036BC8 File Offset: 0x00034DC8
58 private void ApplyPixelZoom(float pixelScale)
59 {
60 if (!true)
61 {
62 }
63 bool mapEnabled = Main.mapEnabled;
64 }
65
66 // Token: 0x06000AC2 RID: 2754 RVA: 0x00036CA4 File Offset: 0x00034EA4
67 private void UpdatePixelZoom()
68 {
69 }
70
71 // Token: 0x06000AC3 RID: 2755 RVA: 0x00036CB4 File Offset: 0x00034EB4
72 public void UpdateCursorDummy(global::Cursor cursor)
73 {
74 }
75
76 // Token: 0x06000AC4 RID: 2756 RVA: 0x00036CC4 File Offset: 0x00034EC4
77 public void UpdateCursor(global::Cursor cursor)
78 {
79 if (!true)
80 {
81 }
82 bool gameMenu = Main.gameMenu;
84 if (cursor.InputLayer != null)
85 {
86 inputLayer = cursor.InputLayer;
88 }
89 float x = cursor.Position.x;
90 float y = cursor.Position.y;
91 if (inputLayer == null)
92 {
93 }
95 }
96
97 // Token: 0x06000AC5 RID: 2757 RVA: 0x00036D44 File Offset: 0x00034F44
98 public void UpdatePinchZoom()
99 {
100 float x3;
101 float y3;
103 int num;
104 for (;;)
105 {
106 if (!true)
107 {
108 }
109 bool mapFullscreen = Main.mapFullscreen;
111 if (!pinchZoomMapEnabled)
112 {
113 return;
114 }
116 {
117 }
119 if (!this.PinchZoomWorldEnabled)
120 {
121 }
122 if (this._pinchZoomActive)
123 {
124 global::Cursor cursor;
125 if (cursor.Down)
126 {
127 global::Cursor zoomCursor = this._zoomCursor0;
128 global::Cursor zoomCursor2 = this._zoomCursor1;
129 }
130 global::Cursor zoomCursor3 = this._zoomCursor0;
131 global::Cursor zoomCursor4 = this._zoomCursor1;
132 float x = zoomCursor3.Position.x;
133 float y = zoomCursor3.Position.y;
134 float x2 = zoomCursor4.Position.x;
135 float y2 = zoomCursor4.Position.y;
136 if (zoomCursor3 == null)
137 {
138 }
139 if (zoomCursor3 == null)
140 {
141 }
144 {
145 x3 = this._lastFrameGrabCentre.X;
146 y3 = this._lastFrameGrabCentre.Y;
148 float mapFullscreenScale = Main.mapFullscreenScale;
150 }
152 if (true)
153 {
154 break;
155 }
156 global::Cursor zoomCursor5 = this._zoomCursor0;
157 global::Cursor zoomCursor6 = this._zoomCursor1;
158 float x4 = zoomCursor5.Position.x;
159 float x5 = zoomCursor6.Position.x;
160 if (!true)
161 {
162 }
163 float initialZoom = this._initialZoom;
164 this.ApplyPixelZoom(mapFullscreenScale3);
165 if (this._pinchZoomActive)
166 {
167 return;
168 }
169 }
170 else
171 {
172 num = 1;
173 global::Cursor cursor2;
174 if (cursor2.IgnoreForWorld)
175 {
176 return;
177 }
180 if (this._zoomCursor1 == null)
181 {
182 goto Block_6;
183 }
184 }
185 }
186 return;
187 Block_6:
188 int num2;
190 this._pinchZoomActive = num != 0;
200 }
201
202 // Token: 0x06000AC6 RID: 2758 RVA: 0x00036F40 File Offset: 0x00035140
203 public void Draw()
204 {
205 }
206
207 // Token: 0x04000B15 RID: 2837
208 private bool draggingSlider;
209
210 // Token: 0x04000B16 RID: 2838
211 private float ZoomValue = (float)16128;
212
213 // Token: 0x04000B17 RID: 2839
215
216 // Token: 0x04000B18 RID: 2840
218
219 // Token: 0x04000B19 RID: 2841
220 private float MaxZoomValue;
221
222 // Token: 0x04000B1A RID: 2842
224
225 // Token: 0x04000B1B RID: 2843
226 private bool _pinchZoomActive;
227
228 // Token: 0x04000B1C RID: 2844
229 private global::Cursor _zoomCursor0;
230
231 // Token: 0x04000B1D RID: 2845
232 private global::Cursor _zoomCursor1;
233
234 // Token: 0x04000B1E RID: 2846
235 private global::UnityEngine.Vector2 _initialPosition0;
236
237 // Token: 0x04000B1F RID: 2847
238 private global::UnityEngine.Vector2 _initialPosition1;
239
240 // Token: 0x04000B20 RID: 2848
242
243 // Token: 0x04000B21 RID: 2849
245
246 // Token: 0x04000B22 RID: 2850
247 private float _initialZoom;
248
249 // Token: 0x04000B23 RID: 2851
250 public bool PinchZoomWorldEnabled = 257 != 0;
251
252 // Token: 0x04000B24 RID: 2852
254}
class f__AnonymousType0<< Count > j__TPar
bool draggingSlider
Definition GUIZoom.cs:208
bool _lastFrameFullScreenMap
Definition GUIZoom.cs:241
void LoadDefaultZoom()
Definition GUIZoom.cs:36
float MaxZoomValue
Definition GUIZoom.cs:220
void ApplyPixelZoom(float pixelScale)
Definition GUIZoom.cs:58
float DefaultWorldZoomScale
Definition GUIZoom.cs:223
float GetDefaultWorldZoomScale()
Definition GUIZoom.cs:11
global::Cursor _zoomCursor1
Definition GUIZoom.cs:232
global::UnityEngine.Vector2 _initialPosition1
Definition GUIZoom.cs:238
void UpdateCursor(global::Cursor cursor)
Definition GUIZoom.cs:77
float _initialZoom
Definition GUIZoom.cs:247
Microsoft.Xna.Framework.Vector2 _lastFrameGrabCentre
Definition GUIZoom.cs:244
global::UnityEngine.Vector2 _initialPosition0
Definition GUIZoom.cs:235
CursorInputLayer _inputlayerZoomPinch
Definition GUIZoom.cs:217
float ZoomValue
Definition GUIZoom.cs:211
GUIZoom()
Definition GUIZoom.cs:46
bool _pinchZoomActive
Definition GUIZoom.cs:226
void UpdatePinchZoom()
Definition GUIZoom.cs:98
global::Cursor _zoomCursor0
Definition GUIZoom.cs:229
void UpdateCursorDummy(global::Cursor cursor)
Definition GUIZoom.cs:72
void Draw()
Definition GUIZoom.cs:203
bool PinchZoomWorldEnabled
Definition GUIZoom.cs:250
bool PinchZoomMapEnabled
Definition GUIZoom.cs:253
CursorInputLayer _inputLayer
Definition GUIZoom.cs:214
bool IsCursorOver(Microsoft.Xna.Framework.Vector2 position, [Out] float sliderPosition)
Definition GUIZoom.cs:52
void UpdatePixelZoom()
Definition GUIZoom.cs:67
static float mapFullscreenScale
Definition Main.cs:1483
static Microsoft.Xna.Framework.Vector2 mapFullscreenPos
Definition Main.cs:1497
static bool mapEnabled
Definition Main.cs:1231
static bool gameMenu
Definition Main.cs:2673
static bool mapFullscreen
Definition Main.cs:1441
Vector2(float x, float y)
Definition Vector2.cs:64