Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configs for measurement systems and decimal separators #4183

Merged
merged 3 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@
#define LOG_HANDLER (LOG_HANDLER_MGBA_PRINT)
#endif

#define ENGLISH

#ifdef ENGLISH
#define UNITS_IMPERIAL
#define CHAR_DEC_SEPARATOR CHAR_PERIOD // Period is used as a decimal separator only in the UK and the US.
#else
#define UNITS_METRIC
#define CHAR_DEC_SEPARATOR CHAR_COMMA
#endif

// Uncomment to fix some identified minor bugs
#define BUGFIX

Expand Down Expand Up @@ -81,4 +71,11 @@
#define SUMMARY_SCREEN_NATURE_COLORS TRUE // If TRUE, nature-based stat boosts and reductions will be red and blue in the summary screen.
#define HQ_RANDOM TRUE // If TRUE, replaces the default RNG with an implementation of SFC32 RNG. May break code that relies on RNG.

// Measurement system constants to be used for UNITS
#define UNITS_IMPERIAL 0 // Inches, feet, pounds
#define UNITS_METRIC 1 // meters, kilograms

#define UNITS UNITS_IMPERIAL
#define CHAR_DEC_SEPARATOR CHAR_PERIOD // CHAR_PERIOD is used as a decimal separator only in the UK and the US. The rest of the world uses CHAR_COMMA.

#endif // GUARD_CONFIG_H
20 changes: 20 additions & 0 deletions include/constants/pokedex.h
Original file line number Diff line number Diff line change
Expand Up @@ -1307,4 +1307,24 @@ enum {

#define HOENN_DEX_COUNT (HOENN_DEX_DEOXYS + 1)

#define DECAGRAMS_IN_POUND 4536
#define CM_PER_INCH 2.54
#define CM_PER_INCH_FACTOR (CM_PER_INCH * 100)
#define INCHES_IN_FOOT 12
#define INCHES_IN_ONE_AND_HALF_FOOT (INCHES_IN_FOOT * 1.5)
#define INCHES_IN_FOOT_FACTOR (INCHES_IN_FOOT * 10)

#define WEIGHT_HEIGHT_STR_LEN 16
#define WEIGHT_HEIGHT_STR_MEM (WEIGHT_HEIGHT_STR_LEN * sizeof(u8))

#define DEX_HEADER_X 96
#define DEX_Y_TOP 57
#define DEX_Y_BOTTOM 73
#define DEX_MEASUREMENT_X 129

#define DEX_HGSS_HEADER_X_PADDING 59
#define DEX_HGSS_Y_TOP_PADDING 7
#define DEX_HGSS_Y_BOTTOM_PADDING 4
#define DEX_HGSS_MEASUREMENT_X_PADDING 51

#endif // GUARD_CONSTANTS_POKEDEX_H
1 change: 1 addition & 0 deletions include/pokedex.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ bool16 HasAllHoennMons(void);
void ResetPokedexScrollPositions(void);
bool16 HasAllMons(void);
void CB2_OpenPokedex(void);
void PrintMonMeasurements(u16 species, u32 owned);

#endif // GUARD_POKEDEX_H
2 changes: 2 additions & 0 deletions include/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,9 @@ extern const u8 gText_PokedexRegistration[];
extern const u8 gText_NumberClear01[];
extern const u8 gText_5MarksPokemon[];
extern const u8 gText_UnkHeight[];
extern const u8 gText_UnkHeightMetric[];
extern const u8 gText_UnkWeight[];
extern const u8 gText_UnkWeightMetric[];
extern const u8 gText_HTHeight[];
extern const u8 gText_WTWeight[];
extern const u8 gText_SearchingPleaseWait[];
Expand Down
Loading
Loading