Fix Tablet items
Ensure that standing overworld items will never load the null item.
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
HeartPieceGet:
|
||||
PHX : PHY
|
||||
LDY $0DA0, X ; load item value into Y register
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
JSL.l LoadHeartPieceRoomValue : TAY
|
||||
+
|
||||
JSL.l MaybeMarkDigSpotCollected
|
||||
|
||||
.skipLoad
|
||||
@@ -35,6 +39,10 @@ HeartContainerGet:
|
||||
PHX : PHY
|
||||
JSL.l AddInventory_incrementBossSwordLong
|
||||
LDY $0DA0, X ; load item value into Y register
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
JSL.l LoadHeartContainerRoomValue : TAY
|
||||
+
|
||||
|
||||
BRA HeartPieceGet_skipLoad
|
||||
;--------------------------------------------------------------------------------
|
||||
|
||||
@@ -1018,6 +1018,10 @@ RTL
|
||||
;--------------------------------------------------------------------------------
|
||||
CollectPowder:
|
||||
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
|
||||
+
|
||||
STZ $02E9 ; item from NPC
|
||||
JSL.l Link_ReceiveItem
|
||||
;JSL.l FullInventoryExternal
|
||||
|
||||
@@ -156,6 +156,10 @@ ItemSet_Mushroom:
|
||||
PHA
|
||||
LDA !NPC_FLAGS_2 : ORA.b #$10 : STA !NPC_FLAGS_2
|
||||
LDY $0DA0, X ; Retrieve stored item type
|
||||
BNE +
|
||||
; if for any reason the item value is 0 reload it, just in case
|
||||
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) : TAY
|
||||
+
|
||||
PLA
|
||||
;LDY.b #$29
|
||||
STZ $02E9 ; thing we wrote over - the mushroom is an npc for item purposes apparently
|
||||
|
||||
@@ -33,6 +33,7 @@ SpawnTabletItem:
|
||||
; JSL.l HeartPieceGet
|
||||
;RTL
|
||||
JSL.l LoadOutdoorValue
|
||||
PHA
|
||||
JSL.l PrepDynamicTile
|
||||
|
||||
LDA.b #$01 : STA !FORCE_HEART_SPAWN : STA !SKIP_HEART_SAVE
|
||||
@@ -42,6 +43,7 @@ SpawnTabletItem:
|
||||
STA $7FFE00
|
||||
JSL Sprite_SpawnDynamically
|
||||
|
||||
PLA : STA $0DA0, Y ; Store item type
|
||||
LDA $22 : STA $0D10, Y
|
||||
LDA $23 : STA $0D30, Y
|
||||
|
||||
|
||||
Reference in New Issue
Block a user