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
LiquidRenderer.cs
Go to the documentation of this file.
1using System;
10
12{
13 // Token: 0x020009FF RID: 2559
14 public class LiquidRenderer
15 {
16 // Token: 0x1400005B RID: 91
17 // (add) Token: 0x06004B91 RID: 19345 RVA: 0x0026F04C File Offset: 0x0026D24C
18 // (remove) Token: 0x06004B92 RID: 19346 RVA: 0x0026F074 File Offset: 0x0026D274
20 {
22 add
23 {
25 if (@delegate != null && @delegate == null)
26 {
27 return;
28 }
29 }
31 remove
32 {
34 if (@delegate != null && @delegate == null)
35 {
36 return;
37 }
38 }
39 }
40
41 // Token: 0x1700086C RID: 2156
42 // (get) Token: 0x06004B93 RID: 19347 RVA: 0x0026F09C File Offset: 0x0026D29C
43 private static TileData Tiles
44 {
45 get
46 {
47 /*
48An exception occurred when decompiling this method (06004B93)
49
50ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.TileData Terraria.GameContent.Liquid.LiquidRenderer::get_Tiles()
51
52 ---> System.Exception: Basic block has to end with unconditional control flow.
53{
54 IL_0000:
55 brtrue(IL_0000, ldc.i4:bool(1))
56}
57
58 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
59 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
60 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
61 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
62 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
63 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
64 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
65 --- End of inner exception stack trace ---
66 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
67 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
68*/;
69 }
70 }
71
72 // Token: 0x06004B94 RID: 19348 RVA: 0x0026F0AC File Offset: 0x0026D2AC
73 public static void LoadContent()
74 {
75 if (!true)
76 {
77 }
78 }
79
80 // Token: 0x06004B95 RID: 19349 RVA: 0x0026F0BC File Offset: 0x0026D2BC
82 {
83 }
84
85 // Token: 0x06004B96 RID: 19350 RVA: 0x0026F0D4 File Offset: 0x0026D2D4
86 public void PrepareAssets()
87 {
88 int num = 1;
89 if (num == 0)
90 {
91 }
92 if (num == 0)
93 {
94 if (num == 0)
95 {
96 }
97 if (num == 0)
98 {
99 }
100 if (num == 0)
101 {
102 }
103 string text2;
104 string text = "Images/Misc/water_" + text2;
105 return;
106 }
107 }
108
109 // Token: 0x06004B97 RID: 19351 RVA: 0x0026F110 File Offset: 0x0026D310
111 {
112 int y = this._cache.FrameOffset.Y;
113 bool isVisible = this._drawCache.IsVisible;
114 Vector2 liquidOffset = this._drawCacheForShimmer.LiquidOffset;
115 Color[] waveMask = this._waveMask;
116 LiquidRenderer.LiquidCache[] cache = this._cache;
117 }
118
119 // Token: 0x06004B98 RID: 19352 RVA: 0x0026F2F4 File Offset: 0x0026D4F4
120 public void DrawNormalLiquids(SpriteBatch spriteBatch, Vector2 drawOffset, int waterStyle, float globalAlpha, bool isBackgroundDraw)
121 {
122 if (!true)
123 {
124 }
126 int <Height>k__BackingField = lightMap.<Height>k__BackingField;
127 if (true)
128 {
129 return;
130 }
131 if (!true)
132 {
133 }
134 Vector3[] colors = lightMap._colors;
135 if (colors != null)
136 {
137 return;
138 }
139 if (colors == null)
140 {
141 }
142 if (!true)
143 {
144 }
145 if (<Height>k__BackingField == 0)
146 {
147 }
148 if (!true)
149 {
150 }
151 int num = 17279;
152 if (num == 0)
153 {
154 return;
155 }
156 if (num != 0)
157 {
158 return;
159 }
160 }
161
162 // Token: 0x06004B99 RID: 19353 RVA: 0x0026F3B8 File Offset: 0x0026D5B8
163 public void DrawShimmer(SpriteBatch spriteBatch, Vector2 drawOffset, bool isBackgroundDraw)
164 {
165 do
166 {
167 spriteBatch.End();
168 spriteBatch.Flush();
169 int num = 1;
170 if (num == 0)
171 {
172 }
173 if (num == 0)
174 {
175 }
176 }
177 while (true);
178 if (!true)
179 {
180 }
183 if (drawCacheForShimmer != null)
184 {
185 int num2;
186 if (drawCacheForShimmer != null)
187 {
188 num2 = 1280;
189 return;
190 }
192 if (num2 == 0)
193 {
194 }
195 if (num2 == 0)
196 {
197 }
198 if (80 == 0)
199 {
200 }
201 }
202 spriteBatch.End();
203 spriteBatch.Flush();
204 }
205
206 // Token: 0x06004B9A RID: 19354 RVA: 0x0026F42C File Offset: 0x0026D62C
207 public static void SetShimmerVertexColors_Sparkle(VertexColors colors, float opacity, int x, int y, bool top)
208 {
209 if (!true)
210 {
211 }
212 }
213
214 // Token: 0x06004B9B RID: 19355 RVA: 0x0026F43C File Offset: 0x0026D63C
215 public static void SetShimmerVertexColors(VertexColors colors, float opacity, int x, int y)
216 {
217 if (!true)
218 {
219 }
220 }
221
222 // Token: 0x06004B9C RID: 19356 RVA: 0x0026F44C File Offset: 0x0026D64C
223 public static float GetShimmerWave(float worldPositionX, float worldPositionY)
224 {
225 /*
226An exception occurred when decompiling this method (06004B9C)
227
228ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.Liquid.LiquidRenderer::GetShimmerWave(System.Single,System.Single)
229
230 ---> System.Exception: Basic block has to end with unconditional control flow.
231{
232 IL_0000:
233 brtrue(IL_0000, ldc.i4:bool(1))
234}
235
236 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
237 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
238 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
239 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
240 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
241 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
242 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
243 --- End of inner exception stack trace ---
244 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
245 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
246*/;
247 }
248
249 // Token: 0x06004B9D RID: 19357 RVA: 0x0026F45C File Offset: 0x0026D65C
250 public static Color GetShimmerGlitterColor(bool top, float worldPositionX, float worldPositionY)
251 {
252 if (!true)
253 {
254 }
255 Color color;
256 Vector4 vector = color.ToVector4();
257 if (!true)
258 {
259 }
261 if (!true)
262 {
263 }
264 return 1;
265 }
266
267 // Token: 0x06004B9E RID: 19358 RVA: 0x0026F488 File Offset: 0x0026D688
268 public static void GetShimmerGlitterColor(bool top, float worldPositionX, float worldPositionY, Color color, float opacity)
269 {
270 if (!true)
271 {
272 }
273 double num = Main.hue2rgb((double)worldPositionX, 0.3333333333333333, -0.3333333333333333);
274 double num2 = Main.hue2rgb(num, 0.3333333333333333, -0.3333333333333333);
275 double num3 = Main.hue2rgb(num2, 0.3333333333333333, -0.3333333333333333);
276 }
277
278 // Token: 0x06004B9F RID: 19359 RVA: 0x0026F500 File Offset: 0x0026D700
279 public static float GetShimmerGlitterOpacity(bool top, float worldPositionX, float worldPositionY)
280 {
281 /*
282An exception occurred when decompiling this method (06004B9F)
283
284ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.Liquid.LiquidRenderer::GetShimmerGlitterOpacity(System.Boolean,System.Single,System.Single)
285
286 ---> System.Exception: Basic block has to end with unconditional control flow.
287{
288 IL_0000:
289 brtrue(IL_0000, ldc.i4:bool(1))
290}
291
292 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
293 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
294 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
295 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
296 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
297 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
298 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
299 --- End of inner exception stack trace ---
300 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
301 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
302*/;
303 }
304
305 // Token: 0x06004BA0 RID: 19360 RVA: 0x000021DB File Offset: 0x000003DB
306 private static uint SimpleWhiteNoise(uint x, uint y)
307 {
308 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
309 }
310
311 // Token: 0x06004BA1 RID: 19361 RVA: 0x0026F510 File Offset: 0x0026D710
312 public int GetShimmerFrame(bool top, float worldPositionX, float worldPositionY)
313 {
314 /*
315An exception occurred when decompiling this method (06004BA1)
316
317ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.GameContent.Liquid.LiquidRenderer::GetShimmerFrame(System.Boolean,System.Single,System.Single)
318
319 ---> System.Exception: Basic block has to end with unconditional control flow.
320{
321 IL_0000:
322 brtrue(IL_0000, ldc.i4:bool(1))
323}
324
325 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
326 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
327 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
328 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
329 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
330 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
331 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
332 --- End of inner exception stack trace ---
333 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
334 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
335*/;
336 }
337
338 // Token: 0x06004BA2 RID: 19362 RVA: 0x0026F520 File Offset: 0x0026D720
340 {
341 /*
342An exception occurred when decompiling this method (06004BA2)
343
344ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Vector4 Terraria.GameContent.Liquid.LiquidRenderer::GetShimmerBaseColor(System.Single,System.Single)
345
346 ---> System.Exception: Basic block has to end with unconditional control flow.
347{
348 Block_0:
349 stloc:float32(var_0_07, call:float32(LiquidRenderer::GetShimmerWave, ldloc:float32(worldPositionX), ldloc:float32(worldPositionY)))
350}
351
352 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
353 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
354 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
355 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
356 --- End of inner exception stack trace ---
357 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
358 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
359*/;
360 }
361
362 // Token: 0x06004BA3 RID: 19363 RVA: 0x0026F538 File Offset: 0x0026D738
363 public static void GetShimmerColor(float worldPositionX, float worldPositionY, Color baseColor, float opcacity)
364 {
365 if (!true)
366 {
367 }
369 baseColor.R = (byte)17279;
370 baseColor.G = (byte)17279;
371 baseColor.B = (byte)17279;
372 baseColor.A = (byte)17279;
373 }
374
375 // Token: 0x06004BA4 RID: 19364 RVA: 0x0026F57C File Offset: 0x0026D77C
376 public bool HasFullWater(int x, int y)
377 {
379 int width = this._drawArea.Width;
380 int height = this._drawArea.Height;
381 bool isVisible = this._drawCache.IsVisible;
382 if (36 != 0)
383 {
384 return;
385 }
386 }
387
388 // Token: 0x06004BA5 RID: 19365 RVA: 0x0026F5BC File Offset: 0x0026D7BC
389 public float GetVisibleLiquid(int x, int y)
390 {
391 /*
392An exception occurred when decompiling this method (06004BA5)
393
394ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.Liquid.LiquidRenderer::GetVisibleLiquid(System.Int32,System.Int32)
395
396 ---> System.Exception: Basic block has to end with unconditional control flow.
397{
398 Block_0:
399 stloc:float32(var_5_3E, ldfld:float32(LiquidCache::RightWall, ldloc:valuetype Terraria.GameContent.Liquid.LiquidRenderer/LiquidCache[][exp:valuetype Terraria.GameContent.Liquid.LiquidRenderer/LiquidCache&](var_4_31)))
400}
401
402 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
403 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
404 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
405 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
406 --- End of inner exception stack trace ---
407 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
408 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
409*/;
410 }
411
412 // Token: 0x06004BA6 RID: 19366 RVA: 0x0026F608 File Offset: 0x0026D808
414 {
415 if (!true)
416 {
417 }
418 TimeSpan elapsedGameTime = gameTime.elapsedGameTime;
419 float frameState = this._frameState;
420 this._animationFrame = 32768;
421 }
422
423 // Token: 0x06004BA7 RID: 19367 RVA: 0x0026F634 File Offset: 0x0026D834
425 {
426 this.InternalPrepareDraw(drawArea);
427 }
428
429 // Token: 0x06004BA8 RID: 19368 RVA: 0x0026F648 File Offset: 0x0026D848
430 public void SetWaveMaskData(Texture2D texture)
431 {
432 int height = this._drawArea.Height;
433 int width = this._drawArea.Width;
434 }
435
436 // Token: 0x06004BA9 RID: 19369 RVA: 0x000021DB File Offset: 0x000003DB
438 {
439 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
440 }
441
442 // Token: 0x06004BAA RID: 19370 RVA: 0x0026F6CC File Offset: 0x0026D8CC
443 // Note: this type is marked as 'beforefieldinit'.
445 {
446 }
447
448 // Token: 0x040085BF RID: 34239
450
451 // Token: 0x040085C0 RID: 34240
452 private const int ANIMATION_FRAME_COUNT = 16;
453
454 // Token: 0x040085C1 RID: 34241
455 private const int CACHE_PADDING = 2;
456
457 // Token: 0x040085C2 RID: 34242
458 private const int CACHE_PADDING_2 = 4;
459
460 // Token: 0x040085C3 RID: 34243
461 private static readonly int[] WATERFALL_LENGTH;
462
463 // Token: 0x040085C4 RID: 34244
464 private static readonly float[] DEFAULT_OPACITY;
465
466 // Token: 0x040085C5 RID: 34245
467 private static readonly byte[] WAVE_MASK_STRENGTH;
468
469 // Token: 0x040085C6 RID: 34246
470 private static readonly byte[] VISCOSITY_MASK;
471
472 // Token: 0x040085C7 RID: 34247
475
476 // Token: 0x040085C8 RID: 34248
477 public const float MIN_LIQUID_SIZE = 0.25f;
478
479 // Token: 0x040085C9 RID: 34249
481
482 // Token: 0x040085CA RID: 34250
484
485 // Token: 0x040085CB RID: 34251
487
488 // Token: 0x040085CC RID: 34252
490
491 // Token: 0x040085CD RID: 34253
492 private int _animationFrame;
493
494 // Token: 0x040085CE RID: 34254
496
497 // Token: 0x040085CF RID: 34255
499
500 // Token: 0x040085D0 RID: 34256
501 private Color[] _waveMask;
502
503 // Token: 0x040085D1 RID: 34257
504 private float _frameState;
505
506 // Token: 0x02000A00 RID: 2560
507 private struct LiquidCache
508 {
509 // Token: 0x040085D2 RID: 34258
510 public float LiquidLevel;
511
512 // Token: 0x040085D3 RID: 34259
513 public float VisibleLiquidLevel;
514
515 // Token: 0x040085D4 RID: 34260
516 public float Opacity;
517
518 // Token: 0x040085D5 RID: 34261
519 public bool IsSolid;
520
521 // Token: 0x040085D6 RID: 34262
522 public bool IsHalfBrick;
523
524 // Token: 0x040085D7 RID: 34263
525 public bool HasLiquid;
526
527 // Token: 0x040085D8 RID: 34264
528 public bool HasVisibleLiquid;
529
530 // Token: 0x040085D9 RID: 34265
531 public bool HasWall;
532
533 // Token: 0x040085DA RID: 34266
535
536 // Token: 0x040085DB RID: 34267
537 public bool HasLeftEdge;
538
539 // Token: 0x040085DC RID: 34268
540 public bool HasRightEdge;
541
542 // Token: 0x040085DD RID: 34269
543 public bool HasTopEdge;
544
545 // Token: 0x040085DE RID: 34270
546 public bool HasBottomEdge;
547
548 // Token: 0x040085DF RID: 34271
549 public float LeftWall;
550
551 // Token: 0x040085E0 RID: 34272
552 public float RightWall;
553
554 // Token: 0x040085E1 RID: 34273
555 public float BottomWall;
556
557 // Token: 0x040085E2 RID: 34274
558 public float TopWall;
559
560 // Token: 0x040085E3 RID: 34275
561 public float VisibleLeftWall;
562
563 // Token: 0x040085E4 RID: 34276
564 public float VisibleRightWall;
565
566 // Token: 0x040085E5 RID: 34277
567 public float VisibleBottomWall;
568
569 // Token: 0x040085E6 RID: 34278
570 public float VisibleTopWall;
571
572 // Token: 0x040085E7 RID: 34279
573 public byte Type;
574
575 // Token: 0x040085E8 RID: 34280
576 public byte VisibleType;
577 }
578
579 // Token: 0x02000A01 RID: 2561
580 private struct LiquidDrawCache
581 {
582 // Token: 0x040085E9 RID: 34281
584
585 // Token: 0x040085EA RID: 34282
587
588 // Token: 0x040085EB RID: 34283
589 public bool IsVisible;
590
591 // Token: 0x040085EC RID: 34284
592 public float Opacity;
593
594 // Token: 0x040085ED RID: 34285
595 public byte Type;
596
597 // Token: 0x040085EE RID: 34286
598 public bool IsSurfaceLiquid;
599
600 // Token: 0x040085EF RID: 34287
601 public bool HasWall;
602 }
603
604 // Token: 0x02000A02 RID: 2562
606 {
607 // Token: 0x040085F0 RID: 34288
608 public int X;
609
610 // Token: 0x040085F1 RID: 34289
611 public int Y;
612
613 // Token: 0x040085F2 RID: 34290
615
616 // Token: 0x040085F3 RID: 34291
618
619 // Token: 0x040085F4 RID: 34292
620 public bool IsVisible;
621
622 // Token: 0x040085F5 RID: 34293
623 public float Opacity;
624
625 // Token: 0x040085F6 RID: 34294
626 public byte Type;
627
628 // Token: 0x040085F7 RID: 34295
629 public bool IsSurfaceLiquid;
630
631 // Token: 0x040085F8 RID: 34296
632 public bool HasWall;
633 }
634 }
635}
class f__AnonymousType0<< Count > j__TPar
static Delegate Combine(Delegate a, Delegate b)
Definition Delegate.cs:255
static Delegate Remove(Delegate source, Delegate value)
Definition Delegate.cs:278
static void SetShimmerVertexColors(VertexColors colors, float opacity, int x, int y)
int GetShimmerFrame(bool top, float worldPositionX, float worldPositionY)
static void GetShimmerGlitterColor(bool top, float worldPositionX, float worldPositionY, Color color, float opacity)
static float GetShimmerGlitterOpacity(bool top, float worldPositionX, float worldPositionY)
void DrawShimmer(SpriteBatch spriteBatch, Vector2 drawOffset, bool isBackgroundDraw)
static Vector4 GetShimmerBaseColor(float worldPositionX, float worldPositionY)
LiquidRenderer.LiquidDrawCache[] _drawCache
void DrawNormalLiquids(SpriteBatch spriteBatch, Vector2 drawOffset, int waterStyle, float globalAlpha, bool isBackgroundDraw)
LiquidRenderer.SpecialLiquidDrawCache[] _drawCacheForShimmer
Action< Color[], Rectangle > WaveFilters
static float GetShimmerWave(float worldPositionX, float worldPositionY)
static void SetShimmerVertexColors_Sparkle(VertexColors colors, float opacity, int x, int y, bool top)
static Color GetShimmerGlitterColor(bool top, float worldPositionX, float worldPositionY)
static void GetShimmerColor(float worldPositionX, float worldPositionY, Color baseColor, float opcacity)
static readonly Asset< Texture2D >[] _liquidTextures
static uint SimpleWhiteNoise(uint x, uint y)
static double hue2rgb(double c, double t1, double t2)
Definition Main.cs:13826