npcs_clear_ids_and_state

This commit is contained in:
scnorton 2017-09-06 09:25:16 -04:00
parent dcda5419b8
commit f677873d07
3 changed files with 11 additions and 22 deletions

View File

@ -5,28 +5,6 @@
.text
thumb_func_start npcs_clear_ids_and_state
npcs_clear_ids_and_state: @ 808D410
push {r4,r5,lr}
movs r4, 0
ldr r5, =gUnknown_02037350
_0808D416:
lsls r0, r4, 3
adds r0, r4
lsls r0, 2
adds r0, r5
bl npc_clear_ids_and_state
adds r0, r4, 0x1
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0xF
bls _0808D416
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end npcs_clear_ids_and_state
thumb_func_start sub_808D438
sub_808D438: @ 808D438
push {lr}

View File

@ -5,6 +5,8 @@
// Exported RAM declarations
extern struct MapObject gUnknown_02037350[16];
// Exported ROM declarations
#endif //POKEEMERALD_FIELD_MAP_OBJ_H

View File

@ -21,3 +21,12 @@ void npc_clear_ids_and_state(struct MapObject *mapObject)
mapObject->mapGroup = -1;
mapObject->mapobj_unk_1C = -1;
}
void npcs_clear_ids_and_state(void)
{
u8 i;
for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++)
{
npc_clear_ids_and_state(&gUnknown_02037350[i]);
}
}