diff options
author | YamaArashi <shadow962@live.com> | 2017-01-12 21:00:43 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2017-01-12 21:00:52 -0800 |
commit | 88d87495ed2e5e29074ee97d5c636ec75a6e88fe (patch) | |
tree | db8d8b3b35d3836162cc5749fc11f930cf1590a4 /src/name_string_util.c | |
parent | 0db72319326c6b29b0fdcdd1e7767a7e7ba46a1d (diff) |
decompile name_string_util
Diffstat (limited to 'src/name_string_util.c')
-rw-r--r-- | src/name_string_util.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/name_string_util.c b/src/name_string_util.c new file mode 100644 index 000000000..27e6d99d0 --- /dev/null +++ b/src/name_string_util.c @@ -0,0 +1,39 @@ +#include "global.h" +#include "text.h" +#include "string_util.h" + +void PadNameString(u8 *a1, u8 a2) +{ + u8 i; + + StripExtCtrlCodes(a1); + i = StringLength(a1); + + if (a2 == 0xFC) + { + while (i < 6) + { + a1[i] = 0xFC; + a1[i + 1] = 7; + i += 2; + } + } + else + { + while (i < 6) + { + a1[i] = a2; + i++; + } + } + + a1[i] = EOS; +} + +void SanitizeNameString(u8 *a1) +{ + if (StringLength(a1) < 6) + ConvertInternationalString(a1, 1); + else + StripExtCtrlCodes(a1); +} |