summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-11-30 23:10:37 +0100
committerTreeki <treeki@gmail.com>2012-11-30 23:10:37 +0100
commitf0c76ebaf3b871dca30bc8bf91f9ac1c0a472628 (patch)
treee85c698f5cff655e19808febd90e25f9fceb05d7 /src
parentd97e8c69b67a568d84c49493a16a2215dd52808f (diff)
downloadkamek-f0c76ebaf3b871dca30bc8bf91f9ac1c0a472628.tar.gz
kamek-f0c76ebaf3b871dca30bc8bf91f9ac1c0a472628.zip
first attempt at the HS and chest edits
Diffstat (limited to 'src')
-rw-r--r--src/poweruphax.S69
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
+