mirror of
https://github.com/pret/pmd-red.git
synced 2026-06-22 12:30:31 -05:00
ground_effect: Decompile sub_80ACD84 -> GroundEffect_Find
Co-authored-by: Seth Barberee <seth.barberee@gmail.com>
This commit is contained in:
parent
e8a8b1c2d7
commit
c41cf36a1e
|
|
@ -5,43 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80ACD84
|
||||
sub_80ACD84:
|
||||
push {r4-r7,lr}
|
||||
lsls r0, 16
|
||||
asrs r4, r0, 16
|
||||
movs r3, 0
|
||||
ldr r0, _080ACDA8
|
||||
ldr r1, [r0]
|
||||
movs r6, 0xE2
|
||||
lsls r6, 1
|
||||
movs r2, 0x80
|
||||
lsls r2, 9
|
||||
adds r5, r2, 0
|
||||
_080ACD9A:
|
||||
movs r7, 0x6
|
||||
ldrsh r0, [r1, r7]
|
||||
cmp r0, r4
|
||||
bne _080ACDAC
|
||||
adds r0, r3, 0
|
||||
b _080ACDBC
|
||||
.align 2, 0
|
||||
_080ACDA8: .4byte gGroundEffects
|
||||
_080ACDAC:
|
||||
adds r0, r2, 0
|
||||
adds r2, r5
|
||||
asrs r3, r0, 16
|
||||
adds r1, r6
|
||||
cmp r3, 0xF
|
||||
ble _080ACD9A
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
_080ACDBC:
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80ACD84
|
||||
|
||||
thumb_func_start GroundEffect_Add
|
||||
GroundEffect_Add:
|
||||
push {r4-r7,lr}
|
||||
|
|
|
|||
|
|
@ -139,3 +139,22 @@ void GroundEffect_CancelBlank()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Unused
|
||||
s32 GroundEffect_Find(s32 a0_) {
|
||||
s32 index;
|
||||
s32 a0;
|
||||
GroundEffect *ptr;
|
||||
|
||||
a0 = (s16)a0_;
|
||||
index = 0;
|
||||
ptr = &gGroundEffects[0];
|
||||
for (; index < 16; index = (s16)(index + 1), ptr++)
|
||||
{
|
||||
if (ptr->unk6 == a0)
|
||||
{
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user