From d2b0f36b7daa93d0708f19db347ad2befe2a4f07 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 11 Mar 2020 09:55:45 -0400 Subject: Port PSS utility functions --- 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 c636651f3..9ac9eff5d 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -8,10 +8,10 @@ u8 *GetBoxNamePtr(u8 boxNumber); struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 monPosition); -void SetBoxMonNickFromAnyBox(u8 boxId, u8 monPosition, u8 * newNick); +void SetBoxMonNickAt(u8 boxId, u8 monPosition, const u8 *newNick); void CompactPartySlots(void); -u32 GetBoxMonDataFromAnyBox(u8 boxId, u8 monPosition, u32 request); -void sub_808BCB4(u8 boxId, u8 monPosition); +u32 GetBoxMonDataAt(u8 boxId, u8 monPosition, s32 request); +void ZeroBoxMonAt(u8 boxId, u8 monPosition); void sub_808CE60(void); void ResetPokemonStorageSystem(void); u8 StorageGetCurrentBox(void); -- cgit v1.2.3 From 3aeb294572174d1f927286d507d15cda04e58601 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 11 Mar 2020 13:32:30 -0400 Subject: Port pokemon_storage_2 from emerald --- include/constants/pokemon.h | 1 + include/pokemon.h | 2 +- include/pokemon_storage_system.h | 8 +++++++- include/string_util.h | 4 ++-- include/strings.h | 15 +++++++++++++++ 5 files changed, 26 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index a8009f1ff..bc02bffdd 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -212,5 +212,6 @@ #define MAX_TOTAL_EVS 510 #define UNOWN_FORM_COUNT 28 #define MAX_MON_LEVEL 100 +#define BOX_NAME_LENGTH 8 #endif // GUARD_CONSTANTS_POKEMON_H diff --git a/include/pokemon.h b/include/pokemon.h index be0a35877..3cefcfcf2 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -126,7 +126,7 @@ struct PokemonStorage { /*0x0000*/ u8 currentBox; /*0x0001*/ struct BoxPokemon boxes[14][30]; - /*0x8344*/ u8 boxNames[14][9]; + /*0x8344*/ u8 boxNames[14][BOX_NAME_LENGTH + 1]; /*0x83C2*/ u8 boxWallpapers[14]; }; diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 9ac9eff5d..3c29dd9fd 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -15,6 +15,12 @@ void ZeroBoxMonAt(u8 boxId, u8 monPosition); void sub_808CE60(void); void ResetPokemonStorageSystem(void); u8 StorageGetCurrentBox(void); -void PSS_RenderTextToVramViaBuffer(const u8 *name, u8 *a1, u8 a2, u8 a3, u8 *buffer, u8 a5); +void DrawTextWindowAndBufferTiles(const u8 *name, void *a1, u8 a2, u8 a3, u8 *buffer, s32 a5); +void SetCurrentBox(u8 boxId); +void SetBoxWallpaper(u8 boxId, u8 wallpaperId); +struct Sprite *sub_809223C(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority); + +void Cb2_EnterPSS(u8 a0); +u8 GetCurrentBoxOption(void); #endif // GUARD_POKEMON_STORAGE_SYSTEM_H diff --git a/include/string_util.h b/include/string_util.h index 32e74e031..45adac78d 100644 --- a/include/string_util.h +++ b/include/string_util.h @@ -30,8 +30,8 @@ u8 *GetExpandedPlaceholder(u32 id); u8 *StringFill(u8 *dest, u8 c, u16 n); u8 *StringCopyPadded(u8 *dest, const u8 *src, u8 c, u16 n); u8 *StringFillWithTerminator(u8 *dest, u16 n); -u8 *StringCopyN_Multibyte(u8 *dest, u8 *src, u32 n); -u32 StringLength_Multibyte(u8 *str); +u8 *StringCopyN_Multibyte(u8 *dest, const u8 *src, u32 n); +u32 StringLength_Multibyte(const u8 *str); u8 *WriteColorChangeControlCode(u8 *dest, u32 colorType, u8 color); bool32 IsStringJapanese(u8 *str); bool32 sub_800924C(u8 *str, s32 n); diff --git a/include/strings.h b/include/strings.h index be3555780..06851c983 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1358,4 +1358,19 @@ extern const u8 gText_BoxName[]; extern const u8 gText_PkmnsNickname[]; extern const u8 gText_RivalsName[]; +// pokemon_storage_system +extern const u8 gText_WithdrawPokemon[]; +extern const u8 gText_WithdrawMonDescription[]; +extern const u8 gText_DepositPokemon[]; +extern const u8 gText_DepositMonDescription[]; +extern const u8 gText_MovePokemon[]; +extern const u8 gText_MoveMonDescription[]; +extern const u8 gText_MoveItems[]; +extern const u8 gText_MoveItemsDescription[]; +extern const u8 gText_SeeYa[]; +extern const u8 gText_SeeYaDescription[]; +extern const u8 gText_PartyFull[]; +extern const u8 gText_JustOnePkmn[]; +extern const u8 gText_Box[]; + #endif //GUARD_STRINGS_H -- cgit v1.2.3 From 6b4b6a54af99da1e1f6439a58285038a5fd11604 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 11 Mar 2020 14:21:43 -0400 Subject: Make sub_808BDE8 call signature more sane --- include/pokemon_storage_system.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 3c29dd9fd..b54c0cd68 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -6,6 +6,27 @@ #define TOTAL_BOXES_COUNT 14 #define IN_BOX_COUNT 30 +enum +{ + WALLPAPER_FOREST, + WALLPAPER_CITY, + WALLPAPER_DESERT, + WALLPAPER_SAVANNA, + WALLPAPER_CRAG, + WALLPAPER_VOLCANO, + WALLPAPER_SNOW, + WALLPAPER_CAVE, + WALLPAPER_BEACH, + WALLPAPER_SEAFLOOR, + WALLPAPER_RIVER, + WALLPAPER_SKY, + WALLPAPER_POLKADOT, + WALLPAPER_POKECENTER, + WALLPAPER_MACHINE, + WALLPAPER_PLAIN, + WALLPAPER_COUNT +}; + u8 *GetBoxNamePtr(u8 boxNumber); struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 monPosition); void SetBoxMonNickAt(u8 boxId, u8 monPosition, const u8 *newNick); -- cgit v1.2.3 From 5422315db5069ba93ddfea39a705122751db2a6d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 11 Mar 2020 17:03:57 -0400 Subject: through sub_808CF10 --- include/box_party_pokemon_dropdown.h | 6 +- include/pokemon_storage_system.h | 2 +- include/pokemon_storage_system_internal.h | 226 ++++++++++++++++++++++++++++++ include/sprite.h | 1 + 4 files changed, 231 insertions(+), 4 deletions(-) create mode 100644 include/pokemon_storage_system_internal.h (limited to 'include') diff --git a/include/box_party_pokemon_dropdown.h b/include/box_party_pokemon_dropdown.h index e1ca7256f..c2df93f1e 100644 --- a/include/box_party_pokemon_dropdown.h +++ b/include/box_party_pokemon_dropdown.h @@ -1,12 +1,12 @@ #ifndef GUARD_BOX_PARTY_POKEMON_DROPDOWN_H #define GUARD_BOX_PARTY_POKEMON_DROPDOWN_H -void sub_80F7AD8(u8 num); +void AllocBoxPartyPokemonDropdowns(u8 num); void sub_80F7B2C(void); void sub_80F7B40(void); -void sub_80F7B80(u8 a0, u8 a1, const void * a2, u16 a3, u16 a4); +void SetBoxPartyPokemonDropdownMap2(u8 idx, u8 bgId, const void * src, u16 width, u16 height); void sub_80F7C7C(u8 a0, const void * a1); -void sub_80F7CAC(u8 a0, u16 a1, u16 a2); +void SetBoxPartyPokemonDropdownMap2Pos(u8 idx, u16 x, u16 y); void sub_80F7CE8(u8 a0, u16 a1, u16 a2, u16 a3, u16 a4); void sub_80F7D30(u8 a0, u8 a1, s8 a2); void sub_80F7E54(u8 a0); diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index b54c0cd68..6ded8983c 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -33,7 +33,7 @@ void SetBoxMonNickAt(u8 boxId, u8 monPosition, const u8 *newNick); void CompactPartySlots(void); u32 GetBoxMonDataAt(u8 boxId, u8 monPosition, s32 request); void ZeroBoxMonAt(u8 boxId, u8 monPosition); -void sub_808CE60(void); +void Cb2_ReturnToPSS(void); void ResetPokemonStorageSystem(void); u8 StorageGetCurrentBox(void); void DrawTextWindowAndBufferTiles(const u8 *name, void *a1, u8 a2, u8 a3, u8 *buffer, s32 a5); diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h new file mode 100644 index 000000000..6171d9137 --- /dev/null +++ b/include/pokemon_storage_system_internal.h @@ -0,0 +1,226 @@ +#ifndef GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H +#define GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H + +#include "pokemon_storage_system.h" +#include "mon_markings.h" + +struct UnkPSSStruct_2002370 +{ + struct Sprite *unk_0000; + struct Sprite *unk_0004[4]; + u32 unk_0014[3]; + struct Sprite *unk_0020[2]; + u8 filler_0028[0x200]; + u8 unk_0228[20]; + u32 unk_023c; + u16 unk_0240; + u16 unk_0242; + u8 curBox; + u8 unk_0245; + u8 unk_0246; +}; + +struct StorageMenu +{ + const u8 *text; + int textId; +}; + +struct UnkStruct_2000028 +{ + const u8 *unk_00; + u8 *unk_04; + u16 unk_08; + u16 unk_0a; + u16 newField; + void (*unk_0c)(struct UnkStruct_2000028 *data); +}; + +struct UnkStruct_2000020 +{ + struct UnkStruct_2000028 *unk_00; + u8 unk_04; + u8 unk_05; +}; + +struct UnkStorageStruct +{ + struct Sprite *sprite; + u8 *tiles; + u16 palIndex; + u8 unk8; + u8 unk9; + u8 unk10; +}; + +struct PssQuestLogBuffer +{ + u16 a0; + u16 a2; + u8 a4; + u8 a5; +}; + +struct PokemonStorageSystemData +{ + u8 state; + u8 boxOption; + u8 screenChangeType; + bool8 isReshowingPSS; + u8 taskId; + struct UnkStruct_2000020 unk_0020; + struct UnkStruct_2000028 unk_0028[8]; + u16 field_B0[528 / 2]; + u16 field_2C0; + u16 field_2C2; + u8 field_2C4; + u8 field_2C5; + u8 showPartyMenuState; + u8 unk_02C7; + u8 unk_02C8; + bool8 unk_02C9; + s16 newCurrBoxId; + u16 bg2_X; + s16 field_2CE; + u16 field_2D0; + u8 field_2D2; + u8 field_2D3; + u8 field_2D4; + u16 field_2D6; + s16 field_2D8; + u16 field_2DA; + u16 field_2DC; + u16 field_2DE; + u16 field_2E0; + u8 filler[22]; + u8 field_2F8[1024]; + u8 field_6F8; + u8 field_6F9; + u8 field_6FA; + s8 field_6FB; + u16 field_6FC[16]; + u16 field_71C; + u16 field_71E; + struct Sprite *field_720[2]; + struct Sprite *field_728[2]; + struct Sprite *field_730[2]; + u32 field_738; + u8 field_73C[80]; + u16 field_78C; + s16 wallpaperSetId; + s16 wallpaperId; + u16 field_792[360]; + u8 wallpaperChangeState; + u8 field_A63; + u8 field_A64; + s8 field_A65; + u8 *wallpaperTiles; + struct Sprite *movingMonSprite; + struct Sprite *partySprites[PARTY_SIZE]; + struct Sprite *boxMonsSprites[IN_BOX_COUNT]; + struct Sprite **field_B00; + struct Sprite **field_B04; + u16 field_B08[40]; + u16 field_B58[40]; + u16 boxSpecies[IN_BOX_COUNT]; + u32 boxPersonalities[IN_BOX_COUNT]; + u8 field_C5C; + u8 field_C5D; + u8 field_C5E; + u16 field_C60; + s16 field_C62; + s16 field_C64; + u16 field_C66; + u8 field_C68; + s8 field_C69; + u8 field_C6A; + u8 field_C6B; + struct WindowTemplate menuWindow; + struct StorageMenu menuItems[7]; + u8 menuItemsCount; + u8 menuWidth; + u8 field_CAE; + u16 field_CB0; + struct Sprite *field_CB4; + struct Sprite *field_CB8; + s32 field_CBC; + s32 field_CC0; + u32 field_CC4; + u32 field_CC8; + s16 field_CCC; + s16 field_CCE; + u16 field_CD0; + s8 field_CD2; + s8 field_CD3; + u8 field_CD4; + u8 field_CD5; + u8 field_CD6; + u8 field_CD7; + u8 field_CD8[2]; + const u32 *cursorMonPalette; + u32 cursorMonPersonality; + u16 cursorMonSpecies; + u16 cursorMonItem; + u16 field_CE8; + bool8 setMosaic; + u8 cursorMonMarkings; + u8 cursorMonLevel; + bool8 cursorMonIsEgg; + u8 cursorMonNick[POKEMON_NAME_LENGTH + 1]; + u8 cursorMonNickText[36]; + u8 cursorMonSpeciesName[36]; + u8 cursorMonGenderLvlText[36]; + u8 cursorMonItemName[36]; + bool8 (*monPlaceChangeFunc)(void); + u8 monPlaceChangeState; + u8 field_D91; + struct Sprite *field_D94; + struct Sprite *field_D98[2]; + struct PokemonMarkMenu field_DA4; + /* 1e58 */ struct UnkPSSStruct_2002370 field_1E5C; + /* 20a0 */ struct Pokemon movingMon; + /* 2104 */ struct Pokemon field_2108; + /* 2168 */ s8 field_216C; + /* 2169 */ u8 field_216D; + /* 216a */ s8 field_216E; + /* 216b */ s8 field_216F; + /* 216c */ s8 field_2170; + /* 216d */ s8 field_2171; + /* 216e */ u8 field_2172; + /* 216f */ u8 field_2173; + /* 2170 */ u16 field_2174; + /* 2172 */ u16 field_2176[3]; + /* 2178 */ u8 field_2186; + /* 2179 */ u8 field_2187; + /* 217a */ u8 field_2188; + /* 217c */ union + { + struct Pokemon *mon; + struct BoxPokemon *box; + } field_218C; + /* 2180 */ u8 field_2190[40]; + /* 21a8 */ u8 field_21B8[40]; + /* 21d0 */ u8 field_21E0[POKEMON_NAME_LENGTH + 1]; + /* 21db */ u8 itemName[20]; + /* 21ef */ u8 inBoxMovingMode; + /* 21f0 */ u16 field_2200; + /* 21f4 */ struct UnkStorageStruct field_2204[3]; + /* 2224 */ u16 movingItem; + /* 2226 */ u16 field_2236; + /* 2228 */ struct PssQuestLogBuffer field_2238; + /* 2230 */ u16 field_223A; + /* 2234 */ u16 *field_223C; + /* 2238 */ struct Sprite *cursorMonSprite; + /* 223c */ u16 field_2244[0x40]; + /* 22bc */ u8 field_22C4[0x800]; + /* 2abc */ u8 field_2AC4[0x1800]; + /* 42bc */ u8 field_42C4[0x800]; + /* 4abc */ u8 field_4AC4[0x1000]; + /* 5abc */ u8 field_5AC4[0x800]; +}; + +extern struct PokemonStorageSystemData *sPSSData; + +void Cb2_ExitPSS(void); + +#endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H diff --git a/include/sprite.h b/include/sprite.h index acf8f719c..39cb1af96 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -254,6 +254,7 @@ extern const struct SpriteTemplate gDummySpriteTemplate; extern struct Sprite gSprites[]; extern struct OamMatrix gOamMatrices[]; extern bool8 gAffineAnimsDisabled; +extern u16 gReservedSpriteTileCount; void ResetSpriteData(void); void AnimateSprites(void); -- cgit v1.2.3 From 748b4eafacb3a04bd4de64a0be30eab1a6704d7e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 12 Mar 2020 14:14:16 -0400 Subject: through Cb_MainPSS --- include/pokemon_storage_system_internal.h | 194 ++++++++++++++++++++---------- 1 file changed, 130 insertions(+), 64 deletions(-) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 6171d9137..37dd63110 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -4,6 +4,71 @@ #include "pokemon_storage_system.h" #include "mon_markings.h" +enum +{ + BOX_OPTION_WITHDRAW, + BOX_OPTION_DEPOSIT, + BOX_OPTION_MOVE_MONS, + BOX_OPTION_MOVE_ITEMS, + BOX_OPTION_EXIT, +}; + +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, + PC_TEXT_IS_SELECTED2, + PC_TEXT_GIVE_TO_MON, + PC_TEXT_PLACED_IN_BAG, + PC_TEXT_BAG_FULL, + PC_TEXT_PUT_IN_BAG, + PC_TEXT_ITEM_IS_HELD, + PC_TEXT_CHANGED_TO_ITEM, + PC_TEXT_CANT_STORE_MAIL, +}; + +#define TAG_PAL_WAVEFORM 0xDACA +#define TAG_PAL_DAC8 0xDAC8 +#define TAG_PAL_DAC6 0xDAC6 +#define TAG_PAL_DACE 0xDACE +#define TAG_PAL_DAC7 0xDAC7 +#define TAG_PAL_DAC9 0xDAC9 +#define TAG_PAL_DAC0 0xDAC0 +#define TAG_PAL_DACB 0xDACB + +#define TAG_TILE_WAVEFORM 0x5 +#define TAG_TILE_10 0x10 +#define TAG_TILE_2 0x2 +#define TAG_TILE_D 0xD +#define TAG_TILE_A 0xA +#define TAG_TILE_3 0x3 +#define TAG_TILE_4 0x4 +#define TAG_TILE_12 0x12 +#define TAG_TILE_7 0x7 +#define TAG_TILE_0 0x0 +#define TAG_TILE_1 0x1 + struct UnkPSSStruct_2002370 { struct Sprite *unk_0000; @@ -114,69 +179,70 @@ struct PokemonStorageSystemData u8 field_A63; u8 field_A64; s8 field_A65; - u8 *wallpaperTiles; - struct Sprite *movingMonSprite; - struct Sprite *partySprites[PARTY_SIZE]; - struct Sprite *boxMonsSprites[IN_BOX_COUNT]; - struct Sprite **field_B00; - struct Sprite **field_B04; - u16 field_B08[40]; - u16 field_B58[40]; - u16 boxSpecies[IN_BOX_COUNT]; - u32 boxPersonalities[IN_BOX_COUNT]; - u8 field_C5C; - u8 field_C5D; - u8 field_C5E; - u16 field_C60; - s16 field_C62; - s16 field_C64; - u16 field_C66; - u8 field_C68; - s8 field_C69; - u8 field_C6A; - u8 field_C6B; - struct WindowTemplate menuWindow; - struct StorageMenu menuItems[7]; - u8 menuItemsCount; - u8 menuWidth; - u8 field_CAE; - u16 field_CB0; - struct Sprite *field_CB4; - struct Sprite *field_CB8; - s32 field_CBC; - s32 field_CC0; - u32 field_CC4; - u32 field_CC8; - s16 field_CCC; - s16 field_CCE; - u16 field_CD0; - s8 field_CD2; - s8 field_CD3; - u8 field_CD4; - u8 field_CD5; - u8 field_CD6; - u8 field_CD7; - u8 field_CD8[2]; - const u32 *cursorMonPalette; - u32 cursorMonPersonality; - u16 cursorMonSpecies; - u16 cursorMonItem; - u16 field_CE8; - bool8 setMosaic; - u8 cursorMonMarkings; - u8 cursorMonLevel; - bool8 cursorMonIsEgg; - u8 cursorMonNick[POKEMON_NAME_LENGTH + 1]; - u8 cursorMonNickText[36]; - u8 cursorMonSpeciesName[36]; - u8 cursorMonGenderLvlText[36]; - u8 cursorMonItemName[36]; - bool8 (*monPlaceChangeFunc)(void); - u8 monPlaceChangeState; - u8 field_D91; - struct Sprite *field_D94; - struct Sprite *field_D98[2]; - struct PokemonMarkMenu field_DA4; + // u8 *wallpaperTiles; // used only in Emerald for Walda + /* 0a68 */ struct Sprite *movingMonSprite; + /* 0a6c */ struct Sprite *partySprites[PARTY_SIZE]; + /* 0a84 */ struct Sprite *boxMonsSprites[IN_BOX_COUNT]; + /* 0afc */ struct Sprite **field_B00; + /* 0b00 */ struct Sprite **field_B04; + /* 0b04 */ u16 field_B08[40]; + /* 0b54 */ u16 field_B58[40]; + /* 0ba4 */ u16 boxSpecies[IN_BOX_COUNT]; + /* 0be0 */ u32 boxPersonalities[IN_BOX_COUNT]; + /* 0c58 */ u8 field_C5C; + /* 0c59 */ u8 field_C5D; + /* 0c5a */ u8 field_C5E; + /* 0c5c */ u16 field_C60; + /* 0c5e */ s16 field_C62; + /* 0c60 */ s16 field_C64; + /* 0c62 */ u16 field_C66; + /* 0c64 */ u8 field_C68; + /* 0c65 */ s8 field_C69; + /* 0c66 */ u8 field_C6A; + /* 0c67 */ u8 field_C6B; + /* 0c68 */ struct WindowTemplate menuWindow; + /* 0c70 */ struct StorageMenu menuItems[7]; + /* 0ca8 */ u8 menuItemsCount; + /* 0ca9 */ u8 menuWidth; + /* 0caa */ u8 field_CAE; + /* 0cac */ u16 field_CB0; + /* 0cb0 */ struct Sprite *field_CB4; + /* 0cb4 */ struct Sprite *field_CB8; + /* 0cb8 */ s32 field_CBC; + /* 0cbc */ s32 field_CC0; + /* 0cc0 */ u32 field_CC4; + /* 0cc4 */ u32 field_CC8; + /* 0cc8 */ s16 field_CCC; + /* 0cca */ s16 field_CCE; + /* 0ccc */ u16 field_CD0; + /* 0cce */ s8 field_CD2; + /* 0ccf */ s8 field_CD3; + /* 0cd0 */ u8 field_CD4; + /* 0cd1 */ u8 field_CD5; + /* 0cd2 */ u8 field_CD6; + /* 0cd3 */ u8 field_CD7; + /* 0cd4 */ u8 field_CD8[2]; + /* 0cd8 */ const u32 *cursorMonPalette; + /* 0cdc */ u32 cursorMonPersonality; + /* 0ce0 */ u16 cursorMonSpecies; + /* 0ce2 */ u16 cursorMonItem; + /* 0ce4 */ u16 field_CE8; + /* 0ce6 */ bool8 setMosaic; + /* 0ce7 */ u8 cursorMonMarkings; + /* 0ce8 */ u8 cursorMonLevel; + /* 0ce9 */ bool8 cursorMonIsEgg; + /* 0cea */ u8 cursorMonNick[POKEMON_NAME_LENGTH + 1]; + /* 0cf5 */ u8 cursorMonNickText[36]; + /* 0d19 */ u8 cursorMonSpeciesName[36]; + /* 0d3d */ u8 cursorMonGenderLvlText[36]; + /* 0d61 */ u8 cursorMonItemName[36]; + /* 0d88 */ bool8 (*monPlaceChangeFunc)(void); + /* 0d8c */ u8 monPlaceChangeState; + /* 0d8d */ u8 field_D91; + /* 0d90 */ struct Sprite *field_D94; + /* 0d94 */ struct Sprite *field_D98[2]; + /* 0d9c */ u16 *field_DA0; + /* 0da0 */ struct PokemonMarkMenu field_DA4; /* 1e58 */ struct UnkPSSStruct_2002370 field_1E5C; /* 20a0 */ struct Pokemon movingMon; /* 2104 */ struct Pokemon field_2108; @@ -217,7 +283,7 @@ struct PokemonStorageSystemData /* 42bc */ u8 field_42C4[0x800]; /* 4abc */ u8 field_4AC4[0x1000]; /* 5abc */ u8 field_5AC4[0x800]; -}; +}; // size=62bc extern struct PokemonStorageSystemData *sPSSData; -- cgit v1.2.3 From 68c48a0cc3431c60a48378885e48631bef3db8ec Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 12 Mar 2020 15:39:41 -0400 Subject: through Cb_ReleaseMon --- include/pokemon_storage_system_internal.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 37dd63110..134ee5fa2 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -288,5 +288,10 @@ struct PokemonStorageSystemData extern struct PokemonStorageSystemData *sPSSData; void Cb2_ExitPSS(void); +void sub_808C8FC(void); +void sub_808C940(u8 curBox); +void sub_808C950(void); +u8 HandleBoxChooseSelectionInput(void); +void sub_808C854(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal); #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H -- cgit v1.2.3 From 50e063032001eb81a46817a0d998bee8578335d2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 12 Mar 2020 16:43:23 -0400 Subject: Through GiveChosenBagItem --- include/pokemon_storage_system_internal.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 134ee5fa2..9a4dcdfaa 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -48,6 +48,22 @@ enum PC_TEXT_CANT_STORE_MAIL, }; +enum +{ + CURSOR_AREA_IN_BOX, + CURSOR_AREA_IN_PARTY, + CURSOR_AREA_BOX, + CURSOR_AREA_BUTTONS, // Party Pokemon and Close Box +}; + +enum +{ + SCREEN_CHANGE_EXIT_BOX, + SCREEN_CHANGE_SUMMARY_SCREEN, + SCREEN_CHANGE_NAME_BOX, + SCREEN_CHANGE_ITEM_FROM_BAG, +}; + #define TAG_PAL_WAVEFORM 0xDACA #define TAG_PAL_DAC8 0xDAC8 #define TAG_PAL_DAC6 0xDAC6 @@ -293,5 +309,6 @@ void sub_808C940(u8 curBox); void sub_808C950(void); u8 HandleBoxChooseSelectionInput(void); void sub_808C854(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal); +void SetCurrentBoxMonData(u8 boxPosition, s32 request, const void *value); #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H -- cgit v1.2.3 From a89e8474fdb31e1e1b13a64be4109ce8603f81a3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 13 Mar 2020 16:28:17 -0400 Subject: Through sub_808FE54 --- include/box_party_pokemon_dropdown.h | 22 ++++-- include/graphics.h | 7 ++ include/pokemon_storage_system_internal.h | 108 +++++++++++++++++++++++++++--- include/strings.h | 31 +++++++++ 4 files changed, 151 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/box_party_pokemon_dropdown.h b/include/box_party_pokemon_dropdown.h index c2df93f1e..52e620956 100644 --- a/include/box_party_pokemon_dropdown.h +++ b/include/box_party_pokemon_dropdown.h @@ -1,14 +1,24 @@ #ifndef GUARD_BOX_PARTY_POKEMON_DROPDOWN_H #define GUARD_BOX_PARTY_POKEMON_DROPDOWN_H +enum +{ + BPPD_MOVE_INNER_LEFT = 0, + BPPD_MOVE_OUTER_LEFT, + BPPD_MOVE_INNER_TOP, + BPPD_MOVE_OUTER_TOP, + BPPD_MOVE_INNER_X, + BPPD_MOVE_INNER_Y +}; + void AllocBoxPartyPokemonDropdowns(u8 num); -void sub_80F7B2C(void); -void sub_80F7B40(void); +void FreeBoxPartyPokemonDropdowns(void); +void CopyAllBoxPartyPokemonDropdownsToVram(void); void SetBoxPartyPokemonDropdownMap2(u8 idx, u8 bgId, const void * src, u16 width, u16 height); -void sub_80F7C7C(u8 a0, const void * a1); +void SetBoxPartyPokemonDropdownMap1Tiles(u8 idx, const void * src); void SetBoxPartyPokemonDropdownMap2Pos(u8 idx, u16 x, u16 y); -void sub_80F7CE8(u8 a0, u16 a1, u16 a2, u16 a3, u16 a4); -void sub_80F7D30(u8 a0, u8 a1, s8 a2); -void sub_80F7E54(u8 a0); +void SetBoxPartyPokemonDropdownMap2Rect(u8 idx, u16 x, u16 y, u16 width, u16 height); +void AdjustBoxPartyPokemonDropdownPos(u8 a0, u8 a1, s8 a2); +void CopyBoxPartyPokemonDropdownToBgTilemapBuffer(u8 idx); #endif //GUARD_BOX_PARTY_POKEMON_DROPDOWN_H diff --git a/include/graphics.h b/include/graphics.h index d84371e3a..3930861f8 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4917,4 +4917,11 @@ extern const u16 gUnknown_8E98F38[]; extern const u16 gUnknown_8E990D8[]; extern const u16 gUnknown_8E990F8[]; +// pokemon_storage_system +extern const u32 gPSSMenu_Gfx[]; +extern const u32 gUnknown_8E9CAEC[]; +extern const u16 gPSSMenu_Pal[]; +extern const u16 gUnknown_8E9C3F8[]; +extern const u16 gUnknown_8E9C418[]; + #endif //GUARD_GRAPHICS_H diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 9a4dcdfaa..1e7430dd9 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -48,6 +48,18 @@ enum PC_TEXT_CANT_STORE_MAIL, }; +enum +{ + PC_TEXT_FMT_NORMAL, + PC_TEXT_FMT_MON_NAME_1, + PC_TEXT_FMT_MON_NAME_2, + PC_TEXT_FMT_MON_NAME_3, + PC_TEXT_FMT_MON_NAME_4, + PC_TEXT_FMT_MON_NAME_5, + PC_TEXT_FMT_MON_NAME_6, + PC_TEXT_FMT_ITEM_NAME, +}; + enum { CURSOR_AREA_IN_BOX, @@ -85,6 +97,12 @@ enum #define TAG_TILE_0 0x0 #define TAG_TILE_1 0x1 +struct StorageAction +{ + const u8 *text; + u8 format; +}; + struct UnkPSSStruct_2002370 { struct Sprite *unk_0000; @@ -136,10 +154,10 @@ struct UnkStorageStruct struct PssQuestLogBuffer { - u16 a0; - u16 a2; - u8 a4; - u8 a5; + u16 species; + u16 species2; + u8 fromBox; + u8 toBox; }; struct PokemonStorageSystemData @@ -157,7 +175,7 @@ struct PokemonStorageSystemData u8 field_2C4; u8 field_2C5; u8 showPartyMenuState; - u8 unk_02C7; + bool8 unk_02C7; u8 unk_02C8; bool8 unk_02C9; s16 newCurrBoxId; @@ -248,10 +266,7 @@ struct PokemonStorageSystemData /* 0ce8 */ u8 cursorMonLevel; /* 0ce9 */ bool8 cursorMonIsEgg; /* 0cea */ u8 cursorMonNick[POKEMON_NAME_LENGTH + 1]; - /* 0cf5 */ u8 cursorMonNickText[36]; - /* 0d19 */ u8 cursorMonSpeciesName[36]; - /* 0d3d */ u8 cursorMonGenderLvlText[36]; - /* 0d61 */ u8 cursorMonItemName[36]; + /* 0cf5 */ u8 cursorMonTexts[4][36]; /* 0d88 */ bool8 (*monPlaceChangeFunc)(void); /* 0d8c */ u8 monPlaceChangeState; /* 0d8d */ u8 field_D91; @@ -289,8 +304,9 @@ struct PokemonStorageSystemData /* 21f4 */ struct UnkStorageStruct field_2204[3]; /* 2224 */ u16 movingItem; /* 2226 */ u16 field_2236; - /* 2228 */ struct PssQuestLogBuffer field_2238; - /* 2230 */ u16 field_223A; + /* 2228 */ struct PssQuestLogBuffer qlogBuffer; + /* 2230 */ u16 field_2238; + /* 2232 */ u16 field_223A; /* 2234 */ u16 *field_223C; /* 2238 */ struct Sprite *cursorMonSprite; /* 223c */ u16 field_2244[0x40]; @@ -310,5 +326,75 @@ void sub_808C950(void); u8 HandleBoxChooseSelectionInput(void); void sub_808C854(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal); void SetCurrentBoxMonData(u8 boxPosition, s32 request, const void *value); +u32 GetCurrentBoxMonData(u8 boxPosition, s32 request); + +void sub_80922C0(void); +void sub_8092340(void); +bool8 sub_80924A8(void); +void sub_8092AE4(void); +void sub_8092B3C(u8 a0); +void sub_8092B50(void); +void sub_8092B5C(void); +u8 sub_8092B70(void); +void sub_8092F54(void); +void sub_8093174(void); +void sub_8093194(void); +bool8 sub_80931EC(void); +void sub_8093264(void); +void sub_8093630(void); +void sub_8093660(void); +void sub_80936B8(void); +void sub_80937B4(void); +void sub_8094D14(u8 a0); +u8 sub_8094D34(void); +void sub_8094D60(void); +void sub_8094D84(void); +bool8 sub_8094F90(void); +s16 sub_8094F94(void); +void sub_8095024(void); +bool8 sub_8095050(void); +void sub_80950A4(void); +void sub_80950BC(u8 a0); +bool8 sub_80950D0(void); +void sub_8095B5C(void); +void sub_8096088(void); +void sub_80960C0(void); +bool8 sub_809610C(void); +const u8 *GetMovingItemName(void); +void sub_80966F4(void); +bool8 sub_8096728(void); +bool8 sub_80967C0(void); +void sub_8096BE4(struct UnkStruct_2000020 *arg0, struct UnkStruct_2000028 *arg1, u32 arg2); +void sub_8096BF8(void); +void AddMenu(void); +bool8 CanMovePartyMon(void); +bool8 CanShiftMon(void); +bool8 DoMonPlaceChange(void); +bool8 DoWallpaperGfxChange(void); +u8 GetBoxCursorPosition(void); +u16 GetMovingItem(void); +u8 HandleInput(void); +void InitCanReleaseMonVars(void); +void InitMonPlaceChange(u8 a0); +bool8 IsActiveItemMoving(void); +bool8 IsCursorOnCloseBox(void); +bool8 IsMonBeingMoved(void); +void Item_FromMonToMoving(u8 cursorArea, u8 cursorPos); +void Item_GiveMovingToMon(u8 cursorArea, u8 cursorPos); +void Item_SwitchMonsWithMoving(u8 cursorArea, u8 cursorPos); +void Item_TakeMons(u8 cursorArea, u8 cursorPos); +void PrintItemDescription(void); +void ReleaseMon(void); +s8 RunCanReleaseMon(void); +bool8 ScrollToBox(void); +void SetMonMarkings(u8 markings); +void SetMovingMonPriority(u8 priority); +void SetUpScrollToBox(u8 targetBox); +void SetWallpaperForCurrentBox(u8 wallpaper); +bool8 TryStorePartyMonInBox(u8 boxId); +void InitMenu(void); +void SetMenuText(u8 textId); +void sub_8095C84(u8 cursorArea, u8 cursorPos); +void sub_8095E2C(u16 itemId); #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H diff --git a/include/strings.h b/include/strings.h index 06851c983..0b3e61dba 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1372,5 +1372,36 @@ extern const u8 gText_SeeYaDescription[]; extern const u8 gText_PartyFull[]; extern const u8 gText_JustOnePkmn[]; extern const u8 gText_Box[]; +extern const u8 gText_ExitFromBox[]; +extern const u8 gText_WhatDoYouWantToDo[]; +extern const u8 gText_PleasePickATheme[]; +extern const u8 gText_PickTheWallpaper[]; +extern const u8 gText_PkmnIsSelected[]; +extern const u8 gText_JumpToWhichBox[]; +extern const u8 gText_DepositInWhichBox[]; +extern const u8 gText_PkmnWasDeposited[]; +extern const u8 gText_BoxIsFull2[]; +extern const u8 gText_ReleaseThisPokemon[]; +extern const u8 gText_PkmnWasReleased[]; +extern const u8 gText_ByeByePkmn[]; +extern const u8 gText_MarkYourPkmn[]; +extern const u8 gText_ThatsYourLastPkmn[]; +extern const u8 gText_YourPartysFull[]; +extern const u8 gText_YoureHoldingAPkmn[]; +extern const u8 gText_WhichOneWillYouTake[]; +extern const u8 gText_YouCantReleaseAnEgg[]; +extern const u8 gText_ContinueBoxOperations[]; +extern const u8 gText_PkmnCameBack[]; +extern const u8 gText_WasItWorriedAboutYou[]; +extern const u8 gText_FourEllipsesExclamation[]; +extern const u8 gText_PleaseRemoveTheMail[]; +extern const u8 gText_PkmnIsSelected[]; +extern const u8 gText_GiveToAPkmn[]; +extern const u8 gText_PlacedItemInBag[]; +extern const u8 gText_BagIsFull2[]; +extern const u8 gText_PutItemInBag[]; +extern const u8 gText_ItemIsNowHeld[]; +extern const u8 gText_ChangedToNewItem[]; +extern const u8 gText_MailCantBeStored[]; #endif //GUARD_STRINGS_H -- cgit v1.2.3 From 6753e18db06fc6636b768bfaae41a68ec8660abf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 13 Mar 2020 20:53:22 -0400 Subject: through sub_8090FC4 --- include/constants/flags.h | 2 +- include/pokemon_storage_system_internal.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/constants/flags.h b/include/constants/flags.h index 85d704680..0bc96eb35 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -1365,7 +1365,7 @@ #define FLAG_SYS_NATIONAL_DEX (SYS_FLAGS + 0x40) #define FLAG_SYS_PC_STORAGE_DISABLED (SYS_FLAGS + 0x41) #define FLAG_SYS_INFORMED_OF_LOCAL_WIRELESS_PLAYER (SYS_FLAGS + 0x42) -#define FLAG_SYS_CHANGED_BOX_TO_STORE_MON (SYS_FLAGS + 0x43) +#define FLAG_SHOWN_BOX_WAS_FULL_MESSAGE (SYS_FLAGS + 0x43) #define FLAG_SYS_CAN_LINK_WITH_RS (SYS_FLAGS + 0x44) #define FLAG_SYS_SEVII_MAP_123 (SYS_FLAGS + 0x45) #define FLAG_SYS_SEVII_MAP_4567 (SYS_FLAGS + 0x46) diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 1e7430dd9..28b39cb7c 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -4,6 +4,16 @@ #include "pokemon_storage_system.h" #include "mon_markings.h" +#define IN_BOX_COLUMNS 5 +#define IN_BOX_ROWS 6 + +enum +{ + MODE_PARTY, + MODE_BOX, + MODE_2, +}; + enum { BOX_OPTION_WITHDRAW, -- cgit v1.2.3 From 5f7738672ac9b3aa6a7836bc222d60acf7e32f54 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 14 Mar 2020 13:50:15 -0400 Subject: through sub_809223C --- include/pokemon_icon.h | 2 ++ include/pokemon_storage_system.h | 2 +- include/pokemon_storage_system_internal.h | 20 +++++++++++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 5b9876677..597694baf 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -4,6 +4,7 @@ #include "global.h" extern const u16 gMonIconPalettes[][16]; +extern const u8 gMonIconPaletteIndices[]; const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo); const u8 *GetMonIconTiles(u16 iconSpecies, bool32 extra); @@ -26,5 +27,6 @@ void LoadMonIconPalette(u16 iconId); void FreeMonIconPalette(u16 iconId); void SetPartyHPBarSprite(struct Sprite * sprite, u8 animNum); u8 GetMonIconPaletteIndexFromSpecies(u16 species); +u16 GetIconSpecies(u16 species, u32 personality); #endif // GUARD_POKEMON_ICON_H diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 6ded8983c..7a98e1a77 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -36,7 +36,7 @@ void ZeroBoxMonAt(u8 boxId, u8 monPosition); void Cb2_ReturnToPSS(void); void ResetPokemonStorageSystem(void); u8 StorageGetCurrentBox(void); -void DrawTextWindowAndBufferTiles(const u8 *name, void *a1, u8 a2, u8 a3, u8 *buffer, s32 a5); +void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero2, u8 *buffer, s32 bytesToBuffer); void SetCurrentBox(u8 boxId); void SetBoxWallpaper(u8 boxId, u8 wallpaperId); struct Sprite *sub_809223C(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority); diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 28b39cb7c..889651175 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -7,6 +7,8 @@ #define IN_BOX_COLUMNS 5 #define IN_BOX_ROWS 6 +#define MAX_MON_ICONS 40 + enum { MODE_PARTY, @@ -106,6 +108,14 @@ enum #define TAG_TILE_7 0x7 #define TAG_TILE_0 0x0 #define TAG_TILE_1 0x1 +#define TAG_TILE_6 0x6 + +struct WallpaperTable +{ + const u32 *tiles; + const u32 *tileMap; + const u16 *palettes; +}; struct StorageAction { @@ -202,7 +212,8 @@ struct PokemonStorageSystemData u16 field_2DE; u16 field_2E0; u8 filler[22]; - u8 field_2F8[1024]; + u8 field_2F8[512]; + u8 field_4F8[512]; u8 field_6F8; u8 field_6F9; u8 field_6FA; @@ -229,8 +240,8 @@ struct PokemonStorageSystemData /* 0a84 */ struct Sprite *boxMonsSprites[IN_BOX_COUNT]; /* 0afc */ struct Sprite **field_B00; /* 0b00 */ struct Sprite **field_B04; - /* 0b04 */ u16 field_B08[40]; - /* 0b54 */ u16 field_B58[40]; + /* 0b04 */ u16 field_B08[MAX_MON_ICONS]; + /* 0b54 */ u16 field_B58[MAX_MON_ICONS]; /* 0ba4 */ u16 boxSpecies[IN_BOX_COUNT]; /* 0be0 */ u32 boxPersonalities[IN_BOX_COUNT]; /* 0c58 */ u8 field_C5C; @@ -406,5 +417,8 @@ void InitMenu(void); void SetMenuText(u8 textId); void sub_8095C84(u8 cursorArea, u8 cursorPos); void sub_8095E2C(u16 itemId); +u8 GetBoxWallpaper(u8 boxId); +bool8 IsCursorOnBox(void); +bool8 IsCursorInBox(void); #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H -- cgit v1.2.3 From 8faf63a97c7550778bc06414a12f6435fb885a35 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 14 Mar 2020 14:23:40 -0400 Subject: split off pokemon_storage_system_4 --- include/pokemon_storage_system_internal.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 889651175..722500e0f 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -421,4 +421,17 @@ u8 GetBoxWallpaper(u8 boxId); bool8 IsCursorOnBox(void); bool8 IsCursorInBox(void); +void sub_808FFAC(void); +struct Sprite * CreateMonIconSprite(u16 species, u32 pid, s16 x, s16 y, u8 priority, u8 subpriority); +void CreatePartyMonsSprites(bool8 species); +void sub_80909F4(void); +bool8 sub_8090A60(void); +void sub_8090B98(s16 yDelta); +void DestroyAllPartyMonIcons(void); +void sub_8091114(void); +bool8 sub_8091150(void); +void sub_80913DC(u8 box); +bool8 sub_809140C(void); +void sub_80920FC(bool8 species); + #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H -- cgit v1.2.3 From 5471590f77ab4d8b9684c6ea4b3d9e870a83633b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 14 Mar 2020 20:37:48 -0400 Subject: through RunCanReleaseMon --- include/pokemon_storage_system.h | 6 ------ include/pokemon_storage_system_internal.h | 33 +++++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 7a98e1a77..6d0489ed6 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -37,11 +37,5 @@ void Cb2_ReturnToPSS(void); void ResetPokemonStorageSystem(void); u8 StorageGetCurrentBox(void); void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero2, u8 *buffer, s32 bytesToBuffer); -void SetCurrentBox(u8 boxId); -void SetBoxWallpaper(u8 boxId, u8 wallpaperId); -struct Sprite *sub_809223C(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority); - -void Cb2_EnterPSS(u8 a0); -u8 GetCurrentBoxOption(void); #endif // GUARD_POKEMON_STORAGE_SYSTEM_H diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 722500e0f..4d5af348c 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -298,15 +298,15 @@ struct PokemonStorageSystemData /* 1e58 */ struct UnkPSSStruct_2002370 field_1E5C; /* 20a0 */ struct Pokemon movingMon; /* 2104 */ struct Pokemon field_2108; - /* 2168 */ s8 field_216C; + /* 2168 */ u8 field_216C; /* 2169 */ u8 field_216D; + /* 216c */ bool8 isSurfMon; + /* 216d */ bool8 isDiveMon; /* 216a */ s8 field_216E; /* 216b */ s8 field_216F; - /* 216c */ s8 field_2170; - /* 216d */ s8 field_2171; - /* 216e */ u8 field_2172; - /* 216f */ u8 field_2173; - /* 2170 */ u16 field_2174; + /* 216e */ s8 field_2170; + /* 216f */ s8 field_2171; + /* 2170 */ u16 field_2172; /* 2172 */ u16 field_2176[3]; /* 2178 */ u8 field_2186; /* 2179 */ u8 field_2187; @@ -340,6 +340,14 @@ struct PokemonStorageSystemData extern struct PokemonStorageSystemData *sPSSData; +void Cb2_EnterPSS(u8 a0); +u8 GetCurrentBoxOption(void); +struct Sprite *sub_809223C(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority); +void SetBoxWallpaper(u8 boxId, u8 wallpaperId); +void SetCurrentBox(u8 boxId); +void BoxMonAtToMon(u8 boxId, u8 boxPosition, struct Pokemon * dst); +void SetBoxMonAt(u8 boxId, u8 boxPosition, struct BoxPokemon * src); + void Cb2_ExitPSS(void); void sub_808C8FC(void); void sub_808C940(u8 curBox); @@ -348,6 +356,7 @@ u8 HandleBoxChooseSelectionInput(void); void sub_808C854(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal); void SetCurrentBoxMonData(u8 boxPosition, s32 request, const void *value); u32 GetCurrentBoxMonData(u8 boxPosition, s32 request); +u32 GetAndCopyBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request, void *dst); void sub_80922C0(void); void sub_8092340(void); @@ -433,5 +442,17 @@ bool8 sub_8091150(void); void sub_80913DC(u8 box); bool8 sub_809140C(void); void sub_80920FC(bool8 species); +void CreateMovingMonIcon(void); +void sub_8090E08(u8 boxId, u8 cursorPos); +bool8 sub_8090E74(void); +void sub_8090CC0(u8 cursorArea, u8 cursorPos); +void sub_8090D58(u8 cursorArea, u8 cursorPos); +void DestroyPartyMonIcon(u8 partyId); +void DestroyMovingMonIcon(void); +s16 GetFirstFreeBoxSpot(u8 boxId); +void sub_80901EC(u8 boxPosition); +void sub_8090FC4(u8 mode, u8 position); +bool8 sub_8091084(void); +void sub_80910CC(void); #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H -- cgit v1.2.3 From 09b90247ee4f18c5746bbc54e6a5a75dfd9a1ed3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 14 Mar 2020 21:19:56 -0400 Subject: through nonmatching InBoxInput_Normal --- include/pokemon_storage_system.h | 2 +- include/pokemon_storage_system_internal.h | 2 ++ include/text.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 6d0489ed6..7422b4522 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -30,7 +30,7 @@ enum u8 *GetBoxNamePtr(u8 boxNumber); struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 monPosition); void SetBoxMonNickAt(u8 boxId, u8 monPosition, const u8 *newNick); -void CompactPartySlots(void); +s16 CompactPartySlots(void); u32 GetBoxMonDataAt(u8 boxId, u8 monPosition, s32 request); void ZeroBoxMonAt(u8 boxId, u8 monPosition); void Cb2_ReturnToPSS(void); diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 4d5af348c..caec69019 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -454,5 +454,7 @@ void sub_80901EC(u8 boxPosition); void sub_8090FC4(u8 mode, u8 position); bool8 sub_8091084(void); void sub_80910CC(void); +u8 CountPartyMons(void); +u8 CountPartyAliveNonEggMonsExcept(u8 slotToIgnore); #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H diff --git a/include/text.h b/include/text.h index ff8b033e9..f1bf8b942 100644 --- a/include/text.h +++ b/include/text.h @@ -128,6 +128,7 @@ #define EXT_CTRL_CODE_COLOR 0x1 #define EXT_CTRL_CODE_HIGHLIGHT 0x2 #define EXT_CTRL_CODE_SHADOW 0x3 +#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x4 // #define EXT_CTRL_CODE_UNKNOWN_7 0x7 // -- cgit v1.2.3 From e445a42a5b824a021eace417619741b0ee512682 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Mar 2020 10:26:42 -0400 Subject: through HandleInput --- include/pokemon_storage_system_internal.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index caec69019..b518e49f4 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -457,4 +457,10 @@ void sub_80910CC(void); u8 CountPartyMons(void); u8 CountPartyAliveNonEggMonsExcept(u8 slotToIgnore); +s8 sub_8094E50(u8 a0); +bool8 sub_8095474(u8 action); +u8 sub_8095AA0(void); +bool8 sub_8095ABC(void); +void sub_8095D44(u8 cursorArea, u8 cursorPos); + #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H -- cgit v1.2.3 From 1e959e036d856eedc6bee1c01114ca93d361a160 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Mar 2020 11:57:01 -0400 Subject: through sub_8094D84 --- include/pokemon_storage_system_internal.h | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index b518e49f4..0b67fade3 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -72,6 +72,48 @@ enum PC_TEXT_FMT_ITEM_NAME, }; +enum +{ + PC_TEXT_CANCEL, + PC_TEXT_STORE, + PC_TEXT_WITHDRAW, + PC_TEXT_MOVE, + PC_TEXT_SHIFT, + PC_TEXT_PLACE, + PC_TEXT_SUMMARY, + PC_TEXT_RELEASE, + PC_TEXT_MARK, + PC_TEXT_JUMP, + PC_TEXT_WALLPAPER, + PC_TEXT_NAME, + PC_TEXT_TAKE, + PC_TEXT_GIVE, + PC_TEXT_GIVE2, + PC_TEXT_SWITCH, + PC_TEXT_BAG, + PC_TEXT_INFO, + PC_TEXT_SCENERY1, + PC_TEXT_SCENERY2, + PC_TEXT_SCENERY3, + PC_TEXT_ETCETERA, + PC_TEXT_FOREST, + PC_TEXT_CITY, + PC_TEXT_DESERT, + PC_TEXT_SAVANNA, + PC_TEXT_CRAG, + PC_TEXT_VOLCANO, + PC_TEXT_SNOW, + PC_TEXT_CAVE, + PC_TEXT_BEACH, + PC_TEXT_SEAFLOOR, + PC_TEXT_RIVER, + PC_TEXT_SKY, + PC_TEXT_POLKADOT, + PC_TEXT_POKECENTER, + PC_TEXT_MACHINE, + PC_TEXT_SIMPLE, +}; + enum { CURSOR_AREA_IN_BOX, -- cgit v1.2.3 From 39ef2a31a4dd12e8638ccf520952bd8f1eb1f36e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Mar 2020 12:24:33 -0400 Subject: through AddMenu --- include/pokemon_storage_system_internal.h | 4 +++- include/strings.h | 37 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 0b67fade3..3d80b4c6a 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -9,6 +9,8 @@ #define MAX_MON_ICONS 40 +#define MAX_MENU_ITEMS 7 + enum { MODE_PARTY, @@ -298,7 +300,7 @@ struct PokemonStorageSystemData /* 0c66 */ u8 field_C6A; /* 0c67 */ u8 field_C6B; /* 0c68 */ struct WindowTemplate menuWindow; - /* 0c70 */ struct StorageMenu menuItems[7]; + /* 0c70 */ struct StorageMenu menuItems[MAX_MENU_ITEMS]; /* 0ca8 */ u8 menuItemsCount; /* 0ca9 */ u8 menuWidth; /* 0caa */ u8 field_CAE; diff --git a/include/strings.h b/include/strings.h index 0b3e61dba..6016dc3e3 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1403,5 +1403,42 @@ extern const u8 gText_PutItemInBag[]; extern const u8 gText_ItemIsNowHeld[]; extern const u8 gText_ChangedToNewItem[]; extern const u8 gText_MailCantBeStored[]; +extern const u8 gPCText_Cancel[]; +extern const u8 gPCText_Store[]; +extern const u8 gPCText_Withdraw[]; +extern const u8 gPCText_Move[]; +extern const u8 gPCText_Shift[]; +extern const u8 gPCText_Place[]; +extern const u8 gPCText_Summary[]; +extern const u8 gPCText_Release[]; +extern const u8 gPCText_Mark[]; +extern const u8 gPCText_Jump[]; +extern const u8 gPCText_Wallpaper[]; +extern const u8 gPCText_Name[]; +extern const u8 gPCText_Take[]; +extern const u8 gPCText_Give[]; +extern const u8 gPCText_Switch[]; +extern const u8 gPCText_Bag[]; +extern const u8 gPCText_Info[]; +extern const u8 gPCText_Scenery1[]; +extern const u8 gPCText_Scenery2[]; +extern const u8 gPCText_Scenery3[]; +extern const u8 gPCText_Etcetera[]; +extern const u8 gPCText_Forest[]; +extern const u8 gPCText_City[]; +extern const u8 gPCText_Desert[]; +extern const u8 gPCText_Savanna[]; +extern const u8 gPCText_Crag[]; +extern const u8 gPCText_Volcano[]; +extern const u8 gPCText_Snow[]; +extern const u8 gPCText_Cave[]; +extern const u8 gPCText_Beach[]; +extern const u8 gPCText_Seafloor[]; +extern const u8 gPCText_River[]; +extern const u8 gPCText_Sky[]; +extern const u8 gPCText_PolkaDot[]; +extern const u8 gPCText_Pokecenter[]; +extern const u8 gPCText_Machine[]; +extern const u8 gPCText_Simple[]; #endif //GUARD_STRINGS_H -- cgit v1.2.3 From be742e6741af58076ac09722d42d64eee3c8d763 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Mar 2020 15:11:51 -0400 Subject: pokemon_storage_system_7 --- include/pokemon_icon.h | 2 ++ include/pokemon_storage_system_internal.h | 4 ++++ include/window.h | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 597694baf..e2eebc62b 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -28,5 +28,7 @@ void FreeMonIconPalette(u16 iconId); void SetPartyHPBarSprite(struct Sprite * sprite, u8 animNum); u8 GetMonIconPaletteIndexFromSpecies(u16 species); u16 GetIconSpecies(u16 species, u32 personality); +void LoadMonIconPalettesAt(u16 offset); +u8 GetValidMonIconPalIndex(u16 species); #endif // GUARD_POKEMON_ICON_H diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 3d80b4c6a..399e29f32 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -506,5 +506,9 @@ bool8 sub_8095474(u8 action); u8 sub_8095AA0(void); bool8 sub_8095ABC(void); void sub_8095D44(u8 cursorArea, u8 cursorPos); +void sub_8094CD4(u8 *arg0, u8 *arg1); +void sub_8094D40(void); +void sub_8092BAC(bool8 arg0); +void DestroyBoxMonIconAtPosition(u8 boxPosition); #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H diff --git a/include/window.h b/include/window.h index 5f3630afb..c8b83af7a 100644 --- a/include/window.h +++ b/include/window.h @@ -69,10 +69,10 @@ void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue); void CallWindowFunction(u8 windowId, WindowFunc func); bool8 SetWindowAttribute(u8 windowId, u8 attributeId, u32 value); u32 GetWindowAttribute(u8 windowId, u8 attributeId); -u16 AddWindow8Bit(struct WindowTemplate *template); -u16 AddWindow8Bit(struct WindowTemplate *template); +u16 AddWindow8Bit(const struct WindowTemplate *template); +void FillWindowPixelBuffer8Bit(u8 windowId, u8 fillValue); void FillWindowPixelRect8Bit(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height); -void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum); +void BlitBitmapRectToWindow4BitTo8Bit(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteNum); void CopyWindowToVram8Bit(u8 windowId, u8 mode); extern void *gWindowBgTilemapBuffers[]; -- cgit v1.2.3 From c996ca85bc4d3bd62e2b6d2a37809c4f5c46b2e1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Mar 2020 17:29:02 -0400 Subject: pokemon_storage_system_8 --- include/pokemon_storage_system_internal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 399e29f32..2f6cf20f1 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -8,7 +8,7 @@ #define IN_BOX_ROWS 6 #define MAX_MON_ICONS 40 - +#define MAX_ITEM_ICONS 3 #define MAX_MENU_ITEMS 7 enum @@ -366,7 +366,7 @@ struct PokemonStorageSystemData /* 21db */ u8 itemName[20]; /* 21ef */ u8 inBoxMovingMode; /* 21f0 */ u16 field_2200; - /* 21f4 */ struct UnkStorageStruct field_2204[3]; + /* 21f4 */ struct UnkStorageStruct field_2204[MAX_ITEM_ICONS]; /* 2224 */ u16 movingItem; /* 2226 */ u16 field_2236; /* 2228 */ struct PssQuestLogBuffer qlogBuffer; @@ -510,5 +510,7 @@ void sub_8094CD4(u8 *arg0, u8 *arg1); void sub_8094D40(void); void sub_8092BAC(bool8 arg0); void DestroyBoxMonIconAtPosition(u8 boxPosition); +void SetBoxMonIconObjMode(u8 cursorPos, u8 objMode); +void SetPartyMonIconObjMode(u8 cursorPos, u8 objMode); #endif //GUARD_POKEMON_STORAGE_SYSTEM_INTERNAL_H -- cgit v1.2.3 From d30e2597a05d2a887dca2ca3ef2ca000701dfd63 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Mar 2020 18:25:20 -0400 Subject: pss 9; static symbols --- include/pokemon_storage_system_internal.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 2f6cf20f1..4a1cda7aa 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -206,14 +206,14 @@ struct UnkStruct_2000020 u8 unk_05; }; -struct UnkStorageStruct +struct PSS_ItemIconSprite { struct Sprite *sprite; u8 *tiles; u16 palIndex; - u8 unk8; - u8 unk9; - u8 unk10; + u8 cursorArea; + u8 cursorPos; + u8 active; }; struct PssQuestLogBuffer @@ -366,7 +366,7 @@ struct PokemonStorageSystemData /* 21db */ u8 itemName[20]; /* 21ef */ u8 inBoxMovingMode; /* 21f0 */ u16 field_2200; - /* 21f4 */ struct UnkStorageStruct field_2204[MAX_ITEM_ICONS]; + /* 21f4 */ struct PSS_ItemIconSprite itemIconSprites[MAX_ITEM_ICONS]; /* 2224 */ u16 movingItem; /* 2226 */ u16 field_2236; /* 2228 */ struct PssQuestLogBuffer qlogBuffer; -- cgit v1.2.3 From 9c2e157123903ba18ee51655c42c7304517b37cc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 15 Mar 2020 20:31:31 -0400 Subject: Start documenting PSS --- include/pokemon_storage_system_internal.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 4a1cda7aa..ea76354c6 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -171,16 +171,16 @@ struct UnkPSSStruct_2002370 { struct Sprite *unk_0000; struct Sprite *unk_0004[4]; - u32 unk_0014[3]; + u32 unk_0014[3]; // unused struct Sprite *unk_0020[2]; - u8 filler_0028[0x200]; - u8 unk_0228[20]; - u32 unk_023c; - u16 unk_0240; - u16 unk_0242; + u8 buffer[0x200]; // passed but not used + u8 strbuf[20]; + bool32 loadPal; + u16 tilesTag; + u16 paletteTag; u8 curBox; - u8 unk_0245; - u8 unk_0246; + u8 unk_0245; // unused + u8 subpriority; }; struct StorageMenu @@ -393,11 +393,11 @@ void BoxMonAtToMon(u8 boxId, u8 boxPosition, struct Pokemon * dst); void SetBoxMonAt(u8 boxId, u8 boxPosition, struct BoxPokemon * src); void Cb2_ExitPSS(void); -void sub_808C8FC(void); +void FreeBoxSelectionPopupSpriteGfx(void); void sub_808C940(u8 curBox); void sub_808C950(void); u8 HandleBoxChooseSelectionInput(void); -void sub_808C854(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal); +void LoadBoxSelectionPopupSpriteGfx(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal); void SetCurrentBoxMonData(u8 boxPosition, s32 request, const void *value); u32 GetCurrentBoxMonData(u8 boxPosition, s32 request); u32 GetAndCopyBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request, void *dst); -- cgit v1.2.3 From db3e992fc3de6a212752aa1a4148ee42414f2322 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 16 Mar 2020 08:23:01 -0400 Subject: Address review comments; doc pc_screen_effect --- include/pc_screen_effect.h | 8 ++++---- include/pokemon_storage_system_internal.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/pc_screen_effect.h b/include/pc_screen_effect.h index 6d68de2d3..7bb190774 100644 --- a/include/pc_screen_effect.h +++ b/include/pc_screen_effect.h @@ -1,9 +1,9 @@ #ifndef GUARD_PC_SCREEN_EFFECT_H #define GUARD_PC_SCREEN_EFFECT_H -void sub_80A0A48(u16, u16, u8); -void sub_80A0A70(u16, u16, u8); -bool8 sub_80A0AAC(void); -bool8 sub_80A0A98(void); +void BeginPCScreenEffect_TurnOn(u16 xspeed, u16 yspeed, u8 priority); +void BeginPCScreenEffect_TurnOff(u16 xspeed, u16 yspeed, u8 priority); +bool8 IsPCScreenEffectRunning_TurnOff(void); +bool8 IsPCScreenEffectRunning_TurnOn(void); #endif //GUARD_PC_SCREEN_EFFECT_H diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index ea76354c6..ba109640b 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -382,7 +382,7 @@ struct PokemonStorageSystemData /* 5abc */ u8 field_5AC4[0x800]; }; // size=62bc -extern struct PokemonStorageSystemData *sPSSData; +extern struct PokemonStorageSystemData *gPSSData; void Cb2_EnterPSS(u8 a0); u8 GetCurrentBoxOption(void); -- cgit v1.2.3