From eaa50ff39b4e5e331e7644c6db14a3e9344824e6 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Fri, 30 Dec 2016 11:25:08 -0800 Subject: [PATCH] split out hall of fame and credits code --- asm/credits.s | 4182 ++++++++++++++++++++++++ asm/hall_of_fame.s | 3402 ++++++++++++++++++++ asm/rom_813BA94.s | 7566 -------------------------------------------- ld_script.txt | 2 + 4 files changed, 7586 insertions(+), 7566 deletions(-) create mode 100644 asm/credits.s create mode 100644 asm/hall_of_fame.s diff --git a/asm/credits.s b/asm/credits.s new file mode 100644 index 000000000..1d4747034 --- /dev/null +++ b/asm/credits.s @@ -0,0 +1,4182 @@ + .include "constants/gba_constants.inc" + .include "constants/species_constants.inc" + .include "asm/macros.inc" + + .syntax unified + + .text + + thumb_func_start sub_8143948 +sub_8143948: @ 8143948 + push {lr} + bl LoadOam + bl ProcessSpriteCopyRequests + bl TransferPlttBuffer + pop {r0} + bx r0 + thumb_func_end sub_8143948 + + thumb_func_start sub_814395C +sub_814395C: @ 814395C + push {lr} + bl RunTasks + bl AnimateSprites + bl BuildOamBuffer + bl UpdatePaletteFade + ldr r0, _081439B8 @ =gMain + ldrh r1, [r0, 0x2C] + movs r0, 0x2 + ands r0, r1 + cmp r0, 0 + beq _081439B2 + ldr r0, _081439BC @ =gUnknown_02039324 + ldrb r0, [r0] + cmp r0, 0 + beq _081439B2 + ldr r2, _081439C0 @ =gTasks + ldr r0, _081439C4 @ =gUnknown_02039322 + ldrh r1, [r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r2 + ldr r1, [r0] + ldr r0, _081439C8 @ =sub_8143B68 + cmp r1, r0 + bne _081439B2 + bl sub_8143948 + bl RunTasks + bl AnimateSprites + bl BuildOamBuffer + bl UpdatePaletteFade + ldr r1, _081439CC @ =gUnknown_02039325 + movs r0, 0x1 + strb r0, [r1] +_081439B2: + pop {r0} + bx r0 + .align 2, 0 +_081439B8: .4byte gMain +_081439BC: .4byte gUnknown_02039324 +_081439C0: .4byte gTasks +_081439C4: .4byte gUnknown_02039322 +_081439C8: .4byte sub_8143B68 +_081439CC: .4byte gUnknown_02039325 + thumb_func_end sub_814395C + + thumb_func_start sub_81439D0 +sub_81439D0: @ 81439D0 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + sub sp, 0x4 + bl sub_8144130 + movs r0, 0 + bl SetVBlankCallback + bl ResetPaletteFade + bl ResetTasks + ldr r0, _08143AF0 @ =sub_8143B38 + movs r1, 0 + bl CreateTask + lsls r0, 24 + lsrs r7, r0, 24 + ldr r1, _08143AF4 @ =gTasks + lsls r0, r7, 2 + adds r0, r7 + lsls r0, 3 + adds r0, r1 + movs r1, 0 + strh r1, [r0, 0x10] + strh r1, [r0, 0x16] + strh r1, [r0, 0x1E] + movs r1, 0x1 + strh r1, [r0, 0x22] +_08143A0E: + movs r0, 0 + adds r1, r7, 0 + bl sub_8144ECC + lsls r0, 24 + cmp r0, 0 + beq _08143A0E + ldr r6, _08143AF4 @ =gTasks + lsls r5, r7, 2 + adds r5, r7 + lsls r5, 3 + adds r5, r6 + movs r0, 0xA + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + movs r1, 0 + mov r9, r1 + movs r2, 0 + mov r8, r2 + movs r1, 0x28 + strh r1, [r0, 0x8] + ldr r4, _08143AF8 @ =gWindowConfig_81E7208 + adds r0, r4, 0 + bl SetUpWindowConfig + adds r0, r4, 0 + bl InitMenuWindow + ldr r0, _08143AFC @ =gUnknown_0840B7BC + movs r1, 0x80 + movs r2, 0x40 + bl LoadPalette + ldr r0, _08143B00 @ =gUnknown_0840B7FC + ldr r1, _08143B04 @ =0x0600bee0 + movs r2, 0x20 + bl CpuSet + ldr r1, _08143B08 @ =REG_BG0VOFS + ldr r2, _08143B0C @ =0x0000fffc + adds r0, r2, 0 + strh r0, [r1] + ldr r0, _08143B10 @ =sub_81441B8 + movs r1, 0 + bl CreateTask + lsls r0, 24 + lsrs r0, 24 + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r1, r6 + strh r7, [r1, 0xA] + strh r0, [r5, 0x26] + movs r0, 0x1 + negs r0, r0 + mov r1, r8 + str r1, [sp] + movs r1, 0 + movs r2, 0x10 + movs r3, 0 + bl BeginNormalPaletteFade + ldr r3, _08143B14 @ =0x04000208 + ldrh r2, [r3] + mov r0, r8 + strh r0, [r3] + ldr r4, _08143B18 @ =0x04000200 + ldrh r0, [r4] + movs r1, 0x1 + orrs r0, r1 + strh r0, [r4] + strh r2, [r3] + ldr r2, _08143B1C @ =REG_DISPSTAT + ldrh r0, [r2] + movs r1, 0x8 + orrs r0, r1 + strh r0, [r2] + ldr r0, _08143B20 @ =sub_8143948 + bl SetVBlankCallback + ldr r0, _08143B24 @ =0x000001c7 + bl m4aSongNumStart + ldr r0, _08143B28 @ =sub_814395C + bl SetMainCallback2 + ldr r0, _08143B2C @ =gUnknown_02039325 + mov r1, r9 + strb r1, [r0] + ldr r4, _08143B30 @ =0x0201c000 + bl sub_81458DC + adds r0, r4, 0 + adds r0, 0x88 + mov r2, r8 + strh r2, [r0] + adds r0, 0x2 + strh r2, [r0] + adds r0, 0x2 + strh r2, [r0] + ldr r0, _08143B34 @ =gUnknown_02039322 + strh r7, [r0] + add sp, 0x4 + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08143AF0: .4byte sub_8143B38 +_08143AF4: .4byte gTasks +_08143AF8: .4byte gWindowConfig_81E7208 +_08143AFC: .4byte gUnknown_0840B7BC +_08143B00: .4byte gUnknown_0840B7FC +_08143B04: .4byte 0x0600bee0 +_08143B08: .4byte REG_BG0VOFS +_08143B0C: .4byte 0x0000fffc +_08143B10: .4byte sub_81441B8 +_08143B14: .4byte 0x04000208 +_08143B18: .4byte 0x04000200 +_08143B1C: .4byte REG_DISPSTAT +_08143B20: .4byte sub_8143948 +_08143B24: .4byte 0x000001c7 +_08143B28: .4byte sub_814395C +_08143B2C: .4byte gUnknown_02039325 +_08143B30: .4byte 0x0201c000 +_08143B34: .4byte gUnknown_02039322 + thumb_func_end sub_81439D0 + + thumb_func_start sub_8143B38 +sub_8143B38: @ 8143B38 + push {lr} + lsls r0, 24 + lsrs r2, r0, 24 + ldr r0, _08143B5C @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _08143B58 + ldr r0, _08143B60 @ =gTasks + lsls r1, r2, 2 + adds r1, r2 + lsls r1, 3 + adds r1, r0 + ldr r0, _08143B64 @ =sub_8143B68 + str r0, [r1] +_08143B58: + pop {r0} + bx r0 + .align 2, 0 +_08143B5C: .4byte gPaletteFade +_08143B60: .4byte gTasks +_08143B64: .4byte sub_8143B68 + thumb_func_end sub_8143B38 + + thumb_func_start sub_8143B68 +sub_8143B68: @ 8143B68 + push {r4,lr} + sub sp, 0x4 + lsls r0, 24 + lsrs r0, 24 + ldr r2, _08143B9C @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r4, r1, r2 + movs r0, 0x10 + ldrsh r1, [r4, r0] + cmp r1, 0 + beq _08143BA4 + movs r3, 0xA + ldrsh r1, [r4, r3] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r2 + movs r1, 0x1E + strh r1, [r0, 0x8] + movs r0, 0x80 + lsls r0, 1 + strh r0, [r4, 0x20] + ldr r0, _08143BA0 @ =sub_8143EBC + b _08143BEE + .align 2, 0 +_08143B9C: .4byte gTasks +_08143BA0: .4byte sub_8143EBC +_08143BA4: + ldr r0, _08143BCC @ =gUnknown_02039320 + strh r1, [r0] + ldrh r2, [r4, 0x1E] + movs r3, 0x1E + ldrsh r0, [r4, r3] + cmp r0, 0x1 + bne _08143BD4 + strh r2, [r4, 0x22] + strh r1, [r4, 0x1E] + movs r0, 0x1 + negs r0, r0 + str r1, [sp] + movs r1, 0 + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + ldr r0, _08143BD0 @ =sub_8143BFC + b _08143BEE + .align 2, 0 +_08143BCC: .4byte gUnknown_02039320 +_08143BD0: .4byte sub_8143BFC +_08143BD4: + cmp r0, 0x2 + bne _08143BF0 + strh r2, [r4, 0x22] + strh r1, [r4, 0x1E] + movs r0, 0x1 + negs r0, r0 + str r1, [sp] + movs r1, 0 + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + ldr r0, _08143BF8 @ =sub_8143CC0 +_08143BEE: + str r0, [r4] +_08143BF0: + add sp, 0x4 + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08143BF8: .4byte sub_8143CC0 + thumb_func_end sub_8143B68 + + thumb_func_start sub_8143BFC +sub_8143BFC: @ 8143BFC + push {r4,lr} + lsls r0, 24 + lsrs r4, r0, 24 + ldr r0, _08143C34 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + lsls r0, 24 + lsrs r1, r0, 24 + cmp r1, 0 + bne _08143C2C + movs r0, 0x80 + lsls r0, 19 + strh r1, [r0] + adds r0, r4, 0 + bl sub_81450AC + ldr r1, _08143C38 @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r0, r1 + ldr r1, _08143C3C @ =c2_080C9BFC + str r1, [r0] +_08143C2C: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08143C34: .4byte gPaletteFade +_08143C38: .4byte gTasks +_08143C3C: .4byte c2_080C9BFC + thumb_func_end sub_8143BFC + + thumb_func_start c2_080C9BFC +c2_080C9BFC: @ 8143C40 + push {r4,r5,lr} + sub sp, 0x4 + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + movs r0, 0 + bl SetVBlankCallback + ldr r1, _08143CA8 @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r5, r0, r1 + ldrb r0, [r5, 0x16] + adds r1, r4, 0 + bl sub_8144ECC + lsls r0, 24 + cmp r0, 0 + beq _08143CA0 + movs r0, 0x1 + negs r0, r0 + movs r4, 0 + str r4, [sp] + movs r1, 0 + movs r2, 0x10 + movs r3, 0 + bl BeginNormalPaletteFade + ldr r3, _08143CAC @ =0x04000208 + ldrh r2, [r3] + strh r4, [r3] + ldr r4, _08143CB0 @ =0x04000200 + ldrh r0, [r4] + movs r1, 0x1 + orrs r0, r1 + strh r0, [r4] + strh r2, [r3] + ldr r2, _08143CB4 @ =REG_DISPSTAT + ldrh r0, [r2] + movs r1, 0x8 + orrs r0, r1 + strh r0, [r2] + ldr r0, _08143CB8 @ =sub_8143948 + bl SetVBlankCallback + ldr r0, _08143CBC @ =sub_8143B38 + str r0, [r5] +_08143CA0: + add sp, 0x4 + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_08143CA8: .4byte gTasks +_08143CAC: .4byte 0x04000208 +_08143CB0: .4byte 0x04000200 +_08143CB4: .4byte REG_DISPSTAT +_08143CB8: .4byte sub_8143948 +_08143CBC: .4byte sub_8143B38 + thumb_func_end c2_080C9BFC + + thumb_func_start sub_8143CC0 +sub_8143CC0: @ 8143CC0 + push {r4,lr} + lsls r0, 24 + lsrs r4, r0, 24 + ldr r0, _08143CF8 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + lsls r0, 24 + lsrs r1, r0, 24 + cmp r1, 0 + bne _08143CF0 + movs r0, 0x80 + lsls r0, 19 + strh r1, [r0] + adds r0, r4, 0 + bl sub_81450AC + ldr r1, _08143CFC @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r0, r1 + ldr r1, _08143D00 @ =sub_8143D04 + str r1, [r0] +_08143CF0: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08143CF8: .4byte gPaletteFade +_08143CFC: .4byte gTasks +_08143D00: .4byte sub_8143D04 + thumb_func_end sub_8143CC0 + + thumb_func_start sub_8143D04 +sub_8143D04: @ 8143D04 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + sub sp, 0x4 + lsls r0, 24 + lsrs r6, r0, 24 + ldr r0, _08143DC8 @ =gMain + ldr r1, _08143DCC @ =0x0000043c + adds r1, r0 + mov r8, r1 + ldrb r7, [r1] + cmp r7, 0 + beq _08143D24 + cmp r7, 0x1 + beq _08143E0C +_08143D24: + bl ResetSpriteData + bl FreeAllSpritePalettes + ldr r1, _08143DD0 @ =gReservedSpritePaletteCount + movs r0, 0x8 + strb r0, [r1] + ldr r0, _08143DD4 @ =gBirchHelpGfx + movs r1, 0xC0 + lsls r1, 19 + bl LZ77UnCompVram + ldr r0, _08143DD8 @ =gBirchGrassTilemap + ldr r1, _08143DDC @ =0x06003800 + bl LZ77UnCompVram + ldr r0, _08143DE0 @ =gBirchBagGrassPal + 0x2 + movs r1, 0x1 + movs r2, 0x3E + bl LoadPalette + movs r1, 0 + ldr r4, _08143DE4 @ =0x0201e000 + movs r3, 0x11 + ldr r2, _08143DE8 @ =0x000007ff +_08143D56: + adds r0, r1, r4 + strb r3, [r0] + adds r0, r1, 0x1 + lsls r0, 16 + lsrs r1, r0, 16 + cmp r1, r2 + bls _08143D56 + movs r1, 0 + ldr r2, _08143DEC @ =0x0201f800 + ldr r6, _08143DF0 @ =gUnknown_0840CAA0 + ldr r0, _08143DF4 @ =0xfffff000 + adds r5, r2, r0 + movs r4, 0x22 + ldr r3, _08143DE8 @ =0x000007ff +_08143D72: + adds r0, r1, r5 + strb r4, [r0] + adds r0, r1, 0x1 + lsls r0, 16 + lsrs r1, r0, 16 + cmp r1, r3 + bls _08143D72 + movs r1, 0 + ldr r5, _08143DF8 @ =0x0201f000 + movs r4, 0x33 + ldr r3, _08143DE8 @ =0x000007ff +_08143D88: + adds r0, r1, r5 + strb r4, [r0] + adds r0, r1, 0x1 + lsls r0, 16 + lsrs r1, r0, 16 + cmp r1, r3 + bls _08143D88 + movs r0, 0 + strh r0, [r2] + ldr r1, _08143DFC @ =0x000053ff + adds r0, r1, 0 + strh r0, [r2, 0x2] + ldr r1, _08143E00 @ =0x0000529f + adds r0, r1, 0 + strh r0, [r2, 0x4] + ldr r1, _08143E04 @ =0x00007e94 + adds r0, r1, 0 + strh r0, [r2, 0x6] + adds r0, r6, 0 + bl LoadSpriteSheet + ldr r0, _08143E08 @ =gUnknown_0840CAB0 + bl LoadSpritePalette + ldr r1, _08143DC8 @ =gMain + ldr r2, _08143DCC @ =0x0000043c + adds r1, r2 + ldrb r0, [r1] + adds r0, 0x1 + strb r0, [r1] + b _08143E90 + .align 2, 0 +_08143DC8: .4byte gMain +_08143DCC: .4byte 0x0000043c +_08143DD0: .4byte gReservedSpritePaletteCount +_08143DD4: .4byte gBirchHelpGfx +_08143DD8: .4byte gBirchGrassTilemap +_08143DDC: .4byte 0x06003800 +_08143DE0: .4byte gBirchBagGrassPal + 0x2 +_08143DE4: .4byte 0x0201e000 +_08143DE8: .4byte 0x000007ff +_08143DEC: .4byte 0x0201f800 +_08143DF0: .4byte gUnknown_0840CAA0 +_08143DF4: .4byte 0xfffff000 +_08143DF8: .4byte 0x0201f000 +_08143DFC: .4byte 0x000053ff +_08143E00: .4byte 0x0000529f +_08143E04: .4byte 0x00007e94 +_08143E08: .4byte gUnknown_0840CAB0 +_08143E0C: + ldr r0, _08143EA0 @ =sub_8144514 + movs r1, 0 + bl CreateTask + ldr r2, _08143EA4 @ =gTasks + lsls r4, r6, 2 + adds r4, r6 + lsls r4, 3 + adds r4, r2 + lsls r0, 24 + lsrs r0, 24 + movs r1, 0 + mov r9, r1 + movs r5, 0 + strh r0, [r4, 0xE] + movs r0, 0xE + ldrsh r1, [r4, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r2 + strh r7, [r0, 0x8] + movs r0, 0xE + ldrsh r1, [r4, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r2 + strh r6, [r0, 0xA] + movs r0, 0xE + ldrsh r1, [r4, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r2 + ldrh r1, [r4, 0x16] + strh r1, [r0, 0xC] + movs r0, 0x1 + negs r0, r0 + str r5, [sp] + movs r1, 0 + movs r2, 0x10 + movs r3, 0 + bl BeginNormalPaletteFade + ldr r0, _08143EA8 @ =REG_BG3HOFS + strh r5, [r0] + ldr r1, _08143EAC @ =REG_BG3VOFS + movs r0, 0x20 + strh r0, [r1] + subs r1, 0x10 + ldr r2, _08143EB0 @ =0x00000703 + adds r0, r2, 0 + strh r0, [r1] + subs r1, 0xE + movs r2, 0xCA + lsls r2, 5 + adds r0, r2, 0 + strh r0, [r1] + mov r1, r9 + mov r0, r8 + strb r1, [r0] + ldr r0, _08143EB4 @ =gUnknown_0203935C + strh r5, [r0] + ldr r0, _08143EB8 @ =sub_8143B38 + str r0, [r4] +_08143E90: + add sp, 0x4 + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08143EA0: .4byte sub_8144514 +_08143EA4: .4byte gTasks +_08143EA8: .4byte REG_BG3HOFS +_08143EAC: .4byte REG_BG3VOFS +_08143EB0: .4byte 0x00000703 +_08143EB4: .4byte gUnknown_0203935C +_08143EB8: .4byte sub_8143B38 + thumb_func_end sub_8143D04 + + thumb_func_start sub_8143EBC +sub_8143EBC: @ 8143EBC + push {r4,lr} + sub sp, 0x4 + lsls r0, 24 + lsrs r0, 24 + ldr r2, _08143EE0 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r4, r1, r2 + ldrh r0, [r4, 0x20] + movs r2, 0x20 + ldrsh r1, [r4, r2] + cmp r1, 0 + beq _08143EE4 + subs r0, 0x1 + strh r0, [r4, 0x20] + b _08143EF8 + .align 2, 0 +_08143EE0: .4byte gTasks +_08143EE4: + movs r0, 0x1 + negs r0, r0 + str r1, [sp] + movs r1, 0xC + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + ldr r0, _08143F00 @ =sub_8143F04 + str r0, [r4] +_08143EF8: + add sp, 0x4 + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08143F00: .4byte sub_8143F04 + thumb_func_end sub_8143EBC + + thumb_func_start sub_8143F04 +sub_8143F04: @ 8143F04 + push {r4,lr} + lsls r0, 24 + lsrs r4, r0, 24 + ldr r0, _08143F30 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _08143F2A + adds r0, r4, 0 + bl sub_81450AC + ldr r0, _08143F34 @ =gTasks + lsls r1, r4, 2 + adds r1, r4 + lsls r1, 3 + adds r1, r0 + ldr r0, _08143F38 @ =sub_8143F3C + str r0, [r1] +_08143F2A: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08143F30: .4byte gPaletteFade +_08143F34: .4byte gTasks +_08143F38: .4byte sub_8143F3C + thumb_func_end sub_8143F04 + + thumb_func_start sub_8143F3C +sub_8143F3C: @ 8143F3C + push {r4,r5,lr} + sub sp, 0x4 + adds r5, r0, 0 + lsls r5, 24 + lsrs r5, 24 + bl sub_8144130 + bl ResetPaletteFade + movs r1, 0xE0 + lsls r1, 6 + movs r0, 0 + movs r2, 0 + bl sub_8145128 + bl ResetSpriteData + bl FreeAllSpritePalettes + movs r0, 0x1 + negs r0, r0 + movs r4, 0 + str r4, [sp] + movs r1, 0x8 + movs r2, 0x10 + movs r3, 0 + bl BeginNormalPaletteFade + ldr r1, _08143FC4 @ =REG_BG0CNT + movs r2, 0xE0 + lsls r2, 3 + adds r0, r2, 0 + strh r0, [r1] + ldr r3, _08143FC8 @ =0x04000208 + ldrh r2, [r3] + strh r4, [r3] + ldr r4, _08143FCC @ =0x04000200 + ldrh r0, [r4] + movs r1, 0x1 + orrs r0, r1 + strh r0, [r4] + strh r2, [r3] + ldr r2, _08143FD0 @ =REG_DISPSTAT + ldrh r0, [r2] + movs r1, 0x8 + orrs r0, r1 + strh r0, [r2] + movs r1, 0x80 + lsls r1, 19 + movs r2, 0xA0 + lsls r2, 1 + adds r0, r2, 0 + strh r0, [r1] + ldr r1, _08143FD4 @ =gTasks + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r1 + movs r1, 0x80 + lsls r1, 1 + strh r1, [r0, 0x8] + ldr r1, _08143FD8 @ =sub_8143FDC + str r1, [r0] + add sp, 0x4 + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_08143FC4: .4byte REG_BG0CNT +_08143FC8: .4byte 0x04000208 +_08143FCC: .4byte 0x04000200 +_08143FD0: .4byte REG_DISPSTAT +_08143FD4: .4byte gTasks +_08143FD8: .4byte sub_8143FDC + thumb_func_end sub_8143F3C + + thumb_func_start sub_8143FDC +sub_8143FDC: @ 8143FDC + push {r4,lr} + sub sp, 0x4 + lsls r0, 24 + lsrs r0, 24 + ldr r2, _08144000 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r4, r1, r2 + ldrh r0, [r4, 0x8] + movs r2, 0x8 + ldrsh r1, [r4, r2] + cmp r1, 0 + beq _08144004 + subs r0, 0x1 + strh r0, [r4, 0x8] + b _08144018 + .align 2, 0 +_08144000: .4byte gTasks +_08144004: + movs r0, 0x1 + negs r0, r0 + str r1, [sp] + movs r1, 0x6 + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + ldr r0, _08144020 @ =sub_8144024 + str r0, [r4] +_08144018: + add sp, 0x4 + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08144020: .4byte sub_8144024 + thumb_func_end sub_8143FDC + + thumb_func_start sub_8144024 +sub_8144024: @ 8144024 + push {r4,r5,lr} + sub sp, 0x4 + lsls r0, 24 + lsrs r5, r0, 24 + ldr r0, _08144074 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + lsls r0, 24 + lsrs r4, r0, 24 + cmp r4, 0 + bne _0814406A + movs r0, 0xE0 + lsls r0, 6 + movs r1, 0 + bl sub_81452D0 + movs r0, 0x1 + negs r0, r0 + str r4, [sp] + movs r1, 0 + movs r2, 0 + movs r3, 0 + bl BeginNormalPaletteFade + ldr r1, _08144078 @ =gTasks + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r1 + movs r1, 0xE1 + lsls r1, 5 + strh r1, [r0, 0x8] + ldr r1, _0814407C @ =sub_8144080 + str r1, [r0] +_0814406A: + add sp, 0x4 + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_08144074: .4byte gPaletteFade +_08144078: .4byte gTasks +_0814407C: .4byte sub_8144080 + thumb_func_end sub_8144024 + + thumb_func_start sub_8144080 +sub_8144080: @ 8144080 + push {r4,lr} + sub sp, 0x4 + lsls r0, 24 + lsrs r2, r0, 24 + ldr r0, _081440CC @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _08144104 + ldr r1, _081440D0 @ =gTasks + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r4, r0, r1 + movs r0, 0x8 + ldrsh r1, [r4, r0] + cmp r1, 0 + beq _081440AE + ldr r0, _081440D4 @ =gMain + ldrh r0, [r0, 0x2E] + cmp r0, 0 + beq _081440E0 +_081440AE: + movs r0, 0x4 + bl FadeOutBGM + movs r0, 0x1 + negs r0, r0 + ldr r1, _081440D8 @ =0x0000ffff + str r1, [sp] + movs r1, 0x8 + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + ldr r0, _081440DC @ =sub_8144114 + str r0, [r4] + b _08144104 + .align 2, 0 +_081440CC: .4byte gPaletteFade +_081440D0: .4byte gTasks +_081440D4: .4byte gMain +_081440D8: .4byte 0x0000ffff +_081440DC: .4byte sub_8144114 +_081440E0: + ldr r0, _0814410C @ =0x00001be8 + cmp r1, r0 + bne _081440EC + movs r0, 0x8 + bl FadeOutBGM +_081440EC: + movs r0, 0x8 + ldrsh r1, [r4, r0] + ldr r0, _08144110 @ =0x00001ab8 + cmp r1, r0 + bne _081440FE + movs r0, 0xE4 + lsls r0, 1 + bl m4aSongNumStart +_081440FE: + ldrh r0, [r4, 0x8] + subs r0, 0x1 + strh r0, [r4, 0x8] +_08144104: + add sp, 0x4 + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_0814410C: .4byte 0x00001be8 +_08144110: .4byte 0x00001ab8 + thumb_func_end sub_8144080 + + thumb_func_start sub_8144114 +sub_8144114: @ 8144114 + push {lr} + ldr r0, _0814412C @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _08144128 + movs r0, 0xFF + bl SoftReset +_08144128: + pop {r0} + bx r0 + .align 2, 0 +_0814412C: .4byte gPaletteFade + thumb_func_end sub_8144114 + + thumb_func_start sub_8144130 +sub_8144130: @ 8144130 + sub sp, 0x8 + movs r0, 0x80 + lsls r0, 19 + movs r1, 0 + strh r1, [r0] + adds r0, 0x1C + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + subs r0, 0x6 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + subs r0, 0x6 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + subs r0, 0x6 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + adds r0, 0x3E + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + mov r0, sp + strh r1, [r0] + ldr r1, _081441A4 @ =0x040000d4 + str r0, [r1] + movs r0, 0xC0 + lsls r0, 19 + str r0, [r1, 0x4] + ldr r0, _081441A8 @ =0x8100c000 + str r0, [r1, 0x8] + ldr r0, [r1, 0x8] + movs r2, 0 + str r2, [sp, 0x4] + add r0, sp, 0x4 + str r0, [r1] + movs r0, 0xE0 + lsls r0, 19 + str r0, [r1, 0x4] + ldr r0, _081441AC @ =0x85000100 + str r0, [r1, 0x8] + ldr r0, [r1, 0x8] + mov r0, sp + strh r2, [r0] + str r0, [r1] + ldr r0, _081441B0 @ =0x05000002 + str r0, [r1, 0x4] + ldr r0, _081441B4 @ =0x810001ff + str r0, [r1, 0x8] + ldr r0, [r1, 0x8] + add sp, 0x8 + bx lr + .align 2, 0 +_081441A4: .4byte 0x040000d4 +_081441A8: .4byte 0x8100c000 +_081441AC: .4byte 0x85000100 +_081441B0: .4byte 0x05000002 +_081441B4: .4byte 0x810001ff + thumb_func_end sub_8144130 + + thumb_func_start sub_81441B8 +sub_81441B8: @ 81441B8 + push {r4-r7,lr} + mov r7, r8 + push {r7} + sub sp, 0x4 + lsls r0, 24 + lsrs r5, r0, 24 + ldr r1, _081441E4 @ =gTasks + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r1 + movs r2, 0x8 + ldrsh r0, [r0, r2] + adds r6, r1, 0 + cmp r0, 0xA + bhi _08144218 + lsls r0, 2 + ldr r1, _081441E8 @ =_081441EC + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_081441E4: .4byte gTasks +_081441E8: .4byte _081441EC + .align 2, 0 +_081441EC: + .4byte _08144218 + .4byte _08144258 + .4byte _08144278 + .4byte _08144358 + .4byte _0814438C + .4byte _081443F8 + .4byte _08144218 + .4byte _08144218 + .4byte _08144218 + .4byte _08144218 + .4byte _08144428 +_08144218: + ldr r0, _08144250 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + lsls r0, 24 + lsrs r2, r0, 24 + cmp r2, 0 + beq _0814422A + b _08144446 +_0814422A: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r6 + movs r1, 0x1 + strh r1, [r0, 0x8] + movs r1, 0x58 + strh r1, [r0, 0xE] + movs r3, 0xA + ldrsh r1, [r0, r3] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + strh r2, [r0, 0x24] + ldr r0, _08144254 @ =gUnknown_02039320 + strh r2, [r0] + b _08144446 + .align 2, 0 +_08144250: .4byte gPaletteFade +_08144254: .4byte gUnknown_02039320 +_08144258: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r1, r0, r6 + ldrh r2, [r1, 0xE] + movs r3, 0xE + ldrsh r0, [r1, r3] + cmp r0, 0 + beq _08144270 + subs r0, r2, 0x1 + strh r0, [r1, 0xE] + b _08144446 +_08144270: + ldrh r0, [r1, 0x8] + adds r0, 0x1 + strh r0, [r1, 0x8] + b _08144446 +_08144278: + movs r2, 0x80 + lsls r2, 19 + ldrh r1, [r2] + ldr r0, _08144320 @ =0x0000feff + ands r0, r1 + strh r0, [r2] + lsls r2, r5, 2 + adds r0, r2, r5 + lsls r0, 3 + adds r3, r0, r6 + movs r0, 0xA + ldrsh r1, [r3, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r4, r0, r6 + ldr r1, [r4] + ldr r0, _08144324 @ =sub_8143B68 + mov r8, r2 + cmp r1, r0 + bne _08144352 + movs r1, 0xC + ldrsh r0, [r3, r1] + cmp r0, 0x33 + bgt _0814434C + movs r4, 0 + ldr r7, _08144328 @ =gCreditsEntryPointerTable + adds r6, r3, 0 +_081442B0: + movs r2, 0xC + ldrsh r1, [r6, r2] + lsls r0, r1, 2 + adds r0, r1 + adds r0, r4 + lsls r0, 2 + adds r0, r7 + ldr r0, [r0] + ldr r0, [r0, 0x4] + lsls r2, r4, 25 + movs r3, 0x90 + lsls r3, 20 + adds r2, r3 + lsrs r2, 24 + movs r1, 0 + movs r3, 0xF0 + bl sub_8072BD8 + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, 0x4 + bls _081442B0 + ldr r3, _0814432C @ =gTasks + mov r0, r8 + adds r1, r0, r5 + lsls r1, 3 + adds r1, r3 + ldrh r0, [r1, 0xC] + adds r0, 0x1 + strh r0, [r1, 0xC] + ldrh r0, [r1, 0x8] + adds r0, 0x1 + strh r0, [r1, 0x8] + movs r0, 0xA + ldrsh r2, [r1, r0] + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r3 + movs r2, 0x1 + strh r2, [r0, 0x24] + movs r2, 0xA + ldrsh r1, [r1, r2] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r3 + movs r3, 0x22 + ldrsh r0, [r0, r3] + cmp r0, 0x1 + bne _08144334 + movs r0, 0xC0 + lsls r0, 2 + ldr r1, _08144330 @ =0x0000328d + b _0814433A + .align 2, 0 +_08144320: .4byte 0x0000feff +_08144324: .4byte sub_8143B68 +_08144328: .4byte gCreditsEntryPointerTable +_0814432C: .4byte gTasks +_08144330: .4byte 0x0000328d +_08144334: + movs r0, 0xC0 + lsls r0, 2 + ldr r1, _08144348 @ =0x00001967 +_0814433A: + str r1, [sp] + movs r1, 0 + movs r2, 0x10 + movs r3, 0 + bl BeginNormalPaletteFade + b _08144446 + .align 2, 0 +_08144348: .4byte 0x00001967 +_0814434C: + movs r0, 0xA + strh r0, [r3, 0x8] + b _08144446 +_08144352: + movs r0, 0 + strh r0, [r4, 0x24] + b _08144446 +_08144358: + movs r2, 0x80 + lsls r2, 19 + ldrh r0, [r2] + movs r3, 0x80 + lsls r3, 1 + adds r1, r3, 0 + orrs r0, r1 + strh r0, [r2] + ldr r0, _08144388 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _08144446 + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r6 + movs r1, 0x82 + strh r1, [r0, 0xE] + ldrh r1, [r0, 0x8] + adds r1, 0x1 + strh r1, [r0, 0x8] + b _08144446 + .align 2, 0 +_08144388: .4byte gPaletteFade +_0814438C: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r4, r0, r6 + ldrh r1, [r4, 0xE] + movs r2, 0xE + ldrsh r0, [r4, r2] + cmp r0, 0 + beq _081443A4 + subs r0, r1, 0x1 + strh r0, [r4, 0xE] + b _08144446 +_081443A4: + ldrb r0, [r4, 0xC] + ldrb r1, [r4, 0xA] + bl sub_8144454 + lsls r0, 24 + cmp r0, 0 + beq _081443BA + ldrh r0, [r4, 0x8] + adds r0, 0x1 + strh r0, [r4, 0x8] + b _08144446 +_081443BA: + ldrh r0, [r4, 0x8] + adds r0, 0x1 + strh r0, [r4, 0x8] + movs r3, 0xA + ldrsh r1, [r4, r3] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + movs r1, 0x22 + ldrsh r0, [r0, r1] + cmp r0, 0x1 + bne _081443E0 + movs r0, 0xC0 + lsls r0, 2 + ldr r1, _081443DC @ =0x0000328d + b _081443E6 + .align 2, 0 +_081443DC: .4byte 0x0000328d +_081443E0: + movs r0, 0xC0 + lsls r0, 2 + ldr r1, _081443F4 @ =0x00001967 +_081443E6: + str r1, [sp] + movs r1, 0 + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + b _08144446 + .align 2, 0 +_081443F4: .4byte 0x00001967 +_081443F8: + ldr r0, _08144420 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _08144446 + movs r0, 0 + movs r1, 0x9 + movs r2, 0x1D + movs r3, 0x13 + bl MenuZeroFillWindowRect + ldr r0, _08144424 @ =gTasks + lsls r1, r5, 2 + adds r1, r5 + lsls r1, 3 + adds r1, r0 + movs r0, 0x2 + strh r0, [r1, 0x8] + b _08144446 + .align 2, 0 +_08144420: .4byte gPaletteFade +_08144424: .4byte gTasks +_08144428: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r6 + movs r2, 0xA + ldrsh r1, [r0, r2] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + movs r1, 0x1 + strh r1, [r0, 0x10] + adds r0, r5, 0 + bl DestroyTask +_08144446: + add sp, 0x4 + pop {r3} + mov r8, r3 + pop {r4-r7} + pop {r0} + bx r0 + thumb_func_end sub_81441B8 + + thumb_func_start sub_8144454 +sub_8144454: @ 8144454 + push {r4-r6,lr} + lsls r0, 24 + lsrs r3, r0, 24 + adds r6, r3, 0 + lsls r1, 24 + lsrs r2, r1, 24 + adds r5, r2, 0 + ldr r4, _08144508 @ =gTasks + cmp r3, 0x6 + bne _08144474 + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r4 + movs r1, 0x2 + strh r1, [r0, 0x1E] +_08144474: + cmp r3, 0xC + bne _08144486 + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r4 + movs r1, 0x1 + strh r1, [r0, 0x16] + strh r1, [r0, 0x1E] +_08144486: + cmp r3, 0x12 + bne _08144496 + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r4 + movs r1, 0x2 + strh r1, [r0, 0x1E] +_08144496: + cmp r3, 0x18 + bne _081444AA + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r4 + movs r1, 0x2 + strh r1, [r0, 0x16] + movs r1, 0x1 + strh r1, [r0, 0x1E] +_081444AA: + cmp r3, 0x1E + bne _081444BA + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r4 + movs r1, 0x2 + strh r1, [r0, 0x1E] +_081444BA: + cmp r3, 0x23 + bne _081444CE + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r4 + movs r1, 0x3 + strh r1, [r0, 0x16] + movs r1, 0x1 + strh r1, [r0, 0x1E] +_081444CE: + cmp r3, 0x28 + bne _081444DE + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r4 + movs r1, 0x2 + strh r1, [r0, 0x1E] +_081444DE: + cmp r6, 0x2E + bne _081444F2 + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r4 + movs r1, 0x4 + strh r1, [r0, 0x16] + movs r1, 0x1 + strh r1, [r0, 0x1E] +_081444F2: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r4 + movs r1, 0x1E + ldrsh r0, [r0, r1] + cmp r0, 0 + bne _0814450C + movs r0, 0 + b _0814450E + .align 2, 0 +_08144508: .4byte gTasks +_0814450C: + movs r0, 0x1 +_0814450E: + pop {r4-r6} + pop {r1} + bx r1 + thumb_func_end sub_8144454 + + thumb_func_start sub_8144514 +sub_8144514: @ 8144514 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + lsls r0, 24 + lsrs r0, 24 + mov r8, r0 + ldr r6, _08144548 @ =0x0201c000 + ldr r3, _0814454C @ =gTasks + lsls r0, 2 + add r0, r8 + lsls r0, 3 + adds r2, r0, r3 + movs r1, 0x8 + ldrsh r0, [r2, r1] + cmp r0, 0x1 + beq _08144550 + cmp r0, 0x1 + bgt _0814453C + b _08144658 +_0814453C: + cmp r0, 0x2 + beq _08144584 + cmp r0, 0x3 + bne _08144546 + b _08144644 +_08144546: + b _08144658 + .align 2, 0 +_08144548: .4byte 0x0201c000 +_0814454C: .4byte gTasks +_08144550: + adds r0, r6, 0 + adds r0, 0x8A + ldrh r0, [r0] + cmp r0, 0 + bne _0814456E + movs r4, 0xA + ldrsh r0, [r2, r4] + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r1, r3 + movs r4, 0x24 + ldrsh r0, [r1, r4] + cmp r0, 0 + beq _08144658 +_0814456E: + movs r0, 0xA + ldrsh r1, [r2, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r3 + movs r1, 0 + strh r1, [r0, 0x24] + ldrh r0, [r2, 0x8] + adds r0, 0x1 + b _08144656 +_08144584: + adds r0, r6, 0 + adds r0, 0x88 + ldrh r1, [r0] + mov r9, r0 + cmp r1, 0x44 + beq _08144658 + movs r4, 0xA + ldrsh r1, [r2, r4] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r3 + ldr r1, [r0] + ldr r0, _081445EC @ =sub_8143B68 + cmp r1, r0 + bne _08144658 + adds r7, r6, 0 + adds r7, 0x8C + ldrh r0, [r7] + lsls r0, 1 + adds r0, r6 + ldrh r0, [r0] + ldr r4, _081445F0 @ =gUnknown_0840CA00 + adds r5, r6, 0 + adds r5, 0x8A + ldrh r3, [r5] + lsls r2, r3, 1 + adds r1, r2, r4 + ldrb r1, [r1] + adds r4, 0x1 + adds r2, r4 + ldrb r2, [r2] + bl sub_81456B4 + lsls r0, 24 + lsrs r2, r0, 24 + ldrh r1, [r7] + adds r0, r6, 0 + adds r0, 0x8E + ldrh r0, [r0] + subs r0, 0x1 + cmp r1, r0 + bge _081445F8 + adds r0, r1, 0x1 + strh r0, [r7] + ldr r1, _081445F4 @ =gSprites + lsls r0, r2, 4 + adds r0, r2 + lsls r0, 2 + adds r0, r1 + movs r1, 0x32 + b _0814460A + .align 2, 0 +_081445EC: .4byte sub_8143B68 +_081445F0: .4byte gUnknown_0840CA00 +_081445F4: .4byte gSprites +_081445F8: + movs r0, 0 + strh r0, [r7] + ldr r1, _08144620 @ =gSprites + lsls r0, r2, 4 + adds r0, r2 + lsls r0, 2 + adds r0, r1 + movs r1, 0x80 + lsls r1, 2 +_0814460A: + strh r1, [r0, 0x34] + mov r1, r9 + ldrh r0, [r1] + adds r0, 0x1 + strh r0, [r1] + ldrh r0, [r5] + cmp r0, 0x2 + bne _08144624 + movs r0, 0 + b _08144626 + .align 2, 0 +_08144620: .4byte gSprites +_08144624: + adds r0, 0x1 +_08144626: + strh r0, [r5] + ldr r0, _08144640 @ =gTasks + mov r2, r8 + lsls r1, r2, 2 + add r1, r8 + lsls r1, 3 + adds r1, r0 + movs r0, 0x32 + strh r0, [r1, 0xE] + ldrh r0, [r1, 0x8] + adds r0, 0x1 + strh r0, [r1, 0x8] + b _08144658 + .align 2, 0 +_08144640: .4byte gTasks +_08144644: + ldrh r1, [r2, 0xE] + movs r3, 0xE + ldrsh r0, [r2, r3] + cmp r0, 0 + beq _08144654 + subs r0, r1, 0x1 + strh r0, [r2, 0xE] + b _08144658 +_08144654: + movs r0, 0x1 +_08144656: + strh r0, [r2, 0x8] +_08144658: + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + thumb_func_end sub_8144514 + + thumb_func_start sub_8144664 +sub_8144664: @ 8144664 + push {r4-r7,lr} + lsls r0, 24 + lsrs r5, r0, 24 + ldr r1, _0814468C @ =gTasks + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r1 + movs r2, 0x8 + ldrsh r0, [r0, r2] + adds r6, r1, 0 + cmp r0, 0x32 + bls _08144680 + b _0814492C +_08144680: + lsls r0, 2 + ldr r1, _08144690 @ =_08144694 + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_0814468C: .4byte gTasks +_08144690: .4byte _08144694 + .align 2, 0 +_08144694: + .4byte _08144760 + .4byte _08144784 + .4byte _081447D8 + .4byte _081447F0 + .4byte _0814482C + .4byte _08144850 + .4byte _0814489C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _081448A8 + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _081448C8 + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _081448EC + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _0814492C + .4byte _08144920 +_08144760: + lsls r4, r5, 2 + adds r4, r5 + lsls r4, 3 + adds r4, r6 + ldrh r0, [r4, 0x12] + lsls r0, 16 + asrs r0, 17 + movs r1, 0x7F + ands r0, r1 + movs r1, 0xC + bl Sin + ldr r1, _08144780 @ =gUnknown_0203935A + strh r0, [r1] + b _081447A8 + .align 2, 0 +_08144780: .4byte gUnknown_0203935A +_08144784: + ldr r7, _081447B0 @ =gUnknown_0203935A + movs r3, 0 + ldrsh r4, [r7, r3] + cmp r4, 0 + beq _081447B4 + lsls r4, r5, 2 + adds r4, r5 + lsls r4, 3 + adds r4, r6 + ldrh r0, [r4, 0x12] + lsls r0, 16 + asrs r0, 17 + movs r1, 0x7F + ands r0, r1 + movs r1, 0xC + bl Sin + strh r0, [r7] +_081447A8: + ldrh r0, [r4, 0x12] + adds r0, 0x1 + strh r0, [r4, 0x12] + b _0814492C + .align 2, 0 +_081447B0: .4byte gUnknown_0203935A +_081447B4: + ldr r3, _081447D4 @ =gSprites + lsls r1, r5, 2 + adds r1, r5 + lsls r1, 3 + adds r1, r6 + movs r0, 0xC + ldrsh r2, [r1, r0] + lsls r0, r2, 4 + adds r0, r2 + lsls r0, 2 + adds r0, r3 + movs r2, 0x2 + strh r2, [r0, 0x2E] + strh r4, [r1, 0x12] + b _08144848 + .align 2, 0 +_081447D4: .4byte gSprites +_081447D8: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r1, r0, r6 + ldrh r2, [r1, 0x12] + movs r3, 0x12 + ldrsh r0, [r1, r3] + cmp r0, 0x3F + bgt _08144848 + adds r0, r2, 0x1 + strh r0, [r1, 0x12] + b _08144866 +_081447F0: + ldr r3, _08144828 @ =gSprites + lsls r2, r5, 2 + adds r2, r5 + lsls r2, 3 + adds r2, r6 + movs r0, 0xC + ldrsh r1, [r2, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r3 + movs r1, 0x3 + strh r1, [r0, 0x2E] + movs r0, 0xE + ldrsh r1, [r2, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r3 + movs r1, 0x1 + strh r1, [r0, 0x2E] + movs r0, 0x78 + strh r0, [r2, 0x10] + ldrh r0, [r2, 0x8] + adds r0, 0x1 + strh r0, [r2, 0x8] + b _0814492C + .align 2, 0 +_08144828: .4byte gSprites +_0814482C: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r1, r0, r6 + ldrh r2, [r1, 0x10] + movs r3, 0x10 + ldrsh r0, [r1, r3] + cmp r0, 0 + beq _08144844 + subs r0, r2, 0x1 + strh r0, [r1, 0x10] + b _0814492C +_08144844: + movs r0, 0x40 + strh r0, [r1, 0x12] +_08144848: + ldrh r0, [r1, 0x8] + adds r0, 0x1 + strh r0, [r1, 0x8] + b _0814492C +_08144850: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r4, r0, r6 + ldrh r1, [r4, 0x12] + movs r2, 0x12 + ldrsh r0, [r4, r2] + cmp r0, 0 + ble _0814487C + subs r0, r1, 0x1 + strh r0, [r4, 0x12] +_08144866: + movs r1, 0x7F + ands r0, r1 + movs r1, 0x14 + bl Sin + ldr r1, _08144878 @ =gUnknown_0203935A + strh r0, [r1] + b _0814492C + .align 2, 0 +_08144878: .4byte gUnknown_0203935A +_0814487C: + ldr r2, _08144898 @ =gSprites + movs r3, 0xC + ldrsh r1, [r4, r3] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r2 + movs r1, 0x1 + strh r1, [r0, 0x2E] + ldrh r0, [r4, 0x8] + adds r0, 0x1 + strh r0, [r4, 0x8] + b _0814492C + .align 2, 0 +_08144898: .4byte gSprites +_0814489C: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r6 + movs r1, 0x32 + b _0814492A +_081448A8: + ldr r3, _081448C4 @ =gSprites + lsls r1, r5, 2 + adds r1, r5 + lsls r1, 3 + adds r1, r6 + movs r0, 0xE + ldrsh r2, [r1, r0] + lsls r0, r2, 4 + adds r0, r2 + lsls r0, 2 + adds r0, r3 + movs r2, 0x2 + b _081448E0 + .align 2, 0 +_081448C4: .4byte gSprites +_081448C8: + ldr r3, _081448E8 @ =gSprites + lsls r1, r5, 2 + adds r1, r5 + lsls r1, 3 + adds r1, r6 + movs r0, 0xC + ldrsh r2, [r1, r0] + lsls r0, r2, 4 + adds r0, r2 + lsls r0, 2 + adds r0, r3 + movs r2, 0x4 +_081448E0: + strh r2, [r0, 0x2E] + movs r0, 0x32 + strh r0, [r1, 0x8] + b _0814492C + .align 2, 0 +_081448E8: .4byte gSprites +_081448EC: + ldr r3, _0814491C @ =gSprites + lsls r2, r5, 2 + adds r2, r5 + lsls r2, 3 + adds r2, r6 + movs r0, 0xC + ldrsh r1, [r2, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r3 + movs r1, 0x5 + strh r1, [r0, 0x2E] + movs r0, 0xE + ldrsh r1, [r2, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r3 + movs r1, 0x3 + strh r1, [r0, 0x2E] + movs r0, 0x32 + strh r0, [r2, 0x8] + b _0814492C + .align 2, 0 +_0814491C: .4byte gSprites +_08144920: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r0, r6 + movs r1, 0 +_0814492A: + strh r1, [r0, 0x8] +_0814492C: + pop {r4-r7} + pop {r0} + bx r0 + thumb_func_end sub_8144664 + + thumb_func_start sub_8144934 +sub_8144934: @ 8144934 + push {r4,r5,lr} + lsls r0, 24 + lsrs r2, r0, 24 + ldr r1, _08144958 @ =gTasks + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r0, r1 + movs r3, 0x8 + ldrsh r0, [r0, r3] + adds r4, r1, 0 + cmp r0, 0x4 + bhi _08144974 + lsls r0, 2 + ldr r1, _0814495C @ =_08144960 + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_08144958: .4byte gTasks +_0814495C: .4byte _08144960 + .align 2, 0 +_08144960: + .4byte _08144974 + .4byte _081449B8 + .4byte _081449C4 + .4byte _08144A0C + .4byte _08144A5C +_08144974: + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r2, r0, r4 + movs r1, 0xA + ldrsh r0, [r2, r1] + ldr r5, _081449C0 @ =0x00007fff + cmp r0, r5 + beq _081449B8 + movs r3, 0xC + ldrsh r1, [r2, r3] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r3, r0, r4 + movs r0, 0x26 + ldrsh r1, [r3, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r4 + movs r1, 0xC + ldrsh r0, [r0, r1] + cmp r0, 0x2 + bne _081449B8 + movs r1, 0xA + ldrsh r0, [r3, r1] + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r1, r4 + movs r0, 0x14 + strh r0, [r1, 0x8] + strh r5, [r2, 0xA] +_081449B8: + movs r0, 0 + bl sub_8149020 + b _08144A62 + .align 2, 0 +_081449C0: .4byte 0x00007fff +_081449C4: + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r2, r0, r4 + movs r3, 0xA + ldrsh r0, [r2, r3] + ldr r5, _08144A08 @ =0x00007fff + cmp r0, r5 + beq _08144A54 + movs r0, 0xC + ldrsh r1, [r2, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r4 + movs r3, 0xA + ldrsh r1, [r0, r3] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r3, r0, r4 + ldrh r1, [r3, 0x12] + movs r0, 0x80 + negs r0, r0 + ands r0, r1 + movs r1, 0xA0 + lsls r1, 2 + cmp r0, r1 + bne _08144A54 + movs r0, 0x1 + strh r0, [r3, 0x8] + strh r5, [r2, 0xA] + b _08144A54 + .align 2, 0 +_08144A08: .4byte 0x00007fff +_08144A0C: + lsls r0, r2, 2 + adds r0, r2 + lsls r0, 3 + adds r2, r0, r4 + ldrh r3, [r2, 0xA] + movs r0, 0xA + ldrsh r1, [r2, r0] + ldr r5, _08144A48 @ =0x00007fff + cmp r1, r5 + beq _08144A54 + ldr r0, _08144A4C @ =0x000001f3 + cmp r1, r0 + bne _08144A50 + movs r3, 0xC + ldrsh r1, [r2, r3] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r4 + movs r3, 0xA + ldrsh r1, [r0, r3] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r4 + movs r1, 0xA + strh r1, [r0, 0x8] + strh r5, [r2, 0xA] + b _08144A54 + .align 2, 0 +_08144A48: .4byte 0x00007fff +_08144A4C: .4byte 0x000001f3 +_08144A50: + adds r0, r3, 0x1 + strh r0, [r2, 0xA] +_08144A54: + movs r0, 0x1 + bl sub_8149020 + b _08144A62 +_08144A5C: + movs r0, 0x2 + bl sub_8149020 +_08144A62: + pop {r4,r5} + pop {r0} + bx r0 + thumb_func_end sub_8144934 + + thumb_func_start sub_8144A68 +sub_8144A68: @ 8144A68 + push {r4-r7,lr} + mov r7, r8 + push {r7} + lsls r0, 24 + lsrs r0, 24 + mov r8, r0 + lsls r1, 24 + lsrs r7, r1, 24 + cmp r0, 0x4 + bls _08144A7E + b _08144DFC +_08144A7E: + lsls r0, 2 + ldr r1, _08144A88 @ =_08144A8C + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_08144A88: .4byte _08144A8C + .align 2, 0 +_08144A8C: + .4byte _08144AA0 + .4byte _08144B48 + .4byte _08144BF4 + .4byte _08144CA0 + .4byte _08144D50 +_08144AA0: + ldr r5, _08144B40 @ =gSprites + ldr r0, _08144B44 @ =gTasks + lsls r4, r7, 2 + adds r4, r7 + lsls r4, 3 + adds r4, r0 + movs r1, 0x12 + ldrsh r0, [r4, r1] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r5 + adds r1, 0x3E + ldrb r3, [r1] + movs r2, 0x5 + negs r2, r2 + adds r0, r2, 0 + ands r0, r3 + strb r0, [r1] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + adds r0, 0x3E + ldrb r1, [r0] + ands r2, r1 + strb r2, [r0] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r3, 0 + movs r2, 0x88 + lsls r2, 1 + strh r2, [r0, 0x20] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r2, [r0, 0x20] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r2, 0x2E + strh r2, [r0, 0x22] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r2, [r0, 0x22] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r1, 0x80 + lsls r1, 6 + movs r0, 0 + movs r2, 0x20 + b _08144DF0 + .align 2, 0 +_08144B40: .4byte gSprites +_08144B44: .4byte gTasks +_08144B48: + ldr r5, _08144BEC @ =gSprites + ldr r0, _08144BF0 @ =gTasks + lsls r4, r7, 2 + adds r4, r7 + lsls r4, 3 + adds r4, r0 + movs r1, 0x12 + ldrsh r0, [r4, r1] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r5 + adds r1, 0x3E + ldrb r3, [r1] + movs r2, 0x5 + negs r2, r2 + adds r0, r2, 0 + ands r0, r3 + strb r0, [r1] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + adds r0, 0x3E + ldrb r1, [r0] + ands r2, r1 + strb r2, [r0] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r3, 0 + movs r1, 0x78 + strh r1, [r0, 0x20] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r1, 0x88 + lsls r1, 1 + strh r1, [r0, 0x20] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r2, 0x2E + strh r2, [r0, 0x22] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r2, [r0, 0x22] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r1, 0x80 + lsls r1, 6 + movs r0, 0 + movs r2, 0x20 + b _08144DF0 + .align 2, 0 +_08144BEC: .4byte gSprites +_08144BF0: .4byte gTasks +_08144BF4: + ldr r5, _08144C98 @ =gSprites + ldr r0, _08144C9C @ =gTasks + lsls r4, r7, 2 + adds r4, r7 + lsls r4, 3 + adds r4, r0 + movs r1, 0x12 + ldrsh r0, [r4, r1] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r5 + adds r1, 0x3E + ldrb r3, [r1] + movs r2, 0x5 + negs r2, r2 + adds r0, r2, 0 + ands r0, r3 + strb r0, [r1] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + adds r0, 0x3E + ldrb r1, [r0] + ands r2, r1 + strb r2, [r0] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r3, 0 + movs r1, 0x78 + strh r1, [r0, 0x20] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r1, 0x88 + lsls r1, 1 + strh r1, [r0, 0x20] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r2, 0x2E + strh r2, [r0, 0x22] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r2, [r0, 0x22] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r1, 0x80 + lsls r1, 6 + movs r2, 0x80 + lsls r2, 2 + movs r0, 0x1 + b _08144DF0 + .align 2, 0 +_08144C98: .4byte gSprites +_08144C9C: .4byte gTasks +_08144CA0: + ldr r5, _08144D44 @ =gSprites + ldr r0, _08144D48 @ =gTasks + lsls r4, r7, 2 + adds r4, r7 + lsls r4, 3 + adds r4, r0 + movs r1, 0x12 + ldrsh r0, [r4, r1] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r5 + adds r1, 0x3E + ldrb r3, [r1] + movs r2, 0x5 + negs r2, r2 + adds r0, r2, 0 + ands r0, r3 + strb r0, [r1] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + adds r0, 0x3E + ldrb r1, [r0] + ands r2, r1 + strb r2, [r0] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r3, 0 + movs r1, 0x78 + strh r1, [r0, 0x20] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + ldr r1, _08144D4C @ =0x0000ffe0 + strh r1, [r0, 0x20] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r2, 0x2E + strh r2, [r0, 0x22] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r2, [r0, 0x22] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r1, 0x80 + lsls r1, 6 + movs r2, 0x80 + lsls r2, 2 + movs r0, 0x1 + b _08144DF0 + .align 2, 0 +_08144D44: .4byte gSprites +_08144D48: .4byte gTasks +_08144D4C: .4byte 0x0000ffe0 +_08144D50: + ldr r5, _08144EBC @ =gSprites + ldr r0, _08144EC0 @ =gTasks + lsls r4, r7, 2 + adds r4, r7 + lsls r4, 3 + adds r4, r0 + movs r1, 0x12 + ldrsh r0, [r4, r1] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r5 + adds r1, 0x3E + ldrb r3, [r1] + movs r2, 0x5 + negs r2, r2 + adds r0, r2, 0 + ands r0, r3 + strb r0, [r1] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + adds r0, 0x3E + ldrb r1, [r0] + ands r2, r1 + strb r2, [r0] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r3, 0 + movs r1, 0x58 + strh r1, [r0, 0x20] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r1, 0x98 + strh r1, [r0, 0x20] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r2, 0x2E + strh r2, [r0, 0x22] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r2, [r0, 0x22] + movs r0, 0x12 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r0, 0x14 + ldrsh r1, [r4, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r3, [r0, 0x2E] + movs r1, 0x80 + lsls r1, 6 + movs r2, 0x80 + lsls r2, 2 + movs r0, 0x2 +_08144DF0: + movs r3, 0x8 + bl sub_8148EC0 + lsls r0, 24 + lsrs r0, 24 + strh r0, [r4, 0x8] +_08144DFC: + ldr r0, _08144EC4 @ =sub_8144934 + movs r1, 0 + bl CreateTask + ldr r6, _08144EC0 @ =gTasks + lsls r1, r7, 2 + adds r1, r7 + lsls r1, 3 + adds r5, r1, r6 + lsls r0, 24 + lsrs r0, 24 + movs r4, 0 + strh r0, [r5, 0xC] + movs r0, 0xC + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + mov r1, r8 + strh r1, [r0, 0x8] + movs r0, 0xC + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + strh r4, [r0, 0xA] + movs r0, 0xC + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + strh r7, [r0, 0xC] + ldr r0, _08144EC8 @ =sub_8144664 + movs r1, 0 + bl CreateTask + lsls r0, 24 + lsrs r0, 24 + strh r0, [r5, 0xA] + movs r0, 0xA + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + strh r4, [r0, 0x8] + movs r0, 0xA + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + strh r7, [r0, 0xA] + movs r0, 0xA + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + ldrh r1, [r5, 0x12] + strh r1, [r0, 0xC] + movs r0, 0xA + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + ldrh r1, [r5, 0x14] + strh r1, [r0, 0xE] + movs r0, 0xA + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 3 + adds r0, r6 + strh r4, [r0, 0x10] + mov r1, r8 + cmp r1, 0x2 + bne _08144EB0 + movs r1, 0xA + ldrsh r0, [r5, r1] + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r1, r6 + movs r0, 0x45 + strh r0, [r1, 0x12] +_08144EB0: + pop {r3} + mov r8, r3 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08144EBC: .4byte gSprites +_08144EC0: .4byte gTasks +_08144EC4: .4byte sub_8144934 +_08144EC8: .4byte sub_8144664 + thumb_func_end sub_8144A68 + + thumb_func_start sub_8144ECC +sub_8144ECC: @ 8144ECC + push {r4-r6,lr} + lsls r0, 24 + lsrs r4, r0, 24 + lsls r1, 24 + lsrs r5, r1, 24 + ldr r0, _08144F28 @ =gMain + ldr r1, _08144F2C @ =0x0000043c + adds r6, r0, r1 + ldrb r0, [r6] + cmp r0, 0x1 + beq _08144F38 + cmp r0, 0x1 + ble _08144EF0 + cmp r0, 0x2 + beq _08144F5C + cmp r0, 0x3 + bne _08144EF0 + b _0814508C +_08144EF0: + movs r0, 0x80 + lsls r0, 19 + movs r1, 0 + strh r1, [r0] + ldr r2, _08144F30 @ =REG_BG3HOFS + movs r0, 0x8 + strh r0, [r2] + ldr r0, _08144F34 @ =REG_BG3VOFS + strh r1, [r0] + subs r0, 0x6 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + subs r0, 0x6 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + adds r0, 0x3A + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + bl ResetSpriteData + bl FreeAllSpritePalettes + movs r0, 0x1 + strb r0, [r6] + b _081450A2 + .align 2, 0 +_08144F28: .4byte gMain +_08144F2C: .4byte 0x0000043c +_08144F30: .4byte REG_BG3HOFS +_08144F34: .4byte REG_BG3VOFS +_08144F38: + ldr r1, _08144F54 @ =gUnknown_02039358 + movs r0, 0x22 + strh r0, [r1] + ldr r1, _08144F58 @ =gUnknown_0203935A + movs r0, 0 + strh r0, [r1] + adds r0, r4, 0 + bl sub_8148CB0 + ldrb r0, [r6] + adds r0, 0x1 + strb r0, [r6] + b _081450A2 + .align 2, 0 +_08144F54: .4byte gUnknown_02039358 +_08144F58: .4byte gUnknown_0203935A +_08144F5C: + ldr r0, _08144FBC @ =gSaveBlock2 + ldrb r0, [r0, 0x8] + cmp r0, 0 + bne _08144FE0 + ldr r0, _08144FC0 @ =gIntro2BrendanSpriteSheet + bl LoadCompressedObjectPic + ldr r0, _08144FC4 @ =gUnknown_08416E34 + bl LoadCompressedObjectPic + ldr r0, _08144FC8 @ =gIntro2BicycleSpriteSheet + bl LoadCompressedObjectPic + ldr r0, _08144FCC @ =gIntro2SpritePalettes + bl LoadSpritePalettes + movs r0, 0x78 + movs r1, 0x2E + bl intro_create_brendan_sprite + lsls r0, 24 + lsrs r2, r0, 24 + ldr r0, _08144FD0 @ =gTasks + lsls r4, r5, 2 + adds r4, r5 + lsls r4, 3 + adds r4, r0 + strh r2, [r4, 0x12] + ldr r6, _08144FD4 @ =gSprites + lsls r0, r2, 4 + adds r0, r2 + lsls r0, 2 + adds r5, r6, 0 + adds r5, 0x1C + adds r2, r0, r5 + ldr r1, _08144FD8 @ =sub_8145378 + str r1, [r2] + adds r6, 0x8 + adds r0, r6 + ldr r1, _08144FDC @ =gUnknown_0840CA54 + str r1, [r0] + movs r0, 0x88 + lsls r0, 1 + movs r1, 0x2E + bl intro_create_may_sprite + b _08145034 + .align 2, 0 +_08144FBC: .4byte gSaveBlock2 +_08144FC0: .4byte gIntro2BrendanSpriteSheet +_08144FC4: .4byte gUnknown_08416E34 +_08144FC8: .4byte gIntro2BicycleSpriteSheet +_08144FCC: .4byte gIntro2SpritePalettes +_08144FD0: .4byte gTasks +_08144FD4: .4byte gSprites +_08144FD8: .4byte sub_8145378 +_08144FDC: .4byte gUnknown_0840CA54 +_08144FE0: + ldr r0, _0814505C @ =gIntro2MaySpriteSheet + bl LoadCompressedObjectPic + ldr r0, _08145060 @ =gUnknown_08416E24 + bl LoadCompressedObjectPic + ldr r0, _08145064 @ =gIntro2BicycleSpriteSheet + bl LoadCompressedObjectPic + ldr r0, _08145068 @ =gIntro2SpritePalettes + bl LoadSpritePalettes + movs r0, 0x78 + movs r1, 0x2E + bl intro_create_may_sprite + lsls r0, 24 + lsrs r2, r0, 24 + ldr r0, _0814506C @ =gTasks + lsls r4, r5, 2 + adds r4, r5 + lsls r4, 3 + adds r4, r0 + strh r2, [r4, 0x12] + ldr r6, _08145070 @ =gSprites + lsls r0, r2, 4 + adds r0, r2 + lsls r0, 2 + adds r5, r6, 0 + adds r5, 0x1C + adds r2, r0, r5 + ldr r1, _08145074 @ =sub_8145378 + str r1, [r2] + adds r6, 0x8 + adds r0, r6 + ldr r1, _08145078 @ =gUnknown_0840CA54 + str r1, [r0] + movs r0, 0x88 + lsls r0, 1 + movs r1, 0x2E + bl intro_create_brendan_sprite +_08145034: + lsls r0, 24 + lsrs r2, r0, 24 + strh r2, [r4, 0x14] + lsls r0, r2, 4 + adds r0, r2 + lsls r0, 2 + adds r5, r0, r5 + ldr r1, _0814507C @ =sub_8145420 + str r1, [r5] + adds r0, r6 + ldr r1, _08145080 @ =gUnknown_0840CA94 + str r1, [r0] + ldr r1, _08145084 @ =gMain + ldr r0, _08145088 @ =0x0000043c + adds r1, r0 + ldrb r0, [r1] + adds r0, 0x1 + strb r0, [r1] + b _081450A2 + .align 2, 0 +_0814505C: .4byte gIntro2MaySpriteSheet +_08145060: .4byte gUnknown_08416E24 +_08145064: .4byte gIntro2BicycleSpriteSheet +_08145068: .4byte gIntro2SpritePalettes +_0814506C: .4byte gTasks +_08145070: .4byte gSprites +_08145074: .4byte sub_8145378 +_08145078: .4byte gUnknown_0840CA54 +_0814507C: .4byte sub_8145420 +_08145080: .4byte gUnknown_0840CA94 +_08145084: .4byte gMain +_08145088: .4byte 0x0000043c +_0814508C: + adds r0, r4, 0 + adds r1, r5, 0 + bl sub_8144A68 + adds r0, r4, 0 + bl sub_8148E90 + movs r0, 0 + strb r0, [r6] + movs r0, 0x1 + b _081450A4 +_081450A2: + movs r0, 0 +_081450A4: + pop {r4-r6} + pop {r1} + bx r1 + thumb_func_end sub_8144ECC + + thumb_func_start sub_81450AC +sub_81450AC: @ 81450AC + push {r4,lr} + lsls r0, 24 + lsrs r0, 24 + ldr r2, _08145120 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r4, r1, r2 + ldrh r1, [r4, 0x8] + movs r2, 0x8 + ldrsh r0, [r4, r2] + cmp r0, 0 + beq _081450D2 + lsls r0, r1, 24 + lsrs r0, 24 + bl DestroyTask + movs r0, 0 + strh r0, [r4, 0x8] +_081450D2: + ldrh r1, [r4, 0xA] + movs r2, 0xA + ldrsh r0, [r4, r2] + cmp r0, 0 + beq _081450E8 + lsls r0, r1, 24 + lsrs r0, 24 + bl DestroyTask + movs r0, 0 + strh r0, [r4, 0xA] +_081450E8: + ldrh r1, [r4, 0xC] + movs r2, 0xC + ldrsh r0, [r4, r2] + cmp r0, 0 + beq _081450FE + lsls r0, r1, 24 + lsrs r0, 24 + bl DestroyTask + movs r0, 0 + strh r0, [r4, 0xC] +_081450FE: + ldrh r1, [r4, 0xE] + movs r2, 0xE + ldrsh r0, [r4, r2] + cmp r0, 0 + beq _08145114 + lsls r0, r1, 24 + lsrs r0, 24 + bl DestroyTask + movs r0, 0 + strh r0, [r4, 0xE] +_08145114: + ldr r1, _08145124 @ =gUnknown_0203935C + movs r0, 0x1 + strh r0, [r1] + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08145120: .4byte gTasks +_08145124: .4byte gUnknown_0203935C + thumb_func_end sub_81450AC + + thumb_func_start sub_8145128 +sub_8145128: @ 8145128 + push {r4-r7,lr} + adds r3, r0, 0 + adds r4, r2, 0 + lsls r3, 16 + lsrs r3, 16 + lsls r1, 16 + lsrs r7, r1, 16 + lsls r4, 16 + lsrs r5, r4, 16 + ldr r0, _081451EC @ =gCreditsCopyrightEnd_Gfx + movs r6, 0xC0 + lsls r6, 19 + adds r3, r6 + adds r1, r3, 0 + bl LZ77UnCompVram + ldr r0, _081451F0 @ =gIntroCopyright_Pal + adds r1, r5, 0 + movs r2, 0x20 + bl LoadPalette + lsrs r4, 20 + lsls r4, 28 + lsrs r4, 16 + movs r2, 0 + adds r1, r4, 0x1 + ldr r3, _081451F4 @ =0x000003ff +_0814515E: + lsls r0, r2, 1 + adds r0, r7 + adds r0, r6 + strh r1, [r0] + adds r0, r2, 0x1 + lsls r0, 16 + lsrs r2, r0, 16 + cmp r2, r3 + bls _0814515E + movs r2, 0 + adds r0, r4, 0x2 + adds r6, r4, 0 + adds r6, 0x17 + movs r1, 0x2B + adds r1, r4 + mov r12, r1 + adds r4, 0x42 + ldr r5, _081451F8 @ =0x060001c8 + adds r3, r0, 0 +_08145184: + lsls r0, r2, 1 + adds r0, r7 + adds r0, r5 + adds r1, r2, r3 + strh r1, [r0] + adds r0, r2, 0x1 + lsls r0, 16 + lsrs r2, r0, 16 + cmp r2, 0x14 + bls _08145184 + movs r2, 0 + ldr r5, _081451FC @ =0x06000248 + adds r3, r6, 0 +_0814519E: + lsls r0, r2, 1 + adds r0, r7 + adds r0, r5 + adds r1, r2, r3 + strh r1, [r0] + adds r0, r2, 0x1 + lsls r0, 16 + lsrs r2, r0, 16 + cmp r2, 0x13 + bls _0814519E + movs r2, 0 + ldr r5, _08145200 @ =0x060002c8 + mov r3, r12 +_081451B8: + lsls r0, r2, 1 + adds r0, r7 + adds r0, r5 + adds r1, r2, r3 + strh r1, [r0] + adds r0, r2, 0x1 + lsls r0, 16 + lsrs r2, r0, 16 + cmp r2, 0x16 + bls _081451B8 + movs r2, 0 + ldr r3, _08145204 @ =0x06000348 +_081451D0: + lsls r0, r2, 1 + adds r0, r7 + adds r0, r3 + adds r1, r2, r4 + strh r1, [r0] + adds r0, r2, 0x1 + lsls r0, 16 + lsrs r2, r0, 16 + cmp r2, 0xB + bls _081451D0 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_081451EC: .4byte gCreditsCopyrightEnd_Gfx +_081451F0: .4byte gIntroCopyright_Pal +_081451F4: .4byte 0x000003ff +_081451F8: .4byte 0x060001c8 +_081451FC: .4byte 0x06000248 +_08145200: .4byte 0x060002c8 +_08145204: .4byte 0x06000348 + thumb_func_end sub_8145128 + + thumb_func_start sub_8145208 +sub_8145208: @ 8145208 + push {lr} + lsls r0, 24 + lsrs r2, r0, 24 + adds r3, r2, 0 + movs r0, 0x3F + ands r0, r2 + adds r1, r0, 0 + adds r1, 0x50 + cmp r2, 0xFF + bne _08145220 + movs r0, 0x1 + b _08145246 +_08145220: + movs r0, 0x80 + ands r0, r2 + cmp r0, 0 + beq _08145230 + movs r2, 0x80 + lsls r2, 4 + adds r0, r2, 0 + orrs r1, r0 +_08145230: + movs r0, 0x40 + ands r3, r0 + cmp r3, 0 + beq _08145244 + movs r2, 0x80 + lsls r2, 3 + adds r0, r2, 0 + orrs r1, r0 + lsls r0, r1, 16 + lsrs r1, r0, 16 +_08145244: + adds r0, r1, 0 +_08145246: + pop {r1} + bx r1 + thumb_func_end sub_8145208 + + thumb_func_start sub_814524C +sub_814524C: @ 814524C + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0xC + str r0, [sp] + ldr r0, [sp, 0x2C] + lsls r1, 24 + lsrs r1, 24 + mov r10, r1 + lsls r2, 24 + lsrs r2, 24 + str r2, [sp, 0x4] + lsls r3, 16 + lsrs r3, 16 + str r3, [sp, 0x8] + lsls r0, 16 + lsrs r0, 20 + lsls r0, 28 + lsrs r0, 16 + mov r9, r0 + movs r5, 0 +_0814527A: + movs r4, 0 + lsls r7, r5, 1 + ldr r1, [sp, 0x4] + adds r0, r1, r5 + adds r2, r5, 0x1 + mov r8, r2 + lsls r0, 6 + ldr r1, [sp, 0x8] + adds r6, r0, r1 +_0814528C: + adds r0, r7, r5 + adds r0, r4 + ldr r2, [sp] + adds r0, r2, r0 + ldrb r0, [r0] + bl sub_8145208 + mov r2, r10 + adds r1, r2, r4 + lsls r1, 1 + adds r1, r6 + movs r2, 0xC0 + lsls r2, 19 + adds r1, r2 + add r0, r9 + strh r0, [r1] + adds r0, r4, 0x1 + lsls r0, 24 + lsrs r4, r0, 24 + cmp r4, 0x2 + bls _0814528C + mov r1, r8 + lsls r0, r1, 24 + lsrs r5, r0, 24 + cmp r5, 0x4 + bls _0814527A + add sp, 0xC + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + thumb_func_end sub_814524C + + thumb_func_start sub_81452D0 +sub_81452D0: @ 81452D0 + push {r4-r7,lr} + sub sp, 0x4 + lsls r0, 16 + lsrs r5, r0, 16 + lsls r1, 16 + lsrs r6, r1, 16 + lsrs r1, 20 + lsls r1, 28 + lsrs r1, 16 + movs r2, 0 + ldr r7, _08145360 @ =gUnknown_0840B83C + movs r4, 0xC0 + lsls r4, 19 + adds r1, 0x1 + ldr r3, _08145364 @ =0x000003ff +_081452EE: + lsls r0, r2, 1 + adds r0, r5 + adds r0, r4 + strh r1, [r0] + adds r0, r2, 0x1 + lsls r0, 16 + lsrs r2, r0, 16 + cmp r2, r3 + bls _081452EE + str r6, [sp] + adds r0, r7, 0 + movs r1, 0x3 + movs r2, 0x7 + adds r3, r5, 0 + bl sub_814524C + ldr r0, _08145368 @ =gUnknown_0840B84B + str r6, [sp] + movs r1, 0x7 + movs r2, 0x7 + adds r3, r5, 0 + bl sub_814524C + ldr r4, _0814536C @ =gUnknown_0840B85A + str r6, [sp] + adds r0, r4, 0 + movs r1, 0xB + movs r2, 0x7 + adds r3, r5, 0 + bl sub_814524C + str r6, [sp] + adds r0, r4, 0 + movs r1, 0x10 + movs r2, 0x7 + adds r3, r5, 0 + bl sub_814524C + ldr r0, _08145370 @ =gUnknown_0840B869 + str r6, [sp] + movs r1, 0x14 + movs r2, 0x7 + adds r3, r5, 0 + bl sub_814524C + ldr r0, _08145374 @ =gUnknown_0840B878 + str r6, [sp] + movs r1, 0x18 + movs r2, 0x7 + adds r3, r5, 0 + bl sub_814524C + add sp, 0x4 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08145360: .4byte gUnknown_0840B83C +_08145364: .4byte 0x000003ff +_08145368: .4byte gUnknown_0840B84B +_0814536C: .4byte gUnknown_0840B85A +_08145370: .4byte gUnknown_0840B869 +_08145374: .4byte gUnknown_0840B878 + thumb_func_end sub_81452D0 + + thumb_func_start sub_8145378 +sub_8145378: @ 8145378 + push {r4,lr} + adds r4, r0, 0 + ldr r0, _08145390 @ =gUnknown_0203935C + movs r1, 0 + ldrsh r0, [r0, r1] + cmp r0, 0 + beq _08145394 + adds r0, r4, 0 + bl DestroySprite + b _08145418 + .align 2, 0 +_08145390: .4byte gUnknown_0203935C +_08145394: + movs r2, 0x2E + ldrsh r0, [r4, r2] + cmp r0, 0x5 + bhi _08145418 + lsls r0, 2 + ldr r1, _081453A8 @ =_081453AC + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_081453A8: .4byte _081453AC + .align 2, 0 +_081453AC: + .4byte _081453C4 + .4byte _081453CE + .4byte _081453D4 + .4byte _081453DE + .4byte _081453E8 + .4byte _081453FE +_081453C4: + adds r0, r4, 0 + movs r1, 0 + bl StartSpriteAnimIfDifferent + b _08145418 +_081453CE: + adds r0, r4, 0 + movs r1, 0x1 + b _08145402 +_081453D4: + adds r0, r4, 0 + movs r1, 0x2 + bl StartSpriteAnimIfDifferent + b _08145418 +_081453DE: + adds r0, r4, 0 + movs r1, 0x3 + bl StartSpriteAnimIfDifferent + b _08145418 +_081453E8: + adds r0, r4, 0 + movs r1, 0 + bl StartSpriteAnimIfDifferent + ldrh r1, [r4, 0x20] + movs r2, 0x20 + ldrsh r0, [r4, r2] + cmp r0, 0x78 + ble _08145418 + subs r0, r1, 0x1 + b _08145416 +_081453FE: + adds r0, r4, 0 + movs r1, 0 +_08145402: + bl StartSpriteAnimIfDifferent + ldrh r2, [r4, 0x20] + movs r0, 0x20 + ldrsh r1, [r4, r0] + movs r0, 0x20 + negs r0, r0 + cmp r1, r0 + ble _08145418 + subs r0, r2, 0x1 +_08145416: + strh r0, [r4, 0x20] +_08145418: + pop {r4} + pop {r0} + bx r0 + thumb_func_end sub_8145378 + + thumb_func_start sub_8145420 +sub_8145420: @ 8145420 + push {r4,lr} + adds r4, r0, 0 + ldr r0, _08145438 @ =gUnknown_0203935C + movs r1, 0 + ldrsh r0, [r0, r1] + cmp r0, 0 + beq _0814543C + adds r0, r4, 0 + bl DestroySprite + b _081454D8 + .align 2, 0 +_08145438: .4byte gUnknown_0203935C +_0814543C: + movs r1, 0x2E + ldrsh r0, [r4, r1] + cmp r0, 0x1 + beq _08145464 + cmp r0, 0x1 + bgt _0814544E + cmp r0, 0 + beq _08145458 + b _081454D8 +_0814544E: + cmp r0, 0x2 + beq _081454A0 + cmp r0, 0x3 + beq _081454BE + b _081454D8 +_08145458: + strh r0, [r4, 0x26] + adds r0, r4, 0 + movs r1, 0 + bl StartSpriteAnimIfDifferent + b _081454D8 +_08145464: + movs r1, 0x20 + ldrsh r0, [r4, r1] + cmp r0, 0xC8 + ble _08145476 + adds r0, r4, 0 + movs r1, 0x1 + bl StartSpriteAnimIfDifferent + b _0814547E +_08145476: + adds r0, r4, 0 + movs r1, 0x2 + bl StartSpriteAnimIfDifferent +_0814547E: + ldrh r2, [r4, 0x20] + movs r0, 0x20 + ldrsh r1, [r4, r0] + movs r0, 0x20 + negs r0, r0 + cmp r1, r0 + ble _08145490 + subs r0, r2, 0x2 + strh r0, [r4, 0x20] +_08145490: + ldr r0, _0814549C @ =gUnknown_0203935A + ldrh r0, [r0] + negs r0, r0 + strh r0, [r4, 0x26] + b _081454D8 + .align 2, 0 +_0814549C: .4byte gUnknown_0203935A +_081454A0: + ldrh r0, [r4, 0x3C] + adds r0, 0x1 + strh r0, [r4, 0x3C] + adds r0, r4, 0 + movs r1, 0 + bl StartSpriteAnimIfDifferent + ldrh r1, [r4, 0x3C] + movs r0, 0x3 + ands r0, r1 + cmp r0, 0 + bne _081454D8 + ldrh r0, [r4, 0x20] + adds r0, 0x1 + b _081454D6 +_081454BE: + adds r0, r4, 0 + movs r1, 0 + bl StartSpriteAnimIfDifferent + ldrh r2, [r4, 0x20] + movs r0, 0x20 + ldrsh r1, [r4, r0] + movs r0, 0x20 + negs r0, r0 + cmp r1, r0 + ble _081454D8 + subs r0, r2, 0x1 +_081454D6: + strh r0, [r4, 0x20] +_081454D8: + pop {r4} + pop {r0} + bx r0 + thumb_func_end sub_8145420 + + thumb_func_start sub_81454E0 +sub_81454E0: @ 81454E0 + push {r4,r5,lr} + sub sp, 0x4 + adds r5, r0, 0 + ldr r0, _081454F8 @ =gUnknown_0203935C + movs r1, 0 + ldrsh r0, [r0, r1] + cmp r0, 0 + beq _081454FC + adds r0, r5, 0 + bl DestroySprite + b _081456A6 + .align 2, 0 +_081454F8: .4byte gUnknown_0203935C +_081454FC: + ldrh r0, [r5, 0x3C] + adds r0, 0x1 + strh r0, [r5, 0x3C] + movs r2, 0x2E + ldrsh r0, [r5, r2] + cmp r0, 0xA + bhi _08145544 + lsls r0, 2 + ldr r1, _08145514 @ =_08145518 + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_08145514: .4byte _08145518 + .align 2, 0 +_08145518: + .4byte _08145544 + .4byte _0814559E + .4byte _08145620 + .4byte _08145660 + .4byte _08145544 + .4byte _08145544 + .4byte _08145544 + .4byte _08145544 + .4byte _08145544 + .4byte _08145544 + .4byte _08145696 +_08145544: + ldrb r1, [r5, 0x1] + movs r0, 0x4 + negs r0, r0 + ands r0, r1 + movs r1, 0x1 + orrs r0, r1 + strb r0, [r5, 0x1] + movs r0, 0x30 + ldrsh r1, [r5, r0] + movs r0, 0x1F + ands r1, r0 + lsls r1, 1 + ldrb r2, [r5, 0x3] + movs r0, 0x3F + negs r0, r0 + ands r0, r2 + orrs r0, r1 + strb r0, [r5, 0x3] + movs r0, 0x10 + strh r0, [r5, 0x32] + ldrh r4, [r5, 0x30] + lsls r4, 24 + lsrs r4, 24 + movs r0, 0x80 + lsls r0, 9 + movs r1, 0x10 + bl __divsi3 + adds r1, r0, 0 + str r1, [sp] + adds r0, r4, 0 + movs r2, 0 + movs r3, 0 + bl SetOamMatrix + adds r2, r5, 0 + adds r2, 0x3E + ldrb r1, [r2] + movs r0, 0x5 + negs r0, r0 + ands r0, r1 + strb r0, [r2] + movs r0, 0x1 + strh r0, [r5, 0x2E] + b _081456A6 +_0814559E: + ldrh r1, [r5, 0x32] + movs r2, 0x32 + ldrsh r0, [r5, r2] + cmp r0, 0xFF + bgt _081455D4 + adds r0, r1, 0 + adds r0, 0x8 + strh r0, [r5, 0x32] + ldrh r4, [r5, 0x30] + lsls r4, 24 + lsrs r4, 24 + movs r0, 0x32 + ldrsh r1, [r5, r0] + movs r0, 0x80 + lsls r0, 9 + bl __divsi3 + adds r1, r0, 0 + lsls r1, 16 + lsrs r1, 16 + str r1, [sp] + adds r0, r4, 0 + movs r2, 0 + movs r3, 0 + bl SetOamMatrix + b _081455DA +_081455D4: + ldrh r0, [r5, 0x2E] + adds r0, 0x1 + strh r0, [r5, 0x2E] +_081455DA: + movs r2, 0x30 + ldrsh r1, [r5, r2] + cmp r1, 0x2 + beq _081456A6 + cmp r1, 0x2 + bgt _081455EC + cmp r1, 0x1 + beq _081455F2 + b _081456A6 +_081455EC: + cmp r1, 0x3 + beq _0814560A + b _081456A6 +_081455F2: + ldrh r1, [r5, 0x3C] + movs r0, 0x3 + ands r0, r1 + cmp r0, 0 + bne _08145602 + ldrh r0, [r5, 0x22] + adds r0, 0x1 + strh r0, [r5, 0x22] +_08145602: + ldrh r0, [r5, 0x20] + subs r0, 0x2 + strh r0, [r5, 0x20] + b _081456A6 +_0814560A: + ldrh r0, [r5, 0x3C] + ands r1, r0 + cmp r1, 0 + bne _08145618 + ldrh r0, [r5, 0x22] + adds r0, 0x1 + strh r0, [r5, 0x22] +_08145618: + ldrh r0, [r5, 0x20] + adds r0, 0x2 + strh r0, [r5, 0x20] + b _081456A6 +_08145620: + ldrh r1, [r5, 0x34] + movs r2, 0x34 + ldrsh r0, [r5, r2] + cmp r0, 0 + beq _08145630 + subs r0, r1, 0x1 + strh r0, [r5, 0x34] + b _081456A6 +_08145630: + ldr r1, _0814565C @ =REG_BLDCNT + movs r2, 0xF4 + lsls r2, 4 + adds r0, r2, 0 + strh r0, [r1] + adds r1, 0x2 + movs r0, 0x10 + strh r0, [r1] + ldrb r1, [r5, 0x1] + movs r0, 0xD + negs r0, r0 + ands r0, r1 + movs r1, 0x4 + orrs r0, r1 + strb r0, [r5, 0x1] + movs r0, 0x10 + strh r0, [r5, 0x34] + ldrh r0, [r5, 0x2E] + adds r0, 0x1 + strh r0, [r5, 0x2E] + b _081456A6 + .align 2, 0 +_0814565C: .4byte REG_BLDCNT +_08145660: + ldrh r1, [r5, 0x34] + movs r2, 0x34 + ldrsh r0, [r5, r2] + cmp r0, 0 + beq _08145684 + subs r1, 0x1 + strh r1, [r5, 0x34] + ldr r3, _08145680 @ =REG_BLDALPHA + movs r0, 0x34 + ldrsh r2, [r5, r0] + movs r0, 0x10 + subs r0, r2 + lsls r0, 8 + adds r1, r0 + strh r1, [r3] + b _081456A6 + .align 2, 0 +_08145680: .4byte REG_BLDALPHA +_08145684: + adds r2, r5, 0 + adds r2, 0x3E + ldrb r0, [r2] + movs r1, 0x4 + orrs r0, r1 + strb r0, [r2] + movs r0, 0xA + strh r0, [r5, 0x2E] + b _081456A6 +_08145696: + ldr r0, _081456B0 @ =REG_BLDCNT + movs r1, 0 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + adds r0, r5, 0 + bl DestroySprite +_081456A6: + add sp, 0x4 + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_081456B0: .4byte REG_BLDCNT + thumb_func_end sub_81454E0 + + thumb_func_start sub_81456B4 +sub_81456B4: @ 81456B4 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0x14 + lsls r0, 16 + lsrs r6, r0, 16 + lsls r1, 16 + lsrs r1, 16 + mov r10, r1 + lsls r2, 16 + lsrs r2, 16 + str r2, [sp, 0x10] + lsls r3, 16 + lsrs r3, 16 + mov r9, r3 + adds r0, r6, 0 + bl NationalPokedexNumToSpecies + adds r6, r0, 0 + cmp r6, 0xC9 + beq _081456F8 + movs r0, 0x9A + lsls r0, 1 + cmp r6, r0 + beq _081456EE + movs r7, 0 + b _081456FC +_081456EE: + ldr r0, _081456F4 @ =gSaveBlock2 + ldr r7, [r0, 0x20] + b _081456FC + .align 2, 0 +_081456F4: .4byte gSaveBlock2 +_081456F8: + ldr r0, _081457E8 @ =gSaveBlock2 + ldr r7, [r0, 0x1C] +_081456FC: + lsls r0, r6, 3 + ldr r1, _081457EC @ =gMonFrontPicTable + adds r0, r1 + ldr r1, _081457F0 @ =gMonFrontPicCoords + lsls r2, r6, 2 + adds r2, r1 + ldrb r1, [r2] + ldrb r2, [r2, 0x1] + movs r3, 0x80 + lsls r3, 18 + ldr r4, _081457F4 @ =gUnknown_0840B5A0 + mov r8, r4 + mov r5, r9 + lsls r4, r5, 2 + add r4, r8 + ldr r4, [r4] + str r4, [sp] + str r6, [sp, 0x4] + str r7, [sp, 0x8] + movs r4, 0x1 + str r4, [sp, 0xC] + bl sub_800D378 + ldr r2, _081457F8 @ =0x0000ffff + adds r0, r6, 0 + movs r1, 0 + bl species_and_otid_get_pal + lsls r5, 4 + mov r8, r5 + movs r1, 0x80 + lsls r1, 1 + add r1, r8 + lsls r1, 16 + lsrs r1, 16 + movs r2, 0x20 + bl LoadCompressedPalette + mov r7, r9 + lsls r6, r7, 24 + lsrs r6, 24 + mov r0, r9 + adds r1, r6, 0 + bl sub_8143648 + ldr r0, _081457FC @ =gUnknown_02024E8C + mov r2, r10 + lsls r1, r2, 16 + asrs r1, 16 + ldr r3, [sp, 0x10] + lsls r2, r3, 16 + asrs r2, 16 + movs r3, 0 + bl CreateSprite + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + ldr r5, _08145800 @ =gSprites + lsls r2, r4, 4 + adds r2, r4 + lsls r2, 2 + adds r3, r2, r5 + ldrb r1, [r3, 0x5] + movs r0, 0xF + ands r0, r1 + mov r7, r8 + orrs r0, r7 + movs r1, 0xD + negs r1, r1 + ands r0, r1 + movs r1, 0x4 + orrs r0, r1 + strb r0, [r3, 0x5] + mov r0, r9 + adds r0, 0x1 + strh r0, [r3, 0x30] + movs r0, 0x3E + adds r0, r3 + mov r8, r0 + ldrb r0, [r0] + orrs r0, r1 + mov r1, r8 + strb r0, [r1] + adds r0, r5, 0 + adds r0, 0x1C + adds r2, r0 + ldr r0, _08145804 @ =sub_81454E0 + str r0, [r2] + ldr r0, _08145808 @ =gSpriteTemplate_840CAEC + movs r2, 0x20 + ldrsh r1, [r3, r2] + movs r7, 0x22 + ldrsh r2, [r3, r7] + movs r3, 0x1 + bl CreateSprite + adds r1, r0, 0 + lsls r1, 24 + lsrs r1, 24 + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r4, [r0, 0x2E] + adds r1, r6, 0 + bl StartSpriteAnimIfDifferent + adds r0, r4, 0 + add sp, 0x14 + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r1} + bx r1 + .align 2, 0 +_081457E8: .4byte gSaveBlock2 +_081457EC: .4byte gMonFrontPicTable +_081457F0: .4byte gMonFrontPicCoords +_081457F4: .4byte gUnknown_0840B5A0 +_081457F8: .4byte 0x0000ffff +_081457FC: .4byte gUnknown_02024E8C +_08145800: .4byte gSprites +_08145804: .4byte sub_81454E0 +_08145808: .4byte gSpriteTemplate_840CAEC + thumb_func_end sub_81456B4 + + thumb_func_start sub_814580C +sub_814580C: @ 814580C + push {r4,lr} + adds r3, r0, 0 + ldr r4, _08145838 @ =gSprites + movs r1, 0x2E + ldrsh r0, [r3, r1] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r4 + movs r2, 0x2E + ldrsh r0, [r1, r2] + cmp r0, 0xA + beq _08145830 + ldr r0, _0814583C @ =gUnknown_0203935C + movs r2, 0 + ldrsh r0, [r0, r2] + cmp r0, 0 + beq _08145840 +_08145830: + adds r0, r3, 0 + bl DestroySprite + b _081458D4 + .align 2, 0 +_08145838: .4byte gSprites +_0814583C: .4byte gUnknown_0203935C +_08145840: + adds r0, r1, 0 + adds r0, 0x3E + ldrb r0, [r0] + movs r1, 0x3E + adds r1, r3 + mov r12, r1 + movs r1, 0x4 + ands r1, r0 + mov r0, r12 + ldrb r2, [r0] + movs r0, 0x5 + negs r0, r0 + ands r0, r2 + orrs r0, r1 + mov r1, r12 + strb r0, [r1] + movs r2, 0x2E + ldrsh r1, [r3, r2] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + ldrb r1, [r0, 0x1] + movs r0, 0xC + ands r0, r1 + ldrb r2, [r3, 0x1] + movs r1, 0xD + negs r1, r1 + ands r1, r2 + orrs r1, r0 + strb r1, [r3, 0x1] + movs r0, 0x2E + ldrsh r2, [r3, r0] + lsls r0, r2, 4 + adds r0, r2 + lsls r0, 2 + adds r0, r4 + ldrb r0, [r0, 0x1] + lsls r0, 30 + lsrs r0, 30 + movs r2, 0x4 + negs r2, r2 + ands r1, r2 + orrs r1, r0 + strb r1, [r3, 0x1] + movs r2, 0x2E + ldrsh r1, [r3, r2] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + ldrb r0, [r0, 0x3] + movs r1, 0x3E + ands r1, r0 + ldrb r2, [r3, 0x3] + movs r0, 0x3F + negs r0, r0 + ands r0, r2 + orrs r0, r1 + strb r0, [r3, 0x3] + movs r0, 0x2E + ldrsh r1, [r3, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + ldrh r0, [r0, 0x20] + strh r0, [r3, 0x20] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + ldrh r0, [r0, 0x22] + strh r0, [r3, 0x22] +_081458D4: + pop {r4} + pop {r0} + bx r0 + thumb_func_end sub_814580C + + thumb_func_start sub_81458DC +sub_81458DC: @ 81458DC + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0x4 + ldr r7, _0814597C @ =0x0201c000 + ldr r0, _08145980 @ =0x00004023 + bl VarGet + lsls r0, 16 + lsrs r0, 16 + bl GetStarterPokemon + lsls r0, 16 + lsrs r0, 16 + bl SpeciesToNationalPokedexNum + lsls r0, 16 + lsrs r0, 16 + mov r10, r0 + movs r4, 0x1 + movs r5, 0 + ldr r0, _08145984 @ =0x00000181 + mov r8, r0 +_0814590E: + adds r0, r4, 0 + movs r1, 0x1 + bl sub_8090D90 + lsls r0, 24 + adds r6, r7, 0 + adds r6, 0x90 + cmp r0, 0 + beq _0814592C + lsls r0, r5, 1 + adds r0, r6, r0 + strh r4, [r0] + adds r0, r5, 0x1 + lsls r0, 16 + lsrs r5, r0, 16 +_0814592C: + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, r8 + bls _0814590E + adds r4, r5, 0 + ldr r0, _08145984 @ =0x00000181 + lsls r1, r4, 16 + mov r9, r1 + movs r2, 0x8E + adds r2, r7 + mov r8, r2 + adds r1, r7, 0 + adds r1, 0x86 + str r1, [sp] + cmp r4, r0 + bhi _08145964 + adds r1, r6, 0 + movs r3, 0 + adds r2, r0, 0 +_08145954: + lsls r0, r4, 1 + adds r0, r1, r0 + strh r3, [r0] + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, r2 + bls _08145954 +_08145964: + movs r2, 0xE5 + lsls r2, 2 + adds r0, r7, r2 + strh r5, [r0] + mov r1, r9 + lsrs r0, r1, 16 + cmp r0, 0x43 + bhi _08145988 + mov r2, r8 + strh r5, [r2] + b _0814598E + .align 2, 0 +_0814597C: .4byte 0x0201c000 +_08145980: .4byte 0x00004023 +_08145984: .4byte 0x00000181 +_08145988: + movs r0, 0x44 + mov r1, r8 + strh r0, [r1] +_0814598E: + movs r5, 0 + movs r2, 0xE5 + lsls r2, 2 + adds r4, r7, r2 + mov r9, r5 + b _0814599E +_0814599A: + cmp r5, 0x43 + bhi _081459EE +_0814599E: + bl Random + lsls r0, 16 + lsrs r0, 16 + ldrh r1, [r4] + bl __umodsi3 + lsls r0, 16 + lsrs r2, r0, 16 + lsls r1, r5, 1 + adds r1, r7, r1 + lsls r0, r2, 1 + adds r3, r6, r0 + ldrh r0, [r3] + strh r0, [r1] + adds r0, r5, 0x1 + lsls r0, 16 + lsrs r5, r0, 16 + mov r0, r9 + strh r0, [r3] + ldrh r0, [r4] + subs r0, 0x1 + strh r0, [r4] + lsls r0, 16 + lsrs r0, 16 + cmp r2, r0 + beq _081459E8 + ldrh r0, [r4] + lsls r0, 1 + adds r0, r6, r0 + ldrh r0, [r0] + strh r0, [r3] + ldrh r0, [r4] + lsls r0, 1 + adds r0, r6, r0 + mov r1, r9 + strh r1, [r0] +_081459E8: + ldrh r0, [r4] + cmp r0, 0 + bne _0814599A +_081459EE: + mov r2, r8 + ldrh r0, [r2] + cmp r0, 0x43 + bhi _08145A26 + adds r5, r0, 0 + movs r2, 0 + cmp r5, 0x43 + bhi _08145A5C + mov r3, r8 +_08145A00: + lsls r1, r5, 1 + adds r1, r7, r1 + lsls r0, r2, 1 + adds r0, r7, r0 + ldrh r0, [r0] + strh r0, [r1] + adds r0, r2, 0x1 + lsls r0, 16 + lsrs r2, r0, 16 + ldrh r0, [r3] + cmp r2, r0 + bne _08145A1A + movs r2, 0 +_08145A1A: + adds r0, r5, 0x1 + lsls r0, 16 + lsrs r5, r0, 16 + cmp r5, 0x43 + bls _08145A00 + b _08145A5C +_08145A26: + movs r4, 0 + ldrh r0, [r7] + cmp r0, r10 + beq _08145A42 +_08145A2E: + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + lsls r0, r4, 1 + adds r0, r7, r0 + ldrh r0, [r0] + cmp r0, r10 + beq _08145A42 + cmp r4, 0x43 + bls _08145A2E +_08145A42: + mov r1, r8 + ldrh r0, [r1] + subs r0, 0x1 + cmp r4, r0 + bge _08145A5C + lsls r0, r4, 1 + adds r0, r7, r0 + ldr r2, [sp] + ldrh r1, [r2] + strh r1, [r0] + mov r0, r10 + strh r0, [r2] + b _08145A62 +_08145A5C: + mov r2, r10 + ldr r1, [sp] + strh r2, [r1] +_08145A62: + movs r0, 0x44 + mov r1, r8 + strh r0, [r1] + add sp, 0x4 + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + thumb_func_end sub_81458DC + + .align 2, 0 @ Don't pad with nop. diff --git a/asm/hall_of_fame.s b/asm/hall_of_fame.s new file mode 100644 index 000000000..6876c6783 --- /dev/null +++ b/asm/hall_of_fame.s @@ -0,0 +1,3402 @@ + .include "constants/gba_constants.inc" + .include "constants/species_constants.inc" + .include "asm/macros.inc" + + .syntax unified + + .text + + thumb_func_start sub_8141E38 +sub_8141E38: @ 8141E38 + push {lr} + bl LoadOam + bl ProcessSpriteCopyRequests + bl TransferPlttBuffer + pop {r0} + bx r0 + thumb_func_end sub_8141E38 + + thumb_func_start sub_8141E4C +sub_8141E4C: @ 8141E4C + push {lr} + bl RunTasks + bl AnimateSprites + bl BuildOamBuffer + bl UpdatePaletteFade + pop {r0} + bx r0 + thumb_func_end sub_8141E4C + + thumb_func_start sub_8141E64 +sub_8141E64: @ 8141E64 + push {r4,lr} + sub sp, 0x4 + ldr r0, _08141E80 @ =gMain + ldr r1, _08141E84 @ =0x0000043c + adds r0, r1 + ldrb r0, [r0] + cmp r0, 0x4 + bhi _08141EA0 + lsls r0, 2 + ldr r1, _08141E88 @ =_08141E8C + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_08141E80: .4byte gMain +_08141E84: .4byte 0x0000043c +_08141E88: .4byte _08141E8C + .align 2, 0 +_08141E8C: + .4byte _08141EA0 + .4byte _08141EC0 + .4byte _08141EC6 + .4byte _08141F1C + .4byte _08141F58 +_08141EA0: + movs r0, 0 + bl SetVBlankCallback + bl sub_81433E0 + ldr r0, _08141EB8 @ =gMain + ldr r2, _08141EBC @ =0x0000043c + adds r0, r2 + movs r1, 0x1 + strb r1, [r0] + b _08141F84 + .align 2, 0 +_08141EB8: .4byte gMain +_08141EBC: .4byte 0x0000043c +_08141EC0: + bl sub_8143570 + b _08141F38 +_08141EC6: + movs r0, 0x1 + negs r0, r0 + movs r4, 0 + str r4, [sp] + movs r1, 0 + movs r2, 0x10 + movs r3, 0 + bl BeginNormalPaletteFade + ldr r0, _08141F04 @ =sub_8141E38 + bl SetVBlankCallback + ldr r3, _08141F08 @ =0x04000208 + ldrh r2, [r3] + strh r4, [r3] + ldr r4, _08141F0C @ =0x04000200 + ldrh r0, [r4] + movs r1, 0x1 + orrs r0, r1 + strh r0, [r4] + strh r2, [r3] + ldr r2, _08141F10 @ =REG_DISPSTAT + ldrh r0, [r2] + movs r1, 0x8 + orrs r0, r1 + strh r0, [r2] + ldr r1, _08141F14 @ =gMain + ldr r2, _08141F18 @ =0x0000043c + adds r1, r2 + b _08141F3E + .align 2, 0 +_08141F04: .4byte sub_8141E38 +_08141F08: .4byte 0x04000208 +_08141F0C: .4byte 0x04000200 +_08141F10: .4byte REG_DISPSTAT +_08141F14: .4byte gMain +_08141F18: .4byte 0x0000043c +_08141F1C: + ldr r1, _08141F48 @ =REG_BLDCNT + ldr r2, _08141F4C @ =0x00003f42 + adds r0, r2, 0 + strh r0, [r1] + adds r1, 0x2 + movs r2, 0xE2 + lsls r2, 3 + adds r0, r2, 0 + strh r0, [r1] + adds r1, 0x2 + movs r0, 0 + strh r0, [r1] + bl sub_81435B8 +_08141F38: + ldr r1, _08141F50 @ =gMain + ldr r0, _08141F54 @ =0x0000043c + adds r1, r0 +_08141F3E: + ldrb r0, [r1] + adds r0, 0x1 + strb r0, [r1] + b _08141F84 + .align 2, 0 +_08141F48: .4byte REG_BLDCNT +_08141F4C: .4byte 0x00003f42 +_08141F50: .4byte gMain +_08141F54: .4byte 0x0000043c +_08141F58: + bl UpdatePaletteFade + ldr r0, _08141F7C @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _08141F84 + ldr r0, _08141F80 @ =sub_8141E4C + bl SetMainCallback2 + movs r0, 0xDA + lsls r0, 1 + bl PlayBGM + movs r0, 0 + b _08141F86 + .align 2, 0 +_08141F7C: .4byte gPaletteFade +_08141F80: .4byte sub_8141E4C +_08141F84: + movs r0, 0x1 +_08141F86: + add sp, 0x4 + pop {r4} + pop {r1} + bx r1 + thumb_func_end sub_8141E64 + + thumb_func_start sub_8141F90 +sub_8141F90: @ 8141F90 + push {r4,lr} + bl sub_8141E64 + lsls r0, 24 + lsrs r4, r0, 24 + cmp r4, 0 + bne _08141FB6 + ldr r0, _08141FBC @ =sub_8141FF8 + movs r1, 0 + bl CreateTask + lsls r0, 24 + lsrs r0, 24 + ldr r2, _08141FC0 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r1, r2 + strh r4, [r1, 0x8] +_08141FB6: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08141FBC: .4byte sub_8141FF8 +_08141FC0: .4byte gTasks + thumb_func_end sub_8141F90 + + thumb_func_start sub_8141FC4 +sub_8141FC4: @ 8141FC4 + push {lr} + bl sub_8141E64 + lsls r0, 24 + cmp r0, 0 + bne _08141FEA + ldr r0, _08141FF0 @ =sub_8141FF8 + movs r1, 0 + bl CreateTask + lsls r0, 24 + lsrs r0, 24 + ldr r2, _08141FF4 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r1, r2 + movs r0, 0x1 + strh r0, [r1, 0x8] +_08141FEA: + pop {r0} + bx r0 + .align 2, 0 +_08141FF0: .4byte sub_8141FF8 +_08141FF4: .4byte gTasks + thumb_func_end sub_8141FC4 + + thumb_func_start sub_8141FF8 +sub_8141FF8: @ 8141FF8 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0xC + lsls r0, 24 + lsrs r0, 24 + mov r8, r0 + ldr r0, _081420C8 @ =0x0201c000 + mov r9, r0 + ldr r1, _081420CC @ =gTasks + mov r2, r8 + lsls r0, r2, 2 + add r0, r8 + lsls r0, 3 + adds r0, r1 + movs r1, 0 + strh r1, [r0, 0xC] + movs r7, 0 + ldr r4, _081420D0 @ =0xfffffe00 + mov r10, r4 +_08142024: + movs r0, 0x64 + adds r1, r7, 0 + muls r1, r0 + ldr r0, _081420D4 @ =gPlayerParty + adds r6, r1, r0 + adds r0, r6, 0 + movs r1, 0xB + bl GetMonData + adds r3, r0, 0 + cmp r3, 0 + beq _081420DC + adds r0, r6, 0 + movs r1, 0x41 + bl GetMonData + lsls r4, r7, 2 + adds r4, r7 + lsls r4, 2 + mov r1, r9 + adds r5, r1, r4 + ldr r2, _081420D8 @ =0x000001ff + adds r1, r2, 0 + ands r0, r1 + ldrh r1, [r5, 0x8] + mov r2, r10 + ands r1, r2 + orrs r1, r0 + strh r1, [r5, 0x8] + adds r0, r6, 0 + movs r1, 0x1 + bl GetMonData + str r0, [r5] + adds r0, r6, 0 + movs r1, 0 + bl GetMonData + mov r1, r9 + adds r1, 0x4 + adds r1, r4 + str r0, [r1] + adds r0, r6, 0 + movs r1, 0x38 + bl GetMonData + lsls r0, 1 + ldrb r2, [r5, 0x9] + movs r1, 0x1 + ands r1, r2 + orrs r1, r0 + strb r1, [r5, 0x9] + adds r0, r6, 0 + movs r1, 0x2 + mov r2, sp + bl GetMonData + movs r2, 0 + mov r6, r8 + lsls r5, r6, 2 + mov r3, r9 + adds r3, 0xA +_081420A0: + adds r1, r2, r4 + adds r1, r3, r1 + mov r6, sp + adds r0, r6, r2 + ldrb r0, [r0] + strb r0, [r1] + adds r0, r2, 0x1 + lsls r0, 16 + lsrs r2, r0, 16 + cmp r2, 0x9 + bls _081420A0 + ldr r0, _081420CC @ =gTasks + mov r2, r8 + adds r1, r5, r2 + lsls r1, 3 + adds r1, r0 + ldrh r0, [r1, 0xC] + adds r0, 0x1 + strh r0, [r1, 0xC] + b _08142108 + .align 2, 0 +_081420C8: .4byte 0x0201c000 +_081420CC: .4byte gTasks +_081420D0: .4byte 0xfffffe00 +_081420D4: .4byte gPlayerParty +_081420D8: .4byte 0x000001ff +_081420DC: + lsls r1, r7, 2 + adds r1, r7 + lsls r1, 2 + mov r4, r9 + adds r2, r4, r1 + ldrh r0, [r2, 0x8] + mov r6, r10 + ands r0, r6 + strh r0, [r2, 0x8] + str r3, [r2] + mov r0, r9 + adds r0, 0x4 + adds r0, r1 + str r3, [r0] + ldrb r1, [r2, 0x9] + movs r0, 0x1 + ands r0, r1 + strb r0, [r2, 0x9] + movs r0, 0xFF + strb r0, [r2, 0xA] + mov r0, r8 + lsls r5, r0, 2 +_08142108: + adds r0, r7, 0x1 + lsls r0, 16 + lsrs r7, r0, 16 + cmp r7, 0x5 + bls _08142024 + ldr r0, _08142158 @ =gUnknown_0203931C + movs r3, 0 + str r3, [r0] + ldr r4, _0814215C @ =gTasks + mov r2, r8 + adds r1, r5, r2 + lsls r1, 3 + adds r2, r1, r4 + strh r3, [r2, 0xA] + movs r0, 0xFF + strh r0, [r2, 0x10] + movs r7, 0 + adds r3, r4, 0 + adds r3, 0x8 + movs r2, 0xFF +_08142130: + adds r0, r7, 0x5 + lsls r0, 1 + adds r0, r1 + adds r0, r3 + strh r2, [r0] + adds r0, r7, 0x1 + lsls r0, 16 + lsrs r7, r0, 16 + cmp r7, 0x5 + bls _08142130 + mov r6, r8 + adds r0, r5, r6 + lsls r0, 3 + adds r1, r0, r4 + movs r2, 0x8 + ldrsh r0, [r1, r2] + cmp r0, 0 + beq _08142164 + ldr r0, _08142160 @ =sub_81422E8 + b _08142166 + .align 2, 0 +_08142158: .4byte gUnknown_0203931C +_0814215C: .4byte gTasks +_08142160: .4byte sub_81422E8 +_08142164: + ldr r0, _08142178 @ =sub_814217C +_08142166: + str r0, [r1] + add sp, 0xC + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08142178: .4byte sub_814217C + thumb_func_end sub_8141FF8 + + thumb_func_start sub_814217C +sub_814217C: @ 814217C + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + lsls r0, 24 + lsrs r0, 24 + mov r8, r0 + ldr r0, _081421C4 @ =0x0201c000 + mov r9, r0 + movs r7, 0x80 + lsls r7, 6 + add r7, r9 + ldr r0, _081421C8 @ =gUnknown_02039324 + ldrb r0, [r0] + cmp r0, 0 + bne _081421D4 + movs r4, 0 + mov r0, r8 + lsls r0, 2 + mov r10, r0 + ldr r5, _081421CC @ =0xfffe4000 + add r5, r9 + movs r3, 0xF0 + lsls r3, 9 + movs r2, 0 + ldr r1, _081421D0 @ =0x00001fff +_081421B2: + adds r0, r4, r3 + adds r0, r5 + strb r2, [r0] + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, r1 + bls _081421B2 + b _081421E0 + .align 2, 0 +_081421C4: .4byte 0x0201c000 +_081421C8: .4byte gUnknown_02039324 +_081421CC: .4byte 0xfffe4000 +_081421D0: .4byte 0x00001fff +_081421D4: + movs r0, 0x3 + bl sub_8125EC8 + mov r0, r8 + lsls r0, 2 + mov r10, r0 +_081421E0: + movs r4, 0 + ldrh r1, [r7, 0x8] + ldr r2, _081421E8 @ =0x000001ff + b _081421FA + .align 2, 0 +_081421E8: .4byte 0x000001ff +_081421EC: + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + adds r7, 0x78 + cmp r4, 0x31 + bhi _08142206 + ldrh r1, [r7, 0x8] +_081421FA: + adds r0, r2, 0 + ands r0, r1 + cmp r0, 0 + bne _081421EC + cmp r4, 0x31 + bls _08142228 +_08142206: + ldr r5, _08142264 @ =0x0201e000 + adds r6, r5, 0 + adds r5, 0x78 + movs r4, 0 + subs r7, 0x78 +_08142210: + adds r0, r6, 0 + adds r1, r5, 0 + movs r2, 0x78 + bl memcpy + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + adds r6, 0x78 + adds r5, 0x78 + cmp r4, 0x30 + bls _08142210 +_08142228: + adds r0, r7, 0 + mov r1, r9 + movs r2, 0x78 + bl memcpy + movs r0, 0x2 + movs r1, 0xE + movs r2, 0x1B + movs r3, 0x13 + bl MenuDrawTextWindow + ldr r0, _08142268 @ =gMenuText_HOFSaving + movs r1, 0x3 + movs r2, 0xF + bl MenuPrint + ldr r1, _0814226C @ =gTasks + mov r0, r10 + add r0, r8 + lsls r0, 3 + adds r0, r1 + ldr r1, _08142270 @ =sub_8142274 + str r1, [r0] + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08142264: .4byte 0x0201e000 +_08142268: .4byte gMenuText_HOFSaving +_0814226C: .4byte gTasks +_08142270: .4byte sub_8142274 + thumb_func_end sub_814217C + + thumb_func_start sub_8142274 +sub_8142274: @ 8142274 + push {r4,lr} + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + ldr r1, _081422A8 @ =gUnknown_03005EBC + ldr r0, _081422AC @ =sub_8141FC4 + str r0, [r1] + movs r0, 0x3 + bl sub_8125D44 + movs r0, 0x37 + bl PlaySE + ldr r1, _081422B0 @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r0, r1 + ldr r1, _081422B4 @ =sub_81422B8 + str r1, [r0] + movs r1, 0x20 + strh r1, [r0, 0xE] + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_081422A8: .4byte gUnknown_03005EBC +_081422AC: .4byte sub_8141FC4 +_081422B0: .4byte gTasks +_081422B4: .4byte sub_81422B8 + thumb_func_end sub_8142274 + + thumb_func_start sub_81422B8 +sub_81422B8: @ 81422B8 + push {lr} + lsls r0, 24 + lsrs r0, 24 + ldr r2, _081422D8 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r1, r2 + ldrh r2, [r1, 0xE] + movs r3, 0xE + ldrsh r0, [r1, r3] + cmp r0, 0 + beq _081422DC + subs r0, r2, 0x1 + strh r0, [r1, 0xE] + b _081422E0 + .align 2, 0 +_081422D8: .4byte gTasks +_081422DC: + ldr r0, _081422E4 @ =sub_81422E8 + str r0, [r1] +_081422E0: + pop {r0} + bx r0 + .align 2, 0 +_081422E4: .4byte sub_81422E8 + thumb_func_end sub_81422B8 + + thumb_func_start sub_81422E8 +sub_81422E8: @ 81422E8 + push {r4,r5,lr} + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + ldr r5, _08142314 @ =gWindowConfig_81E7198 + adds r0, r5, 0 + bl SetUpWindowConfig + adds r0, r5, 0 + bl InitMenuWindow + ldr r1, _08142318 @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r0, r1 + ldr r1, _0814231C @ =sub_8142320 + str r1, [r0] + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_08142314: .4byte gWindowConfig_81E7198 +_08142318: .4byte gTasks +_0814231C: .4byte sub_8142320 + thumb_func_end sub_81422E8 + + thumb_func_start sub_8142320 +sub_8142320: @ 8142320 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + sub sp, 0x8 + lsls r0, 24 + lsrs r7, r0, 24 + ldr r2, _08142350 @ =0x0201c000 + ldr r0, _08142354 @ =gTasks + lsls r1, r7, 2 + adds r1, r7 + lsls r1, 3 + adds r1, r0 + ldrh r6, [r1, 0xA] + lsls r0, r6, 2 + adds r0, r6 + lsls r0, 2 + adds r4, r0, r2 + movs r2, 0xC + ldrsh r0, [r1, r2] + cmp r0, 0x3 + ble _0814235C + ldr r1, _08142358 @ =gUnknown_0840B534 + b _0814235E + .align 2, 0 +_08142350: .4byte 0x0201c000 +_08142354: .4byte gTasks +_08142358: .4byte gUnknown_0840B534 +_0814235C: + ldr r1, _081423F0 @ =gUnknown_0840B564 +_0814235E: + lsls r2, r6, 3 + adds r0, r2, r1 + ldrh r5, [r0] + adds r0, r1, 0x2 + adds r0, r2, r0 + ldrh r3, [r0] + adds r0, r1, 0x4 + adds r0, r2, r0 + ldrh r0, [r0] + mov r9, r0 + adds r1, 0x6 + adds r2, r1 + ldrh r2, [r2] + mov r8, r2 + ldrh r0, [r4, 0x8] + lsls r0, 23 + lsrs r0, 23 + lsls r1, r5, 16 + asrs r1, 16 + lsls r2, r3, 16 + asrs r2, 16 + ldr r3, [r4] + str r3, [sp] + ldr r3, [r4, 0x4] + str r3, [sp, 0x4] + adds r3, r6, 0 + bl sub_81436BC + lsls r0, 24 + lsrs r0, 24 + ldr r3, _081423F4 @ =gSprites + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r2, r1, r3 + movs r4, 0 + mov r5, r9 + strh r5, [r2, 0x30] + mov r5, r8 + strh r5, [r2, 0x32] + strh r4, [r2, 0x2E] + adds r3, 0x1C + adds r1, r3 + ldr r2, _081423F8 @ =sub_81435DC + str r2, [r1] + ldr r5, _081423FC @ =gTasks + adds r1, r6, 0x5 + lsls r1, 1 + lsls r4, r7, 2 + adds r4, r7 + lsls r4, 3 + adds r1, r4 + adds r2, r5, 0 + adds r2, 0x8 + adds r1, r2 + strh r0, [r1] + movs r0, 0 + movs r1, 0xE + movs r2, 0x1D + movs r3, 0x13 + bl MenuZeroFillWindowRect + adds r4, r5 + ldr r0, _08142400 @ =sub_8142404 + str r0, [r4] + add sp, 0x8 + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_081423F0: .4byte gUnknown_0840B564 +_081423F4: .4byte gSprites +_081423F8: .4byte sub_81435DC +_081423FC: .4byte gTasks +_08142400: .4byte sub_8142404 + thumb_func_end sub_8142320 + + thumb_func_start sub_8142404 +sub_8142404: @ 8142404 + push {r4-r6,lr} + lsls r0, 24 + lsrs r0, 24 + ldr r4, _08142470 @ =0x0201c000 + ldr r3, _08142474 @ =gTasks + lsls r2, r0, 2 + adds r2, r0 + lsls r2, 3 + adds r5, r2, r3 + ldrh r1, [r5, 0xA] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 2 + adds r6, r0, r4 + ldr r4, _08142478 @ =gSprites + adds r1, 0x5 + lsls r1, 1 + adds r1, r2 + adds r3, 0x8 + adds r1, r3 + movs r0, 0 + ldrsh r1, [r1, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + movs r1, 0x2E + ldrsh r0, [r0, r1] + cmp r0, 0 + beq _0814246A + ldrh r2, [r6, 0x8] + ldr r0, _0814247C @ =0x000001ff + ands r0, r2 + movs r1, 0xCE + lsls r1, 1 + cmp r0, r1 + beq _08142458 + lsls r0, r2, 23 + lsrs r0, 23 + movs r1, 0 + bl PlayCry1 +_08142458: + adds r0, r6, 0 + movs r1, 0 + movs r2, 0xE + bl sub_8143088 + movs r0, 0x78 + strh r0, [r5, 0xE] + ldr r0, _08142480 @ =sub_8142484 + str r0, [r5] +_0814246A: + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_08142470: .4byte 0x0201c000 +_08142474: .4byte gTasks +_08142478: .4byte gSprites +_0814247C: .4byte 0x000001ff +_08142480: .4byte sub_8142484 + thumb_func_end sub_8142404 + + thumb_func_start sub_8142484 +sub_8142484: @ 8142484 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + sub sp, 0x4 + lsls r0, 24 + lsrs r5, r0, 24 + ldr r2, _081424BC @ =0x0201c000 + ldr r1, _081424C0 @ =gTasks + lsls r0, r5, 2 + adds r0, r5 + lsls r6, r0, 3 + adds r4, r6, r1 + ldrh r3, [r4, 0xA] + lsls r0, r3, 2 + adds r0, r3 + lsls r0, 2 + adds r0, r2 + mov r9, r0 + ldrh r2, [r4, 0xE] + movs r7, 0xE + ldrsh r0, [r4, r7] + mov r12, r1 + cmp r0, 0 + beq _081424C4 + subs r0, r2, 0x1 + strh r0, [r4, 0xE] + b _0814255C + .align 2, 0 +_081424BC: .4byte 0x0201c000 +_081424C0: .4byte gTasks +_081424C4: + ldr r2, _0814253C @ =gUnknown_0203931C + ldr r0, _08142540 @ =gSprites + mov r8, r0 + adds r0, r3, 0x5 + lsls r0, 1 + adds r0, r6 + mov r1, r12 + adds r1, 0x8 + adds r6, r0, r1 + movs r7, 0 + ldrsh r1, [r6, r7] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + add r0, r8 + ldrb r0, [r0, 0x5] + lsrs r0, 4 + movs r1, 0x80 + lsls r1, 9 + lsls r1, r0 + ldr r3, [r2] + orrs r3, r1 + str r3, [r2] + ldrh r2, [r4, 0xA] + movs r1, 0xA + ldrsh r0, [r4, r1] + cmp r0, 0x4 + bgt _08142550 + mov r7, r9 + ldrh r1, [r7, 0x1C] + ldr r0, _08142544 @ =0x000001ff + ands r0, r1 + cmp r0, 0 + beq _08142550 + adds r0, r2, 0x1 + strh r0, [r4, 0xA] + ldr r0, _08142548 @ =0x0000735f + str r0, [sp] + adds r0, r3, 0 + movs r1, 0 + movs r2, 0xC + movs r3, 0xC + bl BeginNormalPaletteFade + movs r0, 0 + ldrsh r1, [r6, r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + add r0, r8 + ldrb r2, [r0, 0x5] + movs r1, 0xD + negs r1, r1 + ands r1, r2 + movs r2, 0x4 + orrs r1, r2 + strb r1, [r0, 0x5] + ldr r0, _0814254C @ =sub_8142320 + str r0, [r4] + b _0814255C + .align 2, 0 +_0814253C: .4byte gUnknown_0203931C +_08142540: .4byte gSprites +_08142544: .4byte 0x000001ff +_08142548: .4byte 0x0000735f +_0814254C: .4byte sub_8142320 +_08142550: + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + add r0, r12 + ldr r1, _0814256C @ =sub_8142570 + str r1, [r0] +_0814255C: + add sp, 0x4 + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_0814256C: .4byte sub_8142570 + thumb_func_end sub_8142484 + + thumb_func_start sub_8142570 +sub_8142570: @ 8142570 + push {r4-r7,lr} + mov r7, r8 + push {r7} + sub sp, 0x4 + lsls r0, 24 + lsrs r4, r0, 24 + ldr r0, _08142604 @ =0xffff0000 + movs r1, 0 + str r1, [sp] + movs r2, 0 + movs r3, 0 + bl BeginNormalPaletteFade + movs r3, 0 + lsls r1, r4, 2 + adds r0, r1, r4 + lsls r5, r0, 3 + ldr r0, _08142608 @ =gTasks + 0x8 + mov r12, r0 + mov r8, r1 + ldr r6, _0814260C @ =gSprites + movs r7, 0xD + negs r7, r7 +_0814259E: + adds r0, r3, 0x5 + lsls r0, 1 + adds r0, r5 + mov r2, r12 + adds r1, r0, r2 + movs r2, 0 + ldrsh r0, [r1, r2] + cmp r0, 0xFF + beq _081425C0 + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r6 + ldrb r2, [r1, 0x5] + adds r0, r7, 0 + ands r0, r2 + strb r0, [r1, 0x5] +_081425C0: + adds r0, r3, 0x1 + lsls r0, 16 + lsrs r3, r0, 16 + cmp r3, 0x5 + bls _0814259E + movs r0, 0 + movs r1, 0xE + movs r2, 0x1D + movs r3, 0x13 + bl MenuZeroFillWindowRect + movs r0, 0 + movs r1, 0xF + bl sub_8143068 + movs r0, 0x69 + bl PlaySE + ldr r1, _08142610 @ =gTasks + mov r2, r8 + adds r0, r2, r4 + lsls r0, 3 + adds r0, r1 + movs r1, 0xC8 + lsls r1, 1 + strh r1, [r0, 0xE] + ldr r1, _08142614 @ =sub_8142618 + str r1, [r0] + add sp, 0x4 + pop {r3} + mov r8, r3 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08142604: .4byte 0xffff0000 +_08142608: .4byte gTasks + 0x8 +_0814260C: .4byte gSprites +_08142610: .4byte gTasks +_08142614: .4byte sub_8142618 + thumb_func_end sub_8142570 + + thumb_func_start sub_8142618 +sub_8142618: @ 8142618 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0x4 + lsls r0, 24 + lsrs r6, r0, 24 + ldr r7, _08142658 @ =gTasks + lsls r4, r6, 2 + adds r0, r4, r6 + lsls r5, r0, 3 + adds r1, r5, r7 + ldrh r2, [r1, 0xE] + movs r3, 0xE + ldrsh r0, [r1, r3] + cmp r0, 0 + beq _0814265C + subs r2, 0x1 + strh r2, [r1, 0xE] + movs r0, 0x3 + ands r0, r2 + cmp r0, 0 + bne _081426D2 + lsls r0, r2, 16 + asrs r0, 16 + cmp r0, 0x6E + ble _081426D2 + bl sub_81438C4 + b _081426D2 + .align 2, 0 +_08142658: .4byte gTasks +_0814265C: + movs r3, 0 + mov r9, r4 + ldr r0, _081426E4 @ =gUnknown_0203931C + mov r10, r0 + adds r4, r5, 0 + adds r7, 0x8 + mov r8, r7 + ldr r7, _081426E8 @ =gSprites + movs r1, 0xD + negs r1, r1 + mov r12, r1 + movs r5, 0x4 +_08142674: + adds r0, r3, 0x5 + lsls r0, 1 + adds r0, r4 + mov r2, r8 + adds r1, r0, r2 + movs r2, 0 + ldrsh r0, [r1, r2] + cmp r0, 0xFF + beq _08142698 + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r7 + ldrb r2, [r1, 0x5] + mov r0, r12 + ands r0, r2 + orrs r0, r5 + strb r0, [r1, 0x5] +_08142698: + adds r0, r3, 0x1 + lsls r0, 16 + lsrs r3, r0, 16 + cmp r3, 0x5 + bls _08142674 + mov r3, r10 + ldr r0, [r3] + ldr r1, _081426EC @ =0x0000735f + str r1, [sp] + movs r1, 0 + movs r2, 0xC + movs r3, 0xC + bl BeginNormalPaletteFade + movs r0, 0 + movs r1, 0xE + movs r2, 0x1D + movs r3, 0x13 + bl MenuZeroFillWindowRect + ldr r1, _081426F0 @ =gTasks + mov r2, r9 + adds r0, r2, r6 + lsls r0, 3 + adds r0, r1 + movs r1, 0x7 + strh r1, [r0, 0xE] + ldr r1, _081426F4 @ =sub_81426F8 + str r1, [r0] +_081426D2: + add sp, 0x4 + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_081426E4: .4byte gUnknown_0203931C +_081426E8: .4byte gSprites +_081426EC: .4byte 0x0000735f +_081426F0: .4byte gTasks +_081426F4: .4byte sub_81426F8 + thumb_func_end sub_8142618 + + thumb_func_start sub_81426F8 +sub_81426F8: @ 81426F8 + push {lr} + lsls r0, 24 + lsrs r0, 24 + ldr r2, _08142718 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r2, r1, r2 + ldrh r1, [r2, 0xE] + movs r3, 0xE + ldrsh r0, [r2, r3] + cmp r0, 0xF + ble _08142720 + ldr r0, _0814271C @ =sub_8142738 + str r0, [r2] + b _0814272E + .align 2, 0 +_08142718: .4byte gTasks +_0814271C: .4byte sub_8142738 +_08142720: + adds r0, r1, 0x1 + strh r0, [r2, 0xE] + ldr r1, _08142734 @ =REG_BLDALPHA + movs r3, 0xE + ldrsh r0, [r2, r3] + lsls r0, 8 + strh r0, [r1] +_0814272E: + pop {r0} + bx r0 + .align 2, 0 +_08142734: .4byte REG_BLDALPHA + thumb_func_end sub_81426F8 + + thumb_func_start sub_8142738 +sub_8142738: @ 8142738 + push {r4,r5,lr} + adds r5, r0, 0 + lsls r5, 24 + lsrs r5, 24 + movs r1, 0x80 + lsls r1, 19 + movs r2, 0xCA + lsls r2, 5 + adds r0, r2, 0 + strh r0, [r1] + ldr r4, _08142784 @ =gWindowConfig_81E71B4 + adds r0, r4, 0 + bl SetUpWindowConfig + adds r0, r4, 0 + bl InitMenuWindow + ldr r0, _08142788 @ =gSaveBlock2 + ldrb r0, [r0, 0x8] + movs r1, 0x78 + movs r2, 0x48 + movs r3, 0x6 + bl sub_81437A4 + ldr r2, _0814278C @ =gTasks + lsls r1, r5, 2 + adds r1, r5 + lsls r1, 3 + adds r1, r2 + strh r0, [r1, 0x10] + movs r0, 0x78 + strh r0, [r1, 0xE] + ldr r0, _08142790 @ =sub_8142794 + str r0, [r1] + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_08142784: .4byte gWindowConfig_81E71B4 +_08142788: .4byte gSaveBlock2 +_0814278C: .4byte gTasks +_08142790: .4byte sub_8142794 + thumb_func_end sub_8142738 + + thumb_func_start sub_8142794 +sub_8142794: @ 8142794 + push {r4,lr} + lsls r0, 24 + lsrs r0, 24 + ldr r2, _081427B4 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r4, r1, r2 + ldrh r1, [r4, 0xE] + movs r2, 0xE + ldrsh r0, [r4, r2] + cmp r0, 0 + beq _081427B8 + subs r0, r1, 0x1 + strh r0, [r4, 0xE] + b _0814280A + .align 2, 0 +_081427B4: .4byte gTasks +_081427B8: + ldr r2, _081427D8 @ =gSprites + movs r3, 0x10 + ldrsh r1, [r4, r3] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r1, r0, r2 + ldrh r2, [r1, 0x20] + movs r3, 0x20 + ldrsh r0, [r1, r3] + cmp r0, 0xA0 + beq _081427DC + adds r0, r2, 0x1 + strh r0, [r1, 0x20] + b _0814280A + .align 2, 0 +_081427D8: .4byte gSprites +_081427DC: + movs r0, 0x1 + movs r1, 0x2 + movs r2, 0xF + movs r3, 0x9 + bl MenuDrawTextWindow + movs r0, 0x1 + movs r1, 0x2 + bl sub_8143300 + movs r0, 0x2 + movs r1, 0xE + movs r2, 0x1B + movs r3, 0x13 + bl MenuDrawTextWindow + ldr r0, _08142810 @ =gMenuText_HOFCongratulations + movs r1, 0x4 + movs r2, 0xF + bl MenuPrint + ldr r0, _08142814 @ =sub_8142818 + str r0, [r4] +_0814280A: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08142810: .4byte gMenuText_HOFCongratulations +_08142814: .4byte sub_8142818 + thumb_func_end sub_8142794 + + thumb_func_start sub_8142818 +sub_8142818: @ 8142818 + push {r4,lr} + lsls r0, 24 + lsrs r4, r0, 24 + ldr r0, _08142844 @ =gMain + ldrh r1, [r0, 0x2E] + movs r0, 0x1 + ands r0, r1 + cmp r0, 0 + beq _0814283E + movs r0, 0x4 + bl FadeOutBGM + ldr r0, _08142848 @ =gTasks + lsls r1, r4, 2 + adds r1, r4 + lsls r1, 3 + adds r1, r0 + ldr r0, _0814284C @ =sub_8142850 + str r0, [r1] +_0814283E: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08142844: .4byte gMain +_08142848: .4byte gTasks +_0814284C: .4byte sub_8142850 + thumb_func_end sub_8142818 + + thumb_func_start sub_8142850 +sub_8142850: @ 8142850 + push {r4,lr} + sub sp, 0x4 + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + ldr r0, _08142890 @ =gPlttBufferFaded + ldr r1, _08142894 @ =gPlttBufferUnfaded + movs r2, 0x80 + lsls r2, 2 + bl CpuSet + movs r0, 0x1 + negs r0, r0 + movs r1, 0 + str r1, [sp] + movs r1, 0x8 + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + ldr r1, _08142898 @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r0, r1 + ldr r1, _0814289C @ =sub_81428A0 + str r1, [r0] + add sp, 0x4 + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08142890: .4byte gPlttBufferFaded +_08142894: .4byte gPlttBufferUnfaded +_08142898: .4byte gTasks +_0814289C: .4byte sub_81428A0 + thumb_func_end sub_8142850 + + thumb_func_start sub_81428A0 +sub_81428A0: @ 81428A0 + push {lr} + lsls r0, 24 + lsrs r2, r0, 24 + ldr r0, _081428C4 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _081428BE + adds r0, r2, 0 + bl DestroyTask + ldr r0, _081428C8 @ =sub_81439D0 + bl SetMainCallback2 +_081428BE: + pop {r0} + bx r0 + .align 2, 0 +_081428C4: .4byte gPaletteFade +_081428C8: .4byte sub_81439D0 + thumb_func_end sub_81428A0 + + thumb_func_start sub_81428CC +sub_81428CC: @ 81428CC + push {r4,r5,lr} + ldr r0, _081428E4 @ =gMain + ldr r1, _081428E8 @ =0x0000043c + adds r0, r1 + ldrb r0, [r0] + cmp r0, 0x5 + bhi _08142908 + lsls r0, 2 + ldr r1, _081428EC @ =_081428F0 + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_081428E4: .4byte gMain +_081428E8: .4byte 0x0000043c +_081428EC: .4byte _081428F0 + .align 2, 0 +_081428F0: + .4byte _08142908 + .4byte _08142928 + .4byte _0814293C + .4byte _08142980 + .4byte _081429C0 + .4byte _081429EC +_08142908: + movs r0, 0 + bl SetVBlankCallback + bl sub_81433E0 + ldr r0, _08142920 @ =gMain + ldr r2, _08142924 @ =0x0000043c + adds r0, r2 + movs r1, 0x1 + strb r1, [r0] + b _08142A12 + .align 2, 0 +_08142920: .4byte gMain +_08142924: .4byte 0x0000043c +_08142928: + bl sub_8143570 + ldr r1, _08142934 @ =gMain + ldr r3, _08142938 @ =0x0000043c + adds r1, r3 + b _081429DC + .align 2, 0 +_08142934: .4byte gMain +_08142938: .4byte 0x0000043c +_0814293C: + ldr r0, _08142968 @ =sub_8141E38 + bl SetVBlankCallback + ldr r3, _0814296C @ =0x04000208 + ldrh r2, [r3] + movs r0, 0 + strh r0, [r3] + ldr r4, _08142970 @ =0x04000200 + ldrh r0, [r4] + movs r1, 0x1 + orrs r0, r1 + strh r0, [r4] + strh r2, [r3] + ldr r2, _08142974 @ =REG_DISPSTAT + ldrh r0, [r2] + movs r1, 0x8 + orrs r0, r1 + strh r0, [r2] + ldr r1, _08142978 @ =gMain + ldr r4, _0814297C @ =0x0000043c + adds r1, r4 + b _081429DC + .align 2, 0 +_08142968: .4byte sub_8141E38 +_0814296C: .4byte 0x04000208 +_08142970: .4byte 0x04000200 +_08142974: .4byte REG_DISPSTAT +_08142978: .4byte gMain +_0814297C: .4byte 0x0000043c +_08142980: + ldr r0, _081429AC @ =REG_BLDCNT + movs r1, 0 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + bl sub_81435B8 + ldr r0, _081429B0 @ =0x0201c000 + adds r2, r0, 0 + ldr r1, _081429B4 @ =gUnknown_0840B57C + ldm r1!, {r3-r5} + stm r2!, {r3-r5} + ldm r1!, {r3,r5} + stm r2!, {r3,r5} + bl sub_80C5CD4 + ldr r1, _081429B8 @ =gMain + ldr r4, _081429BC @ =0x0000043c + adds r1, r4 + b _081429DC + .align 2, 0 +_081429AC: .4byte REG_BLDCNT +_081429B0: .4byte 0x0201c000 +_081429B4: .4byte gUnknown_0840B57C +_081429B8: .4byte gMain +_081429BC: .4byte 0x0000043c +_081429C0: + bl AnimateSprites + bl BuildOamBuffer + bl UpdatePaletteFade + bl sub_80C5DCC + lsls r0, 24 + cmp r0, 0 + beq _08142A12 + ldr r1, _081429E4 @ =gMain + ldr r5, _081429E8 @ =0x0000043c + adds r1, r5 +_081429DC: + ldrb r0, [r1] + adds r0, 0x1 + strb r0, [r1] + b _08142A12 + .align 2, 0 +_081429E4: .4byte gMain +_081429E8: .4byte 0x0000043c +_081429EC: + ldr r1, _08142A18 @ =REG_BLDCNT + ldr r2, _08142A1C @ =0x00003f42 + adds r0, r2, 0 + strh r0, [r1] + adds r1, 0x2 + movs r3, 0xE2 + lsls r3, 3 + adds r0, r3, 0 + strh r0, [r1] + adds r1, 0x2 + movs r0, 0 + strh r0, [r1] + ldr r0, _08142A20 @ =sub_8142A28 + movs r1, 0 + bl CreateTask + ldr r0, _08142A24 @ =sub_8141E4C + bl SetMainCallback2 +_08142A12: + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_08142A18: .4byte REG_BLDCNT +_08142A1C: .4byte 0x00003f42 +_08142A20: .4byte sub_8142A28 +_08142A24: .4byte sub_8141E4C + thumb_func_end sub_81428CC + + thumb_func_start sub_8142A28 +sub_8142A28: @ 8142A28 + push {r4-r7,lr} + lsls r0, 24 + lsrs r5, r0, 24 + movs r0, 0x3 + bl sub_8125EC8 + lsls r0, 24 + lsrs r0, 24 + cmp r0, 0x1 + beq _08142A54 + ldr r0, _08142A4C @ =gTasks + lsls r1, r5, 2 + adds r1, r5 + lsls r1, 3 + adds r1, r0 + ldr r0, _08142A50 @ =sub_8142FEC + str r0, [r1] + b _08142AEA + .align 2, 0 +_08142A4C: .4byte gTasks +_08142A50: .4byte sub_8142FEC +_08142A54: + ldr r2, _08142A8C @ =0x0201e000 + movs r3, 0 + ldrh r1, [r2, 0x8] + ldr r4, _08142A90 @ =0x000001ff + adds r0, r4, 0 + ands r0, r1 + ldr r7, _08142A94 @ =gTasks + lsls r6, r5, 2 + cmp r0, 0 + beq _08142A7E +_08142A68: + adds r0, r3, 0x1 + lsls r0, 16 + lsrs r3, r0, 16 + adds r2, 0x78 + cmp r3, 0x31 + bhi _08142A98 + ldrh r1, [r2, 0x8] + adds r0, r4, 0 + ands r0, r1 + cmp r0, 0 + bne _08142A68 +_08142A7E: + cmp r3, 0x31 + bhi _08142A98 + adds r0, r6, r5 + lsls r0, 3 + adds r0, r7 + subs r1, r3, 0x1 + b _08142AA0 + .align 2, 0 +_08142A8C: .4byte 0x0201e000 +_08142A90: .4byte 0x000001ff +_08142A94: .4byte gTasks +_08142A98: + adds r0, r6, r5 + lsls r0, 3 + adds r0, r7 + movs r1, 0x31 +_08142AA0: + strh r1, [r0, 0x8] + movs r0, 0xA + bl sub_8053108 + ldr r2, _08142AF0 @ =gTasks + adds r1, r6, r5 + lsls r1, 3 + adds r1, r2 + strh r0, [r1, 0xA] + movs r3, 0 + ldr r7, _08142AF4 @ =0x0600381a + ldr r4, _08142AF8 @ =0x0600385a +_08142AB8: + lsls r1, r3, 1 + adds r2, r1, r7 + adds r0, r3, 0x3 + strh r0, [r2] + adds r1, r4 + adds r0, 0x11 + strh r0, [r1] + adds r0, r3, 0x1 + lsls r0, 16 + lsrs r3, r0, 16 + cmp r3, 0x10 + bls _08142AB8 + ldr r4, _08142AFC @ =gWindowConfig_81E7198 + adds r0, r4, 0 + bl SetUpWindowConfig + adds r0, r4, 0 + bl InitMenuWindow + ldr r1, _08142AF0 @ =gTasks + adds r0, r6, r5 + lsls r0, 3 + adds r0, r1 + ldr r1, _08142B00 @ =sub_8142B04 + str r1, [r0] +_08142AEA: + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08142AF0: .4byte gTasks +_08142AF4: .4byte 0x0600381a +_08142AF8: .4byte 0x0600385a +_08142AFC: .4byte gWindowConfig_81E7198 +_08142B00: .4byte sub_8142B04 + thumb_func_end sub_8142A28 + + thumb_func_start sub_8142B04 +sub_8142B04: @ 8142B04 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0x10 + lsls r0, 24 + lsrs r0, 24 + mov r8, r0 + ldr r3, _08142BB8 @ =0x0201e000 + movs r5, 0 + ldr r1, _08142BBC @ =gTasks + lsls r0, 2 + add r0, r8 + lsls r0, 3 + adds r0, r1 + movs r2, 0x8 + ldrsh r0, [r0, r2] + adds r6, r1, 0 + ldr r2, _08142BC0 @ =gUnknown_0203931C + cmp r5, r0 + bge _08142B3E + adds r1, r0, 0 +_08142B32: + adds r3, 0x78 + adds r0, r5, 0x1 + lsls r0, 16 + lsrs r5, r0, 16 + cmp r5, r1 + blt _08142B32 +_08142B3E: + adds r4, r3, 0 + movs r0, 0 + str r0, [r2] + mov r5, r8 + lsls r2, r5, 2 + adds r1, r2, r5 + lsls r1, 3 + adds r1, r6 + strh r0, [r1, 0xC] + strh r0, [r1, 0x10] + movs r5, 0 + str r2, [sp, 0xC] + ldr r6, _08142BC4 @ =0x000001ff + adds r2, r1, 0 +_08142B5A: + ldrh r1, [r4, 0x8] + adds r0, r6, 0 + ands r0, r1 + cmp r0, 0 + beq _08142B6A + ldrh r0, [r2, 0x10] + adds r0, 0x1 + strh r0, [r2, 0x10] +_08142B6A: + adds r0, r5, 0x1 + lsls r0, 16 + lsrs r5, r0, 16 + adds r4, 0x14 + cmp r5, 0x5 + bls _08142B5A + adds r4, r3, 0 + movs r5, 0 + ldr r1, _08142BBC @ =gTasks + ldr r0, [sp, 0xC] + add r0, r8 + lsls r7, r0, 3 + adds r6, r7, r1 + str r6, [sp, 0x8] + adds r1, 0x8 + mov r9, r1 + ldr r0, _08142BC8 @ =gUnknown_0840B564 + mov r10, r0 +_08142B8E: + ldrh r1, [r4, 0x8] + ldr r2, _08142BC4 @ =0x000001ff + adds r0, r2, 0 + ands r0, r1 + adds r6, r1, 0 + cmp r0, 0 + beq _08142C30 + ldr r1, [sp, 0x8] + movs r2, 0x10 + ldrsh r0, [r1, r2] + cmp r0, 0x3 + ble _08142BD4 + lsls r1, r5, 3 + ldr r0, _08142BCC @ =gUnknown_0840B534 + adds r0, 0x4 + adds r0, r1, r0 + ldrh r3, [r0] + ldr r0, _08142BD0 @ =gUnknown_0840B53A + adds r1, r0 + b _08142BE2 + .align 2, 0 +_08142BB8: .4byte 0x0201e000 +_08142BBC: .4byte gTasks +_08142BC0: .4byte gUnknown_0203931C +_08142BC4: .4byte 0x000001ff +_08142BC8: .4byte gUnknown_0840B564 +_08142BCC: .4byte gUnknown_0840B534 +_08142BD0: .4byte gUnknown_0840B53A +_08142BD4: + lsls r1, r5, 3 + mov r0, r10 + adds r0, 0x4 + adds r0, r1, r0 + ldrh r3, [r0] + ldr r2, _08142C28 @ =gUnknown_0840B56A + adds r1, r2 +_08142BE2: + ldrh r2, [r1] + lsls r0, r6, 23 + lsrs r0, 23 + lsls r1, r3, 16 + asrs r1, 16 + lsls r2, 16 + asrs r2, 16 + ldr r3, [r4] + str r3, [sp] + ldr r3, [r4, 0x4] + str r3, [sp, 0x4] + adds r3, r5, 0 + bl sub_81436BC + lsls r0, 16 + lsrs r0, 16 + ldr r2, _08142C2C @ =gSprites + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r2 + ldrb r3, [r1, 0x5] + movs r6, 0xD + negs r6, r6 + adds r2, r6, 0 + ands r3, r2 + movs r2, 0x4 + orrs r3, r2 + strb r3, [r1, 0x5] + adds r1, r5, 0x5 + lsls r1, 1 + adds r1, r7 + add r1, r9 + strh r0, [r1] + b _08142C3C + .align 2, 0 +_08142C28: .4byte gUnknown_0840B56A +_08142C2C: .4byte gSprites +_08142C30: + adds r0, r5, 0x5 + lsls r0, 1 + adds r0, r7 + add r0, r9 + movs r1, 0xFF + strh r1, [r0] +_08142C3C: + adds r0, r5, 0x1 + lsls r0, 16 + lsrs r5, r0, 16 + adds r4, 0x14 + cmp r5, 0x5 + bls _08142B8E + ldr r0, _08142CB0 @ =0xffff0000 + ldr r2, _08142CB4 @ =0x0000735f + movs r1, 0xC + bl BlendPalettes + ldr r3, _08142CB8 @ =gStringVar1 + ldr r1, _08142CBC @ =gMenuText_HOFNumber + adds r0, r3, 0 + bl StringCopy + adds r3, r0, 0 + movs r5, 0xFC + strb r5, [r3] + movs r0, 0x14 + strb r0, [r3, 0x1] + movs r0, 0x6 + strb r0, [r3, 0x2] + adds r3, 0x3 + ldr r0, _08142CC0 @ =gTasks + ldr r4, [sp, 0xC] + add r4, r8 + lsls r4, 3 + adds r4, r0 + movs r0, 0xA + ldrsh r1, [r4, r0] + adds r0, r3, 0 + bl ConvertIntToDecimalString + adds r3, r0, 0 + strb r5, [r3] + movs r0, 0x13 + strb r0, [r3, 0x1] + movs r0, 0xF0 + strb r0, [r3, 0x2] + movs r0, 0xFF + strb r0, [r3, 0x3] + ldr r0, _08142CB8 @ =gStringVar1 + movs r1, 0 + movs r2, 0 + bl MenuPrint + ldr r0, _08142CC4 @ =sub_8142CC8 + str r0, [r4] + add sp, 0x10 + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08142CB0: .4byte 0xffff0000 +_08142CB4: .4byte 0x0000735f +_08142CB8: .4byte gStringVar1 +_08142CBC: .4byte gMenuText_HOFNumber +_08142CC0: .4byte gTasks +_08142CC4: .4byte sub_8142CC8 + thumb_func_end sub_8142B04 + + thumb_func_start sub_8142CC8 +sub_8142CC8: @ 8142CC8 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + lsls r0, 24 + lsrs r4, r0, 24 + ldr r0, _08142DD0 @ =0x0201e000 + mov r8, r0 + movs r3, 0 + ldr r1, _08142DD4 @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r0, r1 + movs r2, 0x8 + ldrsh r0, [r0, r2] + cmp r3, r0 + bge _08142CFE + adds r1, r0, 0 +_08142CF0: + movs r0, 0x78 + add r8, r0 + adds r0, r3, 0x1 + lsls r0, 16 + lsrs r3, r0, 16 + cmp r3, r1 + blt _08142CF0 +_08142CFE: + movs r3, 0 + lsls r6, r4, 2 + adds r0, r6, r4 + lsls r5, r0, 3 + ldr r1, _08142DD8 @ =gTasks + 0x8 + mov r10, r1 + ldr r2, _08142DDC @ =gSprites + mov r12, r2 + movs r0, 0xD + negs r0, r0 + mov r9, r0 + movs r7, 0x4 +_08142D16: + adds r0, r3, 0x5 + lsls r0, 1 + adds r0, r5 + add r0, r10 + ldrh r1, [r0] + cmp r1, 0xFF + beq _08142D36 + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + add r0, r12 + ldrb r2, [r0, 0x5] + mov r1, r9 + ands r1, r2 + orrs r1, r7 + strb r1, [r0, 0x5] +_08142D36: + adds r0, r3, 0x1 + lsls r0, 16 + lsrs r3, r0, 16 + cmp r3, 0x5 + bls _08142D16 + adds r1, r6, r4 + lsls r1, 3 + ldr r2, _08142DD4 @ =gTasks + adds r5, r1, r2 + movs r2, 0xC + ldrsh r0, [r5, r2] + adds r0, 0x5 + lsls r0, 1 + adds r0, r1 + ldr r1, _08142DD4 @ =gTasks + adds r1, 0x8 + adds r0, r1 + ldrh r1, [r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + ldr r1, _08142DDC @ =gSprites + adds r0, r1 + ldrb r2, [r0, 0x5] + movs r1, 0xD + negs r1, r1 + ands r1, r2 + strb r1, [r0, 0x5] + lsrs r1, 4 + movs r0, 0x80 + lsls r0, 9 + lsls r0, r1 + ldr r1, _08142DE0 @ =0xffff0000 + eors r0, r1 + ldr r2, _08142DE4 @ =gUnknown_0203931C + str r0, [r2] + ldr r2, _08142DE8 @ =0x0000735f + movs r1, 0xC + bl BlendPalettesUnfaded + movs r0, 0xC + ldrsh r1, [r5, r0] + lsls r0, r1, 2 + adds r0, r1 + lsls r0, 2 + mov r1, r8 + adds r4, r1, r0 + ldrh r1, [r4, 0x8] + ldr r0, _08142DEC @ =0x000001ff + ands r0, r1 + movs r1, 0xCE + lsls r1, 1 + cmp r0, r1 + beq _08142DB2 + bl StopCryAndClearCrySongs + ldrh r0, [r4, 0x8] + lsls r0, 23 + lsrs r0, 23 + movs r1, 0 + bl PlayCry1 +_08142DB2: + adds r0, r4, 0 + movs r1, 0 + movs r2, 0xE + bl sub_8143088 + ldr r0, _08142DF0 @ =sub_8142DF4 + str r0, [r5] + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08142DD0: .4byte 0x0201e000 +_08142DD4: .4byte gTasks +_08142DD8: .4byte gTasks + 0x8 +_08142DDC: .4byte gSprites +_08142DE0: .4byte 0xffff0000 +_08142DE4: .4byte gUnknown_0203931C +_08142DE8: .4byte 0x0000735f +_08142DEC: .4byte 0x000001ff +_08142DF0: .4byte sub_8142DF4 + thumb_func_end sub_8142CC8 + + thumb_func_start sub_8142DF4 +sub_8142DF4: @ 8142DF4 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + lsls r0, 24 + lsrs r6, r0, 24 + ldr r1, _08142E88 @ =gMain + ldrh r2, [r1, 0x2E] + movs r0, 0x1 + ands r0, r2 + adds r3, r1, 0 + cmp r0, 0 + beq _08142EC4 + ldr r7, _08142E8C @ =gTasks + lsls r0, r6, 2 + adds r1, r0, r6 + lsls r3, r1, 3 + adds r4, r3, r7 + ldrh r2, [r4, 0x8] + movs r5, 0x8 + ldrsh r1, [r4, r5] + mov r8, r0 + cmp r1, 0 + beq _08142E98 + subs r0, r2, 0x1 + strh r0, [r4, 0x8] + movs r5, 0 + adds r7, 0x8 + mov r9, r7 + adds r7, r3, 0 +_08142E30: + adds r0, r5, 0x5 + lsls r0, 1 + adds r0, r7 + add r0, r9 + ldrb r1, [r0] + cmp r1, 0xFF + beq _08142E5E + ldr r0, _08142E90 @ =gSprites + lsls r4, r1, 4 + adds r4, r1 + lsls r4, 2 + adds r4, r0 + ldrb r0, [r4, 0x5] + lsrs r0, 4 + bl GetSpritePaletteTagByPaletteNum + lsls r0, 16 + lsrs r0, 16 + bl FreeSpritePaletteByTag + adds r0, r4, 0 + bl DestroySprite +_08142E5E: + adds r0, r5, 0x1 + lsls r0, 16 + lsrs r5, r0, 16 + cmp r5, 0x5 + bls _08142E30 + ldr r0, _08142E8C @ =gTasks + mov r2, r8 + adds r1, r2, r6 + lsls r1, 3 + adds r1, r0 + ldrh r2, [r1, 0xA] + movs r3, 0xA + ldrsh r0, [r1, r3] + cmp r0, 0 + beq _08142E80 + subs r0, r2, 0x1 + strh r0, [r1, 0xA] +_08142E80: + ldr r0, _08142E94 @ =sub_8142B04 + str r0, [r1] + b _08142F64 + .align 2, 0 +_08142E88: .4byte gMain +_08142E8C: .4byte gTasks +_08142E90: .4byte gSprites +_08142E94: .4byte sub_8142B04 +_08142E98: + bl IsCryPlayingOrClearCrySongs + lsls r0, 24 + cmp r0, 0 + beq _08142EB2 + bl StopCryAndClearCrySongs + ldr r0, _08142EB8 @ =gMPlay_BGM + ldr r1, _08142EBC @ =0x0000ffff + movs r2, 0x80 + lsls r2, 1 + bl m4aMPlayVolumeControl +_08142EB2: + ldr r0, _08142EC0 @ =sub_8142F78 + str r0, [r4] + b _08142F64 + .align 2, 0 +_08142EB8: .4byte gMPlay_BGM +_08142EBC: .4byte 0x0000ffff +_08142EC0: .4byte sub_8142F78 +_08142EC4: + movs r0, 0x2 + ands r0, r2 + cmp r0, 0 + beq _08142F08 + bl IsCryPlayingOrClearCrySongs + lsls r0, 24 + cmp r0, 0 + beq _08142EE6 + bl StopCryAndClearCrySongs + ldr r0, _08142EF8 @ =gMPlay_BGM + ldr r1, _08142EFC @ =0x0000ffff + movs r2, 0x80 + lsls r2, 1 + bl m4aMPlayVolumeControl +_08142EE6: + ldr r0, _08142F00 @ =gTasks + lsls r1, r6, 2 + adds r1, r6 + lsls r1, 3 + adds r1, r0 + ldr r0, _08142F04 @ =sub_8142F78 + str r0, [r1] + b _08142F64 + .align 2, 0 +_08142EF8: .4byte gMPlay_BGM +_08142EFC: .4byte 0x0000ffff +_08142F00: .4byte gTasks +_08142F04: .4byte sub_8142F78 +_08142F08: + movs r0, 0x40 + ands r0, r2 + cmp r0, 0 + beq _08142F38 + ldr r0, _08142F30 @ =gTasks + lsls r1, r6, 2 + adds r1, r6 + lsls r1, 3 + adds r1, r0 + ldrh r2, [r1, 0xC] + movs r4, 0xC + ldrsh r0, [r1, r4] + cmp r0, 0 + beq _08142F38 + subs r0, r2, 0x1 + strh r0, [r1, 0xC] + ldr r0, _08142F34 @ =sub_8142CC8 + str r0, [r1] + b _08142F64 + .align 2, 0 +_08142F30: .4byte gTasks +_08142F34: .4byte sub_8142CC8 +_08142F38: + ldrh r1, [r3, 0x2E] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + beq _08142F64 + ldr r1, _08142F70 @ =gTasks + lsls r0, r6, 2 + adds r0, r6 + lsls r0, 3 + adds r2, r0, r1 + movs r5, 0xC + ldrsh r1, [r2, r5] + movs r3, 0x10 + ldrsh r0, [r2, r3] + subs r0, 0x1 + cmp r1, r0 + bge _08142F64 + ldrh r0, [r2, 0xC] + adds r0, 0x1 + strh r0, [r2, 0xC] + ldr r0, _08142F74 @ =sub_8142CC8 + str r0, [r2] +_08142F64: + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08142F70: .4byte gTasks +_08142F74: .4byte sub_8142CC8 + thumb_func_end sub_8142DF4 + + thumb_func_start sub_8142F78 +sub_8142F78: @ 8142F78 + push {r4-r6,lr} + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + ldr r0, _08142FB4 @ =gPlttBufferFaded + ldr r1, _08142FB8 @ =gPlttBufferUnfaded + movs r2, 0x80 + lsls r2, 2 + bl CpuSet + ldr r0, _08142FBC @ =0x0201c000 + adds r2, r0, 0 + ldr r1, _08142FC0 @ =gUnknown_0840B57C + ldm r1!, {r3,r5,r6} + stm r2!, {r3,r5,r6} + ldm r1!, {r3,r5} + stm r2!, {r3,r5} + bl sub_80C5E38 + ldr r1, _08142FC4 @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r0, r1 + ldr r1, _08142FC8 @ =sub_8142FCC + str r1, [r0] + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_08142FB4: .4byte gPlttBufferFaded +_08142FB8: .4byte gPlttBufferUnfaded +_08142FBC: .4byte 0x0201c000 +_08142FC0: .4byte gUnknown_0840B57C +_08142FC4: .4byte gTasks +_08142FC8: .4byte sub_8142FCC + thumb_func_end sub_8142F78 + + thumb_func_start sub_8142FCC +sub_8142FCC: @ 8142FCC + push {r4,lr} + lsls r0, 24 + lsrs r4, r0, 24 + bl sub_80C5F98 + lsls r0, 24 + cmp r0, 0 + beq _08142FE6 + adds r0, r4, 0 + bl DestroyTask + bl ReturnFromHallOfFamePC +_08142FE6: + pop {r4} + pop {r0} + bx r0 + thumb_func_end sub_8142FCC + + thumb_func_start sub_8142FEC +sub_8142FEC: @ 8142FEC + push {r4,lr} + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + movs r0, 0x2 + movs r1, 0xE + movs r2, 0x1B + movs r3, 0x13 + bl MenuDrawTextWindow + ldr r0, _08143020 @ =gMenuText_HOFCorrupt + movs r1, 0x3 + movs r2, 0xF + bl MenuPrintMessage + ldr r1, _08143024 @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r0, r1 + ldr r1, _08143028 @ =sub_814302C + str r1, [r0] + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08143020: .4byte gMenuText_HOFCorrupt +_08143024: .4byte gTasks +_08143028: .4byte sub_814302C + thumb_func_end sub_8142FEC + + thumb_func_start sub_814302C +sub_814302C: @ 814302C + push {r4,lr} + lsls r0, 24 + lsrs r4, r0, 24 + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + beq _08143056 + ldr r0, _0814305C @ =gMain + ldrh r1, [r0, 0x2E] + movs r0, 0x1 + ands r0, r1 + cmp r0, 0 + beq _08143056 + ldr r0, _08143060 @ =gTasks + lsls r1, r4, 2 + adds r1, r4 + lsls r1, 3 + adds r1, r0 + ldr r0, _08143064 @ =sub_8142F78 + str r0, [r1] +_08143056: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_0814305C: .4byte gMain +_08143060: .4byte gTasks +_08143064: .4byte sub_8142F78 + thumb_func_end sub_814302C + + thumb_func_start sub_8143068 +sub_8143068: @ 8143068 + push {lr} + lsls r2, r1, 24 + ldr r0, _08143084 @ =gMenuText_WelcomeToHOFAndDexRating + movs r1, 0x80 + lsls r1, 17 + adds r2, r1 + lsrs r2, 24 + movs r1, 0 + movs r3, 0xF0 + bl sub_8072BD8 + pop {r0} + bx r0 + .align 2, 0 +_08143084: .4byte gMenuText_WelcomeToHOFAndDexRating + thumb_func_end sub_8143068 + + thumb_func_start sub_8143088 +sub_8143088: @ 8143088 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0x14 + mov r9, r0 + lsls r1, 24 + lsrs r1, 24 + mov r8, r1 + lsls r2, 24 + lsrs r2, 24 + mov r10, r2 + ldr r7, _08143188 @ =gStringVar1 + movs r0, 0xFC + strb r0, [r7] + movs r0, 0x13 + strb r0, [r7, 0x1] + movs r0, 0x28 + strb r0, [r7, 0x2] + movs r0, 0xFF + strb r0, [r7, 0x3] + mov r0, r9 + ldrh r2, [r0, 0x8] + ldr r0, _0814318C @ =0x000001ff + ands r0, r2 + movs r1, 0xCE + lsls r1, 1 + cmp r0, r1 + beq _081430EA + lsls r0, r2, 23 + lsrs r0, 23 + bl SpeciesToPokedexNum + lsls r0, 16 + lsrs r6, r0, 16 + ldr r0, _08143190 @ =0x0000ffff + cmp r6, r0 + beq _081430EA + ldr r1, _08143194 @ =gOtherText_Number2 + adds r0, r7, 0 + bl StringCopy + adds r7, r0, 0 + adds r1, r6, 0 + movs r2, 0x2 + movs r3, 0x3 + bl ConvertIntToDecimalStringN +_081430EA: + ldr r5, _08143188 @ =gStringVar1 + mov r1, r8 + adds r1, 0x4 + lsls r1, 24 + lsrs r1, 24 + mov r4, r10 + adds r4, 0x1 + lsls r2, r4, 24 + lsrs r2, 24 + adds r0, r5, 0 + bl MenuPrint + adds r7, r5, 0 + movs r3, 0 + mov r1, r9 + ldrb r0, [r1, 0xA] + str r4, [sp] + mov r2, r8 + adds r2, 0x9 + str r2, [sp, 0xC] + mov r6, r10 + adds r6, 0x3 + str r6, [sp, 0x8] + cmp r0, 0xFF + beq _0814313A + mov r2, r9 + adds r2, 0xA +_08143120: + adds r1, r7, r3 + adds r0, r2, r3 + ldrb r0, [r0] + strb r0, [r1] + adds r0, r3, 0x1 + lsls r0, 16 + lsrs r3, r0, 16 + cmp r3, 0x9 + bhi _0814313A + adds r0, r2, r3 + ldrb r0, [r0] + cmp r0, 0xFF + bne _08143120 +_0814313A: + adds r7, r3 + movs r2, 0xFF + strb r2, [r7] + mov r1, r9 + ldrh r0, [r1, 0x8] + ldr r1, _0814318C @ =0x000001ff + ands r1, r0 + movs r0, 0xCE + lsls r0, 1 + cmp r1, r0 + bne _08143198 + movs r0, 0xFC + strb r0, [r7] + movs r0, 0x13 + strb r0, [r7, 0x1] + movs r0, 0xA0 + strb r0, [r7, 0x2] + strb r2, [r7, 0x3] + ldr r0, _08143188 @ =gStringVar1 + ldr r2, [sp, 0xC] + lsls r1, r2, 24 + lsrs r1, 24 + ldr r3, [sp] + lsls r2, r3, 24 + lsrs r2, 24 + bl MenuPrint + ldr r6, [sp, 0x8] + lsls r1, r6, 24 + lsrs r1, 24 + mov r3, r10 + adds r3, 0x4 + lsls r3, 24 + lsrs r3, 24 + movs r0, 0 + movs r2, 0x1D + bl MenuZeroFillWindowRect + b _081432E4 + .align 2, 0 +_08143188: .4byte gStringVar1 +_0814318C: .4byte 0x000001ff +_08143190: .4byte 0x0000ffff +_08143194: .4byte gOtherText_Number2 +_08143198: + movs r0, 0xFC + strb r0, [r7] + movs r0, 0x13 + strb r0, [r7, 0x1] + movs r0, 0x3E + strb r0, [r7, 0x2] + adds r7, 0x3 + movs r0, 0xBA + strb r0, [r7] + adds r7, 0x1 + movs r3, 0 + ldr r2, _08143238 @ =gSpeciesNames + mov r1, r9 + ldrh r0, [r1, 0x8] + lsls r0, 23 + lsrs r0, 23 + movs r1, 0xB + muls r0, r1 + adds r0, r2 + ldrb r0, [r0] + mov r6, r8 + adds r6, 0x7 + str r6, [sp, 0x4] + mov r1, r8 + adds r1, 0xD + str r1, [sp, 0x10] + cmp r0, 0xFF + beq _08143204 + adds r5, r2, 0 + movs r4, 0xB +_081431D4: + adds r1, r7, r3 + mov r6, r9 + ldrh r0, [r6, 0x8] + lsls r0, 23 + lsrs r0, 23 + muls r0, r4 + adds r0, r3, r0 + adds r0, r5 + ldrb r0, [r0] + strb r0, [r1] + adds r0, r3, 0x1 + lsls r0, 16 + lsrs r3, r0, 16 + cmp r3, 0x9 + bhi _08143204 + ldrh r0, [r6, 0x8] + lsls r0, 23 + lsrs r0, 23 + muls r0, r4 + adds r0, r3, r0 + adds r0, r2 + ldrb r0, [r0] + cmp r0, 0xFF + bne _081431D4 +_08143204: + adds r7, r3 + movs r0, 0 + strb r0, [r7] + adds r7, 0x1 + mov r1, r9 + ldrh r0, [r1, 0x8] + ldr r1, _0814323C @ =0x000001ff + ands r1, r0 + cmp r1, 0x20 + beq _0814324A + cmp r1, 0x1D + beq _0814324A + lsls r0, 23 + lsrs r0, 23 + mov r2, r9 + ldr r1, [r2, 0x4] + bl GetGenderFromSpeciesAndPersonality + lsls r0, 24 + lsrs r0, 24 + cmp r0, 0 + beq _08143240 + cmp r0, 0xFE + beq _08143244 + b _0814324A + .align 2, 0 +_08143238: .4byte gSpeciesNames +_0814323C: .4byte 0x000001ff +_08143240: + movs r0, 0xB5 + b _08143246 +_08143244: + movs r0, 0xB6 +_08143246: + strb r0, [r7] + adds r7, 0x1 +_0814324A: + movs r4, 0xFC + strb r4, [r7] + movs r3, 0x13 + mov r8, r3 + strb r3, [r7, 0x1] + movs r0, 0xA0 + strb r0, [r7, 0x2] + movs r6, 0xFF + mov r10, r6 + strb r6, [r7, 0x3] + ldr r5, _081432F4 @ =gStringVar1 + ldr r0, [sp, 0xC] + lsls r1, r0, 24 + lsrs r1, 24 + ldr r3, [sp] + lsls r2, r3, 24 + lsrs r2, 24 + adds r0, r5, 0 + bl MenuPrint + mov r6, r9 + ldrb r0, [r6, 0x9] + lsrs r6, r0, 1 + ldr r1, _081432F8 @ =gOtherText_Level3 + adds r0, r5, 0 + bl StringCopy + adds r7, r0, 0 + strb r4, [r7] + movs r0, 0x14 + strb r0, [r7, 0x1] + movs r0, 0x6 + strb r0, [r7, 0x2] + adds r7, 0x3 + adds r0, r7, 0 + adds r1, r6, 0 + movs r2, 0 + movs r3, 0x3 + bl ConvertIntToDecimalStringN + adds r7, r0, 0 + strb r4, [r7] + mov r0, r8 + strb r0, [r7, 0x1] + movs r0, 0x30 + strb r0, [r7, 0x2] + mov r1, r10 + strb r1, [r7, 0x3] + ldr r2, [sp, 0x4] + lsls r1, r2, 24 + lsrs r1, 24 + ldr r3, [sp, 0x8] + lsls r4, r3, 24 + lsrs r4, 24 + adds r0, r5, 0 + adds r2, r4, 0 + bl MenuPrint + mov r0, r9 + ldrh r6, [r0] + ldr r1, _081432FC @ =gOtherText_IDNumber + adds r0, r5, 0 + bl StringCopy + adds r7, r0, 0 + adds r1, r6, 0 + movs r2, 0x2 + movs r3, 0x5 + bl ConvertIntToDecimalStringN + ldr r2, [sp, 0x10] + lsls r1, r2, 24 + lsrs r1, 24 + adds r0, r5, 0 + adds r2, r4, 0 + bl MenuPrint +_081432E4: + add sp, 0x14 + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_081432F4: .4byte gStringVar1 +_081432F8: .4byte gOtherText_Level3 +_081432FC: .4byte gOtherText_IDNumber + thumb_func_end sub_8143088 + + thumb_func_start sub_8143300 +sub_8143300: @ 8143300 + push {r4-r6,lr} + mov r6, r10 + mov r5, r9 + mov r4, r8 + push {r4-r6} + adds r5, r0, 0 + adds r4, r1, 0 + lsls r5, 24 + lsls r4, 24 + ldr r0, _081433CC @ =gOtherText_Name + lsrs r1, r5, 24 + mov r8, r1 + movs r2, 0x80 + lsls r2, 17 + adds r5, r2 + lsrs r5, 24 + lsrs r6, r4, 24 + adds r4, r2 + lsrs r4, 24 + adds r1, r5, 0 + adds r2, r4, 0 + bl MenuPrint + ldr r0, _081433D0 @ =gSaveBlock2 + mov r10, r0 + movs r1, 0xE + add r8, r1 + mov r2, r8 + lsls r2, 24 + lsrs r2, 24 + mov r8, r2 + mov r1, r8 + adds r2, r4, 0 + bl MenuPrint_RightAligned + ldr r0, _081433D4 @ =gOtherText_IDNumber2 + adds r4, r6, 0x3 + lsls r4, 24 + lsrs r4, 24 + adds r1, r5, 0 + adds r2, r4, 0 + bl MenuPrint + mov r0, r10 + ldrb r1, [r0, 0xA] + ldrb r0, [r0, 0xB] + lsls r0, 8 + orrs r1, r0 + ldr r2, _081433D8 @ =gStringVar1 + mov r9, r2 + mov r0, r9 + movs r2, 0x2 + movs r3, 0x5 + bl ConvertIntToDecimalStringN + mov r0, r9 + mov r1, r8 + adds r2, r4, 0 + bl MenuPrint_RightAligned + ldr r0, _081433DC @ =gMainMenuString_Time + adds r6, 0x5 + lsls r6, 24 + lsrs r6, 24 + adds r1, r5, 0 + adds r2, r6, 0 + bl MenuPrint + mov r0, r10 + ldrh r1, [r0, 0xE] + mov r0, r9 + bl ConvertIntToDecimalString + adds r2, r0, 0 + movs r1, 0 + strb r1, [r2] + movs r0, 0xF0 + strb r0, [r2, 0x1] + strb r1, [r2, 0x2] + adds r2, 0x3 + mov r0, r10 + ldrb r1, [r0, 0x10] + adds r0, r2, 0 + movs r2, 0x2 + movs r3, 0x2 + bl ConvertIntToDecimalStringN + adds r2, r0, 0 + movs r0, 0xFF + strb r0, [r2] + mov r0, r9 + mov r1, r8 + adds r2, r6, 0 + bl MenuPrint_RightAligned + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_081433CC: .4byte gOtherText_Name +_081433D0: .4byte gSaveBlock2 +_081433D4: .4byte gOtherText_IDNumber2 +_081433D8: .4byte gStringVar1 +_081433DC: .4byte gMainMenuString_Time + thumb_func_end sub_8143300 + + thumb_func_start sub_81433E0 +sub_81433E0: @ 81433E0 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + sub sp, 0x8 + movs r0, 0x80 + lsls r0, 19 + movs r1, 0 + strh r1, [r0] + adds r0, 0x8 + strh r1, [r0] + adds r0, 0x8 + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + subs r0, 0x8 + strh r1, [r0] + adds r0, 0xA + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + subs r0, 0xA + strh r1, [r0] + adds r0, 0xC + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + subs r0, 0xC + strh r1, [r0] + adds r0, 0xE + strh r1, [r0] + adds r0, 0x2 + strh r1, [r0] + movs r3, 0xC0 + lsls r3, 19 + movs r4, 0xC0 + lsls r4, 9 + add r0, sp, 0x4 + mov r8, r0 + ldr r1, _0814354C @ =gHallOfFame_Gfx + mov r9, r1 + mov r2, sp + movs r6, 0 + ldr r1, _08143550 @ =0x040000d4 + movs r5, 0x80 + lsls r5, 5 + ldr r7, _08143554 @ =0x81000800 + movs r0, 0x81 + lsls r0, 24 + mov r12, r0 +_08143444: + strh r6, [r2] + mov r0, sp + str r0, [r1] + str r3, [r1, 0x4] + str r7, [r1, 0x8] + ldr r0, [r1, 0x8] + adds r3, r5 + subs r4, r5 + cmp r4, r5 + bhi _08143444 + strh r6, [r2] + mov r2, sp + str r2, [r1] + str r3, [r1, 0x4] + lsrs r0, r4, 1 + mov r2, r12 + orrs r0, r2 + str r0, [r1, 0x8] + ldr r0, [r1, 0x8] + movs r0, 0xE0 + lsls r0, 19 + movs r3, 0x80 + lsls r3, 3 + movs r4, 0 + str r4, [sp, 0x4] + ldr r2, _08143550 @ =0x040000d4 + mov r1, r8 + str r1, [r2] + str r0, [r2, 0x4] + lsrs r0, r3, 2 + movs r1, 0x85 + lsls r1, 24 + orrs r0, r1 + str r0, [r2, 0x8] + ldr r0, [r2, 0x8] + movs r1, 0xA0 + lsls r1, 19 + mov r0, sp + strh r4, [r0] + str r0, [r2] + str r1, [r2, 0x4] + lsrs r3, 1 + movs r0, 0x81 + lsls r0, 24 + orrs r3, r0 + str r3, [r2, 0x8] + ldr r0, [r2, 0x8] + movs r1, 0xC0 + lsls r1, 19 + mov r0, r9 + bl LZ77UnCompVram + movs r1, 0 + ldr r3, _08143558 @ =0x06003800 + movs r2, 0x1 +_081434B2: + lsls r0, r1, 1 + adds r0, r3 + strh r2, [r0] + adds r0, r1, 0x1 + lsls r0, 16 + lsrs r1, r0, 16 + cmp r1, 0x3F + bls _081434B2 + movs r1, 0 + ldr r5, _0814355C @ =0x02000000 + ldr r3, _08143560 @ =0x06003b80 + movs r2, 0x1 +_081434CA: + lsls r0, r1, 1 + adds r0, r3 + strh r2, [r0] + adds r0, r1, 0x1 + lsls r0, 16 + lsrs r1, r0, 16 + cmp r1, 0xBF + bls _081434CA + movs r1, 0 + ldr r4, _08143564 @ =0x06003000 + movs r3, 0x2 + ldr r2, _08143568 @ =0x000003ff +_081434E2: + lsls r0, r1, 1 + adds r0, r4 + strh r3, [r0] + adds r0, r1, 0x1 + lsls r0, 16 + lsrs r1, r0, 16 + cmp r1, r2 + bls _081434E2 + adds r2, r5, 0 + movs r3, 0x80 + lsls r3, 7 + mov r4, sp + movs r6, 0 + ldr r1, _08143550 @ =0x040000d4 + movs r5, 0x80 + lsls r5, 5 + ldr r7, _08143554 @ =0x81000800 + movs r0, 0x81 + lsls r0, 24 + mov r12, r0 +_0814350A: + strh r6, [r4] + mov r0, sp + str r0, [r1] + str r2, [r1, 0x4] + str r7, [r1, 0x8] + ldr r0, [r1, 0x8] + adds r2, r5 + subs r3, r5 + cmp r3, r5 + bhi _0814350A + strh r6, [r4] + mov r0, sp + str r0, [r1] + str r2, [r1, 0x4] + lsrs r0, r3, 1 + mov r2, r12 + orrs r0, r2 + str r0, [r1, 0x8] + ldr r0, [r1, 0x8] + bl ResetPaletteFade + ldr r0, _0814356C @ =gHallOfFame_Pal + movs r1, 0 + movs r2, 0x20 + bl LoadPalette + add sp, 0x8 + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_0814354C: .4byte gHallOfFame_Gfx +_08143550: .4byte 0x040000d4 +_08143554: .4byte 0x81000800 +_08143558: .4byte 0x06003800 +_0814355C: .4byte 0x02000000 +_08143560: .4byte 0x06003b80 +_08143564: .4byte 0x06003000 +_08143568: .4byte 0x000003ff +_0814356C: .4byte gHallOfFame_Pal + thumb_func_end sub_81433E0 + + thumb_func_start sub_8143570 +sub_8143570: @ 8143570 + push {r4,lr} + bl remove_some_task + bl ResetTasks + bl ResetSpriteData + bl FreeAllSpritePalettes + ldr r1, _081435A8 @ =gReservedSpritePaletteCount + movs r0, 0x8 + strb r0, [r1] + ldr r0, _081435AC @ =gUnknown_0840B514 + bl LoadCompressedObjectPic + ldr r0, _081435B0 @ =gUnknown_0840B524 + bl LoadCompressedObjectPalette + ldr r4, _081435B4 @ =gWindowConfig_81E71B4 + adds r0, r4, 0 + bl SetUpWindowConfig + adds r0, r4, 0 + bl InitMenuWindow + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_081435A8: .4byte gReservedSpritePaletteCount +_081435AC: .4byte gUnknown_0840B514 +_081435B0: .4byte gUnknown_0840B524 +_081435B4: .4byte gWindowConfig_81E71B4 + thumb_func_end sub_8143570 + + thumb_func_start sub_81435B8 +sub_81435B8: @ 81435B8 + ldr r1, _081435D8 @ =REG_BG1CNT + movs r2, 0xE0 + lsls r2, 3 + adds r0, r2, 0 + strh r0, [r1] + adds r1, 0x4 + subs r2, 0xFD + adds r0, r2, 0 + strh r0, [r1] + subs r1, 0xE + movs r2, 0xDA + lsls r2, 5 + adds r0, r2, 0 + strh r0, [r1] + bx lr + .align 2, 0 +_081435D8: .4byte REG_BG1CNT + thumb_func_end sub_81435B8 + + thumb_func_start sub_81435DC +sub_81435DC: @ 81435DC + push {r4,lr} + adds r2, r0, 0 + ldr r1, [r2, 0x20] + ldr r0, [r2, 0x30] + cmp r1, r0 + beq _08143632 + ldrh r3, [r2, 0x20] + movs r1, 0x20 + ldrsh r0, [r2, r1] + movs r4, 0x30 + ldrsh r1, [r2, r4] + cmp r0, r1 + bge _081435FC + adds r0, r3, 0 + adds r0, 0xF + strh r0, [r2, 0x20] +_081435FC: + ldrh r3, [r2, 0x20] + movs r4, 0x20 + ldrsh r0, [r2, r4] + cmp r0, r1 + ble _0814360C + adds r0, r3, 0 + subs r0, 0xF + strh r0, [r2, 0x20] +_0814360C: + ldrh r3, [r2, 0x22] + movs r1, 0x22 + ldrsh r0, [r2, r1] + movs r4, 0x32 + ldrsh r1, [r2, r4] + cmp r0, r1 + bge _08143620 + adds r0, r3, 0 + adds r0, 0xA + strh r0, [r2, 0x22] +_08143620: + ldrh r3, [r2, 0x22] + movs r4, 0x22 + ldrsh r0, [r2, r4] + cmp r0, r1 + ble _0814363A + adds r0, r3, 0 + subs r0, 0xA + strh r0, [r2, 0x22] + b _0814363A +_08143632: + movs r0, 0x1 + strh r0, [r2, 0x2E] + ldr r0, _08143640 @ =nullsub_81 + str r0, [r2, 0x1C] +_0814363A: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08143640: .4byte nullsub_81 + thumb_func_end sub_81435DC + + thumb_func_start nullsub_81 +nullsub_81: @ 8143644 + bx lr + thumb_func_end nullsub_81 + + thumb_func_start sub_8143648 +sub_8143648: @ 8143648 + push {r4-r7,lr} + lsls r1, 24 + ldr r4, _08143670 @ =gUnknown_02024E8C + adds r3, r4, 0 + ldr r2, _08143674 @ =gUnknown_0840B6B8 + ldm r2!, {r5-r7} + stm r3!, {r5-r7} + ldm r2!, {r5-r7} + stm r3!, {r5-r7} + strh r0, [r4, 0x2] + ldr r0, _08143678 @ =gUnknown_0840B69C + lsrs r1, 22 + adds r1, r0 + ldr r0, [r1] + str r0, [r4, 0xC] + ldr r0, _0814367C @ =gSpriteAnimTable_81E7C64 + str r0, [r4, 0x8] + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08143670: .4byte gUnknown_02024E8C +_08143674: .4byte gUnknown_0840B6B8 +_08143678: .4byte gUnknown_0840B69C +_0814367C: .4byte gSpriteAnimTable_81E7C64 + thumb_func_end sub_8143648 + + thumb_func_start sub_8143680 +sub_8143680: @ 8143680 + push {r4-r7,lr} + lsls r1, 24 + ldr r4, _081436AC @ =gUnknown_02024E8C + adds r3, r4, 0 + ldr r2, _081436B0 @ =gUnknown_0840B6B8 + ldm r2!, {r5-r7} + stm r3!, {r5-r7} + ldm r2!, {r5-r7} + stm r3!, {r5-r7} + strh r0, [r4, 0x2] + ldr r0, _081436B4 @ =gUnknown_0840B69C + lsrs r1, 22 + adds r1, r0 + ldr r0, [r1] + str r0, [r4, 0xC] + ldr r0, _081436B8 @ =gUnknown_081EC2A4 + ldr r0, [r0] + str r0, [r4, 0x8] + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_081436AC: .4byte gUnknown_02024E8C +_081436B0: .4byte gUnknown_0840B6B8 +_081436B4: .4byte gUnknown_0840B69C +_081436B8: .4byte gUnknown_081EC2A4 + thumb_func_end sub_8143680 + + thumb_func_start sub_81436BC +sub_81436BC: @ 81436BC + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0x10 + adds r6, r0, 0 + mov r9, r1 + mov r10, r2 + mov r8, r3 + ldr r7, [sp, 0x34] + lsls r6, 16 + lsrs r6, 16 + mov r0, r9 + lsls r0, 16 + lsrs r0, 16 + mov r9, r0 + mov r1, r10 + lsls r1, 16 + lsrs r1, 16 + mov r10, r1 + mov r2, r8 + lsls r2, 16 + lsrs r2, 16 + mov r8, r2 + lsls r0, r6, 3 + ldr r1, _08143790 @ =gMonFrontPicTable + adds r0, r1 + ldr r1, _08143794 @ =gMonFrontPicCoords + lsls r2, r6, 2 + adds r2, r1 + ldrb r1, [r2] + ldrb r2, [r2, 0x1] + movs r3, 0x80 + lsls r3, 18 + ldr r4, _08143798 @ =gUnknown_0840B5A0 + mov r12, r4 + mov r5, r8 + lsls r4, r5, 2 + add r4, r12 + ldr r4, [r4] + str r4, [sp] + str r6, [sp, 0x4] + str r7, [sp, 0x8] + movs r4, 0x1 + str r4, [sp, 0xC] + bl sub_800D378 + adds r0, r6, 0 + ldr r1, [sp, 0x30] + adds r2, r7, 0 + bl species_and_otid_get_pal + lsls r4, r5, 4 + movs r2, 0x80 + lsls r2, 1 + adds r1, r4, r2 + lsls r1, 16 + lsrs r1, 16 + movs r2, 0x20 + bl LoadCompressedPalette + lsls r1, r5, 24 + lsrs r1, 24 + mov r0, r8 + bl sub_8143648 + ldr r0, _0814379C @ =gUnknown_02024E8C + mov r5, r9 + lsls r5, 16 + asrs r5, 16 + mov r9, r5 + mov r1, r10 + lsls r1, 16 + asrs r1, 16 + mov r10, r1 + movs r3, 0xA + mov r2, r8 + subs r3, r2 + lsls r3, 24 + lsrs r3, 24 + mov r1, r9 + mov r2, r10 + bl CreateSprite + lsls r0, 24 + lsrs r0, 24 + ldr r1, _081437A0 @ =gSprites + lsls r2, r0, 4 + adds r2, r0 + lsls r2, 2 + adds r2, r1 + ldrb r3, [r2, 0x5] + movs r1, 0xF + ands r1, r3 + orrs r1, r4 + strb r1, [r2, 0x5] + add sp, 0x10 + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r1} + bx r1 + .align 2, 0 +_08143790: .4byte gMonFrontPicTable +_08143794: .4byte gMonFrontPicCoords +_08143798: .4byte gUnknown_0840B5A0 +_0814379C: .4byte gUnknown_02024E8C +_081437A0: .4byte gSprites + thumb_func_end sub_81436BC + + thumb_func_start sub_81437A4 +sub_81437A4: @ 81437A4 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0x8 + mov r9, r1 + mov r10, r2 + adds r6, r3, 0 + lsls r0, 16 + lsrs r0, 16 + lsls r1, 16 + lsrs r1, 16 + mov r9, r1 + lsls r2, 16 + lsrs r2, 16 + mov r10, r2 + lsls r6, 16 + lsrs r6, 16 + lsls r7, r0, 3 + ldr r1, _08143854 @ =gTrainerFrontPicTable + mov r8, r1 + add r8, r7 + ldr r1, _08143858 @ =gTrainerFrontPicCoords + lsls r2, r0, 2 + adds r2, r1 + ldrb r1, [r2] + ldrb r2, [r2, 0x1] + movs r3, 0x80 + lsls r3, 18 + ldr r5, _0814385C @ =gUnknown_0840B5A0 + lsls r4, r6, 2 + adds r4, r5 + ldr r4, [r4] + str r4, [sp] + str r0, [sp, 0x4] + mov r0, r8 + bl DecompressPicFromTable_2 + ldr r0, _08143860 @ =gTrainerFrontPicPaletteTable + adds r0, r7, r0 + ldr r0, [r0] + lsls r4, r6, 4 + movs r2, 0x80 + lsls r2, 1 + adds r1, r4, r2 + lsls r1, 16 + lsrs r1, 16 + movs r2, 0x20 + bl LoadCompressedPalette + lsls r1, r6, 24 + lsrs r1, 24 + adds r0, r6, 0 + bl sub_8143680 + ldr r0, _08143864 @ =gUnknown_02024E8C + mov r1, r9 + lsls r1, 16 + asrs r1, 16 + mov r9, r1 + mov r2, r10 + lsls r2, 16 + asrs r2, 16 + mov r10, r2 + movs r3, 0x1 + bl CreateSprite + lsls r0, 24 + lsrs r0, 24 + ldr r1, _08143868 @ =gSprites + lsls r2, r0, 4 + adds r2, r0 + lsls r2, 2 + adds r2, r1 + ldrb r3, [r2, 0x5] + movs r1, 0xF + ands r1, r3 + orrs r1, r4 + strb r1, [r2, 0x5] + add sp, 0x8 + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r1} + bx r1 + .align 2, 0 +_08143854: .4byte gTrainerFrontPicTable +_08143858: .4byte gTrainerFrontPicCoords +_0814385C: .4byte gUnknown_0840B5A0 +_08143860: .4byte gTrainerFrontPicPaletteTable +_08143864: .4byte gUnknown_02024E8C +_08143868: .4byte gSprites + thumb_func_end sub_81437A4 + + thumb_func_start sub_814386C +sub_814386C: @ 814386C + push {r4,r5,lr} + adds r5, r0, 0 + ldrh r1, [r5, 0x26] + movs r2, 0x26 + ldrsh r0, [r5, r2] + cmp r0, 0x78 + ble _08143882 + adds r0, r5, 0 + bl DestroySprite + b _081438BA +_08143882: + adds r0, r1, 0x1 + ldrh r1, [r5, 0x30] + adds r0, r1 + strh r0, [r5, 0x26] + ldrh r4, [r5, 0x2E] + lsls r4, 24 + lsrs r4, 24 + bl Random + lsls r0, 16 + lsrs r0, 16 + movs r1, 0x3 + ands r0, r1 + adds r0, 0x8 + ldr r1, _081438C0 @ =gSineTable + lsls r4, 1 + adds r4, r1 + movs r2, 0 + ldrsh r1, [r4, r2] + muls r0, r1 + cmp r0, 0 + bge _081438B0 + adds r0, 0xFF +_081438B0: + asrs r0, 8 + strh r0, [r5, 0x24] + ldrh r0, [r5, 0x2E] + adds r0, 0x4 + strh r0, [r5, 0x2E] +_081438BA: + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_081438C0: .4byte gSineTable + thumb_func_end sub_814386C + + thumb_func_start sub_81438C4 +sub_81438C4: @ 81438C4 + push {r4,lr} + bl Random + lsls r0, 16 + lsrs r0, 16 + movs r1, 0xF0 + bl __umodsi3 + adds r4, r0, 0 + lsls r4, 16 + lsrs r4, 16 + bl Random + adds r2, r0, 0 + lsls r2, 16 + lsrs r2, 16 + movs r0, 0x7 + ands r2, r0 + negs r2, r2 + ldr r0, _08143934 @ =gSpriteTemplate_840B7A4 + lsls r4, 16 + asrs r4, 16 + lsls r2, 16 + asrs r2, 16 + adds r1, r4, 0 + movs r3, 0 + bl CreateSprite + lsls r0, 24 + lsrs r0, 24 + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + ldr r0, _08143938 @ =gSprites + adds r4, r1, r0 + bl Random + lsls r0, 16 + lsrs r0, 16 + movs r1, 0x11 + bl __umodsi3 + adds r1, r0, 0 + lsls r1, 24 + lsrs r1, 24 + adds r0, r4, 0 + bl StartSpriteAnim + bl Random + movs r1, 0x3 + ands r1, r0 + cmp r1, 0 + beq _0814393C + movs r0, 0 + b _0814393E + .align 2, 0 +_08143934: .4byte gSpriteTemplate_840B7A4 +_08143938: .4byte gSprites +_0814393C: + movs r0, 0x1 +_0814393E: + strh r0, [r4, 0x30] + movs r0, 0 + pop {r4} + pop {r1} + bx r1 + thumb_func_end sub_81438C4 + + .align 2, 0 @ Don't pad with nop. diff --git a/asm/rom_813BA94.s b/asm/rom_813BA94.s index d38466f97..86579db43 100644 --- a/asm/rom_813BA94.s +++ b/asm/rom_813BA94.s @@ -10703,7570 +10703,4 @@ _08141E30: .4byte 0x02017840 _08141E34: .4byte gUnknown_0202F7C9 thumb_func_end sub_8141E10 - thumb_func_start sub_8141E38 -sub_8141E38: @ 8141E38 - push {lr} - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - pop {r0} - bx r0 - thumb_func_end sub_8141E38 - - thumb_func_start sub_8141E4C -sub_8141E4C: @ 8141E4C - push {lr} - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - pop {r0} - bx r0 - thumb_func_end sub_8141E4C - - thumb_func_start sub_8141E64 -sub_8141E64: @ 8141E64 - push {r4,lr} - sub sp, 0x4 - ldr r0, _08141E80 @ =gMain - ldr r1, _08141E84 @ =0x0000043c - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x4 - bhi _08141EA0 - lsls r0, 2 - ldr r1, _08141E88 @ =_08141E8C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08141E80: .4byte gMain -_08141E84: .4byte 0x0000043c -_08141E88: .4byte _08141E8C - .align 2, 0 -_08141E8C: - .4byte _08141EA0 - .4byte _08141EC0 - .4byte _08141EC6 - .4byte _08141F1C - .4byte _08141F58 -_08141EA0: - movs r0, 0 - bl SetVBlankCallback - bl sub_81433E0 - ldr r0, _08141EB8 @ =gMain - ldr r2, _08141EBC @ =0x0000043c - adds r0, r2 - movs r1, 0x1 - strb r1, [r0] - b _08141F84 - .align 2, 0 -_08141EB8: .4byte gMain -_08141EBC: .4byte 0x0000043c -_08141EC0: - bl sub_8143570 - b _08141F38 -_08141EC6: - movs r0, 0x1 - negs r0, r0 - movs r4, 0 - str r4, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r0, _08141F04 @ =sub_8141E38 - bl SetVBlankCallback - ldr r3, _08141F08 @ =0x04000208 - ldrh r2, [r3] - strh r4, [r3] - ldr r4, _08141F0C @ =0x04000200 - ldrh r0, [r4] - movs r1, 0x1 - orrs r0, r1 - strh r0, [r4] - strh r2, [r3] - ldr r2, _08141F10 @ =REG_DISPSTAT - ldrh r0, [r2] - movs r1, 0x8 - orrs r0, r1 - strh r0, [r2] - ldr r1, _08141F14 @ =gMain - ldr r2, _08141F18 @ =0x0000043c - adds r1, r2 - b _08141F3E - .align 2, 0 -_08141F04: .4byte sub_8141E38 -_08141F08: .4byte 0x04000208 -_08141F0C: .4byte 0x04000200 -_08141F10: .4byte REG_DISPSTAT -_08141F14: .4byte gMain -_08141F18: .4byte 0x0000043c -_08141F1C: - ldr r1, _08141F48 @ =REG_BLDCNT - ldr r2, _08141F4C @ =0x00003f42 - adds r0, r2, 0 - strh r0, [r1] - adds r1, 0x2 - movs r2, 0xE2 - lsls r2, 3 - adds r0, r2, 0 - strh r0, [r1] - adds r1, 0x2 - movs r0, 0 - strh r0, [r1] - bl sub_81435B8 -_08141F38: - ldr r1, _08141F50 @ =gMain - ldr r0, _08141F54 @ =0x0000043c - adds r1, r0 -_08141F3E: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08141F84 - .align 2, 0 -_08141F48: .4byte REG_BLDCNT -_08141F4C: .4byte 0x00003f42 -_08141F50: .4byte gMain -_08141F54: .4byte 0x0000043c -_08141F58: - bl UpdatePaletteFade - ldr r0, _08141F7C @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08141F84 - ldr r0, _08141F80 @ =sub_8141E4C - bl SetMainCallback2 - movs r0, 0xDA - lsls r0, 1 - bl PlayBGM - movs r0, 0 - b _08141F86 - .align 2, 0 -_08141F7C: .4byte gPaletteFade -_08141F80: .4byte sub_8141E4C -_08141F84: - movs r0, 0x1 -_08141F86: - add sp, 0x4 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8141E64 - - thumb_func_start sub_8141F90 -sub_8141F90: @ 8141F90 - push {r4,lr} - bl sub_8141E64 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - bne _08141FB6 - ldr r0, _08141FBC @ =sub_8141FF8 - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, _08141FC0 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - strh r4, [r1, 0x8] -_08141FB6: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08141FBC: .4byte sub_8141FF8 -_08141FC0: .4byte gTasks - thumb_func_end sub_8141F90 - - thumb_func_start sub_8141FC4 -sub_8141FC4: @ 8141FC4 - push {lr} - bl sub_8141E64 - lsls r0, 24 - cmp r0, 0 - bne _08141FEA - ldr r0, _08141FF0 @ =sub_8141FF8 - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, _08141FF4 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - movs r0, 0x1 - strh r0, [r1, 0x8] -_08141FEA: - pop {r0} - bx r0 - .align 2, 0 -_08141FF0: .4byte sub_8141FF8 -_08141FF4: .4byte gTasks - thumb_func_end sub_8141FC4 - - thumb_func_start sub_8141FF8 -sub_8141FF8: @ 8141FF8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0xC - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldr r0, _081420C8 @ =0x0201c000 - mov r9, r0 - ldr r1, _081420CC @ =gTasks - mov r2, r8 - lsls r0, r2, 2 - add r0, r8 - lsls r0, 3 - adds r0, r1 - movs r1, 0 - strh r1, [r0, 0xC] - movs r7, 0 - ldr r4, _081420D0 @ =0xfffffe00 - mov r10, r4 -_08142024: - movs r0, 0x64 - adds r1, r7, 0 - muls r1, r0 - ldr r0, _081420D4 @ =gPlayerParty - adds r6, r1, r0 - adds r0, r6, 0 - movs r1, 0xB - bl GetMonData - adds r3, r0, 0 - cmp r3, 0 - beq _081420DC - adds r0, r6, 0 - movs r1, 0x41 - bl GetMonData - lsls r4, r7, 2 - adds r4, r7 - lsls r4, 2 - mov r1, r9 - adds r5, r1, r4 - ldr r2, _081420D8 @ =0x000001ff - adds r1, r2, 0 - ands r0, r1 - ldrh r1, [r5, 0x8] - mov r2, r10 - ands r1, r2 - orrs r1, r0 - strh r1, [r5, 0x8] - adds r0, r6, 0 - movs r1, 0x1 - bl GetMonData - str r0, [r5] - adds r0, r6, 0 - movs r1, 0 - bl GetMonData - mov r1, r9 - adds r1, 0x4 - adds r1, r4 - str r0, [r1] - adds r0, r6, 0 - movs r1, 0x38 - bl GetMonData - lsls r0, 1 - ldrb r2, [r5, 0x9] - movs r1, 0x1 - ands r1, r2 - orrs r1, r0 - strb r1, [r5, 0x9] - adds r0, r6, 0 - movs r1, 0x2 - mov r2, sp - bl GetMonData - movs r2, 0 - mov r6, r8 - lsls r5, r6, 2 - mov r3, r9 - adds r3, 0xA -_081420A0: - adds r1, r2, r4 - adds r1, r3, r1 - mov r6, sp - adds r0, r6, r2 - ldrb r0, [r0] - strb r0, [r1] - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, 0x9 - bls _081420A0 - ldr r0, _081420CC @ =gTasks - mov r2, r8 - adds r1, r5, r2 - lsls r1, 3 - adds r1, r0 - ldrh r0, [r1, 0xC] - adds r0, 0x1 - strh r0, [r1, 0xC] - b _08142108 - .align 2, 0 -_081420C8: .4byte 0x0201c000 -_081420CC: .4byte gTasks -_081420D0: .4byte 0xfffffe00 -_081420D4: .4byte gPlayerParty -_081420D8: .4byte 0x000001ff -_081420DC: - lsls r1, r7, 2 - adds r1, r7 - lsls r1, 2 - mov r4, r9 - adds r2, r4, r1 - ldrh r0, [r2, 0x8] - mov r6, r10 - ands r0, r6 - strh r0, [r2, 0x8] - str r3, [r2] - mov r0, r9 - adds r0, 0x4 - adds r0, r1 - str r3, [r0] - ldrb r1, [r2, 0x9] - movs r0, 0x1 - ands r0, r1 - strb r0, [r2, 0x9] - movs r0, 0xFF - strb r0, [r2, 0xA] - mov r0, r8 - lsls r5, r0, 2 -_08142108: - adds r0, r7, 0x1 - lsls r0, 16 - lsrs r7, r0, 16 - cmp r7, 0x5 - bls _08142024 - ldr r0, _08142158 @ =gUnknown_0203931C - movs r3, 0 - str r3, [r0] - ldr r4, _0814215C @ =gTasks - mov r2, r8 - adds r1, r5, r2 - lsls r1, 3 - adds r2, r1, r4 - strh r3, [r2, 0xA] - movs r0, 0xFF - strh r0, [r2, 0x10] - movs r7, 0 - adds r3, r4, 0 - adds r3, 0x8 - movs r2, 0xFF -_08142130: - adds r0, r7, 0x5 - lsls r0, 1 - adds r0, r1 - adds r0, r3 - strh r2, [r0] - adds r0, r7, 0x1 - lsls r0, 16 - lsrs r7, r0, 16 - cmp r7, 0x5 - bls _08142130 - mov r6, r8 - adds r0, r5, r6 - lsls r0, 3 - adds r1, r0, r4 - movs r2, 0x8 - ldrsh r0, [r1, r2] - cmp r0, 0 - beq _08142164 - ldr r0, _08142160 @ =sub_81422E8 - b _08142166 - .align 2, 0 -_08142158: .4byte gUnknown_0203931C -_0814215C: .4byte gTasks -_08142160: .4byte sub_81422E8 -_08142164: - ldr r0, _08142178 @ =sub_814217C -_08142166: - str r0, [r1] - add sp, 0xC - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08142178: .4byte sub_814217C - thumb_func_end sub_8141FF8 - - thumb_func_start sub_814217C -sub_814217C: @ 814217C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldr r0, _081421C4 @ =0x0201c000 - mov r9, r0 - movs r7, 0x80 - lsls r7, 6 - add r7, r9 - ldr r0, _081421C8 @ =gUnknown_02039324 - ldrb r0, [r0] - cmp r0, 0 - bne _081421D4 - movs r4, 0 - mov r0, r8 - lsls r0, 2 - mov r10, r0 - ldr r5, _081421CC @ =0xfffe4000 - add r5, r9 - movs r3, 0xF0 - lsls r3, 9 - movs r2, 0 - ldr r1, _081421D0 @ =0x00001fff -_081421B2: - adds r0, r4, r3 - adds r0, r5 - strb r2, [r0] - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, r1 - bls _081421B2 - b _081421E0 - .align 2, 0 -_081421C4: .4byte 0x0201c000 -_081421C8: .4byte gUnknown_02039324 -_081421CC: .4byte 0xfffe4000 -_081421D0: .4byte 0x00001fff -_081421D4: - movs r0, 0x3 - bl sub_8125EC8 - mov r0, r8 - lsls r0, 2 - mov r10, r0 -_081421E0: - movs r4, 0 - ldrh r1, [r7, 0x8] - ldr r2, _081421E8 @ =0x000001ff - b _081421FA - .align 2, 0 -_081421E8: .4byte 0x000001ff -_081421EC: - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - adds r7, 0x78 - cmp r4, 0x31 - bhi _08142206 - ldrh r1, [r7, 0x8] -_081421FA: - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - bne _081421EC - cmp r4, 0x31 - bls _08142228 -_08142206: - ldr r5, _08142264 @ =0x0201e000 - adds r6, r5, 0 - adds r5, 0x78 - movs r4, 0 - subs r7, 0x78 -_08142210: - adds r0, r6, 0 - adds r1, r5, 0 - movs r2, 0x78 - bl memcpy - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - adds r6, 0x78 - adds r5, 0x78 - cmp r4, 0x30 - bls _08142210 -_08142228: - adds r0, r7, 0 - mov r1, r9 - movs r2, 0x78 - bl memcpy - movs r0, 0x2 - movs r1, 0xE - movs r2, 0x1B - movs r3, 0x13 - bl MenuDrawTextWindow - ldr r0, _08142268 @ =gMenuText_HOFSaving - movs r1, 0x3 - movs r2, 0xF - bl MenuPrint - ldr r1, _0814226C @ =gTasks - mov r0, r10 - add r0, r8 - lsls r0, 3 - adds r0, r1 - ldr r1, _08142270 @ =sub_8142274 - str r1, [r0] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08142264: .4byte 0x0201e000 -_08142268: .4byte gMenuText_HOFSaving -_0814226C: .4byte gTasks -_08142270: .4byte sub_8142274 - thumb_func_end sub_814217C - - thumb_func_start sub_8142274 -sub_8142274: @ 8142274 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r1, _081422A8 @ =gUnknown_03005EBC - ldr r0, _081422AC @ =sub_8141FC4 - str r0, [r1] - movs r0, 0x3 - bl sub_8125D44 - movs r0, 0x37 - bl PlaySE - ldr r1, _081422B0 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, _081422B4 @ =sub_81422B8 - str r1, [r0] - movs r1, 0x20 - strh r1, [r0, 0xE] - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_081422A8: .4byte gUnknown_03005EBC -_081422AC: .4byte sub_8141FC4 -_081422B0: .4byte gTasks -_081422B4: .4byte sub_81422B8 - thumb_func_end sub_8142274 - - thumb_func_start sub_81422B8 -sub_81422B8: @ 81422B8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r2, _081422D8 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - ldrh r2, [r1, 0xE] - movs r3, 0xE - ldrsh r0, [r1, r3] - cmp r0, 0 - beq _081422DC - subs r0, r2, 0x1 - strh r0, [r1, 0xE] - b _081422E0 - .align 2, 0 -_081422D8: .4byte gTasks -_081422DC: - ldr r0, _081422E4 @ =sub_81422E8 - str r0, [r1] -_081422E0: - pop {r0} - bx r0 - .align 2, 0 -_081422E4: .4byte sub_81422E8 - thumb_func_end sub_81422B8 - - thumb_func_start sub_81422E8 -sub_81422E8: @ 81422E8 - push {r4,r5,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r5, _08142314 @ =gWindowConfig_81E7198 - adds r0, r5, 0 - bl SetUpWindowConfig - adds r0, r5, 0 - bl InitMenuWindow - ldr r1, _08142318 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, _0814231C @ =sub_8142320 - str r1, [r0] - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08142314: .4byte gWindowConfig_81E7198 -_08142318: .4byte gTasks -_0814231C: .4byte sub_8142320 - thumb_func_end sub_81422E8 - - thumb_func_start sub_8142320 -sub_8142320: @ 8142320 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x8 - lsls r0, 24 - lsrs r7, r0, 24 - ldr r2, _08142350 @ =0x0201c000 - ldr r0, _08142354 @ =gTasks - lsls r1, r7, 2 - adds r1, r7 - lsls r1, 3 - adds r1, r0 - ldrh r6, [r1, 0xA] - lsls r0, r6, 2 - adds r0, r6 - lsls r0, 2 - adds r4, r0, r2 - movs r2, 0xC - ldrsh r0, [r1, r2] - cmp r0, 0x3 - ble _0814235C - ldr r1, _08142358 @ =gUnknown_0840B534 - b _0814235E - .align 2, 0 -_08142350: .4byte 0x0201c000 -_08142354: .4byte gTasks -_08142358: .4byte gUnknown_0840B534 -_0814235C: - ldr r1, _081423F0 @ =gUnknown_0840B564 -_0814235E: - lsls r2, r6, 3 - adds r0, r2, r1 - ldrh r5, [r0] - adds r0, r1, 0x2 - adds r0, r2, r0 - ldrh r3, [r0] - adds r0, r1, 0x4 - adds r0, r2, r0 - ldrh r0, [r0] - mov r9, r0 - adds r1, 0x6 - adds r2, r1 - ldrh r2, [r2] - mov r8, r2 - ldrh r0, [r4, 0x8] - lsls r0, 23 - lsrs r0, 23 - lsls r1, r5, 16 - asrs r1, 16 - lsls r2, r3, 16 - asrs r2, 16 - ldr r3, [r4] - str r3, [sp] - ldr r3, [r4, 0x4] - str r3, [sp, 0x4] - adds r3, r6, 0 - bl sub_81436BC - lsls r0, 24 - lsrs r0, 24 - ldr r3, _081423F4 @ =gSprites - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r2, r1, r3 - movs r4, 0 - mov r5, r9 - strh r5, [r2, 0x30] - mov r5, r8 - strh r5, [r2, 0x32] - strh r4, [r2, 0x2E] - adds r3, 0x1C - adds r1, r3 - ldr r2, _081423F8 @ =sub_81435DC - str r2, [r1] - ldr r5, _081423FC @ =gTasks - adds r1, r6, 0x5 - lsls r1, 1 - lsls r4, r7, 2 - adds r4, r7 - lsls r4, 3 - adds r1, r4 - adds r2, r5, 0 - adds r2, 0x8 - adds r1, r2 - strh r0, [r1] - movs r0, 0 - movs r1, 0xE - movs r2, 0x1D - movs r3, 0x13 - bl MenuZeroFillWindowRect - adds r4, r5 - ldr r0, _08142400 @ =sub_8142404 - str r0, [r4] - add sp, 0x8 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_081423F0: .4byte gUnknown_0840B564 -_081423F4: .4byte gSprites -_081423F8: .4byte sub_81435DC -_081423FC: .4byte gTasks -_08142400: .4byte sub_8142404 - thumb_func_end sub_8142320 - - thumb_func_start sub_8142404 -sub_8142404: @ 8142404 - push {r4-r6,lr} - lsls r0, 24 - lsrs r0, 24 - ldr r4, _08142470 @ =0x0201c000 - ldr r3, _08142474 @ =gTasks - lsls r2, r0, 2 - adds r2, r0 - lsls r2, 3 - adds r5, r2, r3 - ldrh r1, [r5, 0xA] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r6, r0, r4 - ldr r4, _08142478 @ =gSprites - adds r1, 0x5 - lsls r1, 1 - adds r1, r2 - adds r3, 0x8 - adds r1, r3 - movs r0, 0 - ldrsh r1, [r1, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - movs r1, 0x2E - ldrsh r0, [r0, r1] - cmp r0, 0 - beq _0814246A - ldrh r2, [r6, 0x8] - ldr r0, _0814247C @ =0x000001ff - ands r0, r2 - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - beq _08142458 - lsls r0, r2, 23 - lsrs r0, 23 - movs r1, 0 - bl PlayCry1 -_08142458: - adds r0, r6, 0 - movs r1, 0 - movs r2, 0xE - bl sub_8143088 - movs r0, 0x78 - strh r0, [r5, 0xE] - ldr r0, _08142480 @ =sub_8142484 - str r0, [r5] -_0814246A: - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_08142470: .4byte 0x0201c000 -_08142474: .4byte gTasks -_08142478: .4byte gSprites -_0814247C: .4byte 0x000001ff -_08142480: .4byte sub_8142484 - thumb_func_end sub_8142404 - - thumb_func_start sub_8142484 -sub_8142484: @ 8142484 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r5, r0, 24 - ldr r2, _081424BC @ =0x0201c000 - ldr r1, _081424C0 @ =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r6, r0, 3 - adds r4, r6, r1 - ldrh r3, [r4, 0xA] - lsls r0, r3, 2 - adds r0, r3 - lsls r0, 2 - adds r0, r2 - mov r9, r0 - ldrh r2, [r4, 0xE] - movs r7, 0xE - ldrsh r0, [r4, r7] - mov r12, r1 - cmp r0, 0 - beq _081424C4 - subs r0, r2, 0x1 - strh r0, [r4, 0xE] - b _0814255C - .align 2, 0 -_081424BC: .4byte 0x0201c000 -_081424C0: .4byte gTasks -_081424C4: - ldr r2, _0814253C @ =gUnknown_0203931C - ldr r0, _08142540 @ =gSprites - mov r8, r0 - adds r0, r3, 0x5 - lsls r0, 1 - adds r0, r6 - mov r1, r12 - adds r1, 0x8 - adds r6, r0, r1 - movs r7, 0 - ldrsh r1, [r6, r7] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - add r0, r8 - ldrb r0, [r0, 0x5] - lsrs r0, 4 - movs r1, 0x80 - lsls r1, 9 - lsls r1, r0 - ldr r3, [r2] - orrs r3, r1 - str r3, [r2] - ldrh r2, [r4, 0xA] - movs r1, 0xA - ldrsh r0, [r4, r1] - cmp r0, 0x4 - bgt _08142550 - mov r7, r9 - ldrh r1, [r7, 0x1C] - ldr r0, _08142544 @ =0x000001ff - ands r0, r1 - cmp r0, 0 - beq _08142550 - adds r0, r2, 0x1 - strh r0, [r4, 0xA] - ldr r0, _08142548 @ =0x0000735f - str r0, [sp] - adds r0, r3, 0 - movs r1, 0 - movs r2, 0xC - movs r3, 0xC - bl BeginNormalPaletteFade - movs r0, 0 - ldrsh r1, [r6, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - add r0, r8 - ldrb r2, [r0, 0x5] - movs r1, 0xD - negs r1, r1 - ands r1, r2 - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0, 0x5] - ldr r0, _0814254C @ =sub_8142320 - str r0, [r4] - b _0814255C - .align 2, 0 -_0814253C: .4byte gUnknown_0203931C -_08142540: .4byte gSprites -_08142544: .4byte 0x000001ff -_08142548: .4byte 0x0000735f -_0814254C: .4byte sub_8142320 -_08142550: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - add r0, r12 - ldr r1, _0814256C @ =sub_8142570 - str r1, [r0] -_0814255C: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0814256C: .4byte sub_8142570 - thumb_func_end sub_8142484 - - thumb_func_start sub_8142570 -sub_8142570: @ 8142570 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _08142604 @ =0xffff0000 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0 - bl BeginNormalPaletteFade - movs r3, 0 - lsls r1, r4, 2 - adds r0, r1, r4 - lsls r5, r0, 3 - ldr r0, _08142608 @ =gTasks + 0x8 - mov r12, r0 - mov r8, r1 - ldr r6, _0814260C @ =gSprites - movs r7, 0xD - negs r7, r7 -_0814259E: - adds r0, r3, 0x5 - lsls r0, 1 - adds r0, r5 - mov r2, r12 - adds r1, r0, r2 - movs r2, 0 - ldrsh r0, [r1, r2] - cmp r0, 0xFF - beq _081425C0 - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r6 - ldrb r2, [r1, 0x5] - adds r0, r7, 0 - ands r0, r2 - strb r0, [r1, 0x5] -_081425C0: - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, 0x5 - bls _0814259E - movs r0, 0 - movs r1, 0xE - movs r2, 0x1D - movs r3, 0x13 - bl MenuZeroFillWindowRect - movs r0, 0 - movs r1, 0xF - bl sub_8143068 - movs r0, 0x69 - bl PlaySE - ldr r1, _08142610 @ =gTasks - mov r2, r8 - adds r0, r2, r4 - lsls r0, 3 - adds r0, r1 - movs r1, 0xC8 - lsls r1, 1 - strh r1, [r0, 0xE] - ldr r1, _08142614 @ =sub_8142618 - str r1, [r0] - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08142604: .4byte 0xffff0000 -_08142608: .4byte gTasks + 0x8 -_0814260C: .4byte gSprites -_08142610: .4byte gTasks -_08142614: .4byte sub_8142618 - thumb_func_end sub_8142570 - - thumb_func_start sub_8142618 -sub_8142618: @ 8142618 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r6, r0, 24 - ldr r7, _08142658 @ =gTasks - lsls r4, r6, 2 - adds r0, r4, r6 - lsls r5, r0, 3 - adds r1, r5, r7 - ldrh r2, [r1, 0xE] - movs r3, 0xE - ldrsh r0, [r1, r3] - cmp r0, 0 - beq _0814265C - subs r2, 0x1 - strh r2, [r1, 0xE] - movs r0, 0x3 - ands r0, r2 - cmp r0, 0 - bne _081426D2 - lsls r0, r2, 16 - asrs r0, 16 - cmp r0, 0x6E - ble _081426D2 - bl sub_81438C4 - b _081426D2 - .align 2, 0 -_08142658: .4byte gTasks -_0814265C: - movs r3, 0 - mov r9, r4 - ldr r0, _081426E4 @ =gUnknown_0203931C - mov r10, r0 - adds r4, r5, 0 - adds r7, 0x8 - mov r8, r7 - ldr r7, _081426E8 @ =gSprites - movs r1, 0xD - negs r1, r1 - mov r12, r1 - movs r5, 0x4 -_08142674: - adds r0, r3, 0x5 - lsls r0, 1 - adds r0, r4 - mov r2, r8 - adds r1, r0, r2 - movs r2, 0 - ldrsh r0, [r1, r2] - cmp r0, 0xFF - beq _08142698 - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r7 - ldrb r2, [r1, 0x5] - mov r0, r12 - ands r0, r2 - orrs r0, r5 - strb r0, [r1, 0x5] -_08142698: - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, 0x5 - bls _08142674 - mov r3, r10 - ldr r0, [r3] - ldr r1, _081426EC @ =0x0000735f - str r1, [sp] - movs r1, 0 - movs r2, 0xC - movs r3, 0xC - bl BeginNormalPaletteFade - movs r0, 0 - movs r1, 0xE - movs r2, 0x1D - movs r3, 0x13 - bl MenuZeroFillWindowRect - ldr r1, _081426F0 @ =gTasks - mov r2, r9 - adds r0, r2, r6 - lsls r0, 3 - adds r0, r1 - movs r1, 0x7 - strh r1, [r0, 0xE] - ldr r1, _081426F4 @ =sub_81426F8 - str r1, [r0] -_081426D2: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_081426E4: .4byte gUnknown_0203931C -_081426E8: .4byte gSprites -_081426EC: .4byte 0x0000735f -_081426F0: .4byte gTasks -_081426F4: .4byte sub_81426F8 - thumb_func_end sub_8142618 - - thumb_func_start sub_81426F8 -sub_81426F8: @ 81426F8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r2, _08142718 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r2, r1, r2 - ldrh r1, [r2, 0xE] - movs r3, 0xE - ldrsh r0, [r2, r3] - cmp r0, 0xF - ble _08142720 - ldr r0, _0814271C @ =sub_8142738 - str r0, [r2] - b _0814272E - .align 2, 0 -_08142718: .4byte gTasks -_0814271C: .4byte sub_8142738 -_08142720: - adds r0, r1, 0x1 - strh r0, [r2, 0xE] - ldr r1, _08142734 @ =REG_BLDALPHA - movs r3, 0xE - ldrsh r0, [r2, r3] - lsls r0, 8 - strh r0, [r1] -_0814272E: - pop {r0} - bx r0 - .align 2, 0 -_08142734: .4byte REG_BLDALPHA - thumb_func_end sub_81426F8 - - thumb_func_start sub_8142738 -sub_8142738: @ 8142738 - push {r4,r5,lr} - adds r5, r0, 0 - lsls r5, 24 - lsrs r5, 24 - movs r1, 0x80 - lsls r1, 19 - movs r2, 0xCA - lsls r2, 5 - adds r0, r2, 0 - strh r0, [r1] - ldr r4, _08142784 @ =gWindowConfig_81E71B4 - adds r0, r4, 0 - bl SetUpWindowConfig - adds r0, r4, 0 - bl InitMenuWindow - ldr r0, _08142788 @ =gSaveBlock2 - ldrb r0, [r0, 0x8] - movs r1, 0x78 - movs r2, 0x48 - movs r3, 0x6 - bl sub_81437A4 - ldr r2, _0814278C @ =gTasks - lsls r1, r5, 2 - adds r1, r5 - lsls r1, 3 - adds r1, r2 - strh r0, [r1, 0x10] - movs r0, 0x78 - strh r0, [r1, 0xE] - ldr r0, _08142790 @ =sub_8142794 - str r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08142784: .4byte gWindowConfig_81E71B4 -_08142788: .4byte gSaveBlock2 -_0814278C: .4byte gTasks -_08142790: .4byte sub_8142794 - thumb_func_end sub_8142738 - - thumb_func_start sub_8142794 -sub_8142794: @ 8142794 - push {r4,lr} - lsls r0, 24 - lsrs r0, 24 - ldr r2, _081427B4 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r4, r1, r2 - ldrh r1, [r4, 0xE] - movs r2, 0xE - ldrsh r0, [r4, r2] - cmp r0, 0 - beq _081427B8 - subs r0, r1, 0x1 - strh r0, [r4, 0xE] - b _0814280A - .align 2, 0 -_081427B4: .4byte gTasks -_081427B8: - ldr r2, _081427D8 @ =gSprites - movs r3, 0x10 - ldrsh r1, [r4, r3] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r1, r0, r2 - ldrh r2, [r1, 0x20] - movs r3, 0x20 - ldrsh r0, [r1, r3] - cmp r0, 0xA0 - beq _081427DC - adds r0, r2, 0x1 - strh r0, [r1, 0x20] - b _0814280A - .align 2, 0 -_081427D8: .4byte gSprites -_081427DC: - movs r0, 0x1 - movs r1, 0x2 - movs r2, 0xF - movs r3, 0x9 - bl MenuDrawTextWindow - movs r0, 0x1 - movs r1, 0x2 - bl sub_8143300 - movs r0, 0x2 - movs r1, 0xE - movs r2, 0x1B - movs r3, 0x13 - bl MenuDrawTextWindow - ldr r0, _08142810 @ =gMenuText_HOFCongratulations - movs r1, 0x4 - movs r2, 0xF - bl MenuPrint - ldr r0, _08142814 @ =sub_8142818 - str r0, [r4] -_0814280A: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08142810: .4byte gMenuText_HOFCongratulations -_08142814: .4byte sub_8142818 - thumb_func_end sub_8142794 - - thumb_func_start sub_8142818 -sub_8142818: @ 8142818 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _08142844 @ =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0814283E - movs r0, 0x4 - bl FadeOutBGM - ldr r0, _08142848 @ =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r1, r0 - ldr r0, _0814284C @ =sub_8142850 - str r0, [r1] -_0814283E: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08142844: .4byte gMain -_08142848: .4byte gTasks -_0814284C: .4byte sub_8142850 - thumb_func_end sub_8142818 - - thumb_func_start sub_8142850 -sub_8142850: @ 8142850 - push {r4,lr} - sub sp, 0x4 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r0, _08142890 @ =gPlttBufferFaded - ldr r1, _08142894 @ =gPlttBufferUnfaded - movs r2, 0x80 - lsls r2, 2 - bl CpuSet - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r1, 0x8 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r1, _08142898 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, _0814289C @ =sub_81428A0 - str r1, [r0] - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08142890: .4byte gPlttBufferFaded -_08142894: .4byte gPlttBufferUnfaded -_08142898: .4byte gTasks -_0814289C: .4byte sub_81428A0 - thumb_func_end sub_8142850 - - thumb_func_start sub_81428A0 -sub_81428A0: @ 81428A0 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, _081428C4 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _081428BE - adds r0, r2, 0 - bl DestroyTask - ldr r0, _081428C8 @ =sub_81439D0 - bl SetMainCallback2 -_081428BE: - pop {r0} - bx r0 - .align 2, 0 -_081428C4: .4byte gPaletteFade -_081428C8: .4byte sub_81439D0 - thumb_func_end sub_81428A0 - - thumb_func_start sub_81428CC -sub_81428CC: @ 81428CC - push {r4,r5,lr} - ldr r0, _081428E4 @ =gMain - ldr r1, _081428E8 @ =0x0000043c - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x5 - bhi _08142908 - lsls r0, 2 - ldr r1, _081428EC @ =_081428F0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_081428E4: .4byte gMain -_081428E8: .4byte 0x0000043c -_081428EC: .4byte _081428F0 - .align 2, 0 -_081428F0: - .4byte _08142908 - .4byte _08142928 - .4byte _0814293C - .4byte _08142980 - .4byte _081429C0 - .4byte _081429EC -_08142908: - movs r0, 0 - bl SetVBlankCallback - bl sub_81433E0 - ldr r0, _08142920 @ =gMain - ldr r2, _08142924 @ =0x0000043c - adds r0, r2 - movs r1, 0x1 - strb r1, [r0] - b _08142A12 - .align 2, 0 -_08142920: .4byte gMain -_08142924: .4byte 0x0000043c -_08142928: - bl sub_8143570 - ldr r1, _08142934 @ =gMain - ldr r3, _08142938 @ =0x0000043c - adds r1, r3 - b _081429DC - .align 2, 0 -_08142934: .4byte gMain -_08142938: .4byte 0x0000043c -_0814293C: - ldr r0, _08142968 @ =sub_8141E38 - bl SetVBlankCallback - ldr r3, _0814296C @ =0x04000208 - ldrh r2, [r3] - movs r0, 0 - strh r0, [r3] - ldr r4, _08142970 @ =0x04000200 - ldrh r0, [r4] - movs r1, 0x1 - orrs r0, r1 - strh r0, [r4] - strh r2, [r3] - ldr r2, _08142974 @ =REG_DISPSTAT - ldrh r0, [r2] - movs r1, 0x8 - orrs r0, r1 - strh r0, [r2] - ldr r1, _08142978 @ =gMain - ldr r4, _0814297C @ =0x0000043c - adds r1, r4 - b _081429DC - .align 2, 0 -_08142968: .4byte sub_8141E38 -_0814296C: .4byte 0x04000208 -_08142970: .4byte 0x04000200 -_08142974: .4byte REG_DISPSTAT -_08142978: .4byte gMain -_0814297C: .4byte 0x0000043c -_08142980: - ldr r0, _081429AC @ =REG_BLDCNT - movs r1, 0 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - bl sub_81435B8 - ldr r0, _081429B0 @ =0x0201c000 - adds r2, r0, 0 - ldr r1, _081429B4 @ =gUnknown_0840B57C - ldm r1!, {r3-r5} - stm r2!, {r3-r5} - ldm r1!, {r3,r5} - stm r2!, {r3,r5} - bl sub_80C5CD4 - ldr r1, _081429B8 @ =gMain - ldr r4, _081429BC @ =0x0000043c - adds r1, r4 - b _081429DC - .align 2, 0 -_081429AC: .4byte REG_BLDCNT -_081429B0: .4byte 0x0201c000 -_081429B4: .4byte gUnknown_0840B57C -_081429B8: .4byte gMain -_081429BC: .4byte 0x0000043c -_081429C0: - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - bl sub_80C5DCC - lsls r0, 24 - cmp r0, 0 - beq _08142A12 - ldr r1, _081429E4 @ =gMain - ldr r5, _081429E8 @ =0x0000043c - adds r1, r5 -_081429DC: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08142A12 - .align 2, 0 -_081429E4: .4byte gMain -_081429E8: .4byte 0x0000043c -_081429EC: - ldr r1, _08142A18 @ =REG_BLDCNT - ldr r2, _08142A1C @ =0x00003f42 - adds r0, r2, 0 - strh r0, [r1] - adds r1, 0x2 - movs r3, 0xE2 - lsls r3, 3 - adds r0, r3, 0 - strh r0, [r1] - adds r1, 0x2 - movs r0, 0 - strh r0, [r1] - ldr r0, _08142A20 @ =sub_8142A28 - movs r1, 0 - bl CreateTask - ldr r0, _08142A24 @ =sub_8141E4C - bl SetMainCallback2 -_08142A12: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08142A18: .4byte REG_BLDCNT -_08142A1C: .4byte 0x00003f42 -_08142A20: .4byte sub_8142A28 -_08142A24: .4byte sub_8141E4C - thumb_func_end sub_81428CC - - thumb_func_start sub_8142A28 -sub_8142A28: @ 8142A28 - push {r4-r7,lr} - lsls r0, 24 - lsrs r5, r0, 24 - movs r0, 0x3 - bl sub_8125EC8 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _08142A54 - ldr r0, _08142A4C @ =gTasks - lsls r1, r5, 2 - adds r1, r5 - lsls r1, 3 - adds r1, r0 - ldr r0, _08142A50 @ =sub_8142FEC - str r0, [r1] - b _08142AEA - .align 2, 0 -_08142A4C: .4byte gTasks -_08142A50: .4byte sub_8142FEC -_08142A54: - ldr r2, _08142A8C @ =0x0201e000 - movs r3, 0 - ldrh r1, [r2, 0x8] - ldr r4, _08142A90 @ =0x000001ff - adds r0, r4, 0 - ands r0, r1 - ldr r7, _08142A94 @ =gTasks - lsls r6, r5, 2 - cmp r0, 0 - beq _08142A7E -_08142A68: - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - adds r2, 0x78 - cmp r3, 0x31 - bhi _08142A98 - ldrh r1, [r2, 0x8] - adds r0, r4, 0 - ands r0, r1 - cmp r0, 0 - bne _08142A68 -_08142A7E: - cmp r3, 0x31 - bhi _08142A98 - adds r0, r6, r5 - lsls r0, 3 - adds r0, r7 - subs r1, r3, 0x1 - b _08142AA0 - .align 2, 0 -_08142A8C: .4byte 0x0201e000 -_08142A90: .4byte 0x000001ff -_08142A94: .4byte gTasks -_08142A98: - adds r0, r6, r5 - lsls r0, 3 - adds r0, r7 - movs r1, 0x31 -_08142AA0: - strh r1, [r0, 0x8] - movs r0, 0xA - bl sub_8053108 - ldr r2, _08142AF0 @ =gTasks - adds r1, r6, r5 - lsls r1, 3 - adds r1, r2 - strh r0, [r1, 0xA] - movs r3, 0 - ldr r7, _08142AF4 @ =0x0600381a - ldr r4, _08142AF8 @ =0x0600385a -_08142AB8: - lsls r1, r3, 1 - adds r2, r1, r7 - adds r0, r3, 0x3 - strh r0, [r2] - adds r1, r4 - adds r0, 0x11 - strh r0, [r1] - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, 0x10 - bls _08142AB8 - ldr r4, _08142AFC @ =gWindowConfig_81E7198 - adds r0, r4, 0 - bl SetUpWindowConfig - adds r0, r4, 0 - bl InitMenuWindow - ldr r1, _08142AF0 @ =gTasks - adds r0, r6, r5 - lsls r0, 3 - adds r0, r1 - ldr r1, _08142B00 @ =sub_8142B04 - str r1, [r0] -_08142AEA: - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08142AF0: .4byte gTasks -_08142AF4: .4byte 0x0600381a -_08142AF8: .4byte 0x0600385a -_08142AFC: .4byte gWindowConfig_81E7198 -_08142B00: .4byte sub_8142B04 - thumb_func_end sub_8142A28 - - thumb_func_start sub_8142B04 -sub_8142B04: @ 8142B04 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldr r3, _08142BB8 @ =0x0201e000 - movs r5, 0 - ldr r1, _08142BBC @ =gTasks - lsls r0, 2 - add r0, r8 - lsls r0, 3 - adds r0, r1 - movs r2, 0x8 - ldrsh r0, [r0, r2] - adds r6, r1, 0 - ldr r2, _08142BC0 @ =gUnknown_0203931C - cmp r5, r0 - bge _08142B3E - adds r1, r0, 0 -_08142B32: - adds r3, 0x78 - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - cmp r5, r1 - blt _08142B32 -_08142B3E: - adds r4, r3, 0 - movs r0, 0 - str r0, [r2] - mov r5, r8 - lsls r2, r5, 2 - adds r1, r2, r5 - lsls r1, 3 - adds r1, r6 - strh r0, [r1, 0xC] - strh r0, [r1, 0x10] - movs r5, 0 - str r2, [sp, 0xC] - ldr r6, _08142BC4 @ =0x000001ff - adds r2, r1, 0 -_08142B5A: - ldrh r1, [r4, 0x8] - adds r0, r6, 0 - ands r0, r1 - cmp r0, 0 - beq _08142B6A - ldrh r0, [r2, 0x10] - adds r0, 0x1 - strh r0, [r2, 0x10] -_08142B6A: - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - adds r4, 0x14 - cmp r5, 0x5 - bls _08142B5A - adds r4, r3, 0 - movs r5, 0 - ldr r1, _08142BBC @ =gTasks - ldr r0, [sp, 0xC] - add r0, r8 - lsls r7, r0, 3 - adds r6, r7, r1 - str r6, [sp, 0x8] - adds r1, 0x8 - mov r9, r1 - ldr r0, _08142BC8 @ =gUnknown_0840B564 - mov r10, r0 -_08142B8E: - ldrh r1, [r4, 0x8] - ldr r2, _08142BC4 @ =0x000001ff - adds r0, r2, 0 - ands r0, r1 - adds r6, r1, 0 - cmp r0, 0 - beq _08142C30 - ldr r1, [sp, 0x8] - movs r2, 0x10 - ldrsh r0, [r1, r2] - cmp r0, 0x3 - ble _08142BD4 - lsls r1, r5, 3 - ldr r0, _08142BCC @ =gUnknown_0840B534 - adds r0, 0x4 - adds r0, r1, r0 - ldrh r3, [r0] - ldr r0, _08142BD0 @ =gUnknown_0840B53A - adds r1, r0 - b _08142BE2 - .align 2, 0 -_08142BB8: .4byte 0x0201e000 -_08142BBC: .4byte gTasks -_08142BC0: .4byte gUnknown_0203931C -_08142BC4: .4byte 0x000001ff -_08142BC8: .4byte gUnknown_0840B564 -_08142BCC: .4byte gUnknown_0840B534 -_08142BD0: .4byte gUnknown_0840B53A -_08142BD4: - lsls r1, r5, 3 - mov r0, r10 - adds r0, 0x4 - adds r0, r1, r0 - ldrh r3, [r0] - ldr r2, _08142C28 @ =gUnknown_0840B56A - adds r1, r2 -_08142BE2: - ldrh r2, [r1] - lsls r0, r6, 23 - lsrs r0, 23 - lsls r1, r3, 16 - asrs r1, 16 - lsls r2, 16 - asrs r2, 16 - ldr r3, [r4] - str r3, [sp] - ldr r3, [r4, 0x4] - str r3, [sp, 0x4] - adds r3, r5, 0 - bl sub_81436BC - lsls r0, 16 - lsrs r0, 16 - ldr r2, _08142C2C @ =gSprites - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r3, [r1, 0x5] - movs r6, 0xD - negs r6, r6 - adds r2, r6, 0 - ands r3, r2 - movs r2, 0x4 - orrs r3, r2 - strb r3, [r1, 0x5] - adds r1, r5, 0x5 - lsls r1, 1 - adds r1, r7 - add r1, r9 - strh r0, [r1] - b _08142C3C - .align 2, 0 -_08142C28: .4byte gUnknown_0840B56A -_08142C2C: .4byte gSprites -_08142C30: - adds r0, r5, 0x5 - lsls r0, 1 - adds r0, r7 - add r0, r9 - movs r1, 0xFF - strh r1, [r0] -_08142C3C: - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - adds r4, 0x14 - cmp r5, 0x5 - bls _08142B8E - ldr r0, _08142CB0 @ =0xffff0000 - ldr r2, _08142CB4 @ =0x0000735f - movs r1, 0xC - bl BlendPalettes - ldr r3, _08142CB8 @ =gStringVar1 - ldr r1, _08142CBC @ =gMenuText_HOFNumber - adds r0, r3, 0 - bl StringCopy - adds r3, r0, 0 - movs r5, 0xFC - strb r5, [r3] - movs r0, 0x14 - strb r0, [r3, 0x1] - movs r0, 0x6 - strb r0, [r3, 0x2] - adds r3, 0x3 - ldr r0, _08142CC0 @ =gTasks - ldr r4, [sp, 0xC] - add r4, r8 - lsls r4, 3 - adds r4, r0 - movs r0, 0xA - ldrsh r1, [r4, r0] - adds r0, r3, 0 - bl ConvertIntToDecimalString - adds r3, r0, 0 - strb r5, [r3] - movs r0, 0x13 - strb r0, [r3, 0x1] - movs r0, 0xF0 - strb r0, [r3, 0x2] - movs r0, 0xFF - strb r0, [r3, 0x3] - ldr r0, _08142CB8 @ =gStringVar1 - movs r1, 0 - movs r2, 0 - bl MenuPrint - ldr r0, _08142CC4 @ =sub_8142CC8 - str r0, [r4] - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08142CB0: .4byte 0xffff0000 -_08142CB4: .4byte 0x0000735f -_08142CB8: .4byte gStringVar1 -_08142CBC: .4byte gMenuText_HOFNumber -_08142CC0: .4byte gTasks -_08142CC4: .4byte sub_8142CC8 - thumb_func_end sub_8142B04 - - thumb_func_start sub_8142CC8 -sub_8142CC8: @ 8142CC8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _08142DD0 @ =0x0201e000 - mov r8, r0 - movs r3, 0 - ldr r1, _08142DD4 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - movs r2, 0x8 - ldrsh r0, [r0, r2] - cmp r3, r0 - bge _08142CFE - adds r1, r0, 0 -_08142CF0: - movs r0, 0x78 - add r8, r0 - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, r1 - blt _08142CF0 -_08142CFE: - movs r3, 0 - lsls r6, r4, 2 - adds r0, r6, r4 - lsls r5, r0, 3 - ldr r1, _08142DD8 @ =gTasks + 0x8 - mov r10, r1 - ldr r2, _08142DDC @ =gSprites - mov r12, r2 - movs r0, 0xD - negs r0, r0 - mov r9, r0 - movs r7, 0x4 -_08142D16: - adds r0, r3, 0x5 - lsls r0, 1 - adds r0, r5 - add r0, r10 - ldrh r1, [r0] - cmp r1, 0xFF - beq _08142D36 - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - add r0, r12 - ldrb r2, [r0, 0x5] - mov r1, r9 - ands r1, r2 - orrs r1, r7 - strb r1, [r0, 0x5] -_08142D36: - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, 0x5 - bls _08142D16 - adds r1, r6, r4 - lsls r1, 3 - ldr r2, _08142DD4 @ =gTasks - adds r5, r1, r2 - movs r2, 0xC - ldrsh r0, [r5, r2] - adds r0, 0x5 - lsls r0, 1 - adds r0, r1 - ldr r1, _08142DD4 @ =gTasks - adds r1, 0x8 - adds r0, r1 - ldrh r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, _08142DDC @ =gSprites - adds r0, r1 - ldrb r2, [r0, 0x5] - movs r1, 0xD - negs r1, r1 - ands r1, r2 - strb r1, [r0, 0x5] - lsrs r1, 4 - movs r0, 0x80 - lsls r0, 9 - lsls r0, r1 - ldr r1, _08142DE0 @ =0xffff0000 - eors r0, r1 - ldr r2, _08142DE4 @ =gUnknown_0203931C - str r0, [r2] - ldr r2, _08142DE8 @ =0x0000735f - movs r1, 0xC - bl BlendPalettesUnfaded - movs r0, 0xC - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - mov r1, r8 - adds r4, r1, r0 - ldrh r1, [r4, 0x8] - ldr r0, _08142DEC @ =0x000001ff - ands r0, r1 - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - beq _08142DB2 - bl StopCryAndClearCrySongs - ldrh r0, [r4, 0x8] - lsls r0, 23 - lsrs r0, 23 - movs r1, 0 - bl PlayCry1 -_08142DB2: - adds r0, r4, 0 - movs r1, 0 - movs r2, 0xE - bl sub_8143088 - ldr r0, _08142DF0 @ =sub_8142DF4 - str r0, [r5] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08142DD0: .4byte 0x0201e000 -_08142DD4: .4byte gTasks -_08142DD8: .4byte gTasks + 0x8 -_08142DDC: .4byte gSprites -_08142DE0: .4byte 0xffff0000 -_08142DE4: .4byte gUnknown_0203931C -_08142DE8: .4byte 0x0000735f -_08142DEC: .4byte 0x000001ff -_08142DF0: .4byte sub_8142DF4 - thumb_func_end sub_8142CC8 - - thumb_func_start sub_8142DF4 -sub_8142DF4: @ 8142DF4 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - lsls r0, 24 - lsrs r6, r0, 24 - ldr r1, _08142E88 @ =gMain - ldrh r2, [r1, 0x2E] - movs r0, 0x1 - ands r0, r2 - adds r3, r1, 0 - cmp r0, 0 - beq _08142EC4 - ldr r7, _08142E8C @ =gTasks - lsls r0, r6, 2 - adds r1, r0, r6 - lsls r3, r1, 3 - adds r4, r3, r7 - ldrh r2, [r4, 0x8] - movs r5, 0x8 - ldrsh r1, [r4, r5] - mov r8, r0 - cmp r1, 0 - beq _08142E98 - subs r0, r2, 0x1 - strh r0, [r4, 0x8] - movs r5, 0 - adds r7, 0x8 - mov r9, r7 - adds r7, r3, 0 -_08142E30: - adds r0, r5, 0x5 - lsls r0, 1 - adds r0, r7 - add r0, r9 - ldrb r1, [r0] - cmp r1, 0xFF - beq _08142E5E - ldr r0, _08142E90 @ =gSprites - lsls r4, r1, 4 - adds r4, r1 - lsls r4, 2 - adds r4, r0 - ldrb r0, [r4, 0x5] - lsrs r0, 4 - bl GetSpritePaletteTagByPaletteNum - lsls r0, 16 - lsrs r0, 16 - bl FreeSpritePaletteByTag - adds r0, r4, 0 - bl DestroySprite -_08142E5E: - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - cmp r5, 0x5 - bls _08142E30 - ldr r0, _08142E8C @ =gTasks - mov r2, r8 - adds r1, r2, r6 - lsls r1, 3 - adds r1, r0 - ldrh r2, [r1, 0xA] - movs r3, 0xA - ldrsh r0, [r1, r3] - cmp r0, 0 - beq _08142E80 - subs r0, r2, 0x1 - strh r0, [r1, 0xA] -_08142E80: - ldr r0, _08142E94 @ =sub_8142B04 - str r0, [r1] - b _08142F64 - .align 2, 0 -_08142E88: .4byte gMain -_08142E8C: .4byte gTasks -_08142E90: .4byte gSprites -_08142E94: .4byte sub_8142B04 -_08142E98: - bl IsCryPlayingOrClearCrySongs - lsls r0, 24 - cmp r0, 0 - beq _08142EB2 - bl StopCryAndClearCrySongs - ldr r0, _08142EB8 @ =gMPlay_BGM - ldr r1, _08142EBC @ =0x0000ffff - movs r2, 0x80 - lsls r2, 1 - bl m4aMPlayVolumeControl -_08142EB2: - ldr r0, _08142EC0 @ =sub_8142F78 - str r0, [r4] - b _08142F64 - .align 2, 0 -_08142EB8: .4byte gMPlay_BGM -_08142EBC: .4byte 0x0000ffff -_08142EC0: .4byte sub_8142F78 -_08142EC4: - movs r0, 0x2 - ands r0, r2 - cmp r0, 0 - beq _08142F08 - bl IsCryPlayingOrClearCrySongs - lsls r0, 24 - cmp r0, 0 - beq _08142EE6 - bl StopCryAndClearCrySongs - ldr r0, _08142EF8 @ =gMPlay_BGM - ldr r1, _08142EFC @ =0x0000ffff - movs r2, 0x80 - lsls r2, 1 - bl m4aMPlayVolumeControl -_08142EE6: - ldr r0, _08142F00 @ =gTasks - lsls r1, r6, 2 - adds r1, r6 - lsls r1, 3 - adds r1, r0 - ldr r0, _08142F04 @ =sub_8142F78 - str r0, [r1] - b _08142F64 - .align 2, 0 -_08142EF8: .4byte gMPlay_BGM -_08142EFC: .4byte 0x0000ffff -_08142F00: .4byte gTasks -_08142F04: .4byte sub_8142F78 -_08142F08: - movs r0, 0x40 - ands r0, r2 - cmp r0, 0 - beq _08142F38 - ldr r0, _08142F30 @ =gTasks - lsls r1, r6, 2 - adds r1, r6 - lsls r1, 3 - adds r1, r0 - ldrh r2, [r1, 0xC] - movs r4, 0xC - ldrsh r0, [r1, r4] - cmp r0, 0 - beq _08142F38 - subs r0, r2, 0x1 - strh r0, [r1, 0xC] - ldr r0, _08142F34 @ =sub_8142CC8 - str r0, [r1] - b _08142F64 - .align 2, 0 -_08142F30: .4byte gTasks -_08142F34: .4byte sub_8142CC8 -_08142F38: - ldrh r1, [r3, 0x2E] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08142F64 - ldr r1, _08142F70 @ =gTasks - lsls r0, r6, 2 - adds r0, r6 - lsls r0, 3 - adds r2, r0, r1 - movs r5, 0xC - ldrsh r1, [r2, r5] - movs r3, 0x10 - ldrsh r0, [r2, r3] - subs r0, 0x1 - cmp r1, r0 - bge _08142F64 - ldrh r0, [r2, 0xC] - adds r0, 0x1 - strh r0, [r2, 0xC] - ldr r0, _08142F74 @ =sub_8142CC8 - str r0, [r2] -_08142F64: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08142F70: .4byte gTasks -_08142F74: .4byte sub_8142CC8 - thumb_func_end sub_8142DF4 - - thumb_func_start sub_8142F78 -sub_8142F78: @ 8142F78 - push {r4-r6,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r0, _08142FB4 @ =gPlttBufferFaded - ldr r1, _08142FB8 @ =gPlttBufferUnfaded - movs r2, 0x80 - lsls r2, 2 - bl CpuSet - ldr r0, _08142FBC @ =0x0201c000 - adds r2, r0, 0 - ldr r1, _08142FC0 @ =gUnknown_0840B57C - ldm r1!, {r3,r5,r6} - stm r2!, {r3,r5,r6} - ldm r1!, {r3,r5} - stm r2!, {r3,r5} - bl sub_80C5E38 - ldr r1, _08142FC4 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, _08142FC8 @ =sub_8142FCC - str r1, [r0] - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_08142FB4: .4byte gPlttBufferFaded -_08142FB8: .4byte gPlttBufferUnfaded -_08142FBC: .4byte 0x0201c000 -_08142FC0: .4byte gUnknown_0840B57C -_08142FC4: .4byte gTasks -_08142FC8: .4byte sub_8142FCC - thumb_func_end sub_8142F78 - - thumb_func_start sub_8142FCC -sub_8142FCC: @ 8142FCC - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - bl sub_80C5F98 - lsls r0, 24 - cmp r0, 0 - beq _08142FE6 - adds r0, r4, 0 - bl DestroyTask - bl ReturnFromHallOfFamePC -_08142FE6: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8142FCC - - thumb_func_start sub_8142FEC -sub_8142FEC: @ 8142FEC - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0x2 - movs r1, 0xE - movs r2, 0x1B - movs r3, 0x13 - bl MenuDrawTextWindow - ldr r0, _08143020 @ =gMenuText_HOFCorrupt - movs r1, 0x3 - movs r2, 0xF - bl MenuPrintMessage - ldr r1, _08143024 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, _08143028 @ =sub_814302C - str r1, [r0] - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08143020: .4byte gMenuText_HOFCorrupt -_08143024: .4byte gTasks -_08143028: .4byte sub_814302C - thumb_func_end sub_8142FEC - - thumb_func_start sub_814302C -sub_814302C: @ 814302C - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - beq _08143056 - ldr r0, _0814305C @ =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08143056 - ldr r0, _08143060 @ =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r1, r0 - ldr r0, _08143064 @ =sub_8142F78 - str r0, [r1] -_08143056: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0814305C: .4byte gMain -_08143060: .4byte gTasks -_08143064: .4byte sub_8142F78 - thumb_func_end sub_814302C - - thumb_func_start sub_8143068 -sub_8143068: @ 8143068 - push {lr} - lsls r2, r1, 24 - ldr r0, _08143084 @ =gMenuText_WelcomeToHOFAndDexRating - movs r1, 0x80 - lsls r1, 17 - adds r2, r1 - lsrs r2, 24 - movs r1, 0 - movs r3, 0xF0 - bl sub_8072BD8 - pop {r0} - bx r0 - .align 2, 0 -_08143084: .4byte gMenuText_WelcomeToHOFAndDexRating - thumb_func_end sub_8143068 - - thumb_func_start sub_8143088 -sub_8143088: @ 8143088 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x14 - mov r9, r0 - lsls r1, 24 - lsrs r1, 24 - mov r8, r1 - lsls r2, 24 - lsrs r2, 24 - mov r10, r2 - ldr r7, _08143188 @ =gStringVar1 - movs r0, 0xFC - strb r0, [r7] - movs r0, 0x13 - strb r0, [r7, 0x1] - movs r0, 0x28 - strb r0, [r7, 0x2] - movs r0, 0xFF - strb r0, [r7, 0x3] - mov r0, r9 - ldrh r2, [r0, 0x8] - ldr r0, _0814318C @ =0x000001ff - ands r0, r2 - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - beq _081430EA - lsls r0, r2, 23 - lsrs r0, 23 - bl SpeciesToPokedexNum - lsls r0, 16 - lsrs r6, r0, 16 - ldr r0, _08143190 @ =0x0000ffff - cmp r6, r0 - beq _081430EA - ldr r1, _08143194 @ =gOtherText_Number2 - adds r0, r7, 0 - bl StringCopy - adds r7, r0, 0 - adds r1, r6, 0 - movs r2, 0x2 - movs r3, 0x3 - bl ConvertIntToDecimalStringN -_081430EA: - ldr r5, _08143188 @ =gStringVar1 - mov r1, r8 - adds r1, 0x4 - lsls r1, 24 - lsrs r1, 24 - mov r4, r10 - adds r4, 0x1 - lsls r2, r4, 24 - lsrs r2, 24 - adds r0, r5, 0 - bl MenuPrint - adds r7, r5, 0 - movs r3, 0 - mov r1, r9 - ldrb r0, [r1, 0xA] - str r4, [sp] - mov r2, r8 - adds r2, 0x9 - str r2, [sp, 0xC] - mov r6, r10 - adds r6, 0x3 - str r6, [sp, 0x8] - cmp r0, 0xFF - beq _0814313A - mov r2, r9 - adds r2, 0xA -_08143120: - adds r1, r7, r3 - adds r0, r2, r3 - ldrb r0, [r0] - strb r0, [r1] - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, 0x9 - bhi _0814313A - adds r0, r2, r3 - ldrb r0, [r0] - cmp r0, 0xFF - bne _08143120 -_0814313A: - adds r7, r3 - movs r2, 0xFF - strb r2, [r7] - mov r1, r9 - ldrh r0, [r1, 0x8] - ldr r1, _0814318C @ =0x000001ff - ands r1, r0 - movs r0, 0xCE - lsls r0, 1 - cmp r1, r0 - bne _08143198 - movs r0, 0xFC - strb r0, [r7] - movs r0, 0x13 - strb r0, [r7, 0x1] - movs r0, 0xA0 - strb r0, [r7, 0x2] - strb r2, [r7, 0x3] - ldr r0, _08143188 @ =gStringVar1 - ldr r2, [sp, 0xC] - lsls r1, r2, 24 - lsrs r1, 24 - ldr r3, [sp] - lsls r2, r3, 24 - lsrs r2, 24 - bl MenuPrint - ldr r6, [sp, 0x8] - lsls r1, r6, 24 - lsrs r1, 24 - mov r3, r10 - adds r3, 0x4 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0 - movs r2, 0x1D - bl MenuZeroFillWindowRect - b _081432E4 - .align 2, 0 -_08143188: .4byte gStringVar1 -_0814318C: .4byte 0x000001ff -_08143190: .4byte 0x0000ffff -_08143194: .4byte gOtherText_Number2 -_08143198: - movs r0, 0xFC - strb r0, [r7] - movs r0, 0x13 - strb r0, [r7, 0x1] - movs r0, 0x3E - strb r0, [r7, 0x2] - adds r7, 0x3 - movs r0, 0xBA - strb r0, [r7] - adds r7, 0x1 - movs r3, 0 - ldr r2, _08143238 @ =gSpeciesNames - mov r1, r9 - ldrh r0, [r1, 0x8] - lsls r0, 23 - lsrs r0, 23 - movs r1, 0xB - muls r0, r1 - adds r0, r2 - ldrb r0, [r0] - mov r6, r8 - adds r6, 0x7 - str r6, [sp, 0x4] - mov r1, r8 - adds r1, 0xD - str r1, [sp, 0x10] - cmp r0, 0xFF - beq _08143204 - adds r5, r2, 0 - movs r4, 0xB -_081431D4: - adds r1, r7, r3 - mov r6, r9 - ldrh r0, [r6, 0x8] - lsls r0, 23 - lsrs r0, 23 - muls r0, r4 - adds r0, r3, r0 - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1] - adds r0, r3, 0x1 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, 0x9 - bhi _08143204 - ldrh r0, [r6, 0x8] - lsls r0, 23 - lsrs r0, 23 - muls r0, r4 - adds r0, r3, r0 - adds r0, r2 - ldrb r0, [r0] - cmp r0, 0xFF - bne _081431D4 -_08143204: - adds r7, r3 - movs r0, 0 - strb r0, [r7] - adds r7, 0x1 - mov r1, r9 - ldrh r0, [r1, 0x8] - ldr r1, _0814323C @ =0x000001ff - ands r1, r0 - cmp r1, 0x20 - beq _0814324A - cmp r1, 0x1D - beq _0814324A - lsls r0, 23 - lsrs r0, 23 - mov r2, r9 - ldr r1, [r2, 0x4] - bl GetGenderFromSpeciesAndPersonality - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _08143240 - cmp r0, 0xFE - beq _08143244 - b _0814324A - .align 2, 0 -_08143238: .4byte gSpeciesNames -_0814323C: .4byte 0x000001ff -_08143240: - movs r0, 0xB5 - b _08143246 -_08143244: - movs r0, 0xB6 -_08143246: - strb r0, [r7] - adds r7, 0x1 -_0814324A: - movs r4, 0xFC - strb r4, [r7] - movs r3, 0x13 - mov r8, r3 - strb r3, [r7, 0x1] - movs r0, 0xA0 - strb r0, [r7, 0x2] - movs r6, 0xFF - mov r10, r6 - strb r6, [r7, 0x3] - ldr r5, _081432F4 @ =gStringVar1 - ldr r0, [sp, 0xC] - lsls r1, r0, 24 - lsrs r1, 24 - ldr r3, [sp] - lsls r2, r3, 24 - lsrs r2, 24 - adds r0, r5, 0 - bl MenuPrint - mov r6, r9 - ldrb r0, [r6, 0x9] - lsrs r6, r0, 1 - ldr r1, _081432F8 @ =gOtherText_Level3 - adds r0, r5, 0 - bl StringCopy - adds r7, r0, 0 - strb r4, [r7] - movs r0, 0x14 - strb r0, [r7, 0x1] - movs r0, 0x6 - strb r0, [r7, 0x2] - adds r7, 0x3 - adds r0, r7, 0 - adds r1, r6, 0 - movs r2, 0 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - adds r7, r0, 0 - strb r4, [r7] - mov r0, r8 - strb r0, [r7, 0x1] - movs r0, 0x30 - strb r0, [r7, 0x2] - mov r1, r10 - strb r1, [r7, 0x3] - ldr r2, [sp, 0x4] - lsls r1, r2, 24 - lsrs r1, 24 - ldr r3, [sp, 0x8] - lsls r4, r3, 24 - lsrs r4, 24 - adds r0, r5, 0 - adds r2, r4, 0 - bl MenuPrint - mov r0, r9 - ldrh r6, [r0] - ldr r1, _081432FC @ =gOtherText_IDNumber - adds r0, r5, 0 - bl StringCopy - adds r7, r0, 0 - adds r1, r6, 0 - movs r2, 0x2 - movs r3, 0x5 - bl ConvertIntToDecimalStringN - ldr r2, [sp, 0x10] - lsls r1, r2, 24 - lsrs r1, 24 - adds r0, r5, 0 - adds r2, r4, 0 - bl MenuPrint -_081432E4: - add sp, 0x14 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_081432F4: .4byte gStringVar1 -_081432F8: .4byte gOtherText_Level3 -_081432FC: .4byte gOtherText_IDNumber - thumb_func_end sub_8143088 - - thumb_func_start sub_8143300 -sub_8143300: @ 8143300 - push {r4-r6,lr} - mov r6, r10 - mov r5, r9 - mov r4, r8 - push {r4-r6} - adds r5, r0, 0 - adds r4, r1, 0 - lsls r5, 24 - lsls r4, 24 - ldr r0, _081433CC @ =gOtherText_Name - lsrs r1, r5, 24 - mov r8, r1 - movs r2, 0x80 - lsls r2, 17 - adds r5, r2 - lsrs r5, 24 - lsrs r6, r4, 24 - adds r4, r2 - lsrs r4, 24 - adds r1, r5, 0 - adds r2, r4, 0 - bl MenuPrint - ldr r0, _081433D0 @ =gSaveBlock2 - mov r10, r0 - movs r1, 0xE - add r8, r1 - mov r2, r8 - lsls r2, 24 - lsrs r2, 24 - mov r8, r2 - mov r1, r8 - adds r2, r4, 0 - bl MenuPrint_RightAligned - ldr r0, _081433D4 @ =gOtherText_IDNumber2 - adds r4, r6, 0x3 - lsls r4, 24 - lsrs r4, 24 - adds r1, r5, 0 - adds r2, r4, 0 - bl MenuPrint - mov r0, r10 - ldrb r1, [r0, 0xA] - ldrb r0, [r0, 0xB] - lsls r0, 8 - orrs r1, r0 - ldr r2, _081433D8 @ =gStringVar1 - mov r9, r2 - mov r0, r9 - movs r2, 0x2 - movs r3, 0x5 - bl ConvertIntToDecimalStringN - mov r0, r9 - mov r1, r8 - adds r2, r4, 0 - bl MenuPrint_RightAligned - ldr r0, _081433DC @ =gMainMenuString_Time - adds r6, 0x5 - lsls r6, 24 - lsrs r6, 24 - adds r1, r5, 0 - adds r2, r6, 0 - bl MenuPrint - mov r0, r10 - ldrh r1, [r0, 0xE] - mov r0, r9 - bl ConvertIntToDecimalString - adds r2, r0, 0 - movs r1, 0 - strb r1, [r2] - movs r0, 0xF0 - strb r0, [r2, 0x1] - strb r1, [r2, 0x2] - adds r2, 0x3 - mov r0, r10 - ldrb r1, [r0, 0x10] - adds r0, r2, 0 - movs r2, 0x2 - movs r3, 0x2 - bl ConvertIntToDecimalStringN - adds r2, r0, 0 - movs r0, 0xFF - strb r0, [r2] - mov r0, r9 - mov r1, r8 - adds r2, r6, 0 - bl MenuPrint_RightAligned - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_081433CC: .4byte gOtherText_Name -_081433D0: .4byte gSaveBlock2 -_081433D4: .4byte gOtherText_IDNumber2 -_081433D8: .4byte gStringVar1 -_081433DC: .4byte gMainMenuString_Time - thumb_func_end sub_8143300 - - thumb_func_start sub_81433E0 -sub_81433E0: @ 81433E0 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x8 - movs r0, 0x80 - lsls r0, 19 - movs r1, 0 - strh r1, [r0] - adds r0, 0x8 - strh r1, [r0] - adds r0, 0x8 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - subs r0, 0x8 - strh r1, [r0] - adds r0, 0xA - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - subs r0, 0xA - strh r1, [r0] - adds r0, 0xC - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - subs r0, 0xC - strh r1, [r0] - adds r0, 0xE - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - movs r3, 0xC0 - lsls r3, 19 - movs r4, 0xC0 - lsls r4, 9 - add r0, sp, 0x4 - mov r8, r0 - ldr r1, _0814354C @ =gHallOfFame_Gfx - mov r9, r1 - mov r2, sp - movs r6, 0 - ldr r1, _08143550 @ =0x040000d4 - movs r5, 0x80 - lsls r5, 5 - ldr r7, _08143554 @ =0x81000800 - movs r0, 0x81 - lsls r0, 24 - mov r12, r0 -_08143444: - strh r6, [r2] - mov r0, sp - str r0, [r1] - str r3, [r1, 0x4] - str r7, [r1, 0x8] - ldr r0, [r1, 0x8] - adds r3, r5 - subs r4, r5 - cmp r4, r5 - bhi _08143444 - strh r6, [r2] - mov r2, sp - str r2, [r1] - str r3, [r1, 0x4] - lsrs r0, r4, 1 - mov r2, r12 - orrs r0, r2 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - movs r0, 0xE0 - lsls r0, 19 - movs r3, 0x80 - lsls r3, 3 - movs r4, 0 - str r4, [sp, 0x4] - ldr r2, _08143550 @ =0x040000d4 - mov r1, r8 - str r1, [r2] - str r0, [r2, 0x4] - lsrs r0, r3, 2 - movs r1, 0x85 - lsls r1, 24 - orrs r0, r1 - str r0, [r2, 0x8] - ldr r0, [r2, 0x8] - movs r1, 0xA0 - lsls r1, 19 - mov r0, sp - strh r4, [r0] - str r0, [r2] - str r1, [r2, 0x4] - lsrs r3, 1 - movs r0, 0x81 - lsls r0, 24 - orrs r3, r0 - str r3, [r2, 0x8] - ldr r0, [r2, 0x8] - movs r1, 0xC0 - lsls r1, 19 - mov r0, r9 - bl LZ77UnCompVram - movs r1, 0 - ldr r3, _08143558 @ =0x06003800 - movs r2, 0x1 -_081434B2: - lsls r0, r1, 1 - adds r0, r3 - strh r2, [r0] - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0x3F - bls _081434B2 - movs r1, 0 - ldr r5, _0814355C @ =0x02000000 - ldr r3, _08143560 @ =0x06003b80 - movs r2, 0x1 -_081434CA: - lsls r0, r1, 1 - adds r0, r3 - strh r2, [r0] - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0xBF - bls _081434CA - movs r1, 0 - ldr r4, _08143564 @ =0x06003000 - movs r3, 0x2 - ldr r2, _08143568 @ =0x000003ff -_081434E2: - lsls r0, r1, 1 - adds r0, r4 - strh r3, [r0] - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, r2 - bls _081434E2 - adds r2, r5, 0 - movs r3, 0x80 - lsls r3, 7 - mov r4, sp - movs r6, 0 - ldr r1, _08143550 @ =0x040000d4 - movs r5, 0x80 - lsls r5, 5 - ldr r7, _08143554 @ =0x81000800 - movs r0, 0x81 - lsls r0, 24 - mov r12, r0 -_0814350A: - strh r6, [r4] - mov r0, sp - str r0, [r1] - str r2, [r1, 0x4] - str r7, [r1, 0x8] - ldr r0, [r1, 0x8] - adds r2, r5 - subs r3, r5 - cmp r3, r5 - bhi _0814350A - strh r6, [r4] - mov r0, sp - str r0, [r1] - str r2, [r1, 0x4] - lsrs r0, r3, 1 - mov r2, r12 - orrs r0, r2 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - bl ResetPaletteFade - ldr r0, _0814356C @ =gHallOfFame_Pal - movs r1, 0 - movs r2, 0x20 - bl LoadPalette - add sp, 0x8 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0814354C: .4byte gHallOfFame_Gfx -_08143550: .4byte 0x040000d4 -_08143554: .4byte 0x81000800 -_08143558: .4byte 0x06003800 -_0814355C: .4byte 0x02000000 -_08143560: .4byte 0x06003b80 -_08143564: .4byte 0x06003000 -_08143568: .4byte 0x000003ff -_0814356C: .4byte gHallOfFame_Pal - thumb_func_end sub_81433E0 - - thumb_func_start sub_8143570 -sub_8143570: @ 8143570 - push {r4,lr} - bl remove_some_task - bl ResetTasks - bl ResetSpriteData - bl FreeAllSpritePalettes - ldr r1, _081435A8 @ =gReservedSpritePaletteCount - movs r0, 0x8 - strb r0, [r1] - ldr r0, _081435AC @ =gUnknown_0840B514 - bl LoadCompressedObjectPic - ldr r0, _081435B0 @ =gUnknown_0840B524 - bl LoadCompressedObjectPalette - ldr r4, _081435B4 @ =gWindowConfig_81E71B4 - adds r0, r4, 0 - bl SetUpWindowConfig - adds r0, r4, 0 - bl InitMenuWindow - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_081435A8: .4byte gReservedSpritePaletteCount -_081435AC: .4byte gUnknown_0840B514 -_081435B0: .4byte gUnknown_0840B524 -_081435B4: .4byte gWindowConfig_81E71B4 - thumb_func_end sub_8143570 - - thumb_func_start sub_81435B8 -sub_81435B8: @ 81435B8 - ldr r1, _081435D8 @ =REG_BG1CNT - movs r2, 0xE0 - lsls r2, 3 - adds r0, r2, 0 - strh r0, [r1] - adds r1, 0x4 - subs r2, 0xFD - adds r0, r2, 0 - strh r0, [r1] - subs r1, 0xE - movs r2, 0xDA - lsls r2, 5 - adds r0, r2, 0 - strh r0, [r1] - bx lr - .align 2, 0 -_081435D8: .4byte REG_BG1CNT - thumb_func_end sub_81435B8 - - thumb_func_start sub_81435DC -sub_81435DC: @ 81435DC - push {r4,lr} - adds r2, r0, 0 - ldr r1, [r2, 0x20] - ldr r0, [r2, 0x30] - cmp r1, r0 - beq _08143632 - ldrh r3, [r2, 0x20] - movs r1, 0x20 - ldrsh r0, [r2, r1] - movs r4, 0x30 - ldrsh r1, [r2, r4] - cmp r0, r1 - bge _081435FC - adds r0, r3, 0 - adds r0, 0xF - strh r0, [r2, 0x20] -_081435FC: - ldrh r3, [r2, 0x20] - movs r4, 0x20 - ldrsh r0, [r2, r4] - cmp r0, r1 - ble _0814360C - adds r0, r3, 0 - subs r0, 0xF - strh r0, [r2, 0x20] -_0814360C: - ldrh r3, [r2, 0x22] - movs r1, 0x22 - ldrsh r0, [r2, r1] - movs r4, 0x32 - ldrsh r1, [r2, r4] - cmp r0, r1 - bge _08143620 - adds r0, r3, 0 - adds r0, 0xA - strh r0, [r2, 0x22] -_08143620: - ldrh r3, [r2, 0x22] - movs r4, 0x22 - ldrsh r0, [r2, r4] - cmp r0, r1 - ble _0814363A - adds r0, r3, 0 - subs r0, 0xA - strh r0, [r2, 0x22] - b _0814363A -_08143632: - movs r0, 0x1 - strh r0, [r2, 0x2E] - ldr r0, _08143640 @ =nullsub_81 - str r0, [r2, 0x1C] -_0814363A: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08143640: .4byte nullsub_81 - thumb_func_end sub_81435DC - - thumb_func_start nullsub_81 -nullsub_81: @ 8143644 - bx lr - thumb_func_end nullsub_81 - - thumb_func_start sub_8143648 -sub_8143648: @ 8143648 - push {r4-r7,lr} - lsls r1, 24 - ldr r4, _08143670 @ =gUnknown_02024E8C - adds r3, r4, 0 - ldr r2, _08143674 @ =gUnknown_0840B6B8 - ldm r2!, {r5-r7} - stm r3!, {r5-r7} - ldm r2!, {r5-r7} - stm r3!, {r5-r7} - strh r0, [r4, 0x2] - ldr r0, _08143678 @ =gUnknown_0840B69C - lsrs r1, 22 - adds r1, r0 - ldr r0, [r1] - str r0, [r4, 0xC] - ldr r0, _0814367C @ =gSpriteAnimTable_81E7C64 - str r0, [r4, 0x8] - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08143670: .4byte gUnknown_02024E8C -_08143674: .4byte gUnknown_0840B6B8 -_08143678: .4byte gUnknown_0840B69C -_0814367C: .4byte gSpriteAnimTable_81E7C64 - thumb_func_end sub_8143648 - - thumb_func_start sub_8143680 -sub_8143680: @ 8143680 - push {r4-r7,lr} - lsls r1, 24 - ldr r4, _081436AC @ =gUnknown_02024E8C - adds r3, r4, 0 - ldr r2, _081436B0 @ =gUnknown_0840B6B8 - ldm r2!, {r5-r7} - stm r3!, {r5-r7} - ldm r2!, {r5-r7} - stm r3!, {r5-r7} - strh r0, [r4, 0x2] - ldr r0, _081436B4 @ =gUnknown_0840B69C - lsrs r1, 22 - adds r1, r0 - ldr r0, [r1] - str r0, [r4, 0xC] - ldr r0, _081436B8 @ =gUnknown_081EC2A4 - ldr r0, [r0] - str r0, [r4, 0x8] - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_081436AC: .4byte gUnknown_02024E8C -_081436B0: .4byte gUnknown_0840B6B8 -_081436B4: .4byte gUnknown_0840B69C -_081436B8: .4byte gUnknown_081EC2A4 - thumb_func_end sub_8143680 - - thumb_func_start sub_81436BC -sub_81436BC: @ 81436BC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - adds r6, r0, 0 - mov r9, r1 - mov r10, r2 - mov r8, r3 - ldr r7, [sp, 0x34] - lsls r6, 16 - lsrs r6, 16 - mov r0, r9 - lsls r0, 16 - lsrs r0, 16 - mov r9, r0 - mov r1, r10 - lsls r1, 16 - lsrs r1, 16 - mov r10, r1 - mov r2, r8 - lsls r2, 16 - lsrs r2, 16 - mov r8, r2 - lsls r0, r6, 3 - ldr r1, _08143790 @ =gMonFrontPicTable - adds r0, r1 - ldr r1, _08143794 @ =gMonFrontPicCoords - lsls r2, r6, 2 - adds r2, r1 - ldrb r1, [r2] - ldrb r2, [r2, 0x1] - movs r3, 0x80 - lsls r3, 18 - ldr r4, _08143798 @ =gUnknown_0840B5A0 - mov r12, r4 - mov r5, r8 - lsls r4, r5, 2 - add r4, r12 - ldr r4, [r4] - str r4, [sp] - str r6, [sp, 0x4] - str r7, [sp, 0x8] - movs r4, 0x1 - str r4, [sp, 0xC] - bl sub_800D378 - adds r0, r6, 0 - ldr r1, [sp, 0x30] - adds r2, r7, 0 - bl species_and_otid_get_pal - lsls r4, r5, 4 - movs r2, 0x80 - lsls r2, 1 - adds r1, r4, r2 - lsls r1, 16 - lsrs r1, 16 - movs r2, 0x20 - bl LoadCompressedPalette - lsls r1, r5, 24 - lsrs r1, 24 - mov r0, r8 - bl sub_8143648 - ldr r0, _0814379C @ =gUnknown_02024E8C - mov r5, r9 - lsls r5, 16 - asrs r5, 16 - mov r9, r5 - mov r1, r10 - lsls r1, 16 - asrs r1, 16 - mov r10, r1 - movs r3, 0xA - mov r2, r8 - subs r3, r2 - lsls r3, 24 - lsrs r3, 24 - mov r1, r9 - mov r2, r10 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - ldr r1, _081437A0 @ =gSprites - lsls r2, r0, 4 - adds r2, r0 - lsls r2, 2 - adds r2, r1 - ldrb r3, [r2, 0x5] - movs r1, 0xF - ands r1, r3 - orrs r1, r4 - strb r1, [r2, 0x5] - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_08143790: .4byte gMonFrontPicTable -_08143794: .4byte gMonFrontPicCoords -_08143798: .4byte gUnknown_0840B5A0 -_0814379C: .4byte gUnknown_02024E8C -_081437A0: .4byte gSprites - thumb_func_end sub_81436BC - - thumb_func_start sub_81437A4 -sub_81437A4: @ 81437A4 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x8 - mov r9, r1 - mov r10, r2 - adds r6, r3, 0 - lsls r0, 16 - lsrs r0, 16 - lsls r1, 16 - lsrs r1, 16 - mov r9, r1 - lsls r2, 16 - lsrs r2, 16 - mov r10, r2 - lsls r6, 16 - lsrs r6, 16 - lsls r7, r0, 3 - ldr r1, _08143854 @ =gTrainerFrontPicTable - mov r8, r1 - add r8, r7 - ldr r1, _08143858 @ =gTrainerFrontPicCoords - lsls r2, r0, 2 - adds r2, r1 - ldrb r1, [r2] - ldrb r2, [r2, 0x1] - movs r3, 0x80 - lsls r3, 18 - ldr r5, _0814385C @ =gUnknown_0840B5A0 - lsls r4, r6, 2 - adds r4, r5 - ldr r4, [r4] - str r4, [sp] - str r0, [sp, 0x4] - mov r0, r8 - bl DecompressPicFromTable_2 - ldr r0, _08143860 @ =gTrainerFrontPicPaletteTable - adds r0, r7, r0 - ldr r0, [r0] - lsls r4, r6, 4 - movs r2, 0x80 - lsls r2, 1 - adds r1, r4, r2 - lsls r1, 16 - lsrs r1, 16 - movs r2, 0x20 - bl LoadCompressedPalette - lsls r1, r6, 24 - lsrs r1, 24 - adds r0, r6, 0 - bl sub_8143680 - ldr r0, _08143864 @ =gUnknown_02024E8C - mov r1, r9 - lsls r1, 16 - asrs r1, 16 - mov r9, r1 - mov r2, r10 - lsls r2, 16 - asrs r2, 16 - mov r10, r2 - movs r3, 0x1 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - ldr r1, _08143868 @ =gSprites - lsls r2, r0, 4 - adds r2, r0 - lsls r2, 2 - adds r2, r1 - ldrb r3, [r2, 0x5] - movs r1, 0xF - ands r1, r3 - orrs r1, r4 - strb r1, [r2, 0x5] - add sp, 0x8 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_08143854: .4byte gTrainerFrontPicTable -_08143858: .4byte gTrainerFrontPicCoords -_0814385C: .4byte gUnknown_0840B5A0 -_08143860: .4byte gTrainerFrontPicPaletteTable -_08143864: .4byte gUnknown_02024E8C -_08143868: .4byte gSprites - thumb_func_end sub_81437A4 - - thumb_func_start sub_814386C -sub_814386C: @ 814386C - push {r4,r5,lr} - adds r5, r0, 0 - ldrh r1, [r5, 0x26] - movs r2, 0x26 - ldrsh r0, [r5, r2] - cmp r0, 0x78 - ble _08143882 - adds r0, r5, 0 - bl DestroySprite - b _081438BA -_08143882: - adds r0, r1, 0x1 - ldrh r1, [r5, 0x30] - adds r0, r1 - strh r0, [r5, 0x26] - ldrh r4, [r5, 0x2E] - lsls r4, 24 - lsrs r4, 24 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - ands r0, r1 - adds r0, 0x8 - ldr r1, _081438C0 @ =gSineTable - lsls r4, 1 - adds r4, r1 - movs r2, 0 - ldrsh r1, [r4, r2] - muls r0, r1 - cmp r0, 0 - bge _081438B0 - adds r0, 0xFF -_081438B0: - asrs r0, 8 - strh r0, [r5, 0x24] - ldrh r0, [r5, 0x2E] - adds r0, 0x4 - strh r0, [r5, 0x2E] -_081438BA: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_081438C0: .4byte gSineTable - thumb_func_end sub_814386C - - thumb_func_start sub_81438C4 -sub_81438C4: @ 81438C4 - push {r4,lr} - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xF0 - bl __umodsi3 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - bl Random - adds r2, r0, 0 - lsls r2, 16 - lsrs r2, 16 - movs r0, 0x7 - ands r2, r0 - negs r2, r2 - ldr r0, _08143934 @ =gSpriteTemplate_840B7A4 - lsls r4, 16 - asrs r4, 16 - lsls r2, 16 - asrs r2, 16 - adds r1, r4, 0 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - ldr r0, _08143938 @ =gSprites - adds r4, r1, r0 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x11 - bl __umodsi3 - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl StartSpriteAnim - bl Random - movs r1, 0x3 - ands r1, r0 - cmp r1, 0 - beq _0814393C - movs r0, 0 - b _0814393E - .align 2, 0 -_08143934: .4byte gSpriteTemplate_840B7A4 -_08143938: .4byte gSprites -_0814393C: - movs r0, 0x1 -_0814393E: - strh r0, [r4, 0x30] - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81438C4 - - thumb_func_start sub_8143948 -sub_8143948: @ 8143948 - push {lr} - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - pop {r0} - bx r0 - thumb_func_end sub_8143948 - - thumb_func_start sub_814395C -sub_814395C: @ 814395C - push {lr} - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - ldr r0, _081439B8 @ =gMain - ldrh r1, [r0, 0x2C] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _081439B2 - ldr r0, _081439BC @ =gUnknown_02039324 - ldrb r0, [r0] - cmp r0, 0 - beq _081439B2 - ldr r2, _081439C0 @ =gTasks - ldr r0, _081439C4 @ =gUnknown_02039322 - ldrh r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - ldr r1, [r0] - ldr r0, _081439C8 @ =sub_8143B68 - cmp r1, r0 - bne _081439B2 - bl sub_8143948 - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - ldr r1, _081439CC @ =gUnknown_02039325 - movs r0, 0x1 - strb r0, [r1] -_081439B2: - pop {r0} - bx r0 - .align 2, 0 -_081439B8: .4byte gMain -_081439BC: .4byte gUnknown_02039324 -_081439C0: .4byte gTasks -_081439C4: .4byte gUnknown_02039322 -_081439C8: .4byte sub_8143B68 -_081439CC: .4byte gUnknown_02039325 - thumb_func_end sub_814395C - - thumb_func_start sub_81439D0 -sub_81439D0: @ 81439D0 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - bl sub_8144130 - movs r0, 0 - bl SetVBlankCallback - bl ResetPaletteFade - bl ResetTasks - ldr r0, _08143AF0 @ =sub_8143B38 - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r7, r0, 24 - ldr r1, _08143AF4 @ =gTasks - lsls r0, r7, 2 - adds r0, r7 - lsls r0, 3 - adds r0, r1 - movs r1, 0 - strh r1, [r0, 0x10] - strh r1, [r0, 0x16] - strh r1, [r0, 0x1E] - movs r1, 0x1 - strh r1, [r0, 0x22] -_08143A0E: - movs r0, 0 - adds r1, r7, 0 - bl sub_8144ECC - lsls r0, 24 - cmp r0, 0 - beq _08143A0E - ldr r6, _08143AF4 @ =gTasks - lsls r5, r7, 2 - adds r5, r7 - lsls r5, 3 - adds r5, r6 - movs r0, 0xA - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - movs r1, 0 - mov r9, r1 - movs r2, 0 - mov r8, r2 - movs r1, 0x28 - strh r1, [r0, 0x8] - ldr r4, _08143AF8 @ =gWindowConfig_81E7208 - adds r0, r4, 0 - bl SetUpWindowConfig - adds r0, r4, 0 - bl InitMenuWindow - ldr r0, _08143AFC @ =gUnknown_0840B7BC - movs r1, 0x80 - movs r2, 0x40 - bl LoadPalette - ldr r0, _08143B00 @ =gUnknown_0840B7FC - ldr r1, _08143B04 @ =0x0600bee0 - movs r2, 0x20 - bl CpuSet - ldr r1, _08143B08 @ =REG_BG0VOFS - ldr r2, _08143B0C @ =0x0000fffc - adds r0, r2, 0 - strh r0, [r1] - ldr r0, _08143B10 @ =sub_81441B8 - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r6 - strh r7, [r1, 0xA] - strh r0, [r5, 0x26] - movs r0, 0x1 - negs r0, r0 - mov r1, r8 - str r1, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r3, _08143B14 @ =0x04000208 - ldrh r2, [r3] - mov r0, r8 - strh r0, [r3] - ldr r4, _08143B18 @ =0x04000200 - ldrh r0, [r4] - movs r1, 0x1 - orrs r0, r1 - strh r0, [r4] - strh r2, [r3] - ldr r2, _08143B1C @ =REG_DISPSTAT - ldrh r0, [r2] - movs r1, 0x8 - orrs r0, r1 - strh r0, [r2] - ldr r0, _08143B20 @ =sub_8143948 - bl SetVBlankCallback - ldr r0, _08143B24 @ =0x000001c7 - bl m4aSongNumStart - ldr r0, _08143B28 @ =sub_814395C - bl SetMainCallback2 - ldr r0, _08143B2C @ =gUnknown_02039325 - mov r1, r9 - strb r1, [r0] - ldr r4, _08143B30 @ =0x0201c000 - bl sub_81458DC - adds r0, r4, 0 - adds r0, 0x88 - mov r2, r8 - strh r2, [r0] - adds r0, 0x2 - strh r2, [r0] - adds r0, 0x2 - strh r2, [r0] - ldr r0, _08143B34 @ =gUnknown_02039322 - strh r7, [r0] - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08143AF0: .4byte sub_8143B38 -_08143AF4: .4byte gTasks -_08143AF8: .4byte gWindowConfig_81E7208 -_08143AFC: .4byte gUnknown_0840B7BC -_08143B00: .4byte gUnknown_0840B7FC -_08143B04: .4byte 0x0600bee0 -_08143B08: .4byte REG_BG0VOFS -_08143B0C: .4byte 0x0000fffc -_08143B10: .4byte sub_81441B8 -_08143B14: .4byte 0x04000208 -_08143B18: .4byte 0x04000200 -_08143B1C: .4byte REG_DISPSTAT -_08143B20: .4byte sub_8143948 -_08143B24: .4byte 0x000001c7 -_08143B28: .4byte sub_814395C -_08143B2C: .4byte gUnknown_02039325 -_08143B30: .4byte 0x0201c000 -_08143B34: .4byte gUnknown_02039322 - thumb_func_end sub_81439D0 - - thumb_func_start sub_8143B38 -sub_8143B38: @ 8143B38 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, _08143B5C @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08143B58 - ldr r0, _08143B60 @ =gTasks - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 3 - adds r1, r0 - ldr r0, _08143B64 @ =sub_8143B68 - str r0, [r1] -_08143B58: - pop {r0} - bx r0 - .align 2, 0 -_08143B5C: .4byte gPaletteFade -_08143B60: .4byte gTasks -_08143B64: .4byte sub_8143B68 - thumb_func_end sub_8143B38 - - thumb_func_start sub_8143B68 -sub_8143B68: @ 8143B68 - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - ldr r2, _08143B9C @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r4, r1, r2 - movs r0, 0x10 - ldrsh r1, [r4, r0] - cmp r1, 0 - beq _08143BA4 - movs r3, 0xA - ldrsh r1, [r4, r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - movs r1, 0x1E - strh r1, [r0, 0x8] - movs r0, 0x80 - lsls r0, 1 - strh r0, [r4, 0x20] - ldr r0, _08143BA0 @ =sub_8143EBC - b _08143BEE - .align 2, 0 -_08143B9C: .4byte gTasks -_08143BA0: .4byte sub_8143EBC -_08143BA4: - ldr r0, _08143BCC @ =gUnknown_02039320 - strh r1, [r0] - ldrh r2, [r4, 0x1E] - movs r3, 0x1E - ldrsh r0, [r4, r3] - cmp r0, 0x1 - bne _08143BD4 - strh r2, [r4, 0x22] - strh r1, [r4, 0x1E] - movs r0, 0x1 - negs r0, r0 - str r1, [sp] - movs r1, 0 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r0, _08143BD0 @ =sub_8143BFC - b _08143BEE - .align 2, 0 -_08143BCC: .4byte gUnknown_02039320 -_08143BD0: .4byte sub_8143BFC -_08143BD4: - cmp r0, 0x2 - bne _08143BF0 - strh r2, [r4, 0x22] - strh r1, [r4, 0x1E] - movs r0, 0x1 - negs r0, r0 - str r1, [sp] - movs r1, 0 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r0, _08143BF8 @ =sub_8143CC0 -_08143BEE: - str r0, [r4] -_08143BF0: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08143BF8: .4byte sub_8143CC0 - thumb_func_end sub_8143B68 - - thumb_func_start sub_8143BFC -sub_8143BFC: @ 8143BFC - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _08143C34 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08143C2C - movs r0, 0x80 - lsls r0, 19 - strh r1, [r0] - adds r0, r4, 0 - bl sub_81450AC - ldr r1, _08143C38 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, _08143C3C @ =c2_080C9BFC - str r1, [r0] -_08143C2C: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08143C34: .4byte gPaletteFade -_08143C38: .4byte gTasks -_08143C3C: .4byte c2_080C9BFC - thumb_func_end sub_8143BFC - - thumb_func_start c2_080C9BFC -c2_080C9BFC: @ 8143C40 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0 - bl SetVBlankCallback - ldr r1, _08143CA8 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r5, r0, r1 - ldrb r0, [r5, 0x16] - adds r1, r4, 0 - bl sub_8144ECC - lsls r0, 24 - cmp r0, 0 - beq _08143CA0 - movs r0, 0x1 - negs r0, r0 - movs r4, 0 - str r4, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r3, _08143CAC @ =0x04000208 - ldrh r2, [r3] - strh r4, [r3] - ldr r4, _08143CB0 @ =0x04000200 - ldrh r0, [r4] - movs r1, 0x1 - orrs r0, r1 - strh r0, [r4] - strh r2, [r3] - ldr r2, _08143CB4 @ =REG_DISPSTAT - ldrh r0, [r2] - movs r1, 0x8 - orrs r0, r1 - strh r0, [r2] - ldr r0, _08143CB8 @ =sub_8143948 - bl SetVBlankCallback - ldr r0, _08143CBC @ =sub_8143B38 - str r0, [r5] -_08143CA0: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08143CA8: .4byte gTasks -_08143CAC: .4byte 0x04000208 -_08143CB0: .4byte 0x04000200 -_08143CB4: .4byte REG_DISPSTAT -_08143CB8: .4byte sub_8143948 -_08143CBC: .4byte sub_8143B38 - thumb_func_end c2_080C9BFC - - thumb_func_start sub_8143CC0 -sub_8143CC0: @ 8143CC0 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _08143CF8 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08143CF0 - movs r0, 0x80 - lsls r0, 19 - strh r1, [r0] - adds r0, r4, 0 - bl sub_81450AC - ldr r1, _08143CFC @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, _08143D00 @ =sub_8143D04 - str r1, [r0] -_08143CF0: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08143CF8: .4byte gPaletteFade -_08143CFC: .4byte gTasks -_08143D00: .4byte sub_8143D04 - thumb_func_end sub_8143CC0 - - thumb_func_start sub_8143D04 -sub_8143D04: @ 8143D04 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r6, r0, 24 - ldr r0, _08143DC8 @ =gMain - ldr r1, _08143DCC @ =0x0000043c - adds r1, r0 - mov r8, r1 - ldrb r7, [r1] - cmp r7, 0 - beq _08143D24 - cmp r7, 0x1 - beq _08143E0C -_08143D24: - bl ResetSpriteData - bl FreeAllSpritePalettes - ldr r1, _08143DD0 @ =gReservedSpritePaletteCount - movs r0, 0x8 - strb r0, [r1] - ldr r0, _08143DD4 @ =gBirchHelpGfx - movs r1, 0xC0 - lsls r1, 19 - bl LZ77UnCompVram - ldr r0, _08143DD8 @ =gBirchGrassTilemap - ldr r1, _08143DDC @ =0x06003800 - bl LZ77UnCompVram - ldr r0, _08143DE0 @ =gBirchBagGrassPal + 0x2 - movs r1, 0x1 - movs r2, 0x3E - bl LoadPalette - movs r1, 0 - ldr r4, _08143DE4 @ =0x0201e000 - movs r3, 0x11 - ldr r2, _08143DE8 @ =0x000007ff -_08143D56: - adds r0, r1, r4 - strb r3, [r0] - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, r2 - bls _08143D56 - movs r1, 0 - ldr r2, _08143DEC @ =0x0201f800 - ldr r6, _08143DF0 @ =gUnknown_0840CAA0 - ldr r0, _08143DF4 @ =0xfffff000 - adds r5, r2, r0 - movs r4, 0x22 - ldr r3, _08143DE8 @ =0x000007ff -_08143D72: - adds r0, r1, r5 - strb r4, [r0] - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, r3 - bls _08143D72 - movs r1, 0 - ldr r5, _08143DF8 @ =0x0201f000 - movs r4, 0x33 - ldr r3, _08143DE8 @ =0x000007ff -_08143D88: - adds r0, r1, r5 - strb r4, [r0] - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, r3 - bls _08143D88 - movs r0, 0 - strh r0, [r2] - ldr r1, _08143DFC @ =0x000053ff - adds r0, r1, 0 - strh r0, [r2, 0x2] - ldr r1, _08143E00 @ =0x0000529f - adds r0, r1, 0 - strh r0, [r2, 0x4] - ldr r1, _08143E04 @ =0x00007e94 - adds r0, r1, 0 - strh r0, [r2, 0x6] - adds r0, r6, 0 - bl LoadSpriteSheet - ldr r0, _08143E08 @ =gUnknown_0840CAB0 - bl LoadSpritePalette - ldr r1, _08143DC8 @ =gMain - ldr r2, _08143DCC @ =0x0000043c - adds r1, r2 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08143E90 - .align 2, 0 -_08143DC8: .4byte gMain -_08143DCC: .4byte 0x0000043c -_08143DD0: .4byte gReservedSpritePaletteCount -_08143DD4: .4byte gBirchHelpGfx -_08143DD8: .4byte gBirchGrassTilemap -_08143DDC: .4byte 0x06003800 -_08143DE0: .4byte gBirchBagGrassPal + 0x2 -_08143DE4: .4byte 0x0201e000 -_08143DE8: .4byte 0x000007ff -_08143DEC: .4byte 0x0201f800 -_08143DF0: .4byte gUnknown_0840CAA0 -_08143DF4: .4byte 0xfffff000 -_08143DF8: .4byte 0x0201f000 -_08143DFC: .4byte 0x000053ff -_08143E00: .4byte 0x0000529f -_08143E04: .4byte 0x00007e94 -_08143E08: .4byte gUnknown_0840CAB0 -_08143E0C: - ldr r0, _08143EA0 @ =sub_8144514 - movs r1, 0 - bl CreateTask - ldr r2, _08143EA4 @ =gTasks - lsls r4, r6, 2 - adds r4, r6 - lsls r4, 3 - adds r4, r2 - lsls r0, 24 - lsrs r0, 24 - movs r1, 0 - mov r9, r1 - movs r5, 0 - strh r0, [r4, 0xE] - movs r0, 0xE - ldrsh r1, [r4, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - strh r7, [r0, 0x8] - movs r0, 0xE - ldrsh r1, [r4, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - strh r6, [r0, 0xA] - movs r0, 0xE - ldrsh r1, [r4, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - ldrh r1, [r4, 0x16] - strh r1, [r0, 0xC] - movs r0, 0x1 - negs r0, r0 - str r5, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r0, _08143EA8 @ =REG_BG3HOFS - strh r5, [r0] - ldr r1, _08143EAC @ =REG_BG3VOFS - movs r0, 0x20 - strh r0, [r1] - subs r1, 0x10 - ldr r2, _08143EB0 @ =0x00000703 - adds r0, r2, 0 - strh r0, [r1] - subs r1, 0xE - movs r2, 0xCA - lsls r2, 5 - adds r0, r2, 0 - strh r0, [r1] - mov r1, r9 - mov r0, r8 - strb r1, [r0] - ldr r0, _08143EB4 @ =gUnknown_0203935C - strh r5, [r0] - ldr r0, _08143EB8 @ =sub_8143B38 - str r0, [r4] -_08143E90: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08143EA0: .4byte sub_8144514 -_08143EA4: .4byte gTasks -_08143EA8: .4byte REG_BG3HOFS -_08143EAC: .4byte REG_BG3VOFS -_08143EB0: .4byte 0x00000703 -_08143EB4: .4byte gUnknown_0203935C -_08143EB8: .4byte sub_8143B38 - thumb_func_end sub_8143D04 - - thumb_func_start sub_8143EBC -sub_8143EBC: @ 8143EBC - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - ldr r2, _08143EE0 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r4, r1, r2 - ldrh r0, [r4, 0x20] - movs r2, 0x20 - ldrsh r1, [r4, r2] - cmp r1, 0 - beq _08143EE4 - subs r0, 0x1 - strh r0, [r4, 0x20] - b _08143EF8 - .align 2, 0 -_08143EE0: .4byte gTasks -_08143EE4: - movs r0, 0x1 - negs r0, r0 - str r1, [sp] - movs r1, 0xC - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r0, _08143F00 @ =sub_8143F04 - str r0, [r4] -_08143EF8: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08143F00: .4byte sub_8143F04 - thumb_func_end sub_8143EBC - - thumb_func_start sub_8143F04 -sub_8143F04: @ 8143F04 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _08143F30 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08143F2A - adds r0, r4, 0 - bl sub_81450AC - ldr r0, _08143F34 @ =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r1, r0 - ldr r0, _08143F38 @ =sub_8143F3C - str r0, [r1] -_08143F2A: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08143F30: .4byte gPaletteFade -_08143F34: .4byte gTasks -_08143F38: .4byte sub_8143F3C - thumb_func_end sub_8143F04 - - thumb_func_start sub_8143F3C -sub_8143F3C: @ 8143F3C - push {r4,r5,lr} - sub sp, 0x4 - adds r5, r0, 0 - lsls r5, 24 - lsrs r5, 24 - bl sub_8144130 - bl ResetPaletteFade - movs r1, 0xE0 - lsls r1, 6 - movs r0, 0 - movs r2, 0 - bl sub_8145128 - bl ResetSpriteData - bl FreeAllSpritePalettes - movs r0, 0x1 - negs r0, r0 - movs r4, 0 - str r4, [sp] - movs r1, 0x8 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r1, _08143FC4 @ =REG_BG0CNT - movs r2, 0xE0 - lsls r2, 3 - adds r0, r2, 0 - strh r0, [r1] - ldr r3, _08143FC8 @ =0x04000208 - ldrh r2, [r3] - strh r4, [r3] - ldr r4, _08143FCC @ =0x04000200 - ldrh r0, [r4] - movs r1, 0x1 - orrs r0, r1 - strh r0, [r4] - strh r2, [r3] - ldr r2, _08143FD0 @ =REG_DISPSTAT - ldrh r0, [r2] - movs r1, 0x8 - orrs r0, r1 - strh r0, [r2] - movs r1, 0x80 - lsls r1, 19 - movs r2, 0xA0 - lsls r2, 1 - adds r0, r2, 0 - strh r0, [r1] - ldr r1, _08143FD4 @ =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r1 - movs r1, 0x80 - lsls r1, 1 - strh r1, [r0, 0x8] - ldr r1, _08143FD8 @ =sub_8143FDC - str r1, [r0] - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08143FC4: .4byte REG_BG0CNT -_08143FC8: .4byte 0x04000208 -_08143FCC: .4byte 0x04000200 -_08143FD0: .4byte REG_DISPSTAT -_08143FD4: .4byte gTasks -_08143FD8: .4byte sub_8143FDC - thumb_func_end sub_8143F3C - - thumb_func_start sub_8143FDC -sub_8143FDC: @ 8143FDC - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - ldr r2, _08144000 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r4, r1, r2 - ldrh r0, [r4, 0x8] - movs r2, 0x8 - ldrsh r1, [r4, r2] - cmp r1, 0 - beq _08144004 - subs r0, 0x1 - strh r0, [r4, 0x8] - b _08144018 - .align 2, 0 -_08144000: .4byte gTasks -_08144004: - movs r0, 0x1 - negs r0, r0 - str r1, [sp] - movs r1, 0x6 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r0, _08144020 @ =sub_8144024 - str r0, [r4] -_08144018: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08144020: .4byte sub_8144024 - thumb_func_end sub_8143FDC - - thumb_func_start sub_8144024 -sub_8144024: @ 8144024 - push {r4,r5,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r5, r0, 24 - ldr r0, _08144074 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - bne _0814406A - movs r0, 0xE0 - lsls r0, 6 - movs r1, 0 - bl sub_81452D0 - movs r0, 0x1 - negs r0, r0 - str r4, [sp] - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r1, _08144078 @ =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r1 - movs r1, 0xE1 - lsls r1, 5 - strh r1, [r0, 0x8] - ldr r1, _0814407C @ =sub_8144080 - str r1, [r0] -_0814406A: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08144074: .4byte gPaletteFade -_08144078: .4byte gTasks -_0814407C: .4byte sub_8144080 - thumb_func_end sub_8144024 - - thumb_func_start sub_8144080 -sub_8144080: @ 8144080 - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, _081440CC @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08144104 - ldr r1, _081440D0 @ =gTasks - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r4, r0, r1 - movs r0, 0x8 - ldrsh r1, [r4, r0] - cmp r1, 0 - beq _081440AE - ldr r0, _081440D4 @ =gMain - ldrh r0, [r0, 0x2E] - cmp r0, 0 - beq _081440E0 -_081440AE: - movs r0, 0x4 - bl FadeOutBGM - movs r0, 0x1 - negs r0, r0 - ldr r1, _081440D8 @ =0x0000ffff - str r1, [sp] - movs r1, 0x8 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r0, _081440DC @ =sub_8144114 - str r0, [r4] - b _08144104 - .align 2, 0 -_081440CC: .4byte gPaletteFade -_081440D0: .4byte gTasks -_081440D4: .4byte gMain -_081440D8: .4byte 0x0000ffff -_081440DC: .4byte sub_8144114 -_081440E0: - ldr r0, _0814410C @ =0x00001be8 - cmp r1, r0 - bne _081440EC - movs r0, 0x8 - bl FadeOutBGM -_081440EC: - movs r0, 0x8 - ldrsh r1, [r4, r0] - ldr r0, _08144110 @ =0x00001ab8 - cmp r1, r0 - bne _081440FE - movs r0, 0xE4 - lsls r0, 1 - bl m4aSongNumStart -_081440FE: - ldrh r0, [r4, 0x8] - subs r0, 0x1 - strh r0, [r4, 0x8] -_08144104: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0814410C: .4byte 0x00001be8 -_08144110: .4byte 0x00001ab8 - thumb_func_end sub_8144080 - - thumb_func_start sub_8144114 -sub_8144114: @ 8144114 - push {lr} - ldr r0, _0814412C @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08144128 - movs r0, 0xFF - bl SoftReset -_08144128: - pop {r0} - bx r0 - .align 2, 0 -_0814412C: .4byte gPaletteFade - thumb_func_end sub_8144114 - - thumb_func_start sub_8144130 -sub_8144130: @ 8144130 - sub sp, 0x8 - movs r0, 0x80 - lsls r0, 19 - movs r1, 0 - strh r1, [r0] - adds r0, 0x1C - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - subs r0, 0x6 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - subs r0, 0x6 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - subs r0, 0x6 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - adds r0, 0x3E - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - mov r0, sp - strh r1, [r0] - ldr r1, _081441A4 @ =0x040000d4 - str r0, [r1] - movs r0, 0xC0 - lsls r0, 19 - str r0, [r1, 0x4] - ldr r0, _081441A8 @ =0x8100c000 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - movs r2, 0 - str r2, [sp, 0x4] - add r0, sp, 0x4 - str r0, [r1] - movs r0, 0xE0 - lsls r0, 19 - str r0, [r1, 0x4] - ldr r0, _081441AC @ =0x85000100 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - mov r0, sp - strh r2, [r0] - str r0, [r1] - ldr r0, _081441B0 @ =0x05000002 - str r0, [r1, 0x4] - ldr r0, _081441B4 @ =0x810001ff - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - add sp, 0x8 - bx lr - .align 2, 0 -_081441A4: .4byte 0x040000d4 -_081441A8: .4byte 0x8100c000 -_081441AC: .4byte 0x85000100 -_081441B0: .4byte 0x05000002 -_081441B4: .4byte 0x810001ff - thumb_func_end sub_8144130 - - thumb_func_start sub_81441B8 -sub_81441B8: @ 81441B8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r5, r0, 24 - ldr r1, _081441E4 @ =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r1 - movs r2, 0x8 - ldrsh r0, [r0, r2] - adds r6, r1, 0 - cmp r0, 0xA - bhi _08144218 - lsls r0, 2 - ldr r1, _081441E8 @ =_081441EC - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_081441E4: .4byte gTasks -_081441E8: .4byte _081441EC - .align 2, 0 -_081441EC: - .4byte _08144218 - .4byte _08144258 - .4byte _08144278 - .4byte _08144358 - .4byte _0814438C - .4byte _081443F8 - .4byte _08144218 - .4byte _08144218 - .4byte _08144218 - .4byte _08144218 - .4byte _08144428 -_08144218: - ldr r0, _08144250 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0 - beq _0814422A - b _08144446 -_0814422A: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r6 - movs r1, 0x1 - strh r1, [r0, 0x8] - movs r1, 0x58 - strh r1, [r0, 0xE] - movs r3, 0xA - ldrsh r1, [r0, r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - strh r2, [r0, 0x24] - ldr r0, _08144254 @ =gUnknown_02039320 - strh r2, [r0] - b _08144446 - .align 2, 0 -_08144250: .4byte gPaletteFade -_08144254: .4byte gUnknown_02039320 -_08144258: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r1, r0, r6 - ldrh r2, [r1, 0xE] - movs r3, 0xE - ldrsh r0, [r1, r3] - cmp r0, 0 - beq _08144270 - subs r0, r2, 0x1 - strh r0, [r1, 0xE] - b _08144446 -_08144270: - ldrh r0, [r1, 0x8] - adds r0, 0x1 - strh r0, [r1, 0x8] - b _08144446 -_08144278: - movs r2, 0x80 - lsls r2, 19 - ldrh r1, [r2] - ldr r0, _08144320 @ =0x0000feff - ands r0, r1 - strh r0, [r2] - lsls r2, r5, 2 - adds r0, r2, r5 - lsls r0, 3 - adds r3, r0, r6 - movs r0, 0xA - ldrsh r1, [r3, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r4, r0, r6 - ldr r1, [r4] - ldr r0, _08144324 @ =sub_8143B68 - mov r8, r2 - cmp r1, r0 - bne _08144352 - movs r1, 0xC - ldrsh r0, [r3, r1] - cmp r0, 0x33 - bgt _0814434C - movs r4, 0 - ldr r7, _08144328 @ =gCreditsEntryPointerTable - adds r6, r3, 0 -_081442B0: - movs r2, 0xC - ldrsh r1, [r6, r2] - lsls r0, r1, 2 - adds r0, r1 - adds r0, r4 - lsls r0, 2 - adds r0, r7 - ldr r0, [r0] - ldr r0, [r0, 0x4] - lsls r2, r4, 25 - movs r3, 0x90 - lsls r3, 20 - adds r2, r3 - lsrs r2, 24 - movs r1, 0 - movs r3, 0xF0 - bl sub_8072BD8 - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0x4 - bls _081442B0 - ldr r3, _0814432C @ =gTasks - mov r0, r8 - adds r1, r0, r5 - lsls r1, 3 - adds r1, r3 - ldrh r0, [r1, 0xC] - adds r0, 0x1 - strh r0, [r1, 0xC] - ldrh r0, [r1, 0x8] - adds r0, 0x1 - strh r0, [r1, 0x8] - movs r0, 0xA - ldrsh r2, [r1, r0] - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r3 - movs r2, 0x1 - strh r2, [r0, 0x24] - movs r2, 0xA - ldrsh r1, [r1, r2] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r3 - movs r3, 0x22 - ldrsh r0, [r0, r3] - cmp r0, 0x1 - bne _08144334 - movs r0, 0xC0 - lsls r0, 2 - ldr r1, _08144330 @ =0x0000328d - b _0814433A - .align 2, 0 -_08144320: .4byte 0x0000feff -_08144324: .4byte sub_8143B68 -_08144328: .4byte gCreditsEntryPointerTable -_0814432C: .4byte gTasks -_08144330: .4byte 0x0000328d -_08144334: - movs r0, 0xC0 - lsls r0, 2 - ldr r1, _08144348 @ =0x00001967 -_0814433A: - str r1, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - b _08144446 - .align 2, 0 -_08144348: .4byte 0x00001967 -_0814434C: - movs r0, 0xA - strh r0, [r3, 0x8] - b _08144446 -_08144352: - movs r0, 0 - strh r0, [r4, 0x24] - b _08144446 -_08144358: - movs r2, 0x80 - lsls r2, 19 - ldrh r0, [r2] - movs r3, 0x80 - lsls r3, 1 - adds r1, r3, 0 - orrs r0, r1 - strh r0, [r2] - ldr r0, _08144388 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08144446 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r6 - movs r1, 0x82 - strh r1, [r0, 0xE] - ldrh r1, [r0, 0x8] - adds r1, 0x1 - strh r1, [r0, 0x8] - b _08144446 - .align 2, 0 -_08144388: .4byte gPaletteFade -_0814438C: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r4, r0, r6 - ldrh r1, [r4, 0xE] - movs r2, 0xE - ldrsh r0, [r4, r2] - cmp r0, 0 - beq _081443A4 - subs r0, r1, 0x1 - strh r0, [r4, 0xE] - b _08144446 -_081443A4: - ldrb r0, [r4, 0xC] - ldrb r1, [r4, 0xA] - bl sub_8144454 - lsls r0, 24 - cmp r0, 0 - beq _081443BA - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - b _08144446 -_081443BA: - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - movs r3, 0xA - ldrsh r1, [r4, r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - movs r1, 0x22 - ldrsh r0, [r0, r1] - cmp r0, 0x1 - bne _081443E0 - movs r0, 0xC0 - lsls r0, 2 - ldr r1, _081443DC @ =0x0000328d - b _081443E6 - .align 2, 0 -_081443DC: .4byte 0x0000328d -_081443E0: - movs r0, 0xC0 - lsls r0, 2 - ldr r1, _081443F4 @ =0x00001967 -_081443E6: - str r1, [sp] - movs r1, 0 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - b _08144446 - .align 2, 0 -_081443F4: .4byte 0x00001967 -_081443F8: - ldr r0, _08144420 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08144446 - movs r0, 0 - movs r1, 0x9 - movs r2, 0x1D - movs r3, 0x13 - bl MenuZeroFillWindowRect - ldr r0, _08144424 @ =gTasks - lsls r1, r5, 2 - adds r1, r5 - lsls r1, 3 - adds r1, r0 - movs r0, 0x2 - strh r0, [r1, 0x8] - b _08144446 - .align 2, 0 -_08144420: .4byte gPaletteFade -_08144424: .4byte gTasks -_08144428: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r6 - movs r2, 0xA - ldrsh r1, [r0, r2] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - movs r1, 0x1 - strh r1, [r0, 0x10] - adds r0, r5, 0 - bl DestroyTask -_08144446: - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_81441B8 - - thumb_func_start sub_8144454 -sub_8144454: @ 8144454 - push {r4-r6,lr} - lsls r0, 24 - lsrs r3, r0, 24 - adds r6, r3, 0 - lsls r1, 24 - lsrs r2, r1, 24 - adds r5, r2, 0 - ldr r4, _08144508 @ =gTasks - cmp r3, 0x6 - bne _08144474 - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r4 - movs r1, 0x2 - strh r1, [r0, 0x1E] -_08144474: - cmp r3, 0xC - bne _08144486 - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r4 - movs r1, 0x1 - strh r1, [r0, 0x16] - strh r1, [r0, 0x1E] -_08144486: - cmp r3, 0x12 - bne _08144496 - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r4 - movs r1, 0x2 - strh r1, [r0, 0x1E] -_08144496: - cmp r3, 0x18 - bne _081444AA - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r4 - movs r1, 0x2 - strh r1, [r0, 0x16] - movs r1, 0x1 - strh r1, [r0, 0x1E] -_081444AA: - cmp r3, 0x1E - bne _081444BA - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r4 - movs r1, 0x2 - strh r1, [r0, 0x1E] -_081444BA: - cmp r3, 0x23 - bne _081444CE - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r4 - movs r1, 0x3 - strh r1, [r0, 0x16] - movs r1, 0x1 - strh r1, [r0, 0x1E] -_081444CE: - cmp r3, 0x28 - bne _081444DE - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r4 - movs r1, 0x2 - strh r1, [r0, 0x1E] -_081444DE: - cmp r6, 0x2E - bne _081444F2 - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r4 - movs r1, 0x4 - strh r1, [r0, 0x16] - movs r1, 0x1 - strh r1, [r0, 0x1E] -_081444F2: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r4 - movs r1, 0x1E - ldrsh r0, [r0, r1] - cmp r0, 0 - bne _0814450C - movs r0, 0 - b _0814450E - .align 2, 0 -_08144508: .4byte gTasks -_0814450C: - movs r0, 0x1 -_0814450E: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8144454 - - thumb_func_start sub_8144514 -sub_8144514: @ 8144514 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldr r6, _08144548 @ =0x0201c000 - ldr r3, _0814454C @ =gTasks - lsls r0, 2 - add r0, r8 - lsls r0, 3 - adds r2, r0, r3 - movs r1, 0x8 - ldrsh r0, [r2, r1] - cmp r0, 0x1 - beq _08144550 - cmp r0, 0x1 - bgt _0814453C - b _08144658 -_0814453C: - cmp r0, 0x2 - beq _08144584 - cmp r0, 0x3 - bne _08144546 - b _08144644 -_08144546: - b _08144658 - .align 2, 0 -_08144548: .4byte 0x0201c000 -_0814454C: .4byte gTasks -_08144550: - adds r0, r6, 0 - adds r0, 0x8A - ldrh r0, [r0] - cmp r0, 0 - bne _0814456E - movs r4, 0xA - ldrsh r0, [r2, r4] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r3 - movs r4, 0x24 - ldrsh r0, [r1, r4] - cmp r0, 0 - beq _08144658 -_0814456E: - movs r0, 0xA - ldrsh r1, [r2, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r3 - movs r1, 0 - strh r1, [r0, 0x24] - ldrh r0, [r2, 0x8] - adds r0, 0x1 - b _08144656 -_08144584: - adds r0, r6, 0 - adds r0, 0x88 - ldrh r1, [r0] - mov r9, r0 - cmp r1, 0x44 - beq _08144658 - movs r4, 0xA - ldrsh r1, [r2, r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r3 - ldr r1, [r0] - ldr r0, _081445EC @ =sub_8143B68 - cmp r1, r0 - bne _08144658 - adds r7, r6, 0 - adds r7, 0x8C - ldrh r0, [r7] - lsls r0, 1 - adds r0, r6 - ldrh r0, [r0] - ldr r4, _081445F0 @ =gUnknown_0840CA00 - adds r5, r6, 0 - adds r5, 0x8A - ldrh r3, [r5] - lsls r2, r3, 1 - adds r1, r2, r4 - ldrb r1, [r1] - adds r4, 0x1 - adds r2, r4 - ldrb r2, [r2] - bl sub_81456B4 - lsls r0, 24 - lsrs r2, r0, 24 - ldrh r1, [r7] - adds r0, r6, 0 - adds r0, 0x8E - ldrh r0, [r0] - subs r0, 0x1 - cmp r1, r0 - bge _081445F8 - adds r0, r1, 0x1 - strh r0, [r7] - ldr r1, _081445F4 @ =gSprites - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r0, r1 - movs r1, 0x32 - b _0814460A - .align 2, 0 -_081445EC: .4byte sub_8143B68 -_081445F0: .4byte gUnknown_0840CA00 -_081445F4: .4byte gSprites -_081445F8: - movs r0, 0 - strh r0, [r7] - ldr r1, _08144620 @ =gSprites - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r0, r1 - movs r1, 0x80 - lsls r1, 2 -_0814460A: - strh r1, [r0, 0x34] - mov r1, r9 - ldrh r0, [r1] - adds r0, 0x1 - strh r0, [r1] - ldrh r0, [r5] - cmp r0, 0x2 - bne _08144624 - movs r0, 0 - b _08144626 - .align 2, 0 -_08144620: .4byte gSprites -_08144624: - adds r0, 0x1 -_08144626: - strh r0, [r5] - ldr r0, _08144640 @ =gTasks - mov r2, r8 - lsls r1, r2, 2 - add r1, r8 - lsls r1, 3 - adds r1, r0 - movs r0, 0x32 - strh r0, [r1, 0xE] - ldrh r0, [r1, 0x8] - adds r0, 0x1 - strh r0, [r1, 0x8] - b _08144658 - .align 2, 0 -_08144640: .4byte gTasks -_08144644: - ldrh r1, [r2, 0xE] - movs r3, 0xE - ldrsh r0, [r2, r3] - cmp r0, 0 - beq _08144654 - subs r0, r1, 0x1 - strh r0, [r2, 0xE] - b _08144658 -_08144654: - movs r0, 0x1 -_08144656: - strh r0, [r2, 0x8] -_08144658: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8144514 - - thumb_func_start sub_8144664 -sub_8144664: @ 8144664 - push {r4-r7,lr} - lsls r0, 24 - lsrs r5, r0, 24 - ldr r1, _0814468C @ =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r1 - movs r2, 0x8 - ldrsh r0, [r0, r2] - adds r6, r1, 0 - cmp r0, 0x32 - bls _08144680 - b _0814492C -_08144680: - lsls r0, 2 - ldr r1, _08144690 @ =_08144694 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_0814468C: .4byte gTasks -_08144690: .4byte _08144694 - .align 2, 0 -_08144694: - .4byte _08144760 - .4byte _08144784 - .4byte _081447D8 - .4byte _081447F0 - .4byte _0814482C - .4byte _08144850 - .4byte _0814489C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _081448A8 - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _081448C8 - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _081448EC - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _0814492C - .4byte _08144920 -_08144760: - lsls r4, r5, 2 - adds r4, r5 - lsls r4, 3 - adds r4, r6 - ldrh r0, [r4, 0x12] - lsls r0, 16 - asrs r0, 17 - movs r1, 0x7F - ands r0, r1 - movs r1, 0xC - bl Sin - ldr r1, _08144780 @ =gUnknown_0203935A - strh r0, [r1] - b _081447A8 - .align 2, 0 -_08144780: .4byte gUnknown_0203935A -_08144784: - ldr r7, _081447B0 @ =gUnknown_0203935A - movs r3, 0 - ldrsh r4, [r7, r3] - cmp r4, 0 - beq _081447B4 - lsls r4, r5, 2 - adds r4, r5 - lsls r4, 3 - adds r4, r6 - ldrh r0, [r4, 0x12] - lsls r0, 16 - asrs r0, 17 - movs r1, 0x7F - ands r0, r1 - movs r1, 0xC - bl Sin - strh r0, [r7] -_081447A8: - ldrh r0, [r4, 0x12] - adds r0, 0x1 - strh r0, [r4, 0x12] - b _0814492C - .align 2, 0 -_081447B0: .4byte gUnknown_0203935A -_081447B4: - ldr r3, _081447D4 @ =gSprites - lsls r1, r5, 2 - adds r1, r5 - lsls r1, 3 - adds r1, r6 - movs r0, 0xC - ldrsh r2, [r1, r0] - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r0, r3 - movs r2, 0x2 - strh r2, [r0, 0x2E] - strh r4, [r1, 0x12] - b _08144848 - .align 2, 0 -_081447D4: .4byte gSprites -_081447D8: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r1, r0, r6 - ldrh r2, [r1, 0x12] - movs r3, 0x12 - ldrsh r0, [r1, r3] - cmp r0, 0x3F - bgt _08144848 - adds r0, r2, 0x1 - strh r0, [r1, 0x12] - b _08144866 -_081447F0: - ldr r3, _08144828 @ =gSprites - lsls r2, r5, 2 - adds r2, r5 - lsls r2, 3 - adds r2, r6 - movs r0, 0xC - ldrsh r1, [r2, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - movs r1, 0x3 - strh r1, [r0, 0x2E] - movs r0, 0xE - ldrsh r1, [r2, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - movs r1, 0x1 - strh r1, [r0, 0x2E] - movs r0, 0x78 - strh r0, [r2, 0x10] - ldrh r0, [r2, 0x8] - adds r0, 0x1 - strh r0, [r2, 0x8] - b _0814492C - .align 2, 0 -_08144828: .4byte gSprites -_0814482C: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r1, r0, r6 - ldrh r2, [r1, 0x10] - movs r3, 0x10 - ldrsh r0, [r1, r3] - cmp r0, 0 - beq _08144844 - subs r0, r2, 0x1 - strh r0, [r1, 0x10] - b _0814492C -_08144844: - movs r0, 0x40 - strh r0, [r1, 0x12] -_08144848: - ldrh r0, [r1, 0x8] - adds r0, 0x1 - strh r0, [r1, 0x8] - b _0814492C -_08144850: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r4, r0, r6 - ldrh r1, [r4, 0x12] - movs r2, 0x12 - ldrsh r0, [r4, r2] - cmp r0, 0 - ble _0814487C - subs r0, r1, 0x1 - strh r0, [r4, 0x12] -_08144866: - movs r1, 0x7F - ands r0, r1 - movs r1, 0x14 - bl Sin - ldr r1, _08144878 @ =gUnknown_0203935A - strh r0, [r1] - b _0814492C - .align 2, 0 -_08144878: .4byte gUnknown_0203935A -_0814487C: - ldr r2, _08144898 @ =gSprites - movs r3, 0xC - ldrsh r1, [r4, r3] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - movs r1, 0x1 - strh r1, [r0, 0x2E] - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - b _0814492C - .align 2, 0 -_08144898: .4byte gSprites -_0814489C: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r6 - movs r1, 0x32 - b _0814492A -_081448A8: - ldr r3, _081448C4 @ =gSprites - lsls r1, r5, 2 - adds r1, r5 - lsls r1, 3 - adds r1, r6 - movs r0, 0xE - ldrsh r2, [r1, r0] - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r0, r3 - movs r2, 0x2 - b _081448E0 - .align 2, 0 -_081448C4: .4byte gSprites -_081448C8: - ldr r3, _081448E8 @ =gSprites - lsls r1, r5, 2 - adds r1, r5 - lsls r1, 3 - adds r1, r6 - movs r0, 0xC - ldrsh r2, [r1, r0] - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r0, r3 - movs r2, 0x4 -_081448E0: - strh r2, [r0, 0x2E] - movs r0, 0x32 - strh r0, [r1, 0x8] - b _0814492C - .align 2, 0 -_081448E8: .4byte gSprites -_081448EC: - ldr r3, _0814491C @ =gSprites - lsls r2, r5, 2 - adds r2, r5 - lsls r2, 3 - adds r2, r6 - movs r0, 0xC - ldrsh r1, [r2, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - movs r1, 0x5 - strh r1, [r0, 0x2E] - movs r0, 0xE - ldrsh r1, [r2, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - movs r1, 0x3 - strh r1, [r0, 0x2E] - movs r0, 0x32 - strh r0, [r2, 0x8] - b _0814492C - .align 2, 0 -_0814491C: .4byte gSprites -_08144920: - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r0, r6 - movs r1, 0 -_0814492A: - strh r1, [r0, 0x8] -_0814492C: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8144664 - - thumb_func_start sub_8144934 -sub_8144934: @ 8144934 - push {r4,r5,lr} - lsls r0, 24 - lsrs r2, r0, 24 - ldr r1, _08144958 @ =gTasks - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r1 - movs r3, 0x8 - ldrsh r0, [r0, r3] - adds r4, r1, 0 - cmp r0, 0x4 - bhi _08144974 - lsls r0, 2 - ldr r1, _0814495C @ =_08144960 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08144958: .4byte gTasks -_0814495C: .4byte _08144960 - .align 2, 0 -_08144960: - .4byte _08144974 - .4byte _081449B8 - .4byte _081449C4 - .4byte _08144A0C - .4byte _08144A5C -_08144974: - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r2, r0, r4 - movs r1, 0xA - ldrsh r0, [r2, r1] - ldr r5, _081449C0 @ =0x00007fff - cmp r0, r5 - beq _081449B8 - movs r3, 0xC - ldrsh r1, [r2, r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r3, r0, r4 - movs r0, 0x26 - ldrsh r1, [r3, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r4 - movs r1, 0xC - ldrsh r0, [r0, r1] - cmp r0, 0x2 - bne _081449B8 - movs r1, 0xA - ldrsh r0, [r3, r1] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r4 - movs r0, 0x14 - strh r0, [r1, 0x8] - strh r5, [r2, 0xA] -_081449B8: - movs r0, 0 - bl sub_8149020 - b _08144A62 - .align 2, 0 -_081449C0: .4byte 0x00007fff -_081449C4: - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r2, r0, r4 - movs r3, 0xA - ldrsh r0, [r2, r3] - ldr r5, _08144A08 @ =0x00007fff - cmp r0, r5 - beq _08144A54 - movs r0, 0xC - ldrsh r1, [r2, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r4 - movs r3, 0xA - ldrsh r1, [r0, r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r3, r0, r4 - ldrh r1, [r3, 0x12] - movs r0, 0x80 - negs r0, r0 - ands r0, r1 - movs r1, 0xA0 - lsls r1, 2 - cmp r0, r1 - bne _08144A54 - movs r0, 0x1 - strh r0, [r3, 0x8] - strh r5, [r2, 0xA] - b _08144A54 - .align 2, 0 -_08144A08: .4byte 0x00007fff -_08144A0C: - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r2, r0, r4 - ldrh r3, [r2, 0xA] - movs r0, 0xA - ldrsh r1, [r2, r0] - ldr r5, _08144A48 @ =0x00007fff - cmp r1, r5 - beq _08144A54 - ldr r0, _08144A4C @ =0x000001f3 - cmp r1, r0 - bne _08144A50 - movs r3, 0xC - ldrsh r1, [r2, r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r4 - movs r3, 0xA - ldrsh r1, [r0, r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r4 - movs r1, 0xA - strh r1, [r0, 0x8] - strh r5, [r2, 0xA] - b _08144A54 - .align 2, 0 -_08144A48: .4byte 0x00007fff -_08144A4C: .4byte 0x000001f3 -_08144A50: - adds r0, r3, 0x1 - strh r0, [r2, 0xA] -_08144A54: - movs r0, 0x1 - bl sub_8149020 - b _08144A62 -_08144A5C: - movs r0, 0x2 - bl sub_8149020 -_08144A62: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8144934 - - thumb_func_start sub_8144A68 -sub_8144A68: @ 8144A68 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - lsls r1, 24 - lsrs r7, r1, 24 - cmp r0, 0x4 - bls _08144A7E - b _08144DFC -_08144A7E: - lsls r0, 2 - ldr r1, _08144A88 @ =_08144A8C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08144A88: .4byte _08144A8C - .align 2, 0 -_08144A8C: - .4byte _08144AA0 - .4byte _08144B48 - .4byte _08144BF4 - .4byte _08144CA0 - .4byte _08144D50 -_08144AA0: - ldr r5, _08144B40 @ =gSprites - ldr r0, _08144B44 @ =gTasks - lsls r4, r7, 2 - adds r4, r7 - lsls r4, 3 - adds r4, r0 - movs r1, 0x12 - ldrsh r0, [r4, r1] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - adds r1, 0x3E - ldrb r3, [r1] - movs r2, 0x5 - negs r2, r2 - adds r0, r2, 0 - ands r0, r3 - strb r0, [r1] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - adds r0, 0x3E - ldrb r1, [r0] - ands r2, r1 - strb r2, [r0] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r3, 0 - movs r2, 0x88 - lsls r2, 1 - strh r2, [r0, 0x20] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r2, [r0, 0x20] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r2, 0x2E - strh r2, [r0, 0x22] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r2, [r0, 0x22] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r1, 0x80 - lsls r1, 6 - movs r0, 0 - movs r2, 0x20 - b _08144DF0 - .align 2, 0 -_08144B40: .4byte gSprites -_08144B44: .4byte gTasks -_08144B48: - ldr r5, _08144BEC @ =gSprites - ldr r0, _08144BF0 @ =gTasks - lsls r4, r7, 2 - adds r4, r7 - lsls r4, 3 - adds r4, r0 - movs r1, 0x12 - ldrsh r0, [r4, r1] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - adds r1, 0x3E - ldrb r3, [r1] - movs r2, 0x5 - negs r2, r2 - adds r0, r2, 0 - ands r0, r3 - strb r0, [r1] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - adds r0, 0x3E - ldrb r1, [r0] - ands r2, r1 - strb r2, [r0] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r3, 0 - movs r1, 0x78 - strh r1, [r0, 0x20] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r1, 0x88 - lsls r1, 1 - strh r1, [r0, 0x20] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r2, 0x2E - strh r2, [r0, 0x22] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r2, [r0, 0x22] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r1, 0x80 - lsls r1, 6 - movs r0, 0 - movs r2, 0x20 - b _08144DF0 - .align 2, 0 -_08144BEC: .4byte gSprites -_08144BF0: .4byte gTasks -_08144BF4: - ldr r5, _08144C98 @ =gSprites - ldr r0, _08144C9C @ =gTasks - lsls r4, r7, 2 - adds r4, r7 - lsls r4, 3 - adds r4, r0 - movs r1, 0x12 - ldrsh r0, [r4, r1] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - adds r1, 0x3E - ldrb r3, [r1] - movs r2, 0x5 - negs r2, r2 - adds r0, r2, 0 - ands r0, r3 - strb r0, [r1] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - adds r0, 0x3E - ldrb r1, [r0] - ands r2, r1 - strb r2, [r0] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r3, 0 - movs r1, 0x78 - strh r1, [r0, 0x20] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r1, 0x88 - lsls r1, 1 - strh r1, [r0, 0x20] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r2, 0x2E - strh r2, [r0, 0x22] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r2, [r0, 0x22] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r1, 0x80 - lsls r1, 6 - movs r2, 0x80 - lsls r2, 2 - movs r0, 0x1 - b _08144DF0 - .align 2, 0 -_08144C98: .4byte gSprites -_08144C9C: .4byte gTasks -_08144CA0: - ldr r5, _08144D44 @ =gSprites - ldr r0, _08144D48 @ =gTasks - lsls r4, r7, 2 - adds r4, r7 - lsls r4, 3 - adds r4, r0 - movs r1, 0x12 - ldrsh r0, [r4, r1] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - adds r1, 0x3E - ldrb r3, [r1] - movs r2, 0x5 - negs r2, r2 - adds r0, r2, 0 - ands r0, r3 - strb r0, [r1] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - adds r0, 0x3E - ldrb r1, [r0] - ands r2, r1 - strb r2, [r0] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r3, 0 - movs r1, 0x78 - strh r1, [r0, 0x20] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - ldr r1, _08144D4C @ =0x0000ffe0 - strh r1, [r0, 0x20] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r2, 0x2E - strh r2, [r0, 0x22] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r2, [r0, 0x22] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r1, 0x80 - lsls r1, 6 - movs r2, 0x80 - lsls r2, 2 - movs r0, 0x1 - b _08144DF0 - .align 2, 0 -_08144D44: .4byte gSprites -_08144D48: .4byte gTasks -_08144D4C: .4byte 0x0000ffe0 -_08144D50: - ldr r5, _08144EBC @ =gSprites - ldr r0, _08144EC0 @ =gTasks - lsls r4, r7, 2 - adds r4, r7 - lsls r4, 3 - adds r4, r0 - movs r1, 0x12 - ldrsh r0, [r4, r1] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - adds r1, 0x3E - ldrb r3, [r1] - movs r2, 0x5 - negs r2, r2 - adds r0, r2, 0 - ands r0, r3 - strb r0, [r1] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - adds r0, 0x3E - ldrb r1, [r0] - ands r2, r1 - strb r2, [r0] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r3, 0 - movs r1, 0x58 - strh r1, [r0, 0x20] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r1, 0x98 - strh r1, [r0, 0x20] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r2, 0x2E - strh r2, [r0, 0x22] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r2, [r0, 0x22] - movs r0, 0x12 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r0, 0x14 - ldrsh r1, [r4, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r3, [r0, 0x2E] - movs r1, 0x80 - lsls r1, 6 - movs r2, 0x80 - lsls r2, 2 - movs r0, 0x2 -_08144DF0: - movs r3, 0x8 - bl sub_8148EC0 - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x8] -_08144DFC: - ldr r0, _08144EC4 @ =sub_8144934 - movs r1, 0 - bl CreateTask - ldr r6, _08144EC0 @ =gTasks - lsls r1, r7, 2 - adds r1, r7 - lsls r1, 3 - adds r5, r1, r6 - lsls r0, 24 - lsrs r0, 24 - movs r4, 0 - strh r0, [r5, 0xC] - movs r0, 0xC - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - mov r1, r8 - strh r1, [r0, 0x8] - movs r0, 0xC - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - strh r4, [r0, 0xA] - movs r0, 0xC - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - strh r7, [r0, 0xC] - ldr r0, _08144EC8 @ =sub_8144664 - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0xA] - movs r0, 0xA - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - strh r4, [r0, 0x8] - movs r0, 0xA - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - strh r7, [r0, 0xA] - movs r0, 0xA - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - ldrh r1, [r5, 0x12] - strh r1, [r0, 0xC] - movs r0, 0xA - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - ldrh r1, [r5, 0x14] - strh r1, [r0, 0xE] - movs r0, 0xA - ldrsh r1, [r5, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r6 - strh r4, [r0, 0x10] - mov r1, r8 - cmp r1, 0x2 - bne _08144EB0 - movs r1, 0xA - ldrsh r0, [r5, r1] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r6 - movs r0, 0x45 - strh r0, [r1, 0x12] -_08144EB0: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08144EBC: .4byte gSprites -_08144EC0: .4byte gTasks -_08144EC4: .4byte sub_8144934 -_08144EC8: .4byte sub_8144664 - thumb_func_end sub_8144A68 - - thumb_func_start sub_8144ECC -sub_8144ECC: @ 8144ECC - push {r4-r6,lr} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r1, 24 - lsrs r5, r1, 24 - ldr r0, _08144F28 @ =gMain - ldr r1, _08144F2C @ =0x0000043c - adds r6, r0, r1 - ldrb r0, [r6] - cmp r0, 0x1 - beq _08144F38 - cmp r0, 0x1 - ble _08144EF0 - cmp r0, 0x2 - beq _08144F5C - cmp r0, 0x3 - bne _08144EF0 - b _0814508C -_08144EF0: - movs r0, 0x80 - lsls r0, 19 - movs r1, 0 - strh r1, [r0] - ldr r2, _08144F30 @ =REG_BG3HOFS - movs r0, 0x8 - strh r0, [r2] - ldr r0, _08144F34 @ =REG_BG3VOFS - strh r1, [r0] - subs r0, 0x6 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - subs r0, 0x6 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - adds r0, 0x3A - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - bl ResetSpriteData - bl FreeAllSpritePalettes - movs r0, 0x1 - strb r0, [r6] - b _081450A2 - .align 2, 0 -_08144F28: .4byte gMain -_08144F2C: .4byte 0x0000043c -_08144F30: .4byte REG_BG3HOFS -_08144F34: .4byte REG_BG3VOFS -_08144F38: - ldr r1, _08144F54 @ =gUnknown_02039358 - movs r0, 0x22 - strh r0, [r1] - ldr r1, _08144F58 @ =gUnknown_0203935A - movs r0, 0 - strh r0, [r1] - adds r0, r4, 0 - bl sub_8148CB0 - ldrb r0, [r6] - adds r0, 0x1 - strb r0, [r6] - b _081450A2 - .align 2, 0 -_08144F54: .4byte gUnknown_02039358 -_08144F58: .4byte gUnknown_0203935A -_08144F5C: - ldr r0, _08144FBC @ =gSaveBlock2 - ldrb r0, [r0, 0x8] - cmp r0, 0 - bne _08144FE0 - ldr r0, _08144FC0 @ =gIntro2BrendanSpriteSheet - bl LoadCompressedObjectPic - ldr r0, _08144FC4 @ =gUnknown_08416E34 - bl LoadCompressedObjectPic - ldr r0, _08144FC8 @ =gIntro2BicycleSpriteSheet - bl LoadCompressedObjectPic - ldr r0, _08144FCC @ =gIntro2SpritePalettes - bl LoadSpritePalettes - movs r0, 0x78 - movs r1, 0x2E - bl intro_create_brendan_sprite - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, _08144FD0 @ =gTasks - lsls r4, r5, 2 - adds r4, r5 - lsls r4, 3 - adds r4, r0 - strh r2, [r4, 0x12] - ldr r6, _08144FD4 @ =gSprites - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r5, r6, 0 - adds r5, 0x1C - adds r2, r0, r5 - ldr r1, _08144FD8 @ =sub_8145378 - str r1, [r2] - adds r6, 0x8 - adds r0, r6 - ldr r1, _08144FDC @ =gUnknown_0840CA54 - str r1, [r0] - movs r0, 0x88 - lsls r0, 1 - movs r1, 0x2E - bl intro_create_may_sprite - b _08145034 - .align 2, 0 -_08144FBC: .4byte gSaveBlock2 -_08144FC0: .4byte gIntro2BrendanSpriteSheet -_08144FC4: .4byte gUnknown_08416E34 -_08144FC8: .4byte gIntro2BicycleSpriteSheet -_08144FCC: .4byte gIntro2SpritePalettes -_08144FD0: .4byte gTasks -_08144FD4: .4byte gSprites -_08144FD8: .4byte sub_8145378 -_08144FDC: .4byte gUnknown_0840CA54 -_08144FE0: - ldr r0, _0814505C @ =gIntro2MaySpriteSheet - bl LoadCompressedObjectPic - ldr r0, _08145060 @ =gUnknown_08416E24 - bl LoadCompressedObjectPic - ldr r0, _08145064 @ =gIntro2BicycleSpriteSheet - bl LoadCompressedObjectPic - ldr r0, _08145068 @ =gIntro2SpritePalettes - bl LoadSpritePalettes - movs r0, 0x78 - movs r1, 0x2E - bl intro_create_may_sprite - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, _0814506C @ =gTasks - lsls r4, r5, 2 - adds r4, r5 - lsls r4, 3 - adds r4, r0 - strh r2, [r4, 0x12] - ldr r6, _08145070 @ =gSprites - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r5, r6, 0 - adds r5, 0x1C - adds r2, r0, r5 - ldr r1, _08145074 @ =sub_8145378 - str r1, [r2] - adds r6, 0x8 - adds r0, r6 - ldr r1, _08145078 @ =gUnknown_0840CA54 - str r1, [r0] - movs r0, 0x88 - lsls r0, 1 - movs r1, 0x2E - bl intro_create_brendan_sprite -_08145034: - lsls r0, 24 - lsrs r2, r0, 24 - strh r2, [r4, 0x14] - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r5, r0, r5 - ldr r1, _0814507C @ =sub_8145420 - str r1, [r5] - adds r0, r6 - ldr r1, _08145080 @ =gUnknown_0840CA94 - str r1, [r0] - ldr r1, _08145084 @ =gMain - ldr r0, _08145088 @ =0x0000043c - adds r1, r0 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _081450A2 - .align 2, 0 -_0814505C: .4byte gIntro2MaySpriteSheet -_08145060: .4byte gUnknown_08416E24 -_08145064: .4byte gIntro2BicycleSpriteSheet -_08145068: .4byte gIntro2SpritePalettes -_0814506C: .4byte gTasks -_08145070: .4byte gSprites -_08145074: .4byte sub_8145378 -_08145078: .4byte gUnknown_0840CA54 -_0814507C: .4byte sub_8145420 -_08145080: .4byte gUnknown_0840CA94 -_08145084: .4byte gMain -_08145088: .4byte 0x0000043c -_0814508C: - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8144A68 - adds r0, r4, 0 - bl sub_8148E90 - movs r0, 0 - strb r0, [r6] - movs r0, 0x1 - b _081450A4 -_081450A2: - movs r0, 0 -_081450A4: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8144ECC - - thumb_func_start sub_81450AC -sub_81450AC: @ 81450AC - push {r4,lr} - lsls r0, 24 - lsrs r0, 24 - ldr r2, _08145120 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r4, r1, r2 - ldrh r1, [r4, 0x8] - movs r2, 0x8 - ldrsh r0, [r4, r2] - cmp r0, 0 - beq _081450D2 - lsls r0, r1, 24 - lsrs r0, 24 - bl DestroyTask - movs r0, 0 - strh r0, [r4, 0x8] -_081450D2: - ldrh r1, [r4, 0xA] - movs r2, 0xA - ldrsh r0, [r4, r2] - cmp r0, 0 - beq _081450E8 - lsls r0, r1, 24 - lsrs r0, 24 - bl DestroyTask - movs r0, 0 - strh r0, [r4, 0xA] -_081450E8: - ldrh r1, [r4, 0xC] - movs r2, 0xC - ldrsh r0, [r4, r2] - cmp r0, 0 - beq _081450FE - lsls r0, r1, 24 - lsrs r0, 24 - bl DestroyTask - movs r0, 0 - strh r0, [r4, 0xC] -_081450FE: - ldrh r1, [r4, 0xE] - movs r2, 0xE - ldrsh r0, [r4, r2] - cmp r0, 0 - beq _08145114 - lsls r0, r1, 24 - lsrs r0, 24 - bl DestroyTask - movs r0, 0 - strh r0, [r4, 0xE] -_08145114: - ldr r1, _08145124 @ =gUnknown_0203935C - movs r0, 0x1 - strh r0, [r1] - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08145120: .4byte gTasks -_08145124: .4byte gUnknown_0203935C - thumb_func_end sub_81450AC - - thumb_func_start sub_8145128 -sub_8145128: @ 8145128 - push {r4-r7,lr} - adds r3, r0, 0 - adds r4, r2, 0 - lsls r3, 16 - lsrs r3, 16 - lsls r1, 16 - lsrs r7, r1, 16 - lsls r4, 16 - lsrs r5, r4, 16 - ldr r0, _081451EC @ =gCreditsCopyrightEnd_Gfx - movs r6, 0xC0 - lsls r6, 19 - adds r3, r6 - adds r1, r3, 0 - bl LZ77UnCompVram - ldr r0, _081451F0 @ =gIntroCopyright_Pal - adds r1, r5, 0 - movs r2, 0x20 - bl LoadPalette - lsrs r4, 20 - lsls r4, 28 - lsrs r4, 16 - movs r2, 0 - adds r1, r4, 0x1 - ldr r3, _081451F4 @ =0x000003ff -_0814515E: - lsls r0, r2, 1 - adds r0, r7 - adds r0, r6 - strh r1, [r0] - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, r3 - bls _0814515E - movs r2, 0 - adds r0, r4, 0x2 - adds r6, r4, 0 - adds r6, 0x17 - movs r1, 0x2B - adds r1, r4 - mov r12, r1 - adds r4, 0x42 - ldr r5, _081451F8 @ =0x060001c8 - adds r3, r0, 0 -_08145184: - lsls r0, r2, 1 - adds r0, r7 - adds r0, r5 - adds r1, r2, r3 - strh r1, [r0] - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, 0x14 - bls _08145184 - movs r2, 0 - ldr r5, _081451FC @ =0x06000248 - adds r3, r6, 0 -_0814519E: - lsls r0, r2, 1 - adds r0, r7 - adds r0, r5 - adds r1, r2, r3 - strh r1, [r0] - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, 0x13 - bls _0814519E - movs r2, 0 - ldr r5, _08145200 @ =0x060002c8 - mov r3, r12 -_081451B8: - lsls r0, r2, 1 - adds r0, r7 - adds r0, r5 - adds r1, r2, r3 - strh r1, [r0] - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, 0x16 - bls _081451B8 - movs r2, 0 - ldr r3, _08145204 @ =0x06000348 -_081451D0: - lsls r0, r2, 1 - adds r0, r7 - adds r0, r3 - adds r1, r2, r4 - strh r1, [r0] - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, 0xB - bls _081451D0 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_081451EC: .4byte gCreditsCopyrightEnd_Gfx -_081451F0: .4byte gIntroCopyright_Pal -_081451F4: .4byte 0x000003ff -_081451F8: .4byte 0x060001c8 -_081451FC: .4byte 0x06000248 -_08145200: .4byte 0x060002c8 -_08145204: .4byte 0x06000348 - thumb_func_end sub_8145128 - - thumb_func_start sub_8145208 -sub_8145208: @ 8145208 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - adds r3, r2, 0 - movs r0, 0x3F - ands r0, r2 - adds r1, r0, 0 - adds r1, 0x50 - cmp r2, 0xFF - bne _08145220 - movs r0, 0x1 - b _08145246 -_08145220: - movs r0, 0x80 - ands r0, r2 - cmp r0, 0 - beq _08145230 - movs r2, 0x80 - lsls r2, 4 - adds r0, r2, 0 - orrs r1, r0 -_08145230: - movs r0, 0x40 - ands r3, r0 - cmp r3, 0 - beq _08145244 - movs r2, 0x80 - lsls r2, 3 - adds r0, r2, 0 - orrs r1, r0 - lsls r0, r1, 16 - lsrs r1, r0, 16 -_08145244: - adds r0, r1, 0 -_08145246: - pop {r1} - bx r1 - thumb_func_end sub_8145208 - - thumb_func_start sub_814524C -sub_814524C: @ 814524C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0xC - str r0, [sp] - ldr r0, [sp, 0x2C] - lsls r1, 24 - lsrs r1, 24 - mov r10, r1 - lsls r2, 24 - lsrs r2, 24 - str r2, [sp, 0x4] - lsls r3, 16 - lsrs r3, 16 - str r3, [sp, 0x8] - lsls r0, 16 - lsrs r0, 20 - lsls r0, 28 - lsrs r0, 16 - mov r9, r0 - movs r5, 0 -_0814527A: - movs r4, 0 - lsls r7, r5, 1 - ldr r1, [sp, 0x4] - adds r0, r1, r5 - adds r2, r5, 0x1 - mov r8, r2 - lsls r0, 6 - ldr r1, [sp, 0x8] - adds r6, r0, r1 -_0814528C: - adds r0, r7, r5 - adds r0, r4 - ldr r2, [sp] - adds r0, r2, r0 - ldrb r0, [r0] - bl sub_8145208 - mov r2, r10 - adds r1, r2, r4 - lsls r1, 1 - adds r1, r6 - movs r2, 0xC0 - lsls r2, 19 - adds r1, r2 - add r0, r9 - strh r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x2 - bls _0814528C - mov r1, r8 - lsls r0, r1, 24 - lsrs r5, r0, 24 - cmp r5, 0x4 - bls _0814527A - add sp, 0xC - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_814524C - - thumb_func_start sub_81452D0 -sub_81452D0: @ 81452D0 - push {r4-r7,lr} - sub sp, 0x4 - lsls r0, 16 - lsrs r5, r0, 16 - lsls r1, 16 - lsrs r6, r1, 16 - lsrs r1, 20 - lsls r1, 28 - lsrs r1, 16 - movs r2, 0 - ldr r7, _08145360 @ =gUnknown_0840B83C - movs r4, 0xC0 - lsls r4, 19 - adds r1, 0x1 - ldr r3, _08145364 @ =0x000003ff -_081452EE: - lsls r0, r2, 1 - adds r0, r5 - adds r0, r4 - strh r1, [r0] - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r2, r0, 16 - cmp r2, r3 - bls _081452EE - str r6, [sp] - adds r0, r7, 0 - movs r1, 0x3 - movs r2, 0x7 - adds r3, r5, 0 - bl sub_814524C - ldr r0, _08145368 @ =gUnknown_0840B84B - str r6, [sp] - movs r1, 0x7 - movs r2, 0x7 - adds r3, r5, 0 - bl sub_814524C - ldr r4, _0814536C @ =gUnknown_0840B85A - str r6, [sp] - adds r0, r4, 0 - movs r1, 0xB - movs r2, 0x7 - adds r3, r5, 0 - bl sub_814524C - str r6, [sp] - adds r0, r4, 0 - movs r1, 0x10 - movs r2, 0x7 - adds r3, r5, 0 - bl sub_814524C - ldr r0, _08145370 @ =gUnknown_0840B869 - str r6, [sp] - movs r1, 0x14 - movs r2, 0x7 - adds r3, r5, 0 - bl sub_814524C - ldr r0, _08145374 @ =gUnknown_0840B878 - str r6, [sp] - movs r1, 0x18 - movs r2, 0x7 - adds r3, r5, 0 - bl sub_814524C - add sp, 0x4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08145360: .4byte gUnknown_0840B83C -_08145364: .4byte 0x000003ff -_08145368: .4byte gUnknown_0840B84B -_0814536C: .4byte gUnknown_0840B85A -_08145370: .4byte gUnknown_0840B869 -_08145374: .4byte gUnknown_0840B878 - thumb_func_end sub_81452D0 - - thumb_func_start sub_8145378 -sub_8145378: @ 8145378 - push {r4,lr} - adds r4, r0, 0 - ldr r0, _08145390 @ =gUnknown_0203935C - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0 - beq _08145394 - adds r0, r4, 0 - bl DestroySprite - b _08145418 - .align 2, 0 -_08145390: .4byte gUnknown_0203935C -_08145394: - movs r2, 0x2E - ldrsh r0, [r4, r2] - cmp r0, 0x5 - bhi _08145418 - lsls r0, 2 - ldr r1, _081453A8 @ =_081453AC - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_081453A8: .4byte _081453AC - .align 2, 0 -_081453AC: - .4byte _081453C4 - .4byte _081453CE - .4byte _081453D4 - .4byte _081453DE - .4byte _081453E8 - .4byte _081453FE -_081453C4: - adds r0, r4, 0 - movs r1, 0 - bl StartSpriteAnimIfDifferent - b _08145418 -_081453CE: - adds r0, r4, 0 - movs r1, 0x1 - b _08145402 -_081453D4: - adds r0, r4, 0 - movs r1, 0x2 - bl StartSpriteAnimIfDifferent - b _08145418 -_081453DE: - adds r0, r4, 0 - movs r1, 0x3 - bl StartSpriteAnimIfDifferent - b _08145418 -_081453E8: - adds r0, r4, 0 - movs r1, 0 - bl StartSpriteAnimIfDifferent - ldrh r1, [r4, 0x20] - movs r2, 0x20 - ldrsh r0, [r4, r2] - cmp r0, 0x78 - ble _08145418 - subs r0, r1, 0x1 - b _08145416 -_081453FE: - adds r0, r4, 0 - movs r1, 0 -_08145402: - bl StartSpriteAnimIfDifferent - ldrh r2, [r4, 0x20] - movs r0, 0x20 - ldrsh r1, [r4, r0] - movs r0, 0x20 - negs r0, r0 - cmp r1, r0 - ble _08145418 - subs r0, r2, 0x1 -_08145416: - strh r0, [r4, 0x20] -_08145418: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8145378 - - thumb_func_start sub_8145420 -sub_8145420: @ 8145420 - push {r4,lr} - adds r4, r0, 0 - ldr r0, _08145438 @ =gUnknown_0203935C - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0 - beq _0814543C - adds r0, r4, 0 - bl DestroySprite - b _081454D8 - .align 2, 0 -_08145438: .4byte gUnknown_0203935C -_0814543C: - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0x1 - beq _08145464 - cmp r0, 0x1 - bgt _0814544E - cmp r0, 0 - beq _08145458 - b _081454D8 -_0814544E: - cmp r0, 0x2 - beq _081454A0 - cmp r0, 0x3 - beq _081454BE - b _081454D8 -_08145458: - strh r0, [r4, 0x26] - adds r0, r4, 0 - movs r1, 0 - bl StartSpriteAnimIfDifferent - b _081454D8 -_08145464: - movs r1, 0x20 - ldrsh r0, [r4, r1] - cmp r0, 0xC8 - ble _08145476 - adds r0, r4, 0 - movs r1, 0x1 - bl StartSpriteAnimIfDifferent - b _0814547E -_08145476: - adds r0, r4, 0 - movs r1, 0x2 - bl StartSpriteAnimIfDifferent -_0814547E: - ldrh r2, [r4, 0x20] - movs r0, 0x20 - ldrsh r1, [r4, r0] - movs r0, 0x20 - negs r0, r0 - cmp r1, r0 - ble _08145490 - subs r0, r2, 0x2 - strh r0, [r4, 0x20] -_08145490: - ldr r0, _0814549C @ =gUnknown_0203935A - ldrh r0, [r0] - negs r0, r0 - strh r0, [r4, 0x26] - b _081454D8 - .align 2, 0 -_0814549C: .4byte gUnknown_0203935A -_081454A0: - ldrh r0, [r4, 0x3C] - adds r0, 0x1 - strh r0, [r4, 0x3C] - adds r0, r4, 0 - movs r1, 0 - bl StartSpriteAnimIfDifferent - ldrh r1, [r4, 0x3C] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - bne _081454D8 - ldrh r0, [r4, 0x20] - adds r0, 0x1 - b _081454D6 -_081454BE: - adds r0, r4, 0 - movs r1, 0 - bl StartSpriteAnimIfDifferent - ldrh r2, [r4, 0x20] - movs r0, 0x20 - ldrsh r1, [r4, r0] - movs r0, 0x20 - negs r0, r0 - cmp r1, r0 - ble _081454D8 - subs r0, r2, 0x1 -_081454D6: - strh r0, [r4, 0x20] -_081454D8: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8145420 - - thumb_func_start sub_81454E0 -sub_81454E0: @ 81454E0 - push {r4,r5,lr} - sub sp, 0x4 - adds r5, r0, 0 - ldr r0, _081454F8 @ =gUnknown_0203935C - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0 - beq _081454FC - adds r0, r5, 0 - bl DestroySprite - b _081456A6 - .align 2, 0 -_081454F8: .4byte gUnknown_0203935C -_081454FC: - ldrh r0, [r5, 0x3C] - adds r0, 0x1 - strh r0, [r5, 0x3C] - movs r2, 0x2E - ldrsh r0, [r5, r2] - cmp r0, 0xA - bhi _08145544 - lsls r0, 2 - ldr r1, _08145514 @ =_08145518 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08145514: .4byte _08145518 - .align 2, 0 -_08145518: - .4byte _08145544 - .4byte _0814559E - .4byte _08145620 - .4byte _08145660 - .4byte _08145544 - .4byte _08145544 - .4byte _08145544 - .4byte _08145544 - .4byte _08145544 - .4byte _08145544 - .4byte _08145696 -_08145544: - ldrb r1, [r5, 0x1] - movs r0, 0x4 - negs r0, r0 - ands r0, r1 - movs r1, 0x1 - orrs r0, r1 - strb r0, [r5, 0x1] - movs r0, 0x30 - ldrsh r1, [r5, r0] - movs r0, 0x1F - ands r1, r0 - lsls r1, 1 - ldrb r2, [r5, 0x3] - movs r0, 0x3F - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r5, 0x3] - movs r0, 0x10 - strh r0, [r5, 0x32] - ldrh r4, [r5, 0x30] - lsls r4, 24 - lsrs r4, 24 - movs r0, 0x80 - lsls r0, 9 - movs r1, 0x10 - bl __divsi3 - adds r1, r0, 0 - str r1, [sp] - adds r0, r4, 0 - movs r2, 0 - movs r3, 0 - bl SetOamMatrix - adds r2, r5, 0 - adds r2, 0x3E - ldrb r1, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - movs r0, 0x1 - strh r0, [r5, 0x2E] - b _081456A6 -_0814559E: - ldrh r1, [r5, 0x32] - movs r2, 0x32 - ldrsh r0, [r5, r2] - cmp r0, 0xFF - bgt _081455D4 - adds r0, r1, 0 - adds r0, 0x8 - strh r0, [r5, 0x32] - ldrh r4, [r5, 0x30] - lsls r4, 24 - lsrs r4, 24 - movs r0, 0x32 - ldrsh r1, [r5, r0] - movs r0, 0x80 - lsls r0, 9 - bl __divsi3 - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - str r1, [sp] - adds r0, r4, 0 - movs r2, 0 - movs r3, 0 - bl SetOamMatrix - b _081455DA -_081455D4: - ldrh r0, [r5, 0x2E] - adds r0, 0x1 - strh r0, [r5, 0x2E] -_081455DA: - movs r2, 0x30 - ldrsh r1, [r5, r2] - cmp r1, 0x2 - beq _081456A6 - cmp r1, 0x2 - bgt _081455EC - cmp r1, 0x1 - beq _081455F2 - b _081456A6 -_081455EC: - cmp r1, 0x3 - beq _0814560A - b _081456A6 -_081455F2: - ldrh r1, [r5, 0x3C] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - bne _08145602 - ldrh r0, [r5, 0x22] - adds r0, 0x1 - strh r0, [r5, 0x22] -_08145602: - ldrh r0, [r5, 0x20] - subs r0, 0x2 - strh r0, [r5, 0x20] - b _081456A6 -_0814560A: - ldrh r0, [r5, 0x3C] - ands r1, r0 - cmp r1, 0 - bne _08145618 - ldrh r0, [r5, 0x22] - adds r0, 0x1 - strh r0, [r5, 0x22] -_08145618: - ldrh r0, [r5, 0x20] - adds r0, 0x2 - strh r0, [r5, 0x20] - b _081456A6 -_08145620: - ldrh r1, [r5, 0x34] - movs r2, 0x34 - ldrsh r0, [r5, r2] - cmp r0, 0 - beq _08145630 - subs r0, r1, 0x1 - strh r0, [r5, 0x34] - b _081456A6 -_08145630: - ldr r1, _0814565C @ =REG_BLDCNT - movs r2, 0xF4 - lsls r2, 4 - adds r0, r2, 0 - strh r0, [r1] - adds r1, 0x2 - movs r0, 0x10 - strh r0, [r1] - ldrb r1, [r5, 0x1] - movs r0, 0xD - negs r0, r0 - ands r0, r1 - movs r1, 0x4 - orrs r0, r1 - strb r0, [r5, 0x1] - movs r0, 0x10 - strh r0, [r5, 0x34] - ldrh r0, [r5, 0x2E] - adds r0, 0x1 - strh r0, [r5, 0x2E] - b _081456A6 - .align 2, 0 -_0814565C: .4byte REG_BLDCNT -_08145660: - ldrh r1, [r5, 0x34] - movs r2, 0x34 - ldrsh r0, [r5, r2] - cmp r0, 0 - beq _08145684 - subs r1, 0x1 - strh r1, [r5, 0x34] - ldr r3, _08145680 @ =REG_BLDALPHA - movs r0, 0x34 - ldrsh r2, [r5, r0] - movs r0, 0x10 - subs r0, r2 - lsls r0, 8 - adds r1, r0 - strh r1, [r3] - b _081456A6 - .align 2, 0 -_08145680: .4byte REG_BLDALPHA -_08145684: - adds r2, r5, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] - movs r0, 0xA - strh r0, [r5, 0x2E] - b _081456A6 -_08145696: - ldr r0, _081456B0 @ =REG_BLDCNT - movs r1, 0 - strh r1, [r0] - adds r0, 0x2 - strh r1, [r0] - adds r0, r5, 0 - bl DestroySprite -_081456A6: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_081456B0: .4byte REG_BLDCNT - thumb_func_end sub_81454E0 - - thumb_func_start sub_81456B4 -sub_81456B4: @ 81456B4 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x14 - lsls r0, 16 - lsrs r6, r0, 16 - lsls r1, 16 - lsrs r1, 16 - mov r10, r1 - lsls r2, 16 - lsrs r2, 16 - str r2, [sp, 0x10] - lsls r3, 16 - lsrs r3, 16 - mov r9, r3 - adds r0, r6, 0 - bl NationalPokedexNumToSpecies - adds r6, r0, 0 - cmp r6, 0xC9 - beq _081456F8 - movs r0, 0x9A - lsls r0, 1 - cmp r6, r0 - beq _081456EE - movs r7, 0 - b _081456FC -_081456EE: - ldr r0, _081456F4 @ =gSaveBlock2 - ldr r7, [r0, 0x20] - b _081456FC - .align 2, 0 -_081456F4: .4byte gSaveBlock2 -_081456F8: - ldr r0, _081457E8 @ =gSaveBlock2 - ldr r7, [r0, 0x1C] -_081456FC: - lsls r0, r6, 3 - ldr r1, _081457EC @ =gMonFrontPicTable - adds r0, r1 - ldr r1, _081457F0 @ =gMonFrontPicCoords - lsls r2, r6, 2 - adds r2, r1 - ldrb r1, [r2] - ldrb r2, [r2, 0x1] - movs r3, 0x80 - lsls r3, 18 - ldr r4, _081457F4 @ =gUnknown_0840B5A0 - mov r8, r4 - mov r5, r9 - lsls r4, r5, 2 - add r4, r8 - ldr r4, [r4] - str r4, [sp] - str r6, [sp, 0x4] - str r7, [sp, 0x8] - movs r4, 0x1 - str r4, [sp, 0xC] - bl sub_800D378 - ldr r2, _081457F8 @ =0x0000ffff - adds r0, r6, 0 - movs r1, 0 - bl species_and_otid_get_pal - lsls r5, 4 - mov r8, r5 - movs r1, 0x80 - lsls r1, 1 - add r1, r8 - lsls r1, 16 - lsrs r1, 16 - movs r2, 0x20 - bl LoadCompressedPalette - mov r7, r9 - lsls r6, r7, 24 - lsrs r6, 24 - mov r0, r9 - adds r1, r6, 0 - bl sub_8143648 - ldr r0, _081457FC @ =gUnknown_02024E8C - mov r2, r10 - lsls r1, r2, 16 - asrs r1, 16 - ldr r3, [sp, 0x10] - lsls r2, r3, 16 - asrs r2, 16 - movs r3, 0 - bl CreateSprite - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r5, _08145800 @ =gSprites - lsls r2, r4, 4 - adds r2, r4 - lsls r2, 2 - adds r3, r2, r5 - ldrb r1, [r3, 0x5] - movs r0, 0xF - ands r0, r1 - mov r7, r8 - orrs r0, r7 - movs r1, 0xD - negs r1, r1 - ands r0, r1 - movs r1, 0x4 - orrs r0, r1 - strb r0, [r3, 0x5] - mov r0, r9 - adds r0, 0x1 - strh r0, [r3, 0x30] - movs r0, 0x3E - adds r0, r3 - mov r8, r0 - ldrb r0, [r0] - orrs r0, r1 - mov r1, r8 - strb r0, [r1] - adds r0, r5, 0 - adds r0, 0x1C - adds r2, r0 - ldr r0, _08145804 @ =sub_81454E0 - str r0, [r2] - ldr r0, _08145808 @ =gSpriteTemplate_840CAEC - movs r2, 0x20 - ldrsh r1, [r3, r2] - movs r7, 0x22 - ldrsh r2, [r3, r7] - movs r3, 0x1 - bl CreateSprite - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r4, [r0, 0x2E] - adds r1, r6, 0 - bl StartSpriteAnimIfDifferent - adds r0, r4, 0 - add sp, 0x14 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .align 2, 0 -_081457E8: .4byte gSaveBlock2 -_081457EC: .4byte gMonFrontPicTable -_081457F0: .4byte gMonFrontPicCoords -_081457F4: .4byte gUnknown_0840B5A0 -_081457F8: .4byte 0x0000ffff -_081457FC: .4byte gUnknown_02024E8C -_08145800: .4byte gSprites -_08145804: .4byte sub_81454E0 -_08145808: .4byte gSpriteTemplate_840CAEC - thumb_func_end sub_81456B4 - - thumb_func_start sub_814580C -sub_814580C: @ 814580C - push {r4,lr} - adds r3, r0, 0 - ldr r4, _08145838 @ =gSprites - movs r1, 0x2E - ldrsh r0, [r3, r1] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - movs r2, 0x2E - ldrsh r0, [r1, r2] - cmp r0, 0xA - beq _08145830 - ldr r0, _0814583C @ =gUnknown_0203935C - movs r2, 0 - ldrsh r0, [r0, r2] - cmp r0, 0 - beq _08145840 -_08145830: - adds r0, r3, 0 - bl DestroySprite - b _081458D4 - .align 2, 0 -_08145838: .4byte gSprites -_0814583C: .4byte gUnknown_0203935C -_08145840: - adds r0, r1, 0 - adds r0, 0x3E - ldrb r0, [r0] - movs r1, 0x3E - adds r1, r3 - mov r12, r1 - movs r1, 0x4 - ands r1, r0 - mov r0, r12 - ldrb r2, [r0] - movs r0, 0x5 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - mov r1, r12 - strb r0, [r1] - movs r2, 0x2E - ldrsh r1, [r3, r2] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r0, 0x1] - movs r0, 0xC - ands r0, r1 - ldrb r2, [r3, 0x1] - movs r1, 0xD - negs r1, r1 - ands r1, r2 - orrs r1, r0 - strb r1, [r3, 0x1] - movs r0, 0x2E - ldrsh r2, [r3, r0] - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r0, r4 - ldrb r0, [r0, 0x1] - lsls r0, 30 - lsrs r0, 30 - movs r2, 0x4 - negs r2, r2 - ands r1, r2 - orrs r1, r0 - strb r1, [r3, 0x1] - movs r2, 0x2E - ldrsh r1, [r3, r2] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r0, [r0, 0x3] - movs r1, 0x3E - ands r1, r0 - ldrb r2, [r3, 0x3] - movs r0, 0x3F - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3, 0x3] - movs r0, 0x2E - ldrsh r1, [r3, r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrh r0, [r0, 0x20] - strh r0, [r3, 0x20] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrh r0, [r0, 0x22] - strh r0, [r3, 0x22] -_081458D4: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_814580C - - thumb_func_start sub_81458DC -sub_81458DC: @ 81458DC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - ldr r7, _0814597C @ =0x0201c000 - ldr r0, _08145980 @ =0x00004023 - bl VarGet - lsls r0, 16 - lsrs r0, 16 - bl GetStarterPokemon - lsls r0, 16 - lsrs r0, 16 - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - mov r10, r0 - movs r4, 0x1 - movs r5, 0 - ldr r0, _08145984 @ =0x00000181 - mov r8, r0 -_0814590E: - adds r0, r4, 0 - movs r1, 0x1 - bl sub_8090D90 - lsls r0, 24 - adds r6, r7, 0 - adds r6, 0x90 - cmp r0, 0 - beq _0814592C - lsls r0, r5, 1 - adds r0, r6, r0 - strh r4, [r0] - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 -_0814592C: - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, r8 - bls _0814590E - adds r4, r5, 0 - ldr r0, _08145984 @ =0x00000181 - lsls r1, r4, 16 - mov r9, r1 - movs r2, 0x8E - adds r2, r7 - mov r8, r2 - adds r1, r7, 0 - adds r1, 0x86 - str r1, [sp] - cmp r4, r0 - bhi _08145964 - adds r1, r6, 0 - movs r3, 0 - adds r2, r0, 0 -_08145954: - lsls r0, r4, 1 - adds r0, r1, r0 - strh r3, [r0] - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, r2 - bls _08145954 -_08145964: - movs r2, 0xE5 - lsls r2, 2 - adds r0, r7, r2 - strh r5, [r0] - mov r1, r9 - lsrs r0, r1, 16 - cmp r0, 0x43 - bhi _08145988 - mov r2, r8 - strh r5, [r2] - b _0814598E - .align 2, 0 -_0814597C: .4byte 0x0201c000 -_08145980: .4byte 0x00004023 -_08145984: .4byte 0x00000181 -_08145988: - movs r0, 0x44 - mov r1, r8 - strh r0, [r1] -_0814598E: - movs r5, 0 - movs r2, 0xE5 - lsls r2, 2 - adds r4, r7, r2 - mov r9, r5 - b _0814599E -_0814599A: - cmp r5, 0x43 - bhi _081459EE -_0814599E: - bl Random - lsls r0, 16 - lsrs r0, 16 - ldrh r1, [r4] - bl __umodsi3 - lsls r0, 16 - lsrs r2, r0, 16 - lsls r1, r5, 1 - adds r1, r7, r1 - lsls r0, r2, 1 - adds r3, r6, r0 - ldrh r0, [r3] - strh r0, [r1] - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - mov r0, r9 - strh r0, [r3] - ldrh r0, [r4] - subs r0, 0x1 - strh r0, [r4] - lsls r0, 16 - lsrs r0, 16 - cmp r2, r0 - beq _081459E8 - ldrh r0, [r4] - lsls r0, 1 - adds r0, r6, r0 - ldrh r0, [r0] - strh r0, [r3] - ldrh r0, [r4] - lsls r0, 1 - adds r0, r6, r0 - mov r1, r9 - strh r1, [r0] -_081459E8: - ldrh r0, [r4] - cmp r0, 0 - bne _0814599A -_081459EE: - mov r2, r8 - ldrh r0, [r2] - cmp r0, 0x43 - bhi _08145A26 - adds r5, r0, 0 - movs r2, 0 - cmp r5, 0x43 - bhi _08145A5C - mov r3, r8 -_08145A00: - lsls r1, r5, 1 - adds r1, r7, r1 - lsls r0, r2, 1 - adds r0, r7, r0 - ldrh r0, [r0] - strh r0, [r1] - adds r0, r2, 0x1 - lsls r0, 16 - lsrs r2, r0, 16 - ldrh r0, [r3] - cmp r2, r0 - bne _08145A1A - movs r2, 0 -_08145A1A: - adds r0, r5, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - cmp r5, 0x43 - bls _08145A00 - b _08145A5C -_08145A26: - movs r4, 0 - ldrh r0, [r7] - cmp r0, r10 - beq _08145A42 -_08145A2E: - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - lsls r0, r4, 1 - adds r0, r7, r0 - ldrh r0, [r0] - cmp r0, r10 - beq _08145A42 - cmp r4, 0x43 - bls _08145A2E -_08145A42: - mov r1, r8 - ldrh r0, [r1] - subs r0, 0x1 - cmp r4, r0 - bge _08145A5C - lsls r0, r4, 1 - adds r0, r7, r0 - ldr r2, [sp] - ldrh r1, [r2] - strh r1, [r0] - mov r0, r10 - strh r0, [r2] - b _08145A62 -_08145A5C: - mov r2, r10 - ldr r1, [sp] - strh r2, [r1] -_08145A62: - movs r0, 0x44 - mov r1, r8 - strh r0, [r1] - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_81458DC - .align 2, 0 @ Don't pad with nop. diff --git a/ld_script.txt b/ld_script.txt index c44f946ad..e56af2903 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -195,6 +195,8 @@ SECTIONS { asm/player_pc.o(.text); src/intro.o(.text); asm/rom_813BA94.o(.text); + asm/hall_of_fame.o(.text); + asm/credits.o(.text); src/lottery_corner.o(.text); src/diploma.o(.text); src/berry_tag_screen.o(.text);