From 6503d0fee3d9423640f563745692af35f7298c8b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 9 Jan 2018 10:09:55 -0500 Subject: through sub_8097E70; split PSS in 3 --- include/pokemon_storage_system.h | 120 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 9fe3436ef..51ebda88f 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -1,8 +1,128 @@ #ifndef GUARD_POKEMON_STORAGE_SYSTEM_H #define GUARD_POKEMON_STORAGE_SYSTEM_H +#include "pc_screen_effect.h" +#include "mon_markings.h" + +enum { + PC_TEXT_EXIT_BOX, + PC_TEXT_WHAT_YOU_DO, + PC_TEXT_PICK_A_THEME, + PC_TEXT_PICK_A_WALLPAPER, + PC_TEXT_IS_SELECTED, + PC_TEXT_JUMP_TO_WHICH_BOX, + PC_TEXT_DEPOSIT_IN_WHICH_BOX, + PC_TEXT_WAS_DEPOSITED, + PC_TEXT_BOX_IS_FULL, + PC_TEXT_RELEASE_POKE, + PC_TEXT_WAS_RELEASED, + PC_TEXT_BYE_BYE, + PC_TEXT_MARK_POKE, + PC_TEXT_LAST_POKE, + PC_TEXT_PARTY_FULL, + PC_TEXT_HOLDING_POKE, + PC_TEXT_WHICH_ONE_WILL_TAKE, + PC_TEXT_CANT_RELEASE_EGG, + PC_TEXT_CONTINUE_BOX, + PC_TEXT_CAME_BACK, + PC_TEXT_WORRIED, + PC_TEXT_SURPRISE, + PC_TEXT_PLEASE_REMOVE_MAIL +}; + +enum { + PC_TEXT_FMT_NORMAL, + PC_TEXT_FMT_MON_NAME, + PC_TEXT_FMT_UNK_02, + PC_TEXT_FMT_UNK_03, + PC_TEXT_FMT_MON_NAME_2, + PC_TEXT_FMT_UNK_05, + PC_TEXT_FMT_MON_NAME_AFTER_EXCL_MARK +}; + +struct StorageAction { + const u8 *text; + u8 format; +}; + +struct PSS_MenuStringPtrs { + const u8 *text; + const u8 *desc; +}; + +struct UnkStruct_2000020 { + struct UnkStruct_2000020 *unk_00; + u8 unk_04; + u8 unk_05; +}; + +struct UnkPSSStruct_2002370 { + struct Sprite *unk_0000; + struct Sprite *unk_0004[4]; + u32 unk_0014[3]; + struct Sprite *unk_0020[2]; + u8 filler_0028[0x214]; + u8 curBox; + u8 unk_023d; + u8 unk_023e; + u16 unk_0240; + u16 unk_0242; +}; // 0244 + +struct PokemonStorageSystemData { + void (*unk_0000)(void); + u8 unk_0004; + u8 unk_0005; + u8 unk_0006; + u8 unk_0007; + u16 unk_0008; + u16 unk_000a; + struct PCScreenEffectStruct unk_000c; + struct UnkStruct_2000020 unk_0020[274]; // refine size later + u8 filler_08b0[2]; + s16 unk_08b2; + u16 unk_08b4; + u8 filler_08b6[0x4a8]; + s16 unk_0d5e; + s16 unk_0d60; + u8 filler_0d62[0x490]; + u16 unk_11f2; + u8 filler_11f4[2]; + u8 unk_11f6; + u8 unk_11f7; + u8 unk_11f8; + u8 unk_11f9; + u8 unk_11fa[0xc2]; + struct PokemonMarkMenu unk_12bc; + struct UnkPSSStruct_2002370 unk_2370; + u8 filler_25b4[0xd8]; + u8 unk_268c; + u8 unk_268d; + u8 unk_268e; + struct Pokemon *unk_2690; + u8 unk_2694[18]; + u8 unk_26a6[62]; + u8 unk_26e4[0x20]; + u16 unk_2704[0x40]; + u8 unk_2784[0x800]; +}; + +extern EWRAM_DATA u16 gUnknown_02039760[0x600]; + +extern struct PokemonStorageSystemData *const gPokemonStorageSystemPtr; +extern u8 *const gUnknown_083B6DB8; + +void sub_8096264(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3); +void sub_809634C(u8 curBox); +u8 sub_8096368(void); +void sub_809635C(void); +void sub_8096310(void); +void sub_80961A8(void); + +void task_intro_29(u8 whichMenu); void ResetPokemonStorageSystem(void); void BoxMonRestorePP(struct BoxPokemon *); void party_compaction(void); +struct Sprite *sub_809A9A0(u16 a0, u16 a1, u8 a2, u8 a3, u8 a4); #endif // GUARD_POKEMON_STORAGE_SYSTEM_H -- cgit v1.2.3 From 4facfe910285787778666eeee747b4c1c7201d98 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 9 Jan 2018 14:43:24 -0500 Subject: through sub_80980D4 (nonmatching) --- include/pokemon_storage_system.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 51ebda88f..cbdec8999 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -85,14 +85,19 @@ struct PokemonStorageSystemData { u8 filler_08b6[0x4a8]; s16 unk_0d5e; s16 unk_0d60; - u8 filler_0d62[0x490]; + u8 filler_0d62[0x48a]; + u32 unk_11ec; + u16 unk_11f0; u16 unk_11f2; u8 filler_11f4[2]; u8 unk_11f6; u8 unk_11f7; u8 unk_11f8; u8 unk_11f9; - u8 unk_11fa[0xc2]; + u8 unk_11fa[0xb2]; + struct Sprite *unk_12ac; + struct Sprite *unk_12b0[2]; + u16 *unk_12b8; struct PokemonMarkMenu unk_12bc; struct UnkPSSStruct_2002370 unk_2370; u8 filler_25b4[0xd8]; @@ -102,8 +107,12 @@ struct PokemonStorageSystemData { struct Pokemon *unk_2690; u8 unk_2694[18]; u8 unk_26a6[62]; - u8 unk_26e4[0x20]; - u16 unk_2704[0x40]; + u8 unk_26e4[0x16]; + u16 unk_26fa; + u16 *unk_26fc; + struct Sprite *unk_2700; + u16 unk_2704[0x10]; + u8 filler_2724[0x60]; u8 unk_2784[0x800]; }; -- cgit v1.2.3 From ebae5167939d1a10a2a37324063bb4f70c43a4ea Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 9 Jan 2018 17:29:50 -0500 Subject: through sub_8098350 --- include/pokemon_storage_system.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index cbdec8999..f91a5f08e 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -85,7 +85,8 @@ struct PokemonStorageSystemData { u8 filler_08b6[0x4a8]; s16 unk_0d5e; s16 unk_0d60; - u8 filler_0d62[0x48a]; + u8 filler_0d62[0x486]; + u8 *unk_11e8; u32 unk_11ec; u16 unk_11f0; u16 unk_11f2; @@ -94,7 +95,11 @@ struct PokemonStorageSystemData { u8 unk_11f7; u8 unk_11f8; u8 unk_11f9; - u8 unk_11fa[0xb2]; + u8 unk_11fa[0x15]; + u8 unk_120f[0x25]; + u8 unk_1234[0x25]; + u8 unk_1259[0x21]; + u8 unk_127a[0x32]; struct Sprite *unk_12ac; struct Sprite *unk_12b0[2]; u16 *unk_12b8; @@ -114,6 +119,8 @@ struct PokemonStorageSystemData { u16 unk_2704[0x10]; u8 filler_2724[0x60]; u8 unk_2784[0x800]; + u8 filler_2f84[0x1800]; + u8 unk_4784[0x800]; }; extern EWRAM_DATA u16 gUnknown_02039760[0x600]; -- cgit v1.2.3 From 2eb10c6f2d16729dde12b0fd26cac3f45b85a557 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 9 Jan 2018 20:18:46 -0500 Subject: close swiss cheese in pokemon_storage_system_2.c --- include/pokemon_storage_system.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index f91a5f08e..b82213bb2 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -78,8 +78,16 @@ struct PokemonStorageSystemData { u16 unk_0008; u16 unk_000a; struct PCScreenEffectStruct unk_000c; - struct UnkStruct_2000020 unk_0020[274]; // refine size later - u8 filler_08b0[2]; + struct UnkStruct_2000020 unk_0020[17]; // refine size later + u16 unk_00a8[0x400]; + u16 unk_08a8; + u16 unk_08aa; + u8 unk_08ac; + u8 unk_08ad; + u8 unk_08ae; + u8 unk_08af; + u8 unk_08b0; + bool8 unk_08b1; s16 unk_08b2; u16 unk_08b4; u8 filler_08b6[0x4a8]; -- cgit v1.2.3 From f361bbd3e63a0b342ddfbd4c4c8d9e5a7536d2cc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 9 Jan 2018 20:30:32 -0500 Subject: finish pokemon_storage_system_2.c --- include/pokemon_storage_system.h | 55 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index b82213bb2..ab2a14362 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -142,11 +142,60 @@ u8 sub_8096368(void); void sub_809635C(void); void sub_8096310(void); void sub_80961A8(void); - void task_intro_29(u8 whichMenu); void ResetPokemonStorageSystem(void); -void BoxMonRestorePP(struct BoxPokemon *); -void party_compaction(void); +void sub_8098B48(void); +void sub_8099310(void); +bool8 sub_8099374(void); +void sub_80994A8(s16 a0); +void sub_809954C(void); +void sub_8099958(void); +bool8 sub_8099990(void); struct Sprite *sub_809A9A0(u16 a0, u16 a1, u8 a2, u8 a3, u8 a4); +void sub_809BB90(void); +void sub_8099BF8(u8 a0); +void sub_8099C70(u8 whichBox); +bool8 sub_8099D34(void); +void sub_8099DCC(u8 a0); +bool8 sub_8099E08(void); +void sub_809A860(u8 a0); +void sub_809AA24(void); +void sub_809AA98(void); +bool8 sub_809AC00(void); +void sub_809B0C0(u8 a0); +void sub_809B0D4(void); +void sub_809B0E0(void); +u8 sub_809B0F4(void); +void sub_809B068(void); +void sub_809B100(u8 a0); +bool8 sub_809B130(void); +void sub_809B440(void); +bool8 sub_809B62C(u8); +void sub_809B6BC(void); +void sub_809B6DC(void); +bool8 sub_809B734(void); +void sub_809B760(void); +void sub_809B7AC(void); +void sub_809B7D4(void); +s8 sub_809B960(void); +void sub_809BBC0(void); +void sub_809BC18(void); +void sub_809BD14(void); +void party_compaction(void); +void sub_809BDD8(u8 markings); +bool8 sub_809BE80(void); +bool8 sub_809BEBC(void); +bool8 sub_809BF20(void); +bool8 sub_809BF48(void); +u8 sub_809CA40(void); +void sub_809CDCC(void); +void sub_809CDEC(u8 a0); +void sub_809CE84(void); +s16 sub_809CF30(void); +void sub_809CFDC(struct UnkStruct_2000020 *a0, struct UnkStruct_2000020 *a1, u8 a2); +void sub_809CFF0(void); +void sub_809D034(void *dest, u16 dLeft, u16 dTop, const void *src, u16 sLeft, u16 sTop, u16 width, u16 height); +void sub_809D104(void *dest, u16 dLeft, u16 dTop, const void *src, u16 sLeft, u16 sTop, u16 width, u16 height); +void sub_809D16C(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height); #endif // GUARD_POKEMON_STORAGE_SYSTEM_H -- cgit v1.2.3 From c4244f5bec27741c18a12611f245df5572b11d8b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 9 Jan 2018 21:18:42 -0500 Subject: through sub_8098BF0 --- include/pokemon_storage_system.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index ab2a14362..7f16b5d4f 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -90,10 +90,18 @@ struct PokemonStorageSystemData { bool8 unk_08b1; s16 unk_08b2; u16 unk_08b4; - u8 filler_08b6[0x4a8]; + u8 filler_08b6[0x4a6]; + u16 unk_0d5c; s16 unk_0d5e; s16 unk_0d60; - u8 filler_0d62[0x486]; + u8 filler_0d62[0x2d2]; + struct Sprite *unk_1034; + u32 unk_1038[6]; + u32 unk_1050[30]; + u8 filler_10c8[8]; + u16 unk_10d0[40]; + u16 unk_1120[40]; + u8 filler_1170[0x78]; u8 *unk_11e8; u32 unk_11ec; u16 unk_11f0; @@ -113,7 +121,8 @@ struct PokemonStorageSystemData { u16 *unk_12b8; struct PokemonMarkMenu unk_12bc; struct UnkPSSStruct_2002370 unk_2370; - u8 filler_25b4[0xd8]; + struct Pokemon unk_25b4; + u8 filler_2618[0x74]; u8 unk_268c; u8 unk_268d; u8 unk_268e; @@ -131,11 +140,12 @@ struct PokemonStorageSystemData { u8 unk_4784[0x800]; }; -extern EWRAM_DATA u16 gUnknown_02039760[0x600]; - +extern u16 gUnknown_02039760[0x600]; +extern struct UnkPSSStruct_2002370 *gUnknown_02038478; extern struct PokemonStorageSystemData *const gPokemonStorageSystemPtr; extern u8 *const gUnknown_083B6DB8; +u8 CountPokemonInBoxN(u8 boxId); void sub_8096264(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3); void sub_809634C(u8 curBox); u8 sub_8096368(void); @@ -145,6 +155,7 @@ void sub_80961A8(void); void task_intro_29(u8 whichMenu); void ResetPokemonStorageSystem(void); void sub_8098B48(void); +void sub_8099200(u8 a0); void sub_8099310(void); bool8 sub_8099374(void); void sub_80994A8(s16 a0); -- cgit v1.2.3 From 7cdd2b2a42a96135949e399d1fa3a00c5f56ae67 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 9 Jan 2018 22:08:11 -0500 Subject: through sub_8098E68 --- include/pokemon_storage_system.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 7f16b5d4f..26c1b140d 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -96,12 +96,14 @@ struct PokemonStorageSystemData { s16 unk_0d60; u8 filler_0d62[0x2d2]; struct Sprite *unk_1034; - u32 unk_1038[6]; - u32 unk_1050[30]; + struct Sprite *unk_1038[6]; + struct Sprite *unk_1050[30]; u8 filler_10c8[8]; u16 unk_10d0[40]; u16 unk_1120[40]; - u8 filler_1170[0x78]; + u8 filler_1170[8]; + u16 unk_1178; + u8 filler_117a[0x6e]; u8 *unk_11e8; u32 unk_11ec; u16 unk_11f0; @@ -154,7 +156,7 @@ void sub_8096310(void); void sub_80961A8(void); void task_intro_29(u8 whichMenu); void ResetPokemonStorageSystem(void); -void sub_8098B48(void); +void ResetPSSMonIconSprites(void); void sub_8099200(u8 a0); void sub_8099310(void); bool8 sub_8099374(void); -- cgit v1.2.3 From 4ae149b93441ffce560f3b7018842bc4c5d39326 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 9 Jan 2018 22:52:37 -0500 Subject: through sub_8098EE0 --- include/pokemon_storage_system.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 26c1b140d..295084eea 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -103,7 +103,9 @@ struct PokemonStorageSystemData { u16 unk_1120[40]; u8 filler_1170[8]; u16 unk_1178; - u8 filler_117a[0x6e]; + u8 filler_117a[3]; + u8 unk_117d; + u8 filler_117e[0x6a]; u8 *unk_11e8; u32 unk_11ec; u16 unk_11f0; -- cgit v1.2.3 From cb28e3a679841c01191f19cb7e7f0da28f0bf160 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 9 Jan 2018 23:05:21 -0500 Subject: sub_809900C --- include/pokemon_storage_system.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 295084eea..0f20bfa16 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -101,9 +101,14 @@ struct PokemonStorageSystemData { u8 filler_10c8[8]; u16 unk_10d0[40]; u16 unk_1120[40]; - u8 filler_1170[8]; + u8 filler_1170[2]; + u16 unk_1172; + u16 unk_1174; + s16 unk_1176; u16 unk_1178; - u8 filler_117a[3]; + u8 unk_117a; + u8 unk_117b; + u8 unk_117c; u8 unk_117d; u8 filler_117e[0x6a]; u8 *unk_11e8; -- cgit v1.2.3 From e0726bf8d6af39f287c65ad22ce192988e8468bb Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 10 Jan 2018 20:20:16 -0500 Subject: through sub_8099374 --- include/pokemon_storage_system.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 0f20bfa16..6040e31be 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -96,18 +96,19 @@ struct PokemonStorageSystemData { s16 unk_0d60; u8 filler_0d62[0x2d2]; struct Sprite *unk_1034; - struct Sprite *unk_1038[6]; - struct Sprite *unk_1050[30]; + struct Sprite *unk_1038[6]; // party + struct Sprite *unk_1050[30]; // box u8 filler_10c8[8]; u16 unk_10d0[40]; u16 unk_1120[40]; - u8 filler_1170[2]; + u8 unk_1170; + u8 unk_1171; u16 unk_1172; - u16 unk_1174; + s16 unk_1174; s16 unk_1176; u16 unk_1178; u8 unk_117a; - u8 unk_117b; + s8 unk_117b; u8 unk_117c; u8 unk_117d; u8 filler_117e[0x6a]; @@ -164,7 +165,7 @@ void sub_80961A8(void); void task_intro_29(u8 whichMenu); void ResetPokemonStorageSystem(void); void ResetPSSMonIconSprites(void); -void sub_8099200(u8 a0); +void sub_8099200(bool8 a0); void sub_8099310(void); bool8 sub_8099374(void); void sub_80994A8(s16 a0); -- cgit v1.2.3 From d6464c7c40f5ac1b9da557d5990e2b7e83997720 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 10 Jan 2018 21:53:25 -0500 Subject: through sub_809971C --- include/pokemon_storage_system.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 6040e31be..38a81c2a9 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -98,7 +98,8 @@ struct PokemonStorageSystemData { struct Sprite *unk_1034; struct Sprite *unk_1038[6]; // party struct Sprite *unk_1050[30]; // box - u8 filler_10c8[8]; + struct Sprite **unk_10c8; + u8 filler_10cc[4]; u16 unk_10d0[40]; u16 unk_1120[40]; u8 unk_1170; -- cgit v1.2.3 From a1ccd03edd90601759a04f223c9558181a657728 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 10 Jan 2018 22:08:58 -0500 Subject: Refine struct at 02000028 --- include/pokemon_storage_system.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 38a81c2a9..438af769b 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -50,8 +50,16 @@ struct PSS_MenuStringPtrs { const u8 *desc; }; +struct UnkStruct_2000028 { + void *unk_00; + void *unk_04; + u16 unk_08; + u16 unk_0a; + void (*unk_0c)(struct UnkStruct_2000028 *data); +}; + struct UnkStruct_2000020 { - struct UnkStruct_2000020 *unk_00; + struct UnkStruct_2000028 *unk_00; u8 unk_04; u8 unk_05; }; @@ -78,7 +86,8 @@ struct PokemonStorageSystemData { u16 unk_0008; u16 unk_000a; struct PCScreenEffectStruct unk_000c; - struct UnkStruct_2000020 unk_0020[17]; // refine size later + struct UnkStruct_2000020 unk_0020; + struct UnkStruct_2000028 unk_0028[8]; u16 unk_00a8[0x400]; u16 unk_08a8; u16 unk_08aa; @@ -99,7 +108,7 @@ struct PokemonStorageSystemData { struct Sprite *unk_1038[6]; // party struct Sprite *unk_1050[30]; // box struct Sprite **unk_10c8; - u8 filler_10cc[4]; + struct Sprite **unk_10cc; u16 unk_10d0[40]; u16 unk_1120[40]; u8 unk_1170; @@ -214,7 +223,7 @@ void sub_809CDCC(void); void sub_809CDEC(u8 a0); void sub_809CE84(void); s16 sub_809CF30(void); -void sub_809CFDC(struct UnkStruct_2000020 *a0, struct UnkStruct_2000020 *a1, u8 a2); +void sub_809CFDC(struct UnkStruct_2000020 *a0, struct UnkStruct_2000028 *a1, u8 a2); void sub_809CFF0(void); void sub_809D034(void *dest, u16 dLeft, u16 dTop, const void *src, u16 sLeft, u16 sTop, u16 width, u16 height); void sub_809D104(void *dest, u16 dLeft, u16 dTop, const void *src, u16 sLeft, u16 sTop, u16 width, u16 height); -- cgit v1.2.3 From 7a65953ccc2313db6de0ec061220b1a5f8751b36 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 12 Jan 2018 08:53:01 -0500 Subject: through sub_80999C4 --- include/pokemon_storage_system.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 438af769b..129202934 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -121,7 +121,9 @@ struct PokemonStorageSystemData { s8 unk_117b; u8 unk_117c; u8 unk_117d; - u8 filler_117e[0x6a]; + u8 filler_117e[0x42]; + struct Sprite *unk_11c0; + u8 filler_11c4[0x24]; u8 *unk_11e8; u32 unk_11ec; u16 unk_11f0; -- cgit v1.2.3 From f37add5cfb4bb369ec096d91f62915ee4f88a1d7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 12 Jan 2018 12:13:35 -0500 Subject: through sub_8099D90 --- include/pokemon_storage_system.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 129202934..09b3be60f 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -99,11 +99,26 @@ struct PokemonStorageSystemData { bool8 unk_08b1; s16 unk_08b2; u16 unk_08b4; - u8 filler_08b6[0x4a6]; + u16 unk_08b6; + u16 unk_08b8; + u8 unk_08ba; + u8 unk_08bb; + u16 unk_08bc; + u16 unk_08be; + u16 unk_08c0; + u16 unk_08c2; + u16 unk_08c4; + u16 unk_08c6; + u16 unk_08c8; + u8 unk_08ca[0x400]; + u8 unk_0cca; + u16 unk_0ccc[0x20]; + u8 filler_0d0c[0x50]; u16 unk_0d5c; s16 unk_0d5e; s16 unk_0d60; - u8 filler_0d62[0x2d2]; + u8 unk_0d62[0x2d0]; + u8 unk_1032; struct Sprite *unk_1034; struct Sprite *unk_1038[6]; // party struct Sprite *unk_1050[30]; // box @@ -177,6 +192,9 @@ void sub_80961A8(void); void task_intro_29(u8 whichMenu); void ResetPokemonStorageSystem(void); void ResetPSSMonIconSprites(void); +void SpawnBoxIconSprites(u8 boxId); +u8 get_preferred_box(void); +bool8 sub_80990AC(void); void sub_8099200(bool8 a0); void sub_8099310(void); bool8 sub_8099374(void); -- cgit v1.2.3 From aadd5c8ac07ef5967d8e2cf58fbdd04f79d5b82a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 12 Jan 2018 13:41:32 -0500 Subject: through sub_8099EB0 and relevant data --- include/pokemon_storage_system.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 09b3be60f..cd4dceadf 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -101,7 +101,7 @@ struct PokemonStorageSystemData { u16 unk_08b4; u16 unk_08b6; u16 unk_08b8; - u8 unk_08ba; + bool8 unk_08ba; u8 unk_08bb; u16 unk_08bc; u16 unk_08be; @@ -112,12 +112,13 @@ struct PokemonStorageSystemData { u16 unk_08c8; u8 unk_08ca[0x400]; u8 unk_0cca; - u16 unk_0ccc[0x20]; + u16 unk_0ccc[0x1e]; + u32 unk_0d08; u8 filler_0d0c[0x50]; u16 unk_0d5c; s16 unk_0d5e; s16 unk_0d60; - u8 unk_0d62[0x2d0]; + u16 unk_0d62[360]; u8 unk_1032; struct Sprite *unk_1034; struct Sprite *unk_1038[6]; // party -- cgit v1.2.3 From daa0a98ee0129be1797274de318a35df30d39020 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 13 Jan 2018 20:07:32 -0500 Subject: through sub_809A23C --- include/pokemon_storage_system.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index cd4dceadf..62014e62c 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -112,7 +112,11 @@ struct PokemonStorageSystemData { u16 unk_08c8; u8 unk_08ca[0x400]; u8 unk_0cca; - u16 unk_0ccc[0x1e]; + u16 unk_0ccc[0x10]; + u16 unk_0cec; + u16 unk_0cee; + struct Sprite *unk_0cf0[2]; + u8 filler_0cf8[16]; u32 unk_0d08; u8 filler_0d0c[0x50]; u16 unk_0d5c; -- cgit v1.2.3 From e8daaa0f3ef2d97f7afe378494f33037f5bc8ee9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 14 Jan 2018 18:21:22 -0500 Subject: sub_809A3D0 --- include/pokemon_storage_system.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 62014e62c..85ffeaefe 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -116,7 +116,8 @@ struct PokemonStorageSystemData { u16 unk_0cec; u16 unk_0cee; struct Sprite *unk_0cf0[2]; - u8 filler_0cf8[16]; + struct Sprite *unk_0cf8[2]; + u8 filler_0cd0[8]; u32 unk_0d08; u8 filler_0d0c[0x50]; u16 unk_0d5c; -- cgit v1.2.3 From 5fcd1184d8a189887e44559edb12417717afca5b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 14 Jan 2018 19:10:31 -0500 Subject: through sub_809A860 --- include/pokemon_storage_system.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 85ffeaefe..0131ce18b 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -117,7 +117,7 @@ struct PokemonStorageSystemData { u16 unk_0cee; struct Sprite *unk_0cf0[2]; struct Sprite *unk_0cf8[2]; - u8 filler_0cd0[8]; + struct Sprite *unk_0d00[2]; u32 unk_0d08; u8 filler_0d0c[0x50]; u16 unk_0d5c; @@ -215,7 +215,7 @@ void sub_8099C70(u8 whichBox); bool8 sub_8099D34(void); void sub_8099DCC(u8 a0); bool8 sub_8099E08(void); -void sub_809A860(u8 a0); +void sub_809A860(bool8 a0); void sub_809AA24(void); void sub_809AA98(void); bool8 sub_809AC00(void); -- cgit v1.2.3 From d8091a8fadb1089cbc090772bbb2fbcbab633357 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 14 Jan 2018 21:01:43 -0500 Subject: through sub_809AA98 --- include/pokemon_storage_system.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 0131ce18b..1afed5d1b 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -144,7 +144,9 @@ struct PokemonStorageSystemData { u8 unk_117d; u8 filler_117e[0x42]; struct Sprite *unk_11c0; - u8 filler_11c4[0x24]; + u8 filler_11c4[0x1e]; + u8 unk_11e2; + u8 filler_11e3[5]; u8 *unk_11e8; u32 unk_11ec; u16 unk_11f0; @@ -200,6 +202,7 @@ void ResetPokemonStorageSystem(void); void ResetPSSMonIconSprites(void); void SpawnBoxIconSprites(u8 boxId); u8 get_preferred_box(void); +void sub_8098BF0(void); bool8 sub_80990AC(void); void sub_8099200(bool8 a0); void sub_8099310(void); @@ -208,7 +211,7 @@ void sub_80994A8(s16 a0); void sub_809954C(void); void sub_8099958(void); bool8 sub_8099990(void); -struct Sprite *sub_809A9A0(u16 a0, u16 a1, u8 a2, u8 a3, u8 a4); +struct Sprite *sub_809A9A0(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority); void sub_809BB90(void); void sub_8099BF8(u8 a0); void sub_8099C70(u8 whichBox); -- cgit v1.2.3 From 68528382d5d8a17c5d6d65f1566a9ba7c807e14a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 15:10:56 -0500 Subject: through sub_809AF18 --- include/pokemon_storage_system.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 1afed5d1b..e911664de 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -144,9 +144,21 @@ struct PokemonStorageSystemData { u8 unk_117d; u8 filler_117e[0x42]; struct Sprite *unk_11c0; - u8 filler_11c4[0x1e]; + struct Sprite *unk_11c4; + s32 unk_11c8; + s32 unk_11cc; + s32 unk_11d0; + s32 unk_11d4; + s16 unk_11d8; + s16 unk_11da; + u16 unk_11dc; + s8 unk_11de; + s8 unk_11df; + u8 unk_11e0; + u8 unk_11e1; u8 unk_11e2; - u8 filler_11e3[5]; + u8 unk_11e3; + u8 filler_11e4[4]; u8 *unk_11e8; u32 unk_11ec; u16 unk_11f0; -- cgit v1.2.3 From 650f85e7db8ea123256d661a7db59c9325115130 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 15:46:17 -0500 Subject: through sub_809B130 --- include/pokemon_storage_system.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index e911664de..3191b841c 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -172,7 +172,9 @@ struct PokemonStorageSystemData { u8 unk_120f[0x25]; u8 unk_1234[0x25]; u8 unk_1259[0x21]; - u8 unk_127a[0x32]; + u8 unk_127a[0x2a]; + bool8 (*unk_12a4)(void); + u8 unk_12a8; struct Sprite *unk_12ac; struct Sprite *unk_12b0[2]; u16 *unk_12b8; -- cgit v1.2.3 From 66fe535e7f5f0466c15f5f82dd1c2823fc6110cf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 16:16:25 -0500 Subject: through sub_809B24C --- include/pokemon_storage_system.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 3191b841c..a2b5964d4 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -175,6 +175,7 @@ struct PokemonStorageSystemData { u8 unk_127a[0x2a]; bool8 (*unk_12a4)(void); u8 unk_12a8; + u8 unk_12a9; struct Sprite *unk_12ac; struct Sprite *unk_12b0[2]; u16 *unk_12b8; @@ -223,10 +224,11 @@ void sub_8099310(void); bool8 sub_8099374(void); void sub_80994A8(s16 a0); void sub_809954C(void); +void sub_80996B0(u8 a0, u8 a1); +bool8 sub_809971C(void); void sub_8099958(void); bool8 sub_8099990(void); struct Sprite *sub_809A9A0(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority); -void sub_809BB90(void); void sub_8099BF8(u8 a0); void sub_8099C70(u8 whichBox); bool8 sub_8099D34(void); @@ -252,6 +254,7 @@ void sub_809B760(void); void sub_809B7AC(void); void sub_809B7D4(void); s8 sub_809B960(void); +void sub_809BB90(void); void sub_809BBC0(void); void sub_809BC18(void); void sub_809BD14(void); -- cgit v1.2.3 From e3238abc63ac7e939ccdc58e555a9dcdc66f3525 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 16:54:02 -0500 Subject: through sub_809B44C --- include/pokemon_storage_system.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index a2b5964d4..eefea4ec8 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -224,6 +224,8 @@ void sub_8099310(void); bool8 sub_8099374(void); void sub_80994A8(s16 a0); void sub_809954C(void); +void sub_8099584(u8 a0, u8 a1); +void sub_809960C(u8 a0, u8 a1); void sub_80996B0(u8 a0, u8 a1); bool8 sub_809971C(void); void sub_8099958(void); -- cgit v1.2.3 From 08a108f432325d6501f3c6473a6d43265af0d5b7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 17:14:39 -0500 Subject: through diegohint1 --- include/pokemon_storage_system.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index eefea4ec8..7960213ae 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -182,7 +182,8 @@ struct PokemonStorageSystemData { struct PokemonMarkMenu unk_12bc; struct UnkPSSStruct_2002370 unk_2370; struct Pokemon unk_25b4; - u8 filler_2618[0x74]; + struct Pokemon unk_2618; + u8 filler_267c[0x10]; u8 unk_268c; u8 unk_268d; u8 unk_268e; -- cgit v1.2.3 From 7b45766d0765d42d7326a7f6cdb21a54d386117e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 19:32:02 -0500 Subject: through sub_809B7D4 --- include/pokemon_storage_system.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 7960213ae..b0aa8cb47 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -183,7 +183,16 @@ struct PokemonStorageSystemData { struct UnkPSSStruct_2002370 unk_2370; struct Pokemon unk_25b4; struct Pokemon unk_2618; - u8 filler_267c[0x10]; + s8 unk_267c; + u8 unk_267d; + u8 unk_267e; + u8 unk_267f; + u8 unk_2680; + u8 unk_2681; + s8 unk_2682; + s8 unk_2683; + u16 unk_2684; + u16 unk_2686[3]; u8 unk_268c; u8 unk_268d; u8 unk_268e; @@ -206,6 +215,7 @@ extern struct UnkPSSStruct_2002370 *gUnknown_02038478; extern struct PokemonStorageSystemData *const gPokemonStorageSystemPtr; extern u8 *const gUnknown_083B6DB8; +s16 GetIndexOfFirstEmptySpaceInBoxN(u8 boxId); u8 CountPokemonInBoxN(u8 boxId); void sub_8096264(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3); void sub_809634C(u8 curBox); @@ -219,16 +229,22 @@ void ResetPSSMonIconSprites(void); void SpawnBoxIconSprites(u8 boxId); u8 get_preferred_box(void); void sub_8098BF0(void); +void sub_8098D20(u8 monId); bool8 sub_80990AC(void); void sub_8099200(bool8 a0); void sub_8099310(void); bool8 sub_8099374(void); +void sub_8099480(void); void sub_80994A8(s16 a0); +void sub_8099520(u8 a0); void sub_809954C(void); void sub_8099584(u8 a0, u8 a1); void sub_809960C(u8 a0, u8 a1); void sub_80996B0(u8 a0, u8 a1); bool8 sub_809971C(void); +void sub_809981C(u8 mode, u8 idx); +bool8 sub_80998D8(void); +void sub_8099920(void); void sub_8099958(void); bool8 sub_8099990(void); struct Sprite *sub_809A9A0(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority); -- cgit v1.2.3 From 7a2eef97c35e4672bd17bfca86a6ea19d22a3eba Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 20:34:56 -0500 Subject: sub_809B960 --- include/pokemon_storage_system.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index b0aa8cb47..8e50cc8d0 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -183,12 +183,12 @@ struct PokemonStorageSystemData { struct UnkPSSStruct_2002370 unk_2370; struct Pokemon unk_25b4; struct Pokemon unk_2618; - s8 unk_267c; + u8 unk_267c; u8 unk_267d; u8 unk_267e; u8 unk_267f; - u8 unk_2680; - u8 unk_2681; + s8 unk_2680; + s8 unk_2681; s8 unk_2682; s8 unk_2683; u16 unk_2684; -- cgit v1.2.3 From 102515325993caef0d57082cd7d8db69335b665b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 21:11:01 -0500 Subject: through party_compaction --- include/pokemon_storage_system.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 8e50cc8d0..f8d288ff0 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -196,7 +196,10 @@ struct PokemonStorageSystemData { u8 unk_268c; u8 unk_268d; u8 unk_268e; - struct Pokemon *unk_2690; + union { + struct Pokemon *pokemon; + struct BoxPokemon *box; + } unk_2690; u8 unk_2694[18]; u8 unk_26a6[62]; u8 unk_26e4[0x16]; @@ -215,6 +218,7 @@ extern struct UnkPSSStruct_2002370 *gUnknown_02038478; extern struct PokemonStorageSystemData *const gPokemonStorageSystemPtr; extern u8 *const gUnknown_083B6DB8; +u8 StorageSystemGetPartySize(void); s16 GetIndexOfFirstEmptySpaceInBoxN(u8 boxId); u8 CountPokemonInBoxN(u8 boxId); void sub_8096264(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3); @@ -277,7 +281,7 @@ void sub_809BB90(void); void sub_809BBC0(void); void sub_809BC18(void); void sub_809BD14(void); -void party_compaction(void); +s16 party_compaction(void); void sub_809BDD8(u8 markings); bool8 sub_809BE80(void); bool8 sub_809BEBC(void); -- cgit v1.2.3 From 40d8fee1d0badb81120cad7a5aabfd8f5b0031d8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 21:59:56 -0500 Subject: through sub_809BF48 --- include/pokemon_storage_system.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index f8d288ff0..8dd51259c 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -220,6 +220,7 @@ extern u8 *const gUnknown_083B6DB8; u8 StorageSystemGetPartySize(void); s16 GetIndexOfFirstEmptySpaceInBoxN(u8 boxId); +u8 CountAlivePartyMonsExceptOne(u8 toSkip); u8 CountPokemonInBoxN(u8 boxId); void sub_8096264(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3); void sub_809634C(u8 curBox); -- cgit v1.2.3 From c4bae7a571f5aea6785e108089e904f9dad67701 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 15 Jan 2018 22:45:08 -0500 Subject: sub_809C04C --- include/pokemon_storage_system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/pokemon_storage_system.h') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 8dd51259c..5319b7a2d 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -159,7 +159,7 @@ struct PokemonStorageSystemData { u8 unk_11e2; u8 unk_11e3; u8 filler_11e4[4]; - u8 *unk_11e8; + const u8 *unk_11e8; u32 unk_11ec; u16 unk_11f0; u16 unk_11f2; -- cgit v1.2.3