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
SlimeSky.cs
Go to the documentation of this file.
1using System;
8
10{
11 // Token: 0x020009DA RID: 2522
12 public class SlimeSky : CustomSky
13 {
14 // Token: 0x06004A4E RID: 19022 RVA: 0x00265920 File Offset: 0x00263B20
15 public override void OnLoad()
16 {
17 if (!true)
18 {
19 }
20 string text2;
21 string text = "Images/Misc/Sky_Slime_" + text2;
22 }
23
24 // Token: 0x06004A4F RID: 19023 RVA: 0x00265958 File Offset: 0x00263B58
25 private void GenerateSlimes()
26 {
27 if (!true)
28 {
29 }
30 this._slimes = -1073741824;
31 int num = 1;
32 Vector2 screenPosition = Main.screenPosition;
33 int screenHeight = Main.screenHeight;
35 long num2 = 0L;
36 int num3 = this._random.Next((int)num2, -1073741824);
38 double num4 = this._random.NextDouble();
40 int num5 = 2;
41 int frameWidth = slimes3.FrameWidth;
42 UnifiedRandom random = this._random;
44 int num6 = random.Next(num5);
45 bool active = slimes3.Active;
46 int num7 = 60;
47 if (this._random.Next(num7) != 0)
48 {
50 int num8 = 30;
51 if (random2.Next(num8) == 0)
52 {
55 double num9 = this._random.NextDouble();
56 return;
57 }
58 }
59 else
60 {
63 double num10 = this._random.NextDouble();
65 }
67 slimes7._texture = num;
68 int frameWidth2 = slimes7.FrameWidth;
70 }
71
72 // Token: 0x06004A50 RID: 19024 RVA: 0x00265A84 File Offset: 0x00263C84
73 public override void Update(GameTime gameTime)
74 {
75 if (!true)
76 {
77 }
78 }
79
80 // Token: 0x06004A51 RID: 19025 RVA: 0x00265BA4 File Offset: 0x00263DA4
81 public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
82 {
83 if (!true)
84 {
85 }
86 Vector2 screenPosition = Main.screenPosition;
87 bool gameMenu = Main.gameMenu;
88 int frameWidth = this._slimes.FrameWidth;
89 }
90
91 // Token: 0x06004A52 RID: 19026 RVA: 0x00265C8C File Offset: 0x00263E8C
92 public override void Activate(Vector2 position, params object[] args)
93 {
94 this.GenerateSlimes();
95 this._isActive = true;
96 }
97
98 // Token: 0x06004A53 RID: 19027 RVA: 0x00265CA8 File Offset: 0x00263EA8
99 public override void Deactivate(params object[] args)
100 {
101 this._isLeaving = true;
102 }
103
104 // Token: 0x06004A54 RID: 19028 RVA: 0x00265CBC File Offset: 0x00263EBC
105 public override void Reset()
106 {
107 }
108
109 // Token: 0x06004A55 RID: 19029 RVA: 0x00265CCC File Offset: 0x00263ECC
110 public override bool IsActive()
111 {
112 return this._isActive;
113 }
114
115 // Token: 0x06004A56 RID: 19030 RVA: 0x00265CE0 File Offset: 0x00263EE0
116 public SlimeSky()
117 {
118 }
119
120 // Token: 0x040084E6 RID: 34022
122
123 // Token: 0x040084E7 RID: 34023
125
126 // Token: 0x040084E8 RID: 34024
128
129 // Token: 0x040084E9 RID: 34025
130 private int _slimesRemaining;
131
132 // Token: 0x040084EA RID: 34026
133 private bool _isActive;
134
135 // Token: 0x040084EB RID: 34027
136 private bool _isLeaving;
137
138 // Token: 0x020009DB RID: 2523
139 private struct Slime
140 {
141 // Token: 0x17000856 RID: 2134
142 // (get) Token: 0x06004A57 RID: 19031 RVA: 0x000021DB File Offset: 0x000003DB
143 // (set) Token: 0x06004A58 RID: 19032 RVA: 0x00265CF4 File Offset: 0x00263EF4
145 {
146 get
147 {
148 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
149 }
150 set
151 {
153 int width = value.Width;
154 this.FrameWidth = width;
155 int height = value.Height;
156 this.FrameHeight = height;
157 }
158 }
159
160 // Token: 0x17000857 RID: 2135
161 // (get) Token: 0x06004A59 RID: 19033 RVA: 0x00265D24 File Offset: 0x00263F24
162 // (set) Token: 0x06004A5A RID: 19034 RVA: 0x00265D38 File Offset: 0x00263F38
163 public int Frame
164 {
165 get
166 {
167 return this._frame;
168 }
169 set
170 {
171 int num = 43691;
172 this._frame = num;
173 }
174 }
175
176 // Token: 0x06004A5B RID: 19035 RVA: 0x00265D54 File Offset: 0x00263F54
178 {
179 /*
180An exception occurred when decompiling this method (06004A5B)
181
182ICSharpCode.Decompiler.DecompilerException: Error decompiling Microsoft.Xna.Framework.Rectangle Terraria.GameContent.Skies.SlimeSky/Slime::GetSourceRectangle()
183
184 ---> System.Exception: Basic block has to end with unconditional control flow.
185{
186 Block_0:
187 stloc:int32(var_0_06, ldfld:int32(Slime::FrameHeight, ldloc:valuetype Terraria.GameContent.Skies.SlimeSky/Slime&(this)))
188 stloc:float32(var_1_0D, ldfld:float32(Slime::Speed, ldloc:valuetype Terraria.GameContent.Skies.SlimeSky/Slime&(this)))
189}
190
191 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
192 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
193 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
194 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
195 --- End of inner exception stack trace ---
196 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
197 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
198*/;
199 }
200
201 // Token: 0x040084EC RID: 34028
202 private const int MAX_FRAMES = 4;
203
204 // Token: 0x040084ED RID: 34029
205 private const int FRAME_RATE = 6;
206
207 // Token: 0x040084EE RID: 34030
209
210 // Token: 0x040084EF RID: 34031
212
213 // Token: 0x040084F0 RID: 34032
214 public float Depth;
215
216 // Token: 0x040084F1 RID: 34033
217 public int FrameHeight;
218
219 // Token: 0x040084F2 RID: 34034
220 public int FrameWidth;
221
222 // Token: 0x040084F3 RID: 34035
223 public float Speed;
224
225 // Token: 0x040084F4 RID: 34036
226 public bool Active;
227
228 // Token: 0x040084F5 RID: 34037
229 private int _frame;
230 }
231 }
232}
class f__AnonymousType0<< Count > j__TPar
override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth)
Definition SlimeSky.cs:81
override void Update(GameTime gameTime)
Definition SlimeSky.cs:73
override void Deactivate(params object[] args)
Definition SlimeSky.cs:99
override void Activate(Vector2 position, params object[] args)
Definition SlimeSky.cs:92
Asset< Texture2D >[] _textures
Definition SlimeSky.cs:121
static Microsoft.Xna.Framework.Vector2 screenPosition
Definition Main.cs:1973
static int screenHeight
Definition Main.cs:2015
static bool gameMenu
Definition Main.cs:2673