mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 17:34:20 +01:00
sub_80EAD14
This commit is contained in:
parent
5aaa4c099b
commit
3d01d999c6
@ -5,76 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80EAD14
|
||||
sub_80EAD14: @ 80EAD14
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
adds r6, r0, 0
|
||||
mov r8, r1
|
||||
lsls r2, 24
|
||||
lsrs r7, r2, 24
|
||||
movs r5, 0
|
||||
_080EAD24:
|
||||
lsls r0, r5, 2
|
||||
adds r0, r5
|
||||
lsls r0, 5
|
||||
mov r1, r8
|
||||
adds r4, r0, r1
|
||||
ldrb r0, [r4]
|
||||
cmp r0, 0
|
||||
beq _080EAD7E
|
||||
adds r0, r6, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_80EA950
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _080EAD7E
|
||||
cmp r7, 0
|
||||
bne _080EAD50
|
||||
adds r0, r4, 0
|
||||
bl ClearSecretBase
|
||||
b _080EAD88
|
||||
_080EAD50:
|
||||
ldrh r0, [r6, 0xE]
|
||||
ldrh r3, [r4, 0xE]
|
||||
cmp r0, r3
|
||||
bls _080EAD60
|
||||
adds r0, r4, 0
|
||||
bl ClearSecretBase
|
||||
b _080EAD88
|
||||
_080EAD60:
|
||||
ldrb r0, [r6, 0x1]
|
||||
lsls r0, 28
|
||||
lsrs r0, 28
|
||||
ldrb r1, [r4, 0x1]
|
||||
movs r3, 0x10
|
||||
negs r3, r3
|
||||
adds r2, r3, 0
|
||||
ands r1, r2
|
||||
orrs r1, r0
|
||||
strb r1, [r4, 0x1]
|
||||
adds r0, r6, 0
|
||||
bl ClearSecretBase
|
||||
movs r0, 0x1
|
||||
b _080EAD8A
|
||||
_080EAD7E:
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0x13
|
||||
bls _080EAD24
|
||||
_080EAD88:
|
||||
movs r0, 0
|
||||
_080EAD8A:
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80EAD14
|
||||
|
||||
thumb_func_start sub_80EAD94
|
||||
sub_80EAD94: @ 80EAD94
|
||||
push {r4-r7,lr}
|
||||
|
@ -1679,3 +1679,36 @@ void DeleteFirstOldBaseFromPlayerInRecordMixingFriendsRecords(struct SecretBaseR
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_80EAD14(struct SecretBaseRecord *base, struct SecretBaseRecord *secretBases, u8 c)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
for (i = 0; i < 20; i++)
|
||||
{
|
||||
if (secretBases[i].secretBaseId != 0)
|
||||
{
|
||||
if (sub_80EA950(base, &secretBases[i]) == TRUE)
|
||||
{
|
||||
if (c == 0)
|
||||
{
|
||||
ClearSecretBase(&secretBases[i]);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (base->sbr_field_e > secretBases[i].sbr_field_e)
|
||||
{
|
||||
ClearSecretBase(&secretBases[i]);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
secretBases[i].sbr_field_1_0 = base->sbr_field_1_0;
|
||||
|
||||
ClearSecretBase(base);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user