diff --git a/include/strings.h b/include/strings.h index 041f43d05b..8a035eb251 100644 --- a/include/strings.h +++ b/include/strings.h @@ -62,15 +62,6 @@ extern const u8 gText_MultiLink[]; extern const u8 gText_Single[]; extern const u8 gText_Double[]; -extern const u8 gText_Spicy[]; -extern const u8 gText_Dry[]; -extern const u8 gText_Sweet[]; -extern const u8 gText_Bitter[]; -extern const u8 gText_Sour[]; - -extern const u8 gText_StowCase[]; -extern const u8 gText_LvVar1[]; - extern const u8 gText_Spicy2[]; extern const u8 gText_Dry2[]; extern const u8 gText_Sweet2[]; @@ -117,9 +108,6 @@ extern const u8 gText_NoDecorationsInUse[]; extern const u8 gText_Exit[]; extern const u8 gText_Cancel[]; -extern const u8 gText_ThrowAwayVar1[]; -extern const u8 gText_Var1ThrownAway[]; - extern const u8 gText_Color161Shadow161[]; extern const u8 gText_GoBackPrevMenu[]; extern const u8 gText_CantPlaceInRoom[]; @@ -184,25 +172,6 @@ extern const u8 gText_Coins[]; extern const u8 gText_Silver[]; extern const u8 gText_Gold[]; -extern const u8 gText_Var1AteTheVar2[]; -extern const u8 gText_Var1HappilyAteVar2[]; -extern const u8 gText_Var1DisdainfullyAteVar2[]; - -extern const u8 gText_RedPokeblock[]; -extern const u8 gText_BluePokeblock[]; -extern const u8 gText_PinkPokeblock[]; -extern const u8 gText_GreenPokeblock[]; -extern const u8 gText_YellowPokeblock[]; -extern const u8 gText_PurplePokeblock[]; -extern const u8 gText_IndigoPokeblock[]; -extern const u8 gText_BrownPokeblock[]; -extern const u8 gText_LiteBluePokeblock[]; -extern const u8 gText_OlivePokeblock[]; -extern const u8 gText_GrayPokeblock[]; -extern const u8 gText_BlackPokeblock[]; -extern const u8 gText_WhitePokeblock[]; -extern const u8 gText_GoldPokeblock[]; - extern const u8 gMenuText_Use[]; extern const u8 gMenuText_Toss[]; extern const u8 gMenuText_Give[]; @@ -334,19 +303,6 @@ extern const u8 gText_LoadingEvent[]; extern const u8 gText_DontRemoveCableTurnOff[]; extern const u8 gText_LinkStandby2[]; -// berry tag screen text -extern const u8 gBerryFirmnessString_VerySoft[]; -extern const u8 gBerryFirmnessString_Soft[]; -extern const u8 gBerryFirmnessString_Hard[]; -extern const u8 gBerryFirmnessString_VeryHard[]; -extern const u8 gBerryFirmnessString_SuperHard[]; -extern const u8 gText_BerryTag[]; -extern const u8 gText_NumberVar1Var2[]; -extern const u8 gText_SizeSlash[]; -extern const u8 gText_Var1DotVar2[]; -extern const u8 gText_ThreeMarks[]; -extern const u8 gText_FirmSlash[]; - // item menu screen text extern const u8 gText_CloseBag[]; extern const u8 gText_NumberItem_HM[]; diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c index c6eb731845..fcd322ce33 100644 --- a/src/berry_tag_screen.c +++ b/src/berry_tag_screen.c @@ -143,11 +143,12 @@ static const struct WindowTemplate sWindowTemplates[] = static const u8 *const sBerryFirmnessStrings[] = { - gBerryFirmnessString_VerySoft, - gBerryFirmnessString_Soft, - gBerryFirmnessString_Hard, - gBerryFirmnessString_VeryHard, - gBerryFirmnessString_SuperHard + [BERRY_FIRMNESS_UNKNOWN] = COMPOUND_STRING("???"), + [BERRY_FIRMNESS_VERY_SOFT] = COMPOUND_STRING("Very soft"), + [BERRY_FIRMNESS_SOFT] = COMPOUND_STRING("Soft"), + [BERRY_FIRMNESS_HARD] = COMPOUND_STRING("Hard"), + [BERRY_FIRMNESS_VERY_HARD] = COMPOUND_STRING("Very hard"), + [BERRY_FIRMNESS_SUPER_HARD] = COMPOUND_STRING("Super hard") }; // this file's functions @@ -172,6 +173,13 @@ static void Task_DisplayAnotherBerry(u8 taskId); static void TryChangeDisplayedBerry(u8 taskId, s8 toMove); static void HandleBagCursorPositionChange(s8 toMove); +static const u8 sText_SizeSlash[] = _("SIZE /"); +static const u8 sText_FirmSlash[] = _("FIRM /"); +static const u8 sText_Var1DotVar2[] = _("{STR_VAR_1}.{STR_VAR_2}”"); +static const u8 sText_NumberVar1Var2[] = _("{NO}{STR_VAR_1} {STR_VAR_2}"); +static const u8 sText_BerryTag[] = _("BERRY TAG"); +static const u8 sText_ThreeMarks[] = _("???"); + // code void DoBerryTagScreen(void) { @@ -386,7 +394,7 @@ static void AddBerryTagTextToBg0(void) { memcpy(GetBgTilemapBuffer(0), sBerryTag->tilemapBuffers[2], sizeof(sBerryTag->tilemapBuffers[2])); FillWindowPixelBuffer(WIN_BERRY_TAG, PIXEL_FILL(15)); - PrintTextInBerryTagScreen(WIN_BERRY_TAG, gText_BerryTag, GetStringCenterAlignXOffset(FONT_NORMAL, gText_BerryTag, 0x40), 1, 0, 1); + PrintTextInBerryTagScreen(WIN_BERRY_TAG, sText_BerryTag, GetStringCenterAlignXOffset(FONT_NORMAL, sText_BerryTag, 0x40), 1, 0, 1); PutWindowTilemap(WIN_BERRY_TAG); ScheduleBgCopyTilemapToVram(0); } @@ -405,14 +413,14 @@ static void PrintBerryNumberAndName(void) const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); ConvertIntToDecimalStringN(gStringVar1, sBerryTag->berryId, STR_CONV_MODE_LEADING_ZEROS, 2); StringCopy(gStringVar2, berry->name); - StringExpandPlaceholders(gStringVar4, gText_NumberVar1Var2); + StringExpandPlaceholders(gStringVar4, sText_NumberVar1Var2); PrintTextInBerryTagScreen(WIN_BERRY_NAME, gStringVar4, 0, 1, 0, 0); } static void PrintBerrySize(void) { const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); - AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_SizeSlash, 0, 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sText_SizeSlash, 0, 1, TEXT_SKIP_DRAW, NULL); if (berry->size != 0) { u32 inches, fraction; @@ -425,23 +433,23 @@ static void PrintBerrySize(void) ConvertIntToDecimalStringN(gStringVar1, inches, STR_CONV_MODE_LEFT_ALIGN, 2); ConvertIntToDecimalStringN(gStringVar2, fraction, STR_CONV_MODE_LEFT_ALIGN, 2); - StringExpandPlaceholders(gStringVar4, gText_Var1DotVar2); + StringExpandPlaceholders(gStringVar4, sText_Var1DotVar2); AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gStringVar4, 0x28, 1, 0, NULL); } else { - AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_ThreeMarks, 0x28, 1, 0, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sText_ThreeMarks, 0x28, 1, 0, NULL); } } static void PrintBerryFirmness(void) { const struct Berry *berry = GetBerryInfo(sBerryTag->berryId); - AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_FirmSlash, 0, 0x11, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sText_FirmSlash, 0, 0x11, TEXT_SKIP_DRAW, NULL); if (berry->firmness != 0) - AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sBerryFirmnessStrings[berry->firmness - 1], 0x28, 0x11, 0, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sBerryFirmnessStrings[berry->firmness], 0x28, 0x11, 0, NULL); else - AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, gText_ThreeMarks, 0x28, 0x11, 0, NULL); + AddTextPrinterParameterized(WIN_SIZE_FIRM, FONT_NORMAL, sText_ThreeMarks, 0x28, 0x11, 0, NULL); } static void PrintBerryDescription1(void) diff --git a/src/pokeblock.c b/src/pokeblock.c index e01e821f7e..b68fe16ce3 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -130,6 +130,11 @@ static void ReturnToPokeblockCaseOnField(void); static void CreateTossPokeblockYesNoMenu(u8); static void TossPokeblock(u8); +static const u8 sText_StowCase[] = _("Stow CASE."); +static const u8 sText_LvVar1[] = _("{LV}{STR_VAR_1}"); +static const u8 sText_ThrowAwayVar1[] = _("Throw away this\n{STR_VAR_1}?"); +static const u8 sText_Var1ThrownAway[] = _("The {STR_VAR_1}\nwas thrown away."); + EWRAM_DATA static struct PokeblockSavedData sSavedPokeblockData = {0}; EWRAM_DATA static struct PokeblockMenuStruct *sPokeblockMenu = NULL; @@ -197,20 +202,20 @@ static const struct BgTemplate sBgTemplatesForPokeblockMenu[] = const u8 *const gPokeblockNames[] = { [PBLOCK_CLR_NONE] = NULL, - [PBLOCK_CLR_RED] = gText_RedPokeblock, - [PBLOCK_CLR_BLUE] = gText_BluePokeblock, - [PBLOCK_CLR_PINK] = gText_PinkPokeblock, - [PBLOCK_CLR_GREEN] = gText_GreenPokeblock, - [PBLOCK_CLR_YELLOW] = gText_YellowPokeblock, - [PBLOCK_CLR_PURPLE] = gText_PurplePokeblock, - [PBLOCK_CLR_INDIGO] = gText_IndigoPokeblock, - [PBLOCK_CLR_BROWN] = gText_BrownPokeblock, - [PBLOCK_CLR_LITE_BLUE] = gText_LiteBluePokeblock, - [PBLOCK_CLR_OLIVE] = gText_OlivePokeblock, - [PBLOCK_CLR_GRAY] = gText_GrayPokeblock, - [PBLOCK_CLR_BLACK] = gText_BlackPokeblock, - [PBLOCK_CLR_WHITE] = gText_WhitePokeblock, - [PBLOCK_CLR_GOLD] = gText_GoldPokeblock + [PBLOCK_CLR_RED] = COMPOUND_STRING("RED {POKEBLOCK}"), + [PBLOCK_CLR_BLUE] = COMPOUND_STRING("BLUE {POKEBLOCK}"), + [PBLOCK_CLR_PINK] = COMPOUND_STRING("PINK {POKEBLOCK}"), + [PBLOCK_CLR_GREEN] = COMPOUND_STRING("GREEN {POKEBLOCK}"), + [PBLOCK_CLR_YELLOW] = COMPOUND_STRING("YELLOW {POKEBLOCK}"), + [PBLOCK_CLR_PURPLE] = COMPOUND_STRING("PURPLE {POKEBLOCK}"), + [PBLOCK_CLR_INDIGO] = COMPOUND_STRING("INDIGO {POKEBLOCK}"), + [PBLOCK_CLR_BROWN] = COMPOUND_STRING("BROWN {POKEBLOCK}"), + [PBLOCK_CLR_LITE_BLUE] = COMPOUND_STRING("LITEBLUE {POKEBLOCK}"), + [PBLOCK_CLR_OLIVE] = COMPOUND_STRING("OLIVE {POKEBLOCK}"), + [PBLOCK_CLR_GRAY] = COMPOUND_STRING("GRAY {POKEBLOCK}"), + [PBLOCK_CLR_BLACK] = COMPOUND_STRING("BLACK {POKEBLOCK}"), + [PBLOCK_CLR_WHITE] = COMPOUND_STRING("WHITE {POKEBLOCK}"), + [PBLOCK_CLR_GOLD] = COMPOUND_STRING("GOLD {POKEBLOCK}") }; static const struct MenuAction sPokeblockMenuActions[] = @@ -702,11 +707,11 @@ static void DrawPokeblockMenuTitleText(void) const u8 *itemName = ItemId_GetName(ITEM_POKEBLOCK_CASE); PrintOnPokeblockWindow(WIN_TITLE, itemName, GetStringCenterAlignXOffset(FONT_NORMAL, itemName, 0x48)); - PrintOnPokeblockWindow(WIN_SPICY, gText_Spicy, 0); - PrintOnPokeblockWindow(WIN_DRY, gText_Dry, 0); - PrintOnPokeblockWindow(WIN_SWEET, gText_Sweet, 0); - PrintOnPokeblockWindow(WIN_BITTER, gText_Bitter, 0); - PrintOnPokeblockWindow(WIN_SOUR, gText_Sour, 0); + PrintOnPokeblockWindow(WIN_SPICY, COMPOUND_STRING("SPICY"), 0); + PrintOnPokeblockWindow(WIN_DRY, COMPOUND_STRING("DRY"), 0); + PrintOnPokeblockWindow(WIN_SWEET, COMPOUND_STRING("SWEET"), 0); + PrintOnPokeblockWindow(WIN_BITTER, COMPOUND_STRING("BITTER"), 0); + PrintOnPokeblockWindow(WIN_SOUR, COMPOUND_STRING("SOUR"), 0); for (i = 0; i < WIN_ACTIONS_TALL; i++) PutWindowTilemap(i); @@ -723,7 +728,7 @@ static void UpdatePokeblockList(void) sPokeblockMenu->items[i].id = i; } - StringCopy(sPokeblockMenu->menuItemsStrings[i], gText_StowCase); + StringCopy(sPokeblockMenu->menuItemsStrings[i], sText_StowCase); sPokeblockMenu->items[i].name = sPokeblockMenu->menuItemsStrings[i]; sPokeblockMenu->items[i].id = LIST_CANCEL; @@ -744,7 +749,7 @@ static void PutPokeblockListMenuString(u8 *dst, u16 pkblId) *(txtPtr++) = CHAR_BLOCK_1; ConvertIntToDecimalStringN(gStringVar1, GetHighestPokeblocksFlavorLevel(pkblock), STR_CONV_MODE_LEFT_ALIGN, 3); - StringExpandPlaceholders(txtPtr, gText_LvVar1); + StringExpandPlaceholders(txtPtr, sText_LvVar1); } static void MovePokeblockMenuCursor(s32 pkblId, bool8 onInit, struct ListMenu *list) @@ -1203,7 +1208,7 @@ static void PokeblockAction_Toss(u8 taskId) ClearStdWindowAndFrameToTransparent(tWindowId, FALSE); StringCopy(gStringVar1, gPokeblockNames[gSaveBlock1Ptr->pokeblocks[gSpecialVar_ItemId].color]); - StringExpandPlaceholders(gStringVar4, gText_ThrowAwayVar1); + StringExpandPlaceholders(gStringVar4, sText_ThrowAwayVar1); DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, FONT_NORMAL, GetPlayerTextSpeedDelay(), gStringVar4, CreateTossPokeblockYesNoMenu); } @@ -1214,7 +1219,7 @@ static void CreateTossPokeblockYesNoMenu(u8 taskId) static void TossedPokeblockMessage(u8 taskId) { - StringExpandPlaceholders(gStringVar4, gText_Var1ThrownAway); + StringExpandPlaceholders(gStringVar4, sText_Var1ThrownAway); DisplayMessageAndContinueTask(taskId, WIN_TOSS_MSG, 10, 13, FONT_NORMAL, GetPlayerTextSpeedDelay(), gStringVar4, TossPokeblock); } diff --git a/src/pokeblock_feed.c b/src/pokeblock_feed.c index f31896a4cb..f79f35a781 100644 --- a/src/pokeblock_feed.c +++ b/src/pokeblock_feed.c @@ -96,6 +96,10 @@ static u8 CreatePokeblockCaseSpriteForFeeding(void); static u8 CreateMonSprite(struct Pokemon *); static void SpriteCB_ThrownPokeblock(struct Sprite *); +static const u8 sText_Var1AteTheVar2[] = _("{STR_VAR_1} ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}"); +static const u8 sText_Var1HappilyAteVar2[] = _("{STR_VAR_1} happily ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}"); +static const u8 sText_Var1DisdainfullyAteVar2[] = _("{STR_VAR_1} disdainfully ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}"); + EWRAM_DATA static struct PokeblockFeed *sPokeblockFeed = NULL; EWRAM_DATA static struct CompressedSpritePalette sPokeblockSpritePal = {0}; @@ -792,11 +796,11 @@ static void Task_PrintAtePokeblockMessage(u8 taskId) PokeblockCopyName(pokeblock, gStringVar2); if (gPokeblockGain == 0) - StringExpandPlaceholders(gStringVar4, gText_Var1AteTheVar2); + StringExpandPlaceholders(gStringVar4, sText_Var1AteTheVar2); else if (gPokeblockGain > 0) - StringExpandPlaceholders(gStringVar4, gText_Var1HappilyAteVar2); + StringExpandPlaceholders(gStringVar4, sText_Var1HappilyAteVar2); else - StringExpandPlaceholders(gStringVar4, gText_Var1DisdainfullyAteVar2); + StringExpandPlaceholders(gStringVar4, sText_Var1DisdainfullyAteVar2); gTextFlags.canABSpeedUpPrint = TRUE; AddTextPrinterParameterized2(0, FONT_NORMAL, gStringVar4, GetPlayerTextSpeedDelay(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); diff --git a/src/strings.c b/src/strings.c index 6009dbf5e6..3f21f86c47 100644 --- a/src/strings.c +++ b/src/strings.c @@ -141,7 +141,6 @@ const u8 gText_Store[] = _("STORE"); const u8 gMenuText_Check[] = _("CHECK"); const u8 gText_None[] = _("NONE"); const u8 gMenuText_Deselect[] = _("DESELECT"); -const u8 gText_ThreeMarks[] = _("???"); const u8 gText_FiveMarks[] = _("?????"); const u8 gText_Slash[] = _("/"); const u8 gText_OneDash[] = _("-"); @@ -224,64 +223,19 @@ const u8 *const gPyramidBagMenu_ReturnToStrings[] = }; const u8 gText_ReturnToVar1[] = _("Return to\n{STR_VAR_1}."); -const u8 gText_ItemsPocket[] = _("ITEMS"); -const u8 gText_PokeBallsPocket[] = _("POKé BALLS"); -const u8 gText_TMHMPocket[] = _("TMs & HMs"); -const u8 gText_BerriesPocket[] = _("BERRIES"); -const u8 gText_KeyItemsPocket[] = _("KEY ITEMS"); const u8 *const gPocketNamesStringsTable[] = { - [ITEMS_POCKET] = gText_ItemsPocket, - [BALLS_POCKET] = gText_PokeBallsPocket, - [TMHM_POCKET] = gText_TMHMPocket, - [BERRIES_POCKET] = gText_BerriesPocket, - [KEYITEMS_POCKET] = gText_KeyItemsPocket + [ITEMS_POCKET] = COMPOUND_STRING("ITEMS"), + [BALLS_POCKET] = COMPOUND_STRING("POKé BALLS"), + [TMHM_POCKET] = COMPOUND_STRING("TMs & HMs"), + [BERRIES_POCKET] = COMPOUND_STRING("BERRIES"), + [KEYITEMS_POCKET] = COMPOUND_STRING("KEY ITEMS") }; const u8 gText_NumberItem_TMBerry[] = _("{NO}{STR_VAR_1}{CLEAR 0x07}{STR_VAR_2}"); const u8 gText_NumberItem_HM[] = _("{CLEAR_TO 0x11}{STR_VAR_1}{CLEAR 0x05}{STR_VAR_2}"); -const u8 gText_SizeSlash[] = _("SIZE /"); -const u8 gText_FirmSlash[] = _("FIRM /"); -const u8 gText_Var1DotVar2[] = _("{STR_VAR_1}.{STR_VAR_2}”"); -// Berry firmness strings -const u8 gBerryFirmnessString_VerySoft[] = _("Very soft"); -const u8 gBerryFirmnessString_Soft[] = _("Soft"); -const u8 gBerryFirmnessString_Hard[] = _("Hard"); -const u8 gBerryFirmnessString_VeryHard[] = _("Very hard"); -const u8 gBerryFirmnessString_SuperHard[] = _("Super hard"); - -const u8 gText_NumberVar1Var2[] = _("{NO}{STR_VAR_1} {STR_VAR_2}"); -const u8 gText_BerryTag[] = _("BERRY TAG"); -const u8 gText_RedPokeblock[] = _("RED {POKEBLOCK}"); -const u8 gText_BluePokeblock[] = _("BLUE {POKEBLOCK}"); -const u8 gText_PinkPokeblock[] = _("PINK {POKEBLOCK}"); -const u8 gText_GreenPokeblock[] = _("GREEN {POKEBLOCK}"); -const u8 gText_YellowPokeblock[] = _("YELLOW {POKEBLOCK}"); -const u8 gText_PurplePokeblock[] = _("PURPLE {POKEBLOCK}"); -const u8 gText_IndigoPokeblock[] = _("INDIGO {POKEBLOCK}"); -const u8 gText_BrownPokeblock[] = _("BROWN {POKEBLOCK}"); -const u8 gText_LiteBluePokeblock[] = _("LITEBLUE {POKEBLOCK}"); -const u8 gText_OlivePokeblock[] = _("OLIVE {POKEBLOCK}"); -const u8 gText_GrayPokeblock[] = _("GRAY {POKEBLOCK}"); -const u8 gText_BlackPokeblock[] = _("BLACK {POKEBLOCK}"); -const u8 gText_WhitePokeblock[] = _("WHITE {POKEBLOCK}"); -const u8 gText_GoldPokeblock[] = _("GOLD {POKEBLOCK}"); -const u8 gText_Spicy[] = _("SPICY"); -const u8 gText_Dry[] = _("DRY"); -const u8 gText_Sweet[] = _("SWEET"); -const u8 gText_Bitter[] = _("BITTER"); -const u8 gText_Sour[] = _("SOUR"); -const u8 gText_Tasty[] = _("TASTY"); // Unused -const u8 gText_Feel[] = _("FEEL"); // Unused -const u8 gText_StowCase[] = _("Stow CASE."); -const u8 gText_LvVar1[] = _("{LV}{STR_VAR_1}"); -const u8 gText_ThrowAwayVar1[] = _("Throw away this\n{STR_VAR_1}?"); -const u8 gText_Var1ThrownAway[] = _("The {STR_VAR_1}\nwas thrown away."); -const u8 gText_Var1AteTheVar2[] = _("{STR_VAR_1} ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}"); -const u8 gText_Var1HappilyAteVar2[] = _("{STR_VAR_1} happily ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}"); -const u8 gText_Var1DisdainfullyAteVar2[] = _("{STR_VAR_1} disdainfully ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}"); const u8 gText_ShopBuy[] = _("BUY"); const u8 gText_ShopSell[] = _("SELL"); const u8 gText_ShopQuit[] = _("QUIT");