sub_800F498
This commit is contained in:
parent
75a32c9dc5
commit
090f70dd5b
3 changed files with 24 additions and 51 deletions
|
@ -5,56 +5,6 @@
|
|||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_800F498
|
||||
sub_800F498: @ 800F498
|
||||
push {r4,r5,lr}
|
||||
adds r4, r0, 0
|
||||
adds r2, r1, 0
|
||||
ldrh r1, [r4]
|
||||
cmp r1, 0
|
||||
beq _0800F4DC
|
||||
ldr r0, =gUnknown_03005000
|
||||
movs r5, 0x81
|
||||
lsls r5, 1
|
||||
adds r3, r0, r5
|
||||
ldrb r0, [r3]
|
||||
lsls r0, 5
|
||||
orrs r0, r1
|
||||
strh r0, [r4]
|
||||
ldrb r0, [r3]
|
||||
adds r0, 0x1
|
||||
movs r1, 0x7
|
||||
ands r0, r1
|
||||
strb r0, [r3]
|
||||
adds r3, r4, 0
|
||||
movs r4, 0x6
|
||||
_0800F4C2:
|
||||
ldrh r1, [r3]
|
||||
lsrs r0, r1, 8
|
||||
strb r0, [r2, 0x1]
|
||||
strb r1, [r2]
|
||||
adds r2, 0x2
|
||||
adds r3, 0x2
|
||||
subs r4, 0x1
|
||||
cmp r4, 0
|
||||
bge _0800F4C2
|
||||
b _0800F4EA
|
||||
.pool
|
||||
_0800F4DC:
|
||||
movs r1, 0
|
||||
adds r0, r2, 0
|
||||
adds r0, 0xD
|
||||
_0800F4E2:
|
||||
strb r1, [r0]
|
||||
subs r0, 0x1
|
||||
cmp r0, r2
|
||||
bge _0800F4E2
|
||||
_0800F4EA:
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_800F498
|
||||
|
||||
thumb_func_start sub_800F4F0
|
||||
sub_800F4F0: @ 800F4F0
|
||||
push {r4-r7,lr}
|
||||
|
|
|
@ -152,7 +152,9 @@ struct UnkRfuStruct_2 {
|
|||
/* 0x080 */ struct UnkRfuStruct_2_Sub_6c unk_80[5];
|
||||
/* 0x0e4 */ u8 filler_e4[10];
|
||||
/* 0x0ee */ vu8 unk_ee;
|
||||
/* 0x0ef */ u8 filler_ef[0x35];
|
||||
/* 0x0ef */ u8 filler_ef[0x13];
|
||||
/* 0x102 */ u8 unk_102;
|
||||
/* 0x103 */ u8 filler_103[0x21];
|
||||
/* 0x124 */ struct UnkRfuStruct_2_Sub_124 unk_124;
|
||||
/* 0x9e8 */ struct UnkRfuStruct_2_Sub_9e8 unk_9e8;
|
||||
/* 0xc1c */ struct UnkRfuStruct_2_Sub_c1c unk_c1c;
|
||||
|
|
|
@ -3123,3 +3123,24 @@ bool32 sub_800F1E0(void)
|
|||
retval = gUnknown_03005000.unk_cdc;
|
||||
return gUnknown_03007890->unk_06 ? retval & 1 : FALSE;
|
||||
}
|
||||
|
||||
void sub_800F498(u16 *a0, u8 *a1)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (a0[0])
|
||||
{
|
||||
a0[0] |= (gUnknown_03005000.unk_102 << 5);
|
||||
gUnknown_03005000.unk_102 = (gUnknown_03005000.unk_102 + 1) & 7;
|
||||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
a1[2 * i + 1] = a0[i] >> 8;
|
||||
a1[2 * i + 0] = a0[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 14; i++)
|
||||
a1[i] = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue