|
|
|
|
@@ -34,13 +34,13 @@ static void PrintTextToStaticWindow(PokemonSummaryScreen *summaryScreen, enum PS
|
|
|
|
|
static void PrintStaticWindows(PokemonSummaryScreen *summaryScreen);
|
|
|
|
|
static void PrintMoveNameAndPP(PokemonSummaryScreen *summaryScreen, u32 moveIndex);
|
|
|
|
|
static void DrawInfoPageWindows(PokemonSummaryScreen *summaryScreen);
|
|
|
|
|
static void sub_020908CC(PokemonSummaryScreen *param0);
|
|
|
|
|
static void sub_0209093C(PokemonSummaryScreen *param0);
|
|
|
|
|
static void sub_02090BDC(PokemonSummaryScreen *param0);
|
|
|
|
|
static void sub_02090CD4(PokemonSummaryScreen *param0);
|
|
|
|
|
static void sub_02090D90(PokemonSummaryScreen *param0);
|
|
|
|
|
static void sub_02090E4C(PokemonSummaryScreen *param0);
|
|
|
|
|
static void sub_02090EC8(PokemonSummaryScreen *param0);
|
|
|
|
|
static void DrawMemoPageWindows(PokemonSummaryScreen *summaryScreen);
|
|
|
|
|
static void DrawSkillsPageWindows(PokemonSummaryScreen *summaryScreen);
|
|
|
|
|
static void DrawConditionPageWindows(PokemonSummaryScreen *summaryScreen);
|
|
|
|
|
static void DrawBattleMovesPageWindows(PokemonSummaryScreen *summaryScreen);
|
|
|
|
|
static void DrawContestMovesPageWindows(PokemonSummaryScreen *summaryScreen);
|
|
|
|
|
static void DrawRibbonsPageWindows(PokemonSummaryScreen *summaryScreen);
|
|
|
|
|
static void DrawExitPageWindows(PokemonSummaryScreen *summaryScreen);
|
|
|
|
|
|
|
|
|
|
static const WindowTemplate sStaticWindowTemplates[] = {
|
|
|
|
|
[PSS_WINDOW_LABEL_INFO] = { 0x1, 0x1, 0x0, 0xD, 0x2, 0xF, 0x1 },
|
|
|
|
|
@@ -55,14 +55,14 @@ static const WindowTemplate sStaticWindowTemplates[] = {
|
|
|
|
|
[PSS_WINDOW_LABEL_TYPE] = { 0x1, 0xE, 0x9, 0x5, 0x2, 0xF, 0xB3 },
|
|
|
|
|
[PSS_WINDOW_LABEL_OT_NAME] = { 0x1, 0xE, 0xB, 0x5, 0x2, 0xF, 0xBD },
|
|
|
|
|
[PSS_WINDOW_LABEL_OT_ID] = { 0x1, 0xE, 0xD, 0x5, 0x2, 0xF, 0xC7 },
|
|
|
|
|
[PSS_WINDOW_LABEL_EXP_POINTS] = { 0x1, 0xE, 0xF, 0xF, 0x2, 0xF, 0xD1 },
|
|
|
|
|
[PSS_WINDOW_LABEL_TO_NEXT_LV] = { 0x1, 0xE, 0x13, 0xC, 0x2, 0xF, 0xEF },
|
|
|
|
|
[PSS_WINDOW_LABEL_EXP] = { 0x1, 0xE, 0xF, 0xF, 0x2, 0xF, 0xD1 },
|
|
|
|
|
[PSS_WINDOW_LABEL_EXP_NEXT_LV] = { 0x1, 0xE, 0x13, 0xC, 0x2, 0xF, 0xEF },
|
|
|
|
|
[PSS_WINDOW_DUMMY_14] = { 0x1, 0x13, 0x15, 0x3, 0x2, 0xF, 0x107 },
|
|
|
|
|
[PSS_WINDOW_LABEL_HP] = { 0x1, 0x12, 0x4, 0x2, 0x2, 0xF, 0x10D },
|
|
|
|
|
[PSS_WINDOW_LABEL_ATTACK] = { 0x1, 0x10, 0x7, 0x6, 0x2, 0xF, 0x111 },
|
|
|
|
|
[PSS_WINDOW_LABEL_DEFENSE] = { 0x1, 0x10, 0x9, 0x6, 0x2, 0xF, 0x11D },
|
|
|
|
|
[PSS_WINDOW_LABEL_SP_ATK] = { 0x1, 0x10, 0xB, 0x6, 0x2, 0xF, 0x129 },
|
|
|
|
|
[PSS_WINDOW_LABEL_SP_DEF] = { 0x1, 0x10, 0xD, 0x6, 0x2, 0xF, 0x135 },
|
|
|
|
|
[PSS_WINDOW_LABEL_SP_ATTACK] = { 0x1, 0x10, 0xB, 0x6, 0x2, 0xF, 0x129 },
|
|
|
|
|
[PSS_WINDOW_LABEL_SP_DEFENSE] = { 0x1, 0x10, 0xD, 0x6, 0x2, 0xF, 0x135 },
|
|
|
|
|
[PSS_WINDOW_LABEL_SPEED] = { 0x1, 0x10, 0xF, 0x6, 0x2, 0xF, 0x141 },
|
|
|
|
|
[PSS_WINDOW_LABEL_ABILITY] = { 0x1, 0xE, 0x12, 0x6, 0x2, 0xF, 0x14D },
|
|
|
|
|
[PSS_WINDOW_LABEL_SHEEN] = { 0x1, 0xE, 0x14, 0x5, 0x2, 0xF, 0x159 },
|
|
|
|
|
@@ -73,69 +73,69 @@ static const WindowTemplate sStaticWindowTemplates[] = {
|
|
|
|
|
[PSS_WINDOW_LABEL_MOVE_ACCURACY] = { 0x1, 0x1, 0xC, 0x8, 0x2, 0xF, 0x191 },
|
|
|
|
|
[PSS_WINDOW_LABEL_CLOSE_WINDOW] = { 0x1, 0x12, 0xB, 0x9, 0x2, 0xF, 0x1A1 },
|
|
|
|
|
[PSS_WINDOW_LABEL_APPEAL_POINTS] = { 0x1, 0x2, 0xD, 0xC, 0x2, 0xF, 0x1B3 },
|
|
|
|
|
[PSS_WINDOW_LABEL_NUM_OF_RIBBONS] = { 0x1, 0xE, 0x15, 0xC, 0x2, 0xF, 0x1CB },
|
|
|
|
|
[PSS_WINDOW_LABEL_RIBBON_COUNT] = { 0x1, 0xE, 0x15, 0xC, 0x2, 0xF, 0x1CB },
|
|
|
|
|
[PSS_WINDOW_LABEL_RIBBONS] = { 0x1, 0x1, 0x0, 0xB, 0x2, 0xF, 0x1E3 },
|
|
|
|
|
[PSS_WINDOW_ITEM_NAME] = { 0x1, 0x1, 0x16, 0xC, 0x2, 0xF, 0x1F9 },
|
|
|
|
|
[PSS_WINDOW_MON_LEVEL] = { 0x1, 0x1, 0x5, 0x6, 0x2, 0xF, 0x211 },
|
|
|
|
|
[PSS_WINDOW_MON_NICKNAME_GENDER] = { 0x1, 0x3, 0x3, 0x9, 0x2, 0xF, 0x21D },
|
|
|
|
|
[PSS_WINDOW_LABEL_BUTTON_PROMPT] = { 0x1, 0x1A, 0x0, 0x6, 0x2, 0xF, 0x22F }
|
|
|
|
|
[PSS_WINDOW_BUTTON_PROMPT] = { 0x1, 0x1A, 0x0, 0x6, 0x2, 0xF, 0x22F }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const WindowTemplate sExtraWindowTemplates_Info[] = {
|
|
|
|
|
{ 0x1, 0x18, 0x5, 0x6, 0x2, 0xF, 0x23B },
|
|
|
|
|
{ 0x1, 0x17, 0x7, 0x8, 0x2, 0xF, 0x247 },
|
|
|
|
|
{ 0x1, 0x17, 0xB, 0x8, 0x2, 0xF, 0x257 },
|
|
|
|
|
{ 0x1, 0x19, 0xD, 0x4, 0x2, 0xF, 0x267 },
|
|
|
|
|
{ 0x1, 0x18, 0x11, 0x6, 0x2, 0xF, 0x271 },
|
|
|
|
|
{ 0x1, 0x18, 0x15, 0x6, 0x2, 0xF, 0x27F }
|
|
|
|
|
[PSS_WINDOW_DEX_NUM] = { 0x1, 0x18, 0x5, 0x6, 0x2, 0xF, 0x23B },
|
|
|
|
|
[PSS_WINDOW_SPECIES_NAME] = { 0x1, 0x17, 0x7, 0x8, 0x2, 0xF, 0x247 },
|
|
|
|
|
[PSS_WINDOW_OT_NAME] = { 0x1, 0x17, 0xB, 0x8, 0x2, 0xF, 0x257 },
|
|
|
|
|
[PSS_WINDOW_OT_ID] = { 0x1, 0x19, 0xD, 0x4, 0x2, 0xF, 0x267 },
|
|
|
|
|
[PSS_WINDOW_EXP] = { 0x1, 0x18, 0x11, 0x6, 0x2, 0xF, 0x271 },
|
|
|
|
|
[PSS_WINDOW_EXP_NEXT_LV] = { 0x1, 0x18, 0x15, 0x6, 0x2, 0xF, 0x27F }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const WindowTemplate sExtraWindowTemplates_Memo[] = {
|
|
|
|
|
{ 0x1, 0xE, 0x5, 0x11, 0x12, 0xF, 0x23B }
|
|
|
|
|
[PSS_WINDOW_MEMO] = { 0x1, 0xE, 0x5, 0x11, 0x12, 0xF, 0x23B }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const WindowTemplate sExtraWindowTemplates_Skills[] = {
|
|
|
|
|
{ 0x1, 0x17, 0x4, 0x7, 0x2, 0xF, 0x23B },
|
|
|
|
|
{ 0x1, 0x19, 0x7, 0x3, 0x2, 0xF, 0x249 },
|
|
|
|
|
{ 0x1, 0x19, 0x9, 0x3, 0x2, 0xF, 0x24F },
|
|
|
|
|
{ 0x1, 0x19, 0xB, 0x3, 0x2, 0xF, 0x255 },
|
|
|
|
|
{ 0x1, 0x19, 0xD, 0x3, 0x2, 0xF, 0x25B },
|
|
|
|
|
{ 0x1, 0x19, 0xF, 0x3, 0x2, 0xF, 0x261 },
|
|
|
|
|
{ 0x1, 0x15, 0x12, 0xB, 0x2, 0xF, 0x267 },
|
|
|
|
|
{ 0x1, 0xE, 0x14, 0x12, 0x4, 0xF, 0x27D }
|
|
|
|
|
[PSS_WINDOW_HP] = { 0x1, 0x17, 0x4, 0x7, 0x2, 0xF, 0x23B },
|
|
|
|
|
[PSS_WINDOW_ATTACK] = { 0x1, 0x19, 0x7, 0x3, 0x2, 0xF, 0x249 },
|
|
|
|
|
[PSS_WINDOW_DEFENSE] = { 0x1, 0x19, 0x9, 0x3, 0x2, 0xF, 0x24F },
|
|
|
|
|
[PSS_WINDOW_SP_ATTACK] = { 0x1, 0x19, 0xB, 0x3, 0x2, 0xF, 0x255 },
|
|
|
|
|
[PSS_WINDOW_SP_DEFENSE] = { 0x1, 0x19, 0xD, 0x3, 0x2, 0xF, 0x25B },
|
|
|
|
|
[PSS_WINDOW_SPEED] = { 0x1, 0x19, 0xF, 0x3, 0x2, 0xF, 0x261 },
|
|
|
|
|
[PSS_WINDOW_ABILITY] = { 0x1, 0x15, 0x12, 0xB, 0x2, 0xF, 0x267 },
|
|
|
|
|
[PSS_WINDOW_ABILITY_DESCRIPTION] = { 0x1, 0xE, 0x14, 0x12, 0x4, 0xF, 0x27D }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const WindowTemplate sExtraWindowTemplates_BattleMoves[] = {
|
|
|
|
|
{ 0x1, 0x15, 0x4, 0xB, 0x4, 0xF, 0x23B },
|
|
|
|
|
{ 0x1, 0x15, 0x8, 0xB, 0x4, 0xF, 0x267 },
|
|
|
|
|
{ 0x1, 0x15, 0xC, 0xB, 0x4, 0xF, 0x293 },
|
|
|
|
|
{ 0x1, 0x15, 0x10, 0xB, 0x4, 0xF, 0x2BF },
|
|
|
|
|
{ 0x1, 0x15, 0x14, 0xB, 0x4, 0xF, 0x2EB },
|
|
|
|
|
{ 0x1, 0xC, 0xA, 0x3, 0x2, 0xF, 0x317 },
|
|
|
|
|
{ 0x1, 0xC, 0xC, 0x3, 0x2, 0xF, 0x31D },
|
|
|
|
|
{ 0x1, 0x1, 0xE, 0xF, 0xA, 0xF, 0x323 }
|
|
|
|
|
[PSS_WINDOW_BATTLE_MOVE_1] = { 0x1, 0x15, 0x4, 0xB, 0x4, 0xF, 0x23B },
|
|
|
|
|
[PSS_WINDOW_BATTLE_MOVE_2] = { 0x1, 0x15, 0x8, 0xB, 0x4, 0xF, 0x267 },
|
|
|
|
|
[PSS_WINDOW_BATTLE_MOVE_3] = { 0x1, 0x15, 0xC, 0xB, 0x4, 0xF, 0x293 },
|
|
|
|
|
[PSS_WINDOW_BATTLE_MOVE_4] = { 0x1, 0x15, 0x10, 0xB, 0x4, 0xF, 0x2BF },
|
|
|
|
|
[PSS_WINDOW_BATTLE_MOVE_5] = { 0x1, 0x15, 0x14, 0xB, 0x4, 0xF, 0x2EB },
|
|
|
|
|
[PSS_WINDOW_BATTLE_MOVE_POWER] = { 0x1, 0xC, 0xA, 0x3, 0x2, 0xF, 0x317 },
|
|
|
|
|
[PSS_WINDOW_BATTLE_MOVE_ACCURACY] = { 0x1, 0xC, 0xC, 0x3, 0x2, 0xF, 0x31D },
|
|
|
|
|
[PSS_WINDOW_BATTLE_MOVE_DESCRIPTION] = { 0x1, 0x1, 0xE, 0xF, 0xA, 0xF, 0x323 }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const WindowTemplate sExtraWindowTemplates_ContestMoves[] = {
|
|
|
|
|
{ 0x1, 0x15, 0x4, 0xB, 0x4, 0xF, 0x23B },
|
|
|
|
|
{ 0x1, 0x15, 0x8, 0xB, 0x4, 0xF, 0x267 },
|
|
|
|
|
{ 0x1, 0x15, 0xC, 0xB, 0x4, 0xF, 0x293 },
|
|
|
|
|
{ 0x1, 0x15, 0x10, 0xB, 0x4, 0xF, 0x2BF },
|
|
|
|
|
{ 0x1, 0x15, 0x14, 0xB, 0x4, 0xF, 0x2EB },
|
|
|
|
|
{ 0x1, 0x1, 0x12, 0xF, 0x6, 0xF, 0x317 }
|
|
|
|
|
[PSS_WINDOW_CONTEST_MOVE_1] = { 0x1, 0x15, 0x4, 0xB, 0x4, 0xF, 0x23B },
|
|
|
|
|
[PSS_WINDOW_CONTEST_MOVE_2] = { 0x1, 0x15, 0x8, 0xB, 0x4, 0xF, 0x267 },
|
|
|
|
|
[PSS_WINDOW_CONTEST_MOVE_3] = { 0x1, 0x15, 0xC, 0xB, 0x4, 0xF, 0x293 },
|
|
|
|
|
[PSS_WINDOW_CONTEST_MOVE_4] = { 0x1, 0x15, 0x10, 0xB, 0x4, 0xF, 0x2BF },
|
|
|
|
|
[PSS_WINDOW_CONTEST_MOVE_5] = { 0x1, 0x15, 0x14, 0xB, 0x4, 0xF, 0x2EB },
|
|
|
|
|
[PSS_WINDOW_CONTEST_MOVE_DESCRIPTION] = { 0x1, 0x1, 0x12, 0xF, 0x6, 0xF, 0x317 }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const WindowTemplate sExtraWindowTemplates_Ribbons[] = {
|
|
|
|
|
{ 0x1, 0x1A, 0x15, 0x5, 0x2, 0xF, 0x23B },
|
|
|
|
|
{ 0x1, 0x18, 0xF, 0x7, 0x2, 0xF, 0x245 },
|
|
|
|
|
{ 0x1, 0x1, 0x12, 0x15, 0x2, 0xF, 0x253 },
|
|
|
|
|
{ 0x1, 0x1, 0x14, 0x1E, 0x4, 0xF, 0x27D }
|
|
|
|
|
[PSS_WINDOW_RIBBON_COUNT] = { 0x1, 0x1A, 0x15, 0x5, 0x2, 0xF, 0x23B },
|
|
|
|
|
[PSS_WINDOW_RIBBON_INDEX] = { 0x1, 0x18, 0xF, 0x7, 0x2, 0xF, 0x245 },
|
|
|
|
|
[PSS_WINDOW_RIBBON_NAME] = { 0x1, 0x1, 0x12, 0x15, 0x2, 0xF, 0x253 },
|
|
|
|
|
[PSS_WINDOW_RIBBON_DESCRIPTION] = { 0x1, 0x1, 0x14, 0x1E, 0x4, 0xF, 0x27D }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const WindowTemplate sExtraWindowTemplates_Exit[] = {
|
|
|
|
|
{ 0x1, 0x1A, 0x0, 0x5, 0x2, 0xF, 0x23B },
|
|
|
|
|
{ 0x1, 0x1, 0x14, 0xC, 0x4, 0xF, 0x24D },
|
|
|
|
|
{ 0x1, 0x2, 0x15, 0x1B, 0x2, 0xE, 0x27D }
|
|
|
|
|
static const WindowTemplate sExtraWindowTemplates_Condition[] = {
|
|
|
|
|
[PSS_WINDOW_POFFIN_BUTTON_PROMPT] = { 0x1, 0x1A, 0x0, 0x5, 0x2, 0xF, 0x23B },
|
|
|
|
|
[PSS_WINDOW_FAVORITE_FOOD] = { 0x1, 0x1, 0x14, 0xC, 0x4, 0xF, 0x24D },
|
|
|
|
|
[PSS_WINDOW_POFFIN_FEED_MSG] = { 0x1, 0x2, 0x15, 0x1B, 0x2, 0xE, 0x27D }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_DrawStaticWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
@@ -146,7 +146,7 @@ void PokemonSummaryScreen_DrawStaticWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PrintStaticWindows(summaryScreen);
|
|
|
|
|
PokemonSummaryScreen_PrintGenderSymbol(summaryScreen);
|
|
|
|
|
PokemonSummaryScreen_PrintNicknameAndGender(summaryScreen);
|
|
|
|
|
PokemonSummaryScreen_PrintLevel(summaryScreen);
|
|
|
|
|
PokemonSummaryScreen_PrintItemName(summaryScreen);
|
|
|
|
|
}
|
|
|
|
|
@@ -182,12 +182,13 @@ void PokemonSummaryScreen_AddExtraWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
break;
|
|
|
|
|
case PSS_PAGE_CONDITION:
|
|
|
|
|
case PSS_PAGE_EXIT:
|
|
|
|
|
// the exit page shows the "favorite food" condition extra window when feeding poffins
|
|
|
|
|
if (summaryScreen->data->mode != PSS_MODE_POFFIN && summaryScreen->data->mode != PSS_MODE_CONDITION) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
extraWindows = sExtraWindowTemplates_Exit;
|
|
|
|
|
summaryScreen->numExtraWindows = PSS_CONDITION_EXIT_WINDOW_MAX;
|
|
|
|
|
extraWindows = sExtraWindowTemplates_Condition;
|
|
|
|
|
summaryScreen->numExtraWindows = PSS_CONDITION_WINDOW_MAX;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return;
|
|
|
|
|
@@ -212,6 +213,7 @@ void PokemonSummaryScreen_RemoveExtraWindows(PokemonSummaryScreen *summaryScreen
|
|
|
|
|
break;
|
|
|
|
|
case PSS_PAGE_CONDITION:
|
|
|
|
|
case PSS_PAGE_EXIT:
|
|
|
|
|
// the exit page shows the "favorite food" condition extra window when feeding poffins
|
|
|
|
|
if (summaryScreen->data->mode != PSS_MODE_POFFIN && summaryScreen->data->mode != PSS_MODE_CONDITION) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
@@ -232,14 +234,14 @@ void PokemonSummaryScreen_RemoveWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_PrintGenderSymbol(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
void PokemonSummaryScreen_PrintNicknameAndGender(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window *window = &summaryScreen->staticWindows[PSS_WINDOW_MON_NICKNAME_GENDER];
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(window, 0);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, summaryScreen->monData.nickname, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(15, 14, 0), NULL);
|
|
|
|
|
|
|
|
|
|
if (summaryScreen->monData.showGender == 0) {
|
|
|
|
|
if (summaryScreen->monData.hideGender == FALSE) {
|
|
|
|
|
if (summaryScreen->monData.gender == GENDER_MALE) {
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->msgLoader, pss_male_symbol, summaryScreen->strbuf);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, window, TEXT_COLOR(3, 4, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
@@ -294,9 +296,9 @@ void PokemonSummaryScreen_PrintItemName(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_ClearAndPrintButtonPrompt(PokemonSummaryScreen *summaryScreen, u32 entryID)
|
|
|
|
|
{
|
|
|
|
|
Window_FillTilemap(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_BUTTON_PROMPT], 0);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_BUTTON_PROMPT, entryID, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_BUTTON_PROMPT]);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT], 0);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_BUTTON_PROMPT, entryID, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static BOOL DoesMonOTMatchPlayer(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
@@ -347,23 +349,23 @@ static void SetAndFormatNumberBuf(PokemonSummaryScreen *summaryScreen, u32 entry
|
|
|
|
|
Strbuf_Free(buf);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void PrintMovePPInfo(PokemonSummaryScreen *summaryScreen, u32 moveIndex, u32 slashEntryID, u32 curPPEntryID, u32 maxPPEntryID, u16 curPP, u16 maxPP, u8 digits, u8 xOffset, u8 yOffset)
|
|
|
|
|
static void PrintCurrentAndMaxInfo(PokemonSummaryScreen *summaryScreen, u32 moveIndex, u32 slashEntryID, u32 curEntryID, u32 maxEntryID, u16 curValue, u16 maxValue, u8 digits, u8 xOffset, u8 yOffset)
|
|
|
|
|
{
|
|
|
|
|
Window *window = &summaryScreen->extraWindows[moveIndex];
|
|
|
|
|
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->msgLoader, slashEntryID, summaryScreen->strbuf);
|
|
|
|
|
u32 strWidth = Font_CalcStrbufWidth(FONT_SYSTEM, summaryScreen->strbuf, 0);
|
|
|
|
|
u16 curPPXOffset = xOffset - strWidth / 2;
|
|
|
|
|
u16 maxPPXOffset = curPPXOffset + strWidth;
|
|
|
|
|
u16 curXOffset = xOffset - strWidth / 2;
|
|
|
|
|
u16 maxXOffset = curXOffset + strWidth;
|
|
|
|
|
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, summaryScreen->strbuf, curPPXOffset, yOffset, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, curPPEntryID, curPP, digits, PADDING_MODE_NONE);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, summaryScreen->strbuf, curXOffset, yOffset, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, curEntryID, curValue, digits, PADDING_MODE_NONE);
|
|
|
|
|
|
|
|
|
|
strWidth = Font_CalcStrbufWidth(FONT_SYSTEM, summaryScreen->strbuf, 0);
|
|
|
|
|
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, summaryScreen->strbuf, curPPXOffset - strWidth, yOffset, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, maxPPEntryID, maxPP, digits, PADDING_MODE_NONE);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, summaryScreen->strbuf, maxPPXOffset, yOffset, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, summaryScreen->strbuf, curXOffset - strWidth, yOffset, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, maxEntryID, maxValue, digits, PADDING_MODE_NONE);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, summaryScreen->strbuf, maxXOffset, yOffset, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void PrintStaticWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
@@ -380,13 +382,13 @@ static void PrintStaticWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_TYPE, 12, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_OT_NAME, 13, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_OT_ID, 15, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_EXP_POINTS, 17, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_TO_NEXT_LV, 19, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_EXP, 17, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_EXP_NEXT_LV, 19, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_HP, 110, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_ATTACK, 111, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_DEFENSE, 112, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_SP_ATK, 113, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_SP_DEF, 114, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_SP_ATTACK, 113, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_SP_DEFENSE, 114, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_SPEED, 115, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_ABILITY, 116, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_SHEEN, 127, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
@@ -399,11 +401,11 @@ static void PrintStaticWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_MOVE_ACCURACY, 148, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_CLOSE_WINDOW, 162, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_APPEAL_POINTS, 160, TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_NUM_OF_RIBBONS, 182, TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_RIBBON_COUNT, 182, TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintTextToStaticWindow(summaryScreen, PSS_WINDOW_LABEL_RIBBONS, 179, TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
}
|
|
|
|
|
// ravetodo PokemonSummaryScreen_DrawExtraWindows?
|
|
|
|
|
void sub_020904C4(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_DrawExtraWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Bg_FillTilemapRect(summaryScreen->bgConfig, BG_LAYER_MAIN_1, 0, 0, 0, 32, 2, 16);
|
|
|
|
|
Bg_FillTilemapRect(summaryScreen->bgConfig, BG_LAYER_MAIN_1, 0, 14, 2, 18, 22, 16);
|
|
|
|
|
@@ -413,29 +415,29 @@ void sub_020904C4(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
DrawInfoPageWindows(summaryScreen);
|
|
|
|
|
break;
|
|
|
|
|
case PSS_PAGE_MEMO:
|
|
|
|
|
sub_020908CC(summaryScreen);
|
|
|
|
|
DrawMemoPageWindows(summaryScreen);
|
|
|
|
|
break;
|
|
|
|
|
case PSS_PAGE_SKILLS:
|
|
|
|
|
sub_0209093C(summaryScreen);
|
|
|
|
|
DrawSkillsPageWindows(summaryScreen);
|
|
|
|
|
break;
|
|
|
|
|
case PSS_PAGE_CONDITION:
|
|
|
|
|
sub_02090BDC(summaryScreen);
|
|
|
|
|
DrawConditionPageWindows(summaryScreen);
|
|
|
|
|
break;
|
|
|
|
|
case PSS_PAGE_BATTLE_MOVES:
|
|
|
|
|
sub_02090CD4(summaryScreen);
|
|
|
|
|
DrawBattleMovesPageWindows(summaryScreen);
|
|
|
|
|
break;
|
|
|
|
|
case PSS_PAGE_CONTEST_MOVES:
|
|
|
|
|
sub_02090D90(summaryScreen);
|
|
|
|
|
DrawContestMovesPageWindows(summaryScreen);
|
|
|
|
|
break;
|
|
|
|
|
case PSS_PAGE_RIBBONS:
|
|
|
|
|
sub_02090E4C(summaryScreen);
|
|
|
|
|
DrawRibbonsPageWindows(summaryScreen);
|
|
|
|
|
break;
|
|
|
|
|
case PSS_PAGE_EXIT:
|
|
|
|
|
sub_02090EC8(summaryScreen);
|
|
|
|
|
DrawExitPageWindows(summaryScreen);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ravetodo finish
|
|
|
|
|
|
|
|
|
|
static void DrawInfoPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_INFO]);
|
|
|
|
|
@@ -444,16 +446,16 @@ static void DrawInfoPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_TYPE]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_OT_NAME]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_OT_ID]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_EXP_POINTS]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_TO_NEXT_LV]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_EXP]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_EXP_NEXT_LV]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_DUMMY_14]);
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[0], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[1], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[2], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[3], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[4], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[5], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_DEX_NUM], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_SPECIES_NAME], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_OT_NAME], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_OT_ID], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_EXP], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_EXP_NEXT_LV], 0);
|
|
|
|
|
|
|
|
|
|
u32 dexNum = sub_0207A294(summaryScreen->data->dexMode, summaryScreen->monData.species);
|
|
|
|
|
|
|
|
|
|
@@ -464,283 +466,271 @@ static void DrawInfoPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (summaryScreen->monData.isShiny == FALSE) {
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[0], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_DEX_NUM], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
} else {
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[0], TEXT_COLOR(5, 6, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_DEX_NUM], TEXT_COLOR(5, 6, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u32 speciesWidth = Font_CalcStrbufWidth(FONT_SYSTEM, summaryScreen->monData.speciesName, 0);
|
|
|
|
|
u32 speciesX = (summaryScreen->extraWindows[1].width * 8 - speciesWidth) / 2;
|
|
|
|
|
u32 speciesX = (summaryScreen->extraWindows[PSS_WINDOW_SPECIES_NAME].width * 8 - speciesWidth) / 2;
|
|
|
|
|
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[1], FONT_SYSTEM, summaryScreen->monData.speciesName, speciesX, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[PSS_WINDOW_SPECIES_NAME], FONT_SYSTEM, summaryScreen->monData.speciesName, speciesX, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
|
|
|
|
|
u32 OTNameWidth = Font_CalcStrbufWidth(FONT_SYSTEM, summaryScreen->monData.OTName, 0);
|
|
|
|
|
u32 OTNameX = (summaryScreen->extraWindows[2].width * 8 - OTNameWidth) / 2;
|
|
|
|
|
u32 OTNameX = (summaryScreen->extraWindows[PSS_WINDOW_OT_NAME].width * 8 - OTNameWidth) / 2;
|
|
|
|
|
|
|
|
|
|
if (summaryScreen->monData.OTGender == GENDER_MALE) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[2], FONT_SYSTEM, summaryScreen->monData.OTName, OTNameX, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(3, 4, 0), NULL);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[PSS_WINDOW_OT_NAME], FONT_SYSTEM, summaryScreen->monData.OTName, OTNameX, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(3, 4, 0), NULL);
|
|
|
|
|
} else {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[2], FONT_SYSTEM, summaryScreen->monData.OTName, OTNameX, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(5, 6, 0), NULL);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[PSS_WINDOW_OT_NAME], FONT_SYSTEM, summaryScreen->monData.OTName, OTNameX, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(5, 6, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, 16, (summaryScreen->monData.OTID & 0xffff), 5, PADDING_MODE_ZEROES);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[3], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, 18, summaryScreen->monData.curExp, 7, PADDING_MODE_SPACES);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[4], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_ot_id, (summaryScreen->monData.OTID & 0xffff), 5, PADDING_MODE_ZEROES);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_OT_ID], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_exp, summaryScreen->monData.curExp, 7, PADDING_MODE_SPACES);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_EXP], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
|
|
|
|
|
if (summaryScreen->monData.level < MAX_POKEMON_LEVEL) {
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, 21, summaryScreen->monData.nextLevelExp - summaryScreen->monData.curExp, 7, PADDING_MODE_SPACES);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_exp_next_lv, summaryScreen->monData.nextLevelExp - summaryScreen->monData.curExp, 7, PADDING_MODE_SPACES);
|
|
|
|
|
} else {
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, 21, 0, 7, PADDING_MODE_SPACES);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_exp_next_lv, 0, 7, PADDING_MODE_SPACES);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[5], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[0]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[1]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[2]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[3]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[4]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[5]);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_EXP_NEXT_LV], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_DEX_NUM]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_SPECIES_NAME]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_OT_NAME]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_OT_ID]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_EXP]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_EXP_NEXT_LV]);
|
|
|
|
|
}
|
|
|
|
|
// ravetodo PrintTrainerMemo
|
|
|
|
|
static void sub_02090800(Window *window, Pokemon *mon, BOOL monOTMatches)
|
|
|
|
|
{
|
|
|
|
|
PokemonInfoDisplayStruct *infoDisplay = sub_02092494(mon, monOTMatches, 19);
|
|
|
|
|
|
|
|
|
|
if (infoDisplay->unk_14.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_14.unk_04, 0, 0 + (infoDisplay->unk_14.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (infoDisplay->unk_1C.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_1C.unk_04, 0, 0 + (infoDisplay->unk_1C.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (infoDisplay->unk_24.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_24.unk_04, 0, 0 + (infoDisplay->unk_24.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (infoDisplay->unk_2C.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_2C.unk_04, 0, 0 + (infoDisplay->unk_2C.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (infoDisplay->unk_34.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->unk_34.unk_04, 0, 0 + (infoDisplay->unk_34.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sub_0209282C(infoDisplay);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void sub_02090800(Window *param0, Pokemon *param1, BOOL param2)
|
|
|
|
|
static void DrawMemoPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
PokemonInfoDisplayStruct *v0 = sub_02092494(param1, param2, 19);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_MEMO]);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_MEMO], 0);
|
|
|
|
|
|
|
|
|
|
if (v0->unk_14.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(param0, FONT_SYSTEM, v0->unk_14.unk_04, 0, 0 + (v0->unk_14.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
void *monData = PokemonSummaryScreen_MonData(summaryScreen);
|
|
|
|
|
BOOL monOTMatches = DoesMonOTMatchPlayer(summaryScreen);
|
|
|
|
|
|
|
|
|
|
if (summaryScreen->data->dataType == PSS_DATA_BOX_MON) {
|
|
|
|
|
Pokemon *mon = Pokemon_New(HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
|
|
|
|
|
|
|
|
|
Pokemon_FromBoxPokemon(monData, mon);
|
|
|
|
|
sub_02090800(&summaryScreen->extraWindows[PSS_WINDOW_MEMO], mon, monOTMatches);
|
|
|
|
|
Heap_FreeToHeap(mon);
|
|
|
|
|
} else {
|
|
|
|
|
sub_02090800(&summaryScreen->extraWindows[PSS_WINDOW_MEMO], monData, monOTMatches);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (v0->unk_1C.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(param0, FONT_SYSTEM, v0->unk_1C.unk_04, 0, 0 + (v0->unk_1C.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (v0->unk_24.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(param0, FONT_SYSTEM, v0->unk_24.unk_04, 0, 0 + (v0->unk_24.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (v0->unk_2C.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(param0, FONT_SYSTEM, v0->unk_2C.unk_04, 0, 0 + (v0->unk_2C.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (v0->unk_34.unk_04 != NULL) {
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(param0, FONT_SYSTEM, v0->unk_34.unk_04, 0, 0 + (v0->unk_34.unk_00 - 1) * 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sub_0209282C(v0);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_MEMO]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void sub_020908CC(PokemonSummaryScreen *param0)
|
|
|
|
|
static void DrawSkillsPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Strbuf *v0;
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_SKILLS]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_HP]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_ATTACK]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_DEFENSE]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_SP_ATTACK]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_SP_DEFENSE]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_SPEED]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_ABILITY]);
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_MEMO]);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[0], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_HP], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_ATTACK], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_DEFENSE], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_SP_ATTACK], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_SP_DEFENSE], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_SPEED], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_ABILITY], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_ABILITY_DESCRIPTION], 0);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
void *v1 = PokemonSummaryScreen_MonData(param0);
|
|
|
|
|
BOOL v2 = DoesMonOTMatchPlayer(param0);
|
|
|
|
|
u32 hpWindowWidth = Window_GetWidth(&summaryScreen->extraWindows[PSS_WINDOW_HP]) * 8;
|
|
|
|
|
|
|
|
|
|
if (param0->data->dataType == 2) {
|
|
|
|
|
{
|
|
|
|
|
Pokemon *v3 = Pokemon_New(19);
|
|
|
|
|
PrintCurrentAndMaxInfo(summaryScreen, 0, pss_slash, pss_template_current_hp, pss_template_max_hp, summaryScreen->monData.curHP, summaryScreen->monData.maxHP, 3, hpWindowWidth / 2, 0);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_attack, summaryScreen->monData.attack, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_ATTACK], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_defense, summaryScreen->monData.defense, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_DEFENSE], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_sp_attack, summaryScreen->monData.spAttack, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_SP_ATTACK], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_sp_defense, summaryScreen->monData.spDefense, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_SP_DEFENSE], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_speed, summaryScreen->monData.speed, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_SPEED], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
|
|
|
|
|
Pokemon_FromBoxPokemon(v1, v3);
|
|
|
|
|
sub_02090800(¶m0->extraWindows[0], v3, v2);
|
|
|
|
|
Heap_FreeToHeap(v3);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
sub_02090800(¶m0->extraWindows[0], v1, v2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
StringTemplate_SetAbilityName(summaryScreen->strFormatter, 0, summaryScreen->monData.ability);
|
|
|
|
|
Strbuf *buf = MessageLoader_GetNewStrbuf(summaryScreen->msgLoader, pss_template_ability);
|
|
|
|
|
StringTemplate_Format(summaryScreen->strFormatter, summaryScreen->strbuf, buf);
|
|
|
|
|
Strbuf_Free(buf);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_ABILITY], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
// ravetodo name ability desc bank
|
|
|
|
|
MessageLoader *msgLoader = MessageLoader_Init(MESSAGE_LOADER_NARC_HANDLE, NARC_INDEX_MSGDATA__PL_MSG, 612, HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
|
|
|
|
MessageLoader_GetStrbuf(msgLoader, summaryScreen->monData.ability, summaryScreen->strbuf);
|
|
|
|
|
MessageLoader_Free(msgLoader);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_ABILITY_DESCRIPTION], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[0]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_HP]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_ATTACK]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_DEFENSE]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_SP_ATTACK]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_SP_DEFENSE]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_SPEED]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_ABILITY]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_ABILITY_DESCRIPTION]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void sub_0209093C(PokemonSummaryScreen *param0)
|
|
|
|
|
static void DrawConditionPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
u32 v0;
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_CONDITION]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_SHEEN]);
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_SKILLS]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_HP]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_ATTACK]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_DEFENSE]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_SP_ATK]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_SP_DEF]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_SPEED]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_ABILITY]);
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[0], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[1], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[2], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[3], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[4], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[5], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[6], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[7], 0);
|
|
|
|
|
|
|
|
|
|
v0 = Window_GetWidth(¶m0->extraWindows[0]) * 8;
|
|
|
|
|
|
|
|
|
|
PrintMovePPInfo(param0, 0, 117, 119, 118, param0->monData.curHP, param0->monData.maxHP, 3, v0 / 2, 0);
|
|
|
|
|
SetAndFormatNumberBuf(param0, 120, param0->monData.attack, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[1], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
SetAndFormatNumberBuf(param0, 121, param0->monData.defense, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[2], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
SetAndFormatNumberBuf(param0, 122, param0->monData.spAttack, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[3], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
SetAndFormatNumberBuf(param0, 123, param0->monData.spDefense, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[4], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
SetAndFormatNumberBuf(param0, 124, param0->monData.speed, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[5], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_RIGHT);
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
MessageLoader *v1;
|
|
|
|
|
Strbuf *v2;
|
|
|
|
|
|
|
|
|
|
StringTemplate_SetAbilityName(param0->strFormatter, 0, param0->monData.ability);
|
|
|
|
|
|
|
|
|
|
v2 = MessageLoader_GetNewStrbuf(param0->msgLoader, 125);
|
|
|
|
|
StringTemplate_Format(param0->strFormatter, param0->strbuf, v2);
|
|
|
|
|
Strbuf_Free(v2);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[6], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
|
|
|
|
|
v1 = MessageLoader_Init(1, 26, 612, 19);
|
|
|
|
|
MessageLoader_GetStrbuf(v1, param0->monData.ability, param0->strbuf);
|
|
|
|
|
MessageLoader_Free(v1);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[7], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[0]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[1]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[2]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[3]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[4]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[5]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[6]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[7]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void sub_02090BDC(PokemonSummaryScreen *param0)
|
|
|
|
|
{
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_CONDITION]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_SHEEN]);
|
|
|
|
|
|
|
|
|
|
if ((param0->data->mode != 3) && (param0->data->mode != 4)) {
|
|
|
|
|
if (summaryScreen->data->mode != PSS_MODE_POFFIN && summaryScreen->data->mode != PSS_MODE_CONDITION) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[1], 0);
|
|
|
|
|
MessageLoader_GetStrbuf(param0->msgLoader, 165, param0->strbuf);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[1], TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
MessageLoader_GetStrbuf(param0->msgLoader, 166 + param0->monData.preferredFlavor, param0->strbuf);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(¶m0->extraWindows[1], FONT_SYSTEM, param0->strbuf, 0, 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[1]);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_FAVORITE_FOOD], 0);
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->msgLoader, pss_favorite_food, summaryScreen->strbuf);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_FAVORITE_FOOD], TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->msgLoader, pss_template_likes_spicy + summaryScreen->monData.preferredFlavor, summaryScreen->strbuf);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[PSS_WINDOW_FAVORITE_FOOD], FONT_SYSTEM, summaryScreen->strbuf, 0, 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_FAVORITE_FOOD]);
|
|
|
|
|
|
|
|
|
|
if (param0->data->mode == 3) {
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[0], 0);
|
|
|
|
|
MessageLoader_GetStrbuf(param0->msgLoader, 163, param0->strbuf);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[0], TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[0]);
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->extraWindows[0]);
|
|
|
|
|
if (summaryScreen->data->mode == PSS_MODE_POFFIN) {
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_POFFIN_BUTTON_PROMPT], 0);
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->msgLoader, pss_poffin_feed_ok, summaryScreen->strbuf);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_POFFIN_BUTTON_PROMPT], TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_POFFIN_BUTTON_PROMPT]);
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_POFFIN_BUTTON_PROMPT]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void sub_02090CD4(PokemonSummaryScreen *param0)
|
|
|
|
|
static void DrawBattleMovesPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_BATTLE_MOVES]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_BATTLE_MOVES]);
|
|
|
|
|
|
|
|
|
|
if (param0->data->mode == 2) {
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 155);
|
|
|
|
|
if (summaryScreen->data->mode == PSS_MODE_SELECT_MOVE) {
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, pss_select_battle_move_ok);
|
|
|
|
|
} else {
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 129);
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, pss_select_battle_move_info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[PSS_WINDOW_LABEL_BUTTON_PROMPT]);
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]);
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[0], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[1], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[2], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[3], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_1], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_2], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_3], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_4], 0);
|
|
|
|
|
|
|
|
|
|
PrintMoveNameAndPP(param0, 0);
|
|
|
|
|
PrintMoveNameAndPP(param0, 1);
|
|
|
|
|
PrintMoveNameAndPP(param0, 2);
|
|
|
|
|
PrintMoveNameAndPP(param0, 3);
|
|
|
|
|
PrintMoveNameAndPP(summaryScreen, 0);
|
|
|
|
|
PrintMoveNameAndPP(summaryScreen, 1);
|
|
|
|
|
PrintMoveNameAndPP(summaryScreen, 2);
|
|
|
|
|
PrintMoveNameAndPP(summaryScreen, 3);
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[0]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[1]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[2]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[3]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_1]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_2]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_3]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_4]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void sub_02090D90(PokemonSummaryScreen *param0)
|
|
|
|
|
static void DrawContestMovesPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_CONTEST_MOVES]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_CONTEST_MOVES]);
|
|
|
|
|
|
|
|
|
|
if (param0->data->mode == 2) {
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 159);
|
|
|
|
|
if (summaryScreen->data->mode == PSS_MODE_SELECT_MOVE) {
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, pss_select_contest_move_ok);
|
|
|
|
|
} else {
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 158);
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, pss_select_contest_move_info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[PSS_WINDOW_LABEL_BUTTON_PROMPT]);
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]);
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[0], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[1], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[2], 0);
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[3], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_1], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_2], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_3], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_4], 0);
|
|
|
|
|
|
|
|
|
|
PrintMoveNameAndPP(param0, 0);
|
|
|
|
|
PrintMoveNameAndPP(param0, 1);
|
|
|
|
|
PrintMoveNameAndPP(param0, 2);
|
|
|
|
|
PrintMoveNameAndPP(param0, 3);
|
|
|
|
|
PrintMoveNameAndPP(summaryScreen, 0);
|
|
|
|
|
PrintMoveNameAndPP(summaryScreen, 1);
|
|
|
|
|
PrintMoveNameAndPP(summaryScreen, 2);
|
|
|
|
|
PrintMoveNameAndPP(summaryScreen, 3);
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[0]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[1]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[2]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[3]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_1]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_2]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_3]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_4]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void sub_02090E4C(PokemonSummaryScreen *param0)
|
|
|
|
|
static void DrawRibbonsPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_RIBBONS]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_NUM_OF_RIBBONS]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_RIBBONS]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_RIBBON_COUNT]);
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[0], 0);
|
|
|
|
|
SetAndFormatNumberBuf(param0, 183, param0->ribbonMax, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[0], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[0]);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_COUNT], 0);
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_template_ribbon_count, summaryScreen->ribbonMax, 3, PADDING_MODE_NONE);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_RIBBON_COUNT], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_COUNT]);
|
|
|
|
|
|
|
|
|
|
if (param0->ribbonMax != 0) {
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 180);
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[PSS_WINDOW_LABEL_BUTTON_PROMPT]);
|
|
|
|
|
if (summaryScreen->ribbonMax != 0) {
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, pss_ribbon_select_info);
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void sub_02090EC8(PokemonSummaryScreen *param0)
|
|
|
|
|
static void DrawExitPageWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_CLOSE_WINDOW]);
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(param0, 161);
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(param0, ¶m0->staticWindows[PSS_WINDOW_LABEL_BUTTON_PROMPT]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_CLOSE_WINDOW]);
|
|
|
|
|
PokemonSummaryScreen_ClearAndPrintButtonPrompt(summaryScreen, pss_prompt_exit);
|
|
|
|
|
PokemonSummaryScreen_UpdateAButtonSprite(summaryScreen, &summaryScreen->staticWindows[PSS_WINDOW_BUTTON_PROMPT]);
|
|
|
|
|
|
|
|
|
|
if ((param0->data->mode != 3) && (param0->data->mode != 4)) {
|
|
|
|
|
// the exit page shows the "favorite food" condition extra window when feeding poffins
|
|
|
|
|
if (summaryScreen->data->mode != PSS_MODE_POFFIN && summaryScreen->data->mode != PSS_MODE_CONDITION) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[1], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_FAVORITE_FOOD], 0);
|
|
|
|
|
|
|
|
|
|
MessageLoader_GetStrbuf(param0->msgLoader, 165, param0->strbuf);
|
|
|
|
|
PrintStrbufToWindow(param0, ¶m0->extraWindows[1], TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->msgLoader, pss_favorite_food, summaryScreen->strbuf);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_FAVORITE_FOOD], TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
|
|
|
|
|
MessageLoader_GetStrbuf(param0->msgLoader, 166 + param0->monData.preferredFlavor, param0->strbuf);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(¶m0->extraWindows[1], FONT_SYSTEM, param0->strbuf, 0, 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->msgLoader, pss_template_likes_spicy + summaryScreen->monData.preferredFlavor, summaryScreen->strbuf);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[PSS_WINDOW_FAVORITE_FOOD], FONT_SYSTEM, summaryScreen->strbuf, 0, 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[1]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_FAVORITE_FOOD]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_PrintRibbonIndexAndMax(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[1], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_INDEX], 0);
|
|
|
|
|
|
|
|
|
|
Strbuf *buf = MessageLoader_GetNewStrbuf(summaryScreen->msgLoader, pss_ribbon_max_number);
|
|
|
|
|
|
|
|
|
|
@@ -751,13 +741,13 @@ void PokemonSummaryScreen_PrintRibbonIndexAndMax(PokemonSummaryScreen *summarySc
|
|
|
|
|
u8 strWidth = Font_CalcStrbufWidth(FONT_SYSTEM, summaryScreen->strbuf, 0);
|
|
|
|
|
u8 xOffset = 7 * 8 - strWidth;
|
|
|
|
|
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[1], FONT_SYSTEM, summaryScreen->strbuf, xOffset, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_INDEX], FONT_SYSTEM, summaryScreen->strbuf, xOffset, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
|
|
|
|
|
buf = MessageLoader_GetNewStrbuf(summaryScreen->msgLoader, pss_ribbon_number_slash);
|
|
|
|
|
strWidth = Font_CalcStrbufWidth(FONT_SYSTEM, buf, 0);
|
|
|
|
|
xOffset -= strWidth;
|
|
|
|
|
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[1], FONT_SYSTEM, buf, xOffset, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_INDEX], FONT_SYSTEM, buf, xOffset, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
Strbuf_Free(buf);
|
|
|
|
|
|
|
|
|
|
buf = MessageLoader_GetNewStrbuf(summaryScreen->msgLoader, pss_ribbon_index_number);
|
|
|
|
|
@@ -769,23 +759,23 @@ void PokemonSummaryScreen_PrintRibbonIndexAndMax(PokemonSummaryScreen *summarySc
|
|
|
|
|
strWidth = Font_CalcStrbufWidth(FONT_SYSTEM, summaryScreen->strbuf, 0);
|
|
|
|
|
xOffset -= strWidth;
|
|
|
|
|
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[1], FONT_SYSTEM, summaryScreen->strbuf, xOffset, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[1]);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_INDEX], FONT_SYSTEM, summaryScreen->strbuf, xOffset, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_INDEX]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_PrintRibbonNameAndDesc(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[2], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[3], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_NAME], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_DESCRIPTION], 0);
|
|
|
|
|
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->ribbonLoader, Ribbon_GetData(summaryScreen->ribbonNum, RIBBON_DATA_NAME_ID), summaryScreen->strbuf);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[2], TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_RIBBON_NAME], TEXT_COLOR(15, 14, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->ribbonLoader, PokemonSummaryScreen_GetRibbonDescriptionID(summaryScreen->data->ribbons, summaryScreen->ribbonNum), summaryScreen->strbuf);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[3], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_RIBBON_DESCRIPTION], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[2]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[3]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_NAME]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_RIBBON_DESCRIPTION]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void PrintMoveNameAndPP(PokemonSummaryScreen *summaryScreen, u32 moveIndex)
|
|
|
|
|
@@ -811,7 +801,7 @@ static void PrintMoveNameAndPP(PokemonSummaryScreen *summaryScreen, u32 moveInde
|
|
|
|
|
if (moveName != MOVE_NONE) {
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->msgLoader, 135, summaryScreen->strbuf);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, summaryScreen->strbuf, 16, 16, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
PrintMovePPInfo(summaryScreen, moveIndex, 117, 136 + moveIndex, 141 + moveIndex, curPP, maxPP, 2, (40 + 20), 16);
|
|
|
|
|
PrintCurrentAndMaxInfo(summaryScreen, moveIndex, 117, 136 + moveIndex, 141 + moveIndex, curPP, maxPP, 2, (40 + 20), 16);
|
|
|
|
|
} else {
|
|
|
|
|
MessageLoader_GetStrbuf(summaryScreen->msgLoader, 153, summaryScreen->strbuf);
|
|
|
|
|
u32 strWidth = Font_CalcStrbufWidth(FONT_SYSTEM, summaryScreen->strbuf, 0);
|
|
|
|
|
@@ -819,15 +809,15 @@ static void PrintMoveNameAndPP(PokemonSummaryScreen *summaryScreen, u32 moveInde
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_PrintBattleMoveInfo(PokemonSummaryScreen *summaryScreen, u32 move)
|
|
|
|
|
void PokemonSummaryScreen_PrintBattleMoveAttributes(PokemonSummaryScreen *summaryScreen, u32 move)
|
|
|
|
|
{
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_MOVE_CATEGORY]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_MOVE_POWER]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_MOVE_ACCURACY]);
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[5], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[6], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[7], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_POWER], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_ACCURACY], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_DESCRIPTION], 0);
|
|
|
|
|
|
|
|
|
|
u32 moveAttribute = MoveTable_LoadParam(move, MOVEATTRIBUTE_POWER);
|
|
|
|
|
|
|
|
|
|
@@ -837,7 +827,7 @@ void PokemonSummaryScreen_PrintBattleMoveInfo(PokemonSummaryScreen *summaryScree
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_move_power_template, moveAttribute, 3, PADDING_MODE_SPACES);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[5], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_POWER], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
|
|
|
|
|
moveAttribute = MoveTable_LoadParam(move, MOVEATTRIBUTE_ACCURACY);
|
|
|
|
|
|
|
|
|
|
@@ -847,35 +837,35 @@ void PokemonSummaryScreen_PrintBattleMoveInfo(PokemonSummaryScreen *summaryScree
|
|
|
|
|
SetAndFormatNumberBuf(summaryScreen, pss_move_accuracy_template, moveAttribute, 3, PADDING_MODE_SPACES);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[6], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_ACCURACY], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_CENTER);
|
|
|
|
|
|
|
|
|
|
MessageLoader *msgLoader = MessageLoader_Init(MESSAGE_LOADER_NARC_HANDLE, NARC_INDEX_MSGDATA__PL_MSG, message_bank_move_descriptions, HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
|
|
|
|
|
|
|
|
|
MessageLoader_GetStrbuf(msgLoader, move, summaryScreen->strbuf);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[7], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
PrintStrbufToWindow(summaryScreen, &summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_DESCRIPTION], TEXT_COLOR(1, 2, 0), PSS_ALIGNMENT_LEFT);
|
|
|
|
|
MessageLoader_Free(msgLoader);
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[5]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[6]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[7]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_POWER]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_ACCURACY]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_DESCRIPTION]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_ClearBattleInfoWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
void PokemonSummaryScreen_ClearBattleAttributeWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_MOVE_CATEGORY]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_MOVE_POWER]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_MOVE_ACCURACY]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[5]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[6]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[7]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_POWER]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_ACCURACY]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_DESCRIPTION]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_ShowMoveInfoOrCancel(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
void PokemonSummaryScreen_ShowMove5OrCancel(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
if (summaryScreen->data->move != MOVE_NONE) {
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[4], 0);
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_5], 0);
|
|
|
|
|
PrintMoveNameAndPP(summaryScreen, LEARNED_MOVES_MAX);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[4]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_5]);
|
|
|
|
|
} else {
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_MOVE_CANCEL]);
|
|
|
|
|
}
|
|
|
|
|
@@ -904,12 +894,12 @@ void PokemonSummaryScreen_PrintHMMovesCantBeForgotten(PokemonSummaryScreen *summ
|
|
|
|
|
Window *window;
|
|
|
|
|
|
|
|
|
|
if (summaryScreen->page == PSS_PAGE_BATTLE_MOVES) {
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[5]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[6]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[7]);
|
|
|
|
|
window = &summaryScreen->extraWindows[7];
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_POWER]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_ACCURACY]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_DESCRIPTION]);
|
|
|
|
|
window = &summaryScreen->extraWindows[PSS_WINDOW_BATTLE_MOVE_DESCRIPTION];
|
|
|
|
|
} else {
|
|
|
|
|
window = &summaryScreen->extraWindows[5];
|
|
|
|
|
window = &summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_DESCRIPTION];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(window, 0);
|
|
|
|
|
@@ -918,31 +908,28 @@ void PokemonSummaryScreen_PrintHMMovesCantBeForgotten(PokemonSummaryScreen *summ
|
|
|
|
|
Window_ScheduleCopyToVRAM(window);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_PrintContestMoveInfo(PokemonSummaryScreen *param0, u32 param1)
|
|
|
|
|
void PokemonSummaryScreen_PrintContestMoveAttributes(PokemonSummaryScreen *summaryScreen, u32 move)
|
|
|
|
|
{
|
|
|
|
|
MessageLoader *v0;
|
|
|
|
|
u32 v1;
|
|
|
|
|
u32 v2;
|
|
|
|
|
Window_FillTilemap(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_DESCRIPTION], 0);
|
|
|
|
|
|
|
|
|
|
Window_FillTilemap(¶m0->extraWindows[5], 0);
|
|
|
|
|
u32 contestEffect = MoveTable_LoadParam(move, MOVEATTRIBUTE_CONTEST_EFFECT);
|
|
|
|
|
u32 descEntryID = sub_0209577C(contestEffect);
|
|
|
|
|
// ravetodo rename contest move desc bank
|
|
|
|
|
MessageLoader *msgLoader = MessageLoader_Init(MESSAGE_LOADER_BANK_HANDLE, NARC_INDEX_MSGDATA__PL_MSG, 210, HEAP_ID_POKEMON_SUMMARY_SCREEN);
|
|
|
|
|
|
|
|
|
|
v1 = MoveTable_LoadParam(param1, MOVEATTRIBUTE_CONTEST_EFFECT);
|
|
|
|
|
v2 = sub_0209577C(v1);
|
|
|
|
|
v0 = MessageLoader_Init(0, 26, 210, 19);
|
|
|
|
|
MessageLoader_GetStrbuf(msgLoader, descEntryID, summaryScreen->strbuf);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_DESCRIPTION], FONT_SYSTEM, summaryScreen->strbuf, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
|
|
|
|
|
MessageLoader_GetStrbuf(v0, v2, param0->strbuf);
|
|
|
|
|
Text_AddPrinterWithParamsAndColor(¶m0->extraWindows[5], FONT_SYSTEM, param0->strbuf, 0, 0, TEXT_SPEED_NO_TRANSFER, TEXT_COLOR(1, 2, 0), NULL);
|
|
|
|
|
MessageLoader_Free(msgLoader);
|
|
|
|
|
|
|
|
|
|
MessageLoader_Free(v0);
|
|
|
|
|
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_APPEAL_POINTS]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(¶m0->extraWindows[5]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_APPEAL_POINTS]);
|
|
|
|
|
Window_ScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_DESCRIPTION]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_ClearContestInfoWindows(PokemonSummaryScreen *param0)
|
|
|
|
|
void PokemonSummaryScreen_ClearContestAttributeWindows(PokemonSummaryScreen *summaryScreen)
|
|
|
|
|
{
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(¶m0->staticWindows[PSS_WINDOW_LABEL_APPEAL_POINTS]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(¶m0->extraWindows[5]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->staticWindows[PSS_WINDOW_LABEL_APPEAL_POINTS]);
|
|
|
|
|
Window_ClearAndScheduleCopyToVRAM(&summaryScreen->extraWindows[PSS_WINDOW_CONTEST_MOVE_DESCRIPTION]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PokemonSummaryScreen_PrintPoffinFeedMsg(PokemonSummaryScreen *summaryScreen, enum PSSPoffinFeedMsg msg)
|
|
|
|
|
@@ -972,7 +959,7 @@ void PokemonSummaryScreen_PrintPoffinFeedMsg(PokemonSummaryScreen *summaryScreen
|
|
|
|
|
entryID = pss_pokemon_wont_eat_more;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Window *window = &summaryScreen->extraWindows[2];
|
|
|
|
|
Window *window = &summaryScreen->extraWindows[PSS_WINDOW_POFFIN_FEED_MSG];
|
|
|
|
|
|
|
|
|
|
Window_DrawMessageBoxWithScrollCursor(window, TRUE, (1024 - (18 + 12)), 13);
|
|
|
|
|
Window_FillTilemap(window, 15);
|
|
|
|
|
|