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
GUIControllerMappingState.cs
Go to the documentation of this file.
1using System;
3using Controller;
4using Terraria.IO;
5
6// Token: 0x0200007B RID: 123
8{
9 // Token: 0x060002B7 RID: 695 RVA: 0x00008AD8 File Offset: 0x00006CD8
16
17 // Token: 0x060002B8 RID: 696 RVA: 0x00008B08 File Offset: 0x00006D08
19 {
20 /*
21An exception occurred when decompiling this method (060002B8)
22
23ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean GUIControllerMappingState::IsSame(GUIControllerMappingState)
24
25 ---> System.Exception: Basic block has to end with unconditional control flow.
26{
27 Block_0:
28 stloc:class Controller.ControllerActionButton[](var_0_06, ldfld:class Controller.ControllerActionButton[](GUIControllerMappingState::ButtonBindings, ldloc:GUIControllerMappingState(this)))
29 stloc:class Controller.ControllerActionButton[](var_1_0D, ldfld:class Controller.ControllerActionButton[](GUIControllerMappingState::ButtonBindings, ldloc:GUIControllerMappingState(other)))
30 stloc:class Controller.ControllerActionButton[](var_3_16, ldfld:class Controller.ControllerActionButton[](GUIControllerMappingState::AxisButtonBindings, ldloc:GUIControllerMappingState(this)))
31 stloc:class Controller.ControllerActionButton[](var_4_1D, ldfld:class Controller.ControllerActionButton[](GUIControllerMappingState::AxisButtonBindings, ldloc:GUIControllerMappingState(other)))
32 stloc:class Controller.ControllerActionAxis[](var_6_28, ldfld:class Controller.ControllerActionAxis[](GUIControllerMappingState::AxisBindings, ldloc:GUIControllerMappingState(this)))
33 stloc:class Controller.ControllerActionAxis[](var_7_30, ldfld:class Controller.ControllerActionAxis[](GUIControllerMappingState::AxisBindings, ldloc:GUIControllerMappingState(other)))
34}
35
36 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
37 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
38 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
39 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
40 --- End of inner exception stack trace ---
41 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
42 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
43*/;
44 }
45
46 // Token: 0x060002B9 RID: 697 RVA: 0x00008B50 File Offset: 0x00006D50
48 {
51 if (buttonBindings2 != null)
52 {
53 }
54 if (this.AxisButtonBindings == null || other.AxisButtonBindings != null || other.AxisBindings._entries != null)
55 {
56 }
59 if (linkedAction == null || !linkedAction.Enabled || other.AxisBindings._entries != null)
60 {
61 return;
62 }
63 ControllerActionButton[] axisButtonBindings = other.AxisButtonBindings;
64 }
65
66 // Token: 0x060002BA RID: 698 RVA: 0x00008BE0 File Offset: 0x00006DE0
68 {
69 int num = 13;
73 if (entry.RequiredState == null)
74 {
76 }
82 if (altStates != null)
83 {
84 Buttons button = altStates.Left.RequiredState.Button;
85 requiredState.Button = button;
86 Buttons button2 = altStates.Right.RequiredState.Button;
87 requiredState.Button2 = button2;
88 }
89 int num2 = 13;
91 bool flag;
92 if (flag)
93 {
96 if (requiredButtonState == null)
97 {
99 }
105 if (altStates != null)
106 {
107 Buttons button3 = altStates.Left.RequiredState.Button;
109 Buttons button4 = altStates.Right.RequiredState.Button;
111 }
112 }
113 int num3 = 13;
115 bool flag2;
116 if (flag2)
117 {
120 if (entry4.RequiredState == null)
121 {
123 }
129 if (altStates != null)
130 {
131 Buttons button5 = altStates.Left.RequiredState.Button;
133 Buttons button6 = altStates.Right.RequiredState.Button;
135 }
136 }
137 }
138
139 // Token: 0x060002BB RID: 699 RVA: 0x00008D78 File Offset: 0x00006F78
141 {
144 if (this != null)
145 {
146 ControllerActionButton[] axisButtonBindings = other.AxisButtonBindings;
148 if (this != null)
149 {
150 ControllerActionAxis[] axisBindings = other.AxisBindings;
152 if (this != null)
153 {
154 return;
155 }
156 }
157 }
158 throw new ArrayTypeMismatchException();
159 }
160
161 // Token: 0x060002BC RID: 700 RVA: 0x00008DCC File Offset: 0x00006FCC
163 {
164 string text2;
165 string text = prefix + "Button_" + text2;
168 if (controllerActionButton != null && controllerActionButton == null)
169 {
170 return;
171 }
172 string text4;
173 string text3 = prefix + "AxisButton_" + text4;
177 {
178 return;
179 }
180 string text6;
181 string text5 = prefix + "Axis_" + text6;
184 if (controllerActionAxis != null && controllerActionAxis == null)
185 {
186 return;
187 }
188 }
189
190 // Token: 0x060002BD RID: 701 RVA: 0x00008E84 File Offset: 0x00007084
192 {
195 if (mapping == null || mapping != null)
196 {
199 ControllerActionButton[] axisButtonBindings2 = other.AxisButtonBindings;
200 if (mapping == null || mapping != null)
201 {
203 return;
204 }
205 }
206 throw new ArrayTypeMismatchException();
207 }
208
209 // Token: 0x060002BE RID: 702 RVA: 0x00008ED8 File Offset: 0x000070D8
210 public void SaveConfiguration(string prefix, Preferences preferences)
211 {
212 if (this.ButtonBindings != null)
213 {
214 string text2;
215 string text = prefix + "Button_" + text2;
216 string id = this.ButtonBindings.Id;
217 preferences.Put(text, id);
218 return;
219 }
220 string text4;
221 string text3 = prefix + "Button_" + text4;
222 preferences.Clear(text3);
223 if (this.AxisButtonBindings != null)
224 {
225 string text6;
226 string text5 = prefix + "AxisButton_" + text6;
227 string id2 = this.AxisButtonBindings.Id;
228 preferences.Put(text5, id2);
229 return;
230 }
231 string text8;
232 string text7 = prefix + "AxisButton_" + text8;
233 preferences.Clear(text7);
234 if (this.AxisBindings != null)
235 {
236 string text10;
237 string text9 = prefix + "Axis_" + text10;
238 string id3 = this.AxisBindings.Id;
239 preferences.Put(text9, id3);
240 return;
241 }
242 string text12;
243 string text11 = prefix + "Axis_" + text12;
244 preferences.Clear(text11);
245 }
246
247 // Token: 0x060002BF RID: 703 RVA: 0x00008FBC File Offset: 0x000071BC
249 {
251 if (altStates != null)
252 {
253 Buttons button = altStates.Left.RequiredState.Button;
254 Buttons button2 = altStates.Right.RequiredState.Button;
256 Buttons button4 = altStates.Right.RequiredState.Button;
258 return;
259 }
262 bool flag;
263 if (flag)
264 {
265 if (altStates != null)
266 {
268 Buttons button6 = altStates.Right.RequiredState.Button;
270 Buttons button8 = altStates.Right.RequiredState.Button;
272 return;
273 }
275 }
277 bool flag2;
278 if (flag2)
279 {
280 if (altStates != null)
281 {
287 return;
288 }
290 }
291 }
292
293 // Token: 0x060002C0 RID: 704 RVA: 0x00009104 File Offset: 0x00007304
295 {
296 }
297
298 // Token: 0x04000318 RID: 792
300
301 // Token: 0x04000319 RID: 793
303
304 // Token: 0x0400031A RID: 794
306
307 // Token: 0x0400031B RID: 795
309}
class f__AnonymousType0<< Count > j__TPar
ControllerActionButton.RequiredButtonState RequiredState
ControllerActionButton.RequiredButtonState RequiredState
List< ControllerActionButton.Entry > _entries
ControllerActionButton.RequiredButtonState RequiredState
ControllerActionButton[] AxisButtonBindings
void LoadConfiguration(string prefix, Preferences preferences, bool mappingsCleared, List< ControllerActionButton > allowedButtons, List< ControllerActionAxis > allowedAxis)
void SetupWorldRequiredStateOverloads(GUIControllerMappingStateTable altStates)
ControllerActionButton.RequiredButtonState RequiredState
void SetupMappings(GUIControllerMappingStateTable altStates)
void TransferMapping(ControllerActionButton mapping, GUIControllerMappingState other)
void Copy(GUIControllerMappingState other)
ControllerActionButton[] ButtonBindings
bool IsSame(GUIControllerMappingState other)
void SaveConfiguration(string prefix, Preferences preferences)
void DisableConflictingActions(GUIControllerMappingState other)
void Put(string name, object value)