Use PARTY_LENGTH and MAILBOX_CAPACITY constants

This commit is contained in:
Rangi 2021-02-10 08:50:39 -05:00
parent 5b9e6c0299
commit 287d893d22
1 changed files with 6 additions and 6 deletions

View File

@ -241,11 +241,11 @@ BackupPartyMonMail:
call OpenSRAM
ld hl, sPartyMail
ld de, sPartyMailBackup
ld bc, 6 * MAIL_STRUCT_LENGTH
ld bc, PARTY_LENGTH * MAIL_STRUCT_LENGTH
call CopyBytes
ld hl, sMailboxCount
ld de, sMailboxCountBackup
ld bc, 1 + 10 * MAIL_STRUCT_LENGTH
ld bc, 1 + MAILBOX_CAPACITY * MAIL_STRUCT_LENGTH
call CopyBytes
jp CloseSRAM
@ -254,11 +254,11 @@ RestorePartyMonMail:
call OpenSRAM
ld hl, sPartyMailBackup
ld de, sPartyMail
ld bc, 6 * MAIL_STRUCT_LENGTH
ld bc, PARTY_LENGTH * MAIL_STRUCT_LENGTH
call CopyBytes
ld hl, sMailboxCountBackup
ld de, sMailboxCount
ld bc, 1 + 10 * MAIL_STRUCT_LENGTH
ld bc, 1 + MAILBOX_CAPACITY * MAIL_STRUCT_LENGTH
call CopyBytes
jp CloseSRAM
@ -267,11 +267,11 @@ DeletePartyMonMail:
call OpenSRAM
xor a
ld hl, sPartyMail
ld bc, 6 * MAIL_STRUCT_LENGTH
ld bc, PARTY_LENGTH * MAIL_STRUCT_LENGTH
call ByteFill
xor a
ld hl, sMailboxCount
ld bc, 1 + 10 * MAIL_STRUCT_LENGTH
ld bc, 1 + MAILBOX_CAPACITY * MAIL_STRUCT_LENGTH
call ByteFill
jp CloseSRAM