summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIIMarckus <iimarckus@gmail.com>2014-10-16 00:12:44 -0600
committerIIMarckus <iimarckus@gmail.com>2014-10-16 00:12:44 -0600
commit008cface5253f5e3e786daea365d9528a50e8dbf (patch)
treef44c2664b0bfe38fdf68506c2480b721bc533fd6
parentbf6a1bab616bce9feaaa53409867140ffa33890d (diff)
Minor comment/label improvements in Cinnabar Lab.
-rwxr-xr-xengine/predefs.asm2
-rwxr-xr-xscripts/lab4.asm16
2 files changed, 11 insertions, 7 deletions
diff --git a/engine/predefs.asm b/engine/predefs.asm
index b73c485a..b21ff884 100755
--- a/engine/predefs.asm
+++ b/engine/predefs.asm
@@ -80,7 +80,7 @@ PredefPointers:: ; 4fe79 (13:7e79)
add_predef LoadTilesetHeader
add_predef LearnMoveFromLevelUp
add_predef LearnMove
- add_predef IsItemInBag_ ; 1C, used in Pokémon Tower
+ add_predef IsItemInBag_
dbw $03,CheckForHiddenObjectOrBookshelfOrCardKeyDoor ; for these two, the bank number is actually 0
dbw $03,GiveItem
add_predef ChangeBGPalColor0_4Frames
diff --git a/scripts/lab4.asm b/scripts/lab4.asm
index a1df3387..c2d8d304 100755
--- a/scripts/lab4.asm
+++ b/scripts/lab4.asm
@@ -6,14 +6,16 @@ Lab4TextPointers: ; 75d34 (1d:5d34)
dw Lab4Text2
Lab4Script_75d38: ; 75d38 (1d:5d38)
+; construct a list of all fossils in the player's bag
+
xor a
ld [wcd37], a
ld de, wcc5b
ld hl, FossilsList
-.asm_75d42
+.loop
ld a, [hli]
and a
- jr z, .asm_75d64
+ jr z, .done
push hl
push de
ld [wd11e], a
@@ -23,7 +25,9 @@ Lab4Script_75d38: ; 75d38 (1d:5d38)
pop hl
ld a, b
and a
- jr z, .asm_75d42
+ jr z, .loop
+
+ ; A fossil's in the bag
ld a, [wd11e]
ld [de], a
inc de
@@ -31,8 +35,8 @@ Lab4Script_75d38: ; 75d38 (1d:5d38)
ld hl, wcd37
inc [hl]
pop hl
- jr .asm_75d42
-.asm_75d64
+ jr .loop
+.done
ld a, $ff
ld [de], a
ret
@@ -75,7 +79,7 @@ Lab4Text1: ; 75d6c (1d:5d6c)
set 2, [hl]
ld a, [W_FOSSILMON]
ld b, a
- ld c, $1e
+ ld c, 30
call GivePokemon
jr nc, .asm_75d93 ; 0x75db9 $d8
ld hl, wd7a3