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
UIDynamicItemCollection.cs
Go to the documentation of this file.
1using System;
8using Terraria.UI;
9
11{
12 // Token: 0x02000AB0 RID: 2736
14 {
15 // Token: 0x060050B4 RID: 20660 RVA: 0x0027DFF4 File Offset: 0x0027C1F4
17 {
18 if (!true)
19 {
20 }
21 base..ctor();
22 this.HAlign = (float)16128;
23 this.UpdateSize();
24 }
25
26 // Token: 0x060050B5 RID: 20661 RVA: 0x0027E01C File Offset: 0x0027C21C
27 protected override void DrawSelf(SpriteBatch spriteBatch)
28 {
30 do
31 {
32 if (!true)
33 {
34 }
35 int itemsPerLine = this._itemsPerLine;
37 if (this._itemsPerLine == 0)
38 {
39 }
41 {
44 Item item = this._item;
45 if (this._item == null)
46 {
47 }
49 int num = 1;
51 }
52 int size = this._itemIdsToLoadTexturesFor._size;
53 itemIdsToLoadTexturesFor = this._itemIdsToLoadTexturesFor;
54 if (itemIdsToLoadTexturesFor == null)
55 {
56 }
57 }
58 while (itemIdsToLoadTexturesFor._syncRoot != null);
59 if ("Only TraceListeners can be added to a TraceListenerCollection." == null)
60 {
61 }
62 }
63
64 // Token: 0x060050B6 RID: 20662 RVA: 0x0027E0B8 File Offset: 0x0027C2B8
66 {
67 /*
68An exception occurred when decompiling this method (060050B6)
69
70ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Rectangle Terraria.GameContent.UI.Elements.UIDynamicItemCollection::GetItemSlotHitbox(System.Int32,System.Int32,System.Int32,System.Int32)
71
72 ---> System.Exception: Basic block has to end with unconditional control flow.
73{
74 Block_0:
75 stloc:int32(var_0_06, ldfld:int32(UIDynamicItemCollection::_itemsPerLine, ldloc:UIDynamicItemCollection(this)))
76}
77
78 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
79 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
80 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
81 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
82 --- End of inner exception stack trace ---
83 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
84 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
85*/;
86 }
87
88 // Token: 0x060050B7 RID: 20663 RVA: 0x0027E0D4 File Offset: 0x0027C2D4
89 private void GetGridParameters([Out] int startX, [Out] int startY, [Out] int startItemIndex, [Out] int endItemIndex)
90 {
91 float x = this._dimensions.X;
92 UIElement <Parent>k__BackingField = this.<Parent>k__BackingField;
93 int itemsPerLine = this._itemsPerLine;
96 int size = this._itemIdsAvailableToShow._size;
98 if (size == 0)
99 {
100 }
101 int num = Math.Min(0, startX);
102 int itemsPerLine2 = this._itemsPerLine;
104 int itemsPerLine3 = this._itemsPerLine;
106 }
107
108 // Token: 0x060050B8 RID: 20664 RVA: 0x0027E150 File Offset: 0x0027C350
109 public override void Recalculate()
110 {
111 base.Recalculate();
112 this.UpdateSize();
113 }
114
115 // Token: 0x060050B9 RID: 20665 RVA: 0x0027E16C File Offset: 0x0027C36C
116 public override void Update(GameTime gameTime)
117 {
118 base.Update(gameTime);
120 {
122 }
123 }
124
125 // Token: 0x060050BA RID: 20666 RVA: 0x0027E198 File Offset: 0x0027C398
137
138 // Token: 0x060050BB RID: 20667 RVA: 0x0027E1E0 File Offset: 0x0027C3E0
139 public int GetItemsPerLine()
140 {
141 return this._itemsPerLine;
142 }
143
144 // Token: 0x060050BC RID: 20668 RVA: 0x000021DB File Offset: 0x000003DB
146 {
147 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
148 }
149
150 // Token: 0x060050BD RID: 20669 RVA: 0x0027E1F4 File Offset: 0x0027C3F4
151 public void UpdateSize()
152 {
153 float x = this._dimensions.X;
154 int size = this._itemIdsAvailableToShow._size;
155 }
156
157 // Token: 0x04008971 RID: 35185
159
160 // Token: 0x04008972 RID: 35186
162
163 // Token: 0x04008973 RID: 35187
164 private int _itemsPerLine;
165
166 // Token: 0x04008974 RID: 35188
167 private const int sizePerEntryX = 44;
168
169 // Token: 0x04008975 RID: 35189
170 private const int sizePerEntryY = 44;
171
172 // Token: 0x04008976 RID: 35190
174
175 // Token: 0x04008977 RID: 35191
176 private Item _item;
177 }
178}
class f__AnonymousType0<< Count > j__TPar
static byte Min(byte val1, byte val2)
Definition Math.cs:152
Rectangle GetItemSlotHitbox(int startX, int startY, int startItemIndex, int i)
void GetGridParameters([Out] int startX, [Out] int startY, [Out] int startItemIndex, [Out] int endItemIndex)
static Microsoft.Xna.Framework.Vector2 MouseScreen
Definition Main.cs:4441
static Player LocalPlayer
Definition Main.cs:5267
UIElement< Parent > k__BackingField
CalculatedStyle _dimensions