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
DesertHive.cs
Go to the documentation of this file.
1using System;
7
9{
10 // Token: 0x02000901 RID: 2305
11 public static class DesertHive
12 {
13 // Token: 0x0600466C RID: 18028 RVA: 0x0025946C File Offset: 0x0025766C
14 public static void Place(DesertDescription description)
15 {
18 DesertHive.AddTileVariance(description);
19 }
20
21 // Token: 0x0600466D RID: 18029 RVA: 0x00259490 File Offset: 0x00257690
23 {
24 int x = description.<Hive>k__BackingField.X;
25 int num = 1;
26 if (num == 0)
27 {
28 }
29 if (num == 0)
30 {
31 }
32 }
33
34 // Token: 0x0600466E RID: 18030 RVA: 0x002594B8 File Offset: 0x002576B8
36 {
37 if (!true)
38 {
39 }
40 int width = clusters.Width;
41 Vector2D[] points = clusters.Points;
42 if (width == 0)
43 {
44 }
45 Vector2D[] points2 = clusters.Points;
47 if (points2 != null)
48 {
49 return;
50 }
51 Tile tile;
52 byte liquid = tile.liquid;
53 int num = 397;
54 int value = num.m_value;
55 }
56
57 // Token: 0x0600466F RID: 18031 RVA: 0x002595F8 File Offset: 0x002577F8
58 private static void AddTileVariance(DesertDescription description)
59 {
60 int width = description.<Hive>k__BackingField.Width;
61 Rectangle <Hive>k__BackingField = description.<Hive>k__BackingField;
62 int width2 = description.<Hive>k__BackingField.Width;
63 if (<Hive>k__BackingField == null)
64 {
65 }
66 Tile tile;
67 ushort type = tile.type;
68 int width3 = description.<Hive>k__BackingField.Width;
69 Rectangle <Hive>k__BackingField2 = description.<Hive>k__BackingField;
70 int width4 = description.<Hive>k__BackingField.Width;
71 if (<Hive>k__BackingField2 == null)
72 {
73 }
74 Tile tile2;
75 bool flag = tile2.active();
76 if (<Hive>k__BackingField2 == null)
77 {
78 }
79 Tile tile3;
80 bool flag2 = tile3.active();
81 }
82
83 // Token: 0x02000902 RID: 2306
84 private struct Block
85 {
86 // Token: 0x06004670 RID: 18032 RVA: 0x0025975C File Offset: 0x0025795C
87 public Block(double x, double y)
88 {
89 this.Position = x;
90 }
91
92 // Token: 0x0400827F RID: 33407
94 }
95
96 // Token: 0x02000903 RID: 2307
97 private struct Cluster
98 {
99 // Token: 0x04008280 RID: 33408
100 public int Offset;
101
102 // Token: 0x04008281 RID: 33409
103 public int Count;
104 }
105
106 // Token: 0x02000904 RID: 2308
107 private class ClusterGroup
108 {
109 // Token: 0x06004671 RID: 18033 RVA: 0x00259770 File Offset: 0x00257970
110 private ClusterGroup(int width, int height)
111 {
112 this.Width = width;
113 this.Points = height;
114 this.Generate();
115 }
116
117 // Token: 0x06004672 RID: 18034 RVA: 0x000021DB File Offset: 0x000003DB
119 {
120 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
121 }
122
123 // Token: 0x06004673 RID: 18035 RVA: 0x000021DB File Offset: 0x000003DB
124 private static void SearchForCluster(bool[,] blockMap, List<Point> pointCluster, int x, int y, int level = 2)
125 {
126 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
127 }
128
129 // Token: 0x06004674 RID: 18036 RVA: 0x00259798 File Offset: 0x00257998
130 private static void AttemptClaim(int x, int y, int[,] clusterIndexMap, List<List<Point>> pointClusters, int index)
131 {
133 int num = 2;
134 int num2 = genRand.Next(num);
135 }
136
137 // Token: 0x06004675 RID: 18037 RVA: 0x002597CC File Offset: 0x002579CC
138 private void Generate()
139 {
140 int width = this.Width;
141 int width2 = this.Width;
142 if (this.Points == null)
143 {
144 }
145 int num = Math.Min(43134976, 43134976);
146 if (width2 == 0)
147 {
148 }
150 int num2 = 2;
151 int num3 = genRand.Next(num2);
153 int num4 = 2;
154 if (genRand2.Next(num4) == 0)
155 {
156 return;
157 }
158 }
159
160 // Token: 0x04008282 RID: 33410
161 public readonly int Width;
162
163 // Token: 0x04008283 RID: 33411
164 public readonly int Height;
165
166 // Token: 0x04008284 RID: 33412
167 public Vector2D[] Points;
168
169 // Token: 0x04008285 RID: 33413
171 }
172
173 // Token: 0x02000905 RID: 2309
174 [Flags]
175 private enum PostPlacementEffect : byte
176 {
177 // Token: 0x04008287 RID: 33415
178 None = 0,
179 // Token: 0x04008288 RID: 33416
180 Smooth = 1
181 }
182 }
183}
class f__AnonymousType0<< Count > j__TPar
static byte Min(byte val1, byte val2)
Definition Math.cs:152
static void SearchForCluster(bool[,] blockMap, List< Point > pointCluster, int x, int y, int level=2)
static void AttemptClaim(int x, int y, int[,] clusterIndexMap, List< List< Point > > pointClusters, int index)
static DesertHive.ClusterGroup FromDescription(DesertDescription description)
static void PlaceClusters(DesertDescription description, DesertHive.ClusterGroup clusters)
Definition DesertHive.cs:22
static void PlaceClustersArea(DesertDescription description, DesertHive.ClusterGroup clusters, Rectangle area, DesertHive.PostPlacementEffect[,] postEffectMap, Point postEffectMapOffset)
Definition DesertHive.cs:35
static void Place(DesertDescription description)
Definition DesertHive.cs:14
static void AddTileVariance(DesertDescription description)
Definition DesertHive.cs:58
static UnifiedRandom genRand
Definition WorldGen.cs:38
byte liquid
Definition Tile.cs:110
ushort type
Definition Tile.cs:58
bool active()
Definition Tile.cs:1241