mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-27 05:43:51 +01:00
npc_set_direction_and_anim__an_proceed
This commit is contained in:
parent
384ca4658b
commit
9b4c61658a
@ -5,65 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start npc_set_direction_and_anim__an_proceed
|
|
||||||
npc_set_direction_and_anim__an_proceed: @ 8094D80
|
|
||||||
push {r4-r6,lr}
|
|
||||||
adds r6, r0, 0
|
|
||||||
adds r5, r1, 0
|
|
||||||
adds r4, r2, 0
|
|
||||||
adds r1, r3, 0
|
|
||||||
lsls r4, 24
|
|
||||||
lsrs r4, 24
|
|
||||||
lsls r1, 24
|
|
||||||
lsrs r1, 24
|
|
||||||
adds r0, r5, 0
|
|
||||||
movs r2, 0
|
|
||||||
bl obj_anim_image_set_and_seek
|
|
||||||
adds r0, r6, 0
|
|
||||||
adds r1, r4, 0
|
|
||||||
bl FieldObjectSetDirection
|
|
||||||
movs r0, 0x1
|
|
||||||
strh r0, [r5, 0x32]
|
|
||||||
pop {r4-r6}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
thumb_func_end npc_set_direction_and_anim__an_proceed
|
|
||||||
|
|
||||||
thumb_func_start sub_8094DAC
|
|
||||||
sub_8094DAC: @ 8094DAC
|
|
||||||
push {lr}
|
|
||||||
ldrb r2, [r0, 0x18]
|
|
||||||
lsrs r2, 4
|
|
||||||
adds r3, r1, 0
|
|
||||||
adds r3, 0x2A
|
|
||||||
ldrb r3, [r3]
|
|
||||||
bl npc_set_direction_and_anim__an_proceed
|
|
||||||
movs r0, 0
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end sub_8094DAC
|
|
||||||
|
|
||||||
thumb_func_start sub_8094DC4
|
|
||||||
sub_8094DC4: @ 8094DC4
|
|
||||||
push {r4,lr}
|
|
||||||
adds r4, r1, 0
|
|
||||||
adds r0, r4, 0
|
|
||||||
bl sub_80979BC
|
|
||||||
lsls r0, 24
|
|
||||||
cmp r0, 0
|
|
||||||
bne _08094DD8
|
|
||||||
movs r0, 0
|
|
||||||
b _08094DDE
|
|
||||||
_08094DD8:
|
|
||||||
movs r0, 0x2
|
|
||||||
strh r0, [r4, 0x32]
|
|
||||||
movs r0, 0x1
|
|
||||||
_08094DDE:
|
|
||||||
pop {r4}
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end sub_8094DC4
|
|
||||||
|
|
||||||
thumb_func_start sub_8094DE4
|
thumb_func_start sub_8094DE4
|
||||||
sub_8094DE4: @ 8094DE4
|
sub_8094DE4: @ 8094DE4
|
||||||
push {r4,r5,lr}
|
push {r4,r5,lr}
|
||||||
|
@ -22,5 +22,7 @@ void sub_809783C(struct Sprite *, u8, u8, u8);
|
|||||||
void DoShadowFieldEffect(struct MapObject *);
|
void DoShadowFieldEffect(struct MapObject *);
|
||||||
u8 sub_809785C(struct Sprite *);
|
u8 sub_809785C(struct Sprite *);
|
||||||
u8 sub_80978E4(struct Sprite *);
|
u8 sub_80978E4(struct Sprite *);
|
||||||
|
void obj_anim_image_set_and_seek(struct Sprite *, u8, u8);
|
||||||
|
bool8 sub_80979BC(struct Sprite *);
|
||||||
|
|
||||||
#endif //GUARD_MAP_OBJ_8097404_H
|
#endif //GUARD_MAP_OBJ_8097404_H
|
||||||
|
@ -4487,3 +4487,26 @@ an_walk_any_2_macro(sub_8094C80, do_run_anim, npc_obj_ministep_stop_on_arrival,
|
|||||||
an_walk_any_2_macro(sub_8094CC0, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_NORTH)
|
an_walk_any_2_macro(sub_8094CC0, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_NORTH)
|
||||||
an_walk_any_2_macro(sub_8094D00, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_WEST)
|
an_walk_any_2_macro(sub_8094D00, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_WEST)
|
||||||
an_walk_any_2_macro(sub_8094D40, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_EAST)
|
an_walk_any_2_macro(sub_8094D40, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_EAST)
|
||||||
|
|
||||||
|
void npc_set_direction_and_anim__an_proceed(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 animNum)
|
||||||
|
{
|
||||||
|
obj_anim_image_set_and_seek(sprite, animNum, 0);
|
||||||
|
FieldObjectSetDirection(mapObject, direction);
|
||||||
|
sprite->data2 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool8 sub_8094DAC(struct MapObject *mapObject, struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
npc_set_direction_and_anim__an_proceed(mapObject, sprite, mapObject->placeholder18, sprite->animNum);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool8 sub_8094DC4(struct MapObject *mapObject, struct Sprite *sprite)
|
||||||
|
{
|
||||||
|
if (sub_80979BC(sprite))
|
||||||
|
{
|
||||||
|
sprite->data2 = 2;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user