through sub_800F048

This commit is contained in:
PikalaxALT 2017-12-10 10:31:11 -05:00
parent beeb86be37
commit b1c6f80e10
3 changed files with 36 additions and 81 deletions

View file

@ -5,85 +5,6 @@
.text
thumb_func_start sub_800F014
sub_800F014: @ 800F014
push {lr}
ldr r3, =gSendCmd
ldr r2, =gRecvCmds
movs r1, 0x6
_0800F01C:
ldrh r0, [r3]
strh r0, [r2]
adds r3, 0x2
adds r2, 0x2
subs r1, 0x1
cmp r1, 0
bge _0800F01C
ldr r1, =gSendCmd
movs r2, 0
adds r0, r1, 0
adds r0, 0xC
_0800F032:
strh r2, [r0]
subs r0, 0x2
cmp r0, r1
bge _0800F032
pop {r0}
bx r0
.pool
thumb_func_end sub_800F014
thumb_func_start sub_800F048
sub_800F048: @ 800F048
push {r4,r5,lr}
ldr r4, =gUnknown_03005000
ldr r0, =0x00000c3c
adds r5, r4, r0
ldrb r0, [r5]
cmp r0, 0
beq _0800F07A
ldr r1, =0x00000c1c
adds r0, r4, r1
adds r1, r4, 0
adds r1, 0x4C
bl sub_800DAC8
lsls r0, 24
lsrs r2, r0, 24
ldr r1, =0x00000c3a
adds r0, r4, r1
ldrb r0, [r0]
adds r1, r0, 0
cmp r1, 0
bne _0800F076
ldrb r0, [r5]
strb r1, [r5]
_0800F076:
cmp r2, 0
bne _0800F09E
_0800F07A:
ldr r5, =gUnknown_03005000
ldr r1, =0x00000c3c
adds r0, r5, r1
ldrb r0, [r0]
cmp r0, 0
bne _0800F09E
ldr r1, =0x000009e8
adds r0, r5, r1
adds r4, r5, 0
adds r4, 0x4C
adds r1, r4, 0
bl sub_800D9DC
ldr r1, =0x00000c1c
adds r0, r5, r1
adds r1, r4, 0
bl sub_800DA68
_0800F09E:
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_800F048
thumb_func_start sub_800F0B8
sub_800F0B8: @ 800F0B8
push {r4,lr}

View file

@ -154,7 +154,7 @@ struct UnkRfuStruct_2 {
/* 0x124 */ struct UnkRfuStruct_2_Sub_124 unk_124;
/* 0x9e8 */ struct UnkRfuStruct_2_Sub_9e8 unk_9e8;
/* 0xc1c */ struct UnkRfuStruct_2_Sub_c1c unk_c1c;
/* 0xc3c */ u8 unk_c3c;
/* 0xc3c */ vu8 unk_c3c;
/* 0xc3d */ u8 unk_c3d;
/* 0xc3e */ vu8 unk_c3e;
/* 0xc3f */ u8 unk_c3f[70];

View file

@ -52,7 +52,7 @@ static void sub_800EAB4(void);
static void sub_800EAFC(void);
void sub_800ED34(u16 unused);
static void sub_800EDBC(u16 unused);
void sub_800F048(void);
static void sub_800F048(void);
struct UnkLinkRfuStruct_02022B14 *sub_800F7DC(void);
void sub_800FCC4(struct UnkRfuStruct_2_Sub_6c *data);
bool32 sub_8010454(u16 a0);
@ -2929,3 +2929,37 @@ __attribute__((naked)) void sub_800EFB0(void)
"\t.pool");
}
#endif
void sub_800F014(void)
{
int i;
for (i = 0; i < 7; i++)
{
gRecvCmds[0][i] = gSendCmd[i];
}
for (i = 0; i < 7; i++)
{
gSendCmd[i] = 0;
}
}
static void sub_800F048(void)
{
if (gUnknown_03005000.unk_c3c)
{
u8 r2 = sub_800DAC8(&gUnknown_03005000.unk_c1c, gUnknown_03005000.unk_4c);
if (gUnknown_03005000.unk_c1c.unk_1e == 0)
{
gUnknown_03005000.unk_c3c = 0;
}
if (r2)
{
return;
}
}
if (gUnknown_03005000.unk_c3c == 0)
{
sub_800D9DC(&gUnknown_03005000.unk_9e8, gUnknown_03005000.unk_4c);
sub_800DA68(&gUnknown_03005000.unk_c1c, gUnknown_03005000.unk_4c);
}
}