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
ThreadedRenderManager.cs
Go to the documentation of this file.
1using System;
13using UnityEngine;
14
15// Token: 0x020002D7 RID: 727
17{
18 // Token: 0x060010B7 RID: 4279 RVA: 0x00052D9C File Offset: 0x00050F9C
19 private static string GetStackTrace(Thread t)
20 {
21 string newLine = Environment.NewLine;
22 if ("<UnknownType>" == null)
23 {
24 return;
25 }
26 }
27
28 // Token: 0x060010B8 RID: 4280 RVA: 0x00052DC8 File Offset: 0x00050FC8
29 public static void GetTilePartition(int partitionIndex, int partitionCount, int firstTileX, int firstTileY, int lastTileX, int lastTileY, [Out] int resultFirstTileX, [Out] int resultFirstTileY, [Out] int resultLastTileX, [Out] int resultLastTileY)
30 {
31 resultFirstTileX.m_value = firstTileX;
32 }
33
34 // Token: 0x060010B9 RID: 4281 RVA: 0x00052DE0 File Offset: 0x00050FE0
39
40 // Token: 0x060010BA RID: 4282 RVA: 0x00052E60 File Offset: 0x00051060
41 public void ThreadMonitor()
42 {
44 LiquidRenderer waterRenderer = drawThreads.waterRenderer;
45 if (!drawThreads.ThreadHandle.IsAlive)
46 {
47 if (waterRenderer == null)
48 {
49 }
50 string text;
53 }
55 Thread.Sleep(10);
56 }
57
58 // Token: 0x060010BB RID: 4283 RVA: 0x00052EA8 File Offset: 0x000510A8
60 {
62 int[][] waitThreads = this.WaitThreads;
63 SafeWaitHandle safeWaitHandle = waitHandles.safeWaitHandle;
64 if (numberOfThreads == 0 || numberOfThreads != 0)
65 {
67 int[][] waitThreads2 = this.WaitThreads;
68 return;
69 }
71 }
72
73 // Token: 0x060010BC RID: 4284 RVA: 0x00052F54 File Offset: 0x00051154
75 {
77 int[][] waitThreads = this.WaitThreads;
78 SafeWaitHandle safeWaitHandle = waitHandles.safeWaitHandle;
79 if ("Thread wait aborted!" != null)
80 {
82 int[][] waitThreads2 = this.WaitThreads;
83 return;
84 }
86 }
87
88 // Token: 0x060010BD RID: 4285 RVA: 0x00052FF8 File Offset: 0x000511F8
89 // Note: this type is marked as 'beforefieldinit'.
91 {
92 }
93
94 // Token: 0x04002078 RID: 8312
95 public static int PrefferedThreadCount;
96
97 // Token: 0x04002079 RID: 8313
98 private const int MaxThreadCount = 3;
99
100 // Token: 0x0400207A RID: 8314
102
103 // Token: 0x0400207B RID: 8315
105
106 // Token: 0x0400207C RID: 8316
108
109 // Token: 0x0400207D RID: 8317
110 private int[][] WaitThreads;
111
112 // Token: 0x0400207E RID: 8318
114
115 // Token: 0x020002D8 RID: 728
117 {
118 // Token: 0x060010BE RID: 4286 RVA: 0x00053008 File Offset: 0x00051208
119 public BatchProcessCallback(object @object, IntPtr method)
120 {
122 this.m_target = @object;
124 this.method_code = this;
125 }
126
127 // Token: 0x060010BF RID: 4287 RVA: 0x0005305C File Offset: 0x0005125C
128 public void Invoke(int index)
129 {
132 IntPtr method = this.method;
133 }
134
135 // Token: 0x060010C0 RID: 4288 RVA: 0x000021DB File Offset: 0x000003DB
136 public IAsyncResult BeginInvoke(int index, AsyncCallback callback, object @object)
137 {
138 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
139 }
140
141 // Token: 0x060010C1 RID: 4289 RVA: 0x00053080 File Offset: 0x00051280
142 public void EndInvoke(IAsyncResult result)
143 {
144 }
145 }
146
147 // Token: 0x020002D9 RID: 729
149 {
150 // Token: 0x060010C2 RID: 4290 RVA: 0x00053090 File Offset: 0x00051290
161
162 // Token: 0x060010C3 RID: 4291 RVA: 0x000530C8 File Offset: 0x000512C8
163 public void RestartThread()
164 {
165 bool flag = this.completeEvent.Set();
166 bool flag2 = this.startEvent.Reset();
167 if (!true)
168 {
169 }
172 }
173
174 // Token: 0x060010C4 RID: 4292 RVA: 0x000530F8 File Offset: 0x000512F8
175 public void DrawRockLayer(int bgStartX, int bgstartY, int bgLoops, int byLoopsY, int diff, Microsoft.Xna.Framework.Vector2 drawOffset)
176 {
178 this._firstTileX = bgStartX;
180 this._lastTileX = bgLoops;
183 this._diff = diff;
184 bool flag = autoResetEvent.Reset();
185 bool flag2 = this.startEvent.Set();
186 }
187
188 // Token: 0x060010C5 RID: 4293 RVA: 0x0005314C File Offset: 0x0005134C
189 public void DrawMagmaLayer(int bgStartX, int bgstartY, int bgLoops, int byLoopsY, int diff, Microsoft.Xna.Framework.Vector2 drawOffset)
190 {
192 this._firstTileX = bgStartX;
194 this._lastTileX = bgLoops;
197 this._diff = diff;
198 bool flag = autoResetEvent.Reset();
199 bool flag2 = this.startEvent.Set();
200 }
201
202 // Token: 0x060010C6 RID: 4294 RVA: 0x000531A0 File Offset: 0x000513A0
203 public void DrawCurrentBackground(int bgStartX, int bgstartY, int bgLoops, int byLoopsY, int diff, Microsoft.Xna.Framework.Vector2 drawOffset)
204 {
206 this._firstTileX = bgStartX;
208 this._lastTileX = bgLoops;
211 this._diff = diff;
212 bool flag = autoResetEvent.Reset();
213 bool flag2 = this.startEvent.Set();
214 }
215
216 // Token: 0x060010C7 RID: 4295 RVA: 0x000531F4 File Offset: 0x000513F4
217 public void DrawTiles(TileDrawing parent, Microsoft.Xna.Framework.Vector2 screenPosition, Microsoft.Xna.Framework.Vector2 offSet, int firstTileX, int firstTileY, int lastTileX, int lastTileY, bool solidLayer, bool forRenderTargets, bool intoRenderTargets, int waterStyleOverride = -1)
218 {
219 this._firstTileX = screenPosition;
222 this.tileDrawing = parent;
223 this._lastTileX = firstTileX;
225 bool flag = autoResetEvent.Reset();
226 bool flag2 = this.startEvent.Set();
227 }
228
229 // Token: 0x060010C8 RID: 4296 RVA: 0x00053240 File Offset: 0x00051440
230 public void DrawWalls(WallDrawing parent, Microsoft.Xna.Framework.Vector2 screenPosition, Microsoft.Xna.Framework.Vector2 offSet, int firstTileX, int firstTileY, int lastTileX, int lastTileY)
231 {
233 this.wallDrawing = parent;
234 this._firstTileX = screenPosition;
237 this._lastTileX = firstTileX;
238 this._solidLayer = firstTileY != 0;
239 bool flag = autoResetEvent.Reset();
240 bool flag2 = this.startEvent.Set();
241 }
242
243 // Token: 0x060010C9 RID: 4297 RVA: 0x00053294 File Offset: 0x00051494
244 public void ExportToMinimap(LightingEngine parent, int firstTileX, int firstTileY, int lastTileX, int lastTileY)
245 {
247 this.lightingEngine = parent;
248 this._firstTileX = firstTileX;
249 this._lastTileX = firstTileY;
251 this._lastTileX = lastTileX;
252 this._solidLayer = lastTileY != 0;
253 bool flag = autoResetEvent.Reset();
254 bool flag2 = this.startEvent.Set();
255 }
256
257 // Token: 0x060010CA RID: 4298 RVA: 0x000532E8 File Offset: 0x000514E8
258 public void BlurPass1(LightMap parent, int start, int end)
259 {
261 this.lightingMap = parent;
264 this._lastTileX = end;
265 bool flag = autoResetEvent.Reset();
266 bool flag2 = this.startEvent.Set();
267 }
268
269 // Token: 0x060010CB RID: 4299 RVA: 0x0005332C File Offset: 0x0005152C
270 public void BlurPass2(LightMap parent, int start, int end)
271 {
273 this.lightingMap = parent;
276 this._lastTileX = end;
277 bool flag = autoResetEvent.Reset();
278 bool flag2 = this.startEvent.Set();
279 }
280
281 // Token: 0x060010CC RID: 4300 RVA: 0x00053370 File Offset: 0x00051570
296
297 // Token: 0x060010CD RID: 4301 RVA: 0x000021DB File Offset: 0x000003DB
298 public void DrawThread()
299 {
300 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
301 }
302
303 // Token: 0x0400207F RID: 8319
305
306 // Token: 0x04002080 RID: 8320
308
309 // Token: 0x04002081 RID: 8321
311
312 // Token: 0x04002082 RID: 8322
314
315 // Token: 0x04002083 RID: 8323
317
318 // Token: 0x04002084 RID: 8324
320
321 // Token: 0x04002085 RID: 8325
323
324 // Token: 0x04002086 RID: 8326
326
327 // Token: 0x04002087 RID: 8327
329
330 // Token: 0x04002088 RID: 8328
332
333 // Token: 0x04002089 RID: 8329
335
336 // Token: 0x0400208A RID: 8330
338
339 // Token: 0x0400208B RID: 8331
340 public bool Active;
341
342 // Token: 0x0400208C RID: 8332
343 public bool Complete = true;
344
345 // Token: 0x0400208D RID: 8333
347
348 // Token: 0x0400208E RID: 8334
350
351 // Token: 0x0400208F RID: 8335
353
354 // Token: 0x04002090 RID: 8336
355 private int _firstTileX;
356
357 // Token: 0x04002091 RID: 8337
358 private int _firstTileY;
359
360 // Token: 0x04002092 RID: 8338
361 private int _lastTileX;
362
363 // Token: 0x04002093 RID: 8339
364 private int _lastTileY;
365
366 // Token: 0x04002094 RID: 8340
367 private bool _solidLayer;
368
369 // Token: 0x04002095 RID: 8341
370 private bool _forRenderTargets;
371
372 // Token: 0x04002096 RID: 8342
373 private bool _intoRenderTargets;
374
375 // Token: 0x04002097 RID: 8343
377
378 // Token: 0x04002098 RID: 8344
379 private int _scannerTileX;
380
381 // Token: 0x04002099 RID: 8345
382 private int _scannerTileY;
383
384 // Token: 0x0400209A RID: 8346
386
387 // Token: 0x0400209B RID: 8347
388 private int _index;
389
390 // Token: 0x0400209C RID: 8348
391 private int _diff;
392
393 // Token: 0x0400209D RID: 8349
394 public bool Running;
395
396 // Token: 0x0400209E RID: 8350
398
399 // Token: 0x0400209F RID: 8351
401
402 // Token: 0x040020A0 RID: 8352
404
405 // Token: 0x040020A1 RID: 8353
407
408 // Token: 0x040020A2 RID: 8354
410
411 // Token: 0x040020A3 RID: 8355
413
414 // Token: 0x040020A4 RID: 8356
416
417 // Token: 0x020002DA RID: 730
418 private enum DrawTask
419 {
420 // Token: 0x040020A6 RID: 8358
421 None,
422 // Token: 0x040020A7 RID: 8359
424 // Token: 0x040020A8 RID: 8360
426 // Token: 0x040020A9 RID: 8361
428 // Token: 0x040020AA RID: 8362
430 // Token: 0x040020AB RID: 8363
432 // Token: 0x040020AC RID: 8364
434 // Token: 0x040020AD RID: 8365
436 // Token: 0x040020AE RID: 8366
438 // Token: 0x040020AF RID: 8367
440 }
441 }
442}
class f__AnonymousType0<< Count > j__TPar
static void ExcludeThread(ManagedThread thread)
IntPtr method_code
Definition Delegate.cs:386
IntPtr invoke_impl
Definition Delegate.cs:371
static string NewLine
static void Sleep(int millisecondsTimeout)
Definition Thread.cs:207
BatchProcessCallback(object @object, IntPtr method)
IAsyncResult BeginInvoke(int index, AsyncCallback callback, object @object)
void BlurPass2(LightMap parent, int start, int end)
ThreadedRenderManager.RenderThreadInstance.DrawTask _task
void BlurPass1(LightMap parent, int start, int end)
void DrawCurrentBackground(int bgStartX, int bgstartY, int bgLoops, int byLoopsY, int diff, Microsoft.Xna.Framework.Vector2 drawOffset)
void DrawMagmaLayer(int bgStartX, int bgstartY, int bgLoops, int byLoopsY, int diff, Microsoft.Xna.Framework.Vector2 drawOffset)
void DrawRockLayer(int bgStartX, int bgstartY, int bgLoops, int byLoopsY, int diff, Microsoft.Xna.Framework.Vector2 drawOffset)
Microsoft.Xna.Framework.Vector2 _screenPosition
void DrawTiles(TileDrawing parent, Microsoft.Xna.Framework.Vector2 screenPosition, Microsoft.Xna.Framework.Vector2 offSet, int firstTileX, int firstTileY, int lastTileX, int lastTileY, bool solidLayer, bool forRenderTargets, bool intoRenderTargets, int waterStyleOverride=-1)
void ExportToMinimap(LightingEngine parent, int firstTileX, int firstTileY, int lastTileX, int lastTileY)
void ExportTo(TileLightScanner scanner, int startX, int startY, int endX, int endY, int lightStartX, int lightStartY, LightMap outputMap)
void DrawWalls(WallDrawing parent, Microsoft.Xna.Framework.Vector2 screenPosition, Microsoft.Xna.Framework.Vector2 offSet, int firstTileX, int firstTileY, int lastTileX, int lastTileY)
static void GetTilePartition(int partitionIndex, int partitionCount, int firstTileX, int firstTileY, int lastTileX, int lastTileY, [Out] int resultFirstTileX, [Out] int resultFirstTileY, [Out] int resultLastTileX, [Out] int resultLastTileY)
static string GetStackTrace(Thread t)
AutoResetEvent[][] WaitHandles
void WaitAndProcessInOrder(ThreadedRenderManager.BatchProcessCallback callback, int numberOfThreads)
ThreadedRenderManager.RenderThreadInstance[] DrawThreads
void WaitAndProcess(ThreadedRenderManager.BatchProcessCallback callback, int numberOfThreads)
static ThreadedRenderManager Instance
static void LogError(object message)
Definition Debug.cs:62