Another four functions

This commit is contained in:
scnorton 2017-09-17 14:12:32 -04:00
parent c9699169ad
commit b54689b9a3
3 changed files with 39 additions and 87 deletions

View File

@ -5,93 +5,6 @@
.text
thumb_func_start sub_8095AF0
sub_8095AF0: @ 8095AF0
push {r4,lr}
adds r4, r1, 0
adds r0, r4, 0
bl sub_8097750
adds r4, 0x2C
ldrb r1, [r4]
movs r0, 0x41
negs r0, r0
ands r0, r1
strb r0, [r4]
pop {r4}
pop {r0}
bx r0
thumb_func_end sub_8095AF0
thumb_func_start sub_8095B0C
sub_8095B0C: @ 8095B0C
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
adds r0, r5, 0
bl sub_8097758
lsls r0, 24
cmp r0, 0
bne _08095B22
movs r0, 0
b _08095B3E
_08095B22:
adds r0, r4, 0
bl npc_coords_shift_still
ldrb r0, [r4]
movs r1, 0x8
orrs r0, r1
strb r0, [r4]
adds r2, r5, 0
adds r2, 0x2C
ldrb r0, [r2]
movs r1, 0x40
orrs r0, r1
strb r0, [r2]
movs r0, 0x1
_08095B3E:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8095B0C
thumb_func_start sub_8095B44
sub_8095B44: @ 8095B44
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
bl sub_8095AF0
movs r0, 0x1
strh r0, [r4, 0x32]
adds r0, r5, 0
adds r1, r4, 0
bl sub_8095B64
lsls r0, 24
lsrs r0, 24
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end sub_8095B44
thumb_func_start sub_8095B64
sub_8095B64: @ 8095B64
push {r4,lr}
adds r4, r1, 0
bl sub_8095B0C
lsls r0, 24
cmp r0, 0
bne _08095B76
movs r0, 0
b _08095B7C
_08095B76:
movs r0, 0x2
strh r0, [r4, 0x32]
movs r0, 0x1
_08095B7C:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_8095B64
thumb_func_start sub_8095B84
sub_8095B84: @ 8095B84
push {r4-r6,lr}

View File

@ -24,5 +24,7 @@ u8 sub_809785C(struct Sprite *);
u8 sub_80978E4(struct Sprite *);
void obj_anim_image_set_and_seek(struct Sprite *, u8, u8);
bool8 sub_80979BC(struct Sprite *);
void sub_8097750(struct Sprite *);
bool8 sub_8097758(struct Sprite *);
#endif //GUARD_MAP_OBJ_8097404_H

View File

@ -4876,3 +4876,40 @@ set_dirn_and_anim__an_proceed(sub_8095A60, DIR_SOUTH, sub_80929EC)
set_dirn_and_anim__an_proceed(sub_8095A84, DIR_NORTH, sub_80929EC)
set_dirn_and_anim__an_proceed(sub_8095AA8, DIR_WEST, sub_80929EC)
set_dirn_and_anim__an_proceed(sub_8095ACC, DIR_EAST, sub_80929EC)
void sub_8095AF0(struct MapObject *mapObject, struct Sprite *sprite)
{
sub_8097750(sprite);
sprite->animPaused = FALSE;
}
bool8 sub_8095B0C(struct MapObject *mapObject, struct Sprite *sprite)
{
if (sub_8097758(sprite))
{
npc_coords_shift_still(mapObject);
mapObject->mapobj_bit_3 = TRUE;
sprite->animPaused = TRUE;
return TRUE;
}
return FALSE;
}
static bool8 sub_8095B64(struct MapObject *, struct Sprite *);
bool8 sub_8095B44(struct MapObject *mapObject, struct Sprite *sprite)
{
sub_8095AF0(mapObject, sprite);
sprite->data2 = 1;
return sub_8095B64(mapObject, sprite);
}
static bool8 sub_8095B64(struct MapObject *mapObject, struct Sprite *sprite)
{
if (sub_8095B0C(mapObject, sprite))
{
sprite->data2 = 2;
return TRUE;
}
return FALSE;
}