Use HIGH() and LOW()

This commit is contained in:
Rangi 2020-07-07 11:10:29 -04:00
parent bbc257476f
commit 45ed05decf
22 changed files with 89 additions and 87 deletions

View file

@ -12,10 +12,10 @@ AddItemToInventory_::
push hl
push hl
ld d, PC_ITEM_CAPACITY ; how many items the PC can hold
ld a, wNumBagItems & $FF
ld a, LOW(wNumBagItems)
cp l
jr nz, .checkIfInventoryFull
ld a, wNumBagItems >> 8
ld a, HIGH(wNumBagItems)
cp h
jr nz, .checkIfInventoryFull
; if the destination is the bag