mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Use PARTY_LENGTH and MAILBOX_CAPACITY constants
This commit is contained in:
parent
5b9e6c0299
commit
287d893d22
@ -241,11 +241,11 @@ BackupPartyMonMail:
|
|||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, sPartyMail
|
ld hl, sPartyMail
|
||||||
ld de, sPartyMailBackup
|
ld de, sPartyMailBackup
|
||||||
ld bc, 6 * MAIL_STRUCT_LENGTH
|
ld bc, PARTY_LENGTH * MAIL_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, sMailboxCount
|
ld hl, sMailboxCount
|
||||||
ld de, sMailboxCountBackup
|
ld de, sMailboxCountBackup
|
||||||
ld bc, 1 + 10 * MAIL_STRUCT_LENGTH
|
ld bc, 1 + MAILBOX_CAPACITY * MAIL_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
|
|
||||||
@ -254,11 +254,11 @@ RestorePartyMonMail:
|
|||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, sPartyMailBackup
|
ld hl, sPartyMailBackup
|
||||||
ld de, sPartyMail
|
ld de, sPartyMail
|
||||||
ld bc, 6 * MAIL_STRUCT_LENGTH
|
ld bc, PARTY_LENGTH * MAIL_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, sMailboxCountBackup
|
ld hl, sMailboxCountBackup
|
||||||
ld de, sMailboxCount
|
ld de, sMailboxCount
|
||||||
ld bc, 1 + 10 * MAIL_STRUCT_LENGTH
|
ld bc, 1 + MAILBOX_CAPACITY * MAIL_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
|
|
||||||
@ -267,11 +267,11 @@ DeletePartyMonMail:
|
|||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld hl, sPartyMail
|
ld hl, sPartyMail
|
||||||
ld bc, 6 * MAIL_STRUCT_LENGTH
|
ld bc, PARTY_LENGTH * MAIL_STRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
xor a
|
xor a
|
||||||
ld hl, sMailboxCount
|
ld hl, sMailboxCount
|
||||||
ld bc, 1 + 10 * MAIL_STRUCT_LENGTH
|
ld bc, 1 + MAILBOX_CAPACITY * MAIL_STRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
jp CloseSRAM
|
jp CloseSRAM
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user