From 45ed05decf330faab4503fe8fecadc54698c9724 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 7 Jul 2020 11:10:29 -0400 Subject: Use HIGH() and LOW() --- engine/items/inventory.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/items') diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm index 7ce61cb9..bf433175 100644 --- a/engine/items/inventory.asm +++ b/engine/items/inventory.asm @@ -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 -- cgit v1.2.3