From edd5c81a8ee249625dbd015c80e0e0442776bde9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 18:24:58 -0400 Subject: sub_8092AF8 --- src/field_map_obj.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src') diff --git a/src/field_map_obj.c b/src/field_map_obj.c index f47639a9e..2987c09ee 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3539,6 +3539,8 @@ dirn2anim(sub_8092A1C, gUnknown_0850DB38) dirn2anim(sub_8092A2C, gUnknown_0850DB41) dirn2anim(get_run_image_anim_num, gUnknown_0850DB4A) +// file boundary? + struct UnkStruct_085094AC { const union AnimCmd *const *anims; u8 animPos[4]; @@ -3605,6 +3607,25 @@ void obj_npc_animation_step(struct MapObject *mapObject, struct Sprite *sprite, } } +// file boundary? + +u8 sub_8092AF8(s16 x1, s16 y1, s16 x2, s16 y2) +{ + if (x1 > x2) + { + return DIR_WEST; + } + if (x1 < x2) + { + return DIR_EAST; + } + if (y1 > y2) + { + return DIR_NORTH; + } + return DIR_SOUTH; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); -- cgit v1.2.3