diff options
author | scnorton <scnorton@biociphers.org> | 2017-09-08 14:20:13 -0400 |
---|---|---|
committer | scnorton <scnorton@biociphers.org> | 2017-09-08 14:20:13 -0400 |
commit | 511474cc15f8c7f52d4311b82898ee5c331b1260 (patch) | |
tree | 0a5e06b5f7eebb0e024745ac53759b1afe672cbf /src | |
parent | e0b2e6cdbf0ff124a8e6a83f580418a06cee9df7 (diff) |
FieldObjectHandleDynamicGraphicsId
Diffstat (limited to 'src')
-rw-r--r-- | src/field_map_obj.c | 10 |
1 files changed, 9 insertions, 1 deletions
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); + } +} |