mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-06 15:38:11 +01:00
sub_8092AF8
This commit is contained in:
parent
589c34e30a
commit
edd5c81a8e
@ -5,40 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_8092AF8
|
|
||||||
sub_8092AF8: @ 8092AF8
|
|
||||||
push {lr}
|
|
||||||
lsls r1, 16
|
|
||||||
lsrs r1, 16
|
|
||||||
lsls r3, 16
|
|
||||||
lsrs r3, 16
|
|
||||||
lsls r0, 16
|
|
||||||
asrs r0, 16
|
|
||||||
lsls r2, 16
|
|
||||||
asrs r2, 16
|
|
||||||
cmp r0, r2
|
|
||||||
ble _08092B12
|
|
||||||
movs r0, 0x3
|
|
||||||
b _08092B28
|
|
||||||
_08092B12:
|
|
||||||
cmp r0, r2
|
|
||||||
bge _08092B1A
|
|
||||||
movs r0, 0x4
|
|
||||||
b _08092B28
|
|
||||||
_08092B1A:
|
|
||||||
lsls r1, 16
|
|
||||||
lsls r0, r3, 16
|
|
||||||
cmp r1, r0
|
|
||||||
bgt _08092B26
|
|
||||||
movs r0, 0x1
|
|
||||||
b _08092B28
|
|
||||||
_08092B26:
|
|
||||||
movs r0, 0x2
|
|
||||||
_08092B28:
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
thumb_func_end sub_8092AF8
|
|
||||||
|
|
||||||
thumb_func_start npc_set_running_behaviour_etc
|
thumb_func_start npc_set_running_behaviour_etc
|
||||||
npc_set_running_behaviour_etc: @ 8092B2C
|
npc_set_running_behaviour_etc: @ 8092B2C
|
||||||
push {r4,lr}
|
push {r4,lr}
|
||||||
|
@ -3539,6 +3539,8 @@ dirn2anim(sub_8092A1C, gUnknown_0850DB38)
|
|||||||
dirn2anim(sub_8092A2C, gUnknown_0850DB41)
|
dirn2anim(sub_8092A2C, gUnknown_0850DB41)
|
||||||
dirn2anim(get_run_image_anim_num, gUnknown_0850DB4A)
|
dirn2anim(get_run_image_anim_num, gUnknown_0850DB4A)
|
||||||
|
|
||||||
|
// file boundary?
|
||||||
|
|
||||||
struct UnkStruct_085094AC {
|
struct UnkStruct_085094AC {
|
||||||
const union AnimCmd *const *anims;
|
const union AnimCmd *const *anims;
|
||||||
u8 animPos[4];
|
u8 animPos[4];
|
||||||
@ -3605,6 +3607,25 @@ void obj_npc_animation_step(struct MapObject *mapObject, struct Sprite *sprite,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// file boundary?
|
||||||
|
|
||||||
|
u8 sub_8092AF8(s16 x1, s16 y1, s16 x2, s16 y2)
|
||||||
|
{
|
||||||
|
if (x1 > x2)
|
||||||
|
{
|
||||||
|
return DIR_WEST;
|
||||||
|
}
|
||||||
|
if (x1 < x2)
|
||||||
|
{
|
||||||
|
return DIR_EAST;
|
||||||
|
}
|
||||||
|
if (y1 > y2)
|
||||||
|
{
|
||||||
|
return DIR_NORTH;
|
||||||
|
}
|
||||||
|
return DIR_SOUTH;
|
||||||
|
}
|
||||||
|
|
||||||
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…
x
Reference in New Issue
Block a user