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
StardustSky.cs
Go to the documentation of this file.
1using System;
7
9{
10 // Token: 0x020009DE RID: 2526
11 public class StardustSky : CustomSky
12 {
13 // Token: 0x06004A67 RID: 19047 RVA: 0x00266098 File Offset: 0x00264298
14 public override void OnLoad()
15 {
16 if (!true)
17 {
18 }
19 }
20
21 // Token: 0x06004A68 RID: 19048 RVA: 0x002660CC File Offset: 0x002642CC
22 public override void Update(GameTime gameTime)
23 {
24 bool isActive = this._isActive;
25 float fadeOpacity = this._fadeOpacity;
26 if (true)
27 {
28 if (isActive)
29 {
30 return;
31 }
32 }
33 else
34 {
35 while (isActive)
36 {
37 }
38 }
39 }
40
41 // Token: 0x06004A69 RID: 19049 RVA: 0x002660F8 File Offset: 0x002642F8
42 public override Color OnTileColor(Color inColor)
43 {
44 if (!true)
45 {
46 }
47 if (!true)
48 {
49 }
50 float fadeOpacity = this._fadeOpacity;
51 return 1;
52 }
53
54 // Token: 0x06004A6A RID: 19050 RVA: 0x00266118 File Offset: 0x00264318
55 public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
56 {
57 int num = 1;
58 if (num == 0)
59 {
60 }
61 int screenWidth = Main.screenWidth;
62 int screenHeight = Main.screenHeight;
63 if (num == 0)
64 {
65 }
66 float fadeOpacity = this._fadeOpacity;
67 long num2 = 0L;
69 Vector2 screenPosition = Main.screenPosition;
70 int num3 = 32768;
71 int num4 = Math.Max(0, (int)num2);
75 float fadeOpacity2 = this._fadeOpacity;
76 float num6;
77 float num5 = Math.Max(num6, num6);
82 float fadeOpacity3 = this._fadeOpacity;
84 Color color = color2 * num5;
86 if (num3 == 0)
87 {
88 }
90 int num8 = Utils.Height(this._planetTexture);
91 float alphaAmplitude = this._stars.AlphaAmplitude;
92 }
93
94 // Token: 0x06004A6B RID: 19051 RVA: 0x00266308 File Offset: 0x00264508
95 public override float GetCloudAlpha()
96 {
97 /*
98An exception occurred when decompiling this method (06004A6B)
99
100ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.Skies.StardustSky::GetCloudAlpha()
101
102 ---> System.Exception: Basic block has to end with unconditional control flow.
103{
104 Block_0:
105 stloc:float32(var_0_06, ldfld:float32(StardustSky::_fadeOpacity, ldloc:StardustSky(this)))
106}
107
108 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
109 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
110 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
111 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
112 --- End of inner exception stack trace ---
113 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
114 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
115*/;
116 }
117
118 // Token: 0x06004A6C RID: 19052 RVA: 0x0026631C File Offset: 0x0026451C
119 public override void Activate(Vector2 position, params object[] args)
120 {
121 int num = 4719;
122 int num2 = 1;
123 this._fadeOpacity = (float)num;
124 this._isActive = num2 != 0;
125 long num3 = 0L;
126 int num4 = 17224;
127 StardustSky.Star[] stars = this._stars;
128 if (num3 != 0L)
129 {
130 return;
131 }
132 StardustSky.Star[] stars2 = this._stars;
133 UnifiedRandom random = this._random;
134 if (num4 == 0)
135 {
136 }
137 long num5 = 0L;
138 float num6 = random.NextFloat();
141 StardustSky.Star[] stars3 = this._stars;
142 int num7 = random2.Next((int)num5);
144 StardustSky.Star[] stars4 = this._stars;
145 float num8 = random3.NextFloat();
147 StardustSky.Star[] stars5 = this._stars;
148 float num9 = random4.NextFloat();
149 float num10 = this._random.NextFloat();
150 StardustSky.Star[] stars6 = this._stars;
151 }
152
153 // Token: 0x06004A6D RID: 19053 RVA: 0x002663E8 File Offset: 0x002645E8
155 {
156 float depth = meteor1.Depth;
157 int num;
158 return num;
159 }
160
161 // Token: 0x06004A6E RID: 19054 RVA: 0x00266400 File Offset: 0x00264600
162 public override void Deactivate(params object[] args)
163 {
164 }
165
166 // Token: 0x06004A6F RID: 19055 RVA: 0x00266410 File Offset: 0x00264610
167 public override void Reset()
168 {
169 }
170
171 // Token: 0x06004A70 RID: 19056 RVA: 0x00266420 File Offset: 0x00264620
172 public override bool IsActive()
173 {
174 return !this._isActive || true;
175 }
176
177 // Token: 0x06004A71 RID: 19057 RVA: 0x00266438 File Offset: 0x00264638
178 public StardustSky()
179 {
180 }
181
182 // Token: 0x04008502 RID: 34050
184
185 // Token: 0x04008503 RID: 34051
187
188 // Token: 0x04008504 RID: 34052
190
191 // Token: 0x04008505 RID: 34053
193
194 // Token: 0x04008506 RID: 34054
195 private bool _isActive;
196
197 // Token: 0x04008507 RID: 34055
199
200 // Token: 0x04008508 RID: 34056
201 private float _fadeOpacity;
202
203 // Token: 0x020009DF RID: 2527
204 private struct Star
205 {
206 // Token: 0x04008509 RID: 34057
208
209 // Token: 0x0400850A RID: 34058
210 public float Depth;
211
212 // Token: 0x0400850B RID: 34059
213 public int TextureIndex;
214
215 // Token: 0x0400850C RID: 34060
216 public float SinOffset;
217
218 // Token: 0x0400850D RID: 34061
219 public float AlphaFrequency;
220
221 // Token: 0x0400850E RID: 34062
222 public float AlphaAmplitude;
223 }
224 }
225}
class f__AnonymousType0<< Count > j__TPar
static byte Max(byte val1, byte val2)
Definition Math.cs:111
override void Deactivate(params object[] args)
override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
override Color OnTileColor(Color inColor)
override void Update(GameTime gameTime)
override void Activate(Vector2 position, params object[] args)
int SortMethod(StardustSky.Star meteor1, StardustSky.Star meteor2)
static Microsoft.Xna.Framework.Vector2 screenPosition
Definition Main.cs:1973
static int screenHeight
Definition Main.cs:2015
static int screenWidth
Definition Main.cs:2001
static int Height(this Asset< Texture2D > asset)
Definition Utils.cs:701
static int Width(this Asset< Texture2D > asset)
Definition Utils.cs:696