shithub: pokered

Download patch

ref: 6ec4b00b522e6f966475fc2d911712be1dcf5b6a
parent: b6aa26ffa4629e027ae0384c85ebeb9bc5635728
author: Matt <5638426+mattbruv@users.noreply.github.com>
date: Sun May 3 10:25:01 EDT 2020

clean up vermilion labels

binary files /dev/null b/pokered.sn1 differ
--- a/scripts/VermilionCity.asm
+++ b/scripts/VermilionCity.asm
@@ -4,7 +4,7 @@
 	bit 6, [hl]
 	res 6, [hl]
 	push hl
-	call nz, VermilionCityScript_197cb
+	call nz, .initCityScript
 	pop hl
 	bit 5, [hl]
 	res 5, [hl]
@@ -20,7 +20,7 @@
 	ld [wFirstLockTrashCanIndex], a
 	ret
 
-VermilionCityScript_197cb:
+.initCityScript
 	CheckEventHL EVENT_SS_ANNE_LEFT
 	ret z
 	CheckEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT
@@ -41,7 +41,7 @@
 	ld a, [wSpriteStateData1 + 9]
 	and a ; cp SPRITE_FACING_DOWN
 	ret nz
-	ld hl, CoordsData_19823
+	ld hl, SSAnneTicketCheckCoords
 	call ArePlayerCoordsInArray
 	ret nc
 	xor a
@@ -51,13 +51,13 @@
 	ld [hSpriteIndexOrTextID], a
 	call DisplayTextID
 	CheckEvent EVENT_SS_ANNE_LEFT
-	jr nz, .asm_19810
+	jr nz, .shipHasDeparted
 	ld b, S_S_TICKET
 	predef GetQuantityOfItemInBag
 	ld a, b
 	and a
 	ret nz
-.asm_19810
+.shipHasDeparted
 	ld a, D_UP
 	ld [wSimulatedJoypadStatesEnd], a
 	ld a, $1
@@ -67,12 +67,12 @@
 	ld [wVermilionCityCurScript], a
 	ret
 
-CoordsData_19823:
-	db $1e,$12
+SSAnneTicketCheckCoords:
+	db $1e,$12 ; y, x
 	db $ff
 
 VermilionCityScript4:
-	ld hl, CoordsData_19823
+	ld hl, SSAnneTicketCheckCoords
 	call ArePlayerCoordsInArray
 	ret c
 	ld a, $0
@@ -135,14 +135,14 @@
 VermilionCityText2:
 	TX_ASM
 	CheckEvent EVENT_SS_ANNE_LEFT
-	jr nz, .asm_1989e
+	jr nz, .shipHasDeparted
 	ld hl, VermilionCityText_198a7
 	call PrintText
-	jr .asm_198a4
-.asm_1989e
+	jr .end
+.shipHasDeparted
 	ld hl, VermilionCityText_198ac
 	call PrintText
-.asm_198a4
+.end
 	jp TextScriptEnd
 
 VermilionCityText_198a7:
@@ -156,18 +156,18 @@
 VermilionCityText3:
 	TX_ASM
 	CheckEvent EVENT_SS_ANNE_LEFT
-	jr nz, .asm_198f6
+	jr nz, .shipHasDeparted
 	ld a, [wSpriteStateData1 + 9]
 	cp SPRITE_FACING_RIGHT
-	jr z, .asm_198c8
-	ld hl, VermilionCityCoords1
+	jr z, .greetPlayer
+	ld hl, .inFrontOfOrBehindGuardCoords
 	call ArePlayerCoordsInArray
-	jr nc, .asm_198d0
-.asm_198c8
+	jr nc, .greetPlayerAndCheckTicket
+.greetPlayer
 	ld hl, SSAnneWelcomeText4
 	call PrintText
-	jr .asm_198fc
-.asm_198d0
+	jr .end
+.greetPlayerAndCheckTicket
 	ld hl, SSAnneWelcomeText9
 	call PrintText
 	ld b, S_S_TICKET
@@ -174,25 +174,25 @@
 	predef GetQuantityOfItemInBag
 	ld a, b
 	and a
-	jr nz, .asm_198e9
+	jr nz, .playerHasTicket
 	ld hl, SSAnneNoTicketText
 	call PrintText
-	jr .asm_198fc
-.asm_198e9
+	jr .end
+.playerHasTicket
 	ld hl, SSAnneFlashedTicketText
 	call PrintText
 	ld a, $4
 	ld [wVermilionCityCurScript], a
-	jr .asm_198fc
-.asm_198f6
+	jr .end
+.shipHasDeparted
 	ld hl, SSAnneNotHereText
 	call PrintText
-.asm_198fc
+.end
 	jp TextScriptEnd
 
-VermilionCityCoords1:
-	db $1d,$13
-	db $1f,$13
+.inFrontOfOrBehindGuardCoords
+	db $1d,$13 ; y, x of tile in front of guard
+	db $1f,$13 ; y, x of tile behind guard
 	db $ff
 
 SSAnneWelcomeText4: