diff options
author | mid-kid <esteve.varela@gmail.com> | 2021-12-13 15:09:53 +0100 |
---|---|---|
committer | Seth Barberee <seth.barberee@gmail.com> | 2021-12-13 10:44:48 -0600 |
commit | 087405b9d975b447ef7b17afd1e73e449cc7881b (patch) | |
tree | cfd17bc287081c885d6860559a7eddf69b1c6ce0 /include | |
parent | 8213467c2153b4a84cb8b08122dff8418f2d38b7 (diff) |
Dump and document status sprites
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/status.h | 113 | ||||
-rw-r--r-- | include/dungeon_entity.h | 4 | ||||
-rw-r--r-- | include/dungeon_global_data.h | 6 | ||||
-rw-r--r-- | include/dungeon_pokemon_sprites.h | 39 |
4 files changed, 125 insertions, 37 deletions
diff --git a/include/constants/status.h b/include/constants/status.h index 229171f..19b860b 100644 --- a/include/constants/status.h +++ b/include/constants/status.h @@ -8,11 +8,13 @@ #define SLEEP_STATUS_YAWNING 4 #define SLEEP_STATUS_NAPPING 5 +#define NON_VOLATILE_STATUS_NONE 0 #define NON_VOLATILE_STATUS_BURNED 1 #define NON_VOLATILE_STATUS_POISONED 2 #define NON_VOLATILE_STATUS_BADLY_POISONED 3 #define NON_VOLATILE_STATUS_PARALYZED 4 +#define IMMOBILIZE_STATUS_NONE 0 #define IMMOBILIZE_STATUS_FROZEN 1 #define IMMOBILIZE_STATUS_IMMOBILIZED 2 #define IMMOBILIZE_STATUS_WRAPPED_AROUND_FOE 3 @@ -21,68 +23,109 @@ #define IMMOBILIZE_STATUS_PETRIFIED 6 #define IMMOBILIZE_STATUS_SQUEEZED 7 -#define CHARGING_STATUS_NONE 0x0 -#define CHARGING_STATUS_BIDE 0x1 -#define CHARGING_STATUS_SOLARBEAM 0x2 -#define CHARGING_STATUS_SKY_ATTACK 0x3 -#define CHARGING_STATUS_RAZOR_WIND 0x4 -#define CHARGING_STATUS_FOCUS_PUNCH 0x5 -#define CHARGING_STATUS_SKULL_BASH 0x6 -#define CHARGING_STATUS_FLY 0x7 -#define CHARGING_STATUS_BOUNCE 0x8 -#define CHARGING_STATUS_DIVE 0x9 -#define CHARGING_STATUS_DIG 0xA -#define CHARGING_STATUS_CHARGE 0xB -#define CHARGING_STATUS_RAGE 0xC - -#define PROTECTION_STATUS_REFLECT 0x1 -#define PROTECTION_STATUS_SAFEGUARD 0x2 -#define PROTECTION_STATUS_LIGHT_SCREEN 0x3 -#define PROTECTION_STATUS_COUNTER 0x4 -#define PROTECTION_STATUS_MAGIC_COAT 0x5 -#define PROTECTION_STATUS_WISH 0x6 -#define PROTECTION_STATUS_PROTECT 0x7 -#define PROTECTION_STATUS_MIRROR_COAT 0x8 -#define PROTECTION_STATUS_ENDURE 0x9 -#define PROTECTION_STATUS_MINI_COUNTER 0xA -#define PROTECTION_STATUS_MIRROR_MOVE 0xB -#define PROTECTION_STATUS_CONVERSION_2 0xC -#define PROTECTION_STATUS_VITAL_THROW 0xD -#define PROTECTION_STATUS_MIST 0xE +#define VOLATILE_STATUS_NONE 0 +#define VOLATILE_STATUS_CRINGING 1 +#define VOLATILE_STATUS_CONFUSED 2 +#define VOLATILE_STATUS_PAUSED 3 +#define VOLATILE_STATUS_COWERING 4 +#define VOLATILE_STATUS_TAUNTED 5 +#define VOLATILE_STATUS_ENCORE 6 +#define VOLATILE_STATUS_INFATUATED 7 + +#define CHARGING_STATUS_NONE 0 +#define CHARGING_STATUS_BIDE 1 +#define CHARGING_STATUS_SOLARBEAM 2 +#define CHARGING_STATUS_SKY_ATTACK 3 +#define CHARGING_STATUS_RAZOR_WIND 4 +#define CHARGING_STATUS_FOCUS_PUNCH 5 +#define CHARGING_STATUS_SKULL_BASH 6 +#define CHARGING_STATUS_FLY 7 +#define CHARGING_STATUS_BOUNCE 8 +#define CHARGING_STATUS_DIVE 9 +#define CHARGING_STATUS_DIG 10 +#define CHARGING_STATUS_CHARGE 11 +#define CHARGING_STATUS_RAGE 12 + +#define PROTECTION_STATUS_NONE 0 +#define PROTECTION_STATUS_REFLECT 1 +#define PROTECTION_STATUS_SAFEGUARD 2 +#define PROTECTION_STATUS_LIGHT_SCREEN 3 +#define PROTECTION_STATUS_COUNTER 4 +#define PROTECTION_STATUS_MAGIC_COAT 5 +#define PROTECTION_STATUS_WISH 6 +#define PROTECTION_STATUS_PROTECT 7 +#define PROTECTION_STATUS_MIRROR_COAT 8 +#define PROTECTION_STATUS_ENDURE 9 +#define PROTECTION_STATUS_MINI_COUNTER 10 +#define PROTECTION_STATUS_MIRROR_MOVE 11 +#define PROTECTION_STATUS_CONVERSION_2 12 +#define PROTECTION_STATUS_VITAL_THROW 13 +#define PROTECTION_STATUS_MIST 14 +#define WAITING_STATUS_NONE 0 #define WAITING_STATUS_CURSED 1 #define WAITING_STATUS_DECOY 2 #define WAITING_STATUS_SNATCH 3 +#define LINKED_STATUS_NONE 0 #define LINKED_STATUS_LEECH_SEED 1 #define LINKED_STATUS_DESTINY_BOND 2 +#define MOVE_STATUS_NONE 0 #define MOVE_STATUS_SURE_SHOT 1 #define MOVE_STATUS_WHIFFER 2 #define MOVE_STATUS_SET_DAMAGE 3 #define MOVE_STATUS_FOCUS_ENERGY 4 +#define ITEM_STATUS_NONE 0 #define ITEM_STATUS_LONG_TOSS 1 #define ITEM_STATUS_PIERCE 2 +#define TRANSFORM_STATUS_NONE 0 #define TRANSFORM_STATUS_INVISIBLE 1 #define TRANSFORM_STATUS_TRANSFORMED 2 #define TRANSFORM_STATUS_MOBILE 3 +#define EYESIGHT_STATUS_NONE 0 #define EYESIGHT_STATUS_BLINKER 1 #define EYESIGHT_STATUS_CROSS_EYED 2 #define EYESIGHT_STATUS_EYEDROPS 3 -#define VOLATILE_STATUS_CRINGING 1 -#define VOLATILE_STATUS_CONFUSED 2 -#define VOLATILE_STATUS_PAUSED 3 -#define VOLATILE_STATUS_COWERING 4 -#define VOLATILE_STATUS_TAUNTED 5 -#define VOLATILE_STATUS_ENCORE 6 -#define VOLATILE_STATUS_INFATUATED 7 +#define MUZZLED_STATUS_NONE 0 +#define MUZZLED_STATUS_MUZZLED 1 #define TARGETING_DECOY_NONE 0 #define TARGETING_DECOY_TEAM 1 #define TARGETING_DECOY_WILD 2 +#define STATUS_SPRITE_SLEEPLESS (1 << 0) +#define STATUS_SPRITE_BURNED (1 << 1) +#define STATUS_SPRITE_POISONED (1 << 2) +#define STATUS_SPRITE_BADLY_POISONED (1 << 3) +#define STATUS_SPRITE_CONFUSED (1 << 4) +#define STATUS_SPRITE_COWERING (1 << 5) +#define STATUS_SPRITE_TAUNTED (1 << 6) +#define STATUS_SPRITE_ENCORE (1 << 7) +#define STATUS_SPRITE_SHIELD_BLUE (1 << 8) // REFLECT, COUNTER, MINI_COUNTER, MIST +#define STATUS_SPRITE_SHIELD_RED (1 << 9) // SAFEGUARD, MIRROR_COAT +#define STATUS_SPRITE_SHIELD_YELLOW (1 << 10) // LIGHT_SCREEN, MAGIC_COAT +#define STATUS_SPRITE_SHIELD_GREEN (1 << 11) // PROTECT, MIRRO_MOVE, VITAL_THROW +#define STATUS_SPRITE_ENDURE (1 << 12) +#define STATUS_SPRITE_LOWHP (1 << 13) +#define STATUS_SPRITE_CURSED (1 << 14) +#define STATUS_SPRITE_SNATCH (1 << 15) +#define STATUS_SPRITE_SURE_SHOT (1 << 16) +#define STATUS_SPRITE_WHIFFER (1 << 17) +#define STATUS_SPRITE_SET_DAMAGE (1 << 18) +#define STATUS_SPRITE_FOCUS_ENERGY (1 << 19) +#define STATUS_SPRITE_BLINKER (1 << 20) +#define STATUS_SPRITE_CROSS_EYED (1 << 21) +#define STATUS_SPRITE_EYEDROPS (1 << 22) +#define STATUS_SPRITE_MUZZLED (1 << 23) +#define STATUS_SPRITE_GRUDGE (1 << 24) +#define STATUS_SPRITE_EXPOSED (1 << 25) +#define STATUS_SPRITE_SLEEP (1 << 26) +#define STATUS_SPRITE_STAT_DOWN (1 << 27) +#define STATUS_SPRITE_FROZEN (1 << 28) + #endif diff --git a/include/dungeon_entity.h b/include/dungeon_entity.h index 25291e4..b894a2f 100644 --- a/include/dungeon_entity.h +++ b/include/dungeon_entity.h @@ -215,7 +215,9 @@ struct DungeonEntityData /* 0x1FA */ u8 mobileTurnTimer; // When a Pokémon can pass through walls in a hallway, this counts up to 200 before the Pokémon turns in a random direction. u8 fill1FB; /* 0x1FC */ u16 expGainedInTurn; // Used to accumulate experience when multiple enemies are defeated in one turn. - u8 fill1FE[0x208 - 0x1FE]; + u8 fill1FE[0x200 - 0x1FE]; + /* 0x200 */ u32 statusSprites; + u32 unk204; }; // Used for Pokémon, items, and traps. diff --git a/include/dungeon_global_data.h b/include/dungeon_global_data.h index 5cb0c8a..1d0a971 100644 --- a/include/dungeon_global_data.h +++ b/include/dungeon_global_data.h @@ -80,7 +80,11 @@ struct DungeonGlobalData /* 0x1358C */ struct DungeonEntity *wildPokemon[DUNGEON_MAX_WILD_POKEMON]; /* 0x135CC */ struct DungeonEntity *allPokemon[DUNGEON_MAX_POKEMON]; // Contains both team and wild Pokémon /* 0x1361C */ struct DungeonEntity *clientPokemon[2]; // Not sure how large this array is. - u8 fill13624[0x181F8 - 0x13624]; + u8 fill13624[0x181E8 - 0x13624]; + /* 0x181E8 */ struct Position posScreenWorld; + /* 0x181EC */ struct Position prevPosScreenWorld; + /* 0x181F0 */ struct Position posScreenPixel; + /* 0x181F4 */ struct Position prevPosScreenPixel; /* 0x181F8 */ struct DungeonEntity *leader; // Pointer to the team leader. u32 unk181FC; u32 unk18200; diff --git a/include/dungeon_pokemon_sprites.h b/include/dungeon_pokemon_sprites.h new file mode 100644 index 0000000..50595ea --- /dev/null +++ b/include/dungeon_pokemon_sprites.h @@ -0,0 +1,39 @@ +#ifndef GUARD_DUNGEON_POKEMON_SPRITES_H +#define GUARD_DUNGEON_POKEMON_SPRITES_H + +#include "map.h" + +struct DungeonPokemonStatusSprite +{ + u32 status; + u32 frame; +}; + +struct DungeonPokemonSprite +{ + /* 0x0000 */ u8 exists; + /* 0x0004 */ u32 id; + /* 0x0008 */ u16 species; // Or sprite ID? + /* 0x000A */ u16 unkA; + /* 0x000C */ u32 status; + /* 0x0010 */ u8 visible; + /* 0x0011 */ u8 unk11; + /* 0x0014 */ struct Position pos; + /* 0x0018 */ struct Position statusOffsets[2]; + /* 0x0020 */ u32 unk20; + /* 0x0024 */ u32 unk24; + /* 0x0028 */ struct DungeonPokemonStatusSprite statusSprites[2]; + /* 0x0038 */ u8 unk38; + /* 0x003C */ u16 unk3C; + /* 0x003E */ u16 unk3E; +} + +struct DungeonPokemonSprites +{ + u32 frame; + struct DungeonPokemonSprites sprites[22]; +}; + +extern struct DungeonPokemonSprites *gDungeonPokemonSprites; + +#endif |