sub_800A7DC

This commit is contained in:
PikalaxALT 2017-11-10 23:12:21 -05:00
parent 92afe9e33f
commit 2c37f83546
2 changed files with 28 additions and 47 deletions

View File

@ -5,48 +5,6 @@
.text
thumb_func_start sub_800A7DC
sub_800A7DC: @ 800A7DC
push {r4-r7,lr}
adds r3, r0, 0
lsls r1, 24
lsrs r7, r1, 24
lsls r2, 24
lsrs r2, 24
movs r6, 0
ldrb r0, [r3]
cmp r0, 0
beq _0800A81C
adds r4, r3, 0
lsls r5, r2, 24
_0800A7F4:
ldrb r0, [r4]
cmp r0, 0xA
bne _0800A804
movs r0, 0x80
lsls r0, 17
adds r5, r0
movs r6, 0
b _0800A814
_0800A804:
ldrb r0, [r4]
adds r1, r7, r6
lsls r1, 24
lsrs r1, 24
lsrs r2, r5, 24
bl sub_800A6B0
adds r6, 0x1
_0800A814:
adds r4, 0x1
ldrb r0, [r4]
cmp r0, 0
bne _0800A7F4
_0800A81C:
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end sub_800A7DC
thumb_func_start sub_800A824
sub_800A824: @ 800A824
push {lr}

View File

@ -1125,7 +1125,7 @@ u16 sub_800A648(const u16 *data, u16 size)
return chksum;
}
void sub_800A678(u8 a0, u8 a1, u8 a2)
void sub_800A678(char a0, u8 a1, u8 a2)
{
u16 *vAddr;
@ -1133,7 +1133,7 @@ void sub_800A678(u8 a0, u8 a1, u8 a2)
vAddr[a2 * 32 + a1] = (gUnknown_03003130.paletteNum << 12) | (a0 + 1 + gUnknown_03003130.dummy_8);
}
void sub_800A6B0(u8 a0, u8 a1, u8 a2)
void sub_800A6B0(char a0, u8 a1, u8 a2)
{
u16 *vAddr;
@ -1143,7 +1143,7 @@ void sub_800A6B0(u8 a0, u8 a1, u8 a2)
void sub_800A6E8(u32 a0, u8 a1, u8 a2, u8 a3)
{
u8 sp[32 / 2];
char sp[32 / 2];
int i;
for (i = 0; i < a3; i ++)
@ -1160,7 +1160,7 @@ void sub_800A6E8(u32 a0, u8 a1, u8 a2, u8 a3)
void sub_800A73C(int a0, u8 a1, u8 a2, u8 a3)
{
u8 sp[32 / 2];
char sp[32 / 2];
int sp10;
int i;
@ -1182,6 +1182,29 @@ void sub_800A73C(int a0, u8 a1, u8 a2, u8 a3)
}
if (sp10 != -1)
{
sub_800A678(10, sp10, a2);
sub_800A678(*"\n", sp10, a2);
}
}
void sub_800A7DC(const char *a0, u8 a1, u8 a2)
{
int r6;
int i;
int r5;
r5 = 0;
r6 = 0;
for (i = 0; a0[i] != 0; a0 ++)
{
if (a0[i] == *"\n")
{
r5 ++;
r6 = 0;
}
else
{
sub_800A6B0(a0[i], a1 + r6, a2 + r5);
r6 ++;
}
}
}