diff options
author | dannye <corrnondacqb@yahoo.com> | 2016-01-12 18:45:02 -0600 |
---|---|---|
committer | dannye <corrnondacqb@yahoo.com> | 2016-01-12 18:45:02 -0600 |
commit | 5914540ba780d7936fd6624d6fde2d67a9f7a773 (patch) | |
tree | a1ce27018f39d98f49d89468df426d0291e18560 /scripts/lab4.asm | |
parent | ccf4fe54a8e444aaf966fac7b38bc9452c494222 (diff) | |
parent | 8a5a7d8e68538b727e0c166488265f395603366e (diff) |
Merge branch 'master' of https://github.com/pret/pokered into rgbgfxrgbgfx
Diffstat (limited to 'scripts/lab4.asm')
-rwxr-xr-x | scripts/lab4.asm | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/scripts/lab4.asm b/scripts/lab4.asm index f2c4d8d7..7eb6bae8 100755 --- a/scripts/lab4.asm +++ b/scripts/lab4.asm @@ -5,12 +5,11 @@ Lab4TextPointers: ; 75d34 (1d:5d34) dw Lab4Text1 dw Lab4Text2 -Lab4Script_75d38: ; 75d38 (1d:5d38) +Lab4Script_GetFossilsInBag: ; 75d38 (1d:5d38) ; construct a list of all fossils in the player's bag - xor a - ld [wcd37], a - ld de, wcc5b + ld [wFilteredBagItemsCount], a + ld de, wFilteredBagItems ld hl, FossilsList .loop ld a, [hli] @@ -20,7 +19,7 @@ Lab4Script_75d38: ; 75d38 (1d:5d38) push de ld [wd11e], a ld b, a - predef IsItemInBag_ + predef GetQuantityOfItemInBag pop de pop hl ld a, b @@ -32,7 +31,7 @@ Lab4Script_75d38: ; 75d38 (1d:5d38) ld [de], a inc de push hl - ld hl, wcd37 + ld hl, wFilteredBagItemsCount inc [hl] pop hl jr .loop @@ -53,8 +52,8 @@ Lab4Text1: ; 75d6c (1d:5d6c) jr nz, .asm_75d96 ld hl, Lab4Text_75dc6 call PrintText - call Lab4Script_75d38 - ld a, [wcd37] + call Lab4Script_GetFossilsInBag + ld a, [wFilteredBagItemsCount] and a jr z, .asm_75d8d callba GiveFossilToCinnabarLab @@ -75,7 +74,7 @@ Lab4Text1: ; 75d6c (1d:5d6c) ld hl, Lab4Text_75dd5 call PrintText SetEvent EVENT_LAB_HANDING_OVER_FOSSIL_MON - ld a, [W_FOSSILMON] + ld a, [wFossilMon] ld b, a ld c, 30 call GivePokemon |