Another block of functions for getting anim IDs from directions

This commit is contained in:
PikalaxALT 2017-09-16 22:48:19 -04:00
parent eb7e52d2a8
commit d1666473d3
2 changed files with 16 additions and 400 deletions

View file

@ -5,406 +5,6 @@
.text
thumb_func_start GetSimpleGoAnimId
@ u8 GetSimpleGoAnimId(u8 direction)
GetSimpleGoAnimId: @ 809335C
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBA5
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _08093374
movs r4, 0
_08093374:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetSimpleGoAnimId
thumb_func_start GetGoSpeed0AnimId
@ u8 GetGoSpeed0AnimId(u8 direction)
GetGoSpeed0AnimId: @ 8093388
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBAA
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _080933A0
movs r4, 0
_080933A0:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetGoSpeed0AnimId
thumb_func_start GetGoSpeed1AnimId
@ u8 GetGoSpeed1AnimId(u8 direction)
GetGoSpeed1AnimId: @ 80933B4
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBAF
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _080933CC
movs r4, 0
_080933CC:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetGoSpeed1AnimId
thumb_func_start GetGoSpeed2AnimId
@ u8 GetGoSpeed2AnimId(u8 direction)
GetGoSpeed2AnimId: @ 80933E0
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBB4
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _080933F8
movs r4, 0
_080933F8:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetGoSpeed2AnimId
thumb_func_start GetGoSpeed3AnimId
@ u8 GetGoSpeed3AnimId(u8 direction)
GetGoSpeed3AnimId: @ 809340C
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBB9
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _08093424
movs r4, 0
_08093424:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetGoSpeed3AnimId
thumb_func_start sub_8093438
@ u8 sub_8093438(u8 direction)
sub_8093438: @ 8093438
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBBE
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _08093450
movs r4, 0
_08093450:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_8093438
thumb_func_start GetRunAnimId
@ u8 GetRunAnimId(u8 direction)
GetRunAnimId: @ 8093464
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBC3
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _0809347C
movs r4, 0
_0809347C:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetRunAnimId
thumb_func_start GetJumpLedgeAnimId
@ u8 GetJumpLedgeAnimId(u8 direction)
GetJumpLedgeAnimId: @ 8093490
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBC8
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _080934A8
movs r4, 0
_080934A8:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetJumpLedgeAnimId
thumb_func_start sub_80934BC
@ u8 sub_80934BC(u8 direction)
sub_80934BC: @ 80934BC
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBCD
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _080934D4
movs r4, 0
_080934D4:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_80934BC
thumb_func_start sub_80934E8
@ u8 sub_80934E8(u8 direction)
sub_80934E8: @ 80934E8
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBD2
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _08093500
movs r4, 0
_08093500:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_80934E8
thumb_func_start sub_8093514
@ u8 sub_8093514(u8 direction)
sub_8093514: @ 8093514
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBD7
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _0809352C
movs r4, 0
_0809352C:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_8093514
thumb_func_start sub_8093540
@ u8 sub_8093540(u8 direction)
sub_8093540: @ 8093540
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBDC
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _08093558
movs r4, 0
_08093558:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end sub_8093540
thumb_func_start GetStepInPlaceDelay32AnimId
@ u8 GetStepInPlaceDelay32AnimId(u8 direction)
GetStepInPlaceDelay32AnimId: @ 809356C
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBE1
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _08093584
movs r4, 0
_08093584:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetStepInPlaceDelay32AnimId
thumb_func_start GetStepInPlaceDelay16AnimId
@ u8 GetStepInPlaceDelay16AnimId(u8 direction)
GetStepInPlaceDelay16AnimId: @ 8093598
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBE6
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _080935B0
movs r4, 0
_080935B0:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetStepInPlaceDelay16AnimId
thumb_func_start GetStepInPlaceDelay8AnimId
@ u8 GetStepInPlaceDelay8AnimId(u8 direction)
GetStepInPlaceDelay8AnimId: @ 80935C4
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBEB
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _080935DC
movs r4, 0
_080935DC:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetStepInPlaceDelay8AnimId
thumb_func_start GetStepInPlaceDelay4AnimId
@ u8 GetStepInPlaceDelay4AnimId(u8 direction)
GetStepInPlaceDelay4AnimId: @ 80935F0
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r1, =gUnknown_0850DBF0
mov r0, sp
movs r2, 0x5
bl memcpy
cmp r4, 0x4
bls _08093608
movs r4, 0
_08093608:
mov r1, sp
adds r0, r1, r4
ldrb r0, [r0]
add sp, 0x8
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetStepInPlaceDelay4AnimId
thumb_func_start FieldObjectFaceOppositeDirection
@ bool8 FieldObjectFaceOppositeDirection(struct npc_state *fieldObject, u8 direction)
FieldObjectFaceOppositeDirection: @ 809361C

View file

@ -4026,3 +4026,19 @@ u8 name(u32 direction) \
}
dirn2anim_2(GetFaceDirectionAnimId, gUnknown_0850DBA0);
dirn2anim_2(GetSimpleGoAnimId, gUnknown_0850DBA5);
dirn2anim_2(GetGoSpeed0AnimId, gUnknown_0850DBAA);
dirn2anim_2(GetGoSpeed1AnimId, gUnknown_0850DBAF);
dirn2anim_2(GetGoSpeed2AnimId, gUnknown_0850DBB4);
dirn2anim_2(GetGoSpeed3AnimId, gUnknown_0850DBB9);
dirn2anim_2(sub_8093438, gUnknown_0850DBBE);
dirn2anim_2(GetRunAnimId, gUnknown_0850DBC3);
dirn2anim_2(GetJumpLedgeAnimId, gUnknown_0850DBC8);
dirn2anim_2(sub_80934BC, gUnknown_0850DBCD);
dirn2anim_2(sub_80934E8, gUnknown_0850DBD2);
dirn2anim_2(sub_8093514, gUnknown_0850DBD7);
dirn2anim_2(sub_8093540, gUnknown_0850DBDC);
dirn2anim_2(GetStepInPlaceDelay32AnimId, gUnknown_0850DBE1);
dirn2anim_2(GetStepInPlaceDelay16AnimId, gUnknown_0850DBE6);
dirn2anim_2(GetStepInPlaceDelay8AnimId, gUnknown_0850DBEB);
dirn2anim_2(GetStepInPlaceDelay4AnimId, gUnknown_0850DBF0);