cleanup deku mask and bunny hood code
This commit is contained in:
@@ -46,11 +46,11 @@ print "End of Bunny Hood GFX ", pc
|
||||
; =========================================================
|
||||
; Bunny Hood Speed Modification
|
||||
|
||||
; Link_HandleVelocity_load_subvel
|
||||
org $07E330
|
||||
JSR Link_CheckForBunnyRun
|
||||
CLC
|
||||
|
||||
; org $87FD66
|
||||
pullpc
|
||||
Link_CheckForBunnyRun:
|
||||
JSL LinkState_BunnyHoodRun
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
; =========================================================
|
||||
; Deku Mask
|
||||
; Press R to transform into Deku Link
|
||||
; Press Y to perform a spin and jump, allowing you to hover
|
||||
; for a short period of time, as well as drop bombs while
|
||||
; hovering with the Y button, and cancelling the hover with
|
||||
; the B button.
|
||||
; =========================================================
|
||||
|
||||
UpdateDekuPalette:
|
||||
@@ -20,27 +25,21 @@ deku_palette:
|
||||
dw #$6739, #$15C5, #$150E, #$26C9, #$17AA, #$21F4, #$17DF, #$42DB
|
||||
dw #$14A5, #$14BC, #$14B2, #$14A5, #$7FFF, #$7A18, #$178C
|
||||
|
||||
; =========================================================
|
||||
|
||||
org $07A64B ; formerly Quake
|
||||
LinkItem_DekuMask:
|
||||
{
|
||||
JSR Link_CheckNewY_ButtonPress : BCC .continue
|
||||
LDX.b #$01 : JSR LinkItem_EvaluateMagicCost : BCC .return
|
||||
LDX.b #$01
|
||||
JSR LinkItem_EvaluateMagicCost : BCC .return
|
||||
JSL PrepareQuakeSpell
|
||||
RTS
|
||||
|
||||
.continue
|
||||
LDA #$01
|
||||
JSL Link_TransformMask : BCC .return
|
||||
STA $02F5 ; Somaria platform flag, no dash.
|
||||
|
||||
; .unequip
|
||||
; STZ $5D
|
||||
; ; Restore the shield
|
||||
; LDA $0AAF : STA.l $7EF35A
|
||||
; STZ $02F5
|
||||
|
||||
; %ResetToLinkGraphics()
|
||||
LDA #$01 : STA $02F5 ; Somaria platform flag, no dash.
|
||||
|
||||
.return
|
||||
RTS
|
||||
@@ -53,7 +52,7 @@ warnpc $07A6BE
|
||||
org $07811A
|
||||
JSR Link_HandleDekuTransformation
|
||||
|
||||
pullpc ; Bank 07 Free Space from minish_form
|
||||
pullpc ; Free space in bank07 - all_sprites.asm
|
||||
Link_HandleDekuTransformation:
|
||||
{
|
||||
; Check if using Quake Medallion
|
||||
@@ -78,9 +77,6 @@ org $078926
|
||||
org $078932
|
||||
Link_HandleChangeInZVelocity_preset:
|
||||
|
||||
org $099589
|
||||
AncillaAdd_QuakeSpell:
|
||||
|
||||
org $078028
|
||||
PlaySFX_Set2:
|
||||
|
||||
@@ -100,7 +96,6 @@ LinkState_UsingQuake:
|
||||
db 5, 5, 5, 5
|
||||
db 5, 5, 5, 19
|
||||
|
||||
; INC.w $0FC1 ; Keep sprites frozen
|
||||
JSR $F514 ; CacheCameraPropertiesIfOutdoors
|
||||
|
||||
STZ.b $27 : STZ.b $28 ; Reset recoil X and Y
|
||||
@@ -170,11 +165,6 @@ LinkState_UsingQuake:
|
||||
LDA.b #$12 : STA $24
|
||||
LDA.b #$FF : STA $5C
|
||||
LDA.b #$01 : STA $70
|
||||
; ; Quake Spell, End Quake State happens during Ancilla
|
||||
; LDY.b #$00 : LDA.b #$1C ; ANCILLA 1C
|
||||
; JSL AncillaAdd_QuakeSpell
|
||||
|
||||
; STZ.b $4D : STZ.w $0046
|
||||
; -----------------------------------------------------
|
||||
|
||||
.exit
|
||||
@@ -183,7 +173,6 @@ LinkState_UsingQuake:
|
||||
.special
|
||||
DEC $5C
|
||||
JSL DekuLink_HoverBasedOnInput
|
||||
JSR $E8F0 ; HandleIndoorCameraAndDoors
|
||||
RTS
|
||||
}
|
||||
|
||||
|
||||
@@ -324,42 +324,28 @@ pullpc
|
||||
; Based on LinkItem_Quake.allow_quake
|
||||
PrepareQuakeSpell:
|
||||
{
|
||||
; Ancilla setup stuff, not necessary
|
||||
; #_07A680: LDA.w $0C4A
|
||||
; #_07A683: ORA.w $0C4B
|
||||
; #_07A686: ORA.w $0C4C
|
||||
|
||||
; This would set link to strafe mode
|
||||
; Probably not necessary
|
||||
; #_07A696: LDA.b #$01
|
||||
; #_07A698: TSB.b $50
|
||||
|
||||
; TODO: Set a check for the Deku Flower sprite before activating this ability.
|
||||
|
||||
LDA.b #$0A : STA $5D
|
||||
LDA.b #$0A : STA.b $5D ; Set Link to the hover state
|
||||
LDA.b #$00 : STA.b $3D ; Clear the animation timer
|
||||
|
||||
#_07A69A: LDA #$00
|
||||
#_07A69D: STA.b $3D
|
||||
LDA #$00 : STA.w $031C ; Clear the spin animation gfx
|
||||
STZ.w $031D ; Clear the spin animation step
|
||||
STZ.w $0324 ; Prevent multiple ancillae from being added
|
||||
STZ.b $46 ; Clear the link damage timer
|
||||
|
||||
#_07A69F: LDA #$00
|
||||
#_07A6A2: STA.w $031C
|
||||
#_07A6A5: STZ.w $031D
|
||||
; Set low and high of HOPVZ2
|
||||
; Usually used as the hopping speed for diagonal jumps
|
||||
LDA.b #$28 : STA.w $0362 : STA.w $0363
|
||||
STZ.w $0364 ; Clear Z-coordinate for the jump
|
||||
|
||||
#_07A6A8: STZ.w $0324
|
||||
|
||||
#_07A6AB: STZ.b $46
|
||||
|
||||
; Set the spin and jump animation values.
|
||||
#_07A6AD: LDA.b #$28
|
||||
#_07A6AF: STA.w $0362
|
||||
#_07A6B2: STA.w $0363
|
||||
#_07A6B5: STZ.w $0364
|
||||
|
||||
STZ $70
|
||||
STZ $70 ; Clear bomb drop check flag
|
||||
|
||||
RTL
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
HandleCamera:
|
||||
{
|
||||
LDA $22 : SEC : SBC $3F : STA $31
|
||||
@@ -374,6 +360,8 @@ HandleCamera:
|
||||
RTS
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
HandleMovement:
|
||||
{
|
||||
LDA $F0 : AND #$08 : BEQ .not_up
|
||||
@@ -382,6 +370,7 @@ HandleMovement:
|
||||
LDA #$01 : STA $031C
|
||||
LDA #$05 : STA $3D
|
||||
STZ $2F
|
||||
; DEC.b $E8
|
||||
.not_up
|
||||
LDA $F0 : AND #$04 : BEQ .not_down
|
||||
LDA $20 : CLC : ADC #1 : STA $20
|
||||
@@ -389,6 +378,7 @@ HandleMovement:
|
||||
LDA #$02 : STA $031C
|
||||
LDA #$05 : STA $3D
|
||||
LDA #$02 : STA $2F
|
||||
; INC.b $E8
|
||||
.not_down
|
||||
LDA $F0 : AND #$02 : BEQ .not_left
|
||||
LDA $22 : CLC : ADC #-1 : STA $22
|
||||
@@ -396,6 +386,7 @@ HandleMovement:
|
||||
LDA #$03 : STA $031C
|
||||
LDA #$05 : STA $3D
|
||||
LDA #$04 : STA $2F
|
||||
; DEC.b $E2
|
||||
.not_left
|
||||
LDA $F0 : AND #$01 : BEQ .not_right
|
||||
LDA $22 : CLC : ADC #1 : STA $22
|
||||
@@ -403,14 +394,15 @@ HandleMovement:
|
||||
LDA #$04 : STA $031C
|
||||
LDA #$05 : STA $3D
|
||||
LDA #$06 : STA $2F
|
||||
; INC.b $E2
|
||||
.not_right
|
||||
LDA.w $22 : STA $0FD8
|
||||
LDA.w $23 : STA $0FD9
|
||||
LDA.w $20 : STA $0FDA
|
||||
LDA.w $21 : STA $0FDB
|
||||
LDA.w $22 : STA $0FD8 : LDA.w $23 : STA $0FD9
|
||||
LDA.w $20 : STA $0FDA : LDA.w $21 : STA $0FDB
|
||||
RTS
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
|
||||
DekuLink_HoverBasedOnInput:
|
||||
{
|
||||
JSR HandleCamera
|
||||
@@ -425,11 +417,8 @@ DekuLink_HoverBasedOnInput:
|
||||
|
||||
LDA $70 : BEQ .no_bomb_drop
|
||||
LDA $F0 : AND #%01000000 : BEQ .no_bomb_drop
|
||||
|
||||
#_07A14F: LDY.b #$01
|
||||
#_07A151: LDA.b #$07 ; ANCILLA 07
|
||||
#_07A153: JSL $09811F ; AncillaAdd_Bomb
|
||||
|
||||
LDY.b #$01 : LDA.b #$07 ; ANCILLA 07
|
||||
JSL $09811F ; AncillaAdd_Bomb
|
||||
.no_bomb_drop
|
||||
|
||||
LDA $F0 : AND #%10000000 : BEQ .no_cancel
|
||||
|
||||
Reference in New Issue
Block a user