From 7c8991842f10cce925a5b3a23f3887a0bb41ecb5 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 23:52:50 -0400 Subject: [PATCH] do_run_anim --- asm/field_map_obj.s | 25 ------------------------- src/field_map_obj.c | 6 ++++++ 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index cd71451600..7aa32c8629 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,31 +5,6 @@ .text - thumb_func_start do_run_anim -@ void do_run_anim(struct npc_state *fieldObject, struct obj *object, u8 direction) -do_run_anim: @ 8093A88 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r2, 24 - lsrs r2, 24 - movs r3, 0x1 - bl npc_apply_direction - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl get_run_image_anim_num - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl npc_apply_anim_looping - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end do_run_anim - thumb_func_start npc_obj_ministep_stop_on_arrival @ bool8 npc_obj_ministep_stop_on_arrival(struct npc_state *fieldObject, struct obj *object) npc_obj_ministep_stop_on_arrival: @ 8093AB8 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0e9086d337..5e32d7330d 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4183,3 +4183,9 @@ void do_go_anim(struct MapObject *mapObject, struct Sprite *sprite, u8 direction npc_apply_direction(mapObject, sprite, direction, speed); npc_apply_anim_looping(mapObject, sprite, functions[speed](mapObject->mapobj_unk_18)); } + +void do_run_anim(struct MapObject *mapObject, struct Sprite *sprite, u8 direction) +{ + npc_apply_direction(mapObject, sprite, direction, 1); + npc_apply_anim_looping(mapObject, sprite, get_run_image_anim_num(mapObject->mapobj_unk_18)); +}