FieldObjectMoveDestCoords

This commit is contained in:
PikalaxALT 2017-09-16 22:27:04 -04:00
parent eb41c57ecd
commit 64d3a67b0c
2 changed files with 10 additions and 19 deletions

View File

@ -5,25 +5,6 @@
.text
thumb_func_start FieldObjectMoveDestCoords
@ void FieldObjectMoveDestCoords(struct npc_state *fieldObject, u8 direction)
FieldObjectMoveDestCoords: @ 809316C
push {r4,lr}
lsls r1, 24
lsrs r1, 24
ldrh r4, [r0, 0x10]
strh r4, [r2]
ldrh r0, [r0, 0x12]
strh r0, [r3]
adds r0, r1, 0
adds r1, r2, 0
adds r2, r3, 0
bl MoveCoords
pop {r4}
pop {r0}
bx r0
thumb_func_end FieldObjectMoveDestCoords
thumb_func_start FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@ bool8 FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(struct npc_state *fieldObject)
FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive: @ 809318C

View File

@ -3892,6 +3892,16 @@ void GetFieldObjectMovingCameraOffset(s16 *x, s16 *y)
}
}
void FieldObjectMoveDestCoords(struct MapObject *mapObject, u32 dirn, s16 *x, s16 *y)
{
u8 direction;
direction = dirn;
*x = mapObject->coords2.x;
*y = mapObject->coords2.y;
MoveCoords(direction, x, y);
}
asm(".section .text.get_face_direction_anim_id");
void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *);