You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Improved Virtual Console patch identifiers (#907)
This commit is contained in:
@@ -21,7 +21,7 @@ DoBattleTransition:
|
||||
ld hl, hVBlank
|
||||
ld a, [hl]
|
||||
push af
|
||||
vc_hook FPA_link_fight_begin
|
||||
vc_hook Reduce_battle_transition_flashing
|
||||
ld [hl], $1
|
||||
|
||||
.loop
|
||||
@@ -59,7 +59,7 @@ DoBattleTransition:
|
||||
ld a, $1 ; unnecessary bankswitch?
|
||||
ldh [rSVBK], a
|
||||
pop af
|
||||
vc_hook FPA_link_fight_End4
|
||||
vc_hook Stop_reducing_battle_transition_flashing
|
||||
ldh [hVBlank], a
|
||||
call DelayFrame
|
||||
ret
|
||||
@@ -312,7 +312,7 @@ StartTrainerBattle_Flash:
|
||||
dc 0, 0, 0, 1
|
||||
|
||||
StartTrainerBattle_SetUpForWavyOutro:
|
||||
vc_hook FPA_link_fight_End0
|
||||
vc_hook Stop_reducing_battle_transition_flashing_WavyOutro
|
||||
farcall RespawnPlayerAndOpponent
|
||||
ld a, BANK(wLYOverrides)
|
||||
ldh [rSVBK], a
|
||||
@@ -370,7 +370,7 @@ StartTrainerBattle_SineWave:
|
||||
ret
|
||||
|
||||
StartTrainerBattle_SetUpForSpinOutro:
|
||||
vc_hook FPA_link_fight_End1
|
||||
vc_hook Stop_reducing_battle_transition_flashing_SpinOutro
|
||||
farcall RespawnPlayerAndOpponent
|
||||
ld a, BANK(wLYOverrides)
|
||||
ldh [rSVBK], a
|
||||
@@ -513,7 +513,7 @@ ENDM
|
||||
.wedge5: db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1
|
||||
|
||||
StartTrainerBattle_SetUpForRandomScatterOutro:
|
||||
vc_hook FPA_link_fight_End2
|
||||
vc_hook Stop_reducing_battle_transition_flashing_ScatterOutro
|
||||
farcall RespawnPlayerAndOpponent
|
||||
ld a, BANK(wLYOverrides)
|
||||
ldh [rSVBK], a
|
||||
@@ -768,7 +768,7 @@ StartTrainerBattle_DrawSineWave:
|
||||
calc_sine_wave
|
||||
|
||||
StartTrainerBattle_ZoomToBlack:
|
||||
vc_hook FPA_link_fight_End3
|
||||
vc_hook Stop_reducing_battle_transition_flashing_ZoomToBlack
|
||||
farcall RespawnPlayerAndOpponent
|
||||
ld de, .boxes
|
||||
|
||||
|
||||
@@ -8940,7 +8940,7 @@ InitBattleDisplay:
|
||||
predef PlaceGraphic
|
||||
xor a
|
||||
ldh [hWY], a
|
||||
vc_hook fight_begin
|
||||
vc_hook Unknown_InitBattleDisplay
|
||||
ldh [rWY], a
|
||||
call WaitBGMap
|
||||
call HideSprites
|
||||
|
||||
@@ -58,6 +58,8 @@ BattleAnimRunScript:
|
||||
farcall CheckBattleScene
|
||||
jr c, .disabled
|
||||
|
||||
; This vc_hook reduces the move animation flashing in the Virtual Console for
|
||||
; Fissure, Self-Destruct, Thunder, Flash, Explosion, Horn Drill, and Hyper Beam.
|
||||
vc_hook Reduce_move_anim_flashing
|
||||
call BattleAnimClearHud
|
||||
call RunBattleAnimScript
|
||||
@@ -675,7 +677,7 @@ BattleAnimCmd_5GFX:
|
||||
.loop
|
||||
ld a, [wBattleAnimGFXTempTileID]
|
||||
cp (vTiles1 - vTiles0) / LEN_2BPP_TILE - BATTLEANIM_BASE_TILE
|
||||
vc_hook FPA_042801_Begin
|
||||
vc_hook Reduce_move_anim_flashing_PRESENT
|
||||
ret nc
|
||||
call GetBattleAnimByte
|
||||
ld [hli], a
|
||||
|
||||
@@ -74,7 +74,7 @@ _UnownPrinter:
|
||||
jr nz, .pressed_b
|
||||
|
||||
ldh a, [hJoyPressed]
|
||||
vc_patch print_forbid_1
|
||||
vc_patch Forbid_printing_Unown
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
and 0
|
||||
else
|
||||
|
||||
@@ -1033,7 +1033,7 @@ endr
|
||||
.FinalPush:
|
||||
ld hl, MltReq1Packet
|
||||
call _PushSGBPals
|
||||
vc_hook Network_RESET
|
||||
vc_hook Unknown_network_reset ; Unknown why this hook is here, doesn't seem to be needed
|
||||
jp SGBDelayCycles
|
||||
|
||||
SGBBorder_PushBGPals:
|
||||
|
||||
@@ -67,7 +67,7 @@ Gen2ToGen1LinkComms:
|
||||
.player_1
|
||||
ld de, MUSIC_NONE
|
||||
call PlayMusic
|
||||
vc_patch NetworkDelay1
|
||||
vc_patch Wireless_net_delay_5
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
ld c, 26
|
||||
else
|
||||
@@ -83,7 +83,7 @@ endc
|
||||
ld hl, wLinkBattleRNPreamble
|
||||
ld de, wEnemyMon
|
||||
ld bc, SERIAL_RN_PREAMBLE_LENGTH + SERIAL_RNS_LENGTH
|
||||
vc_hook Network358
|
||||
vc_hook Wireless_ExchangeBytes_1
|
||||
call Serial_ExchangeBytes
|
||||
ld a, SERIAL_NO_DATA_BYTE
|
||||
ld [de], a
|
||||
@@ -91,7 +91,7 @@ endc
|
||||
ld hl, wLinkData
|
||||
ld de, wOTPartyData
|
||||
ld bc, SERIAL_PREAMBLE_LENGTH + NAME_LENGTH + 1 + PARTY_LENGTH + 1 + (REDMON_STRUCT_LENGTH + NAME_LENGTH * 2) * PARTY_LENGTH + 3
|
||||
vc_hook Network359
|
||||
vc_hook Wireless_ExchangeBytes_2
|
||||
call Serial_ExchangeBytes
|
||||
ld a, SERIAL_NO_DATA_BYTE
|
||||
ld [de], a
|
||||
@@ -99,7 +99,7 @@ endc
|
||||
ld hl, wPlayerPatchLists
|
||||
ld de, wOTPatchLists
|
||||
ld bc, 200
|
||||
vc_hook Network364
|
||||
vc_hook Wireless_ExchangeBytes_3_Gen2toGen1Fix
|
||||
call Serial_ExchangeBytes
|
||||
|
||||
xor a
|
||||
@@ -233,7 +233,7 @@ Gen2ToGen2LinkComms:
|
||||
.player_1
|
||||
ld de, MUSIC_NONE
|
||||
call PlayMusic
|
||||
vc_patch NetworkDelay4
|
||||
vc_patch Wireless_net_delay_8
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
ld c, 26
|
||||
else
|
||||
@@ -249,7 +249,7 @@ endc
|
||||
ld hl, wLinkBattleRNPreamble
|
||||
ld de, wEnemyMon
|
||||
ld bc, SERIAL_RN_PREAMBLE_LENGTH + SERIAL_RNS_LENGTH
|
||||
vc_hook Network360
|
||||
vc_hook Wireless_ExchangeBytes_4
|
||||
call Serial_ExchangeBytes
|
||||
ld a, SERIAL_NO_DATA_BYTE
|
||||
ld [de], a
|
||||
@@ -257,7 +257,7 @@ endc
|
||||
ld hl, wLinkData
|
||||
ld de, wOTPartyData
|
||||
ld bc, SERIAL_PREAMBLE_LENGTH + NAME_LENGTH + 1 + PARTY_LENGTH + 1 + 2 + (PARTYMON_STRUCT_LENGTH + NAME_LENGTH * 2) * PARTY_LENGTH + 3
|
||||
vc_hook Network361
|
||||
vc_hook Wireless_ExchangeBytes_5
|
||||
call Serial_ExchangeBytes
|
||||
ld a, SERIAL_NO_DATA_BYTE
|
||||
ld [de], a
|
||||
@@ -265,7 +265,7 @@ endc
|
||||
ld hl, wPlayerPatchLists
|
||||
ld de, wOTPatchLists
|
||||
ld bc, 200
|
||||
vc_hook Network362
|
||||
vc_hook Wireless_ExchangeBytes_6
|
||||
call Serial_ExchangeBytes
|
||||
|
||||
ld a, [wLinkMode]
|
||||
@@ -274,7 +274,7 @@ endc
|
||||
ld hl, wLinkPlayerMail
|
||||
ld de, wLinkOTMail
|
||||
ld bc, wLinkPlayerMailEnd - wLinkPlayerMail
|
||||
vc_hook Network363
|
||||
vc_hook Wireless_ExchangeBytes_7
|
||||
call ExchangeBytes
|
||||
|
||||
.not_trading
|
||||
@@ -1627,7 +1627,7 @@ ExitLinkCommunications:
|
||||
ldh [rSC], a
|
||||
ld a, (1 << rSC_ON) | (1 << rSC_CLOCK)
|
||||
ldh [rSC], a
|
||||
vc_hook ret_heya
|
||||
vc_hook ExitLinkCommunications_ret
|
||||
ret
|
||||
|
||||
GSPlaceTradeScreenFooter: ; unreferenced
|
||||
@@ -2029,7 +2029,7 @@ LinkTrade:
|
||||
ld de, String_TradeCompleted
|
||||
call PlaceString
|
||||
farcall Link_WaitBGMap
|
||||
vc_hook save_game_end
|
||||
vc_hook Trade_save_game_end
|
||||
ld c, 50
|
||||
call DelayFrames
|
||||
ld a, [wLinkMode]
|
||||
@@ -2182,7 +2182,7 @@ GetIncompatibleMonName:
|
||||
ret
|
||||
|
||||
EnterTimeCapsule:
|
||||
vc_patch NetworkDelay2
|
||||
vc_patch Wireless_net_delay_6
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
ld c, 26
|
||||
else
|
||||
@@ -2245,7 +2245,7 @@ WaitForOtherPlayerToExit:
|
||||
ld [hl], a
|
||||
ldh [hVBlank], a
|
||||
ld [wLinkMode], a
|
||||
vc_hook term_exit
|
||||
vc_hook Wireless_term_exit
|
||||
ret
|
||||
|
||||
SetBitsForLinkTradeRequest:
|
||||
@@ -2314,7 +2314,7 @@ WaitForLinkedFriend:
|
||||
; 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_hook Link_fake_connection_status
|
||||
vc_assert hSerialConnectionStatus == $ffcb, \
|
||||
"hSerialConnectionStatus is no longer located at 00:ffcb."
|
||||
vc_assert USING_INTERNAL_CLOCK == $02, \
|
||||
@@ -2411,7 +2411,7 @@ CheckLinkTimeout_Gen2:
|
||||
ld a, $6
|
||||
ld [wPlayerLinkAction], a
|
||||
ld hl, wLinkTimeoutFrames
|
||||
vc_patch NetworkDelay6
|
||||
vc_patch Wireless_net_delay_9
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
ld a, $3
|
||||
else
|
||||
@@ -2438,7 +2438,7 @@ endc
|
||||
Link_CheckCommunicationError:
|
||||
xor a
|
||||
ldh [hSerialReceivedNewData], a
|
||||
vc_hook linkCable_fake_end
|
||||
vc_hook Wireless_prompt
|
||||
ld a, [wLinkTimeoutFrames]
|
||||
ld h, a
|
||||
ld a, [wLinkTimeoutFrames + 1]
|
||||
@@ -2469,7 +2469,7 @@ Link_CheckCommunicationError:
|
||||
.CheckConnected:
|
||||
call WaitLinkTransfer
|
||||
ld hl, wLinkTimeoutFrames
|
||||
vc_hook Network_RECHECK
|
||||
vc_hook Wireless_net_recheck
|
||||
ld a, [hli]
|
||||
inc a
|
||||
ret nz
|
||||
@@ -2478,7 +2478,7 @@ Link_CheckCommunicationError:
|
||||
ret
|
||||
|
||||
.AcknowledgeSerial:
|
||||
vc_patch NetworkDelay3
|
||||
vc_patch Wireless_net_delay_7
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
ld b, 26
|
||||
else
|
||||
@@ -2511,10 +2511,10 @@ TryQuickSave:
|
||||
ld a, [wChosenCableClubRoom]
|
||||
push af
|
||||
farcall Link_SaveGame
|
||||
vc_hook linkCable_block_input
|
||||
vc_hook Wireless_TryQuickSave_block_input_1
|
||||
ld a, TRUE
|
||||
jr nc, .return_result
|
||||
vc_hook linkCable_block_input2
|
||||
vc_hook Wireless_TryQuickSave_block_input_2
|
||||
xor a ; FALSE
|
||||
.return_result
|
||||
ld [wScriptVar], a
|
||||
@@ -2551,7 +2551,7 @@ CheckBothSelectedSameRoom:
|
||||
ret
|
||||
|
||||
TimeCapsule:
|
||||
vc_hook to_play2_mons1
|
||||
vc_hook Wireless_TimeCapsule
|
||||
ld a, LINK_TIMECAPSULE
|
||||
ld [wLinkMode], a
|
||||
call DisableSpriteUpdates
|
||||
@@ -2562,7 +2562,7 @@ TimeCapsule:
|
||||
ret
|
||||
|
||||
TradeCenter:
|
||||
vc_hook to_play2_trade
|
||||
vc_hook Wireless_TradeCenter
|
||||
ld a, LINK_TRADECENTER
|
||||
ld [wLinkMode], a
|
||||
call DisableSpriteUpdates
|
||||
@@ -2573,7 +2573,7 @@ TradeCenter:
|
||||
ret
|
||||
|
||||
Colosseum:
|
||||
vc_hook to_play2_battle
|
||||
vc_hook Wireless_Colosseum
|
||||
ld a, LINK_COLOSSEUM
|
||||
ld [wLinkMode], a
|
||||
call DisableSpriteUpdates
|
||||
@@ -2588,7 +2588,7 @@ CloseLink:
|
||||
ld [wLinkMode], a
|
||||
ld c, 3
|
||||
call DelayFrames
|
||||
vc_hook room_check
|
||||
vc_hook Wireless_room_check
|
||||
jp Link_ResetSerialRegistersAfterLinkClosure
|
||||
|
||||
FailedLinkToPast:
|
||||
|
||||
@@ -37,7 +37,7 @@ DoMysteryGift:
|
||||
; Prepare the first of two messages for wMysteryGiftPartnerData
|
||||
farcall StageDataForMysteryGift
|
||||
call ClearMysteryGiftTrainer
|
||||
vc_patch infrared_fake_0
|
||||
vc_patch Infrared_stage_party_data
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
farcall StagePartyDataForMysteryGift
|
||||
call ClearMysteryGiftTrainer
|
||||
@@ -53,7 +53,7 @@ endc
|
||||
ldh a, [rIE]
|
||||
push af
|
||||
call ExchangeMysteryGiftData
|
||||
vc_hook infrared_fake_4
|
||||
vc_hook Infrared_ExchangeMysteryGiftData_end
|
||||
ld d, a
|
||||
xor a
|
||||
ldh [rIF], a
|
||||
@@ -269,8 +269,8 @@ endc
|
||||
jp CloseSRAM
|
||||
|
||||
ExchangeMysteryGiftData:
|
||||
vc_hook infrared_fake_2
|
||||
vc_patch infrared_fake_1
|
||||
vc_hook Infrared_ExchangeMysteryGiftData_start
|
||||
vc_patch Infrared_ExchangeMysteryGiftData_function
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
ld d, $ef
|
||||
.loop
|
||||
@@ -278,7 +278,7 @@ if DEF(_CRYSTAL11_VC)
|
||||
ld a, d
|
||||
or a
|
||||
jr nz, .loop
|
||||
vc_hook infrared_fake_3
|
||||
vc_hook Infrared_ExchangeMysteryGiftData_loop_done
|
||||
nop
|
||||
cp MG_CANCELED
|
||||
.restart ; same location as unpatched .restart
|
||||
|
||||
@@ -362,9 +362,9 @@ Menu_WasButtonPressed:
|
||||
call GetMenuJoypad
|
||||
and a
|
||||
ret z
|
||||
vc_hook print_forbid_3
|
||||
vc_hook Forbid_printing_photo_studio
|
||||
scf
|
||||
vc_hook print_forbid_2
|
||||
vc_hook Forbid_printing_PC_Box
|
||||
ret
|
||||
|
||||
_2DMenuInterpretJoypad:
|
||||
|
||||
@@ -389,7 +389,7 @@ Script_yesorno:
|
||||
ld a, TRUE
|
||||
.no
|
||||
ld [wScriptVar], a
|
||||
vc_hook E_YESNO
|
||||
vc_hook Unknown_yesorno_ret
|
||||
ret
|
||||
|
||||
Script_loadmenu:
|
||||
|
||||
@@ -356,7 +356,7 @@ Pokedex_UpdateDexEntryScreen:
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
jr nz, .return_to_prev_screen
|
||||
vc_hook print_forbid_5
|
||||
vc_hook Forbid_printing_Pokedex
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
jr nz, .do_menu_action
|
||||
|
||||
@@ -67,7 +67,7 @@ ReadAnyMail:
|
||||
ldh a, [hJoyPressed]
|
||||
and A_BUTTON | B_BUTTON | START
|
||||
jr z, .loop
|
||||
vc_patch print_forbid_4
|
||||
vc_patch Forbid_printing_mail
|
||||
if DEF(_CRYSTAL11_VC)
|
||||
and 0
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user