summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/field_map_obj.c10
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);
+ }
+}