Refactored Potion shop hooks to allow old behaviors

This commit is contained in:
aerinon
2021-02-22 14:48:10 -07:00
parent 8b622dd841
commit f6cc3607df
3 changed files with 63 additions and 15 deletions

View File

@@ -989,7 +989,6 @@ 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
@@ -998,8 +997,10 @@ DrawPowder:
LDA #$00 : STA.l !REDRAW ; reset redraw flag
BRA .defer
+
; LDA $0DA0, X ; Retrieve stored item type
; JSL.l DrawDynamicTile
; this fights with the shopkeep code, so had to move the powder draw there when potion shop is custom
LDA !SHOP_TYPE : CMP.b #$FF : BNE .defer
LDA $0DA0, X ; Retrieve stored item type
JSL.l DrawDynamicTile
.defer
RTL
;--------------------------------------------------------------------------------