summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnonymousRandomPerson <chenghanngan.us@gmail.com>2022-02-26 13:29:30 -0500
committerAnonymousRandomPerson <chenghanngan.us@gmail.com>2022-02-26 13:29:30 -0500
commita5296a2f994a0f8e4421c4afd6bac1cedcfb72be (patch)
tree1d3f29615f1683fae77ade7d8713e7bfe5a11c26
parent6e56b9f0341be0a6c960ea9e8db0939e4fa3cdac (diff)
parent0dd38993f6a4383d6d5743fd0ae0abc01210ae25 (diff)
Merge remote-tracking branch 'upstream/master'
-rw-r--r--asm/code_8048480.s189
-rw-r--r--asm/code_8073CF0.s24
-rw-r--r--asm/code_807CABC.s2
-rw-r--r--asm/code_807CD9C.s2
-rw-r--r--asm/code_807FCD4.s10
-rw-r--r--asm/code_809447C.s111
-rw-r--r--data/data_80D47B8.s208
-rw-r--r--data/data_80DED44.s167
-rw-r--r--data/data_80E59A8.s263
-rw-r--r--include/ds_menus.h11
-rw-r--r--include/friend_rescue.h7
-rw-r--r--include/load_screen.h9
-rw-r--r--include/moves.h29
-rw-r--r--include/rescue_password_menu.h4
-rwxr-xr-xld_script.txt4
-rw-r--r--src/code_2.c2
-rw-r--r--src/code_8048DB8.c86
-rw-r--r--src/code_8057824.c1
-rw-r--r--src/code_8073CF0.c22
-rw-r--r--src/code_8083288.c9
-rw-r--r--src/code_809447C.c68
-rw-r--r--src/data/thank_you_wonder_mail.h177
-rw-r--r--src/data/wonder_mail_main_menu.h49
-rw-r--r--src/debug.c28
-rw-r--r--src/debug_menu.c46
-rw-r--r--src/ds_menus.c2
-rw-r--r--src/friend_rescue.c2
-rw-r--r--src/items.c6
-rw-r--r--src/load_screen.c142
-rw-r--r--src/main_menu.c343
-rw-r--r--src/moves.c3
-rw-r--r--src/moves_1.c2
-rw-r--r--src/pokemon_mid.c4
-rw-r--r--src/post_office_guide.c57
-rw-r--r--src/thank_you_wonder_mail.c245
-rw-r--r--src/wonder_mail.c129
-rw-r--r--src/wonder_mail_2.c116
-rw-r--r--src/wonder_mail_main_menu.c86
38 files changed, 1085 insertions, 1580 deletions
diff --git a/asm/code_8048480.s b/asm/code_8048480.s
index 0fe1f8b..eabc0b0 100644
--- a/asm/code_8048480.s
+++ b/asm/code_8048480.s
@@ -1121,193 +1121,4 @@ _08048DB2:
bx r1
thumb_func_end sub_8048D50
- thumb_func_start sub_8048DB8
-sub_8048DB8:
- push {r4,lr}
- sub sp, 0x1C
- adds r3, r0, 0
- adds r4, r1, 0
- lsls r2, 24
- cmp r2, 0
- beq _08048DF4
- ldr r0, _08048DEC
- movs r1, 0
- ldrsh r2, [r0, r1]
- add r0, sp, 0x18
- str r0, [sp]
- movs r1, 0
- str r1, [sp, 0x4]
- ldr r0, _08048DF0
- str r0, [sp, 0x8]
- str r1, [sp, 0xC]
- str r1, [sp, 0x10]
- str r1, [sp, 0x14]
- adds r0, r3, 0
- adds r1, r4, 0
- movs r3, 0x1
- bl sub_806F370
- b _08048DFA
- .align 2, 0
-_08048DEC: .4byte gUnknown_80F4FAC
-_08048DF0: .4byte 0x00000217
-_08048DF4:
- adds r0, r3, 0
- bl sub_8051E7C
-_08048DFA:
- add sp, 0x1C
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_8048DB8
-
- thumb_func_start sub_8048E04
-sub_8048E04:
- push {r4-r6,lr}
- sub sp, 0x8
- adds r5, r0, 0
- adds r6, r1, 0
- movs r0, 0x1
- str r0, [sp]
- adds r0, r5, 0
- movs r2, 0x1E
- movs r3, 0
- bl sub_8078B5C
- movs r0, 0x5
- bl DungeonRandomCapped
- cmp r0, 0x4
- bhi _08048E9E
- lsls r0, 2
- ldr r1, _08048E30
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .align 2, 0
-_08048E30: .4byte _08048E34
.align 2, 0
-_08048E34:
- .4byte _08048E48
- .4byte _08048E54
- .4byte _08048E5E
- .4byte _08048E6C
- .4byte _08048E78
-_08048E48:
- adds r0, r5, 0
- adds r1, r6, 0
- movs r2, 0x1
- bl sub_80763F8
- b _08048E9E
-_08048E54:
- adds r0, r5, 0
- adds r1, r6, 0
- bl sub_80769CC
- b _08048E9E
-_08048E5E:
- adds r0, r5, 0
- adds r1, r6, 0
- movs r2, 0x1
- movs r3, 0x1
- bl sub_8076210
- b _08048E9E
-_08048E6C:
- adds r0, r5, 0
- adds r1, r6, 0
- movs r2, 0x1
- bl sub_8077780
- b _08048E9E
-_08048E78:
- ldr r0, _08048EA8
- ldr r2, [r0]
- movs r4, 0x1
- str r4, [sp]
- str r4, [sp, 0x4]
- adds r0, r5, 0
- adds r1, r6, 0
- movs r3, 0x3
- bl sub_8076E20
- ldr r0, _08048EAC
- ldr r2, [r0]
- str r4, [sp]
- str r4, [sp, 0x4]
- adds r0, r5, 0
- adds r1, r6, 0
- movs r3, 0x3
- bl sub_8076E20
-_08048E9E:
- add sp, 0x8
- pop {r4-r6}
- pop {r0}
- bx r0
- .align 2, 0
-_08048EA8: .4byte gUnknown_8106A4C
-_08048EAC: .4byte gUnknown_8106A50
- thumb_func_end sub_8048E04
-
- thumb_func_start sub_8048EB0
-sub_8048EB0:
- push {lr}
- ldr r1, _08048EC0
- ldr r1, [r1]
- bl SendMessage
- pop {r0}
- bx r0
- .align 2, 0
-_08048EC0: .4byte gPtrIcePartCrumbledMessage
- thumb_func_end sub_8048EB0
-
- thumb_func_start sub_8048EC4
-sub_8048EC4:
- push {lr}
- ldr r1, _08048ED4
- ldr r1, [r1]
- bl SendMessage
- pop {r0}
- bx r0
- .align 2, 0
-_08048ED4: .4byte gPtrRockPartCrumbledMessage
- thumb_func_end sub_8048EC4
-
- thumb_func_start sub_8048ED8
-sub_8048ED8:
- push {lr}
- ldr r1, _08048EE8
- ldr r1, [r1]
- bl SendMessage
- pop {r0}
- bx r0
- .align 2, 0
-_08048EE8: .4byte gPtrSteelPartCrumbledMessage
- thumb_func_end sub_8048ED8
-
- thumb_func_start sub_8048EEC
-sub_8048EEC:
- push {lr}
- ldr r1, _08048EFC
- ldr r1, [r1]
- bl SendMessage
- pop {r0}
- bx r0
- .align 2, 0
-_08048EFC: .4byte gPtrWishStoneCrumbledMessage
- thumb_func_end sub_8048EEC
-
- thumb_func_start sub_8048F00
-sub_8048F00:
- push {r4,lr}
- adds r4, r0, 0
- movs r1, 0xD6
- bl sub_80421C0
- ldr r0, _08048F24
- ldr r1, [r0]
- adds r0, r4, 0
- bl SendMessage
- movs r0, 0x3C
- movs r1, 0x46
- bl sub_803E708
- pop {r4}
- pop {r0}
- bx r0
- .align 2, 0
-_08048F24: .4byte gPtrMusicBoxPlayedCrumbledMessage
- thumb_func_end sub_8048F00
-
- .align 2, 0 \ No newline at end of file
diff --git a/asm/code_8073CF0.s b/asm/code_8073CF0.s
index a948a4d..b4d2e59 100644
--- a/asm/code_8073CF0.s
+++ b/asm/code_8073CF0.s
@@ -5,30 +5,6 @@
.text
- thumb_func_start sub_8073CF0
-sub_8073CF0:
- push {lr}
- bl sub_8067110
- pop {r0}
- bx r0
- thumb_func_end sub_8073CF0
-
- thumb_func_start sub_8073CFC
-sub_8073CFC:
- push {lr}
- bl sub_80671A0
- pop {r0}
- bx r0
- thumb_func_end sub_8073CFC
-
- thumb_func_start sub_8073D08
-sub_8073D08:
- push {lr}
- bl sub_8073D14
- pop {r0}
- bx r0
- thumb_func_end sub_8073D08
-
thumb_func_start sub_8073D14
sub_8073D14:
push {r4-r7,lr}
diff --git a/asm/code_807CABC.s b/asm/code_807CABC.s
index 888017d..2e8680f 100644
--- a/asm/code_807CABC.s
+++ b/asm/code_807CABC.s
@@ -327,4 +327,4 @@ _0807CD54:
bx r0
thumb_func_end sub_807CB3C
- .align 2, 0 \ No newline at end of file
+ .align 2, 0
diff --git a/asm/code_807CD9C.s b/asm/code_807CD9C.s
index dfc4efa..24e523f 100644
--- a/asm/code_807CD9C.s
+++ b/asm/code_807CD9C.s
@@ -2935,4 +2935,4 @@ _0807E578: .4byte 0x00003a0e
_0807E57C: .4byte 0x0000021e
thumb_func_end sub_807E378
- .align 2, 0 \ No newline at end of file
+ .align 2, 0
diff --git a/asm/code_807FCD4.s b/asm/code_807FCD4.s
index 99ee31d..57c6f3e 100644
--- a/asm/code_807FCD4.s
+++ b/asm/code_807FCD4.s
@@ -4,7 +4,7 @@
.syntax unified
.text
-
+
thumb_func_start sub_807FCD4
sub_807FCD4:
push {r4-r7,lr}
@@ -6598,12 +6598,4 @@ sub_8083260:
bx r0
thumb_func_end sub_8083260
- thumb_func_start sub_8083288
-sub_8083288:
- push {lr}
- bl sub_8082FE0
- pop {r0}
- bx r0
- thumb_func_end sub_8083288
-
.align 2, 0 \ No newline at end of file
diff --git a/asm/code_809447C.s b/asm/code_809447C.s
index b10d337..281962b 100644
--- a/asm/code_809447C.s
+++ b/asm/code_809447C.s
@@ -4,117 +4,6 @@
.syntax unified
.text
-
- thumb_func_start sub_809447C
-sub_809447C:
- push {r4,r5,lr}
- adds r5, r0, 0
- adds r4, r1, 0
- movs r2, 0x10
- bl RestoreIntegerBits
- adds r4, 0x2
- adds r0, r5, 0
- adds r1, r4, 0
- movs r2, 0x10
- bl RestoreIntegerBits
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_809447C
-
- thumb_func_start sub_809449C
-sub_809449C:
- push {r4,r5,lr}
- adds r5, r0, 0
- adds r4, r1, 0
- movs r2, 0x10
- bl SaveIntegerBits
- adds r4, 0x2
- adds r0, r5, 0
- adds r1, r4, 0
- movs r2, 0x10
- bl SaveIntegerBits
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_809449C
-
- thumb_func_start sub_80944BC
-sub_80944BC:
- push {r4,lr}
- sub sp, 0x8
- adds r4, r1, 0
- lsls r0, 16
- asrs r1, r0, 16
- ldr r0, _080944F4
- cmp r1, r0
- bgt _08094500
- lsls r1, 16
- lsrs r1, 16
- mov r0, sp
- bl sub_8092AA8
- ldr r0, _080944F8
- mov r1, sp
- movs r2, 0
- bl sub_80928C0
- ldr r0, _080944FC
- ldr r0, [r0]
- adds r2, r4, 0
- adds r2, 0xC8
- adds r1, r4, 0
- movs r3, 0
- bl xxx_format_string
- b _08094516
- .align 2, 0
-_080944F4: .4byte 0x000001f3
-_080944F8: .4byte gUnknown_202DE58
-_080944FC: .4byte gUnknown_811383C
-_08094500:
- ldr r0, _08094520
- ldr r2, _08094524
- adds r1, r2
- lsls r1, 3
- adds r0, 0x4
- adds r1, r0
- ldr r1, [r1]
- adds r0, r4, 0
- movs r2, 0xC8
- bl strncpy
-_08094516:
- add sp, 0x8
- pop {r4}
- pop {r0}
- bx r0
- .align 2, 0
-_08094520: .4byte gUnknown_8113080
-_08094524: .4byte 0xfffffe0c
- thumb_func_end sub_80944BC
-
- thumb_func_start sub_8094528
-sub_8094528:
- push {lr}
- lsls r0, 16
- asrs r1, r0, 16
- ldr r0, _08094544
- cmp r1, r0
- ble _08094550
- ldr r0, _08094548
- ldr r2, _0809454C
- adds r1, r2
- lsls r1, 3
- adds r1, r0
- ldrb r0, [r1]
- b _08094552
- .align 2, 0
-_08094544: .4byte 0x000001f3
-_08094548: .4byte gUnknown_8113080
-_0809454C: .4byte 0xfffffe0c
-_08094550:
- movs r0, 0x1
-_08094552:
- pop {r1}
- bx r1
- thumb_func_end sub_8094528
thumb_func_start sub_8094558
sub_8094558:
diff --git a/data/data_80D47B8.s b/data/data_80D47B8.s
index 1b63067..b862a8a 100644
--- a/data/data_80D47B8.s
+++ b/data/data_80D47B8.s
@@ -4749,211 +4749,3 @@ gFriendActionCheckIQ: @ 80DD94C
gUnknown_80DD958: @ 80DD958
.string "Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} \0"
.string "pksdir0\0"
-
- .global gUnknown_80DD970
-gUnknown_80DD970: @ 80DD970
-@ replacing .incbin "baserom.gba", 0x000dd970, 0x7c
- .4byte gWonderMailReceiveSOSMail
- .byte 0x00, 0x00, 0x00, 0x00
- .4byte gWonderMailLeaveForRescue
- .byte 0x01, 0x00, 0x00, 0x00
- .4byte gWonderMailSendAOKMail
- .byte 0x02, 0x00, 0x00, 0x00
- .4byte gWonderMailDeleteMail
- .byte 0x03, 0x00, 0x00, 0x00
- .4byte gWonderMailCancel
- .byte 0x0a, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x0a, 0x00, 0x00, 0x00
-
- .global gWonderMailCancel @ 80DD9A0
- gWonderMailCancel:
- .string "Cancel\0"
- .align 2,0
-
- .global gWonderMailDeleteMail @ 80DD9A8
- gWonderMailDeleteMail:
- .string "Delete Mail\0"
- .align 2,0
-
- .global gWonderMailSendAOKMail @ 80DD9B4
- gWonderMailSendAOKMail:
- .string "Send A-OK Mail\0"
- .align 2,0
-
- .global gWonderMailLeaveForResuce @ 80DD9C4
- gWonderMailLeaveForRescue:
- .string "Leave for Rescue\0"
- .align 2,0
-
- .global gWonderMailReceiveSOSMail @ 80DD9D8
- gWonderMailReceiveSOSMail:
- .string "Receive SOS Mail\0"
- .align 2,0
-
- .global gUnknown_80DD9EC
-gUnknown_80DD9EC: @ 80DD9EC
-@ replacing .incbin "baserom.gba", 0x000dd9ec, 0x5c
- .4byte gWonderMailDeleteSOSMail
- .byte 0x05, 0x00, 0x00, 0x00
- .4byte gWonderMailDeleteAOKMail
- .byte 0x06, 0x00, 0x00, 0x00
- .4byte gWonderMailDeleteAllMail
- .byte 0x07, 0x00, 0x00, 0x00
- .4byte gWonderMailCancel
- .byte 0x0a, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x0a, 0x00, 0x00, 0x00
-
- .global gWonderMailDeleteAllMail @ 80DDA14
- gWonderMailDeleteAllMail:
- .string "Delete All Mail\0"
- .align 2,0
-
- .global gWonderMailDeleteAOKMail @ 80DDA24
- gWonderMailDeleteAOKMail:
- .string "Delete A-OK Mail\0"
- .align 2,0
-
- .global gWonderMailDeleteSOSMail @ 80DDA38
- gWonderMailDeleteSOSMail:
- .string "Delete SOS Mail\0"
- .align 2,0
-
- .global gUnknown_80DDA48
-gUnknown_80DDA48: @ 80DDA48
-@ Menu that shows up when you enter an incorrect Wonder Mail Password
-@ replacing .incbin "baserom.gba", 0x000dda48, 0x1c
- .4byte gWonderMailYes
- .byte 0x08, 0x00, 0x00, 0x00
- .4byte gWonderMailCancel
- .byte 0x0a, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x0a, 0x00, 0x00, 0x00
-
- .global gWonderMailYes @ (80DDA60)
- gWonderMailYes:
- .string "Yes\0"
- .align 2,0
-
- .global gUnknown_80DDA64
-gUnknown_80DDA64: @ 80DDA64
-@ replacing .incbin "baserom.gba", 0x000dda64, 0x1c
- .4byte gWonderMailYes
- .byte 0x08, 0x00, 0x00, 0x00
- .4byte gWonderMailNo
- .byte 0x09, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x0a, 0x00, 0x00, 0x00
-
- .global gWonderMailNo @ (80DDA7C)
- gWonderMailNo:
- .string "No\0"
- .align 2,0
-
- .global gUnknown_80DDA80
-gUnknown_80DDA80: @ 80DDA80
-@ replacing .incbin "baserom.gba", 0x000dda80, 0x20
- .4byte gWonderMailYes
- .byte 0x08, 0x00, 0x00, 0x00
- .4byte gWonderMailNo
- .byte 0x09, 0x00, 0x00, 0x00
- .4byte gWonderMailCancel
- .byte 0x0a, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x0a, 0x00, 0x00, 0x00
-
- .global gUnknown_80DDAA0
-gUnknown_80DDAA0: @ 80DDAA0
- .4byte SendWOPokemon
- .byte 0x12, 0x00, 0x00, 0x00
- .4byte gWonderMailCancel
- .byte 0x0a, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x0a, 0x00, 0x00, 0x00
-
- .global SendWOPokemon
- SendWOPokemon:
- .string "Send w/o Pokémon\0"
- .align 2,0
-
- .global gUnknown_80DDACC
-gUnknown_80DDACC: @ 80DDACC
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x16, 0x00, 0x07, 0x00
- .byte 0x06, 0x00, 0x04, 0x00
- .byte 0x04, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .global gUnknown_80DDAE4
-gUnknown_80DDAE4: @ 80DDAE4
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x16, 0x00, 0x06, 0x00
- .byte 0x06, 0x00, 0x04, 0x00
- .byte 0x04, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .global gUnknown_80DDAFC
-gUnknown_80DDAFC: @ 80DDAFC
- .4byte Confirm_80DDB1C
- .byte 0xB, 0x00, 0x00, 0x00
- .4byte Info_80DDB14
- .byte 0xC, 0x00, 0x00, 0x00
- .byte 0x0, 0x00, 0x00, 0x00
- .byte 0xA, 0x00, 0x00, 0x00
-
- .global Info_80DDB14
- Info_80DDB14:
- .string "Info\0"
- .align 2,0
-
- .global Confirm_80DDB1C
- Confirm_80DDB1C:
- .string "Confirm\0"
- .align 2,0
-
- .global gUnknown_80DDB24
-gUnknown_80DDB24: @ 80DDB24
- .4byte GameLinkCable_80DDB50
- .byte 0xD, 0x00, 0x00, 0x00
- .4byte Password_80DDB44
- .byte 0xF, 0x00, 0x00, 0x00
- .4byte gWonderMailCancel
- .byte 0xA, 0x00, 0x00, 0x00
- .byte 0x0, 0x00, 0x00, 0x00
- .byte 0xA, 0x00, 0x00, 0x00
-
- .global Password_80DDB44
- Password_80DDB44:
- .string "Password\0"
- .align 2,0
-
- .global GameLinkCable_80DDB50
- GameLinkCable_80DDB50:
- .string "Game Link cable\0"
- .align 2,0
-
- .global gUnknown_80DDB60
-gUnknown_80DDB60: @ 80DDB60
-
- .4byte SendPokemon_80DDB98
- .byte 0x11, 0x00, 0x00, 0x00
- .4byte DontSendPokemon_80DDB80
- .byte 0x12, 0x00, 0x00, 0x00
- .4byte gWonderMailCancel
- .byte 0x0a, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x0a, 0x00, 0x00, 0x00
-
- .global DontSendPokemon_80DDB80
- DontSendPokemon_80DDB80:
- .string "Don{APOSTROPHE}t Send Pokémon\0"
- .align 2,0
-
- .global SendPokemon_80DDB98
- SendPokemon_80DDB98:
- .string "Send Pokémon\0"
- .align 2,0
-
diff --git a/data/data_80DED44.s b/data/data_80DED44.s
index 758d88b..2f6040a 100644
--- a/data/data_80DED44.s
+++ b/data/data_80DED44.s
@@ -1,98 +1,7 @@
.section .rodata
- .global gUnknown_80DFBD0
-gUnknown_80DFBD0: @ 80DFBD0
- .byte 0x00, 0x00, 0x00, 0x00
-
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .byte 0x00, 0x00, 0x00, 0x00
-
-
- .global gUnknown_80DFBE8
-gUnknown_80DFBE8: @ 80DFBE8
- .byte 0x01, 0x00, 0x0c, 0x00
-
- .global gUnknown_80DFBEC
-gUnknown_80DFBEC: @ 80DFBEC
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x06, 0x00, 0x00, 0x00
- .byte 0x02, 0x00, 0x02, 0x00
- .byte 0x18, 0x00, 0x0e, 0x00
- .byte 0x0e, 0x00, 0x00, 0x00
- .4byte gUnknown_80DFBE8
-
-
- .global gUnknown_80DFC04
-gUnknown_80DFC04: @ 80DFC04
- .string "News List\0"
- .align 2,0
- .string "pksdir0\0"
-
- .global gUnknown_80DFC18
-gUnknown_80DFC18: @ 80DFC18
- .byte 0x00, 0x00, 0x00, 0x00
-
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .byte 0x00, 0x00, 0x00, 0x00
-
- .global gUnkData_80DFC30
- gUnkData_80DFC30:
- .byte 0x01, 0x00, 0x16, 0x00
-
- .global gUnknown_80DFC34
-gUnknown_80DFC34: @ 80DFC34
- .byte 0x00, 0x00, 0x00, 0x00
-
- .byte 0x06, 0x00, 0x00, 0x00
- .byte 0x02, 0x00, 0x02, 0x00
- .byte 0x1A, 0x00, 0x10, 0x00
- .byte 0x10, 0x00, 0x00, 0x00
-
- .4byte gUnkData_80DFC30
-
- .global gUnknown_80DFC4C
-gUnknown_80DFC4C: @ 80DFC4C
- .string "She\0"
-
- .global gUnknown_80DFC50
-gUnknown_80DFC50: @ 80DFC50
- .string "He\0"
- .align 2,0
- .string "pksdir0\0"
-
- .global gUnknown_80DFC5C
-gUnknown_80DFC5C: @ 80DFC5C
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .global gUnknown_80DFC74
-gUnknown_80DFC74: @ 80DFC74
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x06, 0x00, 0x00, 0x00
- .byte 0x02, 0x00, 0x02, 0x00
- .byte 0x18, 0x00, 0x0e, 0x00
- .byte 0x0e, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .global gMailboxText
-gMailboxText: @ 80DFC8C
- .string "Mailbox\0"
- .string "pksdir0\0"
-
- .global gUnknown_80DFC9C
-gUnknown_80DFC9C: @ 80DFC9C
+ .global gUnknown_80DFCE4
+gUnknown_80DFCE4: @ 80DFCE4
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x03, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
@@ -100,8 +9,8 @@ gUnknown_80DFC9C: @ 80DFC9C
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
- .global gUnknown_80DFCB4
-gUnknown_80DFCB4: @ 80DFCB4
+ .global gUnknown_80DFCFC
+gUnknown_80DFCFC: @ 80DFCFC
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x06, 0x00, 0x00, 0x00
.byte 0x02, 0x00, 0x02, 0x00
@@ -109,36 +18,6 @@ gUnknown_80DFCB4: @ 80DFCB4
.byte 0x0e, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
- .global gBulletinBoardText
-gBulletinBoardText: @ 80DFCCC
- .string "Bulletin Board\0"
- .align 2,0
- .string "pksdir0\0"
-
- .global gUnknown_80DFCE4
-gUnknown_80DFCE4: @ 80DFCE4
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .global gUnknown_80DFCFC
-gUnknown_80DFCFC: @ 80DFCFC
- .byte 0x00, 0x00
- .byte 0x00, 0x00
- .byte 0x06, 0x00
- .byte 0x00, 0x00
- .byte 0x02, 0x00
- .byte 0x02, 0x00
- .byte 0x18, 0x00
- .byte 0x0e, 0x00
- .byte 0x0e, 0x00
- .byte 0x00, 0x00
- .byte 0x00, 0x00
- .byte 0x00, 0x00
-
.global gUnknown_80DFD14
gUnknown_80DFD14: @ 80DFD14
.string "Job List\0"
@@ -156,33 +35,21 @@ gUnknown_80DFD28: @ 80DFD28
.global gUnknown_80DFD40
gUnknown_80DFD40: @ 80DFD40
- .byte 0x00, 0x00
- .byte 0x00, 0x00
- .byte 0x04, 0x00
- .byte 0x00, 0x00
- .byte 0x15, 0x00
- .byte 0x06, 0x00
- .byte 0x07, 0x00
- .byte 0x03, 0x00
- .byte 0x03, 0x00
- .byte 0x00, 0x00
- .byte 0x00, 0x00
- .byte 0x00, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x04, 0x00, 0x00, 0x00
+ .byte 0x15, 0x00, 0x06, 0x00
+ .byte 0x07, 0x00, 0x03, 0x00
+ .byte 0x03, 0x00, 0x00, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00
.global gUnknown_80DFD58
gUnknown_80DFD58: @ 80DFD58
- .byte 0x00, 0x00
- .byte 0x00, 0x00
- .byte 0x04, 0x00
- .byte 0x00, 0x00
- .byte 0x15, 0x00
- .byte 0x0f, 0x00
- .byte 0x06, 0x00
- .byte 0x03, 0x00
- .byte 0x03, 0x00
- .byte 0x00, 0x00
- .byte 0x00, 0x00
- .byte 0x00, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x04, 0x00, 0x00, 0x00
+ .byte 0x15, 0x00, 0x0f, 0x00
+ .byte 0x06, 0x00, 0x03, 0x00
+ .byte 0x03, 0x00, 0x00, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00
.global gUnknown_80DFD70
gUnknown_80DFD70: @ 80DFD70
@@ -207,7 +74,7 @@ gUnknown_80DFD8C: @ 80DFD8C
gUnknown_80DFDA4: @ 80DFDA4
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x06, 0x00, 0x00, 0x00
- .byte 0x02, 0x00, 0x02, 0x0
+ .byte 0x02, 0x00, 0x02, 0x00
.byte 0x18, 0x00, 0x0e, 0x00
.byte 0x0e, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
diff --git a/data/data_80E59A8.s b/data/data_80E59A8.s
index 9e16004..6fcb699 100644
--- a/data/data_80E59A8.s
+++ b/data/data_80E59A8.s
@@ -1,168 +1,5 @@
.section .rodata
- .global gUnknown_80E5CB4
-gUnknown_80E5CB4: @ 80E5CB4
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x02, 0x00, 0x0F, 0x00
- .byte 0x1A, 0x00, 0x03, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .global gUnknown_80E5CCC
-gUnknown_80E5CCC: @ 80E5CCC
- .byte 0xe8, 0x5c, 0x0e, 0x08
- .byte 0xde, 0xff, 0x00, 0x00
- .byte 0xe4, 0x5c, 0x0e, 0x08
- .byte 0xde, 0xff, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0xdd, 0xff, 0x00, 0x00
-
-sUnknown_80E5CE4: @ 80E5CE4
- .string " \0"
- .align 2,0
-
- .string "Start an entirely new adventure.\0"
- .align 2,0
-
- .global gUnknown_80E5D0C
-gUnknown_80E5D0C: @ 80E5D0C
- .4byte sUnknown_80E5D24, 0xFFDE
- .4byte sUnknown_80E5CE4, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E5D24: @ 80E5D24
- .string "Check your career as an adventurer.\0"
- .align 2, 0
-
- .global gUnknown_80E5D48
-gUnknown_80E5D48: @ 80E5D48
- .4byte sUnknown_80E5D88, 0xFFDE
- .4byte sUnknown_80E5D60, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E5D60: @ 80E5D60
- .string "It won~27t be in the release version.\0"
- .align 2, 0
-
-sUnknown_80E5D88: @ 80E5D88
- .string "This is the Debug Mode.\0"
- .align 2, 0
-
- .global gUnknown_80E5DA0
-gUnknown_80E5DA0: @ 80E5DA0
- .4byte sUnknown_80E5DCC, 0xFFDE
- .4byte sUnknown_80E5DB8, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E5DB8:
- .string "you last saved. \0"
- .align 2, 0
-
-sUnknown_80E5DCC:
- .string "Resume your adventure from where\0"
- .align 2, 0
-
- .global gUnknown_80E5DF0
-gUnknown_80E5DF0: @ 80E5DF0
- .4byte sUnknown_80E5E34, 0xFFDE
- .4byte sUnknown_80E5E08, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E5E08:
- .string "#C2Beware#R! This will delete it forever!\0"
- .align 2, 0
-
-sUnknown_80E5E34:
- .string "This will delete your saved game data.\0"
- .align 2, 0
-
- .global gUnknown_80E5E5C
-gUnknown_80E5E5C: @ 80E5E5C
- .4byte sUnknown_80E5EA0, 0xFFDE
- .4byte sUnknown_80E5E74, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E5E74:
- .string "passwords~2c friends may rescue each other.\0"
- .align 2, 0
-
-sUnknown_80E5EA0:
- .string "Using a Game Link cable or\0"
- .align 2, 0
-
- .global gUnknown_80E5EBC
-gUnknown_80E5EBC: @ 80E5EBC
- .4byte sUnknown_80E5EF8, 0xFFDE
- .4byte sUnknown_80E5ED4, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E5ED4:
- .string "trade stored items with a friend.\0"
- .align 2, 0
-
-sUnknown_80E5EF8:
- .string "Using a Game Link cable~2c you can\0"
- .align 2, 0
-
- .global gUnknown_80E5F1C
-gUnknown_80E5F1C: @ 80E5F1C
- .4byte sUnknown_80E5F58, 0xFFDE
- .4byte sUnknown_80E5F34, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E5F34:
- .string "You can give up waiting for rescue.\0"
- .align 2, 0
-
-sUnknown_80E5F58:
- .string "You are awaiting rescue by a friend.\0"
- .align 2, 0
-
- .global gUnknown_80E5F80
-gUnknown_80E5F80: @ 80E5F80
- .4byte sUnknown_80E5FB0, 0xFFDE
- .4byte sUnknown_80E5F98, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E5F98:
- .string "receive Wonder Mail.\0"
- .align 2, 0
-
-sUnknown_80E5FB0:
- .string "Using passwords~2c you can\0"
- .align 2, 0
-
- .global gUnknown_80E5FCC
-gUnknown_80E5FCC: @ 80E5FCC
- .4byte sUnknown_80E6008, 0xFFDE
- .4byte sUnknown_80E5FE4, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E5FE4:
- .string "receive teams from your friends.\0"
- .align 2, 0
-
-sUnknown_80E6008:
- .string "Using the Dual Slot function~2c you can\0"
- .align 2, 0
-
- .global gUnknown_80E6030
-gUnknown_80E6030: @ 80E6030
- .4byte sUnknown_80E6070, 0xFFDE
- .4byte sUnknown_80E6048, 0xFFDE
- .4byte 0, 0xFFDD
-
-sUnknown_80E6048:
- .string "go on an adventure to unknown worlds.\0"
- .align 2, 0
-
-sUnknown_80E6070:
- .string "Using wireless communication~2c you can\0"
- .align 2, 0
-
- .string "pksdir0\0"
-
@ Start of Trade Items Data
.global gUnknown_80E60A0
@@ -1239,103 +1076,3 @@ sUnknown_80E75CC:
.align 2, 0
.string "pksdir0\0"
-
- .global gUnknown_80E75F8
-gUnknown_80E75F8: @ 80E75F8
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .global gUnknown_80E7610
-gUnknown_80E7610: @ 80E7610
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x02, 0x00, 0x02, 0x00
- .byte 0x1A, 0x00, 0x0B, 0x00
- .byte 0x0B, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x20, 0x00, 0x00, 0x00
-
- .global gUnknown_80E762C
-gUnknown_80E762C: @ 80E762C
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x02, 0x00, 0x0F, 0x00
- .byte 0x13, 0x00, 0x03, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
- .global gResumeQuicksaveMenuItems
-gResumeQuicksaveMenuItems: @ 80E7644
- .4byte ResumeQuicksave_80E7668, 0x5
- .4byte IsThatOK_80E765C, 0x5
- .4byte 0, 0x3
-
-IsThatOK_80E765C:
- .string "Is that OK?\0"
- .align 2, 0
-
-ResumeQuicksave_80E7668:
- .string "Resuming from quicksave.\0"
- .align 2, 0
-
- .global gResumeAdventureMenuItems
-gResumeAdventureMenuItems: @ 80E7684
- .4byte ResumeAdventure_80E769C, 0x5
- .4byte IsThatOK_80E765C, 0x5
- .4byte 0, 0x3
-
-ResumeAdventure_80E769C:
- .string "Resuming saved adventure.\0"
- .align 2, 0
-
- .global gQuitWaitingRescueMenuItems
-gQuitWaitingRescueMenuItems: @ 80E76B8
- .4byte QuitAwaitingRescue_80E76D0, 0x5
- .4byte IsThatOK_80E765C, 0x5
- .4byte 0, 0x3
-
-QuitAwaitingRescue_80E76D0:
- .string "Quit awaiting rescue?\0"
- .align 2, 0
-
- .global gDeleteSavePromptMenuItems
-gDeleteSavePromptMenuItems: @ 80E76E8
- .4byte Deleted_80E7718, 0x5
- .4byte Deleted_80E7700, 0x5
- .4byte 0, 0x3
-
-Deleted_80E7700:
- .string "deleted. Is that OK?\0"
- .align 2, 0
-
-Deleted_80E7718:
- .string "Your saved data will be\0"
- .align 2, 0
-
- .global gDeleteSaveConfirmMenuItems
-gDeleteSaveConfirmMenuItems: @ 80E7730
- .4byte Deleted_80E7768, 0x5
- .4byte Deleted_80E7748, 0x5
- .4byte 0, 0x3
-
-Deleted_80E7748:
- .string "delete all of your saved data?\0"
- .align 2, 0
-
-Deleted_80E7768:
- .string "Are you sure you want to\0"
- .align 2, 0
-
- .global gUnknown_80E7784
-gUnknown_80E7784: @ 80E7784
- .byte 0x00, 0x00, 0x00, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x17, 0x00, 0x0F, 0x00
- .byte 0x05, 0x00, 0x03, 0x00
- .byte 0x03, 0x00, 0x00, 0x00
- .byte 0x00, 0x00, 0x00, 0x00
-
diff --git a/include/ds_menus.h b/include/ds_menus.h
new file mode 100644
index 0000000..4c7d90f
--- /dev/null
+++ b/include/ds_menus.h
@@ -0,0 +1,11 @@
+#ifndef GUARD_DS_MENUS_H
+#define GUARD_DS_MENUS_H
+
+u32 CreateDualSlotMenu(void);
+u32 UpdateDualSlotMenu(void);
+void CleanDualSlotMenu(void);
+u32 CreateWirelessCommsMenu(void);
+u32 UpdateWirelessCommsMenu(void);
+void CleanWirelessCommsMenu(void);
+
+#endif // GUARD_DS_MENUS_H
diff --git a/include/friend_rescue.h b/include/friend_rescue.h
index 62af956..4a25672 100644
--- a/include/friend_rescue.h
+++ b/include/friend_rescue.h
@@ -1,6 +1,8 @@
#ifndef GUARD_FRIEND_RESCUE_H
#define GUARD_FRIEND_RESCUE_H
+#include "item.h"
+
struct WonderMailStruct_203B33C
{
// size: 0x568
@@ -43,4 +45,9 @@ struct WonderMailStruct_203B33C
s32 unk564;
};
+u32 CreateFriendRescueMenu(void);
+u32 UpdateFriendRescueMenu(void);
+void CleanFriendRescueMenu(void);
+
+
#endif
diff --git a/include/load_screen.h b/include/load_screen.h
new file mode 100644
index 0000000..690ed1c
--- /dev/null
+++ b/include/load_screen.h
@@ -0,0 +1,9 @@
+#ifndef GUARD_LOAD_SCREEN_H
+#define GUARD_LOAD_SCREEN_H
+
+void CreateLoadScreen(u32);
+s32 UpdateLoadScreenMenu(void);
+void CleanLoadScreen(void);
+
+#endif // GUARD_LOAD_SCREEN_H
+
diff --git a/include/moves.h b/include/moves.h
index 3bf4344..44b324b 100644
--- a/include/moves.h
+++ b/include/moves.h
@@ -2,20 +2,31 @@
#define GUARD_MOVES_H
#include "constants/move.h"
+#include "constants/move_id.h"
-// 0x92A88
+void LoadWazaParameters(void);
+u8 sub_809287C(struct PokemonMove *move);
void InitPokemonMove(struct PokemonMove *move, u16 moveID);
-// 0x92AE0
-s16 GetMoveTargetingFlags(struct PokemonMove *move, bool32 isAI);
+void sub_8092AA8(struct PokemonMove *move, u16 moveID);
+void InitZeroedPPPokemonMove(struct PokemonMove *move, u16 moveID);
+s16 GetMoveTargetingFlags(struct PokemonMove *move, u32 isAI);
u8 GetMoveType(struct PokemonMove *move);
-// 0x92B90
u8 GetMoveWeight(struct PokemonMove *move);
+u8 GetMoveHitCount(struct PokemonMove *move);
s32 GetMovePower(struct PokemonMove *move);
-// 0x92BD8
s32 GetMoveAccuracy(struct PokemonMove *move, u32 accuracyType);
-// 0x92BF4
u32 GetMoveMaxPP(struct PokemonMove *move);
-// 0x92C54
-bool8 MoveDealsDirectDamage(struct PokemonMove *move);
+u8 GetMoveUnk12(struct PokemonMove *move);
+u8 GetMoveCriticalHitChance(struct PokemonMove *move);
+u8 GetMoveCannotHitFrozen(struct PokemonMove *move);
+u8 MoveDealsDirectDamage(struct PokemonMove *move);
+u32 GetMoveRangeType(struct PokemonMove *move);
+void sub_8092C84(u8 *buffer, u16 moveID);
+u8 *GetMoveUseText(u16 moveID);
+u8 GetMoveAffectedByMagicCoat(u16 moveID);
+u8 GetMoveTargetsUser(u16 moveID);
+u8 GetMoveAffectedByMuzzled(u16 moveID);
+bool8 IsBlockedBySoundproof(struct PokemonMove *move);
+bool8 DoesMoveCharge(u16 move);
-#endif
+#endif // GUARD_MOVES_H
diff --git a/include/rescue_password_menu.h b/include/rescue_password_menu.h
index 8781b1f..66325be 100644
--- a/include/rescue_password_menu.h
+++ b/include/rescue_password_menu.h
@@ -23,4 +23,8 @@ struct RescuePasswordMenu
u32 unk210;
};
+void CreateRescuePasswordMenu(u32 currMenu);
+s32 UpdateRescuePasswordMenu(void);
+void CleanRescuePasswordMenu(void);
+
#endif
diff --git a/ld_script.txt b/ld_script.txt
index 0f11331..3af08e6 100755
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -198,6 +198,7 @@ SECTIONS {
asm/code_8046CE4.o(.text);
src/code_8048480.o(.text);
asm/code_8048480.o(.text);
+ src/code_8048DB8.o(.text);
src/dungeon_ai_item_weight.o(.text);
src/dungeon_map_access.o(.text);
asm/code_80495E4.o(.text);
@@ -233,6 +234,7 @@ SECTIONS {
src/dungeon_pokemon_attributes.o(.text);
asm/code_80718D8.o(.text);
src/dungeon_ai_items.o(.text);
+ src/code_8073CF0.o(.text);
asm/code_8073CF0.o(.text);
src/dungeon_ai_movement.o(.text);
asm/code_8075BA4.o(.text);
@@ -248,6 +250,7 @@ SECTIONS {
asm/code_807E5AC.o(.text);
src/trap.o(.text);
asm/code_807FCD4.o(.text);
+ src/code_8083288.o(.text);
src/dungeon_range.o(.text);
asm/code_808333C.o(.text);
src/dungeon_random.o(.text);
@@ -286,6 +289,7 @@ SECTIONS {
src/moves_1.o(.text);
asm/code_8094148.o(.text);
src/number_util.o(.text);
+ src/code_809447C.o(.text);
asm/code_809447C.o(.text);
src/code_8092334.o(.text);
src/game_options.o(.text);
diff --git a/src/code_2.c b/src/code_2.c
index 8a6987b..6f142e0 100644
--- a/src/code_2.c
+++ b/src/code_2.c
@@ -7,6 +7,7 @@
#include "input.h"
#include "memory.h"
#include "main_menu.h"
+#include "moves.h"
#include "music.h"
#include "play_time.h"
#include "save.h"
@@ -23,7 +24,6 @@ extern void sub_8097670(void);
extern void LoadGameOptions(void);
extern void sub_8094C14(void);
extern void LoadItemParameters(void);
-extern void LoadWazaParameters(void);
extern void sub_80950BC(void);
extern void sub_80958E8(void);
extern void sub_800CD64(u32, u32);
diff --git a/src/code_8048DB8.c b/src/code_8048DB8.c
new file mode 100644
index 0000000..0a932ec
--- /dev/null
+++ b/src/code_8048DB8.c
@@ -0,0 +1,86 @@
+#include "global.h"
+#include "code_80521D0.h"
+#include "dungeon_random.h"
+
+
+extern void sub_803E708(u32, u32);
+extern void sub_80421C0(struct DungeonEntity *r0, u16 r1);
+extern void sub_8078B5C(struct DungeonEntity *, u32, u32, u32, u32);
+extern void sub_80763F8(struct DungeonEntity *, u32, u32);
+extern void sub_80769CC(struct DungeonEntity *, u32);
+extern void sub_8076210(struct DungeonEntity *, u32, u32, u32);
+extern void sub_8077780(struct DungeonEntity *, u32, u32);
+extern void sub_8076E20(struct DungeonEntity *, u32, u32, u32, u32, u32);
+
+extern u8 *gPtrMusicBoxPlayedCrumbledMessage[];
+extern u8 *gPtrWishStoneCrumbledMessage[];
+extern u8 *gPtrIcePartCrumbledMessage[];
+extern u8 *gPtrRockPartCrumbledMessage[];
+extern u8 *gPtrSteelPartCrumbledMessage[];
+extern u32 gUnknown_8106A4C;
+extern u32 gUnknown_8106A50;
+extern s16 gUnknown_80F4FAC;
+extern void sub_806F370(struct DungeonEntity *r0, struct DungeonEntity *r1, u32, u32, u8 *, u8, s32, u32, u32, u32);
+extern void sub_8051E7C(struct DungeonEntity *pokemon);
+
+
+void sub_8048DB8(struct DungeonEntity *pokemon, struct DungeonEntity *r1, u8 r2)
+{
+ u8 temp;
+ if(r2 != 0)
+ sub_806F370(pokemon, r1, gUnknown_80F4FAC, 1, &temp, 0, 0x217, 0, 0, 0);
+ else
+ sub_8051E7C(pokemon);
+}
+
+void sub_8048E04(struct DungeonEntity *pokemon, u32 r1)
+{
+ sub_8078B5C(pokemon, r1, 0x1E, 0, 1);
+ switch(DungeonRandomCapped(5))
+ {
+ case 0:
+ sub_80763F8(pokemon, r1, 1);
+ break;
+ case 1:
+ sub_80769CC(pokemon, r1);
+ break;
+ case 2:
+ sub_8076210(pokemon, r1, 1, 1);
+ break;
+ case 3:
+ sub_8077780(pokemon, r1, 1);
+ break;
+ case 4:
+ sub_8076E20(pokemon, r1, gUnknown_8106A4C, 3, 1, 1);
+ sub_8076E20(pokemon, r1, gUnknown_8106A50, 3, 1, 1);
+ break;
+ }
+}
+
+void sub_8048EB0(struct DungeonEntity *pokemon)
+{
+ SendMessage(pokemon, *gPtrIcePartCrumbledMessage);
+}
+
+void sub_8048EC4(struct DungeonEntity *pokemon)
+{
+ SendMessage(pokemon, *gPtrRockPartCrumbledMessage);
+}
+
+void sub_8048ED8(struct DungeonEntity *pokemon)
+{
+ SendMessage(pokemon, *gPtrSteelPartCrumbledMessage);
+}
+
+void sub_8048EEC(struct DungeonEntity *pokemon)
+{
+ SendMessage(pokemon, *gPtrWishStoneCrumbledMessage);
+}
+
+void sub_8048F00(struct DungeonEntity *pokemon)
+{
+ sub_80421C0(pokemon, 0xD6);
+ SendMessage(pokemon, *gPtrMusicBoxPlayedCrumbledMessage);
+ sub_803E708(0x3C, 0x46);
+}
+
diff --git a/src/code_8057824.c b/src/code_8057824.c
index d763925..e43cef5 100644
--- a/src/code_8057824.c
+++ b/src/code_8057824.c
@@ -1,7 +1,6 @@
#include "global.h"
#include "dungeon_global_data.h"
#include "dungeon_entity.h"
-#include "constants/move.h"
#include "moves.h"
extern u32 gUnknown_80FCF74;
diff --git a/src/code_8073CF0.c b/src/code_8073CF0.c
new file mode 100644
index 0000000..f9bf10f
--- /dev/null
+++ b/src/code_8073CF0.c
@@ -0,0 +1,22 @@
+#include "global.h"
+#include "dungeon_entity.h"
+
+extern void sub_8067110(struct DungeonEntity *);
+extern void sub_80671A0(struct DungeonEntity *);
+extern void sub_8073D14(struct DungeonEntity *);
+
+void sub_8073CF0(struct DungeonEntity *pokemon)
+{
+ sub_8067110(pokemon);
+}
+
+void sub_8073CFC(struct DungeonEntity *pokemon)
+{
+ sub_80671A0(pokemon);
+}
+
+void sub_8073D08(struct DungeonEntity *pokemon)
+{
+ sub_8073D14(pokemon);
+}
+
diff --git a/src/code_8083288.c b/src/code_8083288.c
new file mode 100644
index 0000000..6ea3eb2
--- /dev/null
+++ b/src/code_8083288.c
@@ -0,0 +1,9 @@
+#include "global.h"
+
+extern void sub_8082FE0(u32, u32, u32);
+
+void sub_8083288(u32 r0, u32 r1, u32 r2)
+{
+ sub_8082FE0(r0, r1, r2);
+}
+
diff --git a/src/code_809447C.c b/src/code_809447C.c
new file mode 100644
index 0000000..816bf78
--- /dev/null
+++ b/src/code_809447C.c
@@ -0,0 +1,68 @@
+#include "global.h"
+#include "code_8092334.h"
+#include "item.h"
+#include "moves.h"
+
+struct unkStruct_8113080
+{
+ u8 unk0;
+ u8 *unk4; // some string
+};
+
+extern u8 gUnknown_202DE58[];
+extern u8 gAvailablePokemonNames[];
+extern u8 *gUnknown_811383C[];
+extern struct unkStruct_8113080 gUnknown_8113080[];
+
+struct unkStruct_80928C0
+{
+ u32 unk0;
+ s32 unk4;
+ u8 unk8;
+ u8 unk9;
+};
+
+void sub_80928C0(u8 *buffer, struct PokemonMove *move, struct unkStruct_80928C0 *param_3);
+extern void xxx_format_string(const char *, u8 *, void *, u32);
+
+void sub_809447C(struct unkStruct_8094924 *r0, u8 *r1)
+{
+ RestoreIntegerBits(r0, r1, 0x10);
+ RestoreIntegerBits(r0, r1 + 2, 0x10);
+}
+
+void sub_809449C(struct unkStruct_8094924 *r0, u8 *r1)
+{
+ SaveIntegerBits(r0, r1, 0x10);
+ SaveIntegerBits(r0, r1 + 2, 0x10);
+}
+
+void sub_80944BC(s16 moveID, u8 *arg2)
+{
+ u16 moveID_u16;
+ s32 moveID_s32 = moveID;
+ struct PokemonMove stack;
+
+ if (moveID_s32 < 0x1F4) {
+ // Needed this cast/variable to match
+ moveID_u16 = moveID_s32;
+ sub_8092AA8(&stack, moveID_u16);
+ sub_80928C0(gUnknown_202DE58, &stack, NULL);
+ xxx_format_string(*gUnknown_811383C, arg2, arg2 + 200, 0);
+ } else {
+ strncpy(arg2, gUnknown_8113080[moveID - 0x1F4].unk4, 200);
+ }
+}
+
+u8 sub_8094528(s16 moveID)
+{
+ if(moveID < 0x1F4)
+ {
+ return 1;
+ }
+ else
+ {
+ return gUnknown_8113080[moveID - 0x1F4].unk0;
+ }
+}
+
diff --git a/src/data/thank_you_wonder_mail.h b/src/data/thank_you_wonder_mail.h
new file mode 100644
index 0000000..a6bef4c
--- /dev/null
+++ b/src/data/thank_you_wonder_mail.h
@@ -0,0 +1,177 @@
+ALIGNED(4) const char gUnknown_80DEF04[] = _(" ...Oh?\n"
+ "Something{APOSTROPHE}s gone wrong.");
+
+ALIGNED(4) const char gUnknown_80DEF28[] = " ...Oh? The number of linked\n"
+ "GBA systems is incorrect.\n"
+ "Please try again from the start.";
+
+ALIGNED(4) const u8 gUnknown_80DEF80[]=
+ " ...Oh? It looks like your\n"
+ "friend chose a different mode.\n"
+ "Please try again from the start.";
+
+ALIGNED(4) const u8 gUnknown_80DEFDC[]=
+ " ...Oh? It looks like your\n"
+ "storage space is full. Please clear some\n"
+ "space and try again from the start.";
+
+ALIGNED(4) const u8 gUnknown_80DF044[]= _(
+ " ...Oh?\n"
+ "I think you{APOSTROPHE}ve received this mail before.\n"
+ "You can{APOSTROPHE}t get the same mail twice.");
+
+ALIGNED(4) const u8 gUnknown_80DF0A0[]= _(
+ " ...Oh?\n"
+ "I don{APOSTROPHE}t think you{APOSTROPHE}re eligible to receive\n"
+ "this mail.");
+
+ALIGNED(4) const u8 gUnknown_80DF0E0[]=
+ " ...Oh?\n"
+ "There is no room to receive new mail.\n"
+ "Please delete some mail and try again.";
+
+ALIGNED(4) const u8 gUnknown_80DF138[]= _(
+ " ...Oh? Your friend didn{APOSTROPHE}t\n"
+ "follow through on their side.\n"
+ "Please try again from the start.");
+
+ALIGNED(4) const u8 gUnknown_80DF194[]= _(
+ " Your {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}\n"
+ "has been sent.");
+
+ALIGNED(4) const u8 gUnknown_80DF1C0[]=
+ " ...Oh?\n"
+ "This password appears to be wrong.\n"
+ "Would you like to try again?";
+
+ALIGNED(4) const u8 gUnknown_80DF208[]= _(
+ " ...Oh? This password doesn{APOSTROPHE}t\n"
+ "appear to be for a {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.");
+
+ALIGNED(4) const u8 gUnknown_80DF250[]= _(
+ ": This is the counter for\n"
+ "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.{EXTRA_MSG}"
+ ": Oh{COMMA} hi{COMMA} {COLOR_1 YELLOW_5}%s{END_COLOR_TEXT_1}.\n"
+ "I{APOSTROPHE}ve been waiting for you. You wanted me\n"
+ "to process a {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?{EXTRA_MSG}"
+ ": Let me get on it right away.");
+
+ALIGNED(4) const u8 gUnknown_80DF304[]= _(
+ " Is it OK to send this\n"
+ "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?");
+
+ALIGNED(4) const u8 gUnknown_80DF330[]= _(
+ " Please choose the\n"
+ "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1} that you want to\n"
+ "send to your friend.");
+
+ALIGNED(4) const u8 gUnknown_80DF380[]= _(
+ " OK. Please enter the\n"
+ "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail password{END_COLOR_TEXT_1}.");
+
+ALIGNED(4) const u8 gUnknown_80DF3B4[]= _(
+ " Please give this password\n"
+ "to the friend that rescued your team.{EXTRA_MSG}"
+ " I also must save your\n"
+ "adventure.");
+
+ALIGNED(4) const u8 gUnknown_80DF418[]= _(
+ " OK{COMMA} here is your\n"
+ "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail password{END_COLOR_TEXT_1}.");
+
+ALIGNED(4) const u8 gUnknown_80DF44C[]=
+ " I need to save your\n"
+ "adventure.";
+
+ALIGNED(4) const u8 gUnknown_80DF46C[]= _(
+ " There we go.\n"
+ "I{APOSTROPHE}m all done.{EXTRA_MSG}"
+ " Doesn{APOSTROPHE}t it feel great to\n"
+ "be appreciated for doing something good?\n"
+ "Please keep up your rescue work!");
+
+ALIGNED(4) const u8 gUnknown_80DF4F4[]= _(
+ " A {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1} has\n"
+ "arrived from your friend for your rescue\n"
+ "mission.");
+
+ALIGNED(4) const u8 gUnknown_80DF544[]= _(
+ "{CENTER_ALIGN}Communicating...\n"
+ "{CENTER_ALIGN}Please wait with the power on.\n"
+ "{CENTER_ALIGN}To cancel{COMMA} press {B_BUTTON}.");
+
+ALIGNED(4) const u8 gUnknown_80DF594[]= _(
+ " There. I{APOSTROPHE}ve sent your\n"
+ "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.\n"
+ "I need to save your adventure.");
+
+ALIGNED(4) const u8 gUnknown_80DF5E4[]= _(
+ " Please connect the GBA\n"
+ "systems with a {COLOR_1 LIGHT_BLUE_2}Game Link cable{END_COLOR_TEXT_1}.\n"
+ "Is your friend also ready?");
+
+ALIGNED(4) const u8 gUnknown_80DF63C[]= _(
+ " There{COMMA} all done.\n"
+ "{COLOR_1 YELLOW_5}%s{END_COLOR_TEXT_1}{COMMA} I hope your friend\n"
+ "appreciates your sense of gratitude.");
+
+ALIGNED(4) const u8 gUnknown_80DF694[]= _(
+ " The item you{APOSTROPHE}ve chosen\n"
+ "here can{APOSTROPHE}t be exchanged later.\n"
+ "Are you certain this item is OK?");
+
+ALIGNED(4) const u8 gUnknown_80DF6F0[]= _(
+ " I{APOSTROPHE}ve saved your adventure. ");
+
+ALIGNED(4) const u8 gUnknown_80DF710[]= _(
+ " OK{COMMA} please choose\n"
+ "the item to be sent.");
+
+ALIGNED(4) const u8 gUnknown_80DF73C[]=
+ " ...Oh?\n"
+ "Your storage space is empty.\n"
+ "What would you like to do?";
+
+ALIGNED(4) const u8 gUnknown_80DF77C[]= _(
+ " Would you like to choose\n"
+ "a {COLOR_1 LIGHT_BLUE_2}reward item{END_COLOR_TEXT_1} from storage and\n"
+ "send it with your mail?");
+
+ALIGNED(4) const u8 gUnknown_80DF7D4[]= _(
+ " ...Oh?\n"
+ "You{APOSTROPHE}ve already attached a {COLOR_1 LIGHT_BLUE_2}reward item{END_COLOR_TEXT_1}\n"
+ "to this mail.{EXTRA_MSG}"
+ " I{APOSTROPHE}m sorry{COMMA} but once an item\n"
+ "has been attached to mail{COMMA} it can{APOSTROPHE}t be\n"
+ "exchanged.");
+
+ALIGNED(4) const u8 gUnknown_80DF870[]=
+ " Would you like to send it\n"
+ "again with the item you chose before?";
+
+ALIGNED(4) const u8 gUnknown_80DF8B4[]= _(
+ " ...Oh?\n"
+ "You don{APOSTROPHE}t seem to have a {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.");
+
+ALIGNED(4) const u8 gUnknown_80DF8EC[]= _(
+ " Hello.\n"
+ "I handle {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.\n"
+ "How may I serve you?");
+
+ALIGNED(4) const u8 gUnknown_80DF928[]=
+ " May I help you with\n"
+ "anything else?";
+
+ALIGNED(4) const u8 gUnknown_80DF94C[] =
+ " Please come see me\n"
+ "anytime.";
+
+ALIGNED(4) const u8 gUnknown_80DF96C[] = _(
+ " How would you like to send\n"
+ "your {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?");
+
+ALIGNED(4) const u8 gUnknown_80DF9A4[]= _(
+ " How would you like to\n"
+ "receive your friend{APOSTROPHE}s {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?");
+
+ALIGNED(4) const u8 thank_you_fill[] = "pksdir0";
diff --git a/src/data/wonder_mail_main_menu.h b/src/data/wonder_mail_main_menu.h
new file mode 100644
index 0000000..0f90cda
--- /dev/null
+++ b/src/data/wonder_mail_main_menu.h
@@ -0,0 +1,49 @@
+ALIGNED(4) const char gUnknown_80E7914[] = "There was a communication error.";
+
+ALIGNED(4) const char gUnknown_80E7938[] = "An incorrect number of GBA systems are\n"
+ "connected.\n"
+ "Please redo this process from the start.";
+
+ALIGNED(4) const char gUnknown_80E7994[] = "There is no response from your friend.\n"
+ "Please redo this process from the start.";
+
+ALIGNED(4) const char gUnknown_80E79E4[] = "The sender and receiver appear to be\n"
+ "in different modes.\n"
+ "Please redo the process from the start.";
+
+ALIGNED(4) const char gUnknown_80E7A48[] = _("There is no response from your friend.\n"
+ "Please make sure the sender and receiver\n"
+ "are ready{COMMA} then redo this from the start.");
+
+ALIGNED(4) const char gUnknown_80E7AC4[] = "What would you like to do?";
+
+ALIGNED(4) const char gUnknown_80E7AE0[] = _("How would you like to send your\n"
+ "{COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1}?");
+
+ALIGNED(4) const char gUnknown_80E7B14[] = _("How would you like to receive the\n"
+ "{COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1}?");
+
+ALIGNED(4) const char gUnknown_80E7B48[] = "Your adventure will be saved.";
+
+ALIGNED(4) const char gUnknown_80E7B68[] = _("Your {COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1} was sent.");
+
+ALIGNED(4) const char gUnknown_80E7B88[] = _("The received {COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1} was\n"
+ "added to the {COLOR_1 LIGHT_BLUE_2}Job List{END_COLOR_TEXT_1}.");
+
+ALIGNED(4) const char gUnknown_80E7BC8[] = _("The {COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1} was refused.");
+
+ALIGNED(4) const char gUnknown_80E7BEC[] = _("Connect a {COLOR_1 LIGHT_BLUE_2}Game Link cable{END_COLOR_TEXT_1}.\n"
+ "When you and your friend are ready{COMMA}\n"
+ "you may communicate. ");
+
+ALIGNED(4) const char gUnknown_80E7C48[] = _("{CENTER_ALIGN}In communication...\n"
+ "{CENTER_ALIGN}Please wait with the power on.\n"
+ "{CENTER_ALIGN}To cancel{COMMA} press {B_BUTTON}.");
+
+ALIGNED(4) const char gUnknown_80E7C98[] = _("Please enter the\n"
+ "{COLOR_1 LIGHT_BLUE_2}Wonder Mail password{END_COLOR_TEXT_1}.");
+
+ALIGNED(4) const char gUnknown_80E7CC4[] = "This password is incorrect.\n"
+ "Would you like to enter it again?";
+
+ALIGNED(4) const char wonder_mail_main_fill0[] = "pksdir0";
diff --git a/src/debug.c b/src/debug.c
index 0716330..757af0f 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -19,7 +19,7 @@ ALIGNED(4) const char gFuncFileLineString2[] = "func = '%s'\nfile = '%s' line =
ALIGNED(4) const char debug_fill14[] = "pksdir0";
ALIGNED(4) const char gDebugPrintPrefix[] = " Print ";
-ALIGNED(4) const char debug_fill13[] = "pksdir0";
+ALIGNED(4) static const char debug_fill13[] = "pksdir0";
ALIGNED(4) const char Performance_Text[] = "Performance";
ALIGNED(4) const char MemoryCard_Text[] = "Memory Card";
@@ -34,23 +34,23 @@ ALIGNED(4) const char Ground_Text[] = "Ground";
ALIGNED(4) const char gNotMountText[] = "not mount log system";
-ALIGNED(4) const char debug_fill9[] = "pksdir0";
-ALIGNED(4) const char debug_fill10[] = "pksdir0";
-ALIGNED(4) const char debug_fill11[] = "pksdir0";
-ALIGNED(4) const char debug_fill12[] = "pksdir0";
+ALIGNED(4) static const char debug_fill9[] = "pksdir0";
+ALIGNED(4) static const char debug_fill10[] = "pksdir0";
+ALIGNED(4) static const char debug_fill11[] = "pksdir0";
+ALIGNED(4) static const char debug_fill12[] = "pksdir0";
ALIGNED(4) const char gFatalText[] = "!!!!! Fatal !!!!!\n";
ALIGNED(4) const char gFatalErrorBufferPlaceholder[] = "%s\n";
-ALIGNED(4) const char debug_fill0[] = "pksdir0";
-ALIGNED(4) const char debug_fill1[] = "pksdir0";
-ALIGNED(4) const char debug_fill2[] = "pksdir0";
-ALIGNED(4) const char debug_fill3[] = "pksdir0";
-ALIGNED(4) const char debug_fill4[] = "pksdir0";
-ALIGNED(4) const char debug_fill5[] = "pksdir0";
-ALIGNED(4) const char debug_fill6[] = "pksdir0";
-ALIGNED(4) const char debug_fill7[] = "pksdir0";
-ALIGNED(4) const char debug_fill8[] = "pksdir0";
+ALIGNED(4) static const char debug_fill0[] = "pksdir0";
+ALIGNED(4) static const char debug_fill1[] = "pksdir0";
+ALIGNED(4) static const char debug_fill2[] = "pksdir0";
+ALIGNED(4) static const char debug_fill3[] = "pksdir0";
+ALIGNED(4) static const char debug_fill4[] = "pksdir0";
+ALIGNED(4) static const char debug_fill5[] = "pksdir0";
+ALIGNED(4) static const char debug_fill6[] = "pksdir0";
+ALIGNED(4) static const char debug_fill7[] = "pksdir0";
+ALIGNED(4) static const char debug_fill8[] = "pksdir0";
void NDS_DebugInit(void)
{
diff --git a/src/debug_menu.c b/src/debug_menu.c
index da765a1..376b267 100644
--- a/src/debug_menu.c
+++ b/src/debug_menu.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "debug_menu.h"
+#include "input.h"
#include "main_menu.h"
#include "menu.h"
#include "memory.h"
@@ -26,45 +27,28 @@ const struct UnkTextStruct2 gUnknown_80E7D58 =
NULL
};
-extern const char dungeons_string[];
-extern const char field_string[];
-extern const char field_map_string[];
-extern const char field_script_string[];
-extern const char debug_menu_string[];
-extern const char storage_string[];
-extern const char h_open_string[];
-
-
const struct MenuItem gDebugMenuItems[8] =
{
- {dungeons_string, MENU_DEBUG_MENU_DUNGEONS},
- {field_string, MENU_DEBUG_MENU_FIELD},
- {field_map_string, MENU_DEBUG_MENU_FIELD_MAP},
- {field_script_string, MENU_DEBUG_MENU_FIELD_SCRIPT},
- {debug_menu_string, MENU_DEBUG_MENU_DEBUG_MENU},
- {storage_string, MENU_DEBUG_MENU_STORAGE},
- {h_open_string, MENU_DEBUG_MENU_H_OPEN},
+ {"Dungeons", MENU_DEBUG_MENU_DUNGEONS},
+ {"Field", MENU_DEBUG_MENU_FIELD},
+ {"Field Map", MENU_DEBUG_MENU_FIELD_MAP},
+ {"Field Script", MENU_DEBUG_MENU_FIELD_SCRIPT},
+ {"Debug Menu", MENU_DEBUG_MENU_DEBUG_MENU},
+ {"Storage", MENU_DEBUG_MENU_STORAGE},
+ {"h-open", MENU_DEBUG_MENU_H_OPEN},
{NULL, 10},
};
-ALIGNED(4) const char h_open_string[] = "h-open";
-ALIGNED(4) const char storage_string[] = "Storage";
-ALIGNED(4) const char debug_menu_string[] = "Debug Menu";
-ALIGNED(4) const char field_script_string[] = "Field Script";
-ALIGNED(4) const char field_map_string[] = "Field Map";
-ALIGNED(4) const char field_string[] = "Field";
-ALIGNED(4) const char dungeons_string[] = "Dungeons";
+ALIGNED(4) static const char debug_menu_fill0[] = "pksdir0";
+ALIGNED(4) static const char debug_menu_fill1[] = "pksdir0";
+ALIGNED(4) static const char debug_menu_fill2[] = "pksdir0";
+ALIGNED(4) static const char debug_menu_fill3[] = "pksdir0";
+ALIGNED(4) static const char debug_menu_fill4[] = "pksdir0";
+ALIGNED(4) static const char debug_menu_fill5[] = "pksdir0";
+ALIGNED(4) static const char debug_menu_fill6[] = "pksdir0";
-ALIGNED(4) const char debug_menu_fill0[] = "pksdir0";
-ALIGNED(4) const char debug_menu_fill1[] = "pksdir0";
-ALIGNED(4) const char debug_menu_fill2[] = "pksdir0";
-ALIGNED(4) const char debug_menu_fill3[] = "pksdir0";
-ALIGNED(4) const char debug_menu_fill4[] = "pksdir0";
-ALIGNED(4) const char debug_menu_fill5[] = "pksdir0";
-ALIGNED(4) const char debug_menu_fill6[] = "pksdir0";
-extern void ResetUnusedInputStruct(void);
extern u8 sub_8012FD8(struct DebugMenu *);
extern void sub_8013114(struct DebugMenu *, s32 *);
extern void sub_80976F8(u8);
diff --git a/src/ds_menus.c b/src/ds_menus.c
index 4e53311..42c4d13 100644
--- a/src/ds_menus.c
+++ b/src/ds_menus.c
@@ -12,7 +12,7 @@ u32 UpdateDualSlotMenu(void)
return 0;
}
-void CleanDualSlotMenu()
+void CleanDualSlotMenu(void)
{
}
diff --git a/src/friend_rescue.c b/src/friend_rescue.c
index aacc083..a864e5b 100644
--- a/src/friend_rescue.c
+++ b/src/friend_rescue.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "text.h"
+#include "input.h"
#include "item.h"
#include "team_inventory.h"
#include "friend_rescue.h"
@@ -19,7 +20,6 @@ extern char gAvailablePokemonNames[0x50];
extern struct WonderMailStruct_203B33C *gUnknown_203B33C;
extern u8 sub_8039880(void);
-void ResetUnusedInputStruct(void);
extern void sub_8035300(void);
extern void sub_8035404(u32);
diff --git a/src/items.c b/src/items.c
index 4b5a710..d1cd07b 100644
--- a/src/items.c
+++ b/src/items.c
@@ -5,7 +5,9 @@
#include "team_inventory.h"
#include "random.h"
#include "pokemon.h"
+#include "random.h"
#include "subStruct_203B240.h"
+#include "team_inventory.h"
#include <stddef.h>
@@ -25,7 +27,7 @@ extern u8* gPtrPPD0Text; // ptr to "PP $d0 \0"
extern u32 gUnknown_810A3F0[100];
extern u32 gUnknown_81097E8[4]; // some sort of lookup table (16, 18, 20, 22)
extern u32 gUnknown_81097F8[4]; // some sort of lookup table (17, 19, 21, 23)
-extern u32 gUnknown_810AF50[];
+extern const char *gUnknown_810AF50[];
extern u8 gUnknown_8108F64[0x3f][32]; // some sort of bit lookup table
extern s16 gTypeGummiIQBoost[0x12][NUMBER_OF_GUMMIS];
extern u8 gInvalidItemIDs[0x10];
@@ -1232,7 +1234,7 @@ void SaveItemSlot(struct unkStruct_8094924 *a1, struct ItemSlot *slot)
SaveIntegerBits(a1, &slot->itemIndex, 8);
}
-u32 sub_8091E50(u8 index)
+const char *sub_8091E50(u8 index)
{
return gUnknown_810AF50[index];
}
diff --git a/src/load_screen.c b/src/load_screen.c
index ab092cc..1721bf5 100644
--- a/src/load_screen.c
+++ b/src/load_screen.c
@@ -45,54 +45,12 @@ EWRAM_DATA u32 gUnknown_203B3B8[12];
extern struct unkStruct_203B484 *gUnknown_203B484;
-extern struct UnkTextStruct2 gUnknown_80E75F8;
-extern struct UnkTextStruct2 gUnknown_80E7610;
-extern struct UnkTextStruct2 gUnknown_80E762C;
-extern struct MenuItem gResumeQuicksaveMenuItems[];
-extern struct MenuItem gResumeAdventureMenuItems[];
-extern struct MenuItem gQuitWaitingRescueMenuItems[];
-extern struct MenuItem gDeleteSavePromptMenuItems[];
-extern struct MenuItem gDeleteSaveConfirmMenuItems[];
-extern struct UnkTextStruct2 gUnknown_80E7784;
-
-extern const char No_80E77B4[];
-extern const char Yes_80E77B8[];
-
-const struct MenuItem gLoadScreenYesNoMenu[3] =
-{
- {Yes_80E77B8, 1},
- {No_80E77B4, 2},
- {NULL, 3},
-};
-
-ALIGNED(4) const char No_80E77B4[] = "No";
-ALIGNED(4) const char Yes_80E77B8[] = "Yes";
-
-ALIGNED(4) const char gTeamHeadingText[] = "Team:";
-ALIGNED(4) const char gNameHeadingText[] = "Name:";
-ALIGNED(4) const char gLocationHeadingText[] = "Location:";
-ALIGNED(4) const char gPlayTimeHeadingText[] = "Play time:";
-ALIGNED(4) const char gAdventuresHeadingText[] = "Adventures:";
-ALIGNED(4) const char gHelperHeadingText[] = "Helper:";
-ALIGNED(4) const char gNoTeamNamePlaceholder[] = _("????");
-ALIGNED(4) const char gUnknown_80E7804[] = "%s ";
-ALIGNED(4) const char gNoNamePlaceholder[] = "???";
-ALIGNED(4) const char gQuicksaveDataDeletedText[] = "Quicksave data deleted.";
-ALIGNED(4) const char gLocationUnknownText[] = "Location unknown.";
-ALIGNED(4) const char gPlayTimePlaceholder[] = "%d:%02d:%02d ";
-ALIGNED(4) const char gNumAdventurePlaceholder[] = "%d";
-ALIGNED(4) const char gHelperInfoPlaceholder[] = "%s (%s)";
-ALIGNED(4) const char gNoHelperText[] = "-----";
-ALIGNED(4) const char gClmkpatFileName[] = "clmkpat"; // clmkpat
-ALIGNED(4) const char load_screen_fill[] = "pksdir0";
-
-
u8 IsQuickSave(void);
void DrawLoadScreenText(void);
void sub_80397B4(void);
extern void sub_8035CF4(u32 *, u32, u32);
-extern void SetMenuItems(u32 *, struct UnkTextStruct2 *, u32, struct UnkTextStruct2 *, const struct MenuItem *, u32, u32, u32);
+extern void SetMenuItems(u32 *, struct UnkTextStruct2 *, u32, const struct UnkTextStruct2 *, const struct MenuItem *, u32, u32, u32);
extern u8 sub_8012FD8(u32 *);
extern void sub_8013114(u32 *, u32 *);
extern void sub_8095240(u32);
@@ -119,6 +77,104 @@ extern void xxx_format_string(u8 *, u8 *, u8 *, u32);
extern void SetBGPaletteBufferColorArray(s32, s32);
extern void sub_8007E20(s32, s32, s32, u32, u32, s32, u32);
+const struct UnkTextStruct2 gUnknown_80E75F8 = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ NULL
+};
+
+const struct UnkTextStruct2 gUnknown_80E7610 = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x02, 0x00,
+ 0x1A, 0x0B,
+ 0x0B, 0x00,
+ NULL
+};
+
+const u8 gUnkData_80E7628[] = {0x20, 0x00, 0x00, 0x00};
+
+const struct UnkTextStruct2 gUnknown_80E762C = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x0F, 0x00,
+ 0x13, 0x03,
+ 0x03, 0x00,
+ NULL
+};
+
+const struct MenuItem gResumeQuicksaveMenuItems[3] =
+{
+ {"Resuming from quicksave.", 5},
+ {"Is that OK?", 5},
+ {NULL, 3},
+};
+
+const struct MenuItem gResumeAdventureMenuItems[3] =
+{
+ {"Resuming saved adventure.", 5},
+ {"Is that OK?", 5},
+ {NULL, 3},
+};
+
+const struct MenuItem gQuitWaitingRescueMenuItems[3] =
+{
+ {"Quit awaiting rescue?", 5},
+ {"Is that OK?", 5},
+ {NULL, 3},
+};
+
+const struct MenuItem gDeleteSavePromptMenuItems[3] =
+{
+ {"Your saved data will be", 5},
+ {"deleted. Is that OK?", 5},
+ {NULL, 3},
+};
+
+const struct MenuItem gDeleteSaveConfirmMenuItems[3] =
+{
+ {"Are you sure you want to", 5},
+ {"delete all of your saved data?", 5},
+ {NULL, 3},
+};
+
+const struct UnkTextStruct2 gUnknown_80E7784 =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x17, 0x00, 0x0F, 0x00,
+ 0x05, 0x03,
+ 0x03, 0x00,
+ NULL
+};
+
+const struct MenuItem gLoadScreenYesNoMenu[3] =
+{
+ {"Yes", 1},
+ {"No", 2},
+ {NULL, 3},
+};
+
+ALIGNED(4) const char gTeamHeadingText[] = "Team:";
+ALIGNED(4) const char gNameHeadingText[] = "Name:";
+ALIGNED(4) const char gLocationHeadingText[] = "Location:";
+ALIGNED(4) const char gPlayTimeHeadingText[] = "Play time:";
+ALIGNED(4) const char gAdventuresHeadingText[] = "Adventures:";
+ALIGNED(4) const char gHelperHeadingText[] = "Helper:";
+ALIGNED(4) const char gNoTeamNamePlaceholder[] = _("????");
+ALIGNED(4) const char gUnknown_80E7804[] = "%s ";
+ALIGNED(4) const char gNoNamePlaceholder[] = "???";
+ALIGNED(4) const char gQuicksaveDataDeletedText[] = "Quicksave data deleted.";
+ALIGNED(4) const char gLocationUnknownText[] = "Location unknown.";
+ALIGNED(4) const char gPlayTimePlaceholder[] = "%d:%02d:%02d ";
+ALIGNED(4) const char gNumAdventurePlaceholder[] = "%d";
+ALIGNED(4) const char gHelperInfoPlaceholder[] = "%s (%s)";
+ALIGNED(4) const char gNoHelperText[] = "-----";
+ALIGNED(4) const char gClmkpatFileName[] = "clmkpat"; // clmkpat
+ALIGNED(4) const char load_screen_fill[] = "pksdir0";
void CreateLoadScreen(u32 currMenu)
{
diff --git a/src/main_menu.c b/src/main_menu.c
index 37cd217..30c6642 100644
--- a/src/main_menu.c
+++ b/src/main_menu.c
@@ -1,11 +1,17 @@
#include "global.h"
+#include "text.h"
+#include "menu.h"
+#include "input.h"
+
+#include "adventure_log.h"
#include "debug_menu.h"
+#include "ds_menus.h"
+#include "friend_rescue.h"
+#include "load_screen.h"
#include "main_menu.h"
-#include "adventure_log.h"
-#include "input.h"
-#include "menu.h"
#include "memory.h"
-#include "text.h"
+#include "rescue_password_menu.h"
+#include "save.h"
#include "trade_items_menu.h"
// NOTE: 0x13 and 0x14
@@ -22,47 +28,13 @@
// Deletes the Save
-extern void sub_8094C14(void);
-extern void sub_8099690(u32);
-extern void sub_8036FDC(s32);
-extern void CreateWirelessCommsMenu(void);
-extern void CreateFriendRescueMenu(void);
-extern void CreateDualSlotMenu(void);
-extern void CreateWonderMailMenu(void);
-extern void CreateLoadScreen(u32);
-extern void CreateRescuePasswordMenu(u32);
-extern void CreateSaveMenu(u32);
-extern u32 UpdateMainMenu(void);
-extern s32 UpdateLoadScreenMenu(void);
-extern s32 UpdateFriendRescueMenu(void);
-extern s32 UpdateWonderMailMenu(void);
-extern s32 UpdateDualSlotMenu(void);
-extern s32 UpdateWirelessCommsMenu(void);
-extern s32 UpdateRescuePasswordMenu(void);
-extern s32 sub_80383D4(void);
-extern s32 UpdateSaveMenu(void);
-extern void CleanLoadScreen(void);
-extern void sub_80370D4(void);
-extern void CleanFriendRescueMenu(void);
-extern void CleanWonderMailMenu(void);
-extern void CleanDualSlotMenu(void);
-extern void CleanWirelessCommsMenu(void);
-extern void CleanRescuePasswordMenu(void);
-extern void sub_80383A8(void);
-extern void CleanSaveMenu(void);
-extern u8 sub_8012FD8(u32 *);
-extern void sub_8013114(u32 *, s32 *);
-extern u8 sub_803D0D8();
-extern s32 sub_8011C34();
-extern s32 sub_8095324(u32);
-
-void CleanMainMenu(void);
-void DrawMainMenu(void);
-s32 sub_8035DB4(u32);
-void sub_803623C(void);
-bool8 SetMainMenuText();
-void SetMainMenuItems();
-void sub_8035DA0(void);
+struct unkStruct_Menu
+{
+ // size 0x50;
+ u8 fil0[0x4C];
+ u8 unk4C;
+ u8 fill4D[0x50 - 0x4D];
+};
struct unkStruct_203B34C
{
@@ -89,18 +61,55 @@ EWRAM_DATA struct unkStruct_203B34C *gUnknown_203B34C;
EWRAM_DATA u32 gUnknown_203B350;
EWRAM_DATA u32 gUnknown_203B354; // unused everywhere else except here..
+extern void sub_8094C14(void);
+extern void sub_8099690(u32);
+extern void sub_8036FDC(s32);
+extern void CreateWonderMailMenu(void);
+extern void CreateSaveMenu(u32);
+extern u32 UpdateMainMenu(void);
+extern s32 UpdateWonderMailMenu(void);
+extern s32 sub_80383D4(void);
+extern s32 UpdateSaveMenu(void);
+extern void sub_80370D4(void);
+extern void CleanWonderMailMenu(void);
+extern void sub_80383A8(void);
+extern void CleanSaveMenu(void);
+extern u8 sub_8012FD8(u32 *);
+extern void sub_8013114(u32 *, s32 *);
+extern u8 sub_803D0D8();
+extern s32 sub_8095324(u32);
+extern void sub_8012D60(struct unkStruct_Menu *, const struct MenuItem *, u32, u32, u32, u32);
+extern void sub_8012E04(struct unkStruct_Menu *, const struct MenuItem *, u32, u32, u32, u32);
+
+void CleanMainMenu(void);
+void DrawMainMenu(void);
+s32 sub_8035DB4(u32);
+void sub_803623C(void);
+bool8 SetMainMenuText();
+void SetMainMenuItems();
+void sub_8035DA0(void);
-extern const char NewGame_80E5A20[];
-extern const char AdventureLog_80E5A10[];
-extern const char WonderMail_80E5A54[];
-extern const char Continue_80E5AF0[];
-extern const char DeleteSaveData_80E5ADC[];
-extern const char FriendRescue_80E5ACC[];
-extern const char TradeItems_80E5AC0[];
-extern const char ReviveTeam_80E5C0C[];
-extern const char SendItems_80E5C90[];
-extern const char ReceiveItems_80E5C80[];
-extern const char AwaitingRescue_80E5B7C[];
+static const u8 sUnknown_80E5CE4[];
+static const u8 sUnknown_80E5CE8[];
+static const u8 sUnknown_80E5D24[];
+static const u8 sUnknown_80E5D60[];
+static const u8 sUnknown_80E5D88[];
+static const u8 sUnknown_80E5DB8[];
+static const u8 sUnknown_80E5DCC[];
+static const u8 sUnknown_80E5E08[];
+static const u8 sUnknown_80E5E34[];
+static const u8 sUnknown_80E5EA0[];
+static const u8 sUnknown_80E5E74[];
+static const u8 sUnknown_80E5EF8[];
+static const u8 sUnknown_80E5ED4[];
+static const u8 sUnknown_80E5F58[];
+static const u8 sUnknown_80E5F34[];
+static const u8 sUnknown_80E5FB0[];
+static const u8 sUnknown_80E5F98[];
+static const u8 sUnknown_80E5FE4[];
+static const u8 sUnknown_80E6008[];
+static const u8 sUnknown_80E6048[];
+static const u8 sUnknown_80E6070[];
const struct UnkTextStruct2 gUnknown_80E59A8 = {
0x00, 0x00, 0x00, 0x00,
@@ -111,7 +120,7 @@ const struct UnkTextStruct2 gUnknown_80E59A8 = {
NULL
};
-const char main_menu_fill[] = "pksdir0";
+static const char main_menu_fill[] = "pksdir0";
const struct UnkTextStruct2 gUnknown_80E59C8 = {
0x00, 0x00, 0x00, 0x00,
@@ -133,14 +142,11 @@ const struct UnkTextStruct2 gUnknown_80E59E0 = {
const struct MenuItem gUnknown_80E59F8[] =
{
- {NewGame_80E5A20, MENU_NEW_GAME},
- {AdventureLog_80E5A10, MENU_ADVENTURE_LOG},
+ {"New Game", MENU_NEW_GAME},
+ {"Adventure Log", MENU_ADVENTURE_LOG},
{NULL, 0xffdd},
};
-const char AdventureLog_80E5A10[] = "Adventure Log";
-const char NewGame_80E5A20[] = "New Game";
-
const struct UnkTextStruct2 gUnknown_80E5A29 = {
0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00,
@@ -152,12 +158,10 @@ const struct UnkTextStruct2 gUnknown_80E5A29 = {
const struct MenuItem gUnknown_80E5A44[] =
{
- {WonderMail_80E5A54, MENU_WONDER_MAIL},
+ {"Wonder Mail", MENU_WONDER_MAIL},
{NULL, 0xffdd},
};
-const char WonderMail_80E5A54[] = "Wonder Mail";
-
const struct UnkTextStruct2 gUnknown_80E5A60 = {
0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00,
@@ -178,28 +182,22 @@ const struct UnkTextStruct2 gUnknown_80E5A78 = {
const struct MenuItem gUnknown_80E5A90[] =
{
- {Continue_80E5AF0, MENU_CONTINUE},
- {DeleteSaveData_80E5ADC, MENU_DELETE_SAVE_PROMPT},
- {AdventureLog_80E5A10, MENU_ADVENTURE_LOG},
- {FriendRescue_80E5ACC, MENU_FRIEND_RESCUE},
- {TradeItems_80E5AC0, MENU_TRADE_ITEMS},
+ {"Continue", MENU_CONTINUE},
+ {"Delete Save Data", MENU_DELETE_SAVE_PROMPT},
+ {"Adventure Log", MENU_ADVENTURE_LOG},
+ {"Friend Rescue", MENU_FRIEND_RESCUE},
+ {"Trade Items", MENU_TRADE_ITEMS},
{NULL, 0xffdd},
};
-const char TradeItems_80E5AC0[] = "Trade Items";
-const char FriendRescue_80E5ACC[] = "Friend Rescue";
-const char DeleteSaveData_80E5ADC[] = "Delete Save Data";
-const char Continue_80E5AF0[] = "Continue";
-
-
const struct MenuItem gUnknown_80E5AFC[] =
{
- {Continue_80E5AF0, MENU_CONTINUE},
- {DeleteSaveData_80E5ADC, MENU_DELETE_SAVE_PROMPT},
- {AdventureLog_80E5A10, MENU_ADVENTURE_LOG},
- {FriendRescue_80E5ACC, MENU_FRIEND_RESCUE},
- {TradeItems_80E5AC0, MENU_TRADE_ITEMS},
- {WonderMail_80E5A54, MENU_WONDER_MAIL},
+ {"Continue", MENU_CONTINUE},
+ {"Delete Save Data", MENU_DELETE_SAVE_PROMPT},
+ {"Adventure Log", MENU_ADVENTURE_LOG},
+ {"Friend Rescue", MENU_FRIEND_RESCUE},
+ {"Trade Items", MENU_TRADE_ITEMS},
+ {"Wonder Mail", MENU_WONDER_MAIL},
{NULL, 0xffdd},
};
@@ -214,23 +212,22 @@ const struct UnkTextStruct2 gUnknown_80E5B34 = {
const struct MenuItem gUnknown_80E5B4C[] =
{
- {AwaitingRescue_80E5B7C, MENU_AWAITING_RESCUE},
- {DeleteSaveData_80E5ADC, MENU_DELETE_SAVE_PROMPT},
- {AdventureLog_80E5A10, MENU_ADVENTURE_LOG},
- {FriendRescue_80E5ACC, MENU_FRIEND_RESCUE},
- {TradeItems_80E5AC0, MENU_TRADE_ITEMS},
+ {"Awaiting Rescue", MENU_AWAITING_RESCUE},
+ {"Delete Save Data", MENU_DELETE_SAVE_PROMPT},
+ {"Adventure Log", MENU_ADVENTURE_LOG},
+ {"Friend Rescue", MENU_FRIEND_RESCUE},
+ {"Trade Items", MENU_TRADE_ITEMS},
{NULL, 0xffdd},
};
-const char AwaitingRescue_80E5B7C[] = "Awaiting Rescue";
const struct MenuItem gUnknown_80E5B8C[] =
{
- {AwaitingRescue_80E5B7C, MENU_AWAITING_RESCUE},
- {DeleteSaveData_80E5ADC, MENU_DELETE_SAVE_PROMPT},
- {AdventureLog_80E5A10, MENU_ADVENTURE_LOG},
- {FriendRescue_80E5ACC, MENU_FRIEND_RESCUE},
- {TradeItems_80E5AC0, MENU_TRADE_ITEMS},
- {WonderMail_80E5A54, MENU_WONDER_MAIL},
+ {"Awaiting Rescue", MENU_AWAITING_RESCUE},
+ {"Delete Save Data", MENU_DELETE_SAVE_PROMPT},
+ {"Adventure Log", MENU_ADVENTURE_LOG},
+ {"Friend Rescue", MENU_FRIEND_RESCUE},
+ {"Trade Items", MENU_TRADE_ITEMS},
+ {"Wonder Mail", MENU_WONDER_MAIL},
{NULL, 0xffdd},
};
@@ -245,23 +242,22 @@ const struct UnkTextStruct2 gUnknown_80E5BC4 = {
const struct MenuItem gUnknown_80E5BDC[] =
{
- {ReviveTeam_80E5C0C, MENU_CONTINUE},
- {DeleteSaveData_80E5ADC, MENU_DELETE_SAVE_PROMPT},
- {AdventureLog_80E5A10, MENU_ADVENTURE_LOG},
- {FriendRescue_80E5ACC, MENU_FRIEND_RESCUE},
- {TradeItems_80E5AC0, MENU_TRADE_ITEMS},
+ {"Revive Team", MENU_CONTINUE},
+ {"Delete Save Data", MENU_DELETE_SAVE_PROMPT},
+ {"Adventure Log", MENU_ADVENTURE_LOG},
+ {"Friend Rescue", MENU_FRIEND_RESCUE},
+ {"Trade Items", MENU_TRADE_ITEMS},
{NULL, 0xffdd},
};
-const char ReviveTeam_80E5C0C[] = "Revive Team";
const struct MenuItem gUnknown_80E5C18[] =
{
- {ReviveTeam_80E5C0C, MENU_CONTINUE},
- {DeleteSaveData_80E5ADC, MENU_DELETE_SAVE_PROMPT},
- {AdventureLog_80E5A10, MENU_ADVENTURE_LOG},
- {FriendRescue_80E5ACC, MENU_FRIEND_RESCUE},
- {TradeItems_80E5AC0, MENU_TRADE_ITEMS},
- {WonderMail_80E5A54, MENU_WONDER_MAIL},
+ {"Revive Team", MENU_CONTINUE},
+ {"Delete Save Data", MENU_DELETE_SAVE_PROMPT},
+ {"Adventure Log", MENU_ADVENTURE_LOG},
+ {"Friend Rescue", MENU_FRIEND_RESCUE},
+ {"Trade Items", MENU_TRADE_ITEMS},
+ {"Wonder Mail", MENU_WONDER_MAIL},
{NULL, 0xffdd},
};
@@ -276,46 +272,129 @@ const struct UnkTextStruct2 gUnknown_80E5C50 = {
const struct MenuItem gUnknown_80E5C68[] =
{
- {SendItems_80E5C90, MENU_SEND_ITEMS},
- {ReceiveItems_80E5C80, MENU_RECEIVE_ITEMS},
+ {"Send Items", MENU_SEND_ITEMS},
+ {"Receive Items", MENU_RECEIVE_ITEMS},
{NULL, 0xffdd},
};
-const char ReceiveItems_80E5C80[] = "Receive Items";
-const char SendItems_80E5C90[] = "Send Items";
-
const struct MenuItem gUnknown_80E5C9C[] =
{
- {SendItems_80E5C90, -1},
- {ReceiveItems_80E5C80, MENU_RECEIVE_ITEMS},
+ {"Send Items", -1},
+ {"Receive Items", MENU_RECEIVE_ITEMS},
{NULL, 0xffdd},
};
-extern const struct UnkTextStruct2 gUnknown_80E5CB4;
-extern const struct MenuItem gUnknown_80E5CCC[];
-extern const struct MenuItem gUnknown_80E5D0C[];
-extern const struct MenuItem gUnknown_80E5D48[];
-extern const struct MenuItem gUnknown_80E5DA0[];
-extern const struct MenuItem gUnknown_80E5DF0[];
-extern const struct MenuItem gUnknown_80E5E5C[];
-extern const struct MenuItem gUnknown_80E5EBC[];
-extern const struct MenuItem gUnknown_80E5F1C[];
-extern const struct MenuItem gUnknown_80E5F80[];
-extern const struct MenuItem gUnknown_80E5FCC[];
-extern const struct MenuItem gUnknown_80E6030[];
+const struct UnkTextStruct2 gUnknown_80E5CB4 = {
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x0F, 0x00,
+ 0x1A, 0x03,
+ 0x03, 0x00,
+ NULL
+};
+const struct MenuItem gUnknown_80E5CCC[] =
+{
+ {sUnknown_80E5CE8, 0xffde},
+ {sUnknown_80E5CE4, 0xffde},
+ {NULL, 0xffdd},
+};
+static const u8 sUnknown_80E5CE4[] = " ";
+static const u8 sUnknown_80E5CE8[] = "Start an entirely new adventure.";
-struct unkStruct_Menu
+const struct MenuItem gUnknown_80E5D0C[] =
{
- // size 0x50;
- u8 fil0[0x4C];
- u8 unk4C;
- u8 fill4D[0x50 - 0x4D];
+ {sUnknown_80E5D24, 0xffde},
+ {sUnknown_80E5CE4, 0xffde},
+ {NULL, 0xffdd},
};
-extern void sub_8012D60(struct unkStruct_Menu *, const struct MenuItem *, u32, u32, u32, u32);
-extern void sub_8012E04(struct unkStruct_Menu *, const struct MenuItem *, u32, u32, u32, u32);
+static const u8 sUnknown_80E5D24[] = "Check your career as an adventurer.";
+
+const struct MenuItem gUnknown_80E5D48[] =
+{
+ {sUnknown_80E5D88, 0xffde},
+ {sUnknown_80E5D60, 0xffde},
+ {NULL, 0xffdd},
+};
+
+static const u8 sUnknown_80E5D60[] = _("It won{APOSTROPHE}t be in the release version.");
+static const u8 sUnknown_80E5D88[] = "This is the Debug Mode.";
+
+const struct MenuItem gUnknown_80E5DA0[] =
+{
+ {sUnknown_80E5DCC, 0xffde},
+ {sUnknown_80E5DB8, 0xffde},
+ {NULL, 0xffdd},
+};
+
+static const u8 sUnknown_80E5DB8[] = "you last saved. ";
+static const u8 sUnknown_80E5DCC[] = "Resume your adventure from where";
+
+const struct MenuItem gUnknown_80E5DF0[] = {
+ {sUnknown_80E5E34, 0xFFDE},
+ {sUnknown_80E5E08, 0xFFDE},
+ {0, 0xFFDD}
+};
+
+static const u8 sUnknown_80E5E08[] = _("#C2Beware#R! This will delete it forever!");
+static const u8 sUnknown_80E5E34[] = "This will delete your saved game data.";
+
+const struct MenuItem gUnknown_80E5E5C[] = {
+ {sUnknown_80E5EA0, 0xFFDE},
+ {sUnknown_80E5E74, 0xFFDE},
+ {0, 0xFFDD}
+};
+
+ALIGNED(4) static const u8 sUnknown_80E5E74[] = _("passwords{COMMA} friends may rescue each other.");
+static const u8 sUnknown_80E5EA0[] = "Using a Game Link cable or";
+
+const struct MenuItem gUnknown_80E5EBC[] = {
+ {sUnknown_80E5EF8, 0xFFDE},
+ {sUnknown_80E5ED4, 0xFFDE},
+ {0, 0xFFDD}
+};
+
+static const u8 sUnknown_80E5ED4[] = "trade stored items with a friend.";
+ALIGNED(4) static const u8 sUnknown_80E5EF8[] = _("Using a Game Link cable{COMMA} you can");
+
+const struct MenuItem gUnknown_80E5F1C[] = {
+ {sUnknown_80E5F58, 0xFFDE},
+ {sUnknown_80E5F34, 0xFFDE},
+ {0, 0xFFDD}
+};
+
+static const u8 sUnknown_80E5F34[] = "You can give up waiting for rescue.";
+static const u8 sUnknown_80E5F58[] = "You are awaiting rescue by a friend.";
+
+const struct MenuItem gUnknown_80E5F80[] = {
+ {sUnknown_80E5FB0, 0xFFDE},
+ {sUnknown_80E5F98, 0xFFDE},
+ {0, 0xFFDD}
+};
+
+static const u8 sUnknown_80E5F98[] = "receive Wonder Mail.";
+ALIGNED(4) static const u8 sUnknown_80E5FB0[] = _("Using passwords{COMMA} you can");
+
+const struct MenuItem gUnknown_80E5FCC[] = {
+ {sUnknown_80E6008, 0xFFDE},
+ {sUnknown_80E5FE4, 0xFFDE},
+ {NULL, 0xFFDD}
+};
+
+static const u8 sUnknown_80E5FE4[] = "receive teams from your friends.";
+ALIGNED(4) static const u8 sUnknown_80E6008[] = _("Using the Dual Slot function{COMMA} you can");
+
+const struct MenuItem gUnknown_80E6030[] = {
+ {sUnknown_80E6070, 0xFFDE},
+ {sUnknown_80E6048, 0xFFDE},
+ {NULL, 0xFFDD}
+};
+
+static const u8 sUnknown_80E6048[] = "go on an adventure to unknown worlds.";
+ALIGNED(4) static const u8 sUnknown_80E6070[] = _("Using wireless communication{COMMA} you can");
+static const u8 sMainMenu_fill0[] = "pksdir0";
void InitMainMenu(void)
diff --git a/src/moves.c b/src/moves.c
index ed1f38d..2fcbfd0 100644
--- a/src/moves.c
+++ b/src/moves.c
@@ -2,7 +2,7 @@
#include "moves.h"
#include "file_system.h"
-#include "constants/move_id.h"
+#include "moves.h"
struct MoveDataFile
{
@@ -37,7 +37,6 @@ extern u8 gUnknown_810992C[];
extern void sub_8093F10(struct PokemonMove *, struct PokemonMove *);
extern void sub_80928C0(u8 *, struct PokemonMove *, struct unkStruct_80928C0 *);
-bool8 DoesMoveCharge(u16 move);
extern void ExpandPlaceholdersBuffer(u8 *, u8 *, ...);
void LoadWazaParameters(void)
diff --git a/src/moves_1.c b/src/moves_1.c
index 5a7bf6b..80f28af 100644
--- a/src/moves_1.c
+++ b/src/moves_1.c
@@ -1,7 +1,7 @@
#include "global.h"
#include "code_8092334.h"
+#include "moves.h"
#include "pokemon.h"
-#include "constants/move_id.h"
void SavePokemonMove(struct unkStruct_8094924 *r0, struct PokemonMove *move)
{
diff --git a/src/pokemon_mid.c b/src/pokemon_mid.c
index 791749a..ceb1371 100644
--- a/src/pokemon_mid.c
+++ b/src/pokemon_mid.c
@@ -1,7 +1,8 @@
#include "global.h"
#include "pokemon.h"
-#include "item.h"
#include "file_system.h"
+#include "item.h"
+#include "moves.h"
#include "subStruct_203B240.h"
#include "constants/colors.h"
#include "constants/move_id.h"
@@ -38,7 +39,6 @@ extern void xxx_pokemon2_to_pokemonstruct_808DF44(struct PokemonStruct*, struct
extern u8* sub_8092B18(s16);
extern u8* sub_808E07C(u8* a1, u16* a2);
extern u8* sub_8092B54(s32);
-extern void InitZeroedPPPokemonMove(struct PokemonMove*, u16);
extern u32 sub_8097DF0(char *, struct subStruct_203B240 **);
struct unkStruct_8107654 {
diff --git a/src/post_office_guide.c b/src/post_office_guide.c
index 63470f5..929c2e1 100644
--- a/src/post_office_guide.c
+++ b/src/post_office_guide.c
@@ -38,24 +38,10 @@ struct unkStruct_203B330
EWRAM_DATA struct unkStruct_203B330 *gUnknown_203B330;
-extern const char DeletingMailInfo_Text[];
extern const char GetHelp_Text[];
extern const char GoRescue_Text[];
extern const char FriendRescueInfo_Text[];
-extern const char SendThankYouMail_Text[];
-extern const char ReceiveAOKMail_Text[];
-extern const char SendSOSMail_Text[];
-extern const char GettingHelp_Text[];
-extern const char GetThankYouMail_Text[];
-extern const char SendAOKMail_Text[];
-extern const char LeaveForRescue_Text[];
-extern const char ReceiveSOSMail_Text[];
-extern const char RescueProcedures_Text[];
-extern const char Exit_80EA0EC[];
-
-
-extern const char Cancel_80E0A78[];
extern const char FriendRescue_80E0A80[];
extern const char Delivery_Text[];
extern const char BulletinBoard_Text[];
@@ -104,11 +90,10 @@ const struct MenuItem gPostOfficeHelpStartMenu[] =
{BulletinBoard_Text, BULLETIN_BOARD},
{Delivery_Text, DELIVERY},
{FriendRescue_80E0A80, FRIEND_RESCUE},
- {Cancel_80E0A78, CANCEL},
+ {"Cancel", CANCEL},
{NULL, EXIT}
};
-ALIGNED(4) const char Cancel_80E0A78[] = _("Cancel");
ALIGNED(4) const char FriendRescue_80E0A80[] = _("{COLOR_1 YELLOW}Friend Rescue{END_COLOR_TEXT_1} ");
ALIGNED(4) const char Delivery_Text[] = _("Delivery");
ALIGNED(4) const char BulletinBoard_Text[] = _("Bulletin Board");
@@ -119,13 +104,11 @@ const struct MenuItem gPostOfficeHelpFriendRescueMenu[] =
{FriendRescueInfo_Text, FRIEND_RESCUE_INFO},
{GoRescue_Text, GO_RESCUE},
{GetHelp_Text, GET_HELP_MENU},
- {DeletingMailInfo_Text, DELETING_MAIL},
- {Exit_80EA0EC, EXIT},
+ {"Deleting Mail Info", DELETING_MAIL},
+ {"Exit", EXIT},
{NULL, EXIT}
};
-ALIGNED(4) const char Exit_80EA0EC[] = _("Exit");
-ALIGNED(4) const char DeletingMailInfo_Text[] = _("Deleting Mail Info");
ALIGNED(4) const char GetHelp_Text[] = _("{COLOR_1 YELLOW}Get help{END_COLOR_TEXT_1} ");
ALIGNED(4) const char GoRescue_Text[] = _("{COLOR_1 YELLOW}Go rescue{END_COLOR_TEXT_1} ");
ALIGNED(4) const char FriendRescueInfo_Text[] = _("Friend Rescue Info");
@@ -133,37 +116,25 @@ ALIGNED(4) const char FriendRescueInfo_Text[] = _("Friend Rescue Info");
const struct MenuItem gPostOfficeHelpGoRescueMenu[] =
{
- {RescueProcedures_Text, RESCUE_PROCEDURES},
- {ReceiveSOSMail_Text, RECEIVE_SOS_MAIL},
- {LeaveForRescue_Text, LEAVE_FOR_RESCUE},
- {SendAOKMail_Text, SEND_AOK_MAIL},
- {GetThankYouMail_Text, GET_THANK_YOU_MAIL},
- {Exit_80EA0EC, EXIT},
+ {"Rescue Procedures", RESCUE_PROCEDURES},
+ {"Receive SOS Mail", RECEIVE_SOS_MAIL},
+ {"Leave for Rescue", LEAVE_FOR_RESCUE},
+ {"Send A-OK Mail", SEND_AOK_MAIL},
+ {"Get Thank-You Mail", GET_THANK_YOU_MAIL},
+ {"Exit", EXIT},
{NULL, EXIT}
};
-ALIGNED(4) const char GetThankYouMail_Text[] = _("Get Thank-You Mail");
-ALIGNED(4) const char SendAOKMail_Text[] = _("Send A-OK Mail");
-ALIGNED(4) const char LeaveForRescue_Text[] = _("Leave for Rescue");
-ALIGNED(4) const char ReceiveSOSMail_Text[] = _("Receive SOS Mail");
-ALIGNED(4) const char RescueProcedures_Text[] = _("Rescue Procedures");
-
-
const struct MenuItem gPostOfficeHelpGetHelpMenu[] =
{
- {GettingHelp_Text, GETTING_HELP},
- {SendSOSMail_Text, SEND_SOS_MAIL},
- {ReceiveAOKMail_Text, RECEIVE_AOK_MAIL},
- {SendThankYouMail_Text, SEND_THANK_YOU_MAIL},
- {Exit_80EA0EC, EXIT},
+ {"Getting Help", GETTING_HELP},
+ {"Send SOS Mail", SEND_SOS_MAIL},
+ {"Receive A-OK Mail", RECEIVE_AOK_MAIL},
+ {"Send Thank-You Mail", SEND_THANK_YOU_MAIL},
+ {"Exit", EXIT},
{NULL, EXIT}
};
-ALIGNED(4) const char SendThankYouMail_Text[] = _("Send Thank-You Mail");
-ALIGNED(4) const char ReceiveAOKMail_Text[] = _("Receive A-OK Mail");
-ALIGNED(4) const char SendSOSMail_Text[] = _("Send SOS Mail");
-ALIGNED(4) const char GettingHelp_Text[] = _("Getting Help");
-
#include "data/pelipper_help_guide_dialogue.h"
ALIGNED(4) const u8 wonder_mail_fill[] = _("pksdir0");
diff --git a/src/thank_you_wonder_mail.c b/src/thank_you_wonder_mail.c
index 22e1467..7e419b2 100644
--- a/src/thank_you_wonder_mail.c
+++ b/src/thank_you_wonder_mail.c
@@ -69,29 +69,16 @@ const struct UnkTextStruct2 gUnknown_80DED60 =
NULL
};
-extern const u8 Confirm_80DED98[];
-extern const u8 Info_80DED90[];
-extern const u8 SendThankYou_Text[];
-extern const u8 GetThankYou_Text[];
-extern const u8 Cancel_80DEDD8[];
-extern const u8 GameLinkCable_Text[];
-extern const u8 Password_Text[];
-extern const u8 Yes_80DEE5C[];
-extern const u8 No_80DEE78[];
extern const u8 SendItem_Text[];
extern const u8 DontSendItem_Text[];
-extern const u8 SendWOItem_Text[];
const struct MenuItem gUnknown_80DED78[3] =
{
- {Confirm_80DED98, 0xB},
- {Info_80DED90, 0xC},
+ {"Confirm", 0xB},
+ {"Info", 0xC},
{NULL, 0x0},
};
-ALIGNED(4) const u8 Info_80DED90[] = "Info";
-ALIGNED(4) const u8 Confirm_80DED98[] = "Confirm";
-
// Unused
const struct UnkTextStruct2 gUnknown_80DEDA0 =
{
@@ -106,251 +93,61 @@ const struct UnkTextStruct2 gUnknown_80DEDA0 =
const struct MenuItem gThankYouMailMainMenuItems[4] =
{
- {SendThankYou_Text, 0x1},
- {GetThankYou_Text, 0x2},
- {Cancel_80DEDD8, 0x0},
+ {"Send Thank-You Mail", 0x1},
+ {"Get Thank-You Mail", 0x2},
+ {"Cancel", 0x0},
{NULL, 0x0},
};
-ALIGNED(4) const u8 Cancel_80DEDD8[] = "Cancel";
-ALIGNED(4) const u8 GetThankYou_Text[] = "Get Thank-You Mail";
-ALIGNED(4) const u8 SendThankYou_Text[] = "Send Thank-You Mail";
-
const struct MenuItem gUnknown_80DEE08[4] =
{
- {GameLinkCable_Text, WONDER_MAIL_GAME_LINK},
- {Password_Text, WONDER_MAIL_PASSWORD},
- {Cancel_80DEDD8, 0x0},
+ {"Game Link cable", WONDER_MAIL_GAME_LINK},
+ {"Password", WONDER_MAIL_PASSWORD},
+ {"Cancel", 0x0},
{NULL, 0x0},
};
-ALIGNED(4) const u8 Password_Text[] = "Password";
-ALIGNED(4) const u8 GameLinkCable_Text[] = "Game Link cable";
-
const struct MenuItem gUnknown_80DEE44[3] =
{
- {Yes_80DEE5C, 0x7},
- {Cancel_80DEDD8, 0x0},
+ {"Yes", 0x7},
+ {"Cancel", 0x0},
{NULL, 0x0},
};
-ALIGNED(4) const u8 Yes_80DEE5C[] = "Yes";
-
-
const struct MenuItem gUnknown_80DEE60[3] =
{
- {Yes_80DEE5C, 0x7},
- {No_80DEE78, 0x8},
+ {"Yes", 0x7},
+ {"No", 0x8},
{NULL, 0x0},
};
-ALIGNED(4) const u8 No_80DEE78[] = "No";
-
const struct MenuItem gUnknown_80DEE7C[4] =
{
{SendItem_Text, 0x9},
{DontSendItem_Text, 0xA},
- {Cancel_80DEDD8, 0x0},
+ {"Cancel", 0x0},
{NULL, 0x0},
};
-ALIGNED(4) const u8 DontSendItem_Text[] = _("Don{APOSTROPHE}t Send Item");
-ALIGNED(4) const u8 SendItem_Text[] = "Send Item";
+ALIGNED(4) static const u8 DontSendItem_Text[] = _("Don{APOSTROPHE}t Send Item");
+ALIGNED(4) static const u8 SendItem_Text[] = "Send Item";
const struct MenuItem gUnknown_80DEEBC[3] =
{
- {SendWOItem_Text, 0xA},
- {Cancel_80DEDD8, 0x0},
+ {"Send w/o Item", 0xA},
+ {"Cancel", 0x0},
{NULL, 0x0},
};
-ALIGNED(4) const u8 SendWOItem_Text[] = "Send w/o Item";
-
const struct MenuItem gUnknown_80DEEE4[4] =
{
- {Yes_80DEE5C, 0x7},
- {No_80DEE78, 0x8},
- {Cancel_80DEDD8, 0x0},
+ {"Yes", 0x7},
+ {"No", 0x8},
+ {"Cancel", 0x0},
{NULL, 0x0},
};
-ALIGNED(4) const char gUnknown_80DEF04[] = _(" ...Oh?\n"
- "Something{APOSTROPHE}s gone wrong.");
-
-ALIGNED(4) const char gUnknown_80DEF28[] = " ...Oh? The number of linked\n"
- "GBA systems is incorrect.\n"
- "Please try again from the start.";
-
-ALIGNED(4) const u8 gUnknown_80DEF80[]=
- " ...Oh? It looks like your\n"
- "friend chose a different mode.\n"
- "Please try again from the start.";
-
-ALIGNED(4) const u8 gUnknown_80DEFDC[]=
- " ...Oh? It looks like your\n"
- "storage space is full. Please clear some\n"
- "space and try again from the start.";
-
-ALIGNED(4) const u8 gUnknown_80DF044[]= _(
- " ...Oh?\n"
- "I think you{APOSTROPHE}ve received this mail before.\n"
- "You can{APOSTROPHE}t get the same mail twice.");
-
-ALIGNED(4) const u8 gUnknown_80DF0A0[]= _(
- " ...Oh?\n"
- "I don{APOSTROPHE}t think you{APOSTROPHE}re eligible to receive\n"
- "this mail.");
-
-ALIGNED(4) const u8 gUnknown_80DF0E0[]=
- " ...Oh?\n"
- "There is no room to receive new mail.\n"
- "Please delete some mail and try again.";
-
-ALIGNED(4) const u8 gUnknown_80DF138[]= _(
- " ...Oh? Your friend didn{APOSTROPHE}t\n"
- "follow through on their side.\n"
- "Please try again from the start.");
-
-ALIGNED(4) const u8 gUnknown_80DF194[]= _(
- " Your {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}\n"
- "has been sent.");
-
-ALIGNED(4) const u8 gUnknown_80DF1C0[]=
- " ...Oh?\n"
- "This password appears to be wrong.\n"
- "Would you like to try again?";
-
-ALIGNED(4) const u8 gUnknown_80DF208[]= _(
- " ...Oh? This password doesn{APOSTROPHE}t\n"
- "appear to be for a {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.");
-
-ALIGNED(4) const u8 gUnknown_80DF250[]= _(
- ": This is the counter for\n"
- "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.{EXTRA_MSG}"
- ": Oh{COMMA} hi{COMMA} {COLOR_1 YELLOW_5}%s{END_COLOR_TEXT_1}.\n"
- "I{APOSTROPHE}ve been waiting for you. You wanted me\n"
- "to process a {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?{EXTRA_MSG}"
- ": Let me get on it right away.");
-
-ALIGNED(4) const u8 gUnknown_80DF304[]= _(
- " Is it OK to send this\n"
- "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?");
-
-ALIGNED(4) const u8 gUnknown_80DF330[]= _(
- " Please choose the\n"
- "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1} that you want to\n"
- "send to your friend.");
-
-ALIGNED(4) const u8 gUnknown_80DF380[]= _(
- " OK. Please enter the\n"
- "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail password{END_COLOR_TEXT_1}.");
-
-ALIGNED(4) const u8 gUnknown_80DF3B4[]= _(
- " Please give this password\n"
- "to the friend that rescued your team.{EXTRA_MSG}"
- " I also must save your\n"
- "adventure.");
-
-ALIGNED(4) const u8 gUnknown_80DF418[]= _(
- " OK{COMMA} here is your\n"
- "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail password{END_COLOR_TEXT_1}.");
-
-ALIGNED(4) const u8 gUnknown_80DF44C[]=
- " I need to save your\n"
- "adventure.";
-
-ALIGNED(4) const u8 gUnknown_80DF46C[]= _(
- " There we go.\n"
- "I{APOSTROPHE}m all done.{EXTRA_MSG}"
- " Doesn{APOSTROPHE}t it feel great to\n"
- "be appreciated for doing something good?\n"
- "Please keep up your rescue work!");
-
-ALIGNED(4) const u8 gUnknown_80DF4F4[]= _(
- " A {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1} has\n"
- "arrived from your friend for your rescue\n"
- "mission.");
-
-ALIGNED(4) const u8 gUnknown_80DF544[]= _(
- "{CENTER_ALIGN}Communicating...\n"
- "{CENTER_ALIGN}Please wait with the power on.\n"
- "{CENTER_ALIGN}To cancel{COMMA} press {B_BUTTON}.");
-
-ALIGNED(4) const u8 gUnknown_80DF594[]= _(
- " There. I{APOSTROPHE}ve sent your\n"
- "{COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.\n"
- "I need to save your adventure.");
-
-ALIGNED(4) const u8 gUnknown_80DF5E4[]= _(
- " Please connect the GBA\n"
- "systems with a {COLOR_1 LIGHT_BLUE_2}Game Link cable{END_COLOR_TEXT_1}.\n"
- "Is your friend also ready?");
-
-ALIGNED(4) const u8 gUnknown_80DF63C[]= _(
- " There{COMMA} all done.\n"
- "{COLOR_1 YELLOW_5}%s{END_COLOR_TEXT_1}{COMMA} I hope your friend\n"
- "appreciates your sense of gratitude.");
-
-ALIGNED(4) const u8 gUnknown_80DF694[]= _(
- " The item you{APOSTROPHE}ve chosen\n"
- "here can{APOSTROPHE}t be exchanged later.\n"
- "Are you certain this item is OK?");
-
-ALIGNED(4) const u8 gUnknown_80DF6F0[]= _(
- " I{APOSTROPHE}ve saved your adventure. ");
-
-ALIGNED(4) const u8 gUnknown_80DF710[]= _(
- " OK{COMMA} please choose\n"
- "the item to be sent.");
-
-ALIGNED(4) const u8 gUnknown_80DF73C[]=
- " ...Oh?\n"
- "Your storage space is empty.\n"
- "What would you like to do?";
-
-ALIGNED(4) const u8 gUnknown_80DF77C[]= _(
- " Would you like to choose\n"
- "a {COLOR_1 LIGHT_BLUE_2}reward item{END_COLOR_TEXT_1} from storage and\n"
- "send it with your mail?");
-
-ALIGNED(4) const u8 gUnknown_80DF7D4[]= _(
- " ...Oh?\n"
- "You{APOSTROPHE}ve already attached a {COLOR_1 LIGHT_BLUE_2}reward item{END_COLOR_TEXT_1}\n"
- "to this mail.{EXTRA_MSG}"
- " I{APOSTROPHE}m sorry{COMMA} but once an item\n"
- "has been attached to mail{COMMA} it can{APOSTROPHE}t be\n"
- "exchanged.");
-
-ALIGNED(4) const u8 gUnknown_80DF870[]=
- " Would you like to send it\n"
- "again with the item you chose before?";
-
-ALIGNED(4) const u8 gUnknown_80DF8B4[]= _(
- " ...Oh?\n"
- "You don{APOSTROPHE}t seem to have a {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.");
-
-ALIGNED(4) const u8 gUnknown_80DF8EC[]= _(
- " Hello.\n"
- "I handle {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}.\n"
- "How may I serve you?");
-
-ALIGNED(4) const u8 gUnknown_80DF928[]=
- " May I help you with\n"
- "anything else?";
-
-ALIGNED(4) const u8 gUnknown_80DF94C[] =
- " Please come see me\n"
- "anytime.";
-
-ALIGNED(4) const u8 gUnknown_80DF96C[] = _(
- " How would you like to send\n"
- "your {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?");
-
-ALIGNED(4) const u8 gUnknown_80DF9A4[]= _(
- " How would you like to\n"
- "receive your friend{APOSTROPHE}s {COLOR_1 LIGHT_BLUE_2}Thank-You Mail{END_COLOR_TEXT_1}?");
-
-ALIGNED(4) const u8 thank_you_fill[] = "pksdir0";
+#include "data/thank_you_wonder_mail.h"
extern s32 sub_80953D4(u32);
diff --git a/src/wonder_mail.c b/src/wonder_mail.c
index fd5e1df..0844a96 100644
--- a/src/wonder_mail.c
+++ b/src/wonder_mail.c
@@ -22,14 +22,10 @@ extern u32 sub_8031050();
extern void sub_80310B4();
extern u32 sub_8095350();
extern u8 sub_80A2824(u8);
-
-#include "data/wonder_mail_1.h"
-
extern u8 sub_809539C(u32, u32);
extern char gUnknown_202E5D8[0x50];
extern char gAvailablePokemonNames[0x50];
-extern struct MenuItem gUnknown_80DDA48[];
extern s32 sub_8095190(void);
extern u32 sub_8095324(u32);
@@ -51,7 +47,7 @@ extern void sub_803092C(void);
extern u32 sub_80154F0();
extern u32 sub_8039068(u32, u8 *r1, u8 *r0);
-extern void sub_8014248(const char *r0, u32, u32, struct MenuItem *r4, u32, u32, u32, void *r5, u32);
+extern void sub_8014248(const char *r0, u32, u32, const struct MenuItem *r4, u32, u32, u32, void *r5, u32);
extern void sub_8095274(u32);
extern void sub_80155F0();
extern void sub_80951BC(u8 *r0);
@@ -68,31 +64,15 @@ extern u8 sub_8024108(u32);
extern u32 sub_8031DCC();
extern void sub_8031E10();
extern void sub_8031E00();
-extern u16 gUnknown_80E5990[];
extern s32 sub_8001658(u32, u32);
-extern u32 gUnknown_80E4A40[];
extern u8 sub_8099B94();
-
extern void sub_8099A5C(u32, u32, u32*);
extern void sub_8099AFC(u32, u32, u32*);
extern void ResetUnusedInputStruct();
extern void sub_8099690(u32);
-
-
extern void sub_8031E10(void);
extern void sub_803084C(void);
extern void sub_8030DE4();
-extern u8 gUnknown_80DDAE4[];
-extern struct MenuItem gUnknown_80DDAA0[];
-extern struct MenuItem gUnknown_80DDA80[];
-extern struct MenuItem gUnknown_80DDAFC[];
-extern struct MenuItem gUnknown_80DDB60[];
-extern struct MenuItem gUnknown_80DDA64[];
-extern struct MenuItem gUnknown_80DDB24[];
-extern struct MenuItem gUnknown_80DD9EC[];
-extern u8 gUnknown_80DDACC[];
-extern struct MenuItem gUnknown_80DD970[];
-
extern void nullsub_23(u32);
extern s32 sub_8037D64(u32, void *, void *);
extern s32 sub_80381F4(u32, void *, void *);
@@ -108,7 +88,7 @@ extern u32 sub_8023CE8(void);
extern u32 sub_8030894(void);
extern void sub_8030F58(u32);
extern void sub_8023DA4(void);
-extern void SetMenuItems(void *, struct UnkTextStruct2 *, u32, u8 *, struct MenuItem *, u32, u32, u32);
+extern void SetMenuItems(void *, struct UnkTextStruct2 *, u32, const struct UnkTextStruct2 *, const struct MenuItem *, u32, u32, u32);
extern void sub_8029B34(void);
extern void sub_8029AD8(void);
extern void sub_8029AF4(void);
@@ -168,6 +148,107 @@ extern void sub_80310B4(void);
extern void sub_8030DE4(void);
extern void sub_802453C(void);
+extern const u8 DontSendPokemon_80DDB80[];
+extern const u8 SendPokemon_80DDB98[];
+extern const u8 SendWOPokemon[];
+
+const struct MenuItem gUnknown_80DD970[] =
+{
+ {"Receive SOS Mail", 0x0},
+ {"Leave for Rescue", 0x1},
+ {"Send A-OK Mail", 0x2},
+ {"Delete Mail", 0x3},
+ {"Cancel", 0xA},
+ {NULL, 0xA}
+};
+
+const struct MenuItem gUnknown_80DD9EC[] =
+{
+ {"Delete SOS Mail", 0x5},
+ {"Delete A-OK Mail", 0x6},
+ {"Delete All Mail", 0x7},
+ {"Cancel", 0xA},
+ {NULL, 0xA}
+};
+
+const struct MenuItem gUnknown_80DDA48[] =
+{
+ {"Yes", 0x8},
+ {"Cancel", 0xA},
+ {NULL, 0xA}
+};
+
+const struct MenuItem gUnknown_80DDA64[] =
+{
+ {"Yes", 0x8},
+ {"No", 0x9},
+ {NULL, 0xA}
+};
+
+const struct MenuItem gUnknown_80DDA80[] =
+{
+ {"Yes", 0x8},
+ {"No", 0x9},
+ {"Cancel", 0xA},
+ {NULL, 0xA}
+};
+
+const struct MenuItem gUnknown_80DDAA0[] =
+{
+ {SendWOPokemon, 0x12},
+ {"Cancel", 0xA},
+ {NULL, 0xA},
+};
+
+ALIGNED(4) const u8 SendWOPokemon[] = _("Send w/o Pokémon");
+
+const struct UnkTextStruct2 gUnknown_80DDACC =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x16, 0x00, 0x07, 0x00,
+ 0x06, 0x04,
+ 0x04, 0x00,
+ NULL
+};
+
+const struct UnkTextStruct2 gUnknown_80DDAE4 =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x16, 0x00, 0x06, 0x00,
+ 0x06, 0x04,
+ 0x04, 0x00,
+ NULL
+};
+
+const struct MenuItem gUnknown_80DDAFC[] =
+{
+ {"Confirm", 0xB},
+ {"Info", 0xC},
+ {NULL, 0xA},
+};
+
+const struct MenuItem gUnknown_80DDB24[] =
+{
+ {"Game Link cable", 0xD},
+ {"Password", 0xF},
+ {"Cancel", 0xA},
+ {NULL, 0xA},
+};
+
+const struct MenuItem gUnknown_80DDB60[] =
+{
+ {SendPokemon_80DDB98, 0x11},
+ {DontSendPokemon_80DDB80, 0x12},
+ {"Cancel", 0xA},
+ {NULL, 0xA},
+};
+
+ALIGNED(4) const u8 DontSendPokemon_80DDB80[] = _("Don{APOSTROPHE}t Send Pokémon");
+ALIGNED(4) const u8 SendPokemon_80DDB98[] = _("Send Pokémon");
+
+#include "data/wonder_mail_1.h"
u32 sub_8027F88(void)
@@ -457,7 +538,7 @@ void sub_8028348(void)
break;
case 0x34:
sub_8006518(gUnknown_203B2C0->unk35C);
- SetMenuItems(&gUnknown_203B2C0->unk21C, gUnknown_203B2C0->unk35C, 3, gUnknown_80DDAE4, gUnknown_80DDAFC, 1, 0, 0);
+ SetMenuItems(&gUnknown_203B2C0->unk21C, gUnknown_203B2C0->unk35C, 3, &gUnknown_80DDAE4, gUnknown_80DDAFC, 1, 0, 0);
sub_8023DA4();
sub_8035CF4(&gUnknown_203B2C0->unk21C, 3, 1);
break;
@@ -619,7 +700,7 @@ void sub_8028348(void)
case 0x20:
case 0x2B:
sub_8006518(gUnknown_203B2C0->unk35C);
- SetMenuItems(&gUnknown_203B2C0->unk21C, gUnknown_203B2C0->unk35C, 3, gUnknown_80DDACC, gUnknown_80DDAFC, 1, 0, 0);
+ SetMenuItems(&gUnknown_203B2C0->unk21C, gUnknown_203B2C0->unk35C, 3, &gUnknown_80DDACC, gUnknown_80DDAFC, 1, 0, 0);
sub_803092C();
sub_8035CF4(&gUnknown_203B2C0->unk21C, 3, 1);
break;
diff --git a/src/wonder_mail_2.c b/src/wonder_mail_2.c
index 3ce4aa2..816dba2 100644
--- a/src/wonder_mail_2.c
+++ b/src/wonder_mail_2.c
@@ -119,14 +119,6 @@ extern void sub_802BB28(void);
extern void sub_8013E54(void);
extern s32 sub_8012A64(u32 *, u32);
-extern struct UnkTextStruct2 gUnknown_80DFBEC;
-
-extern struct UnkTextStruct2 gUnknown_80DFBD0;
-
-extern struct UnkTextStruct2 gUnknown_80DFC34;
-
-extern struct UnkTextStruct2 gUnknown_80DFC18;
-
extern struct unkStruct_203B2C8 *gUnknown_203B2C8;
extern void sub_8014248(const char *r0, u32, u32, const struct MenuItem *r4, u32, u32, u32, struct OpenedFile **r5, u32);
@@ -135,8 +127,6 @@ extern void sub_80920D8(u8 *buffer);
extern void sub_8097790(void);
extern char gUnknown_202E5D8[0x50];
extern char gAvailablePokemonNames[0x50];
-extern u8 gUnknown_80DFC4C[];
-extern u8 gUnknown_80DFC50[];
extern u32 sub_802F298(void);
extern void sub_802F2C0(void);
extern u8 sub_8099394(u8 *);
@@ -158,15 +148,11 @@ extern u8 sub_80023E4(u32);
extern void nullsub_131(void);
extern void sub_802ABF8(void);
-extern u8 gUnknown_80DFC04[];
-extern u8 gUnknown_80DFBE8[];
-extern struct UnkTextStruct2 gUnknown_80DFC74;
-extern struct UnkTextStruct2 gUnknown_80DFC5C;
extern void sub_8008C54(u32);
extern void sub_80073B8(u32);
extern void sub_802BC7C(void);
extern void sub_80073E0(u32);
-extern void xxx_call_draw_string(s32 x, u32 y, u8 *, u32 , u32);
+extern void xxx_call_draw_string(s32 x, u32 y, const u8 *, u32 , u32);
extern void sub_8012BC4(u32 x, u32 y, u32, u32, u32, u32);
extern void xxx_format_and_draw(u32, u32, const u8 *, u32, u32);
extern void sub_803B6B0(u32, u32, u32, u32);
@@ -182,9 +168,8 @@ extern void sub_8012D34(struct UnkTextStruct2 *, u32);
extern s32 CountEmptyMailSlots(void);
extern void sub_8013848(u32 *, s32, u32, u32);
-ALIGNED(4) const char gUnknown_80DF9F0[] = "????";
+ALIGNED(4) const char gRescueTeamNamePlaceholder[] = "????";
-// NOTE: had to be pre-proc'd to match
ALIGNED(4) const char gUnknown_80DF9F8[] = _(
" Oh{COMMA} hello!\n"
"Your rescue mission went well{COMMA} didn{APOSTROPHE}t it?\n"
@@ -209,7 +194,102 @@ ALIGNED(4) const char gUnknown_80DFB14[] = _(
ALIGNED(4) const char wonder_mail_2_fill[] = "pksdir0";
+const struct UnkTextStruct2 gUnknown_80DFBD0 =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ NULL
+};
+
+const u8 gUnknown_80DFBE8[] = { 0x01, 0x00, 0x0C, 0x00 };
+
+const struct UnkTextStruct2 gUnknown_80DFBEC =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x02, 0x00,
+ 0x18, 0x0E,
+ 0x0E, 0x00,
+ gUnknown_80DFBE8
+};
+
+ALIGNED(4) const u8 gUnknown_80DFC04[] = "News List";
+ALIGNED(4) static const char wonder_mail_2_fill1[] = "pksdir0";
+
+const struct UnkTextStruct2 gUnknown_80DFC18 =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ NULL
+};
+
+const u8 gUnkData_80DFC30[] = { 0x01, 0x00, 0x16, 0x00 };
+
+const struct UnkTextStruct2 gUnknown_80DFC34 =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x02, 0x00,
+ 0x1A, 0x10,
+ 0x10, 0x00,
+ gUnkData_80DFC30
+};
+
+ALIGNED(4) const u8 gUnknown_80DFC4C[] = "She";
+ALIGNED(4) const u8 gUnknown_80DFC50[] = "He";
+ALIGNED(4) static const char wonder_mail_2_fill2[] = "pksdir0";
+
+const struct UnkTextStruct2 gUnknown_80DFC5C =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ NULL
+};
+
+const struct UnkTextStruct2 gUnknown_80DFC74 =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x02, 0x00,
+ 0x18, 0x0E,
+ 0x0E, 0x00,
+ NULL
+};
+
+ALIGNED(4) const u8 gMailboxText[] = "Mailbox";
+ALIGNED(4) static const char wonder_mail_2_fill3[] = "pksdir0";
+
+const struct UnkTextStruct2 gUnknown_80DFC9C =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,
+ NULL
+};
+
+const struct UnkTextStruct2 gUnknown_80DFCB4 =
+{
+ 0x00, 0x00, 0x00, 0x00,
+ 0x06, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x02, 0x00,
+ 0x18, 0x0E,
+ 0x0E, 0x00,
+ NULL
+};
+ALIGNED(4) const u8 gBulletinBoardText[] = "Bulletin Board";
+ALIGNED(4) static const char wonder_mail_2_fill4[] = "pksdir0";
u32 sub_802B2D4(void)
{
@@ -291,7 +371,7 @@ void sub_802B3E0(void)
}
else {
// Copy "????" to buffer
- strcpy(teamNameBuffer,gUnknown_80DF9F0);
+ strcpy(teamNameBuffer,gRescueTeamNamePlaceholder);
}
// Print and expand placeholders?
ExpandPlaceholdersBuffer(gUnknown_203B2C8->teamName,gUnknown_80DF9F8,teamNameBuffer);
diff --git a/src/wonder_mail_main_menu.c b/src/wonder_mail_main_menu.c
index ed6ebbe..06fdb54 100644
--- a/src/wonder_mail_main_menu.c
+++ b/src/wonder_mail_main_menu.c
@@ -25,105 +25,41 @@
#define PASSWORD_ENTRY_SCREEN 18
extern const char Cancel_80E7D24[];
-extern const char Cancel_80E78B4[];
extern const char Yes_80E7D2C[];
-extern const char Yes_80E7910[];
-extern const char GameLinkCable_80E78C8[];
-extern const char Password_80E78BC[];
-
-extern const char Receive_80E7884[];
-extern const char Send_80E788C[];
const struct MenuItem gSelectWonderMailModeMainMenuItems[3] =
{
- {Send_80E788C, WONDER_MAIL_MODE_SEND},
- {Receive_80E7884, WONDER_MAIL_MODE_RECEIVE},
+ {"Send", WONDER_MAIL_MODE_SEND},
+ {"Receive", WONDER_MAIL_MODE_RECEIVE},
{NULL, 0}
};
-ALIGNED(4) const char Receive_80E7884[] = "Receive";
-ALIGNED(4) const char Send_80E788C[] = "Send";
-
-
const struct MenuItem gSendWonderMailMainMenuItems[4] =
{
- {GameLinkCable_80E78C8, WONDER_MAIL_GAME_LINK},
- {Password_80E78BC, -1},
- {Cancel_80E78B4, 8},
+ {"Game Link cable", WONDER_MAIL_GAME_LINK},
+ {"Password", -1},
+ {"Cancel", 8},
{NULL, 0}
};
-ALIGNED(4) const char Cancel_80E78B4[] = "Cancel";
-ALIGNED(4) const char Password_80E78BC[] = "Password";
-ALIGNED(4) const char GameLinkCable_80E78C8[] = "Game Link cable";
-
const struct MenuItem gReceiveWonderMailMainMenuItems[4] =
{
- {GameLinkCable_80E78C8, WONDER_MAIL_GAME_LINK},
- {Password_80E78BC, WONDER_MAIL_PASSWORD},
- {Cancel_80E78B4, 8},
+ {"Game Link cable", WONDER_MAIL_GAME_LINK},
+ {"Password", WONDER_MAIL_PASSWORD},
+ {"Cancel", 8},
{NULL, 0}
};
const struct MenuItem gUnknown_80E78F8[3] =
{
- {Yes_80E7910, 6},
- {Cancel_80E78B4, 0},
+ {"Yes", 6},
+ {"Cancel", 0},
{NULL, 0}
};
-ALIGNED(4) const char Yes_80E7910[] = "Yes";
-
-ALIGNED(4) const char gUnknown_80E7914[] = "There was a communication error.";
-
-ALIGNED(4) const char gUnknown_80E7938[] = "An incorrect number of GBA systems are\n"
- "connected.\n"
- "Please redo this process from the start.";
-
-ALIGNED(4) const char gUnknown_80E7994[] = "There is no response from your friend.\n"
- "Please redo this process from the start.";
-
-ALIGNED(4) const char gUnknown_80E79E4[] = "The sender and receiver appear to be\n"
- "in different modes.\n"
- "Please redo the process from the start.";
-
-ALIGNED(4) const char gUnknown_80E7A48[] = _("There is no response from your friend.\n"
- "Please make sure the sender and receiver\n"
- "are ready{COMMA} then redo this from the start.");
-
-ALIGNED(4) const char gUnknown_80E7AC4[] = "What would you like to do?";
-
-ALIGNED(4) const char gUnknown_80E7AE0[] = _("How would you like to send your\n"
- "{COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1}?");
-
-ALIGNED(4) const char gUnknown_80E7B14[] = _("How would you like to receive the\n"
- "{COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1}?");
-
-ALIGNED(4) const char gUnknown_80E7B48[] = "Your adventure will be saved.";
-
-ALIGNED(4) const char gUnknown_80E7B68[] = _("Your {COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1} was sent.");
-
-ALIGNED(4) const char gUnknown_80E7B88[] = _("The received {COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1} was\n"
- "added to the {COLOR_1 LIGHT_BLUE_2}Job List{END_COLOR_TEXT_1}.");
-
-ALIGNED(4) const char gUnknown_80E7BC8[] = _("The {COLOR_1 LIGHT_BLUE_2}Wonder Mail{END_COLOR_TEXT_1} was refused.");
-
-ALIGNED(4) const char gUnknown_80E7BEC[] = _("Connect a {COLOR_1 LIGHT_BLUE_2}Game Link cable{END_COLOR_TEXT_1}.\n"
- "When you and your friend are ready{COMMA}\n"
- "you may communicate. ");
-
-ALIGNED(4) const char gUnknown_80E7C48[] = _("{CENTER_ALIGN}In communication...\n"
- "{CENTER_ALIGN}Please wait with the power on.\n"
- "{CENTER_ALIGN}To cancel{COMMA} press {B_BUTTON}.");
-
-ALIGNED(4) const char gUnknown_80E7C98[] = _("Please enter the\n"
- "{COLOR_1 LIGHT_BLUE_2}Wonder Mail password{END_COLOR_TEXT_1}.");
-
-ALIGNED(4) const char gUnknown_80E7CC4[] = "This password is incorrect.\n"
- "Would you like to enter it again?";
-ALIGNED(4) const char wonder_mail_main_fill0[] = "pksdir0";
+#include "data/wonder_mail_main_menu.h"
const struct MenuItem WonderMailMainUnused[3] =
{