diff options
author | Treeki <treeki@gmail.com> | 2013-05-06 23:03:16 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-05-06 23:03:16 +0200 |
commit | 2ca07a57482d095c15c1c47368ac04565f18d676 (patch) | |
tree | 507c6c34b7dd35f8e500ebcbefc16da783b4b41a | |
parent | ddf59798f00a957ddd8538be5cd3d5b1c308b561 (diff) | |
download | kamek-2ca07a57482d095c15c1c47368ac04565f18d676.tar.gz kamek-2ca07a57482d095c15c1c47368ac04565f18d676.zip |
gabon rock fixes
Diffstat (limited to '')
-rw-r--r-- | kamek_pal.x | 5 | ||||
-rw-r--r-- | poweruphax.yaml | 18 | ||||
-rw-r--r-- | src/poweruphax.S | 29 |
3 files changed, 46 insertions, 6 deletions
diff --git a/kamek_pal.x b/kamek_pal.x index 2976acc..9627596 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -1,4 +1,9 @@ SECTIONS { + GabonRock_DropOutState = 0x80998CF0; + GabonRock_CrushState = 0x80998CB0; + forceHCGROPushBack = 0x8001DED0; + continueFromHCGRO = 0x8001DEC8; + DanceValues_AnimSpeed = 0x80427C2E; DanceValues_DummyBlockAndGrass = 0x8042A049; DanceValues_Bahps = 0x8042A04A; diff --git a/poweruphax.yaml b/poweruphax.yaml index 942832e..1c913f0 100644 --- a/poweruphax.yaml +++ b/poweruphax.yaml @@ -492,11 +492,21 @@ hooks: data: '00000047' -# - name: HammerGabonRock -# type: branch_insn -# src_addr_pal: 0x807F9694 -# target_func: 'HammerGabonRock' + - name: HammerGabonRock + type: branch_insn + src_addr_pal: 0x807F9694 + branch_type: b + target_func: 'HammerGabonRock' + - name: GabonRockBounceBackHammers + type: patch + addr_pal: 0x8095C668 + data: '00000010' + # - name: HammerCallbackGabonRockOverride + # type: branch_insn + # src_addr_pal: 0x8001DEC4 + # branch_type: b + # target_func: 'HammerCallbackGabonRockOverride' diff --git a/src/poweruphax.S b/src/poweruphax.S index 2779906..39a1b77 100644 --- a/src/poweruphax.S +++ b/src/poweruphax.S @@ -838,7 +838,8 @@ Wm2dPlayerDrawHS: .extern draw__21dHammerSuitRenderer_cFv .extern draw__21dPlayerModelHandler_cFv - +.extern GabonRock_DropOutState +.extern GabonRock_CrushState .global HammerGabonRock @@ -851,7 +852,13 @@ HammerGabonRock: cmpwi r0, 19 bne hgrExit - + addi r3, r31, 0x394 + lis r4, GabonRock_CrushState@h + ori r4, r4, GabonRock_CrushState@l + lwz r12, 0(r3) + lwz r12, 0x18(r12) + mtctr r12 + bctrl lbz r0, 0xA1(r28) ori r0, r0, 2 @@ -867,6 +874,24 @@ hgrExit: addi r1, r1, 0x40 blr +.global HammerCallbackGabonRockOverride +.extern forceHCGROPushBack +.extern continueFromHCGRO +HammerCallbackGabonRockOverride: + lhz r3, 8(r30) #objThis + cmpwi r3, 115 #HAMMER + bne continueHCGRO + + lhz r3, 8(r30) #objOther + cmpwi r3, 374 #GABON_ROCK + bne continueHCGRO + + b forceHCGROPushBack + +continueHCGRO: + lbz r0, 0x2D(r4) #to fix the branch we nuked + b continueFromHCGRO + .data |