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
WaterfallManager.cs
Go to the documentation of this file.
1using System;
7using Terraria.IO;
8
9namespace Terraria
10{
11 // Token: 0x0200046E RID: 1134
12 public class WaterfallManager
13 {
14 // Token: 0x06002C08 RID: 11272 RVA: 0x001B5BF4 File Offset: 0x001B3DF4
16 {
17 if (1000 == 0)
18 {
19 }
20 Preferences configuration = Main.Configuration;
21 }
22
23 // Token: 0x06002C09 RID: 11273 RVA: 0x001B5C2C File Offset: 0x001B3E2C
24 public void LoadContent()
25 {
26 if (!true)
27 {
28 }
29 string text2;
30 string text = "Images/Waterfall_" + text2;
31 }
32
33 // Token: 0x06002C0A RID: 11274 RVA: 0x001B5C54 File Offset: 0x001B3E54
34 public bool CheckForWaterfall(int i, int j)
35 {
36 /*
37An exception occurred when decompiling this method (06002C0A)
38
39ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.WaterfallManager::CheckForWaterfall(System.Int32,System.Int32)
40
41 ---> System.Exception: Basic block has to end with unconditional control flow.
42{
43 Block_0:
44 stloc:valuetype Terraria.WaterfallManager/WaterfallData[](var_0_06, ldfld:valuetype Terraria.WaterfallManager/WaterfallData[](WaterfallManager::waterfalls, ldloc:WaterfallManager(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.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
49 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
50 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
51 --- End of inner exception stack trace ---
52 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
53 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
54*/;
55 }
56
57 // Token: 0x06002C0B RID: 11275 RVA: 0x001B5C70 File Offset: 0x001B3E70
58 public void Reset()
59 {
61 }
62
63 // Token: 0x06002C0C RID: 11276 RVA: 0x001B5C88 File Offset: 0x001B3E88
64 public void FindWaterfalls(bool forced = false)
65 {
66 int num = this.findWaterfallCount;
68 if (num == 0)
69 {
70 }
71 float gfxQuality = Main.gfxQuality;
72 int num2 = 32640;
74 int num3 = 32768;
75 bool gameMenu = Main.gameMenu;
76 if (num3 == 0)
77 {
78 }
79 Vector2 screenPosition = Main.screenPosition;
80 int num4 = 15744;
81 int num5 = 32640;
83 int screenWidth = Main.screenWidth;
86 int screenHeight = Main.screenHeight;
87 if (num5 == 0)
88 {
89 }
90 if (num5 != 0)
91 {
92 return;
93 }
94 if (num4 == 0)
95 {
96 }
97 if (num5 != 0)
98 {
99 return;
100 }
101 if (num4 == 0)
102 {
103 }
104 if (num2 == 0)
105 {
106 }
107 bool flag = WorldGen.SolidTile((short)num4, 0);
108 if (!false)
109 {
110 }
111 if (!false)
112 {
113 }
114 if (num4 == 0)
115 {
116 }
117 if (num5 == 0)
118 {
119 }
120 }
121
122 // Token: 0x06002C0D RID: 11277 RVA: 0x001B5D58 File Offset: 0x001B3F58
123 public void UpdateFrame()
124 {
125 int num = this.wFallFrCounter;
127 int num2 = this.regularFrame;
129 int num3 = this.wFallFrCounter2;
131 int num4 = this.slowFrame;
133 int num5 = this.rainFrameCounter;
135 int num6 = this.rainFrameForeground;
137 int num7 = this.rainFrameBackground;
139 int num8 = this.snowFrameCounter;
141 int num9 = this.snowFrameForeground;
143 }
144
145 // Token: 0x06002C0E RID: 11278 RVA: 0x001B5DF0 File Offset: 0x001B3FF0
146 private void DrawWaterfall(SpriteBatch spriteBatch, int Style = 0, float Alpha = 1f)
147 {
148 int num = 1;
149 if (num == 0)
150 {
151 }
152 Vector2 screenPosition = Main.screenPosition;
153 if (num == 0)
154 {
155 }
156 if (!true)
157 {
158 }
159 float gfxQuality = Main.gfxQuality;
160 int screenWidth = Main.screenWidth;
161 int screenHeight = Main.screenHeight;
162 int num2 = this.currentMax;
164 if (num2 != 0 && num2 != 0)
165 {
166 bool drewLava = Main.drewLava;
168 int num3 = this.waterfallDist;
169 array2.x = screenHeight;
170 if (screenHeight != 0)
171 {
172 int num4 = this.rainFrameForeground;
173 int num5 = this.rainFrameBackground;
174 int num6 = this.snowFrameForeground;
175 return;
176 }
177 }
178 }
179
180 // Token: 0x06002C0F RID: 11279 RVA: 0x001B61CC File Offset: 0x001B43CC
181 private void DrawWaterfall(int waterfallType, int x, int y, float opacity, Vector2 position, Rectangle sourceRect, Color color, SpriteEffects effects)
182 {
183 if (!true)
184 {
185 }
186 float y2 = position.Y;
187 position.Y = y2;
188 }
189
190 // Token: 0x06002C10 RID: 11280 RVA: 0x001B61F0 File Offset: 0x001B43F0
191 private static void TrySparkling(int x, int y, int direction, Color aColor2)
192 {
193 int num = 1;
194 if (num == 0)
195 {
196 }
197 int num2 = 6;
198 if (num == 0)
199 {
200 }
201 if (num2 == 0)
202 {
203 }
204 }
205
206 // Token: 0x06002C11 RID: 11281 RVA: 0x001B6220 File Offset: 0x001B4420
207 public void Draw(SpriteBatch spriteBatch)
208 {
209 if (!true)
210 {
211 }
212 bool gameMenu = Main.gameMenu;
213 }
214
215 // Token: 0x06002C12 RID: 11282 RVA: 0x001B638C File Offset: 0x001B458C
216 // Note: this type is marked as 'beforefieldinit'.
218 {
219 }
220
221 // Token: 0x06002C13 RID: 11283 RVA: 0x001B639C File Offset: 0x001B459C
223 private void <.ctor>b__21_0(Preferences preferences)
224 {
225 int num;
227 this.waterfalls = int.MinValue;
228 }
229
230 // Token: 0x040037C1 RID: 14273
231 private const int minWet = 160;
232
233 // Token: 0x040037C2 RID: 14274
234 private const int maxWaterfallCountDefault = 1000;
235
236 // Token: 0x040037C3 RID: 14275
237 private const int maxLength = 100;
238
239 // Token: 0x040037C4 RID: 14276
240 private const int maxTypes = 26;
241
242 // Token: 0x040037C5 RID: 14277
243 public int maxWaterfallCount = 1000;
244
245 // Token: 0x040037C6 RID: 14278
246 private int qualityMax;
247
248 // Token: 0x040037C7 RID: 14279
249 private int currentMax;
250
251 // Token: 0x040037C8 RID: 14280
253
254 // Token: 0x040037C9 RID: 14281
256
257 // Token: 0x040037CA RID: 14282
258 private int wFallFrCounter;
259
260 // Token: 0x040037CB RID: 14283
261 private int regularFrame;
262
263 // Token: 0x040037CC RID: 14284
264 private int wFallFrCounter2;
265
266 // Token: 0x040037CD RID: 14285
267 private int slowFrame;
268
269 // Token: 0x040037CE RID: 14286
270 private int rainFrameCounter;
271
272 // Token: 0x040037CF RID: 14287
274
275 // Token: 0x040037D0 RID: 14288
277
278 // Token: 0x040037D1 RID: 14289
279 private int snowFrameCounter;
280
281 // Token: 0x040037D2 RID: 14290
283
284 // Token: 0x040037D3 RID: 14291
286
287 // Token: 0x040037D4 RID: 14292
288 private int waterfallDist = 100;
289
290 // Token: 0x040037D5 RID: 14293
292
293 // Token: 0x0200046F RID: 1135
294 public struct WaterfallData
295 {
296 // Token: 0x040037D6 RID: 14294
297 public int x;
298
299 // Token: 0x040037D7 RID: 14295
300 public int y;
301
302 // Token: 0x040037D8 RID: 14296
303 public int type;
304
305 // Token: 0x040037D9 RID: 14297
306 public int stopAtStep;
307 }
308 }
309}
class f__AnonymousType0<< Count > j__TPar
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 bool drewLava
Definition Main.cs:1595
static int screenWidth
Definition Main.cs:2001
static bool gameMenu
Definition Main.cs:2673
static Preferences Configuration
Definition Main.cs:2824
static void TrySparkling(int x, int y, int direction, Color aColor2)
void DrawWaterfall(SpriteBatch spriteBatch, int Style=0, float Alpha=1f)
void Draw(SpriteBatch spriteBatch)
void FindWaterfalls(bool forced=false)
WaterfallManager.WaterfallData[] waterfalls
static Asset< Texture2D >[] waterfallTexture
void<.ctor > b__21_0(Preferences preferences)
bool CheckForWaterfall(int i, int j)
void DrawWaterfall(int waterfallType, int x, int y, float opacity, Vector2 position, Rectangle sourceRect, Color color, SpriteEffects effects)
static bool SolidTile(short tileSHeader, ushort tileType)