From 511474cc15f8c7f52d4311b82898ee5c331b1260 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 14:20:13 -0400 Subject: FieldObjectHandleDynamicGraphicsId --- src/field_map_obj.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 775a7b4e4..c8d25341f 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -27,7 +27,7 @@ static void sub_808D450(void); static u8 GetFieldObjectIdByLocalId(u8); static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); -/*static*/ void FieldObjectHandleDynamicGraphicsId(struct MapObject *); +static void FieldObjectHandleDynamicGraphicsId(struct MapObject *); static void RemoveFieldObjectInternal (struct MapObject *); /*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8); /*static*/ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); @@ -1027,3 +1027,11 @@ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8 graphicsId) } return gFieldObjectGraphicsInfoPointers[graphicsId]; } + +static void FieldObjectHandleDynamicGraphicsId(struct MapObject *mapObject) +{ + if (mapObject->graphicsId >= SPRITE_VAR) + { + mapObject->graphicsId = VarGetFieldObjectGraphicsId(mapObject->graphicsId - SPRITE_VAR); + } +} -- cgit v1.2.3