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
ScreenShaderData.cs
Go to the documentation of this file.
1using System;
6
8{
9 // Token: 0x0200074B RID: 1867
11 {
12 // Token: 0x17000780 RID: 1920
13 // (get) Token: 0x06003D8D RID: 15757 RVA: 0x002398C4 File Offset: 0x00237AC4
14 public float Intensity
15 {
16 get
17 {
18 /*
19An exception occurred when decompiling this method (06003D8D)
20
21ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Graphics.Shaders.ScreenShaderData::get_Intensity()
22
23 ---> System.Exception: Basic block has to end with unconditional control flow.
24{
25 Block_0:
26 stloc:float32(var_0_06, ldfld:float32(ScreenShaderData::_uIntensity, ldloc:ScreenShaderData(this)))
27}
28
29 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
30 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
31 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
32 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
33 --- End of inner exception stack trace ---
34 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
35 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
36*/;
37 }
38 }
39
40 // Token: 0x17000781 RID: 1921
41 // (get) Token: 0x06003D8E RID: 15758 RVA: 0x002398D8 File Offset: 0x00237AD8
42 public float CombinedOpacity
43 {
44 get
45 {
46 /*
47An exception occurred when decompiling this method (06003D8E)
48
49ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.Graphics.Shaders.ScreenShaderData::get_CombinedOpacity()
50
51 ---> System.Exception: Basic block has to end with unconditional control flow.
52{
53 Block_0:
54 stloc:float32(var_0_06, ldfld:float32(ScreenShaderData::_uOpacity, ldloc:ScreenShaderData(this)))
55 stloc:float32(var_1_0D, ldfld:float32(ScreenShaderData::_globalOpacity, ldloc:ScreenShaderData(this)))
56}
57
58 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
59 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
60 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
61 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
62 --- End of inner exception stack trace ---
63 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
64 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
65*/;
66 }
67 }
68
69 // Token: 0x06003D8F RID: 15759 RVA: 0x002398F4 File Offset: 0x00237AF4
71 {
72 if (!true)
73 {
74 }
75 if (true)
76 {
77 return;
78 }
79 if (!true)
80 {
81 }
82 this._uIntensity = (float)16256;
83 this._uSecondaryColor.Z = (float)1;
84 if (!true)
85 {
86 }
87 if (!true)
88 {
89 }
90 if (!true)
91 {
92 }
94 if (true)
95 {
96 return;
97 }
98 if (true)
99 {
100 return;
101 }
102 if (!true)
103 {
104 }
105 if (!true)
106 {
107 }
108 base..ctor();
110 }
111
112 // Token: 0x06003D90 RID: 15760 RVA: 0x00239950 File Offset: 0x00237B50
113 public ScreenShaderData(Ref<Effect> shader, string passName)
114 {
115 if (!true)
116 {
117 }
118 if (true)
119 {
120 return;
121 }
122 if (!true)
123 {
124 }
125 this._uIntensity = (float)16256;
126 this._uSecondaryColor.Z = (float)1;
127 if (!true)
128 {
129 }
130 if (!true)
131 {
132 }
133 if (!true)
134 {
135 }
137 if (true)
138 {
139 return;
140 }
141 if (true)
142 {
143 return;
144 }
145 if (!true)
146 {
147 }
148 base..ctor();
149 this._shader = shader;
150 }
151
152 // Token: 0x06003D91 RID: 15761 RVA: 0x002399A8 File Offset: 0x00237BA8
153 public virtual void Update(GameTime gameTime)
154 {
155 }
156
157 // Token: 0x06003D92 RID: 15762 RVA: 0x002399B8 File Offset: 0x00237BB8
158 public override void Apply()
159 {
160 if (!true)
161 {
162 }
163 if (!true)
164 {
165 }
166 int screenWidth = Main.screenWidth;
167 int screenHeight = Main.screenHeight;
168 if (!true)
169 {
170 }
171 Vector2 screenPosition = Main.screenPosition;
172 !0 value = this._shader.Value;
173 !0 value2 = this._shader.Value;
174 float uOpacity = this._uOpacity;
175 float globalOpacity = this._globalOpacity;
176 !0 value3 = this._shader.Value;
177 float x = this._uSecondaryColor.X;
178 float y = this._uSecondaryColor.Y;
179 float z = this._uSecondaryColor.Z;
180 !0 value4 = this._shader.Value;
181 !0 value5 = this._shader.Value;
182 !0 value6 = this._shader.Value;
183 !0 value7 = this._shader.Value;
184 float x2 = this._uTargetPosition.X;
185 float y2 = this._uTargetPosition.Y;
186 !0 value8 = this._shader.Value;
187 float x3 = this._uImageOffset.X;
188 float y3 = this._uImageOffset.Y;
189 !0 value9 = this._shader.Value;
190 float uIntensity = this._uIntensity;
191 !0 value10 = this._shader.Value;
192 float uProgress = this._uProgress;
193 !0 value11 = this._shader.Value;
194 float x4 = this._uDirection.X;
195 float y4 = this._uDirection.Y;
196 !0 value12 = this._shader.Value;
199 string <Name>k__BackingField = uCustomImages.<Name>k__BackingField;
202 if (effectParameter != null)
203 {
205 }
206 if (<Name>k__BackingField == null)
207 {
209 base.Apply();
210 return;
211 }
212 if (uAssetImages2 == null)
213 {
214 }
215 GraphicsDevice graphicsDevice;
216 Texture2D[] textures = graphicsDevice.Textures;
217 if (<Name>k__BackingField != null)
218 {
219 !0 value13 = this._shader.Value;
220 string text2;
221 string text = "uImageSize" + text2;
223 if (uCustomImages == null)
224 {
225 }
226 return;
227 }
228 throw new ArrayTypeMismatchException();
229 }
230
231 // Token: 0x06003D93 RID: 15763 RVA: 0x00239B98 File Offset: 0x00237D98
233 {
234 return this;
235 }
236
237 // Token: 0x06003D94 RID: 15764 RVA: 0x00239BA8 File Offset: 0x00237DA8
238 public ScreenShaderData UseIntensity(float intensity)
239 {
240 return this;
241 }
242
243 // Token: 0x06003D95 RID: 15765 RVA: 0x00239BB8 File Offset: 0x00237DB8
244 public ScreenShaderData UseColor(float r, float g, float b)
245 {
246 return this;
247 }
248
249 // Token: 0x06003D96 RID: 15766 RVA: 0x00239BC8 File Offset: 0x00237DC8
250 public ScreenShaderData UseProgress(float progress)
251 {
252 return this;
253 }
254
255 // Token: 0x06003D97 RID: 15767 RVA: 0x00239BD8 File Offset: 0x00237DD8
257 {
259 if (samplerState == null || samplerState != null)
260 {
263 if (image == null || image != null)
264 {
265 return this;
266 }
267 }
268 throw new ArrayTypeMismatchException();
269 }
270
271 // Token: 0x06003D98 RID: 15768 RVA: 0x00239C10 File Offset: 0x00237E10
272 public ScreenShaderData UseImage(string path, int index = 0, [Optional] SamplerState samplerState)
273 {
274 int num = 1;
276 if (num == 0)
277 {
278 }
281 if (samplerState == null || samplerState != null)
282 {
283 return this;
284 }
285 throw new ArrayTypeMismatchException();
286 }
287
288 // Token: 0x06003D99 RID: 15769 RVA: 0x00239C44 File Offset: 0x00237E44
290 {
291 return this;
292 }
293
294 // Token: 0x06003D9A RID: 15770 RVA: 0x00239C54 File Offset: 0x00237E54
296 {
297 return this;
298 }
299
300 // Token: 0x06003D9B RID: 15771 RVA: 0x00239C64 File Offset: 0x00237E64
302 {
303 return this;
304 }
305
306 // Token: 0x06003D9C RID: 15772 RVA: 0x00239C74 File Offset: 0x00237E74
308 {
309 return this;
310 }
311
312 // Token: 0x06003D9D RID: 15773 RVA: 0x00239C84 File Offset: 0x00237E84
314 {
315 return this;
316 }
317
318 // Token: 0x06003D9E RID: 15774 RVA: 0x00239C94 File Offset: 0x00237E94
319 public ScreenShaderData UseSecondaryColor(float r, float g, float b)
320 {
321 return this;
322 }
323
324 // Token: 0x06003D9F RID: 15775 RVA: 0x00239CA4 File Offset: 0x00237EA4
326 {
327 return this;
328 }
329
330 // Token: 0x06003DA0 RID: 15776 RVA: 0x00239CB4 File Offset: 0x00237EB4
332 {
333 return this;
334 }
335
336 // Token: 0x06003DA1 RID: 15777 RVA: 0x00239CC4 File Offset: 0x00237EC4
338 {
339 return this;
340 }
341
342 // Token: 0x06003DA2 RID: 15778 RVA: 0x00239CD4 File Offset: 0x00237ED4
344 {
346 return this;
347 }
348
349 // Token: 0x06003DA3 RID: 15779 RVA: 0x00239CEC File Offset: 0x00237EEC
351 {
352 return this;
353 }
354
355 // Token: 0x04007C5A RID: 31834
357
358 // Token: 0x04007C5B RID: 31835
360
361 // Token: 0x04007C5C RID: 31836
362 private float _uOpacity;
363
364 // Token: 0x04007C5D RID: 31837
365 private float _globalOpacity;
366
367 // Token: 0x04007C5E RID: 31838
368 private float _uIntensity;
369
370 // Token: 0x04007C5F RID: 31839
372
373 // Token: 0x04007C60 RID: 31840
375
376 // Token: 0x04007C61 RID: 31841
377 private float _uProgress;
378
379 // Token: 0x04007C62 RID: 31842
381
382 // Token: 0x04007C63 RID: 31843
384
385 // Token: 0x04007C64 RID: 31844
387
388 // Token: 0x04007C65 RID: 31845
390
391 // Token: 0x04007C66 RID: 31846
393 }
394}
class f__AnonymousType0<< Count > j__TPar
ScreenShaderData UseGlobalOpacity(float opacity)
ScreenShaderData UseImage(Texture2D image, int index=0, [Optional] SamplerState samplerState)
ScreenShaderData UseImage(string path, int index=0, [Optional] SamplerState samplerState)
ScreenShaderData UseSecondaryColor(Vector3 color)
ScreenShaderData UseProgress(float progress)
ScreenShaderData UseIntensity(float intensity)
ScreenShaderData UseSecondaryColor(float r, float g, float b)
virtual ScreenShaderData GetSecondaryShader(Player player)
ScreenShaderData UseTargetPosition(Vector2 position)
ScreenShaderData UseSecondaryColor(Color color)
ScreenShaderData UseImageOffset(Vector2 offset)
ScreenShaderData UseImageScale(Vector2 scale, int index=0)
ScreenShaderData UseColor(Vector3 color)
ScreenShaderData UseOpacity(float opacity)
ScreenShaderData UseColor(float r, float g, float b)
ScreenShaderData(Ref< Effect > shader, string passName)
virtual void Update(GameTime gameTime)
ScreenShaderData UseDirection(Vector2 direction)
readonly Ref< Effect > _shader
Definition ShaderData.cs:65
static Microsoft.Xna.Framework.Vector2 screenPosition
Definition Main.cs:1973
static int screenHeight
Definition Main.cs:2015
static int screenWidth
Definition Main.cs:2001
T Value
Definition Ref.cs:20