diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2020-02-04 14:16:45 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2020-02-04 14:16:45 -0500 |
commit | 4770fac9eb9696236fa998554a353f1f140a1ed4 (patch) | |
tree | c20f55d951f658360bac52d14f78427fc7e68d37 /include | |
parent | d991f1b2c99d176dc411223c46ca621ca6b28ea2 (diff) |
More mevent documentation
Diffstat (limited to 'include')
-rw-r--r-- | include/berry_crush.h | 2 | ||||
-rw-r--r-- | include/dodrio_berry_picking.h | 2 | ||||
-rw-r--r-- | include/event_data.h | 4 | ||||
-rw-r--r-- | include/global.h | 19 | ||||
-rw-r--r-- | include/link.h | 4 | ||||
-rw-r--r-- | include/link_rfu.h | 6 | ||||
-rw-r--r-- | include/mevent.h | 35 | ||||
-rw-r--r-- | include/mevent_server.h | 1 | ||||
-rw-r--r-- | include/pokemon_jump.h | 2 | ||||
-rw-r--r-- | include/script.h | 2 | ||||
-rw-r--r-- | include/strings.h | 15 |
11 files changed, 63 insertions, 29 deletions
diff --git a/include/berry_crush.h b/include/berry_crush.h index 2583aba61..e8e9c216f 100644 --- a/include/berry_crush.h +++ b/include/berry_crush.h @@ -1,6 +1,6 @@ #ifndef GUARD_BERRY_CRUSH_H #define GUARD_BERRY_CRUSH_H -void sub_814B754(MainCallback callback); +void StartBerryCrush(MainCallback callback); #endif //GUARD_BERRY_CRUSH_H diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index 59736ba7a..47cece996 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -1,6 +1,6 @@ #ifndef GUARD_DODRIO_BERRY_PICKING_H #define GUARD_DODRIO_BERRY_PICKING_H -void sub_81507FC(u16 species, MainCallback callback); +void StartDodrioBerryPicking(u16 species, MainCallback callback); #endif //GUARD_DODRIO_BERRY_PICKING_H diff --git a/include/event_data.h b/include/event_data.h index 7987720f1..e635cbc6d 100644 --- a/include/event_data.h +++ b/include/event_data.h @@ -54,8 +54,8 @@ bool8 FlagGet(u16 id); u16 * GetVarPointer(u16 id); bool32 IsMysteryGiftEnabled(void); void ResetSpecialVars(void); -void sub_806E2D0(void); -void sub_806E370(void); +void ResetMysteryEventFlags(void); +void ResetMysteryEventVars(void); bool32 IsNationalPokedexEnabled(void); void sub_806E190(void); diff --git a/include/global.h b/include/global.h index b12508ae5..8644fe364 100644 --- a/include/global.h +++ b/include/global.h @@ -658,8 +658,8 @@ struct FameCheckerSaveData struct MEWonderNewsData { - u16 unk_00; - u8 unk_02; + u16 newsId; + u8 shareState; u8 unk_03; u8 unk_04[40]; u8 unk_2C[10][40]; @@ -673,13 +673,13 @@ struct MEWonderNewsStruct struct MEWonderCardData { - u16 unk_00; + u16 cardId; u16 unk_02; u32 unk_04; u8 unk_08_0:2; u8 unk_08_2:4; - u8 unk_08_6:2; - u8 unk_09; + u8 shareState:2; + u8 recvMonCapacity; u8 unk_0A[40]; u8 unk_32[40]; u8 unk_5A[4][40]; @@ -695,11 +695,12 @@ struct MEWonderCardStruct struct MEventBuffer_3430_Sub { - u16 unk_00; - u16 unk_02; - u16 unk_04; + u16 linkWins; + u16 linkLosses; + u16 linkTrades; u16 unk_06; - u16 unk_08[2][7]; + u16 distributedMons[2][7]; // [0][x] = species + // [1][x] = ??? }; struct MEventBuffer_3430 diff --git a/include/link.h b/include/link.h index e41b89634..7b20c71b4 100644 --- a/include/link.h +++ b/include/link.h @@ -253,11 +253,11 @@ void sub_800A620(void); void sub_80FBB4C(void); u8 sub_800ABAC(void); u8 sub_800ABBC(void); -void sub_800AAC0(void); +void Link_TryStartSend5FFF(void); void OpenLink(void); bool8 IsLinkMaster(void); void CheckShouldAdvanceLinkState(void); -void sub_800AA80(u16 a0); +void Link_StartSend5FFFwithParam(u16 a0); void sub_80098D8(void); void CloseLink(void); bool8 IsLinkTaskFinished(void); diff --git a/include/link_rfu.h b/include/link_rfu.h index 40d69201e..92aceec59 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -295,7 +295,7 @@ typedef struct UnkRfuStruct_2 /* 0x068 */ u8 filler_68[4]; /* 0x06c */ struct RfuBlockSend cmd_8800_sendbuf; /* 0x080 */ struct RfuBlockSend cmd_8800_recvbuf[5]; - /* 0x0e4 */ u8 unk_e4[5]; + /* 0x0e4 */ u8 cmd5f00Ack[5]; /* 0x0e9 */ u8 unk_e9[5]; /* 0x0ee */ vu8 errorState; /* 0x0ef */ u8 unk_ef; @@ -365,7 +365,7 @@ void AddTextPrinterToWindow1(const u8 *str); bool32 MG_PrintTextOnWindow1AndWaitButton(u8 * cmdPtr, const u8 * src); void LinkRfu_FatalError(void); void MG_DrawCheckerboardPattern(void); -void task_add_05_task_del_08FA224_when_no_RfuFunc(void); +void Rfu_BeginBuildAndSendCommand5F(void); bool8 IsLinkRfuTaskFinished(void); void DestroyWirelessStatusIndicatorSprite(void); void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0); @@ -413,7 +413,7 @@ void RFU_queue_2_14_recv(struct UnkRfuStruct_2_Sub_c1c *q1, const u8 *q2); bool8 RFU_queue_20_70_send(struct UnkRfuStruct_2_Sub_124 * a0, u8 *a1); void RFU_queue_40_14_recv(struct UnkRfuStruct_2_Sub_9e8 * a0, u8 *a1); void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 r2, s32 r3); -void sub_80FAFE0(u8 a0); +void sub_80FAFE0(bool8 unk_0a_7); bool32 RfuSerialNumberIsValid(u32 a0); bool8 sub_80FC1B0(void); bool8 sub_80F8F40(void); diff --git a/include/mevent.h b/include/mevent.h index 85782f20a..d9da3166d 100644 --- a/include/mevent.h +++ b/include/mevent.h @@ -13,7 +13,7 @@ struct MEventClientHeaderStruct u16 id; u16 unk_16[4]; struct MEventBuffer_3430_Sub unk_20; - u8 unk_44; + u8 maxDistributionMons; u8 playerName[7]; u8 playerTrainerId[4]; u16 easyChatProfile[6]; @@ -33,21 +33,38 @@ struct MEvent_Str_2 u8 fill_00[0x40]; }; +struct UnkStruct_8467FB8 +{ + u8 textPal1:4; + u8 textPal2:4; + u8 textPal3:4; + u8 index:4; + const u8 * tiles; + const u8 * map; + const u16 * pal; +}; + +extern const u16 gCard1Pal[]; +extern const u16 gCard2Pal[]; +extern const u16 gCard3Pal[]; +extern const u16 gCard4Pal[]; +extern const u16 gCard5Pal[]; + struct MEWonderNewsData * GetSavedWonderNews(void); struct MEWonderCardData * GetSavedWonderCard(void); struct MEventBuffer_3430_Sub * sav1_get_mevent_buffer_2(void); struct MENewsJisanStruct * GetMENewsJisanStructPtr(void); -bool32 sub_8143DC8(const struct MEWonderNewsData * src); +bool32 OverwriteSavedWonderNewsWithReceivedNews(const struct MEWonderNewsData * src); bool32 ValidateReceivedWonderNews(void); bool32 ValidateReceivedWonderCard(void); -bool32 sub_8143EF4(const u8 * src); -bool32 sub_8143F68(const struct MEWonderCardData * data); -void sub_814410C(struct MEWonderCardData * buffer); -bool32 sub_8144254(const u16 * data); +bool32 MEvent_HaveAlreadyReceivedWonderNews(const u8 * src); +bool32 OverwriteSavedWonderCardWithReceivedCard(const struct MEWonderCardData * data); +void MEvent_WonderCardResetUnk08_6(struct MEWonderCardData * buffer); +bool32 MEvent_ReceiveDistributionMon(const u16 * data); void BuildMEventClientHeader(struct MEventClientHeaderStruct * data); bool32 ValidateMEventClientHeader(const struct MEventClientHeaderStruct * data); u32 sub_8144418(const u16 * a0, const struct MEventClientHeaderStruct * a1, void * unused); -u32 sub_8144434(const u16 * a0, const struct MEventClientHeaderStruct * a1, void * unused); +u32 MEvent_CanPlayerReceiveDistributionMon(const u16 * a0, const struct MEventClientHeaderStruct * a1, void * unused); bool32 sub_8144474(const struct MEventClientHeaderStruct * a0, const u16 * a1); u16 sub_81444B0(const struct MEventClientHeaderStruct * a0, u32 command); bool32 InitWonderCardResources(struct MEWonderCardData * r5, struct MEventBuffer_3430_Sub * r6); @@ -66,8 +83,8 @@ void MENews_RemoveScrollIndicatorArrowPair(void); bool32 WonderNews_Test_Unk_02(void); bool32 WonderCard_Test_Unk_08_6(void); u32 MENews_GetInput(u16 input); -void sub_8143D24(void); -u16 sub_81445C0(u32 command); +void InitMEventData(void); +u16 MEvent_GetBattleCardCount(u32 command); void sub_8144714(u32 a0, u32 a1); u16 *GetMEventProfileECWordsMaybe(void); void sub_81446C4(void); diff --git a/include/mevent_server.h b/include/mevent_server.h index 1e9ef7bef..a7c7a3f23 100644 --- a/include/mevent_server.h +++ b/include/mevent_server.h @@ -48,6 +48,7 @@ struct mevent_client_cmd #define CLI_RECVBUF {.instr = 12, .parameter = 0} #define CLI_REQWORD {.instr = 13, .parameter = 0} #define CLI_SNDWORD {.instr = 14, .parameter = 0} +#define CLI_RECVMON {.instr = 16, .parameter = 0} #define CLI_RECVRAM {.instr = 17, .parameter = 0} #define CLI_SENDALL {.instr = 20, .parameter = 0} diff --git a/include/pokemon_jump.h b/include/pokemon_jump.h index 0e9094752..fa4105a0e 100644 --- a/include/pokemon_jump.h +++ b/include/pokemon_jump.h @@ -5,6 +5,6 @@ void ResetPokeJumpResults(void); bool32 IsSpeciesAllowedInPokemonJump(u16 species); -void sub_8147AA8(u16 species, MainCallback callback); +void StartPokemonJump(u16 species, MainCallback callback); #endif // GUARD_POKEMON_JUMP_H diff --git a/include/script.h b/include/script.h index c0b23e248..ad7094a9b 100644 --- a/include/script.h +++ b/include/script.h @@ -62,7 +62,7 @@ u8 *GetRamScript(u8 objectId, u8 *script); bool32 sub_80991F8(void); u8 *sub_8099244(void); void sub_80992A0(u8 *script, u16 scriptSize); -bool32 sub_8069DFC(void); +bool32 ValidateRamScript(void); void MEventSetRamScript(u8 * script, u16 scriptSize); u8 * sub_8069E48(void); void sub_8069998(u8 var); diff --git a/include/strings.h b/include/strings.h index 7ce955985..d468af4f3 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1111,4 +1111,19 @@ extern const u8 gText_PeopleBattling[]; extern const u8 gText_PeopleInUnionRoom[]; extern const u8 gText_PeopleCommunicating[]; +// mevent +extern const u8 gJPText_ReceiveMysteryGiftWithEReader[]; +extern const u8 gJPText_SelectConnectFromEReaderMenu[]; +extern const u8 gJPText_SelectConnectWithGBA[]; +extern const u8 gJPText_LinkIsIncorrect[]; +extern const u8 gJPText_CardReadingHasBeenHalted[]; +extern const u8 gJPText_Connecting[]; +extern const u8 gJPText_ConnectionErrorCheckLink[]; +extern const u8 gJPText_ConnectionErrorTryAgain[]; +extern const u8 gJPText_AllowEReaderToLoadCard[]; +extern const u8 gJPText_ConnectionComplete[]; +extern const u8 gJPText_NewTrainerHasComeToSevii[]; +extern const u8 gJPText_PleaseWaitAMoment[]; +extern const u8 gJPText_WriteErrorUnableToSaveData[]; + #endif //GUARD_STRINGS_H |