Converted item-related variables to COMPOUND_STRINGs (#5714)

This commit is contained in:
Frank DeBlasio 2024-12-03 17:11:59 -05:00 committed by GitHub
parent 993663d9b0
commit 1b880a1185
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 113 additions and 214 deletions

View File

@ -177,12 +177,7 @@ extern const u8 gMenuText_Toss[];
extern const u8 gMenuText_Give[];
extern const u8 gMenuText_Give2[];
extern const u8 gMenuText_Register[];
extern const u8 gMenuText_Check[];
extern const u8 gMenuText_Walk[];
extern const u8 gMenuText_Deselect[];
extern const u8 gMenuText_CheckTag[];
extern const u8 gMenuText_Confirm[];
extern const u8 gMenuText_Show[];
extern const u8 gMenuText_Give2[];
extern const u8 gText_EggNickname[];
@ -318,15 +313,10 @@ extern const u8 gText_ThrewAwayVar2Var1s[];
extern const u8 gText_CantWriteMail[];
extern const u8 gText_NoPokemon[];
extern const u8 gText_Var1CantBeHeld[];
extern const u8 gText_Var1CantBeHeldHere[];
extern const u8 gText_CantBuyKeyItem[];
extern const u8 gText_HowManyToSell[];
extern const u8 gText_ICanPayVar1[];
extern const u8 gText_TurnedOverVar1ForVar2[];
extern const u8 gText_DepositHowManyVar1[];
extern const u8 gText_CantStoreImportantItems[];
extern const u8 gText_DepositedVar2Var1s[];
extern const u8 gText_NoRoomForItems[];
extern const u8 gText_ThreeDashes[];
extern const u8 *const gPocketNamesStringsTable[];
@ -450,28 +440,12 @@ extern const u8 gBirchDexRatingText_LessThan190[];
extern const u8 gBirchDexRatingText_LessThan200[];
extern const u8 gBirchDexRatingText_DexCompleted[];
// player pc text
// player PC text
extern const u8 gText_WhatWouldYouLike[];
extern const u8 gText_NoMailHere[];
extern const u8 gText_TakeOutItemsFromPC[];
extern const u8 gText_StoreItemsInPC[];
extern const u8 gText_ThrowAwayItemsInPC[];
extern const u8 gText_GoBackPrevMenu[];
extern const u8 gText_ItemStorage[];
extern const u8 gText_Mailbox[];
extern const u8 gText_Decoration[];
extern const u8 gText_TurnOff[];
extern const u8 gText_WithdrawItem[];
extern const u8 gText_DepositItem[];
extern const u8 gText_TossItem[];
extern const u8 gText_Cancel[];
extern const u8 gText_Read[];
extern const u8 gText_MoveToBag[];
extern const u8 gText_Give2[];
extern const u8 gText_Cancel2[];
extern const u8 gText_NoItems[];
@ -481,12 +455,8 @@ extern const u8 gText_BagIsFull[];
extern const u8 gText_MailToBagMessageErased[];
extern const u8 gText_GoBackPrevMenu[];
extern const u8 gText_WithdrawHowManyItems[];
extern const u8 gText_WithdrawXItems[];
extern const u8 gText_TossHowManyVar1s[];
extern const u8 gText_ThrewAwayVar2Var1s[];
extern const u8 gText_NoRoomInBag[];
extern const u8 gText_TooImportantToToss[];
extern const u8 gText_ConfirmTossItems[];
extern const u8 gText_MoveVar1Where[];
@ -717,26 +687,12 @@ extern const u8 gText_Gabby[];
extern const u8 gText_Anna[];
extern const u8 gText_DadsAdvice[];
extern const u8 gText_CantDismountBike[];
extern const u8 gText_ItemFinderNothing[];
extern const u8 gText_ItemFinderNearby[];
extern const u8 gText_ItemFinderOnTop[];
extern const u8 gText_CoinCase[];
extern const u8 gText_PowderQty[];
extern const u8 gText_BootedUpHM[];
extern const u8 gText_BootedUpTM[];
extern const u8 gText_TMHMContainedVar1[];
extern const u8 gText_PlayerUsedVar2[];
extern const u8 gText_RepelEffectsLingered[];
extern const u8 gText_LureEffectsLingered[];
extern const u8 gText_UsedVar2WildLured[];
extern const u8 gText_UsedVar2WildRepelled[];
extern const u8 gText_BoxFull[];
extern const u8 gText_WontHaveEffect[];
extern const u8 gText_NextFusionMon[];
extern const u8 gText_PlayedPokeFluteCatchy[];
extern const u8 gText_PlayedPokeFlute[];
extern const u8 gText_PokeFluteAwakenedMon[];
extern const u8 gText_LevelSymbol[];
extern const u8 gText_PkmnInfo[];
@ -940,19 +896,6 @@ extern const u8 CableClub_Text_YouMayBattleHere[];
extern const u8 CableClub_Text_CanMixRecords[];
extern const u8 CableClub_Text_CanMakeBerryPowder[];
// Rotom Catalog text
extern const u8 gText_LightBulb[];
extern const u8 gText_MicrowaveOven[];
extern const u8 gText_WashingMachine[];
extern const u8 gText_Refrigerator[];
extern const u8 gText_ElectricFan[];
extern const u8 gText_LawnMower[];
extern const u8 gText_Exit[];
// Zygarde Cube text
extern const u8 gText_ChangeForm[];
extern const u8 gText_ChangeAbility[];
// Frontier records.
extern const u8 gText_WinStreak[];
extern const u8 gText_Record[];
@ -1677,21 +1620,8 @@ extern const u8 gText_NotAble2[];
extern const u8 gText_Learned[];
extern const u8 gText_Have[];
extern const u8 gText_DontHave[];
extern const u8 gText_Take[];
extern const u8 gText_Mail[];
extern const u8 gText_Take2[];
extern const u8 gText_Read2[];
extern const u8 gText_Cancel2[];
extern const u8 gText_Shift[];
extern const u8 gText_SendOut[];
extern const u8 gText_Enter[];
extern const u8 gText_NoEntry[];
extern const u8 gText_Store[];
extern const u8 gText_Register[];
extern const u8 gText_Trade4[];
extern const u8 gText_Summary5[];
extern const u8 gText_Switch2[];
extern const u8 gText_Item[];
extern const u8 gText_NotPkmnOtherTrainerWants[];
extern const u8 gText_ThatIsntAnEgg[];
extern const u8 gText_OtherTrainersPkmnCantBeTraded[];

View File

@ -686,39 +686,41 @@ static const u16 sUnusedData[] =
0x0121, 0x013b, 0x000f, 0x0013, 0x0039, 0x0046, 0x0094, 0x00f9, 0x007f, 0x0123,
};
static const u8 sText_Trade4[] = _("TRADE");
struct
{
const u8 *text;
TaskFunc func;
} static const sCursorOptions[MENU_FIELD_MOVES] =
{
[MENU_SUMMARY] = {gText_Summary5, CursorCb_Summary},
[MENU_SWITCH] = {gText_Switch2, CursorCb_Switch},
[MENU_SUMMARY] = {COMPOUND_STRING("SUMMARY"), CursorCb_Summary},
[MENU_SWITCH] = {COMPOUND_STRING("SWITCH"), CursorCb_Switch},
[MENU_CANCEL1] = {gText_Cancel2, CursorCb_Cancel1},
[MENU_ITEM] = {gText_Item, CursorCb_Item},
[MENU_ITEM] = {COMPOUND_STRING("ITEM"), CursorCb_Item},
[MENU_GIVE] = {gMenuText_Give, CursorCb_Give},
[MENU_TAKE_ITEM] = {gText_Take, CursorCb_TakeItem},
[MENU_MAIL] = {gText_Mail, CursorCb_Mail},
[MENU_TAKE_MAIL] = {gText_Take2, CursorCb_TakeMail},
[MENU_READ] = {gText_Read2, CursorCb_Read},
[MENU_TAKE_ITEM] = {COMPOUND_STRING("TAKE"), CursorCb_TakeItem},
[MENU_MAIL] = {COMPOUND_STRING("MAIL"), CursorCb_Mail},
[MENU_TAKE_MAIL] = {COMPOUND_STRING("TAKE"), CursorCb_TakeMail},
[MENU_READ] = {COMPOUND_STRING("READ"), CursorCb_Read},
[MENU_CANCEL2] = {gText_Cancel2, CursorCb_Cancel2},
[MENU_SHIFT] = {gText_Shift, CursorCb_SendMon},
[MENU_SEND_OUT] = {gText_SendOut, CursorCb_SendMon},
[MENU_ENTER] = {gText_Enter, CursorCb_Enter},
[MENU_NO_ENTRY] = {gText_NoEntry, CursorCb_NoEntry},
[MENU_STORE] = {gText_Store, CursorCb_Store},
[MENU_SHIFT] = {COMPOUND_STRING("SHIFT"), CursorCb_SendMon},
[MENU_SEND_OUT] = {COMPOUND_STRING("SEND OUT"), CursorCb_SendMon},
[MENU_ENTER] = {COMPOUND_STRING("ENTER"), CursorCb_Enter},
[MENU_NO_ENTRY] = {COMPOUND_STRING("NO ENTRY"), CursorCb_NoEntry},
[MENU_STORE] = {COMPOUND_STRING("STORE"), CursorCb_Store},
[MENU_REGISTER] = {gText_Register, CursorCb_Register},
[MENU_TRADE1] = {gText_Trade4, CursorCb_Trade1},
[MENU_TRADE2] = {gText_Trade4, CursorCb_Trade2},
[MENU_TRADE1] = {sText_Trade4, CursorCb_Trade1},
[MENU_TRADE2] = {sText_Trade4, CursorCb_Trade2},
[MENU_TOSS] = {gMenuText_Toss, CursorCb_Toss},
[MENU_CATALOG_BULB] = {gText_LightBulb, CursorCb_CatalogBulb},
[MENU_CATALOG_OVEN] = {gText_MicrowaveOven, CursorCb_CatalogOven},
[MENU_CATALOG_WASHING] = {gText_WashingMachine, CursorCb_CatalogWashing},
[MENU_CATALOG_FRIDGE] = {gText_Refrigerator, CursorCb_CatalogFridge},
[MENU_CATALOG_FAN] = {gText_ElectricFan, CursorCb_CatalogFan},
[MENU_CATALOG_MOWER] = {gText_LawnMower, CursorCb_CatalogMower},
[MENU_CHANGE_FORM] = {gText_ChangeForm, CursorCb_ChangeForm},
[MENU_CHANGE_ABILITY] = {gText_ChangeAbility, CursorCb_ChangeAbility},
[MENU_CATALOG_BULB] = {COMPOUND_STRING("Light bulb"), CursorCb_CatalogBulb},
[MENU_CATALOG_OVEN] = {COMPOUND_STRING("Microwave oven"), CursorCb_CatalogOven},
[MENU_CATALOG_WASHING] = {COMPOUND_STRING("Washing machine"), CursorCb_CatalogWashing},
[MENU_CATALOG_FRIDGE] = {COMPOUND_STRING("Refrigerator"), CursorCb_CatalogFridge},
[MENU_CATALOG_FAN] = {COMPOUND_STRING("Electric fan"), CursorCb_CatalogFan},
[MENU_CATALOG_MOWER] = {COMPOUND_STRING("Lawn mower"), CursorCb_CatalogMower},
[MENU_CHANGE_FORM] = {COMPOUND_STRING("Change form"), CursorCb_ChangeForm},
[MENU_CHANGE_ABILITY] = {COMPOUND_STRING("Change Ability"), CursorCb_ChangeAbility},
};
static const u8 sPartyMenuAction_SummarySwitchCancel[] = {MENU_SUMMARY, MENU_SWITCH, MENU_CANCEL1};

View File

@ -212,6 +212,12 @@ static void ConfirmSell(u8);
static void CancelSell(u8);
static void Task_FadeAndCloseBagMenuIfMulch(u8 taskId);
static const u8 sText_Var1CantBeHeldHere[] = _("The {STR_VAR_1} can't be held\nhere.");
static const u8 sText_DepositHowManyVar1[] = _("Deposit how many\n{STR_VAR_1}?");
static const u8 sText_DepositedVar2Var1s[] = _("Deposited {STR_VAR_2}\n{STR_VAR_1}.");
static const u8 sText_NoRoomForItems[] = _("There's no room to\nstore items.");
static const u8 sText_CantStoreImportantItems[] = _("Important items\ncan't be stored in\nthe PC!");
static const struct BgTemplate sBgTemplates_ItemMenu[] =
{
{
@ -266,20 +272,20 @@ static const struct ListMenuTemplate sItemListMenu =
};
static const struct MenuAction sItemMenuActions[] = {
[ACTION_USE] = {gMenuText_Use, {ItemMenu_UseOutOfBattle}},
[ACTION_TOSS] = {gMenuText_Toss, {ItemMenu_Toss}},
[ACTION_REGISTER] = {gMenuText_Register, {ItemMenu_Register}},
[ACTION_GIVE] = {gMenuText_Give, {ItemMenu_Give}},
[ACTION_CANCEL] = {gText_Cancel2, {ItemMenu_Cancel}},
[ACTION_BATTLE_USE] = {gMenuText_Use, {ItemMenu_UseInBattle}},
[ACTION_CHECK] = {gMenuText_Check, {ItemMenu_UseOutOfBattle}},
[ACTION_WALK] = {gMenuText_Walk, {ItemMenu_UseOutOfBattle}},
[ACTION_DESELECT] = {gMenuText_Deselect, {ItemMenu_Register}},
[ACTION_CHECK_TAG] = {gMenuText_CheckTag, {ItemMenu_CheckTag}},
[ACTION_CONFIRM] = {gMenuText_Confirm, {Task_FadeAndCloseBagMenu}},
[ACTION_SHOW] = {gMenuText_Show, {ItemMenu_Show}},
[ACTION_GIVE_FAVOR_LADY] = {gMenuText_Give2, {ItemMenu_GiveFavorLady}},
[ACTION_CONFIRM_QUIZ_LADY] = {gMenuText_Confirm, {ItemMenu_ConfirmQuizLady}},
[ACTION_USE] = {gMenuText_Use, {ItemMenu_UseOutOfBattle}},
[ACTION_TOSS] = {gMenuText_Toss, {ItemMenu_Toss}},
[ACTION_REGISTER] = {gMenuText_Register, {ItemMenu_Register}},
[ACTION_GIVE] = {gMenuText_Give, {ItemMenu_Give}},
[ACTION_CANCEL] = {gText_Cancel2, {ItemMenu_Cancel}},
[ACTION_BATTLE_USE] = {gMenuText_Use, {ItemMenu_UseInBattle}},
[ACTION_CHECK] = {COMPOUND_STRING("CHECK"), {ItemMenu_UseOutOfBattle}},
[ACTION_WALK] = {COMPOUND_STRING("WALK"), {ItemMenu_UseOutOfBattle}},
[ACTION_DESELECT] = {COMPOUND_STRING("CHECK TAG"), {ItemMenu_Register}},
[ACTION_CHECK_TAG] = {COMPOUND_STRING("DESELECT"), {ItemMenu_CheckTag}},
[ACTION_CONFIRM] = {gMenuText_Confirm, {Task_FadeAndCloseBagMenu}},
[ACTION_SHOW] = {COMPOUND_STRING("SHOW"), {ItemMenu_Show}},
[ACTION_GIVE_FAVOR_LADY] = {gMenuText_Give2, {ItemMenu_GiveFavorLady}},
[ACTION_CONFIRM_QUIZ_LADY] = {gMenuText_Confirm, {ItemMenu_ConfirmQuizLady}},
[ACTION_DUMMY] = {gText_EmptyString2, {NULL}}
};
@ -2038,7 +2044,7 @@ static void Task_ItemContext_GiveToParty(u8 taskId)
else if (!IsHoldingItemAllowed(gSpecialVar_ItemId))
{
CopyItemName(gSpecialVar_ItemId, gStringVar1);
StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeldHere);
StringExpandPlaceholders(gStringVar4, sText_Var1CantBeHeldHere);
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, HandleErrorMessage);
}
else if (gBagPosition.pocket != KEYITEMS_POCKET && !ItemId_GetImportance(gSpecialVar_ItemId))
@ -2236,7 +2242,7 @@ static void Task_ItemContext_Deposit(u8 taskId)
{
u8 *end = CopyItemNameHandlePlural(gSpecialVar_ItemId, gStringVar1, 2);
WrapFontIdToFit(gStringVar1, end, FONT_NORMAL, WindowWidthPx(WIN_DESCRIPTION) - 10 - 6);
StringExpandPlaceholders(gStringVar4, gText_DepositHowManyVar1);
StringExpandPlaceholders(gStringVar4, sText_DepositHowManyVar1);
FillWindowPixelBuffer(WIN_DESCRIPTION, PIXEL_FILL(0));
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
AddItemQuantityWindow(ITEMWIN_QUANTITY);
@ -2276,7 +2282,7 @@ static void TryDepositItem(u8 taskId)
if (ItemId_GetImportance(gSpecialVar_ItemId))
{
// Can't deposit important items
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, COLORID_NORMAL);
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, sText_CantStoreImportantItems, 3, 1, 0, 0, 0, COLORID_NORMAL);
gTasks[taskId].func = WaitDepositErrorMessage;
}
else if (AddPCItem(gSpecialVar_ItemId, tItemCount) == TRUE)
@ -2285,14 +2291,14 @@ static void TryDepositItem(u8 taskId)
u8 *end = CopyItemNameHandlePlural(gSpecialVar_ItemId, gStringVar1, tItemCount);
WrapFontIdToFit(gStringVar1, end, FONT_NORMAL, WindowWidthPx(WIN_DESCRIPTION) - 10 - 6);
ConvertIntToDecimalStringN(gStringVar2, tItemCount, STR_CONV_MODE_LEFT_ALIGN, MAX_ITEM_DIGITS);
StringExpandPlaceholders(gStringVar4, gText_DepositedVar2Var1s);
StringExpandPlaceholders(gStringVar4, sText_DepositedVar2Var1s);
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gStringVar4, 3, 1, 0, 0, 0, COLORID_NORMAL);
gTasks[taskId].func = Task_RemoveItemFromBag;
}
else
{
// No room to deposit
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, gText_NoRoomForItems, 3, 1, 0, 0, 0, COLORID_NORMAL);
BagMenu_Print(WIN_DESCRIPTION, FONT_NORMAL, sText_NoRoomForItems, 3, 1, 0, 0, 0, COLORID_NORMAL);
gTasks[taskId].func = WaitDepositErrorMessage;
}
}

View File

@ -80,6 +80,21 @@ static void CB2_OpenPokeblockFromBag(void);
static void ItemUseOnFieldCB_Honey(u8 taskId);
static bool32 IsValidLocationForVsSeeker(void);
static const u8 sText_CantDismountBike[] = _("You can't dismount your BIKE here.{PAUSE_UNTIL_PRESS}");
static const u8 sText_ItemFinderNearby[] = _("Huh?\nThe ITEMFINDER's responding!\pThere's an item buried around here!{PAUSE_UNTIL_PRESS}");
static const u8 sText_ItemFinderOnTop[] = _("Oh!\nThe ITEMFINDER's shaking wildly!{PAUSE_UNTIL_PRESS}");
static const u8 sText_ItemFinderNothing[] = _("… … … …Nope!\nThere's no response.{PAUSE_UNTIL_PRESS}");
static const u8 sText_CoinCase[] = _("Your COINS:\n{STR_VAR_1}{PAUSE_UNTIL_PRESS}");
static const u8 sText_PowderQty[] = _("POWDER QTY: {STR_VAR_1}{PAUSE_UNTIL_PRESS}");
static const u8 sText_BootedUpTM[] = _("Booted up a TM.");
static const u8 sText_BootedUpHM[] = _("Booted up an HM.");
static const u8 sText_TMHMContainedVar1[] = _("It contained\n{STR_VAR_1}.\pTeach {STR_VAR_1}\nto a POKéMON?");
static const u8 sText_UsedVar2WildLured[] = _("{PLAYER} used the\n{STR_VAR_2}.\pWild POKéMON will be lured.{PAUSE_UNTIL_PRESS}");
static const u8 sText_UsedVar2WildRepelled[] = _("{PLAYER} used the\n{STR_VAR_2}.\pWild POKéMON will be repelled.{PAUSE_UNTIL_PRESS}");
static const u8 sText_PlayedPokeFluteCatchy[] = _("Played the POKé FLUTE.\pNow, that's a catchy tune!{PAUSE_UNTIL_PRESS}");
static const u8 sText_PlayedPokeFlute[] = _("Played the POKé FLUTE.");
static const u8 sText_PokeFluteAwakenedMon[] = _("The POKé FLUTE awakened sleeping\nPOKéMON.{PAUSE_UNTIL_PRESS}");
// EWRAM variables
EWRAM_DATA static void(*sItemUseOnFieldCB)(u8 taskId) = NULL;
@ -168,7 +183,7 @@ void DisplayDadsAdviceCannotUseItemMessage(u8 taskId, bool8 isUsingRegisteredKey
static void DisplayCannotDismountBikeMessage(u8 taskId, bool8 isUsingRegisteredKeyItemOnField)
{
DisplayCannotUseItemMessage(taskId, isUsingRegisteredKeyItemOnField, gText_CantDismountBike);
DisplayCannotUseItemMessage(taskId, isUsingRegisteredKeyItemOnField, sText_CantDismountBike);
}
static void Task_CloseCantUseKeyItemMessage(u8 taskId)
@ -322,7 +337,7 @@ static void ItemUseOnFieldCB_Itemfinder(u8 taskId)
if (ItemfinderCheckForHiddenItems(gMapHeader.events, taskId) == TRUE)
gTasks[taskId].func = Task_UseItemfinder;
else
DisplayItemMessageOnField(taskId, gText_ItemFinderNothing, Task_CloseItemfinderMessage);
DisplayItemMessageOnField(taskId, sText_ItemFinderNothing, Task_CloseItemfinderMessage);
}
// Define itemfinder task data
@ -615,7 +630,7 @@ static void PlayerFaceHiddenItem(u8 direction)
static void Task_HiddenItemNearby(u8 taskId)
{
if (ObjectEventCheckHeldMovementStatus(&gObjectEvents[GetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_PLAYER, 0, 0)]) == TRUE)
DisplayItemMessageOnField(taskId, gText_ItemFinderNearby, Task_CloseItemfinderMessage);
DisplayItemMessageOnField(taskId, sText_ItemFinderNearby, Task_CloseItemfinderMessage);
}
static void Task_StandingOnHiddenItem(u8 taskId)
@ -632,7 +647,7 @@ static void Task_StandingOnHiddenItem(u8 taskId)
tCounter++;
if (tCounter == 4)
DisplayItemMessageOnField(taskId, gText_ItemFinderOnTop, Task_CloseItemfinderMessage);
DisplayItemMessageOnField(taskId, sText_ItemFinderOnTop, Task_CloseItemfinderMessage);
}
}
@ -693,7 +708,7 @@ static void Task_AccessPokemonBoxLink(u8 taskId)
void ItemUseOutOfBattle_CoinCase(u8 taskId)
{
ConvertIntToDecimalStringN(gStringVar1, GetCoins(), STR_CONV_MODE_LEFT_ALIGN, 4);
StringExpandPlaceholders(gStringVar4, gText_CoinCase);
StringExpandPlaceholders(gStringVar4, sText_CoinCase);
if (!gTasks[taskId].tUsingRegisteredKeyItem)
{
@ -708,7 +723,7 @@ void ItemUseOutOfBattle_CoinCase(u8 taskId)
void ItemUseOutOfBattle_PowderJar(u8 taskId)
{
ConvertIntToDecimalStringN(gStringVar1, GetBerryPowder(), STR_CONV_MODE_LEFT_ALIGN, 5);
StringExpandPlaceholders(gStringVar4, gText_PowderQty);
StringExpandPlaceholders(gStringVar4, sText_PowderQty);
if (!gTasks[taskId].tUsingRegisteredKeyItem)
{
@ -858,9 +873,9 @@ void ItemUseOutOfBattle_DynamaxCandy(u8 taskId)
void ItemUseOutOfBattle_TMHM(u8 taskId)
{
if (gSpecialVar_ItemId >= ITEM_HM01)
DisplayItemMessage(taskId, FONT_NORMAL, gText_BootedUpHM, BootUpSoundTMHM); // HM
DisplayItemMessage(taskId, FONT_NORMAL, sText_BootedUpHM, BootUpSoundTMHM); // HM
else
DisplayItemMessage(taskId, FONT_NORMAL, gText_BootedUpTM, BootUpSoundTMHM); // TM
DisplayItemMessage(taskId, FONT_NORMAL, sText_BootedUpTM, BootUpSoundTMHM); // TM
}
static void BootUpSoundTMHM(u8 taskId)
@ -874,7 +889,7 @@ static void Task_ShowTMHMContainedMessage(u8 taskId)
if (JOY_NEW(A_BUTTON | B_BUTTON))
{
StringCopy(gStringVar1, GetMoveName(ItemIdToBattleMoveId(gSpecialVar_ItemId)));
StringExpandPlaceholders(gStringVar4, gText_TMHMContainedVar1);
StringExpandPlaceholders(gStringVar4, sText_TMHMContainedVar1);
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, UseTMHMYesNo);
}
}
@ -1015,13 +1030,13 @@ void ItemUseOutOfBattle_BlackWhiteFlute(u8 taskId)
{
FlagSet(FLAG_SYS_ENC_UP_ITEM);
FlagClear(FLAG_SYS_ENC_DOWN_ITEM);
StringExpandPlaceholders(gStringVar4, gText_UsedVar2WildLured);
StringExpandPlaceholders(gStringVar4, sText_UsedVar2WildLured);
}
else
{
FlagSet(FLAG_SYS_ENC_DOWN_ITEM);
FlagClear(FLAG_SYS_ENC_UP_ITEM);
StringExpandPlaceholders(gStringVar4, gText_UsedVar2WildRepelled);
StringExpandPlaceholders(gStringVar4, sText_UsedVar2WildRepelled);
}
gTasks[taskId].data[8] = 0;
gTasks[taskId].func = Task_UsedBlackWhiteFlute;
@ -1504,9 +1519,9 @@ static void Task_DisplayPokeFluteMessage(u8 taskId)
if (WaitFanfare(FALSE))
{
if (gTasks[taskId].data[3] == 0)
DisplayItemMessage(taskId, FONT_NORMAL, gText_PokeFluteAwakenedMon, CloseItemMessage);
DisplayItemMessage(taskId, FONT_NORMAL, sText_PokeFluteAwakenedMon, CloseItemMessage);
else
DisplayItemMessageOnField(taskId, gText_PokeFluteAwakenedMon, Task_CloseCantUseKeyItemMessage);
DisplayItemMessageOnField(taskId, sText_PokeFluteAwakenedMon, Task_CloseCantUseKeyItemMessage);
}
}
@ -1530,16 +1545,16 @@ void ItemUseOutOfBattle_PokeFlute(u8 taskId)
if (wokeSomeoneUp)
{
if (gTasks[taskId].data[3] == 0)
DisplayItemMessage(taskId, FONT_NORMAL, gText_PlayedPokeFlute, Task_PlayPokeFlute);
DisplayItemMessage(taskId, FONT_NORMAL, sText_PlayedPokeFlute, Task_PlayPokeFlute);
else
DisplayItemMessageOnField(taskId, gText_PlayedPokeFlute, Task_PlayPokeFlute);
DisplayItemMessageOnField(taskId, sText_PlayedPokeFlute, Task_PlayPokeFlute);
}
else
{
if (gTasks[taskId].data[3] == 0)
DisplayItemMessage(taskId, FONT_NORMAL, gText_PlayedPokeFluteCatchy, CloseItemMessage);
DisplayItemMessage(taskId, FONT_NORMAL, sText_PlayedPokeFluteCatchy, CloseItemMessage);
else
DisplayItemMessageOnField(taskId, gText_PlayedPokeFluteCatchy, Task_CloseCantUseKeyItemMessage);
DisplayItemMessageOnField(taskId, sText_PlayedPokeFluteCatchy, Task_CloseCantUseKeyItemMessage);
}
}

