diff options
author | GriffinR <25753467+GriffinRichards@users.noreply.github.com> | 2019-08-05 20:37:09 -0400 |
---|---|---|
committer | huderlem <huderlem@gmail.com> | 2019-08-21 17:06:55 -0500 |
commit | d931ba96020397ec9a9740a9d67aac8a99bf11f6 (patch) | |
tree | ec3548ef8c9d10eb7a75f13348a5f9f7bd0adad7 /include | |
parent | 7fc99f39525a89aa0f3158b98bc61e709bebdfa2 (diff) |
document remaining funcs
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/lilycove_lady.h | 30 | ||||
-rw-r--r-- | include/global.h | 20 | ||||
-rw-r--r-- | include/item_menu.h | 4 | ||||
-rw-r--r-- | include/lilycove_lady.h | 8 |
4 files changed, 42 insertions, 20 deletions
diff --git a/include/constants/lilycove_lady.h b/include/constants/lilycove_lady.h new file mode 100644 index 000000000..6ef70d8a7 --- /dev/null +++ b/include/constants/lilycove_lady.h @@ -0,0 +1,30 @@ +#ifndef GUARD_LILYCOVE_LADY_CONSTANTS_H +#define GUARD_LILYCOVE_LADY_CONSTANTS_H + +#define LILYCOVE_LADY_QUIZ 0 +#define LILYCOVE_LADY_FAVOR 1 +#define LILYCOVE_LADY_CONTEST 2 +#define LILYCOVE_LADY_COUNT 3 + +#define LILYCOVE_LADY_STATE_READY 0 +#define LILYCOVE_LADY_STATE_COMPLETED 1 +#define LILYCOVE_LADY_STATE_PRIZE 2 + +#define QUIZ_AUTHOR_PLAYER 0 +#define QUIZ_AUTHOR_OTHER_PLAYER 1 +#define QUIZ_AUTHOR_LADY 2 + +// Would be redundant with the above set if GF hadn't mixed the order +#define QUIZ_AUTHOR_NAME_LADY 0 +#define QUIZ_AUTHOR_NAME_PLAYER 1 +#define QUIZ_AUTHOR_NAME_OTHER_PLAYER 2 + +// TODO use array count macro? +#define QUIZ_QUESTION_LEN 9 //ARRAY_COUNT(sQuizLadyQuestion#) +#define NUM_QUIZ_QUESTIONS 16 //ARRAY_COUNT(sQuizLadyQuizQuestions) +#define FAVOR_DESCRIPTION_NUM 6 //ARRAY_COUNT(sFavorLadyDescriptions) + +#define LILYCOVE_LADY_GIFT_THRESHOLD 5 + + +#endif diff --git a/include/global.h b/include/global.h index a055cb2c0..df0d0c1ea 100644 --- a/include/global.h +++ b/include/global.h @@ -737,24 +737,16 @@ struct RecordMixingDayCareMail bool16 holdsItem[DAYCARE_MON_COUNT]; }; -enum -{ - LILYCOVE_LADY_QUIZ, - LILYCOVE_LADY_FAVOR, - LILYCOVE_LADY_CONTEST, - LILYCOVE_LADY_COUNT -}; - struct LilycoveLadyQuiz { /*0x000*/ u8 id; /*0x001*/ u8 state; /*0x002*/ u16 question[9]; - /*0x014*/ u16 answer; - /*0x016*/ u16 response; + /*0x014*/ u16 correctAnswer; + /*0x016*/ u16 playerAnswer; /*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; /*0x020*/ u16 playerTrainerId[4]; - /*0x028*/ u16 itemId; + /*0x028*/ u16 prize; /*0x02a*/ bool8 waitingForChallenger; /*0x02b*/ u8 questionId; /*0x02c*/ u8 prevQuestionId; @@ -778,10 +770,10 @@ struct LilycoveLadyContest { /*0x000*/ u8 id; /*0x001*/ bool8 givenPokeblock; - /*0x002*/ u8 fave_pkblk; - /*0x003*/ u8 other_pkblk; + /*0x002*/ u8 numGoodPokeblocksGiven; + /*0x003*/ u8 numOtherPokeblocksGiven; /*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1]; - /*0x00c*/ u8 max_sheen; + /*0x00c*/ u8 maxSheen; /*0x00d*/ u8 category; /*0x00e*/ u8 language; }; diff --git a/include/item_menu.h b/include/item_menu.h index 5580fa4b4..b1275549d 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -69,8 +69,8 @@ extern u16 gSpecialVar_ItemId; // Exported ROM declarations void sub_81AAC14(void); -void sub_81AAC50(void); -void sub_81AAC70(void); +void FavorLadyOpenBagMenu(void); +void QuizLadyOpenBagMenu(void); void sub_81AAC28(void); void sub_81AABB0(void); void SetInitialScrollAndCursorPositions(u8 pocketId); diff --git a/include/lilycove_lady.h b/include/lilycove_lady.h index 959878ac9..1ec327be9 100644 --- a/include/lilycove_lady.h +++ b/include/lilycove_lady.h @@ -3,10 +3,10 @@ u8 GetLilycoveLadyId(void); void InitLilycoveLady(void); -void ReadyLilycoveLady(void); -void sub_818DEF4(void); -void sub_818E564(void); -void sub_818E570(const LilycoveLady *lilycoveLady); +void ResetLilycoveLadyForRecordMix(void); +void FieldCallback_FavorLadyEnableScriptContexts(void); +void FieldCallback_QuizLadyEnableScriptContexts(void); +void QuizLadyClearQuestionForRecordMix(const LilycoveLady *lilycoveLady); bool8 GivePokeblockToContestLady(struct Pokeblock *pokeblock); void BufferContestLadyMonName(u8 *dest1, u8 *dest2); void BufferContestLadyPlayerName(u8 *dest); |