From e7e1938094081ba2e20232caca0239cb2290251f Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 16:17:23 -0400 Subject: Start decompilation of lilycove_lady --- include/global.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index e694a5974..764eff563 100644 --- a/include/global.h +++ b/include/global.h @@ -655,6 +655,39 @@ struct DaycareData #define FLAGS_COUNT 300 #define VARS_COUNT 256 +enum { + LILYCOVE_LADY_QUIZ, + LILYCOVE_LADY_FAVOUR, + LILYCOVE_LADY_CONTEST +}; + +typedef union // TODO +{ + struct + { + /*0x000*/ u8 id; + /*0x001*/ u8 language; + } quiz; + + struct + { + /*0x000*/ u8 id; + } flavor; + + struct + { + /*0x000*/ u8 id; + /*0x001*/ u8 filler_001[12]; + /*0x00d*/ u8 category; // maybe? + } contest; + + struct + { + /*0x000*/ u8 id; + /*0x001*/ u8 filler_001[535]; + } common; +} LilycoveLady; + struct SaveBlock1 { /*0x00*/ struct Coords16 pos; @@ -738,7 +771,7 @@ struct SaveBlock1 /*0x3728*/ struct RamScript ramScript; /*0x3B14*/ struct RecordMixingGift recordMixingGift; /*0x3B24*/ u8 seen2[52]; - /*0x3B58*/ u8 lilycoveLady[536]; // TODO: convert to a union + /*0x3B58*/ LilycoveLady lilycoveLady; // TODO: convert to a union /*0x3D70*/ u8 babyPhrase[24]; // TODO: convert to a struct // sizeof: 0x3D88 }; -- cgit v1.2.3 From b26eb6713bb866f1173b4c7192ce231d894d19ea Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 16:32:33 -0400 Subject: sub_818DB20 --- include/global.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 764eff563..92435ce28 100644 --- a/include/global.h +++ b/include/global.h @@ -672,7 +672,11 @@ typedef union // TODO struct { /*0x000*/ u8 id; - } flavor; + /*0x001*/ u8 filler_001[11]; + /*0x00c*/ u8 unk_00c; + /*0x00d*/ u8 filler_00d[3]; + /*0x010*/ u16 unk_010; + } favour; struct { -- cgit v1.2.3 From 4e8a2c6934c4f8a44ed8d350fe96996beda21d0e Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 16:55:53 -0400 Subject: SetLilycoveFavourLady --- include/global.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 92435ce28..0fc860e68 100644 --- a/include/global.h +++ b/include/global.h @@ -672,10 +672,16 @@ typedef union // TODO struct { /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[11]; + /*0x001*/ u8 unk_001; + /*0x002*/ u8 unk_002; + /*0x003*/ u8 unk_003; + /*0x004*/ u8 unk_004; + /*0x005*/ u8 filler_005[7]; /*0x00c*/ u8 unk_00c; - /*0x00d*/ u8 filler_00d[3]; + /*0x00d*/ u8 filler_00d; + /*0x00e*/ u16 unk_00e; /*0x010*/ u16 unk_010; + /*0x012*/ u8 language; } favour; struct -- cgit v1.2.3 From 3b3423d1a751134ff7941b41bad72e0e75314647 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 17:07:36 -0400 Subject: sub_818DC60 --- include/global.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 0fc860e68..42629cf48 100644 --- a/include/global.h +++ b/include/global.h @@ -675,8 +675,7 @@ typedef union // TODO /*0x001*/ u8 unk_001; /*0x002*/ u8 unk_002; /*0x003*/ u8 unk_003; - /*0x004*/ u8 unk_004; - /*0x005*/ u8 filler_005[7]; + /*0x004*/ u8 unk_004[8]; /*0x00c*/ u8 unk_00c; /*0x00d*/ u8 filler_00d; /*0x00e*/ u16 unk_00e; -- cgit v1.2.3 From 316f9f4d83d118437c266526cc0e6da1dfc90461 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 21:28:01 -0400 Subject: through sub_818DD14 --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 64ed869ef..8c2122b39 100644 --- a/include/global.h +++ b/include/global.h @@ -684,7 +684,7 @@ typedef union // TODO /*0x004*/ u8 unk_004[8]; /*0x00c*/ u8 unk_00c; /*0x00d*/ u8 filler_00d; - /*0x00e*/ u16 unk_00e; + /*0x00e*/ u16 itemId; /*0x010*/ u16 unk_010; /*0x012*/ u8 language; } favour; -- cgit v1.2.3 From 73ee165ef6b05417dc42be721e625712c6538ed6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 22:25:31 -0400 Subject: sub_818DF00 --- include/global.h | 66 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 27 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 8c2122b39..42fe0cfbb 100644 --- a/include/global.h +++ b/include/global.h @@ -667,39 +667,51 @@ enum { LILYCOVE_LADY_CONTEST }; -typedef union // TODO +struct LilycoveLadyQuiz { - struct - { - /*0x000*/ u8 id; - /*0x001*/ u8 language; - } quiz; + /*0x000*/ u8 id; + /*0x001*/ u8 language; + /*0x002*/ u16 unk_002[9]; + /*0x014*/ u16 unk_014; + /*0x016*/ u8 filler_016[2]; + /*0x018*/ u8 unk_018; + /*0x019*/ u8 filler_019[15]; + /*0x028*/ u16 unk_028; + /*0x02a*/ u8 filler_02a; + /*0x02b*/ u8 unk_02b; +}; - struct - { - /*0x000*/ u8 id; - /*0x001*/ u8 unk_001; - /*0x002*/ u8 unk_002; - /*0x003*/ u8 unk_003; - /*0x004*/ u8 unk_004[8]; - /*0x00c*/ u8 unk_00c; - /*0x00d*/ u8 filler_00d; - /*0x00e*/ u16 itemId; - /*0x010*/ u16 unk_010; - /*0x012*/ u8 language; - } favour; +struct LilycoveLadyFavour +{ + /*0x000*/ u8 id; + /*0x001*/ u8 unk_001; + /*0x002*/ u8 unk_002; + /*0x003*/ u8 unk_003; + /*0x004*/ u8 unk_004[8]; + /*0x00c*/ u8 unk_00c; + /*0x00d*/ u8 filler_00d; + /*0x00e*/ u16 itemId; + /*0x010*/ u16 unk_010; + /*0x012*/ u8 language; +}; - struct - { - /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[12]; - /*0x00d*/ u8 category; // maybe? - } contest; +struct LilycoveLadyContest +{ + /*0x000*/ u8 id; + /*0x001*/ u8 filler_001[12]; + /*0x00d*/ u8 category; // maybe? +}; + +typedef union // TODO +{ + struct LilycoveLadyQuiz quiz; + struct LilycoveLadyFavour favour; + struct LilycoveLadyContest contest; struct { /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[535]; + /*0x001*/ u8 filler_001[0x207]; } common; } LilycoveLady; @@ -786,7 +798,7 @@ struct SaveBlock1 /*0x3728*/ struct RamScript ramScript; /*0x3B14*/ struct RecordMixingGift recordMixingGift; /*0x3B24*/ u8 seen2[52]; - /*0x3B58*/ LilycoveLady lilycoveLady; // TODO: convert to a union + /*0x3B58*/ LilycoveLady lilycoveLady; /*0x3D70*/ u8 babyPhrase[24]; // TODO: convert to a struct // sizeof: 0x3D88 }; -- cgit v1.2.3 From 28d0fa33fef825dcb22d45db966ef814c461dd08 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 22:35:40 -0400 Subject: SetLilicoveQuizLady --- include/global.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 42fe0cfbb..84c70a16e 100644 --- a/include/global.h +++ b/include/global.h @@ -670,15 +670,18 @@ enum { struct LilycoveLadyQuiz { /*0x000*/ u8 id; - /*0x001*/ u8 language; + /*0x001*/ u8 unk_001; /*0x002*/ u16 unk_002[9]; /*0x014*/ u16 unk_014; - /*0x016*/ u8 filler_016[2]; + /*0x016*/ u16 unk_016; /*0x018*/ u8 unk_018; - /*0x019*/ u8 filler_019[15]; + /*0x019*/ u8 filler_019[7]; + /*0x020*/ u16 unk_020[4]; /*0x028*/ u16 unk_028; - /*0x02a*/ u8 filler_02a; + /*0x02a*/ u8 unk_02a; /*0x02b*/ u8 unk_02b; + /*0x02c*/ u8 unk_02c; + /*0x02d*/ u8 language; }; struct LilycoveLadyFavour -- cgit v1.2.3 From 0b81c2920aa87aae3403efdf60e40b58445efbbf Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 20 Sep 2017 10:45:00 -0400 Subject: sub_818E1F4 --- include/global.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 84c70a16e..569345355 100644 --- a/include/global.h +++ b/include/global.h @@ -674,9 +674,8 @@ struct LilycoveLadyQuiz /*0x002*/ u16 unk_002[9]; /*0x014*/ u16 unk_014; /*0x016*/ u16 unk_016; - /*0x018*/ u8 unk_018; - /*0x019*/ u8 filler_019[7]; - /*0x020*/ u16 unk_020[4]; + /*0x018*/ u8 playerName[8]; + /*0x020*/ u16 playerTrainerId[4]; /*0x028*/ u16 unk_028; /*0x02a*/ u8 unk_02a; /*0x02b*/ u8 unk_02b; @@ -690,9 +689,8 @@ struct LilycoveLadyFavour /*0x001*/ u8 unk_001; /*0x002*/ u8 unk_002; /*0x003*/ u8 unk_003; - /*0x004*/ u8 unk_004[8]; + /*0x004*/ u8 playerName[8]; /*0x00c*/ u8 unk_00c; - /*0x00d*/ u8 filler_00d; /*0x00e*/ u16 itemId; /*0x010*/ u16 unk_010; /*0x012*/ u8 language; -- cgit v1.2.3 From 8a31e58689af6e62c8c272c24397310c2a44f6f5 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 20 Sep 2017 11:30:09 -0400 Subject: sub_818E298 --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 569345355..09dabf822 100644 --- a/include/global.h +++ b/include/global.h @@ -676,7 +676,7 @@ struct LilycoveLadyQuiz /*0x016*/ u16 unk_016; /*0x018*/ u8 playerName[8]; /*0x020*/ u16 playerTrainerId[4]; - /*0x028*/ u16 unk_028; + /*0x028*/ u16 itemId; /*0x02a*/ u8 unk_02a; /*0x02b*/ u8 unk_02b; /*0x02c*/ u8 unk_02c; -- cgit v1.2.3 From d22a9acc63b9f7c72e0d7ec81396b799af94e270 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 16:12:18 -0400 Subject: through sub_818E490 --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 09dabf822..6fa8cb92d 100644 --- a/include/global.h +++ b/include/global.h @@ -712,7 +712,7 @@ typedef union // TODO struct { /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[0x207]; + /*0x001*/ u8 filler_001[0x217]; } common; } LilycoveLady; -- cgit v1.2.3 From 7c8cbc6b88d745da215fc45730f84b598869438f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 16:49:22 -0400 Subject: SetLilycoveContestLady --- include/global.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'include/global.h') diff --git a/include/global.h b/include/global.h index 6fa8cb92d..fa7856786 100644 --- a/include/global.h +++ b/include/global.h @@ -670,7 +670,7 @@ enum { struct LilycoveLadyQuiz { /*0x000*/ u8 id; - /*0x001*/ u8 unk_001; + /*0x001*/ u8 phase; /*0x002*/ u16 unk_002[9]; /*0x014*/ u16 unk_014; /*0x016*/ u16 unk_016; @@ -686,7 +686,7 @@ struct LilycoveLadyQuiz struct LilycoveLadyFavour { /*0x000*/ u8 id; - /*0x001*/ u8 unk_001; + /*0x001*/ u8 phase; /*0x002*/ u8 unk_002; /*0x003*/ u8 unk_003; /*0x004*/ u8 playerName[8]; @@ -699,8 +699,13 @@ struct LilycoveLadyFavour struct LilycoveLadyContest { /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[12]; - /*0x00d*/ u8 category; // maybe? + /*0x001*/ u8 phase; + /*0x002*/ u8 fave_pkblk; + /*0x003*/ u8 other_pkblk; + /*0x004*/ u8 playerName[8]; + /*0x00c*/ u8 max_sheen; + /*0x00d*/ u8 category; + /*0x00e*/ u8 language; }; typedef union // TODO @@ -708,12 +713,7 @@ typedef union // TODO struct LilycoveLadyQuiz quiz; struct LilycoveLadyFavour favour; struct LilycoveLadyContest contest; - - struct - { - /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[0x217]; - } common; + u8 id; } LilycoveLady; struct SaveBlock1 @@ -800,6 +800,7 @@ struct SaveBlock1 /*0x3B14*/ struct RecordMixingGift recordMixingGift; /*0x3B24*/ u8 seen2[52]; /*0x3B58*/ LilycoveLady lilycoveLady; + /*0x3B88*/ u8 filler_3B88[0x1E8]; /*0x3D70*/ u8 babyPhrase[24]; // TODO: convert to a struct // sizeof: 0x3D88 }; -- cgit v1.2.3