summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-09-16 21:52:55 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-09-16 21:52:55 -0400
commitbd48354207282b2948a2198fec35ae36aaa89f7a (patch)
treec9b88637a1090b182c443af064e0c29144a3917d /src
parent76b68e039dc6cebee6da0f421be630f96ff75d2d (diff)
sub_8092F88
Diffstat (limited to 'src')
-rwxr-xr-xsrc/field_map_obj.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/field_map_obj.c b/src/field_map_obj.c
index d52bd86f7..4592c4dfe 100755
--- a/src/field_map_obj.c
+++ b/src/field_map_obj.c
@@ -3796,6 +3796,37 @@ void sub_8092F60(u8 direction, s16 *x, s16 *y)
*y += gUnknown_0850DB7C[direction].y << 4;
}
+void sub_8092F88(u32 dirn, s16 *x, s16 *y, s16 dx, s16 dy)
+{
+ u8 direction;
+ s16 dx_2;
+ s16 dy_2;
+ s16 cur_x;
+ s16 cur_y;
+
+ direction = dirn;
+ dx_2 = dx;
+ dy_2 = dy;
+ cur_x = gUnknown_0850DB7C[direction].x;
+ if (cur_x > 0)
+ {
+ *x += dx_2;
+ }
+ if (cur_x < 0)
+ {
+ *x -= dx_2;
+ }
+ cur_y = gUnknown_0850DB7C[direction].y;
+ if (cur_y > 0)
+ {
+ *y += dy_2;
+ }
+ if (cur_y < 0)
+ {
+ *y -= dy_2;
+ }
+}
+
asm(".section .text.get_face_direction_anim_id");
void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *);