From 76b68e039dc6cebee6da0f421be630f96ff75d2d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 21:45:18 -0400 Subject: [PATCH] MoveCoordsPixel --- asm/field_map_obj.s | 23 ----------------------- src/field_map_obj.c | 6 ++++++ 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index bb612f3d57..ffc55dd34e 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,29 +5,6 @@ .text - thumb_func_start sub_8092F60 -sub_8092F60: @ 8092F60 - push {r4,lr} - lsls r0, 24 - ldr r3, =gUnknown_0850DB7C - lsrs r0, 22 - adds r0, r3 - ldrh r3, [r0] - lsls r3, 4 - ldrh r4, [r1] - adds r3, r4 - strh r3, [r1] - ldrh r0, [r0, 0x2] - lsls r0, 4 - ldrh r1, [r2] - adds r0, r1 - strh r0, [r2] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8092F60 - thumb_func_start sub_8092F88 sub_8092F88: @ 8092F88 push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 56281a10d7..d52bd86f76 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3790,6 +3790,12 @@ void MoveCoords(u8 direction, s16 *x, s16 *y) *y += gUnknown_0850DB7C[direction].y; } +void sub_8092F60(u8 direction, s16 *x, s16 *y) +{ + *x += gUnknown_0850DB7C[direction].x << 4; + *y += gUnknown_0850DB7C[direction].y << 4; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *);