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
WorldSections.cs
Go to the documentation of this file.
1using System;
5
6namespace Terraria
7{
8 // Token: 0x02000489 RID: 1161
9 public class WorldSections
10 {
11 // Token: 0x06002F77 RID: 12151 RVA: 0x001F3EFC File Offset: 0x001F20FC
13 {
16 int num = this.width;
17 BitsByte[] array = this.data;
19 this.prevFrame = 50504;
20 }
21
22 // Token: 0x170005FD RID: 1533
23 // (get) Token: 0x06002F78 RID: 12152 RVA: 0x001F3F40 File Offset: 0x001F2140
25 {
26 get
27 {
28 /*
29An exception occurred when decompiling this method (06002F78)
30
31ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.WorldSections::get_AnyUnfinishedSections()
32
33 ---> System.Exception: Basic block has to end with unconditional control flow.
34{
35 Block_0:
36 stloc:int32(var_0_06, ldfld:int32(WorldSections::frameSectionsLeft, ldloc:WorldSections(this)))
37}
38
39 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
40 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
41 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
42 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
43 --- End of inner exception stack trace ---
44 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
45 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
46*/;
47 }
48 }
49
50 // Token: 0x170005FE RID: 1534
51 // (get) Token: 0x06002F79 RID: 12153 RVA: 0x001F3F54 File Offset: 0x001F2154
52 public bool AnyNeedRefresh
53 {
54 get
55 {
56 /*
57An exception occurred when decompiling this method (06002F79)
58
59ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.WorldSections::get_AnyNeedRefresh()
60
61 ---> System.Exception: Basic block has to end with unconditional control flow.
62{
63 Block_0:
64 stloc:int32(var_0_06, ldfld:int32(WorldSections::_sectionsNeedingRefresh, ldloc:WorldSections(this)))
65}
66
67 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
68 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
69 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
70 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
71 --- End of inner exception stack trace ---
72 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
73 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
74*/;
75 }
76 }
77
78 // Token: 0x170005FF RID: 1535
79 // (get) Token: 0x06002F7A RID: 12154 RVA: 0x001F3F68 File Offset: 0x001F2168
81 {
82 get
83 {
84 /*
85An exception occurred when decompiling this method (06002F7A)
86
87ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 Terraria.WorldSections::get_TotalMapSections()
88
89 ---> System.Exception: Basic block has to end with unconditional control flow.
90{
91 Block_0:
92 stloc:int32(var_0_06, ldfld:int32(WorldSections::width, ldloc:WorldSections(this)))
93 stloc:valuetype Terraria.BitsByte[](var_1_0D, ldfld:valuetype Terraria.BitsByte[](WorldSections::data, ldloc:WorldSections(this)))
94}
95
96 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
97 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
98 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
99 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
100 --- End of inner exception stack trace ---
101 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
102 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
103*/;
104 }
105 }
106
107 // Token: 0x06002F7B RID: 12155 RVA: 0x001F3F84 File Offset: 0x001F2184
108 public void SetSectionAsRefreshed(int x, int y)
109 {
110 int num = this.width;
111 BitsByte[] array = this.data;
112 int num2 = this.width;
113 BitsByte[] array2 = this.data;
116 }
117
118 // Token: 0x06002F7C RID: 12156 RVA: 0x001F3FC8 File Offset: 0x001F21C8
119 public bool SectionNeedsRefresh(int x, int y)
120 {
121 int num = this.width;
122 int num2 = this.height;
123 BitsByte[] array = this.data;
124 bool flag;
125 return flag;
126 }
127
128 // Token: 0x06002F7D RID: 12157 RVA: 0x001F3FF4 File Offset: 0x001F21F4
137
138 // Token: 0x06002F7E RID: 12158 RVA: 0x001F4030 File Offset: 0x001F2230
139 public bool SectionLoaded(int x, int y)
140 {
141 int num = this.width;
142 int num2 = this.height;
143 BitsByte[] array = this.data;
144 bool flag;
145 return flag;
146 }
147
148 // Token: 0x06002F7F RID: 12159 RVA: 0x001F405C File Offset: 0x001F225C
149 public bool SectionFramed(int x, int y)
150 {
151 int num = this.width;
152 int num2 = this.height;
153 BitsByte[] array = this.data;
154 bool flag;
155 return flag;
156 }
157
158 // Token: 0x06002F80 RID: 12160 RVA: 0x001F4088 File Offset: 0x001F2288
159 public bool MapSectionDrawn(int x, int y)
160 {
161 int num = this.width;
162 int num2 = this.height;
163 BitsByte[] array = this.data;
164 bool flag;
165 return flag;
166 }
167
168 // Token: 0x06002F81 RID: 12161 RVA: 0x001F40B4 File Offset: 0x001F22B4
169 public void ClearMapDraw()
170 {
171 BitsByte[] array = this.data;
172 BitsByte[] array2 = this.data;
173 int num = 50504;
174 BitsByte[] array3 = this.data;
176 }
177
178 // Token: 0x06002F82 RID: 12162 RVA: 0x001F40EC File Offset: 0x001F22EC
179 public void SetSectionFramed(int x, int y)
180 {
181 int num = this.width;
182 int num2 = this.height;
183 BitsByte[] array = this.data;
184 int num3 = this.width;
185 BitsByte[] array2 = this.data;
186 int num4 = this.frameSectionsLeft;
188 }
189
190 // Token: 0x06002F83 RID: 12163 RVA: 0x001F413C File Offset: 0x001F233C
191 public void SetSectionLoaded(int x, int y)
192 {
193 int num = this.width;
194 int num2 = this.height;
195 BitsByte[] array = this.data;
196 }
197
198 // Token: 0x06002F84 RID: 12164 RVA: 0x001F4160 File Offset: 0x001F2360
200 {
201 long num = 0L;
202 bool flag = section[(int)num];
203 int num2 = 1;
204 bool flag2 = section[num2];
205 }
206
207 // Token: 0x06002F85 RID: 12165 RVA: 0x001F41A4 File Offset: 0x001F23A4
209 {
210 BitsByte[] array = this.data;
211 BitsByte[] array2 = this.data;
212 }
213
214 // Token: 0x06002F86 RID: 12166 RVA: 0x001F41C0 File Offset: 0x001F23C0
216 {
217 if (!true)
218 {
219 }
224 this.SetSectionLoaded(sectionX, sectionY);
225 }
226
227 // Token: 0x06002F87 RID: 12167 RVA: 0x001F41F8 File Offset: 0x001F23F8
228 public bool GetNextMapDraw(Vector2 playerPos, [Out] int x, [Out] int y)
229 {
230 int num = this.mapSectionsLeft;
231 Vector2 centerPos = this.prevMap.centerPos;
232 if (15744 == 0)
233 {
234 }
235 int num2 = 32640;
236 int sectionY = Netplay.GetSectionY(Netplay.GetSectionX(-1073741824));
238 playerPos.X = (float)num2;
239 x.m_value = num2;
240 long num3 = 0L;
241 playerPos.X = (float)num2;
242 x.m_value = num2;
243 long num4 = 0L;
244 playerPos.X = (float)num3;
246 if (num4 == 0L)
247 {
248 }
249 playerPos.X = (float)num3;
251 bool flag;
252 return flag;
253 }
254
255 // Token: 0x04003960 RID: 14688
256 public const int BitIndex_SectionLoaded = 0;
257
258 // Token: 0x04003961 RID: 14689
259 public const int BitIndex_SectionFramed = 1;
260
261 // Token: 0x04003962 RID: 14690
262 public const int BitIndex_SectionMapDrawn = 2;
263
264 // Token: 0x04003963 RID: 14691
265 public const int BitIndex_SectionNeedsRefresh = 3;
266
267 // Token: 0x04003964 RID: 14692
268 private int width;
269
270 // Token: 0x04003965 RID: 14693
271 private int height;
272
273 // Token: 0x04003966 RID: 14694
274 private BitsByte[] data;
275
276 // Token: 0x04003967 RID: 14695
277 public int mapSectionsLeft;
278
279 // Token: 0x04003968 RID: 14696
281
282 // Token: 0x04003969 RID: 14697
284
285 // Token: 0x0400396A RID: 14698
287
288 // Token: 0x0400396B RID: 14699
290
291 // Token: 0x0400396C RID: 14700
293
294 // Token: 0x0200048A RID: 1162
295 private struct IterationState
296 {
297 // Token: 0x06002F88 RID: 12168 RVA: 0x001F42CC File Offset: 0x001F24CC
298 public void Reset()
299 {
300 this.centerPos = 50504;
301 }
302
303 // Token: 0x0400396D RID: 14701
305
306 // Token: 0x0400396E RID: 14702
307 public int X;
308
309 // Token: 0x0400396F RID: 14703
310 public int Y;
311
312 // Token: 0x04003970 RID: 14704
313 public int leg;
314
315 // Token: 0x04003971 RID: 14705
316 public int xDir;
317
318 // Token: 0x04003972 RID: 14706
319 public int yDir;
320 }
321 }
322}
class f__AnonymousType0<< Count > j__TPar
static int GetSectionX(int x)
Definition Netplay.cs:487
static int GetSectionY(int y)
Definition Netplay.cs:493
void SetSectionFramed(int x, int y)
void SetTilesLoaded(int startX, int startY, int endXInclusive, int endYInclusive)
const int BitIndex_SectionMapDrawn
void SetSectionLoaded(BitsByte section)
WorldSections(int numSectionsX, int numSectionsY)
WorldSections.IterationState prevMap
IEnumerator CurrentMapSection
bool SectionNeedsRefresh(int x, int y)
bool MapSectionDrawn(int x, int y)
void SetAllFramedSectionsAsNeedingRefresh()
void SetSectionAsRefreshed(int x, int y)
bool GetNextMapDraw(Vector2 playerPos, [Out] int x, [Out] int y)
WorldSections.IterationState prevFrame
const int BitIndex_SectionNeedsRefresh
bool SectionLoaded(int x, int y)
bool SectionFramed(int x, int y)
void SetSectionLoaded(int x, int y)