mirror of https://github.com/pret/pokeemerald.git
npc_set_running_behaviour_etc
This commit is contained in:
parent
edd5c81a8e
commit
ca88036ebe
|
@ -5,45 +5,6 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start npc_set_running_behaviour_etc
|
|
||||||
npc_set_running_behaviour_etc: @ 8092B2C
|
|
||||||
push {r4,lr}
|
|
||||||
mov r12, r0
|
|
||||||
lsls r1, 24
|
|
||||||
lsrs r1, 24
|
|
||||||
movs r3, 0
|
|
||||||
strb r1, [r0, 0x6]
|
|
||||||
adds r0, 0x21
|
|
||||||
strb r3, [r0]
|
|
||||||
adds r0, 0x1
|
|
||||||
strb r3, [r0]
|
|
||||||
ldr r4, =gSprites
|
|
||||||
mov r0, r12
|
|
||||||
ldrb r2, [r0, 0x4]
|
|
||||||
lsls r0, r2, 4
|
|
||||||
adds r0, r2
|
|
||||||
lsls r0, 2
|
|
||||||
adds r2, r4, 0
|
|
||||||
adds r2, 0x1C
|
|
||||||
adds r0, r2
|
|
||||||
ldr r2, =gUnknown_08505438
|
|
||||||
lsls r1, 2
|
|
||||||
adds r1, r2
|
|
||||||
ldr r1, [r1]
|
|
||||||
str r1, [r0]
|
|
||||||
mov r0, r12
|
|
||||||
ldrb r1, [r0, 0x4]
|
|
||||||
lsls r0, r1, 4
|
|
||||||
adds r0, r1
|
|
||||||
lsls r0, 2
|
|
||||||
adds r0, r4
|
|
||||||
strh r3, [r0, 0x30]
|
|
||||||
pop {r4}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.pool
|
|
||||||
thumb_func_end npc_set_running_behaviour_etc
|
|
||||||
|
|
||||||
thumb_func_start npc_running_behaviour_by_direction
|
thumb_func_start npc_running_behaviour_by_direction
|
||||||
npc_running_behaviour_by_direction: @ 8092B78
|
npc_running_behaviour_by_direction: @ 8092B78
|
||||||
lsls r0, 24
|
lsls r0, 24
|
||||||
|
|
|
@ -299,6 +299,7 @@ struct MapObject2
|
||||||
/*0x1F*/ u8 mapobj_unk_1F;
|
/*0x1F*/ u8 mapobj_unk_1F;
|
||||||
/*0x20*/ u8 mapobj_unk_20;
|
/*0x20*/ u8 mapobj_unk_20;
|
||||||
/*0x21*/ u8 mapobj_unk_21;
|
/*0x21*/ u8 mapobj_unk_21;
|
||||||
|
/*0x22*/ u8 animId;
|
||||||
/*size = 0x24*/
|
/*size = 0x24*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3626,6 +3626,15 @@ u8 sub_8092AF8(s16 x1, s16 y1, s16 x2, s16 y2)
|
||||||
return DIR_SOUTH;
|
return DIR_SOUTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void npc_set_running_behaviour_etc(struct MapObject *mapObject, u8 animPattern)
|
||||||
|
{
|
||||||
|
mapObject->animPattern = animPattern;
|
||||||
|
mapObject->mapobj_unk_21 = 0;
|
||||||
|
mapObject->animId = 0;
|
||||||
|
gSprites[mapObject->spriteId].callback = gUnknown_08505438[animPattern];
|
||||||
|
gSprites[mapObject->spriteId].data1 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
asm(".section .text.get_face_direction_anim_id");
|
asm(".section .text.get_face_direction_anim_id");
|
||||||
|
|
||||||
void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *);
|
void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *);
|
||||||
|
|
Loading…
Reference in New Issue