diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 53565e334d..def08bb9c3 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,21 +5,6 @@ .text - thumb_func_start FieldObjectGetLocalIdAndMap -@ void FieldObjectGetLocalIdAndMap(struct npc_state *fieldObject, u8 *localId, u8 *mapId, u8 *mapGroupId) -FieldObjectGetLocalIdAndMap: @ 808E748 - push {r4,lr} - ldrb r4, [r0, 0x8] - strb r4, [r1] - ldrb r1, [r0, 0x9] - strb r1, [r2] - ldrb r0, [r0, 0xA] - strb r0, [r3] - pop {r4} - pop {r0} - bx r0 - thumb_func_end FieldObjectGetLocalIdAndMap - thumb_func_start sub_808E75C sub_808E75C: @ 808E75C push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index bac056ee67..94e2fb694d 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1044,3 +1044,10 @@ void npc_by_local_id_and_map_set_field_1_bit_x20(u8 localId, u8 mapNum, u8 mapGr gMapObjects[mapObjectId].mapobj_bit_13 = state; } } + +void FieldObjectGetLocalIdAndMap(struct MapObject *mapObject, u8 *localId, u8 *mapNum, u8 *mapGroup) +{ + *localId = mapObject->localId; + *mapNum = mapObject->mapNum; + *mapGroup = mapObject->mapGroup; +}