diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2022-01-20 15:26:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 15:26:19 -0800 |
commit | 408fe77d7b9440d7eb5d46eda5f920572d516d67 (patch) | |
tree | 38953616b74da130bd832635bed1c605d4b0e322 /include | |
parent | 3cdde2a92a187d437dc7d24273177b59ab5b9511 (diff) | |
parent | c5cd6e137fbad180a21ec24a50fde76633db0c20 (diff) |
Merge pull request #93 from AnonymousRandomPerson/master
More AI decomp
Diffstat (limited to 'include')
-rw-r--r-- | include/code_80521D0.h | 8 | ||||
-rw-r--r-- | include/dungeon_action.h | 2 | ||||
-rw-r--r-- | include/dungeon_entity.h | 8 | ||||
-rw-r--r-- | include/position_util.h | 9 | ||||
-rw-r--r-- | include/status_checks.h | 9 | ||||
-rw-r--r-- | include/status_checks_1.h | 11 |
6 files changed, 44 insertions, 3 deletions
diff --git a/include/code_80521D0.h b/include/code_80521D0.h new file mode 100644 index 0000000..588ad9b --- /dev/null +++ b/include/code_80521D0.h @@ -0,0 +1,8 @@ +#ifndef GUARD_CODE_80521D0_H +#define GUARD_CODE_80521D0_H + +#include "dungeon_entity.h" + +void SendMessage(struct DungeonEntity *pokemon, const char message[]); + +#endif diff --git a/include/dungeon_action.h b/include/dungeon_action.h index c3631f7..48f81d5 100644 --- a/include/dungeon_action.h +++ b/include/dungeon_action.h @@ -5,5 +5,7 @@ // 0x44C94 void SetAction(struct DungeonActionContainer *actionPointer, u16 action); +// 0x44CA0 +void SetWalkAction(struct DungeonActionContainer *actionPointer, s16 species); #endif diff --git a/include/dungeon_entity.h b/include/dungeon_entity.h index 640183f..9e9f1f7 100644 --- a/include/dungeon_entity.h +++ b/include/dungeon_entity.h @@ -6,10 +6,12 @@ #include "item.h" #include "position.h" +#define NUM_SPEED_TURN_COUNTERS 5 + struct DungeonActionContainer { /* 0x0 */ u16 action; - /* 0x2 */ s8 facingDir; + /* 0x2 */ u8 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; @@ -167,8 +169,8 @@ struct DungeonEntityData /* 0x104 */ s32 movementSpeed; // The turn counter for movement speed up/down is split into five timers each. Multiple timers are used if the Pokémon is affected by multiple // speed-up/slow effects at once, like using Agility twice. - /* 0x108 */ u8 speedUpTurnsLeft[5]; - /* 0x10D */ u8 slowTurnsLeft[5]; + /* 0x108 */ u8 speedUpTurnsLeft[NUM_SPEED_TURN_COUNTERS]; + /* 0x10D */ u8 slowTurnsLeft[NUM_SPEED_TURN_COUNTERS]; /* 0x112 */ u8 stockpileCount; u8 fill113; // When true, an AI Pokémon will move in a random direction every turn. diff --git a/include/position_util.h b/include/position_util.h new file mode 100644 index 0000000..74019b7 --- /dev/null +++ b/include/position_util.h @@ -0,0 +1,9 @@ +#ifndef GUARD_POSITION_UTIL_H +#define GUARD_POSITION_UTIL_H + +#include "position.h" + +// 0x983D8 +s32 CalculateFacingDir(struct Position *originPos, struct Position *targetPos); + +#endif diff --git a/include/status_checks.h b/include/status_checks.h new file mode 100644 index 0000000..086711d --- /dev/null +++ b/include/status_checks.h @@ -0,0 +1,9 @@ +#ifndef GUARD_STATUS_CHECKS_H +#define GUARD_STATUS_CHECKS_H + +#include "dungeon_entity.h" + +// 0x7001C +bool8 HasStatusAffectingActions(struct DungeonEntity *pokemon); + +#endif diff --git a/include/status_checks_1.h b/include/status_checks_1.h new file mode 100644 index 0000000..486adb2 --- /dev/null +++ b/include/status_checks_1.h @@ -0,0 +1,11 @@ +#ifndef GUARD_STATUS_CHECKS_1_H +#define GUARD_STATUS_CHECKS_1_H + +#include "dungeon_entity.h" + +// 0x70A58 +bool8 HasNegativeStatus(struct DungeonEntity *pokemon); +// 0x70B28 +bool8 IsSleeping(struct DungeonEntity *pokemon); + +#endif |