Merge pull request #390 from hatal175/sub_080AA374

Match sub_080AA374
This commit is contained in:
notyourav 2022-02-17 22:46:02 -08:00 committed by GitHub
commit 5af35e8c65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 64 deletions

View File

@ -1,54 +0,0 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, r8
push {r7}
adds r6, r0, #0
movs r0, #0
mov r8, r0
ldr r5, [r6, #0x54]
cmp r5, #0
beq _080AA3D8
ldr r0, [r5, #4]
cmp r0, #0
beq _080AA3D8
ldrb r4, [r5, #0x14]
ldr r0, _080AA3CC @ =gUnk_08129D14
adds r4, r4, r0
movs r2, #0
ldrsb r2, [r4, r2]
movs r3, #1
ldrsb r3, [r4, r3]
adds r0, r6, #0
adds r1, r5, #0
bl sub_0806F824
adds r7, r0, #0
movs r0, #0x2e
ldrsh r1, [r5, r0]
movs r0, #0
ldrsb r0, [r4, r0]
adds r1, r1, r0
movs r0, #0x32
ldrsh r2, [r5, r0]
movs r0, #1
ldrsb r0, [r4, r0]
adds r2, r2, r0
adds r0, r6, #0
movs r3, #8
bl EntityWithinDistance
cmp r0, #0
beq _080AA3D0
movs r0, #1
mov r8, r0
b _080AA3D8
.align 2, 0
_080AA3CC: .4byte gUnk_08129D14
_080AA3D0:
adds r0, r6, #0
adds r1, r7, #0
bl sub_08004596
_080AA3D8:
mov r0, r8
pop {r3}
mov r8, r3
pop {r4, r5, r6, r7, pc}
.syntax divided

View File

@ -293,19 +293,18 @@ void sub_080AA320(Entity* this) {
sub_080AA1D8(this);
}
NONMATCH("asm/non_matching/mandiblesProjectile/sub_080AA374.inc", bool32 sub_080AA374(Entity* this)) {
bool32 sub_080AA374(Entity* this) {
u32 uVar1;
u32 animationState;
Entity* entity;
Entity* child;
bool32 result;
const s8* ptr;
result = FALSE;
if ((this->child != NULL) && (this->child->next != NULL)) {
// TODO regalloc
animationState = this->child->animationState;
uVar1 = sub_0806F824(this, this->child, gUnk_08129D14[animationState], gUnk_08129D14[animationState + 1]);
if (EntityWithinDistance(this, this->child->x.HALF.HI + gUnk_08129D14[animationState],
this->child->y.HALF.HI + gUnk_08129D14[animationState + 1], 8) != 0) {
child = this->child;
if ((child != NULL) && (child->next != NULL)) {
ptr = &gUnk_08129D14[child->animationState];
uVar1 = sub_0806F824(this, child, ptr[0], ptr[1]);
if (EntityWithinDistance(this, child->x.HALF.HI + ptr[0], child->y.HALF.HI + ptr[1], 8) != 0) {
result = TRUE;
} else {
sub_08004596(this, uVar1);
@ -313,7 +312,6 @@ NONMATCH("asm/non_matching/mandiblesProjectile/sub_080AA374.inc", bool32 sub_080
}
return result;
}
END_NONMATCH
void sub_080AA3E0(Entity* this, u32 param) {
u32 tmp;