Ported over pepper's shop code

This commit is contained in:
aerinon
2021-01-29 13:55:13 -07:00
parent a9bddea1b4
commit 05e7f8eb96
7 changed files with 147 additions and 53 deletions

View File

@@ -924,6 +924,11 @@ LoadPowder:
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues)
STA $0DA0, Y ; Store item type
JSL.l PrepDynamicTile
STA $7F505E
LDA #$00
STA $7F505F
STA $7F5060
STA $7F5061
RTL
;--------------------------------------------------------------------------------
@@ -946,6 +951,7 @@ RTL
!REDRAW = "$7F5000"
;--------------------------------------------------------------------------------
DrawPowder:
; this fights with the shopkeep code, so had to move the powder draw there
LDA $02DA : BNE .defer ; defer if link is buying a potion
LDA.l !REDRAW : BEQ +
LDA.l WitchItem_Player : STA !MULTIWORLD_SPRITEITEM_PLAYER_ID
@@ -954,8 +960,8 @@ DrawPowder:
LDA #$00 : STA.l !REDRAW ; reset redraw flag
BRA .defer
+
LDA $0DA0, X ; Retrieve stored item type
JSL.l DrawDynamicTile
; LDA $0DA0, X ; Retrieve stored item type
; JSL.l DrawDynamicTile
.defer
RTL
;--------------------------------------------------------------------------------