FieldObjectSetDirection

This commit is contained in:
scnorton
2017-09-10 17:04:37 -04:00
parent 69a1ff984d
commit b263dcc7cf
2 changed files with 12 additions and 39 deletions

View File

@@ -1478,3 +1478,15 @@ u8 obj_unfreeze(struct Sprite *sprite, s16 x, s16 y, u8 subpriority)
}
return MAX_SPRITES;
}
void FieldObjectSetDirection(struct MapObject *mapObject, u8 direction)
{
s8 d2;
mapObject->mapobj_unk_20 = mapObject->mapobj_unk_18;
if (!mapObject->mapobj_bit_9)
{
d2 = direction;
mapObject->mapobj_unk_18 = d2;
}
mapObject->placeholder18 = direction;
}