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
PassLegacy.cs
Go to the documentation of this file.
1using System;
3using Terraria.IO;
5
7{
8 // Token: 0x020008D6 RID: 2262
9 public class PassLegacy : GenPass
10 {
11 // Token: 0x0600459F RID: 17823 RVA: 0x00255168 File Offset: 0x00253368
12 public PassLegacy(string name, WorldGenLegacyMethod method)
13 {
14 if (!true)
15 {
16 }
17 float weight = PassLegacy.GetWeight(name);
18 base..ctor(name, (double)weight);
19 this._method = method;
20 }
21
22 // Token: 0x060045A0 RID: 17824 RVA: 0x00255190 File Offset: 0x00253390
23 public PassLegacy(string name, WorldGenLegacyMethod method, double weight)
24 : base(name, weight)
25 {
26 this._method = method;
27 }
28
29 // Token: 0x060045A1 RID: 17825 RVA: 0x002551AC File Offset: 0x002533AC
30 private static float GetWeight(string name)
31 {
32 /*
33An exception occurred when decompiling this method (060045A1)
34
35ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.Generation.PassLegacy::GetWeight(System.String)
36
37 ---> System.Exception: Basic block has to end with unconditional control flow.
38{
39 IL_0000:
40 brtrue(IL_0000, ldc.i4:bool(1))
41}
42
43 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
44 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
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 1878
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 1846
47 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
48 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
49 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
50 --- End of inner exception stack trace ---
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 92
52 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
53*/;
54 }
55
56 // Token: 0x060045A2 RID: 17826 RVA: 0x002551BC File Offset: 0x002533BC
57 protected override void ApplyPass(GenerationProgress progress, GameConfiguration configuration)
58 {
59 WorldGenLegacyMethod method = this._method;
60 IntPtr invoke_impl = method.invoke_impl;
61 IntPtr method_code = method.method_code;
62 IntPtr method2 = method.method;
63 }
64
65 // Token: 0x060045A3 RID: 17827 RVA: 0x002551E8 File Offset: 0x002533E8
66 // Note: this type is marked as 'beforefieldinit'.
67 static PassLegacy()
68 {
69 }
70
71 // Token: 0x04008208 RID: 33288
73
74 // Token: 0x04008209 RID: 33289
76
77 // Token: 0x0400820A RID: 33290
79 }
80}
class f__AnonymousType0<< Count > j__TPar
IntPtr method_code
Definition Delegate.cs:386
IntPtr invoke_impl
Definition Delegate.cs:371
PassLegacy(string name, WorldGenLegacyMethod method)
Definition PassLegacy.cs:12
static readonly Dictionary< string, float > _weightMap_135
Definition PassLegacy.cs:72
static float GetWeight(string name)
Definition PassLegacy.cs:30
override void ApplyPass(GenerationProgress progress, GameConfiguration configuration)
Definition PassLegacy.cs:57
PassLegacy(string name, WorldGenLegacyMethod method, double weight)
Definition PassLegacy.cs:23
static readonly Dictionary< string, float > _weightMap
Definition PassLegacy.cs:75
readonly WorldGenLegacyMethod _method
Definition PassLegacy.cs:78