fix spacing and retro arrow game money making

This commit is contained in:
sporchia
2018-09-22 10:11:24 -04:00
parent e6d4158496
commit 0c395eb645

View File

@@ -34,16 +34,18 @@ DecrementArrows:
.infinite .infinite
LDA.b #$01 : RTL LDA.b #$01 : RTL
.normal .normal
LDA $7EF377 : BEQ .done LDA $7EF377 : BEQ .done
DEC : STA $7EF377 : INC DEC : STA $7EF377 : INC
BRA .done BRA .done
.rupees .rupees
LDA $7EF340 : AND.b #$01 : BEQ + LDA $7EF340 : AND.b #$01 : BEQ +
LDA.b $0B99 : BNE + ; Arrow Game active and has credits left
LDA.b $0B9A : BNE + ; Arrow Game active and on last arrow
LDA.b #$00 : RTL LDA.b #$00 : RTL
+ +
PHX PHX
REP #$20 ; set 16-bit accumulator REP #$20 ; set 16-bit accumulator
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
BMI .not_enough_money BMI .not_enough_money
@@ -58,16 +60,17 @@ DecrementArrows:
RTL RTL
ArrowGame: ArrowGame:
LDA $0B99 : BEQ + LDA $0B99 : BEQ +
DEC $0B99 ; reduce minigame arrow count DEC $0B99 ; reduce minigame arrow count
LDA.l ArrowMode : BNE .rupees LDA.l ArrowMode : BNE .rupees
.normal .normal
LDA $7EF377 : INC #2 : STA $7EF377 ; increment arrow count (by 2 for some reason) LDA $7EF377 : INC #2 : STA $7EF377 ; increment arrow count (by 2 for some reason)
RTL
.rupees .rupees
PHX PHX
REP #$20 ; set 16-bit accumulator REP #$20 ; set 16-bit accumulator
PHA : LDA $7EF340 : DEC : AND #$0002 : TAX : PLA LDA $7EF340 : DEC : AND #$0002 : TAX
LDA $7EF360 : !ADD.l ArrowModeWoodArrowCost, X : STA $7EF360 LDA $7EF360 : !ADD.l ArrowModeWoodArrowCost, X : STA $7EF360
SEP #$20 ; set 8-bit accumulator SEP #$20 ; set 8-bit accumulator
PLX PLX
+ +