diff options
| author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-11-05 23:50:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-05 23:50:02 -0500 |
| commit | 5db3bdd6551fad07066b669db1e44a6151aaa0b4 (patch) | |
| tree | ab357b894c9457b3d1d38fd49300df34412168f8 /engine/items/inventory.asm | |
| parent | Merge pull request #59 from Rangi42/master (diff) | |
| parent | Sync more with pokered (diff) | |
| download | pokeyellow-5db3bdd6551fad07066b669db1e44a6151aaa0b4.tar.gz pokeyellow-5db3bdd6551fad07066b669db1e44a6151aaa0b4.tar.xz pokeyellow-5db3bdd6551fad07066b669db1e44a6151aaa0b4.zip | |
Merge pull request #60 from Rangi42/master
Organize home and macro code
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 c2e0b2b4..e28edc6c 100644 --- a/engine/items/inventory.asm +++ b/engine/items/inventory.asm @@ -34,9 +34,9 @@ AddItemToInventory_:: 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 -.loop +.addAnotherStackOfItem ld a, [hl] - cp a, $ff ; is it the end of the table? + cp $ff ; is it the end of the table? jr nz, .notAtEndOfInventory .addNewItem ; add an item not yet in the inventory pop hl @@ -74,7 +74,7 @@ AddItemToInventory_:: ; if so, store 99 in the current slot and store the rest in a new slot ld a, 99 ld [hli], a - jp .loop + jp .addAnotherStackOfItem .increaseItemQuantityFailed pop hl and a |
