summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-12-14 11:56:41 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2019-12-14 11:56:41 -0500
commit04d158cfcd0f26b4dc4a00e23464a5fde201aa8e (patch)
tree5722c829dbad65bbbeb573084291ba0621b89df5 /include/global.h
parentd23c1af73e98f3bd91b4551bf624638a33bbe236 (diff)
parent103b63bd1a0a8a00733834de1f5094507e070de9 (diff)
Merge branch 'master' of github.com:pret/pokeruby into modern_gcc
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h
index 1ccc92bb1..b9df3adff 100644
--- a/include/global.h
+++ b/include/global.h
@@ -20,6 +20,20 @@
#define INCBIN_S32 INCBIN
#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("");