summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/global.h18
-rw-r--r--include/string_util.h31
2 files changed, 49 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h
index 37473afc8..faed7fbcc 100644
--- a/include/global.h
+++ b/include/global.h
@@ -31,4 +31,22 @@ typedef u32 bool32;
#include "gba/syscall.h"
#include "gba/macro.h"
+extern u8 gStringVar1[];
+extern u8 gStringVar2[];
+extern u8 gStringVar3[];
+
+enum
+{
+ MALE,
+ FEMALE
+};
+
+struct SaveBlock2
+{
+ u8 playerName[8];
+ u8 playerGender;
+};
+
+extern struct SaveBlock2 gSaveBlock2;
+
#endif // GUARD_GLOBAL_H
diff --git a/include/string_util.h b/include/string_util.h
new file mode 100644
index 000000000..d1b90aa34
--- /dev/null
+++ b/include/string_util.h
@@ -0,0 +1,31 @@
+#ifndef GUARD_STRING_UTIL_H
+#define GUARD_STRING_UTIL_H
+
+enum StringConvertMode
+{
+ STR_CONV_MODE_LEFT_ALIGN,
+ STR_CONV_MODE_RIGHT_ALIGN,
+ STR_CONV_MODE_LEADING_ZEROS
+};
+
+u8 *StringCopy10(u8 *dest, u8 *src);
+u8 *StringGetEnd10(u8 *str);
+u8 *StringCopy8(u8 *dest, u8 *src);
+u8 *StringCopy(u8 *dest, u8 *src);
+u8 *StringAppend(u8 *dest, u8 *src);
+u8 *StringCopyN(u8 *dest, u8 *src, u8 n);
+u8 *StringAppendN(u8 *dest, u8 *src, u8 n);
+u16 StringGetLength(u8 *str);
+s32 StringCompare(u8 *str1, u8 *str2);
+s32 StringCompareN(u8 *str1, u8 *str2, u32 n);
+u8 *ConvertIntToDecimalStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 n);
+u8 *ConvertIntToDecimalStringN_UnknownExtCtrlCode(u8 *dest, s32 value, enum StringConvertMode mode, u8 n);
+u8 *ConvertIntToHexStringN(u8 *dest, s32 value, enum StringConvertMode mode, u8 n);
+u8 *ConvertIntToDecimalString(u8 *dest, s32 value);
+u8 *StringExpandPlaceholders(u8 *dest, u8 *src);
+u8 *UnknownStringFunc(u8 *dest, u8 *src);
+u8 *StringFill(u8 *dest, u8 c, u16 n);
+u8 *StringCopyPadded(u8 *dest, u8 *src, u8 c, u16 n);
+u8 *StringFillWithTerminator(u8 *dest, u16 n);
+
+#endif // GUARD_STRING_UTIL_H