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
InputControlSource.cs
Go to the documentation of this file.
1using System;
3using UnityEngine;
4
5namespace InControl
6{
7 // Token: 0x02000021 RID: 33
9 public struct InputControlSource
10 {
11 // Token: 0x17000060 RID: 96
12 // (get) Token: 0x0600015B RID: 347 RVA: 0x000025E1 File Offset: 0x000007E1
13 // (set) Token: 0x0600015C RID: 348 RVA: 0x00004A0C File Offset: 0x00002C0C
15 {
16 get
17 {
18 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
19 }
20 set
21 {
23 }
24 }
25
26 // Token: 0x17000061 RID: 97
27 // (get) Token: 0x0600015D RID: 349 RVA: 0x00004A20 File Offset: 0x00002C20
28 // (set) Token: 0x0600015E RID: 350 RVA: 0x00004A34 File Offset: 0x00002C34
29 public int Index
30 {
31 get
32 {
33 return this.index;
34 }
35 set
36 {
38 }
39 }
40
41 // Token: 0x0600015F RID: 351 RVA: 0x00004A48 File Offset: 0x00002C48
46
47 // Token: 0x06000160 RID: 352 RVA: 0x00004A5C File Offset: 0x00002C5C
49 {
51 }
52
53 // Token: 0x06000161 RID: 353 RVA: 0x00004A70 File Offset: 0x00002C70
54 public float GetValue(InputDevice inputDevice)
55 {
56 /*
57An exception occurred when decompiling this method (06000161)
58
59ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single InControl.InputControlSource::GetValue(InControl.InputDevice)
60
61 ---> System.Exception: Basic block has to end with unconditional control flow.
62{
63 Block_0:
64 stloc:bool(var_0_07, call:bool(InputControlSource::GetState, ldloc:valuetype InControl.InputControlSource&(this), ldloc:InputDevice(inputDevice)))
65}
66
67 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
68 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
69 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
70 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
71 --- End of inner exception stack trace ---
72 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
73 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
74*/;
75 }
76
77 // Token: 0x06000162 RID: 354 RVA: 0x00004A84 File Offset: 0x00002C84
78 public bool GetState(InputDevice inputDevice)
79 {
80 int num = this.index;
81 float value = this.GetValue(inputDevice);
82 return Utility.IsNotZero(value);
83 }
84
85 // Token: 0x06000163 RID: 355 RVA: 0x00004AB4 File Offset: 0x00002CB4
86 public string ToCode()
87 {
88 if ("new InputControlSource( InputControlSourceType." != null)
89 {
90 }
91 string text;
92 if ((text == null || text != null) && (", " == null || ", " != null))
93 {
94 int num = this.index;
95 string text2;
96 if ((text2 == null || text2 != null) && (" )" == null || " )" != null))
97 {
98 string text3;
99 return text3;
100 }
101 }
102 throw new ArrayTypeMismatchException();
103 }
104
105 // Token: 0x0400013F RID: 319
108
109 // Token: 0x04000140 RID: 320
111 private int index;
112 }
113}
class f__AnonymousType0<< Count > j__TPar
static bool IsNotZero(float value)
Definition Utility.cs:213
float GetValue(InputDevice inputDevice)
InputControlSource(InputControlSourceType sourceType, int index)
InputControlSourceType SourceType
bool GetState(InputDevice inputDevice)
InputControlSourceType sourceType