pret / pokeruby

Decompilation of Pokémon Ruby/Sapphire
774 stars 217 forks source link

Add "EUROPE" config define? #277

Open Wack0 opened 7 years ago

Wack0 commented 7 years ago

Some of the code changes being made for German R/S, like bugfixes, apply to all European non-English localisations.

I propose adding something like this to config.h:

#if defined(GERMAN)
#define EUROPE 1
#endif

...then check for the "EUROPE" define for the specific changes / etc that apply for all European non-English localisations.

This should avoid lots of repeated checks for several languages (possibly in several files) in the future.

camthesaxman commented 7 years ago

I think the route we're going with now is to have a #define for each bug fix, and selectively enable them in config.h, and the actual code just uses #ifdef BUGFIX_SOMEBUGFIX instead of checking the language. It doesn't seem any more verbose to do something like this:

#if GERMAN || FRENCH || ITALIAN || SPANISH
#define BUGFIX_SAVEFAILEDSCREEN2
#define BUGFIX_TRAINERAPPROACH
#define BUGFIX_FOO
#define BUGFIX_BAR
//etc
#endif
marijnvdwerf commented 7 years ago

UI-wise, I expect there to be a METRIC/IMPERIAL define as well, ultimately.