summaryrefslogtreecommitdiff
path: root/src/mail.c
diff options
context:
space:
mode:
authoreasyaspi314 (Devin) <easyaspi314@users.noreply.github.com>2019-08-23 20:44:01 -0400
committereasyaspi314 (Devin) <easyaspi314@users.noreply.github.com>2019-08-23 20:44:01 -0400
commita631973b73977f33ef98042abca9fca287792439 (patch)
tree5418525ee00fbfaa046adecfb3d328c4c00e02d7 /src/mail.c
parentbc159dbb03735db55e6a09bb7947dccc70d0532b (diff)
[WIP] English Debug menu translations! (Plus some build system fixes)
I'm back!            す Éß テ-ブ↑& ÒÛªù! (かなテーブルを捨てろよ!/Throw away the kana table!) When compiled in English with DEBUG, instead of óじばÌ (mojibake), you now get actual English translations! No more switching from the game, to the kana chart, and if you don't know Japanese, Google Translate, just to read one sentence. Additionally, the few unknown translations should use proper encoding or Romaji. I decided to use a nicer macro system: static const u8 sStrHello[] = DTR("こんにちは", "Hello"); This prevents ifdef HELL, as the mixed Japanese and English would be messy. Additionally, some special character issues were corrected. Things untranslated/bugs: - Tomomichi's dummy functions. Of course, they don't do much. - The title screen battle menu. This uses a Gen 2 style tile rendering and the way it is rendered is incredibly overcomplicated. - A few phrases which I couldn't get a clear translation for. I don't know much Japanese lol. - Song names. Just tedious with the limited buffer size. - A few layout issues. Some dimensions should be tweaked to avoid text box ovetflows. - Potential buffer overflows, which I want to try to avoid - (ASan for GBA? :morphon:) - While I use the DEBUG_TRANSLATE flag (automatic with ENGLISH && DEBUG) for C code, the asm data only checks for ENGLISH && DEBUG. Additionally, they are ugly. - Haven't tested all builds yet. - Some code formatting issues. I also made it so this will compile with the system preprocessor (including Clang), and my agbcc binutils (which will attempt to be selected automatically if you don't have DKP). Clang needs a few flags (it can't do asm enums with line numbers and it does trigraphs in standard mode), but it is no longer flipping out. I am going to restart my build system project. It was getting way off track, and ucpp was too difficult to maintain (one of the main reasons for the silence).
Diffstat (limited to 'src/mail.c')
-rw-r--r--src/mail.c58
1 files changed, 31 insertions, 27 deletions
diff --git a/src/mail.c b/src/mail.c
index 8b4647532..27a25feba 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -242,9 +242,9 @@ const struct MailLayout gUnknown_083E57A4[] =
#if DEBUG
-const u8 Str_8411540[] = _("レイアウトを にほんごで ひょうじ?"); // Display using Japanese layout?
-const u8 Str_8411553[] = _("にほんご "); // Japanese
-const u8 Str_8411559[] = _("かいがい "); // Overseas
+const u8 Str_8411540[] = DTR("レイアウトを にほんごで ひょうじ?", "Display using JAPANESE layout?");
+const u8 Str_8411553[] = DTR("にほんご ", "JAPANESE");
+const u8 Str_8411559[] = DTR("かいがい ", "OVERSEAS");
const u8 *const _8411560[] =
{
@@ -252,20 +252,20 @@ const u8 *const _8411560[] =
Str_8411559,
};
-const u8 Str_8411568[] = _("イメージ タイプを えらんでね"); // Choose an image type
+const u8 Str_8411568[] = DTR("イメージ タイプを えらんでね", "Choose an image type");
const u8 Str_8411578[] = _("{STR_VAR_1}");
-const u8 Str_841157B[] = _("オレンジ "); // Orange
-const u8 Str_8411581[] = _("ハーバー "); // Harbor
-const u8 Str_8411587[] = _("キラキラ "); // Glitter
-const u8 Str_841158D[] = _("メカニカル"); // Mech
-const u8 Str_8411593[] = _("ウッディー"); // Wood
-const u8 Str_8411599[] = _("クロス  "); // Wave
-const u8 Str_841159F[] = _("トレジャー"); // Bead
-const u8 Str_84115A5[] = _("シャドウ "); // Shadow
-const u8 Str_84115AB[] = _("トロピカル"); // Tropic
-const u8 Str_84115B1[] = _("ドリーム "); // Dream
-const u8 Str_84115B7[] = _("ミラクル "); // Fab
-const u8 Str_84115BD[] = _("レトロ  "); // Retro
+const u8 Str_841157B[] = DTR("オレンジ ", "ORANGE ");
+const u8 Str_8411581[] = DTR("ハーバー ", "HARBOR ");
+const u8 Str_8411587[] = DTR("キラキラ ", "GLITTER");
+const u8 Str_841158D[] = DTR("メカニカル", "MECH ");
+const u8 Str_8411593[] = DTR("ウッディー", "WOOD ");
+const u8 Str_8411599[] = DTR("クロス  ", "WAVE ");
+const u8 Str_841159F[] = DTR("トレジャー", "BEAD ");
+const u8 Str_84115A5[] = DTR("シャドウ ", "SHADOW ");
+const u8 Str_84115AB[] = DTR("トロピカル", "TROPIC ");
+const u8 Str_84115B1[] = DTR("ドリーム ", "DREAM ");
+const u8 Str_84115B7[] = DTR("ミラクル ", "FAB ");
+const u8 Str_84115BD[] = DTR("レトロ  ", "RETRO ");
const u8 *const _84115C4[] =
{
@@ -283,10 +283,10 @@ const u8 *const _84115C4[] =
Str_84115BD,
};
-const u8 Str_84115F4[] = _("メールをみる"); // View Mail
-const u8 Str_84115FB[] = _("メールとうろく"); // Register Mail
-const u8 Str_8411603[] = _("もたせる"); // Give to Pokémon
-const u8 Str_8411608[] = _("メールをけす"); // Delete Mail
+const u8 Str_84115F4[] = DTR("メールをみる", "View MAIL");
+const u8 Str_84115FB[] = DTR("メールとうろく", "Register MAIL");
+const u8 Str_8411603[] = DTR("もたせる", "Give MAIL");
+const u8 Str_8411608[] = DTR("メールをけす", "Delete MAIL");
#endif
@@ -744,7 +744,7 @@ void debug_sub_810CA7C(u8 taskId)
void debug_sub_810CB50(u8 taskId)
{
u8 sp0[] = _("{STR_VAR_1} {STR_VAR_2}");
- u8 sp8[] = _("メール{STR_VAR_1} {STR_VAR_2}");
+ u8 sp8[] = DTR("メール{STR_VAR_1} {STR_VAR_2}", "MAIL{STR_VAR_1} {STR_VAR_2}");
bool8 r2 = FALSE;
if (gMain.newKeys & A_BUTTON)
@@ -791,7 +791,7 @@ void debug_sub_810CB50(u8 taskId)
void debug_sub_810CCEC(u8 taskId)
{
- u8 string1[] = _("メール{STR_VAR_1}を だれに もたせる?");
+ u8 string1[] = DTR("メール{STR_VAR_1}を だれに もたせる?", "Give MAIL {STR_VAR_1} to who?");
u8 string2[] = _("000 {STR_VAR_1}");
ConvertIntToDecimalStringN(gStringVar1, gSpecialVar_0x8005, 1, 1);
@@ -876,8 +876,10 @@ u8 debug_sub_810CEA4(void)
u8 debug_sub_810CED0(void)
{
- u8 text[] = _("せいきの データが とうろくずみ です\n"
- "しんき とうろく できません");
+ u8 text[] = DTR("せいきの データが とうろくずみ です\n"
+ "しんき とうろく できません",
+ "Normal data is registered.\n"
+ "Cannot register new data.");
s8 input = Menu_ProcessInput();
switch (input)
@@ -911,8 +913,10 @@ u8 debug_sub_810CED0(void)
u8 debug_sub_810CFA4(void)
{
- u8 text[] = _("せいきに とうろくされたメールデータは\n"
- "へんこう できません");
+ u8 text[] = DTR("せいきに とうろくされたメールデータは\n"
+ "へんこう できません",
+ "Regularly, registered MAIL data\n"
+ "cannot be changed.");
s8 input = Menu_ProcessInput();
switch (input)
@@ -990,7 +994,7 @@ u8 debug_sub_810D030(void)
void debug_sub_810D174(u8 a)
{
- u8 string[] = _("メール{STR_VAR_1} {STR_VAR_2} {STR_VAR_3}");
+ u8 string[] = DTR("メール{STR_VAR_1} {STR_VAR_2} {STR_VAR_3}", "MAIL{STR_VAR_1} {STR_VAR_2} {STR_VAR_3}");
u8 buffer[9][20];
struct MenuAction menuActions[9];
u8 i;