shithub: pokecrystal

Download patch

ref: 1853f70addb0bfa9164bc2b5134e564f526b2b1a
parent: 4125138da725b412fabdbb555caf3852a2fecb32
author: vulcandth <[email protected]>
date: Sun Jun 19 17:28:39 EDT 2022

VC ExchangeBytes Aliases

Co-Authored-By: aaaaaa123456789 <[email protected]>

--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -83,7 +83,7 @@
 	ld hl, wLinkBattleRNPreamble
 	ld de, wEnemyMon
 	ld bc, SERIAL_RN_PREAMBLE_LENGTH + SERIAL_RNS_LENGTH
-	vc_hook Wireless_ExchangeBytes_1
+	vc_hook Wireless_ExchangeBytes_Gen2toGen1_RNG_state
 	call Serial_ExchangeBytes
 	ld a, SERIAL_NO_DATA_BYTE
 	ld [de], a
@@ -91,7 +91,7 @@
 	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 Wireless_ExchangeBytes_2
+	vc_hook Wireless_ExchangeBytes_Gen2toGen1_party_structs
 	call Serial_ExchangeBytes
 	ld a, SERIAL_NO_DATA_BYTE
 	ld [de], a
@@ -99,7 +99,7 @@
 	ld hl, wPlayerPatchLists
 	ld de, wOTPatchLists
 	ld bc, 200
-	vc_hook Wireless_ExchangeBytes_3_Gen2toGen1Fix
+	vc_hook Wireless_ExchangeBytes_Gen2toGen1_patch_lists
 	call Serial_ExchangeBytes
 
 	xor a
@@ -249,7 +249,7 @@
 	ld hl, wLinkBattleRNPreamble
 	ld de, wEnemyMon
 	ld bc, SERIAL_RN_PREAMBLE_LENGTH + SERIAL_RNS_LENGTH
-	vc_hook Wireless_ExchangeBytes_4
+	vc_hook Wireless_ExchangeBytes_RNG_state
 	call Serial_ExchangeBytes
 	ld a, SERIAL_NO_DATA_BYTE
 	ld [de], a
@@ -257,7 +257,7 @@
 	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 Wireless_ExchangeBytes_5
+	vc_hook Wireless_ExchangeBytes_party_structs
 	call Serial_ExchangeBytes
 	ld a, SERIAL_NO_DATA_BYTE
 	ld [de], a
@@ -265,7 +265,7 @@
 	ld hl, wPlayerPatchLists
 	ld de, wOTPatchLists
 	ld bc, 200
-	vc_hook Wireless_ExchangeBytes_6
+	vc_hook Wireless_ExchangeBytes_patch_lists
 	call Serial_ExchangeBytes
 
 	ld a, [wLinkMode]
@@ -274,7 +274,7 @@
 	ld hl, wLinkPlayerMail
 	ld de, wLinkOTMail
 	ld bc, wLinkPlayerMailEnd - wLinkPlayerMail
-	vc_hook Wireless_ExchangeBytes_7
+	vc_hook Wireless_ExchangeBytes_mail
 	call ExchangeBytes
 
 .not_trading
--- a/vc/pokecrystal11.patch.template
+++ b/vc/pokecrystal11.patch.template
@@ -46,38 +46,38 @@
 Address = {HEX @ 4}
 Type = 30
 
-[Network358@Wireless_ExchangeBytes_1]
+[Network358@Wireless_ExchangeBytes_Gen2toGen1_RNG_state]
 Mode = 2
 Address = {HEX @}
 Type = 4
 
-[Network359@Wireless_ExchangeBytes_2]
+[Network359@Wireless_ExchangeBytes_Gen2toGen1_party_structs]
 Mode = 2
 Address = {HEX @}
 Type = 4
 
-[Network364@Wireless_ExchangeBytes_3_Gen2toGen1Fix]
+[Network364@Wireless_ExchangeBytes_Gen2toGen1_patch_lists]
 Mode = 2
 Address = {HEX @}
 ;fix pokemon ?? in name
 Type = 26
 
-[Network360@Wireless_ExchangeBytes_4]
+[Network360@Wireless_ExchangeBytes_RNG_state]
 Mode = 2
 Address = {HEX @}
 Type = 4
 
-[Network361@Wireless_ExchangeBytes_5]
+[Network361@Wireless_ExchangeBytes_party_structs]
 Mode = 2
 Address = {HEX @}
 Type = 4
 
-[Network362@Wireless_ExchangeBytes_6]
+[Network362@Wireless_ExchangeBytes_patch_lists]
 Mode = 2
 Address = {HEX @}
 Type = 4
 
-[Network363@Wireless_ExchangeBytes_7]
+[Network363@Wireless_ExchangeBytes_mail]
 Mode = 2
 Address = {HEX @}
 Type = 4