through sub_80EAA18

This commit is contained in:
PikalaxALT 2017-10-27 08:43:10 -04:00
parent f61795ab47
commit 75b52fe80a
2 changed files with 28 additions and 77 deletions

View File

@ -5,83 +5,6 @@
.text
thumb_func_start sub_80EA9D8
sub_80EA9D8: @ 80EA9D8
push {r4,lr}
movs r2, 0x1
ldr r0, =gSaveBlock1Ptr
ldr r3, [r0]
ldr r4, =0x00001a9c
_080EA9E2:
lsls r0, r2, 16
asrs r1, r0, 16
lsls r0, r1, 2
adds r0, r1
lsls r0, 5
adds r0, r3, r0
adds r0, r4
ldrb r0, [r0]
cmp r0, 0
bne _080EAA04
lsls r0, r2, 24
lsrs r0, 24
b _080EAA12
.pool
_080EAA04:
adds r0, r1, 0x1
lsls r0, 16
lsrs r2, r0, 16
asrs r0, 16
cmp r0, 0x13
ble _080EA9E2
movs r0, 0
_080EAA12:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_80EA9D8
thumb_func_start sub_80EAA18
sub_80EAA18: @ 80EAA18
push {r4,lr}
movs r3, 0x1
ldr r0, =gSaveBlock1Ptr
ldr r4, [r0]
_080EAA20:
lsls r2, r3, 16
asrs r1, r2, 16
lsls r0, r1, 2
adds r0, r1
lsls r0, 5
adds r0, r4, r0
ldr r1, =0x00001a9d
adds r0, r1
ldrb r1, [r0]
lsrs r0, r1, 6
cmp r0, 0
bne _080EAA4C
lsls r0, r1, 28
cmp r0, 0
bne _080EAA4C
lsls r0, r3, 24
lsrs r0, 24
b _080EAA5C
.pool
_080EAA4C:
movs r1, 0x80
lsls r1, 9
adds r0, r2, r1
lsrs r3, r0, 16
asrs r0, 16
cmp r0, 0x13
ble _080EAA20
movs r0, 0
_080EAA5C:
pop {r4}
pop {r1}
bx r1
thumb_func_end sub_80EAA18
thumb_func_start sub_80EAA64
sub_80EAA64: @ 80EAA64
push {r4-r7,lr}

View File

@ -1507,3 +1507,31 @@ s16 sub_80EA990(u8 sbId)
}
return -1;
}
u8 sub_80EA9D8(void)
{
s16 i;
for (i = 1; i < 20; i ++)
{
if (gSaveBlock1Ptr->secretBases[i].secretBaseId == 0)
{
return i;
}
}
return 0;
}
u8 sub_80EAA18(void)
{
s16 i;
for (i = 1; i < 20; i ++)
{
if (gSaveBlock1Ptr->secretBases[i].sbr_field_1_6 == 0 && gSaveBlock1Ptr->secretBases[i].sbr_field_1_0 == 0)
{
return i;
}
}
return 0;
}