fix for getting arrow item
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
CheckEnoughRupeeArrows:
|
||||
{
|
||||
LDA $0B99 : BNE .minigame_arrow
|
||||
PHX ;save X value which is ancilla of the arrow
|
||||
LDA $7EF340 : CMP #$03 : BCS .skip_arrow_check ;03 is the silver bow without arrows
|
||||
LDA $7EF377 : BEQ .no_arrows
|
||||
.skip_arrow_check
|
||||
PHX
|
||||
REP #$30 ;Set 16bit mode
|
||||
LDA $7EF340 : AND #$00FF : TAX ;check what bow we have
|
||||
LDA $7EF340 : AND #$00FF : TAX
|
||||
LDA $7EF360 : CMP.l .rupees_cost, X : BCC .not_enough_rupees ;Load Rupees count
|
||||
SBC.l .rupees_cost, X : STA $7EF360 ;decrease rupee by 5
|
||||
|
||||
@@ -19,6 +22,7 @@ CheckEnoughRupeeArrows:
|
||||
.not_enough_rupees
|
||||
SEP #$30
|
||||
PLX
|
||||
.no_arrows
|
||||
LDA #$00 ;Return 00 if we don't have enough rupee so it despawn the arrow
|
||||
RTL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user