Cleanup jump feather and sword collect asm
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
; =========================================================
|
||||
; Zarby Feather
|
||||
; Zarby Feather
|
||||
|
||||
org $07AFF8 ; LinkItem_BugCatchingNet
|
||||
{
|
||||
BIT $3A : BVS .return ;if Y or B are already pressed
|
||||
LDA $6C : BNE .return ; if we are standing in a dooray or not
|
||||
; Link_CheckNewY_ButtonPress
|
||||
JSR $B073 : BCC .return ; Check if we just pressed Y Button
|
||||
JSL LinkItem_JumpFeather
|
||||
BIT $3A : BVS .return ;if Y or B are already pressed
|
||||
LDA $6C : BNE .return ; if we are standing in a dooray or not
|
||||
; Link_CheckNewY_ButtonPress
|
||||
JSR $B073 : BCC .return ; Check if we just pressed Y Button
|
||||
JSL LinkItem_JumpFeather
|
||||
.return
|
||||
RTS
|
||||
RTS
|
||||
}
|
||||
|
||||
; =========================================================
|
||||
; 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
|
||||
; values, so it's effectively useless.
|
||||
; values, so it's effectively useless.
|
||||
|
||||
; TileDetect_MainHandler_no_moon_pearl
|
||||
; org $07D23D
|
||||
@@ -36,19 +36,19 @@ LinkItem_JumpFeather:
|
||||
LDA #$02 : STA $4D ; set jumping state (ledge hop)
|
||||
|
||||
; Length of the jump
|
||||
LDA #$20 : STA $46
|
||||
LDA #$20 : STA $46
|
||||
|
||||
; Height of the jump
|
||||
LDA #$24
|
||||
LDA #$24
|
||||
|
||||
; Set vertical resistance
|
||||
; Set vertical resistance
|
||||
STA $29
|
||||
STA $02C7
|
||||
|
||||
; Set Links direction to right(?)
|
||||
LDA #$08 : STA $0340 : STA $67
|
||||
|
||||
; Reset Link movement offsets
|
||||
; Reset Link movement offsets
|
||||
STZ $31 : STZ $30
|
||||
|
||||
LDA $F4 : AND #$08 : BEQ .noUp
|
||||
@@ -67,7 +67,7 @@ LinkItem_JumpFeather:
|
||||
LDA #8 ; Change that 8 if you want higher speed moving right
|
||||
STA $28
|
||||
.noRight
|
||||
|
||||
|
||||
.cantuseit
|
||||
RTL
|
||||
}
|
||||
@@ -94,4 +94,4 @@ CheckIfJumpingForSpikeDamage:
|
||||
}
|
||||
|
||||
print "End of Items/jump_feather.asm ", pc
|
||||
pushpc
|
||||
pushpc
|
||||
|
||||
@@ -5,50 +5,35 @@ org $86F725
|
||||
pullpc
|
||||
collectSword:
|
||||
{
|
||||
ADC #$00
|
||||
STA $09
|
||||
LDA $79
|
||||
BEQ $01
|
||||
RTL
|
||||
ADC #$00 : STA $09
|
||||
LDA $79 : BEQ $01
|
||||
RTL
|
||||
|
||||
LDA $0E20, x
|
||||
SEC
|
||||
SBC #$D8
|
||||
BCS $01
|
||||
RTL
|
||||
LDA $0E20, X : SEC : SBC #$D8 : BCS $01
|
||||
RTL
|
||||
|
||||
LDA $0E20, x
|
||||
SEC
|
||||
SBC #$E7
|
||||
BCC $01
|
||||
RTL
|
||||
LDA $0E20, X : SEC : SBC #$E7 : BCC $01
|
||||
RTL
|
||||
|
||||
PHY
|
||||
LDY $3C
|
||||
BPL $02
|
||||
PLY
|
||||
RTL
|
||||
PHY
|
||||
LDY $3C : BPL $02 : PLY
|
||||
RTL
|
||||
|
||||
LDA $F571, y
|
||||
BEQ $02
|
||||
PLY
|
||||
RTL
|
||||
LDA $F571, Y : BEQ $02
|
||||
PLY
|
||||
RTL
|
||||
|
||||
PHX
|
||||
PHX
|
||||
LDA $2F
|
||||
ASL A
|
||||
ASL A
|
||||
ASL A
|
||||
CLC
|
||||
ADC $3C
|
||||
CLC : ADC $3C
|
||||
TAX
|
||||
INX
|
||||
LDY #$00
|
||||
LDA $45
|
||||
CLC
|
||||
ADC $F46D, x
|
||||
BPL $01
|
||||
DEY
|
||||
INX
|
||||
LDY #$00 : LDA $45
|
||||
CLC : ADC $F46D, X : BPL $01
|
||||
DEY
|
||||
CLC
|
||||
ADC $22
|
||||
STA $00
|
||||
@@ -61,7 +46,7 @@ collectSword:
|
||||
ADC $F4EF, x
|
||||
BPL $01
|
||||
DEY
|
||||
CLC
|
||||
CLC
|
||||
ADC $20
|
||||
STA $01
|
||||
TYA
|
||||
@@ -72,7 +57,7 @@ collectSword:
|
||||
LDA $F530, x
|
||||
STA $03
|
||||
PLX
|
||||
PLY
|
||||
PLY
|
||||
RTL
|
||||
}
|
||||
pushpc
|
||||
|
||||
Reference in New Issue
Block a user