diff --git a/bookofmudora.asm b/bookofmudora.asm index 7ae84e6..b1c8ddd 100644 --- a/bookofmudora.asm +++ b/bookofmudora.asm @@ -16,7 +16,7 @@ DrawLibraryItemGFX: RTL ;-------------------------------------------------------------------------------- SetLibraryItem: - LDY.w SprItemReceipt, X + LDY.w SprSourceItemId, X JSL ItemSet_Library ; contains thing we wrote over RTL ;-------------------------------------------------------------------------------- @@ -52,7 +52,7 @@ RTL ;-------------------------------------------------------------------------------- GiveBonkItem: LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID - LDA.w SprItemReceipt, X + LDA.w SprSourceItemId, X JSR AbsorbKeyCheck : BCC .notKey PHY : LDY.b #$24 : JSL AddInventory : PLY ; do inventory processing for a small key LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys diff --git a/heartpieces.asm b/heartpieces.asm index 4e2fe59..58ad5af 100644 --- a/heartpieces.asm +++ b/heartpieces.asm @@ -4,19 +4,10 @@ HeartPieceGet: PHX : PHY LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID - LDY.w SprItemReceipt, X : BNE + - LDA.w SprSourceItemId, X : BNE ++ - JSL LoadHeartPieceRoomValue - STA.w SprSourceItemId, X - ++ - JSL AttemptItemSubstitution - JSL ResolveLootIDLong - STA.w SprItemReceipt, X - TAY - + + LDY.w SprSourceItemId, X JSL MaybeMarkDigSpotCollected .skipLoad - LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID + LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID CPY.b #$26 : BNE .not_heart ; don't add a 1/4 heart if it's not a heart piece CMP.b #$00 : BNE .not_heart LDA.l HeartPieceQuarter : INC A : AND.b #$03 : STA.l HeartPieceQuarter @@ -32,16 +23,7 @@ RTL HeartContainerGet: PHX : PHY JSL IncrementBossSword - LDY.w SprItemReceipt, X : BNE + - LDA.w SprSourceItemId, X : BNE ++ - JSL LoadHeartContainerRoomValue - STA.w SprSourceItemId, X - ++ - JSL AttemptItemSubstitution - JSL ResolveLootIDLong - STA.w SprItemReceipt, X - TAY - + + LDY.w SprSourceItemId, X BRA HeartPieceGet_skipLoad ;-------------------------------------------------------------------------------- DrawHeartPieceGFX: diff --git a/inventory.asm b/inventory.asm index 003dfe2..97de1a5 100644 --- a/inventory.asm +++ b/inventory.asm @@ -646,7 +646,7 @@ RTL ; CollectPowder: ;-------------------------------------------------------------------------------- CollectPowder: - LDY.w SprItemReceipt, X ; Retrieve stored item type + LDY.w SprSourceItemId, X ; Retrieve stored item type BNE + ; if for any reason the item value is 0 reload it, just in case %GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY diff --git a/keydrop/standing_items.asm b/keydrop/standing_items.asm index 881f0e7..a511bbb 100644 --- a/keydrop/standing_items.asm +++ b/keydrop/standing_items.asm @@ -682,7 +682,7 @@ KeyGet: PHA LDA.l StandingItemsOn : BNE + PLA : RTL - + LDY.w SprItemReceipt, X + + LDY.w SprSourceItemId, X LDA.w SprItemIndex, X : STA.w SpawnedItemIndex LDA.w SprItemFlags, X : STA.w SpawnedItemFlag STY.b Scrap00 @@ -704,7 +704,7 @@ KeyGet: .skip PLX .receive JSL Player_HaltDashAttackLong - TYA : JSL AttemptItemSubstitution : JSL ResolveLootIDLong : TAY + TYA : JSL AttemptItemSubstitution : TAY JSL Link_ReceiveItem PLA : DEC : RTL @@ -712,7 +712,7 @@ KeyTable: db $A0, $A0, $A2, $A3, $A4, $A5, $A6, $A7, $A8, $A9, $AA, $AB, $AC, $AD BigKeyGet: - LDY.w SprItemReceipt, X + LDY.w SprSourceItemId, X CPY.b #$32 : BNE + STZ.w ItemReceiptMethod : LDY.b #$32 ; what we wrote over PHX : JSL Link_ReceiveItem : PLX ; what we wrote over diff --git a/npcitems.asm b/npcitems.asm index d2c6501..449769d 100644 --- a/npcitems.asm +++ b/npcitems.asm @@ -138,7 +138,7 @@ RTL ItemSet_Mushroom: PHA LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1 - LDY.w SprItemReceipt, X ; Retrieve stored item type + LDY.w SprSourceItemId, X ; Retrieve stored item type BNE + ; if for any reason the item value is 0 reload it, just in case %GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) : TAY diff --git a/shopkeeper.asm b/shopkeeper.asm index da95e0e..3183eec 100644 --- a/shopkeeper.asm +++ b/shopkeeper.asm @@ -466,7 +466,6 @@ Shopkeeper_BuyItem: PLX LDA.l ShopInventory, X JSL AttemptItemSubstitution - JSL ResolveLootIDLong TAY : JSL Link_ReceiveItem LDA.l ShopInventory+3, X : INC : STA.l ShopInventory+3, X LDA.b #$00 : STA.l ShopEnableCount