Match sub_08026808

This commit is contained in:
Tal Hayon 2022-07-16 17:56:22 +03:00
parent ce2cec75e7
commit 4bd83d06dd
2 changed files with 27 additions and 52 deletions

View File

@ -18,58 +18,6 @@
thumb_func_start sub_08026808
sub_08026808: @ 0x08026808
push {r4, r5, r6, r7, lr}
adds r4, r0, #0
ldr r2, [r4, #0x54]
ldr r7, [r4, #0x68]
ldr r6, [r4, #0x50]
adds r1, r2, #0
adds r1, #0x76
ldrh r0, [r1]
cmp r0, #0xbf
bhi _08026820
adds r0, #4
strh r0, [r1]
_08026820:
adds r5, r2, #0
adds r5, #0x7a
ldrh r0, [r5]
cmp r0, #0xb0
bls _08026830
subs r0, #8
strh r0, [r5]
b _08026860
_08026830:
ldr r1, _08026868 @ =gPlayerEntity
adds r0, r4, #0
bl GetFacingDirection
strb r0, [r4, #0x15]
movs r0, #4
strb r0, [r4, #0xd]
movs r1, #0xa0
strh r1, [r5]
adds r0, r6, #0
adds r0, #0x7a
strh r1, [r0]
adds r0, r7, #0
adds r0, #0x7a
strh r1, [r0]
adds r0, r4, #0
movs r1, #1
movs r2, #0
bl sub_080276F4
movs r0, #0xd1
lsls r0, r0, #1
bl SoundReq
_08026860:
adds r0, r4, #0
bl sub_080277F8
pop {r4, r5, r6, r7, pc}
.align 2, 0
_08026868: .4byte gPlayerEntity
thumb_func_start sub_0802686C
sub_0802686C: @ 0x0802686C
push {r4, r5, lr}

View File

@ -762,3 +762,30 @@ void sub_080267D0(ChuchuBossEntity* this) {
InitAnimationForceUpdate(super->child, 2);
}
}
void sub_08026808(ChuchuBossEntity* this) {
u32 uVar1;
ChuchuBossEntity* pEVar4;
ChuchuBossEntity* pEVar5;
ChuchuBossEntity* pEVar6;
pEVar4 = (ChuchuBossEntity*)super->child;
pEVar6 = this->unk_68;
pEVar5 = (ChuchuBossEntity*)super->parent;
if (pEVar4->unk_74.HALF_U.HI < 0xc0) {
pEVar4->unk_74.HALF_U.HI += 4;
}
if (pEVar4->unk_78.HALF_U.HI > 0xb0) {
pEVar4->unk_78.HALF_U.HI -= 8;
} else {
super->direction = GetFacingDirection(super, &gPlayerEntity);
super->subAction = 4;
pEVar4->unk_78.HALF_U.HI = 0xa0;
pEVar5->unk_78.HALF_U.HI = 0xa0;
pEVar6->unk_78.HALF_U.HI = 0xa0;
sub_080276F4(this, 1, 0);
SoundReq(SFX_1A2);
}
sub_080277F8(this);
}