Shop fixes

This commit is contained in:
aerinon
2021-02-01 16:29:09 -07:00
parent 2a08959229
commit a63aa6f5fe
3 changed files with 20 additions and 16 deletions

View File

@@ -88,7 +88,7 @@ RTL
OnFileLoad:
REP #$10 ; set 16 bit index registers
JSL.l EnableForceBlank ; what we wrote over
REP #$20 : LDA.l $30F010 : STA.l $7EF33E : SEP $#20
REP #$20 : LDA.l $30F010 : STA.l $7EF33E : SEP #$20
LDA.b #$07 : STA $210c ; Restore screen 3 to normal tile area

View File

@@ -260,9 +260,11 @@ AddInventory:
; don't count any of this stuff
CPY.b #$20 : BNE + : BRL .itemCounts : + ; Crystal
CPY.b #$26 : BNE + : BRL .itemCounts : + ; Heart Piece Completion Heart
LDA.l !SHOP_ENABLE_COUNT : BNE ++
CPY.b #$2E : BNE + : BRL .itemCounts : + ; Red Potion (Refill)
CPY.b #$2F : BNE + : BRL .itemCounts : + ; Green Potion (Refill)
CPY.b #$30 : BNE + : BRL .itemCounts : + ; Blue Potion (Refill)
++
CPY.b #$37 : BNE + : BRL .itemCounts : + ; Pendant
CPY.b #$38 : BNE + : BRL .itemCounts : + ; Pendant
CPY.b #$39 : BNE + : BRL .itemCounts : + ; Pendant

View File

@@ -897,6 +897,7 @@ Shopkeeper_DrawNextPrice:
PLY
LDA.l !SHOP_INVENTORY+1, X : STA $0C ; set value
BEQ .free
JSR.w DrawPrice
SEP #$20 : STA $06 : STZ $07 ; set 8-bit accumulator & store result
PHA
@@ -910,6 +911,7 @@ Shopkeeper_DrawNextPrice:
ASL #2 : !ADD $90 : STA $90 ; increment oam pointer
PLA
!ADD $92 : STA $92
.free
PLP : PLY : PLX
PLB
RTS