summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2015-11-18 13:29:30 -0500
committerPikalaxALT <PikalaxALT@gmail.com>2015-11-18 13:29:30 -0500
commit1ff37608b6b71f831608c1319d71eec3ac0583a9 (patch)
tree7f3faab48d2d1800133ee974ea2d8639cc7e75b6
parent3f4044cd4628c156e975971ce0655d3d51917b87 (diff)
Update mail struct labels
-rwxr-xr-xengine/compose_mail.asm2
-rwxr-xr-xengine/startmenu.asm18
-rw-r--r--sram.asm7
-rw-r--r--wram.asm13
4 files changed, 23 insertions, 17 deletions
diff --git a/engine/compose_mail.asm b/engine/compose_mail.asm
index 35990431e..f02f99326 100755
--- 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
diff --git a/engine/startmenu.asm b/engine/startmenu.asm
index 94082ccad..41c79478f 100755
--- a/engine/startmenu.asm
+++ b/engine/startmenu.asm
@@ -937,10 +937,10 @@ GivePartyItem: ; 12c4c
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 @@ StartMenuYesNo: ; 12cf5
; 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 @@ Function12cfe: ; 12cfe (4:6cfe)
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
diff --git a/sram.asm b/sram.asm
index 80be0cfe3..5437f63de 100644
--- a/sram.asm
+++ b/sram.asm
@@ -9,13 +9,6 @@ sScratch::
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
diff --git a/wram.asm b/wram.asm
index e90af9843..cc16e9527 100644
--- a/wram.asm
+++ b/wram.asm
@@ -145,6 +145,15 @@ battle_tower_struct: MACRO
\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 @@ SECTION "WRAM 1", WRAMX, BANK [1]
wd000:: ds 1
DefaultSpawnpoint::
wd001:: ds 1
+
+wTempMail:: mailmsg wTempMail
+ ds wTempMail - @
+
wd002::
PhoneScriptBank::
LuckyNumberDigit1Buffer::