Merge pull request #524 from hatal175/sub_08024C48

This commit is contained in:
notyourav 2022-07-03 19:55:43 -07:00 committed by GitHub
commit 51723cd2b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 37 deletions

View File

@ -1,36 +0,0 @@
.syntax unified
.text
push {r4, r5, lr}
adds r3, r0, #0
movs r4, #1
cmp r1, #0
beq _08024C60
movs r0, #3
bl sub_08049DF4
rsbs r1, r0, #0
orrs r1, r0
lsrs r4, r1, #0x1f
b _08024C78
_08024C60:
ldr r2, [r3, #0x54]
cmp r2, #0
beq _08024C74
ldr r0, [r2, #4]
cmp r0, #0
beq _08024C74
movs r5, #0x36
ldrsh r0, [r2, r5]
cmp r0, #0
bge _08024C78
_08024C74:
str r1, [r3, #0x54]
movs r4, #0
_08024C78:
adds r0, r4, #0
pop {r4, r5, pc}
.syntax divided

View File

@ -697,7 +697,30 @@ bool32 sub_08024B38(Entity* this) {
return iVar4;
}
ASM_FUNC("asm/non_matching/pesto/sub_08024C48.inc", bool32 sub_08024C48(Entity* this, bool32 unk))
bool32 sub_08024C48(Entity* this, bool32 unk) {
bool32 rv = TRUE;
u32 val;
if (unk) {
if (sub_08049DF4(3)) {
rv = TRUE;
} else {
rv = FALSE;
}
} else {
if (this->child == NULL) {
this->child = NULL;
rv = FALSE;
} else if (this->child->next == NULL) {
this->child = NULL;
rv = FALSE;
} else if (this->child->z.HALF.HI < 0) {
this->child = NULL;
rv = FALSE;
}
}
return rv;
}
void sub_08024C7C(Entity* this) {
this->action = 1;