From 019935fb73b7a065c735045a80d5124132ee6e5e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 8 Sep 2017 21:28:22 -0400 Subject: [PATCH] npc_coords_set --- asm/field_map_obj.s | 14 -------------- src/field_map_obj.c | 8 ++++++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f0cd4f07be..fb93b5333e 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,20 +5,6 @@ .text - thumb_func_start npc_coords_set -@ void npc_coords_set(struct npc_state *fieldObject, u16 x, u16 y) -npc_coords_set: @ 808EAF4 - lsls r1, 16 - lsrs r1, 16 - lsls r2, 16 - lsrs r2, 16 - strh r1, [r0, 0x14] - strh r2, [r0, 0x16] - strh r1, [r0, 0x10] - strh r2, [r0, 0x12] - bx lr - thumb_func_end npc_coords_set - thumb_func_start sub_808EB08 sub_808EB08: @ 808EB08 push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 6298c977b0..c7d9e32d75 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1234,3 +1234,11 @@ void npc_coords_shift(struct MapObject *mapObject, s16 x, s16 y) mapObject->coords2.y = y; } +/*static*/ void npc_coords_set(struct MapObject *mapObject, s16 x, s16 y) +{ + mapObject->coords3.x = x; + mapObject->coords3.y = y; + mapObject->coords2.x = x; + mapObject->coords2.y = y; +} +