mirror of https://github.com/zeldaret/tmc.git
Match sub_08066570
This commit is contained in:
parent
2fd31d25bc
commit
4ec85404c0
|
|
@ -1,59 +0,0 @@
|
|||
.syntax unified
|
||||
push {r4, r5, r6, lr}
|
||||
adds r5, r0, #0
|
||||
adds r0, #0x5a
|
||||
ldrb r1, [r0]
|
||||
movs r0, #0x80
|
||||
ands r0, r1
|
||||
cmp r0, #0
|
||||
beq _080665DE
|
||||
ldrb r0, [r5, #0xc]
|
||||
cmp r0, #3
|
||||
beq _080665DE
|
||||
ldr r4, _080665E0 @ =gPlayerEntity
|
||||
adds r0, r5, #0
|
||||
adds r1, r4, #0
|
||||
movs r2, #0x50
|
||||
bl sub_0806FC80
|
||||
cmp r0, #0
|
||||
beq _080665DE
|
||||
adds r0, r5, #0
|
||||
adds r1, r4, #0
|
||||
bl GetFacingDirection
|
||||
adds r3, r0, #0
|
||||
movs r6, #1
|
||||
movs r1, #0x18
|
||||
adds r4, r3, #0
|
||||
ands r4, r1
|
||||
ldrb r0, [r5, #0x15]
|
||||
adds r2, r1, #0
|
||||
ands r2, r0
|
||||
cmp r2, r4
|
||||
bne _080665C8
|
||||
adds r2, r3, #5
|
||||
movs r1, #7
|
||||
ands r2, r1
|
||||
ldrb r0, [r5, #0x15]
|
||||
adds r0, #5
|
||||
ands r0, r1
|
||||
cmp r0, #2
|
||||
bhi _080665C8
|
||||
cmp r2, #2
|
||||
bhi _080665C8
|
||||
movs r6, #0
|
||||
_080665C8:
|
||||
cmp r6, #0
|
||||
beq _080665DE
|
||||
strb r3, [r5, #0x15]
|
||||
adds r3, #4
|
||||
movs r0, #0x18
|
||||
ands r3, r0
|
||||
lsrs r3, r3, #3
|
||||
adds r0, r5, #0
|
||||
adds r1, r3, #0
|
||||
bl InitializeAnimation
|
||||
_080665DE:
|
||||
pop {r4, r5, r6, pc}
|
||||
.align 2, 0
|
||||
_080665E0: .4byte gPlayerEntity
|
||||
.syntax divided
|
||||
|
|
@ -174,8 +174,9 @@ bool32 sub_0806650C(Entity* this) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/npc23/sub_08066570.inc", void sub_08066570(Entity* this)) {
|
||||
void sub_08066570(Entity* this) {
|
||||
u32 direction;
|
||||
s32 tmp;
|
||||
u32 dir1, dir2;
|
||||
bool32 cond;
|
||||
if ((this->frame & ANIM_DONE) == 0) {
|
||||
|
|
@ -191,6 +192,7 @@ NONMATCH("asm/non_matching/npc23/sub_08066570.inc", void sub_08066570(Entity* th
|
|||
|
||||
dir2 = (direction & 0x18);
|
||||
dir1 = (this->direction & 0x18);
|
||||
tmp = 0x18;
|
||||
if (dir1 == dir2) {
|
||||
dir1 = (direction + 5) & 7;
|
||||
dir2 = (this->direction + 5) & 7;
|
||||
|
|
@ -201,9 +203,8 @@ NONMATCH("asm/non_matching/npc23/sub_08066570.inc", void sub_08066570(Entity* th
|
|||
if (cond) {
|
||||
this->direction = direction;
|
||||
direction += 4;
|
||||
direction &= 0x18;
|
||||
direction &= tmp;
|
||||
direction >>= 3;
|
||||
InitializeAnimation(this, direction);
|
||||
}
|
||||
}
|
||||
END_NONMATCH
|
||||
|
|
|
|||
Loading…
Reference in New Issue