pokeemerald/asm/main_menu.s

5478 lines
88 KiB
ArmAsm
Raw Normal View History

2016-11-01 16:29:13 +01:00
.include "asm/macros.inc"
2016-11-01 18:08:48 +01:00
.include "constants/constants.inc"
2016-09-03 08:11:29 +02:00
.syntax unified
.text
thumb_func_start CB2_MainMenu
2016-09-03 04:51:16 +02:00
@ void CB2_MainMenu()
CB2_MainMenu: @ 802F6B0
2015-11-29 04:26:45 +01:00
push {lr}
2016-10-31 09:14:22 +01:00
bl RunTasks
2017-09-01 19:43:26 +02:00
bl AnimateSprites
bl BuildOamBuffer
bl UpdatePaletteFade
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
thumb_func_end CB2_MainMenu
2015-11-29 04:26:45 +01:00
thumb_func_start VBlankCB_MainMenu
2016-09-03 04:51:16 +02:00
@ void VBlankCB_MainMenu()
VBlankCB_MainMenu: @ 802F6C8
2015-11-29 04:26:45 +01:00
push {lr}
2017-09-02 01:42:44 +02:00
bl LoadOam
2017-09-01 23:40:13 +02:00
bl ProcessSpriteCopyRequests
bl TransferPlttBuffer
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
thumb_func_end VBlankCB_MainMenu
2015-11-29 04:26:45 +01:00
thumb_func_start CB2_InitMainMenu
2016-09-03 04:51:16 +02:00
@ void CB2_InitMainMenu()
CB2_InitMainMenu: @ 802F6DC
2015-11-29 04:26:45 +01:00
push {lr}
movs r0, 0
bl InitMainMenu
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
thumb_func_end CB2_InitMainMenu
2015-11-29 04:26:45 +01:00
thumb_func_start CB2_ReinitMainMenu
2016-09-03 04:51:16 +02:00
@ void CB2_ReinitMainMenu()
CB2_ReinitMainMenu: @ 802F6E8
2015-11-29 04:26:45 +01:00
push {lr}
movs r0, 0x1
bl InitMainMenu
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
thumb_func_end CB2_ReinitMainMenu
2015-11-29 04:26:45 +01:00
thumb_func_start InitMainMenu
2016-09-03 04:51:16 +02:00
@ void InitMainMenu(bool8 affects_palette_maybe)
InitMainMenu: @ 802F6F4
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
sub sp, 0xC
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
movs r0, 0
bl SetVBlankCallback
movs r0, 0
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0xC
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0xA
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x8
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x18
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x1A
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x14
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x16
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x10
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x12
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
add r1, sp, 0x4
movs r0, 0
strh r0, [r1]
ldr r1, =0x040000d4
add r0, sp, 0x4
str r0, [r1]
movs r0, 0xC0
lsls r0, 19
str r0, [r1, 0x4]
ldr r0, =0x8100c000
str r0, [r1, 0x8]
ldr r0, [r1, 0x8]
movs r5, 0
str r5, [sp, 0x8]
add r0, sp, 0x8
str r0, [r1]
movs r0, 0xE0
lsls r0, 19
str r0, [r1, 0x4]
ldr r0, =0x85000100
str r0, [r1, 0x8]
ldr r0, [r1, 0x8]
add r0, sp, 0x4
strh r5, [r0]
str r0, [r1]
ldr r0, =0x05000002
str r0, [r1, 0x4]
ldr r0, =0x810001ff
str r0, [r1, 0x8]
ldr r0, [r1, 0x8]
bl ResetPaletteFade
ldr r0, =gMainMenuBgPal
2015-11-29 04:26:45 +01:00
movs r1, 0
movs r2, 0x20
bl LoadPalette
ldr r0, =gMainMenuTextPal
2015-11-29 04:26:45 +01:00
movs r1, 0xF0
movs r2, 0x20
bl LoadPalette
2015-11-29 04:26:45 +01:00
bl remove_some_task
2016-10-31 09:14:22 +01:00
bl ResetTasks
2017-09-02 00:21:11 +02:00
bl ResetSpriteData
2017-09-02 13:11:19 +02:00
bl FreeAllSpritePalettes
2015-11-29 04:26:45 +01:00
cmp r4, 0
2016-01-07 05:23:20 +01:00
beq _0802F7EC
2015-11-29 04:26:45 +01:00
movs r0, 0x1
negs r0, r0
str r5, [sp]
movs r1, 0
movs r2, 0x10
movs r3, 0
bl BeginNormalPaletteFade
2016-01-07 05:23:20 +01:00
b _0802F7FE
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802F7EC:
2015-11-29 04:26:45 +01:00
movs r0, 0x1
negs r0, r0
ldr r1, =0x0000ffff
str r1, [sp]
movs r1, 0
movs r2, 0x10
movs r3, 0
bl BeginNormalPaletteFade
2016-01-07 05:23:20 +01:00
_0802F7FE:
2015-11-29 04:26:45 +01:00
movs r0, 0
2015-11-30 08:17:50 +01:00
bl ResetBgsAndClearDma3BusyFlags
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082FF0E8
movs r0, 0
movs r2, 0x2
2015-11-30 08:17:50 +01:00
bl InitBgsFromTemplates
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0
movs r2, 0
2015-11-30 08:17:50 +01:00
bl ChangeBgX
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0
movs r2, 0
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2015-11-29 04:26:45 +01:00
movs r0, 0x1
movs r1, 0
movs r2, 0
2015-11-30 08:17:50 +01:00
bl ChangeBgX
2015-11-29 04:26:45 +01:00
movs r0, 0x1
movs r1, 0
movs r2, 0
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF038
bl InitWindows
bl DeactivateAllTextPrinters
2015-11-29 04:26:45 +01:00
ldr r1, =0x000001d5
movs r0, 0
bl LoadMainMenuWindowFrameTiles
2015-11-29 04:26:45 +01:00
movs r0, 0x40
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x44
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x48
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x4A
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x50
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x52
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x54
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x1
2015-11-30 08:17:50 +01:00
bl EnableInterrupts
ldr r0, =VBlankCB_MainMenu
2015-11-29 04:26:45 +01:00
bl SetVBlankCallback
ldr r0, =CB2_MainMenu
2015-11-30 08:17:50 +01:00
bl SetMainCallback2
2015-11-29 04:26:45 +01:00
movs r1, 0xC1
lsls r1, 6
movs r0, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0
2015-11-30 08:17:50 +01:00
bl ShowBg
2015-11-29 04:26:45 +01:00
movs r0, 0x1
2015-11-30 08:17:50 +01:00
bl HideBg
ldr r0, =Task_MainMenuCheckSaveFile
2015-11-29 04:26:45 +01:00
movs r1, 0
2016-10-31 09:14:22 +01:00
bl CreateTask
2015-11-29 04:26:45 +01:00
movs r0, 0
add sp, 0xC
pop {r4,r5}
pop {r1}
bx r1
.pool
thumb_func_end InitMainMenu
2015-11-29 04:26:45 +01:00
thumb_func_start Task_MainMenuCheckSaveFile
2016-09-03 04:51:16 +02:00
@ void Task_MainMenuCheckSaveFile(u8 taskId)
Task_MainMenuCheckSaveFile: @ 802F8D8
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
mov r7, r8
push {r7}
lsls r0, 24
lsrs r6, r0, 24
lsls r0, r6, 2
adds r0, r6
lsls r7, r0, 3
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks + 0x8
2015-11-29 04:26:45 +01:00
mov r8, r0
adds r4, r7, r0
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
2016-01-07 05:23:20 +01:00
beq _0802F900
b _0802FA4E
_0802F900:
2015-11-29 04:26:45 +01:00
movs r0, 0x40
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x44
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x48
movs r1, 0x11
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x4A
movs r1, 0x31
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x50
movs r1, 0xC1
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x52
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x54
movs r1, 0x7
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
bl sub_80093CC
lsls r0, 24
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0802F946
2015-11-29 04:26:45 +01:00
movs r0, 0x1
strh r0, [r4, 0x1E]
2016-01-07 05:23:20 +01:00
_0802F946:
2017-09-03 22:50:17 +02:00
ldr r0, =gSaveFileStatus
2015-11-29 04:26:45 +01:00
ldrh r0, [r0]
cmp r0, 0x2
2016-01-07 05:23:20 +01:00
beq _0802F990
2015-11-29 04:26:45 +01:00
cmp r0, 0x2
2016-01-07 05:23:20 +01:00
bgt _0802F968
2015-11-29 04:26:45 +01:00
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0802F9D0
2015-11-29 04:26:45 +01:00
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
beq _0802F972
b _0802F9D0
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802F968:
2015-11-29 04:26:45 +01:00
cmp r0, 0x4
2016-01-07 05:23:20 +01:00
beq _0802F9EC
2015-11-29 04:26:45 +01:00
cmp r0, 0xFF
2016-01-07 05:23:20 +01:00
beq _0802F9A4
b _0802F9D0
_0802F972:
2015-11-29 04:26:45 +01:00
strh r0, [r4]
2017-09-02 22:31:37 +02:00
bl IsMysteryGiftEnabled
2015-11-29 04:26:45 +01:00
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0802F982
2015-11-29 04:26:45 +01:00
ldrh r0, [r4]
adds r0, 0x1
strh r0, [r4]
2016-01-07 05:23:20 +01:00
_0802F982:
2015-11-29 04:26:45 +01:00
mov r0, r8
subs r0, 0x8
adds r0, r7, r0
ldr r1, =Task_MainMenuCheckBattery
2016-01-07 05:23:20 +01:00
b _0802F9FC
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802F990:
2017-09-12 08:23:34 +02:00
ldr r0, =gText_SaveFileErased
bl CreateMainMenuErrorWindow
2015-11-29 04:26:45 +01:00
strh r5, [r4]
mov r0, r8
subs r0, 0x8
adds r0, r7, r0
2016-01-07 05:23:20 +01:00
b _0802F9FA
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802F9A4:
2017-09-12 08:23:34 +02:00
ldr r0, =gText_SaveFileCorrupted
bl CreateMainMenuErrorWindow
2015-11-29 04:26:45 +01:00
mov r0, r8
subs r0, 0x8
adds r0, r7, r0
ldr r1, =Task_WaitForSaveFileErrorWindow
2015-11-29 04:26:45 +01:00
str r1, [r0]
movs r0, 0x1
strh r0, [r4]
2017-09-02 22:31:37 +02:00
bl IsMysteryGiftEnabled
2015-11-29 04:26:45 +01:00
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
bne _0802F9FE
2015-11-29 04:26:45 +01:00
ldrh r0, [r4]
adds r0, 0x1
strh r0, [r4]
2016-01-07 05:23:20 +01:00
b _0802F9FE
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802F9D0:
2015-11-29 04:26:45 +01:00
movs r0, 0
strh r0, [r4]
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
adds r0, r1
ldr r1, =Task_MainMenuCheckBattery
2016-01-07 05:23:20 +01:00
b _0802F9FC
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802F9EC:
2017-09-12 08:23:34 +02:00
ldr r0, =gJPText_No1MSubCircuit
bl CreateMainMenuErrorWindow
2015-11-29 04:26:45 +01:00
mov r0, r8
subs r0, 0x8
adds r0, r7, r0
strh r5, [r0, 0x8]
2016-01-07 05:23:20 +01:00
_0802F9FA:
ldr r1, =Task_WaitForSaveFileErrorWindow
2016-01-07 05:23:20 +01:00
_0802F9FC:
2015-11-29 04:26:45 +01:00
str r1, [r0]
2016-01-07 05:23:20 +01:00
_0802F9FE:
2016-11-01 19:35:16 +01:00
ldr r2, =gUnknown_02022D06
2015-11-29 04:26:45 +01:00
ldrh r1, [r2]
movs r0, 0x80
lsls r0, 8
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0802FA3E
2015-11-29 04:26:45 +01:00
movs r1, 0
ldrsh r0, [r4, r1]
cmp r0, 0x2
2016-01-07 05:23:20 +01:00
beq _0802FA36
2015-11-29 04:26:45 +01:00
cmp r0, 0x2
2016-01-07 05:23:20 +01:00
ble _0802FA2C
2015-11-29 04:26:45 +01:00
cmp r0, 0x3
2016-01-07 05:23:20 +01:00
beq _0802FA3A
b _0802FA3E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802FA2C:
2015-11-29 04:26:45 +01:00
cmp r0, 0
2016-01-07 05:23:20 +01:00
blt _0802FA3E
2015-11-29 04:26:45 +01:00
ldrh r0, [r4]
adds r0, 0x1
2016-01-07 05:23:20 +01:00
b _0802FA3C
_0802FA36:
2015-11-29 04:26:45 +01:00
movs r0, 0x3
2016-01-07 05:23:20 +01:00
b _0802FA3C
_0802FA3A:
2015-11-29 04:26:45 +01:00
movs r0, 0x4
2016-01-07 05:23:20 +01:00
_0802FA3C:
2015-11-29 04:26:45 +01:00
strh r0, [r2]
2016-01-07 05:23:20 +01:00
_0802FA3E:
2015-11-29 04:26:45 +01:00
ldrh r1, [r2]
ldr r0, =0x00007fff
ands r0, r1
strh r0, [r2]
strh r0, [r4, 0x2]
ldrh r0, [r4]
adds r0, 0x2
strh r0, [r4, 0x18]
2016-01-07 05:23:20 +01:00
_0802FA4E:
2015-11-29 04:26:45 +01:00
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end Task_MainMenuCheckSaveFile
2015-11-29 04:26:45 +01:00
thumb_func_start Task_WaitForSaveFileErrorWindow
2016-09-03 04:51:16 +02:00
@ void Task_WaitForSaveFileErrorWindow(u8 taskId)
Task_WaitForSaveFileErrorWindow: @ 802FA5C
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
bl RunTextPrinters
2015-11-29 04:26:45 +01:00
movs r0, 0x7
bl IsTextPrinterActive
2015-11-29 04:26:45 +01:00
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _0802FA98
2017-02-04 01:44:06 +01:00
ldr r0, =gMain
2015-11-29 04:26:45 +01:00
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0802FA98
2015-11-29 04:26:45 +01:00
movs r0, 0x7
2015-12-03 09:17:29 +01:00
bl ClearWindowTilemap
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF070
bl sub_8032250
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =Task_MainMenuCheckBattery
2015-11-29 04:26:45 +01:00
str r1, [r0]
2016-01-07 05:23:20 +01:00
_0802FA98:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end Task_WaitForSaveFileErrorWindow
2015-11-29 04:26:45 +01:00
thumb_func_start Task_MainMenuCheckBattery
2016-09-03 04:51:16 +02:00
@ void Task_MainMenuCheckBattery(u8 taskId)
Task_MainMenuCheckBattery: @ 802FAB0
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
lsls r0, 24
lsrs r4, r0, 24
adds r5, r4, 0
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _0802FB3C
2015-11-29 04:26:45 +01:00
movs r0, 0x40
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x44
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x48
movs r1, 0x11
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x4A
movs r1, 0x31
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x50
movs r1, 0xC1
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x52
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x54
movs r1, 0x7
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2017-09-02 23:28:44 +02:00
bl RtcGetErrorStatus
2015-11-29 04:26:45 +01:00
movs r1, 0xFF
lsls r1, 4
ands r1, r0
cmp r1, 0
2016-01-07 05:23:20 +01:00
bne _0802FB28
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r4, 2
adds r1, r4
lsls r1, 3
adds r1, r0
ldr r0, =Task_DisplayMainMenu
2015-11-29 04:26:45 +01:00
str r0, [r1]
2016-01-07 05:23:20 +01:00
b _0802FB3C
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802FB28:
2017-09-12 08:23:34 +02:00
ldr r0, =gText_BatteryRunDry
bl CreateMainMenuErrorWindow
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r0, r1
ldr r1, =Task_WaitForBatteryDryErrorWindow
2015-11-29 04:26:45 +01:00
str r1, [r0]
2016-01-07 05:23:20 +01:00
_0802FB3C:
2015-11-29 04:26:45 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end Task_MainMenuCheckBattery
2015-11-29 04:26:45 +01:00
thumb_func_start Task_WaitForBatteryDryErrorWindow
2016-09-03 04:51:16 +02:00
@ void Task_WaitForBatteryDryErrorWindow(u8 taskId)
Task_WaitForBatteryDryErrorWindow: @ 802FB50
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
bl RunTextPrinters
2015-11-29 04:26:45 +01:00
movs r0, 0x7
bl IsTextPrinterActive
2015-11-29 04:26:45 +01:00
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _0802FB8C
2017-02-04 01:44:06 +01:00
ldr r0, =gMain
2015-11-29 04:26:45 +01:00
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0802FB8C
2015-11-29 04:26:45 +01:00
movs r0, 0x7
2015-12-03 09:17:29 +01:00
bl ClearWindowTilemap
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF070
bl sub_8032250
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =Task_DisplayMainMenu
2015-11-29 04:26:45 +01:00
str r1, [r0]
2016-01-07 05:23:20 +01:00
_0802FB8C:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end Task_WaitForBatteryDryErrorWindow
2015-11-29 04:26:45 +01:00
thumb_func_start Task_DisplayMainMenu
2016-09-03 04:51:16 +02:00
@ void Task_DisplayMainMenu(u8 taskId)
Task_DisplayMainMenu: @ 802FBA4
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x10
lsls r0, 24
lsrs r7, r0, 24
lsls r0, r7, 2
adds r0, r7
lsls r0, 3
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks + 0x8
2015-11-29 04:26:45 +01:00
adds r6, r0, r1
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
2016-01-07 05:23:20 +01:00
beq _0802FBCE
b _0803006C
_0802FBCE:
2015-11-29 04:26:45 +01:00
movs r0, 0x40
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x44
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x48
movs r1, 0x11
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x4A
movs r1, 0x31
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x50
movs r1, 0xC1
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x52
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x54
movs r1, 0x7
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
add r0, sp, 0xC
strh r4, [r0]
movs r1, 0xFE
movs r2, 0x2
bl LoadPalette
2015-11-29 04:26:45 +01:00
add r1, sp, 0xC
ldr r2, =0x00007fff
adds r0, r2, 0
strh r0, [r1]
adds r0, r1, 0
movs r1, 0xFA
movs r2, 0x2
bl LoadPalette
2015-11-29 04:26:45 +01:00
add r1, sp, 0xC
ldr r2, =0x0000318c
adds r0, r2, 0
strh r0, [r1]
adds r0, r1, 0
movs r1, 0xFB
movs r2, 0x2
bl LoadPalette
2015-11-29 04:26:45 +01:00
add r1, sp, 0xC
ldr r2, =0x0000675a
adds r0, r2, 0
strh r0, [r1]
adds r0, r1, 0
movs r1, 0xFC
movs r2, 0x2
bl LoadPalette
2017-01-14 20:53:20 +01:00
ldr r0, =gSaveBlock2Ptr
2015-11-29 04:26:45 +01:00
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _0802FC84
2015-11-29 04:26:45 +01:00
add r1, sp, 0xC
ldr r2, =0x00007e04
adds r0, r2, 0
strh r0, [r1]
adds r0, r1, 0
movs r1, 0xF1
movs r2, 0x2
bl LoadPalette
2016-01-07 05:23:20 +01:00
b _0802FC96
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802FC84:
2015-11-29 04:26:45 +01:00
add r1, sp, 0xC
ldr r2, =0x0000547f
adds r0, r2, 0
strh r0, [r1]
adds r0, r1, 0
movs r1, 0xF1
movs r2, 0x2
bl LoadPalette
2016-01-07 05:23:20 +01:00
_0802FC96:
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
mov r8, r0
lsls r1, r7, 2
adds r0, r1, r7
lsls r0, 3
add r0, r8
movs r2, 0x8
ldrsh r0, [r0, r2]
mov r9, r1
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
beq _0802FD44
2015-11-29 04:26:45 +01:00
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
ble _0802FCBC
2015-11-29 04:26:45 +01:00
cmp r0, 0x2
2016-01-07 05:23:20 +01:00
bne _0802FCB6
b _0802FE00
_0802FCB6:
2015-11-29 04:26:45 +01:00
cmp r0, 0x3
2016-01-07 05:23:20 +01:00
bne _0802FCBC
b _0802FEFC
_0802FCBC:
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x1
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
ldr r5, =gUnknown_082FF0E0
str r5, [sp]
movs r4, 0x1
negs r4, r4
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuNewGame
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuOption
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x1
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
movs r0, 0
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x1
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x1
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
ldr r4, =gUnknown_082FF038
ldr r5, =0x000001d5
adds r0, r4, 0
adds r1, r5, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r4, 0x8
2016-01-07 05:23:20 +01:00
b _0802FED4
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802FD44:
2015-11-29 04:26:45 +01:00
movs r0, 0x2
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x3
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x4
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
ldr r5, =gUnknown_082FF0E0
str r5, [sp]
movs r4, 0x1
negs r4, r4
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuContinue
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuNewGame
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x3
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuOption
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x4
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
bl fmt_savegame
movs r0, 0x2
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x3
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x4
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x2
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x3
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x4
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
ldr r4, =gUnknown_082FF048
ldr r5, =0x000001d5
adds r0, r4, 0
adds r1, r5, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
adds r0, 0x8
adds r1, r5, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r4, 0x10
2016-01-07 05:23:20 +01:00
b _0802FED4
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802FE00:
2015-11-29 04:26:45 +01:00
movs r0, 0x2
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x3
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x4
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x5
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
ldr r5, =gUnknown_082FF0E0
str r5, [sp]
movs r4, 0x1
negs r4, r4
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuContinue
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuNewGame
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x3
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuMysteryGift
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x4
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuOption
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x5
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
bl fmt_savegame
movs r0, 0x2
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x3
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x4
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x5
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x2
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x3
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x4
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x5
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
ldr r4, =gUnknown_082FF048
ldr r5, =0x000001d5
adds r0, r4, 0
adds r1, r5, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
adds r0, 0x8
adds r1, r5, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
adds r0, 0x10
adds r1, r5, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r4, 0x18
2016-01-07 05:23:20 +01:00
_0802FED4:
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
adds r1, r5, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2016-01-07 05:23:20 +01:00
b _0803005E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0802FEFC:
2015-11-29 04:26:45 +01:00
movs r0, 0x2
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x3
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x4
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x5
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x6
movs r1, 0xAA
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
ldr r5, =gUnknown_082FF0E0
str r5, [sp]
movs r4, 0x1
negs r4, r4
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuContinue
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuNewGame
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x3
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuMysteryGift2
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x4
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuMysteryEvents
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x5
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
str r5, [sp]
str r4, [sp, 0x4]
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MainMenuOption
2015-11-29 04:26:45 +01:00
str r0, [sp, 0x8]
movs r0, 0x6
movs r1, 0x1
movs r2, 0
movs r3, 0x1
bl box_print
bl fmt_savegame
movs r0, 0x2
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x3
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x4
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x5
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x6
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x2
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x3
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x4
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x5
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0x6
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
ldr r5, =gUnknown_082FF048
ldr r4, =0x000001d5
adds r0, r5, 0
adds r1, r4, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
adds r0, 0x8
adds r1, r4, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
adds r0, 0x10
adds r1, r4, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
adds r0, 0x18
adds r1, r4, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
adds r0, 0x20
adds r1, r4, 0
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF0F4
2016-11-01 19:35:16 +01:00
ldr r4, =gUnknown_02022D06
2015-11-29 04:26:45 +01:00
adds r1, r4, 0
2016-01-08 08:27:40 +01:00
bl AddScrollIndicatorArrowPair
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r0, 24
strh r0, [r6, 0x1A]
movs r0, 0x1A
ldrsh r1, [r6, r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
add r0, r8
2016-01-08 08:27:40 +01:00
ldr r1, =Task_ScrollIndicatorArrowPairOnMainMenu
2015-11-29 04:26:45 +01:00
str r1, [r0]
ldrh r0, [r4]
cmp r0, 0x4
2016-01-07 05:23:20 +01:00
bne _0803005E
2015-11-29 04:26:45 +01:00
movs r4, 0x80
lsls r4, 6
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2015-11-29 04:26:45 +01:00
movs r0, 0x1
adds r1, r4, 0
movs r2, 0x1
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2015-11-29 04:26:45 +01:00
movs r0, 0x1
strh r0, [r6, 0x1C]
movs r2, 0x1A
ldrsh r1, [r6, r2]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
add r0, r8
movs r1, 0x1
strh r1, [r0, 0x26]
2016-01-07 05:23:20 +01:00
_0803005E:
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
mov r2, r9
adds r1, r2, r7
lsls r1, 3
adds r1, r0
ldr r0, =Task_HighlightSelectedMainMenuItem
2015-11-29 04:26:45 +01:00
str r0, [r1]
2016-01-07 05:23:20 +01:00
_0803006C:
2015-11-29 04:26:45 +01:00
add sp, 0x10
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end Task_DisplayMainMenu
2015-11-29 04:26:45 +01:00
thumb_func_start Task_HighlightSelectedMainMenuItem
2016-09-03 04:51:16 +02:00
@ void Task_HighlightSelectedMainMenuItem(u8 taskId)
Task_HighlightSelectedMainMenuItem: @ 80300B0
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r4, r0, 2
adds r4, r0
lsls r4, 3
adds r4, r1
ldrb r0, [r4, 0x8]
ldrb r1, [r4, 0xA]
movs r3, 0x24
ldrsh r2, [r4, r3]
bl HighlightSelectedMainMenuItem
ldr r0, =Task_HandleMainMenuInput
2015-11-29 04:26:45 +01:00
str r0, [r4]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end Task_HighlightSelectedMainMenuItem
2015-11-29 04:26:45 +01:00
thumb_func_start HandleMainMenuInput
2016-09-03 04:51:16 +02:00
@ u8 HandleMainMenuInput(u8 taskId)
HandleMainMenuInput: @ 80300E0
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
sub sp, 0x4
lsls r0, 24
lsrs r0, 24
lsls r1, r0, 2
adds r1, r0
lsls r4, r1, 3
2016-11-01 19:35:16 +01:00
ldr r7, =gTasks + 0x8
2015-11-29 04:26:45 +01:00
adds r5, r4, r7
2017-02-04 01:44:06 +01:00
ldr r1, =gMain
2015-11-29 04:26:45 +01:00
ldrh r2, [r1, 0x2E]
movs r0, 0x1
ands r0, r2
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030130
2015-11-29 04:26:45 +01:00
movs r0, 0x5
2017-09-02 17:03:46 +02:00
bl PlaySE
2015-11-29 04:26:45 +01:00
bl sub_80093CC
movs r0, 0x1
negs r0, r0
movs r1, 0
str r1, [sp]
movs r2, 0
movs r3, 0x10
bl BeginNormalPaletteFade
2015-11-29 04:26:45 +01:00
adds r0, r7, 0
subs r0, 0x8
adds r0, r4, r0
ldr r1, =Task_HandleMainMenuAPressed
2015-11-29 04:26:45 +01:00
str r1, [r0]
2016-01-07 05:23:20 +01:00
b _08030240
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030130:
2015-11-29 04:26:45 +01:00
movs r0, 0x2
ands r0, r2
lsls r0, 16
lsrs r6, r0, 16
cmp r6, 0
2016-01-07 05:23:20 +01:00
beq _08030178
2015-11-29 04:26:45 +01:00
movs r0, 0x5
2017-09-02 17:03:46 +02:00
bl PlaySE
2015-11-29 04:26:45 +01:00
movs r0, 0x1
negs r0, r0
ldr r1, =0x0000ffff
str r1, [sp]
movs r1, 0
movs r2, 0
movs r3, 0x10
bl BeginNormalPaletteFade
2015-11-29 04:26:45 +01:00
movs r0, 0x40
movs r1, 0xF0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x44
movs r1, 0xA0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
adds r0, r7, 0
subs r0, 0x8
adds r0, r4, r0
ldr r1, =Task_HandleMainMenuBPressed
2015-11-29 04:26:45 +01:00
str r1, [r0]
2016-01-07 05:23:20 +01:00
b _08030240
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030178:
2015-11-29 04:26:45 +01:00
movs r0, 0x40
ands r0, r2
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _080301CA
2015-11-29 04:26:45 +01:00
movs r0, 0x2
ldrsh r2, [r5, r0]
cmp r2, 0
2016-01-07 05:23:20 +01:00
ble _080301CA
2015-11-29 04:26:45 +01:00
movs r1, 0
ldrsh r0, [r5, r1]
cmp r0, 0x3
2016-01-07 05:23:20 +01:00
bne _080301C4
2015-11-29 04:26:45 +01:00
movs r1, 0x1C
ldrsh r0, [r5, r1]
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
bne _080301C4
2015-11-29 04:26:45 +01:00
cmp r2, 0x1
2016-01-07 05:23:20 +01:00
bne _080301C4
2015-11-29 04:26:45 +01:00
movs r4, 0x80
lsls r4, 6
movs r0, 0
adds r1, r4, 0
movs r2, 0x2
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2015-11-29 04:26:45 +01:00
movs r0, 0x1
adds r1, r4, 0
movs r2, 0x2
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2015-11-29 04:26:45 +01:00
movs r2, 0x1A
ldrsh r1, [r5, r2]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r7, r0
strh r6, [r5, 0x1C]
strh r6, [r0, 0x1E]
2016-01-07 05:23:20 +01:00
_080301C4:
2015-11-29 04:26:45 +01:00
ldrh r0, [r5, 0x2]
subs r0, 0x1
2016-01-07 05:23:20 +01:00
b _0803022C
_080301CA:
2015-11-29 04:26:45 +01:00
ldrh r1, [r1, 0x2E]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030240
2015-11-29 04:26:45 +01:00
movs r0, 0x2
ldrsh r1, [r5, r0]
movs r2, 0x18
ldrsh r0, [r5, r2]
subs r0, 0x1
cmp r1, r0
2016-01-07 05:23:20 +01:00
bge _08030240
2015-11-29 04:26:45 +01:00
movs r1, 0
ldrsh r0, [r5, r1]
cmp r0, 0x3
2016-01-07 05:23:20 +01:00
bne _08030228
2015-11-29 04:26:45 +01:00
movs r2, 0x2
ldrsh r0, [r5, r2]
cmp r0, 0x3
2016-01-07 05:23:20 +01:00
bne _08030228
2015-11-29 04:26:45 +01:00
movs r1, 0x1C
ldrsh r0, [r5, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08030228
2015-11-29 04:26:45 +01:00
movs r4, 0x80
lsls r4, 6
movs r0, 0
adds r1, r4, 0
movs r2, 0x1
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2015-11-29 04:26:45 +01:00
movs r0, 0x1
adds r1, r4, 0
movs r2, 0x1
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
movs r0, 0x1A
ldrsh r1, [r5, r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r2
movs r1, 0x1
strh r1, [r5, 0x1C]
movs r1, 0x1
strh r1, [r0, 0x26]
2016-01-07 05:23:20 +01:00
_08030228:
2015-11-29 04:26:45 +01:00
ldrh r0, [r5, 0x2]
adds r0, 0x1
2016-01-07 05:23:20 +01:00
_0803022C:
2015-11-29 04:26:45 +01:00
strh r0, [r5, 0x2]
2016-11-01 19:35:16 +01:00
ldr r1, =gUnknown_02022D06
2015-11-29 04:26:45 +01:00
strh r0, [r1]
movs r0, 0x1
2016-01-07 05:23:20 +01:00
b _08030242
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030240:
2015-11-29 04:26:45 +01:00
movs r0, 0
2016-01-07 05:23:20 +01:00
_08030242:
2015-11-29 04:26:45 +01:00
add sp, 0x4
pop {r4-r7}
pop {r1}
bx r1
thumb_func_end HandleMainMenuInput
2015-11-29 04:26:45 +01:00
thumb_func_start Task_HandleMainMenuInput
2016-09-03 04:51:16 +02:00
@ void Task_HandleMainMenuInput(u8 taskId)
Task_HandleMainMenuInput: @ 803024C
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
adds r0, r4, 0
bl HandleMainMenuInput
2015-11-29 04:26:45 +01:00
lsls r0, 24
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0803026C
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r4, 2
adds r1, r4
lsls r1, 3
adds r1, r0
ldr r0, =Task_HighlightSelectedMainMenuItem
2015-11-29 04:26:45 +01:00
str r0, [r1]
2016-01-07 05:23:20 +01:00
_0803026C:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end Task_HandleMainMenuInput
2015-11-29 04:26:45 +01:00
thumb_func_start Task_HandleMainMenuAPressed
2016-09-03 04:51:16 +02:00
@ void Task_HandleMainMenuAPressed(int task_id)
Task_HandleMainMenuAPressed: @ 803027C
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
sub sp, 0x4
lsls r0, 24
lsrs r6, r0, 24
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030292
b _08030536
_08030292:
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r6, 2
adds r0, r1, r6
lsls r0, 3
adds r4, r0, r2
movs r2, 0x8
ldrsh r0, [r4, r2]
adds r7, r1, 0
cmp r0, 0x3
2016-01-07 05:23:20 +01:00
bne _080302B0
2015-11-29 04:26:45 +01:00
ldrh r0, [r4, 0x22]
lsls r0, 24
lsrs r0, 24
2016-01-08 08:27:40 +01:00
bl RemoveScrollIndicatorArrowPair
2016-01-07 05:23:20 +01:00
_080302B0:
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0x1
bl sub_819746C
movs r0, 0x1
movs r1, 0x1
bl sub_819746C
movs r0, 0x2
movs r1, 0x1
bl sub_819746C
movs r0, 0x3
movs r1, 0x1
bl sub_819746C
movs r0, 0x4
movs r1, 0x1
bl sub_819746C
movs r0, 0x5
movs r1, 0x1
bl sub_819746C
movs r0, 0x6
movs r1, 0x1
bl sub_819746C
movs r0, 0x7
movs r1, 0x1
bl sub_819746C
bl sub_80093CC
lsls r0, 24
lsrs r2, r0, 24
movs r3, 0x8
ldrsh r0, [r4, r3]
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
beq _08030324
2015-11-29 04:26:45 +01:00
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
ble _0803030C
2015-11-29 04:26:45 +01:00
cmp r0, 0x2
2016-01-07 05:23:20 +01:00
beq _08030336
2015-11-29 04:26:45 +01:00
cmp r0, 0x3
2016-01-07 05:23:20 +01:00
beq _08030358
_0803030C:
2015-11-29 04:26:45 +01:00
movs r1, 0xA
ldrsh r0, [r4, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030388
2015-11-29 04:26:45 +01:00
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
bne _08030388
b _080303D8
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030324:
2015-11-29 04:26:45 +01:00
movs r2, 0xA
ldrsh r0, [r4, r2]
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
beq _08030388
2015-11-29 04:26:45 +01:00
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
ble _08030384
2015-11-29 04:26:45 +01:00
cmp r0, 0x2
2016-01-07 05:23:20 +01:00
bne _08030384
b _080303D8
_08030336:
2015-11-29 04:26:45 +01:00
movs r3, 0xA
ldrsh r0, [r4, r3]
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
beq _08030388
2015-11-29 04:26:45 +01:00
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
ble _08030384
2015-11-29 04:26:45 +01:00
cmp r0, 0x2
2016-01-07 05:23:20 +01:00
beq _0803034C
2015-11-29 04:26:45 +01:00
cmp r0, 0x3
2016-01-07 05:23:20 +01:00
beq _080303D8
b _08030384
_0803034C:
2015-11-29 04:26:45 +01:00
movs r5, 0x3
cmp r2, 0
2016-01-07 05:23:20 +01:00
bne _080303DA
2015-11-29 04:26:45 +01:00
movs r5, 0x6
strh r2, [r4, 0x8]
2016-01-07 05:23:20 +01:00
b _080303DA
_08030358:
2015-11-29 04:26:45 +01:00
movs r1, 0xA
ldrsh r0, [r4, r1]
cmp r0, 0x4
2016-01-07 05:23:20 +01:00
bhi _08030384
2015-11-29 04:26:45 +01:00
lsls r0, 2
2016-01-07 05:23:20 +01:00
ldr r1, =_08030370
2015-11-29 04:26:45 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 05:23:20 +01:00
_08030370:
.4byte _08030384
.4byte _08030388
.4byte _0803038C
.4byte _080303BC
.4byte _080303D8
_08030384:
2015-11-29 04:26:45 +01:00
movs r5, 0x1
2016-01-07 05:23:20 +01:00
b _080303DA
_08030388:
2015-11-29 04:26:45 +01:00
movs r5, 0
2016-01-07 05:23:20 +01:00
b _080303DA
_0803038C:
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
adds r1, r7, r6
lsls r1, 3
adds r1, r0
movs r3, 0x26
ldrsh r0, [r1, r3]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _080303AC
2015-11-29 04:26:45 +01:00
movs r5, 0x3
cmp r2, 0
2016-01-07 05:23:20 +01:00
bne _080303DA
2015-11-29 04:26:45 +01:00
movs r5, 0x6
strh r2, [r1, 0x8]
2016-01-07 05:23:20 +01:00
b _080303DA
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080303AC:
2015-11-29 04:26:45 +01:00
cmp r2, 0
2016-01-07 05:23:20 +01:00
beq _080303B8
2015-11-29 04:26:45 +01:00
movs r5, 0x6
movs r0, 0x1
strh r0, [r1, 0x8]
2016-01-07 05:23:20 +01:00
b _080303DA
_080303B8:
2015-11-29 04:26:45 +01:00
movs r5, 0x5
2016-01-07 05:23:20 +01:00
b _080303DA
_080303BC:
2015-11-29 04:26:45 +01:00
cmp r2, 0
2016-01-07 05:23:20 +01:00
beq _080303D4
2015-11-29 04:26:45 +01:00
movs r5, 0x6
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
adds r1, r7, r6
lsls r1, 3
adds r1, r0
movs r0, 0x2
strh r0, [r1, 0x8]
2016-01-07 05:23:20 +01:00
b _080303DA
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080303D4:
2015-11-29 04:26:45 +01:00
movs r5, 0x4
2016-01-07 05:23:20 +01:00
b _080303DA
_080303D8:
2015-11-29 04:26:45 +01:00
movs r5, 0x2
2016-01-07 05:23:20 +01:00
_080303DA:
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0
movs r2, 0
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2015-11-29 04:26:45 +01:00
movs r0, 0x1
movs r1, 0
movs r2, 0
2015-11-30 08:17:50 +01:00
bl ChangeBgY
2015-11-29 04:26:45 +01:00
cmp r5, 0x6
2016-01-07 05:23:20 +01:00
bhi _0803041C
2015-11-29 04:26:45 +01:00
lsls r0, r5, 2
2016-01-07 05:23:20 +01:00
ldr r1, =_08030400
2015-11-29 04:26:45 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 05:23:20 +01:00
_08030400:
.4byte _0803041C
.4byte _08030444
.4byte _08030460
.4byte _08030478
.4byte _08030480
.4byte _08030488
.4byte _0803049C
_0803041C:
ldr r0, =gPlttBufferUnfaded
2015-11-29 04:26:45 +01:00
movs r1, 0
strh r1, [r0]
ldr r0, =gPlttBufferFaded
2015-11-29 04:26:45 +01:00
strh r1, [r0]
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
adds r0, r7, r6
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_1
str r1, [r0]
2016-01-07 05:23:20 +01:00
b _08030514
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030444:
ldr r0, =gPlttBufferUnfaded
2015-11-29 04:26:45 +01:00
movs r1, 0
strh r1, [r0]
ldr r0, =gPlttBufferFaded
2015-11-29 04:26:45 +01:00
strh r1, [r0]
ldr r0, =sub_8086230
2016-01-07 05:23:20 +01:00
b _0803048A
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030460:
2017-02-04 01:44:06 +01:00
ldr r0, =gMain
ldr r1, =CB2_ReinitMainMenu
2015-11-29 04:26:45 +01:00
str r1, [r0, 0x8]
ldr r0, =CB2_OptionsMenu
2016-01-07 05:23:20 +01:00
b _0803048A
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030478:
2015-11-29 04:26:45 +01:00
ldr r0, =c2_mystery_gift
2016-01-07 05:23:20 +01:00
b _0803048A
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030480:
2015-11-29 04:26:45 +01:00
ldr r0, =sub_8178974
2016-01-07 05:23:20 +01:00
b _0803048A
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030488:
2015-11-29 04:26:45 +01:00
ldr r0, =sub_801867C
2016-01-07 05:23:20 +01:00
_0803048A:
2015-11-30 08:17:50 +01:00
bl SetMainCallback2
2015-11-29 04:26:45 +01:00
adds r0, r6, 0
2016-10-31 09:14:22 +01:00
bl DestroyTask
2016-01-07 05:23:20 +01:00
b _08030514
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0803049C:
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
adds r0, r7, r6
lsls r0, 3
adds r0, r1
movs r4, 0
strh r4, [r0, 0xA]
ldr r1, =Task_DisplayMainMenuInvalidActionError
2015-11-29 04:26:45 +01:00
str r1, [r0]
ldr r0, =gPlttBufferUnfaded
2015-11-29 04:26:45 +01:00
movs r2, 0xF1
lsls r2, 1
adds r0, r2
ldr r1, =0x00007fff
strh r1, [r0]
ldr r0, =gPlttBufferFaded
2015-11-29 04:26:45 +01:00
adds r0, r2
strh r1, [r0]
movs r0, 0x18
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x1A
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x14
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x16
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x10
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x12
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x1
negs r0, r0
str r4, [sp]
movs r1, 0
movs r2, 0x10
movs r3, 0
bl BeginNormalPaletteFade
2016-01-07 05:23:20 +01:00
b _08030536
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030514:
bl FreeAllWindowBuffers
2015-11-29 04:26:45 +01:00
cmp r5, 0x2
2016-01-07 05:23:20 +01:00
beq _08030528
2016-11-01 19:35:16 +01:00
ldr r1, =gUnknown_02022D06
2015-11-29 04:26:45 +01:00
movs r0, 0
strh r0, [r1]
2016-01-07 05:23:20 +01:00
b _08030536
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030528:
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_02022D06
2015-11-29 04:26:45 +01:00
ldrh r1, [r0]
movs r3, 0x80
lsls r3, 8
adds r2, r3, 0
orrs r1, r2
strh r1, [r0]
2016-01-07 05:23:20 +01:00
_08030536:
2015-11-29 04:26:45 +01:00
add sp, 0x4
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end Task_HandleMainMenuAPressed
2015-11-29 04:26:45 +01:00
thumb_func_start Task_HandleMainMenuBPressed
2016-09-03 04:51:16 +02:00
@ void Task_HandleMainMenuBPressed(u8 taskId)
Task_HandleMainMenuBPressed: @ 8030544
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
lsls r0, 24
lsrs r2, r0, 24
adds r5, r2, 0
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
lsls r0, 24
lsrs r4, r0, 24
cmp r4, 0
2016-01-07 05:23:20 +01:00
bne _0803058C
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r2, 2
adds r1, r2
lsls r1, 3
adds r1, r0
movs r2, 0x8
ldrsh r0, [r1, r2]
cmp r0, 0x3
2016-01-07 05:23:20 +01:00
bne _08030578
2015-11-29 04:26:45 +01:00
ldrh r0, [r1, 0x22]
lsls r0, 24
lsrs r0, 24
2016-01-08 08:27:40 +01:00
bl RemoveScrollIndicatorArrowPair
2016-01-07 05:23:20 +01:00
_08030578:
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_02022D06
2015-11-29 04:26:45 +01:00
strh r4, [r0]
bl FreeAllWindowBuffers
2015-11-29 04:26:45 +01:00
ldr r0, =c2_title_screen_1
2015-11-30 08:17:50 +01:00
bl SetMainCallback2
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
2016-10-31 09:14:22 +01:00
bl DestroyTask
2016-01-07 05:23:20 +01:00
_0803058C:
2015-11-29 04:26:45 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end Task_HandleMainMenuBPressed
2015-11-29 04:26:45 +01:00
thumb_func_start Task_DisplayMainMenuInvalidActionError
2016-09-03 04:51:16 +02:00
@ void Task_DisplayMainMenuInvalidActionError(u8 taskId)
Task_DisplayMainMenuInvalidActionError: @ 80305A4
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
sub sp, 0x8
lsls r0, 24
lsrs r5, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r4, r0, r1
movs r0, 0xA
ldrsh r1, [r4, r0]
cmp r1, 0x1
2016-01-07 05:23:20 +01:00
beq _0803063C
2015-11-29 04:26:45 +01:00
cmp r1, 0x1
2016-01-07 05:23:20 +01:00
bgt _080305CC
2015-11-29 04:26:45 +01:00
cmp r1, 0
2016-01-07 05:23:20 +01:00
beq _080305D6
b _08030688
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080305CC:
2015-11-29 04:26:45 +01:00
cmp r1, 0x2
2016-01-07 05:23:20 +01:00
beq _0803064C
2015-11-29 04:26:45 +01:00
cmp r1, 0x3
2016-01-07 05:23:20 +01:00
beq _08030664
b _08030688
_080305D6:
2015-11-29 04:26:45 +01:00
movs r0, 0x1E
str r0, [sp]
movs r0, 0x14
str r0, [sp, 0x4]
movs r0, 0
movs r1, 0
movs r2, 0
movs r3, 0
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect_Palette0
2015-11-29 04:26:45 +01:00
movs r1, 0x8
ldrsh r0, [r4, r1]
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
beq _08030610
2015-11-29 04:26:45 +01:00
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
bgt _080305FC
2015-11-29 04:26:45 +01:00
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030602
b _08030622
_080305FC:
2015-11-29 04:26:45 +01:00
cmp r0, 0x2
2016-01-07 05:23:20 +01:00
beq _0803061C
b _08030622
_08030602:
2017-09-12 08:23:34 +02:00
ldr r0, =gText_WirelessNotConnected
bl CreateMainMenuErrorWindow
2016-01-07 05:23:20 +01:00
b _08030622
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030610:
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MysteryGiftCantUse
bl CreateMainMenuErrorWindow
2016-01-07 05:23:20 +01:00
b _08030622
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0803061C:
2017-09-12 08:23:34 +02:00
ldr r0, =gText_MysteryEventsCantUse
bl CreateMainMenuErrorWindow
2016-01-07 05:23:20 +01:00
_08030622:
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r5, 2
adds r1, r5
lsls r1, 3
adds r1, r0
ldrh r0, [r1, 0xA]
adds r0, 0x1
strh r0, [r1, 0xA]
2016-01-07 05:23:20 +01:00
b _08030688
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0803063C:
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
2016-01-07 05:23:20 +01:00
b _08030658
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0803064C:
bl RunTextPrinters
2015-11-29 04:26:45 +01:00
movs r0, 0x7
bl IsTextPrinterActive
2015-11-29 04:26:45 +01:00
lsls r0, 16
2016-01-07 05:23:20 +01:00
_08030658:
2015-11-29 04:26:45 +01:00
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08030688
2015-11-29 04:26:45 +01:00
ldrh r0, [r4, 0xA]
adds r0, 0x1
strh r0, [r4, 0xA]
2016-01-07 05:23:20 +01:00
b _08030688
_08030664:
2017-02-04 01:44:06 +01:00
ldr r0, =gMain
2015-11-29 04:26:45 +01:00
ldrh r0, [r0, 0x2E]
ands r1, r0
cmp r1, 0
2016-01-07 05:23:20 +01:00
beq _08030688
2015-11-29 04:26:45 +01:00
movs r0, 0x5
2017-09-02 17:03:46 +02:00
bl PlaySE
2015-11-29 04:26:45 +01:00
movs r0, 0x1
negs r0, r0
movs r1, 0
str r1, [sp]
movs r2, 0
movs r3, 0x10
bl BeginNormalPaletteFade
ldr r0, =Task_HandleMainMenuBPressed
2015-11-29 04:26:45 +01:00
str r0, [r4]
2016-01-07 05:23:20 +01:00
_08030688:
2015-11-29 04:26:45 +01:00
add sp, 0x8
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end Task_DisplayMainMenuInvalidActionError
2015-11-29 04:26:45 +01:00
thumb_func_start HighlightSelectedMainMenuItem
2016-09-03 04:51:16 +02:00
@ void HighlightSelectedMainMenuItem(u8 a1, u8 selectedMenuItem, u16 a3)
HighlightSelectedMainMenuItem: @ 8030698
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
lsls r0, 24
lsrs r5, r0, 24
lsls r1, 24
lsrs r4, r1, 24
lsls r2, 16
lsrs r6, r2, 16
ldr r1, =0x000009e7
movs r0, 0x40
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
cmp r5, 0x1
2016-01-07 05:23:20 +01:00
beq _080306DC
2015-11-29 04:26:45 +01:00
cmp r5, 0x1
2016-01-07 05:23:20 +01:00
ble _080306BE
2015-11-29 04:26:45 +01:00
cmp r5, 0x2
2016-01-07 05:23:20 +01:00
beq _08030700
2015-11-29 04:26:45 +01:00
cmp r5, 0x3
2016-01-07 05:23:20 +01:00
beq _08030728
_080306BE:
2015-11-29 04:26:45 +01:00
cmp r4, 0
2016-01-07 05:23:20 +01:00
beq _080306C6
2015-11-29 04:26:45 +01:00
cmp r4, 0x1
2016-01-07 05:23:20 +01:00
beq _080306D4
_080306C6:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000011f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080306D4:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000213f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080306DC:
2015-11-29 04:26:45 +01:00
cmp r4, 0x1
2016-01-07 05:23:20 +01:00
beq _080306F0
2015-11-29 04:26:45 +01:00
cmp r4, 0x1
2016-01-07 05:23:20 +01:00
ble _080306E8
2015-11-29 04:26:45 +01:00
cmp r4, 0x2
2016-01-07 05:23:20 +01:00
beq _080306F8
_080306E8:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000013f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080306F0:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000415f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080306F8:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000617f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030700:
2015-11-29 04:26:45 +01:00
cmp r4, 0x1
2016-01-07 05:23:20 +01:00
beq _08030718
2015-11-29 04:26:45 +01:00
cmp r4, 0x1
2016-01-07 05:23:20 +01:00
ble _08030710
2015-11-29 04:26:45 +01:00
cmp r4, 0x2
2016-01-07 05:23:20 +01:00
beq _08030720
2015-11-29 04:26:45 +01:00
cmp r4, 0x3
2016-01-07 05:23:20 +01:00
beq _0803078C
_08030710:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000013f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030718:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000415f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030720:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000617f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030728:
2015-11-29 04:26:45 +01:00
cmp r4, 0x4
2016-01-07 05:23:20 +01:00
bhi _08030750
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
2016-01-07 05:23:20 +01:00
ldr r1, =_0803073C
2015-11-29 04:26:45 +01:00
adds r0, r1
ldr r0, [r0]
mov pc, r0
.pool
.align 2, 0
2016-01-07 05:23:20 +01:00
_0803073C:
.4byte _08030750
.4byte _08030758
.4byte _0803076C
.4byte _08030780
.4byte _0803079C
_08030750:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000013f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030758:
2015-11-29 04:26:45 +01:00
cmp r6, 0
2016-01-07 05:23:20 +01:00
beq _08030764
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000213f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030764:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000415f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0803076C:
2015-11-29 04:26:45 +01:00
cmp r6, 0
2016-01-07 05:23:20 +01:00
beq _08030778
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000415f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030778:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000617f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030780:
2015-11-29 04:26:45 +01:00
cmp r6, 0
2016-01-07 05:23:20 +01:00
beq _0803078C
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000617f
2016-01-07 05:23:20 +01:00
b _0803078E
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0803078C:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000819f
2016-01-07 05:23:20 +01:00
_0803078E:
2015-11-29 04:26:45 +01:00
movs r0, 0x44
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2016-01-07 05:23:20 +01:00
b _080307A4
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0803079C:
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000819f
movs r0, 0x44
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2016-01-07 05:23:20 +01:00
_080307A4:
2015-11-29 04:26:45 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end HighlightSelectedMainMenuItem
2015-11-29 04:26:45 +01:00
thumb_func_start task_new_game_prof_birch_speech_1
2016-09-03 04:51:16 +02:00
@ void task_new_game_prof_birch_speech_1(int task_id)
task_new_game_prof_birch_speech_1: @ 80307B0
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
sub sp, 0x4
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
movs r0, 0
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r1, 0x82
lsls r1, 5
movs r0, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF0F0
2015-11-30 08:17:50 +01:00
bl InitBgFromTemplate
2015-11-29 04:26:45 +01:00
movs r0, 0x40
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x44
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x48
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x4A
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x50
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x52
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x54
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
ldr r0, =gBirchIntroShadowGfx
2015-11-29 04:26:45 +01:00
movs r1, 0xC0
lsls r1, 19
bl LZ77UnCompVram
ldr r0, =gUnknown_082FEEF0
ldr r1, =0x06003800
bl LZ77UnCompVram
ldr r0, =gUnknown_082FECFC
movs r1, 0
movs r2, 0x40
bl LoadPalette
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF028
movs r1, 0x1
movs r2, 0x10
bl LoadPalette
2015-11-29 04:26:45 +01:00
bl remove_some_task
2017-09-02 00:21:11 +02:00
bl ResetSpriteData
2017-09-02 13:11:19 +02:00
bl FreeAllSpritePalettes
2015-11-29 04:26:45 +01:00
bl dp13_810BB8C
adds r0, r4, 0
2015-11-30 08:17:50 +01:00
bl AddBirchSpeechObjects
2015-11-29 04:26:45 +01:00
movs r0, 0x1
negs r0, r0
movs r5, 0
str r5, [sp]
movs r1, 0
movs r2, 0x10
movs r3, 0
bl BeginNormalPaletteFade
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
strh r5, [r0, 0x10]
ldr r1, =task_new_game_prof_birch_speech_2
str r1, [r0]
movs r1, 0xFF
strh r1, [r0, 0xC]
strh r1, [r0, 0xE]
movs r1, 0xD8
strh r1, [r0, 0x16]
movs r0, 0xBB
lsls r0, 1
2017-09-02 16:03:53 +02:00
bl PlayBGM
2015-11-29 04:26:45 +01:00
movs r0, 0
2015-11-30 08:17:50 +01:00
bl ShowBg
2015-11-29 04:26:45 +01:00
movs r0, 0x1
2015-11-30 08:17:50 +01:00
bl ShowBg
2015-11-29 04:26:45 +01:00
add sp, 0x4
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_1
thumb_func_start task_new_game_prof_birch_speech_2
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_2: @ 80308B0
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r4, r0, r1
ldrh r1, [r4, 0x16]
movs r2, 0x16
ldrsh r0, [r4, r2]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _080308D4
2015-11-29 04:26:45 +01:00
subs r0, r1, 0x1
strh r0, [r4, 0x16]
2016-01-07 05:23:20 +01:00
b _0803091A
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080308D4:
2015-11-29 04:26:45 +01:00
ldrb r0, [r4, 0x18]
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2015-11-29 04:26:45 +01:00
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r2
movs r0, 0x88
strh r0, [r1, 0x20]
movs r0, 0x3C
strh r0, [r1, 0x22]
adds r3, r1, 0
adds r3, 0x3E
ldrb r2, [r3]
subs r0, 0x41
ands r0, r2
strb r0, [r3]
ldrb r2, [r1, 0x1]
movs r0, 0xD
negs r0, r0
ands r0, r2
movs r2, 0x4
orrs r0, r2
strb r0, [r1, 0x1]
adds r0, r5, 0
movs r1, 0xA
bl sub_8031BAC
adds r0, r5, 0
movs r1, 0x14
bl sub_8031D34
movs r0, 0x50
strh r0, [r4, 0x16]
ldr r0, =task_new_game_prof_birch_speech_3
str r0, [r4]
2016-01-07 05:23:20 +01:00
_0803091A:
2015-11-29 04:26:45 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_2
thumb_func_start task_new_game_prof_birch_speech_3
2016-09-03 04:51:16 +02:00
@ int task_new_game_prof_birch_speech_3()
task_new_game_prof_birch_speech_3: @ 8030928
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r4, r1, r2
movs r1, 0x12
ldrsh r0, [r4, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _080309B6
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2015-11-29 04:26:45 +01:00
movs r1, 0x18
ldrsh r0, [r4, r1]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r2
ldrb r2, [r1, 0x1]
movs r0, 0xD
negs r0, r0
ands r0, r2
strb r0, [r1, 0x1]
ldrh r1, [r4, 0x16]
movs r2, 0x16
ldrsh r0, [r4, r2]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030970
2015-11-29 04:26:45 +01:00
subs r0, r1, 0x1
strh r0, [r4, 0x16]
2016-01-07 05:23:20 +01:00
b _080309B6
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030970:
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF080
bl InitWindows
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0xF3
bl LoadMainMenuWindowFrameTiles
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0xFC
movs r2, 0xF0
bl copy_textbox_border_tile_patterns_to_vram
movs r0, 0
movs r1, 0x1
bl unknown_rbox_to_vram
movs r0, 0
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
movs r0, 0
bl sub_8032318
2017-01-14 20:53:20 +01:00
ldr r0, =gStringVar4
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082C897B
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl AddTextPrinterForMessage
2015-11-29 04:26:45 +01:00
ldr r0, =task_new_game_prof_birch_speech_4
str r0, [r4]
2016-01-07 05:23:20 +01:00
_080309B6:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_3
thumb_func_start task_new_game_prof_birch_speech_4
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_4: @ 80309CC
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08030A0A
2015-11-29 04:26:45 +01:00
bl sub_8197224
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08030A0A
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_5
str r1, [r0]
2017-01-14 20:53:20 +01:00
ldr r0, =gStringVar4
2017-09-12 08:23:34 +02:00
ldr r1, =gText_ThisIsAPokemon
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
ldr r1, =sub_80323A0
movs r0, 0x1
bl AddTextPrinterWithCallbackForMessage
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_03000DD0
2015-11-29 04:26:45 +01:00
strb r4, [r0]
2016-01-07 05:23:20 +01:00
_08030A0A:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_4
thumb_func_start task_new_game_prof_birch_speech_5
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_5: @ 8030A2C
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
bl sub_8197224
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08030A58
2017-01-14 20:53:20 +01:00
ldr r0, =gStringVar4
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082C8A1F
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl AddTextPrinterForMessage
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_6
str r1, [r0]
2016-01-07 05:23:20 +01:00
_08030A58:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_5
thumb_func_start sub_8030A70
2016-09-03 04:51:16 +02:00
sub_8030A70: @ 8030A70
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x14
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
2016-11-01 19:35:16 +01:00
ldr r6, =gTasks
ldr r0, =gUnknown_03000DD0
2015-11-29 04:26:45 +01:00
mov r8, r0
ldrb r1, [r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r6
ldrb r0, [r0, 0x1A]
2017-08-31 16:48:24 +02:00
ldr r1, =gSprites
2015-11-29 04:26:45 +01:00
lsls r2, r0, 4
adds r2, r0
lsls r2, 2
adds r2, r1
movs r5, 0
movs r1, 0x64
strh r1, [r2, 0x20]
movs r1, 0x4B
strh r1, [r2, 0x22]
movs r1, 0x3E
adds r1, r2
mov r12, r1
ldrb r3, [r1]
movs r1, 0x5
negs r1, r1
ands r1, r3
mov r3, r12
strb r1, [r3]
strh r5, [r2, 0x2E]
ldrb r1, [r2, 0x5]
lsrs r1, 4
str r5, [sp]
str r5, [sp, 0x4]
movs r2, 0x20
str r2, [sp, 0x8]
ldr r2, =0x0000ffff
str r2, [sp, 0xC]
ldr r2, =0x00000127
str r2, [sp, 0x10]
movs r2, 0x70
movs r3, 0x3A
2017-12-02 20:38:26 +01:00
bl CreatePokeballSpriteToReleaseMon
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r6
ldr r1, =sub_8030B14
str r1, [r0]
mov r0, r8
ldrb r1, [r0]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r0, r6
strh r5, [r0, 0x16]
add sp, 0x14
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8030A70
thumb_func_start sub_8030B14
2016-09-03 04:51:16 +02:00
sub_8030B14: @ 8030B14
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
mov r7, r8
push {r7}
lsls r0, 24
lsrs r4, r0, 24
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks + 0x8
2015-11-29 04:26:45 +01:00
adds r5, r0, r1
subs r1, 0x8
mov r8, r1
2016-11-01 19:35:16 +01:00
ldr r2, =gUnknown_03000DD0
2015-11-29 04:26:45 +01:00
ldrb r1, [r2]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
mov r1, r8
adds r6, r0, r1
movs r0, 0x1A
ldrsh r1, [r6, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
2017-08-31 16:48:24 +02:00
ldr r1, =gSprites
2015-11-29 04:26:45 +01:00
adds r3, r0, r1
movs r1, 0
ldrsh r0, [r5, r1]
adds r7, r2, 0
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030B64
2015-11-29 04:26:45 +01:00
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
beq _08030B7C
b _08030B98
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030B64:
2015-11-29 04:26:45 +01:00
ldr r1, [r3, 0x1C]
2017-09-01 23:40:13 +02:00
ldr r0, =SpriteCallbackDummy
2015-11-29 04:26:45 +01:00
cmp r1, r0
2016-01-07 05:23:20 +01:00
bne _08030BBA
2015-11-29 04:26:45 +01:00
ldrb r1, [r3, 0x1]
movs r0, 0x4
negs r0, r0
ands r0, r1
strb r0, [r3, 0x1]
2016-01-07 05:23:20 +01:00
b _08030B98
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030B7C:
2015-11-29 04:26:45 +01:00
movs r1, 0x16
ldrsh r0, [r6, r1]
cmp r0, 0x5F
2016-01-07 05:23:20 +01:00
ble _08030BBA
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
2016-10-31 09:14:22 +01:00
bl DestroyTask
2015-11-29 04:26:45 +01:00
ldrb r1, [r7]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
mov r1, r8
adds r2, r0, r1
2016-01-07 05:23:20 +01:00
b _08030BAA
_08030B98:
2015-11-29 04:26:45 +01:00
ldrh r0, [r5]
adds r0, 0x1
strh r0, [r5]
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
ldrb r1, [r7]
lsls r0, r1, 2
adds r0, r1
lsls r0, 3
adds r2, r0, r2
2016-01-07 05:23:20 +01:00
_08030BAA:
2015-11-29 04:26:45 +01:00
ldrh r3, [r2, 0x16]
movs r0, 0x16
ldrsh r1, [r2, r0]
ldr r0, =0x00003fff
cmp r1, r0
2016-01-07 05:23:20 +01:00
bgt _08030BBA
2015-11-29 04:26:45 +01:00
adds r0, r3, 0x1
strh r0, [r2, 0x16]
2016-01-07 05:23:20 +01:00
_08030BBA:
2015-11-29 04:26:45 +01:00
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8030B14
thumb_func_start task_new_game_prof_birch_speech_6
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_6: @ 8030BCC
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
bl sub_8197224
lsls r0, 16
lsrs r1, r0, 16
cmp r1, 0
2016-01-07 05:23:20 +01:00
bne _08030BFE
2016-11-01 19:35:16 +01:00
ldr r0, =gUnknown_02022D04
2015-11-29 04:26:45 +01:00
strb r1, [r0]
2017-01-14 20:53:20 +01:00
ldr r0, =gStringVar4
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082C8BD0
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl AddTextPrinterForMessage
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_7
str r1, [r0]
2016-01-07 05:23:20 +01:00
_08030BFE:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_6
thumb_func_start task_new_game_prof_birch_speech_7
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_7: @ 8030C18
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
lsls r0, 24
lsrs r6, r0, 24
bl sub_8197224
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08030C7C
2017-08-31 16:48:24 +02:00
ldr r5, =gSprites
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r4, r6, 2
adds r4, r6
lsls r4, 3
adds r4, r0
movs r1, 0x18
ldrsh r0, [r4, r1]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r5
ldrb r3, [r1, 0x1]
movs r2, 0xD
negs r2, r2
adds r0, r2, 0
ands r0, r3
movs r3, 0x4
orrs r0, r3
strb r0, [r1, 0x1]
movs r0, 0x1A
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
ldrb r1, [r0, 0x1]
ands r2, r1
orrs r2, r3
strb r2, [r0, 0x1]
adds r0, r6, 0
movs r1, 0x2
bl sub_8031ACC
adds r0, r6, 0
movs r1, 0x1
bl sub_8031C88
movs r0, 0x40
strh r0, [r4, 0x16]
ldr r0, =task_new_game_prof_birch_speech_8
str r0, [r4]
2016-01-07 05:23:20 +01:00
_08030C7C:
2015-11-29 04:26:45 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_7
thumb_func_start task_new_game_prof_birch_speech_8
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_8: @ 8030C90
2015-11-29 04:26:45 +01:00
push {lr}
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r2, r1, r2
ldrh r3, [r2, 0x10]
movs r0, 0x10
ldrsh r1, [r2, r0]
movs r0, 0x3C
negs r0, r0
cmp r1, r0
2016-01-07 05:23:20 +01:00
beq _08030CC0
2015-11-29 04:26:45 +01:00
subs r0, r3, 0x2
strh r0, [r2, 0x10]
ldrh r1, [r2, 0x10]
movs r0, 0x14
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2016-01-07 05:23:20 +01:00
b _08030CC8
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030CC0:
2015-11-29 04:26:45 +01:00
ldr r0, =0x0000ffc4
strh r0, [r2, 0x10]
ldr r0, =task_new_game_prof_birch_speech_9
str r0, [r2]
2016-01-07 05:23:20 +01:00
_08030CC8:
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_8
thumb_func_start task_new_game_prof_birch_speech_9
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_9: @ 8030CD4
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
lsls r0, 24
lsrs r0, 24
adds r5, r0, 0
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r4, r0, r1
movs r1, 0x12
ldrsh r0, [r4, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030D7A
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2015-11-29 04:26:45 +01:00
movs r0, 0x18
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
adds r0, 0x3E
ldrb r1, [r0]
movs r7, 0x4
orrs r1, r7
strb r1, [r0]
movs r0, 0x1A
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
adds r0, 0x3E
ldrb r1, [r0]
orrs r1, r7
strb r1, [r0]
ldrh r0, [r4, 0x16]
movs r1, 0x16
ldrsh r6, [r4, r1]
cmp r6, 0
2016-01-07 05:23:20 +01:00
beq _08030D34
2015-11-29 04:26:45 +01:00
subs r0, 0x1
strh r0, [r4, 0x16]
2016-01-07 05:23:20 +01:00
b _08030D7A
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030D34:
2015-11-29 04:26:45 +01:00
ldrb r3, [r4, 0x1C]
lsls r1, r3, 4
adds r1, r3
lsls r1, 2
adds r1, r2
movs r0, 0xB4
strh r0, [r1, 0x20]
movs r0, 0x3C
strh r0, [r1, 0x22]
movs r2, 0x3E
adds r2, r1
mov r12, r2
ldrb r2, [r2]
subs r0, 0x41
ands r0, r2
mov r2, r12
strb r0, [r2]
ldrb r2, [r1, 0x1]
movs r0, 0xD
negs r0, r0
ands r0, r2
orrs r0, r7
strb r0, [r1, 0x1]
strh r3, [r4, 0xC]
strh r6, [r4, 0x14]
adds r0, r5, 0
movs r1, 0x2
bl sub_8031BAC
adds r0, r5, 0
movs r1, 0x1
bl sub_8031D34
ldr r0, =task_new_game_prof_birch_speech_10
str r0, [r4]
2016-01-07 05:23:20 +01:00
_08030D7A:
2015-11-29 04:26:45 +01:00
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_9
thumb_func_start task_new_game_prof_birch_speech_10
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_10: @ 8030D84
2015-11-29 04:26:45 +01:00
push {lr}
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r3, r1, r2
movs r1, 0x12
ldrsh r0, [r3, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030DB8
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2015-11-29 04:26:45 +01:00
movs r1, 0xC
ldrsh r0, [r3, r1]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r2
ldrb r2, [r1, 0x1]
movs r0, 0xD
negs r0, r0
ands r0, r2
strb r0, [r1, 0x1]
ldr r0, =task_new_game_prof_birch_speech_11
str r0, [r3]
2016-01-07 05:23:20 +01:00
_08030DB8:
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_10
thumb_func_start task_new_game_prof_birch_speech_11
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_11: @ 8030DC8
2015-11-29 04:26:45 +01:00
push {r4,lr}
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
movs r0, 0
bl sub_8032318
2017-01-14 20:53:20 +01:00
ldr r0, =gStringVar4
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082C8BDD
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl AddTextPrinterForMessage
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_12
str r1, [r0]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_11
thumb_func_start task_new_game_prof_birch_speech_12
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_12: @ 8030E08
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
bl sub_8197224
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08030E2A
2015-11-29 04:26:45 +01:00
bl sub_8031D74
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r4, 2
adds r1, r4
lsls r1, 3
adds r1, r0
ldr r0, =task_new_game_prof_birch_speech_13
str r0, [r1]
2016-01-07 05:23:20 +01:00
_08030E2A:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_12
thumb_func_start task_new_game_prof_birch_speech_13
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_13: @ 8030E38
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
bl sub_8031DB4
lsls r0, 24
asrs r4, r0, 24
cmp r4, 0
2016-01-07 05:23:20 +01:00
beq _08030E52
2015-11-29 04:26:45 +01:00
cmp r4, 0x1
2016-01-07 05:23:20 +01:00
beq _08030E52
2015-11-29 04:26:45 +01:00
lsls r4, r5, 2
2016-01-07 05:23:20 +01:00
b _08030E76
_08030E52:
2015-11-29 04:26:45 +01:00
movs r0, 0x5
2017-09-02 17:03:46 +02:00
bl PlaySE
2017-01-14 20:53:20 +01:00
ldr r0, =gSaveBlock2Ptr
2015-11-29 04:26:45 +01:00
ldr r0, [r0]
strb r4, [r0, 0x8]
movs r0, 0x1
movs r1, 0x1
bl sub_80322E0
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r2, r5, 2
adds r0, r2, r5
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_14
str r1, [r0]
adds r4, r2, 0
2016-01-07 05:23:20 +01:00
_08030E76:
2015-11-29 04:26:45 +01:00
bl GetMenuCursorPos
lsls r0, 24
lsrs r3, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
adds r0, r4, r5
lsls r0, 3
adds r4, r0, r1
movs r1, 0x14
ldrsh r0, [r4, r1]
cmp r3, r0
2016-01-07 05:23:20 +01:00
beq _08030EB8
2015-11-29 04:26:45 +01:00
strh r3, [r4, 0x14]
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2015-11-29 04:26:45 +01:00
movs r0, 0xC
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r2, [r0, 0x1]
movs r1, 0xD
negs r1, r1
ands r1, r2
movs r2, 0x4
orrs r1, r2
strb r1, [r0, 0x1]
adds r0, r5, 0
movs r1, 0
bl sub_8031ACC
ldr r0, =sub_8030ED4
str r0, [r4]
2016-01-07 05:23:20 +01:00
_08030EB8:
2015-11-29 04:26:45 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_13
thumb_func_start sub_8030ED4
2016-09-03 04:51:16 +02:00
sub_8030ED4: @ 8030ED4
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
lsls r0, 24
lsrs r6, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
adds r4, r0, r1
ldrb r5, [r4, 0xC]
movs r2, 0x12
ldrsh r0, [r4, r2]
adds r7, r1, 0
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08030F0C
2017-08-31 16:48:24 +02:00
ldr r0, =gSprites
2015-11-29 04:26:45 +01:00
lsls r1, r5, 4
adds r1, r5
lsls r1, 2
adds r1, r0
ldrh r0, [r1, 0x20]
adds r0, 0x4
strh r0, [r1, 0x20]
2016-01-07 05:23:20 +01:00
b _08030F72
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030F0C:
2017-08-31 16:48:24 +02:00
ldr r3, =gSprites
2015-11-29 04:26:45 +01:00
lsls r0, r5, 4
adds r0, r5
lsls r0, 2
adds r0, r3
adds r0, 0x3E
ldrb r1, [r0]
movs r2, 0x4
orrs r1, r2
strb r1, [r0]
movs r1, 0x14
ldrsh r0, [r4, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030F30
2015-11-29 04:26:45 +01:00
ldrb r5, [r4, 0x1E]
2016-01-07 05:23:20 +01:00
b _08030F32
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030F30:
2015-11-29 04:26:45 +01:00
ldrb r5, [r4, 0x1C]
2016-01-07 05:23:20 +01:00
_08030F32:
2015-11-29 04:26:45 +01:00
lsls r2, r5, 4
adds r2, r5
lsls r2, 2
adds r2, r3
movs r0, 0xF0
strh r0, [r2, 0x20]
movs r0, 0x3C
strh r0, [r2, 0x22]
adds r3, r2, 0
adds r3, 0x3E
ldrb r1, [r3]
subs r0, 0x41
ands r0, r1
strb r0, [r3]
lsls r4, r6, 2
adds r4, r6
lsls r4, 3
adds r4, r7
strh r5, [r4, 0xC]
ldrb r1, [r2, 0x1]
movs r0, 0xD
negs r0, r0
ands r0, r1
movs r1, 0x4
orrs r0, r1
strb r0, [r2, 0x1]
adds r0, r6, 0
movs r1, 0
bl sub_8031BAC
ldr r0, =sub_8030F7C
str r0, [r4]
2016-01-07 05:23:20 +01:00
_08030F72:
2015-11-29 04:26:45 +01:00
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8030ED4
thumb_func_start sub_8030F7C
2016-09-03 04:51:16 +02:00
sub_8030F7C: @ 8030F7C
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r3, r1, r2
ldrb r1, [r3, 0xC]
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2015-11-29 04:26:45 +01:00
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r2, r0, r2
ldrh r1, [r2, 0x20]
movs r4, 0x20
ldrsh r0, [r2, r4]
cmp r0, 0xB4
2016-01-07 05:23:20 +01:00
ble _08030FB0
2015-11-29 04:26:45 +01:00
subs r0, r1, 0x4
strh r0, [r2, 0x20]
2016-01-07 05:23:20 +01:00
b _08030FCA
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08030FB0:
2015-11-29 04:26:45 +01:00
movs r0, 0xB4
strh r0, [r2, 0x20]
movs r1, 0x12
ldrsh r0, [r3, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08030FCA
2015-11-29 04:26:45 +01:00
ldrb r0, [r2, 0x1]
movs r1, 0xD
negs r1, r1
ands r1, r0
strb r1, [r2, 0x1]
ldr r0, =task_new_game_prof_birch_speech_13
str r0, [r3]
2016-01-07 05:23:20 +01:00
_08030FCA:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8030F7C
thumb_func_start task_new_game_prof_birch_speech_14
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_14: @ 8030FD4
2015-11-29 04:26:45 +01:00
push {r4,lr}
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
movs r0, 0
bl sub_8032318
2017-01-14 20:53:20 +01:00
ldr r0, =gStringVar4
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082C8BFF
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl AddTextPrinterForMessage
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_15
str r1, [r0]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_14
thumb_func_start task_new_game_prof_birch_speech_15
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_15: @ 8031014
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
bl sub_8197224
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08031032
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r4, 2
adds r1, r4
lsls r1, 3
adds r1, r0
ldr r0, =task_new_game_prof_birch_speech_16
str r0, [r1]
2016-01-07 05:23:20 +01:00
_08031032:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_15
thumb_func_start task_new_game_prof_birch_speech_16
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_16: @ 8031040
2015-11-29 04:26:45 +01:00
push {r4,lr}
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
2017-02-04 01:44:06 +01:00
ldr r0, =gMain
2015-11-29 04:26:45 +01:00
ldrh r1, [r0, 0x2E]
movs r0, 0x1
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _0803105C
2015-11-29 04:26:45 +01:00
movs r0, 0x2
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0803107A
_0803105C:
2015-11-29 04:26:45 +01:00
movs r0, 0x1
negs r0, r0
movs r1, 0
str r1, [sp]
movs r2, 0
movs r3, 0x10
bl BeginNormalPaletteFade
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_17
str r1, [r0]
2016-01-07 05:23:20 +01:00
_0803107A:
2015-11-29 04:26:45 +01:00
add sp, 0x4
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_16
thumb_func_start task_new_game_prof_birch_speech_17
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_17: @ 8031090
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
lsls r0, 24
lsrs r5, r0, 24
cmp r5, 0
2016-01-07 05:23:20 +01:00
bne _080310EC
bl FreeAllWindowBuffers
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldrh r0, [r0, 0x1A]
bl sub_818D820
bl Random
2015-11-29 04:26:45 +01:00
lsls r0, 16
lsrs r0, 16
movs r1, 0x14
bl __umodsi3
lsls r0, 24
lsrs r0, 24
bl set_default_player_name
adds r0, r4, 0
2016-10-31 09:14:22 +01:00
bl DestroyTask
2017-01-14 20:53:20 +01:00
ldr r0, =gSaveBlock2Ptr
2015-11-29 04:26:45 +01:00
ldr r1, [r0]
ldrb r2, [r1, 0x8]
str r5, [sp]
ldr r0, =new_game_prof_birch_speech_part2_start
str r0, [sp, 0x4]
movs r0, 0
movs r3, 0
2017-09-18 23:48:47 +02:00
bl DoNamingScreen
2016-01-07 05:23:20 +01:00
_080310EC:
2015-11-29 04:26:45 +01:00
add sp, 0x8
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_17
thumb_func_start task_new_game_prof_birch_speech_part2_2
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_2: @ 8031104
2015-11-29 04:26:45 +01:00
push {r4,lr}
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
movs r0, 0
bl sub_8032318
2017-01-14 20:53:20 +01:00
ldr r0, =gStringVar4
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082C8C1C
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl AddTextPrinterForMessage
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_part2_3
str r1, [r0]
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_2
thumb_func_start task_new_game_prof_birch_speech_part2_3
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_3: @ 8031144
2015-11-29 04:26:45 +01:00
push {r4,lr}
sub sp, 0x8
lsls r0, 24
lsrs r4, r0, 24
bl sub_8197224
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08031178
2015-11-29 04:26:45 +01:00
movs r0, 0x2
str r0, [sp]
movs r0, 0xF
str r0, [sp, 0x4]
movs r0, 0x2
movs r1, 0x1
movs r2, 0xF3
movs r3, 0xDF
bl sub_80323CC
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldr r1, =task_new_game_prof_birch_speech_part2_4
str r1, [r0]
2016-01-07 05:23:20 +01:00
_08031178:
2015-11-29 04:26:45 +01:00
add sp, 0x8
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_3
thumb_func_start task_new_game_prof_birch_speech_part2_4
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_4: @ 8031188
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
bl sub_8198C58
lsls r0, 24
asrs r1, r0, 24
cmp r1, 0
2016-01-07 05:23:20 +01:00
beq _080311AE
2015-11-29 04:26:45 +01:00
cmp r1, 0
2016-01-07 05:23:20 +01:00
bgt _080311A8
2015-11-29 04:26:45 +01:00
movs r0, 0x1
negs r0, r0
cmp r1, r0
2016-01-07 05:23:20 +01:00
beq _080311FC
b _08031210
_080311A8:
2015-11-29 04:26:45 +01:00
cmp r1, 0x1
2016-01-07 05:23:20 +01:00
beq _080311FC
b _08031210
_080311AE:
2015-11-29 04:26:45 +01:00
movs r0, 0x5
2017-09-02 17:03:46 +02:00
bl PlaySE
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r4, r5, 2
adds r4, r5
lsls r4, 3
adds r4, r0
movs r0, 0xC
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
ldrb r2, [r0, 0x1]
movs r1, 0xD
negs r1, r1
ands r1, r2
movs r2, 0x4
orrs r1, r2
strb r1, [r0, 0x1]
adds r0, r5, 0
movs r1, 0x2
bl sub_8031ACC
adds r0, r5, 0
movs r1, 0x1
bl sub_8031C88
ldr r0, =task_new_game_prof_birch_speech_part2_5
str r0, [r4]
2016-01-07 05:23:20 +01:00
b _08031210
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080311FC:
2015-11-29 04:26:45 +01:00
movs r0, 0x5
2017-09-02 17:03:46 +02:00
bl PlaySE
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r5, 2
adds r1, r5
lsls r1, 3
adds r1, r0
ldr r0, =task_new_game_prof_birch_speech_11
str r0, [r1]
2016-01-07 05:23:20 +01:00
_08031210:
2015-11-29 04:26:45 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_4
thumb_func_start task_new_game_prof_birch_speech_part2_5
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_5: @ 8031220
2015-11-29 04:26:45 +01:00
push {lr}
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
ldrh r2, [r1, 0x10]
movs r3, 0x10
ldrsh r0, [r1, r3]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0803124C
2015-11-29 04:26:45 +01:00
adds r0, r2, 0x2
strh r0, [r1, 0x10]
ldrh r1, [r1, 0x10]
movs r0, 0x14
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2016-01-07 05:23:20 +01:00
b _08031250
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_0803124C:
2015-11-29 04:26:45 +01:00
ldr r0, =task_new_game_prof_birch_speech_part2_6
str r0, [r1]
2016-01-07 05:23:20 +01:00
_08031250:
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_5
thumb_func_start task_new_game_prof_birch_speech_part2_6
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_6: @ 8031258
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
lsls r0, 24
lsrs r6, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
adds r7, r0, r1
movs r1, 0x12
ldrsh r0, [r7, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031320
2017-08-31 16:48:24 +02:00
ldr r5, =gSprites
2015-11-29 04:26:45 +01:00
movs r2, 0x1C
ldrsh r1, [r7, r2]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
adds r0, 0x3E
ldrb r1, [r0]
movs r3, 0x4
mov r12, r3
mov r2, r12
orrs r1, r2
strb r1, [r0]
movs r3, 0x1E
ldrsh r1, [r7, r3]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
adds r0, 0x3E
ldrb r1, [r0]
orrs r1, r2
strb r1, [r0]
ldrb r0, [r7, 0x18]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r5
movs r0, 0x88
strh r0, [r1, 0x20]
movs r0, 0x3C
strh r0, [r1, 0x22]
adds r3, r1, 0
adds r3, 0x3E
ldrb r2, [r3]
movs r4, 0x5
negs r4, r4
adds r0, r4, 0
ands r0, r2
strb r0, [r3]
ldrb r3, [r1, 0x1]
movs r2, 0xD
negs r2, r2
adds r0, r2, 0
ands r0, r3
mov r3, r12
orrs r0, r3
strb r0, [r1, 0x1]
ldrb r1, [r7, 0x1A]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r5
movs r1, 0x64
strh r1, [r0, 0x20]
movs r1, 0x4B
strh r1, [r0, 0x22]
adds r3, r0, 0
adds r3, 0x3E
ldrb r1, [r3]
ands r4, r1
strb r4, [r3]
ldrb r1, [r0, 0x1]
ands r2, r1
mov r1, r12
orrs r2, r1
strb r2, [r0, 0x1]
adds r0, r6, 0
movs r1, 0x2
bl sub_8031BAC
adds r0, r6, 0
movs r1, 0x1
bl sub_8031D34
movs r0, 0
bl sub_8032318
2017-01-14 20:53:20 +01:00
ldr r0, =gStringVar4
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082C8C2A
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl AddTextPrinterForMessage
2015-11-29 04:26:45 +01:00
ldr r0, =task_new_game_prof_birch_speech_part2_7
str r0, [r7]
2016-01-07 05:23:20 +01:00
_08031320:
2015-11-29 04:26:45 +01:00
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_6
thumb_func_start task_new_game_prof_birch_speech_part2_7
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_7: @ 803133C
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
lsls r0, 24
lsrs r5, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r4, r0, r1
movs r1, 0x12
ldrsh r0, [r4, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _080313D2
2017-08-31 16:48:24 +02:00
ldr r7, =gSprites
2015-11-29 04:26:45 +01:00
movs r1, 0x18
ldrsh r0, [r4, r1]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r7
ldrb r2, [r1, 0x1]
movs r6, 0xD
negs r6, r6
adds r0, r6, 0
ands r0, r2
strb r0, [r1, 0x1]
movs r1, 0x1A
ldrsh r0, [r4, r1]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r7
ldrb r2, [r1, 0x1]
adds r0, r6, 0
ands r0, r2
strb r0, [r1, 0x1]
bl sub_8197224
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _080313D2
2015-11-29 04:26:45 +01:00
movs r0, 0x18
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r7
ldrb r2, [r0, 0x1]
adds r1, r6, 0
ands r1, r2
movs r3, 0x4
orrs r1, r3
strb r1, [r0, 0x1]
movs r1, 0x1A
ldrsh r0, [r4, r1]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r7
ldrb r2, [r1, 0x1]
adds r0, r6, 0
ands r0, r2
orrs r0, r3
strb r0, [r1, 0x1]
adds r0, r5, 0
movs r1, 0x2
bl sub_8031ACC
adds r0, r5, 0
movs r1, 0x1
bl sub_8031C88
movs r0, 0x40
strh r0, [r4, 0x16]
ldr r0, =task_new_game_prof_birch_speech_part2_8
str r0, [r4]
2016-01-07 05:23:20 +01:00
_080313D2:
2015-11-29 04:26:45 +01:00
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_7
thumb_func_start task_new_game_prof_birch_speech_part2_8
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_8: @ 80313E4
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
lsls r0, 24
lsrs r6, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r6, 2
adds r0, r6
lsls r0, 3
adds r4, r0, r1
movs r2, 0x12
ldrsh r0, [r4, r2]
adds r7, r1, 0
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _080314B0
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2015-11-29 04:26:45 +01:00
movs r3, 0x18
ldrsh r1, [r4, r3]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
adds r0, 0x3E
ldrb r1, [r0]
movs r3, 0x4
orrs r1, r3
strb r1, [r0]
movs r0, 0x1A
ldrsh r1, [r4, r0]
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
adds r0, 0x3E
ldrb r1, [r0]
orrs r1, r3
strb r1, [r0]
ldrh r1, [r4, 0x16]
movs r3, 0x16
ldrsh r0, [r4, r3]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031444
2015-11-29 04:26:45 +01:00
subs r0, r1, 0x1
strh r0, [r4, 0x16]
2016-01-07 05:23:20 +01:00
b _080314B0
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08031444:
2017-01-14 20:53:20 +01:00
ldr r0, =gSaveBlock2Ptr
2015-11-29 04:26:45 +01:00
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031458
2015-11-29 04:26:45 +01:00
ldrb r5, [r4, 0x1E]
2016-01-07 05:23:20 +01:00
b _0803145A
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08031458:
2015-11-29 04:26:45 +01:00
ldrb r5, [r4, 0x1C]
2016-01-07 05:23:20 +01:00
_0803145A:
2015-11-29 04:26:45 +01:00
lsls r1, r5, 4
adds r1, r5
lsls r1, 2
adds r1, r2
movs r0, 0x78
strh r0, [r1, 0x20]
movs r0, 0x3C
strh r0, [r1, 0x22]
adds r3, r1, 0
adds r3, 0x3E
ldrb r2, [r3]
subs r0, 0x41
ands r0, r2
strb r0, [r3]
ldrb r2, [r1, 0x1]
movs r0, 0xD
negs r0, r0
ands r0, r2
movs r2, 0x4
orrs r0, r2
strb r0, [r1, 0x1]
lsls r4, r6, 2
adds r4, r6
lsls r4, 3
adds r4, r7
strh r5, [r4, 0xC]
adds r0, r6, 0
movs r1, 0x2
bl sub_8031BAC
adds r0, r6, 0
movs r1, 0x1
bl sub_8031D34
2017-01-14 20:53:20 +01:00
ldr r0, =gStringVar4
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082C8C7A
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl AddTextPrinterForMessage
2015-11-29 04:26:45 +01:00
ldr r0, =task_new_game_prof_birch_speech_part2_9
str r0, [r4]
2016-01-07 05:23:20 +01:00
_080314B0:
2015-11-29 04:26:45 +01:00
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_8
thumb_func_start task_new_game_prof_birch_speech_part2_9
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_9: @ 80314C4
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
mov r7, r8
push {r7}
sub sp, 0x4
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r6, r1, r2
movs r1, 0x12
ldrsh r0, [r6, r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _0803155C
2017-08-31 16:48:24 +02:00
ldr r7, =gSprites
2015-11-29 04:26:45 +01:00
movs r1, 0xC
ldrsh r0, [r6, r1]
lsls r1, r0, 4
adds r1, r0
lsls r1, 2
adds r1, r7
ldrb r2, [r1, 0x1]
movs r0, 0xD
negs r0, r0
ands r0, r2
strb r0, [r1, 0x1]
bl sub_8197224
lsls r0, 16
lsrs r0, 16
mov r8, r0
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _0803155C
2015-11-29 04:26:45 +01:00
ldrb r0, [r6, 0xC]
lsls r4, r0, 4
adds r4, r0
lsls r4, 2
adds r5, r4, r7
ldrb r1, [r5, 0x1]
movs r0, 0x4
negs r0, r0
ands r0, r1
movs r1, 0x1
orrs r0, r1
strb r0, [r5, 0x1]
adds r0, r7, 0
adds r0, 0x10
adds r0, r4, r0
ldr r1, =gUnknown_082FF114
str r1, [r0]
adds r0, r5, 0
bl InitSpriteAffineAnim
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
movs r1, 0
2017-09-02 12:12:09 +02:00
bl StartSpriteAffineAnim
2015-11-29 04:26:45 +01:00
adds r0, r7, 0
adds r0, 0x1C
adds r4, r0
ldr r0, =sub_80318D8
str r0, [r4]
ldr r0, =0x0000ffff
mov r1, r8
str r1, [sp]
movs r1, 0
movs r2, 0
movs r3, 0x10
bl BeginNormalPaletteFade
2015-11-29 04:26:45 +01:00
movs r0, 0x4
2017-09-02 16:03:53 +02:00
bl FadeOutBGM
2015-11-29 04:26:45 +01:00
ldr r0, =task_new_game_prof_birch_speech_part2_10
str r0, [r6]
2016-01-07 05:23:20 +01:00
_0803155C:
2015-11-29 04:26:45 +01:00
add sp, 0x4
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_9
thumb_func_start task_new_game_prof_birch_speech_part2_10
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_10: @ 8031580
2015-11-29 04:26:45 +01:00
push {lr}
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r3, r1, r2
ldrb r1, [r3, 0xC]
2017-08-31 16:48:24 +02:00
ldr r2, =gSprites
2015-11-29 04:26:45 +01:00
lsls r0, r1, 4
adds r0, r1
lsls r0, 2
adds r0, r2
adds r0, 0x3F
ldrb r0, [r0]
lsls r0, 26
cmp r0, 0
2016-01-07 05:23:20 +01:00
bge _080315AA
2015-11-29 04:26:45 +01:00
ldr r0, =task_new_game_prof_birch_speech_part2_11
str r0, [r3]
2016-01-07 05:23:20 +01:00
_080315AA:
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_10
thumb_func_start task_new_game_prof_birch_speech_part2_11
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_11: @ 80315BC
2015-11-29 04:26:45 +01:00
push {r4,lr}
sub sp, 0x4
lsls r0, 24
lsrs r2, r0, 24
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _0803160A
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
lsls r4, r2, 2
adds r4, r2
lsls r4, 3
adds r4, r0
ldrb r2, [r4, 0xC]
2017-08-31 16:48:24 +02:00
ldr r1, =gSprites
2015-11-29 04:26:45 +01:00
lsls r0, r2, 4
adds r0, r2
lsls r0, 2
adds r1, 0x1C
adds r0, r1
ldr r1, =nullsub_11
str r1, [r0]
movs r1, 0x82
lsls r1, 5
movs r0, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
ldr r0, =0xffff0000
ldr r1, =0x0000ffff
str r1, [sp]
movs r1, 0
movs r2, 0
movs r3, 0x10
bl BeginNormalPaletteFade
2015-11-29 04:26:45 +01:00
ldr r0, =task_new_game_prof_birch_speech_part2_12
str r0, [r4]
2016-01-07 05:23:20 +01:00
_0803160A:
2015-11-29 04:26:45 +01:00
add sp, 0x4
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_11
thumb_func_start task_new_game_prof_birch_speech_part2_12
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_12: @ 8031630
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
ldr r0, =gPaletteFade
2015-11-29 04:26:45 +01:00
ldrb r1, [r0, 0x7]
movs r0, 0x80
ands r0, r1
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08031666
bl FreeAllWindowBuffers
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
adds r0, r1
ldrh r0, [r0, 0x1A]
bl sub_818D820
bl dp13_810BB8C
ldr r0, =CB2_NewGame
2015-11-30 08:17:50 +01:00
bl SetMainCallback2
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
2016-10-31 09:14:22 +01:00
bl DestroyTask
2016-01-07 05:23:20 +01:00
_08031666:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_12
thumb_func_start new_game_prof_birch_speech_part2_start
2016-09-03 04:51:16 +02:00
new_game_prof_birch_speech_part2_start: @ 8031678
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
sub sp, 0xC
movs r0, 0
2015-11-30 08:17:50 +01:00
bl ResetBgsAndClearDma3BusyFlags
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r1, 0x82
lsls r1, 5
movs r0, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
ldr r1, =gUnknown_082FF0E8
movs r0, 0
movs r2, 0x2
2015-11-30 08:17:50 +01:00
bl InitBgsFromTemplates
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF0F0
2015-11-30 08:17:50 +01:00
bl InitBgFromTemplate
2015-11-29 04:26:45 +01:00
movs r0, 0
bl SetVBlankCallback
movs r0, 0xC
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0xA
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x8
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x18
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x1A
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x14
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x16
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x10
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x12
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
add r0, sp, 0x4
movs r4, 0
strh r4, [r0]
ldr r1, =0x040000d4
str r0, [r1]
movs r4, 0xC0
lsls r4, 19
str r4, [r1, 0x4]
ldr r0, =0x8100c000
str r0, [r1, 0x8]
ldr r0, [r1, 0x8]
movs r2, 0
str r2, [sp, 0x8]
add r0, sp, 0x8
str r0, [r1]
movs r0, 0xE0
lsls r0, 19
str r0, [r1, 0x4]
ldr r0, =0x85000100
str r0, [r1, 0x8]
ldr r0, [r1, 0x8]
add r0, sp, 0x4
strh r2, [r0]
str r0, [r1]
movs r0, 0xA0
lsls r0, 19
str r0, [r1, 0x4]
ldr r0, =0x81000200
str r0, [r1, 0x8]
ldr r0, [r1, 0x8]
bl ResetPaletteFade
ldr r0, =gBirchIntroShadowGfx
2015-11-29 04:26:45 +01:00
adds r1, r4, 0
bl LZ77UnCompVram
ldr r0, =gUnknown_082FEEF0
ldr r1, =0x06003800
bl LZ77UnCompVram
ldr r0, =gUnknown_082FECFC
movs r1, 0
movs r2, 0x40
bl LoadPalette
ldr r0, =gUnknown_082FF018+2
2015-11-29 04:26:45 +01:00
movs r1, 0x1
movs r2, 0x10
bl LoadPalette
2016-10-31 09:14:22 +01:00
bl ResetTasks
2015-11-29 04:26:45 +01:00
ldr r0, =task_new_game_prof_birch_speech_part2_1
movs r1, 0
2016-10-31 09:14:22 +01:00
bl CreateTask
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r5, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r4, r0, r1
movs r0, 0x5
strh r0, [r4, 0x16]
ldr r0, =0x0000ffc4
strh r0, [r4, 0x10]
bl remove_some_task
2017-09-02 00:21:11 +02:00
bl ResetSpriteData
2017-09-02 13:11:19 +02:00
bl FreeAllSpritePalettes
2015-11-29 04:26:45 +01:00
bl dp13_810BB8C
adds r0, r5, 0
2015-11-30 08:17:50 +01:00
bl AddBirchSpeechObjects
2017-01-14 20:53:20 +01:00
ldr r0, =gSaveBlock2Ptr
2015-11-29 04:26:45 +01:00
ldr r0, [r0]
ldrb r0, [r0, 0x8]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _080317DC
2015-11-29 04:26:45 +01:00
movs r0, 0x1
strh r0, [r4, 0x14]
ldrb r3, [r4, 0x1E]
2016-01-07 05:23:20 +01:00
b _080317E0
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_080317DC:
2015-11-29 04:26:45 +01:00
strh r0, [r4, 0x14]
ldrb r3, [r4, 0x1C]
2016-01-07 05:23:20 +01:00
_080317E0:
2017-08-31 16:48:24 +02:00
ldr r0, =gSprites
2015-11-29 04:26:45 +01:00
lsls r1, r3, 4
adds r1, r3
lsls r1, 2
adds r1, r0
movs r4, 0
movs r0, 0xB4
strh r0, [r1, 0x20]
movs r0, 0x3C
strh r0, [r1, 0x22]
adds r1, 0x3E
ldrb r2, [r1]
subs r0, 0x41
ands r0, r2
strb r0, [r1]
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r5, 2
adds r0, r5
lsls r0, 3
adds r0, r1
strh r3, [r0, 0xC]
ldr r1, =0x0000ffc4
movs r0, 0x14
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x1
negs r0, r0
str r4, [sp]
movs r1, 0
movs r2, 0x10
movs r3, 0
bl BeginNormalPaletteFade
2015-11-29 04:26:45 +01:00
movs r0, 0x40
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x44
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x48
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x4A
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x50
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x52
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x54
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0
2015-11-30 08:17:50 +01:00
bl ShowBg
2015-11-29 04:26:45 +01:00
movs r0, 0x1
2015-11-30 08:17:50 +01:00
bl ShowBg
2015-11-29 04:26:45 +01:00
ldr r3, =0x04000208
ldrh r2, [r3]
strh r4, [r3]
ldr r4, =0x04000200
ldrh r0, [r4]
movs r1, 0x1
orrs r0, r1
strh r0, [r4]
strh r2, [r3]
ldr r0, =VBlankCB_MainMenu
2015-11-29 04:26:45 +01:00
bl SetVBlankCallback
ldr r0, =CB2_MainMenu
2015-11-30 08:17:50 +01:00
bl SetMainCallback2
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF080
bl InitWindows
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0xF3
bl LoadMainMenuWindowFrameTiles
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0xFC
movs r2, 0xF0
bl copy_textbox_border_tile_patterns_to_vram
movs r0, 0
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0x3
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
add sp, 0xC
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end new_game_prof_birch_speech_part2_start
thumb_func_start nullsub_11
2016-09-03 04:51:16 +02:00
nullsub_11: @ 80318D4
2015-11-29 04:26:45 +01:00
bx lr
thumb_func_end nullsub_11
thumb_func_start sub_80318D8
2016-09-03 04:51:16 +02:00
sub_80318D8: @ 80318D8
2015-11-29 04:26:45 +01:00
movs r2, 0x22
ldrsh r1, [r0, r2]
lsls r1, 16
movs r3, 0x2E
ldrsh r2, [r0, r3]
adds r1, r2
movs r2, 0xC0
lsls r2, 8
adds r1, r2
lsrs r2, r1, 16
strh r2, [r0, 0x22]
strh r1, [r0, 0x2E]
bx lr
thumb_func_end sub_80318D8
thumb_func_start sub_80318F4
2016-09-03 04:51:16 +02:00
sub_80318F4: @ 80318F4
2015-11-29 04:26:45 +01:00
push {lr}
sub sp, 0x10
lsls r0, 24
lsrs r0, 24
lsls r1, 24
lsrs r1, 24
ldr r2, =0x00000127
str r0, [sp]
str r1, [sp, 0x4]
movs r0, 0xE
str r0, [sp, 0x8]
ldr r0, =0x0000ffff
str r0, [sp, 0xC]
adds r0, r2, 0
movs r1, 0x8
movs r2, 0
movs r3, 0x1
bl sub_818D3E4
lsls r0, 24
lsrs r0, 24
add sp, 0x10
pop {r1}
bx r1
.pool
thumb_func_end sub_80318F4
2015-11-30 08:17:50 +01:00
thumb_func_start AddBirchSpeechObjects
2016-09-03 04:51:16 +02:00
@ void AddBirchSpeechObjects(u8 taskId)
AddBirchSpeechObjects: @ 803192C
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x4
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
movs r0, 0x88
movs r1, 0x3C
movs r2, 0x1
2015-11-30 08:17:50 +01:00
bl AddNewGameBirchObject
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r0, 24
2017-08-31 16:48:24 +02:00
ldr r1, =gSprites
2015-11-29 04:26:45 +01:00
mov r9, r1
lsls r2, r0, 4
adds r2, r0
lsls r2, 2
movs r3, 0x1C
add r3, r9
mov r8, r3
adds r1, r2, r3
ldr r7, =nullsub_11
str r7, [r1]
add r2, r9
ldrb r3, [r2, 0x5]
movs r6, 0xD
negs r6, r6
adds r1, r6, 0
ands r1, r3
strb r1, [r2, 0x5]
adds r2, 0x3E
ldrb r1, [r2]
movs r3, 0x4
mov r10, r3
mov r3, r10
orrs r1, r3
strb r1, [r2]
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r5, r4, 2
adds r5, r4
lsls r5, 3
adds r5, r1
strh r0, [r5, 0x18]
movs r0, 0x64
movs r1, 0x4B
bl sub_80318F4
lsls r0, 24
lsrs r0, 24
lsls r2, r0, 4
adds r2, r0
lsls r2, 2
mov r4, r8
adds r1, r2, r4
str r7, [r1]
add r2, r9
ldrb r3, [r2, 0x5]
adds r1, r6, 0
ands r1, r3
strb r1, [r2, 0x5]
adds r2, 0x3E
ldrb r1, [r2]
mov r3, r10
orrs r1, r3
strb r1, [r2]
strh r0, [r5, 0x1A]
movs r0, 0x3C
2017-09-12 15:05:40 +02:00
bl sub_806EFF0
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r0, 24
ldr r4, =0x0201c000
str r4, [sp]
movs r1, 0x78
movs r2, 0x3C
movs r3, 0
bl sub_80B5E6C
lsls r0, 24
lsrs r0, 24
lsls r2, r0, 4
adds r2, r0
lsls r2, 2
mov r3, r8
adds r1, r2, r3
str r7, [r1]
add r2, r9
adds r3, r2, 0
adds r3, 0x3E
ldrb r1, [r3]
mov r4, r10
orrs r1, r4
strb r1, [r3]
ldrb r3, [r2, 0x5]
adds r1, r6, 0
ands r1, r3
strb r1, [r2, 0x5]
strh r0, [r5, 0x1C]
movs r0, 0x3F
2017-09-12 15:05:40 +02:00
bl sub_806EFF0
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r0, 24
ldr r1, =0x0201c000
movs r2, 0x80
lsls r2, 4
adds r4, r1, r2
str r4, [sp]
movs r1, 0x78
movs r2, 0x3C
movs r3, 0
bl sub_80B5E6C
lsls r0, 24
lsrs r0, 24
lsls r2, r0, 4
adds r2, r0
lsls r2, 2
add r8, r2
mov r3, r8
str r7, [r3]
add r2, r9
adds r3, r2, 0
adds r3, 0x3E
ldrb r1, [r3]
mov r4, r10
orrs r1, r4
strb r1, [r3]
ldrb r1, [r2, 0x5]
ands r6, r1
strb r6, [r2, 0x5]
strh r0, [r5, 0x1E]
add sp, 0x4
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
2015-11-30 08:17:50 +01:00
thumb_func_end AddBirchSpeechObjects
2015-11-29 04:26:45 +01:00
2015-11-30 08:17:50 +01:00
thumb_func_start sub_8031A5C
2016-09-03 04:51:16 +02:00
sub_8031A5C: @ 8031A5C
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
lsls r0, 24
lsrs r3, r0, 24
2016-11-01 19:35:16 +01:00
ldr r4, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r3, 2
adds r0, r3
lsls r0, 3
adds r2, r0, r4
ldrh r1, [r2, 0xA]
movs r5, 0xA
ldrsh r0, [r2, r5]
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08031A94
2015-11-29 04:26:45 +01:00
movs r1, 0x8
ldrsh r0, [r2, r1]
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r4
movs r0, 0x1
strh r0, [r1, 0x12]
adds r0, r3, 0
2016-10-31 09:14:22 +01:00
bl DestroyTask
2016-01-07 05:23:20 +01:00
b _08031AC4
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08031A94:
2015-11-29 04:26:45 +01:00
ldrh r3, [r2, 0x10]
movs r4, 0x10
ldrsh r0, [r2, r4]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031AA4
2015-11-29 04:26:45 +01:00
subs r0, r3, 0x1
strh r0, [r2, 0x10]
2016-01-07 05:23:20 +01:00
b _08031AC4
_08031AA4:
2015-11-29 04:26:45 +01:00
ldrh r0, [r2, 0xE]
strh r0, [r2, 0x10]
subs r1, 0x1
strh r1, [r2, 0xA]
ldrh r0, [r2, 0xC]
adds r0, 0x1
strh r0, [r2, 0xC]
movs r5, 0xC
ldrsh r0, [r2, r5]
lsls r0, 8
adds r1, r0
lsls r1, 16
lsrs r1, 16
movs r0, 0x52
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2016-01-07 05:23:20 +01:00
_08031AC4:
2015-11-29 04:26:45 +01:00
pop {r4,r5}
pop {r0}
bx r0
2015-11-30 08:17:50 +01:00
thumb_func_end sub_8031A5C
2015-11-29 04:26:45 +01:00
thumb_func_start sub_8031ACC
2016-09-03 04:51:16 +02:00
sub_8031ACC: @ 8031ACC
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
mov r6, r8
push {r6}
adds r4, r0, 0
adds r5, r1, 0
lsls r4, 24
lsrs r4, 24
lsls r5, 24
lsrs r5, 24
movs r1, 0x94
lsls r1, 2
movs r0, 0x50
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x52
movs r1, 0x10
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x54
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
mov r8, r0
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
add r0, r8
movs r6, 0
strh r6, [r0, 0x12]
2015-11-30 08:17:50 +01:00
ldr r0, =sub_8031A5C
2015-11-29 04:26:45 +01:00
movs r1, 0
2016-10-31 09:14:22 +01:00
bl CreateTask
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r0, 24
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
add r1, r8
strh r4, [r1, 0x8]
movs r0, 0x10
strh r0, [r1, 0xA]
strh r6, [r1, 0xC]
strh r5, [r1, 0xE]
strh r5, [r1, 0x10]
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8031ACC
thumb_func_start sub_8031B3C
2016-09-03 04:51:16 +02:00
sub_8031B3C: @ 8031B3C
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
lsls r0, 24
lsrs r3, r0, 24
2016-11-01 19:35:16 +01:00
ldr r4, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r3, 2
adds r0, r3
lsls r0, 3
adds r2, r0, r4
ldrh r1, [r2, 0xA]
movs r5, 0xA
ldrsh r0, [r2, r5]
cmp r0, 0x10
2016-01-07 05:23:20 +01:00
bne _08031B74
2015-11-29 04:26:45 +01:00
movs r1, 0x8
ldrsh r0, [r2, r1]
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r4
movs r0, 0x1
strh r0, [r1, 0x12]
adds r0, r3, 0
2016-10-31 09:14:22 +01:00
bl DestroyTask
2016-01-07 05:23:20 +01:00
b _08031BA4
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08031B74:
2015-11-29 04:26:45 +01:00
ldrh r3, [r2, 0x10]
movs r4, 0x10
ldrsh r0, [r2, r4]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031B84
2015-11-29 04:26:45 +01:00
subs r0, r3, 0x1
strh r0, [r2, 0x10]
2016-01-07 05:23:20 +01:00
b _08031BA4
_08031B84:
2015-11-29 04:26:45 +01:00
ldrh r0, [r2, 0xE]
strh r0, [r2, 0x10]
adds r1, 0x1
strh r1, [r2, 0xA]
ldrh r0, [r2, 0xC]
subs r0, 0x1
strh r0, [r2, 0xC]
movs r5, 0xC
ldrsh r0, [r2, r5]
lsls r0, 8
adds r1, r0
lsls r1, 16
lsrs r1, 16
movs r0, 0x52
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2016-01-07 05:23:20 +01:00
_08031BA4:
2015-11-29 04:26:45 +01:00
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8031B3C
thumb_func_start sub_8031BAC
2016-09-03 04:51:16 +02:00
sub_8031BAC: @ 8031BAC
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
mov r6, r8
push {r6}
adds r4, r0, 0
adds r5, r1, 0
lsls r4, 24
lsrs r4, 24
lsls r5, 24
lsrs r5, 24
movs r1, 0x94
lsls r1, 2
movs r0, 0x50
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r1, 0x80
lsls r1, 5
movs r0, 0x52
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
movs r0, 0x54
movs r1, 0
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2016-11-01 19:35:16 +01:00
ldr r0, =gTasks
2015-11-29 04:26:45 +01:00
mov r8, r0
lsls r0, r4, 2
adds r0, r4
lsls r0, 3
add r0, r8
movs r6, 0
strh r6, [r0, 0x12]
ldr r0, =sub_8031B3C
movs r1, 0
2016-10-31 09:14:22 +01:00
bl CreateTask
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r0, 24
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
add r1, r8
strh r4, [r1, 0x8]
strh r6, [r1, 0xA]
movs r0, 0x10
strh r0, [r1, 0xC]
strh r5, [r1, 0xE]
strh r5, [r1, 0x10]
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end sub_8031BAC
thumb_func_start sub_8031C1C
2016-09-03 04:51:16 +02:00
sub_8031C1C: @ 8031C1C
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r2, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r1, r0, r1
ldrh r3, [r1, 0xC]
movs r4, 0xC
ldrsh r0, [r1, r4]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031C40
2015-11-29 04:26:45 +01:00
subs r0, r3, 0x1
strh r0, [r1, 0xC]
2016-01-07 05:23:20 +01:00
b _08031C7C
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08031C40:
2015-11-29 04:26:45 +01:00
ldrh r3, [r1, 0xA]
movs r4, 0xA
ldrsh r0, [r1, r4]
cmp r0, 0x8
2016-01-07 05:23:20 +01:00
bne _08031C52
2015-11-29 04:26:45 +01:00
adds r0, r2, 0
2016-10-31 09:14:22 +01:00
bl DestroyTask
2016-01-07 05:23:20 +01:00
b _08031C7C
_08031C52:
2015-11-29 04:26:45 +01:00
ldrh r2, [r1, 0x10]
movs r4, 0x10
ldrsh r0, [r1, r4]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031C62
2015-11-29 04:26:45 +01:00
subs r0, r2, 0x1
strh r0, [r1, 0x10]
2016-01-07 05:23:20 +01:00
b _08031C7C
_08031C62:
2015-11-29 04:26:45 +01:00
ldrh r0, [r1, 0xE]
strh r0, [r1, 0x10]
adds r0, r3, 0x1
strh r0, [r1, 0xA]
movs r2, 0xA
ldrsh r0, [r1, r2]
lsls r0, 1
ldr r1, =gUnknown_082FF018
adds r0, r1
movs r1, 0x1
movs r2, 0x10
bl LoadPalette
2016-01-07 05:23:20 +01:00
_08031C7C:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8031C1C
thumb_func_start sub_8031C88
2016-09-03 04:51:16 +02:00
sub_8031C88: @ 8031C88
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
lsls r4, 24
lsrs r4, 24
lsls r5, 24
lsrs r5, 24
ldr r0, =sub_8031C1C
movs r1, 0
2016-10-31 09:14:22 +01:00
bl CreateTask
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
movs r0, 0
strh r4, [r1, 0x8]
strh r0, [r1, 0xA]
movs r0, 0x8
strh r0, [r1, 0xC]
strh r5, [r1, 0xE]
strh r5, [r1, 0x10]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8031C88
thumb_func_start sub_8031CC8
2016-09-03 04:51:16 +02:00
sub_8031CC8: @ 8031CC8
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r2, r0, 24
2016-11-01 19:35:16 +01:00
ldr r1, =gTasks
2015-11-29 04:26:45 +01:00
lsls r0, r2, 2
adds r0, r2
lsls r0, 3
adds r1, r0, r1
ldrh r3, [r1, 0xC]
movs r4, 0xC
ldrsh r0, [r1, r4]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031CEC
2015-11-29 04:26:45 +01:00
subs r0, r3, 0x1
strh r0, [r1, 0xC]
2016-01-07 05:23:20 +01:00
b _08031D28
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08031CEC:
2015-11-29 04:26:45 +01:00
ldrh r3, [r1, 0xA]
movs r4, 0xA
ldrsh r0, [r1, r4]
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08031CFE
2015-11-29 04:26:45 +01:00
adds r0, r2, 0
2016-10-31 09:14:22 +01:00
bl DestroyTask
2016-01-07 05:23:20 +01:00
b _08031D28
_08031CFE:
2015-11-29 04:26:45 +01:00
ldrh r2, [r1, 0x10]
movs r4, 0x10
ldrsh r0, [r1, r4]
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031D0E
2015-11-29 04:26:45 +01:00
subs r0, r2, 0x1
strh r0, [r1, 0x10]
2016-01-07 05:23:20 +01:00
b _08031D28
_08031D0E:
2015-11-29 04:26:45 +01:00
ldrh r0, [r1, 0xE]
strh r0, [r1, 0x10]
subs r0, r3, 0x1
strh r0, [r1, 0xA]
movs r2, 0xA
ldrsh r0, [r1, r2]
lsls r0, 1
ldr r1, =gUnknown_082FF018
adds r0, r1
movs r1, 0x1
movs r2, 0x10
bl LoadPalette
2016-01-07 05:23:20 +01:00
_08031D28:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end sub_8031CC8
thumb_func_start sub_8031D34
2016-09-03 04:51:16 +02:00
sub_8031D34: @ 8031D34
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
lsls r4, 24
lsrs r4, 24
lsls r5, 24
lsrs r5, 24
ldr r0, =sub_8031CC8
movs r1, 0
2016-10-31 09:14:22 +01:00
bl CreateTask
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r1, r2
strh r4, [r1, 0x8]
movs r0, 0x8
strh r0, [r1, 0xA]
strh r0, [r1, 0xC]
strh r5, [r1, 0xE]
strh r5, [r1, 0x10]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_8031D34
thumb_func_start sub_8031D74
2016-09-03 04:51:16 +02:00
sub_8031D74: @ 8031D74
2015-11-29 04:26:45 +01:00
push {lr}
ldr r0, =gUnknown_082FF088
movs r1, 0xF3
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
movs r0, 0x1
movs r1, 0x11
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
ldr r2, =gUnknown_082FF118
movs r0, 0x1
movs r1, 0x2
bl PrintMenuTable
movs r0, 0x1
movs r1, 0x2
movs r2, 0
bl InitMenuInUpperLeftCornerPlaySoundWhenAPressed
movs r0, 0x1
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x1
movs r1, 0x3
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
.pool
thumb_func_end sub_8031D74
thumb_func_start sub_8031DB4
2016-09-03 04:51:16 +02:00
sub_8031DB4: @ 8031DB4
2015-11-29 04:26:45 +01:00
push {lr}
bl ProcessMenuInputNoWrapAround
lsls r0, 24
asrs r0, 24
pop {r1}
bx r1
thumb_func_end sub_8031DB4
thumb_func_start set_default_player_name
2016-09-03 04:51:16 +02:00
@ void set_default_player_name(int name_id)
set_default_player_name: @ 8031DC4
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
lsls r0, 24
lsrs r2, r0, 24
2017-01-14 20:53:20 +01:00
ldr r1, =gSaveBlock2Ptr
2015-11-29 04:26:45 +01:00
ldr r0, [r1]
ldrb r0, [r0, 0x8]
adds r5, r1, 0
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _08031DE4
ldr r1, =gMalePresetNames
2016-01-07 05:23:20 +01:00
b _08031DE6
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08031DE4:
ldr r1, =gFemalePresetNames
2016-01-07 05:23:20 +01:00
_08031DE6:
2015-11-29 04:26:45 +01:00
lsls r0, r2, 2
adds r0, r1
ldr r3, [r0]
movs r2, 0
2017-01-14 20:53:20 +01:00
ldr r4, =gSaveBlock2Ptr
2016-01-07 05:23:20 +01:00
_08031DF0:
2015-11-29 04:26:45 +01:00
ldr r1, [r4]
adds r1, r2
adds r0, r3, r2
ldrb r0, [r0]
strb r0, [r1]
adds r0, r2, 0x1
lsls r0, 24
lsrs r2, r0, 24
cmp r2, 0x6
2016-01-07 05:23:20 +01:00
bls _08031DF0
2015-11-29 04:26:45 +01:00
ldr r1, [r5]
movs r0, 0xFF
strb r0, [r1, 0x7]
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end set_default_player_name
thumb_func_start CreateMainMenuErrorWindow
2016-09-03 04:51:16 +02:00
@ void CreateMainMenuErrorWindow(u8 *str)
CreateMainMenuErrorWindow: @ 8031E18
2015-11-29 04:26:45 +01:00
push {r4,lr}
sub sp, 0xC
adds r4, r0, 0
movs r0, 0x7
movs r1, 0x11
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
movs r0, 0x1
str r0, [sp]
movs r0, 0x2
str r0, [sp, 0x4]
movs r0, 0
str r0, [sp, 0x8]
movs r0, 0x7
movs r1, 0x1
adds r2, r4, 0
movs r3, 0
2017-09-05 13:01:24 +02:00
bl PrintTextOnWindow
2015-11-29 04:26:45 +01:00
movs r0, 0x7
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
movs r0, 0x7
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
ldr r0, =gUnknown_082FF070
ldr r1, =0x000001d5
2016-01-08 08:27:40 +01:00
bl DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
ldr r1, =0x000009e7
movs r0, 0x40
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
ldr r1, =0x0000719f
movs r0, 0x44
2015-11-30 08:17:50 +01:00
bl SetGpuReg
2015-11-29 04:26:45 +01:00
add sp, 0xC
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end CreateMainMenuErrorWindow
2015-11-29 04:26:45 +01:00
thumb_func_start fmt_savegame
2016-09-03 04:51:16 +02:00
fmt_savegame: @ 8031E7C
2015-11-29 04:26:45 +01:00
push {lr}
bl fmt_time
bl fmt_pokedex
bl fmt_player
bl fmt_badges
pop {r0}
bx r0
thumb_func_end fmt_savegame
thumb_func_start fmt_time
2016-09-03 04:51:16 +02:00
fmt_time: @ 8031E94
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
sub sp, 0xC
2017-01-14 20:53:20 +01:00
ldr r4, =gStringVar4
2017-09-20 21:38:05 +02:00
ldr r1, =gText_ContinueMenuPlayer
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
ldr r6, =gUnknown_082FF0E3
str r6, [sp]
movs r5, 0x1
negs r5, r5
str r5, [sp, 0x4]
str r4, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r2, 0
movs r3, 0x11
bl box_print
2017-01-14 20:53:20 +01:00
ldr r4, =gSaveBlock2Ptr
2015-11-29 04:26:45 +01:00
ldr r1, [r4]
movs r0, 0x1
movs r2, 0x64
bl GetStringRightAlignXOffset
2015-11-29 04:26:45 +01:00
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
str r6, [sp]
str r5, [sp, 0x4]
ldr r0, [r4]
str r0, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r3, 0x11
bl box_print
add sp, 0xC
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end fmt_time
thumb_func_start fmt_player
2016-09-03 04:51:16 +02:00
fmt_player: @ 8031EF8
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
sub sp, 0x2C
2017-01-14 20:53:20 +01:00
ldr r4, =gStringVar4
2017-09-20 21:38:05 +02:00
ldr r1, =gText_ContinueMenuTime
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
ldr r6, =gUnknown_082FF0E3
str r6, [sp]
movs r5, 0x1
negs r5, r5
str r5, [sp, 0x4]
str r4, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r2, 0x6C
movs r3, 0x11
bl box_print
2017-01-14 20:53:20 +01:00
ldr r4, =gSaveBlock2Ptr
2015-11-29 04:26:45 +01:00
ldr r0, [r4]
ldrh r1, [r0, 0xE]
add r0, sp, 0xC
movs r2, 0
movs r3, 0x3
2017-01-14 20:53:20 +01:00
bl ConvertIntToDecimalStringN
2015-11-29 04:26:45 +01:00
movs r1, 0xF0
strb r1, [r0]
adds r0, 0x1
ldr r1, [r4]
ldrb r1, [r1, 0x10]
movs r2, 0x2
movs r3, 0x2
2017-01-14 20:53:20 +01:00
bl ConvertIntToDecimalStringN
2015-11-29 04:26:45 +01:00
movs r0, 0x1
add r1, sp, 0xC
movs r2, 0xD0
bl GetStringRightAlignXOffset
2015-11-29 04:26:45 +01:00
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
str r6, [sp]
str r5, [sp, 0x4]
add r0, sp, 0xC
str r0, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r3, 0x11
bl box_print
add sp, 0x2C
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end fmt_player
thumb_func_start fmt_pokedex
2016-09-03 04:51:16 +02:00
fmt_pokedex: @ 8031F7C
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
sub sp, 0x2C
ldr r0, =0x00000861
bl FlagGet
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
2016-01-07 05:23:20 +01:00
bne _08031FFE
2017-09-02 21:43:53 +02:00
bl IsNationalPokedexEnabled
2015-11-29 04:26:45 +01:00
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08031FA4
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl pokedex_count
2016-01-07 05:23:20 +01:00
b _08031FAA
2015-11-29 04:26:45 +01:00
.pool
2016-01-07 05:23:20 +01:00
_08031FA4:
2015-11-29 04:26:45 +01:00
movs r0, 0x1
bl sub_80C0844
2016-01-07 05:23:20 +01:00
_08031FAA:
2015-11-29 04:26:45 +01:00
lsls r0, 16
lsrs r7, r0, 16
2017-01-14 20:53:20 +01:00
ldr r4, =gStringVar4
2017-09-20 21:38:05 +02:00
ldr r1, =gText_ContinueMenuPokedex
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
ldr r6, =gUnknown_082FF0E3
str r6, [sp]
movs r5, 0x1
negs r5, r5
str r5, [sp, 0x4]
str r4, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r2, 0
movs r3, 0x21
bl box_print
add r0, sp, 0xC
adds r1, r7, 0
movs r2, 0
movs r3, 0x3
2017-01-14 20:53:20 +01:00
bl ConvertIntToDecimalStringN
2015-11-29 04:26:45 +01:00
movs r0, 0x1
add r1, sp, 0xC
movs r2, 0x64
bl GetStringRightAlignXOffset
2015-11-29 04:26:45 +01:00
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
str r6, [sp]
str r5, [sp, 0x4]
add r0, sp, 0xC
str r0, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r3, 0x21
bl box_print
2016-01-07 05:23:20 +01:00
_08031FFE:
2015-11-29 04:26:45 +01:00
add sp, 0x2C
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end fmt_pokedex
thumb_func_start fmt_badges
2016-09-03 04:51:16 +02:00
fmt_badges: @ 8032014
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
sub sp, 0x2C
movs r7, 0
ldr r4, =0x00000867
2016-01-07 05:23:20 +01:00
_0803201C:
2015-11-29 04:26:45 +01:00
lsls r0, r4, 16
lsrs r0, 16
bl FlagGet
lsls r0, 24
cmp r0, 0
2016-01-07 05:23:20 +01:00
beq _08032030
2015-11-29 04:26:45 +01:00
adds r0, r7, 0x1
lsls r0, 24
lsrs r7, r0, 24
2016-01-07 05:23:20 +01:00
_08032030:
2015-11-29 04:26:45 +01:00
adds r4, 0x1
ldr r0, =0x0000086e
cmp r4, r0
2016-01-07 05:23:20 +01:00
bls _0803201C
2017-01-14 20:53:20 +01:00
ldr r4, =gStringVar4
2017-09-20 21:38:05 +02:00
ldr r1, =gText_ContinueMenuBadges
2015-11-29 04:26:45 +01:00
adds r0, r4, 0
2017-01-14 20:53:20 +01:00
bl StringExpandPlaceholders
2015-11-29 04:26:45 +01:00
ldr r6, =gUnknown_082FF0E3
str r6, [sp]
movs r5, 0x1
negs r5, r5
str r5, [sp, 0x4]
str r4, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r2, 0x6C
movs r3, 0x21
bl box_print
add r0, sp, 0xC
adds r1, r7, 0
movs r2, 0x2
movs r3, 0x1
2017-01-14 20:53:20 +01:00
bl ConvertIntToDecimalStringN
2015-11-29 04:26:45 +01:00
movs r0, 0x1
add r1, sp, 0xC
movs r2, 0xD0
bl GetStringRightAlignXOffset
2015-11-29 04:26:45 +01:00
adds r2, r0, 0
lsls r2, 24
lsrs r2, 24
str r6, [sp]
str r5, [sp, 0x4]
add r0, sp, 0xC
str r0, [sp, 0x8]
movs r0, 0x2
movs r1, 0x1
movs r3, 0x21
bl box_print
add sp, 0x2C
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end fmt_badges
thumb_func_start LoadMainMenuWindowFrameTiles
2016-09-03 04:51:16 +02:00
@ void LoadMainMenuWindowFrameTiles(u8 bgId, u16 tileOffset)
LoadMainMenuWindowFrameTiles: @ 80320A4
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
adds r4, r0, 0
adds r5, r1, 0
lsls r4, 24
lsrs r4, 24
lsls r5, 16
lsrs r5, 16
2017-01-14 20:53:20 +01:00
ldr r6, =gSaveBlock2Ptr
2015-11-29 04:26:45 +01:00
ldr r0, [r6]
ldrb r0, [r0, 0x14]
lsrs r0, 3
bl sub_8098758
ldr r1, [r0]
movs r2, 0x90
lsls r2, 1
adds r0, r4, 0
adds r3, r5, 0
2015-11-30 08:17:50 +01:00
bl LoadBgTiles
2015-11-29 04:26:45 +01:00
ldr r0, [r6]
ldrb r0, [r0, 0x14]
lsrs r0, 3
bl sub_8098758
ldr r0, [r0, 0x4]
movs r1, 0x20
movs r2, 0x20
bl LoadPalette
2015-11-29 04:26:45 +01:00
pop {r4-r6}
pop {r0}
bx r0
.pool
thumb_func_end LoadMainMenuWindowFrameTiles
2015-11-29 04:26:45 +01:00
2016-01-08 08:27:40 +01:00
thumb_func_start DrawMainMenuWindowBorder
2016-09-03 04:51:16 +02:00
@ void DrawMainMenuWindowBorder(struct WindowTemplate *template, u16 baseTileNum)
DrawMainMenuWindowBorder: @ 80320EC
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x1C
adds r4, r0, 0
lsls r6, r1, 16
movs r0, 0x80
lsls r0, 9
adds r0, r6
lsrs r0, 16
mov r9, r0
movs r1, 0x80
lsls r1, 10
adds r1, r6
lsrs r1, 16
mov r10, r1
movs r7, 0xC0
lsls r7, 10
adds r1, r6, r7
lsrs r1, 16
str r1, [sp, 0x18]
movs r0, 0xA0
lsls r0, 11
adds r1, r6, r0
lsrs r1, 16
str r1, [sp, 0xC]
movs r7, 0xC0
lsls r7, 11
adds r1, r6, r7
lsrs r1, 16
str r1, [sp, 0x10]
movs r0, 0xE0
lsls r0, 11
adds r1, r6, r0
lsrs r1, 16
str r1, [sp, 0x14]
lsrs r1, r6, 16
movs r7, 0x80
lsls r7, 12
adds r6, r7
lsrs r6, 16
ldrb r0, [r4]
ldrb r2, [r4, 0x1]
subs r2, 0x1
lsls r2, 24
lsrs r2, 24
ldrb r3, [r4, 0x2]
subs r3, 0x1
lsls r3, 24
lsrs r3, 24
movs r5, 0x1
str r5, [sp]
str r5, [sp, 0x4]
movs r7, 0x2
mov r8, r7
str r7, [sp, 0x8]
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldrb r0, [r4]
ldrb r2, [r4, 0x1]
ldrb r3, [r4, 0x2]
subs r3, 0x1
lsls r3, 24
lsrs r3, 24
ldrb r1, [r4, 0x3]
str r1, [sp]
str r5, [sp, 0x4]
str r7, [sp, 0x8]
mov r1, r9
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldrb r0, [r4]
ldrb r2, [r4, 0x3]
ldrb r1, [r4, 0x1]
adds r2, r1
lsls r2, 24
lsrs r2, 24
ldrb r3, [r4, 0x2]
subs r3, 0x1
lsls r3, 24
lsrs r3, 24
str r5, [sp]
str r5, [sp, 0x4]
str r7, [sp, 0x8]
mov r1, r10
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldrb r0, [r4]
ldrb r2, [r4, 0x1]
subs r2, 0x1
lsls r2, 24
lsrs r2, 24
ldrb r3, [r4, 0x2]
str r5, [sp]
ldrb r1, [r4, 0x4]
str r1, [sp, 0x4]
str r7, [sp, 0x8]
ldr r1, [sp, 0x18]
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldrb r0, [r4]
ldrb r2, [r4, 0x3]
ldrb r7, [r4, 0x1]
adds r2, r7
lsls r2, 24
lsrs r2, 24
ldrb r3, [r4, 0x2]
str r5, [sp]
ldrb r1, [r4, 0x4]
str r1, [sp, 0x4]
mov r1, r8
str r1, [sp, 0x8]
ldr r1, [sp, 0xC]
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldrb r0, [r4]
ldrb r2, [r4, 0x1]
subs r2, 0x1
lsls r2, 24
lsrs r2, 24
ldrb r3, [r4, 0x4]
ldrb r7, [r4, 0x2]
adds r3, r7
lsls r3, 24
lsrs r3, 24
str r5, [sp]
str r5, [sp, 0x4]
mov r1, r8
str r1, [sp, 0x8]
ldr r1, [sp, 0x10]
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldrb r0, [r4]
ldrb r2, [r4, 0x1]
ldrb r3, [r4, 0x4]
ldrb r7, [r4, 0x2]
adds r3, r7
lsls r3, 24
lsrs r3, 24
ldrb r1, [r4, 0x3]
str r1, [sp]
str r5, [sp, 0x4]
mov r1, r8
str r1, [sp, 0x8]
ldr r1, [sp, 0x14]
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldrb r0, [r4]
ldrb r2, [r4, 0x3]
ldrb r7, [r4, 0x1]
adds r2, r7
lsls r2, 24
lsrs r2, 24
ldrb r3, [r4, 0x4]
ldrb r1, [r4, 0x2]
adds r3, r1
lsls r3, 24
lsrs r3, 24
str r5, [sp]
str r5, [sp, 0x4]
mov r7, r8
str r7, [sp, 0x8]
adds r1, r6, 0
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldrb r0, [r4]
2015-12-03 09:17:29 +01:00
bl CopyBgTilemapBufferToVram
2015-11-29 04:26:45 +01:00
add sp, 0x1C
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
2016-01-08 08:27:40 +01:00
thumb_func_end DrawMainMenuWindowBorder
2015-11-29 04:26:45 +01:00
thumb_func_start sub_8032250
2016-09-03 04:51:16 +02:00
sub_8032250: @ 8032250
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
sub sp, 0xC
adds r6, r0, 0
ldrb r0, [r6]
ldrb r1, [r6, 0x1]
subs r2, r1, 0x1
lsls r2, 24
lsrs r2, 24
ldrb r4, [r6, 0x2]
subs r3, r4, 0x1
lsls r3, 24
lsrs r3, 24
ldrb r5, [r6, 0x3]
adds r1, r5
adds r1, 0x1
lsls r1, 24
lsrs r1, 24
str r1, [sp]
ldrb r1, [r6, 0x4]
adds r4, r1
adds r4, 0x1
lsls r4, 24
lsrs r4, 24
str r4, [sp, 0x4]
movs r1, 0x2
str r1, [sp, 0x8]
movs r1, 0
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldrb r0, [r6]
2015-12-03 09:17:29 +01:00
bl CopyBgTilemapBufferToVram
2015-11-29 04:26:45 +01:00
add sp, 0xC
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8032250
thumb_func_start sub_8032298
2016-09-03 04:51:16 +02:00
sub_8032298: @ 8032298
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
sub sp, 0xC
adds r4, r1, 0
adds r5, r2, 0
ldr r1, [sp, 0x18]
lsls r0, 24
lsrs r0, 24
lsls r4, 24
lsls r5, 24
lsls r3, 24
lsls r1, 24
movs r2, 0xFF
lsls r2, 24
adds r4, r2
lsrs r4, 24
adds r5, r2
lsrs r5, 24
movs r2, 0x80
lsls r2, 18
adds r3, r2
lsrs r3, 24
str r3, [sp]
adds r1, r2
lsrs r1, 24
str r1, [sp, 0x4]
movs r1, 0x2
str r1, [sp, 0x8]
movs r1, 0
adds r2, r4, 0
adds r3, r5, 0
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
add sp, 0xC
pop {r4,r5}
pop {r0}
bx r0
thumb_func_end sub_8032298
thumb_func_start sub_80322E0
2016-09-03 04:51:16 +02:00
sub_80322E0: @ 80322E0
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
adds r4, r1, 0
lsls r0, 24
lsrs r5, r0, 24
lsls r4, 24
lsrs r4, 24
ldr r1, =sub_8032298
adds r0, r5, 0
bl CallWindowFunction
adds r0, r5, 0
movs r1, 0x11
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
2015-12-03 09:17:29 +01:00
bl ClearWindowTilemap
2015-11-29 04:26:45 +01:00
cmp r4, 0x1
2016-01-07 05:23:20 +01:00
bne _0803230E
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
movs r1, 0x3
bl CopyWindowToVram
2016-01-07 05:23:20 +01:00
_0803230E:
2015-11-29 04:26:45 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end sub_80322E0
thumb_func_start sub_8032318
2016-09-03 04:51:16 +02:00
sub_8032318: @ 8032318
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
mov r6, r9
mov r5, r8
push {r5,r6}
sub sp, 0x8
adds r6, r0, 0
lsls r6, 24
lsrs r6, 24
movs r0, 0x1
movs r1, 0x6
bl GetFontAttribute
2015-11-29 04:26:45 +01:00
mov r9, r0
mov r0, r9
lsls r0, 24
lsrs r0, 24
mov r9, r0
movs r0, 0x1
movs r1, 0
bl GetFontAttribute
2015-11-29 04:26:45 +01:00
mov r8, r0
mov r0, r8
lsls r0, 24
lsrs r0, 24
mov r8, r0
movs r0, 0x1
movs r1, 0x1
bl GetFontAttribute
2015-11-29 04:26:45 +01:00
adds r5, r0, 0
lsls r5, 24
lsrs r5, 24
adds r0, r6, 0
movs r1, 0x3
bl GetWindowAttribute
2015-11-29 04:26:45 +01:00
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
adds r0, r6, 0
movs r1, 0x4
bl GetWindowAttribute
2015-11-29 04:26:45 +01:00
lsls r0, 24
lsrs r0, 24
mov r1, r8
muls r1, r4
str r1, [sp]
muls r0, r5
str r0, [sp, 0x4]
adds r0, r6, 0
mov r1, r9
movs r2, 0
movs r3, 0
bl FillWindowPixelRect
2015-11-29 04:26:45 +01:00
adds r0, r6, 0
movs r1, 0x2
bl CopyWindowToVram
2015-11-29 04:26:45 +01:00
add sp, 0x8
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_8032318
thumb_func_start sub_80323A0
2016-09-03 04:51:16 +02:00
sub_80323A0: @ 80323A0
2015-11-29 04:26:45 +01:00
push {lr}
ldr r0, [r0]
subs r0, 0x2
ldrb r0, [r0]
cmp r0, 0x8
2016-01-07 05:23:20 +01:00
bne _080323C0
2016-11-01 19:35:16 +01:00
ldr r1, =gUnknown_02022D04
2015-11-29 04:26:45 +01:00
ldrb r0, [r1]
cmp r0, 0
2016-01-07 05:23:20 +01:00
bne _080323C0
2015-11-29 04:26:45 +01:00
movs r0, 0x1
strb r0, [r1]
ldr r0, =sub_8030A70
movs r1, 0
2016-10-31 09:14:22 +01:00
bl CreateTask
2016-01-07 05:23:20 +01:00
_080323C0:
2015-11-29 04:26:45 +01:00
pop {r0}
bx r0
.pool
thumb_func_end sub_80323A0
thumb_func_start sub_80323CC
2016-09-03 04:51:16 +02:00
sub_80323CC: @ 80323CC
2015-11-29 04:26:45 +01:00
push {r4-r6,lr}
mov r6, r8
push {r6}
sub sp, 0x20
adds r4, r0, 0
adds r5, r1, 0
mov r8, r2
ldr r6, [sp, 0x34]
ldr r1, [sp, 0x38]
lsls r4, 24
lsls r5, 24
mov r0, r8
lsls r0, 16
lsrs r0, 16
mov r8, r0
lsls r3, 16
lsrs r3, 16
lsls r6, 24
lsrs r6, 24
lsls r1, 24
lsrs r1, 24
movs r0, 0x80
lsls r0, 17
adds r4, r0
lsrs r4, 24
adds r5, r0
lsrs r5, 24
movs r0, 0x5
str r0, [sp]
movs r0, 0x4
str r0, [sp, 0x4]
str r1, [sp, 0x8]
str r3, [sp, 0xC]
add r0, sp, 0x10
movs r1, 0
adds r2, r4, 0
adds r3, r5, 0
bl sub_8198A50
ldr r0, [sp, 0x10]
ldr r1, [sp, 0x14]
str r0, [sp, 0x18]
str r1, [sp, 0x1C]
add r0, sp, 0x18
mov r1, r8
adds r2, r6, 0
movs r3, 0
2016-01-08 08:27:40 +01:00
bl CreateYesNoMenu
2015-11-29 04:26:45 +01:00
add sp, 0x20
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
thumb_func_end sub_80323CC
thumb_func_start unknown_rbox_to_vram
2016-09-03 04:51:16 +02:00
unknown_rbox_to_vram: @ 803243C
2015-11-29 04:26:45 +01:00
push {r4,r5,lr}
adds r4, r1, 0
lsls r0, 24
lsrs r5, r0, 24
lsls r4, 24
lsrs r4, 24
ldr r1, =sub_8032474
adds r0, r5, 0
bl CallWindowFunction
adds r0, r5, 0
movs r1, 0x11
bl FillWindowPixelBuffer
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
2015-12-03 09:17:29 +01:00
bl PutWindowTilemap
2015-11-29 04:26:45 +01:00
cmp r4, 0x1
2016-01-07 05:23:20 +01:00
bne _0803246A
2015-11-29 04:26:45 +01:00
adds r0, r5, 0
movs r1, 0x3
bl CopyWindowToVram
2016-01-07 05:23:20 +01:00
_0803246A:
2015-11-29 04:26:45 +01:00
pop {r4,r5}
pop {r0}
bx r0
.pool
thumb_func_end unknown_rbox_to_vram
thumb_func_start sub_8032474
2016-09-03 04:51:16 +02:00
sub_8032474: @ 8032474
2015-11-29 04:26:45 +01:00
push {r4-r7,lr}
mov r7, r10
mov r6, r9
mov r5, r8
push {r5-r7}
sub sp, 0x20
mov r8, r0
adds r5, r2, 0
mov r9, r3
ldr r0, [sp, 0x40]
ldr r6, [sp, 0x44]
mov r2, r8
lsls r2, 24
lsrs r2, 24
mov r8, r2
lsls r1, 24
lsls r5, 24
mov r2, r9
lsls r2, 24
lsrs r2, 24
mov r9, r2
lsls r0, 24
lsrs r0, 24
str r0, [sp, 0x10]
lsls r6, 24
lsrs r6, 24
lsrs r0, r1, 24
str r0, [sp, 0xC]
movs r2, 0xFE
lsls r2, 24
adds r1, r2
lsrs r1, 24
str r1, [sp, 0x14]
lsrs r0, r5, 24
mov r10, r0
movs r2, 0xFF
lsls r2, 24
adds r5, r2
lsrs r5, 24
movs r4, 0x1
str r4, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
movs r1, 0xFD
ldr r2, [sp, 0x14]
adds r3, r5, 0
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldr r0, [sp, 0xC]
subs r0, 0x1
lsls r2, r0, 24
lsrs r2, 24
str r2, [sp, 0x18]
str r4, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
movs r1, 0xFF
adds r3, r5, 0
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
movs r1, 0x80
lsls r1, 1
mov r0, r9
str r0, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
ldr r2, [sp, 0xC]
adds r3, r5, 0
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldr r1, =0x00000101
ldr r7, [sp, 0xC]
add r7, r9
subs r0, r7, 0x1
lsls r2, r0, 24
lsrs r2, 24
str r2, [sp, 0x1C]
str r4, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
adds r3, r5, 0
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
movs r1, 0x81
lsls r1, 1
lsls r2, r7, 24
lsrs r7, r2, 24
str r4, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
adds r2, r7, 0
adds r3, r5, 0
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldr r1, =0x00000103
str r4, [sp]
movs r5, 0x5
str r5, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
ldr r2, [sp, 0x14]
mov r3, r10
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldr r1, =0x00000105
mov r0, r9
adds r0, 0x1
lsls r0, 24
lsrs r0, 24
str r0, [sp]
str r5, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
ldr r2, [sp, 0x18]
mov r3, r10
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
movs r1, 0x83
lsls r1, 1
str r4, [sp]
str r5, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
adds r2, r7, 0
mov r3, r10
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldr r1, =0x000008fd
ldr r2, [sp, 0x10]
add r10, r2
mov r0, r10
lsls r0, 24
lsrs r0, 24
mov r10, r0
str r4, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
ldr r2, [sp, 0x14]
mov r3, r10
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldr r1, =0x000008ff
str r4, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
ldr r2, [sp, 0x18]
mov r3, r10
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
movs r1, 0x90
lsls r1, 4
movs r2, 0x1
negs r2, r2
add r9, r2
mov r0, r9
lsls r0, 24
lsrs r0, 24
str r0, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
ldr r2, [sp, 0xC]
mov r3, r10
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldr r1, =0x00000901
str r4, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
ldr r2, [sp, 0x1C]
mov r3, r10
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
ldr r1, =0x00000902
str r4, [sp]
str r4, [sp, 0x4]
str r6, [sp, 0x8]
mov r0, r8
adds r2, r7, 0
mov r3, r10
2015-12-03 09:17:29 +01:00
bl FillBgTilemapBufferRect
2015-11-29 04:26:45 +01:00
add sp, 0x20
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_8032474
thumb_func_start task_new_game_prof_birch_speech_part2_1
2016-09-03 04:51:16 +02:00
task_new_game_prof_birch_speech_part2_1: @ 803261C
2015-11-29 04:26:45 +01:00
push {r4,lr}
lsls r0, 24
lsrs r0, 24
2016-11-01 19:35:16 +01:00
ldr r2, =gTasks
2015-11-29 04:26:45 +01:00
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
adds r4, r1, r2
ldrh r0, [r4, 0x16]
subs r1, r0, 0x1
strh r1, [r4, 0x16]
lsls r0, 16
cmp r0, 0
2016-01-07 05:23:20 +01:00
bgt _08032644
2015-11-29 04:26:45 +01:00
movs r0, 0
movs r1, 0x1
bl unknown_rbox_to_vram
ldr r0, =task_new_game_prof_birch_speech_part2_2
str r0, [r4]
2016-01-07 05:23:20 +01:00
_08032644:
2015-11-29 04:26:45 +01:00
pop {r4}
pop {r0}
bx r0
.pool
thumb_func_end task_new_game_prof_birch_speech_part2_1
2016-09-03 08:11:29 +02:00
.align 2, 0 @ Don't pad with nop.