through sub_80E980C

This commit is contained in:
PikalaxALT 2017-10-25 08:46:08 -04:00
parent ea507b8d43
commit 42a22d4c9f
2 changed files with 16 additions and 62 deletions

View File

@ -5,68 +5,6 @@
.text .text
thumb_func_start GetSecretBaseMapName
GetSecretBaseMapName: @ 80E97EC
push {r4,lr}
adds r4, r0, 0
ldr r0, =0x00004054
bl VarGet
adds r1, r0, 0
lsls r1, 24
lsrs r1, 24
adds r0, r4, 0
bl sub_80E9780
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end GetSecretBaseMapName
thumb_func_start sub_80E980C
sub_80E980C: @ 80E980C
push {r4-r6,lr}
mov r6, r8
push {r6}
ldr r0, =0x00004054
bl VarGet
lsls r0, 24
lsrs r0, 24
ldr r1, =gSaveBlock1Ptr
mov r8, r1
lsls r5, r0, 2
adds r5, r0
lsls r5, 5
ldr r4, [r1]
adds r4, r5, r4
ldr r0, =0x00001a9e
adds r4, r0
ldr r6, =gStringVar1
adds r0, r4, 0
bl sub_80E8DF4
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
adds r0, r6, 0
adds r1, r4, 0
bl StringCopyN
movs r1, 0xFF
strb r1, [r0]
mov r1, r8
ldr r0, [r1]
adds r0, r5
ldr r1, =0x00001aa9
adds r0, r1
ldrb r1, [r0]
adds r0, r6, 0
bl ConvertInternationalString
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_80E980C
thumb_func_start sub_80E9878 thumb_func_start sub_80E9878
sub_80E9878: @ 80E9878 sub_80E9878: @ 80E9878
push {lr} push {lr}

View File

@ -577,3 +577,19 @@ u8 *sub_80E9780(u8 *dest, u8 sbId)
ConvertInternationalString(dest, gSaveBlock1Ptr->secretBases[sbId].language); ConvertInternationalString(dest, gSaveBlock1Ptr->secretBases[sbId].language);
return StringAppend(dest, gText_ApostropheSBase); return StringAppend(dest, gText_ApostropheSBase);
} }
u8 *GetSecretBaseMapName(u8 *dest)
{
return sub_80E9780(dest, VarGet(VAR_0x4054));
}
void sub_80E980C(void)
{
u8 sbId;
const u8 *src;
sbId = VarGet(VAR_0x4054);
src = gSaveBlock1Ptr->secretBases[sbId].trainerName;
*StringCopyN(gStringVar1, src, sub_80E8DF4(src)) = EOS;
ConvertInternationalString(gStringVar1, gSaveBlock1Ptr->secretBases[sbId].language);
}