sovereignx/asm/text_renderer.s

4628 lines
71 KiB
ArmAsm
Raw Normal View History

thumb_func_start SetFontsPointer
; void SetFontsPointer(struct FontInfo *fonts)
SetFontsPointer: ; 80045A4
2015-10-06 13:46:30 +01:00
ldr r1, =0x03002f80
str r0, [r1]
bx lr
.pool
thumb_func_end SetFontsPointer
2015-10-06 13:46:30 +01:00
thumb_func_start DeactivateAllTextPrinters
; void DeactivateAllTextPrinters()
DeactivateAllTextPrinters: ; 80045B0
2015-10-06 13:46:30 +01:00
push {lr}
ldr r1, =0x020201b0
movs r2, 0
ldr r3, =0x0000045c
adds r0, r1, r3
2016-01-07 04:23:20 +00:00
_080045BA:
2015-10-06 13:46:30 +01:00
strb r2, [r0, 0x1B]
subs r0, 0x24
cmp r0, r1
2016-01-07 04:23:20 +00:00
bge _080045BA
2015-10-06 13:46:30 +01:00
pop {r0}
bx r0
.pool
thumb_func_end DeactivateAllTextPrinters
2015-10-06 13:46:30 +01:00
thumb_func_start Print
; u16 Print(u8 windowId, u8 fontId, u8 *str, u8 x, u8 y, u8 speed, void ( *callback)(u16, struct TextPrinter *))
2015-10-10 11:12:48 +01:00
Print: ; 80045D0
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x10
ldr r4, [sp, 0x28]
ldr r5, [sp, 0x2C]
ldr r7, [sp, 0x30]
lsls r1, 24
lsrs r1, 24
lsls r3, 24
lsrs r3, 24
lsls r4, 24
lsrs r4, 24
lsls r5, 24
lsrs r5, 24
mov r8, r5
str r2, [sp]
mov r2, sp
strb r0, [r2, 0x4]
mov r0, sp
strb r1, [r0, 0x5]
strb r3, [r0, 0x6]
strb r4, [r0, 0x7]
strb r3, [r0, 0x8]
strb r4, [r0, 0x9]
ldr r0, =0x03002f80
ldr r0, [r0]
lsls r3, r1, 1
adds r3, r1
lsls r3, 2
adds r3, r0
ldrb r0, [r3, 0x6]
strb r0, [r2, 0xA]
mov r1, sp
ldrb r0, [r3, 0x7]
strb r0, [r1, 0xB]
mov r5, sp
ldrb r1, [r3, 0x8]
lsls r1, 28
movs r6, 0xF
lsrs r1, 28
ldrb r4, [r5, 0xC]
movs r2, 0x10
negs r2, r2
adds r0, r2, 0
ands r0, r4
orrs r0, r1
strb r0, [r5, 0xC]
mov r4, sp
ldrb r1, [r3, 0x8]
lsrs r1, 4
lsls r1, 4
ands r0, r6
orrs r0, r1
strb r0, [r4, 0xC]
ldrb r0, [r3, 0x9]
lsls r0, 28
lsrs r0, 28
adds r1, r6, 0
ands r1, r0
ldrb r0, [r4, 0xD]
ands r2, r0
orrs r2, r1
strb r2, [r4, 0xD]
mov r1, sp
ldrb r0, [r3, 0x9]
lsrs r0, 4
lsls r0, 4
ands r2, r6
orrs r2, r0
strb r2, [r1, 0xD]
mov r0, sp
mov r1, r8
adds r2, r7, 0
bl AddTextPrinter
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r0, 16
add sp, 0x10
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
.pool
thumb_func_end Print
thumb_func_start AddTextPrinter
; u16 AddTextPrinter(struct TextPrinter *textPrinter, u8 speed, void ( *callback)(u16, struct TextPrinter *))
AddTextPrinter: ; 800467C
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
adds r6, r0, 0
mov r12, r2
lsls r1, 24
lsrs r5, r1, 24
ldr r0, =0x03002f80
ldr r0, [r0]
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08004698
2015-10-06 13:46:30 +01:00
movs r0, 0
2016-01-07 04:23:20 +00:00
b _08004766
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08004698:
2015-10-06 13:46:30 +01:00
ldr r0, =0x0202018c
movs r2, 0
movs r1, 0x1
strb r1, [r0, 0x1B]
strb r2, [r0, 0x1C]
strb r5, [r0, 0x1D]
strb r2, [r0, 0x1E]
strb r2, [r0, 0x1F]
adds r4, r0, 0
movs r1, 0x6
adds r0, 0x1A
2016-01-07 04:23:20 +00:00
_080046AE:
2015-10-06 13:46:30 +01:00
strb r2, [r0]
subs r0, 0x1
subs r1, 0x1
cmp r1, 0
2016-01-07 04:23:20 +00:00
bge _080046AE
2015-10-06 13:46:30 +01:00
adds r1, r4, 0
adds r0, r6, 0
ldm r0!, {r2,r3,r7}
stm r1!, {r2,r3,r7}
ldr r0, [r0]
str r0, [r1]
mov r0, r12
str r0, [r4, 0x10]
adds r0, r4, 0
adds r0, 0x20
movs r1, 0
strb r1, [r0]
adds r0, 0x1
strb r1, [r0]
ldrb r0, [r6, 0xC]
lsrs r0, 4
ldrb r2, [r6, 0xD]
lsls r1, r2, 28
lsrs r1, 28
lsrs r2, 4
bl GenerateFontHalfRowLookupTable
2015-10-06 13:46:30 +01:00
cmp r5, 0xFF
2016-01-07 04:23:20 +00:00
beq _08004718
2015-10-06 13:46:30 +01:00
cmp r5, 0
2016-01-07 04:23:20 +00:00
beq _08004718
2015-10-06 13:46:30 +01:00
ldrb r0, [r4, 0x1D]
subs r0, 0x1
strb r0, [r4, 0x1D]
ldr r2, =0x020201b0
ldrb r0, [r6, 0x4]
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
adds r1, r2
adds r0, r4, 0
ldm r0!, {r2-r4}
stm r1!, {r2-r4}
ldm r0!, {r2,r3,r7}
stm r1!, {r2,r3,r7}
ldm r0!, {r2,r4,r7}
stm r1!, {r2,r4,r7}
2016-01-07 04:23:20 +00:00
b _0800475E
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08004718:
2015-10-06 13:46:30 +01:00
ldr r1, =0x0202018c
movs r0, 0
strb r0, [r1, 0x1D]
movs r4, 0
ldr r7, =0x000003ff
2016-01-07 04:23:20 +00:00
b _08004732
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_0800472C:
2015-10-06 13:46:30 +01:00
adds r0, r4, 0x1
lsls r0, 16
lsrs r4, r0, 16
2016-01-07 04:23:20 +00:00
_08004732:
2015-10-06 13:46:30 +01:00
cmp r4, r7
2016-01-07 04:23:20 +00:00
bhi _08004740
2015-10-06 13:46:30 +01:00
ldr r0, =0x0202018c
bl RenderFont
2015-10-06 13:46:30 +01:00
cmp r0, 0x1
2016-01-07 04:23:20 +00:00
bne _0800472C
_08004740:
2015-10-06 13:46:30 +01:00
cmp r5, 0xFF
2016-01-07 04:23:20 +00:00
beq _0800474E
2015-10-06 13:46:30 +01:00
ldr r0, =0x0202018c
ldrb r0, [r0, 0x4]
movs r1, 0x2
bl CopyWindowToVram
2016-01-07 04:23:20 +00:00
_0800474E:
2015-10-06 13:46:30 +01:00
ldr r2, =0x020201b0
ldrb r1, [r6, 0x4]
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
adds r0, r2
movs r1, 0
strb r1, [r0, 0x1B]
2016-01-07 04:23:20 +00:00
_0800475E:
2015-10-06 13:46:30 +01:00
ldr r1, =0x03002f84
movs r0, 0
strb r0, [r1]
movs r0, 0x1
2016-01-07 04:23:20 +00:00
_08004766:
2015-10-06 13:46:30 +01:00
pop {r4-r7}
pop {r1}
bx r1
.pool
thumb_func_end AddTextPrinter
2015-10-06 13:46:30 +01:00
thumb_func_start RunTextPrinters
; void RunTextPrinters()
RunTextPrinters: ; 8004778
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
mov r7, r8
push {r7}
ldr r0, =0x03002f84
ldrb r0, [r0]
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _080047F6
2015-10-06 13:46:30 +01:00
ldr r0, =0x020201b0
movs r6, 0
adds r5, r0, 0x4
mov r8, r0
movs r7, 0x1F
2016-01-07 04:23:20 +00:00
_08004790:
2015-10-06 13:46:30 +01:00
ldrb r0, [r5, 0x17]
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _080047E8
2015-10-06 13:46:30 +01:00
mov r0, r8
bl RenderFont
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r4, r0, 16
cmp r4, 0x1
2016-01-07 04:23:20 +00:00
beq _080047E4
2015-10-06 13:46:30 +01:00
cmp r4, 0x1
2016-01-07 04:23:20 +00:00
bgt _080047B8
2015-10-06 13:46:30 +01:00
cmp r4, 0
2016-01-07 04:23:20 +00:00
beq _080047BE
b _080047E8
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080047B8:
2015-10-06 13:46:30 +01:00
cmp r4, 0x3
2016-01-07 04:23:20 +00:00
beq _080047C6
b _080047E8
_080047BE:
2015-10-06 13:46:30 +01:00
ldrb r0, [r5]
movs r1, 0x2
bl CopyWindowToVram
2016-01-07 04:23:20 +00:00
_080047C6:
2015-10-06 13:46:30 +01:00
ldr r1, =0x020201b0
adds r0, r1, 0
adds r0, 0x10
adds r0, r6, r0
ldr r2, [r0]
cmp r2, 0
2016-01-07 04:23:20 +00:00
beq _080047E8
2015-10-06 13:46:30 +01:00
adds r0, r6, r1
adds r1, r4, 0
bl _call_via_r2
2016-01-07 04:23:20 +00:00
b _080047E8
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080047E4:
2015-10-06 13:46:30 +01:00
movs r0, 0
strb r0, [r5, 0x17]
2016-01-07 04:23:20 +00:00
_080047E8:
2015-10-06 13:46:30 +01:00
adds r6, 0x24
adds r5, 0x24
movs r0, 0x24
add r8, r0
subs r7, 0x1
cmp r7, 0
2016-01-07 04:23:20 +00:00
bge _08004790
_080047F6:
2015-10-06 13:46:30 +01:00
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
thumb_func_end RunTextPrinters
2015-10-06 13:46:30 +01:00
thumb_func_start IsTextPrinterActive
2016-01-08 07:27:40 +00:00
; bool8 IsTextPrinterActive(u8 id)
IsTextPrinterActive: ; 8004800
2015-10-06 13:46:30 +01:00
lsls r0, 24
lsrs r0, 24
ldr r2, =0x020201b0
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
adds r1, r2
ldrb r0, [r1, 0x1B]
bx lr
.pool
thumb_func_end IsTextPrinterActive
2015-10-06 13:46:30 +01:00
thumb_func_start RenderFont
; u16 RenderFont(struct TextPrinter *textPrinter)
RenderFont: ; 8004818
2015-10-06 13:46:30 +01:00
push {r4,lr}
adds r4, r0, 0
2016-01-07 04:23:20 +00:00
_0800481C:
2015-10-06 13:46:30 +01:00
ldrb r1, [r4, 0x5]
ldr r0, =0x03002f80
ldr r2, [r0]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldr r1, [r0]
adds r0, r4, 0
bl _call_via_r1
lsls r0, 16
lsrs r0, 16
cmp r0, 0x2
2016-01-07 04:23:20 +00:00
beq _0800481C
2015-10-06 13:46:30 +01:00
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end RenderFont
2015-10-06 13:46:30 +01:00
thumb_func_start GenerateFontHalfRowLookupTable
; void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor)
GenerateFontHalfRowLookupTable: ; 8004844
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x24
lsls r0, 24
lsrs r0, 24
lsls r1, 24
lsrs r1, 24
lsls r2, 24
lsrs r2, 24
ldr r3, =0x03000948
ldr r4, =0x030009ea
strh r1, [r4]
ldr r4, =0x030009ec
strh r0, [r4]
ldr r4, =0x030009ee
strh r2, [r4]
lsls r5, r1, 12
lsls r6, r0, 12
lsls r4, r2, 12
mov r8, r4
lsls r7, r1, 8
str r7, [sp]
lsls r4, r1, 4
mov r9, r4
orrs r7, r4
str r7, [sp, 0x4]
orrs r7, r1
adds r4, r5, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
adds r4, r6, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
mov r4, r8
orrs r7, r4
strh r7, [r3]
adds r3, 0x2
lsls r7, r0, 8
mov r10, r7
mov r4, r10
mov r7, r9
orrs r4, r7
str r4, [sp, 0x8]
adds r7, r4, 0
orrs r7, r1
adds r4, r5, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
adds r4, r6, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
mov r4, r8
orrs r7, r4
strh r7, [r3]
adds r3, 0x2
lsls r7, r2, 8
mov r12, r7
mov r4, r12
mov r7, r9
orrs r4, r7
str r4, [sp, 0xC]
adds r7, r4, 0
orrs r7, r1
adds r4, r5, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
adds r4, r6, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
mov r4, r8
orrs r7, r4
strh r7, [r3]
adds r3, 0x2
lsls r7, r0, 4
mov r9, r7
ldr r4, [sp]
orrs r4, r7
str r4, [sp, 0x10]
adds r7, r4, 0
orrs r7, r1
adds r4, r5, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
adds r4, r6, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
mov r4, r8
orrs r7, r4
strh r7, [r3]
adds r3, 0x2
mov r7, r10
adds r4, r7, 0
mov r7, r9
orrs r4, r7
str r4, [sp, 0x14]
adds r7, r4, 0
orrs r7, r1
adds r4, r5, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
adds r4, r6, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
mov r4, r8
orrs r7, r4
strh r7, [r3]
adds r3, 0x2
mov r7, r12
adds r4, r7, 0
mov r7, r9
orrs r4, r7
str r4, [sp, 0x18]
adds r7, r4, 0
orrs r7, r1
adds r4, r5, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
adds r4, r6, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
mov r4, r8
orrs r7, r4
strh r7, [r3]
adds r3, 0x2
lsls r7, r2, 4
mov r9, r7
mov r4, r9
ldr r7, [sp]
orrs r7, r4
str r7, [sp, 0x1C]
orrs r7, r1
adds r4, r5, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
adds r4, r6, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
mov r4, r8
orrs r7, r4
strh r7, [r3]
adds r3, 0x2
mov r7, r9
mov r4, r10
orrs r4, r7
str r4, [sp, 0x20]
adds r7, r4, 0
orrs r7, r1
adds r4, r5, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
adds r4, r6, 0
orrs r4, r7
strh r4, [r3]
adds r3, 0x2
mov r4, r8
orrs r7, r4
strh r7, [r3]
adds r3, 0x2
mov r4, r12
mov r7, r9
orrs r4, r7
adds r7, r4, 0
orrs r7, r1
adds r1, r5, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
adds r1, r6, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
mov r1, r8
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
ldr r7, [sp, 0x4]
orrs r7, r0
adds r1, r5, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
adds r1, r6, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
mov r1, r8
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
ldr r7, [sp, 0x8]
orrs r7, r0
adds r1, r5, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
adds r1, r6, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
mov r1, r8
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
ldr r7, [sp, 0xC]
orrs r7, r0
adds r1, r5, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
adds r1, r6, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
mov r1, r8
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
ldr r7, [sp, 0x10]
orrs r7, r0
adds r1, r5, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
adds r1, r6, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
mov r1, r8
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
ldr r7, [sp, 0x14]
orrs r7, r0
adds r1, r5, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
adds r1, r6, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
mov r1, r8
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
ldr r7, [sp, 0x18]
orrs r7, r0
adds r1, r5, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
adds r1, r6, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
mov r1, r8
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
ldr r7, [sp, 0x1C]
orrs r7, r0
adds r1, r5, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
adds r1, r6, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
mov r1, r8
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
ldr r7, [sp, 0x20]
orrs r7, r0
adds r1, r5, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
adds r1, r6, 0
orrs r1, r7
strh r1, [r3]
adds r3, 0x2
mov r1, r8
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
adds r7, r4, 0
orrs r7, r0
adds r0, r5, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
adds r0, r6, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
adds r7, r2, 0
ldr r0, [sp, 0x4]
orrs r7, r0
adds r0, r5, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
adds r0, r6, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
orrs r7, r1
strh r7, [r3]
adds r3, 0x2
adds r7, r2, 0
ldr r1, [sp, 0x8]
orrs r7, r1
adds r0, r5, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
adds r0, r6, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
mov r0, r8
orrs r7, r0
strh r7, [r3]
adds r3, 0x2
adds r7, r2, 0
ldr r1, [sp, 0xC]
orrs r7, r1
adds r0, r5, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
adds r0, r6, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
mov r0, r8
orrs r7, r0
strh r7, [r3]
adds r3, 0x2
adds r7, r2, 0
ldr r1, [sp, 0x10]
orrs r7, r1
adds r0, r5, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
adds r0, r6, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
mov r0, r8
orrs r7, r0
strh r7, [r3]
adds r3, 0x2
adds r7, r2, 0
ldr r1, [sp, 0x14]
orrs r7, r1
adds r0, r5, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
adds r0, r6, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
mov r0, r8
orrs r7, r0
strh r7, [r3]
adds r3, 0x2
adds r7, r2, 0
ldr r1, [sp, 0x18]
orrs r7, r1
adds r0, r5, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
adds r0, r6, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
mov r0, r8
orrs r7, r0
strh r7, [r3]
adds r3, 0x2
adds r7, r2, 0
ldr r1, [sp, 0x1C]
orrs r7, r1
adds r0, r5, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
adds r0, r6, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
mov r0, r8
orrs r7, r0
strh r7, [r3]
adds r3, 0x2
adds r7, r2, 0
ldr r1, [sp, 0x20]
orrs r7, r1
adds r0, r5, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
adds r0, r6, 0
orrs r0, r7
strh r0, [r3]
adds r3, 0x2
mov r0, r8
orrs r7, r0
strh r7, [r3]
adds r3, 0x2
adds r7, r2, 0
orrs r7, r4
orrs r5, r7
strh r5, [r3]
adds r3, 0x2
orrs r6, r7
strh r6, [r3]
orrs r0, r7
strh r0, [r3, 0x2]
add sp, 0x24
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end GenerateFontHalfRowLookupTable
2015-10-06 13:46:30 +01:00
thumb_func_start SaveTextColors
; void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor)
SaveTextColors: ; 8004BE0
2015-10-06 13:46:30 +01:00
ldr r3, =0x030009ea
ldrh r3, [r3]
strb r3, [r1]
ldr r1, =0x030009ec
ldrh r1, [r1]
strb r1, [r0]
ldr r0, =0x030009ee
ldrh r0, [r0]
strb r0, [r2]
bx lr
.pool
thumb_func_end SaveTextColors
2015-10-06 13:46:30 +01:00
thumb_func_start RestoreTextColors
; void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor)
RestoreTextColors: ; 8004C00
2015-10-06 13:46:30 +01:00
push {lr}
ldrb r0, [r0]
ldrb r1, [r1]
ldrb r2, [r2]
bl GenerateFontHalfRowLookupTable
2015-10-06 13:46:30 +01:00
pop {r0}
bx r0
thumb_func_end RestoreTextColors
2015-10-06 13:46:30 +01:00
2015-10-08 08:21:20 +01:00
thumb_func_start DecompressGlyphTile
2015-10-10 11:12:48 +01:00
; void DecompressGlyphTile(u16 *src, u32 *dest)
DecompressGlyphTile: ; 8004C10
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
mov r7, r8
push {r7}
ldrh r7, [r0]
ldr r5, =0x03000948
ldr r4, =gFontHalfRowOffsets
2015-10-06 13:46:30 +01:00
movs r2, 0xFF
mov r8, r2
adds r2, r7, 0
mov r3, r8
ands r2, r3
adds r2, r4
ldrb r2, [r2]
lsls r2, 1
adds r2, r5
ldrh r3, [r2]
lsls r3, 16
lsrs r2, r7, 8
adds r2, r4
ldrb r2, [r2]
lsls r2, 1
adds r2, r5
ldrh r2, [r2]
orrs r3, r2
adds r6, r1, 0
stm r6!, {r3}
ldrh r7, [r0, 0x2]
adds r0, 0x4
adds r2, r7, 0
mov r3, r8
ands r2, r3
adds r2, r4
ldrb r2, [r2]
lsls r2, 1
adds r2, r5
ldrh r3, [r2]
lsls r3, 16
lsrs r2, r7, 8
adds r2, r4
ldrb r2, [r2]
lsls r2, 1
adds r2, r5
ldrh r2, [r2]
orrs r3, r2
str r3, [r1, 0x4]
adds r6, 0x4
ldrh r7, [r0]
adds r0, 0x2
adds r1, r7, 0
mov r2, r8
ands r1, r2
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r2, [r1]
lsls r2, 16
lsrs r1, r7, 8
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r1, [r1]
orrs r2, r1
stm r6!, {r2}
ldrh r7, [r0]
adds r0, 0x2
adds r1, r7, 0
mov r3, r8
ands r1, r3
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r2, [r1]
lsls r2, 16
lsrs r1, r7, 8
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r1, [r1]
orrs r2, r1
stm r6!, {r2}
ldrh r7, [r0]
adds r0, 0x2
adds r1, r7, 0
ands r1, r3
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r2, [r1]
lsls r2, 16
lsrs r1, r7, 8
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r1, [r1]
orrs r2, r1
stm r6!, {r2}
ldrh r7, [r0]
adds r0, 0x2
adds r1, r7, 0
ands r1, r3
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r2, [r1]
lsls r2, 16
lsrs r1, r7, 8
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r1, [r1]
orrs r2, r1
stm r6!, {r2}
ldrh r7, [r0]
adds r1, r7, 0
ands r1, r3
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r2, [r1]
lsls r2, 16
lsrs r1, r7, 8
adds r1, r4
ldrb r1, [r1]
lsls r1, 1
adds r1, r5
ldrh r1, [r1]
orrs r2, r1
stm r6!, {r2}
ldrh r7, [r0, 0x2]
adds r0, r7, 0
ands r0, r3
adds r0, r4
ldrb r0, [r0]
lsls r0, 1
adds r0, r5
ldrh r1, [r0]
lsls r1, 16
lsrs r0, r7, 8
adds r0, r4
ldrb r0, [r0]
lsls r0, 1
adds r0, r5
ldrh r0, [r0]
orrs r1, r0
str r1, [r6]
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
2015-10-08 08:21:20 +01:00
thumb_func_end DecompressGlyphTile
2015-10-06 13:46:30 +01:00
thumb_func_start GetLastTextColor
; u8 GetLastTextColor(u8 colorType)
GetLastTextColor: ; 8004D58
2015-10-06 13:46:30 +01:00
push {lr}
lsls r0, 24
lsrs r0, 24
adds r1, r0, 0
cmp r0, 0x1
2016-01-07 04:23:20 +00:00
beq _08004D8C
2015-10-06 13:46:30 +01:00
cmp r0, 0x1
2016-01-07 04:23:20 +00:00
bgt _08004D6E
2015-10-06 13:46:30 +01:00
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08004D74
b _08004D98
_08004D6E:
2015-10-06 13:46:30 +01:00
cmp r1, 0x2
2016-01-07 04:23:20 +00:00
beq _08004D80
b _08004D98
_08004D74:
2015-10-06 13:46:30 +01:00
ldr r0, =0x030009ec
ldrb r0, [r0]
2016-01-07 04:23:20 +00:00
b _08004D9A
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08004D80:
2015-10-06 13:46:30 +01:00
ldr r0, =0x030009ea
ldrb r0, [r0]
2016-01-07 04:23:20 +00:00
b _08004D9A
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08004D8C:
2015-10-06 13:46:30 +01:00
ldr r0, =0x030009ee
ldrb r0, [r0]
2016-01-07 04:23:20 +00:00
b _08004D9A
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08004D98:
2015-10-06 13:46:30 +01:00
movs r0, 0
2016-01-07 04:23:20 +00:00
_08004D9A:
2015-10-06 13:46:30 +01:00
pop {r1}
bx r1
thumb_func_end GetLastTextColor
2015-10-06 13:46:30 +01:00
thumb_func_start CopyGlyphToWindow
; int CopyGlyphToWindow(struct TextPrinter *x)
2015-10-10 11:12:48 +01:00
CopyGlyphToWindow: ; 8004DA0
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8C
adds r3, r0, 0
ldrb r1, [r3, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
ldr r1, =0x02020004
adds r1, r0, r1
adds r2, r1, 0
ldrb r7, [r1, 0x3]
lsls r0, r7, 3
ldrb r6, [r3, 0x8]
subs r4, r0, r6
ldr r5, =0x03002f90
adds r0, r5, 0
adds r0, 0x80
ldrb r0, [r0]
cmp r4, r0
2016-01-07 04:23:20 +00:00
ble _08004DD2
2015-10-06 13:46:30 +01:00
adds r4, r0, 0
2016-01-07 04:23:20 +00:00
_08004DD2:
2015-10-06 13:46:30 +01:00
ldrb r0, [r1, 0x4]
lsls r0, 3
ldrb r3, [r3, 0x9]
subs r0, r3
adds r1, r5, 0
adds r1, 0x81
ldrb r1, [r1]
cmp r0, r1
2016-01-07 04:23:20 +00:00
ble _08004DE6
2015-10-06 13:46:30 +01:00
adds r0, r1, 0
2016-01-07 04:23:20 +00:00
_08004DE6:
2015-10-06 13:46:30 +01:00
str r6, [sp]
mov r8, r3
adds r3, r5, 0
ldr r2, [r2, 0x8]
mov r9, r2
lsls r1, r7, 5
str r1, [sp, 0x4]
cmp r4, 0x8
2016-01-07 04:23:20 +00:00
ble _08004DFA
b _08004F94
_08004DFA:
2015-10-06 13:46:30 +01:00
cmp r0, 0x8
2016-01-07 04:23:20 +00:00
bgt _08004E84
2015-10-06 13:46:30 +01:00
mov r1, r8
str r3, [sp, 0x8]
adds r2, r6, 0
adds r2, r4
mov r8, r2
adds r0, r1, r0
str r0, [sp, 0xC]
str r6, [sp, 0x10]
cmp r1, r0
2016-01-07 04:23:20 +00:00
bcc _08004E14
b _080052AA
_08004E14:
2015-10-06 13:46:30 +01:00
ldr r3, [sp, 0x8]
ldm r3!, {r5}
str r3, [sp, 0x8]
ldr r4, [sp, 0x10]
adds r0, r1, 0x1
mov r10, r0
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcs _08004E72
2015-10-06 13:46:30 +01:00
movs r2, 0x7
mov r12, r2
lsrs r0, r1, 3
ldr r2, [sp, 0x4]
adds r3, r0, 0
muls r3, r2
adds r7, r3, 0
mov r3, r12
ands r1, r3
lsls r6, r1, 2
2016-01-07 04:23:20 +00:00
_08004E38:
2015-10-06 13:46:30 +01:00
adds r3, r5, 0
movs r0, 0xF
ands r3, r0
cmp r3, 0
2016-01-07 04:23:20 +00:00
beq _08004E6A
2015-10-06 13:46:30 +01:00
lsrs r2, r4, 3
lsls r2, 5
add r2, r9
adds r0, r4, 0
mov r1, r12
ands r0, r1
lsrs r0, 1
adds r2, r0
adds r2, r7
adds r2, r6
movs r1, 0x1
ands r1, r4
lsls r1, 2
lsls r3, r1
movs r0, 0xF0
asrs r0, r1
ldrb r1, [r2]
ands r0, r1
orrs r3, r0
strb r3, [r2]
2016-01-07 04:23:20 +00:00
_08004E6A:
2015-10-06 13:46:30 +01:00
lsrs r5, 4
adds r4, 0x1
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcc _08004E38
_08004E72:
2015-10-06 13:46:30 +01:00
mov r1, r10
ldr r2, [sp, 0xC]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _08004E14
b _080052AA
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08004E84:
2015-10-06 13:46:30 +01:00
mov r1, r8
str r3, [sp, 0x14]
ldr r3, [sp]
adds r3, r4
mov r12, r3
adds r2, r1, 0
adds r2, 0x8
str r2, [sp, 0x18]
ldr r3, [sp]
str r3, [sp, 0x1C]
mov r2, r12
str r2, [sp, 0x74]
ldr r3, [sp, 0x18]
str r3, [sp, 0x88]
subs r0, 0x8
str r0, [sp, 0x80]
cmp r1, r3
2016-01-07 04:23:20 +00:00
bcs _08004F0E
_08004EA8:
2015-10-06 13:46:30 +01:00
ldr r0, [sp, 0x14]
ldm r0!, {r5}
str r0, [sp, 0x14]
ldr r4, [sp, 0x1C]
adds r2, r1, 0x1
mov r8, r2
cmp r4, r12
2016-01-07 04:23:20 +00:00
bcs _08004F06
2015-10-06 13:46:30 +01:00
movs r3, 0x7
mov r10, r3
lsrs r0, r1, 3
ldr r3, [sp, 0x4]
adds r2, r0, 0
muls r2, r3
adds r7, r2, 0
mov r0, r10
ands r1, r0
lsls r6, r1, 2
2016-01-07 04:23:20 +00:00
_08004ECC:
2015-10-06 13:46:30 +01:00
adds r3, r5, 0
movs r1, 0xF
ands r3, r1
cmp r3, 0
2016-01-07 04:23:20 +00:00
beq _08004EFE
2015-10-06 13:46:30 +01:00
lsrs r2, r4, 3
lsls r2, 5
add r2, r9
adds r0, r4, 0
mov r1, r10
ands r0, r1
lsrs r0, 1
adds r2, r0
adds r2, r7
adds r2, r6
movs r1, 0x1
ands r1, r4
lsls r1, 2
lsls r3, r1
movs r0, 0xF0
asrs r0, r1
ldrb r1, [r2]
ands r0, r1
orrs r3, r0
strb r3, [r2]
2016-01-07 04:23:20 +00:00
_08004EFE:
2015-10-06 13:46:30 +01:00
lsrs r5, 4
adds r4, 0x1
cmp r4, r12
2016-01-07 04:23:20 +00:00
bcc _08004ECC
_08004F06:
2015-10-06 13:46:30 +01:00
mov r1, r8
ldr r2, [sp, 0x18]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _08004EA8
_08004F0E:
2015-10-06 13:46:30 +01:00
ldr r1, [sp, 0x88]
ldr r3, =0x03002fd0
str r3, [sp, 0x20]
ldr r0, [sp, 0x74]
mov r8, r0
ldr r2, [sp, 0x80]
adds r2, r1, r2
str r2, [sp, 0x24]
ldr r3, [sp]
str r3, [sp, 0x28]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _08004F28
b _080052AA
_08004F28:
2015-10-06 13:46:30 +01:00
ldr r0, [sp, 0x20]
ldm r0!, {r5}
str r0, [sp, 0x20]
ldr r4, [sp, 0x28]
adds r2, r1, 0x1
mov r10, r2
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcs _08004F86
2015-10-06 13:46:30 +01:00
movs r3, 0x7
mov r12, r3
lsrs r0, r1, 3
ldr r3, [sp, 0x4]
adds r2, r0, 0
muls r2, r3
adds r7, r2, 0
mov r0, r12
ands r1, r0
lsls r6, r1, 2
2016-01-07 04:23:20 +00:00
_08004F4C:
2015-10-06 13:46:30 +01:00
adds r3, r5, 0
movs r1, 0xF
ands r3, r1
cmp r3, 0
2016-01-07 04:23:20 +00:00
beq _08004F7E
2015-10-06 13:46:30 +01:00
lsrs r2, r4, 3
lsls r2, 5
add r2, r9
adds r0, r4, 0
mov r1, r12
ands r0, r1
lsrs r0, 1
adds r2, r0
adds r2, r7
adds r2, r6
movs r1, 0x1
ands r1, r4
lsls r1, 2
lsls r3, r1
movs r0, 0xF0
asrs r0, r1
ldrb r1, [r2]
ands r0, r1
orrs r3, r0
strb r3, [r2]
2016-01-07 04:23:20 +00:00
_08004F7E:
2015-10-06 13:46:30 +01:00
lsrs r5, 4
adds r4, 0x1
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcc _08004F4C
_08004F86:
2015-10-06 13:46:30 +01:00
mov r1, r10
ldr r2, [sp, 0x24]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _08004F28
b _080052AA
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08004F94:
2015-10-06 13:46:30 +01:00
cmp r0, 0x8
2016-01-07 04:23:20 +00:00
ble _08004F9A
b _080050A4
_08004F9A:
2015-10-06 13:46:30 +01:00
mov r1, r8
str r3, [sp, 0x2C]
ldr r3, [sp]
adds r3, 0x8
mov r12, r3
add r0, r8
str r0, [sp, 0x30]
ldr r0, [sp]
str r0, [sp, 0x34]
ldr r2, [sp, 0x30]
str r2, [sp, 0x78]
str r3, [sp, 0x84]
subs r4, 0x8
str r4, [sp, 0x7C]
cmp r8, r2
2016-01-07 04:23:20 +00:00
bcs _0800501C
_08004FBA:
2015-10-06 13:46:30 +01:00
ldr r0, [sp, 0x2C]
ldm r0!, {r5}
str r0, [sp, 0x2C]
ldr r4, [sp, 0x34]
adds r2, r1, 0x1
mov r10, r2
cmp r4, r12
2016-01-07 04:23:20 +00:00
bcs _08005014
2015-10-06 13:46:30 +01:00
lsrs r0, r1, 3
ldr r2, [sp, 0x4]
adds r3, r0, 0
muls r3, r2
adds r7, r3, 0
movs r3, 0x7
ands r1, r3
lsls r6, r1, 2
2016-01-07 04:23:20 +00:00
_08004FDA:
2015-10-06 13:46:30 +01:00
adds r3, r5, 0
movs r0, 0xF
ands r3, r0
cmp r3, 0
2016-01-07 04:23:20 +00:00
beq _0800500C
2015-10-06 13:46:30 +01:00
lsrs r2, r4, 3
lsls r2, 5
add r2, r9
adds r0, r4, 0
movs r1, 0x7
ands r0, r1
lsrs r0, 1
adds r2, r0
adds r2, r7
adds r2, r6
movs r1, 0x1
ands r1, r4
lsls r1, 2
lsls r3, r1
movs r0, 0xF0
asrs r0, r1
ldrb r1, [r2]
ands r0, r1
orrs r3, r0
strb r3, [r2]
2016-01-07 04:23:20 +00:00
_0800500C:
2015-10-06 13:46:30 +01:00
lsrs r5, 4
adds r4, 0x1
cmp r4, r12
2016-01-07 04:23:20 +00:00
bcc _08004FDA
_08005014:
2015-10-06 13:46:30 +01:00
mov r1, r10
ldr r2, [sp, 0x30]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _08004FBA
_0800501C:
2015-10-06 13:46:30 +01:00
mov r1, r8
ldr r3, =0x03002fb0
str r3, [sp, 0x38]
ldr r0, [sp, 0x84]
ldr r2, [sp, 0x7C]
adds r0, r2
mov r8, r0
ldr r3, [sp, 0x78]
str r3, [sp, 0x3C]
ldr r0, [sp, 0x84]
str r0, [sp, 0x40]
cmp r1, r3
2016-01-07 04:23:20 +00:00
bcc _08005038
b _080052AA
_08005038:
2015-10-06 13:46:30 +01:00
ldr r2, [sp, 0x38]
ldm r2!, {r5}
str r2, [sp, 0x38]
ldr r4, [sp, 0x40]
adds r3, r1, 0x1
mov r10, r3
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcs _08005096
2015-10-06 13:46:30 +01:00
movs r0, 0x7
mov r12, r0
lsrs r0, r1, 3
ldr r3, [sp, 0x4]
adds r2, r0, 0
muls r2, r3
adds r7, r2, 0
mov r0, r12
ands r1, r0
lsls r6, r1, 2
2016-01-07 04:23:20 +00:00
_0800505C:
2015-10-06 13:46:30 +01:00
adds r3, r5, 0
movs r1, 0xF
ands r3, r1
cmp r3, 0
2016-01-07 04:23:20 +00:00
beq _0800508E
2015-10-06 13:46:30 +01:00
lsrs r2, r4, 3
lsls r2, 5
add r2, r9
adds r0, r4, 0
mov r1, r12
ands r0, r1
lsrs r0, 1
adds r2, r0
adds r2, r7
adds r2, r6
movs r1, 0x1
ands r1, r4
lsls r1, 2
lsls r3, r1
movs r0, 0xF0
asrs r0, r1
ldrb r1, [r2]
ands r0, r1
orrs r3, r0
strb r3, [r2]
2016-01-07 04:23:20 +00:00
_0800508E:
2015-10-06 13:46:30 +01:00
lsrs r5, 4
adds r4, 0x1
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcc _0800505C
_08005096:
2015-10-06 13:46:30 +01:00
mov r1, r10
ldr r2, [sp, 0x3C]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _08005038
b _080052AA
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080050A4:
2015-10-06 13:46:30 +01:00
mov r1, r8
str r5, [sp, 0x44]
ldr r3, [sp]
adds r3, 0x8
mov r12, r3
mov r2, r8
adds r2, 0x8
str r2, [sp, 0x48]
ldr r3, [sp]
str r3, [sp, 0x4C]
str r2, [sp, 0x88]
subs r0, 0x8
str r0, [sp, 0x80]
mov r0, r12
str r0, [sp, 0x84]
subs r4, 0x8
str r4, [sp, 0x7C]
cmp r8, r2
2016-01-07 04:23:20 +00:00
bcs _0800512C
_080050CA:
2015-10-06 13:46:30 +01:00
ldr r2, [sp, 0x44]
ldm r2!, {r5}
str r2, [sp, 0x44]
ldr r4, [sp, 0x4C]
adds r3, r1, 0x1
mov r10, r3
cmp r4, r12
2016-01-07 04:23:20 +00:00
bcs _08005124
2015-10-06 13:46:30 +01:00
lsrs r0, r1, 3
ldr r3, [sp, 0x4]
adds r2, r0, 0
muls r2, r3
adds r7, r2, 0
movs r0, 0x7
ands r1, r0
lsls r6, r1, 2
2016-01-07 04:23:20 +00:00
_080050EA:
2015-10-06 13:46:30 +01:00
adds r3, r5, 0
movs r1, 0xF
ands r3, r1
cmp r3, 0
2016-01-07 04:23:20 +00:00
beq _0800511C
2015-10-06 13:46:30 +01:00
lsrs r2, r4, 3
lsls r2, 5
add r2, r9
adds r0, r4, 0
movs r1, 0x7
ands r0, r1
lsrs r0, 1
adds r2, r0
adds r2, r7
adds r2, r6
movs r1, 0x1
ands r1, r4
lsls r1, 2
lsls r3, r1
movs r0, 0xF0
asrs r0, r1
ldrb r1, [r2]
ands r0, r1
orrs r3, r0
strb r3, [r2]
2016-01-07 04:23:20 +00:00
_0800511C:
2015-10-06 13:46:30 +01:00
lsrs r5, 4
adds r4, 0x1
cmp r4, r12
2016-01-07 04:23:20 +00:00
bcc _080050EA
_08005124:
2015-10-06 13:46:30 +01:00
mov r1, r10
ldr r2, [sp, 0x48]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _080050CA
_0800512C:
2015-10-06 13:46:30 +01:00
mov r1, r8
ldr r3, =0x03002fb0
str r3, [sp, 0x50]
ldr r0, [sp, 0x84]
ldr r2, [sp, 0x7C]
adds r0, r2
mov r8, r0
ldr r3, [sp, 0x88]
str r3, [sp, 0x54]
ldr r0, [sp, 0x84]
str r0, [sp, 0x58]
cmp r1, r3
2016-01-07 04:23:20 +00:00
bcs _080051AC
_08005146:
2015-10-06 13:46:30 +01:00
ldr r2, [sp, 0x50]
ldm r2!, {r5}
str r2, [sp, 0x50]
ldr r4, [sp, 0x58]
adds r3, r1, 0x1
mov r10, r3
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcs _080051A4
2015-10-06 13:46:30 +01:00
movs r0, 0x7
mov r12, r0
lsrs r0, r1, 3
ldr r3, [sp, 0x4]
adds r2, r0, 0
muls r2, r3
adds r7, r2, 0
mov r0, r12
ands r1, r0
lsls r6, r1, 2
2016-01-07 04:23:20 +00:00
_0800516A:
2015-10-06 13:46:30 +01:00
adds r3, r5, 0
movs r1, 0xF
ands r3, r1
cmp r3, 0
2016-01-07 04:23:20 +00:00
beq _0800519C
2015-10-06 13:46:30 +01:00
lsrs r2, r4, 3
lsls r2, 5
add r2, r9
adds r0, r4, 0
mov r1, r12
ands r0, r1
lsrs r0, 1
adds r2, r0
adds r2, r7
adds r2, r6
movs r1, 0x1
ands r1, r4
lsls r1, 2
lsls r3, r1
movs r0, 0xF0
asrs r0, r1
ldrb r1, [r2]
ands r0, r1
orrs r3, r0
strb r3, [r2]
2016-01-07 04:23:20 +00:00
_0800519C:
2015-10-06 13:46:30 +01:00
lsrs r5, 4
adds r4, 0x1
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcc _0800516A
_080051A4:
2015-10-06 13:46:30 +01:00
mov r1, r10
ldr r2, [sp, 0x54]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _08005146
_080051AC:
2015-10-06 13:46:30 +01:00
ldr r1, [sp, 0x88]
ldr r3, =0x03002fd0
str r3, [sp, 0x5C]
ldr r0, [sp, 0x84]
mov r8, r0
ldr r2, [sp, 0x80]
adds r2, r1, r2
str r2, [sp, 0x60]
ldr r3, [sp]
str r3, [sp, 0x64]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcs _0800522A
_080051C4:
2015-10-06 13:46:30 +01:00
ldr r0, [sp, 0x5C]
ldm r0!, {r5}
str r0, [sp, 0x5C]
ldr r4, [sp, 0x64]
adds r2, r1, 0x1
mov r10, r2
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcs _08005222
2015-10-06 13:46:30 +01:00
movs r3, 0x7
mov r12, r3
lsrs r0, r1, 3
ldr r3, [sp, 0x4]
adds r2, r0, 0
muls r2, r3
adds r7, r2, 0
mov r0, r12
ands r1, r0
lsls r6, r1, 2
2016-01-07 04:23:20 +00:00
_080051E8:
2015-10-06 13:46:30 +01:00
adds r3, r5, 0
movs r1, 0xF
ands r3, r1
cmp r3, 0
2016-01-07 04:23:20 +00:00
beq _0800521A
2015-10-06 13:46:30 +01:00
lsrs r2, r4, 3
lsls r2, 5
add r2, r9
adds r0, r4, 0
mov r1, r12
ands r0, r1
lsrs r0, 1
adds r2, r0
adds r2, r7
adds r2, r6
movs r1, 0x1
ands r1, r4
lsls r1, 2
lsls r3, r1
movs r0, 0xF0
asrs r0, r1
ldrb r1, [r2]
ands r0, r1
orrs r3, r0
strb r3, [r2]
2016-01-07 04:23:20 +00:00
_0800521A:
2015-10-06 13:46:30 +01:00
lsrs r5, 4
adds r4, 0x1
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcc _080051E8
_08005222:
2015-10-06 13:46:30 +01:00
mov r1, r10
ldr r2, [sp, 0x60]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _080051C4
_0800522A:
2015-10-06 13:46:30 +01:00
ldr r4, [sp, 0x84]
ldr r1, [sp, 0x88]
ldr r3, =0x03002ff0
str r3, [sp, 0x68]
ldr r0, [sp, 0x7C]
adds r0, r4
mov r8, r0
ldr r2, [sp, 0x80]
adds r2, r1, r2
str r2, [sp, 0x6C]
str r4, [sp, 0x70]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcs _080052AA
_08005244:
2015-10-06 13:46:30 +01:00
ldr r3, [sp, 0x68]
ldm r3!, {r5}
str r3, [sp, 0x68]
ldr r4, [sp, 0x70]
adds r0, r1, 0x1
mov r10, r0
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcs _080052A2
2015-10-06 13:46:30 +01:00
movs r2, 0x7
mov r12, r2
lsrs r0, r1, 3
ldr r2, [sp, 0x4]
adds r3, r0, 0
muls r3, r2
adds r7, r3, 0
mov r3, r12
ands r1, r3
lsls r6, r1, 2
2016-01-07 04:23:20 +00:00
_08005268:
2015-10-06 13:46:30 +01:00
adds r3, r5, 0
movs r0, 0xF
ands r3, r0
cmp r3, 0
2016-01-07 04:23:20 +00:00
beq _0800529A
2015-10-06 13:46:30 +01:00
lsrs r2, r4, 3
lsls r2, 5
add r2, r9
adds r0, r4, 0
mov r1, r12
ands r0, r1
lsrs r0, 1
adds r2, r0
adds r2, r7
adds r2, r6
movs r1, 0x1
ands r1, r4
lsls r1, 2
lsls r3, r1
movs r0, 0xF0
asrs r0, r1
ldrb r1, [r2]
ands r0, r1
orrs r3, r0
strb r3, [r2]
2016-01-07 04:23:20 +00:00
_0800529A:
2015-10-06 13:46:30 +01:00
lsrs r5, 4
adds r4, 0x1
cmp r4, r8
2016-01-07 04:23:20 +00:00
bcc _08005268
_080052A2:
2015-10-06 13:46:30 +01:00
mov r1, r10
ldr r2, [sp, 0x6C]
cmp r1, r2
2016-01-07 04:23:20 +00:00
bcc _08005244
_080052AA:
2015-10-06 13:46:30 +01:00
add sp, 0x8C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end CopyGlyphToWindow
thumb_func_start ClearTextSpan
; void ClearTextSpan(TextPrinter *textPrinter, u32 width)
ClearTextSpan: ; 80052C8
2015-10-06 13:46:30 +01:00
push {r4-r6,lr}
sub sp, 0x10
adds r4, r0, 0
adds r6, r1, 0
ldr r0, =0x030009ea
ldrh r5, [r0]
cmp r5, 0
2016-01-07 04:23:20 +00:00
beq _0800531E
2015-10-06 13:46:30 +01:00
ldrb r1, [r4, 0x4]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
ldr r1, =0x02020004
adds r0, r1
ldr r1, [r0, 0x8]
str r1, [sp, 0x8]
ldrb r2, [r0, 0x3]
lsls r2, 3
ldr r3, =0xffff0000
ldr r1, [sp, 0xC]
ands r1, r3
orrs r1, r2
str r1, [sp, 0xC]
ldrb r2, [r0, 0x4]
lsls r2, 19
ldr r0, =0x0000ffff
ands r0, r1
orrs r0, r2
str r0, [sp, 0xC]
ldr r0, =0x03002f90
adds r0, 0x81
ldrb r1, [r4, 0x8]
ldrb r2, [r4, 0x9]
lsls r3, r6, 16
lsrs r3, 16
ldrb r0, [r0]
str r0, [sp]
lsls r0, r5, 24
lsrs r0, 24
str r0, [sp, 0x4]
add r0, sp, 0x8
2015-11-30 07:17:50 +00:00
bl FillBitmapRect4Bit
2016-01-07 04:23:20 +00:00
_0800531E:
2015-10-06 13:46:30 +01:00
add sp, 0x10
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end ClearTextSpan
2015-10-06 13:46:30 +01:00
2015-10-07 14:48:45 +01:00
thumb_func_start Font0Func
; int Font0Func(struct TextPrinter *x)
2015-10-10 11:12:48 +01:00
Font0Func: ; 800533C
2015-10-06 13:46:30 +01:00
push {lr}
adds r2, r0, 0
adds r3, r2, 0
adds r3, 0x14
ldrb r1, [r3, 0x1]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005360
2015-10-06 13:46:30 +01:00
ldrb r1, [r2, 0x14]
movs r0, 0x10
negs r0, r0
ands r0, r1
strb r0, [r2, 0x14]
ldrb r0, [r3, 0x1]
movs r1, 0x80
orrs r0, r1
strb r0, [r3, 0x1]
2016-01-07 04:23:20 +00:00
_08005360:
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl RenderText
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
2015-10-07 14:48:45 +01:00
thumb_func_end Font0Func
2015-10-06 13:46:30 +01:00
2015-10-07 14:48:45 +01:00
thumb_func_start Font1Func
; int Font1Func(struct TextPrinter *x)
2015-10-10 11:12:48 +01:00
Font1Func: ; 8005370
2015-10-06 13:46:30 +01:00
push {lr}
adds r2, r0, 0
adds r3, r2, 0
adds r3, 0x14
ldrb r1, [r3, 0x1]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005398
2015-10-06 13:46:30 +01:00
ldrb r1, [r2, 0x14]
movs r0, 0x10
negs r0, r0
ands r0, r1
movs r1, 0x1
orrs r0, r1
strb r0, [r2, 0x14]
ldrb r0, [r3, 0x1]
movs r1, 0x80
orrs r0, r1
strb r0, [r3, 0x1]
2016-01-07 04:23:20 +00:00
_08005398:
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl RenderText
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
2015-10-07 14:48:45 +01:00
thumb_func_end Font1Func
2015-10-06 13:46:30 +01:00
2015-10-07 14:48:45 +01:00
thumb_func_start Font2Func
; int Font2Func(struct TextPrinter *x)
2015-10-10 11:12:48 +01:00
Font2Func: ; 80053A8
2015-10-06 13:46:30 +01:00
push {lr}
adds r2, r0, 0
adds r3, r2, 0
adds r3, 0x14
ldrb r1, [r3, 0x1]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _080053D0
2015-10-06 13:46:30 +01:00
ldrb r1, [r2, 0x14]
movs r0, 0x10
negs r0, r0
ands r0, r1
movs r1, 0x2
orrs r0, r1
strb r0, [r2, 0x14]
ldrb r0, [r3, 0x1]
movs r1, 0x80
orrs r0, r1
strb r0, [r3, 0x1]
2016-01-07 04:23:20 +00:00
_080053D0:
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl RenderText
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
2015-10-07 14:48:45 +01:00
thumb_func_end Font2Func
2015-10-06 13:46:30 +01:00
2015-10-07 14:48:45 +01:00
thumb_func_start Font3Func
; int Font3Func(struct TextPrinter *x)
2015-10-10 11:12:48 +01:00
Font3Func: ; 80053E0
2015-10-06 13:46:30 +01:00
push {lr}
adds r2, r0, 0
adds r3, r2, 0
adds r3, 0x14
ldrb r1, [r3, 0x1]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005408
2015-10-06 13:46:30 +01:00
ldrb r1, [r2, 0x14]
movs r0, 0x10
negs r0, r0
ands r0, r1
movs r1, 0x3
orrs r0, r1
strb r0, [r2, 0x14]
ldrb r0, [r3, 0x1]
movs r1, 0x80
orrs r0, r1
strb r0, [r3, 0x1]
2016-01-07 04:23:20 +00:00
_08005408:
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl RenderText
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
2015-10-07 14:48:45 +01:00
thumb_func_end Font3Func
2015-10-06 13:46:30 +01:00
2015-10-07 14:48:45 +01:00
thumb_func_start Font4Func
; int Font4Func(struct TextPrinter *x)
2015-10-10 11:12:48 +01:00
Font4Func: ; 8005418
2015-10-06 13:46:30 +01:00
push {lr}
adds r2, r0, 0
adds r3, r2, 0
adds r3, 0x14
ldrb r1, [r3, 0x1]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005440
2015-10-06 13:46:30 +01:00
ldrb r1, [r2, 0x14]
movs r0, 0x10
negs r0, r0
ands r0, r1
movs r1, 0x4
orrs r0, r1
strb r0, [r2, 0x14]
ldrb r0, [r3, 0x1]
movs r1, 0x80
orrs r0, r1
strb r0, [r3, 0x1]
2016-01-07 04:23:20 +00:00
_08005440:
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl RenderText
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
2015-10-07 14:48:45 +01:00
thumb_func_end Font4Func
2015-10-06 13:46:30 +01:00
2015-10-07 14:48:45 +01:00
thumb_func_start Font5Func
; int Font5Func(struct TextPrinter *x)
2015-10-10 11:12:48 +01:00
Font5Func: ; 8005450
2015-10-06 13:46:30 +01:00
push {lr}
adds r2, r0, 0
adds r3, r2, 0
adds r3, 0x14
ldrb r1, [r3, 0x1]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005478
2015-10-06 13:46:30 +01:00
ldrb r1, [r2, 0x14]
movs r0, 0x10
negs r0, r0
ands r0, r1
movs r1, 0x5
orrs r0, r1
strb r0, [r2, 0x14]
ldrb r0, [r3, 0x1]
movs r1, 0x80
orrs r0, r1
strb r0, [r3, 0x1]
2016-01-07 04:23:20 +00:00
_08005478:
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl RenderText
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
2015-10-07 14:48:45 +01:00
thumb_func_end Font5Func
2015-10-06 13:46:30 +01:00
2015-10-07 14:48:45 +01:00
thumb_func_start Font7Func
; int Font7Func(struct TextPrinter *x)
2015-10-10 11:12:48 +01:00
Font7Func: ; 8005488
2015-10-06 13:46:30 +01:00
push {lr}
adds r2, r0, 0
adds r3, r2, 0
adds r3, 0x14
ldrb r1, [r3, 0x1]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _080054B0
2015-10-06 13:46:30 +01:00
ldrb r1, [r2, 0x14]
movs r0, 0x10
negs r0, r0
ands r0, r1
movs r1, 0x7
orrs r0, r1
strb r0, [r2, 0x14]
ldrb r0, [r3, 0x1]
movs r1, 0x80
orrs r0, r1
strb r0, [r3, 0x1]
2016-01-07 04:23:20 +00:00
_080054B0:
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl RenderText
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
2015-10-07 14:48:45 +01:00
thumb_func_end Font7Func
2015-10-06 13:46:30 +01:00
2015-10-07 14:48:45 +01:00
thumb_func_start Font8Func
; int Font8Func(struct TextPrinter *x)
2015-10-10 11:12:48 +01:00
Font8Func: ; 80054C0
2015-10-06 13:46:30 +01:00
push {lr}
adds r2, r0, 0
adds r3, r2, 0
adds r3, 0x14
ldrb r1, [r3, 0x1]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _080054E8
2015-10-06 13:46:30 +01:00
ldrb r1, [r2, 0x14]
movs r0, 0x10
negs r0, r0
ands r0, r1
movs r1, 0x8
orrs r0, r1
strb r0, [r2, 0x14]
ldrb r0, [r3, 0x1]
movs r1, 0x80
orrs r0, r1
strb r0, [r3, 0x1]
2016-01-07 04:23:20 +00:00
_080054E8:
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl RenderText
2015-10-06 13:46:30 +01:00
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
2015-10-07 14:48:45 +01:00
thumb_func_end Font8Func
2015-10-06 13:46:30 +01:00
thumb_func_start TextPrinterInitDownArrowCounters
; void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter)
TextPrinterInitDownArrowCounters: ; 80054F8
2015-10-06 13:46:30 +01:00
push {lr}
adds r2, r0, 0
adds r2, 0x14
ldr r0, =0x03003014
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08005514
2015-10-06 13:46:30 +01:00
movs r0, 0
strb r0, [r2, 0x2]
2016-01-07 04:23:20 +00:00
b _08005524
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005514:
2015-10-06 13:46:30 +01:00
ldrb r0, [r2, 0x1]
movs r1, 0x61
negs r1, r1
ands r1, r0
movs r0, 0x20
negs r0, r0
ands r1, r0
strb r1, [r2, 0x1]
2016-01-07 04:23:20 +00:00
_08005524:
2015-10-06 13:46:30 +01:00
pop {r0}
bx r0
thumb_func_end TextPrinterInitDownArrowCounters
2015-10-06 13:46:30 +01:00
thumb_func_start TextPrinterDrawDownArrow
; void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter)
TextPrinterDrawDownArrow: ; 8005528
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
sub sp, 0x18
adds r5, r0, 0
adds r6, r5, 0
adds r6, 0x14
ldr r7, =0x03003014
ldrb r1, [r7]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _080055EE
2015-10-06 13:46:30 +01:00
ldrb r2, [r6, 0x1]
movs r0, 0x1F
ands r0, r2
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08005560
2015-10-06 13:46:30 +01:00
ldr r0, [r5, 0x14]
lsls r0, 19
lsrs r0, 27
subs r0, 0x1
movs r1, 0x1F
ands r0, r1
movs r1, 0x20
negs r1, r1
2016-01-07 04:23:20 +00:00
b _080055E8
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005560:
2015-10-06 13:46:30 +01:00
ldrb r0, [r5, 0x4]
ldrb r2, [r5, 0xD]
lsls r2, 28
lsrs r1, r2, 4
orrs r1, r2
lsrs r1, 24
ldrb r2, [r5, 0x8]
ldrb r3, [r5, 0x9]
movs r4, 0x8
str r4, [sp]
movs r4, 0x10
str r4, [sp, 0x4]
bl FillWindowPixelRect
2015-10-06 13:46:30 +01:00
ldr r0, [r7]
lsls r0, 30
lsrs r0, 31
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _0800558A
2015-10-06 13:46:30 +01:00
cmp r0, 0x1
2016-01-07 04:23:20 +00:00
beq _08005594
_0800558A:
2015-10-07 06:05:11 +01:00
ldr r7, =gDownArrowTiles
2016-01-07 04:23:20 +00:00
b _08005596
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005594:
2015-10-07 06:05:11 +01:00
ldr r7, =gDarkDownArrowTiles
2016-01-07 04:23:20 +00:00
_08005596:
2015-10-06 13:46:30 +01:00
ldrb r0, [r5, 0x4]
2015-10-07 14:48:45 +01:00
ldr r2, =gDownArrowYCoords
2015-10-06 13:46:30 +01:00
ldr r1, [r6]
lsls r1, 17
lsrs r1, 30
adds r1, r2
ldrb r3, [r1]
movs r4, 0x8
str r4, [sp]
movs r2, 0x10
str r2, [sp, 0x4]
ldrb r1, [r5, 0x8]
str r1, [sp, 0x8]
ldrb r1, [r5, 0x9]
str r1, [sp, 0xC]
str r4, [sp, 0x10]
str r2, [sp, 0x14]
adds r1, r7, 0
movs r2, 0
2015-11-30 07:17:50 +00:00
bl BlitBitmapRectToWindow
2015-10-06 13:46:30 +01:00
ldrb r0, [r5, 0x4]
movs r1, 0x2
bl CopyWindowToVram
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x1]
movs r1, 0x20
negs r1, r1
ands r1, r0
movs r0, 0x8
orrs r1, r0
strb r1, [r6, 0x1]
ldr r0, [r6]
lsls r0, 17
lsrs r0, 30
adds r0, 0x1
movs r2, 0x3
ands r0, r2
lsls r0, 5
movs r2, 0x61
negs r2, r2
2016-01-07 04:23:20 +00:00
_080055E8:
2015-10-06 13:46:30 +01:00
ands r1, r2
orrs r1, r0
strb r1, [r6, 0x1]
2016-01-07 04:23:20 +00:00
_080055EE:
2015-10-06 13:46:30 +01:00
add sp, 0x18
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end TextPrinterDrawDownArrow
2015-10-06 13:46:30 +01:00
thumb_func_start TextPrinterClearDownArrow
; void TextPrinterClearDownArrow(struct TextPrinter *textPrinter)
TextPrinterClearDownArrow: ; 8005600
2015-10-06 13:46:30 +01:00
push {r4,r5,lr}
sub sp, 0x8
adds r5, r0, 0
ldrb r0, [r5, 0x4]
ldrb r2, [r5, 0xD]
lsls r2, 28
lsrs r1, r2, 4
orrs r1, r2
lsrs r1, 24
ldrb r2, [r5, 0x8]
ldrb r3, [r5, 0x9]
movs r4, 0x8
str r4, [sp]
movs r4, 0x10
str r4, [sp, 0x4]
bl FillWindowPixelRect
2015-10-06 13:46:30 +01:00
ldrb r0, [r5, 0x4]
movs r1, 0x2
bl CopyWindowToVram
2015-10-06 13:46:30 +01:00
add sp, 0x8
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end TextPrinterClearDownArrow
2015-10-06 13:46:30 +01:00
thumb_func_start TextPrinterWaitAutoMode
2016-01-08 07:27:40 +00:00
; bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter)
TextPrinterWaitAutoMode: ; 8005634
2015-10-06 13:46:30 +01:00
push {lr}
adds r1, r0, 0
adds r1, 0x14
ldrb r0, [r1, 0x2]
cmp r0, 0x31
2016-01-07 04:23:20 +00:00
beq _08005648
2015-10-06 13:46:30 +01:00
adds r0, 0x1
strb r0, [r1, 0x2]
movs r0, 0
2016-01-07 04:23:20 +00:00
b _0800564A
_08005648:
2015-10-06 13:46:30 +01:00
movs r0, 0x1
2016-01-07 04:23:20 +00:00
_0800564A:
2015-10-06 13:46:30 +01:00
pop {r1}
bx r1
thumb_func_end TextPrinterWaitAutoMode
2015-10-06 13:46:30 +01:00
thumb_func_start TextPrinterWaitWithDownArrow
2016-01-08 07:27:40 +00:00
; bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter)
TextPrinterWaitWithDownArrow: ; 8005650
2015-10-06 13:46:30 +01:00
push {r4,lr}
adds r2, r0, 0
movs r4, 0
ldr r0, =0x03003014
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08005674
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl TextPrinterWaitAutoMode
2015-10-06 13:46:30 +01:00
lsls r0, 24
lsrs r4, r0, 24
2016-01-07 04:23:20 +00:00
b _0800568E
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005674:
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl TextPrinterDrawDownArrow
2015-10-06 13:46:30 +01:00
ldr r0, =0x030022c0
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _0800568E
2015-10-06 13:46:30 +01:00
movs r4, 0x1
movs r0, 0x5
bl audio_play
2016-01-07 04:23:20 +00:00
_0800568E:
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end TextPrinterWaitWithDownArrow
2015-10-06 13:46:30 +01:00
thumb_func_start TextPrinterWait
2016-01-08 07:27:40 +00:00
; bool8 TextPrinterWait(struct TextPrinter *textPrinter)
TextPrinterWait: ; 800569C
2015-10-06 13:46:30 +01:00
push {r4,lr}
adds r2, r0, 0
movs r4, 0
ldr r0, =0x03003014
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _080056C0
2015-10-06 13:46:30 +01:00
adds r0, r2, 0
bl TextPrinterWaitAutoMode
2015-10-06 13:46:30 +01:00
lsls r0, 24
lsrs r4, r0, 24
2016-01-07 04:23:20 +00:00
b _080056D4
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080056C0:
2015-10-06 13:46:30 +01:00
ldr r0, =0x030022c0
ldrh r1, [r0, 0x2E]
movs r0, 0x3
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _080056D4
2015-10-06 13:46:30 +01:00
movs r4, 0x1
movs r0, 0x5
bl audio_play
2016-01-07 04:23:20 +00:00
_080056D4:
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
pop {r4}
pop {r1}
bx r1
.pool
thumb_func_end TextPrinterWait
2015-10-06 13:46:30 +01:00
thumb_func_start DrawDownArrow
2016-01-08 07:27:40 +00:00
; void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex)
DrawDownArrow: ; 80056E0
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x18
ldr r4, [sp, 0x38]
ldr r5, [sp, 0x3C]
mov r9, r5
ldr r5, [sp, 0x40]
mov r10, r5
lsls r0, 24
lsrs r5, r0, 24
lsls r1, 16
lsrs r1, 16
mov r8, r1
lsls r2, 16
lsrs r7, r2, 16
lsls r3, 24
lsrs r3, 24
lsls r4, 24
lsrs r4, 24
mov r1, r9
ldrb r0, [r1]
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _0800571A
2015-10-06 13:46:30 +01:00
subs r0, 0x1
strb r0, [r1]
2016-01-07 04:23:20 +00:00
b _0800579A
_0800571A:
2015-10-06 13:46:30 +01:00
lsls r1, r3, 4
orrs r1, r3
lsls r1, 24
lsrs r1, 24
movs r0, 0x8
str r0, [sp]
movs r0, 0x10
str r0, [sp, 0x4]
adds r0, r5, 0
mov r2, r8
adds r3, r7, 0
bl FillWindowPixelRect
2015-10-06 13:46:30 +01:00
cmp r4, 0
2016-01-07 04:23:20 +00:00
bne _0800579A
2015-10-06 13:46:30 +01:00
ldr r0, =0x03003014
ldr r0, [r0]
lsls r0, 30
lsrs r0, 31
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08005748
2015-10-06 13:46:30 +01:00
cmp r0, 0x1
2016-01-07 04:23:20 +00:00
beq _08005754
_08005748:
2015-10-07 06:05:11 +01:00
ldr r6, =gDownArrowTiles
2016-01-07 04:23:20 +00:00
b _08005756
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005754:
2015-10-07 06:05:11 +01:00
ldr r6, =gDarkDownArrowTiles
2016-01-07 04:23:20 +00:00
_08005756:
2015-10-07 14:48:45 +01:00
ldr r2, =gDownArrowYCoords
2015-10-06 13:46:30 +01:00
mov r0, r10
ldrb r1, [r0]
movs r0, 0x3
ands r0, r1
adds r0, r2
ldrb r3, [r0]
movs r4, 0x8
str r4, [sp]
movs r1, 0x10
str r1, [sp, 0x4]
mov r0, r8
str r0, [sp, 0x8]
subs r0, r7, 0x2
lsls r0, 16
lsrs r0, 16
str r0, [sp, 0xC]
str r4, [sp, 0x10]
str r1, [sp, 0x14]
adds r0, r5, 0
adds r1, r6, 0
movs r2, 0
2015-11-30 07:17:50 +00:00
bl BlitBitmapRectToWindow
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
movs r1, 0x2
bl CopyWindowToVram
2015-10-06 13:46:30 +01:00
mov r1, r9
strb r4, [r1]
mov r5, r10
ldrb r0, [r5]
adds r0, 0x1
strb r0, [r5]
2016-01-07 04:23:20 +00:00
_0800579A:
2015-10-06 13:46:30 +01:00
add sp, 0x18
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end DrawDownArrow
2015-10-06 13:46:30 +01:00
thumb_func_start RenderText
; u16 RenderText(struct TextPrinter *textPrinter)
RenderText: ; 80057B4
2015-10-06 13:46:30 +01:00
push {r4-r6,lr}
adds r6, r0, 0
adds r4, r6, 0
adds r4, 0x14
ldrb r0, [r6, 0x1C]
cmp r0, 0x6
2016-01-07 04:23:20 +00:00
bls _080057C4
b _08005D6C
_080057C4:
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_080057D4
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_080057D4:
.4byte _080057F0
.4byte _08005C78
.4byte _08005C8C
.4byte _08005CB8
.4byte _08005CF0
.4byte _08005D48
.4byte _08005D5A
_080057F0:
2015-10-06 13:46:30 +01:00
ldr r2, =0x030022c0
ldrh r1, [r2, 0x2C]
movs r0, 0x3
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _0800580A
2015-10-06 13:46:30 +01:00
ldrb r1, [r4]
movs r0, 0x10
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _0800580A
2015-10-06 13:46:30 +01:00
movs r0, 0
strb r0, [r6, 0x1E]
2016-01-07 04:23:20 +00:00
_0800580A:
2015-10-06 13:46:30 +01:00
ldrb r1, [r6, 0x1E]
cmp r1, 0
2016-01-07 04:23:20 +00:00
beq _0800584C
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x1D]
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _0800584C
2015-10-06 13:46:30 +01:00
subs r0, r1, 0x1
strb r0, [r6, 0x1E]
ldr r0, =0x03003014
ldrb r1, [r0]
movs r0, 0x1
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005828
b _08005B56
_08005828:
2015-10-06 13:46:30 +01:00
ldrh r1, [r2, 0x2E]
movs r0, 0x3
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005834
b _08005B56
_08005834:
2015-10-06 13:46:30 +01:00
ldrb r0, [r4]
movs r1, 0x10
orrs r0, r1
strb r0, [r4]
movs r0, 0
strb r0, [r6, 0x1E]
2016-01-07 04:23:20 +00:00
b _08005B56
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_0800584C:
2015-10-06 13:46:30 +01:00
ldr r0, =0x02022fec
ldr r0, [r0]
movs r1, 0x80
lsls r1, 17
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005874
2015-10-06 13:46:30 +01:00
ldr r0, =0x03003014
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08005874
2015-10-06 13:46:30 +01:00
movs r0, 0x3
2016-01-07 04:23:20 +00:00
b _08005876
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005874:
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x1D]
2016-01-07 04:23:20 +00:00
_08005876:
2015-10-06 13:46:30 +01:00
strb r0, [r6, 0x1E]
ldr r0, [r6]
ldrb r3, [r0]
adds r0, 0x1
str r0, [r6]
adds r0, r3, 0
subs r0, 0xF8
cmp r0, 0x7
2016-01-07 04:23:20 +00:00
bls _0800588A
b _08005B90
_0800588A:
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_08005898
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_08005898:
.4byte _08005B6C
.4byte _08005B5A
.4byte _08005B4C
.4byte _08005B48
.4byte _080058E0
.4byte _080058DC
.4byte _080058B8
.4byte _08005D6C
_080058B8:
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x6]
strb r0, [r6, 0x8]
ldrb r1, [r6, 0x5]
ldr r0, =0x03002f80
ldr r2, [r0]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r6, 0xB]
ldrb r0, [r0, 0x5]
adds r1, r0
ldrb r0, [r6, 0x9]
adds r0, r1
2016-01-07 04:23:20 +00:00
b _08005ABA
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080058DC:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
2016-01-07 04:23:20 +00:00
b _08005B30
_080058E0:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r3, [r0]
adds r0, 0x1
str r0, [r6]
subs r0, r3, 0x1
cmp r0, 0x17
2016-01-07 04:23:20 +00:00
bls _080058F0
b _08005B90
_080058F0:
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_08005900
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_08005900:
.4byte _08005960
.4byte _08005982
.4byte _080059A6
.4byte _080059C0
.4byte _08005A0E
.4byte _08005A12
.4byte _08005A0A
.4byte _08005A2A
.4byte _08005A3A
.4byte _08005A58
.4byte _08005A5C
.4byte _08005B5A
.4byte _08005A90
.4byte _08005A98
.4byte _08005AA4
.4byte _08005A76
.4byte _08005AD8
.4byte _08005AF2
.4byte _08005B02
.4byte _08005B26
.4byte _08005B36
.4byte _08005B3E
.4byte _08005ABE
.4byte _08005ACC
_08005960:
2015-10-06 13:46:30 +01:00
ldr r2, [r6]
ldrb r1, [r2]
lsls r1, 4
ldrb r3, [r6, 0xC]
movs r0, 0xF
ands r0, r3
orrs r0, r1
strb r0, [r6, 0xC]
adds r2, 0x1
str r2, [r6]
lsls r0, 24
lsrs r0, 28
ldrb r2, [r6, 0xD]
lsls r1, r2, 28
lsrs r1, 28
lsrs r2, 4
2016-01-07 04:23:20 +00:00
b _08005A06
_08005982:
2015-10-06 13:46:30 +01:00
ldr r1, [r6]
ldrb r2, [r1]
movs r0, 0xF
ands r0, r2
ldrb r3, [r6, 0xD]
movs r2, 0x10
negs r2, r2
ands r2, r3
orrs r2, r0
strb r2, [r6, 0xD]
adds r1, 0x1
str r1, [r6]
ldrb r0, [r6, 0xC]
lsrs r0, 4
lsls r1, r2, 28
lsrs r1, 28
lsrs r2, 4
2016-01-07 04:23:20 +00:00
b _08005A06
_080059A6:
2015-10-06 13:46:30 +01:00
ldr r1, [r6]
ldrb r0, [r1]
lsls r0, 4
ldrb r3, [r6, 0xD]
movs r2, 0xF
ands r2, r3
orrs r2, r0
strb r2, [r6, 0xD]
adds r1, 0x1
str r1, [r6]
ldrb r0, [r6, 0xC]
lsrs r0, 4
2016-01-07 04:23:20 +00:00
b _080059FE
_080059C0:
2015-10-06 13:46:30 +01:00
ldr r3, [r6]
ldrb r1, [r3]
lsls r1, 4
ldrb r4, [r6, 0xC]
movs r2, 0xF
adds r0, r2, 0
ands r0, r4
orrs r0, r1
strb r0, [r6, 0xC]
adds r5, r3, 0x1
str r5, [r6]
ldrb r3, [r3, 0x1]
adds r1, r2, 0
ands r1, r3
ldrb r4, [r6, 0xD]
movs r3, 0x10
negs r3, r3
ands r3, r4
orrs r3, r1
strb r3, [r6, 0xD]
adds r4, r5, 0x1
str r4, [r6]
ldrb r1, [r5, 0x1]
lsls r1, 4
ands r2, r3
orrs r2, r1
strb r2, [r6, 0xD]
adds r4, 0x1
str r4, [r6]
lsls r0, 24
lsrs r0, 28
2016-01-07 04:23:20 +00:00
_080059FE:
2015-10-06 13:46:30 +01:00
lsls r1, r2, 28
lsrs r1, 28
lsls r2, 24
lsrs r2, 28
2016-01-07 04:23:20 +00:00
_08005A06:
bl GenerateFontHalfRowLookupTable
2016-01-07 04:23:20 +00:00
_08005A0A:
2015-10-06 13:46:30 +01:00
movs r0, 0x2
2016-01-07 04:23:20 +00:00
b _08005D6E
_08005A0E:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
2016-01-07 04:23:20 +00:00
b _08005B30
_08005A12:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r0, [r0]
movs r1, 0xF
ands r1, r0
ldrb r2, [r4]
movs r0, 0x10
negs r0, r0
ands r0, r2
orrs r0, r1
strb r0, [r4]
ldr r0, [r6]
2016-01-07 04:23:20 +00:00
b _08005B30
_08005A2A:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r1, [r0]
strb r1, [r6, 0x1E]
adds r0, 0x1
str r0, [r6]
movs r0, 0x6
strb r0, [r6, 0x1C]
2016-01-07 04:23:20 +00:00
b _08005A0A
_08005A3A:
2015-10-06 13:46:30 +01:00
movs r0, 0x1
strb r0, [r6, 0x1C]
ldr r0, =0x03003014
ldrb r1, [r0]
movs r0, 0x4
ands r0, r1
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005A4C
b _08005B56
_08005A4C:
2015-10-06 13:46:30 +01:00
movs r0, 0
strb r0, [r4, 0x2]
2016-01-07 04:23:20 +00:00
b _08005B56
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005A58:
2015-10-06 13:46:30 +01:00
movs r0, 0x5
2016-01-07 04:23:20 +00:00
b _08005D56
_08005A5C:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r3, [r0]
adds r1, r0, 0x1
str r1, [r6]
ldrb r0, [r0, 0x1]
lsls r0, 8
orrs r3, r0
adds r1, 0x1
str r1, [r6]
adds r0, r3, 0
bl song_play_for_text
2016-01-07 04:23:20 +00:00
b _08005A0A
_08005A76:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r3, [r0]
adds r1, r0, 0x1
str r1, [r6]
ldrb r0, [r0, 0x1]
lsls r0, 8
orrs r3, r0
adds r1, 0x1
str r1, [r6]
adds r0, r3, 0
bl audio_play
2016-01-07 04:23:20 +00:00
b _08005A0A
_08005A90:
2015-10-06 13:46:30 +01:00
ldr r1, [r6]
ldrb r0, [r1]
ldrb r3, [r6, 0x6]
2016-01-07 04:23:20 +00:00
b _08005AF8
_08005A98:
2015-10-06 13:46:30 +01:00
ldr r1, [r6]
ldrb r0, [r1]
ldrb r2, [r6, 0x7]
adds r0, r2
strb r0, [r6, 0x9]
2016-01-07 04:23:20 +00:00
b _08005AFC
_08005AA4:
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x4]
ldrb r2, [r6, 0xD]
lsls r2, 28
lsrs r1, r2, 4
orrs r1, r2
lsrs r1, 24
bl FillWindowPixelBuffer
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x6]
strb r0, [r6, 0x8]
ldrb r0, [r6, 0x7]
2016-01-07 04:23:20 +00:00
_08005ABA:
2015-10-06 13:46:30 +01:00
strb r0, [r6, 0x9]
2016-01-07 04:23:20 +00:00
b _08005A0A
_08005ABE:
2015-10-06 13:46:30 +01:00
ldr r0, =0x03007420
bl MPlayStop_rev01
2016-01-07 04:23:20 +00:00
b _08005A0A
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005ACC:
2015-10-06 13:46:30 +01:00
ldr r0, =0x03007420
bl m4aMPlayContinue
2016-01-07 04:23:20 +00:00
b _08005A0A
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005AD8:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r4, [r0]
adds r0, 0x1
str r0, [r6]
cmp r4, 0
2016-01-07 04:23:20 +00:00
ble _08005A0A
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r1, r4, 0
bl ClearTextSpan
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x8]
adds r0, r4
2016-01-07 04:23:20 +00:00
b _08005C6E
_08005AF2:
2015-10-06 13:46:30 +01:00
ldr r1, [r6]
ldrb r0, [r6, 0x6]
ldrb r3, [r1]
2016-01-07 04:23:20 +00:00
_08005AF8:
2015-10-06 13:46:30 +01:00
adds r0, r3
strb r0, [r6, 0x8]
2016-01-07 04:23:20 +00:00
_08005AFC:
2015-10-06 13:46:30 +01:00
adds r1, 0x1
str r1, [r6]
2016-01-07 04:23:20 +00:00
b _08005A0A
_08005B02:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r2, [r0]
ldrb r1, [r6, 0x6]
adds r2, r1
adds r0, 0x1
str r0, [r6]
ldrb r0, [r6, 0x8]
subs r4, r2, r0
cmp r4, 0
2016-01-07 04:23:20 +00:00
bgt _08005B18
b _08005A0A
_08005B18:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r1, r4, 0
bl ClearTextSpan
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x8]
adds r0, r4
2016-01-07 04:23:20 +00:00
b _08005C6E
_08005B26:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r2, [r0]
adds r1, r6, 0
adds r1, 0x20
strb r2, [r1]
2016-01-07 04:23:20 +00:00
_08005B30:
2015-10-06 13:46:30 +01:00
adds r0, 0x1
str r0, [r6]
2016-01-07 04:23:20 +00:00
b _08005A0A
_08005B36:
2015-10-06 13:46:30 +01:00
adds r1, r6, 0
adds r1, 0x21
movs r0, 0x1
2016-01-07 04:23:20 +00:00
b _08005B44
_08005B3E:
2015-10-06 13:46:30 +01:00
adds r1, r6, 0
adds r1, 0x21
movs r0, 0
2016-01-07 04:23:20 +00:00
_08005B44:
2015-10-06 13:46:30 +01:00
strb r0, [r1]
2016-01-07 04:23:20 +00:00
b _08005A0A
_08005B48:
2015-10-06 13:46:30 +01:00
movs r0, 0x2
2016-01-07 04:23:20 +00:00
b _08005B4E
_08005B4C:
2015-10-06 13:46:30 +01:00
movs r0, 0x3
2016-01-07 04:23:20 +00:00
_08005B4E:
2015-10-06 13:46:30 +01:00
strb r0, [r6, 0x1C]
adds r0, r6, 0
bl TextPrinterInitDownArrowCounters
2016-01-07 04:23:20 +00:00
_08005B56:
2015-10-06 13:46:30 +01:00
movs r0, 0x3
2016-01-07 04:23:20 +00:00
b _08005D6E
_08005B5A:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r3, [r0]
movs r2, 0x80
lsls r2, 1
adds r1, r2, 0
orrs r3, r1
adds r0, 0x1
str r0, [r6]
2016-01-07 04:23:20 +00:00
b _08005B90
_08005B6C:
2015-10-06 13:46:30 +01:00
ldr r0, [r6]
ldrb r3, [r0]
adds r0, 0x1
str r0, [r6]
ldrb r0, [r6, 0x4]
adds r1, r3, 0
ldrb r2, [r6, 0x8]
ldrb r3, [r6, 0x9]
bl DrawKeypadIcon
2015-10-06 13:46:30 +01:00
ldr r1, =0x03002f90
adds r1, 0x80
strb r0, [r1]
ldrb r3, [r6, 0xA]
adds r0, r3
2016-01-07 04:23:20 +00:00
b _08005C6A
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005B90:
2015-10-06 13:46:30 +01:00
ldr r0, [r4]
lsls r0, 28
lsrs r0, 28
cmp r0, 0x8
2016-01-07 04:23:20 +00:00
bhi _08005C10
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_08005BA8
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_08005BA8:
.4byte _08005BCC
.4byte _08005BDA
.4byte _08005BE8
.4byte _08005BE8
.4byte _08005BE8
.4byte _08005BE8
.4byte _08005C10
.4byte _08005BF6
.4byte _08005C04
_08005BCC:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x21
ldrb r1, [r0]
adds r0, r3, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphFont0
2016-01-07 04:23:20 +00:00
b _08005C10
_08005BDA:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x21
ldrb r1, [r0]
adds r0, r3, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphFont1
2016-01-07 04:23:20 +00:00
b _08005C10
_08005BE8:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x21
ldrb r1, [r0]
adds r0, r3, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphFont2
2016-01-07 04:23:20 +00:00
b _08005C10
_08005BF6:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x21
ldrb r1, [r0]
adds r0, r3, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphFont7
2016-01-07 04:23:20 +00:00
b _08005C10
_08005C04:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x21
ldrb r1, [r0]
adds r0, r3, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphFont8
2016-01-07 04:23:20 +00:00
_08005C10:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
bl CopyGlyphToWindow
adds r2, r6, 0
adds r2, 0x20
ldrb r0, [r2]
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08005C48
2015-10-06 13:46:30 +01:00
ldr r1, =0x03002f90
adds r1, 0x80
ldrb r0, [r1]
ldrb r3, [r6, 0x8]
adds r0, r3
strb r0, [r6, 0x8]
ldrb r2, [r2]
ldrb r0, [r1]
subs r4, r2, r0
cmp r4, 0
2016-01-07 04:23:20 +00:00
ble _08005C70
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r1, r4, 0
bl ClearTextSpan
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x8]
adds r0, r4
2016-01-07 04:23:20 +00:00
b _08005C6E
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005C48:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x21
ldrb r0, [r0]
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08005C64
2015-10-06 13:46:30 +01:00
ldr r0, =0x03002f90
adds r0, 0x80
ldrb r1, [r6, 0xA]
ldrb r0, [r0]
adds r1, r0
ldrb r0, [r6, 0x8]
2016-01-07 04:23:20 +00:00
b _08005C6C
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005C64:
2015-10-06 13:46:30 +01:00
ldr r0, =0x03002f90
adds r0, 0x80
ldrb r0, [r0]
2016-01-07 04:23:20 +00:00
_08005C6A:
2015-10-06 13:46:30 +01:00
ldrb r1, [r6, 0x8]
2016-01-07 04:23:20 +00:00
_08005C6C:
2015-10-06 13:46:30 +01:00
adds r0, r1
2016-01-07 04:23:20 +00:00
_08005C6E:
2015-10-06 13:46:30 +01:00
strb r0, [r6, 0x8]
2016-01-07 04:23:20 +00:00
_08005C70:
2015-10-06 13:46:30 +01:00
movs r0, 0
2016-01-07 04:23:20 +00:00
b _08005D6E
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005C78:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
bl TextPrinterWait
2015-10-06 13:46:30 +01:00
lsls r0, 16
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005C86
b _08005B56
_08005C86:
2015-10-06 13:46:30 +01:00
movs r0, 0
strb r0, [r6, 0x1C]
2016-01-07 04:23:20 +00:00
b _08005B56
_08005C8C:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
bl TextPrinterWaitWithDownArrow
2015-10-06 13:46:30 +01:00
lsls r0, 16
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005C9A
b _08005B56
_08005C9A:
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x4]
ldrb r2, [r6, 0xD]
lsls r2, 28
lsrs r1, r2, 4
orrs r1, r2
lsrs r1, 24
bl FillWindowPixelBuffer
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x6]
movs r1, 0
strb r0, [r6, 0x8]
ldrb r0, [r6, 0x7]
strb r0, [r6, 0x9]
strb r1, [r6, 0x1C]
2016-01-07 04:23:20 +00:00
b _08005B56
_08005CB8:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
bl TextPrinterWaitWithDownArrow
2015-10-06 13:46:30 +01:00
lsls r0, 16
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005CC6
b _08005B56
_08005CC6:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
bl TextPrinterClearDownArrow
2015-10-06 13:46:30 +01:00
ldrb r1, [r6, 0x5]
ldr r0, =0x03002f80
ldr r2, [r0]
lsls r0, r1, 1
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r1, [r6, 0xB]
ldrb r0, [r0, 0x5]
adds r1, r0
strb r1, [r6, 0x1F]
ldrb r0, [r6, 0x6]
strb r0, [r6, 0x8]
movs r0, 0x4
strb r0, [r6, 0x1C]
2016-01-07 04:23:20 +00:00
b _08005B56
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005CF0:
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x1F]
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08005D44
2015-10-06 13:46:30 +01:00
bl sub_8197964
2015-10-07 14:48:45 +01:00
ldr r1, =gWindowVerticalScrollSpeeds
2015-10-06 13:46:30 +01:00
adds r0, r1
ldrb r4, [r0]
ldrb r2, [r6, 0x1F]
cmp r2, r4
2016-01-07 04:23:20 +00:00
bge _08005D20
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x4]
ldrb r1, [r6, 0xD]
lsls r1, 28
lsrs r3, r1, 4
orrs r3, r1
lsrs r3, 24
movs r1, 0
bl ScrollWindow
2015-10-06 13:46:30 +01:00
movs r0, 0
2016-01-07 04:23:20 +00:00
b _08005D38
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005D20:
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x4]
ldrb r1, [r6, 0xD]
lsls r1, 28
lsrs r3, r1, 4
orrs r3, r1
lsrs r3, 24
movs r1, 0
adds r2, r4, 0
bl ScrollWindow
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x1F]
subs r0, r4
2016-01-07 04:23:20 +00:00
_08005D38:
2015-10-06 13:46:30 +01:00
strb r0, [r6, 0x1F]
ldrb r0, [r6, 0x4]
movs r1, 0x2
bl CopyWindowToVram
2016-01-07 04:23:20 +00:00
b _08005B56
_08005D44:
2015-10-06 13:46:30 +01:00
strb r0, [r6, 0x1C]
2016-01-07 04:23:20 +00:00
b _08005B56
_08005D48:
2015-10-06 13:46:30 +01:00
bl mplay_has_finished_maybe
lsls r0, 24
lsrs r0, 24
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _08005D56
b _08005B56
_08005D56:
2015-10-06 13:46:30 +01:00
strb r0, [r6, 0x1C]
2016-01-07 04:23:20 +00:00
b _08005B56
_08005D5A:
2015-10-06 13:46:30 +01:00
ldrb r0, [r6, 0x1E]
adds r1, r0, 0
cmp r1, 0
2016-01-07 04:23:20 +00:00
beq _08005D68
2015-10-06 13:46:30 +01:00
subs r0, 0x1
strb r0, [r6, 0x1E]
2016-01-07 04:23:20 +00:00
b _08005B56
_08005D68:
2015-10-06 13:46:30 +01:00
strb r1, [r6, 0x1C]
2016-01-07 04:23:20 +00:00
b _08005B56
_08005D6C:
2015-10-06 13:46:30 +01:00
movs r0, 0x1
2016-01-07 04:23:20 +00:00
_08005D6E:
2015-10-06 13:46:30 +01:00
pop {r4-r6}
pop {r1}
bx r1
thumb_func_end RenderText
2015-10-06 13:46:30 +01:00
thumb_func_start GetStringWidthFixedWidthFont
; u32 GetStringWidthFixedWidthFont(u8 *str, u8 fontId, u8 letterSpacing)
GetStringWidthFixedWidthFont: ; 8005D74
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x8
lsls r1, 24
lsrs r7, r1, 24
lsls r2, 24
lsrs r2, 24
mov r8, r2
movs r2, 0
mov r1, sp
adds r1, 0x7
2016-01-07 04:23:20 +00:00
_08005D8C:
2015-10-06 13:46:30 +01:00
strb r2, [r1]
subs r1, 0x1
cmp r1, sp
2016-01-07 04:23:20 +00:00
bge _08005D8C
2015-10-06 13:46:30 +01:00
movs r5, 0
movs r6, 0
adds r4, r0, 0
movs r2, 0
2016-01-07 04:23:20 +00:00
_08005D9C:
2015-10-06 13:46:30 +01:00
adds r0, r4, r2
ldrb r3, [r0]
adds r2, 0x1
adds r0, r3, 0
subs r0, 0xF7
cmp r0, 0x8
2016-01-07 04:23:20 +00:00
bhi _08005E6A
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_08005DB8
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_08005DB8:
.4byte _08005E64
.4byte _08005E68
.4byte _08005E68
.4byte _08005E70
.4byte _08005E70
.4byte _08005DEC
.4byte _08005E64
.4byte _08005DDC
.4byte _08005DDC
_08005DDC:
2015-10-06 13:46:30 +01:00
mov r1, sp
adds r0, r1, r6
strb r5, [r0]
movs r5, 0
adds r0, r6, 0x1
lsls r0, 24
lsrs r6, r0, 24
2016-01-07 04:23:20 +00:00
b _08005E70
_08005DEC:
2015-10-06 13:46:30 +01:00
adds r0, r4, r2
ldrb r0, [r0]
adds r2, 0x1
subs r0, 0x1
cmp r0, 0x15
2016-01-07 04:23:20 +00:00
bhi _08005E70
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_08005E08
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_08005E08:
.4byte _08005E64
.4byte _08005E64
.4byte _08005E64
.4byte _08005E60
.4byte _08005E64
.4byte _08005E64
.4byte _08005E70
.4byte _08005E64
.4byte _08005E70
.4byte _08005E70
.4byte _08005E62
.4byte _08005E64
.4byte _08005E64
.4byte _08005E64
.4byte _08005E70
.4byte _08005E62
.4byte _08005E64
.4byte _08005E64
.4byte _08005E64
.4byte _08005E64
.4byte _08005E70
.4byte _08005E70
_08005E60:
2015-10-06 13:46:30 +01:00
adds r2, 0x1
2016-01-07 04:23:20 +00:00
_08005E62:
2015-10-06 13:46:30 +01:00
adds r2, 0x1
2016-01-07 04:23:20 +00:00
_08005E64:
2015-10-06 13:46:30 +01:00
adds r2, 0x1
2016-01-07 04:23:20 +00:00
b _08005E70
_08005E68:
2015-10-06 13:46:30 +01:00
adds r2, 0x1
2016-01-07 04:23:20 +00:00
_08005E6A:
2015-10-06 13:46:30 +01:00
adds r0, r5, 0x1
lsls r0, 24
lsrs r5, r0, 24
2016-01-07 04:23:20 +00:00
_08005E70:
2015-10-06 13:46:30 +01:00
cmp r3, 0xFF
2016-01-07 04:23:20 +00:00
bne _08005D9C
2015-10-06 13:46:30 +01:00
movs r5, 0
movs r2, 0
2016-01-07 04:23:20 +00:00
_08005E78:
2015-10-06 13:46:30 +01:00
mov r1, sp
adds r0, r1, r2
ldrb r1, [r0]
cmp r5, r1
2016-01-07 04:23:20 +00:00
bcs _08005E84
2015-10-06 13:46:30 +01:00
ldrb r5, [r0]
2016-01-07 04:23:20 +00:00
_08005E84:
2015-10-06 13:46:30 +01:00
adds r2, 0x1
cmp r2, 0x7
2016-01-07 04:23:20 +00:00
ble _08005E78
2015-10-06 13:46:30 +01:00
adds r0, r7, 0
movs r1, 0
bl GetFontAttribute
2015-10-06 13:46:30 +01:00
add r0, r8
lsls r0, 24
lsrs r0, 24
muls r0, r5
add sp, 0x8
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end GetStringWidthFixedWidthFont
2015-10-06 13:46:30 +01:00
2015-10-07 14:48:45 +01:00
thumb_func_start GetFontWidthFunc
; u8 GetFontWidthFunc(u16 glyphId)
2015-10-10 11:12:48 +01:00
GetFontWidthFunc: ; 8005EA8
2015-10-06 13:46:30 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
movs r3, 0
2015-10-08 02:24:21 +01:00
ldr r0, =gGlyphWidthFuncs
2015-10-06 13:46:30 +01:00
adds r2, r0, 0x4
adds r1, r0, 0
2016-01-07 04:23:20 +00:00
_08005EB6:
2015-10-06 13:46:30 +01:00
ldr r0, [r1]
cmp r4, r0
2016-01-07 04:23:20 +00:00
bne _08005EC4
2015-10-06 13:46:30 +01:00
ldr r0, [r2]
2016-01-07 04:23:20 +00:00
b _08005ED0
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005EC4:
2015-10-06 13:46:30 +01:00
adds r2, 0x8
adds r1, 0x8
adds r3, 0x1
cmp r3, 0x8
2016-01-07 04:23:20 +00:00
bls _08005EB6
2015-10-06 13:46:30 +01:00
movs r0, 0
2016-01-07 04:23:20 +00:00
_08005ED0:
2015-10-06 13:46:30 +01:00
pop {r4}
pop {r1}
bx r1
2015-10-07 14:48:45 +01:00
thumb_func_end GetFontWidthFunc
2015-10-06 13:46:30 +01:00
thumb_func_start GetStringWidth
; s32 GetStringWidth(u8 fontId, u8 *str, u16 letterSpacing)
GetStringWidth: ; 8005ED8
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x8
adds r4, r1, 0
lsls r0, 24
lsrs r0, 24
adds r6, r0, 0
lsls r2, 16
lsrs r5, r2, 16
movs r0, 0
mov r9, r0
movs r7, 0
adds r0, r6, 0
2015-10-07 14:48:45 +01:00
bl GetFontWidthFunc
2015-10-06 13:46:30 +01:00
mov r8, r0
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08005F06
_08005F02:
2015-10-06 13:46:30 +01:00
movs r0, 0
2016-01-07 04:23:20 +00:00
b _0800612E
_08005F06:
2015-10-06 13:46:30 +01:00
lsls r0, r5, 16
asrs r2, r0, 16
movs r1, 0x1
negs r1, r1
str r0, [sp, 0x4]
cmp r2, r1
2016-01-07 04:23:20 +00:00
bne _08005F24
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
movs r1, 0x2
bl GetFontAttribute
2015-10-06 13:46:30 +01:00
lsls r0, 24
lsrs r0, 24
mov r10, r0
2016-01-07 04:23:20 +00:00
b _08005F26
_08005F24:
2015-10-06 13:46:30 +01:00
mov r10, r2
2016-01-07 04:23:20 +00:00
_08005F26:
2015-10-06 13:46:30 +01:00
movs r2, 0
str r2, [sp]
movs r5, 0
movs r6, 0
2016-01-07 04:23:20 +00:00
b _0800611E
_08005F30:
2015-10-06 13:46:30 +01:00
ldrb r1, [r4]
adds r0, r1, 0
subs r0, 0xF7
cmp r0, 0x7
2016-01-07 04:23:20 +00:00
bls _08005F3C
b _080060F8
_08005F3C:
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_08005F4C
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_08005F4C:
.4byte _08005FA2
.4byte _080060BC
.4byte _080060BC
.4byte _0800611C
.4byte _0800611C
.4byte _08005FEA
.4byte _08005F78
.4byte _08005F6C
_08005F6C:
2015-10-06 13:46:30 +01:00
ldr r0, [sp]
cmp r5, r0
2016-01-07 04:23:20 +00:00
bls _08005F74
2015-10-06 13:46:30 +01:00
str r5, [sp]
2016-01-07 04:23:20 +00:00
_08005F74:
2015-10-06 13:46:30 +01:00
movs r5, 0
2016-01-07 04:23:20 +00:00
b _0800611C
_08005F78:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r0, [r4]
cmp r0, 0x3
2016-01-07 04:23:20 +00:00
beq _08005F98
2015-10-06 13:46:30 +01:00
cmp r0, 0x3
2016-01-07 04:23:20 +00:00
bgt _08005F8A
2015-10-06 13:46:30 +01:00
cmp r0, 0x2
2016-01-07 04:23:20 +00:00
beq _08005F90
b _08005F02
_08005F8A:
2015-10-06 13:46:30 +01:00
cmp r0, 0x4
2016-01-07 04:23:20 +00:00
beq _08005FA0
b _08005F02
_08005F90:
2015-10-06 13:46:30 +01:00
ldr r6, =0x02021cc4
2016-01-07 04:23:20 +00:00
b _08005FA2
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005F98:
2015-10-06 13:46:30 +01:00
ldr r6, =0x02021dc4
2016-01-07 04:23:20 +00:00
b _08005FA2
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005FA0:
2015-10-06 13:46:30 +01:00
ldr r6, =0x02021ec4
2016-01-07 04:23:20 +00:00
_08005FA2:
2015-10-06 13:46:30 +01:00
cmp r6, 0
2016-01-07 04:23:20 +00:00
bne _08005FE0
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r0, [r4]
bl sub_81AFC74
adds r6, r0, 0
2016-01-07 04:23:20 +00:00
b _08005FE0
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08005FB8:
2015-10-06 13:46:30 +01:00
ldrb r0, [r6]
adds r6, 0x1
mov r1, r9
bl _call_via_r8
cmp r7, 0
2016-01-07 04:23:20 +00:00
ble _08005FD0
2015-10-06 13:46:30 +01:00
cmp r0, r7
2016-01-07 04:23:20 +00:00
bge _08005FCC
2015-10-06 13:46:30 +01:00
adds r0, r7, 0
2016-01-07 04:23:20 +00:00
_08005FCC:
2015-10-06 13:46:30 +01:00
adds r5, r0
2016-01-07 04:23:20 +00:00
b _08005FE0
_08005FD0:
2015-10-06 13:46:30 +01:00
adds r5, r0
mov r2, r9
cmp r2, 0
2016-01-07 04:23:20 +00:00
beq _08005FE0
2015-10-06 13:46:30 +01:00
ldrb r0, [r4, 0x1]
cmp r0, 0xFF
2016-01-07 04:23:20 +00:00
beq _08005FE0
2015-10-06 13:46:30 +01:00
add r5, r10
2016-01-07 04:23:20 +00:00
_08005FE0:
2015-10-06 13:46:30 +01:00
ldrb r0, [r6]
cmp r0, 0xFF
2016-01-07 04:23:20 +00:00
bne _08005FB8
2015-10-06 13:46:30 +01:00
movs r6, 0
2016-01-07 04:23:20 +00:00
b _0800611C
_08005FEA:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r0, [r4]
subs r0, 0x1
cmp r0, 0x15
2016-01-07 04:23:20 +00:00
bls _08005FF6
b _0800611C
_08005FF6:
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_08006004
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_08006004:
.4byte _08006060
.4byte _08006060
.4byte _08006060
.4byte _0800605C
.4byte _08006060
.4byte _08006064
.4byte _0800611C
.4byte _08006060
.4byte _0800611C
.4byte _0800611C
.4byte _0800605E
.4byte _08006060
.4byte _08006060
.4byte _08006060
.4byte _0800611C
.4byte _0800605E
.4byte _08006090
.4byte _08006098
.4byte _0800609E
.4byte _080060AA
.4byte _080060B0
.4byte _080060B6
_0800605C:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
2016-01-07 04:23:20 +00:00
_0800605E:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
2016-01-07 04:23:20 +00:00
_08006060:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
2016-01-07 04:23:20 +00:00
b _0800611C
_08006064:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r0, [r4]
2015-10-07 14:48:45 +01:00
bl GetFontWidthFunc
2015-10-06 13:46:30 +01:00
mov r8, r0
cmp r0, 0
2016-01-07 04:23:20 +00:00
bne _08006074
b _08005F02
_08006074:
2015-10-06 13:46:30 +01:00
ldr r0, [sp, 0x4]
asrs r1, r0, 16
movs r0, 0x1
negs r0, r0
cmp r1, r0
2016-01-07 04:23:20 +00:00
bne _0800611C
2015-10-06 13:46:30 +01:00
ldrb r0, [r4]
movs r1, 0x2
bl GetFontAttribute
2015-10-06 13:46:30 +01:00
lsls r0, 24
lsrs r0, 24
mov r10, r0
2016-01-07 04:23:20 +00:00
b _0800611C
_08006090:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r0, [r4]
2016-01-07 04:23:20 +00:00
_08006094:
2015-10-06 13:46:30 +01:00
adds r5, r0
2016-01-07 04:23:20 +00:00
b _0800611C
_08006098:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r5, [r4]
2016-01-07 04:23:20 +00:00
b _0800611C
_0800609E:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r0, [r4]
cmp r0, r5
2016-01-07 04:23:20 +00:00
bls _0800611C
2015-10-06 13:46:30 +01:00
adds r5, r0, 0
2016-01-07 04:23:20 +00:00
b _0800611C
_080060AA:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r7, [r4]
2016-01-07 04:23:20 +00:00
b _0800611C
_080060B0:
2015-10-06 13:46:30 +01:00
movs r2, 0x1
mov r9, r2
2016-01-07 04:23:20 +00:00
b _0800611C
_080060B6:
2015-10-06 13:46:30 +01:00
movs r0, 0
mov r9, r0
2016-01-07 04:23:20 +00:00
b _0800611C
_080060BC:
2015-10-06 13:46:30 +01:00
ldrb r0, [r4]
cmp r0, 0xF9
2016-01-07 04:23:20 +00:00
bne _080060D6
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r0, [r4]
movs r2, 0x80
lsls r2, 1
adds r1, r2, 0
orrs r0, r1
mov r1, r9
bl _call_via_r8
2016-01-07 04:23:20 +00:00
b _080060E2
_080060D6:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
ldrb r0, [r4]
bl GetKeypadIconWidth
2015-10-06 13:46:30 +01:00
lsls r0, 24
lsrs r0, 24
2016-01-07 04:23:20 +00:00
_080060E2:
2015-10-06 13:46:30 +01:00
cmp r7, 0
2016-01-07 04:23:20 +00:00
ble _080060EE
2015-10-06 13:46:30 +01:00
cmp r0, r7
2016-01-07 04:23:20 +00:00
bge _08006094
2015-10-06 13:46:30 +01:00
adds r0, r7, 0
2016-01-07 04:23:20 +00:00
b _08006094
_080060EE:
2015-10-06 13:46:30 +01:00
adds r5, r0
mov r0, r9
cmp r0, 0
2016-01-07 04:23:20 +00:00
beq _0800611C
b _08006114
_080060F8:
2015-10-06 13:46:30 +01:00
adds r0, r1, 0
mov r1, r9
bl _call_via_r8
cmp r7, 0
2016-01-07 04:23:20 +00:00
ble _0800610C
2015-10-06 13:46:30 +01:00
cmp r0, r7
2016-01-07 04:23:20 +00:00
bge _08006094
2015-10-06 13:46:30 +01:00
adds r0, r7, 0
2016-01-07 04:23:20 +00:00
b _08006094
_0800610C:
2015-10-06 13:46:30 +01:00
adds r5, r0
mov r2, r9
cmp r2, 0
2016-01-07 04:23:20 +00:00
beq _0800611C
_08006114:
2015-10-06 13:46:30 +01:00
ldrb r0, [r4, 0x1]
cmp r0, 0xFF
2016-01-07 04:23:20 +00:00
beq _0800611C
2015-10-06 13:46:30 +01:00
add r5, r10
2016-01-07 04:23:20 +00:00
_0800611C:
2015-10-06 13:46:30 +01:00
adds r4, 0x1
2016-01-07 04:23:20 +00:00
_0800611E:
2015-10-06 13:46:30 +01:00
ldrb r0, [r4]
cmp r0, 0xFF
2016-01-07 04:23:20 +00:00
beq _08006126
b _08005F30
_08006126:
2015-10-06 13:46:30 +01:00
ldr r0, [sp]
cmp r5, r0
2016-01-07 04:23:20 +00:00
bls _0800612E
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
2016-01-07 04:23:20 +00:00
_0800612E:
2015-10-06 13:46:30 +01:00
add sp, 0x8
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end GetStringWidth
2015-10-06 13:46:30 +01:00
thumb_func_start RenderTextFont9
; u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
RenderTextFont9: ; 8006140
2015-10-06 13:46:30 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x10
mov r9, r0
adds r6, r2, 0
lsls r1, 24
lsrs r1, 24
str r1, [sp, 0x4]
mov r4, sp
adds r4, 0x1
mov r5, sp
adds r5, 0x2
mov r0, sp
adds r1, r4, 0
adds r2, r5, 0
bl SaveTextColors
2015-10-06 13:46:30 +01:00
movs r0, 0x1
str r0, [sp, 0x8]
movs r0, 0
str r0, [sp, 0xC]
movs r0, 0x3
mov r10, r0
movs r0, 0x1
movs r1, 0
movs r2, 0x3
bl GenerateFontHalfRowLookupTable
2015-10-06 13:46:30 +01:00
adds r7, r6, 0
movs r6, 0
2016-01-07 04:23:20 +00:00
_08006182:
2015-10-06 13:46:30 +01:00
adds r0, r7, r6
ldrb r0, [r0]
mov r8, r0
adds r6, 0x1
subs r0, 0xF7
cmp r0, 0x8
2016-01-07 04:23:20 +00:00
bhi _0800627E
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_080061A0
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_080061A0:
.4byte _08006276
.4byte _08006276
.4byte _08006276
.4byte _080062B8
.4byte _080062B8
.4byte _080061C4
.4byte _08006276
.4byte _080062B8
.4byte _080062B8
_080061C4:
2015-10-06 13:46:30 +01:00
adds r0, r7, r6
ldrb r0, [r0]
adds r6, 0x1
subs r0, 0x1
cmp r0, 0x15
2016-01-07 04:23:20 +00:00
bhi _080062B8
2015-10-06 13:46:30 +01:00
lsls r0, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_080061E0
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_080061E0:
.4byte _0800624A
.4byte _08006254
.4byte _0800625C
.4byte _08006238
.4byte _08006276
.4byte _08006270
.4byte _080062B8
.4byte _08006276
.4byte _080062B8
.4byte _080062B8
.4byte _0800627A
.4byte _08006276
.4byte _08006276
.4byte _08006276
.4byte _080062B8
.4byte _0800627A
.4byte _08006276
.4byte _08006276
.4byte _08006276
.4byte _08006276
.4byte _080062B8
.4byte _080062B8
_08006238:
2015-10-06 13:46:30 +01:00
adds r0, r7, r6
ldrb r0, [r0]
str r0, [sp, 0x8]
adds r6, 0x1
adds r0, r7, r6
ldrb r0, [r0]
str r0, [sp, 0xC]
adds r6, 0x1
2016-01-07 04:23:20 +00:00
b _0800625C
_0800624A:
2015-10-06 13:46:30 +01:00
adds r0, r7, r6
ldrb r0, [r0]
str r0, [sp, 0x8]
adds r6, 0x1
2016-01-07 04:23:20 +00:00
b _08006266
_08006254:
2015-10-06 13:46:30 +01:00
adds r0, r7, r6
ldrb r0, [r0]
str r0, [sp, 0xC]
2016-01-07 04:23:20 +00:00
b _08006262
_0800625C:
2015-10-06 13:46:30 +01:00
adds r0, r7, r6
ldrb r0, [r0]
mov r10, r0
2016-01-07 04:23:20 +00:00
_08006262:
2015-10-06 13:46:30 +01:00
adds r6, 0x1
ldr r0, [sp, 0x8]
2016-01-07 04:23:20 +00:00
_08006266:
2015-10-06 13:46:30 +01:00
ldr r1, [sp, 0xC]
mov r2, r10
bl GenerateFontHalfRowLookupTable
2016-01-07 04:23:20 +00:00
b _080062B8
_08006270:
2015-10-06 13:46:30 +01:00
adds r0, r7, r6
ldrb r0, [r0]
str r0, [sp, 0x4]
2016-01-07 04:23:20 +00:00
_08006276:
2015-10-06 13:46:30 +01:00
adds r6, 0x1
2016-01-07 04:23:20 +00:00
b _080062B8
_0800627A:
2015-10-06 13:46:30 +01:00
adds r6, 0x1
2016-01-07 04:23:20 +00:00
b _08006276
_0800627E:
2015-10-06 13:46:30 +01:00
ldr r0, [sp, 0x4]
cmp r0, 0x1
2016-01-07 04:23:20 +00:00
beq _08006290
2015-10-06 13:46:30 +01:00
cmp r0, 0x9
2016-01-07 04:23:20 +00:00
bne _08006290
2015-10-06 13:46:30 +01:00
mov r0, r8
2015-10-08 08:21:20 +01:00
bl DecompressGlyphFont9
2016-01-07 04:23:20 +00:00
b _08006298
_08006290:
2015-10-06 13:46:30 +01:00
mov r0, r8
movs r1, 0x1
2015-10-08 08:21:20 +01:00
bl DecompressGlyphFont1
2016-01-07 04:23:20 +00:00
_08006298:
2015-10-06 13:46:30 +01:00
ldr r4, =0x03002f90
ldr r5, =0x04000008
adds r0, r4, 0
mov r1, r9
adds r2, r5, 0
bl CpuSet
adds r4, 0x40
mov r1, r9
adds r1, 0x20
adds r0, r4, 0
adds r2, r5, 0
bl CpuSet
movs r0, 0x40
add r9, r0
2016-01-07 04:23:20 +00:00
_080062B8:
2015-10-06 13:46:30 +01:00
mov r0, r8
cmp r0, 0xFF
2016-01-07 04:23:20 +00:00
beq _080062C0
b _08006182
_080062C0:
2015-10-06 13:46:30 +01:00
mov r0, sp
mov r1, sp
adds r1, 0x1
mov r2, sp
adds r2, 0x2
bl RestoreTextColors
2015-10-06 13:46:30 +01:00
movs r0, 0x1
add sp, 0x10
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r1}
bx r1
.pool
thumb_func_end RenderTextFont9
2015-10-06 13:46:30 +01:00
thumb_func_start DrawKeypadIcon
; u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y)
DrawKeypadIcon: ; 80062E8
2015-10-06 13:46:30 +01:00
push {r4,r5,lr}
sub sp, 0x18
lsls r0, 24
lsrs r0, 24
lsls r1, 24
lsls r2, 16
lsrs r2, 16
lsls r3, 16
lsrs r3, 16
2015-10-07 14:48:45 +01:00
ldr r4, =gKeypadIcons
2015-10-06 13:46:30 +01:00
lsrs r1, 22
adds r1, r4
ldrh r5, [r1]
lsls r5, 5
2015-10-07 14:48:45 +01:00
ldr r4, =gKeypadIconTiles
2015-10-06 13:46:30 +01:00
adds r5, r4
movs r4, 0x80
str r4, [sp]
str r4, [sp, 0x4]
str r2, [sp, 0x8]
str r3, [sp, 0xC]
ldrb r4, [r1, 0x2]
str r4, [sp, 0x10]
ldrb r1, [r1, 0x3]
str r1, [sp, 0x14]
adds r1, r5, 0
movs r2, 0
movs r3, 0
2015-11-30 07:17:50 +00:00
bl BlitBitmapRectToWindow
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
add sp, 0x18
pop {r4,r5}
pop {r1}
bx r1
.pool
thumb_func_end DrawKeypadIcon
2015-10-06 13:46:30 +01:00
thumb_func_start GetKeypadIconTileOffset
; u8 GetKeypadIconTileOffset(u8 keypadIconId)
GetKeypadIconTileOffset: ; 8006338
2015-10-06 13:46:30 +01:00
lsls r0, 24
2015-10-07 14:48:45 +01:00
ldr r1, =gKeypadIcons
2015-10-06 13:46:30 +01:00
lsrs r0, 22
adds r0, r1
ldrb r0, [r0]
bx lr
.pool
thumb_func_end GetKeypadIconTileOffset
2015-10-06 13:46:30 +01:00
thumb_func_start GetKeypadIconWidth
; u8 GetKeypadIconWidth(u8 keypadIconId)
GetKeypadIconWidth: ; 8006348
2015-10-06 13:46:30 +01:00
lsls r0, 24
2015-10-07 14:48:45 +01:00
ldr r1, =gKeypadIcons
2015-10-06 13:46:30 +01:00
lsrs r0, 22
adds r0, r1
ldrb r0, [r0, 0x2]
bx lr
.pool
thumb_func_end GetKeypadIconWidth
2015-10-06 13:46:30 +01:00
thumb_func_start GetKeypadIconHeight
; u8 GetKeypadIconHeight(u8 keypadIconId)
GetKeypadIconHeight: ; 8006358
2015-10-06 13:46:30 +01:00
lsls r0, 24
2015-10-07 14:48:45 +01:00
ldr r1, =gKeypadIcons
2015-10-06 13:46:30 +01:00
lsrs r0, 22
adds r0, r1
ldrb r0, [r0, 0x3]
bx lr
.pool
thumb_func_end GetKeypadIconHeight
2015-10-06 13:46:30 +01:00
thumb_func_start SetDefaultFontsPointer
; void SetDefaultFontsPointer()
SetDefaultFontsPointer: ; 8006368
2015-10-06 13:46:30 +01:00
push {lr}
2015-10-07 14:48:45 +01:00
ldr r0, =gFontInfos
bl SetFontsPointer
2015-10-06 13:46:30 +01:00
pop {r0}
bx r0
.pool
thumb_func_end SetDefaultFontsPointer
2015-10-06 13:46:30 +01:00
thumb_func_start GetFontAttribute
; u8 GetFontAttribute(u8 fontId, u8 attributeId)
GetFontAttribute: ; 8006378
2015-10-06 13:46:30 +01:00
push {lr}
lsls r0, 24
lsrs r2, r0, 24
lsls r1, 24
lsrs r1, 24
movs r0, 0
cmp r1, 0x7
2016-01-07 04:23:20 +00:00
bhi _08006456
2015-10-06 13:46:30 +01:00
lsls r0, r1, 2
2016-01-07 04:23:20 +00:00
ldr r1, =_08006398
2015-10-06 13:46:30 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 04:23:20 +00:00
_08006398:
.4byte _080063B8
.4byte _080063CC
.4byte _080063E0
.4byte _080063F4
.4byte _08006408
.4byte _0800641C
.4byte _08006430
.4byte _08006448
_080063B8:
2015-10-07 14:48:45 +01:00
ldr r1, =gFontInfos
2015-10-06 13:46:30 +01:00
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r1
ldrb r0, [r0, 0x4]
2016-01-07 04:23:20 +00:00
b _08006456
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080063CC:
2015-10-07 14:48:45 +01:00
ldr r1, =gFontInfos
2015-10-06 13:46:30 +01:00
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r1
ldrb r0, [r0, 0x5]
2016-01-07 04:23:20 +00:00
b _08006456
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080063E0:
2015-10-07 14:48:45 +01:00
ldr r1, =gFontInfos
2015-10-06 13:46:30 +01:00
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r1
ldrb r0, [r0, 0x6]
2016-01-07 04:23:20 +00:00
b _08006456
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080063F4:
2015-10-07 14:48:45 +01:00
ldr r1, =gFontInfos
2015-10-06 13:46:30 +01:00
lsls r0, r2, 1
adds r0, r2
lsls r0, 2
adds r0, r1
ldrb r0, [r0, 0x7]
2016-01-07 04:23:20 +00:00
b _08006456
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006408:
2015-10-07 14:48:45 +01:00
ldr r0, =gFontInfos
2015-10-06 13:46:30 +01:00
lsls r1, r2, 1
adds r1, r2
lsls r1, 2
adds r1, r0
ldrb r0, [r1, 0x8]
2016-01-07 04:23:20 +00:00
b _0800643C
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_0800641C:
2015-10-07 14:48:45 +01:00
ldr r0, =gFontInfos
2015-10-06 13:46:30 +01:00
lsls r1, r2, 1
adds r1, r2
lsls r1, 2
adds r1, r0
ldrb r0, [r1, 0x8]
2016-01-07 04:23:20 +00:00
b _08006454
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006430:
2015-10-07 14:48:45 +01:00
ldr r0, =gFontInfos
2015-10-06 13:46:30 +01:00
lsls r1, r2, 1
adds r1, r2
lsls r1, 2
adds r1, r0
ldrb r0, [r1, 0x9]
2016-01-07 04:23:20 +00:00
_0800643C:
2015-10-06 13:46:30 +01:00
lsls r0, 28
lsrs r0, 28
2016-01-07 04:23:20 +00:00
b _08006456
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006448:
2015-10-07 14:48:45 +01:00
ldr r0, =gFontInfos
2015-10-06 13:46:30 +01:00
lsls r1, r2, 1
adds r1, r2
lsls r1, 2
adds r1, r0
ldrb r0, [r1, 0x9]
2016-01-07 04:23:20 +00:00
_08006454:
2015-10-06 13:46:30 +01:00
lsrs r0, 4
2016-01-07 04:23:20 +00:00
_08006456:
2015-10-06 13:46:30 +01:00
pop {r1}
bx r1
.pool
thumb_func_end GetFontAttribute
2015-10-06 13:46:30 +01:00
2015-10-08 02:24:21 +01:00
thumb_func_start GetMenuCursorDimensionByFont
2015-10-10 11:12:48 +01:00
; u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension)
GetMenuCursorDimensionByFont: ; 8006460
2015-10-06 13:46:30 +01:00
lsls r0, 24
lsls r1, 24
lsrs r1, 24
2015-10-08 02:30:49 +01:00
ldr r2, =gMenuCursorDimensions
2015-10-06 13:46:30 +01:00
lsrs r0, 23
adds r1, r0
adds r1, r2
ldrb r0, [r1]
bx lr
.pool
2015-10-08 02:24:21 +01:00
thumb_func_end GetMenuCursorDimensionByFont
2015-10-06 13:46:30 +01:00
2015-10-08 08:21:20 +01:00
thumb_func_start DecompressGlyphFont0
2016-01-08 07:27:40 +00:00
; void DecompressGlyphFont0(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
DecompressGlyphFont0: ; 8006478
2015-10-06 13:46:30 +01:00
push {r4,r5,lr}
lsls r0, 16
lsrs r3, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
bne _080064C4
2015-10-06 13:46:30 +01:00
lsrs r2, r0, 20
lsls r2, 9
movs r0, 0xF
ands r0, r3
lsls r0, 4
2015-10-08 08:21:20 +01:00
ldr r1, =gFont0JapaneseGlyphs
2015-10-06 13:46:30 +01:00
adds r0, r1
adds r5, r2, r0
ldr r4, =0x03002f90
adds r0, r5, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
movs r1, 0x80
lsls r1, 1
adds r0, r5, r1
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r1, r4, 0
adds r1, 0x80
movs r0, 0x8
strb r0, [r1]
adds r4, 0x81
movs r0, 0xC
strb r0, [r4]
2016-01-07 04:23:20 +00:00
b _08006534
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080064C4:
2015-10-06 13:46:30 +01:00
lsls r1, r3, 6
2015-10-08 08:21:20 +01:00
ldr r0, =gFont0LatinGlyphs
2015-10-06 13:46:30 +01:00
adds r5, r1, r0
ldr r4, =0x03002f90
2015-10-08 08:21:20 +01:00
ldr r0, =gFont0LatinGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r3, r0
ldrb r1, [r0]
adds r0, r4, 0
adds r0, 0x80
strb r1, [r0]
cmp r1, 0x8
2016-01-07 04:23:20 +00:00
bhi _08006500
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r0, 0x20
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
b _0800652C
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006500:
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r0, 0x10
adds r1, r4, 0
adds r1, 0x20
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r0, 0x20
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r0, 0x30
adds r1, r4, 0
adds r1, 0x60
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
_0800652C:
2015-10-06 13:46:30 +01:00
ldr r0, =0x03002f90
adds r0, 0x81
movs r1, 0xD
strb r1, [r0]
2016-01-07 04:23:20 +00:00
_08006534:
2015-10-06 13:46:30 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
2015-10-08 08:21:20 +01:00
thumb_func_end DecompressGlyphFont0
2015-10-06 13:46:30 +01:00
2015-10-08 02:24:21 +01:00
thumb_func_start GetGlyphWidthFont0
2016-01-08 07:27:40 +00:00
; u8 GetGlyphWidthFont0(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
GetGlyphWidthFont0: ; 8006540
2015-10-06 13:46:30 +01:00
push {lr}
lsls r0, 16
lsrs r2, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
beq _08006558
2015-10-08 08:21:20 +01:00
ldr r0, =gFont0LatinGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r2, r0
ldrb r0, [r0]
2016-01-07 04:23:20 +00:00
b _0800655A
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006558:
2015-10-06 13:46:30 +01:00
movs r0, 0x8
2016-01-07 04:23:20 +00:00
_0800655A:
2015-10-06 13:46:30 +01:00
pop {r1}
bx r1
2015-10-08 02:24:21 +01:00
thumb_func_end GetGlyphWidthFont0
2015-10-06 13:46:30 +01:00
2015-10-08 08:21:20 +01:00
thumb_func_start DecompressGlyphFont7
2016-01-08 07:27:40 +00:00
; void DecompressGlyphFont7(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
DecompressGlyphFont7: ; 8006560
2015-10-06 13:46:30 +01:00
push {r4-r6,lr}
lsls r0, 16
lsrs r3, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
bne _080065AC
2015-10-06 13:46:30 +01:00
lsrs r2, r0, 20
lsls r2, 9
movs r5, 0xF
adds r0, r3, 0
ands r0, r5
lsls r0, 4
2015-10-08 08:21:20 +01:00
ldr r1, =gFont1JapaneseGlyphs
2015-10-06 13:46:30 +01:00
adds r0, r1
adds r6, r2, r0
ldr r4, =0x03002f90
adds r0, r6, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
movs r1, 0x80
lsls r1, 1
adds r0, r6, r1
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r1, r4, 0
adds r1, 0x80
movs r0, 0x8
strb r0, [r1]
adds r4, 0x81
strb r5, [r4]
2016-01-07 04:23:20 +00:00
b _0800661C
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080065AC:
2015-10-06 13:46:30 +01:00
lsls r1, r3, 6
2015-10-08 08:21:20 +01:00
ldr r0, =gFont7LatinGlyphs
2015-10-06 13:46:30 +01:00
adds r6, r1, r0
ldr r4, =0x03002f90
2015-10-08 08:21:20 +01:00
ldr r0, =gFont7LatinGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r3, r0
ldrb r1, [r0]
adds r0, r4, 0
adds r0, 0x80
strb r1, [r0]
cmp r1, 0x8
2016-01-07 04:23:20 +00:00
bhi _080065E8
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x20
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
b _08006614
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080065E8:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x10
adds r1, r4, 0
adds r1, 0x20
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x20
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x30
adds r1, r4, 0
adds r1, 0x60
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
_08006614:
2015-10-06 13:46:30 +01:00
ldr r0, =0x03002f90
adds r0, 0x81
movs r1, 0xF
strb r1, [r0]
2016-01-07 04:23:20 +00:00
_0800661C:
2015-10-06 13:46:30 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2015-10-08 08:21:20 +01:00
thumb_func_end DecompressGlyphFont7
2015-10-06 13:46:30 +01:00
2015-10-08 02:24:21 +01:00
thumb_func_start GetGlyphWidthFont7
2016-01-08 07:27:40 +00:00
; u8 GetGlyphWidthFont7(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
GetGlyphWidthFont7: ; 8006628
2015-10-06 13:46:30 +01:00
push {lr}
lsls r0, 16
lsrs r2, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
beq _08006640
2015-10-08 08:21:20 +01:00
ldr r0, =gFont7LatinGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r2, r0
ldrb r0, [r0]
2016-01-07 04:23:20 +00:00
b _08006642
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006640:
2015-10-06 13:46:30 +01:00
movs r0, 0x8
2016-01-07 04:23:20 +00:00
_08006642:
2015-10-06 13:46:30 +01:00
pop {r1}
bx r1
2015-10-08 02:24:21 +01:00
thumb_func_end GetGlyphWidthFont7
2015-10-06 13:46:30 +01:00
2015-10-08 08:21:20 +01:00
thumb_func_start DecompressGlyphFont8
2016-01-08 07:27:40 +00:00
; void DecompressGlyphFont8(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
DecompressGlyphFont8: ; 8006648
2015-10-06 13:46:30 +01:00
push {r4,r5,lr}
lsls r0, 16
lsrs r3, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
bne _08006694
2015-10-06 13:46:30 +01:00
lsrs r2, r0, 20
lsls r2, 9
movs r0, 0xF
ands r0, r3
lsls r0, 4
2015-10-08 08:21:20 +01:00
ldr r1, =gFont0JapaneseGlyphs
2015-10-06 13:46:30 +01:00
adds r0, r1
adds r5, r2, r0
ldr r4, =0x03002f90
adds r0, r5, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
movs r1, 0x80
lsls r1, 1
adds r0, r5, r1
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r1, r4, 0
adds r1, 0x80
movs r0, 0x8
strb r0, [r1]
adds r4, 0x81
movs r0, 0xC
strb r0, [r4]
2016-01-07 04:23:20 +00:00
b _08006704
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006694:
2015-10-06 13:46:30 +01:00
lsls r1, r3, 6
2015-10-08 08:21:20 +01:00
ldr r0, =gFont8LatinGlyphs
2015-10-06 13:46:30 +01:00
adds r5, r1, r0
ldr r4, =0x03002f90
2015-10-08 08:21:20 +01:00
ldr r0, =gFont8LatinGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r3, r0
ldrb r1, [r0]
adds r0, r4, 0
adds r0, 0x80
strb r1, [r0]
cmp r1, 0x8
2016-01-07 04:23:20 +00:00
bhi _080066D0
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r0, 0x20
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
b _080066FC
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080066D0:
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r0, 0x10
adds r1, r4, 0
adds r1, 0x20
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r0, 0x20
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r5, 0
adds r0, 0x30
adds r1, r4, 0
adds r1, 0x60
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
_080066FC:
2015-10-06 13:46:30 +01:00
ldr r0, =0x03002f90
adds r0, 0x81
movs r1, 0xC
strb r1, [r0]
2016-01-07 04:23:20 +00:00
_08006704:
2015-10-06 13:46:30 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
2015-10-08 08:21:20 +01:00
thumb_func_end DecompressGlyphFont8
2015-10-06 13:46:30 +01:00
2015-10-08 02:24:21 +01:00
thumb_func_start GetGlyphWidthFont8
2016-01-08 07:27:40 +00:00
; u8 GetGlyphWidthFont8(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
GetGlyphWidthFont8: ; 8006710
2015-10-06 13:46:30 +01:00
push {lr}
lsls r0, 16
lsrs r2, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
beq _08006728
2015-10-08 08:21:20 +01:00
ldr r0, =gFont8LatinGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r2, r0
ldrb r0, [r0]
2016-01-07 04:23:20 +00:00
b _0800672A
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006728:
2015-10-06 13:46:30 +01:00
movs r0, 0x8
2016-01-07 04:23:20 +00:00
_0800672A:
2015-10-06 13:46:30 +01:00
pop {r1}
bx r1
2015-10-08 02:24:21 +01:00
thumb_func_end GetGlyphWidthFont8
2015-10-06 13:46:30 +01:00
2015-10-08 08:21:20 +01:00
thumb_func_start DecompressGlyphFont2
2016-01-08 07:27:40 +00:00
; void DecompressGlyphFont2(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
DecompressGlyphFont2: ; 8006730
2015-10-06 13:46:30 +01:00
push {r4-r6,lr}
lsls r0, 16
lsrs r6, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
bne _080067A0
2015-10-06 13:46:30 +01:00
lsrs r2, r0, 19
lsls r2, 9
movs r0, 0x7
ands r0, r6
lsls r0, 5
2015-10-08 08:21:20 +01:00
ldr r1, =gFont2JapaneseGlyphs
2015-10-06 13:46:30 +01:00
adds r0, r1
adds r4, r2, r0
ldr r5, =0x03002f90
adds r0, r4, 0
adds r1, r5, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
adds r0, 0x10
adds r1, r5, 0
adds r1, 0x20
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
movs r1, 0x80
lsls r1, 1
adds r0, r4, r1
adds r1, r5, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
movs r1, 0x88
lsls r1, 1
adds r0, r4, r1
adds r1, r5, 0
adds r1, 0x60
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
ldr r0, =gFont2JapaneseGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r6, r0
ldrb r1, [r0]
adds r0, r5, 0
adds r0, 0x80
strb r1, [r0]
adds r1, r5, 0
adds r1, 0x81
movs r0, 0xE
strb r0, [r1]
2016-01-07 04:23:20 +00:00
b _08006810
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080067A0:
2015-10-06 13:46:30 +01:00
lsls r1, r6, 6
2015-10-08 08:21:20 +01:00
ldr r0, =gFont2LatinGlyphs
2015-10-06 13:46:30 +01:00
adds r4, r1, r0
ldr r5, =0x03002f90
2015-10-08 08:21:20 +01:00
ldr r0, =gFont2LatinGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r6, r0
ldrb r1, [r0]
adds r0, r5, 0
adds r0, 0x80
strb r1, [r0]
cmp r1, 0x8
2016-01-07 04:23:20 +00:00
bhi _080067DC
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
adds r1, r5, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
adds r0, 0x20
adds r1, r5, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
b _08006808
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080067DC:
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
adds r1, r5, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
adds r0, 0x10
adds r1, r5, 0
adds r1, 0x20
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
adds r0, 0x20
adds r1, r5, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r4, 0
adds r0, 0x30
adds r1, r5, 0
adds r1, 0x60
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
_08006808:
2015-10-06 13:46:30 +01:00
ldr r0, =0x03002f90
adds r0, 0x81
movs r1, 0xE
strb r1, [r0]
2016-01-07 04:23:20 +00:00
_08006810:
2015-10-06 13:46:30 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2015-10-08 08:21:20 +01:00
thumb_func_end DecompressGlyphFont2
2015-10-06 13:46:30 +01:00
2015-10-08 02:24:21 +01:00
thumb_func_start GetGlyphWidthFont2
2016-01-08 07:27:40 +00:00
; u8 GetGlyphWidthFont2(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
GetGlyphWidthFont2: ; 800681C
2015-10-06 13:46:30 +01:00
push {lr}
lsls r0, 16
lsrs r2, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
beq _08006830
2015-10-08 08:21:20 +01:00
ldr r0, =gFont2LatinGlyphWidths
2016-01-07 04:23:20 +00:00
b _08006832
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006830:
2015-10-08 08:21:20 +01:00
ldr r0, =gFont2JapaneseGlyphWidths
2016-01-07 04:23:20 +00:00
_08006832:
2015-10-06 13:46:30 +01:00
adds r0, r2, r0
ldrb r0, [r0]
pop {r1}
bx r1
.pool
2015-10-08 02:24:21 +01:00
thumb_func_end GetGlyphWidthFont2
2015-10-06 13:46:30 +01:00
2015-10-08 08:21:20 +01:00
thumb_func_start DecompressGlyphFont1
2016-01-08 07:27:40 +00:00
; void DecompressGlyphFont1(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
DecompressGlyphFont1: ; 8006840
2015-10-06 13:46:30 +01:00
push {r4-r6,lr}
lsls r0, 16
lsrs r3, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
bne _0800688C
2015-10-06 13:46:30 +01:00
lsrs r2, r0, 20
lsls r2, 9
movs r5, 0xF
adds r0, r3, 0
ands r0, r5
lsls r0, 4
2015-10-08 08:21:20 +01:00
ldr r1, =gFont1JapaneseGlyphs
2015-10-06 13:46:30 +01:00
adds r0, r1
adds r6, r2, r0
ldr r4, =0x03002f90
adds r0, r6, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
movs r1, 0x80
lsls r1, 1
adds r0, r6, r1
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r1, r4, 0
adds r1, 0x80
movs r0, 0x8
strb r0, [r1]
adds r4, 0x81
strb r5, [r4]
2016-01-07 04:23:20 +00:00
b _080068FC
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_0800688C:
2015-10-06 13:46:30 +01:00
lsls r1, r3, 6
2015-10-08 08:21:20 +01:00
ldr r0, =gFont1LatinGlyphs
2015-10-06 13:46:30 +01:00
adds r6, r1, r0
ldr r4, =0x03002f90
2015-10-08 08:21:20 +01:00
ldr r0, =gFont1LatinGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r3, r0
ldrb r1, [r0]
adds r0, r4, 0
adds r0, 0x80
strb r1, [r0]
cmp r1, 0x8
2016-01-07 04:23:20 +00:00
bhi _080068C8
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x20
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
b _080068F4
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_080068C8:
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r1, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x10
adds r1, r4, 0
adds r1, 0x20
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x20
adds r1, r4, 0
adds r1, 0x40
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r0, r6, 0
adds r0, 0x30
adds r1, r4, 0
adds r1, 0x60
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2016-01-07 04:23:20 +00:00
_080068F4:
2015-10-06 13:46:30 +01:00
ldr r0, =0x03002f90
adds r0, 0x81
movs r1, 0xF
strb r1, [r0]
2016-01-07 04:23:20 +00:00
_080068FC:
2015-10-06 13:46:30 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
2015-10-08 08:21:20 +01:00
thumb_func_end DecompressGlyphFont1
2015-10-06 13:46:30 +01:00
2015-10-08 02:24:21 +01:00
thumb_func_start GetGlyphWidthFont1
2016-01-08 07:27:40 +00:00
; u8 GetGlyphWidthFont1(u16 glyphId, bool8 isJapanese)
2015-10-10 11:12:48 +01:00
GetGlyphWidthFont1: ; 8006908
2015-10-06 13:46:30 +01:00
push {lr}
lsls r0, 16
lsrs r2, r0, 16
cmp r1, 0x1
2016-01-07 04:23:20 +00:00
beq _08006920
2015-10-08 08:21:20 +01:00
ldr r0, =gFont1LatinGlyphWidths
2015-10-06 13:46:30 +01:00
adds r0, r2, r0
ldrb r0, [r0]
2016-01-07 04:23:20 +00:00
b _08006922
2015-10-06 13:46:30 +01:00
.pool
2016-01-07 04:23:20 +00:00
_08006920:
2015-10-06 13:46:30 +01:00
movs r0, 0x8
2016-01-07 04:23:20 +00:00
_08006922:
2015-10-06 13:46:30 +01:00
pop {r1}
bx r1
2015-10-08 02:24:21 +01:00
thumb_func_end GetGlyphWidthFont1
2015-10-06 13:46:30 +01:00
2015-10-08 08:21:20 +01:00
thumb_func_start DecompressGlyphFont9
; void DecompressGlyphFont9(u16 glyphId)
2015-10-10 11:12:48 +01:00
DecompressGlyphFont9: ; 8006928
2015-10-06 13:46:30 +01:00
push {r4,r5,lr}
lsls r0, 16
lsrs r4, r0, 20
lsls r4, 9
movs r1, 0xF0
lsls r1, 12
ands r1, r0
lsrs r1, 12
2015-10-08 08:27:41 +01:00
ldr r0, =gFont9JapaneseGlyphs
2015-10-06 13:46:30 +01:00
adds r1, r0
adds r4, r1
ldr r5, =0x03002f90
adds r0, r4, 0
adds r1, r5, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
movs r0, 0x80
lsls r0, 1
adds r4, r0
adds r1, r5, 0
adds r1, 0x40
adds r0, r4, 0
2015-10-08 08:21:20 +01:00
bl DecompressGlyphTile
2015-10-06 13:46:30 +01:00
adds r1, r5, 0
adds r1, 0x80
movs r0, 0x8
strb r0, [r1]
adds r5, 0x81
movs r0, 0xC
strb r0, [r5]
pop {r4,r5}
pop {r0}
bx r0
.pool
2015-10-08 08:21:20 +01:00
thumb_func_end DecompressGlyphFont9