diff options
author | Revo <projectrevotpp@hotmail.com> | 2020-06-20 12:13:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-20 12:13:15 -0400 |
commit | 16b091058e6135f9b7875fcf074d812d610df380 (patch) | |
tree | 3e766233037a6058d704f695204ff3e23e7edac8 /arm9/src/nutdata.c | |
parent | 01c4d4b1858149c2da1ce76368ac861f16fd066d (diff) | |
parent | ae9380cad03effaef52810db07105ca3f2c1a3f8 (diff) |
Merge pull request #179 from PikalaxALT/pikalax_work
msgdata
Diffstat (limited to 'arm9/src/nutdata.c')
-rw-r--r-- | arm9/src/nutdata.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arm9/src/nutdata.c b/arm9/src/nutdata.c index 09542052..a8f916e2 100644 --- a/arm9/src/nutdata.c +++ b/arm9/src/nutdata.c @@ -1,7 +1,7 @@ #include "global.h" #include "filesystem.h" #include "itemtool.h" -#include "msg_data.h" +#include "msgdata.h" #pragma thumb on @@ -20,12 +20,12 @@ void CloseNutsDataNarc(NARC * narc) NARC_dtor(narc); } -struct NutData * LoadNutDataSingle(u32 berry_idx, u32 heap_id) +struct NutData * LoadNutDataSingle(s32 berry_idx, u32 heap_id) { return AllocAndReadWholeNarcMemberByIdPair(NARC_ITEMTOOL_ITEMDATA_NUTS_DATA, berry_idx, heap_id); } -struct NutData * LoadNutDataSingleByItemId(u32 item_id, u32 heap_id) +struct NutData * LoadNutDataSingleByItemId(s32 item_id, u32 heap_id) { return LoadNutDataSingle(item_id - FIRST_BERRY_IDX, heap_id); } @@ -61,18 +61,18 @@ u32 GetNutAttr(struct NutData * nut, u32 attr) } } -u16 * GetNutName(u32 berry_idx, u32 heap_id) +struct String * GetNutName(u32 berry_idx, u32 heap_id) { struct MsgData * msgData = NewMsgDataFromNarc(1, NARC_MSGDATA_MSG, 373, heap_id); - u16 * ret = FUN_0200A914(msgData, berry_idx); + struct String * ret = NewString_ReadMsgData(msgData, berry_idx); DestroyMsgData(msgData); return ret; } -u16 * GetNutDesc(u32 berry_idx, u32 heap_id) +struct String * GetNutDesc(u32 berry_idx, u32 heap_id) { struct MsgData * msgData = NewMsgDataFromNarc(1, NARC_MSGDATA_MSG, 372, heap_id); - u16 * ret = FUN_0200A914(msgData, berry_idx); + struct String * ret = NewString_ReadMsgData(msgData, berry_idx); DestroyMsgData(msgData); return ret; } |