summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvulcandth <vulcandth@gmail.com>2022-04-16 19:42:06 -0500
committerGitHub <noreply@github.com>2022-04-16 20:42:06 -0400
commitf9077c6db62137288ee8e5bb086973a0c52f83b6 (patch)
tree54a0e8b756dfc8fa3e6ebee1f5150e889cc93553
parentb06cfe78fd8494fbccd4186b970382c49c416b5c (diff)
Additional vc_asserts (#906)HEADmaster
-rw-r--r--engine/link/link.asm8
-rw-r--r--engine/menus/save.asm4
2 files changed, 11 insertions, 1 deletions
diff --git a/engine/link/link.asm b/engine/link/link.asm
index 72bc6f368..e345f893c 100644
--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -2310,7 +2310,15 @@ WaitForLinkedFriend:
ld a, (0 << rSC_ON) | (0 << rSC_CLOCK)
ldh [rSC], a
ld a, (1 << rSC_ON) | (0 << rSC_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 == $ffcb, \
+ "hSerialConnectionStatus is no longer located at 00:ffcb."
+ vc_assert USING_INTERNAL_CLOCK == $02, \
+ "USING_INTERNAL_CLOCK is no longer equal to $02."
ldh [rSC], a
ld a, [wLinkTimeoutFrames]
dec a
diff --git a/engine/menus/save.asm b/engine/menus/save.asm
index 02a2541e8..026790b51 100644
--- a/engine/menus/save.asm
+++ b/engine/menus/save.asm
@@ -162,7 +162,7 @@ AddHallOfFameEntry:
call CopyBytes
call CloseSRAM
; This vc_hook causes the Virtual Console to set [sMobileEventIndex] and [sMobileEventIndexBackup]
-; to MOBILE_EVENT_OBJECT_GS_BALL ($b), which enables you to get the GS Ball, take it to Kurt, and
+; to MOBILE_EVENT_OBJECT_GS_BALL, which enables you to get the GS Ball, take it to Kurt, and
; encounter Celebi. It assumes that sMobileEventIndex and sMobileEventIndexBackup are at their
; original addresses.
vc_hook Enable_GS_Ball_mobile_event
@@ -170,6 +170,8 @@ AddHallOfFameEntry:
"sMobileEventIndex is no longer located at 01:be3c."
vc_assert BANK(sMobileEventIndexBackup) == $1 && sMobileEventIndexBackup == $be44, \
"sMobileEventIndexBackup is no longer located at 01:be44."
+ vc_assert MOBILE_EVENT_OBJECT_GS_BALL == $0b, \
+ "MOBILE_EVENT_OBJECT_GS_BALL is no longer equal to $0b."
ret
SaveGameData: