pokeemerald/src/data/party_menu.h

1115 lines
33 KiB
C

static const struct BgTemplate sPartyMenuBgTemplates[] =
{
{
.bg = 0,
.charBaseIndex = 0,
.mapBaseIndex = 31,
.screenSize = 0,
.paletteMode = 0,
.priority = 1,
.baseTile = 0
},
{
.bg = 1,
.charBaseIndex = 0,
.mapBaseIndex = 30,
.screenSize = 0,
.paletteMode = 0,
.priority = 2,
.baseTile = 0
},
{
.bg = 2,
.charBaseIndex = 0,
.mapBaseIndex = 28,
.screenSize = 1,
.paletteMode = 0,
.priority = 0,
.baseTile = 0
},
};
static const struct PartyMenuBoxInfoRects sPartyBoxInfoRects[] =
{
[PARTY_BOX_LEFT_COLUMN] =
{
BlitBitmapToPartyWindow_LeftColumn,
{
//The below are the x, y, width, and height for each of the following info
24, 11, 40, 13, // Nickname
32, 20, 32, 8, // Level
64, 20, 8, 8, // Gender
38, 37, 24, 8, // HP
53, 37, 24, 8, // Max HP
24, 35, 48, 3 // HP bar
},
12, 34, 64, 16 // Description text (e.g. NO USE)
},
[PARTY_BOX_RIGHT_COLUMN] =
{
BlitBitmapToPartyWindow_RightColumn,
{
// See above comment
22, 3, 40, 13, // Nickname
30, 12, 32, 8, // Level
62, 12, 8, 8, // Gender
102, 12, 24, 8, // HP
117, 12, 24, 8, // Max HP
88, 10, 48, 3 // HP bar
},
77, 4, 64, 16 // Description text
},
};
// Each layout array has an array for each of the 6 party slots
// The array for each slot has the sprite coords of its various sprites in the following order
// Pokémon icon (x, y), held item (x, y), status condition (x, y), menu Poké Ball (x, y)
static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] =
{
[PARTY_LAYOUT_SINGLE] =
{
{ 16, 40, 20, 50, 50, 52, 16, 34},
{104, 18, 108, 28, 136, 27, 102, 25},
{104, 42, 108, 52, 136, 51, 102, 49},
{104, 66, 108, 76, 136, 75, 102, 73},
{104, 90, 108, 100, 136, 99, 102, 97},
{104, 114, 108, 124, 136, 123, 102, 121},
},
[PARTY_LAYOUT_DOUBLE] =
{
{16, 24, 20, 34, 50, 36, 16, 18},
{16, 80, 20, 90, 50, 92, 16, 74},
{104, 18, 108, 28, 136, 27, 102, 25},
{104, 50, 108, 60, 136, 59, 102, 57},
{104, 82, 108, 92, 136, 91, 102, 89},
{104, 114, 108, 124, 136, 123, 102, 121},
},
[PARTY_LAYOUT_MULTI] =
{
{16, 24, 20, 34, 50, 36, 16, 18},
{16, 80, 20, 90, 50, 92, 16, 74},
{104, 26, 106, 36, 136, 35, 102, 33},
{104, 50, 106, 60, 136, 59, 102, 57},
{104, 82, 106, 92, 136, 91, 102, 89},
{104, 106, 106, 116, 136, 115, 102, 113},
},
[PARTY_LAYOUT_MULTI_SHOWCASE] =
{
{16, 32, 20, 42, 50, 44, 16, 26},
{104, 34, 106, 44, 136, 43, 102, 41},
{104, 58, 106, 68, 136, 67, 102, 65},
{16, 104, 20, 114, 50, 116, 16, 98},
{104, 106, 106, 116, 136, 115, 102, 113},
{104, 130, 106, 140, 136, 139, 102, 137},
},
};
// Used only when both Cancel and Confirm are present
static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/party_menu/confirm_button.bin");
static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/party_menu/cancel_button.bin");
// Text colors for BG, FG, and Shadow in that order
static const u8 sFontColorTable[][3] =
{
{TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GRAY, TEXT_COLOR_DARK_GRAY}, // Default
{TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_GREEN}, // Unused
{TEXT_COLOR_TRANSPARENT, TEXT_DYNAMIC_COLOR_2, TEXT_DYNAMIC_COLOR_3}, // Gender symbol
{TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}, // Selection actions
{TEXT_COLOR_WHITE, TEXT_COLOR_BLUE, TEXT_COLOR_LIGHT_BLUE}, // Field moves
{TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY}, // Unused
{TEXT_COLOR_WHITE, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED}, // Move relearner
};
static const struct WindowTemplate sSinglePartyMenuWindowTemplate[] =
{
{ // Party mon 1
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 3,
.width = 10,
.height = 7,
.paletteNum = 3,
.baseBlock = 0x63,
},
{ // Party mon 2
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 1,
.width = 18,
.height = 3,
.paletteNum = 4,
.baseBlock = 0xA9,
},
{ // Party mon 3
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 4,
.width = 18,
.height = 3,
.paletteNum = 5,
.baseBlock = 0xDF,
},
{ // Party mon 4
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 7,
.width = 18,
.height = 3,
.paletteNum = 6,
.baseBlock = 0x115,
},
{ // Party mon 5
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 10,
.width = 18,
.height = 3,
.paletteNum = 7,
.baseBlock = 0x14B,
},
{ // Party mon 6
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 13,
.width = 18,
.height = 3,
.paletteNum = 8,
.baseBlock = 0x181,
},
[WIN_MSG] = {
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 15,
.width = 28,
.height = 4,
.paletteNum = 14,
.baseBlock = 0x1DF,
},
DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sDoublePartyMenuWindowTemplate[] =
{
{ // Party mon 1
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 1,
.width = 10,
.height = 7,
.paletteNum = 3,
.baseBlock = 0x63,
},
{ // Party mon 2
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 8,
.width = 10,
.height = 7,
.paletteNum = 4,
.baseBlock = 0xA9,
},
{ // Party mon 3
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 1,
.width = 18,
.height = 3,
.paletteNum = 5,
.baseBlock = 0xEF,
},
{ // Party mon 4
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 5,
.width = 18,
.height = 3,
.paletteNum = 6,
.baseBlock = 0x125,
},
{ // Party mon 5
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 9,
.width = 18,
.height = 3,
.paletteNum = 7,
.baseBlock = 0x15B,
},
{ // Party mon 6
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 13,
.width = 18,
.height = 3,
.paletteNum = 8,
.baseBlock = 0x191,
},
[WIN_MSG] = {
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 15,
.width = 28,
.height = 4,
.paletteNum = 14,
.baseBlock = 0x1DF,
},
DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sMultiPartyMenuWindowTemplate[] =
{
{ // Party mon 1
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 1,
.width = 10,
.height = 7,
.paletteNum = 3,
.baseBlock = 0x63,
},
{ // Party mon 2
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 8,
.width = 10,
.height = 7,
.paletteNum = 4,
.baseBlock = 0xA9,
},
{ // Party mon 3
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 2,
.width = 18,
.height = 3,
.paletteNum = 5,
.baseBlock = 0xEF,
},
{ // Party mon 4
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 5,
.width = 18,
.height = 3,
.paletteNum = 6,
.baseBlock = 0x125,
},
{ // Party mon 5
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 9,
.width = 18,
.height = 3,
.paletteNum = 7,
.baseBlock = 0x15B,
},
{ // Party mon 6
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 12,
.width = 18,
.height = 3,
.paletteNum = 8,
.baseBlock = 0x191,
},
[WIN_MSG] = {
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 15,
.width = 28,
.height = 4,
.paletteNum = 14,
.baseBlock = 0x1DF,
},
DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sShowcaseMultiPartyMenuWindowTemplate[] =
{
{ // Party mon 1
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 2,
.width = 10,
.height = 7,
.paletteNum = 3,
.baseBlock = 0x63,
},
{ // Party mon 2
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 3,
.width = 18,
.height = 3,
.paletteNum = 5,
.baseBlock = 0xA9,
},
{ // Party mon 3
.bg = 0,
.tilemapLeft = 12,
.tilemapTop = 6,
.width = 18,
.height = 3,
.paletteNum = 6,
.baseBlock = 0xDF,
},
{ // Party mon 4
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 11,
.width = 10,
.height = 7,
.paletteNum = 4,
.baseBlock = 0x115,
},
{ // Party mon 5
.bg = 2,
.tilemapLeft = 12,
.tilemapTop = 12,
.width = 18,
.height = 3,
.paletteNum = 7,
.baseBlock = 0x16B,
},
{ // Party mon 6
.bg = 2,
.tilemapLeft = 12,
.tilemapTop = 15,
.width = 18,
.height = 3,
.paletteNum = 8,
.baseBlock = 0x1A1,
},
DUMMY_WIN_TEMPLATE
};
static const struct WindowTemplate sCancelButtonWindowTemplate =
{
.bg = 0,
.tilemapLeft = 24,
.tilemapTop = 17,
.width = 6,
.height = 2,
.paletteNum = 3,
.baseBlock = 0x1C7,
};
static const struct WindowTemplate sMultiCancelButtonWindowTemplate =
{
.bg = 0,
.tilemapLeft = 24,
.tilemapTop = 18,
.width = 6,
.height = 2,
.paletteNum = 3,
.baseBlock = 0x1C7,
};
static const struct WindowTemplate sConfirmButtonWindowTemplate =
{
.bg = 0,
.tilemapLeft = 24,
.tilemapTop = 16,
.width = 6,
.height = 2,
.paletteNum = 3,
.baseBlock = 0x1D3,
};
static const struct WindowTemplate sDefaultPartyMsgWindowTemplate =
{
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 17,
.width = 21,
.height = 2,
.paletteNum = 15,
.baseBlock = 0x24F,
};
static const struct WindowTemplate sDoWhatWithMonMsgWindowTemplate =
{
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 17,
.width = 16,
.height = 2,
.paletteNum = 15,
.baseBlock = 0x279,
};
static const struct WindowTemplate sDoWhatWithItemMsgWindowTemplate =
{
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 17,
.width = 20,
.height = 2,
.paletteNum = 15,
.baseBlock = 0x299,
};
static const struct WindowTemplate sDoWhatWithMailMsgWindowTemplate =
{
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 17,
.width = 18,
.height = 2,
.paletteNum = 15,
.baseBlock = 0x299,
};
static const struct WindowTemplate sWhichMoveMsgWindowTemplate =
{
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 17,
.width = 16,
.height = 2,
.paletteNum = 15,
.baseBlock = 0x299,
};
static const struct WindowTemplate sAlreadyHoldingOneMsgWindowTemplate =
{
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 15,
.width = 20,
.height = 4,
.paletteNum = 15,
.baseBlock = 0x299,
};
static const struct WindowTemplate sOrderWhichApplianceMsgWindowTemplate =
{
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 15,
.width = 14,
.height = 4,
.paletteNum = 15,
.baseBlock = 0x299,
};
static const struct WindowTemplate sItemGiveTakeWindowTemplate =
{
.bg = 2,
.tilemapLeft = 23,
.tilemapTop = 11,
.width = 6,
.height = 8,
.paletteNum = 14,
.baseBlock = 0x39D,
};
static const struct WindowTemplate sMailReadTakeWindowTemplate =
{
.bg = 2,
.tilemapLeft = 21,
.tilemapTop = 13,
.width = 8,
.height = 6,
.paletteNum = 14,
.baseBlock = 0x39D,
};
static const struct WindowTemplate sMoveSelectWindowTemplate =
{
.bg = 2,
.tilemapLeft = 19,
.tilemapTop = 11,
.width = 10,
.height = 8,
.paletteNum = 14,
.baseBlock = 0x2E9,
};
static const struct WindowTemplate sCatalogSelectWindowTemplate =
{
.bg = 2,
.tilemapLeft = 17,
.tilemapTop = 5,
.width = 12,
.height = 14,
.paletteNum = 14,
.baseBlock = 0x2E9,
};
static const struct WindowTemplate sZygardeCubeSelectWindowTemplate =
{
.bg = 2,
.tilemapLeft = 18,
.tilemapTop = 13,
.width = 11,
.height = 6,
.paletteNum = 14,
.baseBlock = 0x2E9,
};
static const struct WindowTemplate sPartyMenuYesNoWindowTemplate =
{
.bg = 2,
.tilemapLeft = 21,
.tilemapTop = 9,
.width = 5,
.height = 4,
.paletteNum = 14,
.baseBlock = 0x2E9,
};
static const struct WindowTemplate sLevelUpStatsWindowTemplate =
{
.bg = 2,
.tilemapLeft = 19,
.tilemapTop = 1,
.width = 10,
.height = 11,
.paletteNum = 14,
.baseBlock = 0x2E9,
};
static const struct WindowTemplate sWindowTemplate_FirstBattleOakVoiceover =
{
.bg = 2,
.tilemapLeft = 2,
.tilemapTop = 15,
.width = 27,
.height = 4,
.paletteNum = 14,
.baseBlock = 0x1DF,
};
static const struct WindowTemplate sUnusedWindowTemplate2 =
{
.bg = 2,
.tilemapLeft = 0,
.tilemapTop = 13,
.width = 18,
.height = 3,
.paletteNum = 12,
.baseBlock = 0x39D,
};
// Plain tilemaps for party menu slots.
// The versions with no HP bar are used by eggs, and in certain displays like registering at a battle facility.
// There is no empty version of the main slot because it shouldn't ever be empty.
static const u8 sSlotTilemap_Main[] = INCBIN_U8("graphics/party_menu/slot_main.bin");
static const u8 sSlotTilemap_MainNoHP[] = INCBIN_U8("graphics/party_menu/slot_main_no_hp.bin");
static const u8 sSlotTilemap_Wide[] = INCBIN_U8("graphics/party_menu/slot_wide.bin");
static const u8 sSlotTilemap_WideNoHP[] = INCBIN_U8("graphics/party_menu/slot_wide_no_hp.bin");
static const u8 sSlotTilemap_WideEmpty[] = INCBIN_U8("graphics/party_menu/slot_wide_empty.bin");
// Palette offsets
static const u8 sGenderPalOffsets[] = {11, 12};
static const u8 sHPBarPalOffsets[] = {9, 10};
static const u8 sPartyBoxPalOffsets1[] = {4, 5, 6};
static const u8 sPartyBoxPalOffsets2[] = {1, 7, 8};
static const u8 sPartyBoxNoMonPalOffsets[] = {1, 11, 12};
// Palette ids
static const u8 sGenderMalePalIds[] = {59, 60};
static const u8 sGenderFemalePalIds[] = {75, 76};
static const u8 sHPBarGreenPalIds[] = {57, 58};
static const u8 sHPBarYellowPalIds[] = {73, 74};
static const u8 sHPBarRedPalIds[] = {89, 90};
static const u8 sPartyBoxEmptySlotPalIds1[] = {52, 53, 54};
static const u8 sPartyBoxMultiPalIds1[] = {68, 69, 70};
static const u8 sPartyBoxFaintedPalIds1[] = {84, 85, 86};
static const u8 sPartyBoxCurrSelectionPalIds1[] = {116, 117, 118};
static const u8 sPartyBoxCurrSelectionMultiPalIds[] = {132, 133, 134};
static const u8 sPartyBoxCurrSelectionFaintedPalIds[] = {148, 149, 150};
static const u8 sPartyBoxSelectedForActionPalIds1[] = {100, 101, 102};
static const u8 sPartyBoxEmptySlotPalIds2[] = {49, 55, 56};
static const u8 sPartyBoxMultiPalIds2[] = {65, 71, 72};
static const u8 sPartyBoxFaintedPalIds2[] = {81, 87, 88};
static const u8 sPartyBoxCurrSelectionPalIds2[] = {97, 103, 104};
static const u8 sPartyBoxSelectedForActionPalIds2[] = {161, 167, 168};
static const u8 sPartyBoxNoMonPalIds[] = {17, 27, 28};
static const u8 *const sActionStringTable[] =
{
[PARTY_MSG_CHOOSE_MON] = gText_ChoosePokemon,
[PARTY_MSG_CHOOSE_MON_OR_CANCEL] = gText_ChoosePokemonCancel,
[PARTY_MSG_CHOOSE_MON_AND_CONFIRM] = gText_ChoosePokemonConfirm,
[PARTY_MSG_MOVE_TO_WHERE] = gText_MoveToWhere,
[PARTY_MSG_TEACH_WHICH_MON] = gText_TeachWhichPokemon,
[PARTY_MSG_USE_ON_WHICH_MON] = gText_UseOnWhichPokemon,
[PARTY_MSG_GIVE_TO_WHICH_MON] = gText_GiveToWhichPokemon,
[PARTY_MSG_NOTHING_TO_CUT] = gText_NothingToCut,
[PARTY_MSG_CANT_SURF_HERE] = gText_CantSurfHere,
[PARTY_MSG_ALREADY_SURFING] = gText_AlreadySurfing,
[PARTY_MSG_CURRENT_TOO_FAST] = gText_CurrentIsTooFast,
[PARTY_MSG_ENJOY_CYCLING] = gText_EnjoyCycling,
[PARTY_MSG_ALREADY_IN_USE] = gText_InUseAlready_PM,
[PARTY_MSG_CANT_USE_HERE] = gText_CantUseHere,
[PARTY_MSG_NO_MON_FOR_BATTLE] = gText_NoPokemonForBattle,
[PARTY_MSG_CHOOSE_MON_2] = gText_ChoosePokemon2,
[PARTY_MSG_NOT_ENOUGH_HP] = gText_NotEnoughHp,
[PARTY_MSG_X_MONS_ARE_NEEDED] = gText_PokemonAreNeeded,
[PARTY_MSG_MONS_CANT_BE_SAME] = gText_PokemonCantBeSame,
[PARTY_MSG_NO_SAME_HOLD_ITEMS] = gText_NoIdenticalHoldItems,
[PARTY_MSG_UNUSED] = gText_EmptyString2,
[PARTY_MSG_DO_WHAT_WITH_MON] = gText_DoWhatWithPokemon,
[PARTY_MSG_RESTORE_WHICH_MOVE] = gText_RestoreWhichMove,
[PARTY_MSG_BOOST_PP_WHICH_MOVE] = gText_BoostPp,
[PARTY_MSG_DO_WHAT_WITH_ITEM] = gText_DoWhatWithItem,
[PARTY_MSG_DO_WHAT_WITH_MAIL] = gText_DoWhatWithMail,
[PARTY_MSG_ALREADY_HOLDING_ONE] = gText_AlreadyHoldingOne,
[PARTY_MSG_WHICH_APPLIANCE] = gText_WhichAppliance,
[PARTY_MSG_CHOOSE_SECOND_FUSION] = gText_NextFusionMon,
[PARTY_MSG_NO_POKEMON] = COMPOUND_STRING("You have no POKéMON."),
[PARTY_MSG_CHOOSE_MON_FOR_BOX] = gText_SendWhichMonToPC,
[PARTY_MSG_MOVE_ITEM_WHERE] = gText_MoveItemWhere,
};
static const u8 *const sDescriptionStringTable[] =
{
[PARTYBOX_DESC_NO_USE] = gText_NoUse,
[PARTYBOX_DESC_ABLE_3] = gText_Able,
[PARTYBOX_DESC_FIRST] = gText_First_PM,
[PARTYBOX_DESC_SECOND] = gText_Second_PM,
[PARTYBOX_DESC_THIRD] = gText_Third_PM,
[PARTYBOX_DESC_FOURTH] = gText_Fourth,
[PARTYBOX_DESC_ABLE] = gText_Able2,
[PARTYBOX_DESC_NOT_ABLE] = gText_NotAble,
[PARTYBOX_DESC_ABLE_2] = gText_Able3,
[PARTYBOX_DESC_NOT_ABLE_2] = gText_NotAble2,
[PARTYBOX_DESC_LEARNED] = gText_Learned,
[PARTYBOX_DESC_HAVE] = gText_Have,
[PARTYBOX_DESC_DONT_HAVE] = gText_DontHave,
};
static const u16 sUnusedData[] =
{
0x0108, 0x0151, 0x0160, 0x015b, 0x002e, 0x005c, 0x0102, 0x0153, 0x014b, 0x00ed, 0x00f1, 0x010d, 0x003a, 0x003b, 0x003f, 0x0071,
0x00b6, 0x00f0, 0x00ca, 0x00db, 0x00da, 0x004c, 0x00e7, 0x0055, 0x0057, 0x0059, 0x00d8, 0x005b, 0x005e, 0x00f7, 0x0118, 0x0068,
0x0073, 0x015f, 0x0035, 0x00bc, 0x00c9, 0x007e, 0x013d, 0x014c, 0x0103, 0x0107, 0x0122, 0x009c, 0x00d5, 0x00a8, 0x00d3, 0x011d,
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] = {COMPOUND_STRING("SUMMARY"), CursorCb_Summary},
[MENU_SWITCH] = {COMPOUND_STRING("SWITCH"), CursorCb_Switch},
[MENU_CANCEL1] = {gText_Cancel2, CursorCb_Cancel1},
[MENU_ITEM] = {COMPOUND_STRING("ITEM"), CursorCb_Item},
[MENU_GIVE] = {gMenuText_Give, CursorCb_Give},
[MENU_TAKE_ITEM] = {COMPOUND_STRING("TAKE"), CursorCb_TakeItem},
[MENU_MOVE_ITEM] = {COMPOUND_STRING("MOVE"), CursorCb_MoveItem},
[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] = {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] = {sText_Trade4, CursorCb_Trade1},
[MENU_TRADE2] = {sText_Trade4, CursorCb_Trade2},
[MENU_TOSS] = {gMenuText_Toss, CursorCb_Toss},
[MENU_LEVEL_UP_MOVES] = {COMPOUND_STRING("LEVEL MOVES"), CursorCb_ChangeLevelUpMoves},
[MENU_EGG_MOVES] = {COMPOUND_STRING("EGG MOVES"), CursorCb_ChangeEggMoves},
[MENU_TM_MOVES] = {COMPOUND_STRING("TM MOVES"), CursorCb_ChangeTMMoves},
[MENU_TUTOR_MOVES] = {COMPOUND_STRING("TUTOR MOVES"), CursorCb_ChangeTutorMoves},
[MENU_SUB_MOVES] = {COMPOUND_STRING("LEARN MOVES"), CursorCb_LearnMovesSubMenu},
[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};
static const u8 sPartyMenuAction_ShiftSummaryCancel[] = {MENU_SHIFT, MENU_SUMMARY, MENU_CANCEL1};
static const u8 sPartyMenuAction_SendOutSummaryCancel[] = {MENU_SEND_OUT, MENU_SUMMARY, MENU_CANCEL1};
static const u8 sPartyMenuAction_SummaryCancel[] = {MENU_SUMMARY, MENU_CANCEL1};
static const u8 sPartyMenuAction_EnterSummaryCancel[] = {MENU_ENTER, MENU_SUMMARY, MENU_CANCEL1};
static const u8 sPartyMenuAction_NoEntrySummaryCancel[] = {MENU_NO_ENTRY, MENU_SUMMARY, MENU_CANCEL1};
static const u8 sPartyMenuAction_StoreSummaryCancel[] = {MENU_STORE, MENU_SUMMARY, MENU_CANCEL1};
static const u8 sPartyMenuAction_GiveTakeItemCancel[] = {MENU_GIVE, MENU_TAKE_ITEM, MENU_MOVE_ITEM, MENU_CANCEL2};
static const u8 sPartyMenuAction_ReadTakeMailCancel[] = {MENU_READ, MENU_TAKE_MAIL, MENU_CANCEL2};
static const u8 sPartyMenuAction_RegisterSummaryCancel[] = {MENU_REGISTER, MENU_SUMMARY, MENU_CANCEL1};
static const u8 sPartyMenuAction_TradeSummaryCancel1[] = {MENU_TRADE1, MENU_SUMMARY, MENU_CANCEL1};
static const u8 sPartyMenuAction_TradeSummaryCancel2[] = {MENU_TRADE2, MENU_SUMMARY, MENU_CANCEL1};
static const u8 sPartyMenuAction_TakeItemTossCancel[] = {MENU_TAKE_ITEM, MENU_TOSS, MENU_CANCEL1};
static const u8 sPartyMenuAction_RotomCatalog[] = {MENU_CATALOG_BULB, MENU_CATALOG_OVEN, MENU_CATALOG_WASHING, MENU_CATALOG_FRIDGE, MENU_CATALOG_FAN, MENU_CATALOG_MOWER, MENU_CANCEL1};
static const u8 sPartyMenuAction_ZygardeCube[] = {MENU_CHANGE_FORM, MENU_CHANGE_ABILITY, MENU_CANCEL1};
static const u8 *const sPartyMenuActions[] =
{
[ACTIONS_NONE] = NULL,
[ACTIONS_SWITCH] = sPartyMenuAction_SummarySwitchCancel,
[ACTIONS_SHIFT] = sPartyMenuAction_ShiftSummaryCancel,
[ACTIONS_SEND_OUT] = sPartyMenuAction_SendOutSummaryCancel,
[ACTIONS_ENTER] = sPartyMenuAction_EnterSummaryCancel,
[ACTIONS_NO_ENTRY] = sPartyMenuAction_NoEntrySummaryCancel,
[ACTIONS_STORE] = sPartyMenuAction_StoreSummaryCancel,
[ACTIONS_SUMMARY_ONLY] = sPartyMenuAction_SummaryCancel,
[ACTIONS_ITEM] = sPartyMenuAction_GiveTakeItemCancel,
[ACTIONS_MAIL] = sPartyMenuAction_ReadTakeMailCancel,
[ACTIONS_REGISTER] = sPartyMenuAction_RegisterSummaryCancel,
[ACTIONS_TRADE] = sPartyMenuAction_TradeSummaryCancel1,
[ACTIONS_SPIN_TRADE] = sPartyMenuAction_TradeSummaryCancel2,
[ACTIONS_TAKEITEM_TOSS] = sPartyMenuAction_TakeItemTossCancel,
[ACTIONS_ROTOM_CATALOG] = sPartyMenuAction_RotomCatalog,
[ACTIONS_ZYGARDE_CUBE] = sPartyMenuAction_ZygardeCube,
};
static const u8 sPartyMenuActionCounts[] =
{
[ACTIONS_NONE] = 0,
[ACTIONS_SWITCH] = ARRAY_COUNT(sPartyMenuAction_SummarySwitchCancel),
[ACTIONS_SHIFT] = ARRAY_COUNT(sPartyMenuAction_ShiftSummaryCancel),
[ACTIONS_SEND_OUT] = ARRAY_COUNT(sPartyMenuAction_SendOutSummaryCancel),
[ACTIONS_ENTER] = ARRAY_COUNT(sPartyMenuAction_EnterSummaryCancel),
[ACTIONS_NO_ENTRY] = ARRAY_COUNT(sPartyMenuAction_NoEntrySummaryCancel),
[ACTIONS_STORE] = ARRAY_COUNT(sPartyMenuAction_StoreSummaryCancel),
[ACTIONS_SUMMARY_ONLY] = ARRAY_COUNT(sPartyMenuAction_SummaryCancel),
[ACTIONS_ITEM] = ARRAY_COUNT(sPartyMenuAction_GiveTakeItemCancel),
[ACTIONS_MAIL] = ARRAY_COUNT(sPartyMenuAction_ReadTakeMailCancel),
[ACTIONS_REGISTER] = ARRAY_COUNT(sPartyMenuAction_RegisterSummaryCancel),
[ACTIONS_TRADE] = ARRAY_COUNT(sPartyMenuAction_TradeSummaryCancel1),
[ACTIONS_SPIN_TRADE] = ARRAY_COUNT(sPartyMenuAction_TradeSummaryCancel2),
[ACTIONS_TAKEITEM_TOSS] = ARRAY_COUNT(sPartyMenuAction_TakeItemTossCancel),
[ACTIONS_ROTOM_CATALOG] = ARRAY_COUNT(sPartyMenuAction_RotomCatalog),
[ACTIONS_ZYGARDE_CUBE] = ARRAY_COUNT(sPartyMenuAction_ZygardeCube),
};
static const u8 *const sUnionRoomTradeMessages[] =
{
[UR_TRADE_MSG_NOT_MON_PARTNER_WANTS - 1] = gText_NotPkmnOtherTrainerWants,
[UR_TRADE_MSG_NOT_EGG - 1] = gText_ThatIsntAnEgg,
[UR_TRADE_MSG_MON_CANT_BE_TRADED_NOW - 1] = gText_PkmnCantBeTradedNow,
[UR_TRADE_MSG_MON_CANT_BE_TRADED - 1] = gText_PkmnCantBeTraded,
[UR_TRADE_MSG_PARTNERS_MON_CANT_BE_TRADED - 1] = gText_OtherTrainersPkmnCantBeTraded,
[UR_TRADE_MSG_EGG_CANT_BE_TRADED -1] = gText_EggCantBeTradedNow,
[UR_TRADE_MSG_PARTNER_CANT_ACCEPT_MON - 1] = gText_OtherTrainerCantAcceptPkmn,
[UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_1 - 1] = gText_CantTradeWithTrainer,
[UR_TRADE_MSG_CANT_TRADE_WITH_PARTNER_2 - 1] = gText_CantTradeWithTrainer,
};
static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/party_menu/hold_icons.4bpp");
const u16 gHeldItemPalette[] = INCBIN_U16("graphics/party_menu/hold_icons.gbapal");
static const struct OamData sOamData_HeldItem =
{
.y = 0,
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = FALSE,
.bpp = ST_OAM_4BPP,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
.affineParam = 0,
};
static const union AnimCmd sSpriteAnim_HeldItem[] =
{
ANIMCMD_FRAME(0, 1),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_HeldMail[] =
{
ANIMCMD_FRAME(1, 1),
ANIMCMD_END
};
static const union AnimCmd *const sSpriteAnimTable_HeldItem[] =
{
sSpriteAnim_HeldItem,
sSpriteAnim_HeldMail,
};
const struct SpriteSheet gSpriteSheet_HeldItem =
{
.data = sHeldItemGfx, .size = sizeof(sHeldItemGfx), .tag = TAG_HELD_ITEM
};
static const struct SpritePalette sSpritePalette_HeldItem =
{
.data = gHeldItemPalette, .tag = TAG_HELD_ITEM
};
static const struct SpriteTemplate sSpriteTemplate_HeldItem =
{
.tileTag = TAG_HELD_ITEM,
.paletteTag = TAG_HELD_ITEM,
.oam = &sOamData_HeldItem,
.anims = sSpriteAnimTable_HeldItem,
};
static const struct OamData sOamData_MenuPokeball =
{
.y = 0,
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = FALSE,
.bpp = ST_OAM_4BPP,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
.affineParam = 0
};
static const union AnimCmd sPokeballAnim_Closed[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_END
};
static const union AnimCmd sPokeballAnim_Open[] =
{
ANIMCMD_FRAME(16, 0),
ANIMCMD_END
};
static const union AnimCmd *const sSpriteAnimTable_MenuPokeball[] =
{
sPokeballAnim_Closed,
sPokeballAnim_Open
};
static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeball =
{
gPartyMenuPokeball_Gfx, 0x400, TAG_POKEBALL
};
static const struct SpritePalette sSpritePalette_MenuPokeball =
{
gPartyMenuPokeball_Pal, TAG_POKEBALL
};
// Used for the Poké Ball sprite on each party slot / Cancel button
static const struct SpriteTemplate sSpriteTemplate_MenuPokeball =
{
.tileTag = TAG_POKEBALL,
.paletteTag = TAG_POKEBALL,
.oam = &sOamData_MenuPokeball,
.anims = sSpriteAnimTable_MenuPokeball,
};
static const struct OamData sOamData_MenuPokeballSmall =
{
.y = 0,
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = FALSE,
.bpp = ST_OAM_4BPP,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
.affineParam = 0
};
static const union AnimCmd sSmallPokeballAnim_Closed[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_END
};
static const union AnimCmd sSmallPokeballAnim_Open[] =
{
ANIMCMD_FRAME(4, 0),
ANIMCMD_END
};
static const union AnimCmd sSmallPokeballAnim_Blank1[] =
{
ANIMCMD_FRAME(8, 0),
ANIMCMD_END
};
static const union AnimCmd sSmallPokeballAnim_Blank2[] =
{
ANIMCMD_FRAME(12, 0),
ANIMCMD_END
};
static const union AnimCmd sSmallPokeballAnim_Blank3[] =
{
ANIMCMD_FRAME(16, 0),
ANIMCMD_END
};
static const union AnimCmd sSmallPokeballAnim_Blank4[] =
{
ANIMCMD_FRAME(20, 0),
ANIMCMD_END
};
// The blanks below are never used. See SpriteCB_BounceConfirmCancelButton, where they were intended to be used
static const union AnimCmd *const sSpriteAnimTable_MenuPokeballSmall[] =
{
sSmallPokeballAnim_Closed,
sSmallPokeballAnim_Open,
sSmallPokeballAnim_Blank1,
sSmallPokeballAnim_Blank2,
sSmallPokeballAnim_Blank3,
sSmallPokeballAnim_Blank4
};
static const struct CompressedSpriteSheet sSpriteSheet_MenuPokeballSmall =
{
gPartyMenuPokeballSmall_Gfx, 0x0300, TAG_POKEBALL_SMALL
};
// Used for the pokeball sprite next to Cancel and Confirm when both are present, otherwise sSpriteTemplate_MenuPokeball is used
static const struct SpriteTemplate sSpriteTemplate_MenuPokeballSmall =
{
.tileTag = TAG_POKEBALL_SMALL,
.paletteTag = TAG_POKEBALL,
.oam = &sOamData_MenuPokeballSmall,
.anims = sSpriteAnimTable_MenuPokeballSmall,
};
static const struct OamData sOamData_StatusCondition =
{
.y = 0,
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = FALSE,
.bpp = ST_OAM_4BPP,
.shape = SPRITE_SHAPE(32x8),
.x = 0,
.matrixNum = 0,
.size = SPRITE_SIZE(32x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
.affineParam = 0
};
static const union AnimCmd sSpriteAnim_StatusPoison[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_StatusParalyzed[] =
{
ANIMCMD_FRAME(4, 0),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_StatusSleep[] =
{
ANIMCMD_FRAME(8, 0),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_StatusFrozen[] =
{
ANIMCMD_FRAME(12, 0),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_StatusBurn[] =
{
ANIMCMD_FRAME(16, 0),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_StatusPokerus[] =
{
ANIMCMD_FRAME(20, 0),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_StatusFaint[] =
{
ANIMCMD_FRAME(24, 0),
ANIMCMD_END
};
static const union AnimCmd sSpriteAnim_StatusFrostbite[] =
{
ANIMCMD_FRAME(28, 0),
ANIMCMD_END
};
static const union AnimCmd *const sSpriteTemplate_StatusCondition[] =
{
sSpriteAnim_StatusPoison,
sSpriteAnim_StatusParalyzed,
sSpriteAnim_StatusSleep,
sSpriteAnim_StatusFrozen,
sSpriteAnim_StatusBurn,
sSpriteAnim_StatusPokerus,
sSpriteAnim_StatusFaint,
sSpriteAnim_StatusFrostbite
};
static const struct CompressedSpriteSheet sSpriteSheet_StatusIcons =
{
gStatusGfx_Icons, 0x400, TAG_STATUS_ICONS
};
static const struct SpritePalette sSpritePalette_StatusIcons =
{
gStatusPal_Icons, TAG_STATUS_ICONS
};
const struct SpriteTemplate gSpriteTemplate_StatusIcons =
{
.tileTag = TAG_STATUS_ICONS,
.paletteTag = TAG_STATUS_ICONS,
.oam = &sOamData_StatusCondition,
.anims = sSpriteTemplate_StatusCondition,
};
static const u8 *const sUnused_StatStrings[] =
{
gText_HP4,
gText_Attack3,
gText_Defense3,
gText_SpAtk4,
gText_SpDef4,
gText_Speed2
};
#define ROTOM_BASE_MOVE MOVE_THUNDER_SHOCK
#define ROTOM_HEAT_MOVE MOVE_OVERHEAT
#define ROTOM_WASH_MOVE MOVE_HYDRO_PUMP
#define ROTOM_FROST_MOVE MOVE_BLIZZARD
#define ROTOM_FAN_MOVE MOVE_AIR_SLASH
#define ROTOM_MOW_MOVE MOVE_LEAF_STORM
static const u16 sRotomFormChangeMoves[5] =
{
ROTOM_HEAT_MOVE,
ROTOM_WASH_MOVE,
ROTOM_FROST_MOVE,
ROTOM_FAN_MOVE,
ROTOM_MOW_MOVE,
};