diff options
| author | Sylvie <35663410+Rangi42@users.noreply.github.com> | 2024-08-04 10:05:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-04 10:05:33 -0400 |
| commit | 77d051479bd0ed96cc2efdba52f837afd1e119c3 (patch) | |
| tree | 72a22aeb8dd6edc10323f0ee72fe9dbf73e5481a /engine/items/inventory.asm | |
| parent | Identify wcd6d as wNameBuffer and others (#455) (diff) | |
| download | pokeyellow-77d051479bd0ed96cc2efdba52f837afd1e119c3.tar.gz pokeyellow-77d051479bd0ed96cc2efdba52f837afd1e119c3.tar.xz pokeyellow-77d051479bd0ed96cc2efdba52f837afd1e119c3.zip | |
Identify wcf91 as wCurPartySpecies, wCurItem, and wCurListMenuItem (#457)
Diffstat (limited to 'engine/items/inventory.asm')
| -rw-r--r-- | engine/items/inventory.asm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm index ec1cfd0f..6ac75ec7 100644 --- a/engine/items/inventory.asm +++ b/engine/items/inventory.asm @@ -1,7 +1,7 @@ ; function to add an item (in varying quantities) to the player's bag or PC box ; INPUT: ; hl = address of inventory (either wNumBagItems or wNumBoxItems) -; [wcf91] = item ID +; [wCurItem] = item ID ; [wItemQuantity] = item quantity ; sets carry flag if successful, unsets carry flag if unsuccessful AddItemToInventory_:: @@ -30,7 +30,7 @@ AddItemToInventory_:: .notAtEndOfInventory ld a, [hli] ld b, a ; b = ID of current item in table - ld a, [wcf91] ; a = ID of item being added + ld a, [wCurItem] ; a = ID of item being added cp b ; does the current item in the table match the item being added? jp z, .increaseItemQuantity ; if so, increase the item's quantity inc hl @@ -50,7 +50,7 @@ AddItemToInventory_:: ld c, a ld b, 0 add hl, bc ; hl = address to store the item - ld a, [wcf91] + ld a, [wCurItem] ld [hli], a ; store item ID ld a, [wItemQuantity] ld [hli], a ; store item quantity |
