From eb4f511dc588850f86ff470d83ef96469fc828e0 Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sat, 15 Sep 2018 09:55:49 -0400 Subject: [PATCH] Fix powder item crash --- inventory.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inventory.asm b/inventory.asm index 2678aa8..6b1937d 100644 --- a/inventory.asm +++ b/inventory.asm @@ -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