diff options
author | red031000 <rubenru09@aol.com> | 2020-08-07 18:15:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-07 18:15:57 +0200 |
commit | 8c3282cded0a1f6a54160e7166bfea23ec31da7e (patch) | |
tree | 4773d2f08e7c7207a884ac2bd6c0e79cb3cd5835 /include/string16.h | |
parent | 14655718ad3fa1ea0ce481b599943b3480ad9e3e (diff) | |
parent | 20573e3d384f73f63836864a0c6c9b0069ee9e9d (diff) |
Merge pull request #259 from PikalaxALT/pikalax_work
Refactor message command syntax; decomp string16 funcs
Diffstat (limited to 'include/string16.h')
-rw-r--r-- | include/string16.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/include/string16.h b/include/string16.h index 71880020..bc276ea7 100644 --- a/include/string16.h +++ b/include/string16.h @@ -1,6 +1,8 @@ #ifndef POKEDIAMOND_STRING16_H #define POKEDIAMOND_STRING16_H +#include "string_util.h" + struct String { u16 maxsize; @@ -10,11 +12,32 @@ struct String u8 padding[2]; }; +struct UnkStruct_0202199C +{ + u8 filler_00[0x70]; + int (*unk_70)(struct UnkStruct_0202199C *, int); +}; + +#define STR16_MAGIC 0xB6F8D2EC + struct String * String_ctor(u32 count, u32 heap_id); -int FUN_02021CE0(struct String *, struct String *); -int FUN_0206AE00(int x); -void FUN_02021E8C(struct String *, u16 *, u32); // copy +BOOL StringCompare(struct String *, struct String *); +void CopyU16ArrayToStringN(struct String *, u16 *, u32); // copy void StringSetEmpty(struct String *); // set empty struct String * StringDup(struct String *, u32 heap_id); +int StringGetWidth(struct UnkStruct_0202199C * r7, const u16 * arr, u32 r6); +int StringGetWidth_SingleLine_HandleClearToControlCode(struct UnkStruct_0202199C * r6, const u16 * arr); +void String_dtor(struct String * str); +void StringCopy(struct String * dest, struct String * src); +void String16_FormatInteger(struct String * str, int num, u32 ndigits, int strConvMode, BOOL whichCharset); +s64 String_atoi(struct String * str, BOOL * flag); +u16 StringGetLength(struct String * str); +int StringCountLines(volatile struct String * str); +void StringGetLineN(struct String * dest, volatile struct String * src, u32 n); +void CopyU16ArrayToString(struct String * str, u16 * buf); +void CopyStringToU16Array(struct String * str, u16 * buf, u32 length); +u16 * String_c_str(struct String * str); +void StringCat(struct String * dest, struct String * src); +void StrUpperFirstChar(struct String * str); #endif //POKEDIAMOND_STRING16_H |