diff options
author | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-01-13 23:18:59 -0500 |
---|---|---|
committer | AnonymousRandomPerson <chenghanngan.us@gmail.com> | 2022-01-13 23:18:59 -0500 |
commit | afbc7deaea1d66d39331bc078d3f2e22cbdec0a3 (patch) | |
tree | 22cbd16fe6ddd64f686ecc02499ad648162bf964 /src/dungeon_action.c | |
parent | 453618864e685eacae640dc2b317a645422264e2 (diff) |
Decomped SetWalkAction()
Diffstat (limited to 'src/dungeon_action.c')
-rw-r--r-- | src/dungeon_action.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/dungeon_action.c b/src/dungeon_action.c index 6d8fcb3..9034e4c 100644 --- a/src/dungeon_action.c +++ b/src/dungeon_action.c @@ -1,6 +1,9 @@ #include "global.h" #include "dungeon_action.h" + +#include "constants/dungeon_action.h" #include "dungeon_entity.h" +#include "pokemon.h" void SetAction(struct DungeonActionContainer *actionPointer, u16 action) { @@ -8,3 +11,17 @@ void SetAction(struct DungeonActionContainer *actionPointer, u16 action) actionPointer->actionUseIndex = 0; actionPointer->unkC = 0; } + +void SetWalkAction(struct DungeonActionContainer *actionPointer, s16 species) +{ + if (GetIsMoving(species)) + { + actionPointer->action = DUNGEON_ACTION_WALK; + } + else + { + actionPointer->action = DUNGEON_ACTION_WAIT; + } + actionPointer->actionUseIndex = 0; + actionPointer->unkC = 0; +} |