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
GUIClothesWindow.cs
Go to the documentation of this file.
1using System;
2using Controller;
5using Terraria;
7
8// Token: 0x0200012C RID: 300
9public class GUIClothesWindow
10{
11 // Token: 0x060007C6 RID: 1990 RVA: 0x0001DF9C File Offset: 0x0001C19C
12 public int GetSelectedStyle()
13 {
14 int[] array = this.playerStyles;
15 if (array == null)
16 {
17 return;
18 }
19 Player player = this.clonePlayer;
20 if (player != null)
21 {
22 int skinVariant = player.skinVariant;
23 return array;
24 }
25 }
26
27 // Token: 0x060007C7 RID: 1991 RVA: 0x0001DFC8 File Offset: 0x0001C1C8
33
34 // Token: 0x060007C8 RID: 1992 RVA: 0x0001DFDC File Offset: 0x0001C1DC
40
41 // Token: 0x060007C9 RID: 1993 RVA: 0x0001DFF8 File Offset: 0x0001C1F8
42 public string GetTitle()
43 {
44 /*
45An exception occurred when decompiling this method (060007C9)
46
47ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String GUIClothesWindow::GetTitle()
48
49 ---> System.Exception: Basic block has to end with unconditional control flow.
50{
51 IL_004B:
52 stloc:int32(var_16_53, callgetter:int32(Main::get_interactedDresserTopLeftX))
53 stloc:int32(var_18_5D, callgetter:int32(Main::get_interactedDresserTopLeftY))
54 stloc:int16(var_20_66, callgetter:int16(Tile::get_frameX, ldloc:Tile[exp:valuetype Terraria.Tile&](var_19)))
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 // Token: 0x060007CA RID: 1994 RVA: 0x0001E06C File Offset: 0x0001C26C
68 public string GetName()
69 {
70 /*
71An exception occurred when decompiling this method (060007CA)
72
73ICSharpCode.Decompiler.DecompilerException: Error decompiling System.String GUIClothesWindow::GetName()
74
75 ---> System.Exception: Basic block has to end with unconditional control flow.
76{
77 IL_0052:
78 stloc:int32(var_17_5A, callgetter:int32(Main::get_interactedDresserTopLeftX))
79 stloc:int32(var_19_64, callgetter:int32(Main::get_interactedDresserTopLeftY))
80 stloc:int16(var_21_6D, callgetter:int16(Tile::get_frameX, ldloc:Tile[exp:valuetype Terraria.Tile&](var_20)))
81}
82
83 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
84 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
85 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
86 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
87 --- End of inner exception stack trace ---
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 92
89 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
90*/;
91 }
92
93 // Token: 0x060007CB RID: 1995 RVA: 0x0001E0E8 File Offset: 0x0001C2E8
94 private void DrawPlayer()
95 {
96 Main.gameMenu = true;
97 Player player = this.clonePlayer;
98 float x = this.CharacterDrawOffset.X;
99 float y = this.CharacterDrawOffset.Y;
100 Main.gameMenu = false;
101 }
102
103 // Token: 0x060007CC RID: 1996 RVA: 0x0001E124 File Offset: 0x0001C324
104 public void Draw()
105 {
106 int num = 1;
107 bool flag = Main.npcChatText != "";
108 if (num == 0)
109 {
110 }
111 int myPlayer = Main.myPlayer;
112 if (num == 0)
113 {
114 }
115 if (Main.npcShop != 0)
116 {
118 return;
119 }
120 if (num == 0)
121 {
122 }
123 int myPlayer2 = Main.myPlayer;
124 if (num == 0)
125 {
126 }
128 if (num == 0)
129 {
130 }
131 int interactedDresserTopLeftX = Main.interactedDresserTopLeftX;
132 int interactedDresserTopLeftY = Main.interactedDresserTopLeftY;
133 Tile tile;
134 ushort type = tile.type;
140 bool flag2 = localPlayer.IsInInteractionRangeToMultiTileHitbox(interactedDresserTopLeftX2, interactedDresserTopLeftY2);
143 Tile tile2;
144 bool flag3 = tile2.active();
147 this.ClonePlayer();
148 if (Main.selClothes != 0)
149 {
150 this.DrawHSLSlider();
151 return;
152 }
153 this.DrawStyles();
154 this.DrawCategoryButtons();
155 this.DrawChangeButton();
156 this.DrawCancelButton();
157 this.DrawPlayer();
158 }
159
160 // Token: 0x060007CD RID: 1997 RVA: 0x0001E238 File Offset: 0x0001C438
161 private void DrawButtons()
162 {
163 this.DrawChangeButton();
164 this.DrawCancelButton();
165 }
166
167 // Token: 0x060007CE RID: 1998 RVA: 0x0001E254 File Offset: 0x0001C454
168 private void DrawCancelButton()
169 {
170 string textValue = Language.GetTextValue("LegacyInterface.52");
173 {
174 return;
175 }
177 }
178
179 // Token: 0x060007CF RID: 1999 RVA: 0x0001E278 File Offset: 0x0001C478
180 public void DrawPlayer(Player drawPlayer, Vector2 Position, float rotation, Vector2 rotationOrigin, float shadow = 0f)
181 {
182 }
183
184 // Token: 0x060007D0 RID: 2000 RVA: 0x0001E288 File Offset: 0x0001C488
185 private void DrawSelectedPlayer(Vector2 position, float scale)
186 {
187 int num = 1;
188 if (num == 0)
189 {
190 }
191 int myPlayer = Main.myPlayer;
192 Vector2 screenPosition = Main.screenPosition;
193 if (num == 0)
194 {
195 }
196 int myPlayer2 = Main.myPlayer;
197 if (!true)
198 {
199 }
200 }
201
202 // Token: 0x060007D1 RID: 2001 RVA: 0x0001E2BC File Offset: 0x0001C4BC
203 public void DrawChangeButton()
204 {
205 string textValue = Language.GetTextValue("GameUI.Change");
208 {
209 return;
210 }
212 }
213
214 // Token: 0x060007D2 RID: 2002 RVA: 0x0001E2E0 File Offset: 0x0001C4E0
215 private void DrawCategoryButtons()
216 {
217 int num = 1;
218 if (num == 0)
219 {
220 }
221 bool mouseLeft = Main.mouseLeft;
222 if (num == 0)
223 {
224 }
225 bool mouseLeftRelease = Main.mouseLeftRelease;
226 int num2 = 17096;
228 string textValue = Language.GetTextValue("Mobile.ControlsPageNext");
230 int selClothes = Main.selClothes;
231 Main.selClothes = 6;
233 int num3 = 7;
237 Main.selClothes = 0;
239 int num4 = 7;
241 int myPlayer = Main.myPlayer;
242 string textValue2 = Language.GetTextValue("LegacyMenu.127");
243 int myPlayer2 = Main.myPlayer;
247 {
248 if (-2147483648 == 0)
249 {
250 }
251 Main.selClothes = 0;
252 }
253 string textValue3 = Language.GetTextValue("LegacyMenu.39");
254 if (-2147483648 == 0)
255 {
256 }
257 int myPlayer3 = Main.myPlayer;
261 {
262 if (-2147483648 == 0)
263 {
264 }
265 Main.selClothes = 1;
266 }
267 string textValue4 = Language.GetTextValue("LegacyMenu.40");
268 if (-2147483648 == 0)
269 {
270 }
271 int myPlayer4 = Main.myPlayer;
275 {
276 if (-2147483648 == 0)
277 {
278 }
279 Main.selClothes = 2;
280 }
281 string textValue5 = Language.GetTextValue("LegacyMenu.33");
282 if (-2147483648 == 0)
283 {
284 }
285 int myPlayer5 = Main.myPlayer;
289 {
290 if (-2147483648 == 0)
291 {
292 }
293 Main.selClothes = 3;
294 }
295 string textValue6 = Language.GetTextValue("LegacyMenu.34");
296 if (-2147483648 == 0)
297 {
298 }
299 int myPlayer6 = Main.myPlayer;
303 {
304 if (-2147483648 == 0)
305 {
306 }
307 Main.selClothes = 4;
308 }
309 string textValue7 = Language.GetTextValue("LegacyMenu.35");
310 if (-2147483648 == 0)
311 {
312 }
313 int myPlayer7 = Main.myPlayer;
317 {
318 if (-2147483648 == 0)
319 {
320 }
321 Main.selClothes = 5;
322 }
323 string textValue8 = Language.GetTextValue("LegacyMenu.36");
324 int myPlayer8 = Main.myPlayer;
328 {
329 Main.selClothes = 6;
330 }
332 }
333
334 // Token: 0x060007D3 RID: 2003 RVA: 0x0001E5A4 File Offset: 0x0001C7A4
335 private void DrawHSLSlider()
336 {
337 int num = 1;
338 if (num == 0)
339 {
340 }
341 int selClothes = Main.selClothes;
342 if (num == 0)
343 {
344 }
345 int myPlayer = Main.myPlayer;
346 if (num == 0)
347 {
348 }
350 if (num == 0)
351 {
352 }
353 int myPlayer2 = Main.myPlayer;
354 if (num == 0)
355 {
356 }
358 if (num == 0)
359 {
360 }
361 int myPlayer3 = Main.myPlayer;
362 if (num == 0)
363 {
364 }
366 if (num == 0)
367 {
368 }
369 int myPlayer4 = Main.myPlayer;
370 if (num == 0)
371 {
372 }
374 if (num == 0)
375 {
376 }
377 int myPlayer5 = Main.myPlayer;
378 if (num == 0)
379 {
380 }
382 if (num == 0)
383 {
384 }
385 int myPlayer6 = Main.myPlayer;
386 if (num == 0)
387 {
388 }
390 float hBar = Main.hBar;
391 if (num == 0)
392 {
393 }
394 float sBar = Main.sBar;
395 if (num == 0)
396 {
397 }
398 float lBar = Main.lBar;
399 if (num == 0)
400 {
401 }
402 Main.hBar = lBar;
403 Main.sBar = lBar;
404 Main.lBar = lBar;
405 if (num == 0)
406 {
407 }
408 bool mouseLeft = Main.mouseLeft;
409 if (num == 0)
410 {
411 }
412 bool mouseLeftRelease = Main.mouseLeftRelease;
413 }
414
415 // Token: 0x060007D4 RID: 2004 RVA: 0x0001EA20 File Offset: 0x0001CC20
416 private void DrawStyles()
417 {
418 int myPlayer = Main.myPlayer;
419 Main.gameMenu = true;
420 Main.gameMenu = false;
421 }
422
423 // Token: 0x060007D5 RID: 2005 RVA: 0x000021DB File Offset: 0x000003DB
424 private float StyleScale(int index)
425 {
426 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
427 }
428
429 // Token: 0x060007D6 RID: 2006 RVA: 0x0001EA44 File Offset: 0x0001CC44
430 public void StyleOver(int index)
431 {
432 int[] array = this.playerStyles;
434 if (array == null)
435 {
436 }
437 bool mouseLeft = Main.mouseLeft;
438 if (array == null)
439 {
440 }
441 bool mouseLeftRelease = Main.mouseLeftRelease;
442 if (array == null)
443 {
444 }
445 Main.mouseLeftRelease = false;
446 int myPlayer = Main.myPlayer;
447 int[] array2 = this.playerStyles;
448 }
449
450 // Token: 0x060007D7 RID: 2007 RVA: 0x0001EAAC File Offset: 0x0001CCAC
451 public void StyleDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
452 {
453 int[] array = this.playerStyles;
454 Player player = this.clonePlayer;
455 int num = this.styleOver;
456 int skinVariant = player.skinVariant;
457 int[] array2 = this.playerStyles;
459 int skinVariant2 = player2.skinVariant;
460 float x = player2.position.X;
461 float y = player2.position.Y;
462 int[] array3 = this.playerStyles;
463 int num2 = this.styleOver;
464 float x2 = player2.position.X;
465 float y2 = player2.position.Y;
466 int[] array4 = this.playerStyles;
468 this.clonePlayer.skinVariant = skinVariant;
469 }
470
471 // Token: 0x060007D8 RID: 2008 RVA: 0x0001EB68 File Offset: 0x0001CD68
472 private void ClonePlayer()
473 {
474 if (this.clonePlayer == null)
475 {
476 }
477 int myPlayer = Main.myPlayer;
478 Player player = this.clonePlayer;
487 Item[] armor = player9.armor;
489 long entityId = armor.entityId;
490 Item blankItem = this._blankItem;
491 if (blankItem == null || blankItem != null)
492 {
494 Item[] armor2 = player10.armor;
495 player10.PlayerFrame();
496 return;
497 }
498 throw new ArrayTypeMismatchException();
499 }
500
501 // Token: 0x060007D9 RID: 2009 RVA: 0x0001EC18 File Offset: 0x0001CE18
503 {
504 }
505
506 // Token: 0x0400065A RID: 1626
507 private float ChangeButtonScale = (float)16256;
508
509 // Token: 0x0400065B RID: 1627
511
512 // Token: 0x0400065C RID: 1628
513 private int[] playerStyles;
514
515 // Token: 0x0400065D RID: 1629
517
518 // Token: 0x0400065E RID: 1630
520
521 // Token: 0x0400065F RID: 1631
523
524 // Token: 0x04000660 RID: 1632
525 private float closeScale;
526
527 // Token: 0x04000661 RID: 1633
529
530 // Token: 0x04000662 RID: 1634
531 private float shirtButtonScale;
532
533 // Token: 0x04000663 RID: 1635
535
536 // Token: 0x04000664 RID: 1636
537 private float pantsButtonScale;
538
539 // Token: 0x04000665 RID: 1637
540 private float shoesButtonScale;
541
542 // Token: 0x04000666 RID: 1638
543 private float eyesButtonScale;
544
545 // Token: 0x04000667 RID: 1639
546 private float skinButtonScale;
547
548 // Token: 0x04000668 RID: 1640
549 private float styleButtonScale;
550
551 // Token: 0x04000669 RID: 1641
552 private float TitleScale;
553
554 // Token: 0x0400066A RID: 1642
556
557 // Token: 0x0400066B RID: 1643
559
560 // Token: 0x0400066C RID: 1644
562
563 // Token: 0x0400066D RID: 1645
564 private int styleOver = 16256;
565}
class f__AnonymousType0<< Count > j__TPar
static void SetGridItemRegion(Rectangle region)
void StyleOver(int index)
void StyleDraw(ItemGrid_Layout gridLayout, int index, Vector2 position, float scale)
GUISlider.DragState lightDragState
void DrawPlayer(Player drawPlayer, Vector2 Position, float rotation, Vector2 rotationOrigin, float shadow=0f)
void DrawSelectedPlayer(Vector2 position, float scale)
GUIControllerDresser _controller
GUISlider.DragState satDragState
bool IsOverPanel(Vector2 cursorPosition)
GUISlider.DragState hueDragState
float StyleScale(int index)
Vector2 position
Definition Entity.cs:460
static string GetTextValue(string key)
Definition Language.cs:54
static float lBar
Definition Main.cs:3679
static float sBar
Definition Main.cs:3665
static int interactedDresserTopLeftX
Definition Main.cs:3525
static int myPlayer
Definition Main.cs:2337
static Microsoft.Xna.Framework.Vector2 screenPosition
Definition Main.cs:1973
static bool mouseLeftRelease
Definition Main.cs:2029
static Microsoft.Xna.Framework.Graphics.Color selColor
Definition Main.cs:3623
static void SaveClothesWindow()
Definition Main.cs:12406
static Microsoft.Xna.Framework.Vector3 rgbToHsl(Microsoft.Xna.Framework.Graphics.Color newColor)
Definition Main.cs:13832
static float hBar
Definition Main.cs:3651
static int npcShop
Definition Main.cs:2547
static bool InGuideCraftMenu
Definition Main.cs:2645
static int interactedDresserTopLeftY
Definition Main.cs:3539
static int selClothes
Definition Main.cs:3483
static Player LocalPlayer
Definition Main.cs:5267
static void CancelClothesWindow(bool quiet=false)
Definition Main.cs:12367
static bool mouseLeft
Definition Main.cs:671
ushort type
Definition Tile.cs:58
bool active()
Definition Tile.cs:1241