diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/itemtool.h | 9 | ||||
-rw-r--r-- | include/msg_data.h | 20 | ||||
-rw-r--r-- | include/msgdata.h | 44 | ||||
-rw-r--r-- | include/proto.h | 9 | ||||
-rw-r--r-- | include/string16.h | 5 | ||||
-rw-r--r-- | include/string_util.h | 4 | ||||
-rw-r--r-- | include/text.h | 2 | ||||
-rw-r--r-- | include/unk_0201B8B88.h | 9 |
8 files changed, 74 insertions, 28 deletions
diff --git a/include/itemtool.h b/include/itemtool.h index 525e68f9..d8419c2b 100644 --- a/include/itemtool.h +++ b/include/itemtool.h @@ -21,4 +21,13 @@ struct NutData u8 unkB; }; +NARC * OpenNutsDataNarc(u32 heap_id); +struct NutData * ReadNutDataFromNarc(NARC * narc, u32 berry_idx, u32 heap_id); +void CloseNutsDataNarc(NARC * narc); +struct NutData * LoadNutDataSingle(s32 berry_idx, u32 heap_id); +struct NutData * LoadNutDataSingleByItemId(s32 item_id, u32 heap_id); +u32 GetNutAttr(struct NutData * nut, u32 attr); +struct String * GetNutName(u32 berry_idx, u32 heap_id); +struct String * GetNutDesc(u32 berry_idx, u32 heap_id); + #endif //POKEDIAMOND_ITEMTOOL_H diff --git a/include/msg_data.h b/include/msg_data.h deleted file mode 100644 index debacc79..00000000 --- a/include/msg_data.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef POKEDIAMOND_MSG_DATA_H -#define POKEDIAMOND_MSG_DATA_H - -struct MsgData -{ - u16 unk0; - u16 unk2; - u16 unk4; - u16 unk6; - union { - u16 * raw; - NARC * narc; - } data; -}; - -struct MsgData * NewMsgDataFromNarc(u32 type, u32 narcId, u32 msgId, u32 heapno); -u16 * FUN_0200A914(struct MsgData *, u32); -void DestroyMsgData(struct MsgData *); - -#endif //POKEDIAMOND_MSG_DATA_H diff --git a/include/msgdata.h b/include/msgdata.h new file mode 100644 index 00000000..fae8ca78 --- /dev/null +++ b/include/msgdata.h @@ -0,0 +1,44 @@ +#ifndef POKEDIAMOND_MSG_DATA_H +#define POKEDIAMOND_MSG_DATA_H + +#include "string16.h" + +struct MsgDataAlloc +{ + u32 offset; + u32 length; +}; + +struct MsgDataTable +{ + u16 count; + u16 key; + struct MsgDataAlloc alloc[1]; +}; + +struct MsgData +{ + u16 type; + u16 heap_id; + u16 narc_id; + u16 file_id; + union { + struct MsgDataTable * raw; + NARC * narc; + } data; +}; + +void ReadMsgData_NewNarc_ExistingString(NarcId narc_id, u32 group, u32 num, u32 heap_id, struct String * dest); +struct MsgData * NewMsgDataFromNarc(u32 type, NarcId narcId, s32 msgId, u32 heapno); +void DestroyMsgData(struct MsgData *); +struct String * ReadMsgData_NewNarc_NewString(NarcId narc_id, u32 group, u32 num, u32 heap_id); +void ReadMsgDataIntoString(struct MsgData * msgData, u32 msg_no, struct String * dest); +struct String * NewString_ReadMsgData(struct MsgData *, u32); +u16 MsgDataGetCount(struct MsgData * msgData); +void ReadMsgDataIntoU16Array(struct MsgData * msgData, u32 msg_no, u16 * dest); +void GetSpeciesNameIntoArray(u16 species, u32 heap_id, u16 * dest); +struct String * ReadMsgData_ExpandPlaceholders(u32 * a0, struct MsgData * msgData, u32 msgno, u32 heap_id); +struct String * GetMoveName(u32 move, u32 heapno); +struct String * GetSpeciesName(u16 species, u32 heap_id); + +#endif //POKEDIAMOND_MSG_DATA_H diff --git a/include/proto.h b/include/proto.h index 2e7d19b3..4a0012d3 100644 --- a/include/proto.h +++ b/include/proto.h @@ -4,12 +4,12 @@ // For homeless function declarations #include "pokemon.h" // for struct definitions +#include "string16.h" // for struct definitions -u16 * FUN_0200AA50(u16 species, u32 heap_id); -void FUN_02021A74(u16 * dest, u16 * src); -void FUN_02021A20(void * ptr); +void StringCopy(u16 * dest, struct String * src); +void String_dtor(void * ptr); void FUN_02021E28(u16 * dest, u16 * src); -void FUN_02021EF0(const u16 * src, u16 * dest, u32 count); +void FUN_02021EF0(const struct String * src, u16 * dest, u32 count); u32 FUN_0206E7B8(u16 item, u32 a1, u32 a2); int FUN_02014C3C(u8); void FUN_02014C54(int, int, struct UnkStruct_02069038 *, u8); @@ -20,5 +20,6 @@ void FUN_02005E90(int, int, int, int); void FUN_020056AC(int, int, int, int, int); void FUN_020808AC(struct BoxPokemon *, int, int, int, int); void * FUN_02022610(void *, int); +void StringExpandPlaceholders(u32 *, struct String *, struct String *); #endif //POKEDIAMOND_PROTO_H diff --git a/include/string16.h b/include/string16.h index 7092c641..91888a7b 100644 --- a/include/string16.h +++ b/include/string16.h @@ -10,8 +10,11 @@ struct String u16 data[1]; }; -struct String * FUN_020219F4(u32 count, u32 heap_id); +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 +void StringSetEmpty(struct String *); // set empty +struct String * StringDup(struct String *, u32 heap_id); #endif //POKEDIAMOND_STRING16_H diff --git a/include/string_util.h b/include/string_util.h index e9079229..52168ace 100644 --- a/include/string_util.h +++ b/include/string_util.h @@ -16,8 +16,8 @@ enum PrintingMode { PAD_ZEROES }; -void StringCopy(u16 *dest, const u16 *src); -u16 *StringCopyN(u16 *dest, const u16 *src, u32 num); +void CopyU16StringArray(u16 *dest, const u16 *src); +u16 *CopyU16StringArrayN(u16 *dest, const u16 *src, u32 num); u32 StringLength(const u16 *s); BOOL StringNotEqual(const u16 *s1, const u16 *s2); BOOL StringNotEqualN(const u16 *s1, const u16 *s2, u32 num); diff --git a/include/text.h b/include/text.h index cec36a30..8b7fe896 100644 --- a/include/text.h +++ b/include/text.h @@ -1,6 +1,6 @@ #ifndef POKEDIAMOND_TEXT_H #define POKEDIAMOND_TEXT_H -void GetSpeciesName(u16 species, u32 heap_id, u16 * dest); +void GetSpeciesNameIntoArray(u16 species, u32 heap_id, u16 * dest); #endif //POKEDIAMOND_TEXT_H diff --git a/include/unk_0201B8B88.h b/include/unk_0201B8B88.h new file mode 100644 index 00000000..95eab968 --- /dev/null +++ b/include/unk_0201B8B88.h @@ -0,0 +1,9 @@ +#ifndef POKEDIAMOND_UNK_0201B8B88_H +#define POKEDIAMOND_UNK_0201B8B88_H + +const u16 * FUN_0201B8B8(const u16 * r4); +u16 FUN_0201B8E0(const u16 * r4); +BOOL FUN_0201B8F8(const u16 * r4); +u16 FUN_0201B914(const u16 * r5, u32 r4); + +#endif //POKEDIAMOND_UNK_0201B8B88_H |