update window, text, and main menu disasm

This commit is contained in:
YamaArashi
2015-11-28 19:28:41 -08:00
parent 03778a4c06
commit fe5e75ac8f
6 changed files with 2506 additions and 2465 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -26,7 +26,7 @@ Main:
bl sound_sources_off bl sound_sources_off
bl ClearDma3Requests bl ClearDma3Requests
bl gpu_init_bgs bl gpu_init_bgs
bl fboxes_set_default_ptr bl SetDefaultFontsPointer
ldr r0, =0x02000000 ldr r0, =0x02000000
movs r1, 0xE0 movs r1, 0xE0
lsls r1, 9 lsls r1, 9

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
thumb_func_start sub_8002BDC thumb_func_start BlitSurface4BitWithoutColorKey
sub_8002BDC: ; 8002BDC ; void BlitSurface4BitWithoutColorKey(struct Surface *src, struct Surface *dest, u16 srcX, u16 srcY, u16 destX, u16 destY, u16 width, u16 height)
BlitSurface4BitWithoutColorKey: ; 8002BDC
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r8 mov r7, r8
push {r7} push {r7}
@@ -26,18 +27,18 @@ sub_8002BDC: ; 8002BDC
str r7, [sp, 0xC] str r7, [sp, 0xC]
movs r4, 0xFF movs r4, 0xFF
str r4, [sp, 0x10] str r4, [sp, 0x10]
bl PixelBlock_CopyRect4Bpp bl BlitSurface4Bit
add sp, 0x14 add sp, 0x14
pop {r3} pop {r3}
mov r8, r3 mov r8, r3
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end sub_8002BDC thumb_func_end BlitSurface4BitWithoutColorKey
thumb_func_start PixelBlock_CopyRect4Bpp thumb_func_start BlitSurface4Bit
; void PixelBlock_CopyRect4Bpp(struct PixelBlock *src_pixels_data, struct PixelBlock *dest_pixels_data, u16 src_x, u16 src_y, u16 dest_x, u16 dest_y, u16 dest_w, u16 dest_h, u8 a9) ; void BlitSurface4Bit(struct Surface *src, struct Surface *dest, u16 srcX, u16 srcY, u16 destX, u16 destY, u16 width, u16 height, u8 colorKey)
PixelBlock_CopyRect4Bpp: ; 8002C20 BlitSurface4Bit: ; 8002C20
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -288,11 +289,11 @@ PixelBlock_CopyRect4Bpp: ; 8002C20
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end PixelBlock_CopyRect4Bpp thumb_func_end BlitSurface4Bit
thumb_func_start PixelBlock_FillRect4Bpp thumb_func_start FillSurfaceRect4Bit
; int PixelBlock_FillRect4Bpp(struct PixelBlock *pixels_data, u16 x, u16 y, u16 w, u16 h, u8 fill_value) ; void FillSurfaceRect4Bit(struct Surface *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue)
PixelBlock_FillRect4Bpp: ; 8002E00 FillSurfaceRect4Bit: ; 8002E00
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -400,11 +401,11 @@ PixelBlock_FillRect4Bpp: ; 8002E00
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end PixelBlock_FillRect4Bpp thumb_func_end FillSurfaceRect4Bit
thumb_func_start PixelBlock_CopyRect4BppTo8Bpp thumb_func_start BlitSurface4BitTo8Bit
; void PixelBlock_CopyRect4BppTo8Bpp(struct PixelBlock *src_pixels_data, struct PixelBlock *dest_pixels_data, u16 src_x, u16 src_y, u16 dest_x, u16 dest_y, u16 dest_w, u16 dest_h, int a9, int a10) ; void BlitSurface4BitTo8Bit(struct Surface *src, struct Surface *dest, u16 srcX, u16 srcY, u16 destX, u16 destY, u16 width, u16 height, u8 colorKey, u8 paletteOffset)
PixelBlock_CopyRect4BppTo8Bpp: ; 8002EC8 BlitSurface4BitTo8Bit: ; 8002EC8
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -717,11 +718,11 @@ PixelBlock_CopyRect4BppTo8Bpp: ; 8002EC8
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end PixelBlock_CopyRect4BppTo8Bpp thumb_func_end BlitSurface4BitTo8Bit
thumb_func_start PixelBlock_FillRect8Bpp thumb_func_start FillSurfaceRect8Bit
; void PixelBlock_FillRect8Bpp(struct PixelBlock *pixels_data, u16 x, u16 y, u16 w, u16 h, char fill_value) ; void FillSurfaceRect8Bit(struct Surface *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue)
PixelBlock_FillRect8Bpp: ; 8003118 FillSurfaceRect8Bit: ; 8003118
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -810,4 +811,4 @@ PixelBlock_FillRect8Bpp: ; 8003118
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end PixelBlock_FillRect8Bpp thumb_func_end FillSurfaceRect8Bit

View File

@@ -1,15 +1,15 @@
thumb_func_start fboxes_set_ptr thumb_func_start SetFontsPointer
; void fboxes_set_ptr(struct fbox *ptr) ; void SetFontsPointer(struct FontInfo *fonts)
fboxes_set_ptr: ; 80045A4 SetFontsPointer: ; 80045A4
ldr r1, =0x03002f80 ldr r1, =0x03002f80
str r0, [r1] str r0, [r1]
bx lr bx lr
.pool .pool
thumb_func_end fboxes_set_ptr thumb_func_end SetFontsPointer
thumb_func_start TextBox_ResetSomeField thumb_func_start DeactivateAllTextPrinters
; void TextBox_ResetSomeField() ; void DeactivateAllTextPrinters()
TextBox_ResetSomeField: ; 80045B0 DeactivateAllTextPrinters: ; 80045B0
push {lr} push {lr}
ldr r1, =0x020201b0 ldr r1, =0x020201b0
movs r2, 0 movs r2, 0
@@ -23,10 +23,10 @@ TextBox_ResetSomeField: ; 80045B0
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end TextBox_ResetSomeField thumb_func_end DeactivateAllTextPrinters
thumb_func_start Print thumb_func_start Print
; int Print(u8 windowId, u8 fontId, int char_cursor, char x, char y, u8 a6, int a7) ; u16 Print(u8 windowId, u8 fontId, u8 *str, u8 x, u8 y, u8 speed, void ( *callback)(u16, struct TextPrinter *))
Print: ; 80045D0 Print: ; 80045D0
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r8 mov r7, r8
@@ -102,7 +102,7 @@ Print: ; 80045D0
mov r0, sp mov r0, sp
mov r1, r8 mov r1, r8
adds r2, r7, 0 adds r2, r7, 0
bl remo_copy bl AddTextPrinter
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
add sp, 0x10 add sp, 0x10
@@ -114,9 +114,9 @@ Print: ; 80045D0
.pool .pool
thumb_func_end Print thumb_func_end Print
thumb_func_start remo_copy thumb_func_start AddTextPrinter
; int remo_copy(struct TextBox *x, u8 text_speed, int a3) ; u16 AddTextPrinter(struct TextPrinter *textPrinter, u8 speed, void ( *callback)(u16, struct TextPrinter *))
remo_copy: ; 800467C AddTextPrinter: ; 800467C
push {r4-r7,lr} push {r4-r7,lr}
adds r6, r0, 0 adds r6, r0, 0
mov r12, r2 mov r12, r2
@@ -167,7 +167,7 @@ remo_copy: ; 800467C
lsls r1, r2, 28 lsls r1, r2, 28
lsrs r1, 28 lsrs r1, 28
lsrs r2, 4 lsrs r2, 4
bl GenerateFontHalfRowLut bl GenerateFontHalfRowLookupTable
cmp r5, 0xFF cmp r5, 0xFF
beq @08004718 beq @08004718
cmp r5, 0 cmp r5, 0
@@ -206,7 +206,7 @@ remo_copy: ; 800467C
cmp r4, r7 cmp r4, r7
bhi @08004740 bhi @08004740
ldr r0, =0x0202018c ldr r0, =0x0202018c
bl fbox_exec bl RenderFont
cmp r0, 0x1 cmp r0, 0x1
bne @0800472C bne @0800472C
@08004740: @08004740:
@@ -215,7 +215,7 @@ remo_copy: ; 800467C
ldr r0, =0x0202018c ldr r0, =0x0202018c
ldrb r0, [r0, 0x4] ldrb r0, [r0, 0x4]
movs r1, 0x2 movs r1, 0x2
bl Window_CopyToVram bl CopyWindowToVram
@0800474E: @0800474E:
ldr r2, =0x020201b0 ldr r2, =0x020201b0
ldrb r1, [r6, 0x4] ldrb r1, [r6, 0x4]
@@ -235,11 +235,11 @@ remo_copy: ; 800467C
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end remo_copy thumb_func_end AddTextPrinter
thumb_func_start run_remoboxes thumb_func_start RunTextPrinters
; void run_remoboxes() ; void RunTextPrinters()
run_remoboxes: ; 8004778 RunTextPrinters: ; 8004778
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r8 mov r7, r8
push {r7} push {r7}
@@ -257,7 +257,7 @@ run_remoboxes: ; 8004778
cmp r0, 0 cmp r0, 0
beq @080047E8 beq @080047E8
mov r0, r8 mov r0, r8
bl fbox_exec bl RenderFont
lsls r0, 16 lsls r0, 16
lsrs r4, r0, 16 lsrs r4, r0, 16
cmp r4, 0x1 cmp r4, 0x1
@@ -275,7 +275,7 @@ run_remoboxes: ; 8004778
@080047BE: @080047BE:
ldrb r0, [r5] ldrb r0, [r5]
movs r1, 0x2 movs r1, 0x2
bl Window_CopyToVram bl CopyWindowToVram
@080047C6: @080047C6:
ldr r1, =0x020201b0 ldr r1, =0x020201b0
adds r0, r1, 0 adds r0, r1, 0
@@ -306,10 +306,11 @@ run_remoboxes: ; 8004778
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end run_remoboxes thumb_func_end RunTextPrinters
thumb_func_start a_pressed_maybe thumb_func_start IsTextPrinterActive
a_pressed_maybe: ; 8004800 ; BOOL IsTextPrinterActive(u8 id)
IsTextPrinterActive: ; 8004800
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
ldr r2, =0x020201b0 ldr r2, =0x020201b0
@@ -320,11 +321,11 @@ a_pressed_maybe: ; 8004800
ldrb r0, [r1, 0x1B] ldrb r0, [r1, 0x1B]
bx lr bx lr
.pool .pool
thumb_func_end a_pressed_maybe thumb_func_end IsTextPrinterActive
thumb_func_start fbox_exec thumb_func_start RenderFont
; int fbox_exec(struct TextBox *x) ; u16 RenderFont(struct TextPrinter *textPrinter)
fbox_exec: ; 8004818 RenderFont: ; 8004818
push {r4,lr} push {r4,lr}
adds r4, r0, 0 adds r4, r0, 0
@0800481C: @0800481C:
@@ -346,10 +347,11 @@ fbox_exec: ; 8004818
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end fbox_exec thumb_func_end RenderFont
thumb_func_start GenerateFontHalfRowLut thumb_func_start GenerateFontHalfRowLookupTable
GenerateFontHalfRowLut: ; 8004844 ; void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor)
GenerateFontHalfRowLookupTable: ; 8004844
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -805,10 +807,11 @@ GenerateFontHalfRowLut: ; 8004844
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end GenerateFontHalfRowLut thumb_func_end GenerateFontHalfRowLookupTable
thumb_func_start save_remo_colors thumb_func_start SaveTextColors
save_remo_colors: ; 8004BE0 ; void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor)
SaveTextColors: ; 8004BE0
ldr r3, =0x030009ea ldr r3, =0x030009ea
ldrh r3, [r3] ldrh r3, [r3]
strb r3, [r1] strb r3, [r1]
@@ -820,18 +823,19 @@ save_remo_colors: ; 8004BE0
strb r0, [r2] strb r0, [r2]
bx lr bx lr
.pool .pool
thumb_func_end save_remo_colors thumb_func_end SaveTextColors
thumb_func_start restore_remo_colors thumb_func_start RestoreTextColors
restore_remo_colors: ; 8004C00 ; void RestoreTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor)
RestoreTextColors: ; 8004C00
push {lr} push {lr}
ldrb r0, [r0] ldrb r0, [r0]
ldrb r1, [r1] ldrb r1, [r1]
ldrb r2, [r2] ldrb r2, [r2]
bl GenerateFontHalfRowLut bl GenerateFontHalfRowLookupTable
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end restore_remo_colors thumb_func_end RestoreTextColors
thumb_func_start DecompressGlyphTile thumb_func_start DecompressGlyphTile
; void DecompressGlyphTile(u16 *src, u32 *dest) ; void DecompressGlyphTile(u16 *src, u32 *dest)
@@ -998,8 +1002,9 @@ DecompressGlyphTile: ; 8004C10
.pool .pool
thumb_func_end DecompressGlyphTile thumb_func_end DecompressGlyphTile
thumb_func_start sub_8004D58 thumb_func_start GetLastTextColor
sub_8004D58: ; 8004D58 ; u8 GetLastTextColor(u8 colorType)
GetLastTextColor: ; 8004D58
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@@ -1035,10 +1040,10 @@ sub_8004D58: ; 8004D58
@08004D9A: @08004D9A:
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end sub_8004D58 thumb_func_end GetLastTextColor
thumb_func_start CopyGlyphToWindow thumb_func_start CopyGlyphToWindow
; int CopyGlyphToWindow(struct TextBox *x) ; int CopyGlyphToWindow(struct TextPrinter *x)
CopyGlyphToWindow: ; 8004DA0 CopyGlyphToWindow: ; 8004DA0
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
@@ -1740,9 +1745,9 @@ CopyGlyphToWindow: ; 8004DA0
.pool .pool
thumb_func_end CopyGlyphToWindow thumb_func_end CopyGlyphToWindow
thumb_func_start Text_ClearHorizontalSpan thumb_func_start ClearTextSpan
; void Text_ClearHorizontalSpan(TextBox *textBox, int width) ; void ClearTextSpan(TextPrinter *textPrinter, u32 width)
Text_ClearHorizontalSpan: ; 80052C8 ClearTextSpan: ; 80052C8
push {r4-r6,lr} push {r4-r6,lr}
sub sp, 0x10 sub sp, 0x10
adds r4, r0, 0 adds r4, r0, 0
@@ -1784,17 +1789,17 @@ Text_ClearHorizontalSpan: ; 80052C8
lsrs r0, 24 lsrs r0, 24
str r0, [sp, 0x4] str r0, [sp, 0x4]
add r0, sp, 0x8 add r0, sp, 0x8
bl PixelBlock_FillRect4Bpp bl FillSurfaceRect4Bit
@0800531E: @0800531E:
add sp, 0x10 add sp, 0x10
pop {r4-r6} pop {r4-r6}
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Text_ClearHorizontalSpan thumb_func_end ClearTextSpan
thumb_func_start Font0Func thumb_func_start Font0Func
; int Font0Func(struct TextBox *x) ; int Font0Func(struct TextPrinter *x)
Font0Func: ; 800533C Font0Func: ; 800533C
push {lr} push {lr}
adds r2, r0, 0 adds r2, r0, 0
@@ -1816,7 +1821,7 @@ Font0Func: ; 800533C
strb r0, [r3, 0x1] strb r0, [r3, 0x1]
@08005360: @08005360:
adds r0, r2, 0 adds r0, r2, 0
bl font_render_b bl RenderText
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
pop {r1} pop {r1}
@@ -1824,7 +1829,7 @@ Font0Func: ; 800533C
thumb_func_end Font0Func thumb_func_end Font0Func
thumb_func_start Font1Func thumb_func_start Font1Func
; int Font1Func(struct TextBox *x) ; int Font1Func(struct TextPrinter *x)
Font1Func: ; 8005370 Font1Func: ; 8005370
push {lr} push {lr}
adds r2, r0, 0 adds r2, r0, 0
@@ -1848,7 +1853,7 @@ Font1Func: ; 8005370
strb r0, [r3, 0x1] strb r0, [r3, 0x1]
@08005398: @08005398:
adds r0, r2, 0 adds r0, r2, 0
bl font_render_b bl RenderText
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
pop {r1} pop {r1}
@@ -1856,7 +1861,7 @@ Font1Func: ; 8005370
thumb_func_end Font1Func thumb_func_end Font1Func
thumb_func_start Font2Func thumb_func_start Font2Func
; int Font2Func(struct TextBox *x) ; int Font2Func(struct TextPrinter *x)
Font2Func: ; 80053A8 Font2Func: ; 80053A8
push {lr} push {lr}
adds r2, r0, 0 adds r2, r0, 0
@@ -1880,7 +1885,7 @@ Font2Func: ; 80053A8
strb r0, [r3, 0x1] strb r0, [r3, 0x1]
@080053D0: @080053D0:
adds r0, r2, 0 adds r0, r2, 0
bl font_render_b bl RenderText
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
pop {r1} pop {r1}
@@ -1888,7 +1893,7 @@ Font2Func: ; 80053A8
thumb_func_end Font2Func thumb_func_end Font2Func
thumb_func_start Font3Func thumb_func_start Font3Func
; int Font3Func(struct TextBox *x) ; int Font3Func(struct TextPrinter *x)
Font3Func: ; 80053E0 Font3Func: ; 80053E0
push {lr} push {lr}
adds r2, r0, 0 adds r2, r0, 0
@@ -1912,7 +1917,7 @@ Font3Func: ; 80053E0
strb r0, [r3, 0x1] strb r0, [r3, 0x1]
@08005408: @08005408:
adds r0, r2, 0 adds r0, r2, 0
bl font_render_b bl RenderText
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
pop {r1} pop {r1}
@@ -1920,7 +1925,7 @@ Font3Func: ; 80053E0
thumb_func_end Font3Func thumb_func_end Font3Func
thumb_func_start Font4Func thumb_func_start Font4Func
; int Font4Func(struct TextBox *x) ; int Font4Func(struct TextPrinter *x)
Font4Func: ; 8005418 Font4Func: ; 8005418
push {lr} push {lr}
adds r2, r0, 0 adds r2, r0, 0
@@ -1944,7 +1949,7 @@ Font4Func: ; 8005418
strb r0, [r3, 0x1] strb r0, [r3, 0x1]
@08005440: @08005440:
adds r0, r2, 0 adds r0, r2, 0
bl font_render_b bl RenderText
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
pop {r1} pop {r1}
@@ -1952,7 +1957,7 @@ Font4Func: ; 8005418
thumb_func_end Font4Func thumb_func_end Font4Func
thumb_func_start Font5Func thumb_func_start Font5Func
; int Font5Func(struct TextBox *x) ; int Font5Func(struct TextPrinter *x)
Font5Func: ; 8005450 Font5Func: ; 8005450
push {lr} push {lr}
adds r2, r0, 0 adds r2, r0, 0
@@ -1976,7 +1981,7 @@ Font5Func: ; 8005450
strb r0, [r3, 0x1] strb r0, [r3, 0x1]
@08005478: @08005478:
adds r0, r2, 0 adds r0, r2, 0
bl font_render_b bl RenderText
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
pop {r1} pop {r1}
@@ -1984,7 +1989,7 @@ Font5Func: ; 8005450
thumb_func_end Font5Func thumb_func_end Font5Func
thumb_func_start Font7Func thumb_func_start Font7Func
; int Font7Func(struct TextBox *x) ; int Font7Func(struct TextPrinter *x)
Font7Func: ; 8005488 Font7Func: ; 8005488
push {lr} push {lr}
adds r2, r0, 0 adds r2, r0, 0
@@ -2008,7 +2013,7 @@ Font7Func: ; 8005488
strb r0, [r3, 0x1] strb r0, [r3, 0x1]
@080054B0: @080054B0:
adds r0, r2, 0 adds r0, r2, 0
bl font_render_b bl RenderText
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
pop {r1} pop {r1}
@@ -2016,7 +2021,7 @@ Font7Func: ; 8005488
thumb_func_end Font7Func thumb_func_end Font7Func
thumb_func_start Font8Func thumb_func_start Font8Func
; int Font8Func(struct TextBox *x) ; int Font8Func(struct TextPrinter *x)
Font8Func: ; 80054C0 Font8Func: ; 80054C0
push {lr} push {lr}
adds r2, r0, 0 adds r2, r0, 0
@@ -2040,16 +2045,16 @@ Font8Func: ; 80054C0
strb r0, [r3, 0x1] strb r0, [r3, 0x1]
@080054E8: @080054E8:
adds r0, r2, 0 adds r0, r2, 0
bl font_render_b bl RenderText
lsls r0, 16 lsls r0, 16
lsrs r0, 16 lsrs r0, 16
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end Font8Func thumb_func_end Font8Func
thumb_func_start sub_80054F8 thumb_func_start TextPrinterInitDownArrowCounters
; void sub_80054F8(TextBox *textBox) ; void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter)
sub_80054F8: ; 80054F8 TextPrinterInitDownArrowCounters: ; 80054F8
push {lr} push {lr}
adds r2, r0, 0 adds r2, r0, 0
adds r2, 0x14 adds r2, 0x14
@@ -2075,11 +2080,11 @@ sub_80054F8: ; 80054F8
@08005524: @08005524:
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end sub_80054F8 thumb_func_end TextPrinterInitDownArrowCounters
thumb_func_start remo_draw_bouncing_down_arrow thumb_func_start TextPrinterDrawDownArrow
; int remo_draw_bouncing_down_arrow(TextBox *x) ; void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter)
remo_draw_bouncing_down_arrow: ; 8005528 TextPrinterDrawDownArrow: ; 8005528
push {r4-r7,lr} push {r4-r7,lr}
sub sp, 0x18 sub sp, 0x18
adds r5, r0, 0 adds r5, r0, 0
@@ -2119,7 +2124,7 @@ remo_draw_bouncing_down_arrow: ; 8005528
str r4, [sp] str r4, [sp]
movs r4, 0x10 movs r4, 0x10
str r4, [sp, 0x4] str r4, [sp, 0x4]
bl Window_FillPixelRect bl FillWindowPixelRect
ldr r0, [r7] ldr r0, [r7]
lsls r0, 30 lsls r0, 30
lsrs r0, 31 lsrs r0, 31
@@ -2153,10 +2158,10 @@ remo_draw_bouncing_down_arrow: ; 8005528
str r2, [sp, 0x14] str r2, [sp, 0x14]
adds r1, r7, 0 adds r1, r7, 0
movs r2, 0 movs r2, 0
bl Window_CopyPixelRectToWindow bl BlitSurfaceRectToWindow
ldrb r0, [r5, 0x4] ldrb r0, [r5, 0x4]
movs r1, 0x2 movs r1, 0x2
bl Window_CopyToVram bl CopyWindowToVram
ldrb r0, [r6, 0x1] ldrb r0, [r6, 0x1]
movs r1, 0x20 movs r1, 0x20
negs r1, r1 negs r1, r1
@@ -2183,11 +2188,11 @@ remo_draw_bouncing_down_arrow: ; 8005528
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end remo_draw_bouncing_down_arrow thumb_func_end TextPrinterDrawDownArrow
thumb_func_start remo_clear_down_arrow thumb_func_start TextPrinterClearDownArrow
; int remo_clear_down_arrow(TextBox *x) ; void TextPrinterClearDownArrow(struct TextPrinter *textPrinter)
remo_clear_down_arrow: ; 8005600 TextPrinterClearDownArrow: ; 8005600
push {r4,r5,lr} push {r4,r5,lr}
sub sp, 0x8 sub sp, 0x8
adds r5, r0, 0 adds r5, r0, 0
@@ -2203,19 +2208,19 @@ remo_clear_down_arrow: ; 8005600
str r4, [sp] str r4, [sp]
movs r4, 0x10 movs r4, 0x10
str r4, [sp, 0x4] str r4, [sp, 0x4]
bl Window_FillPixelRect bl FillWindowPixelRect
ldrb r0, [r5, 0x4] ldrb r0, [r5, 0x4]
movs r1, 0x2 movs r1, 0x2
bl Window_CopyToVram bl CopyWindowToVram
add sp, 0x8 add sp, 0x8
pop {r4,r5} pop {r4,r5}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end remo_clear_down_arrow thumb_func_end TextPrinterClearDownArrow
thumb_func_start remo_is_it_time_to_continue_autopilot thumb_func_start TextPrinterWaitAutoMode
; int remo_is_it_time_to_continue_autopilot(struct TextBox *x) ; BOOL TextPrinterWaitAutoMode(struct TextPrinter *textPrinter)
remo_is_it_time_to_continue_autopilot: ; 8005634 TextPrinterWaitAutoMode: ; 8005634
push {lr} push {lr}
adds r1, r0, 0 adds r1, r0, 0
adds r1, 0x14 adds r1, 0x14
@@ -2231,10 +2236,11 @@ remo_is_it_time_to_continue_autopilot: ; 8005634
@0800564A: @0800564A:
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end remo_is_it_time_to_continue_autopilot thumb_func_end TextPrinterWaitAutoMode
thumb_func_start remo_is_it_time_to_continue_plus_down_arrow thumb_func_start TextPrinterWaitWithDownArrow
remo_is_it_time_to_continue_plus_down_arrow: ; 8005650 ; BOOL TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter)
TextPrinterWaitWithDownArrow: ; 8005650
push {r4,lr} push {r4,lr}
adds r2, r0, 0 adds r2, r0, 0
movs r4, 0 movs r4, 0
@@ -2245,14 +2251,14 @@ remo_is_it_time_to_continue_plus_down_arrow: ; 8005650
cmp r0, 0 cmp r0, 0
beq @08005674 beq @08005674
adds r0, r2, 0 adds r0, r2, 0
bl remo_is_it_time_to_continue_autopilot bl TextPrinterWaitAutoMode
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
b @0800568E b @0800568E
.pool .pool
@08005674: @08005674:
adds r0, r2, 0 adds r0, r2, 0
bl remo_draw_bouncing_down_arrow bl TextPrinterDrawDownArrow
ldr r0, =0x030022c0 ldr r0, =0x030022c0
ldrh r1, [r0, 0x2E] ldrh r1, [r0, 0x2E]
movs r0, 0x3 movs r0, 0x3
@@ -2268,10 +2274,11 @@ remo_is_it_time_to_continue_plus_down_arrow: ; 8005650
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end remo_is_it_time_to_continue_plus_down_arrow thumb_func_end TextPrinterWaitWithDownArrow
thumb_func_start remo_is_it_time_to_continue thumb_func_start TextPrinterWait
remo_is_it_time_to_continue: ; 800569C ; BOOL TextPrinterWait(struct TextPrinter *textPrinter)
TextPrinterWait: ; 800569C
push {r4,lr} push {r4,lr}
adds r2, r0, 0 adds r2, r0, 0
movs r4, 0 movs r4, 0
@@ -2282,7 +2289,7 @@ remo_is_it_time_to_continue: ; 800569C
cmp r0, 0 cmp r0, 0
beq @080056C0 beq @080056C0
adds r0, r2, 0 adds r0, r2, 0
bl remo_is_it_time_to_continue_autopilot bl TextPrinterWaitAutoMode
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
b @080056D4 b @080056D4
@@ -2303,10 +2310,11 @@ remo_is_it_time_to_continue: ; 800569C
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end remo_is_it_time_to_continue thumb_func_end TextPrinterWait
thumb_func_start draw_bouncing_down_arrow_2 thumb_func_start DrawDownArrow
draw_bouncing_down_arrow_2: ; 80056E0 ; void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, BOOL drawArrow, u8 *counter, u8 *yCoordIndex)
DrawDownArrow: ; 80056E0
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -2348,7 +2356,7 @@ draw_bouncing_down_arrow_2: ; 80056E0
adds r0, r5, 0 adds r0, r5, 0
mov r2, r8 mov r2, r8
adds r3, r7, 0 adds r3, r7, 0
bl Window_FillPixelRect bl FillWindowPixelRect
cmp r4, 0 cmp r4, 0
bne @0800579A bne @0800579A
ldr r0, =0x03003014 ldr r0, =0x03003014
@@ -2388,10 +2396,10 @@ draw_bouncing_down_arrow_2: ; 80056E0
adds r0, r5, 0 adds r0, r5, 0
adds r1, r6, 0 adds r1, r6, 0
movs r2, 0 movs r2, 0
bl Window_CopyPixelRectToWindow bl BlitSurfaceRectToWindow
adds r0, r5, 0 adds r0, r5, 0
movs r1, 0x2 movs r1, 0x2
bl Window_CopyToVram bl CopyWindowToVram
mov r1, r9 mov r1, r9
strb r4, [r1] strb r4, [r1]
mov r5, r10 mov r5, r10
@@ -2408,11 +2416,11 @@ draw_bouncing_down_arrow_2: ; 80056E0
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end draw_bouncing_down_arrow_2 thumb_func_end DrawDownArrow
thumb_func_start font_render_b thumb_func_start RenderText
; int font_render_b(struct TextBox *x) ; u16 RenderText(struct TextPrinter *textPrinter)
font_render_b: ; 80057B4 RenderText: ; 80057B4
push {r4-r6,lr} push {r4-r6,lr}
adds r6, r0, 0 adds r6, r0, 0
adds r4, r6, 0 adds r4, r6, 0
@@ -2681,7 +2689,7 @@ font_render_b: ; 80057B4
lsls r2, 24 lsls r2, 24
lsrs r2, 28 lsrs r2, 28
@08005A06: @08005A06:
bl GenerateFontHalfRowLut bl GenerateFontHalfRowLookupTable
@08005A0A: @08005A0A:
movs r0, 0x2 movs r0, 0x2
b @08005D6E b @08005D6E
@@ -2773,7 +2781,7 @@ font_render_b: ; 80057B4
lsrs r1, r2, 4 lsrs r1, r2, 4
orrs r1, r2 orrs r1, r2
lsrs r1, 24 lsrs r1, 24
bl Window_FastFillPixels bl FillWindowPixelBuffer
ldrb r0, [r6, 0x6] ldrb r0, [r6, 0x6]
strb r0, [r6, 0x8] strb r0, [r6, 0x8]
ldrb r0, [r6, 0x7] ldrb r0, [r6, 0x7]
@@ -2799,7 +2807,7 @@ font_render_b: ; 80057B4
ble @08005A0A ble @08005A0A
adds r0, r6, 0 adds r0, r6, 0
adds r1, r4, 0 adds r1, r4, 0
bl Text_ClearHorizontalSpan bl ClearTextSpan
ldrb r0, [r6, 0x8] ldrb r0, [r6, 0x8]
adds r0, r4 adds r0, r4
b @08005C6E b @08005C6E
@@ -2829,7 +2837,7 @@ font_render_b: ; 80057B4
@08005B18: @08005B18:
adds r0, r6, 0 adds r0, r6, 0
adds r1, r4, 0 adds r1, r4, 0
bl Text_ClearHorizontalSpan bl ClearTextSpan
ldrb r0, [r6, 0x8] ldrb r0, [r6, 0x8]
adds r0, r4 adds r0, r4
b @08005C6E b @08005C6E
@@ -2863,7 +2871,7 @@ font_render_b: ; 80057B4
@08005B4E: @08005B4E:
strb r0, [r6, 0x1C] strb r0, [r6, 0x1C]
adds r0, r6, 0 adds r0, r6, 0
bl sub_80054F8 bl TextPrinterInitDownArrowCounters
@08005B56: @08005B56:
movs r0, 0x3 movs r0, 0x3
b @08005D6E b @08005D6E
@@ -2886,7 +2894,7 @@ font_render_b: ; 80057B4
adds r1, r3, 0 adds r1, r3, 0
ldrb r2, [r6, 0x8] ldrb r2, [r6, 0x8]
ldrb r3, [r6, 0x9] ldrb r3, [r6, 0x9]
bl TextBox_DrawKeypadIcon bl DrawKeypadIcon
ldr r1, =0x03002f90 ldr r1, =0x03002f90
adds r1, 0x80 adds r1, 0x80
strb r0, [r1] strb r0, [r1]
@@ -2972,7 +2980,7 @@ font_render_b: ; 80057B4
ble @08005C70 ble @08005C70
adds r0, r6, 0 adds r0, r6, 0
adds r1, r4, 0 adds r1, r4, 0
bl Text_ClearHorizontalSpan bl ClearTextSpan
ldrb r0, [r6, 0x8] ldrb r0, [r6, 0x8]
adds r0, r4 adds r0, r4
b @08005C6E b @08005C6E
@@ -3007,7 +3015,7 @@ font_render_b: ; 80057B4
.pool .pool
@08005C78: @08005C78:
adds r0, r6, 0 adds r0, r6, 0
bl remo_is_it_time_to_continue bl TextPrinterWait
lsls r0, 16 lsls r0, 16
cmp r0, 0 cmp r0, 0
bne @08005C86 bne @08005C86
@@ -3018,7 +3026,7 @@ font_render_b: ; 80057B4
b @08005B56 b @08005B56
@08005C8C: @08005C8C:
adds r0, r6, 0 adds r0, r6, 0
bl remo_is_it_time_to_continue_plus_down_arrow bl TextPrinterWaitWithDownArrow
lsls r0, 16 lsls r0, 16
cmp r0, 0 cmp r0, 0
bne @08005C9A bne @08005C9A
@@ -3030,7 +3038,7 @@ font_render_b: ; 80057B4
lsrs r1, r2, 4 lsrs r1, r2, 4
orrs r1, r2 orrs r1, r2
lsrs r1, 24 lsrs r1, 24
bl Window_FastFillPixels bl FillWindowPixelBuffer
ldrb r0, [r6, 0x6] ldrb r0, [r6, 0x6]
movs r1, 0 movs r1, 0
strb r0, [r6, 0x8] strb r0, [r6, 0x8]
@@ -3040,14 +3048,14 @@ font_render_b: ; 80057B4
b @08005B56 b @08005B56
@08005CB8: @08005CB8:
adds r0, r6, 0 adds r0, r6, 0
bl remo_is_it_time_to_continue_plus_down_arrow bl TextPrinterWaitWithDownArrow
lsls r0, 16 lsls r0, 16
cmp r0, 0 cmp r0, 0
bne @08005CC6 bne @08005CC6
b @08005B56 b @08005B56
@08005CC6: @08005CC6:
adds r0, r6, 0 adds r0, r6, 0
bl remo_clear_down_arrow bl TextPrinterClearDownArrow
ldrb r1, [r6, 0x5] ldrb r1, [r6, 0x5]
ldr r0, =0x03002f80 ldr r0, =0x03002f80
ldr r2, [r0] ldr r2, [r0]
@@ -3083,7 +3091,7 @@ font_render_b: ; 80057B4
orrs r3, r1 orrs r3, r1
lsrs r3, 24 lsrs r3, 24
movs r1, 0 movs r1, 0
bl Window_ScrollVertically bl ScrollWindow
movs r0, 0 movs r0, 0
b @08005D38 b @08005D38
.pool .pool
@@ -3096,14 +3104,14 @@ font_render_b: ; 80057B4
lsrs r3, 24 lsrs r3, 24
movs r1, 0 movs r1, 0
adds r2, r4, 0 adds r2, r4, 0
bl Window_ScrollVertically bl ScrollWindow
ldrb r0, [r6, 0x1F] ldrb r0, [r6, 0x1F]
subs r0, r4 subs r0, r4
@08005D38: @08005D38:
strb r0, [r6, 0x1F] strb r0, [r6, 0x1F]
ldrb r0, [r6, 0x4] ldrb r0, [r6, 0x4]
movs r1, 0x2 movs r1, 0x2
bl Window_CopyToVram bl CopyWindowToVram
b @08005B56 b @08005B56
@08005D44: @08005D44:
strb r0, [r6, 0x1C] strb r0, [r6, 0x1C]
@@ -3135,10 +3143,11 @@ font_render_b: ; 80057B4
pop {r4-r6} pop {r4-r6}
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end font_render_b thumb_func_end RenderText
thumb_func_start sub_8005D74 thumb_func_start GetStringWidthFixedWidthFont
sub_8005D74: ; 8005D74 ; u32 GetStringWidthFixedWidthFont(u8 *str, u8 fontId, u8 letterSpacing)
GetStringWidthFixedWidthFont: ; 8005D74
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r8 mov r7, r8
push {r7} push {r7}
@@ -3262,7 +3271,7 @@ sub_8005D74: ; 8005D74
ble @08005E78 ble @08005E78
adds r0, r7, 0 adds r0, r7, 0
movs r1, 0 movs r1, 0
bl fbox_get_field bl GetFontAttribute
add r0, r8 add r0, r8
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@@ -3273,9 +3282,10 @@ sub_8005D74: ; 8005D74
pop {r4-r7} pop {r4-r7}
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end sub_8005D74 thumb_func_end GetStringWidthFixedWidthFont
thumb_func_start GetFontWidthFunc thumb_func_start GetFontWidthFunc
; u8 GetFontWidthFunc(u16 glyphId)
GetFontWidthFunc: ; 8005EA8 GetFontWidthFunc: ; 8005EA8
push {r4,lr} push {r4,lr}
lsls r0, 24 lsls r0, 24
@@ -3304,9 +3314,9 @@ GetFontWidthFunc: ; 8005EA8
bx r1 bx r1
thumb_func_end GetFontWidthFunc thumb_func_end GetFontWidthFunc
thumb_func_start font_get_width_of_string thumb_func_start GetStringWidth
; unsigned int font_get_width_of_string(u8 a1, u8 *s, u16 a3) ; u32 GetStringWidth(u8 fontId, u8 *str, u16 letterSpacing)
font_get_width_of_string: ; 8005ED8 GetStringWidth: ; 8005ED8
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -3340,7 +3350,7 @@ font_get_width_of_string: ; 8005ED8
bne @08005F24 bne @08005F24
adds r0, r6, 0 adds r0, r6, 0
movs r1, 0x2 movs r1, 0x2
bl fbox_get_field bl GetFontAttribute
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
mov r10, r0 mov r10, r0
@@ -3508,7 +3518,7 @@ font_get_width_of_string: ; 8005ED8
bne @0800611C bne @0800611C
ldrb r0, [r4] ldrb r0, [r4]
movs r1, 0x2 movs r1, 0x2
bl fbox_get_field bl GetFontAttribute
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
mov r10, r0 mov r10, r0
@@ -3558,7 +3568,7 @@ font_get_width_of_string: ; 8005ED8
@080060D6: @080060D6:
adds r4, 0x1 adds r4, 0x1
ldrb r0, [r4] ldrb r0, [r4]
bl Font_ReturnsValueFromLUT bl GetKeypadIconWidth
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@080060E2: @080060E2:
@@ -3615,11 +3625,11 @@ font_get_width_of_string: ; 8005ED8
pop {r4-r7} pop {r4-r7}
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end font_get_width_of_string thumb_func_end GetStringWidth
thumb_func_start font_render_some thumb_func_start RenderTextFont9
; int font_render_some(char *pixels, u8 font, int a3) ; u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)
font_render_some: ; 8006140 RenderTextFont9: ; 8006140
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -3638,7 +3648,7 @@ font_render_some: ; 8006140
mov r0, sp mov r0, sp
adds r1, r4, 0 adds r1, r4, 0
adds r2, r5, 0 adds r2, r5, 0
bl save_remo_colors bl SaveTextColors
movs r0, 0x1 movs r0, 0x1
str r0, [sp, 0x8] str r0, [sp, 0x8]
movs r0, 0 movs r0, 0
@@ -3648,7 +3658,7 @@ font_render_some: ; 8006140
movs r0, 0x1 movs r0, 0x1
movs r1, 0 movs r1, 0
movs r2, 0x3 movs r2, 0x3
bl GenerateFontHalfRowLut bl GenerateFontHalfRowLookupTable
adds r7, r6, 0 adds r7, r6, 0
movs r6, 0 movs r6, 0
@08006182: @08006182:
@@ -3744,7 +3754,7 @@ font_render_some: ; 8006140
@08006266: @08006266:
ldr r1, [sp, 0xC] ldr r1, [sp, 0xC]
mov r2, r10 mov r2, r10
bl GenerateFontHalfRowLut bl GenerateFontHalfRowLookupTable
b @080062B8 b @080062B8
@08006270: @08006270:
adds r0, r7, r6 adds r0, r7, r6
@@ -3795,7 +3805,7 @@ font_render_some: ; 8006140
adds r1, 0x1 adds r1, 0x1
mov r2, sp mov r2, sp
adds r2, 0x2 adds r2, 0x2
bl restore_remo_colors bl RestoreTextColors
movs r0, 0x1 movs r0, 0x1
add sp, 0x10 add sp, 0x10
pop {r3-r5} pop {r3-r5}
@@ -3806,10 +3816,11 @@ font_render_some: ; 8006140
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end font_render_some thumb_func_end RenderTextFont9
thumb_func_start TextBox_DrawKeypadIcon thumb_func_start DrawKeypadIcon
TextBox_DrawKeypadIcon: ; 80062E8 ; u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y)
DrawKeypadIcon: ; 80062E8
push {r4,r5,lr} push {r4,r5,lr}
sub sp, 0x18 sub sp, 0x18
lsls r0, 24 lsls r0, 24
@@ -3838,17 +3849,18 @@ TextBox_DrawKeypadIcon: ; 80062E8
adds r1, r5, 0 adds r1, r5, 0
movs r2, 0 movs r2, 0
movs r3, 0 movs r3, 0
bl Window_CopyPixelRectToWindow bl BlitSurfaceRectToWindow
adds r0, r4, 0 adds r0, r4, 0
add sp, 0x18 add sp, 0x18
pop {r4,r5} pop {r4,r5}
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end TextBox_DrawKeypadIcon thumb_func_end DrawKeypadIcon
thumb_func_start sub_8006338 thumb_func_start GetKeypadIconTileOffset
sub_8006338: ; 8006338 ; u8 GetKeypadIconTileOffset(u8 keypadIconId)
GetKeypadIconTileOffset: ; 8006338
lsls r0, 24 lsls r0, 24
ldr r1, =gKeypadIcons ldr r1, =gKeypadIcons
lsrs r0, 22 lsrs r0, 22
@@ -3856,10 +3868,11 @@ sub_8006338: ; 8006338
ldrb r0, [r0] ldrb r0, [r0]
bx lr bx lr
.pool .pool
thumb_func_end sub_8006338 thumb_func_end GetKeypadIconTileOffset
thumb_func_start Font_ReturnsValueFromLUT thumb_func_start GetKeypadIconWidth
Font_ReturnsValueFromLUT: ; 8006348 ; u8 GetKeypadIconWidth(u8 keypadIconId)
GetKeypadIconWidth: ; 8006348
lsls r0, 24 lsls r0, 24
ldr r1, =gKeypadIcons ldr r1, =gKeypadIcons
lsrs r0, 22 lsrs r0, 22
@@ -3867,10 +3880,11 @@ Font_ReturnsValueFromLUT: ; 8006348
ldrb r0, [r0, 0x2] ldrb r0, [r0, 0x2]
bx lr bx lr
.pool .pool
thumb_func_end Font_ReturnsValueFromLUT thumb_func_end GetKeypadIconWidth
thumb_func_start sub_8006358 thumb_func_start GetKeypadIconHeight
sub_8006358: ; 8006358 ; u8 GetKeypadIconHeight(u8 keypadIconId)
GetKeypadIconHeight: ; 8006358
lsls r0, 24 lsls r0, 24
ldr r1, =gKeypadIcons ldr r1, =gKeypadIcons
lsrs r0, 22 lsrs r0, 22
@@ -3878,20 +3892,22 @@ sub_8006358: ; 8006358
ldrb r0, [r0, 0x3] ldrb r0, [r0, 0x3]
bx lr bx lr
.pool .pool
thumb_func_end sub_8006358 thumb_func_end GetKeypadIconHeight
thumb_func_start fboxes_set_default_ptr thumb_func_start SetDefaultFontsPointer
fboxes_set_default_ptr: ; 8006368 ; void SetDefaultFontsPointer()
SetDefaultFontsPointer: ; 8006368
push {lr} push {lr}
ldr r0, =gFontInfos ldr r0, =gFontInfos
bl fboxes_set_ptr bl SetFontsPointer
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end fboxes_set_default_ptr thumb_func_end SetDefaultFontsPointer
thumb_func_start fbox_get_field thumb_func_start GetFontAttribute
fbox_get_field: ; 8006378 ; u8 GetFontAttribute(u8 fontId, u8 attributeId)
GetFontAttribute: ; 8006378
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r2, r0, 24 lsrs r2, r0, 24
@@ -3995,7 +4011,7 @@ fbox_get_field: ; 8006378
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end fbox_get_field thumb_func_end GetFontAttribute
thumb_func_start GetMenuCursorDimensionByFont thumb_func_start GetMenuCursorDimensionByFont
; u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension) ; u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension)
@@ -4013,6 +4029,7 @@ GetMenuCursorDimensionByFont: ; 8006460
thumb_func_end GetMenuCursorDimensionByFont thumb_func_end GetMenuCursorDimensionByFont
thumb_func_start DecompressGlyphFont0 thumb_func_start DecompressGlyphFont0
; void DecompressGlyphFont0(u16 glyphId, BOOL isJapanese)
DecompressGlyphFont0: ; 8006478 DecompressGlyphFont0: ; 8006478
push {r4,r5,lr} push {r4,r5,lr}
lsls r0, 16 lsls r0, 16
@@ -4101,6 +4118,7 @@ DecompressGlyphFont0: ; 8006478
thumb_func_end DecompressGlyphFont0 thumb_func_end DecompressGlyphFont0
thumb_func_start GetGlyphWidthFont0 thumb_func_start GetGlyphWidthFont0
; u8 GetGlyphWidthFont0(u16 glyphId, BOOL isJapanese)
GetGlyphWidthFont0: ; 8006540 GetGlyphWidthFont0: ; 8006540
push {lr} push {lr}
lsls r0, 16 lsls r0, 16
@@ -4120,6 +4138,7 @@ GetGlyphWidthFont0: ; 8006540
thumb_func_end GetGlyphWidthFont0 thumb_func_end GetGlyphWidthFont0
thumb_func_start DecompressGlyphFont7 thumb_func_start DecompressGlyphFont7
; void DecompressGlyphFont7(u16 glyphId, BOOL isJapanese)
DecompressGlyphFont7: ; 8006560 DecompressGlyphFont7: ; 8006560
push {r4-r6,lr} push {r4-r6,lr}
lsls r0, 16 lsls r0, 16
@@ -4208,6 +4227,7 @@ DecompressGlyphFont7: ; 8006560
thumb_func_end DecompressGlyphFont7 thumb_func_end DecompressGlyphFont7
thumb_func_start GetGlyphWidthFont7 thumb_func_start GetGlyphWidthFont7
; u8 GetGlyphWidthFont7(u16 glyphId, BOOL isJapanese)
GetGlyphWidthFont7: ; 8006628 GetGlyphWidthFont7: ; 8006628
push {lr} push {lr}
lsls r0, 16 lsls r0, 16
@@ -4227,7 +4247,7 @@ GetGlyphWidthFont7: ; 8006628
thumb_func_end GetGlyphWidthFont7 thumb_func_end GetGlyphWidthFont7
thumb_func_start DecompressGlyphFont8 thumb_func_start DecompressGlyphFont8
; void DecompressGlyphFont8(u16 glyphIndex, bool japanese) ; void DecompressGlyphFont8(u16 glyphId, BOOL isJapanese)
DecompressGlyphFont8: ; 8006648 DecompressGlyphFont8: ; 8006648
push {r4,r5,lr} push {r4,r5,lr}
lsls r0, 16 lsls r0, 16
@@ -4316,6 +4336,7 @@ DecompressGlyphFont8: ; 8006648
thumb_func_end DecompressGlyphFont8 thumb_func_end DecompressGlyphFont8
thumb_func_start GetGlyphWidthFont8 thumb_func_start GetGlyphWidthFont8
; u8 GetGlyphWidthFont8(u16 glyphId, BOOL isJapanese)
GetGlyphWidthFont8: ; 8006710 GetGlyphWidthFont8: ; 8006710
push {lr} push {lr}
lsls r0, 16 lsls r0, 16
@@ -4335,6 +4356,7 @@ GetGlyphWidthFont8: ; 8006710
thumb_func_end GetGlyphWidthFont8 thumb_func_end GetGlyphWidthFont8
thumb_func_start DecompressGlyphFont2 thumb_func_start DecompressGlyphFont2
; void DecompressGlyphFont2(u16 glyphId, BOOL isJapanese)
DecompressGlyphFont2: ; 8006730 DecompressGlyphFont2: ; 8006730
push {r4-r6,lr} push {r4-r6,lr}
lsls r0, 16 lsls r0, 16
@@ -4437,6 +4459,7 @@ DecompressGlyphFont2: ; 8006730
thumb_func_end DecompressGlyphFont2 thumb_func_end DecompressGlyphFont2
thumb_func_start GetGlyphWidthFont2 thumb_func_start GetGlyphWidthFont2
; u8 GetGlyphWidthFont2(u16 glyphId, BOOL isJapanese)
GetGlyphWidthFont2: ; 800681C GetGlyphWidthFont2: ; 800681C
push {lr} push {lr}
lsls r0, 16 lsls r0, 16
@@ -4457,7 +4480,7 @@ GetGlyphWidthFont2: ; 800681C
thumb_func_end GetGlyphWidthFont2 thumb_func_end GetGlyphWidthFont2
thumb_func_start DecompressGlyphFont1 thumb_func_start DecompressGlyphFont1
; void DecompressGlyphFont1(int a1, int japanese) ; void DecompressGlyphFont1(u16 glyphId, BOOL isJapanese)
DecompressGlyphFont1: ; 8006840 DecompressGlyphFont1: ; 8006840
push {r4-r6,lr} push {r4-r6,lr}
lsls r0, 16 lsls r0, 16
@@ -4546,6 +4569,7 @@ DecompressGlyphFont1: ; 8006840
thumb_func_end DecompressGlyphFont1 thumb_func_end DecompressGlyphFont1
thumb_func_start GetGlyphWidthFont1 thumb_func_start GetGlyphWidthFont1
; u8 GetGlyphWidthFont1(u16 glyphId, BOOL isJapanese)
GetGlyphWidthFont1: ; 8006908 GetGlyphWidthFont1: ; 8006908
push {lr} push {lr}
lsls r0, 16 lsls r0, 16
@@ -4565,6 +4589,7 @@ GetGlyphWidthFont1: ; 8006908
thumb_func_end GetGlyphWidthFont1 thumb_func_end GetGlyphWidthFont1
thumb_func_start DecompressGlyphFont9 thumb_func_start DecompressGlyphFont9
; void DecompressGlyphFont9(u16 glyphId)
DecompressGlyphFont9: ; 8006928 DecompressGlyphFont9: ; 8006928
push {r4,r5,lr} push {r4,r5,lr}
lsls r0, 16 lsls r0, 16

View File

@@ -3,9 +3,9 @@ nullsub_8: ; 80031BC
bx lr bx lr
thumb_func_end nullsub_8 thumb_func_end nullsub_8
thumb_func_start Window_InitFromTemplates thumb_func_start InitWindows
; int Window_InitFromTemplates(struct rbox_template *template) ; BOOL16 InitWindows(struct WindowTemplate *templates)
Window_InitFromTemplates: ; 80031C0 InitWindows: ; 80031C0
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -108,7 +108,7 @@ Window_InitFromTemplates: ; 80031C0
adds r4, r0, 0 adds r4, r0, 0
cmp r4, 0 cmp r4, 0
bne @080032A8 bne @080032A8
bl Window_FreeMemory bl FreeAllWindowBuffers
b @08003250 b @08003250
.pool .pool
@080032A8: @080032A8:
@@ -213,11 +213,11 @@ Window_InitFromTemplates: ; 80031C0
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end Window_InitFromTemplates thumb_func_end InitWindows
thumb_func_start Window_AddFromTemplate thumb_func_start AddWindow
; int Window_AddFromTemplate(struct rbox_template *template) ; u16 AddWindow(struct WindowTemplate *template)
Window_AddFromTemplate: ; 8003380 AddWindow: ; 8003380
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -379,11 +379,11 @@ Window_AddFromTemplate: ; 8003380
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end Window_AddFromTemplate thumb_func_end AddWindow
thumb_func_start Window_AddFromTemplateWithoutAllocatingMemory thumb_func_start AddWindowWithoutTileMap
; int Window_AddFromTemplateWithoutAllocatingMemory(struct rbox_template *template) ; int AddWindowWithoutTileMap(struct WindowTemplate *template)
Window_AddFromTemplateWithoutAllocatingMemory: ; 80034D8 AddWindowWithoutTileMap: ; 80034D8
push {r4-r6,lr} push {r4-r6,lr}
adds r5, r0, 0 adds r5, r0, 0
movs r4, 0 movs r4, 0
@@ -459,11 +459,11 @@ Window_AddFromTemplateWithoutAllocatingMemory: ; 80034D8
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end Window_AddFromTemplateWithoutAllocatingMemory thumb_func_end AddWindowWithoutTileMap
thumb_func_start Window_Remove thumb_func_start RemoveWindow
; int Window_Remove(int rbox_id) ; void RemoveWindow(u8 windowId)
Window_Remove: ; 8003574 RemoveWindow: ; 8003574
push {r4-r7,lr} push {r4-r7,lr}
lsls r0, 24 lsls r0, 24
lsrs r6, r0, 24 lsrs r6, r0, 24
@@ -525,11 +525,11 @@ Window_Remove: ; 8003574
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_Remove thumb_func_end RemoveWindow
thumb_func_start Window_FreeMemory thumb_func_start FreeAllWindowBuffers
; void Window_FreeMemory() ; void FreeAllWindowBuffers()
Window_FreeMemory: ; 8003604 FreeAllWindowBuffers: ; 8003604
push {r4-r6,lr} push {r4-r6,lr}
ldr r4, =0x03002f70 ldr r4, =0x03002f70
movs r5, 0x3 movs r5, 0x3
@@ -569,11 +569,11 @@ Window_FreeMemory: ; 8003604
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_FreeMemory thumb_func_end FreeAllWindowBuffers
thumb_func_start Window_CopyToVram thumb_func_start CopyWindowToVram
; void Window_CopyToVram(u8 rbox_id, u8 mode) ; void CopyWindowToVram(u8 windowId, u8 mode)
Window_CopyToVram: ; 8003658 CopyWindowToVram: ; 8003658
push {r4-r6,lr} push {r4-r6,lr}
sub sp, 0xC sub sp, 0xC
lsls r0, 24 lsls r0, 24
@@ -637,11 +637,11 @@ Window_CopyToVram: ; 8003658
pop {r4-r6} pop {r4-r6}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end Window_CopyToVram thumb_func_end CopyWindowToVram
thumb_func_start Window_CopyRectToVram thumb_func_start CopyWindowRectToVram
; void Window_CopyRectToVram(int rbox_id, int mode, int x, int y, int w, int h) ; void CopyWindowRectToVram(int rbox_id, int mode, int x, int y, int w, int h)
Window_CopyRectToVram: ; 80036D8 CopyWindowRectToVram: ; 80036D8
push {r4-r7,lr} push {r4-r7,lr}
sub sp, 0xC sub sp, 0xC
adds r6, r0, 0 adds r6, r0, 0
@@ -731,11 +731,11 @@ Window_CopyRectToVram: ; 80036D8
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end Window_CopyRectToVram thumb_func_end CopyWindowRectToVram
thumb_func_start Window_WriteStandardTileMap thumb_func_start PutWindowTileMap
; void Window_WriteStandardTileMap(int rbox_id) ; void PutWindowTileMap(u8 windowId)
Window_WriteStandardTileMap: ; 800378C PutWindowTileMap: ; 800378C
push {r4,lr} push {r4,lr}
sub sp, 0x1C sub sp, 0x1C
lsls r0, 24 lsls r0, 24
@@ -781,11 +781,11 @@ Window_WriteStandardTileMap: ; 800378C
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_WriteStandardTileMap thumb_func_end PutWindowTileMap
thumb_func_start Window_WriteStandardTileMapRectOverridePalette thumb_func_start PutWindowRectTileMapOverridePalette
; void Window_WriteStandardTileMapRectOverridePalette(u8 rbox_id, u8 x, u8 y, u8 w, u8 h, u8 palette) ; void PutWindowRectTileMapOverridePalette(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 paletteSlot)
Window_WriteStandardTileMapRectOverridePalette: ; 80037EC PutWindowRectTileMapOverridePalette: ; 80037EC
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -876,11 +876,11 @@ Window_WriteStandardTileMapRectOverridePalette: ; 80037EC
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_WriteStandardTileMapRectOverridePalette thumb_func_end PutWindowRectTileMapOverridePalette
thumb_func_start Window_FillTileMap thumb_func_start ClearWindowTileMap
; void Window_FillTileMap(int rbox_id) ; void ClearWindowTileMap(u8 windowId)
Window_FillTileMap: ; 80038A4 ClearWindowTileMap: ; 80038A4
push {r4,lr} push {r4,lr}
sub sp, 0x18 sub sp, 0x18
lsls r0, 24 lsls r0, 24
@@ -916,11 +916,11 @@ Window_FillTileMap: ; 80038A4
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_FillTileMap thumb_func_end ClearWindowTileMap
thumb_func_start Window_WriteStandardTileMapRect thumb_func_start PutWindowRectTileMap
; void Window_WriteStandardTileMapRect(u8 rbox_id, u8 x, u8 y, u8 w, u8 h) ; void PutWindowRectTileMap(u8 windowId, u8 x, u8 y, u8 width, u8 height)
Window_WriteStandardTileMapRect: ; 80038F4 PutWindowRectTileMap: ; 80038F4
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -1007,11 +1007,11 @@ Window_WriteStandardTileMapRect: ; 80038F4
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_WriteStandardTileMapRect thumb_func_end PutWindowRectTileMap
thumb_func_start Window_CopyWholePixelBlockToWindow thumb_func_start BlitSurfaceToWindow
; void Window_CopyWholePixelBlockToWindow(u8 rbox_id, int a2, u16 x, u16 y, u16 w, u16 h) ; void BlitSurfaceToWindow(u8 windowId, u8 *pixels, u16 x, u16 y, u16 width, u16 height)
Window_CopyWholePixelBlockToWindow: ; 80039A4 BlitSurfaceToWindow: ; 80039A4
push {r4,r5,lr} push {r4,r5,lr}
sub sp, 0x18 sub sp, 0x18
ldr r4, [sp, 0x24] ldr r4, [sp, 0x24]
@@ -1034,16 +1034,16 @@ Window_CopyWholePixelBlockToWindow: ; 80039A4
str r5, [sp, 0x14] str r5, [sp, 0x14]
movs r2, 0 movs r2, 0
movs r3, 0 movs r3, 0
bl Window_CopyPixelRectToWindow bl BlitSurfaceRectToWindow
add sp, 0x18 add sp, 0x18
pop {r4,r5} pop {r4,r5}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end Window_CopyWholePixelBlockToWindow thumb_func_end BlitSurfaceToWindow
thumb_func_start Window_CopyPixelRectToWindow thumb_func_start BlitSurfaceRectToWindow
; void Window_CopyPixelRectToWindow(u8 rbox_id, void *pixels, u16 src_x, u16 src_y, u16 src_w, int src_h, u16 dest_x, u16 dest_y, u16 dest_w, u16 dest_h) ; void BlitSurfaceRectToWindow(u8 rbox_id, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight)
Window_CopyPixelRectToWindow: ; 80039DC BlitSurfaceRectToWindow: ; 80039DC
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -1123,7 +1123,7 @@ Window_CopyPixelRectToWindow: ; 80039DC
movs r0, 0 movs r0, 0
str r0, [sp, 0x10] str r0, [sp, 0x10]
add r0, sp, 0x14 add r0, sp, 0x14
bl PixelBlock_CopyRect4Bpp bl BlitSurface4Bit
add sp, 0x24 add sp, 0x24
pop {r3-r5} pop {r3-r5}
mov r8, r3 mov r8, r3
@@ -1133,11 +1133,11 @@ Window_CopyPixelRectToWindow: ; 80039DC
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_CopyPixelRectToWindow thumb_func_end BlitSurfaceRectToWindow
thumb_func_start Window_copy_pixels_rect_3 thumb_func_start BlitSurfaceRectToWindowWithColorKey
; void Window_copy_pixels_rect_3(u8 rbox_id, void *pixels, u16 src_x, u16 src_y, u16 src_w, int src_h, u16 dest_x, u16 dest_y, u16 dest_w, u16 dest_h, u8 a11) ; void BlitSurfaceRectToWindowWithColorKey(u8 rbox_id, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 colorKey)
Window_copy_pixels_rect_3: ; 8003A9C BlitSurfaceRectToWindowWithColorKey: ; 8003A9C
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -1221,7 +1221,7 @@ Window_copy_pixels_rect_3: ; 8003A9C
ldr r6, [sp, 0x24] ldr r6, [sp, 0x24]
str r6, [sp, 0x10] str r6, [sp, 0x10]
add r0, sp, 0x14 add r0, sp, 0x14
bl PixelBlock_CopyRect4Bpp bl BlitSurface4Bit
add sp, 0x28 add sp, 0x28
pop {r3-r5} pop {r3-r5}
mov r8, r3 mov r8, r3
@@ -1231,11 +1231,11 @@ Window_copy_pixels_rect_3: ; 8003A9C
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_copy_pixels_rect_3 thumb_func_end BlitSurfaceRectToWindowWithColorKey
thumb_func_start Window_FillPixelRect thumb_func_start FillWindowPixelRect
; void Window_FillPixelRect(u8 rbox_id, char fill_value, u16 x, u16 y, u16 w, u16 h) ; void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height)
Window_FillPixelRect: ; 8003B64 FillWindowPixelRect: ; 8003B64
push {r4-r6,lr} push {r4-r6,lr}
mov r6, r9 mov r6, r9
mov r5, r8 mov r5, r8
@@ -1290,7 +1290,7 @@ Window_FillPixelRect: ; 8003B64
add r0, sp, 0x8 add r0, sp, 0x8
adds r1, r2, 0 adds r1, r2, 0
mov r2, r9 mov r2, r9
bl PixelBlock_FillRect4Bpp bl FillSurfaceRect4Bit
add sp, 0x10 add sp, 0x10
pop {r3,r4} pop {r3,r4}
mov r8, r3 mov r8, r3
@@ -1299,10 +1299,11 @@ Window_FillPixelRect: ; 8003B64
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_FillPixelRect thumb_func_end FillWindowPixelRect
thumb_func_start Window_CopyToPixels thumb_func_start CopyToWindowPixelBuffer
Window_CopyToPixels: ; 8003BF0 ; void CopyToWindowPixelBuffer(u8 windowId, u8 *src, u32 size, u16 tileOffset)
CopyToWindowPixelBuffer: ; 8003BF0
push {r4-r6,lr} push {r4-r6,lr}
adds r6, r1, 0 adds r6, r1, 0
lsls r0, 24 lsls r0, 24
@@ -1343,11 +1344,11 @@ Window_CopyToPixels: ; 8003BF0
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_CopyToPixels thumb_func_end CopyToWindowPixelBuffer
thumb_func_start Window_FastFillPixels thumb_func_start FillWindowPixelBuffer
; void Window_FastFillPixels(u8 rbox_id, int value) ; void FillWindowPixelBuffer(u8 rbox_id, u32 fillValue)
Window_FastFillPixels: ; 8003C48 FillWindowPixelBuffer: ; 8003C48
push {r4,r5,lr} push {r4,r5,lr}
sub sp, 0x4 sub sp, 0x4
lsls r0, 24 lsls r0, 24
@@ -1383,11 +1384,11 @@ Window_FastFillPixels: ; 8003C48
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_FastFillPixels thumb_func_end FillWindowPixelBuffer
thumb_func_start Window_ScrollVertically thumb_func_start ScrollWindow
; void Window_ScrollVertically(u8 windowId, u8 direction, u8 distance, u8 fillValue) ; void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue)
Window_ScrollVertically: ; 8003C94 ScrollWindow: ; 8003C94
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -1909,10 +1910,10 @@ Window_ScrollVertically: ; 8003C94
pop {r4-r7} pop {r4-r7}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end Window_ScrollVertically thumb_func_end ScrollWindow
thumb_func_start CallWindowFunction thumb_func_start CallWindowFunction
; void CallWindowFunction(u8 windowId, void ( *functionPointer)(s8, s8, s8, s8)) ; void CallWindowFunction(u8 windowId, void ( *func)(u8, u8, u8, u8, u8, u8))
CallWindowFunction: ; 8004058 CallWindowFunction: ; 8004058
push {r4-r6,lr} push {r4-r6,lr}
mov r6, r8 mov r6, r8
@@ -1953,8 +1954,9 @@ CallWindowFunction: ; 8004058
.pool .pool
thumb_func_end CallWindowFunction thumb_func_end CallWindowFunction
thumb_func_start Window_SetField thumb_func_start SetWindowAttribute
Window_SetField: ; 80040A8 ; BOOL SetWindowAttribute(u8 windowId, u8 attributeId, u32 value)
SetWindowAttribute: ; 80040A8
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r3, r0, 24 lsrs r3, r0, 24
@@ -2032,10 +2034,11 @@ Window_SetField: ; 80040A8
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end Window_SetField thumb_func_end SetWindowAttribute
thumb_func_start Window_GetField thumb_func_start GetWindowAttribute
Window_GetField: ; 800414C ; u32 GetWindowAttribute(u8 windowId, u8 attributeId)
GetWindowAttribute: ; 800414C
push {lr} push {lr}
lsls r0, 24 lsls r0, 24
lsrs r2, r0, 24 lsrs r2, r0, 24
@@ -2137,10 +2140,10 @@ Window_GetField: ; 800414C
@0800422A: @0800422A:
pop {r1} pop {r1}
bx r1 bx r1
thumb_func_end Window_GetField thumb_func_end GetWindowAttribute
thumb_func_start GetNumActiveWindowsOnBg thumb_func_start GetNumActiveWindowsOnBg
; int GetNumActiveWindowsOnBg(int bg_id) ; u8 GetNumActiveWindowsOnBg(u8 bgId)
GetNumActiveWindowsOnBg: ; 8004230 GetNumActiveWindowsOnBg: ; 8004230
push {r4,lr} push {r4,lr}
lsls r0, 24 lsls r0, 24
@@ -2172,9 +2175,9 @@ nullsub_9: ; 800425C
bx lr bx lr
thumb_func_end nullsub_9 thumb_func_end nullsub_9
thumb_func_start Window_AddFromTemplate8Bpp thumb_func_start AddWindow8Bit
; int Window_AddFromTemplate8Bpp(struct rbox_template *template) ; u16 AddWindow8Bit(struct WindowTemplate *template)
Window_AddFromTemplate8Bpp: ; 8004260 AddWindow8Bit: ; 8004260
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -2257,7 +2260,7 @@ Window_AddFromTemplate8Bpp: ; 8004260
cmp r4, 0 cmp r4, 0
bne @08004338 bne @08004338
adds r0, r7, 0 adds r0, r7, 0
bl GetNumActiveWindowsOnBgDuplicate bl GetNumActiveWindowsOnBg8Bit
lsls r0, 24 lsls r0, 24
cmp r0, 0 cmp r0, 0
bne @08004322 bne @08004322
@@ -2300,11 +2303,11 @@ Window_AddFromTemplate8Bpp: ; 8004260
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end Window_AddFromTemplate8Bpp thumb_func_end AddWindow8Bit
thumb_func_start Window_FillPixels8Bpp thumb_func_start FillWindowPixelBuffer8Bit
; void Window_FillPixels8Bpp(u8 rbox_id, char value) ; void FillWindowPixelBuffer8Bit(u8 windowId, u8 fillValue)
Window_FillPixels8Bpp: ; 8004368 FillWindowPixelBuffer8Bit: ; 8004368
push {r4-r6,lr} push {r4-r6,lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@@ -2338,11 +2341,11 @@ Window_FillPixels8Bpp: ; 8004368
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_FillPixels8Bpp thumb_func_end FillWindowPixelBuffer8Bit
thumb_func_start Window_FillPixelRect8Bpp thumb_func_start FillWindowPixelRect8Bit
; void Window_FillPixelRect8Bpp(u8 a1, char fill_value, u16 x, u16 y, u16 w, u16 h) ; void FillWindowPixelRect8Bit(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height)
Window_FillPixelRect8Bpp: ; 80043A8 FillWindowPixelRect8Bit: ; 80043A8
push {r4-r6,lr} push {r4-r6,lr}
mov r6, r9 mov r6, r9
mov r5, r8 mov r5, r8
@@ -2397,7 +2400,7 @@ Window_FillPixelRect8Bpp: ; 80043A8
add r0, sp, 0x8 add r0, sp, 0x8
adds r1, r2, 0 adds r1, r2, 0
mov r2, r9 mov r2, r9
bl PixelBlock_FillRect8Bpp bl FillSurfaceRect8Bit
add sp, 0x10 add sp, 0x10
pop {r3,r4} pop {r3,r4}
mov r8, r3 mov r8, r3
@@ -2406,11 +2409,11 @@ Window_FillPixelRect8Bpp: ; 80043A8
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_FillPixelRect8Bpp thumb_func_end FillWindowPixelRect8Bit
thumb_func_start Window_CopyPixelRectToWindow4BppTo8Bpp thumb_func_start BlitSurfaceRectToWindow4BitTo8Bit
; void Window_CopyPixelRectToWindow4BppTo8Bpp(u8 rbox_id, void *pixels, u16 src_x, u16 src_y, u16 src_w, int src_h, u16 dest_x, u16 dest_y, u16 dest_w, u16 dest_h, u8 a11) ; void BlitSurfaceRectToWindow4BitTo8Bit(u8 rbox_id, u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight, u8 paletteOffset)
Window_CopyPixelRectToWindow4BppTo8Bpp: ; 8004434 BlitSurfaceRectToWindow4BitTo8Bit: ; 8004434
push {r4-r7,lr} push {r4-r7,lr}
mov r7, r10 mov r7, r10
mov r6, r9 mov r6, r9
@@ -2496,7 +2499,7 @@ Window_CopyPixelRectToWindow4BppTo8Bpp: ; 8004434
ldr r6, [sp, 0x28] ldr r6, [sp, 0x28]
str r6, [sp, 0x14] str r6, [sp, 0x14]
add r0, sp, 0x18 add r0, sp, 0x18
bl PixelBlock_CopyRect4BppTo8Bpp bl BlitSurface4BitTo8Bit
add sp, 0x2C add sp, 0x2C
pop {r3-r5} pop {r3-r5}
mov r8, r3 mov r8, r3
@@ -2506,10 +2509,11 @@ Window_CopyPixelRectToWindow4BppTo8Bpp: ; 8004434
pop {r0} pop {r0}
bx r0 bx r0
.pool .pool
thumb_func_end Window_CopyPixelRectToWindow4BppTo8Bpp thumb_func_end BlitSurfaceRectToWindow4BitTo8Bit
thumb_func_start Window_CopyToVram8Bpp thumb_func_start CopyWindowToVram8Bit
Window_CopyToVram8Bpp: ; 8004500 ; void CopyWindowToVram8Bit(u8 windowId, u8 mode)
CopyWindowToVram8Bit: ; 8004500
push {r4-r6,lr} push {r4-r6,lr}
lsls r0, 24 lsls r0, 24
lsrs r0, 24 lsrs r0, 24
@@ -2565,11 +2569,11 @@ Window_CopyToVram8Bpp: ; 8004500
pop {r4-r6} pop {r4-r6}
pop {r0} pop {r0}
bx r0 bx r0
thumb_func_end Window_CopyToVram8Bpp thumb_func_end CopyWindowToVram8Bit
thumb_func_start GetNumActiveWindowsOnBgDuplicate thumb_func_start GetNumActiveWindowsOnBg8Bit
; int GetNumActiveWindowsOnBgDuplicate(int bg_id) ; int GetNumActiveWindowsOnBg8Bit(int bg_id)
GetNumActiveWindowsOnBgDuplicate: ; 8004578 GetNumActiveWindowsOnBg8Bit: ; 8004578
push {r4,lr} push {r4,lr}
lsls r0, 24 lsls r0, 24
lsrs r4, r0, 24 lsrs r4, r0, 24
@@ -2593,4 +2597,4 @@ GetNumActiveWindowsOnBgDuplicate: ; 8004578
pop {r1} pop {r1}
bx r1 bx r1
.pool .pool
thumb_func_end GetNumActiveWindowsOnBgDuplicate thumb_func_end GetNumActiveWindowsOnBg8Bit