shithub: pokered

Download patch

ref: e88eebbc4dc7160b00f1af0008bc4b8bb5ef9aee
parent: 76289dfda0b7405944e10a78b7381c723475bea4
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sat Jul 18 10:01:13 EDT 2020

Consistent labels for Gym name scripts

--- a/scripts/CeladonGym.asm
+++ b/scripts/CeladonGym.asm
@@ -2,7 +2,7 @@
 	ld hl, wCurrentMapScriptFlags
 	bit 6, [hl]
 	res 6, [hl]
-	call nz, CeladonGymScript_48927
+	call nz, .LoadNames
 	call EnableAutoTextBoxDrawing
 	ld hl, CeladonGymTrainerHeader0
 	ld de, CeladonGym_ScriptPointers
@@ -11,15 +11,15 @@
 	ld [wCeladonGymCurScript], a
 	ret
 
-CeladonGymScript_48927:
-	ld hl, Gym4CityName
-	ld de, Gym4LeaderName
+.LoadNames:
+	ld hl, .CityName
+	ld de, .LeaderName
 	jp LoadGymLeaderAndCityName
 
-Gym4CityName:
+.CityName:
 	db "CELADON CITY@"
 
-Gym4LeaderName:
+.LeaderName:
 	db "ERIKA@"
 
 CeladonGymText_48943:
--- a/scripts/CeruleanGym.asm
+++ b/scripts/CeruleanGym.asm
@@ -2,7 +2,7 @@
 	ld hl, wCurrentMapScriptFlags
 	bit 6, [hl]
 	res 6, [hl]
-	call nz, CeruleanGymScript_5c6d0
+	call nz, .LoadNames
 	call EnableAutoTextBoxDrawing
 	ld hl, CeruleanGymTrainerHeader0
 	ld de, CeruleanGym_ScriptPointers
@@ -11,15 +11,15 @@
 	ld [wCeruleanGymCurScript], a
 	ret
 
-CeruleanGymScript_5c6d0:
-	ld hl, Gym2CityName
-	ld de, Gym2LeaderName
+.LoadNames:
+	ld hl, .CityName
+	ld de, .LeaderName
 	jp LoadGymLeaderAndCityName
 
-Gym2CityName:
+.CityName:
 	db "CERULEAN CITY@"
 
-Gym2LeaderName:
+.LeaderName:
 	db "MISTY@"
 
 CeruleanGymScript_5c6ed:
--- a/scripts/CinnabarGym.asm
+++ b/scripts/CinnabarGym.asm
@@ -10,7 +10,7 @@
 	bit 6, [hl]
 	res 6, [hl]
 	push hl
-	call nz, CinnabarGymScript_75772
+	call nz, .LoadNames
 	pop hl
 	bit 5, [hl]
 	res 5, [hl]
@@ -17,14 +17,16 @@
 	call nz, UpdateCinnabarGymGateTileBlocks
 	ResetEvent EVENT_2A7
 	ret
-CinnabarGymScript_75772:
-	ld hl, Gym7CityName
-	ld de, Gym7LeaderName
+
+.LoadNames:
+	ld hl, .CityName
+	ld de, .LeaderName
 	jp LoadGymLeaderAndCityName
 
-Gym7CityName:
+.CityName:
 	db "CINNABAR ISLAND@"
-Gym7LeaderName:
+
+.LeaderName:
 	db "BLAINE@"
 
 CinnabarGymScript_75792:
--- a/scripts/FuchsiaGym.asm
+++ b/scripts/FuchsiaGym.asm
@@ -1,5 +1,5 @@
 FuchsiaGym_Script:
-	call FuchsiaGymScript_75453
+	call .LoadNames
 	call EnableAutoTextBoxDrawing
 	ld hl, FuchsiaGymTrainerHeader0
 	ld de, FuchsiaGym_ScriptPointers
@@ -8,19 +8,20 @@
 	ld [wFuchsiaGymCurScript], a
 	ret
 
-FuchsiaGymScript_75453:
+.LoadNames:
 	ld hl, wCurrentMapScriptFlags
 	bit 6, [hl]
 	res 6, [hl]
 	ret z
-	ld hl, Gym5CityName
-	ld de, Gym5LeaderName
+	ld hl, .CityName
+	ld de, .LeaderName
 	call LoadGymLeaderAndCityName
 	ret
 
-Gym5CityName:
+.CityName:
 	db "FUCHSIA CITY@"
-Gym5LeaderName:
+
+.LeaderName:
 	db "KOGA@"
 
 FuchsiaGymScript_75477:
--- a/scripts/PewterGym.asm
+++ b/scripts/PewterGym.asm
@@ -2,7 +2,7 @@
 	ld hl, wCurrentMapScriptFlags
 	bit 6, [hl]
 	res 6, [hl]
-	call nz, PewterGymScript_5c3a4
+	call nz, .LoadNames
 	call EnableAutoTextBoxDrawing
 	ld hl, PewterGymTrainerHeader0
 	ld de, PewterGym_ScriptPointers
@@ -11,15 +11,15 @@
 	ld [wPewterGymCurScript], a
 	ret
 
-PewterGymScript_5c3a4:
-	ld hl, Gym1CityName
-	ld de, Gym1LeaderName
+.LoadNames:
+	ld hl, .CityName
+	ld de, .LeaderName
 	jp LoadGymLeaderAndCityName
 
-Gym1CityName:
+.CityName:
 	db "PEWTER CITY@"
 
-Gym1LeaderName:
+.LeaderName:
 	db "BROCK@"
 
 PewterGymScript_5c3bf:
--- a/scripts/SaffronGym.asm
+++ b/scripts/SaffronGym.asm
@@ -2,7 +2,7 @@
 	ld hl, wCurrentMapScriptFlags
 	bit 6, [hl]
 	res 6, [hl]
-	call nz, .extra
+	call nz, .LoadNames
 	call EnableAutoTextBoxDrawing
 	ld hl, SaffronGymTrainerHeader0
 	ld de, SaffronGym_ScriptPointers
@@ -11,15 +11,15 @@
 	ld [wSaffronGymCurScript], a
 	ret
 
-.extra
-	ld hl, Gym6CityName
-	ld de, Gym6LeaderName
+.LoadNames:
+	ld hl, .CityName
+	ld de, .LeaderName
 	jp LoadGymLeaderAndCityName
 
-Gym6CityName:
+.CityName:
 	db "SAFFRON CITY@"
 
-Gym6LeaderName:
+.LeaderName:
 	db "SABRINA@"
 
 SaffronGymText_5d048:
--- a/scripts/VermilionGym.asm
+++ b/scripts/VermilionGym.asm
@@ -3,7 +3,7 @@
 	bit 5, [hl]
 	res 5, [hl]
 	push hl
-	call nz, VermilionGymLoadName
+	call nz, .LoadNames
 	pop hl
 	bit 6, [hl]
 	res 6, [hl]
@@ -16,15 +16,15 @@
 	ld [wVermilionGymCurScript], a
 	ret
 
-VermilionGymLoadName:
-	ld hl, Gym3CityName
-	ld de, Gym3LeaderName
+.LoadNames:
+	ld hl, .CityName
+	ld de, .LeaderName
 	jp LoadGymLeaderAndCityName
 
-Gym3CityName:
+.CityName:
 	db "VERMILION CITY@"
 
-Gym3LeaderName:
+.LeaderName:
 	db "LT.SURGE@"
 
 VermilionGymSetDoorTile:
--- a/scripts/ViridianGym.asm
+++ b/scripts/ViridianGym.asm
@@ -1,6 +1,6 @@
 ViridianGym_Script:
-	ld hl, Gym8CityName
-	ld de, Gym8LeaderName
+	ld hl, .CityName
+	ld de, .LeaderName
 	call LoadGymLeaderAndCityName
 	call EnableAutoTextBoxDrawing
 	ld hl, ViridianGymTrainerHeader0
@@ -10,9 +10,10 @@
 	ld [wViridianGymCurScript], a
 	ret
 
-Gym8CityName:
+.CityName:
 	db "VIRIDIAN CITY@"
-Gym8LeaderName:
+
+.LeaderName:
 	db "GIOVANNI@"
 
 ViridianGymScript_748d6: