From c63ae1297f6c12331ff8c01fc273cff22577a92b Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 16 Mar 2025 17:10:01 +0100 Subject: [PATCH] merge targeting with code_805D8C8 --- ld_script.txt | 1 - src/code_805D8C8.c | 8 ++++++++ src/targeting.c | 11 ----------- 3 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 src/targeting.c diff --git a/ld_script.txt b/ld_script.txt index 8dc6cd469..628693212 100755 --- a/ld_script.txt +++ b/ld_script.txt @@ -234,7 +234,6 @@ SECTIONS { src/dungeon_menu_recruitment.o(.text); src/code_8066D04.o(.text); src/code_805D8C8.o(.text); - src/targeting.o(.text); src/code_8069E0C.o(.text); src/code_806CD90.o(.text); src/type_effectiveness.o(.text); diff --git a/src/code_805D8C8.c b/src/code_805D8C8.c index c5d572d33..9ccf59c33 100644 --- a/src/code_805D8C8.c +++ b/src/code_805D8C8.c @@ -1050,3 +1050,11 @@ void sub_8069D4C(struct unkStruct_8069D4C *r0, Entity *target) r0->maxBelly = info->maxBelly; r0->hiddenPower = info->hiddenPower; } + +void TargetTileInFront(Entity *pokemon) +{ + EntityInfo *pokemonInfo = GetEntInfo(pokemon); + pokemonInfo->targetPos.x = pokemon->pos.x + gAdjacentTileOffsets[pokemonInfo->action.direction].x; + pokemonInfo->targetPos.y = pokemon->pos.y + gAdjacentTileOffsets[pokemonInfo->action.direction].y; +} + diff --git a/src/targeting.c b/src/targeting.c deleted file mode 100644 index 439dac0cc..000000000 --- a/src/targeting.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "global.h" -#include "targeting.h" - -#include "dungeon_util.h" - -void TargetTileInFront(Entity *pokemon) -{ - EntityInfo *pokemonInfo = GetEntInfo(pokemon); - pokemonInfo->targetPos.x = pokemon->pos.x + gAdjacentTileOffsets[pokemonInfo->action.direction].x; - pokemonInfo->targetPos.y = pokemon->pos.y + gAdjacentTileOffsets[pokemonInfo->action.direction].y; -}