diff options
Diffstat (limited to 'include/mevent.h')
-rwxr-xr-x | include/mevent.h | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/include/mevent.h b/include/mevent.h index 4fda47fbd..1297b4291 100755 --- a/include/mevent.h +++ b/include/mevent.h @@ -1,6 +1,9 @@ #ifndef GUARD_MEVENT_H #define GUARD_MEVENT_H +#include "main.h" +#include "constants/mevent.h" + struct MEvent_Str_1 { u16 unk_000; @@ -13,51 +16,52 @@ struct MEvent_Str_2 u8 fill_00[0x40]; }; -struct MEventStruct_Unk1442CC +struct MysteryGiftLinkGameData { u32 unk_00; u16 unk_04; u32 unk_08; u16 unk_0C; u32 unk_10; - u16 unk_14; + u16 flagId; u16 questionnaireWords[NUM_QUESTIONNAIRE_WORDS]; - struct MEventBuffer_3430 unk_20; - u8 unk_44; + struct WonderCardMetadata cardMetadata; + u8 maxStamps; u8 playerName[PLAYER_NAME_LENGTH]; u8 playerTrainerId[TRAINER_ID_LENGTH]; u16 easyChatProfile[EASY_CHAT_BATTLE_WORDS_COUNT]; - u8 romHeaderGameCode[4]; + u8 romHeaderGameCode[GAME_CODE_LENGTH]; u8 romHeaderSoftwareVersion; }; -void sub_801AFD8(void); +void ClearMysteryGift(void); struct WonderNews *GetSavedWonderNews(void); struct WonderCard *GetSavedWonderCard(void); -struct MEventBuffer_3430 *sav1_get_mevent_buffer_2(void); -struct MysteryEventStruct *sub_801B044(void); +struct WonderCardMetadata *GetSavedWonderCardMetadata(void); +struct WonderNewsMetadata *GetSavedWonderNewsMetadata(void); u16 *GetQuestionnaireWordsPtr(void); -void ClearSavedWonderNews(void); +void ClearSavedWonderNewsAndRelated(void); +void ClearSavedWonderCardAndRelated(void); bool32 SaveWonderNews(const struct WonderNews *news); -bool32 ValidateSavedWonderNews(void); -bool32 WonderNews_Test_Unk_02(void); -bool32 sub_801B1A4(const u8 *src); -void ClearSavedWonderCard(void); bool32 SaveWonderCard(const struct WonderCard *card); +bool32 ValidateSavedWonderNews(void); bool32 ValidateSavedWonderCard(void); -bool32 WonderCard_Test_Unk_08_6(void); +bool32 IsWonderNewsSameAsSaved(const u8 *src); +bool32 IsSendingSavedWonderNewsAllowed(void); +bool32 IsSendingSavedWonderCardAllowed(void); u16 GetWonderCardFlagID(void); -void WonderCard_ResetInternalReceivedFlag(struct WonderCard *buffer); -bool32 CheckReceivedGiftFromWonderCard(void); -bool32 sub_801B508(const u16 *data); -void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1); -bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1); -u32 sub_801B6EC(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const void *unused); -u32 sub_801B708(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, const void *unused); -bool32 MysteryGift_DoesQuestionnaireMatch(const struct MEventStruct_Unk1442CC *data, const u16 *words); -u16 MEventStruct_Unk1442CC_GetValueNFrom_unk_20(const struct MEventStruct_Unk1442CC *a0, u32 command); -u16 mevent_081445C0(u32 command); -void ResetReceivedWonderCardFlag(void); -bool32 MEventHandleReceivedWonderCard(u16 a0); +void DisableWonderCardSending(struct WonderCard *card); +bool32 IsSavedWonderCardGiftNotReceived(void); +bool32 MysteryGift_TrySaveStamp(const u16 *stamp); +void MysteryGift_LoadLinkGameData(struct MysteryGiftLinkGameData *data, bool32 a1); +bool32 MysteryGift_ValidateLinkGameData(const struct MysteryGiftLinkGameData *data, bool32 a1); +u32 MysteryGift_CompareCardFlags(const u16 *a0, const struct MysteryGiftLinkGameData *data, const void *unused); +u32 MysteryGift_CheckStamps(const u16 *a0, const struct MysteryGiftLinkGameData *data, const void *unused); +bool32 MysteryGift_DoesQuestionnaireMatch(const struct MysteryGiftLinkGameData *data, const u16 *words); +u16 MysteryGift_GetCardStatFromLinkData(const struct MysteryGiftLinkGameData *data, u32 stat); +u16 MysteryGift_GetCardStat(u32 stat); +void MysteryGift_DisableStats(void); +bool32 MysteryGift_TryEnableStatsByFlagId(u16 flagId); +void TryIncrementMysteryGiftStat(u32 stat, u32 trainerId); #endif //GUARD_MEVENT_H |