mirror of https://github.com/zeldaret/tmc.git
Match sub_080432A8
This commit is contained in:
parent
bdf796fffe
commit
7f6d0f64e6
|
@ -1,89 +0,0 @@
|
|||
|
||||
.syntax unified
|
||||
push {r4, r5, r6, r7, lr}
|
||||
adds r4, r0, #0
|
||||
movs r3, #3
|
||||
movs r2, #0
|
||||
ldr r0, [r4, #0x64]
|
||||
adds r1, r0, #0
|
||||
adds r1, #0x48
|
||||
ldrb r0, [r1, #0xc]
|
||||
cmp r0, #2
|
||||
bls _080432C2
|
||||
subs r0, #1
|
||||
strb r0, [r1, #0xc]
|
||||
movs r2, #1
|
||||
_080432C2:
|
||||
subs r3, #1
|
||||
cmp r3, #0
|
||||
blt _080432E0
|
||||
lsls r0, r3, #4
|
||||
adds r0, #0x18
|
||||
ldr r1, [r4, #0x64]
|
||||
adds r1, r1, r0
|
||||
ldrb r0, [r1, #0xc]
|
||||
cmp r0, #2
|
||||
bls _080432C2
|
||||
subs r0, #1
|
||||
strb r0, [r1, #0xc]
|
||||
adds r2, #1
|
||||
cmp r2, #1
|
||||
ble _080432C2
|
||||
_080432E0:
|
||||
ldr r0, [r4, #0x64]
|
||||
adds r1, r0, #0
|
||||
adds r1, #0x18
|
||||
ldrb r0, [r1, #5]
|
||||
subs r0, #2
|
||||
strb r0, [r1, #5]
|
||||
movs r3, #0
|
||||
movs r6, #0x80
|
||||
movs r7, #4
|
||||
rsbs r7, r7, #0
|
||||
movs r5, #1
|
||||
_080432F6:
|
||||
ldr r0, [r4, #0x64]
|
||||
lsls r1, r3, #2
|
||||
adds r0, r0, r1
|
||||
ldr r2, [r0]
|
||||
movs r1, #0x36
|
||||
ldrsh r0, [r2, r1]
|
||||
cmp r0, #3
|
||||
bgt _08043316
|
||||
ldrb r0, [r2, #0x10]
|
||||
orrs r0, r6
|
||||
strb r0, [r2, #0x10]
|
||||
ldrb r1, [r2, #0x18]
|
||||
adds r0, r7, #0
|
||||
ands r0, r1
|
||||
orrs r0, r5
|
||||
strb r0, [r2, #0x18]
|
||||
_08043316:
|
||||
adds r3, #1
|
||||
cmp r3, #3
|
||||
ble _080432F6
|
||||
ldr r1, [r4, #0x64]
|
||||
ldr r0, [r1]
|
||||
ldrb r0, [r0, #0x18]
|
||||
lsls r0, r0, #0x1e
|
||||
lsrs r2, r0, #0x1e
|
||||
cmp r2, #1
|
||||
bne _08043348
|
||||
adds r0, r1, #0
|
||||
adds r0, #0x34
|
||||
ldrb r0, [r0]
|
||||
cmp r0, #2
|
||||
bhi _08043348
|
||||
strb r2, [r4, #0xd]
|
||||
movs r0, #0x1e
|
||||
strb r0, [r4, #0xe]
|
||||
movs r0, #0x80
|
||||
lsls r0, r0, #7
|
||||
strh r0, [r1, #0x1c]
|
||||
ldr r0, [r4, #0x64]
|
||||
ldr r0, [r0, #0x10]
|
||||
bl sub_0804AA1C
|
||||
_08043348:
|
||||
pop {r4, r5, r6, r7, pc}
|
||||
.align 2, 0
|
||||
.syntax divided
|
|
@ -858,7 +858,43 @@ static void sub_0804325C(Entity* this) {
|
|||
}
|
||||
}
|
||||
|
||||
static ASM_FUNC("asm/non_matching/vaati/sub_080432A8.inc", void sub_080432A8(Entity* this))
|
||||
void sub_080432A8(Entity* this) {
|
||||
s32 iVar3;
|
||||
s32 i;
|
||||
VaatiArm_HeapStruct1* hs;
|
||||
Entity* ent;
|
||||
i = 3;
|
||||
iVar3 = 0;
|
||||
|
||||
for (; i >= 0; i--) {
|
||||
hs = &((VaatiArm_HeapStruct*)this->myHeap)->s1[i];
|
||||
if (hs->unk0c > 2) {
|
||||
hs->unk0c--;
|
||||
if (++iVar3 > 1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hs = &((VaatiArm_HeapStruct*)this->myHeap)->s1[0];
|
||||
hs->unk04.HALF.HI -= 2;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
ent = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
|
||||
if (ent->z.HALF.HI < 4) {
|
||||
COLLISION_ON(ent);
|
||||
ent->spriteSettings.draw = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((((VaatiArm_HeapStruct*)this->myHeap)->entities[0]->spriteSettings.draw == 1) &&
|
||||
(((VaatiArm_HeapStruct*)this->myHeap)->s1[1].unk0c < 3)) {
|
||||
this->subAction = 1;
|
||||
this->timer = 0x1e;
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->s1[0].unk04.HWORD = 0x4000;
|
||||
sub_0804AA1C(((VaatiArm_HeapStruct*)this->myHeap)->entities[4]);
|
||||
}
|
||||
}
|
||||
|
||||
static NONMATCH("asm/non_matching/vaati/sub_0804334C.inc", void sub_0804334C(Entity* this)) {
|
||||
int bVar1;
|
||||
|
|
Loading…
Reference in New Issue