diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/battle.h | 2 | ||||
-rw-r--r-- | include/battle_anim.h | 4 | ||||
-rw-r--r-- | include/decompress.h | 2 | ||||
-rw-r--r-- | include/global.h | 14 | ||||
-rw-r--r-- | include/pokedex.h | 12 | ||||
-rw-r--r-- | include/pokemon.h | 8 | ||||
-rw-r--r-- | include/rom_8077ABC.h | 16 |
7 files changed, 41 insertions, 17 deletions
diff --git a/include/battle.h b/include/battle.h index 2b6773660..7850a9dd6 100644 --- a/include/battle.h +++ b/include/battle.h @@ -795,7 +795,7 @@ void BattleTurnPassed(void); // asm/battle_2.o void sub_8012324(void); void sub_8012FBC(u8, u8); -u8 b_first_side(u8, u8, u8); +u8 GetWhoStrikesFirst(u8, u8, u8); void TurnValuesCleanUp(u8); void SpecialStatusesClear(void); void sub_80138F0(void); diff --git a/include/battle_anim.h b/include/battle_anim.h index 48ceece21..2386c515c 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -53,14 +53,14 @@ struct UnknownStruct3 }; void DoMoveAnim(const u8 *const moveAnims[], u16 b, u8 c); -bool8 b_side_obj__get_some_boolean(u8 a); +bool8 IsAnimBankSpriteVisible(u8 a); void sub_8076034(u8, u8); bool8 IsContest(void); void battle_anim_clear_some_data(void); void move_anim_8072740(struct Sprite *sprite); void DestroyAnimVisualTask(u8 task); void DestroyAnimVisualTask(u8 task); -bool8 b_side_obj__get_some_boolean(u8); +bool8 IsAnimBankSpriteVisible(u8); u8 IsContest(); diff --git a/include/decompress.h b/include/decompress.h index 84c1f29c0..01f66971c 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -3,7 +3,7 @@ #include "sprite.h" -void sub_800D238(const void *src, void *dest); +void LZDecompressWram(const void *src, void *dest); void LZDecompressVram(const void *src, void *dest); void LoadCompressedObjectPic(const struct CompressedSpriteSheet *a); void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *a, void *buffer); diff --git a/include/global.h b/include/global.h index ac28507e8..5ca331bf1 100644 --- a/include/global.h +++ b/include/global.h @@ -37,6 +37,7 @@ fndec\ #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) +#define POKEMON_SLOTS_NUMBER 412 #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 @@ -613,6 +614,11 @@ struct RecordMixingGift struct RecordMixingGiftData data; }; +// there should be enough flags for all 412 slots +// each slot takes up 8 flags +// if the value is not divisible by 8, we need to account for the reminder as well +#define DEX_FLAGS_NO ((POKEMON_SLOTS_NUMBER / 8) + ((POKEMON_SLOTS_NUMBER % 8) ? 1 : 0)) + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -639,7 +645,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x640*/ struct ItemSlot bagPocket_TMHM[64]; /*0x740*/ struct ItemSlot bagPocket_Berries[46]; /*0x7F8*/ struct Pokeblock pokeblocks[40]; - /*0x938*/ u8 unk938[52]; // pokedex related + /*0x938*/ u8 dexSeen2[DEX_FLAGS_NO]; /*0x96C*/ u16 berryBlenderRecords[3]; /*0x972*/ u8 filler_972[0x6]; /*0x978*/ u16 trainerRematchStepCounter; @@ -695,7 +701,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x3160*/ struct EnigmaBerry enigmaBerry; /*0x3690*/ struct RamScript ramScript; /*0x3A7C*/ struct RecordMixingGift recordMixingGift; - /*0x3A8C*/ u8 unk3A8C[52]; //pokedex related + /*0x3A8C*/ u8 dexSeen3[DEX_FLAGS_NO]; }; extern struct SaveBlock1 gSaveBlock1; @@ -717,8 +723,8 @@ struct Pokedex /*0x04*/ u32 unownPersonality; // set when you first see Unown /*0x08*/ u32 spindaPersonality; // set when you first see Spinda /*0x0C*/ u32 unknown3; - /*0x10*/ u8 owned[52]; - /*0x44*/ u8 seen[52]; + /*0x10*/ u8 owned[DEX_FLAGS_NO]; + /*0x44*/ u8 seen[DEX_FLAGS_NO]; }; struct SaveBlock2_Sub diff --git a/include/pokedex.h b/include/pokedex.h index 1bc63a4ff..c47494e1f 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -9,7 +9,17 @@ void CB2_InitPokedex(void); u8 sub_809070C(u16 dexNum, u32 b, u32 c); const u8 *GetPokemonCategory(u16); u16 GetPokedexHeightWeight(u16 dexNum, u8 data); -s8 GetNationalPokedexFlag(u16, u8); + +enum +{ + FLAG_GET_SEEN, + FLAG_GET_CAUGHT, + FLAG_SET_SEEN, + FLAG_SET_CAUGHT +}; + +s8 GetSetPokedexFlag(u16, u8); + u16 GetNationalPokedexCount(u8); u16 GetHoennPokedexCount(u8); bool8 sub_8090FC0(void); diff --git a/include/pokemon.h b/include/pokemon.h index 5d76a8a05..67f56eb53 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -393,7 +393,7 @@ struct BaseStats /*0x17*/ u8 ability2; /*0x18*/ u8 safariZoneFleeRate; /*0x19*/ u8 bodyColor:7; - u8 unk19_7:1; + u8 noFlip:1; }; struct BattleMove @@ -591,9 +591,9 @@ u8 sub_8040574(struct Pokemon *party); void ClearBattleMonForms(void); void sub_80408BC(); void current_map_music_set__default_for_battle(u16); -const u8 *pokemon_get_pal(struct Pokemon *mon); -const u8 *species_and_otid_get_pal(u16, u32, u32); -const struct CompressedSpritePalette *sub_80409C8(u16, u32, u32); +const u8 *GetMonSpritePal(struct Pokemon *mon); +const u8 *GetMonSpritePalFromOtIdPersonality(u16, u32, u32); +const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u16, u32, u32); bool8 IsOtherTrainer(u32, u8 *); void sub_8040B8C(void); void SetWildMonHeldItem(void); diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h index 11e94e1f5..7e2cf4cee 100644 --- a/include/rom_8077ABC.h +++ b/include/rom_8077ABC.h @@ -4,10 +4,18 @@ #include "sprite.h" #include "task.h" +enum +{ + ANIM_BANK_ATK, + ANIM_BANK_DEF, + ANIM_BANK_ATK_PARTNER, + ANIM_BANK_DEF_PARTNER +}; + u8 sub_8077ABC(u8, u8); u8 sub_8077E44(u8 slot, u16 species, u8 a3); -u8 obj_id_for_side_relative_to_move(u8 side); -void oamt_set_x3A_32(struct Sprite *sprite, void(*callback)(struct Sprite *)); +u8 GetAnimBankSpriteId(u8 side); +void StoreSpriteCallbackInData6(struct Sprite *sprite, void(*callback)(struct Sprite *)); void sub_8078314(struct Sprite *sprite); void sub_8078364(struct Sprite *sprite); void sub_8078458(struct Sprite *sprite); @@ -22,8 +30,8 @@ u8 GetBankIdentity(u8 slot); u8 GetBankByPlayerAI(u8); u8 GetBankByPlayerAI(u8); u8 GetBankByPlayerAI(u8 state); -u8 sub_8078874(u8); -bool8 sub_8078874(u8); +u8 AnimBankSpriteExists(u8); +bool8 AnimBankSpriteExists(u8); bool8 IsDoubleBattle(); u8 IsDoubleBattle(void); bool8 IsDoubleBattle(void); |