summaryrefslogtreecommitdiff
path: root/src/soundPlayer.S
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-03-02 17:12:34 -0600
committerColin Noga <Tempus@chronometry.ca>2012-03-02 17:12:34 -0600
commit5dece655469940b4752cb0dc81328c8171e2b5e7 (patch)
treec609321eac5499816afdd63e00a8e510d7c55bbc /src/soundPlayer.S
parent10c0df080e801ec4abb2c2272a90d04d00fee4e7 (diff)
downloadkamek-5dece655469940b4752cb0dc81328c8171e2b5e7.tar.gz
kamek-5dece655469940b4752cb0dc81328c8171e2b5e7.zip
Lots of poss updates, meteors, shy guys, penguins, etc.
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