From 19decc36d0465f26de20b389e6c8bf0775862cdb Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Fri, 7 Jan 2022 15:03:08 -0600 Subject: Move all the menus to respective directory in src/data/menus --- src/post_office_guide.c | 67 +------------------------------------------------ 1 file changed, 1 insertion(+), 66 deletions(-) (limited to 'src/post_office_guide.c') diff --git a/src/post_office_guide.c b/src/post_office_guide.c index 63470f5..806a2a2 100644 --- a/src/post_office_guide.c +++ b/src/post_office_guide.c @@ -98,72 +98,7 @@ enum PostOfficeMenuActions SEND_THANK_YOU_MAIL }; -const struct MenuItem gPostOfficeHelpStartMenu[] = -{ - {PostOffice_Text, POST_OFFICE}, - {BulletinBoard_Text, BULLETIN_BOARD}, - {Delivery_Text, DELIVERY}, - {FriendRescue_80E0A80, FRIEND_RESCUE}, - {Cancel_80E0A78, 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"); -ALIGNED(4) const char PostOffice_Text[] = _("Post Office"); - -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}, - {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"); - - -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}, - {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}, - {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/menus/post_office_guide.h" #include "data/pelipper_help_guide_dialogue.h" ALIGNED(4) const u8 wonder_mail_fill[] = _("pksdir0"); -- cgit v1.2.3 From 6c5749a148856780933326f8e83779cf8e8dbd69 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sun, 20 Feb 2022 09:00:38 -0800 Subject: actually nuke src/data/menus and put strings in the structs when possible vs references --- src/post_office_guide.c | 66 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 15 deletions(-) (limited to 'src/post_office_guide.c') diff --git a/src/post_office_guide.c b/src/post_office_guide.c index 806a2a2..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[]; @@ -98,7 +84,57 @@ enum PostOfficeMenuActions SEND_THANK_YOU_MAIL }; -#include "data/menus/post_office_guide.h" +const struct MenuItem gPostOfficeHelpStartMenu[] = +{ + {PostOffice_Text, POST_OFFICE}, + {BulletinBoard_Text, BULLETIN_BOARD}, + {Delivery_Text, DELIVERY}, + {FriendRescue_80E0A80, FRIEND_RESCUE}, + {"Cancel", CANCEL}, + {NULL, EXIT} +}; + +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"); +ALIGNED(4) const char PostOffice_Text[] = _("Post Office"); + +const struct MenuItem gPostOfficeHelpFriendRescueMenu[] = +{ + {FriendRescueInfo_Text, FRIEND_RESCUE_INFO}, + {GoRescue_Text, GO_RESCUE}, + {GetHelp_Text, GET_HELP_MENU}, + {"Deleting Mail Info", DELETING_MAIL}, + {"Exit", EXIT}, + {NULL, EXIT} +}; + +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"); + + +const struct MenuItem gPostOfficeHelpGoRescueMenu[] = +{ + {"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} +}; + +const struct MenuItem gPostOfficeHelpGetHelpMenu[] = +{ + {"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} +}; + #include "data/pelipper_help_guide_dialogue.h" ALIGNED(4) const u8 wonder_mail_fill[] = _("pksdir0"); -- cgit v1.2.3