diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/code_2.c | 2 | ||||
-rw-r--r-- | src/code_8048DB8.c | 86 | ||||
-rw-r--r-- | src/code_8057824.c | 1 | ||||
-rw-r--r-- | src/code_8073CF0.c | 22 | ||||
-rw-r--r-- | src/code_8083288.c | 9 | ||||
-rw-r--r-- | src/code_809447C.c | 68 | ||||
-rw-r--r-- | src/data/thank_you_wonder_mail.h | 177 | ||||
-rw-r--r-- | src/data/wonder_mail_main_menu.h | 49 | ||||
-rw-r--r-- | src/debug.c | 28 | ||||
-rw-r--r-- | src/debug_menu.c | 46 | ||||
-rw-r--r-- | src/ds_menus.c | 2 | ||||
-rw-r--r-- | src/friend_rescue.c | 2 | ||||
-rw-r--r-- | src/items.c | 6 | ||||
-rw-r--r-- | src/load_screen.c | 142 | ||||
-rw-r--r-- | src/main_menu.c | 343 | ||||
-rw-r--r-- | src/moves.c | 3 | ||||
-rw-r--r-- | src/moves_1.c | 2 | ||||
-rw-r--r-- | src/pokemon_mid.c | 4 | ||||
-rw-r--r-- | src/post_office_guide.c | 57 | ||||
-rw-r--r-- | src/thank_you_wonder_mail.c | 245 | ||||
-rw-r--r-- | src/wonder_mail.c | 129 | ||||
-rw-r--r-- | src/wonder_mail_2.c | 116 | ||||
-rw-r--r-- | src/wonder_mail_main_menu.c | 86 |
23 files changed, 1010 insertions, 615 deletions
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] = { |