diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-02-10 08:50:38 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-02-10 08:50:38 -0500 |
commit | 95100227ec03465c090e8f21bac3ec5839f8a21d (patch) | |
tree | 63103c76a1046a35425f3b0db3ea3df0e6a787fb /engine | |
parent | edbc734b84bf6b20368f9d6279ec29c775301390 (diff) |
Use PARTY_LENGTH and MAILBOX_CAPACITY constants
Diffstat (limited to 'engine')
-rw-r--r-- | engine/pokemon/mail.asm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/pokemon/mail.asm b/engine/pokemon/mail.asm index 07030da5..4ad13300 100644 --- a/engine/pokemon/mail.asm +++ b/engine/pokemon/mail.asm @@ -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 |