Match sub_08033364

This commit is contained in:
Tal Hayon 2022-09-02 08:17:57 +03:00
parent b826037bf2
commit 780840c998
2 changed files with 5 additions and 47 deletions

View File

@ -1,44 +0,0 @@
.syntax unified
push {r4, lr}
adds r4, r0, #0
movs r0, #1
bl sub_08049DF4
adds r1, r0, #0
cmp r1, #0
beq _080333B4
ldrb r0, [r4, #0xa]
movs r3, #0x38
cmp r0, #0
beq _0803337E
movs r3, #0x48
_0803337E:
adds r0, r4, #0
adds r2, r3, #0
bl EntityInRectRadius
cmp r0, #0
beq _080333B4
ldrb r0, [r4, #0xa]
cmp r0, #0
bne _080333AA
ldr r0, _080333B0 @ =gUnk_020000B0
ldr r1, [r0]
adds r0, r4, #0
bl GetFacingDirection
adds r1, r0, #0
adds r1, #2
movs r0, #0x1c
ands r1, r0
lsrs r1, r1, #2
ldrb r0, [r4, #0x14]
cmp r0, r1
bne _080333B4
_080333AA:
movs r0, #1
b _080333B6
.align 2, 0
_080333B0: .4byte gUnk_020000B0
_080333B4:
movs r0, #0
_080333B6:
pop {r4, pc}
.syntax divided

View File

@ -436,7 +436,7 @@ void sub_08033320(MulldozerEntity* this) {
}
}
NONMATCH("asm/non_matching/mulldozer/sub_08033364.inc", bool32 sub_08033364(MulldozerEntity* this)) {
bool32 sub_08033364(MulldozerEntity* this) {
Entity* entity;
u32 radius;
u32 tmp;
@ -452,14 +452,16 @@ NONMATCH("asm/non_matching/mulldozer/sub_08033364.inc", bool32 sub_08033364(Mull
if (super->type != 0) {
return TRUE;
}
if (((GetFacingDirection(super, gUnk_020000B0) + 2) & 0x1c) >> 2 == super->animationState) {
tmp = GetFacingDirection(super, gUnk_020000B0);
tmp = Direction8RoundUp(tmp);
tmp = Direction8ToAnimationState(tmp);
if (super->animationState == tmp) {
return TRUE;
}
}
}
return FALSE;
}
END_NONMATCH
void (*const Mulldozer_Functions[])(MulldozerEntity*) = {
Mulldozer_OnInit,