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 /src/poweruphax.S | |
parent | ddf59798f00a957ddd8538be5cd3d5b1c308b561 (diff) | |
download | kamek-2ca07a57482d095c15c1c47368ac04565f18d676.tar.gz kamek-2ca07a57482d095c15c1c47368ac04565f18d676.zip |
gabon rock fixes
Diffstat (limited to 'src/poweruphax.S')
-rw-r--r-- | src/poweruphax.S | 29 |
1 files changed, 27 insertions, 2 deletions
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 |