diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-11-05 23:50:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 23:50:03 -0500 |
commit | d3f13528754b985e892385dbd88c3c9a95681f1b (patch) | |
tree | 4a18885606996ff59bb714afb5db9a548e2f94a7 /engine/items | |
parent | abaf9fee7c73e708ef8c3e7a1ed710bfc9ec6f6e (diff) | |
parent | e16dec874a239c162680b169391d3c0c7ee1fc70 (diff) |
Merge pull request #301 from Rangi42/master
Sync home and macro code with pokeyellow
Diffstat (limited to 'engine/items')
-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 bf433175..ec1cfd0f 100644 --- a/engine/items/inventory.asm +++ b/engine/items/inventory.asm @@ -27,7 +27,7 @@ AddItemToInventory_:: ld a, [hli] and a jr z, .addNewItem -.loop +.notAtEndOfInventory ld a, [hli] ld b, a ; b = ID of current item in table ld a, [wcf91] ; a = ID of item being added @@ -36,7 +36,7 @@ AddItemToInventory_:: inc hl ld a, [hl] cp $ff ; is it the end of the table? - jr nz, .loop + jr nz, .notAtEndOfInventory .addNewItem ; add an item not yet in the inventory pop hl ld a, d @@ -73,7 +73,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 .notAtEndOfInventory .increaseItemQuantityFailed pop hl and a |