From 9b98055ecc5174e92c1cf4bcad8f7a1ecc317581 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 13:46:21 -0400 Subject: [PATCH] PlayerObjectTurn --- asm/field_map_obj.s | 17 ----------------- include/field_map_obj.h | 2 +- src/field_map_obj.c | 5 +++++ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index e4e4850dc3..18d5d3ed5c 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,23 +5,6 @@ .text - thumb_func_start sub_808E5D4 -sub_808E5D4: @ 808E5D4 - push {lr} - lsls r1, 24 - lsrs r1, 24 - ldrb r2, [r0, 0x5] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - bl FieldObjectTurn - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E5D4 - thumb_func_start get_berry_tree_graphics @ void get_berry_tree_graphics(npc_state *npcState, struct obj *obj) get_berry_tree_graphics: @ 808E5F4 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 34e8d4ac03..97c55f12a9 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -35,7 +35,7 @@ void sub_8093038(s16, s16, s16 *, s16 *); void CameraObjectReset1(void); void FieldObjectSetGraphicsId(struct MapObject *, u8); void FieldObjectTurn(struct MapObject *, u8); -void FieldObjectTurnByLocalIdAndMap(u8, u8, u8); +void FieldObjectTurnByLocalIdAndMap(u8, u8, u8, u8); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 55f1fd9fbe..4d5efd1b95 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -973,3 +973,8 @@ void FieldObjectTurnByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 direc FieldObjectTurn(&gMapObjects[mapObjectId], direction); } } + +void PlayerObjectTurn(struct PlayerAvatar *playerAvatar, u8 direction) +{ + FieldObjectTurn(&gMapObjects[playerAvatar->mapObjectId], direction); +}