Fix powder item crash

This commit is contained in:
Kevin Cathcart
2018-09-15 09:55:49 -04:00
parent ff46a37344
commit eb4f511dc5

View File

@@ -932,7 +932,7 @@ RTL
LoadPowder:
JSL.l Sprite_SpawnDynamically ; thing we wrote over
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues)
STA $0E80, Y ; Store item type
STA $0DA0, Y ; Store item type
JSL.l PrepDynamicTile
RTL
;--------------------------------------------------------------------------------
@@ -958,12 +958,12 @@ RTL
DrawPowder:
LDA $02DA : BNE .defer ; defer if link is buying a potion
LDA.l !REDRAW : BEQ +
LDA $0E80, X ; Retrieve stored item type
LDA $0DA0, X ; Retrieve stored item type
JSL.l PrepDynamicTile
LDA #$00 : STA.l !REDRAW ; reset redraw flag
BRA .defer
+
LDA $0E80, X ; Retrieve stored item type
LDA $0DA0, X ; Retrieve stored item type
JSL.l DrawDynamicTile
.defer
RTL
@@ -1017,7 +1017,7 @@ RTL
; CollectPowder:
;--------------------------------------------------------------------------------
CollectPowder:
LDY $0E80, X ; Retrieve stored item type
LDY $0DA0, X ; Retrieve stored item type
BNE +
; if for any reason the item value is 0 reload it, just in case
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY