mirror of
https://github.com/pret/pokeemerald.git
synced 2026-05-21 03:58:30 -05:00
* Legendary Mon Fusion Evolution Compatibility Added Kyurem, Calyrex, and Necrozma Fusions have been implemented, however, the animation for the the process is incomplete, the party menu screen needs to be updated while the screen is whited out and it has proved beyond me right now. Smh * Added Fusion Move Prompts Handles cases for learning the fusion moves from the other fused mon and deleting the move when you unfuse (plus learning confusion (well a set choice in the data struct) if there are no moves left after deleting one) * Fix Bug With Fusion Mon Move Learning If the main fusion came after the fused mon in the party order it would try to teach the move to the next member in the party * Apply suggestions from code review Co-authored-by: LOuroboros <lunosouroboros@gmail.com> * Fix build * Fix fusion items being used up * Fixed animations * RefreshPartyMenu * Apply suggestions from code review Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com> * Apply suggestions * Update form_change_tables.h * Fix animation and simplify fusion tables * Fix party full message * Remove trailing whitespaces * Update party_menu.c * Update party_menu.c * Make IsFusionMon better * Apply suggestions from code review Co-authored-by: Bassoonian <iasperbassoonian@gmail.com> --------- Co-authored-by: TeamAquasHideout <jonathonheddings@gmail.com> Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com> Co-authored-by: LOuroboros <lunosouroboros@gmail.com> Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
1165 lines
35 KiB
C
1165 lines
35 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
|
|
// Pokemon icon (x, y), held item (x, y), status condition (x, y), menu pokeball (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
|
|
};
|
|
|
|
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 = 13,
|
|
.width = 6,
|
|
.height = 6,
|
|
.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 sUnusedWindowTemplate1 =
|
|
{
|
|
.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,
|
|
};
|
|
|
|
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,
|
|
};
|
|
|
|
struct
|
|
{
|
|
const u8 *text;
|
|
TaskFunc func;
|
|
} static const sCursorOptions[] =
|
|
{
|
|
[MENU_SUMMARY] = {gText_Summary5, CursorCb_Summary},
|
|
[MENU_SWITCH] = {gText_Switch2, CursorCb_Switch},
|
|
[MENU_CANCEL1] = {gText_Cancel2, CursorCb_Cancel1},
|
|
[MENU_ITEM] = {gText_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_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_REGISTER] = {gText_Register, CursorCb_Register},
|
|
[MENU_TRADE1] = {gText_Trade4, CursorCb_Trade1},
|
|
[MENU_TRADE2] = {gText_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_FIELD_MOVES + FIELD_MOVE_CUT] = {gMoveNames[MOVE_CUT], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_FLASH] = {gMoveNames[MOVE_FLASH], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_ROCK_SMASH] = {gMoveNames[MOVE_ROCK_SMASH], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_STRENGTH] = {gMoveNames[MOVE_STRENGTH], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_SURF] = {gMoveNames[MOVE_SURF], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_FLY] = {gMoveNames[MOVE_FLY], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_DIVE] = {gMoveNames[MOVE_DIVE], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_WATERFALL] = {gMoveNames[MOVE_WATERFALL], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_TELEPORT] = {gMoveNames[MOVE_TELEPORT], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_DIG] = {gMoveNames[MOVE_DIG], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_SECRET_POWER] = {gMoveNames[MOVE_SECRET_POWER], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_MILK_DRINK] = {gMoveNames[MOVE_MILK_DRINK], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_SOFT_BOILED] = {gMoveNames[MOVE_SOFT_BOILED], CursorCb_FieldMove},
|
|
[MENU_FIELD_MOVES + FIELD_MOVE_SWEET_SCENT] = {gMoveNames[MOVE_SWEET_SCENT], CursorCb_FieldMove},
|
|
};
|
|
|
|
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_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 u16 sFieldMoves[FIELD_MOVES_COUNT + 1] =
|
|
{
|
|
[FIELD_MOVE_CUT] = MOVE_CUT,
|
|
[FIELD_MOVE_FLASH] = MOVE_FLASH,
|
|
[FIELD_MOVE_ROCK_SMASH] = MOVE_ROCK_SMASH,
|
|
[FIELD_MOVE_STRENGTH] = MOVE_STRENGTH,
|
|
[FIELD_MOVE_SURF] = MOVE_SURF,
|
|
[FIELD_MOVE_FLY] = MOVE_FLY,
|
|
[FIELD_MOVE_DIVE] = MOVE_DIVE,
|
|
[FIELD_MOVE_WATERFALL] = MOVE_WATERFALL,
|
|
[FIELD_MOVE_TELEPORT] = MOVE_TELEPORT,
|
|
[FIELD_MOVE_DIG] = MOVE_DIG,
|
|
[FIELD_MOVE_SECRET_POWER] = MOVE_SECRET_POWER,
|
|
[FIELD_MOVE_MILK_DRINK] = MOVE_MILK_DRINK,
|
|
[FIELD_MOVE_SOFT_BOILED] = MOVE_SOFT_BOILED,
|
|
[FIELD_MOVE_SWEET_SCENT] = MOVE_SWEET_SCENT,
|
|
// NOTE: This value is used as the terminal value for the table. There's no reason to do this, as the size of the table is known.
|
|
// Whichever move shares this value (MOVE_SWORDS_DANCE by default) if present will be treated as the end of the array rather than a field move.
|
|
[FIELD_MOVES_COUNT] = FIELD_MOVES_COUNT
|
|
};
|
|
|
|
struct
|
|
{
|
|
bool8 (*fieldMoveFunc)(void);
|
|
u8 msgId;
|
|
} static const sFieldMoveCursorCallbacks[FIELD_MOVES_COUNT] =
|
|
{
|
|
[FIELD_MOVE_CUT] = {SetUpFieldMove_Cut, PARTY_MSG_NOTHING_TO_CUT},
|
|
[FIELD_MOVE_FLASH] = {SetUpFieldMove_Flash, PARTY_MSG_CANT_USE_HERE},
|
|
[FIELD_MOVE_ROCK_SMASH] = {SetUpFieldMove_RockSmash, PARTY_MSG_CANT_USE_HERE},
|
|
[FIELD_MOVE_STRENGTH] = {SetUpFieldMove_Strength, PARTY_MSG_CANT_USE_HERE},
|
|
[FIELD_MOVE_SURF] = {SetUpFieldMove_Surf, PARTY_MSG_CANT_SURF_HERE},
|
|
[FIELD_MOVE_FLY] = {SetUpFieldMove_Fly, PARTY_MSG_CANT_USE_HERE},
|
|
[FIELD_MOVE_DIVE] = {SetUpFieldMove_Dive, PARTY_MSG_CANT_USE_HERE},
|
|
[FIELD_MOVE_WATERFALL] = {SetUpFieldMove_Waterfall, PARTY_MSG_CANT_USE_HERE},
|
|
[FIELD_MOVE_TELEPORT] = {SetUpFieldMove_Teleport, PARTY_MSG_CANT_USE_HERE},
|
|
[FIELD_MOVE_DIG] = {SetUpFieldMove_Dig, PARTY_MSG_CANT_USE_HERE},
|
|
[FIELD_MOVE_SECRET_POWER] = {SetUpFieldMove_SecretPower, PARTY_MSG_CANT_USE_HERE},
|
|
[FIELD_MOVE_MILK_DRINK] = {SetUpFieldMove_SoftBoiled, PARTY_MSG_NOT_ENOUGH_HP},
|
|
[FIELD_MOVE_SOFT_BOILED] = {SetUpFieldMove_SoftBoiled, PARTY_MSG_NOT_ENOUGH_HP},
|
|
[FIELD_MOVE_SWEET_SCENT] = {SetUpFieldMove_SweetScent, PARTY_MSG_CANT_USE_HERE},
|
|
};
|
|
|
|
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");
|
|
static const u16 sHeldItemPalette[] = 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,
|
|
};
|
|
|
|
static const struct SpriteSheet sSpriteSheet_HeldItem =
|
|
{
|
|
.data = sHeldItemGfx, .size = sizeof(sHeldItemGfx), .tag = TAG_HELD_ITEM
|
|
};
|
|
|
|
static const struct SpritePalette sSpritePalette_HeldItem =
|
|
{
|
|
.data = sHeldItemPalette, .tag = TAG_HELD_ITEM
|
|
};
|
|
|
|
static const struct SpriteTemplate sSpriteTemplate_HeldItem =
|
|
{
|
|
.tileTag = TAG_HELD_ITEM,
|
|
.paletteTag = TAG_HELD_ITEM,
|
|
.oam = &sOamData_HeldItem,
|
|
.anims = sSpriteAnimTable_HeldItem,
|
|
.images = NULL,
|
|
.affineAnims = gDummySpriteAffineAnimTable,
|
|
.callback = SpriteCallbackDummy
|
|
};
|
|
|
|
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 CompressedSpritePalette sSpritePalette_MenuPokeball =
|
|
{
|
|
gPartyMenuPokeball_Pal, TAG_POKEBALL
|
|
};
|
|
|
|
// Used for the pokeball 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,
|
|
.images = NULL,
|
|
.affineAnims = gDummySpriteAffineAnimTable,
|
|
.callback = SpriteCallbackDummy,
|
|
};
|
|
|
|
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,
|
|
.images = NULL,
|
|
.affineAnims = gDummySpriteAffineAnimTable,
|
|
.callback = SpriteCallbackDummy,
|
|
};
|
|
|
|
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 CompressedSpritePalette 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,
|
|
.images = NULL,
|
|
.affineAnims = gDummySpriteAffineAnimTable,
|
|
.callback = SpriteCallbackDummy,
|
|
};
|
|
|
|
static const u8 *const sUnused_StatStrings[] =
|
|
{
|
|
gText_HP4,
|
|
gText_Attack3,
|
|
gText_Defense3,
|
|
gText_SpAtk4,
|
|
gText_SpDef4,
|
|
gText_Speed2
|
|
};
|
|
|
|
static const u16 sRotomFormChangeMoves[5] =
|
|
{
|
|
MOVE_HYDRO_PUMP,
|
|
MOVE_BLIZZARD,
|
|
MOVE_OVERHEAT,
|
|
MOVE_AIR_SLASH,
|
|
MOVE_LEAF_STORM,
|
|
};
|