through GetMapName

This commit is contained in:
PikalaxALT
2017-10-31 21:51:11 -04:00
parent 2f1325416b
commit ef535b98b5
4 changed files with 46 additions and 86 deletions

View File

@@ -5,90 +5,6 @@
.text
thumb_func_start sub_812454C
sub_812454C: @ 812454C
push {lr}
ldr r0, =gRegionMap
ldr r1, [r0]
adds r0, r1, 0
adds r0, 0x7F
ldrb r0, [r0]
cmp r0, 0
beq _08124562
adds r1, 0x7E
movs r0, 0x1
strb r0, [r1]
_08124562:
pop {r0}
bx r0
.pool
thumb_func_end sub_812454C
thumb_func_start GetMapName
@ u8 *GetMapName(u8 *dest, u16 regionMapId, u16 padLength)
GetMapName: @ 812456C
push {r4,r5,lr}
adds r5, r0, 0
lsls r1, 16
lsrs r1, 16
lsls r2, 16
lsrs r4, r2, 16
cmp r1, 0x56
bne _08124584
bl GetSecretBaseMapName
adds r1, r0, 0
b _081245B2
_08124584:
cmp r1, 0xD4
bhi _081245A0
ldr r0, =gRegionMapEntries
lsls r1, 3
adds r0, 0x4
adds r1, r0
ldr r1, [r1]
adds r0, r5, 0
bl StringCopy
adds r1, r0, 0
b _081245B2
.pool
_081245A0:
cmp r4, 0
bne _081245A6
movs r4, 0x12
_081245A6:
adds r0, r5, 0
movs r1, 0
adds r2, r4, 0
bl StringFill
b _081245D6
_081245B2:
cmp r4, 0
beq _081245D4
subs r0, r1, r5
lsls r0, 16
lsrs r0, 16
cmp r0, r4
bcs _081245D0
movs r2, 0
_081245C2:
strb r2, [r1]
adds r1, 0x1
adds r0, 0x1
lsls r0, 16
lsrs r0, 16
cmp r0, r4
bcc _081245C2
_081245D0:
movs r0, 0xFF
strb r0, [r1]
_081245D4:
adds r0, r1, 0
_081245D6:
pop {r4,r5}
pop {r1}
bx r1
thumb_func_end GetMapName
thumb_func_start sub_81245DC
sub_81245DC: @ 81245DC
push {lr}