diff options
Diffstat (limited to 'engine/menu/pc.asm')
-rwxr-xr-x | engine/menu/pc.asm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm index 8ec31226..b31970c8 100755 --- a/engine/menu/pc.asm +++ b/engine/menu/pc.asm @@ -121,18 +121,18 @@ RemoveItemByID: ld b, a xor a ld [hItemToRemoveIndex], a -.asm_17f40 +.loop ld a, [hli] - cp $ff + cp $ff ; have we reached the cancel button (terminator) ret z - cp b - jr z, .asm_17f4f + cp b ; is the current item the item we want? + jr z, .foundItem ; if so, remove it from the inventory inc hl ld a, [hItemToRemoveIndex] inc a ld [hItemToRemoveIndex], a - jr .asm_17f40 -.asm_17f4f + jr .loop +.foundItem ld a, $1 ld [wItemQuantity], a ld a, [hItemToRemoveIndex] |