From e4a84faabf3f4e2f005e55a88babce7e8ae49c58 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 6 Jan 2018 10:49:52 -0500 Subject: through unref_sub_8095C60 --- include/decoration.h | 5 ----- include/pokemon.h | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/decoration.h b/include/decoration.h index 972e82faf..3d619a598 100644 --- a/include/decoration.h +++ b/include/decoration.h @@ -127,10 +127,6 @@ extern u8 gUnknown_020388F5; extern u8 gUnknown_020388F6; extern u8 gUnknown_020388D6[16]; extern u8 gUnknown_020388E6[12]; -extern u16 gSpecialVar_0x8004; -extern u16 gSpecialVar_0x8005; -extern u16 gSpecialVar_0x8006; -extern u16 gSpecialVar_0x8007; extern u16 gUnknown_020391A4; extern u16 gUnknown_020391A6; extern u8 gUnknown_020391A8; @@ -161,7 +157,6 @@ extern const struct YesNoFuncTable gUnknown_083ECAA0; extern u8 sub_8134194(u8); // src/decoration_inventory extern bool8 sub_81341D4(void); // src/decoration_inventory extern void sub_8134104(u8); // src/decoration_inventory -extern bool8 sub_807D770(void); extern void sub_8109DAC(u8); // src/trader extern void ReshowPlayerPC(u8); // src/player_pc void Task_SecretBasePC_Decoration(u8); diff --git a/include/pokemon.h b/include/pokemon.h index a1c30f1f3..89599d994 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -418,10 +418,10 @@ struct BattleMove struct PokemonStorage { - /*0x00*/ u8 currentBox; - /*0x01*/ struct BoxPokemon boxes[14][30]; - u8 boxNames[14][9]; - u8 unkArray[14]; + /*0x0000*/ u8 currentBox; + /*0x0004*/ struct BoxPokemon boxes[14][30]; + /*0x8344*/ u8 boxNames[14][9]; + /*0x83c2*/ u8 unkArray[14]; }; struct SpindaSpot -- cgit v1.2.3 From 4db981200c1d011c370a45d123c31b397b7d62cc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 6 Jan 2018 11:54:46 -0500 Subject: nonmatching unref_sub_8095D08 --- include/gba/macro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/gba/macro.h b/include/gba/macro.h index d9e6739b3..540e08375 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -105,7 +105,7 @@ #define DmaClearLarge(dmaNum, dest, size, block, bit) \ { \ - const void *_dest = dest; \ + void *_dest = dest; \ u32 _size = size; \ while (1) \ { \ -- cgit v1.2.3 From 666654ff6dcec5916a7eac8425a5ddaae3be1a0e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 6 Jan 2018 16:04:53 -0500 Subject: through ResetPokemonStorageSystem --- include/decoration.h | 1 - include/pokemon.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/decoration.h b/include/decoration.h index 3d619a598..4ac26998e 100644 --- a/include/decoration.h +++ b/include/decoration.h @@ -133,7 +133,6 @@ extern u8 gUnknown_020391A8; extern u8 gUnknown_020391A9; extern u8 gUnknown_020391AA; extern u8 gUnknown_02039234; -extern void (*gFieldCallback)(void); extern const struct YesNoFuncTable gUnknown_083EC96C[]; extern struct UnkStruct_020391B4 gUnknown_020391B4[16]; diff --git a/include/pokemon.h b/include/pokemon.h index 89599d994..7edd3395f 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -421,7 +421,7 @@ struct PokemonStorage /*0x0000*/ u8 currentBox; /*0x0004*/ struct BoxPokemon boxes[14][30]; /*0x8344*/ u8 boxNames[14][9]; - /*0x83c2*/ u8 unkArray[14]; + /*0x83c2*/ u8 wallpaper[14]; }; struct SpindaSpot -- cgit v1.2.3 From 92fa7570b99d216f75becbd362a124a12cc1dcde Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 7 Jan 2018 18:44:14 -0500 Subject: through task_intro_29 --- include/ewram.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/ewram.h b/include/ewram.h index 5a350840a..9a281368f 100755 --- a/include/ewram.h +++ b/include/ewram.h @@ -28,6 +28,7 @@ extern u8 gSharedMem[]; #define ewram0_9(i) (u8 *)(ewram_addr + (i * 0x20)) #define ewram0_10 (*(struct UnknownPokenav0*)(gSharedMem + 0)) #define ewram0_11 (*(struct UnknownPokenav0_1*)(gSharedMem + 0)) +#define ePokemonStorageSystem (*(struct PokemonStorageSystemData *)(gSharedMem + 0)) #define ewram4 (*(struct UnknownStruct8 *)(gSharedMem + 0x4)) #define ewram520 ((struct UnknownStruct7 *)(gSharedMem + 0x00520)) #define ewram520_2 (u8 *)(ewram_addr + 0x520) -- cgit v1.2.3 From b9ad9b3ad547b200e66b293169acbbfe4f50f76d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 7 Jan 2018 19:20:15 -0500 Subject: through sub_8096874 --- include/main.h | 2 ++ include/sprite.h | 1 + 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/main.h b/include/main.h index ff9bb89c7..78403225e 100644 --- a/include/main.h +++ b/include/main.h @@ -51,6 +51,8 @@ extern bool8 gLinkVSyncDisabled; extern const u8 gGameVersion; extern const u8 gGameLanguage; +extern u16 gKeyRepeatStartDelay; + void AgbMain(void); void SetMainCallback2(MainCallback callback); void InitKeys(void); diff --git a/include/sprite.h b/include/sprite.h index b72c09989..3ad418356 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -235,6 +235,7 @@ extern const union AffineAnimCmd *const gDummySpriteAffineAnimTable[]; extern s16 gSpriteCoordOffsetX; extern s16 gSpriteCoordOffsetY; extern u8 gReservedSpritePaletteCount; +extern u16 gReservedSpriteTileCount; extern u8 gOamLimit; -- cgit v1.2.3 From bfeaa80fcd9409645325c2f7ae94850f970fbb58 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 7 Jan 2018 19:47:59 -0500 Subject: through sub_8096884 --- include/mon_markings.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/mon_markings.h (limited to 'include') diff --git a/include/mon_markings.h b/include/mon_markings.h new file mode 100644 index 000000000..a2b0ac821 --- /dev/null +++ b/include/mon_markings.h @@ -0,0 +1,26 @@ +#ifndef POKERUBY_MON_MARKINGS_H +#define POKERUBY_MON_MARKINGS_H + +struct PokemonMarkMenu +{ + /*0x0000*/ u16 baseTileTag; + /*0x0002*/ u16 basePaletteTag; + /*0x0004*/ u8 markings; // bit flags + /*0x0005*/ s8 cursorPos; + /*0x0006*/ bool8 markingsArray[4]; + /*0x000A*/ u8 cursorBaseY; + /*0x000B*/ bool8 spriteSheetLoadRequired; + /*0x000C*/ struct Sprite *menuWindowSprites[2]; // upper and lower halves of menu window + /*0x0014*/ struct Sprite *menuMarkingSprites[4]; + /*0x0024*/ struct Sprite *menuTextSprite; + /*0x0028*/ const u8 *frameTiles; + /*0x002C*/ const u16 *framePalette; + /*0x0030*/ u8 menuWindowSpriteTiles[0x1000]; + /*0x1030*/ u8 filler1030[0x80]; + /*0x10B0*/ u8 tileLoadState; +}; + +void sub_80F7404(void); +void sub_80F727C(struct PokemonMarkMenu *ptr); + +#endif //POKERUBY_MON_MARKINGS_H -- cgit v1.2.3 From ceebbe19918520c65ed9bdcd79d4ae5fbb669d88 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 7 Jan 2018 22:03:21 -0500 Subject: through sub_8096BE0 --- include/mon_markings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/mon_markings.h b/include/mon_markings.h index a2b0ac821..eae80861a 100644 --- a/include/mon_markings.h +++ b/include/mon_markings.h @@ -18,7 +18,7 @@ struct PokemonMarkMenu /*0x0030*/ u8 menuWindowSpriteTiles[0x1000]; /*0x1030*/ u8 filler1030[0x80]; /*0x10B0*/ u8 tileLoadState; -}; +}; // 10b4 void sub_80F7404(void); void sub_80F727C(struct PokemonMarkMenu *ptr); -- cgit v1.2.3 From 02fea36a2e43523c9e9401897ac2fdbeb37ed3d4 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 7 Jan 2018 22:25:16 -0500 Subject: through sub_8096C68 --- include/pc_screen_effect.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/pc_screen_effect.h (limited to 'include') diff --git a/include/pc_screen_effect.h b/include/pc_screen_effect.h new file mode 100644 index 000000000..a791fc66f --- /dev/null +++ b/include/pc_screen_effect.h @@ -0,0 +1,19 @@ +#ifndef POKERUBY_PC_SCREEN_EFFECT_H +#define POKERUBY_PC_SCREEN_EFFECT_H + +struct PCScreenEffectStruct +{ + /*0x00*/ u16 tileTag; + /*0x02*/ u16 paletteTag; + /*0x04*/ u16 unk04; + /*0x06*/ u16 unk06; + /*0x08*/ u16 unk08; + /*0x0A*/ u16 unk0A; + /*0x0C*/ s16 unk0C; + /*0x10*/ u32 selectedPalettes; +}; + +void sub_80C5CD4(struct PCScreenEffectStruct *unkStruct); +bool8 sub_80C5DCC(void); + +#endif //POKERUBY_PC_SCREEN_EFFECT_H -- cgit v1.2.3 From 78df16e7989be5142ed0d1fd01c4ece6483f0571 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 8 Jan 2018 14:57:26 -0700 Subject: Through sub_809746C; enums for PC storage actions --- include/ewram.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/ewram.h b/include/ewram.h index 19e05134f..d8ebd71ec 100755 --- a/include/ewram.h +++ b/include/ewram.h @@ -39,10 +39,6 @@ extern u8 gSharedMem[]; #define ewram01000 (*(struct Unk2001000 *)(gSharedMem + 0x1000)) #define ewramBerryPicTemp (gSharedMem + 0x1000) #define EWRAM_1000 (*(struct Struct2001000 *)(gSharedMem + 0x1000)) -#define gUnk20011fa (u8 *)(&gSharedMem[0x11FA]) -#define gUnk2002694 (u8 *)(&gSharedMem[0x2694]) -#define gUnk20026A6 (u8 *)(&gSharedMem[0x26A6]) -#define gUnk20026e4 (u8 *)(&gSharedMem[0x26E4]) #define ewram4000 (gSharedMem + 0x4000) #define gUnknown_02007000 (*(ewramStruct_02007000 *)(gSharedMem + 0x7000)) #define ARRAY_2007800 ((struct EasyChatPair *)(gSharedMem + 0x7800)) -- cgit v1.2.3 From 660fa0c0f38a684eda6c117958447deacac88820 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 8 Jan 2018 15:37:05 -0700 Subject: through sub_8097858 --- include/mon_markings.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mon_markings.h b/include/mon_markings.h index eae80861a..3b4aa333c 100644 --- a/include/mon_markings.h +++ b/include/mon_markings.h @@ -20,7 +20,10 @@ struct PokemonMarkMenu /*0x10B0*/ u8 tileLoadState; }; // 10b4 -void sub_80F7404(void); void sub_80F727C(struct PokemonMarkMenu *ptr); +void sub_80F7404(void); +void sub_80F7418(u8 markings, s16 x, s16 y); +void sub_80F7470(void); +bool8 sub_80F7500(void); #endif //POKERUBY_MON_MARKINGS_H -- cgit v1.2.3 From e2ff8b73c7e17777be8c4065a93e8727768bb914 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 8 Jan 2018 22:05:43 -0500 Subject: through sub_8097BA0; fix calls to pc_screen_effect from scene/hall_of_fame --- include/ewram.h | 1 + include/pc_screen_effect.h | 2 ++ 2 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/ewram.h b/include/ewram.h index f24f089f6..3f627878f 100755 --- a/include/ewram.h +++ b/include/ewram.h @@ -241,6 +241,7 @@ extern u8 gSharedMem[]; #define ewram1C000 (*(struct Unk201C000 *)(gSharedMem + 0x1C000)) #define ewram1c000 (*(struct Unk201C000 *)(gSharedMem + 0x1C000)) // FIXME, names too similar #define eHallOfFameMons1 (struct HallofFameMons*)(&gSharedMem[0x1C000]) +#define eHOFPCScreenEffect (*(struct PCScreenEffectStruct *)(gSharedMem + 0x1c000)) #define EWRAM_1C800 (*(struct Unk201C800 *)(gSharedMem + 0x1C800)) #define ewram1D000 ((struct Pokemon *)(gSharedMem + 0x1D000)) #define ewram1D000_2 ((u16 *)(gSharedMem + 0x1D000)) diff --git a/include/pc_screen_effect.h b/include/pc_screen_effect.h index a791fc66f..36661bc3b 100644 --- a/include/pc_screen_effect.h +++ b/include/pc_screen_effect.h @@ -15,5 +15,7 @@ struct PCScreenEffectStruct void sub_80C5CD4(struct PCScreenEffectStruct *unkStruct); bool8 sub_80C5DCC(void); +void sub_80C5E38(struct PCScreenEffectStruct *unkStruct); +bool8 sub_80C5F98(void); #endif //POKERUBY_PC_SCREEN_EFFECT_H -- cgit v1.2.3 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/graphics.h | 5 ++ include/pokemon_storage_system.h | 120 +++++++++++++++++++++++++++++++++++++++ include/text.h | 2 + 3 files changed, 127 insertions(+) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index 00a210350..91ba45acd 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2743,4 +2743,9 @@ extern const u16 gCableCar_Pal[]; extern const u16 gCableCarBG_Pal[]; extern const u8 gCableCarBG_Gfx[]; +extern const u8 gPSSMenuHeader_Gfx[]; +extern const u8 gPSSMenuHeader_Tilemap[]; +extern const u16 gPSSMenu1_Pal[]; +extern const u16 gPSSMenu2_Pal[]; + #endif // GUARD_GRAPHICS_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 diff --git a/include/text.h b/include/text.h index ebc4ebe7e..281a0535a 100644 --- a/include/text.h +++ b/include/text.h @@ -253,4 +253,6 @@ void StripExtCtrlCodes(u8 *str); s32 StringCompareWithoutExtCtrlCodes(const u8 *str1, const u8 *str2); u8 sub_8004FD0(struct Window *win, u8 *dest, const u8 *src, u16 tileDataStartOffset, u8 left, u16 top, u8 width, u32 a8); +extern const u16 gUnknownPalette_81E6692[]; + #endif // GUARD_TEXT_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/mon_markings.h | 1 + include/pokemon_storage_system.h | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/mon_markings.h b/include/mon_markings.h index 3b4aa333c..5b6abf356 100644 --- a/include/mon_markings.h +++ b/include/mon_markings.h @@ -25,5 +25,6 @@ void sub_80F7404(void); void sub_80F7418(u8 markings, s16 x, s16 y); void sub_80F7470(void); bool8 sub_80F7500(void); +struct Sprite *sub_80F7940(u16 tileTag, u16 paletteTag, const u16 *palette); #endif //POKERUBY_MON_MARKINGS_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/mon_markings.h | 1 + include/pokemon_storage_system.h | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mon_markings.h b/include/mon_markings.h index 5b6abf356..d06264865 100644 --- a/include/mon_markings.h +++ b/include/mon_markings.h @@ -26,5 +26,6 @@ void sub_80F7418(u8 markings, s16 x, s16 y); void sub_80F7470(void); bool8 sub_80F7500(void); struct Sprite *sub_80F7940(u16 tileTag, u16 paletteTag, const u16 *palette); +void sub_80F7A10(u8 markings, void *dest); #endif //POKERUBY_MON_MARKINGS_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/graphics.h | 4 ++++ include/pokemon_storage_system.h | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index 91ba45acd..a8ac2783d 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2747,5 +2747,9 @@ extern const u8 gPSSMenuHeader_Gfx[]; extern const u8 gPSSMenuHeader_Tilemap[]; extern const u16 gPSSMenu1_Pal[]; extern const u16 gPSSMenu2_Pal[]; +extern const u8 gPSSMenuMisc_Gfx[]; +extern const u8 gPSSMenuMisc_Tilemap[]; +extern const u16 gPSSMenu3_Pal[]; +extern const u16 gPSSMenu4_Pal[]; #endif // GUARD_GRAPHICS_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.h | 2 +- include/pokemon_storage_system.h | 55 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/pokemon.h b/include/pokemon.h index fd1709320..af65599f8 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -627,6 +627,6 @@ void RandomlyGivePartyPokerus(struct Pokemon *party); void PartySpreadPokerus(struct Pokemon *party); struct Sprite *sub_80F7920(u16, u16, const u16 *); - +void BoxMonRestorePP(struct BoxPokemon *); #endif // GUARD_POKEMON_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') 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') 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') 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') 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') 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') 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') 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') 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 12ec094b4b3641cf33fc1cf45634090e067c70b6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 12 Jan 2018 09:46:31 -0500 Subject: Remaining functions and data in pss3 --- include/pokemon_icon.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 7e26c1c9b..a1a965d81 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -1,6 +1,9 @@ #ifndef GUARD_POKEMON_ICON_H #define GUARD_POKEMON_ICON_H +extern const u8 * const gMonIconTable[]; +extern const u8 gMonIconPaletteIndices[]; + u8 CreateMonIcon(u16 species, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority, u32 personality); u8 UpdateMonIconFrame(struct Sprite *sprite); u8 sub_809D3A4(u16 arg0, void (*)(struct Sprite *), int, u8 arg3, u32 arg4); @@ -12,5 +15,6 @@ void sub_809D580(u16); void sub_809D608(u16); void sub_809D62C(struct Sprite *sprite); void sub_809D824(struct Sprite *sprite, u8 animNum); +u16 mon_icon_convert_unown_species_id(u16 species, u32 personality); #endif // GUARD_POKEMON_ICON_H -- 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') 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') 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') 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') 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') 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') 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') 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') 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') 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') 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.h | 2 +- include/pokemon_storage_system.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/pokemon.h b/include/pokemon.h index 8624270f1..47d6bcfc7 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -522,7 +522,7 @@ void sub_803ADE8(struct Pokemon *mon, struct UnknownPokemonStruct *src); void sub_803AF78(struct Pokemon *mon, struct UnknownPokemonStruct *dest); u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon); void CalculateMonStats(struct Pokemon *mon); -void sub_803B4B4(const struct BoxPokemon *src, struct Pokemon *dest); +void ExpandBoxMon(const struct BoxPokemon *src, struct Pokemon *dest); u8 GetLevelFromMonExp(struct Pokemon *mon); u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon); u16 GiveMoveToMon(struct Pokemon *mon, u16 move); 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') 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') 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') 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') 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') 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 From 58928acf41b3ed7fc9f7de12db2aad27de744203 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 30 Jan 2018 20:13:43 -0800 Subject: Use standard naming convention for pc_screen_effect.h guard --- include/pc_screen_effect.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/pc_screen_effect.h b/include/pc_screen_effect.h index 36661bc3b..d3f6d22de 100644 --- a/include/pc_screen_effect.h +++ b/include/pc_screen_effect.h @@ -1,5 +1,5 @@ -#ifndef POKERUBY_PC_SCREEN_EFFECT_H -#define POKERUBY_PC_SCREEN_EFFECT_H +#ifndef GUARD_PC_SCREEN_EFFECT_H +#define GUARD_PC_SCREEN_EFFECT_H struct PCScreenEffectStruct { @@ -18,4 +18,4 @@ bool8 sub_80C5DCC(void); void sub_80C5E38(struct PCScreenEffectStruct *unkStruct); bool8 sub_80C5F98(void); -#endif //POKERUBY_PC_SCREEN_EFFECT_H +#endif //GUARD_PC_SCREEN_EFFECT_H -- cgit v1.2.3