diff options
author | YamaArashi <shadow962@live.com> | 2017-05-05 16:46:59 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2017-05-05 16:46:59 -0700 |
commit | 084dc5134cedbb7e1b2ae280ecbcb3884993a7be (patch) | |
tree | b784dda8c415b7ca25835582c14640322505c044 /src | |
parent | 9c41a78a1a1635ff891d7384f3a437c2bf43809e (diff) |
some German differences
Diffstat (limited to 'src')
-rw-r--r-- | src/string_util.c | 15 | ||||
-rw-r--r-- | src/text.c | 8 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src/string_util.c b/src/string_util.c index e537cff3a..957d70153 100644 --- a/src/string_util.c +++ b/src/string_util.c @@ -137,6 +137,21 @@ u16 StringLength(const u8 *str) return length; } +#ifdef GERMAN +s32 StringLengthN(const u8 *str, s32 n) +{ + s32 i; + + for (i = 0; i < n && str[i] != EOS; i++) + ; + + if (i == n) + i = 0; + + return i; +} +#endif + s32 StringCompare(const u8 *str1, const u8 *str2) { while (*str1 == *str2) diff --git a/src/text.c b/src/text.c index cc3dab547..05f327adf 100644 --- a/src/text.c +++ b/src/text.c @@ -2474,12 +2474,18 @@ static u8 UpdateWindowText(struct Window *win) return 0; } +#if defined(ENGLISH) +#define SUB_800374C_LINE_LENGTH 26 +#elif defined(GERMAN) +#define SUB_800374C_LINE_LENGTH 27 +#endif + u8 sub_800374C(struct Window *win) { u8 retVal; sWaitType = 1; - sLineLength = 26; + sLineLength = SUB_800374C_LINE_LENGTH; retVal = UpdateWindowText(win); sLineLength = 26; sWaitType = 0; |