Use more appropriate labels for link operations

This commit is contained in:
mid-kid 2023-04-01 02:58:53 +02:00
parent 4c4fd7258c
commit a1e711b80d
2 changed files with 13 additions and 12 deletions

View File

@ -126,7 +126,7 @@ endc
call Link_CopyOTData
ld de, wOTPatchLists
ld hl, wLinkPatchData1
ld hl, wLinkPlayerData
ld c, 2
.loop
ld a, [de]
@ -152,11 +152,11 @@ endc
jr .loop
.next
ld hl, wLinkPatchData2
ld hl, wLinkPlayerData + SERIAL_PATCH_DATA_SIZE
dec c
jr nz, .loop
ld hl, wLinkPlayerName
ld hl, wLinkData
ld de, wOTPlayerName
ld bc, NAME_LENGTH
call CopyBytes
@ -293,8 +293,8 @@ endc
ld bc, NAME_LENGTH + 1 + PARTY_LENGTH + 1 + 2 + (PARTYMON_STRUCT_LENGTH + NAME_LENGTH * 2) * PARTY_LENGTH
call Link_CopyOTData
ld de, wPlayerTrademon
ld hl, wLinkPatchData1
ld de, wOTPatchLists
ld hl, wLinkPlayerData
ld c, 2
.loop1
ld a, [de]
@ -320,7 +320,7 @@ endc
jr .loop1
.next1
ld hl, wLinkPatchData2
ld hl, wLinkPlayerData + SERIAL_PATCH_DATA_SIZE
dec c
jr nz, .loop1
@ -339,10 +339,14 @@ endc
cp SERIAL_MAIL_PREAMBLE_BYTE
jr z, .loop3
dec hl
ld de, wLinkOTMail
ld bc, wLinkDataEnd - wLinkOTMail ; should be wLinkOTMailEnd - wLinkOTMail
call CopyBytes
ld hl, wLinkOTMail
; Replace SERIAL_MAIL_REPLACEMENT_BYTE with SERIAL_NO_DATA_BYTE across all mail
; message bodies.
ld hl, wLinkOTMailMessages
ld bc, (MAIL_MSG_LENGTH + 1) * PARTY_LENGTH
.loop4
ld a, [hl]
@ -355,6 +359,7 @@ endc
ld a, b
or c
jr nz, .loop4
ld de, wLinkOTMailPatchSet
.loop5
ld a, [de]
@ -434,7 +439,7 @@ endc
ld [de], a
.skip_mail
ld hl, wLinkPlayerName
ld hl, wLinkData
ld de, wOTPlayerName
ld bc, NAME_LENGTH
call CopyBytes

View File

@ -1006,10 +1006,6 @@ for n, 1, PARTY_LENGTH + 1
wTimeCapsulePartyMon{d:n}Nickname:: ds MON_NAME_LENGTH
endr
NEXTU
; link patch lists
wLinkPatchData1:: ds SERIAL_PATCH_DATA_SIZE
wLinkPatchData2:: ds SERIAL_PATCH_DATA_SIZE
ENDU