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
WallDrawing.cs
Go to the documentation of this file.
1using System;
10
12{
13 // Token: 0x020009EB RID: 2539
14 public class WallDrawing
15 {
16 // Token: 0x06004B44 RID: 19268 RVA: 0x0026E5CC File Offset: 0x0026C7CC
18 {
19 if (!true)
20 {
21 }
22 if (!true)
23 {
24 }
26 if (!true)
27 {
28 }
29 if (!true)
30 {
31 }
32 base..ctor();
34 }
35
36 // Token: 0x06004B45 RID: 19269 RVA: 0x0026E608 File Offset: 0x0026C808
37 public void Update()
38 {
39 if (!true)
40 {
41 }
42 if (!true)
43 {
44 if (!true)
45 {
46 }
47 bool flag = Main.ShouldShowInvisibleWalls();
49 }
50 }
51
52 // Token: 0x06004B46 RID: 19270 RVA: 0x000021DB File Offset: 0x000003DB
53 [Il2CppSetOption(Option.NullChecks, false)]
54 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
55 public void DrawWalls(Vector2 screenPosition, Vector2 offSet, int firstTileX, int firstTileY, int lastTileX, int lastTileY)
56 {
57 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
58 }
59
60 // Token: 0x06004B47 RID: 19271 RVA: 0x0026E630 File Offset: 0x0026C830
61 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
62 [Il2CppSetOption(Option.NullChecks, false)]
63 public void DrawWalls()
64 {
65 if (!true)
66 {
67 }
68 int screenWidth = Main.screenWidth;
69 int screenHeight = Main.screenHeight;
70 float gfxQuality = Main.gfxQuality;
71 Vector2 screenPosition = Main.screenPosition;
72 if (!true)
73 {
74 }
75 }
76
77 // Token: 0x06004B48 RID: 19272 RVA: 0x0026E6D8 File Offset: 0x0026C8D8
78 private int DrawWallsThreaded(Vector2 screenPosition, Vector2 offSet, int firstTileX, int firstTileY, int lastTileX, int lastTileY)
79 {
80 int num = 1;
81 if (num == 0)
82 {
83 }
85 if (num == 0)
86 {
87 }
88 int num2 = 4;
89 TileBatch tileBatch = this._threadManager.DrawThreads.tileBatch;
90 Matrix transform = Main.Transform;
91 SpriteBatch spriteBatch = this._threadManager.DrawThreads.spriteBatch;
93 SpriteBatch spriteBatch2 = this._threadManager.DrawThreads.spriteBatch2;
95 if (!true)
96 {
97 }
98 if (this._threadManager.DrawThreads == null)
99 {
100 }
101 return num2;
102 }
103
104 // Token: 0x06004B49 RID: 19273 RVA: 0x0026E760 File Offset: 0x0026C960
105 private void ProcessBatchFinished(int index)
106 {
107 TileDrawing tileDrawing = this._threadManager.DrawThreads.tileDrawing;
108 double sunflowerWindCounter = tileDrawing._sunflowerWindCounter;
109 double sunflowerWindCounter2 = tileDrawing._sunflowerWindCounter;
110 double treeWindCounter = tileDrawing._treeWindCounter;
111 double treeWindCounter2 = tileDrawing._treeWindCounter;
112 double grassWindCounter = tileDrawing._grassWindCounter;
113 double grassWindCounter2 = tileDrawing._grassWindCounter;
114 }
115
116 // Token: 0x1700086B RID: 2155
117 // (get) Token: 0x06004B4A RID: 19274 RVA: 0x0026E7AC File Offset: 0x0026C9AC
119 {
120 get
121 {
122 /*
123An exception occurred when decompiling this method (06004B4A)
124
125ICSharpCode.Decompiler.DecompilerException: Error decompiling ThreadedRenderManager/BatchProcessCallback Terraria.GameContent.Drawing.WallDrawing::get_ProcessBatchFinishedCallback()
126
127 ---> System.Exception: Basic block has to end with unconditional control flow.
128{
129 IL_0000:
130 brtrue(IL_0000, ldfld:BatchProcessCallback[exp:bool](WallDrawing::_processBatchFinishedCallback, ldloc:WallDrawing(this)))
131}
132
133 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
134 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
135 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
136 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
137 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
138 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
139 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
140 --- End of inner exception stack trace ---
141 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
142 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
143*/;
144 }
145 }
146
147 // Token: 0x06004B4B RID: 19275 RVA: 0x0026E7C0 File Offset: 0x0026C9C0
159
160 // Token: 0x06004B4C RID: 19276 RVA: 0x0026E7F8 File Offset: 0x0026C9F8
161 private void GetWallDrawTexture(ushort wallType, byte wallColor, [Out] Texture2D drawTexture, [Out] EffectPass pass)
162 {
163 if (!true)
164 {
165 }
166 Effect effect = this.WallEffects._effect;
167 }
168
169 // Token: 0x06004B4D RID: 19277 RVA: 0x0026E814 File Offset: 0x0026CA14
170 protected bool FullTile(Tile tileCache, int x, int y)
171 {
173 if (!shouldShowInvisibleWalls)
174 {
175 return;
176 }
178 {
179 }
180 Tile tile;
181 bool isLoaded = tile.IsLoaded;
182 int num;
183 int num2;
184 if (num != 0 || num2 != 0)
185 {
186 return;
187 }
188 }
189
190 // Token: 0x04008591 RID: 34193
192
193 // Token: 0x04008592 RID: 34194
195
196 // Token: 0x04008593 RID: 34195
198
199 // Token: 0x04008594 RID: 34196
201
202 // Token: 0x04008595 RID: 34197
204
205 // Token: 0x04008596 RID: 34198
207
208 // Token: 0x04008597 RID: 34199
210
211 // Token: 0x04008598 RID: 34200
213
214 // Token: 0x04008599 RID: 34201
216
217 // Token: 0x0400859A RID: 34202
219
220 // Token: 0x0400859B RID: 34203
222
223 // Token: 0x0400859C RID: 34204
224 private int drawThreadTest;
225
226 // Token: 0x0400859D RID: 34205
228
229 // Token: 0x020009EC RID: 2540
230 public class WallDrawInfo
231 {
232 // Token: 0x06004B4E RID: 19278 RVA: 0x0026E84C File Offset: 0x0026CA4C
234 {
235 }
236
237 // Token: 0x0400859E RID: 34206
239
240 // Token: 0x0400859F RID: 34207
242
243 // Token: 0x040085A0 RID: 34208
245 }
246
247 // Token: 0x020009ED RID: 2541
249 [Serializable]
250 private sealed class <>c
251 {
252 // Token: 0x06004B4F RID: 19279 RVA: 0x0026E860 File Offset: 0x0026CA60
253 // Note: this type is marked as 'beforefieldinit'.
254 static <>c()
255 {
256 }
257
258 // Token: 0x06004B50 RID: 19280 RVA: 0x0026E870 File Offset: 0x0026CA70
259 public <>c()
260 {
261 }
262
263 // Token: 0x06004B51 RID: 19281 RVA: 0x000021DB File Offset: 0x000003DB
264 internal WallDrawing.WallDrawInfo <.ctor>b__0_0()
265 {
266 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
267 }
268
269 // Token: 0x040085A1 RID: 34209
270 public static readonly WallDrawing.<>c <>9;
271
272 // Token: 0x040085A2 RID: 34210
273 public static Func<WallDrawing.WallDrawInfo> <>9__0_0;
274 }
275 }
276}
class f__AnonymousType0<< Count > j__TPar
void DrawWalls(Vector2 screenPosition, Vector2 offSet, int firstTileX, int firstTileY, int lastTileX, int lastTileY)
ThreadedRenderManager.BatchProcessCallback _processBatchFinishedCallback
WallDrawing(TilePaintSystemV2 paintSystem)
bool FullTile(Tile tileCache, int x, int y)
ThreadedRenderManager.BatchProcessCallback ProcessBatchFinishedCallback
void GetWallDrawTexture(ushort wallType, byte wallColor, [Out] Texture2D drawTexture, [Out] EffectPass pass)
ThreadLocal< WallDrawing.WallDrawInfo > _currentWallDrawInfo
int DrawWallsThreaded(Vector2 screenPosition, Vector2 offSet, int firstTileX, int firstTileY, int lastTileX, int lastTileY)
static bool ShouldShowInvisibleWalls()
Definition Main.cs:15228
static void FlushBatches()
Definition Main.cs:5092
static float gfxQuality
Definition Main.cs:1539
static Microsoft.Xna.Framework.Vector2 screenPosition
Definition Main.cs:1973
static int screenHeight
Definition Main.cs:2015
static Matrix Transform
Definition Main.cs:4428
static int screenWidth
Definition Main.cs:2001
void WaitAndProcessInOrder(ThreadedRenderManager.BatchProcessCallback callback, int numberOfThreads)
ThreadedRenderManager.RenderThreadInstance[] DrawThreads
bool IsLoaded
Definition Tile.cs:34