summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-10-07 00:22:45 +0200
committerTreeki <treeki@gmail.com>2012-10-07 00:22:45 +0200
commit6f20c424220d32dcbbcd66cbf58ac93e9de7054c (patch)
tree166f7091b44b28c7deca73edf05d7df320fda9a8
parent14f6cc96178c0324833a9ec3097263d35a67e181 (diff)
downloadkamek-6f20c424220d32dcbbcd66cbf58ac93e9de7054c.tar.gz
kamek-6f20c424220d32dcbbcd66cbf58ac93e9de7054c.zip
a failed attempt to fix net climb sounds
-rw-r--r--bugfixes.yaml6
-rw-r--r--src/randomcrap.S23
2 files changed, 29 insertions, 0 deletions
diff --git a/bugfixes.yaml b/bugfixes.yaml
index 2d7721b..ce2efc1 100644
--- a/bugfixes.yaml
+++ b/bugfixes.yaml
@@ -8,6 +8,12 @@ hooks:
addr_pal: 0x800E53E0
data: '4E800020'
+ - name: ClimbSounds
+ type: branch_insn
+ branch_type: bl
+ src_addr_pal: 0x80132EFC
+ target_func: 'newClimbSounds'
+
- name: MusicHax
type: branch_insn
src_addr_pal: 0x8008E5E4
diff --git a/src/randomcrap.S b/src/randomcrap.S
index ea2b301..0b76ad8 100644
--- a/src/randomcrap.S
+++ b/src/randomcrap.S
@@ -1,4 +1,27 @@
.text
+.global newClimbSounds
+.extern StagePtr
+newClimbSounds:
+ lis r6, StagePtr@h
+ ori r6, r6, StagePtr@l
+ lwz r6, 0(r6)
+ lhz r6, 0x120C(r6)
+
+ cmpwi r6, 14
+ beq pngn
+ cmpwi r6, 0x903
+ beq pngn
+ cmpwi r6, 0x40E
+ beq climb
+ li r4, 0x134
+ blr
+pngn:
+ li r4, 0xE1
+ blr
+climb:
+ li r4, 0xC9
+ blr
+
.global TextWriterCrap
.extern TextWriterCrapContinue
TextWriterCrap: