From 74e562da33e2aa862e927c707a21d63ffd81b477 Mon Sep 17 00:00:00 2001 From: TheXaman Date: Sat, 12 Jun 2021 15:29:01 +0200 Subject: [PATCH] friendship now emoji based --- include/strings.h | 6 +++++- src/pokedex.c | 25 +++++++++++++++++++++++-- src/strings.c | 6 +++++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/include/strings.h b/include/strings.h index 5707412579..1e7f01190c 100644 --- a/include/strings.h +++ b/include/strings.h @@ -562,10 +562,14 @@ extern const u8 gText_Stats_Gender_75[]; extern const u8 gText_Stats_Gender_87_5[]; extern const u8 gText_Stats_Gender_100[]; extern const u8 gText_Stats_Catch[]; -extern const u8 gText_Stats_Exp[]; +extern const u8 gText_Stats_ExpYield[]; extern const u8 gText_Stats_EggCycles[]; extern const u8 gText_Stats_Growthrate[]; extern const u8 gText_Stats_Friendship[]; +extern const u8 gText_Stats_Friendship_BigAnger[]; +extern const u8 gText_Stats_Friendship_Neutral[]; +extern const u8 gText_Stats_Friendship_Happy[]; +extern const u8 gText_Stats_Friendship_BigSmile[]; extern const u8 gText_Stats_MEDIUM_FAST[]; extern const u8 gText_Stats_ERRATIC[]; extern const u8 gText_Stats_FLUCTUATING[]; diff --git a/src/pokedex.c b/src/pokedex.c index 99c97b7faa..5798c86f6a 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -6834,14 +6834,35 @@ static void PrintMonStatsToggle(u8 taskId) if (gTasks[taskId].data[5] == 0) { //Exp - PrintInfoScreenTextSmall(gText_Stats_Exp, base_x, base_y + base_offset*base_i); + PrintInfoScreenTextSmall(gText_Stats_ExpYield, base_x, base_y + base_offset*base_i); ConvertIntToDecimalStringN(gStringVar1, gBaseStats[species].expYield, STR_CONV_MODE_RIGHT_ALIGN, 3); PrintInfoScreenTextSmall(gStringVar1, base_x + base_x_offset, base_y + base_offset*base_i); base_i++; //friendship PrintInfoScreenTextSmall(gText_Stats_Friendship, base_x, base_y + base_offset*base_i); - ConvertIntToDecimalStringN(strEV, gBaseStats[species].friendship, STR_CONV_MODE_RIGHT_ALIGN, 3); + switch (gBaseStats[species].friendship) + { + case 35: + StringCopy(strEV, gText_Stats_Friendship_BigAnger); + break; + case 70: + StringCopy(strEV, gText_Stats_Friendship_Neutral); + break; + case 90: + StringCopy(strEV, gText_Stats_Friendship_Happy); + break; + case 100: + StringCopy(strEV, gText_Stats_Friendship_Happy); + break; + case 140: + StringCopy(strEV, gText_Stats_Friendship_BigSmile); + break; + default: + ConvertIntToDecimalStringN(strEV, gBaseStats[species].friendship, STR_CONV_MODE_RIGHT_ALIGN, 3); + break; + } + // ConvertIntToDecimalStringN(strEV, gBaseStats[species].friendship, STR_CONV_MODE_RIGHT_ALIGN, 3); align_x = GetStringRightAlignXOffset(0, strEV, total_x); PrintInfoScreenTextSmall(strEV, align_x, base_y + base_offset*base_i); base_i++; diff --git a/src/strings.c b/src/strings.c index 5bab8cbb03..1537e61a0d 100644 --- a/src/strings.c +++ b/src/strings.c @@ -1849,10 +1849,14 @@ const u8 gText_Stats_Gender_75[] = _("♀ 3/1 ♂"); //_("♀ 75 / 25 const u8 gText_Stats_Gender_87_5[] = _("♀ 7/1 ♂"); const u8 gText_Stats_Gender_100[] = _("♀"); const u8 gText_Stats_Catch[] = _("CATCH RATE: "); -const u8 gText_Stats_Exp[] = _("EXPERIENCE: "); +const u8 gText_Stats_ExpYield[] = _("EXP YIELD: "); const u8 gText_Stats_EggCycles[] = _("EGG CYCLES: "); const u8 gText_Stats_Growthrate[] = _("GROW: "); const u8 gText_Stats_Friendship[] = _("FRIENDSHIP:" ); +const u8 gText_Stats_Friendship_BigAnger[] = _("{EMOJI_BIGANGER}"); +const u8 gText_Stats_Friendship_Neutral[] = _("{EMOJI_NEUTRAL}"); +const u8 gText_Stats_Friendship_Happy[] = _("{EMOJI_HAPPY}"); +const u8 gText_Stats_Friendship_BigSmile[] = _("{EMOJI_BIGSMILE}"); const u8 gText_Stats_MEDIUM_FAST[] = _("MED. FAST"); const u8 gText_Stats_ERRATIC[] = _("ERRATIC"); const u8 gText_Stats_FLUCTUATING[] = _("FLUCTUATING");