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
SolarSky.cs
Go to the documentation of this file.
1using System;
7
9{
10 // Token: 0x020009DC RID: 2524
11 public class SolarSky : CustomSky
12 {
13 // Token: 0x06004A5C RID: 19036 RVA: 0x00265D70 File Offset: 0x00263F70
14 public override void OnLoad()
15 {
16 if (!true)
17 {
18 }
19 }
20
21 // Token: 0x06004A5D RID: 19037 RVA: 0x00265D84 File Offset: 0x00263F84
22 public override void Update(GameTime gameTime)
23 {
24 int num = 1;
25 bool isActive = this._isActive;
26 float fadeOpacity = this._fadeOpacity;
27 if (num != 0)
28 {
29 if (isActive)
30 {
31 return;
32 }
33 }
34 else
35 {
36 while (isActive)
37 {
38 }
39 }
44 }
45
46 // Token: 0x06004A5E RID: 19038 RVA: 0x00265DD4 File Offset: 0x00263FD4
47 public override Color OnTileColor(Color inColor)
48 {
49 if (!true)
50 {
51 }
52 if (!true)
53 {
54 }
55 float fadeOpacity = this._fadeOpacity;
56 return 1;
57 }
58
59 // Token: 0x06004A5F RID: 19039 RVA: 0x00265DF4 File Offset: 0x00263FF4
60 public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
61 {
62 int num = 1;
63 if (num == 0)
64 {
65 }
66 int screenWidth = Main.screenWidth;
67 int screenHeight = Main.screenHeight;
68 if (num == 0)
69 {
70 }
71 long num2 = 0L;
72 Vector2 screenPosition = Main.screenPosition;
73 int num3 = 32768;
74 int num4 = Math.Max(0, (int)num2);
78 float num5 = Math.Min(minDepth, maxDepth);
79 float num6 = Math.Max(num5, num5);
84 Color color = color2 * num6;
85 if (num3 == 0)
86 {
87 }
88 }
89
90 // Token: 0x06004A60 RID: 19040 RVA: 0x00265F64 File Offset: 0x00264164
91 public override float GetCloudAlpha()
92 {
93 /*
94An exception occurred when decompiling this method (06004A60)
95
96ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Single Terraria.GameContent.Skies.SolarSky::GetCloudAlpha()
97
98 ---> System.Exception: Basic block has to end with unconditional control flow.
99{
100 Block_0:
101 stloc:float32(var_0_06, ldfld:float32(SolarSky::_fadeOpacity, ldloc:SolarSky(this)))
102}
103
104 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
105 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
106 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
107 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
108 --- End of inner exception stack trace ---
109 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
110 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
111*/;
112 }
113
114 // Token: 0x06004A61 RID: 19041 RVA: 0x00265F78 File Offset: 0x00264178
115 public override void Activate(Vector2 position, params object[] args)
116 {
117 int num = 4719;
118 int num2 = 1;
119 this._fadeOpacity = (float)num;
120 this._isActive = num2 != 0;
121 UnifiedRandom random = this._random;
122 if (num == 0)
123 {
124 }
125 float num3 = random.NextFloat();
128 float num4 = random2.NextFloat();
129 int num5 = 3;
130 int num6 = this._random.Next(num5);
132 float num7 = this._random.NextFloat();
135 int num8 = 12;
136 int num9 = random3.Next(num8);
138 float num10 = this._random.NextFloat();
140 }
141
142 // Token: 0x06004A62 RID: 19042 RVA: 0x00266034 File Offset: 0x00264234
144 {
145 float depth = meteor1.Depth;
146 int num;
147 return num;
148 }
149
150 // Token: 0x06004A63 RID: 19043 RVA: 0x0026604C File Offset: 0x0026424C
151 public override void Deactivate(params object[] args)
152 {
153 }
154
155 // Token: 0x06004A64 RID: 19044 RVA: 0x0026605C File Offset: 0x0026425C
156 public override void Reset()
157 {
158 }
159
160 // Token: 0x06004A65 RID: 19045 RVA: 0x0026606C File Offset: 0x0026426C
161 public override bool IsActive()
162 {
163 return !this._isActive || true;
164 }
165
166 // Token: 0x06004A66 RID: 19046 RVA: 0x00266084 File Offset: 0x00264284
167 public SolarSky()
168 {
169 }
170
171 // Token: 0x040084F6 RID: 34038
173
174 // Token: 0x040084F7 RID: 34039
176
177 // Token: 0x040084F8 RID: 34040
179
180 // Token: 0x040084F9 RID: 34041
182
183 // Token: 0x040084FA RID: 34042
184 private bool _isActive;
185
186 // Token: 0x040084FB RID: 34043
188
189 // Token: 0x040084FC RID: 34044
190 private float _fadeOpacity;
191
192 // Token: 0x020009DD RID: 2525
193 private struct Meteor
194 {
195 // Token: 0x040084FD RID: 34045
197
198 // Token: 0x040084FE RID: 34046
199 public float Depth;
200
201 // Token: 0x040084FF RID: 34047
202 public int FrameCounter;
203
204 // Token: 0x04008500 RID: 34048
205 public float Scale;
206
207 // Token: 0x04008501 RID: 34049
208 public float StartX;
209 }
210 }
211}
class f__AnonymousType0<< Count > j__TPar
static byte Min(byte val1, byte val2)
Definition Math.cs:152
static byte Max(byte val1, byte val2)
Definition Math.cs:111
override Color OnTileColor(Color inColor)
Definition SolarSky.cs:47
Asset< Texture2D > _meteorTexture
Definition SolarSky.cs:181
override void Update(GameTime gameTime)
Definition SolarSky.cs:22
int SortMethod(SolarSky.Meteor meteor1, SolarSky.Meteor meteor2)
Definition SolarSky.cs:143
override void Deactivate(params object[] args)
Definition SolarSky.cs:151
override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
Definition SolarSky.cs:60
override void Activate(Vector2 position, params object[] args)
Definition SolarSky.cs:115
Asset< Texture2D > _planetTexture
Definition SolarSky.cs:175
static Microsoft.Xna.Framework.Vector2 screenPosition
Definition Main.cs:1973
static int screenHeight
Definition Main.cs:2015
static int screenWidth
Definition Main.cs:2001