shithub: pokered

Download patch

ref: 008cface5253f5e3e786daea365d9528a50e8dbf
parent: bf6a1bab616bce9feaaa53409867140ffa33890d
author: IIMarckus <iimarckus@gmail.com>
date: Wed Oct 15 20:12:44 EDT 2014

Minor comment/label improvements in Cinnabar Lab.

--- a/engine/predefs.asm
+++ b/engine/predefs.asm
@@ -80,7 +80,7 @@
 	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
--- a/scripts/lab4.asm
+++ b/scripts/lab4.asm
@@ -6,14 +6,16 @@
 	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 @@
 	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 @@
 	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 @@
 	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