diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 10 | ||||
-rw-r--r-- | include/global.h | 14 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index 796da359c..0046c3878 100644 --- a/include/config.h +++ b/include/config.h @@ -55,6 +55,16 @@ #define UNITS_METRIC #endif +// An option to use translations/encoding fixes for the Debug menus. +// Selected by default for custom English debug roms. +#ifndef DEBUG_TRANSLATE +#if ENGLISH && DEBUG +#define DEBUG_TRANSLATE 1 +#else +#define DEBUG_TRANSLATE 0 +#endif +#endif + // Fixed in Emerald. // #define BUGFIX_SETMONIVS diff --git a/include/global.h b/include/global.h index d64cf987d..9e8d2e115 100644 --- a/include/global.h +++ b/include/global.h @@ -18,6 +18,20 @@ #define INCBIN_S32 {0} #endif +// For debug menu translations. +// DTR("こんにちは", "Hello") will expand to "Hello" with DEBUG_TRANSLATE, +// or "こんにちは" if not. +// The KANA macro will wrap Japanese text with encoding markers to +// prevent mojibake while they are being translated. + +#if DEBUG_TRANSLATE +#define DTR(japanese, english) _(english) +#define KANA(txt) _("{JPN}" txt "{ENG}") +#else +#define DTR(japanese, english) _(japanese) +#define KANA(txt) _(txt) +#endif + // Prevent cross-jump optimization. #define BLOCK_CROSS_JUMP asm(""); |