npc_by_local_id_and_map_set_field_1_bit_x20

This commit is contained in:
scnorton
2017-09-08 14:36:58 -04:00
parent 511474cc15
commit 67955bb51a
3 changed files with 12 additions and 43 deletions

View File

@@ -30,7 +30,6 @@ static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *);
static void FieldObjectHandleDynamicGraphicsId(struct MapObject *);
static void RemoveFieldObjectInternal (struct MapObject *);
/*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8);
/*static*/ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8);
void sub_8096518(struct MapObject *, struct Sprite *);
static void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **);
/*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *);
@@ -1035,3 +1034,13 @@ static void FieldObjectHandleDynamicGraphicsId(struct MapObject *mapObject)
mapObject->graphicsId = VarGetFieldObjectGraphicsId(mapObject->graphicsId - SPRITE_VAR);
}
}
void npc_by_local_id_and_map_set_field_1_bit_x20(u8 localId, u8 mapNum, u8 mapGroup, u8 state)
{
u8 mapObjectId;
if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId))
{
gMapObjects[mapObjectId].mapobj_bit_13 = state;
}
}