summaryrefslogtreecommitdiff
path: root/main.asm
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-08-12 22:14:31 -0700
committerYamaArashi <shadow962@live.com>2015-08-12 22:14:31 -0700
commit132d0367522b7acce602b146ca69bfad87ef96c6 (patch)
treedc13049a6ca810ab3368ce7a7942cc50659f54d1 /main.asm
parent64cfbcce7a71e6e75553575490fd60cbd61a5665 (diff)
named more variables
Diffstat (limited to 'main.asm')
-rwxr-xr-xmain.asm14
1 files changed, 8 insertions, 6 deletions
diff --git a/main.asm b/main.asm
index a61c433b..6db76b46 100755
--- a/main.asm
+++ b/main.asm
@@ -4508,21 +4508,23 @@ InitializeEmptyList:
ret
-IsItemInBag_: ; f8a5 (3:78a5)
+GetQuantityOfItemInBag: ; f8a5 (3:78a5)
+; In: b = item ID
+; Out: b = how many of that item are in the bag
call GetPredefRegisters
ld hl, wNumBagItems
-.asm_f8ab
+.loop
inc hl
ld a, [hli]
cp $ff
- jr z, .asm_f8b7
+ jr z, .notInBag
cp b
- jr nz, .asm_f8ab
+ jr nz, .loop
ld a, [hl]
ld b, a
ret
-.asm_f8b7
- ld b, $0
+.notInBag
+ ld b, 0
ret
FindPathToPlayer: ; f8ba (3:78ba)