summaryrefslogtreecommitdiff
path: root/src/field_map_obj.c
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-09-16 18:24:58 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-09-16 18:24:58 -0400
commitedd5c81a8ee249625dbd015c80e0e0442776bde9 (patch)
tree9a0d06b043f6d1549af5ff3433fe1acf9e964627 /src/field_map_obj.c
parent589c34e30aa30236b13b7f6621808aca581675c3 (diff)
sub_8092AF8
Diffstat (limited to 'src/field_map_obj.c')
-rwxr-xr-xsrc/field_map_obj.c21
1 files changed, 21 insertions, 0 deletions
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 *);