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
TileLightScanner.cs
Go to the documentation of this file.
1using System;
7
9{
10 // Token: 0x0200077C RID: 1916
11 public class TileLightScanner
12 {
13 // Token: 0x06003ECC RID: 16076 RVA: 0x0023E7FC File Offset: 0x0023C9FC
15 {
18 if (!true)
19 {
20 }
22 base..ctor();
23 }
24
25 // Token: 0x06003ECD RID: 16077 RVA: 0x0023E828 File Offset: 0x0023CA28
26 private void ExportBatchFinished(int index)
27 {
28 }
29
30 // Token: 0x170007A2 RID: 1954
31 // (get) Token: 0x06003ECE RID: 16078 RVA: 0x0023E838 File Offset: 0x0023CA38
33 {
34 get
35 {
36 /*
37An exception occurred when decompiling this method (06003ECE)
38
39ICSharpCode.Decompiler.DecompilerException: Error decompiling ThreadedRenderManager/BatchProcessCallback Terraria.Graphics.Light.TileLightScanner::get_ExportBatchFinishedCallback()
40
41 ---> System.Exception: Basic block has to end with unconditional control flow.
42{
43 IL_0000:
44 brtrue(IL_0000, ldfld:BatchProcessCallback[exp:bool](TileLightScanner::_processBatchFinishedCallback, ldloc:TileLightScanner(this)))
45}
46
47 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
48 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
49 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
50 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
51 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
52 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
53 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
54 --- End of inner exception stack trace ---
55 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
56 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
57*/;
58 }
59 }
60
61 // Token: 0x06003ECF RID: 16079 RVA: 0x0023E84C File Offset: 0x0023CA4C
72
73 // Token: 0x06003ED0 RID: 16080 RVA: 0x0023E8AC File Offset: 0x0023CAAC
75 {
76 if (!true)
77 {
78 }
79 if (true)
80 {
81 this.ExportToThreaded(area, outputMap);
82 return;
83 }
84 }
85
86 // Token: 0x06003ED1 RID: 16081 RVA: 0x0023E8C8 File Offset: 0x0023CAC8
87 [Il2CppSetOption(Option.NullChecks, false)]
88 [Il2CppSetOption(Option.ArrayBoundsChecks, false)]
89 public void ExportTo(int startX, int startY, int endX, int endY, int lightStartX, int lightStartY, LightMap outputMap)
90 {
91 if (!true)
92 {
93 }
94 bool flag = Main.ShouldShowInvisibleWalls();
95 int <Height>k__BackingField = outputMap.<Height>k__BackingField;
97 }
98
99 // Token: 0x06003ED2 RID: 16082 RVA: 0x0023EDEC File Offset: 0x0023CFEC
100 private bool IsTileNullOrTouchingNull(int x, int y)
101 {
102 int num = 1;
103 if (num == 0)
104 {
105 }
106 int num2 = 1;
107 bool flag = WorldGen.InWorld(x, y, num2);
108 if (num == 0)
109 {
110 return;
111 }
112 }
113
114 // Token: 0x06003ED3 RID: 16083 RVA: 0x0023EE10 File Offset: 0x0023D010
115 public void Update()
116 {
117 }
118
119 // Token: 0x06003ED4 RID: 16084 RVA: 0x0023EE20 File Offset: 0x0023D020
120 public LightMaskMode GetMaskMode(int x, int y)
121 {
122 if (!true)
123 {
124 }
126 return lightMaskMode;
127 }
128
129 // Token: 0x06003ED5 RID: 16085 RVA: 0x0023EE34 File Offset: 0x0023D034
131 {
132 /*
133An exception occurred when decompiling this method (06003ED5)
134
135ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.Graphics.Light.LightMaskMode Terraria.Graphics.Light.TileLightScanner::GetTileMask(Terraria.Tile)
136
137 ---> System.Exception: Basic block has to end with unconditional control flow.
138{
139 Block_0:
140 stloc:bool(var_0_07, call:bool(TileLightScanner::LightIsBlocked, ldloc:TileLightScanner(this), ldloc:Tile(tile)))
141}
142
143 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
144 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
145 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
146 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
147 --- End of inner exception stack trace ---
148 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
149 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
150*/;
151 }
152
153 // Token: 0x06003ED6 RID: 16086 RVA: 0x0023EE4C File Offset: 0x0023D04C
154 public void GetTileLight(int x, int y, [Out] Vector3 outputColor)
155 {
156 if (!true)
157 {
158 }
159 int num = 1;
160 if (num == 0)
161 {
162 }
163 outputColor.Z = (float)num;
164 if (num == 0)
165 {
166 }
167 if (32752 == 0)
168 {
169 }
171 Tile tile;
172 this.ApplyHellLight(tile, x, y, outputColor);
173 }
174
175 // Token: 0x06003ED7 RID: 16087 RVA: 0x0023EE90 File Offset: 0x0023D090
176 private void ApplyLiquidLight(Tile tile, Vector3 lightColor)
177 {
178 if (!true)
179 {
180 }
181 float y = lightColor.Y;
182 float z = lightColor.Z;
183 }
184
185 // Token: 0x06003ED8 RID: 16088 RVA: 0x0023EEC0 File Offset: 0x0023D0C0
186 private bool LightIsBlocked(Tile tile)
187 {
188 int num = 1;
189 if (num == 0)
190 {
191 }
192 if (num != 0)
193 {
195 bool flag;
196 return flag;
197 }
198 }
199
200 // Token: 0x06003ED9 RID: 16089 RVA: 0x0023EEE4 File Offset: 0x0023D0E4
201 private void ApplyWallLight(Tile tile, int x, int y, FastRandom localRandom, Vector3 lightColor)
202 {
203 if (!true)
204 {
205 }
206 }
207
208 // Token: 0x06003EDA RID: 16090 RVA: 0x0023EF38 File Offset: 0x0023D138
209 private void ApplyTileLight(Tile tile, int x, int y, FastRandom localRandom, Vector3 lightColor)
210 {
211 int num = 1;
212 if (num == 0)
213 {
214 }
215 if (num != 0)
216 {
217 return;
218 }
219 if (426 == 0)
220 {
221 float y2 = lightColor.Y;
222 float z = lightColor.Z;
223 }
224 }
225
226 // Token: 0x06003EDB RID: 16091 RVA: 0x0023F484 File Offset: 0x0023D684
227 private void ApplySurfaceLight(Tile tile, int x, int y, Vector3 lightColor)
228 {
229 int num = 1;
230 if (num == 0)
231 {
232 }
233 int num2 = 17279;
234 if (num == 0)
235 {
236 }
238 if (num != 0)
239 {
240 if (num == 0)
241 {
242 }
243 if (num == 0)
244 {
246 if (!drawInvisibleWalls)
247 {
248 return;
249 }
250 }
251 return;
252 }
254 {
255 }
257 {
259 {
260 }
261 Tile tile2;
262 byte liquid = tile2.liquid;
264 {
265 }
266 Tile tile3;
267 byte liquid2 = tile3.liquid;
269 {
270 }
271 Tile tile4;
272 byte liquid3 = tile4.liquid;
274 {
275 }
276 Tile tile5;
277 byte liquid4 = tile5.liquid;
278 }
280 {
281 }
283 {
284 }
286 {
287 }
288 float[] liquidAlpha = Main.liquidAlpha;
290 {
291 }
292 if (num2 == 0)
293 {
294 }
295 float[] liquidAlpha2 = Main.liquidAlpha;
296 }
297
298 // Token: 0x06003EDC RID: 16092 RVA: 0x0023F550 File Offset: 0x0023D750
299 private void ApplyHellLight(Tile tile, int x, int y, Vector3 lightColor)
300 {
301 if (!true)
302 {
303 }
304 Tile tile2;
305 byte liquid = tile2.liquid;
306 }
307
308 // Token: 0x04007D6B RID: 32107
310
311 // Token: 0x04007D6C RID: 32108
313
314 // Token: 0x04007D6D RID: 32109
316
317 // Token: 0x04007D6E RID: 32110
319 }
320}
class f__AnonymousType0<< Count > j__TPar
void ExportTo(int startX, int startY, int endX, int endY, int lightStartX, int lightStartY, LightMap outputMap)
void GetTileLight(int x, int y, [Out] Vector3 outputColor)
void ApplyWallLight(Tile tile, int x, int y, FastRandom localRandom, Vector3 lightColor)
ThreadedRenderManager.BatchProcessCallback _processBatchFinishedCallback
void ApplySurfaceLight(Tile tile, int x, int y, Vector3 lightColor)
LightMaskMode GetMaskMode(int x, int y)
ThreadedRenderManager.BatchProcessCallback ExportBatchFinishedCallback
void ApplyTileLight(Tile tile, int x, int y, FastRandom localRandom, Vector3 lightColor)
void ApplyHellLight(Tile tile, int x, int y, Vector3 lightColor)
void ExportTo(Rectangle area, LightMap outputMap)
void ExportToThreaded(Rectangle area, LightMap outputMap)
void ApplyLiquidLight(Tile tile, Vector3 lightColor)
static bool ShouldShowInvisibleWalls()
Definition Main.cs:15228
static float[] liquidAlpha
Definition Main.cs:1637
static int UnderworldLayer
Definition Main.cs:5133
static bool InWorld(int x, int y, int fluff=0)
Definition WorldGen.cs:1952
ThreadedRenderManager.RenderThreadInstance[] DrawThreads
void WaitAndProcess(ThreadedRenderManager.BatchProcessCallback callback, int numberOfThreads)
byte liquid
Definition Tile.cs:110
static FastRandom CreateWithRandomSeed()
Definition FastRandom.cs:51