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
FilterManager.cs
Go to the documentation of this file.
1using System;
7
9{
10 // Token: 0x02000784 RID: 1924
11 public class FilterManager : EffectManager<Filter>
12 {
13 // Token: 0x14000053 RID: 83
14 // (add) Token: 0x06003EFA RID: 16122 RVA: 0x0023F85C File Offset: 0x0023DA5C
15 // (remove) Token: 0x06003EFB RID: 16123 RVA: 0x0023F880 File Offset: 0x0023DA80
16 public event Action OnPostDraw
17 {
19 add
20 {
21 if (Delegate.Combine(this.OnPostDraw, value) != null)
22 {
23 }
24 }
26 remove
27 {
28 if (Delegate.Remove(this.OnPostDraw, value) != null)
29 {
30 }
31 }
32 }
33
34 // Token: 0x06003EFC RID: 16124 RVA: 0x0023F8A4 File Offset: 0x0023DAA4
36 {
37 }
38
39 // Token: 0x06003EFD RID: 16125 RVA: 0x000021DB File Offset: 0x000003DB
40 public override void OnActivate(Filter effect, Vector2 position)
41 {
42 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
43 }
44
45 // Token: 0x06003EFE RID: 16126 RVA: 0x0023F8C0 File Offset: 0x0023DAC0
47 {
48 if (this._activeFilterCount != 0 || this.OnPostDraw != null)
49 {
51 if (!true)
52 {
53 }
54 GraphicsDevice graphicsDevice;
55 graphicsDevice.SetRenderTarget(screenTarget1);
56 return;
57 }
58 }
59
60 // Token: 0x06003EFF RID: 16127 RVA: 0x000021DB File Offset: 0x000003DB
62 {
63 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
64 }
65
66 // Token: 0x06003F00 RID: 16128 RVA: 0x000021DB File Offset: 0x000003DB
67 public void UpdateFilters()
68 {
69 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
70 }
71
72 // Token: 0x06003F01 RID: 16129 RVA: 0x000021DB File Offset: 0x000003DB
74 {
75 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
76 }
77
78 // Token: 0x06003F02 RID: 16130 RVA: 0x0023F8F0 File Offset: 0x0023DAF0
79 public bool HasActiveFilter()
80 {
81 /*
82An exception occurred when decompiling this method (06003F02)
83
84ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Graphics.Effects.FilterManager::HasActiveFilter()
85
86 ---> System.Exception: Basic block has to end with unconditional control flow.
87{
88 Block_0:
89 stloc:int32(var_0_0B, ldfld:int32(LinkedList`1::count, ldfld:class [System]System.Collections.Generic.LinkedList`1<class Terraria.Graphics.Effects.Filter>[exp:LinkedList`1](FilterManager::_activeFilters, ldloc:FilterManager(this))))
90}
91
92 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
93 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
94 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
95 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
96 --- End of inner exception stack trace ---
97 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
98 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
99*/;
100 }
101
102 // Token: 0x06003F03 RID: 16131 RVA: 0x0023F908 File Offset: 0x0023DB08
103 public bool CanCapture()
104 {
105 return this._activeFilters == null || true;
106 }
107
108 // Token: 0x04007D7D RID: 32125
109 private const float OPACITY_RATE = 1f;
110
111 // Token: 0x04007D7E RID: 32126
113 private Action OnPostDraw;
114
115 // Token: 0x04007D7F RID: 32127
117
118 // Token: 0x04007D80 RID: 32128
119 private int _filterLimit = 16;
120
121 // Token: 0x04007D81 RID: 32129
123
124 // Token: 0x04007D82 RID: 32130
126
127 // Token: 0x04007D83 RID: 32131
128 private bool _captureThisFrame;
129 }
130}
class f__AnonymousType0<< Count > j__TPar
void SetRenderTarget(RenderTarget2D renderTarget)
static Delegate Combine(Delegate a, Delegate b)
Definition Delegate.cs:255
static Delegate Remove(Delegate source, Delegate value)
Definition Delegate.cs:278
void BeginCapture(RenderTarget2D screenTarget1, Color clearColor)
void EndCapture(RenderTarget2D finalTexture, RenderTarget2D screenTarget1, RenderTarget2D screenTarget2, Color clearColor)
override void OnActivate(Filter effect, Vector2 position)