From 0d5478d02849aa54b4f8214c6209c390a78979fa Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 8 Apr 2013 00:24:52 +0200 Subject: fix for sliding into big mets --- bugfixes.yaml | 6 ++++++ src/randomcrap.S | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) 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: -- cgit v1.2.3