diff options
author | Stephen Simpson <megazig@gmail.com> | 2011-10-11 02:05:42 -0500 |
---|---|---|
committer | Stephen Simpson <megazig@gmail.com> | 2011-10-11 02:05:42 -0500 |
commit | baa86aba60247a79a688951e96fad9eed7c65791 (patch) | |
tree | 274196440f5b0ad44d42c2b7cfe5c9cfb9ac3da2 /src/soundPlayer.S | |
parent | 731f084d304118cb6e52b144996146ba193e2eb8 (diff) | |
download | kamek-baa86aba60247a79a688951e96fad9eed7c65791.tar.gz kamek-baa86aba60247a79a688951e96fad9eed7c65791.zip |
fixed hardcoded r13 in PlaySound to enable ntsc fun
Diffstat (limited to '')
-rw-r--r-- | src/soundPlayer.S | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/soundPlayer.S b/src/soundPlayer.S index 1a95b7c..6c0d0a7 100644 --- a/src/soundPlayer.S +++ b/src/soundPlayer.S @@ -33,17 +33,17 @@ PlaySound: stwu r1, -0x30(r1) mflr r0 - mr r20, r4 + stw r0, 0x34(r1) + stw r31, 0x2C(r1) + stw r30, 0x28(r1) + mr r30, r4 # Gets Player Position mr r4, r3 # object - stw r0, 0x34(r1) addi r3, r1, 0x10 # dest - stw r31, 0x2C(r1) bl Actor_GetVec3WithValuesAdded # Gives an accurate position for the sound - lwz r31, -0x5944(r13) addi r3, r1, 8 addi r4, r1, 0x10 bl ConvertStagePositionIntoScreenPosition__Maybe @@ -52,7 +52,7 @@ PlaySound: lis r4, BufferToCheckIfPlaying@h ori r4, r4, BufferToCheckIfPlaying@l lwz r3, 0(r4) - mr r4, r20 + mr r4, r30 bl CheckIfPlayingSound # Go away if it is @@ -60,19 +60,20 @@ PlaySound: bne GoAwaySoundGuy # If we're good to go, play the sound! - mr r3, r31 + lis r31, SoundClassRelated@h + ori r31, r31, SoundClassRelated@l + lwz r3, 0(r31) addi r5, r1, 8 - mr r4, r20 + mr r4, r30 li r6, 0 bl YetAnotherSoundPlayer b GoAwaySoundGuy - - GoAwaySoundGuy: - lwz r0, 0x34(r1) + lwz r30, 0x28(r1) lwz r31, 0x2C(r1) + lwz r0, 0x34(r1) mtlr r0 addi r1, r1, 0x30 blr |