Match sub_08026FA4

This commit is contained in:
Tal Hayon 2022-07-17 09:02:18 +03:00
parent 2fe066b64e
commit 6e077ed02b
2 changed files with 46 additions and 109 deletions

View File

@ -7,104 +7,6 @@
.text
thumb_func_start sub_08026FA4
sub_08026FA4: @ 0x08026FA4
push {r4, r5, lr}
adds r4, r0, #0
bl sub_08078B48
ldrb r0, [r4, #0x10]
movs r5, #0x7f
adds r1, r5, #0
ands r1, r0
strb r1, [r4, #0x10]
ldr r3, [r4, #0x54]
ldr r2, [r4, #0x50]
ldr r0, [r4, #0x68]
strb r1, [r0, #0x10]
ldrb r0, [r4, #0x10]
strb r0, [r2, #0x10]
strb r0, [r3, #0x10]
adds r3, r4, #0
adds r3, #0x7c
ldrb r0, [r3]
cmp r0, #0
beq _08026FD2
movs r0, #1
strb r0, [r3]
_08026FD2:
ldr r2, [r4, #0x54]
adds r0, r2, #0
adds r0, #0x7a
ldrh r0, [r0]
cmp r0, #0x97
bhi _08026FFE
movs r1, #0x80
lsls r1, r1, #9
ldrb r0, [r3]
lsls r1, r0
ldr r0, [r2, #0x78]
adds r0, r0, r1
str r0, [r2, #0x78]
ldr r2, [r4, #0x54]
movs r1, #0x80
lsls r1, r1, #0xa
ldrb r3, [r3]
lsls r1, r3
ldr r0, [r2, #0x74]
subs r0, r0, r1
str r0, [r2, #0x74]
b _0802705C
_08026FFE:
movs r0, #7
strb r0, [r4, #0xd]
ldrb r1, [r2, #0x10]
adds r0, r5, #0
ands r0, r1
strb r0, [r2, #0x10]
adds r0, r4, #0
adds r0, #0x84
ldr r1, [r0]
movs r0, #0
strb r0, [r1, #3]
adds r1, r4, #0
adds r1, #0x7d
movs r0, #0x2d
strb r0, [r1]
ldr r0, _08027044 @ =0x00000155
bl SoundReq
ldrb r1, [r4, #0x15]
movs r0, #0x10
ands r0, r1
cmp r0, #0
beq _08027048
ldr r1, [r4, #0x54]
adds r0, r1, #0
adds r0, #0x58
ldrb r0, [r0]
cmp r0, #8
beq _0802705C
adds r0, r1, #0
movs r1, #8
bl InitAnimationForceUpdate
b _0802705C
.align 2, 0
_08027044: .4byte 0x00000155
_08027048:
ldr r1, [r4, #0x54]
adds r0, r1, #0
adds r0, #0x58
ldrb r0, [r0]
cmp r0, #7
beq _0802705C
adds r0, r1, #0
movs r1, #7
bl InitAnimationForceUpdate
_0802705C:
adds r0, r4, #0
bl sub_08027870
pop {r4, r5, pc}
thumb_func_start sub_08027064
sub_08027064: @ 0x08027064
push {r4, r5, r6, r7, lr}

View File

@ -457,9 +457,7 @@ void sub_08026090(ChuchuBossEntity* this) {
void sub_08026110(ChuchuBossEntity* this) {
s32 uVar2;
int iVar4;
s32 uVar3;
Hitbox* pHVar8;
gUnk_080CC1DC[super->subAction](this);
if ((this->unk_84->unk_08 == 0) && ((u8)this->unk_84->unk_05 != 0)) {
@ -583,7 +581,6 @@ void sub_08026358(ChuchuBossEntity* this) {
}
void sub_080263B4(ChuchuBossEntity* this) {
u32 bVar2;
u32 bVar3;
if (this->unk_7d-- == 0) {
@ -844,7 +841,7 @@ void sub_08026968(ChuchuBossEntity* this) {
pEVar7 = (ChuchuBossEntity*)super->child;
pEVar8 = this->unk_68;
pEVar6 = (ChuchuBossEntity*)super->parent;
if ((super->direction & 0x10) != 0) {
if (DirectionIsVertical(super->direction)) {
sVar5 = 0x100;
} else {
sVar5 = -0x100;
@ -872,7 +869,7 @@ void sub_080269CC(ChuchuBossEntity* this) {
pEVar7 = (ChuchuBossEntity*)super->child;
pEVar2 = this->unk_68;
pEVar4 = (ChuchuBossEntity*)super->parent;
if ((super->direction & 0x10) != 0) {
if (DirectionIsVertical(super->direction)) {
sVar1 = -0x300;
} else {
sVar1 = 0x300;
@ -892,7 +889,7 @@ void sub_080269CC(ChuchuBossEntity* this) {
}
temp2 = pEVar7->unk_82.HALF.HI + 0x40;
if ((u32)(temp2 - 0x20) > 0x40) {
if ((super->direction & 0x10) != 0) {
if (DirectionIsVertical(super->direction)) {
if (pEVar7->base.animIndex != 6) {
InitAnimationForceUpdate(&pEVar7->base, 6);
}
@ -927,7 +924,7 @@ void sub_080269CC(ChuchuBossEntity* this) {
entity->base.spritePriority.b0 = 0;
entity->base.spriteRendering.b3 = pEVar7->base.spriteRendering.b3;
entity->base.spriteOrientation.flipY = pEVar7->base.spriteOrientation.flipY;
if ((super->direction & 0x10) != 0) {
if (DirectionIsVertical(super->direction)) {
entity->base.x.HALF.HI -= 0x38;
} else {
entity->base.x.HALF.HI += 0x38;
@ -1001,7 +998,7 @@ void sub_08026C40(ChuchuBossEntity* this) {
pEVar6->unk_78.WORD -= 0x10000;
return;
}
if ((super->direction & 0x10) != 0) {
if (DirectionIsVertical(super->direction)) {
if (pEVar6->base.animIndex != 8) {
InitAnimationForceUpdate(&pEVar6->base, 8);
}
@ -1012,13 +1009,13 @@ void sub_08026C40(ChuchuBossEntity* this) {
}
}
if (this->unk_7c == 0) {
if ((super->direction & 0x10) != 0) {
if (DirectionIsVertical(super->direction)) {
iVar5 = 0x300;
} else {
iVar5 = -0x300;
}
} else {
if ((super->direction & 0x10) != 0) {
if (DirectionIsVertical(super->direction)) {
iVar5 = 0x480;
} else {
iVar5 = -0x480;
@ -1056,7 +1053,7 @@ void sub_08026C40(ChuchuBossEntity* this) {
} else {
sub_080276F4(this, 3, 0);
pEVar6->unk_7d = 0;
if ((super->direction & 0x10) != 0) {
if (DirectionIsVertical(super->direction)) {
*(u8*)((int)pEVar7 + 0x85) = 1;
*(u8*)((int)pEVar8 + 0x85) = 1;
*(u8*)((int)pEVar6 + 0x85) = 1;
@ -1136,3 +1133,41 @@ void sub_08026F1C(ChuchuBossEntity* this) {
}
}
}
void sub_08026FA4(ChuchuBossEntity* this) {
u32 uVar1;
ChuchuBossEntity* pEVar3;
ChuchuBossEntity* pEVar4;
sub_08078B48();
COLLISION_OFF(super);
pEVar4 = (ChuchuBossEntity*)super->child;
pEVar3 = (ChuchuBossEntity*)super->parent;
this->unk_68->base.flags = super->flags;
uVar1 = super->flags;
pEVar3->base.flags = uVar1;
pEVar4->base.flags = uVar1;
if (this->unk_7c != 0) {
this->unk_7c = 1;
}
if (((ChuchuBossEntity*)super->child)->unk_78.HALF_U.HI < 0x98) {
((ChuchuBossEntity*)super->child)->unk_78.WORD += (0x10000 << this->unk_7c);
((ChuchuBossEntity*)super->child)->unk_74.WORD -= (0x20000 << this->unk_7c);
} else {
super->subAction = 7;
COLLISION_OFF(super->child);
this->unk_84->unk_03 = 0;
this->unk_7d = 0x2d;
SoundReq(SFX_155);
if (DirectionIsVertical(super->direction)) {
if (super->child->animIndex != 8) {
InitAnimationForceUpdate(super->child, 8);
}
} else {
if (super->child->animIndex != 7) {
InitAnimationForceUpdate(super->child, 7);
}
}
}
sub_08027870(super);
}