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
ActiveSound.cs
Go to the documentation of this file.
1using System;
6
8{
9 // Token: 0x02000683 RID: 1667
10 public class ActiveSound
11 {
12 // Token: 0x170006BE RID: 1726
13 // (get) Token: 0x060037A9 RID: 14249 RVA: 0x002220E4 File Offset: 0x002202E4
14 // (set) Token: 0x060037AA RID: 14250 RVA: 0x002220F8 File Offset: 0x002202F8
16 {
18 get
19 {
20 return this.<Sound>k__BackingField;
21 }
23 private set
24 {
26 }
27 }
28
29 // Token: 0x170006BF RID: 1727
30 // (get) Token: 0x060037AB RID: 14251 RVA: 0x0022210C File Offset: 0x0022030C
31 // (set) Token: 0x060037AC RID: 14252 RVA: 0x00222120 File Offset: 0x00220320
33 {
35 get
36 {
37 return this.<Style>k__BackingField;
38 }
40 private set
41 {
43 }
44 }
45
46 // Token: 0x170006C0 RID: 1728
47 // (get) Token: 0x060037AD RID: 14253 RVA: 0x00222134 File Offset: 0x00220334
48 public bool IsPlaying
49 {
50 get
51 {
52 /*
53An exception occurred when decompiling this method (060037AD)
54
55ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Audio.ActiveSound::get_IsPlaying()
56
57 ---> System.Exception: Basic block has to end with unconditional control flow.
58{
59 Block_0:
60 stloc:SoundEffectInstance(var_0_06, ldfld:SoundEffectInstance(ActiveSound::<Sound>k__BackingField, ldloc:ActiveSound(this)))
61}
62
63 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
64 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
65 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
66 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
67 --- End of inner exception stack trace ---
68 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
69 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
70*/;
71 }
72 }
73
74 // Token: 0x060037AE RID: 14254 RVA: 0x00222148 File Offset: 0x00220348
75 public ActiveSound(SoundStyle style, Vector2 position)
76 {
77 this.Volume = (float)16256;
78 float pitchVariance = style._pitchVariance;
79 this.Style = style;
81 this.Play();
82 }
83
84 // Token: 0x060037AF RID: 14255 RVA: 0x00222184 File Offset: 0x00220384
85 public ActiveSound(SoundStyle style)
86 {
87 if (!true)
88 {
89 }
90 if (!true)
91 {
92 }
93 this.Volume = (float)16256;
94 float pitchVariance = style._pitchVariance;
95 this.IsGlobal = true;
96 this.Style = style;
98 this.Play();
99 }
100
101 // Token: 0x060037B0 RID: 14256 RVA: 0x002221CC File Offset: 0x002203CC
103 {
104 this.Volume = (float)16256;
105 float pitchVariance = style._pitchVariance;
106 this.Style = style;
108 }
109
110 // Token: 0x060037B1 RID: 14257 RVA: 0x00222200 File Offset: 0x00220400
111 private void Play()
112 {
115 float pitch = soundEffectInstance._pitch;
116 float randomPitch = this.<Style>k__BackingField.GetRandomPitch();
118 float pitch2 = soundEffectInstance._pitch;
121 this.<Sound>k__BackingField = soundEffectInstance;
122 this.Update();
123 }
124
125 // Token: 0x060037B2 RID: 14258 RVA: 0x00222254 File Offset: 0x00220454
127 {
130 float pitch = soundEffectInstance._pitch;
131 float randomPitch = this.<Style>k__BackingField.GetRandomPitch();
133 float pitch2 = soundEffectInstance._pitch;
135 this.Condition = condition;
137 this.<Sound>k__BackingField = soundEffectInstance;
138 this.Update();
139 }
140
141 // Token: 0x060037B3 RID: 14259 RVA: 0x002222AC File Offset: 0x002204AC
142 public void Stop()
143 {
144 if (this.<Sound>k__BackingField != null)
145 {
146 return;
147 }
148 }
149
150 // Token: 0x060037B4 RID: 14260 RVA: 0x002222C4 File Offset: 0x002204C4
151 public void Pause()
152 {
154 if (soundEffectInstance == null || soundEffectInstance != null)
155 {
156 return;
157 }
159 }
160
161 // Token: 0x060037B5 RID: 14261 RVA: 0x002222E8 File Offset: 0x002204E8
162 public void Resume()
163 {
164 if (this.<Sound>k__BackingField != null)
165 {
167 return;
168 }
169 }
170
171 // Token: 0x060037B6 RID: 14262 RVA: 0x00222308 File Offset: 0x00220508
172 public void Update()
173 {
174 if (this.<Sound>k__BackingField != null)
175 {
177 if (condition != null)
178 {
179 IntPtr invoke_impl = condition.invoke_impl;
180 IntPtr method_code = condition.method_code;
181 IntPtr method = condition.method;
182 }
183 return;
184 }
185 }
186
187 // Token: 0x040078A1 RID: 30881
189 private SoundEffectInstance <Sound>k__BackingField;
190
191 // Token: 0x040078A2 RID: 30882
192 public readonly bool IsGlobal;
193
194 // Token: 0x040078A3 RID: 30883
196
197 // Token: 0x040078A4 RID: 30884
198 public float Volume;
199
200 // Token: 0x040078A5 RID: 30885
201 public float Pitch;
202
203 // Token: 0x040078A6 RID: 30886
205 private SoundStyle <Style>k__BackingField;
206
207 // Token: 0x040078A7 RID: 30887
209
210 // Token: 0x02000684 RID: 1668
212 {
213 // Token: 0x060037B7 RID: 14263 RVA: 0x00222444 File Offset: 0x00220644
214 public LoopedPlayCondition(object @object, IntPtr method)
215 {
217 this.m_target = @object;
219 this.method_code = this;
220 }
221
222 // Token: 0x060037B8 RID: 14264 RVA: 0x00222498 File Offset: 0x00220698
223 public bool Invoke()
224 {
225 /*
226An exception occurred when decompiling this method (060037B8)
227
228ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Terraria.Audio.ActiveSound/LoopedPlayCondition::Invoke()
229
230 ---> System.Exception: Basic block has to end with unconditional control flow.
231{
232 Block_0:
233 stloc:native int(var_0_06, ldfld:native int(Delegate::method_code, ldloc:LoopedPlayCondition[exp:Delegate](this)))
234 stloc:native int(var_1_0D, ldfld:native int(Delegate::invoke_impl, ldloc:LoopedPlayCondition[exp:Delegate](this)))
235 stloc:native int(var_2_14, ldfld:native int(Delegate::method, ldloc:LoopedPlayCondition[exp:Delegate](this)))
236}
237
238 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
239 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
240 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
241 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
242 --- End of inner exception stack trace ---
243 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
244 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
245*/;
246 }
247
248 // Token: 0x060037B9 RID: 14265 RVA: 0x000021DB File Offset: 0x000003DB
249 public IAsyncResult BeginInvoke(AsyncCallback callback, object @object)
250 {
251 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
252 }
253
254 // Token: 0x060037BA RID: 14266 RVA: 0x000021DB File Offset: 0x000003DB
255 public bool EndInvoke(IAsyncResult result)
256 {
257 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
258 }
259 }
260 }
261}
class f__AnonymousType0<< Count > j__TPar
IntPtr method_code
Definition Delegate.cs:386
IntPtr invoke_impl
Definition Delegate.cs:371
LoopedPlayCondition(object @object, IntPtr method)
IAsyncResult BeginInvoke(AsyncCallback callback, object @object)
ActiveSound(SoundStyle style, Vector2 position, ActiveSound.LoopedPlayCondition condition)
SoundEffectInstance< Sound > k__BackingField
SoundEffectInstance Sound
ActiveSound(SoundStyle style, Vector2 position)
void PlayLooped(ActiveSound.LoopedPlayCondition condition)
ActiveSound.LoopedPlayCondition Condition
ActiveSound(SoundStyle style)
SoundStyle< Style > k__BackingField