aboutsummaryrefslogtreecommitdiffstats
path: root/engine
diff options
context:
space:
mode:
authorvulcandth <vulcandth@gmail.com>2022-04-17 13:44:58 -0500
committerGitHub <noreply@github.com>2022-04-17 14:44:58 -0400
commita7fb0998b65a2f5aa047d5e9f0528a62e3fef112 (patch)
tree69bddb155965b03c7c31a1816d19e322c7e7adb4 /engine
parentAdd comment explaining the purpose of TrainerNamePointers (diff)
downloadpokeyellow-a7fb0998b65a2f5aa047d5e9f0528a62e3fef112.tar.gz
pokeyellow-a7fb0998b65a2f5aa047d5e9f0528a62e3fef112.tar.xz
pokeyellow-a7fb0998b65a2f5aa047d5e9f0528a62e3fef112.zip
Add hSerialConnectionStatus vc_assert (#83)
Diffstat (limited to 'engine')
-rw-r--r--engine/link/cable_club_npc.asm8
1 files changed, 8 insertions, 0 deletions
diff --git a/engine/link/cable_club_npc.asm b/engine/link/cable_club_npc.asm
index b65acfdc..293a208a 100644
--- a/engine/link/cable_club_npc.asm
+++ b/engine/link/cable_club_npc.asm
@@ -30,7 +30,15 @@ CableClubNPC::
xor a
ldh [hSerialReceiveData], a
ld a, START_TRANSFER_EXTERNAL_CLOCK
+; This vc_hook causes the Virtual Console to set [hSerialConnectionStatus] to
+; USING_INTERNAL_CLOCK, which allows the player to proceed past the link
+; receptionist's "Please wait." It assumes that hSerialConnectionStatus is at
+; its original address.
vc_hook linkCable_fake_begin
+ vc_assert hSerialConnectionStatus == $ffaa, \
+ "hSerialConnectionStatus is no longer located at 00:ffaa"
+ vc_assert USING_INTERNAL_CLOCK == $02, \
+ "USING_INTERNAL_CLOCK is no longer equal to $02."
ldh [rSC], a
ld a, [wLinkTimeoutCounter]
dec a