From 171e4bbea427e66c5a30d01d4306dbcdf165e81c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 4 Mar 2020 13:56:54 -0500 Subject: through sub_815184C --- include/dodrio_berry_picking.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'include') diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index 47cece996..5304ae6ee 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -1,6 +1,31 @@ #ifndef GUARD_DODRIO_BERRY_PICKING_H #define GUARD_DODRIO_BERRY_PICKING_H +struct DodrioSubstruct_31A0_14 +{ + u8 unk0[11]; + u8 unkB[11]; +}; + +struct DodrioSubstruct_31A0_2C +{ + u8 unk0; + u8 ALIGNED(4) unk4; + u8 ALIGNED(4) unk8; +}; + +struct DodrioSubstruct_31A0 +{ + u8 name[0x10]; + u32 unk10; + struct DodrioSubstruct_31A0_14 unk14; + struct DodrioSubstruct_31A0_2C unk2C; + u8 filler_35[4]; +}; // size = 0x3C + void StartDodrioBerryPicking(u16 species, MainCallback callback); +u32 sub_815A950(u32 unused, struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 *arg6, u32 *arg7, u32 *arg8); +u32 sub_815AB04(u32 arg0, u8 *arg1); + #endif //GUARD_DODRIO_BERRY_PICKING_H -- cgit v1.2.3 From 6871f3dd3357b5660af6e1607028fde5a0afd862 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 4 Mar 2020 14:58:44 -0500 Subject: through sub_8153048 --- include/dodrio_berry_picking.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index 5304ae6ee..582c263c5 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -27,5 +27,12 @@ void StartDodrioBerryPicking(u16 species, MainCallback callback); u32 sub_815A950(u32 unused, struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 *arg6, u32 *arg7, u32 *arg8); u32 sub_815AB04(u32 arg0, u8 *arg1); +bool32 sub_815AB60(u8 a0); +void sub_815A61C(struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 arg6, u32 arg7, u32 arg8); +void sub_815A5BC(u8 a0); +void sub_815AAD8(u8 a0); +void sub_815AB3C(u8 a0); +u8 sub_815A5E8(s32 a0); +u32 IncrementWithLimit(u32, u32); #endif //GUARD_DODRIO_BERRY_PICKING_H -- cgit v1.2.3 From e9c3b78d9f7142fda849ea2fe420459480fdf989 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 4 Mar 2020 17:21:41 -0500 Subject: through sub_8154A2C; reorganize dbp files a bit --- include/dodrio_berry_picking.h | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'include') diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index 582c263c5..a65172b33 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -1,6 +1,25 @@ #ifndef GUARD_DODRIO_BERRY_PICKING_H #define GUARD_DODRIO_BERRY_PICKING_H +struct DodrioSubstruct_0160 +{ + /*0x0000 : 0x3000*/ u16 ALIGNED(4) tilemapBuffers[3][BG_SCREEN_SIZE]; + /*0x3000 : 0x3160*/ bool32 finished; + /*0x3004 : 0x3164*/ u8 ALIGNED(4) unk3004; + /*0x3008 : 0x3168*/ u8 ALIGNED(4) unk3008[10]; + /*0x3014 : 0x3174*/ u8 ALIGNED(4) state; + /*0x3018 : 0x3178*/ u8 ALIGNED(4) unk3018; + /*0x301C : 0x317C*/ u16 ALIGNED(4) unk301C; + /*0x3020 : 0x3180*/ u8 ALIGNED(4) unk3020; + /*0x3024 : 0x3184*/ u8 ALIGNED(4) unk3024; + /*0x3024 : 0x3184*/ void (*unk3028)(void); +}; // size = 0x302C + +struct DodrioSubstruct_318C +{ + bool8 isShiny; +}; + struct DodrioSubstruct_31A0_14 { u8 unk0[11]; @@ -34,5 +53,35 @@ void sub_815AAD8(u8 a0); void sub_815AB3C(u8 a0); u8 sub_815A5E8(s32 a0); u32 IncrementWithLimit(u32, u32); +void sub_8153A9C(void); +void sub_8153AFC(struct DodrioSubstruct_318C * unk318C, u8 a1, u8 a2, u8 a3); +void sub_8153BC0(u8 a0); +void sub_8153BF8(u8 a0); +void sub_8153D08(u8 playerCount); +u8 sub_8155E8C(void); +u8 sub_81533B4(void); +void sub_8153DA8(u8 a0, u8 a1); +void sub_8153D80(bool8 a0, u8 a1); +void sub_8153FC8(u8 a0); +void sub_8153DD8(void); +void sub_8153E28(void); +void sub_8153ED8(void); +bool32 sub_8153F1C(void); +void sub_81540DC(bool8 a0); +void sub_8154128(void); +void sub_815417C(void); +void sub_8154274(void); +void sub_81542EC(u8 a0, u8 a1); +void sub_8154370(u8 a0, u8 a1); +void sub_8154398(u16 a0, u8 a1); +void sub_8154438(void); +void sub_81544F0(void); +void sub_8154540(void); +void sub_8154578(void); +void sub_81545BC(bool8 a0); +void sub_81546C0(void); +void sub_8154730(void); +void sub_8154968(struct DodrioSubstruct_0160 * unk0160); +void sub_81549D4(u8 a0); #endif //GUARD_DODRIO_BERRY_PICKING_H -- cgit v1.2.3 From cb99443c51d6263425fb4d853177efc07aee5fb9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 5 Mar 2020 10:31:31 -0500 Subject: through sub_81556E0 --- include/dodrio_berry_picking.h | 16 ++++++++++++++++ include/strings.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index a65172b33..caef41073 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -42,6 +42,12 @@ struct DodrioSubstruct_31A0 u8 filler_35[4]; }; // size = 0x3C +struct DodrioSubstruct_3308 +{ + u8 unk0; + u32 unk4; +}; + void StartDodrioBerryPicking(u16 species, MainCallback callback); u32 sub_815A950(u32 unused, struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 *arg6, u32 *arg7, u32 *arg8); @@ -83,5 +89,15 @@ void sub_81546C0(void); void sub_8154730(void); void sub_8154968(struct DodrioSubstruct_0160 * unk0160); void sub_81549D4(u8 a0); +u8 *sub_81533C4(u8 id); +u8 sub_81537AC(u8 id); +void sub_81536A0(struct DodrioSubstruct_3308 *dst, u8 id); +u32 sub_81534AC(void); +u32 Min(u32 x, u32 y); +u16 sub_8153404(u8 arg0, u8 arg1); +u32 sub_81534F0(u8 arg0); +u32 sub_81535B0(void); +u16 sub_8153390(void); +u8 sub_815372C(void); #endif //GUARD_DODRIO_BERRY_PICKING_H diff --git a/include/strings.h b/include/strings.h index c812e991a..55041a658 100644 --- a/include/strings.h +++ b/include/strings.h @@ -114,7 +114,7 @@ extern const u8 gText_TurnedOverItemsWorthYen[]; extern const u8 gPokedudeText_TMTypes[]; extern const u8 gPokedudeText_ReadTMDescription[]; extern const u8 gFameCheckerText_Cancel[]; -extern const u8 gFameCheckerText_ListMenuCursor[]; +extern const u8 gText_SelectorArrow2[]; extern const u8 gFameCheckerText_FameCheckerWillBeClosed[]; extern const u8 gFameCheckerText_ClearTextbox[]; extern const u8 gFameCheckerText_MainScreenUI[]; // "{DPAD_ANY}PICK {DPAD_UPDOWN}SELECT {A_BUTTON}OK$" -- cgit v1.2.3 From b56c2b75b4be20c37e0863a10a3e21c58976f8e2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 5 Mar 2020 13:58:14 -0500 Subject: Finish dodrio_berry_picking_2.c --- include/gba/macro.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'include') diff --git a/include/gba/macro.h b/include/gba/macro.h index a3e870210..6cf2e1651 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -105,20 +105,21 @@ } \ } -#define DmaClearLarge(dmaNum, dest, size, block, bit) \ -{ \ - u32 _size = size; \ - while (1) \ - { \ - DmaFill##bit(dmaNum, 0, dest, (block)); \ - dest += (block); \ - _size -= (block); \ - if (_size <= (block)) \ - { \ - DmaFill##bit(dmaNum, 0, dest, _size); \ - break; \ - } \ - } \ +#define DmaClearLarge(dmaNum, dest, size, block, bit) \ +{ \ + void *_dest = dest; \ + u32 _size = size; \ + while (1) \ + { \ + DmaFill##bit(dmaNum, 0, _dest, (block)); \ + _dest += (block); \ + _size -= (block); \ + if (_size <= (block)) \ + { \ + DmaFill##bit(dmaNum, 0, _dest, _size); \ + break; \ + } \ + } \ } #define DmaFillLarge(dmaNum, value, dest, size, block, bit) \ -- cgit v1.2.3 From 7f81fdc8df5247c926228b784f6878dc3edac051 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 5 Mar 2020 14:03:23 -0500 Subject: Port dodrio_berry_picking_3 from emerald --- include/dodrio_berry_picking.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index caef41073..2e6720ab9 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -52,11 +52,11 @@ void StartDodrioBerryPicking(u16 species, MainCallback callback); u32 sub_815A950(u32 unused, struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 *arg6, u32 *arg7, u32 *arg8); u32 sub_815AB04(u32 arg0, u8 *arg1); -bool32 sub_815AB60(u8 a0); +bool32 sub_815AB60(u32 a0); void sub_815A61C(struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 arg6, u32 arg7, u32 arg8); -void sub_815A5BC(u8 a0); +void sub_815A5BC(s32 a0); void sub_815AAD8(u8 a0); -void sub_815AB3C(u8 a0); +void sub_815AB3C(u32 a0); u8 sub_815A5E8(s32 a0); u32 IncrementWithLimit(u32, u32); void sub_8153A9C(void); -- cgit v1.2.3 From 3a894f7b089b5bfeb0dbb7fe6bb2dfb8a986d8fc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 5 Mar 2020 14:50:53 -0500 Subject: Static symbols in dbp --- include/dodrio_berry_picking.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/dodrio_berry_picking.h b/include/dodrio_berry_picking.h index 2e6720ab9..26aa51023 100644 --- a/include/dodrio_berry_picking.h +++ b/include/dodrio_berry_picking.h @@ -99,5 +99,8 @@ u32 sub_81534F0(u8 arg0); u32 sub_81535B0(void); u16 sub_8153390(void); u8 sub_815372C(void); +bool32 sub_8155E68(void); +void ShowDodrioBerryPickingRecords(void); +void IsDodrioInParty(void); #endif //GUARD_DODRIO_BERRY_PICKING_H -- cgit v1.2.3