From 4a7e7807c413e5bf20cbbc335bee01e2dfbf548c Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Fri, 20 Jan 2023 09:58:22 -0800 Subject: [PATCH] move some more data over --- data/data_80D47B8.s | 50 ------------ data/data_80DED44.s | 144 ---------------------------------- ld_script.txt | 4 +- src/friend_area_action_menu.c | 56 ++++++++++++- src/makuhita_dojo_1.c | 42 +++++++--- src/wonder_mail_4.c | 55 ++++++++++++- src/wonder_mail_5.c | 25 +++++- 7 files changed, 160 insertions(+), 216 deletions(-) delete mode 100644 data/data_80DED44.s diff --git a/data/data_80D47B8.s b/data/data_80D47B8.s index c6cb7679a..3f7836b7c 100644 --- a/data/data_80D47B8.s +++ b/data/data_80D47B8.s @@ -4622,53 +4622,3 @@ gUnknown_80DCA2C: @ 80DCA2C #include "friend_area.inc" #include "text/party_menu.inc" - - .global gUnknown_80DD6EC -gUnknown_80DD6EC: @ 80DD6EC - .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_80DD704 -gUnknown_80DD704: @ 80DD704 - .byte 0x00, 0x00, 0x00, 0x00 - - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x13, 0x00, 0x04, 0x00 - .byte 0x09, 0x00, 0x03, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80DD71C -gUnknown_80DD71C: @ 80DD71C - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x14, 0x00, 0x04, 0x00 - .byte 0x06, 0x00, 0x03, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x16, 0x00, 0x04, 0x00 - .byte 0x06, 0x00, 0x03, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80DD74C -gUnknown_80DD74C: @ 80DD74C - .byte 0x00, 0x00, 0x00, 0x00 - - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x11, 0x00 - .byte 0x1A, 0x00, 0x02, 0x00 - .byte 0x02, 0x00, 0x00, 0x00 - - .byte 0x00, 0x00, 0x00, 0x00 - diff --git a/data/data_80DED44.s b/data/data_80DED44.s deleted file mode 100644 index 66d06f015..000000000 --- a/data/data_80DED44.s +++ /dev/null @@ -1,144 +0,0 @@ - .section .rodata - - .string "pksdir0\0" - .align 2,0 - - .global gUnknown_80E07EC -gUnknown_80E07EC: @ 80E07EC - .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_80E0804 -gUnknown_80E0804: @ 80E0804 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x06, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x02, 0x00 - .byte 0x0e, 0x00, 0x0e, 0x00 - .byte 0x0e, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80E081C -gUnknown_80E081C: @ 80E081C - .string "Courses\0" - .align 2,0 - - .global gUnknown_80E0824 -gUnknown_80E0824: @ 80E0824 - .byte 0x87, 0x42, 0x00, 0x00 - - .global gUnknown_80E0828 -gUnknown_80E0828: @ 80E0828 - .string "{COLOR_2}%c%s{END_COLOR_TEXT_2}\0" - .align 2,0 - .string "pksdir0\0" - .align 2,0 - - .global gUnknown_80E083C -gUnknown_80E083C: @ 80E083C - .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_80E0854 -gUnknown_80E0854: @ 80E0854 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x06, 0x00, 0x00, 0x00 - .byte 0x02, 0x00, 0x02, 0x00 - .byte 0x18, 0x00, 0x11, 0x00 - .byte 0x11, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80E086C -gUnknown_80E086C: @ 80E086C - - .4byte SOSList - .4byte RequestList - .4byte SOSMail - .4byte ToDoList - .4byte AOKMail - .4byte ThanksList - .4byte CompletedJobs - .4byte OkdRescue - - .global OkdRescue - OkdRescue: - .string "OK{APOSTROPHE}d Rescues\0" - .align 2,0 - - .global CompletedJobs - CompletedJobs: - .string "Completed Jobs\0" - .align 2,0 - - .global ThanksList - ThanksList: - .string "Thanks List\0" - .align 2,0 - - .global AOKMail - AOKMail: - .string "A-OK Mail\0" - .align 2,0 - - .global ToDoList - ToDoList: - .string "To-Do List\0" - .align 2,0 - - .global SOSMail - SOSMail: - .string "SOS Mail\0" - .align 2,0 - - .global RequestList - RequestList: - .string "Request List\0" - .align 2,0 - - .global SOSList - SOSList: - .string "SOS List\0" - .align 2,0 - - .string "pksdir0\0" - .align 2,0 - - .global gUnknown_80E0900 -gUnknown_80E0900: @ 80E0900 - .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 DATA_80E0918 - DATA_80E0918: - .byte 0x01, 0x00, 0x12, 0x00 - - .global gUnknown_80E091C -gUnknown_80E091C: @ 80E091C - .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 DATA_80E0918 - - .global gUnknown_80E0934 -gUnknown_80E0934: @ 80E0934 - .string "ID:\0" - - .global gUnknown_80E0938 -gUnknown_80E0938: @ 80E0938 - .string "%-4d\0" - .align 2,0 - .string "pksdir0\0" diff --git a/ld_script.txt b/ld_script.txt index 19045e3ae..3de3e10a0 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -443,7 +443,9 @@ SECTIONS { src/pelipper_board.o(.rodata); src/wonder_mail_3_mid.o(.rodata); src/makuhita_dojo.o(.rodata); - data/data_80DED44.o(.rodata); + src/makuhita_dojo_1.o(.rodata); + src/wonder_mail_4.o(.rodata); + src/wonder_mail_5.o(.rodata); src/wonder_mail_6.o(.rodata); src/post_office_guide.o(.rodata); data/data_80E1F30.o(.rodata); diff --git a/src/friend_area_action_menu.c b/src/friend_area_action_menu.c index 870f8bb83..d831dc617 100644 --- a/src/friend_area_action_menu.c +++ b/src/friend_area_action_menu.c @@ -9,10 +9,6 @@ #include "friend_area_action_menu.h" extern struct unkStruct_203B2BC *gUnknown_203B2BC; -extern struct UnkTextStruct2 gUnknown_80DD74C; -extern struct UnkTextStruct2 gUnknown_80DD704; -extern struct UnkTextStruct2 gUnknown_80DD6EC; -extern struct UnkTextStruct2 gUnknown_80DD71C; extern void sub_80141B4(const char *r0, u32, u32 *r1, u32); extern void sub_8014248(const char *r0, u32, u32, struct MenuItem *r4, u32, u32, u32, u32 *r5, u32); @@ -54,6 +50,58 @@ extern void sub_8027D00(); extern void CreateFriendActionMenu(); extern void sub_80276A8(); +const struct UnkTextStruct2 gUnknown_80DD6EC = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + NULL +}; + + +const struct UnkTextStruct2 gUnknown_80DD704 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x13, 0x00, 0x04, 0x00, + 0x09, 0x03, + 0x03, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80DD71C = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x04, 0x00, + 0x06, 0x03, + 0x03, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80DD734 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x04, 0x00, + 0x06, 0x03, + 0x03, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80DD74C = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x11, 0x00, + 0x1A, 0x02, + 0x02, 0x00, + NULL +}; + + ALIGNED(4) const u8 gFriendAreaActionSayFarewellPrompt[] = _( "You have chosen to say farewell\n" "to this Pokémon.{EXTRA_MSG}" diff --git a/src/makuhita_dojo_1.c b/src/makuhita_dojo_1.c index e489e949b..8a849f9f9 100644 --- a/src/makuhita_dojo_1.c +++ b/src/makuhita_dojo_1.c @@ -31,22 +31,40 @@ struct unkStruct_203B31C extern struct unkStruct_203B31C *gUnknown_203B31C; extern struct unkStruct_203B318 *gUnknown_203B318; -extern struct UnkTextStruct2 gUnknown_80E07EC; -extern struct UnkTextStruct2 gUnknown_80E0804; +static const u8 makuhita_dojo_fill[] = "pksdir0"; + +const struct UnkTextStruct2 gUnknown_80E07EC = { + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + NULL +}; +const struct UnkTextStruct2 gUnknown_80E0804 = { + 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x02, 0x00, + 0x0E, 0x0E, + 0x0E, 0x00, + NULL +}; + +const u8 gMakuhitaDojoHeader[] = "Courses"; +ALIGNED(4) const u8 gUnknown_80E0824[] = _("{STAR_BULLET}"); +ALIGNED(4) const u8 gMakuhitaCoursePlaceholder[] = _("{COLOR_2}%c%s{END_COLOR_TEXT_2}"); +static const u8 makuhita_dojo_fill2[] = "pksdir0"; extern u8 gMakuhitaDojoGoTrain[]; -extern u8 *gUnknown_80D4970[]; extern u8 *gUnknown_80D4934[]; -extern u8 gUnknown_80E081C[]; -extern u8 gUnknown_80E0824[]; -extern u8 gUnknown_80E0828[]; +extern u8 *gUnknown_80D4970[]; extern bool8 sub_8097504(s16); extern s16 sub_80A26CC(s16 r0); extern void sub_8008C54(u32); extern void sub_80073B8(u32); 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 u8 sub_80A2740(s32 r0); extern s16 sub_80A2668(u32 r0); @@ -301,7 +319,7 @@ void sub_80304C8(void) void DrawDojoCourseList(void) { u8 dungeonIndex; - s32 sVar3; + s32 mazeIndex; s32 y; s32 iVar6; u32 color; @@ -310,7 +328,7 @@ void DrawDojoCourseList(void) sub_8008C54(gUnknown_203B31C->unk64); sub_80073B8(gUnknown_203B31C->unk64); - xxx_call_draw_string(10,0,gUnknown_80E081C,gUnknown_203B31C->unk64,0); // Courses + xxx_call_draw_string(10,0,gMakuhitaDojoHeader,gUnknown_203B31C->unk64,0); // Courses sub_8012BC4(gUnknown_203B31C->unkCC[2] * 8 + 4,0, gUnknown_203B31C->unk4E + 1,2,7,gUnknown_203B31C->unk64); index = 0; @@ -319,15 +337,15 @@ void DrawDojoCourseList(void) iVar6 = gUnknown_203B31C->unk0[gUnknown_203B31C->unk4E * gUnknown_203B31C->unk4C + index]; dungeonIndex = sub_80A2740(iVar6); - sVar3 = sub_80A2668(iVar6); + mazeIndex = sub_80A2668(iVar6); y = sub_8013800(&gUnknown_203B31C->unk30, index); color = COLOR_WHITE_2; // COLOR_WHITE again? - if (IsMazeCompleted(sVar3)) { + if (IsMazeCompleted(mazeIndex)) { xxx_call_draw_string(8,y,gUnknown_80E0824,gUnknown_203B31C->unk64,0); // Draw Star symbol color = COLOR_GREEN; } - sprintfStatic(buffer,gUnknown_80E0828,color,GetDungeonName1(dungeonIndex)); // "#c%c%s#r" + sprintfStatic(buffer,gMakuhitaCoursePlaceholder,color,GetDungeonName1(dungeonIndex)); // "#c%c%s#r" xxx_call_draw_string(0x10,y,buffer,gUnknown_203B31C->unk64,0); index++; } while (index < gUnknown_203B31C->unk4A); diff --git a/src/wonder_mail_4.c b/src/wonder_mail_4.c index 7baf04a64..6773f23ef 100644 --- a/src/wonder_mail_4.c +++ b/src/wonder_mail_4.c @@ -27,9 +27,7 @@ struct unkStruct_203B320 u8 unkC0[4]; }; extern struct unkStruct_203B320 *gUnknown_203B320; -extern struct UnkTextStruct2 gUnknown_80E083C; -extern struct UnkTextStruct2 gUnknown_80E0854; -extern u8 *gUnknown_80E086C[]; + extern struct unkStruct_203B480 *gUnknown_203B480; struct unkStruct_802C39C @@ -47,6 +45,57 @@ struct unkStruct_802C39C /* 0x50 */ u8 *unk50[2]; }; + +const struct UnkTextStruct2 gUnknown_80E083C = { + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80E0854 = { + 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x02, 0x00, + 0x18, 0x11, + 0x11, 0x00, + NULL +}; + +extern const u8 SOSList[]; +extern const u8 RequestList[]; +extern const u8 SOSMail[]; +extern const u8 ToDoList[]; +extern const u8 AOKMail[]; +extern const u8 ThanksList[]; +extern const u8 CompletedJobs[]; +extern const u8 OkdRescue[]; + +const u8 * const gUnknown_80E086C[] = +{ + SOSList, + RequestList, + SOSMail, + ToDoList, + AOKMail, + ThanksList, + CompletedJobs, + OkdRescue +}; + +ALIGNED(4) const u8 OkdRescue[] = _("OK{APOSTROPHE}d Rescues"); +ALIGNED(4) const u8 CompletedJobs[] = "Completed Jobs"; +ALIGNED(4) const u8 ThanksList[] = "Thanks List"; +ALIGNED(4) const u8 AOKMail[] = "A-OK Mail"; +ALIGNED(4) const u8 ToDoList[] = "To-Do List"; +ALIGNED(4) const u8 SOSMail[] = "SOS Mail"; +ALIGNED(4) const u8 RequestList[] = "Request List"; +ALIGNED(4) const u8 SOSList[] = "SOS List"; +static const u8 wonder_mail_fill[] = "pksdir0"; + + extern bool8 HasNoWonderMailType(u32); extern s32 sub_8030A74(void); extern void sub_80308A0(void); diff --git a/src/wonder_mail_5.c b/src/wonder_mail_5.c index 1842673c9..76a65db86 100644 --- a/src/wonder_mail_5.c +++ b/src/wonder_mail_5.c @@ -14,9 +14,30 @@ struct unkStruct_203B324 }; extern struct unkStruct_203B324 *gUnknown_203B324; +const struct UnkTextStruct2 gUnknown_80E0900 = { + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + NULL +}; + +const u8 DATA_80E0918[] = {0x01, 0x00, 0x12, 0x00}; + +const struct UnkTextStruct2 gUnknown_80E091C = { + 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x02, 0x00, + 0x1A, 0x10, + 0x10, 0x00, + DATA_80E0918 +}; + +const u8 gUnknown_80E0934[] = "ID:"; +const u8 gUnknown_80E0938[] = "%-4d"; +static const u8 wonder_mail_fill[] = "pksdir0"; -extern const struct UnkTextStruct2 gUnknown_80E091C; -extern const struct UnkTextStruct2 gUnknown_80E0900; extern void sub_8030DD4(void); extern void sub_801317C(void *); extern void PlayMenuSoundEffect(u32);