View File

@ -181,20 +181,30 @@ static EWRAM_DATA u8 sTopMenuNumOptions = 0;
EWRAM_DATA struct PlayerPCItemPageStruct gPlayerPCItemPageInfo = {};
static EWRAM_DATA struct ItemStorageMenu *sItemStorageMenu = NULL;
static const u8 sText_WithdrawItem[] = _("WITHDRAW ITEM");
static const u8 sText_DepositItem[] = _("DEPOSIT ITEM");
static const u8 sText_TossItem[] = _("TOSS ITEM");
static const u8 sText_Mailbox[] = _("MAILBOX");
static const u8 sText_WithdrawHowManyItems[] = _("Withdraw how many\n{STR_VAR_1}?");
static const u8 sText_WithdrawXItems[] = _("Withdrew {STR_VAR_2}\n{STR_VAR_1}.");
static const u8 sText_NoRoomInBag[] = _("There is no more\nroom in the BAG.");
static const u8 sText_TooImportantToToss[] = _("That's much too\nimportant to toss\nout!");
static const u8 *const sItemStorage_OptionDescriptions[] =
{
[MENU_WITHDRAW] = gText_TakeOutItemsFromPC,
[MENU_DEPOSIT] = gText_StoreItemsInPC,
[MENU_TOSS] = gText_ThrowAwayItemsInPC,
[MENU_WITHDRAW] = COMPOUND_STRING("Take out items from the PC."),
[MENU_DEPOSIT] = COMPOUND_STRING("Store items in the PC."),
[MENU_TOSS] = COMPOUND_STRING("Throw away items stored in the PC."),
[MENU_EXIT] = gText_GoBackPrevMenu,
};
static const struct MenuAction sPlayerPCMenuActions[] =
{
[MENU_ITEMSTORAGE] = { gText_ItemStorage, {PlayerPC_ItemStorage} },
[MENU_MAILBOX] = { gText_Mailbox, {PlayerPC_Mailbox} },
[MENU_DECORATION] = { gText_Decoration, {PlayerPC_Decoration} },
[MENU_TURNOFF] = { gText_TurnOff, {PlayerPC_TurnOff} }
[MENU_ITEMSTORAGE] = { COMPOUND_STRING("ITEM STORAGE"), {PlayerPC_ItemStorage} },
[MENU_MAILBOX] = { sText_Mailbox, {PlayerPC_Mailbox} },
[MENU_DECORATION] = { COMPOUND_STRING("DECORATION"), {PlayerPC_Decoration} },
[MENU_TURNOFF] = { COMPOUND_STRING("TURN OFF"), {PlayerPC_TurnOff} }
};
static const u8 sBedroomPC_OptionOrder[] =
@ -216,9 +226,9 @@ static const u8 sPlayerPC_OptionOrder[] =
static const struct MenuAction sItemStorage_MenuActions[] =
{
[MENU_WITHDRAW] = { gText_WithdrawItem, {ItemStorage_Withdraw} },
[MENU_DEPOSIT] = { gText_DepositItem, {ItemStorage_Deposit} },
[MENU_TOSS] = { gText_TossItem, {ItemStorage_Toss} },
[MENU_WITHDRAW] = { sText_WithdrawItem, {ItemStorage_Withdraw} },
[MENU_DEPOSIT] = { sText_DepositItem, {ItemStorage_Deposit} },
[MENU_TOSS] = { sText_TossItem, {ItemStorage_Toss} },
[MENU_EXIT] = { gText_Cancel, {ItemStorage_Exit} }
};
@ -230,10 +240,10 @@ static const u16 sNewGamePCItems[][2] =
const struct MenuAction gMailboxMailOptions[] =
{
{ gText_Read, {Mailbox_DoMailRead} },
{ gText_MoveToBag, {Mailbox_MoveToBag} },
{ gText_Give2, {Mailbox_Give} },
{ gText_Cancel2, {Mailbox_Cancel} }
{ COMPOUND_STRING("READ"), {Mailbox_DoMailRead} },
{ COMPOUND_STRING("MOVE TO BAG"), {Mailbox_MoveToBag} },
{ COMPOUND_STRING("GIVE"), {Mailbox_Give} },
{ gText_Cancel2, {Mailbox_Cancel} }
};
static const struct WindowTemplate sWindowTemplates_MainMenus[] =
@ -697,7 +707,7 @@ static void Mailbox_DrawMailboxMenu(u8 taskId)
{
u8 windowId = MailboxMenu_AddWindow(MAILBOXWIN_TITLE);
MailboxMenu_AddWindow(MAILBOXWIN_LIST);
AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Mailbox, GetStringCenterAlignXOffset(FONT_NORMAL, gText_Mailbox, 0x40), 1, 0, NULL);
AddTextPrinterParameterized(windowId, FONT_NORMAL, sText_Mailbox, GetStringCenterAlignXOffset(FONT_NORMAL, sText_Mailbox, 0x40), 1, 0, NULL);
ScheduleBgCopyTilemapToVram(0);
gTasks[taskId].tListTaskId = MailboxMenu_CreateList(&gPlayerPCItemPageInfo);
MailboxMenu_AddScrollArrows(&gPlayerPCItemPageInfo);
@ -1145,9 +1155,9 @@ static void ItemStorage_CreateListMenu(u8 taskId)
for (i = 0; i <= ITEMPC_WIN_LIST_END; i++)
ItemStorage_AddWindow(i);
toss = tInTossMenu;
text = gText_TossItem;
text = sText_TossItem;
if (!toss)
text = gText_WithdrawItem;
text = sText_WithdrawItem;
x = GetStringCenterAlignXOffset(FONT_NORMAL, text, 104);
AddTextPrinterParameterized(sItemStorageMenu->windowIds[ITEMPC_WIN_TITLE], FONT_NORMAL, text, x, 1, 0, NULL);
CopyWindowToVram(sItemStorageMenu->windowIds[ITEMPC_WIN_ICON], COPYWIN_GFX);
@ -1170,10 +1180,10 @@ static const u8 *ItemStorage_GetMessage(u16 itemId)
string = gText_GoBackPrevMenu;
break;
case MSG_HOW_MANY_TO_WITHDRAW:
string = gText_WithdrawHowManyItems;
string = sText_WithdrawHowManyItems;
break;
case MSG_WITHDREW_ITEM:
string = gText_WithdrawXItems;
string = sText_WithdrawXItems;
break;
case MSG_HOW_MANY_TO_TOSS:
string = gText_TossHowManyVar1s;
@ -1182,10 +1192,10 @@ static const u8 *ItemStorage_GetMessage(u16 itemId)
string = gText_ThrewAwayVar2Var1s;
break;
case MSG_NO_MORE_ROOM:
string = gText_NoRoomInBag;
string = sText_NoRoomInBag;
break;
case MSG_TOO_IMPORTANT:
string = gText_TooImportantToToss;
string = sText_TooImportantToToss;
break;
case MSG_OKAY_TO_THROW_AWAY:
string = gText_ConfirmTossItems;

View File

@ -126,21 +126,11 @@ const u8 gMenuText_Use[] = _("USE");
const u8 gMenuText_Toss[] = _("TOSS");
const u8 gMenuText_Register[] = _("REGISTER");
const u8 gMenuText_Give[] = _("GIVE");
const u8 gMenuText_CheckTag[] = _("CHECK TAG");
const u8 gMenuText_Confirm[] = _("CONFIRM");
const u8 gMenuText_Walk[] = _("WALK");
const u8 gText_Cancel[] = _("CANCEL");
const u8 gText_Cancel2[] = _("CANCEL");
const u8 gMenuText_Show[] = _("SHOW");
const u8 gText_EmptyString2[] = _("");
const u8 gText_Cancel7[] = _("CANCEL"); // Unused
const u8 gText_Item[] = _("ITEM");
const u8 gText_Mail[] = _("MAIL");
const u8 gText_Take[] = _("TAKE");
const u8 gText_Store[] = _("STORE");
const u8 gMenuText_Check[] = _("CHECK");
const u8 gText_None[] = _("NONE");
const u8 gMenuText_Deselect[] = _("DESELECT");
const u8 gText_FiveMarks[] = _("?????");
const u8 gText_Slash[] = _("/");
const u8 gText_OneDash[] = _("-");
@ -166,39 +156,19 @@ const u8 gText_CantWriteMail[] = _("You can't write\nMAIL here.");
const u8 gText_NoPokemon[] = _("There is no\nPOKéMON.");
const u8 gText_MoveVar1Where[] = _("Move the\n{STR_VAR_1}\nwhere?");
const u8 gText_Var1CantBeHeld[] = _("The {STR_VAR_1} can't be held.");
const u8 gText_Var1CantBeHeldHere[] = _("The {STR_VAR_1} can't be held\nhere.");
const u8 gText_DepositHowManyVar1[] = _("Deposit how many\n{STR_VAR_1}?");
const u8 gText_DepositedVar2Var1s[] = _("Deposited {STR_VAR_2}\n{STR_VAR_1}.");
const u8 gText_NoRoomForItems[] = _("There's no room to\nstore items.");
const u8 gText_CantStoreImportantItems[] = _("Important items\ncan't be stored in\nthe PC!");
const u8 gText_TooImportantToToss[] = _("That's much too\nimportant to toss\nout!");
const u8 gText_TossHowManyVar1s[] = _("Toss out how many\n{STR_VAR_1}?");
const u8 gText_ThrewAwayVar2Var1s[] = _("Threw away {STR_VAR_2}\n{STR_VAR_1}.");
const u8 gText_ConfirmTossItems[] = _("Is it okay to\nthrow away {STR_VAR_2}\n{STR_VAR_1}?");
const u8 gText_DadsAdvice[] = _("DAD's advice…\n{PLAYER}, there's a time and place for\leverything!{PAUSE_UNTIL_PRESS}");
const u8 gText_CantDismountBike[] = _("You can't dismount your BIKE here.{PAUSE_UNTIL_PRESS}");
const u8 gText_ItemFinderNearby[] = _("Huh?\nThe ITEMFINDER's responding!\pThere's an item buried around here!{PAUSE_UNTIL_PRESS}");
const u8 gText_ItemFinderOnTop[] = _("Oh!\nThe ITEMFINDER's shaking wildly!{PAUSE_UNTIL_PRESS}");
const u8 gText_ItemFinderNothing[] = _("… … … …Nope!\nThere's no response.{PAUSE_UNTIL_PRESS}");
const u8 gText_CoinCase[] = _("Your COINS:\n{STR_VAR_1}{PAUSE_UNTIL_PRESS}");
const u8 gText_BootedUpTM[] = _("Booted up a TM.");
const u8 gText_BootedUpHM[] = _("Booted up an HM.");
const u8 gText_TMHMContainedVar1[] = _("It contained\n{STR_VAR_1}.\pTeach {STR_VAR_1}\nto a POKéMON?");
const u8 gText_PlayerUsedVar2[] = _("{PLAYER} used the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}");
const u8 gText_RepelEffectsLingered[] = _("But the effects of a REPEL\nlingered from earlier.{PAUSE_UNTIL_PRESS}");
const u8 gText_LureEffectsLingered[] = _("But the effects of a Lure\nlingered from earlier.{PAUSE_UNTIL_PRESS}");
const u8 gText_UsedVar2WildLured[] = _("{PLAYER} used the\n{STR_VAR_2}.\pWild POKéMON will be lured.{PAUSE_UNTIL_PRESS}");
const u8 gText_UsedVar2WildRepelled[] = _("{PLAYER} used the\n{STR_VAR_2}.\pWild POKéMON will be repelled.{PAUSE_UNTIL_PRESS}");
const u8 gText_BoxFull[] = _("The BOX is full.{PAUSE_UNTIL_PRESS}");
const u8 gText_PowderQty[] = _("POWDER QTY: {STR_VAR_1}{PAUSE_UNTIL_PRESS}");
const u8 gText_TheField[] = _("the field");
const u8 gText_TheBattle[] = _("the battle");
const u8 gText_ThePokemonList[] = _("the POKéMON LIST");
const u8 gText_TheShop[] = _("the shop");
const u8 gText_ThePC[] = _("the PC");
const u8 gText_PlayedPokeFluteCatchy[] = _("Played the POKé FLUTE.\pNow, that's a catchy tune!{PAUSE_UNTIL_PRESS}");
const u8 gText_PlayedPokeFlute[] = _("Played the POKé FLUTE.");
const u8 gText_PokeFluteAwakenedMon[] = _("The POKé FLUTE awakened sleeping\nPOKéMON.{PAUSE_UNTIL_PRESS}");
const u8 *const gBagMenu_ReturnToStrings[] =
{
@ -266,16 +236,6 @@ const u8 gText_HowManyToSell[] = _("{STR_VAR_2}?\nHow many would you like to sel
const u8 gText_ICanPayVar1[] = _("I can pay ¥{STR_VAR_1}.\nWould that be okay?");
const u8 gText_TurnedOverVar1ForVar2[] = _("Turned over the {STR_VAR_2}\nand received ¥{STR_VAR_1}.");
const u8 gText_PokedollarVar1[] = _("¥{STR_VAR_1}");
const u8 gText_Shift[] = _("SHIFT");
const u8 gText_SendOut[] = _("SEND OUT");
const u8 gText_Switch2[] = _("SWITCH");
const u8 gText_Summary5[] = _("SUMMARY");
const u8 gText_Moves[] = _("MOVES"); // Unused
const u8 gText_Enter[] = _("ENTER");
const u8 gText_NoEntry[] = _("NO ENTRY");
const u8 gText_Take2[] = _("TAKE");
const u8 gText_Read2[] = _("READ");
const u8 gText_Trade4[] = _("TRADE");
const u8 gText_HP3[] = _("HP");
const u8 gText_SpAtk3[] = _("SP. ATK");
const u8 gText_SpDef3[] = _("SP. DEF");
@ -483,23 +443,7 @@ const u8 gText_Tristan[] = _("TRISTAN");
const u8 gText_Philip[] = _("PHILIP");
const u8 gText_Dennis[] = _("DENNIS");
const u8 gText_Roberto[] = _("ROBERTO");
const u8 gText_TurnOff[] = _("TURN OFF");
const u8 gText_Decoration[] = _("DECORATION");
const u8 gText_ItemStorage[] = _("ITEM STORAGE");
const u8 gText_Mailbox[] = _("MAILBOX");
const u8 gText_DepositItem[] = _("DEPOSIT ITEM");
const u8 gText_WithdrawItem[] = _("WITHDRAW ITEM");
const u8 gText_TossItem[] = _("TOSS ITEM");
const u8 gText_StoreItemsInPC[] = _("Store items in the PC.");
const u8 gText_TakeOutItemsFromPC[] = _("Take out items from the PC.");
const u8 gText_ThrowAwayItemsInPC[] = _("Throw away items stored in the PC.");
const u8 gText_NoItems[] = _("There are no items.{PAUSE_UNTIL_PRESS}");
const u8 gText_NoRoomInBag[] = _("There is no more\nroom in the BAG.");
const u8 gText_WithdrawHowManyItems[] = _("Withdraw how many\n{STR_VAR_1}?");
const u8 gText_WithdrawXItems[] = _("Withdrew {STR_VAR_2}\n{STR_VAR_1}.");
const u8 gText_Read[] = _("READ");
const u8 gText_MoveToBag[] = _("MOVE TO BAG");
const u8 gText_Give2[] = _("GIVE");
const u8 gText_NoMailHere[] = _("There's no MAIL here.{PAUSE_UNTIL_PRESS}");
const u8 gText_WhatToDoWithVar1sMail[] = _("What would you like to do with\n{STR_VAR_1}'s MAIL?");
const u8 gText_MessageWillBeLost[] = _("The message will be lost.\nIs that okay?");
@ -1286,14 +1230,6 @@ const u8 gText_TrainerHill1F[] = _("1F");
const u8 gText_TrainerHill2F[] = _("2F");
const u8 gText_TrainerHill3F[] = _("3F");
const u8 gText_TrainerHill4F[] = _("4F");
const u8 gText_LightBulb[] = _("Light bulb");
const u8 gText_MicrowaveOven[] = _("Microwave oven");
const u8 gText_WashingMachine[] = _("Washing machine");
const u8 gText_Refrigerator[] = _("Refrigerator");
const u8 gText_ElectricFan[] = _("Electric fan");
const u8 gText_LawnMower[] = _("Lawn mower");
const u8 gText_ChangeForm[] = _("Change form");
const u8 gText_ChangeAbility[] = _("Change Ability");
const u8 gText_TeachWhichMoveToPkmn[] = _("Teach which move to\n{STR_VAR_1}?");
const u8 gText_MoveRelearnerTeachMoveConfirm[] = _("Teach {STR_VAR_2}?");
const u8 gText_MoveRelearnerPkmnLearnedMove[] = _("{STR_VAR_1} learned\n{STR_VAR_2}!");