summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarijn van der Werf <marijn.vanderwerf@gmail.com>2017-05-22 20:05:20 +0200
committerMarijn van der Werf <marijn.vanderwerf@gmail.com>2017-05-26 00:35:31 +0200
commit524b2c20082031c07490070601d22708a8010904 (patch)
tree0974c2eb7e736b578a3d572c99a89e4d22fcc1ea
parent1398206bd5feeea5f04fd26e6a9a28a773125cd6 (diff)
Make berry_tag_screen match German build
-rw-r--r--include/config.h6
-rw-r--r--src/berry_tag_screen.c19
2 files changed, 25 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 205f53f16..6a77c4c74 100644
--- a/include/config.h
+++ b/include/config.h
@@ -27,6 +27,12 @@
#define BUGFIX_EVO_NAME
#endif
+#ifdef ENGLISH
+#define UNITS_IMPERIAL
+#elif GERMAN
+#define UNITS_METRIC
+#endif
+
// Fixed in Emerald.
// #define BUGFIX_SETMONIVS
diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c
index f0bcb4f27..394a3691b 100644
--- a/src/berry_tag_screen.c
+++ b/src/berry_tag_screen.c
@@ -263,30 +263,49 @@ static void sub_8146480(u8 taskid)
static void sub_81464E4(void)
{
const struct Berry *berryInfo;
+#ifdef UNITS_IMPERIAL
u32 size;
s32 sizeMajor;
s32 sizeMinor;
+#endif
+#if GERMAN
+ u8 buffer[16];
+#endif
berryInfo = GetBerryInfo(gScriptItemId + OFFSET_7B + 1);
ConvertIntToDecimalStringN(gStringVar1, gScriptItemId - FIRST_BERRY + 1, STR_CONV_MODE_LEADING_ZEROS, 2);
MenuPrint(gStringVar1, 12, 4);
+#if ENGLISH
MenuPrint(berryInfo->name, 14, 4);
+#elif GERMAN
+ StringCopy(buffer, berryInfo->name);
+ StringAppend(buffer, gOtherText_Berry2);
+ MenuPrint(buffer, 14, 4);
+#endif
+
MenuPrint(berryInfo->description1, 4, 14);
MenuPrint(berryInfo->description2, 4, 16);
+#ifdef UNITS_IMPERIAL
size = (berryInfo->size * 1000) / 254;
if (size % 10 >= 5)
size += 10;
sizeMinor = (size % 100) / 10;
sizeMajor = size / 100;
+#endif
MenuPrint(gOtherText_Size, 11, 7);
if (berryInfo->size != 0)
{
+#ifdef UNITS_IMPERIAL
ConvertIntToDecimalStringN(gStringVar1, sizeMajor, STR_CONV_MODE_LEFT_ALIGN, 2);
ConvertIntToDecimalStringN(gStringVar2, sizeMinor, STR_CONV_MODE_LEFT_ALIGN, 2);
+#else
+ ConvertIntToDecimalStringN(gStringVar1, berryInfo->size / 10, STR_CONV_MODE_LEFT_ALIGN, 2);
+ ConvertIntToDecimalStringN(gStringVar2, berryInfo->size % 10, STR_CONV_MODE_LEFT_ALIGN, 2);
+#endif
MenuPrint(gContestStatsText_Unknown1, 16, 7);
}
else