Cleanup jump feather and sword collect asm

This commit is contained in:
scawful
2024-11-19 13:50:12 -05:00
parent 1cf4935dcf
commit caab7bf1e0
2 changed files with 36 additions and 51 deletions

View File

@@ -3,13 +3,13 @@
org $07AFF8 ; LinkItem_BugCatchingNet org $07AFF8 ; LinkItem_BugCatchingNet
{ {
BIT $3A : BVS .return ;if Y or B are already pressed BIT $3A : BVS .return ;if Y or B are already pressed
LDA $6C : BNE .return ; if we are standing in a dooray or not LDA $6C : BNE .return ; if we are standing in a dooray or not
; Link_CheckNewY_ButtonPress ; Link_CheckNewY_ButtonPress
JSR $B073 : BCC .return ; Check if we just pressed Y Button JSR $B073 : BCC .return ; Check if we just pressed Y Button
JSL LinkItem_JumpFeather JSL LinkItem_JumpFeather
.return .return
RTS RTS
} }
; ========================================================= ; =========================================================

View File

@@ -5,49 +5,34 @@ org $86F725
pullpc pullpc
collectSword: collectSword:
{ {
ADC #$00 ADC #$00 : STA $09
STA $09 LDA $79 : BEQ $01
LDA $79 RTL
BEQ $01
RTL
LDA $0E20, x LDA $0E20, X : SEC : SBC #$D8 : BCS $01
SEC RTL
SBC #$D8
BCS $01
RTL
LDA $0E20, x LDA $0E20, X : SEC : SBC #$E7 : BCC $01
SEC RTL
SBC #$E7
BCC $01
RTL
PHY PHY
LDY $3C LDY $3C : BPL $02 : PLY
BPL $02 RTL
PLY
RTL
LDA $F571, y LDA $F571, Y : BEQ $02
BEQ $02 PLY
PLY RTL
RTL
PHX PHX
LDA $2F LDA $2F
ASL A ASL A
ASL A ASL A
ASL A ASL A
CLC CLC : ADC $3C
ADC $3C
TAX TAX
INX INX
LDY #$00 LDY #$00 : LDA $45
LDA $45 CLC : ADC $F46D, X : BPL $01
CLC
ADC $F46D, x
BPL $01
DEY DEY
CLC CLC
ADC $22 ADC $22