sub_80958C0 and callers

This commit is contained in:
scnorton 2017-09-17 14:02:43 -04:00
parent 283d9060a7
commit e544d5f8b8
2 changed files with 33 additions and 72 deletions

View File

@ -5,78 +5,6 @@
.text
thumb_func_start sub_80958C0
sub_80958C0: @ 80958C0
push {r4-r6,lr}
adds r5, r0, 0
adds r6, r1, 0
lsls r4, r2, 24
lsrs r4, 24
adds r1, r4, 0
bl FieldObjectSetDirection
adds r0, r5, 0
bl npc_coords_shift_still
adds r0, r4, 0
bl sub_80929FC
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
adds r0, r5, 0
adds r1, r6, 0
bl obj_npc_animation_step
adds r2, r6, 0
adds r2, 0x2C
ldrb r0, [r2]
movs r1, 0x40
orrs r0, r1
strb r0, [r2]
movs r0, 0x1
strh r0, [r6, 0x32]
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_80958C0
thumb_func_start sub_8095900
sub_8095900: @ 8095900
push {lr}
movs r2, 0x1
bl sub_80958C0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8095900
thumb_func_start sub_8095910
sub_8095910: @ 8095910
push {lr}
movs r2, 0x2
bl sub_80958C0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8095910
thumb_func_start sub_8095920
sub_8095920: @ 8095920
push {lr}
movs r2, 0x3
bl sub_80958C0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8095920
thumb_func_start sub_8095930
sub_8095930: @ 8095930
push {lr}
movs r2, 0x4
bl sub_80958C0
movs r0, 0x1
pop {r1}
bx r1
thumb_func_end sub_8095930
thumb_func_start sub_8095940
sub_8095940: @ 8095940
push {r4,r5,lr}

View File

@ -4823,3 +4823,36 @@ affine_an_walk_any_2_macro(sub_8095740, sub_8093B60, an_walk_any_2, StartSpriteA
affine_an_walk_any_2_macro(sub_80957A0, sub_8093B60, an_walk_any_2, ChangeSpriteAffineAnimIfDifferent, 1, DIR_SOUTH)
affine_an_walk_any_2_macro(sub_8095800, do_go_anim, npc_obj_ministep_stop_on_arrival, ChangeSpriteAffineAnimIfDifferent, 2, DIR_WEST, 1)
affine_an_walk_any_2_macro(sub_8095860, do_go_anim, npc_obj_ministep_stop_on_arrival, ChangeSpriteAffineAnimIfDifferent, 3, DIR_EAST, 1)
static void sub_80958C0(struct MapObject *mapObject, struct Sprite *sprite, u8 direction)
{
FieldObjectSetDirection(mapObject, direction);
npc_coords_shift_still(mapObject);
obj_npc_animation_step(mapObject, sprite, sub_80929FC(direction));
sprite->animPaused = TRUE;
sprite->data2 = 1;
}
bool8 sub_8095900(struct MapObject *mapObject, struct Sprite *sprite)
{
sub_80958C0(mapObject, sprite, DIR_SOUTH);
return TRUE;
}
bool8 sub_8095910(struct MapObject *mapObject, struct Sprite *sprite)
{
sub_80958C0(mapObject, sprite, DIR_NORTH);
return TRUE;
}
bool8 sub_8095920(struct MapObject *mapObject, struct Sprite *sprite)
{
sub_80958C0(mapObject, sprite, DIR_WEST);
return TRUE;
}
bool8 sub_8095930(struct MapObject *mapObject, struct Sprite *sprite)
{
sub_80958C0(mapObject, sprite, DIR_EAST);
return TRUE;
}