summaryrefslogtreecommitdiff
path: root/src/dungeon_action.c
blob: 9034e4c01267972f1fb7e3f010d3486e30b87c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#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)
{
    actionPointer->action = 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;
}