diff --git a/data/common_strings.s b/data/common_strings.s deleted file mode 100644 index c495e6091..000000000 --- a/data/common_strings.s +++ /dev/null @@ -1,93 +0,0 @@ - .section .rodata - - .align 2,0 - - .global gCommonHints -gCommonHints: @ 80DAA98 (Help Menu?) - .4byte gUnknown_80DAF54 - .4byte gUnknown_80DAEE0 - .4byte gUnknown_80DAECC - .4byte gUnknown_80DADD4 - .4byte gUnknown_80DADCC - .4byte gUnknown_80DAD40 - .4byte gUnknown_80DAD28 - .4byte gUnknown_80DABE8 - .4byte gUnknown_80DABD8 - .4byte gUnknown_80DAAC0 - - .global gUnknown_80DAAC0 -gUnknown_80DAAC0: - .string "Before leaving on an adventure{COMMA} go visit\n" - .string "friends in their Friend Areas and pick\n" - .string "your mission members.\n" - .string "The team can include members up to\n" - .string "a total body size of 6{STAR_BULLET}. The body size\n" - .string "data is under the Info section.\n" - .string "Dungeons may also limit how many\n" - .string "members are allowed to go inside.\0" - .align 2, 0 - - .global gUnknown_80DABD8 -gUnknown_80DABD8: - .string "Building a Team\0" - .align 2, 0 - - .global gUnknown_80DABE8 -gUnknown_80DABE8: - .string "If new recruits join you{COMMA} try to return to\n" - .string "your base without letting them faint.\n" - .string "If you get them out safely{COMMA} they{APOSTROPHE}ll wait\n" - .string "for you in their Friend Areas.\n" - .string "Once you get them out{COMMA} they{APOSTROPHE}ll always\n" - .string "return home if they faint in a dungeon.\n" - .string "If you faint in a dungeon{COMMA} you lose all your\n" - .string "money and some items{COMMA} too.\0" - .align 2, 0 - - .global gUnknown_80DAD28 -gUnknown_80DAD28: - .string "Adventures with Friends\0" - .align 2, 0 - - .global gUnknown_80DAD40 -gUnknown_80DAD40: - .string "You can save your adventure by\n" - .string "hopping onto your bed in your base.\n" - .string "Get in the habit of saving regularly as\n" - .string "you progress in your adventure.\0" - .align 2, 0 - - .global gUnknown_80DADCC -gUnknown_80DADCC: - .string "Saving\0" - .align 2, 0 - - .global gUnknown_80DADD4 -gUnknown_80DADD4: - .string "Selecting multiple items in storage:\n" - .string " Select an item{COMMA} then press {L_BUTTON} or {R_BUTTON}.\n" - .string "Moving to the Friend Area Map:\n" - .string " Move out from the town{APOSTROPHE}s west side\n" - .string " while pressing {L_BUTTON} or {R_BUTTON}.\n" - .string "Moving diagonally on the Friend Area Map:\n" - .string " {DPAD} while keeping {R_BUTTON} pressed.\0" - .align 2, 0 - - .global gUnknown_80DAECC -gUnknown_80DAECC: - .string "Controls in Town 2\0" - .align 2, 0 - - .global gUnknown_80DAEE0 -gUnknown_80DAEE0: - .string "Talk: {A_BUTTON}\n" - .string "Move: {DPAD}\n" - .string "Window: {B_BUTTON} lightly\n" - .string "Message scroll: {A_BUTTON} or {B_BUTTON}\n" - .string "Cancel: {B_BUTTON}\n" - .string "Description: Choose item or move{COMMA} {START_BUTTON}\0" - .align 2, 0 - - .global gUnknown_80DAF54 -gUnknown_80DAF54: - .string "Controls in Town 1\0" \ No newline at end of file diff --git a/include/common_strings.h b/include/common_strings.h index d2024bec6..3c6e34f29 100644 --- a/include/common_strings.h +++ b/include/common_strings.h @@ -7,15 +7,7 @@ #include "constants/common_strings_wigglytuff_shop.h" #include "constants/common_strings_gulpin_shop.h" #include "constants/common_strings_makuhita_dojo.h" - -#define MAX_HINTS 5 - -// size: 0x8 -typedef struct Hints -{ - const u8 *heading; - const u8 *body; -} Hints; +#include "constants/common_strings_hints.h" extern const u8* const gCommonYes[]; extern const u8* const gCommonNo[]; @@ -41,6 +33,6 @@ extern const u8* const gCommonKecleonBros[KECLEON_BROS_MODE_COUNT][KECLEON_DLG_M extern const u8* const gCommonWigglytuff[WIGGLYTUFF_SHOP_MODE_COUNT][WIGGLY_DLG_MAX]; extern const u8* const gCommonGulpin[GULPIN_SHOP_MODE_DIALOGUE_COUNT][GULPIN_DLG_MAX]; extern const u8* const gCommonMakuhita[MAKUHITA_DOJO_MODE_COUNT][MAKUHITA_DLG_MAX]; -extern const Hints gCommonHints[MAX_HINTS]; // 80DAA98 +extern const Hints gCommonHints[NUM_HINTS]; #endif // GUARD_COMMON_STRINGS_H \ No newline at end of file diff --git a/include/constants/common_strings_hints.h b/include/constants/common_strings_hints.h new file mode 100644 index 000000000..7e319f47f --- /dev/null +++ b/include/constants/common_strings_hints.h @@ -0,0 +1,13 @@ +#ifndef GUARD_COMMON_STRINGS_HINTS_H +#define GUARD_COMMON_STRINGS_HINTS_H + +// size: 0x8 +typedef struct Hints +{ + const u8 *heading; + const u8 *body; +} Hints; + +#define NUM_HINTS 5 + +#endif // GUARD_COMMON_STRINGS_HINTS_H \ No newline at end of file diff --git a/ld_script.txt b/ld_script.txt index a25608a9d..8f571967a 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -413,7 +413,6 @@ SECTIONS { src/menu_input.o(.rodata); data/data_80D47B8.o(.rodata); src/common_strings.o(.rodata); - data/common_strings.o(.rodata); data/data_80DAF70.o(.rodata); src/code_801602C.o(.rodata); src/felicity_bank.o(.rodata); diff --git a/src/common_strings.c b/src/common_strings.c index 1a530420f..344112513 100644 --- a/src/common_strings.c +++ b/src/common_strings.c @@ -56,11 +56,10 @@ ALIGNED(4) const u8* const gCommonDepositPrompt[] = { sDepositPrompt0 }; ALIGNED(4) static const u8 sWithdrawPrompt0[] = _("Withdraw?"); ALIGNED(4) const u8* const gCommonWithdrawPrompt[] = { sWithdrawPrompt0 }; -// TODO: Move remaining strings/arrays from common_strings.s - #include "data/common_strings_felicity_bank.h" #include "data/common_strings_kangaskhan_storage.h" #include "data/common_strings_kecleon_bros.h" #include "data/common_strings_wigglytuff_shop.h" #include "data/common_strings_gulpin_shop.h" -#include "data/common_strings_makuhita_dojo.h" \ No newline at end of file +#include "data/common_strings_makuhita_dojo.h" +#include "data/common_strings_hints.h" \ No newline at end of file diff --git a/src/data/common_strings_hints.h b/src/data/common_strings_hints.h new file mode 100644 index 000000000..75314ad1e --- /dev/null +++ b/src/data/common_strings_hints.h @@ -0,0 +1,67 @@ +static const u8 sUnknown_80DAAC0[]; +static const u8 sUnknown_80DABD8[]; +static const u8 sUnknown_80DABE8[]; +static const u8 sUnknown_80DAD28[]; +static const u8 sUnknown_80DAD40[]; +static const u8 sUnknown_80DADCC[]; +static const u8 sUnknown_80DADD4[]; +static const u8 sUnknown_80DAECC[]; +static const u8 sUnknown_80DAEE0[]; +static const u8 sUnknown_80DAF54[]; + +ALIGNED(4) const Hints gCommonHints[NUM_HINTS] = +{ + {sUnknown_80DAF54, sUnknown_80DAEE0}, + {sUnknown_80DAECC, sUnknown_80DADD4}, + {sUnknown_80DADCC, sUnknown_80DAD40}, + {sUnknown_80DAD28, sUnknown_80DABE8}, + {sUnknown_80DABD8, sUnknown_80DAAC0} +}; + +ALIGNED(4) static const u8 sUnknown_80DAAC0[] = _( + "Before leaving on an adventure{COMMA} go visit\n" + "friends in their Friend Areas and pick\n" + "your mission members.\n" + "The team can include members up to\n" + "a total body size of 6{STAR_BULLET}. The body size\n" + "data is under the Info section.\n" + "Dungeons may also limit how many\n" + "members are allowed to go inside."); +ALIGNED(4) static const u8 sUnknown_80DABD8[] = _("Building a Team"); + +ALIGNED(4) static const u8 sUnknown_80DABE8[] = _( + "If new recruits join you{COMMA} try to return to\n" + "your base without letting them faint.\n" + "If you get them out safely{COMMA} they{APOSTROPHE}ll wait\n" + "for you in their Friend Areas.\n" + "Once you get them out{COMMA} they{APOSTROPHE}ll always\n" + "return home if they faint in a dungeon.\n" + "If you faint in a dungeon{COMMA} you lose all your\n" + "money and some items{COMMA} too."); +ALIGNED(4) static const u8 sUnknown_80DAD28[] = _("Adventures with Friends"); + +ALIGNED(4) static const u8 sUnknown_80DAD40[] = _( + "You can save your adventure by\n" + "hopping onto your bed in your base.\n" + "Get in the habit of saving regularly as\n" + "you progress in your adventure."); +ALIGNED(4) static const u8 sUnknown_80DADCC[] = _("Saving"); + +ALIGNED(4) static const u8 sUnknown_80DADD4[] = _( + "Selecting multiple items in storage:\n" + " Select an item{COMMA} then press {L_BUTTON} or {R_BUTTON}.\n" + "Moving to the Friend Area Map:\n" + " Move out from the town{APOSTROPHE}s west side\n" + " while pressing {L_BUTTON} or {R_BUTTON}.\n" + "Moving diagonally on the Friend Area Map:\n" + " {DPAD} while keeping {R_BUTTON} pressed."); +ALIGNED(4) static const u8 sUnknown_80DAECC[] = _("Controls in Town 2"); + +ALIGNED(4) static const u8 sUnknown_80DAEE0[] = _( + "Talk: {A_BUTTON}\n" + "Move: {DPAD}\n" + "Window: {B_BUTTON} lightly\n" + "Message scroll: {A_BUTTON} or {B_BUTTON}\n" + "Cancel: {B_BUTTON}\n" + "Description: Choose item or move{COMMA} {START_BUTTON}"); +ALIGNED(4) static const u8 sUnknown_80DAF54[] = _("Controls in Town 1"); \ No newline at end of file diff --git a/src/hints_menu1.c b/src/hints_menu1.c index e53591c7b..beaa55de2 100644 --- a/src/hints_menu1.c +++ b/src/hints_menu1.c @@ -144,7 +144,7 @@ static void DrawHintSelectionMenu(void) sub_80073B8(sUnknown_203B264->unk34); xxx_call_draw_string(16, 0, sHints, sUnknown_203B264->unk34, 0); - for (hintIndex = 0; hintIndex < MAX_HINTS; hintIndex++) { + for (hintIndex = 0; hintIndex < NUM_HINTS; hintIndex++) { y = sub_8013800(&sUnknown_203B264->input, hintIndex); xxx_call_draw_string(10, y, gCommonHints[hintIndex].heading, sUnknown_203B264->unk34, 0); }