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
ControllerActionButton.cs
Go to the documentation of this file.
1using System;
5using UnityEngine;
6
7namespace Controller
8{
9 // Token: 0x02000B57 RID: 2903
11 {
12 // Token: 0x1700092F RID: 2351
13 // (get) Token: 0x06005467 RID: 21607 RVA: 0x00285EE0 File Offset: 0x002840E0
14 public bool HasMapping
15 {
16 get
17 {
18 /*
19An exception occurred when decompiling this method (06005467)
20
21ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Controller.ControllerActionButton::get_HasMapping()
22
23 ---> System.Exception: Basic block has to end with unconditional control flow.
24{
25 Block_0:
26 stloc:int32(var_0_0B, ldfld:int32(List`1::_size, ldfld:class [mscorlib]System.Collections.Generic.List`1<class Controller.ControllerActionButton/Entry>[exp:List`1](ControllerActionButton::_entries, ldloc:ControllerActionButton(this))))
27}
28
29 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
30 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
31 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
32 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
33 --- End of inner exception stack trace ---
34 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
35 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
36*/;
37 }
38 }
39
40 // Token: 0x17000930 RID: 2352
41 // (get) Token: 0x06005468 RID: 21608 RVA: 0x00285EF8 File Offset: 0x002840F8
43 {
44 get
45 {
46 /*
47An exception occurred when decompiling this method (06005468)
48
49ICSharpCode.Decompiler.DecompilerException: Error decompiling Controller.ControllerActionButton/RequiredButtonState Controller.ControllerActionButton::get_RequiredState()
50
51 ---> System.Exception: Basic block has to end with unconditional control flow.
52{
53 Block_0:
54 stloc:class [mscorlib]System.Collections.Generic.List`1<class Controller.ControllerActionButton/Entry>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.List`1<class Controller.ControllerActionButton/Entry>(ControllerActionButton::_entries, ldloc:ControllerActionButton(this)))
55}
56
57 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
58 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
59 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
60 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
61 --- End of inner exception stack trace ---
62 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
63 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
64*/;
65 }
66 }
67
68 // Token: 0x17000931 RID: 2353
69 // (get) Token: 0x06005469 RID: 21609 RVA: 0x00285F0C File Offset: 0x0028410C
71 {
72 get
73 {
74 /*
75An exception occurred when decompiling this method (06005469)
76
77ICSharpCode.Decompiler.DecompilerException: Error decompiling Controller.ControllerActionButton/Entry Controller.ControllerActionButton::get_FirstEntry()
78
79 ---> System.Exception: Basic block has to end with unconditional control flow.
80{
81 Block_0:
82 stloc:class [mscorlib]System.Collections.Generic.List`1<class Controller.ControllerActionButton/Entry>(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.List`1<class Controller.ControllerActionButton/Entry>(ControllerActionButton::_entries, ldloc:ControllerActionButton(this)))
83}
84
85 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
86 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
87 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
88 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
89 --- End of inner exception stack trace ---
90 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
91 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
92*/;
93 }
94 }
95
96 // Token: 0x0600546A RID: 21610 RVA: 0x00285F20 File Offset: 0x00284120
98 {
99 /*
100An exception occurred when decompiling this method (0600546A)
101
102ICSharpCode.Decompiler.DecompilerException: Error decompiling Controller.ControllerActionButton/Entry Controller.ControllerActionButton::GetEntry(System.Int32)
103
104 ---> System.Exception: Basic block has to end with unconditional control flow.
105{
106 Block_0:
107 stloc:int32(var_0_0B, ldfld:int32(List`1::_size, ldfld:class [mscorlib]System.Collections.Generic.List`1<class Controller.ControllerActionButton/Entry>[exp:List`1](ControllerActionButton::_entries, ldloc:ControllerActionButton(this))))
108}
109
110 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
111 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
112 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
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 88
114 --- End of inner exception stack trace ---
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 92
116 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
117*/;
118 }
119
120 // Token: 0x0600546B RID: 21611 RVA: 0x00285F3C File Offset: 0x0028413C
122 {
125 for (;;)
126 {
127 int size = this._entries._size;
128 int size2 = other._entries._size;
134 {
135 Buttons button = firstEntry.Button;
136 Buttons button2 = firstEntry2.Button;
137 }
138 Axis axis = firstEntry.Axis0;
139 Axis axis2 = firstEntry2.Axis0;
140 float threshold = firstEntry.Threshold;
141 float threshold2 = firstEntry2.Threshold;
143 if (requiredState != null)
144 {
146 if (requiredState2 != null)
147 {
148 break;
149 }
150 }
151 }
153 if (requiredState.state)
154 {
155 Buttons button4 = requiredState.Button2;
156 }
157 Buttons button5 = requiredState.Button2;
158 bool state = requiredState.state2;
159 if (requiredState.state)
160 {
161 }
163 if (requiredState2.state)
164 {
166 }
168 bool state2 = requiredState2.state2;
169 if (requiredState2.state)
170 {
171 return;
172 }
173 }
174
175 // Token: 0x0600546C RID: 21612 RVA: 0x000021DB File Offset: 0x000003DB
176 public void MapAxis(Axis axis, float threshold, [Optional] ControllerActionButton.RequiredButtonState requiredButtonState, bool ignoreOthersIfExists = true)
177 {
178 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
179 }
180
181 // Token: 0x0600546D RID: 21613 RVA: 0x000021DB File Offset: 0x000003DB
183 {
184 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
185 }
186
187 // Token: 0x0600546E RID: 21614 RVA: 0x00286048 File Offset: 0x00284248
191
192 // Token: 0x0600546F RID: 21615 RVA: 0x000021DB File Offset: 0x000003DB
193 public void MapKey(KeyCode key, bool ignoreOthersIfExists = false)
194 {
195 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
196 }
197
198 // Token: 0x06005470 RID: 21616 RVA: 0x00286058 File Offset: 0x00284258
200 {
201 int size = this._entries._size;
203 if (firstEntry.MappingType == ControllerActionButton.Entry.Type.Axis && controller != null)
204 {
205 Axis axis = firstEntry.Axis0;
206 bool flag = controller.HasAxis(axis);
207 if (firstEntry.RequiredState != null)
208 {
209 Axis axis2 = firstEntry.Axis0;
210 float axisTime = controller.GetAxisTime(axis2);
212 if (controller != null)
213 {
214 Buttons button = firstEntry.Button;
216 if (requiredState2 != null)
217 {
218 Buttons button2 = firstEntry.Button;
219 float num = controller.ButtonTime(button2);
220 return requiredState2.Valid(controller, num);
221 }
222 }
223 }
224 }
225 return true;
226 }
227
228 // Token: 0x06005471 RID: 21617 RVA: 0x000021DB File Offset: 0x000003DB
230 {
231 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
232 }
233
234 // Token: 0x06005472 RID: 21618 RVA: 0x000021DB File Offset: 0x000003DB
236 {
237 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
238 }
239
240 // Token: 0x06005473 RID: 21619 RVA: 0x000021DB File Offset: 0x000003DB
242 {
243 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
244 }
245
246 // Token: 0x06005474 RID: 21620 RVA: 0x000021DB File Offset: 0x000003DB
247 public void Clear()
248 {
249 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
250 }
251
252 // Token: 0x06005475 RID: 21621 RVA: 0x002860EC File Offset: 0x002842EC
254 {
255 }
256
257 // Token: 0x04008D3A RID: 36154
258 public string Id;
259
260 // Token: 0x04008D3B RID: 36155
261 public bool Enabled;
262
263 // Token: 0x04008D3C RID: 36156
264 public bool DisableUnitlClear;
265
266 // Token: 0x04008D3D RID: 36157
267 public int DisplayPriority;
268
269 // Token: 0x04008D3E RID: 36158
271
272 // Token: 0x04008D3F RID: 36159
274
275 // Token: 0x02000B58 RID: 2904
277 {
278 // Token: 0x06005476 RID: 21622 RVA: 0x002860FC File Offset: 0x002842FC
280 {
281 }
282
283 // Token: 0x06005477 RID: 21623 RVA: 0x00286120 File Offset: 0x00284320
285 {
286 this.Button = button;
287 }
288
289 // Token: 0x06005478 RID: 21624 RVA: 0x0028614C File Offset: 0x0028434C
291 {
292 this.Button = button;
293 this.Button2 = button2;
294 }
295
296 // Token: 0x06005479 RID: 21625 RVA: 0x00286180 File Offset: 0x00284380
297 public bool Active(ControllerDevice device, float buttonPressTime, float axisValue)
298 {
299 while (device == null)
300 {
301 }
302 Buttons button = this.Button;
303 Buttons button2 = this.Button2;
304 return true;
305 }
306
307 // Token: 0x0600547A RID: 21626 RVA: 0x002861E8 File Offset: 0x002843E8
308 public bool Valid(ControllerDevice device, float buttonPressTime)
309 {
310 if (device != null)
311 {
312 Buttons button = this.Button;
313 Buttons button2 = this.Button2;
314 return true;
315 }
316 }
317
318 // Token: 0x0600547B RID: 21627 RVA: 0x00286278 File Offset: 0x00284478
320 {
321 if (device != null)
322 {
323 Buttons button = this.Button;
324 if (this.state)
325 {
326 device.SetButtonConsumbed(button);
327 }
328 Buttons button2 = this.Button2;
329 if (this.state2)
330 {
331 device.SetButtonConsumbed(button2);
332 return;
333 }
334 }
335 }
336
337 // Token: 0x04008D40 RID: 36160
338 public Buttons Button = Buttons.Count;
339
340 // Token: 0x04008D41 RID: 36161
341 public bool state;
342
343 // Token: 0x04008D42 RID: 36162
344 public Buttons Button2 = Buttons.Count;
345
346 // Token: 0x04008D43 RID: 36163
347 public bool state2;
348 }
349
350 // Token: 0x02000B59 RID: 2905
351 public class Entry
352 {
353 // Token: 0x0600547C RID: 21628 RVA: 0x002862B8 File Offset: 0x002844B8
354 public Entry()
355 {
356 }
357
358 // Token: 0x04008D44 RID: 36164
360
361 // Token: 0x04008D45 RID: 36165
362 public Axis Axis0;
363
364 // Token: 0x04008D46 RID: 36166
365 public float Threshold;
366
367 // Token: 0x04008D47 RID: 36167
369
370 // Token: 0x04008D48 RID: 36168
372
373 // Token: 0x04008D49 RID: 36169
375
376 // Token: 0x04008D4A RID: 36170
378
379 // Token: 0x02000B5A RID: 2906
380 public enum Type
381 {
382 // Token: 0x04008D4C RID: 36172
383 Axis,
384 // Token: 0x04008D4D RID: 36173
385 Button,
386 // Token: 0x04008D4E RID: 36174
388 }
389 }
390 }
391}
class f__AnonymousType0<< Count > j__TPar
ControllerActionButton.Entry.Type MappingType
ControllerActionButton.RequiredButtonState RequiredState
bool Active(ControllerDevice device, float buttonPressTime, float axisValue)
RequiredButtonState(Buttons button, bool requiredState, Buttons button2, bool requiredState2)
bool Valid(ControllerDevice device, float buttonPressTime)
List< ControllerActionButton.Entry > _entries
ControllerActionButton.Entry GetEntry(int index)
ControllerActionButton.RequiredButtonState RequiredState
void MapButton(Buttons button, [Optional] ControllerActionButton.RequiredButtonState requiredButtonState, bool ignoreOthersIfExists=true)
void MapAxis(Axis axis, float threshold, [Optional] ControllerActionButton.RequiredButtonState requiredButtonState, bool ignoreOthersIfExists=true)
bool RequiredStateValid(ControllerDevice controller)
void MapKey(KeyCode key, bool ignoreOthersIfExists=false)
bool GetButtonState(ControllerDevice controller)
bool GetButtonDown(ControllerDevice controller)
ControllerActionButton.Entry FirstEntry
bool Conflicts(ControllerActionButton other)
bool GetButtonUp(ControllerDevice controller)
void MapAxisButton(AxisButtons button, [Optional] ControllerActionButton.RequiredButtonState requiredButtonState, bool ignoreOthersIfExists=true)
void SetButtonConsumbed(Buttons key)