diff options
author | Treeki <treeki@gmail.com> | 2012-11-30 23:10:37 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-11-30 23:10:37 +0100 |
commit | f0c76ebaf3b871dca30bc8bf91f9ac1c0a472628 (patch) | |
tree | e85c698f5cff655e19808febd90e25f9fceb05d7 /src | |
parent | d97e8c69b67a568d84c49493a16a2215dd52808f (diff) | |
download | kamek-f0c76ebaf3b871dca30bc8bf91f9ac1c0a472628.tar.gz kamek-f0c76ebaf3b871dca30bc8bf91f9ac1c0a472628.zip |
first attempt at the HS and chest edits
Diffstat (limited to 'src')
-rw-r--r-- | src/poweruphax.S | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/poweruphax.S b/src/poweruphax.S index a4c7f14..16576c1 100644 --- a/src/poweruphax.S +++ b/src/poweruphax.S @@ -955,6 +955,20 @@ I_hammerModelName: # .string "I_hammer" .string "I_fireflower" +.global g3d_I_kinoko_brres +g3d_I_kinoko_brres: .string "g3d/I_kinoko.brres" + +.global I_propeller_model +I_propeller_model: .string "I_propeller_model" + +.text +.global AddHSToBattleItem_FixWait2Anim +AddHSToBattleItem_FixWait2Anim: + lis r4, wait2@h + ori r4, r4, wait2@l + blr +.data +wait2: .string "wait2" #PowerupTexDebugStr: # .string "Plumber::SetPowerupTexture() called on class %p with texnum %d lr=%p\n" @@ -969,3 +983,58 @@ I_hammerModelName: #.global HammerModelName #HammerModelName: # .string "bros_hammer" + +.text +.extern continueFromStrongBox +.global StrongboxInit +StrongboxInit: + # MODE + li r4, 2 + stw r4, 0x8E0(r30) + # ITEM COUNT (nybble 8) + extrwi r4, r7, 4, 12 + stw r4, 0x8E8(r30) + b continueFromStrongBox + +.extern continueFromStrongBox2 +.extern AddStockPowerup +.extern create__13dStageActor_cF6ActorsUiP7Point3dP6S16VecUc +.global StrongboxGiveBattleItem +StrongboxGiveBattleItem: + # save a reg we can use + stw r29, 0x24(r1) + + # get number of current item + lhz r6, 0x8FA(r30) + # create a shift amount... + slwi r6, r6, 2 + lwz r7, 4(r30) + # ..and use it to get the item + srw r7, r7, r6 + clrlwi r29, r7, 28 + + # now give it + mr r4, r29 + bl AddStockPowerup + + # and then copy the position + lfs f1, 0xAC(r30) + stfs f1, 0x10(r1) + lfs f1, 0xB0(r30) + lfs f2, 0x8D8(r30) + fsubs f1, f1, f2 + stfs f1, 0x14(r1) + lfs f1, 0xB4(r30) + stfs f1, 0x18(r1) + + li r3, 0x25 + or r4, r4, r7 + addi r5, r1, 0x10 + li r6, 0 + li r7, 0 + bl create__13dStageActor_cF6ActorsUiP7Point3dP6S16VecUc + + # restore our reg + lwz r29, 0x24(r1) + b continueFromStrongBox2 + |