RemoveFieldObject

This commit is contained in:
scnorton 2017-09-06 17:55:36 -04:00
parent a6269f2f0f
commit 942400ddbf
2 changed files with 7 additions and 14 deletions

View File

@ -5,20 +5,6 @@
.text
thumb_func_start RemoveFieldObject
@ void RemoveFieldObject(npc_state *fieldObject)
RemoveFieldObject: @ 808D8B0
push {lr}
ldrb r2, [r0]
movs r1, 0x2
negs r1, r1
ands r1, r2
strb r1, [r0]
bl RemoveFieldObjectInternal
pop {r0}
bx r0
thumb_func_end RemoveFieldObject
thumb_func_start RemoveFieldObjectByLocalIdAndMap
@ void RemoveFieldObjectByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapBank)
RemoveFieldObjectByLocalIdAndMap: @ 808D8C4

View File

@ -20,6 +20,7 @@ static u8 GetFieldObjectIdByLocalId(u8);
static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8);
static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *);
/*static*/ void FieldObjectHandleDynamicGraphicsId(struct MapObject *);
/*static*/ void RemoveFieldObjectInternal (struct MapObject *);
// ROM data
@ -415,3 +416,9 @@ static bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapNum, u8 mapGroup, u8
} while (i < ARRAY_COUNT(gMapObjects));
return FALSE;
}
void RemoveFieldObject(struct MapObject *mapObject)
{
mapObject->active = FALSE;
RemoveFieldObjectInternal(mapObject);
}