diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-09-08 21:27:02 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-09-08 21:27:02 -0400 |
commit | 70e982d1fabc62a6d145b1a8dda866931886bb4d (patch) | |
tree | 56e93f3b6f3f2dbace726042ea37e78103867b15 /src | |
parent | 43c3b9fdff01c05860969d80fbc6ae0b0dbbcb90 (diff) |
npc_coords_shift
Diffstat (limited to 'src')
-rw-r--r-- | src/field_map_obj.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/field_map_obj.c b/src/field_map_obj.c index e5025fccf..6298c977b 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1222,6 +1222,15 @@ 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; + mapObject->coords2.x += x; + mapObject->coords2.y += y; } + +void npc_coords_shift(struct MapObject *mapObject, s16 x, s16 y) +{ + mapObject->coords3.x = mapObject->coords2.x; + mapObject->coords3.y = mapObject->coords2.y; + mapObject->coords2.x = x; + mapObject->coords2.y = y; +} + |