remove bad deku flower check code

This commit is contained in:
scawful
2024-06-08 08:53:26 -04:00
parent 27a14ccaf9
commit abb26b4e11

View File

@@ -345,65 +345,46 @@ org $0DA3FD
JML DekuLink_SpinOrRecoil JML DekuLink_SpinOrRecoil
pullpc pullpc
CheckDekuFlowerPresence: PrepareMagicBubble:
{ {
REP #$20 #_07A049: LDA.b $20
PHX #_07A04B: STA.b $72
CLC ; Assume sprite ID $B0 is not present
LDX.b #$10
.x_loop
DEX
LDY.b #$04 #_07A04D: LDA.b $21
.y_loop #_07A04F: STA.b $73
DEY
LDA.w $0E20, X : AND.w #$00FF : CMP.w #$00C0 : BEQ .set_flag
BRA .not_b0
.set_flag #_07A051: LDA.b $22
SEC ; Set flag indicating sprite ID $B0 is present #_07A053: STA.b $74
STX.w $02
BRA .done
.not_b0 #_07A055: LDA.b $23
CPY.b #$00 : BNE .y_loop #_07A057: STA.b $75
CPX.b #$00 : BNE .x_loop
.done #_07A059: LDX.b $2F
PLX
SEP #$20 #_07A05B: LDY.b #$02
RTS #_07A05D: LDA.b #$09 ; ANCILLA 09
#_07A05F: JSL $0990A4 ; AncillaAdd_Arrow
RTL
} }
; Based on LinkItem_Quake.allow_quake ; Based on LinkItem_Quake.allow_quake
PrepareQuakeSpell: PrepareQuakeSpell:
{ {
; Find out if the sprite $C0 is in the room LDA.b #$0A : STA.b $5D ; Set Link to the hover state
JSR CheckDekuFlowerPresence : BCC .no_c0 LDA.b #$00 : STA.b $3D ; Clear the animation timer
PHX : LDA $02 : TAX LDA #$00 : STA.w $031C ; Clear the spin animation gfx
JSL Link_SetupHitBox 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
; X is now the ID of the sprite $B0 ; Set low and high of HOPVZ2
JSL Sprite_SetupHitBox ; Usually used as the hopping speed for diagonal jumps
PLX LDA.b #$28 : STA.w $0362 : STA.w $0363
STZ.w $0364 ; Clear Z-coordinate for the jump
JSL CheckIfHitBoxesOverlap : BCC .no_c0 STZ $70 ; Clear bomb drop check flag
LDA.b #$0A : STA.b $5D ; Set Link to the hover state
LDA.b #$00 : STA.b $3D ; Clear the animation timer
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
; 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
STZ $70 ; Clear bomb drop check flag
.no_c0
RTL RTL
} }