From 24074d678d5d87a987bbda221f7da1a0dd02ea35 Mon Sep 17 00:00:00 2001 From: Prakxo <87568477+Prakxo@users.noreply.github.com> Date: Wed, 31 Jan 2024 19:39:03 +0100 Subject: m_private OK (#139) * update m2ctx * size fixes? * size fix * work * more work * m_private OK * fix style * format * fix warnings * format.. --- include/69CB30.h | 9 +- include/6E2300.h | 2 +- include/6EDD10.h | 5 +- include/m_common_data.h | 7 +- include/m_field_info.h | 2 +- include/m_land.h | 8 +- include/m_mail.h | 2 +- include/m_msg_main.h | 21 ----- include/m_museum.h | 35 +++++++ include/m_name_table.h | 2 + include/m_player_lib.h | 4 +- include/m_private.h | 206 +++++++++++++++++++++++------------------- include/m_private_internals.h | 46 ++++++---- 13 files changed, 203 insertions(+), 146 deletions(-) create mode 100644 include/m_museum.h (limited to 'include') diff --git a/include/69CB30.h b/include/69CB30.h index 60fe607..74d3b3e 100644 --- a/include/69CB30.h +++ b/include/69CB30.h @@ -3,7 +3,10 @@ #include "ultra64.h" -s32 func_80078E90_jp(s32 arg0, s32 arg1); +struct Animal_c; +struct PrivateInfo; + +s32 func_80078E90_jp(void* arg0, s32 arg1); // void func_80078EB4_jp(); // void func_80078EE0_jp(); // void func_80078F08_jp(); @@ -18,7 +21,7 @@ s32 func_80078E90_jp(s32 arg0, s32 arg1); // void func_80079378_jp(); // void func_800793A8_jp(); // void mCPk_SavePak(); -// void func_8007942C_jp(); +s32 func_8007942C_jp(struct PrivateInfo*, struct Animal_c*, void*); // void func_800794E4_jp(); // void func_8007967C_jp(); // void func_80079708_jp(); @@ -37,7 +40,7 @@ s32 func_80078E90_jp(s32 arg0, s32 arg1); // void func_80079EDC_jp(); // void func_80079F44_jp(); // void func_8007A008_jp(); -s32 mCPk_get_pkinfo(void); +void* mCPk_get_pkinfo(void); // void func_8007A080_jp(); #endif diff --git a/include/6E2300.h b/include/6E2300.h index 9cf664e..bd5902d 100644 --- a/include/6E2300.h +++ b/include/6E2300.h @@ -16,7 +16,7 @@ // void func_800BEE50_jp(); // void func_800BEEB4_jp(); // void func_800BEEC4_jp(); -// void func_800BEFCC_jp(); +u16 mRmTp_Item1ItemNo2FtrItemNo_AtPlayerRoom(u16 item); // void func_800BF10C_jp(); // void func_800BF230_jp(); // void func_800BF26C_jp(); diff --git a/include/6EDD10.h b/include/6EDD10.h index de4a3d9..905fd1e 100644 --- a/include/6EDD10.h +++ b/include/6EDD10.h @@ -3,13 +3,16 @@ #include "ultra64.h" +struct lbRTC_ymd_t; +struct lbRTC_time_c; + // void func_800CA070_jp(); void mTM_set_season(void); // void func_800CA230_jp(); // void func_800CA240_jp(); // void func_800CA278_jp(); // void func_800CA2A8_jp(); -// void func_800CA2BC_jp(); +void mTM_set_renew_time(struct lbRTC_ymd_t*, struct lbRTC_time_c*); void mTM_renewal_renew_time(void); // void func_800CA350_jp(); // void func_800CA570_jp(); diff --git a/include/m_common_data.h b/include/m_common_data.h index c98be21..78e2240 100644 --- a/include/m_common_data.h +++ b/include/m_common_data.h @@ -244,9 +244,10 @@ typedef struct CommonData { /* 0x105A4 */ NpsSchedule npcSchedule[ANIMAL_NUM_MAX]; /* 0x10694 */ NpcWalking npcWalk; /* 0x10710 */ NpcEvent npcEvent[5]; - /* 0x1074C */ UNK_TYPE unk_1074C; - /* 0x10750 */ UNK_TYPE1 unk_10750[0x4]; - /* 0x10754 */ UNK_TYPE unk_10754; + /* 0x1074C */ s32 unk_1074C; + /* 0x10750 */ s16 moneyPower; + /* 0x10752 */ s16 goodsPower; + /* 0x10754 */ s32 unk_10754; /* 0x10758 */ UNK_TYPE1 unk_10758[0x48]; /* 0x107A0 */ UNK_TYPE unk_107A0; /* 0x107A4 */ UNK_TYPE1 unk_107A4[0x12]; diff --git a/include/m_field_info.h b/include/m_field_info.h index da6a455..b9a6f13 100644 --- a/include/m_field_info.h +++ b/include/m_field_info.h @@ -207,7 +207,7 @@ void mFI_Wpos2DepositOFF(xyz_t); // void func_8008D268_jp(); // void func_8008D3A4_jp(); // void func_8008D574_jp(); -// void func_8008D6E0_jp(); +u16 mFI_GetOtherFruit(void); s32 func_8008D7B0_jp(u16); // void func_8008D884_jp(); s32 mFI_GetWaveUtinBlock(s32* arg0, s32* arg1, s32 arg2, s32 arg3); diff --git a/include/m_land.h b/include/m_land.h index 9b2af3a..92c3243 100644 --- a/include/m_land.h +++ b/include/m_land.h @@ -3,6 +3,8 @@ #include "ultra64.h" +#define mLd_CHECK_LAND_ID(id) (((id) & 0xFF00) == 0x3000) + // Town name character count #define LAND_NAME_SIZE 6 #define LAND_NAME_MURA_SIZE (LAND_NAME_SIZE + 2) @@ -13,8 +15,8 @@ typedef struct LandInfo { /* 0x8 */u16 id; } LandInfo; // size = 0xA -// void func_80094DD0_jp(); -// void func_80094E10_jp(); +s32 mLd_NullCheckLandName(char*); +s32 mLd_CheckId(u16); s32 mLd_CheckCmpLandName(char* name1, char* name2); s32 mLd_CheckCmpLand(char* name1, u16 id1, char* name2, u16 id2); void mLd_ClearLandName(char* name); @@ -24,7 +26,7 @@ void mLd_CopyLandName(char* arg0, char* arg1); // void func_8009504C_jp(); char* mLd_GetLandName(void); // void func_800950E8_jp(); -// void func_8009519C_jp(); +s32 mLd_PlayerManKindCheckNo(u8 playerNumber); s32 mLd_PlayerManKindCheck(void); s32 mLd_CheckThisLand(char* arg0, u16 arg1); // void func_80095218_jp(); diff --git a/include/m_mail.h b/include/m_mail.h index 59473f0..b42392a 100644 --- a/include/m_mail.h +++ b/include/m_mail.h @@ -71,7 +71,7 @@ s32 mMl_check_not_used_mail(Mail_c* mail); void mMl_copy_header_name(mMl_unk_00* arg0, mMl_unk_00* arg1); void mMl_set_from_name(Mail_c* arg0, Mail_c* arg1); void mMl_set_to_name(Mail_c* arg0, Mail_c* arg1); -void mMl_set_to_plname(Mail_c* arg0, Mail_c* arg1); +void mMl_set_to_plname(Mail_c* arg0, PersonalID_c* arg1); void mMl_set_playername(Mail_c* mail, PersonalID_c* arg1); void mMl_init_mail(Mail_c* mail, PersonalID_c* arg1); s32 mMl_chk_mail_free_space(Mail_c mail[], s32 arg1); diff --git a/include/m_msg_main.h b/include/m_msg_main.h index c937273..2fbefee 100644 --- a/include/m_msg_main.h +++ b/include/m_msg_main.h @@ -289,27 +289,6 @@ void func_800A3304_jp(struct Game_Play* game_play); // void func_800A332C_jp(); void mMsg_Main(struct Game_Play* game_play); void mMsg_Draw(struct Game_Play* game_play); -// void func_800A3400_jp(); -// void func_800A3420_jp(); -// void func_800A345C_jp(); -// void func_800A34E8_jp(); -// void func_800A35C8_jp(); -// void func_800A3658_jp(); -void mMsm_SendInformationMail(void); -// void func_800A3784_jp(); -// void func_800A37D0_jp(); -// void func_800A3810_jp(); -// void func_800A3A5C_jp(); -// void func_800A3B84_jp(); -// void func_800A3C18_jp(); -// void func_800A3CF0_jp(); -// void func_800A3E34_jp(); -// void func_800A3F70_jp(); -// void func_800A3FB4_jp(); -// void func_800A4184_jp(); -// void func_800A41BC_jp(); -// void func_800A4254_jp(); -// void func_800A43C0_jp(); // void func_800A4448_jp(); // void func_800A44D4_jp(); // void func_800A4508_jp(); diff --git a/include/m_museum.h b/include/m_museum.h new file mode 100644 index 0000000..e6c3751 --- /dev/null +++ b/include/m_museum.h @@ -0,0 +1,35 @@ +#ifndef M_MUSEUM_H +#define M_MUSEUM_H + +#include "ultra64.h" + +typedef struct MuseumRecord { + u8 contacted:1; /* set to TRUE when the museum has contacted the player */ + u8 remailPending:1; /* set to TRUE when the museum has non-fossil letters pending */ + u8 sendInfoMail:1; /* if set to true, museum info mail will be sent */ + u8 storedFossils:5; /* number of stored fossils */ +} MuseumRecord; + +void mMsm_ClearRecord(MuseumRecord*); +// void func_800A3420_jp(); +// void func_800A345C_jp(); +// void func_800A34E8_jp(); +// void func_800A35C8_jp(); +// void func_800A3658_jp(); +void mMsm_SendInformationMail(void); +// void func_800A3784_jp(); +// void func_800A37D0_jp(); +// void func_800A3810_jp(); +// void func_800A3A5C_jp(); +// void func_800A3B84_jp(); +// void func_800A3C18_jp(); +// void func_800A3CF0_jp(); +// void func_800A3E34_jp(); +// void func_800A3F70_jp(); +// void func_800A3FB4_jp(); +// void func_800A4184_jp(); +// void func_800A41BC_jp(); +// void func_800A4254_jp(); +// void func_800A43C0_jp(); + +#endif diff --git a/include/m_name_table.h b/include/m_name_table.h index 4bee1cb..141a16e 100644 --- a/include/m_name_table.h +++ b/include/m_name_table.h @@ -5,6 +5,8 @@ extern u8 npc_looks_table[]; +#define GET_NAME_ITEM_CATEGORY(f) (((f) & 0x0F00) >> 8) + #define EMPTY_NO 0x0000 #define ITM_MONEY_START 0x2100 diff --git a/include/m_player_lib.h b/include/m_player_lib.h index d53f9f7..0cd50ca 100644 --- a/include/m_player_lib.h +++ b/include/m_player_lib.h @@ -5,7 +5,7 @@ struct Player; struct Game_Play; - +struct PrivateInfo; // void func_800B1160_jp(); // void func_800B11B0_jp(); @@ -50,7 +50,7 @@ struct Player* get_player_actor_withoutCheck(struct Game_Play* game_play); UNK_RET func_800B1D94_jp(void* segment, UNK_TYPE arg1); // void func_800B1DE8_jp(); // void func_800B1E94_jp(); -// void func_800B1EB0_jp(); +void mPlib_change_player_cloth_info_lv2(struct PrivateInfo*, u16); // void func_800B1EDC_jp(); // void func_800B1F74_jp(); // void func_800B1F84_jp(); diff --git a/include/m_private.h b/include/m_private.h index e566576..2eecc56 100644 --- a/include/m_private.h +++ b/include/m_private.h @@ -6,10 +6,13 @@ #include "m_quest.h" #include "m_private_internals.h" #include "m_npc.h" +#include "m_museum.h" #include "unk.h" #define mPr_FOREIGN_MAP_COUNT 8 +#define mPr_INVENTORY_MAIL_COUNT 10 #define PLAYER_NUM 4 +#define mPR_FOREIGNER_NUMBER 4 typedef enum mPr_SEX { /* 0 */ mPr_SEX_MALE, @@ -26,6 +29,8 @@ typedef enum mPr_ITEM_COND{ /* 3 */ mPr_ITEM_COND_NUM } mPr_ITEM_COND; +#define mPr_GET_ITEM_COND(allCond, slot) (((allCond) >> (((u32)(slot)) << 1)) & mPr_ITEM_COND_NUM) + typedef enum mPr_FACE_TYPE { /* 0 */ mPr_FACE_TYPE0, /* 1 */ mPr_FACE_TYPE1, @@ -42,112 +47,125 @@ typedef struct PrivateInfo { /* 0x000 */ PersonalID_c playerId; /* 0x010 */ s8 gender; /* 0x011 */ s8 face; - /* 0x012 */ UNK_TYPE1 unk_012[0x2]; + /* 0x012 */ s8 resetCount; + /* 0x013 */ MuseumRecord museumRecord; /* 0x014 */ PrivateInventory inventory; /* 0x040 */ mQst_delivery_c deliveries[mPr_DELIVERY_QUEST_NUM]; /* delivery quests */ /* 0x25C */ QuestErrand errands[mPr_ERRAND_QUEST_NUM]; /* errand quests */ /* 0x3EC */ UNK_TYPE1 unk_3EC[0x2]; - /* 0x3EE */ MailHeaderCommon unk_3EE; - /* 0x40A */ Mail_c unk_40A[10]; - /* 0xA72 */ UNK_TYPE1 unk_A72[0x2]; + /* 0x3EE */ MailHeaderCommon savedMailHeader; + /* 0x40A */ Mail_c mail[mPr_INVENTORY_MAIL_COUNT]; + /* 0xA72 */ s16 backgroundTextureId; /* 0xA74 */ u8 exists; - /* 0xA75 */ UNK_TYPE1 unkA75[1]; + /* 0xA75 */ u8 hintCount; /* 0xA76 */ PrivateCloth cloth; - /* 0xA7A */ UNK_TYPE1 unkA7A[0xC]; - /* 0xA86 */ Private_Sub_A86 unk_A86; - /* 0xA90 */ UNK_TYPE1 unk_A90[0x3C]; - /* 0xACC */ Anmremail remail; + /* 0xA7A */ AnmPersonalID_c storedAnmId; + /* 0xA86 */ PrivateDestiny destiny; + /* 0xA90 */ PrivateBirthday birthday; + /* 0xA94 */ UNK_TYPE1 unk_A94[0x28]; + /* 0xABC */ s32 completedFish; + /* 0xAC0 */ s32 completedInsect; + /* 0xAC4 */ UNK_TYPE1 unk_AC4[0x8]; + /* 0xACC */ Anmremail remail; /* 0xADE */ UNK_TYPE1 unk_ADE[0x6]; /* 0xAE4 */ PrivateAnimalMemory animalMemory; - /* 0xAEC */ UNK_TYPE1 unk_AEC[0x9C]; - /* 0xB88 */ mPr_map_info_c maps[mPr_FOREIGN_MAP_COUNT]; /* maps 'collected' for foreign towns */ + /* 0xAEC */ u8 completeFishInsectFlags; + /* 0xAEF */ UNK_TYPE1 unk_AEF[0x2]; + /* 0x108 */ u32 catalogFurniture[30]; + /* 0x1B4 */ u32 catalogWallpaper[2]; + /* 0x1C0 */ u32 catalogCarpet[2]; + /* 0x1CC */ u32 catalogPaper[2]; + /* 0x1D4 */ u32 catalogMusic[2]; + /* 0xB88 */ mPr_map_info_c maps[mPr_FOREIGN_MAP_COUNT]; /* 0xBC8 */ UNK_TYPE1 unk_BC8[0x8]; } PrivateInfo; // size = 0xBD0 -void mPr_ClearPlayerName(char* arg0); +void mPr_ClearPlayerName(char* buf); void mPr_CopyPlayerName(char* dst, char* src); -s32 mPr_NullCheckPlayerName(char* arg0); -// void func_800B7804_jp(); -// void func_800B785C_jp(); -s32 mPr_NullCheckPersonalID(PersonalID_c* arg0); -void mPr_ClearPersonalID(PersonalID_c* arg0); -// void func_800B7998_jp(); -void mPr_CopyPersonalID(PersonalID_c* arg0, PersonalID_c* arg1); -s32 mPr_CheckCmpPersonalID(PersonalID_c* arg0, PersonalID_c* arg1); -// void func_800B7A94_jp(); -// void func_800B7AB0_jp(); -void mPr_ClearPrivateInfo(PrivateInfo* private); -// void func_800B7B8C_jp(); -// void func_800B7BC0_jp(); -// void func_800B7CD0_jp(); -// void func_800B7D50_jp(); -void mPr_InitPrivateInfo(PrivateInfo* private); -// void func_800B7F00_jp(); -// void func_800B7F48_jp(); -s32 mPr_CheckPrivate(PrivateInfo* private); -// void func_800B7FA0_jp(); -s32 mPr_GetPrivateIdx(PersonalID_c* arg0); -// void func_800B8068_jp(); -// void func_800B80B4_jp(); -// void func_800B8128_jp(); -// void func_800B81A4_jp(); -// void func_800B8204_jp(); -// void func_800B828C_jp(); -// void func_800B8318_jp(); -// void func_800B83D4_jp(); -// void func_800B8544_jp(); -// void func_800B86EC_jp(); -// void func_800B88EC_jp(); -// void func_800B8A88_jp(); -void mPr_SetPossessionItem(PrivateInfo* priv, int idx, u16 item, u32 cond); -// void func_800B8B8C_jp(); -// void func_800B8BE4_jp(); -// void func_800B8C10_jp(); -// void func_800B8C20_jp(); -// void func_800B8C34_jp(); -// void func_800B8C9C_jp(); -// void func_800B8D18_jp(); -// void func_800B8D3C_jp(); -s32 func_800B8D64_jp(u8 player_no, s32 arg1); -void mPr_ClearMotherMailInfo(PrivateMotherMail* arg0); -// void func_800B8F20_jp(); -// void func_800B8FB8_jp(); -// void func_800B9038_jp(); -// void func_800B9170_jp(); -// void func_800B9350_jp(); -// void func_800B93AC_jp(); -// void func_800B947C_jp(); -// void func_800B94E0_jp(); -// void func_800B9704_jp(); -// void func_800B9790_jp(); -// void func_800B97C8_jp(); -// void func_800B97F8_jp(); -// void func_800B996C_jp(); -// void func_800B9AF0_jp(); -void func_800B9B2C_jp(void); -// void func_800B9C34_jp(); -void mPr_SendForeingerAnimalMail(PrivateInfo* privateInfo); +s32 mPr_NullCheckPlayerName(char* name); +s32 mPr_CheckCmpPlayerName(char* name0, char* name1); +s32 mPr_GetPlayerName(char* buf, s32 playerNumber); +s32 mPr_NullCheckPersonalID(PersonalID_c* pid); +void mPr_ClearPersonalID(PersonalID_c* pid); +void mPr_ClearAnyPersonalID(PersonalID_c* pid, s32 count); +void mPr_CopyPersonalID(PersonalID_c* dst, PersonalID_c* src); +s32 mPr_CheckCmpPersonalID(PersonalID_c* pid0, PersonalID_c* pid1); +void mPr_ClearPrivateBirthday(PrivateBirthday* birthday); +void mPr_ClearAnimalMemory(PrivateAnimalMemory* memory); +void mPr_ClearPrivateInfo(PrivateInfo* info); +s32 mPr_GetRandomFace(void); +s32 mPr_GetRandomOriginalFace(void); +u16 mPr_GetRandomCloth(u8 sex); +void mPr_SetNowPrivateCloth(void); +void mPr_InitPrivateInfo(PrivateInfo* priv); +void mPr_InitAnyPrivates(PrivateInfo* info, s32 amount); +void mPr_CopyPrivateInfo(PrivateInfo* dst, PrivateInfo* src); +s32 mPr_CheckPrivate(PrivateInfo* priv); +s32 mPr_CheckCmpPrivate(PrivateInfo* priv0, PrivateInfo* priv1); +s32 mPr_GetPrivateIdx(PersonalID_c* pid); +s32 mPr_GetPossessionItemIdx(PrivateInfo* priv, u16 item); +s32 mPr_GetPossessionItemIdxWithCond(PrivateInfo* priv, u16 item, u32 cond); +s32 mPr_GetPossessionItemIdxFGTypeWithCond_cancel(PrivateInfo* priv, u16 fg_type, u32 cond); +s32 mPr_GetPossessionItemIdxItem1Category(PrivateInfo* priv, u8 type); +s32 mPr_GetPossessionItemIdxItem1CategoryWithCond_cancel(PrivateInfo* priv, u8 itemType, u32 cond); +s32 mPr_GetPossessionItemIdxKindWithCond(PrivateInfo* priv, u16 kind_start, u16 kind_end, u32 cond); +s32 mPr_GetPossessionItemSum(PrivateInfo* priv, u16 item); +s32 mPr_GetPossessionItemSumWithCond(PrivateInfo* priv, u16 item, u32 cond); +s32 mPr_GetPossessionItemSumFGTypeWithCond_cancel(PrivateInfo* priv, u16 fg_type, u32 cond); +s32 mPr_GetPossessionItemSumItemCategoryWithCond_cancel(PrivateInfo* priv, u8 itemType, u32 cond); +void mPr_SetItemCollectBit(u16 item); +u16 mPr_DummyPresentToTruePresent(void); +void mPr_SetPossessionItem(PrivateInfo* priv, s32 idx, u16 item, u32 cond); +s32 mPr_SetFreePossessionItem(PrivateInfo* priv, u16 item, u32 cond); +void mPr_AddFirstJobHint(PrivateInfo* priv); +s32 mPr_GetFirstJobHintTime(PrivateInfo* priv); +s32 mPr_CheckFirstJobHint(PrivateInfo* priv); +s16 mPr_GetMoneyPower(void); +s16 mPr_GetGoodsPower(void); +s32 mPr_CheckMuseumAddress(PrivateInfo* priv); +s32 mPr_CheckMuseumInfoMail(PrivateInfo* priv); +s32 mPr_LoadPak_and_SetPrivateInfo2(u8 player, void* pak); +void mPr_ClearMotherMailInfo(PrivateMotherMail* motherMail); +s32 mPr_GetMotherMailPaperType(s32 month, s32 day); +void mPr_GetMotherMail(Mail_c* mail, PersonalID_c* pid, u16 present, s32 stationery, s32 mailNumber); +s32 mPr_SendMotherMailPost(PersonalID_c* pid, s32 playerNumber, u16 present, s32 stationery, s32 mailNumber); +s32 mPr_SendMotherMailDate(PrivateMotherMail* motherMail, lbRTC_time_c* sendTime); +s32 mPr_CheckMotherMailMonthly(PrivateMotherMailData* sendData, s32 month, s32 idx); +s32 mPr_GetMotherMailMonthlyNotSendNum(PrivateMotherMailData* sendData, s32 month); +void mPr_SetMotherMailMonthly(PrivateMotherMailData* sendData, s32 month, s32 idx); +void mPr_GetMotherMailMonthlyData(PrivateMotherMailData* sendData, s32* mailNumber, u16* present, + s32* eventNumber, s32 month, s32 notSendNum); +s32 mPr_GetMotherMailNormalNotSendNum(PrivateMotherMailData* sendData); +void mPr_SetMotherMailNormal(PrivateMotherMailData* sendData, s32 idx); +s32 mPr_CheckMotherMailNormal(PrivateMotherMailData* sendData, s32 idx); +void mPr_GetMotherMailNormalData(PrivateMotherMailData* sendData, s32* mailNumber, u16* present, s32* eventNumber, + s32 noSendNum); +void mPr_SendMotherMailNormal(PrivateMotherMail* motherMail, lbRTC_time_c* sendTime); +void mPr_SendMotherMail(PrivateMotherMail* motherMail, lbRTC_time_c* sendTime); +void mPr_SendMailFromMother(void); +void mPr_GetForeingerAnimalMail(Mail_c* mail, PrivateInfo* priv, PrivateAnimalMemory* animalMemory); +void mPr_SendForeingerAnimalMail(PrivateInfo* priv); void mPr_StartSetCompleteTalkInfo(void); -// void func_800B9E90_jp(); -// void func_800B9EB4_jp(); -// void func_800B9ED4_jp(); -// void func_800B9F00_jp(); -// void func_800B9F74_jp(); -// void func_800B9FA0_jp(); -// void func_800BA014_jp(); -// void func_800BA054_jp(); -// void func_800BA09C_jp(); -// void func_800BA0E4_jp(); -// void func_800BA130_jp(); -// void func_800BA150_jp(); -// void func_800BA18C_jp(); -// void func_800BA214_jp(); -// void func_800BA2B0_jp(); -// void func_800BA2D4_jp(); -// void func_800BA344_jp(); -// void func_800BA3D0_jp(); -void mPr_RenewalMapInfo(mPr_map_info_c* maps, s32 count, struct LandInfo* landInfo); -// void mPr_RandomSetPlayerData_title_demo(); -// void mPr_PrintMapInfo_debug(); +void mPr_SetCompleteTalk(u8* flags, s32 type); +s32 mPr_GetCompleteTalk(u8 flags, s32 type); +void mPr_SetFishCompleteTalk(void); +s32 mPr_CheckFishCompleteTalk(u8 playerNumber); +void mPr_SetInsectCompleteTalk(void); +s32 mPr_CheckInsectCompleteTalk(u8 playerNumber); +s32 mPr_GetTalkPermission(u8 flags, s32 type); +s32 mPr_GetFishCompTalkPermission(void); +s32 mPr_GetInsectCompTalkPermission(void); +void mPr_ClearMapInfo(mPr_map_info_c* mapInfo, s32 max); +void mPr_CopyMapInfo(mPr_map_info_c* dst, mPr_map_info_c* src); +void mPr_SetMapThisLand(mPr_map_info_c* mapInfo); +s32 mPr_GetMapFreeIdx(mPr_map_info_c* mapInfo, s32 max); +s32 mPr_GetLandMapIdx(mPr_map_info_c* mapInfo, s32 max, LandInfo* landInfo); +s32 mPr_GetThisLandMapIdx(mPr_map_info_c* map_info, s32 max); +void mPr_PushMapInfo(mPr_map_info_c* map_info, s32 max); +void mPr_SetNewMap(mPr_map_info_c* map_info, s32 max); +void mPr_SetUseMap(mPr_map_info_c* map_info, s32 max); +void mPr_RenewalMapInfo(mPr_map_info_c* mapInfo, s32 max, LandInfo* landInfo); +void mPr_RandomSetPlayerData_title_demo(void); +void mPr_PrintMapInfo_debug(gfxprint* gfxprint); #endif diff --git a/include/m_private_internals.h b/include/m_private_internals.h index 2bdd1f2..a88c70d 100644 --- a/include/m_private_internals.h +++ b/include/m_private_internals.h @@ -3,11 +3,15 @@ #include "ultra64.h" #include "m_land.h" +#include "lb_rtc.h" #define mPr_POCKETS_SLOT_COUNT 15 #define mPr_DELIVERY_QUEST_NUM mPr_POCKETS_SLOT_COUNT #define mPr_ERRAND_QUEST_NUM 5 +#define mPr_MOTHER_MAIL_NORMAL_NUM 7 +#define mPr_MOTHER_MAIL_MONTHLY_NUM 2 + #define PLAYER_NAME_LEN 6 typedef struct PersonalID_c { @@ -17,27 +21,15 @@ typedef struct PersonalID_c { /* 0x0E */ u16 landId; } PersonalID_c; // size = 0x10 -typedef struct Private_Sub_A86 { - /* 0x00 */ char unk00[0x3]; - /* 0x03 */ u8 unk_03; - /* 0x04 */ char unk04[0x1]; - /* 0x05 */ u8 unk_05; - /* 0x06 */ u16 unk_06; - /* 0x08 */ u8 unk_08; -} Private_Sub_A86; // size >= 0xA - typedef struct mPr_map_info_c { - /* 0x00 */ char unk00[0x8]; + /* 0x00 */ char landName[LAND_NAME_SIZE]; + /* 0x06 */ u16 landId; } mPr_map_info_c; // size = 0x8 -typedef struct PrivateMotherMail { - /* 0x00 */ UNK_TYPE1 unk_00[0xE]; -} PrivateMotherMail; // size = 0xE - -typedef struct PrivateAnimalMemory{ +typedef struct PrivateAnimalMemory { /* 0x00 */ u16 npcId; /* 0x02 */ char landName[LAND_NAME_SIZE]; -}PrivateAnimalMemory; // size 0x8 +} PrivateAnimalMemory; // size 0x8 typedef struct PrivateInventory { /* 0x00 */ u16 pockets[mPr_POCKETS_SLOT_COUNT]; /* items in inventory */ @@ -53,5 +45,27 @@ typedef struct PrivateCloth { /* 0x02 */ u16 item; } PrivateCloth; // size = 0x4 +typedef struct PrivateDestiny { + /* 0x00 */ lbRTC_time_c receivedTime; /* time fortune was received */ + /* 0x08 */ u8 type; /* fortune type */ +} PrivateDestiny; // size = 0xA + +typedef struct PrivateMotherMailData { + /* 0x0 */ u8 normal[mPr_MOTHER_MAIL_NORMAL_NUM]; + /* 0x7 */ u8 monthly[mPr_MOTHER_MAIL_MONTHLY_NUM]; + /* 0x9 */ u8 august; // unique byte for month of august +} PrivateMotherMailData; // size = 0xA + +typedef struct PrivateMotherMail { + /* 0x0 */ lbRTC_ymd_t date; + /* 0x8 */ PrivateMotherMailData data; +} PrivateMotherMail; // size = 0xE + +typedef struct PrivateBirthday { + /* 0x0 */ u16 year; + /* 0x2 */ u8 month; + /* 0x3 */ u8 day; +} PrivateBirthday; // size = 0x4 + #endif -- cgit v1.2.3