summaryrefslogtreecommitdiff
path: root/src/soundPlayer.S
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/soundPlayer.S39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/soundPlayer.S b/src/soundPlayer.S
index e132849..8866460 100644
--- a/src/soundPlayer.S
+++ b/src/soundPlayer.S
@@ -81,6 +81,45 @@ GoAwaySoundGuy:
blr
+
+.global PlaySoundAsync
+PlaySoundAsync:
+ stwu r1, -0x30(r1)
+ mflr r0
+ stw r0, 0x34(r1)
+ stw r31, 0x2C(r1)
+ stw r30, 0x28(r1)
+ mr r30, r4
+
+ # Gets Player Position
+ mr r4, r3 # object
+ addi r3, r1, 0x10 # dest
+ bl Actor_GetVec3WithValuesAdded
+
+ # Gives an accurate position for the sound
+ addi r3, r1, 8
+ addi r4, r1, 0x10
+ bl ConvertStagePositionIntoScreenPosition__Maybe
+
+ # If we're good to go, play the sound!
+ lis r31, SoundClassRelated@h
+ ori r31, r31, SoundClassRelated@l
+ lwz r3, 0(r31)
+ addi r5, r1, 8
+ mr r4, r30
+ li r6, 0
+ bl YetAnotherSoundPlayer
+
+ lwz r30, 0x28(r1)
+ lwz r31, 0x2C(r1)
+ lwz r0, 0x34(r1)
+ mtlr r0
+ addi r1, r1, 0x30
+ blr
+
+
+
+
# StopSound(int soundID)
.global StopSound