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

◆ PlaySound()

SoundEffectInstance Terraria.Audio.LegacySoundPlayer.PlaySound ( int type,
int x = -1,
int y = -1,
int Style = 1,
float volumeScale = 1f,
float pitchOffset = 0f )
inline

Definition at line 312 of file LegacySoundPlayer.cs.

313 {
314 int num = 1;
315 if (num == 0)
316 {
317 }
318 if (num == 0)
319 {
320 if (num == 0)
321 {
322 }
323 float soundVolume = Main.soundVolume;
324 int num2 = 1;
325 if (num2 == 0)
326 {
327 }
328 if (num2 == 0)
329 {
330 }
331 bool netHostOnly = Main.NetHostOnly;
332 if (num2 == 0)
333 {
334 }
335 Vector2 screenPosition = Main.screenPosition;
336 int screenWidth = Main.screenWidth;
337 Vector2 screenPosition2 = Main.screenPosition;
338 int screenHeight = Main.screenHeight;
339 if (!false)
340 {
341 }
342 int num3 = 1;
343 long num4 = 49152L;
344 if (num3 == 0)
345 {
346 }
347 float ambientVolume = Main.ambientVolume;
348 if (num4 == 0L)
349 {
350 }
351 bool gameMenu = Main.gameMenu;
352 int num5 = 1;
353 long num6 = 1904L;
354 if (num5 == 0)
355 {
356 }
357 float soundVolume2 = Main.soundVolume;
361 if (soundEffectInstance != null && soundEffectInstance == null)
362 {
363 goto IL_17A3;
364 }
365 float volume = this.SoundInstanceDrip._volume;
366 float volume2 = this.SoundInstanceDrip._volume;
367 float volume3 = this.SoundInstanceDrip._volume;
368 if (num6 == 0L)
369 {
370 }
372 int digLastFrame = this._digLastFrame;
373 if (num6 == 0L)
374 {
375 }
376 if (this.SoundDigPlayCount == null)
377 {
378 }
380 float volume4 = this.SoundInstanceDig._volume;
381 if (volume4 != null)
382 {
383 if (volume4 == null)
384 {
385 goto IL_14D2;
386 }
387 if (this.SoundInstanceDig._volume != null)
388 {
389 int screenWidth2 = Main.screenWidth;
390 if (!true)
391 {
392 }
394 int num7;
395 if (num7 != 0)
396 {
397 if (num7 == 0)
398 {
399 goto IL_1756;
400 }
402 }
405 if (soundEffectInstance2 != null && soundEffectInstance2 == null)
406 {
407 throw new ArrayTypeMismatchException();
408 }
412 float volume7 = soundInstanceZombie3._volume;
413 if (num6 == 0L)
414 {
415 }
417 float volume8 = soundInstanceZombie3._volume;
418 if (volume8 != null)
419 {
420 if (volume8 == null)
421 {
422 goto IL_1756;
423 }
425 }
428 if (soundEffectInstance3 != null && soundEffectInstance3 == null)
429 {
430 throw new ArrayTypeMismatchException();
431 }
435 if (num6 == 0L)
436 {
437 }
439 if (this.SoundInstanceResearch._volume != null)
440 {
441 soundInstanceResearch = this.SoundInstanceResearch;
442 }
445 if (soundEffectInstance4 != null && soundEffectInstance4 == null)
446 {
447 throw new ArrayTypeMismatchException();
448 }
453 if (soundInstanceResearch2 == null)
454 {
455 }
457 if (soundInstanceResearch2._volume != null)
458 {
460 }
463 if (soundEffectInstance5 != null && soundEffectInstance5 == null)
464 {
465 throw new ArrayTypeMismatchException();
466 }
471 if (volume15 != null)
472 {
473 if (volume15 == null)
474 {
475 goto IL_1756;
476 }
478 }
481 if (soundEffectInstance6 == null || soundEffectInstance6 != null)
482 {
484 soundEffectInstance6.Volume = pitchOffset;
486 soundEffectInstance6.Pan = pitchOffset;
488 if (num6 == 0L)
489 {
490 }
491 soundEffectInstance6.Pitch = pitchOffset;
494 }
495 throw new ArrayTypeMismatchException();
496 }
497 }
500 if (array._volume != null)
501 {
503 }
506 if (soundEffectInstance7 != null && soundEffectInstance7 == null)
507 {
508 throw new ArrayTypeMismatchException();
509 }
513 int num8;
514 if (num8 == 0)
515 {
516 }
518 long num9;
519 if (volume19 != null)
520 {
521 if (volume19 != null)
522 {
523 if (this.SoundInstanceItem._volume != null)
524 {
525 }
526 }
527 else
528 {
530 float volume20 = array2._volume;
531 float volume21 = array2._volume;
532 float volume22 = array2._volume;
533 if (num8 == 0)
534 {
535 }
536 if (num8 == 0)
537 {
538 }
539 if (num8 == 0)
540 {
541 }
542 if (num8 == 0)
543 {
544 }
545 if (num8 == 0)
546 {
547 }
548 if (num8 == 0)
549 {
550 }
551 num9 = 1024L;
552 if (num9 == 0L)
553 {
554 }
556 if (soundEffectInstance8 == null || soundEffectInstance8 != null)
557 {
558 soundEffectInstance8.Volume = pitchOffset;
559 soundEffectInstance8.Pan = pitchOffset;
560 if (num9 == 0L)
561 {
562 }
563 soundEffectInstance8.Pitch = pitchOffset;
564 goto IL_14D2;
565 }
566 throw new ArrayTypeMismatchException();
567 }
568 }
572 if (soundEffectInstance9 == null || soundEffectInstance9 != null)
573 {
575 }
576 throw new ArrayTypeMismatchException();
577 IL_14D2:
579 if (soundEffectInstance10 != null && soundEffectInstance10 == null)
580 {
581 throw new ArrayTypeMismatchException();
582 }
583 if (num9 == 0L)
584 {
585 }
587 if (soundEffectInstance11 != null && soundEffectInstance11 == null)
588 {
589 throw new ArrayTypeMismatchException();
590 }
591 if (num9 == 0L)
592 {
593 }
595 if (soundEffectInstance12 == null || soundEffectInstance12 != null)
596 {
597 soundEffectInstance12.Volume = pitchOffset;
598 soundEffectInstance12.Pan = pitchOffset;
600 }
601 throw new ArrayTypeMismatchException();
602 }
603 IL_1756:
605 DateTime finishTime = soundEffectInstance13._playingInstance.FinishTime;
606 DateTime finishTime2 = soundEffectInstance13._playingInstance.FinishTime;
607 bool fading = soundEffectInstance13._playingInstance._fading;
608 bool fading2 = soundEffectInstance13._playingInstance._fading;
609 IL_17A3:
610 throw new ArrayTypeMismatchException();
611 }
class f__AnonymousType0<< Count > j__TPar
SoundEffectInstance[] SoundInstanceNpcHit
SoundEffectInstance[] SoundInstanceDig
SoundEffectInstance[] SoundInstanceDrip
SoundEffectInstance[] SoundInstanceZombie
Asset< SoundEffect >[] SoundResearch
SoundEffectInstance[] SoundInstanceItem
SoundEffectInstance[] SoundInstanceResearch

References Terraria.Audio.LegacySoundPlayer._digLastFrame, Microsoft.Xna.Framework.Audio.SoundEffectInstance._volume, Terraria.Main.ambientVolume, System.array, Terraria.Main.gameMenu, j__TPar, System.L, Terraria.Main.NetHostOnly, Terraria.Main.screenHeight, Terraria.Main.screenPosition, Terraria.Main.screenWidth, Terraria.Audio.LegacySoundPlayer.SoundDigPlayCount, Terraria.Audio.LegacySoundPlayer.SoundDrip, Terraria.Audio.LegacySoundPlayer.SoundInstanceDig, Terraria.Audio.LegacySoundPlayer.SoundInstanceDrip, Terraria.Audio.LegacySoundPlayer.SoundInstanceItem, Terraria.Audio.LegacySoundPlayer.SoundInstanceNpcHit, Terraria.Audio.LegacySoundPlayer.SoundInstanceResearch, Terraria.Audio.LegacySoundPlayer.SoundInstanceZombie, Terraria.Audio.LegacySoundPlayer.SoundItem, Terraria.Audio.LegacySoundPlayer.SoundNpcHit, Terraria.Audio.LegacySoundPlayer.SoundResearch, Terraria.Main.soundVolume, and Terraria.Audio.LegacySoundPlayer.SoundZombie.