Improve mobile-related labels (#1061)

This commit is contained in:
SatoMew
2023-07-27 01:59:00 +01:00
committed by GitHub
parent c931b98a81
commit 768b3bdec1
23 changed files with 117 additions and 120 deletions

View File

@@ -63,7 +63,7 @@ NewGame:
ld [wDebugFlags], a
call ResetWRAM
call NewGame_ClearTilemapEtc
call AreYouABoyOrAreYouAGirl
call PlayerProfileSetup
call OakSpeech
call InitializeWorld
@@ -77,15 +77,14 @@ NewGame:
ldh [hMapEntryMethod], a
jp FinishContinueFunction
AreYouABoyOrAreYouAGirl:
farcall Mobile_AlwaysReturnNotCarry ; mobile
PlayerProfileSetup:
farcall CheckMobileAdapterStatus
jr c, .ok
farcall InitGender
ret
.ok
ld c, 0
farcall InitMobileProfile ; mobile
farcall InitMobileProfile
ret
if DEF(_DEBUG)
@@ -220,7 +219,7 @@ endc
farcall DeletePartyMonMail
farcall DeleteMobileEventIndex
farcall ClearGSBallFlag
call ResetGameTime
ret
@@ -400,12 +399,9 @@ PostCreditsSpawn:
ldh [hMapEntryMethod], a
ret
Continue_MobileAdapterMenu:
farcall Mobile_AlwaysReturnNotCarry ; mobile check
Continue_MobileAdapterMenu: ; unused
farcall CheckMobileAdapterStatus
ret nc
; the rest of this stuff is never reached because
; the previous function returns with carry not set
ld hl, wd479
bit 1, [hl]
ret nz

View File

@@ -104,7 +104,7 @@ MoveMonWOMail_InsertMon_SaveGame:
call SaveBackupPokemonData
call SaveBackupChecksum
farcall BackupPartyMonMail
farcall BackupMobileEventIndex
farcall BackupGSBallFlag
farcall SaveRTC
call LoadBox
call ResumeGameLogic
@@ -161,17 +161,17 @@ AddHallOfFameEntry:
ld bc, wHallOfFamePokemonListEnd - wHallOfFamePokemonList + 1
call CopyBytes
call CloseSRAM
; This vc_hook causes the Virtual Console to set [sMobileEventIndex] and [sMobileEventIndexBackup]
; 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
; This vc_hook causes the Virtual Console to set [sGSBallFlag] and [sGSBallFlagBackup]
; to GS_BALL_AVAILABLE, which enables you to get the GS Ball, take it to Kurt, and
; encounter Celebi. It assumes that sGSBallFlag and sGSBallFlagBackup are at their
; original addresses.
vc_hook Enable_GS_Ball_mobile_event
vc_assert BANK(sMobileEventIndex) == $1 && sMobileEventIndex == $be3c, \
"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."
vc_assert BANK(sGSBallFlag) == $1 && sGSBallFlag == $be3c, \
"sGSBallFlag is no longer located at 01:be3c."
vc_assert BANK(sGSBallFlagBackup) == $1 && sGSBallFlagBackup == $be44, \
"sGSBallFlagBackup is no longer located at 01:be44."
vc_assert GS_BALL_AVAILABLE == $b, \
"GS_BALL_AVAILABLE is no longer equal to $b."
ret
SaveGameData:
@@ -281,7 +281,7 @@ _SaveGameData:
call SaveBackupChecksum
call UpdateStackTop
farcall BackupPartyMonMail
farcall BackupMobileEventIndex
farcall BackupGSBallFlag
farcall SaveRTC
ld a, BANK(sBattleTowerChallengeState)
call OpenSRAM
@@ -459,11 +459,11 @@ Function14d83: ; unreferenced
call CloseSRAM
ret
Function14d93: ; unreferenced
ld a, BANK(s7_a000) ; MBC30 bank used by JP Crystal; inaccessible by MBC3
DisableMobileStadium: ; unreferenced
ld a, BANK(sMobileStadiumFlag)
call OpenSRAM
xor a
ld [s7_a000], a ; address of MBC30 bank
ld [sMobileStadiumFlag], a
call CloseSRAM
ret
@@ -600,7 +600,7 @@ TryLoadSaveFile:
call LoadPokemonData
call LoadBox
farcall RestorePartyMonMail
farcall RestoreMobileEventIndex
farcall RestoreGSBallFlag
farcall RestoreMysteryGift
call ValidateBackupSave
call SaveBackupOptions
@@ -617,7 +617,7 @@ TryLoadSaveFile:
call LoadBackupPokemonData
call LoadBox
farcall RestorePartyMonMail
farcall RestoreMobileEventIndex
farcall RestoreGSBallFlag
farcall RestoreMysteryGift
call ValidateSave
call SaveOptions