mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
sub_800EDD4
This commit is contained in:
parent
abc3869eca
commit
253b3c2fa5
@ -5,78 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_800EDD4
|
||||
sub_800EDD4: @ 800EDD4
|
||||
push {r4-r6,lr}
|
||||
bl sub_800C048
|
||||
ldr r4, =gUnknown_03005000
|
||||
ldrb r0, [r4, 0xC]
|
||||
cmp r0, 0x1
|
||||
bne _0800EDF0
|
||||
ldr r0, =sub_800E748
|
||||
b _0800EDF6
|
||||
.pool
|
||||
_0800EDF0:
|
||||
cmp r0, 0
|
||||
bne _0800EE18
|
||||
ldr r0, =sub_800E94C
|
||||
_0800EDF6:
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _0800EE38
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x67
|
||||
ldrb r0, [r0]
|
||||
bl DestroyTask
|
||||
bl sub_800E604
|
||||
b _0800EE38
|
||||
.pool
|
||||
_0800EE18:
|
||||
cmp r0, 0x2
|
||||
bne _0800EE38
|
||||
ldr r0, =sub_800EB44
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _0800EE38
|
||||
adds r0, r4, 0
|
||||
adds r0, 0x67
|
||||
ldrb r0, [r0]
|
||||
bl DestroyTask
|
||||
bl sub_800E604
|
||||
_0800EE38:
|
||||
movs r5, 0
|
||||
ldr r6, =gUnknown_082ED7E0
|
||||
_0800EE3C:
|
||||
lsls r0, r5, 2
|
||||
adds r0, r6
|
||||
ldr r4, [r0]
|
||||
adds r0, r4, 0
|
||||
bl FuncIsActiveTask
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _0800EE5E
|
||||
adds r0, r4, 0
|
||||
bl FindTaskIdByFunc
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
bl DestroyTask
|
||||
_0800EE5E:
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 24
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0x2
|
||||
bls _0800EE3C
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_800EDD4
|
||||
|
||||
thumb_func_start sub_800EE78
|
||||
sub_800EE78: @ 800EE78
|
||||
push {lr}
|
||||
|
@ -142,7 +142,9 @@ struct UnkRfuStruct_2 {
|
||||
/* 0x00d */ u8 playerCount;
|
||||
/* 0x00e */ u8 filler_0e[6];
|
||||
/* 0x014 */ u8 unk_14[4][14];
|
||||
/* 0x04c */ u8 unk_4c[2][14];
|
||||
/* 0x04c */ u8 unk_4c[14];
|
||||
/* 0x05a */ u8 filler_5a[13];
|
||||
/* 0x067 */ u8 unk_67;
|
||||
/* 0x068 */ u8 filler_68[4];
|
||||
/* 0x06c */ struct UnkRfuStruct_2_Sub_6c unk_6c;
|
||||
/* 0x080 */ struct UnkRfuStruct_2_Sub_6c unk_80[5];
|
||||
|
@ -2732,7 +2732,7 @@ void sub_800ED34(u16 unused)
|
||||
|
||||
for (i = 0; i < 14; i++)
|
||||
{
|
||||
gUnknown_03005000.unk_4c[0][i] = 0;
|
||||
gUnknown_03005000.unk_4c[i] = 0;
|
||||
}
|
||||
rfu_REQ_recvData();
|
||||
rfu_waitREQComplete();
|
||||
@ -2752,3 +2752,41 @@ static void sub_800EDBC(u16 unused)
|
||||
{
|
||||
gUnknown_03005000.unk_cdb = 1;
|
||||
}
|
||||
|
||||
void sub_800EDD4(void)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
sub_800C048();
|
||||
if (gUnknown_03005000.unk_0c == 1)
|
||||
{
|
||||
if (FuncIsActiveTask(sub_800E748) == TRUE)
|
||||
{
|
||||
DestroyTask(gUnknown_03005000.unk_67);
|
||||
sub_800E604();
|
||||
}
|
||||
}
|
||||
else if (gUnknown_03005000.unk_0c == 0)
|
||||
{
|
||||
if (FuncIsActiveTask(sub_800E94C) == TRUE)
|
||||
{
|
||||
DestroyTask(gUnknown_03005000.unk_67);
|
||||
sub_800E604();
|
||||
}
|
||||
}
|
||||
else if (gUnknown_03005000.unk_0c == 2)
|
||||
{
|
||||
if (FuncIsActiveTask(sub_800EB44) == TRUE)
|
||||
{
|
||||
DestroyTask(gUnknown_03005000.unk_67);
|
||||
sub_800E604();
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if (FuncIsActiveTask(gUnknown_082ED7E0[i]) == TRUE)
|
||||
{
|
||||
DestroyTask(FindTaskIdByFunc(gUnknown_082ED7E0[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user