unref_sub_808EAC4

This commit is contained in:
PikalaxALT 2017-09-08 21:25:20 -04:00
parent b639ca3b15
commit 43c3b9fdff
2 changed files with 8 additions and 20 deletions

View File

@ -5,26 +5,6 @@
.text
thumb_func_start sub_808EAC4
sub_808EAC4: @ 808EAC4
push {r4,lr}
ldrh r3, [r0, 0x10]
strh r3, [r0, 0x14]
ldrh r4, [r0, 0x12]
strh r4, [r0, 0x16]
lsls r1, 16
asrs r1, 16
adds r1, r3
strh r1, [r0, 0x10]
lsls r2, 16
asrs r2, 16
adds r2, r4
strh r2, [r0, 0x12]
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_808EAC4
thumb_func_start npc_coords_shift
@ void npc_coords_shift(struct npc_state *fieldObject, u16 x, u16 y)
npc_coords_shift: @ 808EAE4

View File

@ -1217,3 +1217,11 @@ static void sub_808EAB0(u16 tag, u8 slot)
{
pal_patch_for_npc(tag, slot);
}
void unref_sub_808EAC4(struct MapObject *mapObject, s16 x, s16 y)
{
mapObject->coords3.x = mapObject->coords2.x;
mapObject->coords3.y = mapObject->coords2.y;
mapObject->coords2.x = x + mapObject->coords3.x;
mapObject->coords2.y = y + mapObject->coords3.y;
}