EVs represented by Arrows instead of numbers, also now in 1 line
This commit is contained in:
parent
eeb1ec8e8d
commit
6bbdc79f5a
@ -533,25 +533,15 @@ extern const u8 gText_SearchCompleted[];
|
||||
extern const u8 gText_NoMatchingPkmnWereFound[];
|
||||
extern const u8 gText_SelectorArrow[];
|
||||
//PokedexPlus HGSS_Ui
|
||||
extern const u8 gText_Stats_EV[];
|
||||
extern const u8 gText_Stats_EV_HP[];
|
||||
extern const u8 gText_Stats_EV_Attack[];
|
||||
extern const u8 gText_Stats_EV_Defense[];
|
||||
extern const u8 gText_Stats_EV_Speed[];
|
||||
extern const u8 gText_Stats_EV_SpAtk[];
|
||||
extern const u8 gText_Stats_EV_SpDef[];
|
||||
extern const u8 gText_Stats_HP[];
|
||||
extern const u8 gText_Stats_Attack[];
|
||||
extern const u8 gText_Stats_Defense[];
|
||||
extern const u8 gText_Stats_Speed[];
|
||||
extern const u8 gText_Stats_SpAtk[];
|
||||
extern const u8 gText_Stats_SpDef[];
|
||||
extern const u8 gText_Stats_EVHP[];
|
||||
extern const u8 gText_Stats_EVAttack[];
|
||||
extern const u8 gText_Stats_EVDefense[];
|
||||
extern const u8 gText_Stats_EVSpeed[];
|
||||
extern const u8 gText_Stats_EVSpAtk[];
|
||||
extern const u8 gText_Stats_EVSpDef[];
|
||||
extern const u8 gText_Stats_SpAttack[];
|
||||
extern const u8 gText_Stats_SpDefense[];
|
||||
extern const u8 gText_Stats_EV_Plus1[];
|
||||
extern const u8 gText_Stats_EV_Plus2[];
|
||||
extern const u8 gText_Stats_EV_Plus3[];
|
||||
extern const u8 gText_Stats_MoveSelectedMax[];
|
||||
extern const u8 gText_Stats_MoveLevel[];
|
||||
extern const u8 gText_Stats_Gender_0[];
|
||||
|
||||
195
src/pokedex.c
195
src/pokedex.c
@ -6758,6 +6758,22 @@ static u8 PrintMonStatsToggle_DifferentEVsRow(u8 differentEVs)
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
static u8* PrintMonStatsToggle_EV_Arrows(u8 *dest, u8 EVs[], u8 position)
|
||||
{
|
||||
switch (EVs[position])
|
||||
{
|
||||
case 1:
|
||||
StringCopy(dest, gText_Stats_EV_Plus1);
|
||||
break;
|
||||
case 2:
|
||||
StringCopy(dest, gText_Stats_EV_Plus2);
|
||||
break;
|
||||
case 3:
|
||||
StringCopy(dest, gText_Stats_EV_Plus3);
|
||||
break;
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
static void PrintMonStatsToggle(u8 taskId)
|
||||
{
|
||||
u8 base_x = 8;
|
||||
@ -6779,7 +6795,7 @@ static void PrintMonStatsToggle(u8 taskId)
|
||||
u8 abilities_y = 99;
|
||||
u8 ability0;
|
||||
u8 differentEVs = 0;
|
||||
u8 differentEVsOffsetX = 0;
|
||||
u8 EVs[6] = {gBaseStats[species].evYield_HP, gBaseStats[species].evYield_Speed, gBaseStats[species].evYield_Attack, gBaseStats[species].evYield_SpAttack, gBaseStats[species].evYield_Defense, gBaseStats[species].evYield_SpDefense};
|
||||
|
||||
//Clear old text
|
||||
FillWindowPixelRect(0, PIXEL_FILL(0), base_x, base_y, 90, 100); //bottom stats
|
||||
@ -6802,7 +6818,7 @@ static void PrintMonStatsToggle(u8 taskId)
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].baseAttack, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x+base_x_first_row, base_y + base_y_offset*base_i);
|
||||
|
||||
PrintInfoScreenTextSmall(gText_Stats_SpAtk, base_x+base_x_second_row, base_y + base_y_offset*base_i);
|
||||
PrintInfoScreenTextSmall(gText_Stats_SpAttack, base_x+base_x_second_row, base_y + base_y_offset*base_i);
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].baseSpAttack, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x+base_x_offset, base_y + base_y_offset*base_i);
|
||||
|
||||
@ -6811,71 +6827,142 @@ static void PrintMonStatsToggle(u8 taskId)
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].baseDefense, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x+base_x_first_row, base_y + base_y_offset*base_i);
|
||||
|
||||
PrintInfoScreenTextSmall(gText_Stats_SpDef, base_x+base_x_second_row, base_y + base_y_offset*base_i);
|
||||
PrintInfoScreenTextSmall(gText_Stats_SpDefense, base_x+base_x_second_row, base_y + base_y_offset*base_i);
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].baseSpDefense, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x+base_x_offset, base_y + base_y_offset*base_i);
|
||||
base_i++;
|
||||
}
|
||||
else //EV increses
|
||||
else //EV increases
|
||||
{
|
||||
if (gBaseStats[species].evYield_HP > 0) //HP
|
||||
{
|
||||
//Count how many different EVs
|
||||
if (EVs[0] > 0) //HP
|
||||
differentEVs++;
|
||||
if (EVs[1] > 0) //Speed
|
||||
differentEVs++;
|
||||
if (EVs[2] > 0) //Attack
|
||||
differentEVs++;
|
||||
if (EVs[3] > 0) //Special Attack
|
||||
differentEVs++;
|
||||
if (EVs[4] > 0) //Defense
|
||||
differentEVs++;
|
||||
if (EVs[5] > 0) //Special Defense
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_EVHP, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].evYield_HP, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_Speed > 0) //Speed
|
||||
//If 1 or 2 EVs display with the same layout as the base stats
|
||||
if (differentEVs < 3)
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_EVSpeed, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].evYield_Speed, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
differentEVs = 0;
|
||||
|
||||
if (gBaseStats[species].evYield_Attack > 0) //Attack
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_EVAttack, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].evYield_Attack, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
if (gBaseStats[species].evYield_HP > 0) //HP
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_HP, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 0);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_SpAttack > 0) //Special Attack
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_EVSpAtk, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].evYield_SpAttack, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
if (gBaseStats[species].evYield_Speed > 0) //Speed
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_Speed, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 1);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_Defense > 0) //Defense
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_EVDefense, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].evYield_Defense, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
if (gBaseStats[species].evYield_Attack > 0) //Attack
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_Attack, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 2);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_SpDefense > 0) //Special Defense
|
||||
if (gBaseStats[species].evYield_SpAttack > 0) //Special Attack
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_SpAttack, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_Defense > 0) //Defense
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_Defense, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 4);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_SpDefense > 0) //Special Defense
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_SpDefense, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 5);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
}
|
||||
}
|
||||
else //3 different EVs in 1 row
|
||||
{
|
||||
differentEVs++;
|
||||
column = PrintMonStatsToggle_DifferentEVsColumn(differentEVs);
|
||||
base_i = PrintMonStatsToggle_DifferentEVsRow(differentEVs);
|
||||
PrintInfoScreenTextSmall(gText_Stats_EVSpDef, base_x + x_offset_column*column, base_y + base_y_offset*base_i);
|
||||
ConvertIntToDecimalStringN(strBase, gBaseStats[species].evYield_SpDefense, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + x_offset_column*column + x_offset_value, base_y + base_y_offset*base_i);
|
||||
column = 0;
|
||||
if (gBaseStats[species].evYield_HP > 0) //HP
|
||||
{
|
||||
PrintInfoScreenTextSmall(gText_Stats_HP, base_x + 29*column, base_y);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 0);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + 29*column + 21, base_y);
|
||||
column++;
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_Speed > 0) //Speed
|
||||
{
|
||||
PrintInfoScreenTextSmall(gText_Stats_Speed, base_x + 29*column, base_y);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 1);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + 29*column + 21, base_y);
|
||||
column++;
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_Attack > 0) //Attack
|
||||
{
|
||||
PrintInfoScreenTextSmall(gText_Stats_Attack, base_x + 29*column, base_y);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 2);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + 29*column + 21, base_y);
|
||||
column++;
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_SpAttack > 0) //Special Attack
|
||||
{
|
||||
PrintInfoScreenTextSmall(gText_Stats_SpAttack, base_x + 29*column, base_y);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 3);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + 29*column + 21, base_y);
|
||||
column++;
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_Defense > 0) //Defense
|
||||
{
|
||||
PrintInfoScreenTextSmall(gText_Stats_Defense, base_x + 29*column, base_y);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 4);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + 29*column + 21, base_y);
|
||||
column++;
|
||||
}
|
||||
|
||||
if (gBaseStats[species].evYield_SpDefense > 0) //Special Defense
|
||||
{
|
||||
PrintInfoScreenTextSmall(gText_Stats_SpDefense, base_x + 29*column, base_y);
|
||||
PrintMonStatsToggle_EV_Arrows(strBase, EVs, 5);
|
||||
PrintInfoScreenTextSmall(strBase, base_x + 29*column + 21, base_y);
|
||||
column++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1820,25 +1820,15 @@ const u8 gText_Berries[] = _("BERRIES");
|
||||
|
||||
|
||||
//HGSS_Ui PokedexPlus
|
||||
const u8 gText_Stats_EV[] = _("EV: ");
|
||||
const u8 gText_Stats_EV_HP[] = _("HP {PLUS} ");
|
||||
const u8 gText_Stats_EV_Attack[] = _("ATTACK {PLUS} ");
|
||||
const u8 gText_Stats_EV_Defense[] = _("DEFENSE {PLUS} ");
|
||||
const u8 gText_Stats_EV_Speed[] = _("SPEED {PLUS} ");
|
||||
const u8 gText_Stats_EV_SpAtk[] = _("SP. ATK {PLUS} ");
|
||||
const u8 gText_Stats_EV_SpDef[] = _("SP. DEF {PLUS}");
|
||||
const u8 gText_Stats_HP[] = _("HP ");
|
||||
const u8 gText_Stats_Attack[] = _("ATK ");
|
||||
const u8 gText_Stats_Defense[] = _("DEF ");
|
||||
const u8 gText_Stats_Speed[] = _("SPE ");
|
||||
const u8 gText_Stats_SpAtk[] = _("SP.A ");
|
||||
const u8 gText_Stats_SpDef[] = _("SP.D ");
|
||||
const u8 gText_Stats_EVHP[] = _("EV HP");
|
||||
const u8 gText_Stats_EVAttack[] = _("EV ATK");
|
||||
const u8 gText_Stats_EVDefense[] = _("EV DEF");
|
||||
const u8 gText_Stats_EVSpeed[] = _("EV SPE");
|
||||
const u8 gText_Stats_EVSpAtk[] = _("EV SP.A");
|
||||
const u8 gText_Stats_EVSpDef[] = _("EV SP.D");
|
||||
const u8 gText_Stats_SpAttack[] = _("SP.A ");
|
||||
const u8 gText_Stats_SpDefense[] = _("SP.D ");
|
||||
const u8 gText_Stats_EV_Plus1[] = _("{UP_ARROW_2}");
|
||||
const u8 gText_Stats_EV_Plus2[] = _("{UP_ARROW_2}{UP_ARROW_2}");
|
||||
const u8 gText_Stats_EV_Plus3[] = _("{UP_ARROW_2}{UP_ARROW_2}{UP_ARROW_2}");
|
||||
const u8 gText_Stats_MoveSelectedMax[] = _("{STR_VAR_1} / {STR_VAR_2}");
|
||||
const u8 gText_Stats_MoveLevel[] = _("LVL");
|
||||
const u8 gText_Stats_Gender_0[] = _("♂");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user