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
MarbleBiome.cs
Go to the documentation of this file.
1using System;
6
8{
9 // Token: 0x020008F4 RID: 2292
10 public class MarbleBiome : MicroBiome
11 {
12 // Token: 0x0600462F RID: 17967 RVA: 0x0025805C File Offset: 0x0025625C
13 private void SmoothSlope(int x, int y)
14 {
15 MarbleBiome.Slab[,] slabs = this._slabs;
16 MarbleBiome.Slab[,] slabs2 = this._slabs;
17 MarbleBiome.Slab[,] slabs3 = this._slabs;
18 MarbleBiome.Slab[,] slabs4 = this._slabs;
19 MarbleBiome.Slab[,] slabs5 = this._slabs;
20 }
21
22 // Token: 0x06004630 RID: 17968 RVA: 0x002580A4 File Offset: 0x002562A4
23 private void PlaceSlab(MarbleBiome.Slab slab, int originX, int originY, int scale)
24 {
25 int num = 1;
26 if (num == 0)
27 {
28 }
29 int num2 = 180;
30 if (num == 0)
31 {
32 }
34 int num3 = 2;
35 if (genRand.Next(num3) != 0)
36 {
37 if (num == 0)
38 {
39 }
41 int num4 = 2;
42 int num5 = genRand2.Next(num4);
43 if (num2 == 0)
44 {
45 }
47 int num6 = 2;
48 int num7 = genRand3.Next(num6);
49 if (!true)
50 {
51 }
52 int num8 = 1;
53 ushort num9;
54 WorldUtils.TileFrame((int)num9, (int)num9, num8 != 0);
55 int num10 = 1;
56 WorldGen.SquareWallFrame(0, (int)num9, num10 != 0);
57 int num11 = 1;
58 long num12 = 0L;
59 Tile.SmoothSlope(1073741824, (int)num9, num11 != 0, num12 != 0L);
60 long num13 = 0L;
61 bool flag = WorldGen.SolidTile(1073741824, 0, num13 != 0L);
63 int num14 = 4;
64 if (random.Next(num14) == 0)
65 {
66 if (1073741824 == 0)
67 {
68 }
69 long num15 = 0L;
71 }
72 if (1073741824 == 0)
73 {
74 }
75 long num16 = 0L;
76 bool flag2 = WorldGen.SolidTile(0, num14, num16 != 0L);
78 int num17 = 4;
79 if (random2.Next(num17) == 0)
80 {
81 if (1073741824 == 0)
82 {
83 }
84 long num18 = 0L;
85 WorldGen.PlaceTight(0, 0, num18 != 0L);
86 }
87 }
88 }
89
90 // Token: 0x06004631 RID: 17969 RVA: 0x002581C8 File Offset: 0x002563C8
91 private static bool IsGroupSolid(int x, int y, int scale)
92 {
93 if (!true)
94 {
95 }
96 return WorldGen.SolidOrSlopedTile(43134976, x);
97 }
98
99 // Token: 0x06004632 RID: 17970 RVA: 0x002581F0 File Offset: 0x002563F0
100 public override bool Place(Point origin, StructureMap structures)
101 {
102 /*
103An exception occurred when decompiling this method (06004632)
104
105ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Biomes.MarbleBiome::Place(Microsoft.Xna.Framework.Point,Terraria.WorldBuilding.StructureMap)
106
107 ---> System.Exception: Basic block has to end with unconditional control flow.
108{
109 IL_00B3:
110 stloc:float64(var_30_C3, call:float64(UnifiedRandom::NextDouble, callgetter:UnifiedRandom(GenBase::get__random)))
111 stloc:int64(var_32_C9, ldc.i4:int64(0))
112 stloc:int64(var_33_CC, ldc.i4:int64(0))
113 call:void(MarbleBiome::SmoothSlope, ldloc:MarbleBiome(this), ldloc:int64[exp:int32](var_32_C9), ldloc:int64[exp:int32](var_33_CC))
114 stloc:float64(var_35_E5, call:float64(UnifiedRandom::NextDouble, callgetter:UnifiedRandom(GenBase::get__random)))
115 stloc:float64(var_37_F4, call:float64(UnifiedRandom::NextDouble, callgetter:UnifiedRandom(GenBase::get__random)))
116 stloc:UnifiedRandom(var_39_FE, callgetter:UnifiedRandom(GenBase::get__random))
117 stloc:int64(var_40_101, ldc.i4:int64(0))
118 stloc:float64(var_41_10A, call:float64(UnifiedRandom::NextDouble, ldloc:UnifiedRandom(var_39_FE)))
119 stloc:int32(var_46_11E, call:int32(Math::Min, ldloc:int64[exp:int32](var_20_80), ldloc:int64[exp:int32](var_40_101)))
120}
121
122 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
123 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
124 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
125 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
126 --- End of inner exception stack trace ---
127 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
128 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
129*/;
130 }
131
132 // Token: 0x06004633 RID: 17971 RVA: 0x00258324 File Offset: 0x00256524
133 public MarbleBiome()
134 {
135 }
136
137 // Token: 0x04008263 RID: 33379
138 private const int SCALE = 3;
139
140 // Token: 0x04008264 RID: 33380
142
143 // Token: 0x020008F5 RID: 2293
144 private sealed class SlabState : MulticastDelegate
145 {
146 // Token: 0x06004634 RID: 17972 RVA: 0x00258338 File Offset: 0x00256538
147 public SlabState(object @object, IntPtr method)
148 {
150 this.m_target = @object;
152 this.method_code = this;
153 }
154
155 // Token: 0x06004635 RID: 17973 RVA: 0x0025838C File Offset: 0x0025658C
156 public bool Invoke(int x, int y, int scale)
157 {
158 /*
159An exception occurred when decompiling this method (06004635)
160
161ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.GameContent.Biomes.MarbleBiome/SlabState::Invoke(System.Int32,System.Int32,System.Int32)
162
163 ---> System.Exception: Basic block has to end with unconditional control flow.
164{
165 Block_0:
166 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:SlabState[exp:Delegate](this)))
167 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:SlabState[exp:Delegate](this)))
168 stloc:native int(var_2_14, ldfld:native int(Delegate::method, ldloc:SlabState[exp:Delegate](this)))
169}
170
171 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
172 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
173 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
174 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
175 --- End of inner exception stack trace ---
176 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
177 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
178*/;
179 }
180
181 // Token: 0x06004636 RID: 17974 RVA: 0x000021DB File Offset: 0x000003DB
182 public IAsyncResult BeginInvoke(int x, int y, int scale, AsyncCallback callback, object @object)
183 {
184 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
185 }
186
187 // Token: 0x06004637 RID: 17975 RVA: 0x000021DB File Offset: 0x000003DB
188 public bool EndInvoke(IAsyncResult result)
189 {
190 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
191 }
192 }
193
194 // Token: 0x020008F6 RID: 2294
195 private static class SlabStates
196 {
197 // Token: 0x06004638 RID: 17976 RVA: 0x002583B0 File Offset: 0x002565B0
198 public static bool Empty(int x, int y, int scale)
199 {
200 }
201
202 // Token: 0x06004639 RID: 17977 RVA: 0x002583C0 File Offset: 0x002565C0
203 public static bool Solid(int x, int y, int scale)
204 {
205 return true;
206 }
207
208 // Token: 0x0600463A RID: 17978 RVA: 0x000021DB File Offset: 0x000003DB
209 public static bool HalfBrick(int x, int y, int scale)
210 {
211 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
212 }
213
214 // Token: 0x0600463B RID: 17979 RVA: 0x000021DB File Offset: 0x000003DB
215 public static bool BottomRightFilled(int x, int y, int scale)
216 {
217 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
218 }
219
220 // Token: 0x0600463C RID: 17980 RVA: 0x000021DB File Offset: 0x000003DB
221 public static bool BottomLeftFilled(int x, int y, int scale)
222 {
223 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
224 }
225
226 // Token: 0x0600463D RID: 17981 RVA: 0x000021DB File Offset: 0x000003DB
227 public static bool TopRightFilled(int x, int y, int scale)
228 {
229 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
230 }
231
232 // Token: 0x0600463E RID: 17982 RVA: 0x000021DB File Offset: 0x000003DB
233 public static bool TopLeftFilled(int x, int y, int scale)
234 {
235 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
236 }
237 }
238
239 // Token: 0x020008F7 RID: 2295
240 private struct Slab
241 {
242 // Token: 0x170007F0 RID: 2032
243 // (get) Token: 0x0600463F RID: 17983 RVA: 0x002583D0 File Offset: 0x002565D0
244 public bool IsSolid
245 {
246 get
247 {
248 bool flag;
249 return flag;
250 }
251 }
252
253 // Token: 0x06004640 RID: 17984 RVA: 0x002583E0 File Offset: 0x002565E0
255 {
257 }
258
259 // Token: 0x06004641 RID: 17985 RVA: 0x002583F4 File Offset: 0x002565F4
261 {
262 /*
263An exception occurred when decompiling this method (06004641)
264
265ICSharpCode.Decompiler.DecompilerException: Error decompiling Terraria.GameContent.Biomes.MarbleBiome/Slab Terraria.GameContent.Biomes.MarbleBiome/Slab::WithState(Terraria.GameContent.Biomes.MarbleBiome/SlabState)
266
267 ---> System.Exception: Basic block has to end with unconditional control flow.
268{
269 Block_0:
270 stloc:bool(var_0_06, ldfld:bool(Slab::HasWall, ldloc:valuetype Terraria.GameContent.Biomes.MarbleBiome/Slab&(this)))
271}
272
273 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
274 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
275 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
276 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
277 --- End of inner exception stack trace ---
278 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
279 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
280*/;
281 }
282
283 // Token: 0x06004642 RID: 17986 RVA: 0x000021DB File Offset: 0x000003DB
285 {
286 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
287 }
288
289 // Token: 0x04008265 RID: 33381
291
292 // Token: 0x04008266 RID: 33382
293 public readonly bool HasWall;
294 }
295 }
296}
class f__AnonymousType0<< Count > j__TPar
IAsyncResult BeginInvoke(int x, int y, int scale, AsyncCallback callback, object @object)
static bool Empty(int x, int y, int scale)
static bool Solid(int x, int y, int scale)
static bool HalfBrick(int x, int y, int scale)
static bool TopRightFilled(int x, int y, int scale)
static bool BottomLeftFilled(int x, int y, int scale)
static bool BottomRightFilled(int x, int y, int scale)
static bool TopLeftFilled(int x, int y, int scale)
void PlaceSlab(MarbleBiome.Slab slab, int originX, int originY, int scale)
static bool IsGroupSolid(int x, int y, int scale)
override bool Place(Point origin, StructureMap structures)
static UnifiedRandom _random
Definition GenBase.cs:13
static void TileFrame(int x, int y, bool frameNeighbors=false)
static bool SolidTile(short tileSHeader, ushort tileType)
static UnifiedRandom genRand
Definition WorldGen.cs:38
static void SquareWallFrame(int i, int j, bool resetFrame=true)
static void PlaceTight(int x, int y, bool spiders=false)
Definition WorldGen.cs:7552
static bool SolidOrSlopedTile(Tile tile)
MarbleBiome.Slab WithState(MarbleBiome.SlabState state)
readonly MarbleBiome.SlabState State
static MarbleBiome.Slab Create(MarbleBiome.SlabState state, bool hasWall)
Slab(MarbleBiome.SlabState state, bool hasWall)
static void SmoothSlope(int x, int y, bool applyToNeighbors=true, bool sync=false)
Definition Tile.cs:1338