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
Game.cs
Go to the documentation of this file.
1using System;
6using Terraria;
7
9{
10 // Token: 0x02000333 RID: 819
11 public class Game : IDisposable
12 {
13 // Token: 0x170001FE RID: 510
14 // (get) Token: 0x06001476 RID: 5238 RVA: 0x0005EB88 File Offset: 0x0005CD88
15 // (set) Token: 0x06001477 RID: 5239 RVA: 0x0005EB9C File Offset: 0x0005CD9C
16 public ContentManager Content
17 {
18 get
19 {
20 return this.content;
21 }
22 set
23 {
25 }
26 }
27
28 // Token: 0x170001FF RID: 511
29 // (get) Token: 0x06001478 RID: 5240 RVA: 0x0005EBB0 File Offset: 0x0005CDB0
31 {
32 get
33 {
34 /*
35An exception occurred when decompiling this method (06001478)
36
37ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Graphics.GraphicsDevice Microsoft.Xna.Framework.Game::get_GraphicsDevice()
38
39 ---> System.Exception: Basic block has to end with unconditional control flow.
40{
41 IL_0000:
42 brtrue(IL_0000, ldfld:GraphicsDevice[exp:bool](Game::graphicsDevice, ldloc:Game(this)))
43}
44
45 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
46 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
47 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
48 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
49 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
50 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
51 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
52 --- End of inner exception stack trace ---
53 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
54 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
55*/;
56 }
57 }
58
59 // Token: 0x17000200 RID: 512
60 // (get) Token: 0x06001479 RID: 5241 RVA: 0x0005EBC4 File Offset: 0x0005CDC4
61 // (set) Token: 0x0600147A RID: 5242 RVA: 0x0005EBD8 File Offset: 0x0005CDD8
62 public bool IsActive
63 {
64 get
65 {
66 return this._active;
67 }
68 set
69 {
70 }
71 }
72
73 // Token: 0x0600147B RID: 5243 RVA: 0x0005EBE8 File Offset: 0x0005CDE8
74 public Game()
75 {
76 }
77
78 // Token: 0x0600147C RID: 5244 RVA: 0x0005EC0C File Offset: 0x0005CE0C
79 protected virtual void Update(GameTime gameTime)
80 {
81 }
82
83 // Token: 0x17000201 RID: 513
84 // (get) Token: 0x0600147D RID: 5245 RVA: 0x0005EC1C File Offset: 0x0005CE1C
86 {
87 get
88 {
89 return this._components;
90 }
91 }
92
93 // Token: 0x0600147E RID: 5246 RVA: 0x0005EC30 File Offset: 0x0005CE30
94 public void UnityAwake()
95 {
96 if (!true)
97 {
98 }
100 }
101
102 // Token: 0x0600147F RID: 5247 RVA: 0x0005EC48 File Offset: 0x0005CE48
104 {
105 if (!true)
106 {
107 }
112 this._initialised = true;
113 }
114
115 // Token: 0x06001480 RID: 5248 RVA: 0x0005EC98 File Offset: 0x0005CE98
116 public void UnityStart()
117 {
118 if (!true)
119 {
120 }
122 long num = 0L;
123 this.initialiseCallBack(num);
124 }
125
126 // Token: 0x06001481 RID: 5249 RVA: 0x0005ECBC File Offset: 0x0005CEBC
128 {
129 this._serverRunning = true;
130 if (!true)
131 {
132 }
136 if (!true)
137 {
138 }
141 }
142
143 // Token: 0x06001482 RID: 5250 RVA: 0x0005ECF8 File Offset: 0x0005CEF8
145 {
146 }
147
148 // Token: 0x06001483 RID: 5251 RVA: 0x0005ED08 File Offset: 0x0005CF08
150 {
151 bool serverRunning = this._serverRunning;
152 if (serverRunning)
153 {
154 TimeSpan totalTime = this._totalTime;
155 if (!serverRunning)
156 {
157 }
162 bool flag = timeSpan > timeSpan2;
164 DateTime dateTime;
165 this._lastUpdate = dateTime;
170 bool serverRunning2 = this._serverRunning;
171 if (serverRunning2)
172 {
173 if (!serverRunning2)
174 {
175 }
178 }
180 if (!serverRunning2)
181 {
182 }
188 return;
189 }
190 }
191
192 // Token: 0x06001484 RID: 5252 RVA: 0x0005EDD8 File Offset: 0x0005CFD8
193 public void UnityUpdate(float elapsedTime)
194 {
195 bool initialised = this._initialised;
196 if (!initialised)
197 {
198 return;
199 }
200 if (!initialised)
201 {
202 }
204 int num;
205 if (!this._uiHidden)
206 {
207 num = 1;
208 this._uiHidden = num != 0;
209 }
210 if (num == 0)
211 {
212 }
217 bool flag2 = this.highFrameRate;
218 if (flag2)
219 {
220 if (!flag2)
221 {
222 }
223 if (!flag2)
224 {
225 }
231 return;
232 }
234 int num2 = this.updateCount;
236 DateTime dateTime = this.updateTimeStart;
237 if (num2 == 0)
238 {
239 }
240 double totalMilliseconds = (now3 - dateTime).TotalMilliseconds;
241 int num3 = this.updateCount;
244 int num4 = 1;
245 this.highFrameRate = num4 != 0;
246 int num5;
247 if (!this.updateModeVariable)
248 {
249 num5 = 1;
251 return;
252 }
253 if (num5 == 0)
254 {
255 }
257 if (num5 == 0)
258 {
259 }
261 this.UnityUpdate((float)totalMilliseconds);
262 if (num5 == 0)
263 {
264 }
265 TimeSpan totalTime = this._totalTime;
267 if (num5 == 0)
268 {
269 }
272 bool flag3 = timeSpan4 > timeSpan5;
279 bool serverRunning = this._serverRunning;
280 if (serverRunning)
281 {
282 if (!serverRunning)
283 {
284 }
287 }
289 if (!serverRunning)
290 {
291 }
297 }
298
299 // Token: 0x06001485 RID: 5253 RVA: 0x0005EFDC File Offset: 0x0005D1DC
300 public void UnityDraw()
301 {
302 int num = 1;
303 if (num == 0)
304 {
305 }
307 if (num == 0)
308 {
309 }
311 if (num == 0)
312 {
313 }
318 }
319
320 // Token: 0x06001486 RID: 5254 RVA: 0x0005F028 File Offset: 0x0005D228
321 protected virtual void Draw(GameTime gameTime)
322 {
323 }
324
325 // Token: 0x06001487 RID: 5255 RVA: 0x0005F038 File Offset: 0x0005D238
326 protected virtual void Initialize()
327 {
328 }
329
330 // Token: 0x06001488 RID: 5256 RVA: 0x0005F048 File Offset: 0x0005D248
331 protected virtual void LoadContent()
332 {
333 }
334
335 // Token: 0x06001489 RID: 5257 RVA: 0x0005F058 File Offset: 0x0005D258
336 protected virtual void UnloadContent()
337 {
338 }
339
340 // Token: 0x0600148A RID: 5258 RVA: 0x0005F068 File Offset: 0x0005D268
341 protected virtual void Exit()
342 {
343 }
344
345 // Token: 0x17000202 RID: 514
346 // (get) Token: 0x0600148B RID: 5259 RVA: 0x000021DB File Offset: 0x000003DB
348 {
349 get
350 {
351 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
352 }
353 }
354
355 // Token: 0x17000203 RID: 515
356 // (get) Token: 0x0600148C RID: 5260 RVA: 0x0005F078 File Offset: 0x0005D278
357 public GameServiceContainer Services
358 {
359 get
360 {
361 if (this.content.serviceProvider != null)
362 {
363 }
364 throw new InvalidCastException();
365 }
366 }
367
368 // Token: 0x0600148D RID: 5261 RVA: 0x000021DB File Offset: 0x000003DB
369 internal void Run()
370 {
371 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
372 }
373
374 // Token: 0x0600148E RID: 5262 RVA: 0x0005F098 File Offset: 0x0005D298
375 public void Dispose()
376 {
377 }
378
379 // Token: 0x0600148F RID: 5263 RVA: 0x0005F0A8 File Offset: 0x0005D2A8
380 internal void Begin()
381 {
382 }
383
384 // Token: 0x06001490 RID: 5264 RVA: 0x0005F0B8 File Offset: 0x0005D2B8
385 internal void Tick(float deltaTime)
386 {
387 }
388
389 // Token: 0x06001491 RID: 5265 RVA: 0x0005F0C8 File Offset: 0x0005D2C8
390 // Note: this type is marked as 'beforefieldinit'.
391 static Game()
392 {
393 if (!true)
394 {
395 }
396 }
397
398 // Token: 0x04002290 RID: 8848
400
401 // Token: 0x04002291 RID: 8849
403
404 // Token: 0x04002292 RID: 8850
406
407 // Token: 0x04002293 RID: 8851
408 private long totalTicks;
409
410 // Token: 0x04002294 RID: 8852
411 private bool _active = true;
412
413 // Token: 0x04002295 RID: 8853
414 public bool IsMouseVisible;
415
416 // Token: 0x04002296 RID: 8854
417 public bool IsFixedTimeStep;
418
419 // Token: 0x04002297 RID: 8855
421
422 // Token: 0x04002298 RID: 8856
424
425 // Token: 0x04002299 RID: 8857
427
428 // Token: 0x0400229A RID: 8858
429 private bool _initialised;
430
431 // Token: 0x0400229B RID: 8859
432 private bool _uiHidden;
433
434 // Token: 0x0400229C RID: 8860
435 private bool _serverRunning;
436
437 // Token: 0x0400229D RID: 8861
438 private static TimeSpan FrameTickTime;
439
440 // Token: 0x0400229E RID: 8862
442
443 // Token: 0x0400229F RID: 8863
444 private static TimeSpan FrameIgnoreTime;
445
446 // Token: 0x040022A0 RID: 8864
447 private static GameTime RunGameTime;
448
449 // Token: 0x040022A1 RID: 8865
450 private static DateTime lastFrameUpdate;
451
452 // Token: 0x040022A2 RID: 8866
453 private static DateTime[] lastFrameTime;
454
455 // Token: 0x040022A3 RID: 8867
456 private static DateTime[] frameTime;
457
458 // Token: 0x040022A4 RID: 8868
459 private static int frameTimeCounter;
460
461 // Token: 0x040022A5 RID: 8869
462 private bool updateModeVariable = true;
463
464 // Token: 0x040022A6 RID: 8870
465 private int updateCount;
466
467 // Token: 0x040022A7 RID: 8871
469
470 // Token: 0x040022A8 RID: 8872
472
473 // Token: 0x040022A9 RID: 8873
474 private int fpsCount;
475
476 // Token: 0x040022AA RID: 8874
477 private int slowFrameCount;
478
479 // Token: 0x040022AB RID: 8875
480 private int oddFrameCount;
481
482 // Token: 0x040022AC RID: 8876
483 private bool highFrameRate;
484 }
485}
class f__AnonymousType0<< Count > j__TPar
virtual void Update(GameTime gameTime)
Definition Game.cs:79
GameComponentCollection Components
Definition Game.cs:86
GraphicsDevice graphicsDevice
Definition Game.cs:405
static TimeSpan FrameIgnoreTime
Definition Game.cs:444
static TimeSpan FrameTickTime
Definition Game.cs:438
GameComponentCollection _components
Definition Game.cs:399
static TimeSpan FrameClampTickTime
Definition Game.cs:441
virtual void Exit()
Definition Game.cs:341
virtual void LoadContent()
Definition Game.cs:331
static DateTime lastFrameUpdate
Definition Game.cs:450
void Tick(float deltaTime)
Definition Game.cs:385
void UnityUpdate(float elapsedTime)
Definition Game.cs:193
static int frameTimeCounter
Definition Game.cs:459
static DateTime[] frameTime
Definition Game.cs:456
ContentManager content
Definition Game.cs:402
static DateTime[] lastFrameTime
Definition Game.cs:453
void UnityServerUpdate(float elapsedTime)
Definition Game.cs:149
virtual void Draw(GameTime gameTime)
Definition Game.cs:321
void initialiseCallBack(object threadContext)
Definition Game.cs:103
virtual void Initialize()
Definition Game.cs:326
virtual void UnloadContent()
Definition Game.cs:336
static GameTime RunGameTime
Definition Game.cs:447
static void Sleep(int millisecondsTimeout)
Definition Thread.cs:207
static void FlushBatches()
Definition Main.cs:5092
static void UpdateTrialMode()
Definition Main.cs:6195
static void ProcessAsyncLoad()
Definition Main.cs:6951
static void ServerUpdateFrame()
Definition Netplay.cs:250
static void UpdateClientNet()
Definition Netplay.cs:269
static void ServerLoopUpdateFrame()
Definition Netplay.cs:408
static void ExecuteThreadTime()
static bool PendingAssetUnload()
static void LoadTextureDBs()
static void ActionPendingUnloadAssets(bool fromLowMemory=false)
static DateTime Now
Definition DateTime.cs:530
static TimeSpan FromSeconds(double value)
Definition TimeSpan.cs:284