diff options
author | Cheng Hann Gan <chenghanngan.us@gmail.com> | 2021-12-09 13:56:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-09 10:56:12 -0800 |
commit | a34c9ab91b553fcb1f72b94eb912b94bea58885b (patch) | |
tree | a31d0805938a56d1552f952db6ec6ab2defdebe5 /include/dungeon_entity.h | |
parent | 4fc272fea6bc7332fae031ebeb12362cff1c35de (diff) |
AI decomp + type cleanup (#82)
* Decomped SetAction()
* Changed MapTile.tileType to u16 bit field
* Decomped FindStraightThrowableTargets()
* Cleaned up CannotAttack()
* Cleaned up some externs
* Converted dungeon action to substruct
Diffstat (limited to 'include/dungeon_entity.h')
-rw-r--r-- | include/dungeon_entity.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/include/dungeon_entity.h b/include/dungeon_entity.h index 63c85d6..ef18c67 100644 --- a/include/dungeon_entity.h +++ b/include/dungeon_entity.h @@ -4,6 +4,20 @@ #include "item.h" #include "constants/move.h" +struct DungeonActionContainer +{ + /* 0x0 */ u16 action; + /* 0x2 */ s8 facingDir; + u8 fill3; + // Additional parameter alongside actionIndex. Used for things like indicating which move a Pokémon should use from its moveset. + /* 0x4 */ u8 actionUseIndex; + u8 fill5[0x8 - 0x5]; + // Position of the Pokémon the last time it threw an item. + /* 0x8 */ s16 lastItemThrowPositionX; + /* 0xA */ s16 lastItemThrowPositionY; + u8 unkC; +}; + struct DungeonEntityData { // This has different purposes for Pokémon, items, and traps. @@ -51,16 +65,8 @@ struct DungeonEntityData u8 fill3F; /* 0x40 */ u8 joinLocation; // Uses the dungeon index in dungeon.h. u8 fill41[0x44 - 0x41]; - /* 0x44 */ u16 action; - /* 0x46 */ s8 facingDir; - u8 fill47; - // Additional parameter alongside actionIndex. Used for things like indiciating which move a Pokémon should use from its moveset. - /* 0x48 */ u8 actionUseIndex; - u8 fill49[0x4C - 0x49]; - // Position of the Pokémon the last time it threw an item. - /* 0x4C */ s16 lastItemThrowPositionX; - /* 0x4E */ s16 lastItemThrowPositionY; - u8 fill50[0x58 - 0x50]; + /* 0x44 */ struct DungeonActionContainer action; + u8 fill55[0x58 - 0x55]; // Position of the target that the Pokémon wants throw an item at. /* 0x58 */ s16 *itemTargetPosition; /* 0x5C */ u8 type1; |