summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-04-08 00:24:52 +0200
committerTreeki <treeki@gmail.com>2013-04-08 00:34:35 +0200
commit0d5478d02849aa54b4f8214c6209c390a78979fa (patch)
treedc113a52b0c372de895f28c00980d89179a8eab6
parent3d54a1198f463cbb27a62093fe59fb8b65e43d27 (diff)
downloadkamek-0d5478d02849aa54b4f8214c6209c390a78979fa.tar.gz
kamek-0d5478d02849aa54b4f8214c6209c390a78979fa.zip
fix for sliding into big mets
-rw-r--r--bugfixes.yaml6
-rw-r--r--src/randomcrap.S16
2 files changed, 22 insertions, 0 deletions
diff --git a/bugfixes.yaml b/bugfixes.yaml
index fe47d41..09453b8 100644
--- a/bugfixes.yaml
+++ b/bugfixes.yaml
@@ -264,3 +264,9 @@ hooks:
src_addr_pal: 0x8011A82C
target_func: 'FixFireballSensorSetup'
+ - name: BigMetSlidingFix
+ type: branch_insn
+ branch_type: b
+ src_addr_pal: 0x809B6F60
+ target_func: 'BigMetSlidingFix'
+
diff --git a/src/randomcrap.S b/src/randomcrap.S
index ff5f1ba..a5f6751 100644
--- a/src/randomcrap.S
+++ b/src/randomcrap.S
@@ -187,6 +187,7 @@ HeapChangeAttempt:
.global UniversalFunctionLog
UniversalFunctionLog:
stwu r1, -0x10(r1)
+ mflr r0
stw r0, 0x14(r1)
stw r31, 0xC(r1)
stw r30, 0x8(r1)
@@ -299,6 +300,21 @@ FixFireballSensorSetup:
mr r3, r30
b ContinueFromFixFireballSensorSetup
+.global BigMetSlidingFix
+BigMetSlidingFix:
+ stwu r1, -0x10(r1)
+ mflr r0
+ stw r0, 0x14(r1)
+ lwz r4, 4(r5)
+ lwz r12, 0x60(r3)
+ lwz r12, 0x220(r12)
+ mtctr r12
+ bctrl
+ li r3, 1
+ lwz r0, 0x14(r1)
+ mtlr r0
+ addi r1, r1, 0x10
+ blr
.data
.global BGScaleFront, BGScaleBack, BGScaleEnabled
BGScale: