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
WorldUtils.cs
Go to the documentation of this file.
1using System;
5
7{
8 // Token: 0x020004EF RID: 1263
9 public static class WorldUtils
10 {
11 // Token: 0x06003094 RID: 12436 RVA: 0x001F698C File Offset: 0x001F4B8C
13 {
14 /*
15An exception occurred when decompiling this method (06003094)
16
17ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Rectangle Terraria.WorldBuilding.WorldUtils::ClampToWorld(Microsoft.Xna.Framework.Rectangle)
18
19 ---> System.Exception: Basic block has to end with unconditional control flow.
20{
21 IL_0003:
22 stloc:int32(var_0_0A, call:int32(Math::Min, ldc.i4:int32(0), ldc.i4:int32(0)))
23 stloc:int32(var_1_12, call:int32(Math::Max, ldc.i4:int32(0), ldloc:int32(var_0_0A)))
24 stloc:int32(var_2_1E, call:int32(Math::Min, ldc.i4:int32(43147264), ldloc:int32(var_0_0A)))
25 stloc:int32(var_3_26, call:int32(Math::Max, ldc.i4:int32(0), ldloc:int32(var_2_1E)))
26 stloc:int64(var_4_28, ldc.i4:int64(0))
27 stloc:int32(var_6_33, call:int32(Math::Min, ldloc:int32(var_5), ldloc:int64[exp:int32](var_4_28)))
28 stloc:int32(var_7_3D, call:int32(Math::Max, ldc.i4:int32(0), ldloc:int32(var_6_33)))
29 stloc:int64(var_8_40, ldc.i4:int64(0))
30 stloc:int32(var_10_4B, call:int32(Math::Min, ldloc:int32(var_9), ldloc:int64[exp:int32](var_8_40)))
31 stloc:int32(var_11_55, call:int32(Math::Max, ldc.i4:int32(0), ldloc:int32(var_10_4B)))
32}
33
34 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
35 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
36 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
37 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
38 --- End of inner exception stack trace ---
39 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
40 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
41*/;
42 }
43
44 // Token: 0x06003095 RID: 12437 RVA: 0x000021DB File Offset: 0x000003DB
45 public static bool Gen(Point origin, GenShape shape, GenAction action)
46 {
47 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
48 }
49
50 // Token: 0x06003096 RID: 12438 RVA: 0x000021DB File Offset: 0x000003DB
51 public static bool Gen(Point origin, GenShapeActionPair pair)
52 {
53 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
54 }
55
56 // Token: 0x06003097 RID: 12439 RVA: 0x001F69F0 File Offset: 0x001F4BF0
57 public static bool Find(Point origin, GenSearch search, [Out] Point result)
58 {
59 bool flag;
60 return flag;
61 }
62
63 // Token: 0x06003098 RID: 12440 RVA: 0x001F6A00 File Offset: 0x001F4C00
64 public static void ClearTile(int x, int y, bool frameNeighbors = false)
65 {
66 if (!true)
67 {
68 }
69 Tile tile;
70 tile.ClearTile();
71 long num = 0L;
72 long num2 = 0L;
73 WorldGen.TileFrame(0, y, num != 0L, num2 != 0L);
74 long num3 = 0L;
75 long num4 = 0L;
76 WorldGen.TileFrame(0, y, num3 != 0L, num4 != 0L);
77 long num5 = 0L;
78 long num6 = 0L;
79 WorldGen.TileFrame(x, y, num5 != 0L, num6 != 0L);
80 long num7 = 0L;
81 long num8 = 0L;
82 WorldGen.TileFrame(x, y, num7 != 0L, num8 != 0L);
83 }
84
85 // Token: 0x06003099 RID: 12441 RVA: 0x001F6A54 File Offset: 0x001F4C54
86 public static void ClearWall(int x, int y, bool frameNeighbors = false)
87 {
88 if (!true)
89 {
90 }
91 long num = 0L;
92 Tile tile;
93 tile.wall = (ushort)num;
94 int num2 = 1;
95 WorldGen.SquareWallFrame(0, y, num2 != 0);
96 int num3 = 1;
97 WorldGen.SquareWallFrame(0, y, num3 != 0);
98 int num4 = 1;
99 WorldGen.SquareWallFrame(x, y, num4 != 0);
100 int num5 = 1;
101 WorldGen.SquareWallFrame(x, y, num5 != 0);
102 }
103
104 // Token: 0x0600309A RID: 12442 RVA: 0x001F6A9C File Offset: 0x001F4C9C
105 public static void TileFrame(int x, int y, bool frameNeighbors = false)
106 {
107 int num = 1;
108 if (num == 0)
109 {
110 }
111 int num2 = 1;
112 long num3 = 0L;
113 WorldGen.TileFrame(x, y, num2 != 0, num3 != 0L);
114 if (num == 0)
115 {
116 }
117 int num4 = 1;
118 long num5 = 0L;
119 WorldGen.TileFrame(0, y, num4 != 0, num5 != 0L);
120 int num6 = 1;
121 long num7 = 0L;
122 WorldGen.TileFrame(0, y, num6 != 0, num7 != 0L);
123 int num8 = 1;
124 long num9 = 0L;
125 WorldGen.TileFrame(x, y, num8 != 0, num9 != 0L);
126 int num10 = 1;
127 long num11 = 0L;
128 WorldGen.TileFrame(x, y, num10 != 0, num11 != 0L);
129 }
130
131 // Token: 0x0600309B RID: 12443 RVA: 0x001F6B04 File Offset: 0x001F4D04
132 public static void ClearChestLocation(int x, int y)
133 {
134 int num = 1;
135 WorldUtils.ClearTile(x, y, num != 0);
136 int num2 = 1;
137 WorldUtils.ClearTile(x, y, num2 != 0);
138 int num3 = 1;
139 WorldUtils.ClearTile(x, y, num3 != 0);
140 int num4 = 1;
141 WorldUtils.ClearTile(x, y, num4 != 0);
142 }
143
144 // Token: 0x0600309C RID: 12444 RVA: 0x001F6B3C File Offset: 0x001F4D3C
145 public static void WireLine(Point start, Point end)
146 {
147 int num = 1;
148 if (num == 0)
149 {
150 }
151 if (num == 0)
152 {
153 }
154 if (num == 0)
155 {
156 }
157 if (num == 0)
158 {
159 }
160 }
161
162 // Token: 0x0600309D RID: 12445 RVA: 0x001F6B58 File Offset: 0x001F4D58
163 public static void DebugRegen()
164 {
165 if (!true)
166 {
167 }
169 if (!true)
170 {
171 }
172 }
173
174 // Token: 0x0600309E RID: 12446 RVA: 0x001F6B74 File Offset: 0x001F4D74
175 public static void DebugRotate()
176 {
177 }
178 }
179}
class f__AnonymousType0<< Count > j__TPar
static bool Find(Point origin, GenSearch search, [Out] Point result)
Definition WorldUtils.cs:57
static bool Gen(Point origin, GenShapeActionPair pair)
Definition WorldUtils.cs:51
static void TileFrame(int x, int y, bool frameNeighbors=false)
static void ClearChestLocation(int x, int y)
static void WireLine(Point start, Point end)
static void ClearTile(int x, int y, bool frameNeighbors=false)
Definition WorldUtils.cs:64
static Rectangle ClampToWorld(Rectangle tileRectangle)
Definition WorldUtils.cs:12
static bool Gen(Point origin, GenShape shape, GenAction action)
Definition WorldUtils.cs:45
static void ClearWall(int x, int y, bool frameNeighbors=false)
Definition WorldUtils.cs:86
static void SquareWallFrame(int i, int j, bool resetFrame=true)
static void clearWorld()
Definition WorldGen.cs:1452
static void TileFrame(int i, int j, bool resetFrame=false, bool noBreak=false)
void ClearTile()
Definition Tile.cs:368