retro.asm: make rupee bow work properly in archery minigame.

tables.asm: set ArrowMode default back to 0.
This commit is contained in:
Myramong
2019-02-02 02:00:07 -04:00
parent ec138f4f98
commit d583386d0b
2 changed files with 15 additions and 8 deletions

View File

@@ -38,14 +38,21 @@ DecrementArrows:
DEC : STA $7EF377 : INC DEC : STA $7EF377 : INC
BRA .done BRA .done
.rupees .rupees
LDA $7EF377 : BEQ .done ; don't have arrows, we're done REP #$20
LDA $7EF340 : AND.b #$01 : BEQ + LDA.b $A0 : CMP #$0111 : BNE .not_archery_game
LDA.b $0B99 : BNE + ; Arrow Game active and has credits left LDA.b $A2 : BNE .not_archery_game ; in overworld
LDA.b $0B9A : BNE + ; Arrow Game active and on last arrow SEP #$20
LDA.b #$00 : RTL LDA.w $0B9A : BEQ .shoot_arrow ; arrow game active
+ LDA.b #$00 : BRA .done
.not_archery_game
SEP #$20
LDA.l $7EF377 : BNE .shoot_arrow ; check if we have arrows
BRA .done
.shoot_arrow
PHX PHX
REP #$20 ; set 16-bit accumulator REP #$20
LDA $7EF360 : BEQ + LDA $7EF360 : BEQ +
PHA : LDA $7EF340 : DEC : AND #$0002 : TAX : PLA PHA : LDA $7EF340 : DEC : AND #$0002 : TAX : PLA
!SUB.l ArrowModeWoodArrowCost, X ; CMP.w #$0000 !SUB.l ArrowModeWoodArrowCost, X ; CMP.w #$0000

View File

@@ -795,7 +795,7 @@ db #$01 ; #00 = Fix Off (Default) - #$01 = Fix On
;================================================================================ ;================================================================================
org $308175 ; PC 0x180175 - 0x180179 org $308175 ; PC 0x180175 - 0x180179
ArrowMode: ArrowMode:
db #$01 ; #00 = Normal (Default) - #$01 = Rupees db #$00 ; #00 = Normal (Default) - #$01 = Rupees
ArrowModeWoodArrowCost: ; keep these together ArrowModeWoodArrowCost: ; keep these together
dw #$000A ; #$000A = 10 (Default) dw #$000A ; #$000A = 10 (Default)
ArrowModeSilverArrowCost: ; keep these together ArrowModeSilverArrowCost: ; keep these together