ref: 1ff37608b6b71f831608c1319d71eec3ac0583a9
parent: 3f4044cd4628c156e975971ce0655d3d51917b87
author: PikalaxALT <[email protected]>
date: Wed Nov 18 08:29:30 EST 2015
Update mail struct labels
--- a/engine/compose_mail.asm
+++ b/engine/compose_mail.asm
@@ -1,4 +1,4 @@
-ComposeMailMessage: ; 11e75 (mail?)
+_ComposeMailMessage: ; 11e75 (mail?)
ld hl, wc6d0
ld [hl], e
inc hl
--- a/engine/startmenu.asm
+++ b/engine/startmenu.asm
@@ -937,10 +937,10 @@
ld [hl], a
ld d, a
callba ItemIsMail
- jr nc, .asm_12c5f
- call Function12cfe
+ jr nc, .done
+ call ComposeMailMessage
-.asm_12c5f
+.done
ret
; 12c60
@@ -1067,15 +1067,15 @@
; 12cfe
-Function12cfe: ; 12cfe (4:6cfe)
- ld de, wd002
- callba ComposeMailMessage
+ComposeMailMessage: ; 12cfe (4:6cfe)
+ ld de, wTempMailMessage
+ callba _ComposeMailMessage
ld hl, PlayerName
- ld de, wd023
+ ld de, wTempMailAuthor
ld bc, NAME_LENGTH - 1
call CopyBytes
ld hl, PlayerID
- ld bc, $2
+ ld bc, 2
call CopyBytes
ld a, [CurPartySpecies]
ld [de], a
@@ -1088,7 +1088,7 @@
call AddNTimes
ld d, h
ld e, l
- ld hl, wd002
+ ld hl, wTempMail
ld bc, MAIL_STRUCT_LENGTH
ld a, BANK(sPartyMail)
call GetSRAMBank
--- a/sram.asm
+++ b/sram.asm
@@ -9,13 +9,6 @@
SECTION "SRAM Bank 0", SRAM [$a600], BANK [0]
-mailmsg: MACRO
-\1Message:: ds MAIL_MSG_LENGTH
-\1MessageEnd:: ds 1
-\1Author:: ds NAME_LENGTH
-\1AuthorID:: ds 2
-\1MailType:: ds 1
-endm
; a600
sPartyMail::
sPartyMon1Mail:: mailmsg sPartyMon1Mail
--- a/wram.asm
+++ b/wram.asm
@@ -145,6 +145,15 @@
\1TrainerEnd::
endm
+mailmsg: MACRO
+\1Message:: ds MAIL_MSG_LENGTH
+\1MessageEnd:: ds 1
+\1Author:: ds NAME_LENGTH +- 1
+\1AuthorID:: ds 2
+\1Species:: ds 1
+\1MailType:: ds 1
+endm
+
INCLUDE "vram.asm"
SECTION "Stack", WRAM0
@@ -1462,6 +1471,10 @@
wd000:: ds 1
DefaultSpawnpoint::
wd001:: ds 1
+
+wTempMail:: mailmsg wTempMail
+ ds wTempMail - @
+
wd002::
PhoneScriptBank::
LuckyNumberDigit1Buffer::