ref: 5c4795d5bc19edd872adf7b17d0c6264eecd6459
dir: /engine/items/get_bag_item_quantity.asm/
GetQuantityOfItemInBag: ; In: b = item ID ; Out: b = how many of that item are in the bag call GetPredefRegisters ld hl, wNumBagItems .loop inc hl ld a, [hli] cp $ff jr z, .notInBag cp b jr nz, .loop ld a, [hl] ld b, a ret .notInBag ld b, 0 ret