From a631973b73977f33ef98042abca9fca287792439 Mon Sep 17 00:00:00 2001 From: "easyaspi314 (Devin)" Date: Fri, 23 Aug 2019 20:44:01 -0400 Subject: [WIP] English Debug menu translations! (Plus some build system fixes) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- src/debug/matsuda_debug_menu.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/debug/matsuda_debug_menu.c') diff --git a/src/debug/matsuda_debug_menu.c b/src/debug/matsuda_debug_menu.c index 1d2879661..27d2db66b 100644 --- a/src/debug/matsuda_debug_menu.c +++ b/src/debug/matsuda_debug_menu.c @@ -44,13 +44,13 @@ static void sub_80AA614(u8, u8); static void sub_80AAD08(struct Sprite *, s8); // unused -const u8 gText_Unused83C9150[] = _("テストです"); // "test" +const u8 gText_Unused83C9150[] = DTR("テストです", "Test"); const u8 gMatsudaDebugMenu_ActionContestText[] = _("Contest"); const u8 gMatsudaDebugMenu_ActionContestResultsText[] = _("Contest results"); // unused -const u8 gMatsudaDebugMenu_ActionChangePerimeterText[] = _("パラメータへんこう"); // "Change parameter" +const u8 gMatsudaDebugMenu_ActionChangeParameterText[] = DTR("パラメータへんこう", "Change parameter"); // unused -const u8 gMatsudaDebugMenu_ActionChangeMoveText[] = _("わざ へんこう"); // "Change move" +const u8 gMatsudaDebugMenu_ActionChangeMoveText[] = DTR("わざ へんこう", "Change move"); // "Change move" const u8 gMatsudaDebugMenu_ActionContestCommText[] = _("Contest (comm.)"); const u8 gMatsudaDebugMenu_ActionCommTestText[] = _("Init comm. data"); const u8 gMatsudaDebugMenu_ActionSetHighScoreText[] = _("Set highest score"); @@ -387,8 +387,8 @@ static void (* const gUnknown_083C92E4[][2])(struct Sprite *, s8) = }; static const u8 gMatsudaDebugMenu_StartText[] = _("{COLOR CYAN}{HIGHLIGHT RED}"); -static const u8 gMatsudaDebugMenu_StartJapText[] = _("かいし"); // because StartText is only called by StringCopy, this part appears to be unused. -static const u8 gMatsudaDebugMenu_GoBackText[] = _("もどる"); +static const u8 gMatsudaDebugMenu_StartJapText[] = DTR("かいし", "START"); // because StartText is only called by StringCopy, this part appears to be unused. +static const u8 gMatsudaDebugMenu_GoBackText[] = DTR("もどる", "BACK"); #ifdef GERMAN static const u8 gMatsudaDebugMenu_BattlePointsText[] = _("{COLOR MAGENTA}BP,"); @@ -396,12 +396,12 @@ static const u8 gMatsudaDebugMenu_BattlePointsText[] = _("{COLOR MAGENTA}BP,"); static const u8 gMatsudaDebugMenu_BattlePointsText[] = _("{COLOR MAGENTA}BP."); #endif -static const u8 MatsudaDebugMenuText_Cool[] = _("かっこよさ"); // cool -static const u8 MatsudaDebugMenuText_Cute[] = _("かわいさ"); // cute -static const u8 MatsudaDebugMenuText_Beauty[] = _("うつくしさ"); // beauty -static const u8 MatsudaDebugMenuText_Smart[] = _("かしこさ"); // smart -static const u8 MatsudaDebugMenuText_Tough[] = _("たくましさ"); // tough -static const u8 MatsudaDebugMenuText_Sheen[] = _("けづや"); // sheen +static const u8 MatsudaDebugMenuText_Cool[] = DTR("かっこよさ", "COOL"); +static const u8 MatsudaDebugMenuText_Cute[] = DTR("かわいさ", "CUTE"); +static const u8 MatsudaDebugMenuText_Beauty[] = DTR("うつくしさ", "BEAUTY"); +static const u8 MatsudaDebugMenuText_Smart[] = DTR("かしこさ", "SMART"); +static const u8 MatsudaDebugMenuText_Tough[] = DTR("たくましさ", "TOUGH"); +static const u8 MatsudaDebugMenuText_Sheen[] = DTR("けづや", "SHEEN"); static const u8 *const gMatsudaDebugMenuTextList1[] = { @@ -413,11 +413,11 @@ static const u8 *const gMatsudaDebugMenuTextList1[] = MatsudaDebugMenuText_Sheen, }; -static const u8 MatsudaDebugMenuText_CoolContest[] = _("かっこよさコンテスト"); -static const u8 MatsudaDebugMenuText_BeautyContest[] = _("うつくしさコンテスト"); -static const u8 MatsudaDebugMenuText_CuteContest[] = _("かわいさコンテスト "); -static const u8 MatsudaDebugMenuText_SmartContest[] = _("かしこさコンテスト "); -static const u8 MatsudaDebugMenuText_ToughContest[] = _("たくましさコンテスト"); +static const u8 MatsudaDebugMenuText_CoolContest[] = DTR("かっこよさコンテスト", "COOL CONTEST"); +static const u8 MatsudaDebugMenuText_BeautyContest[] = DTR("うつくしさコンテスト", "BEAUTY CONTEST"); +static const u8 MatsudaDebugMenuText_CuteContest[] = DTR("かわいさコンテスト ", "CUTE CONTEST"); +static const u8 MatsudaDebugMenuText_SmartContest[] = DTR("かしこさコンテスト ", "SMART CONTEST"); +static const u8 MatsudaDebugMenuText_ToughContest[] = DTR("たくましさコンテスト", "TOUGH CONTEST"); static const u8 *const gMatsudaDebugMenuTextList2[] = { @@ -428,10 +428,10 @@ static const u8 *const gMatsudaDebugMenuTextList2[] = MatsudaDebugMenuText_ToughContest, }; -static const u8 MatsudaDebugMenuText_Fallarbor[] = _("ハジツゲ/ノーマル"); // Fallarbor / Normal -static const u8 MatsudaDebugMenuText_Verdanturf[] = _("シダケ/スーパー "); // Verdanturf / Super -static const u8 MatsudaDebugMenuText_Slateport[] = _("カイナ/ハイパー "); // Slateport / Hyper -static const u8 MatsudaDebugMenuText_Lilycove[] = _("ミナモ/マスター "); // Lilycove / Master +static const u8 MatsudaDebugMenuText_Fallarbor[] = DTR("ハジツゲ/ノーマル", "FALLARBOR/NORMAL"); // Fallarbor / Normal +static const u8 MatsudaDebugMenuText_Verdanturf[] = DTR("シダケ/スーパー ", "VERDANTURF/SUPER"); // Verdanturf / Super +static const u8 MatsudaDebugMenuText_Slateport[] = DTR("カイナ/ハイパー ", "SLATEPORT/HYPER"); // Slateport / Hyper +static const u8 MatsudaDebugMenuText_Lilycove[] = DTR("ミナモ/マスター ", "LILYCOVE/MASTER"); // Lilycove / Master static const u8 *const gMatsudaDebugMenuTextList3[] = { -- cgit v1.2.3