diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2022-02-17 21:45:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-17 21:45:57 -0800 |
commit | 3555fb7c945ef5152910a84390ecbd1a38ea585d (patch) | |
tree | 4237c0ab086005ea05539b8de7c10b867eec43db /src/targeting.c | |
parent | 1d64db5214b455bbd6f50ad6369ec04420e03984 (diff) | |
parent | ece475a4804a64790cfa86dfa0ba577a732adee8 (diff) |
Merge pull request #96 from AnonymousRandomPerson/master
Attack AI decomp
Diffstat (limited to 'src/targeting.c')
-rw-r--r-- | src/targeting.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/targeting.c b/src/targeting.c new file mode 100644 index 0000000..b77fb35 --- /dev/null +++ b/src/targeting.c @@ -0,0 +1,11 @@ +#include "global.h" +#include "targeting.h" + +#include "dungeon_util.h" + +void TargetTileInFront(struct DungeonEntity *pokemon) +{ + struct DungeonEntityData *pokemonData = pokemon->entityData; + pokemonData->targetPosition.x = pokemon->posWorld.x + gAdjacentTileOffsets[pokemonData->action.facingDir].x; + pokemonData->targetPosition.y = pokemon->posWorld.y + gAdjacentTileOffsets[pokemonData->action.facingDir].y; +} |