summaryrefslogtreecommitdiff
path: root/src/poweruphax.S
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-01-17 09:23:55 +0100
committerTreeki <treeki@gmail.com>2013-01-17 09:23:55 +0100
commit1e2fe2181af8215e6da3f55d0350385d0af2f7e0 (patch)
tree697f2105ceedd031f901c896d2747ccdfc2b43bb /src/poweruphax.S
parent4a51200b922d2ed0896562d95d1d9e390a014db3 (diff)
downloadkamek-1e2fe2181af8215e6da3f55d0350385d0af2f7e0.tar.gz
kamek-1e2fe2181af8215e6da3f55d0350385d0af2f7e0.zip
myriad updates and fixes to EVERYTHING
Diffstat (limited to '')
-rw-r--r--src/poweruphax.S373
1 files changed, 373 insertions, 0 deletions
diff --git a/src/poweruphax.S b/src/poweruphax.S
index ef957e2..16800e6 100644
--- a/src/poweruphax.S
+++ b/src/poweruphax.S
@@ -1044,3 +1044,376 @@ StrongboxGiveBattleItem:
.data
IndexItemsForStockItem:
.byte 0,1,2,4,5,6,3,7
+
+
+SLGWindow: .string "A00_Window"
+SLGBtn0: .string "B00_itemButton"
+SLGBtn1: .string "B01_itemButton"
+SLGBtn2: .string "B02_itemButton"
+SLGBtn3: .string "B03_itemButton"
+SLGBtn4: .string "B04_itemButton"
+SLGBtn5: .string "B05_itemButton"
+SLGBtn6: .string "B06_itemButton"
+SLGBtn7: .string "HammerGroup"
+SLButtonBase00: .string "P_buttonBase_00"
+SLButtonBase01: .string "P_buttonBase_01"
+SLButtonBase02: .string "P_buttonBase_02"
+SLButtonBase03: .string "P_buttonBase_03"
+SLButtonBase04: .string "P_buttonBase_04"
+SLButtonBase05: .string "P_buttonBase_05"
+SLButtonBase06: .string "P_buttonBase_06"
+SLButtonBase07: .string "P_buttonBase_07"
+SLIcon0: .string "P_iconKinoko_00"
+SLIcon1: .string "P_iconFlower_00"
+SLIcon2: .string "P_iconPro_00"
+SLIcon3: .string "P_iconIce_00"
+SLIcon4: .string "P_iconPen_00"
+SLIcon5: .string "P_mameKinoko_00"
+SLIcon6: .string "P_iconStar_00"
+SLIcon7: .string "P_iconHammer_00"
+SLIconPane0: .string "N_iconKinoko_00"
+SLIconPane1: .string "N_iconFlower_00"
+SLIconPane2: .string "N_iconPro_00"
+SLIconPane3: .string "N_iconIce_00"
+SLIconPane4: .string "N_iconPen_00"
+SLIconPane5: .string "N_mameKinoko_00"
+SLIconPane6: .string "N_iconStar_00"
+SLIconPane7: .string "N_iconHammer_00"
+.align 4
+SILayoutGroupNames:
+.long SLGWindow
+.long SLGBtn0,SLGBtn1,SLGBtn2,SLGBtn6,SLGBtn4,SLGBtn5,SLGBtn3
+.long SLGBtn0,SLGBtn1,SLGBtn2,SLGBtn6,SLGBtn4,SLGBtn5,SLGBtn3
+.long SLGBtn0,SLGBtn1,SLGBtn2,SLGBtn6,SLGBtn4,SLGBtn5,SLGBtn3
+.long SLGBtn0,SLGBtn1,SLGBtn2,SLGBtn6,SLGBtn4,SLGBtn5,SLGBtn3
+.long SLGWindow
+.long SLGBtn7,SLGBtn7,SLGBtn7
+SILayoutGroupIDs:
+.long 0
+.long 1,1,1,1,1,1,1
+.long 2,2,2,2,2,2,2
+.long 3,3,3,3,3,3,3
+.long 4,4,4,4,4,4,4
+.long 5
+.long 1,3,4
+
+SILayoutButtonBases:
+.long SLButtonBase00,SLButtonBase01,SLButtonBase02,SLButtonBase06
+.long SLButtonBase04,SLButtonBase05,SLButtonBase03,SLButtonBase07
+SILayoutIconPictures:
+.long SLIcon0,SLIcon1,SLIcon2,SLIcon3
+.long SLIcon4,SLIcon5,SLIcon6,SLIcon7
+SILayoutIconPanes:
+.long SLIconPane0,SLIconPane1,SLIconPane2,SLIconPane3
+.long SLIconPane4,SLIconPane5,SLIconPane6,SLIconPane7
+
+.text
+.global SILayoutGroupParams
+SILayoutGroupParams:
+ lis r4, SILayoutGroupNames@h
+ ori r4, r4, SILayoutGroupNames@l
+ lis r5, SILayoutGroupIDs@h
+ ori r5, r5, SILayoutGroupIDs@l
+ li r6, 0x21
+ blr
+
+# - 0x920 : Button Bases
+# - 0x940 : Icon Panes
+# - 0x960 : Icon Pictures
+.extern getPanes__Q23m2d13EmbedLayout_cCFPPCcPPQ34nw4r3lyt4Panei
+.extern getPictures__Q23m2d13EmbedLayout_cCFPPCcPPQ34nw4r3lyt7Picturei
+.extern ContinueFromSILayoutExtraStuffs
+.global SILayoutExtraStuffs
+SILayoutExtraStuffs:
+ addi r3, r30, 0x74
+ lis r4, SILayoutButtonBases@h
+ ori r4, r4, SILayoutButtonBases@l
+ addi r5, r30, 0x920
+ li r6, 8
+ bl getPictures__Q23m2d13EmbedLayout_cCFPPCcPPQ34nw4r3lyt7Picturei
+
+ addi r3, r30, 0x74
+ lis r4, SILayoutIconPanes@h
+ ori r4, r4, SILayoutIconPanes@l
+ addi r5, r30, 0x940
+ li r6, 8
+ bl getPanes__Q23m2d13EmbedLayout_cCFPPCcPPQ34nw4r3lyt4Panei
+
+ addi r3, r30, 0x74
+ lis r4, SILayoutIconPictures@h
+ ori r4, r4, SILayoutIconPictures@l
+ addi r5, r30, 0x960
+ li r6, 8
+ bl getPictures__Q23m2d13EmbedLayout_cCFPPCcPPQ34nw4r3lyt7Picturei
+
+ li r3, 1
+ b ContinueFromSILayoutExtraStuffs
+
+.global HideItemsByDefault
+.extern ContinueFromHideItemsByDefault
+HideItemsByDefault:
+ li r3, 8
+ mtctr r3
+ mr r4, r31
+meNext:
+ lwz r9, 0x960(r4)
+ lbz r5, 0xBB(r9)
+ rlwinm r5, r5, 0,24,30
+ stb r5, 0xBB(r9)
+ addi r4, r4, 4
+ bdnz meNext
+
+ li r8, 0
+ li r7, 1
+ li r6, 4
+ li r5, 0xE
+ li r0, 0xF
+ li r3, 1
+ b ContinueFromHideItemsByDefault
+
+.global AddHammerPowerupFinalValue
+AddHammerPowerupFinalValue:
+ li r24, 0
+ lis r22, OutputPowerupsByItemID@h
+ ori r22, r22, OutputPowerupsByItemID@l
+ blr
+
+.data
+OutputPowerupsByItemID:
+.long 1, 2, 4, 6, 5, 3, -1, 7
+
+.text
+.global FixStockItemEffectPlayer
+FixStockItemEffectPlayer:
+ lwz r0, 0x8A0(r30)
+ slwi r0, r0, 2
+ add r5, r30, r0
+ lwz r28, 0x940(r5)
+ blr
+
+.global FixStockItemEffectPlayer2
+FixStockItemEffectPlayer2:
+ lwz r0, 0x8A0(r30)
+ stw r0, 0x8D0(r30)
+ blr
+
+.global FixMoreSIEffectRelatedCrap
+FixMoreSIEffectRelatedCrap:
+ lwz r0, 0x8D0(r31)
+ slwi r0, r0, 2
+ add r3, r31, r0
+ lwz r29, 0x940(r3)
+ blr
+
+
+.global AddHammerSuitAddSound
+.extern MakeSFISound
+.extern ContinueFromSIAddSound
+AddHammerSuitAddSound:
+ cmpwi r0, 7
+ beq _MakeSFISound
+ b ContinueFromSIAddSound
+ _MakeSFISound:
+ b MakeSFISound
+
+.extern resetAnim__Q23m2d13EmbedLayout_cFib
+.extern ContinueFromResetHammerAnimOnOpen
+.global ResetHammerAnimOnOpen
+ResetHammerAnimOnOpen:
+ addi r3, r28, 0x74
+ li r4, 0x1E
+ li r5, 0
+ bl resetAnim__Q23m2d13EmbedLayout_cFib
+ addi r3, r28, 0x74
+ b ContinueFromResetHammerAnimOnOpen
+
+.extern ChosenStartChoice
+.global PickHammerAsPossibleStartChoice
+PickHammerAsPossibleStartChoice:
+ lwz r0, 0x918(r30)
+ li r3, 6
+ cmpwi r0, 0
+ beq notGoodEnough
+ stw r3, 0x8A0(r30)
+ b ChosenStartChoice
+notGoodEnough:
+ lwz r0, 0x91C(r30)
+ li r3, 7
+ cmpwi r0, 0
+ b _ChosenStartChoice
+ stw r3, 0x8A0(r30)
+ _ChosenStartChoice:
+ b ChosenStartChoice
+
+
+.global ChooseOldButtonOffAnim
+ChooseOldButtonOffAnim:
+ cmpwi r4, 7
+ beq useHammerOffAnim
+ addi r4, r4, 0x16
+ blr
+useHammerOffAnim:
+ li r4, 0x20
+ blr
+
+.global ChooseOldButtonOffAnim2
+ChooseOldButtonOffAnim2:
+ cmpwi r3, 7
+ beq useHammerOffAnim2
+ addi r0, r3, 0x16
+ blr
+useHammerOffAnim2:
+ li r0, 0x20
+ blr
+
+.global ChooseButtonOnAnim
+ChooseButtonOnAnim:
+ cmpwi r4, 7
+ beq useHammerOnAnim
+ addi r4, r4, 1
+ blr
+useHammerOnAnim:
+ li r4, 0x1E
+ blr
+
+.global DoSISelectCursor
+.extern UpdateSelectCursor
+DoSISelectCursor:
+ slwi r0, r0, 2
+ add r3, r3, r0
+ lwz r3, 0x920(r3)
+ b UpdateSelectCursor
+
+
+.global ChooseHitButtonAnim
+ChooseHitButtonAnim:
+ cmpwi r4, 7
+ beq useHammerHitAnim
+ addi r4, r4, 0xF
+ blr
+useHammerHitAnim:
+ li r4, 0x1F
+ blr
+
+
+
+.global UpdateCalcPowerupResult
+.extern ContinueFromCalcPowerupResult
+UpdateCalcPowerupResult:
+ cmpwi r3, 7
+ bne cprIsDone
+ li r6, 7
+ stb r0, 0xF(r1)
+cprIsDone:
+ b ContinueFromCalcPowerupResult
+
+
+
+
+.global SISLayoutExtraStuffs
+.extern ContinueFromSISLayoutExtraStuffs
+.extern findTextBoxByName__Q23m2d17EmbedLayoutBase_cCFPCc
+.extern findPictureByName__Q23m2d17EmbedLayoutBase_cCFPCc
+SISLayoutExtraStuffs:
+ addi r3, r30, 0x70
+ lis r4, whatever_s@h
+ ori r4, r4, whatever_s@l
+ bl findTextBoxByName__Q23m2d17EmbedLayoutBase_cCFPCc
+ stw r3, 0x288(r30)
+
+ addi r3, r30, 0x70
+ lis r4, fuck_brlyts@h
+ ori r4, r4, fuck_brlyts@l
+ bl findTextBoxByName__Q23m2d17EmbedLayoutBase_cCFPCc
+ stw r3, 0x284(r30)
+
+ addi r3, r30, 0x70
+ lis r4, im_tired_of_this@h
+ ori r4, r4, im_tired_of_this@l
+ bl findPictureByName__Q23m2d17EmbedLayoutBase_cCFPCc
+ stw r3, 0x28C(r30)
+
+ li r3, 1
+ b ContinueFromSISLayoutExtraStuffs
+
+.data
+whatever_s: .string "whatever"
+fuck_brlyts: .string "fuck_brlyts"
+im_tired_of_this: .string "im_tired_of_this"
+
+.text
+.global UpdateSIS
+.extern ContinueFromUpdateSIS
+.extern WriteNumberToTextBox__FPiPCiPQ34nw4r3lyt7TextBoxb
+UpdateSIS:
+ cmpwi r0, 0
+ beq DontUpdateSIS
+ subi r25, r25, 0x1C
+
+ # replicate this shit
+ lwz r0, 0x280(r25)
+ cmpwi r0, 0
+ lwz r3, 0x28C(r25)
+ lbz r0, 0xBB(r3)
+ beq theresNone
+
+ li r4, 1
+ rlwinm r0, r0, 0,24,30
+ b changedBase
+theresNone:
+ li r4, 0
+ ori r0, r0, 1
+changedBase:
+ stb r0, 0xBB(r3)
+ slwi r29, r4, 2
+ addi r5, r1, 0x14
+ lwzx r27, r26, r29
+ li r4, 0
+ stw r27, 0x14(r1)
+ lwz r3, 0x284(r25)
+ lwz r12, 0(r3)
+ lwz r12, 0x28(r12)
+ mtctr r12
+ bctrl
+
+ lwzx r29, r28, r29
+ addi r5, r1, 0x10
+ stw r29, 0x10(r1)
+ li r4, 2
+ lwz r3, 0x284(r25)
+ lwz r12, 0(r3)
+ lwz r12, 0x28(r12)
+ mtctr r12
+ bctrl
+
+ addi r5, r1, 0x14
+ li r4, 0
+ lwz r3, 0x288(r25)
+ lwz r12, 0(r3)
+ lwz r12, 0x28(r12)
+ mtctr r12
+ bctrl
+
+ addi r5, r1, 0x10
+ li r4, 2
+ lwz r3, 0x288(r25)
+ lwz r12, 0(r3)
+ lwz r12, 0x28(r12)
+ mtctr r12
+ bctrl
+
+ lwz r5, 0x284(r25)
+ addi r3, r25, 0x280
+ lis r4, ptrToTwo@h
+ ori r4, r4, ptrToTwo@l
+ li r6, 1
+ bl WriteNumberToTextBox__FPiPCiPQ34nw4r3lyt7TextBoxb
+
+DontUpdateSIS:
+ addi r11, r1, 0x40
+ b ContinueFromUpdateSIS
+
+.data
+.align 4
+ptrToTwo: .long 2
+