mirror of
https://github.com/pret/pokeruby.git
synced 2026-10-02 15:40:40 -04:00
a631973b73
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).
72 lines
2.1 KiB
C
72 lines
2.1 KiB
C
#ifndef GUARD_CONFIG_H
|
|
#define GUARD_CONFIG_H
|
|
|
|
// In the Generation 3 games, Asserts were used in various debug builds.
|
|
// Ruby/Sapphire and Emerald do not have these asserts while Fire Red
|
|
// still has them in the ROM. This is because the developers forgot
|
|
// to define NDEBUG before release, however this has been changed as
|
|
// Ruby's actual debug build does not use the AGBPrint features.
|
|
|
|
// To note, Ruby/Sapphire likely did not use AGBPrint. This is because
|
|
// the german debug ROM of Ruby did not have any uses of AGBPrint and
|
|
// the assert commands but instead a "crash" screen. This config exists
|
|
// for convenience for the user of pokeruby and NOT because it is
|
|
// authoritative. These additions are for user convenience based on
|
|
// officially recommended SDK practices for debugging and is therefore
|
|
// still in part authoritative.
|
|
#define NDEBUG
|
|
|
|
// To enable print debugging, comment out "#define NDEBUG". This allows
|
|
// the various AGBPrint functions to be used. (See include/gba/isagbprint.h).
|
|
// Some emulators support a debug console window: uncomment NoCashGBAPrint()
|
|
// and NoCashGBAPrintf() in libisagbprn.c to use no$gba's own proprietary
|
|
// printing system. Use NoCashGBAPrint() and NoCashGBAPrintf() like you
|
|
// would normally use AGBPrint() and AGBPrintf().
|
|
|
|
#ifndef REVISION
|
|
#define REVISION 0
|
|
#endif
|
|
|
|
#if (ENGLISH && REVISION == 2) || (GERMAN && REVISION == 1)
|
|
#define BUGFIX_BERRY
|
|
#endif
|
|
|
|
#if (ENGLISH && REVISION >= 1) || GERMAN
|
|
#define BUGFIX_GLYPHWIDTH
|
|
#define BUGFIX_SAVEFAILEDSCREEN1
|
|
#endif
|
|
|
|
#if GERMAN
|
|
#define BUGFIX_SAVEFAILEDSCREEN2
|
|
#endif
|
|
|
|
// European editions of Ruby/Sapphire and all editions of Emerald have this fix.
|
|
#if GERMAN
|
|
#define BUGFIX_TRAINERAPPROACH
|
|
#endif
|
|
|
|
#if (ENGLISH && REVISION >= 1) || GERMAN
|
|
#define BUGFIX_EVO_NAME
|
|
#endif
|
|
|
|
#ifdef ENGLISH
|
|
#define UNITS_IMPERIAL
|
|
#elif GERMAN
|
|
#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
|
|
|
|
#endif // GUARD_CONFIG_H
|