pokeheartgold/asm/overlay_33.s

666 lines
13 KiB
ArmAsm
Raw Normal View History

.include "asm/macros.inc"
2023-01-27 22:42:00 +00:00
.include "overlay_33.inc"
.include "global.inc"
.text
2021-06-18 12:29:26 +00:00
2021-06-24 22:36:19 +00:00
thumb_func_start ov33_0225D520
2021-06-27 18:48:56 +00:00
ov33_0225D520: ; 0x0225D520
2021-06-18 12:29:26 +00:00
push {r3, r4, r5, r6, r7, lr}
sub sp, #8
2021-06-27 18:48:56 +00:00
add r6, r0, #0
2021-06-18 12:29:26 +00:00
str r1, [sp]
2021-06-27 18:48:56 +00:00
mov r0, #3
2021-06-18 12:29:26 +00:00
str r2, [sp, #4]
2021-06-27 18:48:56 +00:00
mov r1, #8
lsl r2, r0, #0xf
add r5, r3, #0
bl CreateHeap
2021-06-27 18:48:56 +00:00
ldr r0, _0225D598 ; =0x04001050
mov r1, #0
2021-06-18 12:29:26 +00:00
strh r1, [r0]
2021-06-27 18:48:56 +00:00
mov r1, #7
ldr r0, _0225D59C ; =ov33_0225D5D0
lsl r1, r1, #6
mov r2, #0xa
mov r3, #8
bl CreateSysTaskAndEnvironment
2021-06-27 18:48:56 +00:00
add r7, r0, #0
2023-12-28 19:58:14 +00:00
bl SysTask_GetData
2021-06-27 18:48:56 +00:00
add r4, r0, #0
2021-06-18 12:29:26 +00:00
ldr r0, [sp]
str r6, [r4]
str r0, [r4, #4]
ldr r0, [sp, #4]
str r0, [r4, #8]
str r5, [r4, #0xc]
str r7, [r4, #0x14]
str r5, [r4, #0x10]
ldrb r1, [r5, #4]
2021-06-27 18:48:56 +00:00
ldr r0, _0225D5A0 ; =0x000001BA
2021-06-18 12:29:26 +00:00
strh r1, [r4, r0]
2021-06-27 18:48:56 +00:00
ldr r1, _0225D5A4 ; =0x0000FFFF
2021-06-18 12:29:26 +00:00
ldr r0, [r4, #0x10]
strh r1, [r0, #6]
ldr r0, [r4, #0x10]
2021-06-27 18:48:56 +00:00
mov r1, #0
2021-06-18 12:29:26 +00:00
strb r1, [r0, #5]
2021-06-24 22:36:19 +00:00
bl ov33_0225D6F8
2021-06-27 18:48:56 +00:00
add r0, r6, #0
2021-06-24 22:36:19 +00:00
bl ov33_0225D720
2021-06-27 18:48:56 +00:00
add r0, r4, #0
2021-06-24 22:36:19 +00:00
bl ov33_0225D7D4
2021-06-27 18:48:56 +00:00
add r0, r4, #0
2021-06-24 22:36:19 +00:00
bl ov33_0225D84C
2021-06-27 18:48:56 +00:00
add r0, r4, #0
2021-06-24 22:36:19 +00:00
bl ov33_0225D8D4
2021-06-27 18:48:56 +00:00
add r0, r7, #0
2021-06-18 12:29:26 +00:00
add sp, #8
pop {r3, r4, r5, r6, r7, pc}
nop
2021-06-27 18:48:56 +00:00
_0225D598: .word 0x04001050
_0225D59C: .word ov33_0225D5D0
_0225D5A0: .word 0x000001BA
_0225D5A4: .word 0x0000FFFF
2021-06-24 22:36:19 +00:00
thumb_func_end ov33_0225D520
2021-06-18 12:29:26 +00:00
2021-06-24 22:36:19 +00:00
thumb_func_start ov33_0225D5A8
2021-06-27 18:48:56 +00:00
ov33_0225D5A8: ; 0x0225D5A8
2021-06-24 22:36:19 +00:00
push {r3, r4, r5, lr}
2021-06-27 18:48:56 +00:00
add r5, r1, #0
add r0, r5, #0
2023-12-28 19:58:14 +00:00
bl SysTask_GetData
2021-06-27 18:48:56 +00:00
add r4, r0, #0
2021-06-24 22:36:19 +00:00
bl ov33_0225D820
ldr r0, [r4]
bl ov33_0225D7B8
2021-06-27 18:48:56 +00:00
add r0, r5, #0
bl DestroySysTaskAndEnvironment
2021-06-27 18:48:56 +00:00
mov r0, #8
bl DestroyHeap
2021-06-24 22:36:19 +00:00
pop {r3, r4, r5, pc}
thumb_func_end ov33_0225D5A8
thumb_func_start ov33_0225D5CC
2021-06-27 18:48:56 +00:00
ov33_0225D5CC: ; 0x0225D5CC
mov r0, #1
2021-06-24 22:36:19 +00:00
bx lr
thumb_func_end ov33_0225D5CC
thumb_func_start ov33_0225D5D0
2021-06-27 18:48:56 +00:00
ov33_0225D5D0: ; 0x0225D5D0
2021-06-24 22:36:19 +00:00
push {r4, lr}
2021-06-27 18:48:56 +00:00
add r4, r1, #0
ldr r1, _0225D6E4 ; =0x000001BA
ldr r0, _0225D6E8 ; =ov33_0225DA50
2021-06-24 22:36:19 +00:00
ldrh r2, [r4, r1]
2021-06-27 18:48:56 +00:00
sub r3, r2, #1
mov r2, #0xc
mul r2, r3
add r0, r0, r2
sub r2, r1, #2
2021-06-24 22:36:19 +00:00
ldrh r2, [r4, r2]
cmp r2, #2
bhs _0225D604
ldr r2, [r4, #0x10]
ldrb r2, [r2, #5]
cmp r2, #1
bne _0225D5FA
2021-06-27 18:48:56 +00:00
mov r2, #2
sub r1, r1, #2
2021-06-24 22:36:19 +00:00
strh r2, [r4, r1]
b _0225D604
_0225D5FA:
cmp r2, #2
bne _0225D604
2021-06-27 18:48:56 +00:00
mov r2, #4
sub r1, r1, #2
2021-06-24 22:36:19 +00:00
strh r2, [r4, r1]
_0225D604:
2021-06-27 18:48:56 +00:00
mov r1, #0x6e
lsl r1, r1, #2
2021-06-24 22:36:19 +00:00
ldrh r1, [r4, r1]
cmp r1, #5
bhi _0225D6E0
2021-06-27 18:48:56 +00:00
add r1, r1, r1
2021-06-24 22:36:19 +00:00
add r1, pc
ldrh r1, [r1, #6]
2021-06-27 18:48:56 +00:00
lsl r1, r1, #0x10
asr r1, r1, #0x10
2021-06-24 22:36:19 +00:00
add pc, r1
2021-06-27 18:48:56 +00:00
_0225D61A: ; jump table
.short _0225D626 - _0225D61A - 2 ; case 0
.short _0225D656 - _0225D61A - 2 ; case 1
.short _0225D67E - _0225D61A - 2 ; case 2
.short _0225D6E0 - _0225D61A - 2 ; case 3
.short _0225D6A8 - _0225D61A - 2 ; case 4
.short _0225D6D2 - _0225D61A - 2 ; case 5
2021-06-24 22:36:19 +00:00
_0225D626:
ldr r0, [r0, #4]
2023-12-25 04:36:40 +00:00
bl TouchscreenHitbox_FindRectAtTouchNew
2021-06-27 18:48:56 +00:00
mov r1, #0x6f
lsl r1, r1, #2
2021-06-24 22:36:19 +00:00
str r0, [r4, r1]
2021-06-27 18:48:56 +00:00
mov r0, #0
2021-06-24 22:36:19 +00:00
ldr r1, [r4, r1]
2021-06-27 18:48:56 +00:00
mvn r0, r0
2021-06-24 22:36:19 +00:00
cmp r1, r0
beq _0225D6E0
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r1, #1
2021-06-24 22:36:19 +00:00
bl ov33_0225D9D4
2021-06-27 18:48:56 +00:00
mov r0, #0x6f
lsl r0, r0, #2
2021-06-24 22:36:19 +00:00
ldr r2, [r4, r0]
ldr r1, [r4, #0x10]
2021-06-27 18:48:56 +00:00
sub r0, r0, #4
2021-06-24 22:36:19 +00:00
strh r2, [r1, #6]
2021-06-27 18:48:56 +00:00
mov r1, #1
2021-06-24 22:36:19 +00:00
strh r1, [r4, r0]
pop {r4, pc}
_0225D656:
ldr r0, [r0, #4]
2023-12-25 04:36:40 +00:00
bl TouchscreenHitbox_FindRectAtTouchHeld
2021-06-27 18:48:56 +00:00
ldr r2, _0225D6EC ; =0x0000FFFF
2021-06-24 22:36:19 +00:00
ldr r1, [r4, #0x10]
strh r2, [r1, #6]
2021-06-27 18:48:56 +00:00
mov r1, #0x6f
lsl r1, r1, #2
2021-06-24 22:36:19 +00:00
ldr r1, [r4, r1]
cmp r0, r1
beq _0225D6E0
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r1, #0
2021-06-24 22:36:19 +00:00
bl ov33_0225D9D4
2021-06-27 18:48:56 +00:00
mov r0, #0x6e
mov r1, #0
lsl r0, r0, #2
2021-06-24 22:36:19 +00:00
strh r1, [r4, r0]
pop {r4, pc}
_0225D67E:
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
mov r1, #4
2021-09-18 16:36:50 +00:00
bl BgClearTilemapBufferAndCommit
2021-06-24 22:36:19 +00:00
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
mov r1, #5
2021-09-18 16:36:50 +00:00
bl BgClearTilemapBufferAndCommit
2021-06-24 22:36:19 +00:00
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
mov r1, #4
2021-08-14 18:09:09 +00:00
bl ScheduleBgTilemapBufferTransfer
2021-06-24 22:36:19 +00:00
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
mov r1, #5
2021-08-14 18:09:09 +00:00
bl ScheduleBgTilemapBufferTransfer
2021-06-27 18:48:56 +00:00
mov r0, #0x6e
mov r1, #3
lsl r0, r0, #2
2021-06-24 22:36:19 +00:00
strh r1, [r4, r0]
pop {r4, pc}
_0225D6A8:
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
mov r1, #4
2021-09-18 16:36:50 +00:00
bl BgClearTilemapBufferAndCommit
2021-06-24 22:36:19 +00:00
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
mov r1, #5
2021-09-18 16:36:50 +00:00
bl BgClearTilemapBufferAndCommit
2021-06-24 22:36:19 +00:00
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
mov r1, #4
2021-08-14 18:09:09 +00:00
bl ScheduleBgTilemapBufferTransfer
2021-06-24 22:36:19 +00:00
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
mov r1, #5
2021-08-14 18:09:09 +00:00
bl ScheduleBgTilemapBufferTransfer
2021-06-27 18:48:56 +00:00
mov r0, #0x6e
mov r1, #5
lsl r0, r0, #2
2021-06-24 22:36:19 +00:00
strh r1, [r4, r0]
pop {r4, pc}
_0225D6D2:
2022-02-01 20:44:20 +00:00
ldr r0, _0225D6F0 ; =gSystem + 0x40
2021-06-24 22:36:19 +00:00
ldrh r0, [r0, #0x26]
cmp r0, #0
beq _0225D6E0
2022-02-01 20:44:20 +00:00
ldr r0, _0225D6F4 ; =gSystem
2021-06-27 18:48:56 +00:00
mov r1, #1
2021-06-24 22:36:19 +00:00
str r1, [r0, #0x5c]
_0225D6E0:
pop {r4, pc}
nop
2021-06-27 18:48:56 +00:00
_0225D6E4: .word 0x000001BA
_0225D6E8: .word ov33_0225DA50
2021-06-27 18:48:56 +00:00
_0225D6EC: .word 0x0000FFFF
2022-02-01 20:44:20 +00:00
_0225D6F0: .word gSystem + 0x40
_0225D6F4: .word gSystem
2021-06-24 22:36:19 +00:00
thumb_func_end ov33_0225D5D0
thumb_func_start ov33_0225D6F8
2021-06-27 18:48:56 +00:00
ov33_0225D6F8: ; 0x0225D6F8
2021-06-18 12:29:26 +00:00
push {r3, lr}
2021-06-27 18:48:56 +00:00
mov r0, #0x80
bl GX_SetBankForSubBG
2021-06-27 18:48:56 +00:00
mov r0, #1
lsl r0, r0, #8
bl GX_SetBankForSubOBJ
2021-06-27 18:48:56 +00:00
ldr r2, _0225D718 ; =0x04001000
ldr r0, _0225D71C ; =0xFFCFFFEF
2021-06-18 12:29:26 +00:00
ldr r1, [r2]
2021-06-27 18:48:56 +00:00
and r1, r0
mov r0, #0x10
orr r0, r1
2021-06-18 12:29:26 +00:00
str r0, [r2]
pop {r3, pc}
2021-08-08 01:30:37 +00:00
.balign 4, 0
2021-06-27 18:48:56 +00:00
_0225D718: .word 0x04001000
_0225D71C: .word 0xFFCFFFEF
2021-06-24 22:36:19 +00:00
thumb_func_end ov33_0225D6F8
2021-06-18 12:29:26 +00:00
2021-06-24 22:36:19 +00:00
thumb_func_start ov33_0225D720
2021-06-27 18:48:56 +00:00
ov33_0225D720: ; 0x0225D720
2021-06-18 12:29:26 +00:00
push {r4, r5, lr}
sub sp, #0x54
2021-06-27 18:48:56 +00:00
add r4, r0, #0
mov r0, #0
2021-09-18 22:02:59 +00:00
bl GXS_SetGraphicsMode
ldr r5, _0225D7AC ; =ov33_0225DA68
2021-06-18 12:29:26 +00:00
add r3, sp, #0x38
2021-06-27 18:48:56 +00:00
ldmia r5!, {r0, r1}
add r2, r3, #0
stmia r3!, {r0, r1}
ldmia r5!, {r0, r1}
stmia r3!, {r0, r1}
ldmia r5!, {r0, r1}
stmia r3!, {r0, r1}
2021-06-18 12:29:26 +00:00
ldr r0, [r5]
2021-06-27 18:48:56 +00:00
mov r1, #4
2021-06-18 12:29:26 +00:00
str r0, [r3]
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r3, #0
2021-09-16 00:11:18 +00:00
bl InitBgFromTemplate
2021-06-27 18:48:56 +00:00
mov r0, #4
mov r1, #0x20
mov r2, #0
mov r3, #8
2021-09-16 00:11:18 +00:00
bl BG_ClearCharDataRange
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r1, #4
2021-09-18 16:36:50 +00:00
bl BgClearTilemapBufferAndCommit
ldr r5, _0225D7B0 ; =ov33_0225DA84
2021-06-18 12:29:26 +00:00
add r3, sp, #0x1c
2021-06-27 18:48:56 +00:00
ldmia r5!, {r0, r1}
add r2, r3, #0
stmia r3!, {r0, r1}
ldmia r5!, {r0, r1}
stmia r3!, {r0, r1}
ldmia r5!, {r0, r1}
stmia r3!, {r0, r1}
2021-06-18 12:29:26 +00:00
ldr r0, [r5]
2021-06-27 18:48:56 +00:00
mov r1, #5
2021-06-18 12:29:26 +00:00
str r0, [r3]
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r3, #0
2021-09-16 00:11:18 +00:00
bl InitBgFromTemplate
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r1, #5
2021-09-18 16:36:50 +00:00
bl BgClearTilemapBufferAndCommit
ldr r5, _0225D7B4 ; =ov33_0225DAA0
2021-06-18 12:29:26 +00:00
add r3, sp, #0
2021-06-27 18:48:56 +00:00
ldmia r5!, {r0, r1}
add r2, r3, #0
stmia r3!, {r0, r1}
ldmia r5!, {r0, r1}
stmia r3!, {r0, r1}
ldmia r5!, {r0, r1}
stmia r3!, {r0, r1}
2021-06-18 12:29:26 +00:00
ldr r0, [r5]
2021-06-27 18:48:56 +00:00
mov r1, #6
2021-06-18 12:29:26 +00:00
str r0, [r3]
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r3, #0
2021-09-16 00:11:18 +00:00
bl InitBgFromTemplate
2021-06-18 12:29:26 +00:00
add sp, #0x54
pop {r4, r5, pc}
2021-08-08 01:30:37 +00:00
.balign 4, 0
_0225D7AC: .word ov33_0225DA68
_0225D7B0: .word ov33_0225DA84
_0225D7B4: .word ov33_0225DAA0
2021-06-24 22:36:19 +00:00
thumb_func_end ov33_0225D720
2021-06-18 12:29:26 +00:00
2021-06-24 22:36:19 +00:00
thumb_func_start ov33_0225D7B8
2021-06-27 18:48:56 +00:00
ov33_0225D7B8: ; 0x0225D7B8
2021-06-24 22:36:19 +00:00
push {r4, lr}
2021-06-27 18:48:56 +00:00
add r4, r0, #0
mov r1, #6
2021-09-16 00:11:18 +00:00
bl FreeBgTilemapBuffer
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r1, #5
2021-09-16 00:11:18 +00:00
bl FreeBgTilemapBuffer
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r1, #4
2021-09-16 00:11:18 +00:00
bl FreeBgTilemapBuffer
2021-06-24 22:36:19 +00:00
pop {r4, pc}
thumb_func_end ov33_0225D7B8
thumb_func_start ov33_0225D7D4
2021-06-27 18:48:56 +00:00
ov33_0225D7D4: ; 0x0225D7D4
2021-06-18 12:29:26 +00:00
push {r3, r4, r5, r6, r7, lr}
2021-06-27 18:48:56 +00:00
add r7, r0, #0
ldr r0, _0225D818 ; =0x000001BA
mov r4, #0
2021-06-18 12:29:26 +00:00
ldrh r2, [r7, r0]
2021-06-27 18:48:56 +00:00
mov r0, #0xc
sub r1, r2, #1
mul r0, r1
2021-06-18 12:29:26 +00:00
str r0, [sp]
cmp r2, #0
bls _0225D816
2021-06-27 18:48:56 +00:00
add r5, r7, #0
add r6, r4, #0
add r5, #0x18
2021-06-18 12:29:26 +00:00
_0225D7F0:
ldr r3, _0225D81C ; =ov33_0225DA50
2021-06-18 12:29:26 +00:00
ldr r2, [sp]
ldr r0, [r7]
ldr r2, [r3, r2]
2021-06-27 18:48:56 +00:00
add r1, r5, #0
add r2, r2, r6
2021-08-13 18:03:14 +00:00
bl AddWindow
2021-06-27 18:48:56 +00:00
add r0, r5, #0
mov r1, #0
2021-08-13 14:06:39 +00:00
bl FillWindowPixelBuffer
2021-06-27 18:48:56 +00:00
ldr r0, _0225D818 ; =0x000001BA
add r4, r4, #1
2021-06-18 12:29:26 +00:00
ldrh r0, [r7, r0]
2021-06-27 18:48:56 +00:00
add r6, #8
add r5, #0x10
2021-06-18 12:29:26 +00:00
cmp r4, r0
blo _0225D7F0
_0225D816:
pop {r3, r4, r5, r6, r7, pc}
2021-08-08 01:30:37 +00:00
.balign 4, 0
2021-06-27 18:48:56 +00:00
_0225D818: .word 0x000001BA
_0225D81C: .word ov33_0225DA50
2021-06-24 22:36:19 +00:00
thumb_func_end ov33_0225D7D4
thumb_func_start ov33_0225D820
2021-06-27 18:48:56 +00:00
ov33_0225D820: ; 0x0225D820
2021-06-24 22:36:19 +00:00
push {r3, r4, r5, r6, r7, lr}
2021-06-27 18:48:56 +00:00
add r6, r0, #0
ldr r0, _0225D848 ; =0x000001BA
mov r4, #0
2021-06-24 22:36:19 +00:00
ldrh r0, [r6, r0]
cmp r0, #0
bls _0225D844
2021-06-27 18:48:56 +00:00
add r5, r6, #0
ldr r7, _0225D848 ; =0x000001BA
add r5, #0x18
2021-06-24 22:36:19 +00:00
_0225D834:
2021-06-27 18:48:56 +00:00
add r0, r5, #0
2021-08-13 18:03:14 +00:00
bl RemoveWindow
2021-06-24 22:36:19 +00:00
ldrh r0, [r6, r7]
2021-06-27 18:48:56 +00:00
add r4, r4, #1
add r5, #0x10
2021-06-24 22:36:19 +00:00
cmp r4, r0
blo _0225D834
_0225D844:
pop {r3, r4, r5, r6, r7, pc}
nop
2021-06-27 18:48:56 +00:00
_0225D848: .word 0x000001BA
2021-06-24 22:36:19 +00:00
thumb_func_end ov33_0225D820
2021-06-18 12:29:26 +00:00
2021-06-24 22:36:19 +00:00
thumb_func_start ov33_0225D84C
2021-06-27 18:48:56 +00:00
ov33_0225D84C: ; 0x0225D84C
2021-06-18 12:29:26 +00:00
push {r3, r4, r5, r6, lr}
sub sp, #0x14
2021-06-27 18:48:56 +00:00
add r5, r0, #0
mov r0, #0xef
mov r1, #8
2023-06-04 17:22:55 +00:00
bl NARC_New
2021-06-27 18:48:56 +00:00
mov r1, #0xa0
2021-06-18 12:29:26 +00:00
str r1, [sp]
2021-06-27 18:48:56 +00:00
mov r1, #8
2021-06-18 12:29:26 +00:00
str r1, [sp, #4]
2021-06-27 18:48:56 +00:00
mov r1, #0
mov r2, #4
add r3, r1, #0
add r4, r0, #0
2022-01-27 21:18:13 +00:00
bl GfGfxLoader_GXLoadPalFromOpenNarc
2021-06-27 18:48:56 +00:00
mov r0, #0
2021-06-18 12:29:26 +00:00
str r0, [sp]
str r0, [sp, #4]
str r0, [sp, #8]
2021-06-27 18:48:56 +00:00
mov r0, #8
2021-06-18 12:29:26 +00:00
str r0, [sp, #0xc]
ldr r2, [r5]
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r1, #1
mov r3, #5
2022-01-27 21:18:13 +00:00
bl GfGfxLoader_LoadCharDataFromOpenNarc
2021-06-27 18:48:56 +00:00
mov r0, #0
2021-06-18 12:29:26 +00:00
str r0, [sp]
str r0, [sp, #4]
str r0, [sp, #8]
2021-06-27 18:48:56 +00:00
mov r0, #8
2021-06-18 12:29:26 +00:00
str r0, [sp, #0xc]
ldr r2, [r5]
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r1, #9
mov r3, #6
2022-01-27 21:18:13 +00:00
bl GfGfxLoader_LoadScrnDataFromOpenNarc
2021-06-27 18:48:56 +00:00
mov r0, #8
2021-06-18 12:29:26 +00:00
str r0, [sp]
2021-06-27 18:48:56 +00:00
add r0, r4, #0
mov r1, #0xa
mov r2, #0
2021-06-18 12:29:26 +00:00
add r3, sp, #0x10
2022-01-27 21:18:13 +00:00
bl GfGfxLoader_GetScrnDataFromOpenNarc
2021-06-27 18:48:56 +00:00
add r6, r0, #0
2021-06-18 12:29:26 +00:00
ldr r0, [sp, #0x10]
2021-06-27 18:48:56 +00:00
mov r2, #6
add r5, #0x38
add r0, #0xc
lsl r2, r2, #6
add r0, r0, r2
add r1, r5, #0
2021-08-13 18:03:14 +00:00
bl MIi_CpuCopy16
2021-06-27 18:48:56 +00:00
add r0, r6, #0
2021-08-12 19:28:01 +00:00
bl FreeToHeap
2021-06-27 18:48:56 +00:00
add r0, r4, #0
2023-06-04 17:27:11 +00:00
bl NARC_Delete
2021-06-18 12:29:26 +00:00
add sp, #0x14
pop {r3, r4, r5, r6, pc}
2021-08-08 01:30:37 +00:00
.balign 4, 0
2021-06-24 22:36:19 +00:00
thumb_func_end ov33_0225D84C
2021-06-18 12:29:26 +00:00
2021-06-24 22:36:19 +00:00
thumb_func_start ov33_0225D8D4
2021-06-27 18:48:56 +00:00
ov33_0225D8D4: ; 0x0225D8D4
2021-06-18 12:29:26 +00:00
push {r4, r5, r6, r7, lr}
sub sp, #0x24
2021-06-27 18:48:56 +00:00
add r7, r0, #0
mov r0, #4
mov r1, #8
2022-03-10 15:29:01 +00:00
bl FontID_Alloc
2021-06-27 18:48:56 +00:00
mov r0, #0
mov r1, #0x1b
mov r2, #0xbf
mov r3, #8
2021-08-13 18:03:14 +00:00
bl NewMsgDataFromNarc
2021-06-18 12:29:26 +00:00
str r0, [sp, #0x14]
2021-06-27 18:48:56 +00:00
ldr r0, _0225D9C8 ; =0x000001BA
ldr r3, _0225D9CC ; =ov33_0225DA50
2021-06-18 12:29:26 +00:00
ldrh r0, [r7, r0]
2021-06-27 18:48:56 +00:00
mov r1, #0xc
mov r5, #0
sub r2, r0, #1
mul r1, r2
add r1, r3, r1
2021-06-18 12:29:26 +00:00
str r1, [sp, #0x18]
cmp r0, #0
bls _0225D9B0
2021-06-27 18:48:56 +00:00
add r0, r7, #0
2021-06-18 12:29:26 +00:00
str r0, [sp, #0x1c]
2021-06-27 18:48:56 +00:00
add r0, #0x38
add r4, r7, #0
2021-06-18 12:29:26 +00:00
str r0, [sp, #0x1c]
2021-06-27 18:48:56 +00:00
add r4, #0x18
2021-06-18 12:29:26 +00:00
_0225D912:
ldr r1, [sp, #0x18]
ldr r0, [sp, #0x18]
ldrh r1, [r1, #0xa]
ldrb r0, [r0, #9]
ldr r3, [sp, #0x18]
2021-06-27 18:48:56 +00:00
add r1, r1, #6
add r2, r1, #0
mul r2, r5
add r0, r0, r2
lsl r0, r0, #0x18
lsr r0, r0, #0x18
2021-06-18 12:29:26 +00:00
str r0, [sp]
2021-06-27 18:48:56 +00:00
mov r0, #0x20
2021-06-18 12:29:26 +00:00
str r0, [sp, #4]
2021-06-27 18:48:56 +00:00
mov r0, #6
2021-06-18 12:29:26 +00:00
str r0, [sp, #8]
ldrb r3, [r3, #8]
ldr r0, [r7]
ldr r2, [sp, #0x1c]
2021-06-27 18:48:56 +00:00
mov r1, #5
bl LoadRectToBgTilemapRect
2021-06-18 12:29:26 +00:00
ldr r1, [r7, #0x10]
ldr r0, [sp, #0x14]
ldr r2, [r1]
2021-06-27 18:48:56 +00:00
lsl r1, r5, #2
2021-06-18 12:29:26 +00:00
ldr r1, [r2, r1]
2021-08-14 00:11:40 +00:00
bl NewString_ReadMsgData
2021-06-27 18:48:56 +00:00
lsl r6, r5, #4
2021-06-18 12:29:26 +00:00
str r0, [sp, #0x20]
2021-06-27 18:48:56 +00:00
add r0, r4, r6
2021-08-13 14:06:39 +00:00
bl GetWindowWidth
2021-06-27 18:48:56 +00:00
lsl r1, r0, #3
lsr r0, r1, #0x1f
add r0, r1, r0
lsl r0, r0, #0xf
lsr r0, r0, #0x10
2021-06-18 12:29:26 +00:00
str r0, [sp, #0x10]
ldr r1, [sp, #0x20]
2021-06-27 18:48:56 +00:00
mov r0, #4
mov r2, #0
2022-03-10 15:29:01 +00:00
bl FontID_String_GetWidth
2021-06-27 18:48:56 +00:00
lsr r1, r0, #1
2021-06-18 12:29:26 +00:00
ldr r0, [sp, #0x10]
ldr r2, [sp, #0x20]
2021-06-27 18:48:56 +00:00
sub r0, r0, r1
lsl r0, r0, #0x10
lsr r3, r0, #0x10
mov r0, #0
2021-06-18 12:29:26 +00:00
str r0, [sp]
2021-06-27 18:48:56 +00:00
mov r0, #0xff
2021-06-18 12:29:26 +00:00
str r0, [sp, #4]
2021-06-27 18:48:56 +00:00
ldr r0, _0225D9D0 ; =0x00020100
mov r1, #4
2021-06-18 12:29:26 +00:00
str r0, [sp, #8]
2021-06-27 18:48:56 +00:00
mov r0, #0
2021-06-18 12:29:26 +00:00
str r0, [sp, #0xc]
2021-06-27 18:48:56 +00:00
add r0, r4, r6
bl AddTextPrinterParameterizedWithColor
2021-06-27 18:48:56 +00:00
add r0, r4, r6
bl CopyWindowPixelsToVram_TextMode
2021-06-27 18:48:56 +00:00
add r0, r4, r6
bl ScheduleWindowCopyToVram
2021-06-18 12:29:26 +00:00
ldr r0, [sp, #0x20]
2023-06-04 17:27:11 +00:00
bl String_Delete
2021-06-27 18:48:56 +00:00
add r0, r5, #1
lsl r0, r0, #0x10
lsr r5, r0, #0x10
ldr r0, _0225D9C8 ; =0x000001BA
2021-06-18 12:29:26 +00:00
ldrh r0, [r7, r0]
cmp r5, r0
blo _0225D912
_0225D9B0:
ldr r0, [sp, #0x14]
2021-08-13 18:03:14 +00:00
bl DestroyMsgData
2021-06-27 18:48:56 +00:00
mov r0, #4
2022-03-10 15:29:01 +00:00
bl FontID_Release
2021-06-18 12:29:26 +00:00
ldr r0, [r7]
2021-06-27 18:48:56 +00:00
mov r1, #5
2021-08-14 18:09:09 +00:00
bl ScheduleBgTilemapBufferTransfer
2021-06-18 12:29:26 +00:00
add sp, #0x24
pop {r4, r5, r6, r7, pc}
2021-08-08 01:30:37 +00:00
.balign 4, 0
2021-06-27 18:48:56 +00:00
_0225D9C8: .word 0x000001BA
_0225D9CC: .word ov33_0225DA50
2021-06-27 18:48:56 +00:00
_0225D9D0: .word 0x00020100
2021-06-24 22:36:19 +00:00
thumb_func_end ov33_0225D8D4
thumb_func_start ov33_0225D9D4
2021-06-27 18:48:56 +00:00
ov33_0225D9D4: ; 0x0225D9D4
2021-06-24 22:36:19 +00:00
push {r3, r4, r5, r6, lr}
sub sp, #0xc
2021-06-27 18:48:56 +00:00
ldr r3, _0225DA1C ; =0x000001BA
add r4, r0, #0
2021-06-24 22:36:19 +00:00
ldrh r2, [r4, r3]
ldr r0, _0225DA20 ; =ov33_0225DA50
2021-06-27 18:48:56 +00:00
add r3, r3, #2
sub r5, r2, #1
mov r2, #0xc
mul r2, r5
add r5, r0, r2
mov r0, #0x20
2021-06-24 22:36:19 +00:00
str r0, [sp]
2021-06-27 18:48:56 +00:00
mov r0, #6
2021-06-24 22:36:19 +00:00
str r0, [sp, #4]
str r1, [sp, #8]
ldrb r2, [r5, #8]
ldrb r6, [r5, #9]
ldrh r5, [r5, #0xa]
ldr r3, [r4, r3]
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
add r5, r5, #6
mul r3, r5
add r3, r6, r3
lsl r3, r3, #0x18
mov r1, #5
lsr r3, r3, #0x18
bl BgTilemapRectChangePalette
2021-06-24 22:36:19 +00:00
ldr r0, [r4]
2021-06-27 18:48:56 +00:00
mov r1, #5
2021-08-14 18:09:09 +00:00
bl ScheduleBgTilemapBufferTransfer
2021-06-24 22:36:19 +00:00
add sp, #0xc
pop {r3, r4, r5, r6, pc}
nop
2021-06-27 18:48:56 +00:00
_0225DA1C: .word 0x000001BA
_0225DA20: .word ov33_0225DA50
2021-06-24 22:36:19 +00:00
thumb_func_end ov33_0225D9D4
.rodata
2021-12-03 01:12:38 +00:00
ov33_0225DA24:
.byte 0x04, 0x01, 0x0C, 0x1E, 0x02, 0x04, 0x01, 0x00
ov33_0225DA2C:
.byte 0x50, 0x7F, 0x00, 0xFF
.byte 0xFF, 0x00, 0x00, 0x00
ov33_0225DA34:
.byte 0x28, 0x57, 0x00, 0xFF, 0x60, 0x8F, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
ov33_0225DA40:
2021-06-24 22:36:19 +00:00
.byte 0x04, 0x01, 0x07, 0x1E, 0x02, 0x04, 0x01, 0x00, 0x04, 0x01, 0x0E, 0x1E, 0x02, 0x04, 0x3D, 0x00
ov33_0225DA50: ; 0x0225DA50
2021-12-03 01:12:38 +00:00
.word ov33_0225DA24
.word ov33_0225DA2C
.byte 0x00, 0x0A, 0x00, 0x00
.word ov33_0225DA40
.word ov33_0225DA34
.byte 0x00, 0x05, 0x01, 0x00
ov33_0225DA68: ; 0x0225DA68
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
2021-06-24 22:36:19 +00:00
.byte 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
ov33_0225DA84: ; 0x0225DA84
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00
2021-06-24 22:36:19 +00:00
.byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0E, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
ov33_0225DAA0: ; 0x0225DAA0
2021-06-24 22:36:19 +00:00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x0D, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00