From 119c0e96b58b33c0b72ad2a209b42e7aa93cdf19 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 18:04:26 -0400 Subject: [PATCH] sub_8092A4C --- asm/field_map_obj.s | 25 ------------------------- src/field_map_obj.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 0a043682b5..06c18eb2c5 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,31 +5,6 @@ .text - thumb_func_start sub_8092A4C -sub_8092A4C: @ 8092A4C - push {lr} - adds r2, r0, 0 - ldr r1, =gUnknown_085094AC - b _08092A64 - .pool -_08092A58: - ldr r0, [r1] - cmp r0, r2 - bne _08092A62 - adds r0, r1, 0 - b _08092A6C -_08092A62: - adds r1, 0x8 -_08092A64: - ldr r0, [r1] - cmp r0, 0 - bne _08092A58 - movs r0, 0 -_08092A6C: - pop {r1} - bx r1 - thumb_func_end sub_8092A4C - thumb_func_start npc_apply_anim_looping @ void npc_apply_anim_looping(struct npc_state *fieldObject, struct obj *object, u8 anim) npc_apply_anim_looping: @ 8092A70 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 8bb20abb40..7caa6d03d1 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3539,6 +3539,27 @@ dirn2anim(sub_8092A1C, gUnknown_0850DB38) dirn2anim(sub_8092A2C, gUnknown_0850DB41) dirn2anim(get_run_image_anim_num, gUnknown_0850DB4A) +struct UnkStruct_085094AC { + const union AnimCmd **unk00; + u8 unk04[4]; +}; + +extern const struct UnkStruct_085094AC gUnknown_085094AC[]; + +const struct UnkStruct_085094AC *sub_8092A4C(const union AnimCmd **a0) +{ + const struct UnkStruct_085094AC *retval; + + for (retval = gUnknown_085094AC; retval->unk00 != NULL; retval ++) + { + if (retval->unk00 == a0) + { + return retval; + } + } + return NULL; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *);