shithub: pokecrystal

Download patch

ref: 09d9f2c1ef48b0e33ba1616d7a3459f5d4431ce3
parent: 89d6a246443d068c13d1c2413f9a70464b235d53
author: mid-kid <esteve.varela@gmail.com>
date: Sun Nov 26 06:35:13 EST 2017

Add MobileError-related labels

This function is called from a few different places in the mobile code,
including from one special that is only executed when the
BattleTowerRoomMenu special returns with a non-zero code.

Since that special causes a blue "error" screen to appear, that looks
the exact same as the one you'd get when trying to connect from the
mobile trade corner/battle colosseum in a Pokémon Center's top floor,
and this function contains a bunch of japanese strings in a jumptable, I
think it's reasonable to assume it should be called
"DisplayMobileError".

--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -161,7 +161,7 @@
 	add_special Special_Menu_ChallengeExplanationCancel
 	add_special Function17d2b6
 	add_special Function17d2ce
-	add_special Function17f53d
+	add_special BattleTowerMobileError
 	add_special AskMobileOrCable
 	add_special SpecialHoOhChamber
 	add_special Function102142
--- a/maps/BattleTower1F.asm
+++ b/maps/BattleTower1F.asm
@@ -91,7 +91,7 @@
 	special BattleTowerAction
 	special BattleTowerRoomMenu
 	if_equal $a, Script_Menu_ChallengeExplanationCancel
-	if_not_equal $0, UnknownScript_0x9e550
+	if_not_equal $0, Script_MobileError
 	writebyte BATTLETOWERACTION_11
 	special BattleTowerAction
 	writetext Text_RightThisWayToYourBattleRoom
@@ -159,7 +159,7 @@
 	end
 
 UnreferencedScript_0x9e4b6:
-	special Function17f53d
+	special BattleTowerMobileError
 	closetext
 	end
 
@@ -178,7 +178,7 @@
 	special BattleTowerAction
 	special Function1700ba
 	if_equal $a, Script_Menu_ChallengeExplanationCancel
-	if_not_equal $0, UnknownScript_0x9e550
+	if_not_equal $0, Script_MobileError
 	writetext Text_ReceivedAListOfLeadersOnTheHonorRoll
 	spriteface BATTLETOWER1F_RECEPTIONIST, LEFT
 	writetext Text_PleaseConfirmOnThisMonitor
@@ -237,8 +237,8 @@
 	waitbutton
 	jump Script_Menu_ChallengeExplanationCancel
 
-UnknownScript_0x9e550:
-	special Function17f53d
+Script_MobileError:
+	special BattleTowerMobileError
 	closetext
 	end
 
--- a/misc/mobile_40.asm
+++ b/misc/mobile_40.asm
@@ -326,7 +326,7 @@
 	ld a, $01
 	ld [rSVBK], a
 
-	callba Function17f555
+	callba DisplayMobileError
 
 	pop af
 	ld [rSVBK], a
--- a/misc/mobile_45.asm
+++ b/misc/mobile_45.asm
@@ -7533,7 +7533,7 @@
 .asm_117bd0
 	ld a, $2
 	ld [wc303], a
-	callba Function17f555
+	callba DisplayMobileError
 	ld a, $80
 	ld [wJumptableIndex], a
 	ret
--- a/misc/mobile_5c.asm
+++ b/misc/mobile_5c.asm
@@ -658,7 +658,7 @@
 	callba Function106464
 	ld a, $2
 	ld [wc303], a
-	callba Function17f555
+	callba DisplayMobileError
 asm_171c60: ; 171c60 (5c:5c60)
 	ld a, $80
 	ld [wcd49], a
--- a/misc/mobile_5f.asm
+++ b/misc/mobile_5f.asm
@@ -3003,7 +3003,7 @@
 	call ClearScreen
 	call Function17e349
 	call Function17d5f6
-	callba Function17f555
+	callba DisplayMobileError
 	call Function17e349
 	call Function17dcaf
 	xor a
@@ -4623,7 +4623,7 @@
 	jr .asm_17f536
 ; 17f53d
 
-Function17f53d: ; 17f53d
+BattleTowerMobileError: ; 17f53d
 	call FadeToMenu
 	xor a
 	ld [wc303], a
@@ -4632,7 +4632,7 @@
 	ld a, $1
 	ld [rSVBK], a
 
-	call Function17f555
+	call DisplayMobileError
 
 	pop af
 	ld [rSVBK], a
@@ -4640,7 +4640,7 @@
 	ret
 ; 17f555
 
-Function17f555: ; 17f555
+DisplayMobileError: ; 17f555
 .loop
 	call JoyTextDelay
 	call .RunJumptable