diff options
Diffstat (limited to 'include')
-rwxr-xr-x | include/ewram.h | 1 | ||||
-rw-r--r-- | include/gba/macro.h | 16 | ||||
-rw-r--r-- | include/learn_move.h | 15 | ||||
-rw-r--r-- | include/party_menu.h | 1 | ||||
-rw-r--r-- | include/pokemon.h | 4 | ||||
-rw-r--r-- | include/pokemon_summary_screen.h | 61 |
6 files changed, 95 insertions, 3 deletions
diff --git a/include/ewram.h b/include/ewram.h index 06ea513a3..eacc02cab 100755 --- a/include/ewram.h +++ b/include/ewram.h @@ -207,6 +207,7 @@ extern u8 gSharedMem[]; #define eEggHatchData (struct EggHatchData*)(&gSharedMem[0x18000]) #define ePokedexView1 (struct PokedexView *)(gSharedMem + 0x18000) #define UNK_2018000_STRUCT (*(struct UnknownStruct2018000 *)(gSharedMem + 0x18000)) +#define pssData (*(struct PokemonSummaryScreenStruct *)(gSharedMem + 0x18000)) #define ewram18300 ((u16 *)(gSharedMem + 0x18300)) #define ewram18800 (&gSharedMem[0x18800]) #define ePokedexView2 (struct PokedexView *)(gSharedMem + 0x18800) diff --git a/include/gba/macro.h b/include/gba/macro.h index 1e0254806..a0edf2a49 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -103,6 +103,22 @@ } \ } +#define DmaClearLarge(dmaNum, dest, size, block, bit) \ +{ \ + u32 _size = size; \ + while (1) \ + { \ + DmaFill##bit(dmaNum, 0, dest, (block)); \ + dest += (block); \ + _size -= (block); \ + if (_size <= (block)) \ + { \ + DmaFill##bit(dmaNum, 0, dest, _size); \ + break; \ + } \ + } \ +} + #define DmaCopyLarge16(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 16) #define DmaCopyLarge32(dmaNum, src, dest, size, block) DmaCopyLarge(dmaNum, src, dest, size, block, 32) diff --git a/include/learn_move.h b/include/learn_move.h index 85fbf046e..7a05ea60b 100644 --- a/include/learn_move.h +++ b/include/learn_move.h @@ -1,6 +1,21 @@ #ifndef GUARD_LEARN_MOVE_H #define GUARD_LEARN_MOVE_H +struct ContestMove +{ + u8 effect; + u8 contestCategory:3; + u8 comboStarterId; + u8 comboMoves[4]; +}; + +struct ContestEffect +{ + u8 effectType; + u8 appeal; + u8 jam; +}; + void sub_8132670(void); #endif // GUARD_LEARN_MOVE_H diff --git a/include/party_menu.h b/include/party_menu.h index 304389e78..3998054da 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -216,5 +216,6 @@ void PartyMenuTryGiveMonMail(u8 taskId, TaskFunc func); void sub_806D668(u8 monIndex); void TaughtMove(u8 taskId); void StopTryingToTeachMove_806F588(u8 taskId); +bool8 IsHMMove(u16 move); #endif // GUARD_PARTY_MENU_H diff --git a/include/pokemon.h b/include/pokemon.h index 7fc8e181f..a1c30f1f3 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -578,6 +578,7 @@ void MonRestorePP(struct Pokemon *); u8 *sub_803F378(u16 itemId); +u16 SpeciesToPokedexNum(u16 species); u16 NationalPokedexNumToSpecies(u16 nationalNum); u16 NationalToHoennOrder(u16); u16 SpeciesToNationalPokedexNum(u16); @@ -611,6 +612,9 @@ const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *); bool8 IsPokeSpriteNotFlipped(u16); u8 GetLevelUpMovesBySpecies(u16, u16 *); u8 TryIncrementMonLevel(struct Pokemon *); +bool8 IsShiny(struct Pokemon *mon); + +struct Sprite *sub_80F7920(u16, u16, const u16 *); #endif // GUARD_POKEMON_H diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index c1b99c367..945e810a3 100644 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.h @@ -1,11 +1,65 @@ #ifndef GUARD_POKEMON_SUMMARY_SCREEN_H #define GUARD_POKEMON_SUMMARY_SCREEN_H +#include "main.h" +#include "task.h" + extern const u8 *const gNatureNames[]; -void ShowPokemonSummaryScreen(struct Pokemon *, u8, u8, void (*)(void), int); -void sub_809D9F0(struct Pokemon *party, u8, u8, void *, u32); -void sub_809D9F0(struct Pokemon *, u8, u8, void *, u32); +// The Pokemon Summary Screen can operate in different modes. Certain features, +// such as move re-ordering, are available in the different modes. +enum PokemonSummaryScreenMode +{ + PSS_MODE_NORMAL, + PSS_MODE_MOVES_ONLY, + PSS_MODE_SELECT_MOVE, + PSS_MODE_UNKNOWN, // TODO: this mode might be used by pokemon_storage_system + PSS_MODE_NO_MOVE_ORDER_EDIT, + PSS_MODE_PC_NORMAL, + PSS_MODE_PC_MOVES_ONLY, +}; + +enum PokemonSummaryScreenPage +{ + PSS_PAGE_INFO, + PSS_PAGE_SKILLS, + PSS_PAGE_BATTLE_MOVES, + PSS_PAGE_CONTEST_MOVES, +}; + +struct PokemonSummaryScreenStruct +{ + /*0x00*/ union { + struct Pokemon *partyMons; + struct BoxPokemon *boxMons; + } monList; + /*0x04*/ MainCallback callback; + /*0x08*/ u8 mode; // see enum PokemonSummaryScreenMode + /*0x09*/ u8 monIndex; + /*0x0A*/ u8 maxMonIndex; + /*0x0B*/ u8 page; // enum PokemonSummaryScreenPage + /*0x0C*/ u8 monSpriteId; + /*0x0D*/ u8 ballSpriteId; + /*0x0E*/ bool8 usingPC; + /*0x0F*/ u8 inputHandlingTaskId; + /*0x10*/ struct Pokemon loadedMon; + /*0x74*/ u8 loadGfxState; + /*0x75*/ u8 firstPage; + /*0x76*/ u8 lastPage; + /*0x77*/ u8 unk77; + /*0x78*/ u8 unk78; + /*0x79*/ u8 selectedMoveIndex; + /*0x7A*/ u8 switchMoveIndex; + /*0x7B*/ bool8 disableMoveOrderEditing; + /*0x7C*/ u16 moveToLearn; + /*0x7E*/ u8 headerTextId; // used as index into sPageHeaderTexts + /*0x7F*/ u8 headerActionTextId; // used as index into sPageHeaderTexts + /*0x80*/ u8 bgToggle; + /*0x84*/ TaskFunc unk84; +}; + +void ShowPokemonSummaryScreen(struct Pokemon *, u8, u8, MainCallback, u8); +void ShowSelectMovePokemonSummaryScreen(struct Pokemon *, u8, u8, MainCallback, u16); u8 sub_809FA30(void); u8 pokemon_ailments_get_primary(u32); u8 GetMonStatusAndPokerus(); @@ -14,4 +68,5 @@ u8 *PokemonSummaryScreen_CopyPokemonLevel(u8 *dest, u8 level); u8 PokemonSummaryScreen_CheckOT(struct Pokemon *pokemon); bool8 CheckPartyPokerus(struct Pokemon *, u8); + #endif // GUARD_POKEMON_SUMMARY_SCREEN_H |