Cleanup jump feather and sword collect asm
This commit is contained in:
@@ -1,22 +1,22 @@
|
|||||||
; =========================================================
|
; =========================================================
|
||||||
; Zarby Feather
|
; Zarby Feather
|
||||||
|
|
||||||
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
|
||||||
}
|
}
|
||||||
|
|
||||||
; =========================================================
|
; =========================================================
|
||||||
; Prevent Link from taking damage while jumping spikes
|
; Prevent Link from taking damage while jumping spikes
|
||||||
; The game originally differentiates between your armor
|
; The game originally differentiates between your armor
|
||||||
; for the damage take, however the table has all the same
|
; for the damage take, however the table has all the same
|
||||||
; values, so it's effectively useless.
|
; values, so it's effectively useless.
|
||||||
|
|
||||||
; TileDetect_MainHandler_no_moon_pearl
|
; TileDetect_MainHandler_no_moon_pearl
|
||||||
; org $07D23D
|
; org $07D23D
|
||||||
@@ -36,19 +36,19 @@ LinkItem_JumpFeather:
|
|||||||
LDA #$02 : STA $4D ; set jumping state (ledge hop)
|
LDA #$02 : STA $4D ; set jumping state (ledge hop)
|
||||||
|
|
||||||
; Length of the jump
|
; Length of the jump
|
||||||
LDA #$20 : STA $46
|
LDA #$20 : STA $46
|
||||||
|
|
||||||
; Height of the jump
|
; Height of the jump
|
||||||
LDA #$24
|
LDA #$24
|
||||||
|
|
||||||
; Set vertical resistance
|
; Set vertical resistance
|
||||||
STA $29
|
STA $29
|
||||||
STA $02C7
|
STA $02C7
|
||||||
|
|
||||||
; Set Links direction to right(?)
|
; Set Links direction to right(?)
|
||||||
LDA #$08 : STA $0340 : STA $67
|
LDA #$08 : STA $0340 : STA $67
|
||||||
|
|
||||||
; Reset Link movement offsets
|
; Reset Link movement offsets
|
||||||
STZ $31 : STZ $30
|
STZ $31 : STZ $30
|
||||||
|
|
||||||
LDA $F4 : AND #$08 : BEQ .noUp
|
LDA $F4 : AND #$08 : BEQ .noUp
|
||||||
@@ -67,7 +67,7 @@ LinkItem_JumpFeather:
|
|||||||
LDA #8 ; Change that 8 if you want higher speed moving right
|
LDA #8 ; Change that 8 if you want higher speed moving right
|
||||||
STA $28
|
STA $28
|
||||||
.noRight
|
.noRight
|
||||||
|
|
||||||
.cantuseit
|
.cantuseit
|
||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
@@ -94,4 +94,4 @@ CheckIfJumpingForSpikeDamage:
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "End of Items/jump_feather.asm ", pc
|
print "End of Items/jump_feather.asm ", pc
|
||||||
pushpc
|
pushpc
|
||||||
|
|||||||
@@ -5,50 +5,35 @@ 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
|
DEY
|
||||||
ADC $F46D, x
|
|
||||||
BPL $01
|
|
||||||
DEY
|
|
||||||
CLC
|
CLC
|
||||||
ADC $22
|
ADC $22
|
||||||
STA $00
|
STA $00
|
||||||
@@ -61,7 +46,7 @@ collectSword:
|
|||||||
ADC $F4EF, x
|
ADC $F4EF, x
|
||||||
BPL $01
|
BPL $01
|
||||||
DEY
|
DEY
|
||||||
CLC
|
CLC
|
||||||
ADC $20
|
ADC $20
|
||||||
STA $01
|
STA $01
|
||||||
TYA
|
TYA
|
||||||
@@ -72,7 +57,7 @@ collectSword:
|
|||||||
LDA $F530, x
|
LDA $F530, x
|
||||||
STA $03
|
STA $03
|
||||||
PLX
|
PLX
|
||||||
PLY
|
PLY
|
||||||
RTL
|
RTL
|
||||||
}
|
}
|
||||||
pushpc
|
pushpc
|
||||||
|
|||||||
Reference in New Issue
Block a user