From 0e8413edf2f4a9784dcb3c8d46924c6cdfb134b3 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 7 Apr 2017 06:59:28 +0100 Subject: [PATCH] split rom_81258BC.s --- asm/battle_anim_81258BC.s | 2224 +++++++ asm/{rom_81258BC.s => battle_anim_812C144.s} | 5849 +----------------- asm/decoration_inventory.s | 404 ++ asm/fldeff_softboiled.s | 318 + asm/fldeff_sweetscent.s | 211 + asm/learn_move.s | 2735 ++++++++ ld_script.txt | 7 +- 7 files changed, 5899 insertions(+), 5849 deletions(-) create mode 100644 asm/battle_anim_81258BC.s rename asm/{rom_81258BC.s => battle_anim_812C144.s} (68%) create mode 100644 asm/decoration_inventory.s create mode 100644 asm/fldeff_softboiled.s create mode 100644 asm/fldeff_sweetscent.s create mode 100644 asm/learn_move.s diff --git a/asm/battle_anim_81258BC.s b/asm/battle_anim_81258BC.s new file mode 100644 index 000000000..eec63e0ed --- /dev/null +++ b/asm/battle_anim_81258BC.s @@ -0,0 +1,2224 @@ + .include "constants/gba_constants.inc" + .include "constants/species_constants.inc" + .include "asm/macros.inc" + + .syntax unified + + .text + + thumb_func_start unref_sub_812AECC +unref_sub_812AECC: @ 812AECC + push {lr} + bl sub_812613C + lsls r0, 24 + lsrs r0, 24 + adds r1, r0, 0 + cmp r0, 0x1 + beq _0812AEEA + cmp r0, 0x1 + ble _0812AF08 + cmp r1, 0x2 + beq _0812AEF4 + cmp r1, 0x3 + beq _0812AEFA + b _0812AF08 +_0812AEEA: + movs r0, 0x16 + bl PlaySE + movs r0, 0x1 + b _0812AF0A +_0812AEF4: + bl sub_812AF10 + b _0812AF08 +_0812AEFA: + movs r0, 0x16 + bl PlaySE + bl sub_812AF10 + movs r0, 0x1 + b _0812AF0A +_0812AF08: + movs r0, 0 +_0812AF0A: + pop {r1} + bx r1 + thumb_func_end unref_sub_812AECC + + thumb_func_start sub_812AF10 +sub_812AF10: @ 812AF10 + push {lr} + movs r0, 0x2 + movs r1, 0xE + movs r2, 0x1B + movs r3, 0x13 + bl MenuDrawTextWindow + ldr r0, _0812AF2C @ =gStringVar4 + movs r1, 0x3 + movs r2, 0xF + bl MenuPrint + pop {r0} + bx r0 + .align 2, 0 +_0812AF2C: .4byte gStringVar4 + thumb_func_end sub_812AF10 + + thumb_func_start sub_812AF30 +sub_812AF30: @ 812AF30 + push {r4-r6,lr} + lsls r0, 24 + lsrs r0, 24 + ldr r1, _0812AF8C @ =gTasks + lsls r6, r0, 2 + adds r6, r0 + lsls r6, 3 + adds r6, r1 + ldr r1, _0812AF90 @ =gBattleAnimArgs + ldrh r0, [r1] + strh r0, [r6, 0x8] + ldrh r0, [r1, 0x2] + strh r0, [r6, 0xA] + movs r0, 0x40 + negs r0, r0 + bl sub_8076F98 + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + movs r0, 0x3F + bl sub_8076F98 + adds r5, r0, 0 + lsls r4, 24 + asrs r4, 24 + lsls r5, 24 + asrs r5, 24 + adds r0, r4, 0 + adds r1, r5, 0 + movs r2, 0x2 + bl sub_807712C + strh r4, [r6, 0xC] + strh r5, [r6, 0xE] + lsls r0, 24 + asrs r0, 24 + strh r0, [r6, 0x10] + movs r0, 0xA + strh r0, [r6, 0x1C] + ldr r0, _0812AF94 @ =sub_812AF98 + str r0, [r6] + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_0812AF8C: .4byte gTasks +_0812AF90: .4byte gBattleAnimArgs +_0812AF94: .4byte sub_812AF98 + thumb_func_end sub_812AF30 + + thumb_func_start sub_812AF98 +sub_812AF98: @ 812AF98 + push {r4-r6,lr} + lsls r0, 24 + lsrs r0, 24 + ldr r2, _0812AFC8 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r4, r1, r2 + ldrh r5, [r4, 0xC] + ldrb r6, [r4, 0x10] + ldrh r0, [r4, 0x1E] + adds r0, 0x1 + movs r1, 0 + strh r0, [r4, 0x1E] + lsls r0, 16 + asrs r0, 16 + cmp r0, 0x6F + bne _0812AFD0 + movs r0, 0x5 + strh r0, [r4, 0x1C] + strh r1, [r4, 0x1E] + ldr r0, _0812AFCC @ =sub_812B004 + str r0, [r4] + b _0812AFFE + .align 2, 0 +_0812AFC8: .4byte gTasks +_0812AFCC: .4byte sub_812B004 +_0812AFD0: + ldrh r0, [r4, 0x1C] + adds r0, 0x1 + strh r0, [r4, 0x1C] + lsls r0, 16 + asrs r0, 16 + cmp r0, 0xB + bne _0812AFEA + strh r1, [r4, 0x1C] + ldrh r0, [r4, 0x8] + lsls r1, r5, 24 + asrs r1, 24 + bl PlaySE12WithPanning +_0812AFEA: + lsls r1, r6, 24 + asrs r1, 24 + lsls r0, r5, 16 + asrs r0, 16 + adds r0, r1 + lsls r0, 16 + asrs r0, 16 + bl sub_8077104 + strh r0, [r4, 0xC] +_0812AFFE: + pop {r4-r6} + pop {r0} + bx r0 + thumb_func_end sub_812AF98 + + thumb_func_start sub_812B004 +sub_812B004: @ 812B004 + push {r4,r5,lr} + lsls r0, 24 + lsrs r5, r0, 24 + ldr r1, _0812B054 @ =gTasks + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r4, r0, r1 + ldrh r0, [r4, 0x1C] + adds r0, 0x1 + strh r0, [r4, 0x1C] + lsls r0, 16 + asrs r0, 16 + cmp r0, 0x6 + bne _0812B04C + movs r0, 0 + strh r0, [r4, 0x1C] + movs r0, 0x3F + bl sub_8076F98 + adds r1, r0, 0 + ldrh r0, [r4, 0xA] + lsls r1, 24 + asrs r1, 24 + bl PlaySE12WithPanning + ldrh r0, [r4, 0x1E] + adds r0, 0x1 + strh r0, [r4, 0x1E] + lsls r0, 16 + asrs r0, 16 + cmp r0, 0x2 + bne _0812B04C + adds r0, r5, 0 + bl move_anim_related_task_del +_0812B04C: + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812B054: .4byte gTasks + thumb_func_end sub_812B004 + + thumb_func_start sub_812B058 +sub_812B058: @ 812B058 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0x4 + mov r8, r0 + lsls r0, 24 + lsrs r0, 24 + mov r8, r0 + ldr r0, _0812B0FC @ =gBattleAnimArgs + ldrh r1, [r0] + str r1, [sp] + ldrb r5, [r0, 0x4] + ldrb r6, [r0, 0x6] + ldrb r3, [r0, 0x8] + mov r10, r3 + ldrb r7, [r0, 0xA] + ldrb r1, [r0, 0xC] + mov r9, r1 + ldrb r0, [r0, 0x2] + lsls r0, 24 + asrs r0, 24 + bl sub_8076F98 + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + lsls r5, 24 + asrs r5, 24 + adds r0, r5, 0 + bl sub_8076F98 + adds r5, r0, 0 + lsls r4, 24 + asrs r4, 24 + lsls r5, 24 + asrs r5, 24 + lsls r6, 24 + asrs r6, 24 + adds r0, r4, 0 + adds r1, r5, 0 + adds r2, r6, 0 + bl sub_807712C + ldr r2, _0812B100 @ =gTasks + mov r3, r8 + lsls r1, r3, 2 + add r1, r8 + lsls r1, 3 + adds r1, r2 + movs r2, 0 + mov r6, sp + ldrh r6, [r6] + strh r6, [r1, 0x8] + strh r4, [r1, 0xA] + strh r5, [r1, 0xC] + lsls r0, 24 + asrs r0, 24 + strh r0, [r1, 0xE] + mov r0, r10 + strh r0, [r1, 0x10] + strh r7, [r1, 0x12] + mov r3, r9 + strh r3, [r1, 0x14] + strh r2, [r1, 0x1C] + strh r4, [r1, 0x1E] + strh r3, [r1, 0x20] + ldr r2, _0812B104 @ =sub_812B108 + str r2, [r1] + mov r0, r8 + bl _call_via_r2 + 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 +_0812B0FC: .4byte gBattleAnimArgs +_0812B100: .4byte gTasks +_0812B104: .4byte sub_812B108 + thumb_func_end sub_812B058 + + thumb_func_start sub_812B108 +sub_812B108: @ 812B108 + push {r4,r5,lr} + lsls r0, 24 + lsrs r5, r0, 24 + ldr r1, _0812B14C @ =gTasks + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r4, r0, r1 + ldrh r0, [r4, 0x20] + adds r1, r0, 0x1 + strh r1, [r4, 0x20] + lsls r0, 16 + asrs r0, 16 + movs r2, 0x14 + ldrsh r1, [r4, r2] + cmp r0, r1 + bne _0812B150 + movs r0, 0 + strh r0, [r4, 0x20] + ldrh r0, [r4, 0x8] + movs r1, 0x1E + ldrsb r1, [r4, r1] + bl PlaySE12WithPanning + ldrh r0, [r4, 0x10] + subs r0, 0x1 + strh r0, [r4, 0x10] + lsls r0, 16 + cmp r0, 0 + bne _0812B150 + adds r0, r5, 0 + bl move_anim_related_task_del + b _0812B182 + .align 2, 0 +_0812B14C: .4byte gTasks +_0812B150: + ldr r1, _0812B188 @ =gTasks + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r4, r0, r1 + ldrh r0, [r4, 0x1C] + adds r1, r0, 0x1 + strh r1, [r4, 0x1C] + lsls r0, 16 + asrs r0, 16 + movs r2, 0x12 + ldrsh r1, [r4, r2] + cmp r0, r1 + bne _0812B182 + movs r0, 0 + strh r0, [r4, 0x1C] + ldrh r0, [r4, 0xE] + ldrh r1, [r4, 0x1E] + adds r0, r1 + strh r0, [r4, 0x1E] + movs r2, 0x1E + ldrsh r0, [r4, r2] + bl sub_8077104 + strh r0, [r4, 0x1E] +_0812B182: + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812B188: .4byte gTasks + thumb_func_end sub_812B108 + + thumb_func_start sub_812B18C +sub_812B18C: @ 812B18C + push {r4-r6,lr} + lsls r0, 24 + lsrs r5, r0, 24 + movs r4, 0 + movs r0, 0x40 + negs r0, r0 + bl sub_8076F98 + lsls r0, 24 + lsrs r6, r0, 24 + bl sub_8076BE0 + lsls r0, 24 + cmp r0, 0 + beq _0812B1CC + ldr r0, _0812B1BC @ =gBattleAnimArgs + movs r1, 0 + ldrsh r0, [r0, r1] + cmp r0, 0 + bne _0812B1C4 + ldr r0, _0812B1C0 @ =0x02019348 + ldrh r4, [r0] + b _0812B272 + .align 2, 0 +_0812B1BC: .4byte gBattleAnimArgs +_0812B1C0: .4byte 0x02019348 +_0812B1C4: + adds r0, r5, 0 + bl move_anim_task_del + b _0812B272 +_0812B1CC: + ldr r0, _0812B1E0 @ =gBattleAnimArgs + movs r2, 0 + ldrsh r1, [r0, r2] + adds r2, r0, 0 + cmp r1, 0 + bne _0812B1E8 + ldr r0, _0812B1E4 @ =gUnknown_0202F7C8 + ldrb r4, [r0] + b _0812B20E + .align 2, 0 +_0812B1E0: .4byte gBattleAnimArgs +_0812B1E4: .4byte gUnknown_0202F7C8 +_0812B1E8: + cmp r1, 0x1 + bne _0812B1F8 + ldr r0, _0812B1F4 @ =gUnknown_0202F7C9 + ldrb r4, [r0] + b _0812B20E + .align 2, 0 +_0812B1F4: .4byte gUnknown_0202F7C9 +_0812B1F8: + cmp r1, 0x2 + bne _0812B204 + ldr r0, _0812B200 @ =gUnknown_0202F7C8 + b _0812B206 + .align 2, 0 +_0812B200: .4byte gUnknown_0202F7C8 +_0812B204: + ldr r0, _0812B230 @ =gUnknown_0202F7C9 +_0812B206: + ldrb r1, [r0] + movs r0, 0x2 + adds r4, r0, 0 + eors r4, r1 +_0812B20E: + movs r1, 0 + ldrsh r0, [r2, r1] + cmp r0, 0x1 + beq _0812B21A + cmp r0, 0x3 + bne _0812B234 +_0812B21A: + adds r0, r4, 0 + bl b_side_obj__get_some_boolean + lsls r0, 24 + cmp r0, 0 + bne _0812B234 + adds r0, r5, 0 + bl move_anim_task_del + b _0812B2B0 + .align 2, 0 +_0812B230: .4byte gUnknown_0202F7C9 +_0812B234: + adds r0, r4, 0 + bl battle_side_get_owner + lsls r0, 24 + cmp r0, 0 + beq _0812B258 + ldr r1, _0812B250 @ =gUnknown_02024A6A + lsls r0, r4, 1 + adds r0, r1 + ldrh r1, [r0] + movs r0, 0x64 + muls r0, r1 + ldr r1, _0812B254 @ =gEnemyParty + b _0812B266 + .align 2, 0 +_0812B250: .4byte gUnknown_02024A6A +_0812B254: .4byte gEnemyParty +_0812B258: + ldr r1, _0812B290 @ =gUnknown_02024A6A + lsls r0, r4, 1 + adds r0, r1 + ldrh r1, [r0] + movs r0, 0x64 + muls r0, r1 + ldr r1, _0812B294 @ =gPlayerParty +_0812B266: + adds r0, r1 + movs r1, 0xB + bl GetMonData + lsls r0, 16 + lsrs r4, r0, 16 +_0812B272: + cmp r4, 0 + beq _0812B2AA + ldr r0, _0812B298 @ =gBattleAnimArgs + ldrh r2, [r0, 0x2] + movs r1, 0x2 + ldrsh r0, [r0, r1] + cmp r0, 0xFF + bne _0812B29C + lsls r1, r6, 24 + asrs r1, 24 + adds r0, r4, 0 + bl PlayCry1 + b _0812B2AA + .align 2, 0 +_0812B290: .4byte gUnknown_02024A6A +_0812B294: .4byte gPlayerParty +_0812B298: .4byte gBattleAnimArgs +_0812B29C: + lsls r1, r6, 24 + asrs r1, 24 + lsls r2, 24 + lsrs r2, 24 + adds r0, r4, 0 + bl PlayCry3 +_0812B2AA: + adds r0, r5, 0 + bl move_anim_task_del +_0812B2B0: + pop {r4-r6} + pop {r0} + bx r0 + thumb_func_end sub_812B18C + + thumb_func_start sub_812B2B8 +sub_812B2B8: @ 812B2B8 + push {r4,r5,lr} + lsls r0, 24 + lsrs r5, r0, 24 + movs r0, 0x40 + negs r0, r0 + bl sub_8076F98 + lsls r0, 24 + lsrs r4, r0, 24 + bl sub_8076BE0 + lsls r0, 24 + cmp r0, 0 + beq _0812B2DC + ldr r0, _0812B2D8 @ =0x02019348 + b _0812B2E6 + .align 2, 0 +_0812B2D8: .4byte 0x02019348 +_0812B2DC: + ldr r1, _0812B304 @ =gUnknown_0202F7CA + ldr r0, _0812B308 @ =gUnknown_0202F7C8 + ldrb r0, [r0] + lsls r0, 1 + adds r0, r1 +_0812B2E6: + ldrh r0, [r0] + cmp r0, 0 + beq _0812B2F6 + lsls r1, r4, 24 + asrs r1, 24 + movs r2, 0x4 + bl PlayCry3 +_0812B2F6: + adds r0, r5, 0 + bl move_anim_task_del + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812B304: .4byte gUnknown_0202F7CA +_0812B308: .4byte gUnknown_0202F7C8 + thumb_func_end sub_812B2B8 + + thumb_func_start sub_812B30C +sub_812B30C: @ 812B30C + push {r4,r5,lr} + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + ldr r0, _0812B33C @ =gBattleAnimArgs + ldrh r5, [r0] + ldrb r0, [r0, 0x2] + lsls r0, 24 + asrs r0, 24 + bl sub_8076F98 + adds r1, r0, 0 + lsls r1, 24 + asrs r1, 24 + adds r0, r5, 0 + bl PlaySE1WithPanning + adds r0, r4, 0 + bl move_anim_task_del + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812B33C: .4byte gBattleAnimArgs + thumb_func_end sub_812B30C + + thumb_func_start sub_812B340 +sub_812B340: @ 812B340 + push {r4,r5,lr} + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + ldr r0, _0812B370 @ =gBattleAnimArgs + ldrh r5, [r0] + ldrb r0, [r0, 0x2] + lsls r0, 24 + asrs r0, 24 + bl sub_8076F98 + adds r1, r0, 0 + lsls r1, 24 + asrs r1, 24 + adds r0, r5, 0 + bl PlaySE2WithPanning + adds r0, r4, 0 + bl move_anim_task_del + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812B370: .4byte gBattleAnimArgs + thumb_func_end sub_812B340 + + thumb_func_start sub_812B374 +sub_812B374: @ 812B374 + push {r4-r6,lr} + mov r6, r9 + mov r5, r8 + push {r5,r6} + mov r8, r0 + lsls r0, 24 + lsrs r0, 24 + mov r8, r0 + ldr r0, _0812B3F8 @ =gBattleAnimArgs + ldrb r5, [r0, 0x2] + ldrb r6, [r0, 0x4] + ldrh r1, [r0, 0x6] + mov r9, r1 + ldrb r0, [r0] + lsls r0, 24 + asrs r0, 24 + bl sub_8076F98 + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + lsls r5, 24 + asrs r5, 24 + adds r0, r5, 0 + bl sub_8076F98 + adds r5, r0, 0 + lsls r4, 24 + asrs r4, 24 + lsls r5, 24 + asrs r5, 24 + lsls r6, 24 + asrs r6, 24 + adds r0, r4, 0 + adds r1, r5, 0 + adds r2, r6, 0 + bl sub_807712C + ldr r2, _0812B3FC @ =gTasks + mov r3, r8 + lsls r1, r3, 2 + add r1, r8 + lsls r1, 3 + adds r1, r2 + movs r2, 0 + strh r4, [r1, 0xA] + strh r5, [r1, 0xC] + lsls r0, 24 + asrs r0, 24 + strh r0, [r1, 0xE] + mov r0, r9 + strh r0, [r1, 0x12] + strh r2, [r1, 0x1C] + strh r4, [r1, 0x1E] + ldr r2, _0812B400 @ =sub_812B404 + str r2, [r1] + mov r0, r8 + bl _call_via_r2 + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_0812B3F8: .4byte gBattleAnimArgs +_0812B3FC: .4byte gTasks +_0812B400: .4byte sub_812B404 + thumb_func_end sub_812B374 + + thumb_func_start sub_812B404 +sub_812B404: @ 812B404 + push {r4,r5,lr} + lsls r0, 24 + lsrs r0, 24 + adds r5, r0, 0 + ldr r1, _0812B45C @ =gTasks + lsls r0, r5, 2 + adds r0, r5 + lsls r0, 3 + adds r4, r0, r1 + ldrh r2, [r4, 0xE] + ldrh r0, [r4, 0x1C] + adds r1, r0, 0x1 + strh r1, [r4, 0x1C] + lsls r0, 16 + asrs r0, 16 + movs r3, 0x12 + ldrsh r1, [r4, r3] + cmp r0, r1 + bne _0812B43E + movs r0, 0 + strh r0, [r4, 0x1C] + ldrh r1, [r4, 0x1E] + adds r0, r2, r1 + strh r0, [r4, 0x1E] + movs r2, 0x1E + ldrsh r0, [r4, r2] + bl sub_8077104 + strh r0, [r4, 0x1E] +_0812B43E: + ldr r1, _0812B460 @ =gUnknown_0202F7D2 + ldrh r0, [r4, 0x1E] + strb r0, [r1] + movs r3, 0x1E + ldrsh r1, [r4, r3] + movs r2, 0xC + ldrsh r0, [r4, r2] + cmp r1, r0 + bne _0812B456 + adds r0, r5, 0 + bl move_anim_task_del +_0812B456: + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812B45C: .4byte gTasks +_0812B460: .4byte gUnknown_0202F7D2 + thumb_func_end sub_812B404 + + thumb_func_start unref_sub_812B464 +unref_sub_812B464: @ 812B464 + bx lr + thumb_func_end unref_sub_812B464 + + thumb_func_start sub_812B468 +sub_812B468: @ 812B468 + ldr r1, _0812B478 @ =gUnknown_03004330 + ldr r0, _0812B47C @ =gUnknown_02024A60 + ldrb r0, [r0] + lsls r0, 2 + adds r0, r1 + ldr r1, _0812B480 @ =sub_812B484 + str r1, [r0] + bx lr + .align 2, 0 +_0812B478: .4byte gUnknown_03004330 +_0812B47C: .4byte gUnknown_02024A60 +_0812B480: .4byte sub_812B484 + thumb_func_end sub_812B468 + + thumb_func_start sub_812B484 +sub_812B484: @ 812B484 + push {lr} + ldr r2, _0812B4B8 @ =gUnknown_02024A64 + ldr r1, _0812B4BC @ =gBitTable + ldr r0, _0812B4C0 @ =gUnknown_02024A60 + ldrb r3, [r0] + lsls r0, r3, 2 + adds r0, r1 + ldr r1, [r2] + ldr r0, [r0] + ands r1, r0 + cmp r1, 0 + beq _0812B4D0 + ldr r0, _0812B4C4 @ =gUnknown_02023A60 + lsls r1, r3, 9 + adds r1, r0 + ldrb r0, [r1] + cmp r0, 0x38 + bhi _0812B4CC + ldr r0, _0812B4C8 @ =gUnknown_08402080 + ldrb r1, [r1] + lsls r1, 2 + adds r1, r0 + ldr r0, [r1] + bl _call_via_r0 + b _0812B4D0 + .align 2, 0 +_0812B4B8: .4byte gUnknown_02024A64 +_0812B4BC: .4byte gBitTable +_0812B4C0: .4byte gUnknown_02024A60 +_0812B4C4: .4byte gUnknown_02023A60 +_0812B4C8: .4byte gUnknown_08402080 +_0812B4CC: + bl dp01_tbl6_exec_completed +_0812B4D0: + pop {r0} + bx r0 + thumb_func_end sub_812B484 + + thumb_func_start bx_battle_menu_t6_2 +bx_battle_menu_t6_2: @ 812B4D4 + push {r4,r5,lr} + ldr r0, _0812B508 @ =gMain + ldrh r1, [r0, 0x2E] + movs r2, 0x1 + adds r0, r2, 0 + ands r0, r1 + cmp r0, 0 + beq _0812B546 + movs r0, 0x5 + bl PlaySE + bl sub_814A7FC + ldr r1, _0812B50C @ =gUnknown_02024E60 + ldr r0, _0812B510 @ =gUnknown_02024A60 + ldrb r0, [r0] + adds r0, r1 + ldrb r0, [r0] + cmp r0, 0x1 + beq _0812B524 + cmp r0, 0x1 + bgt _0812B514 + cmp r0, 0 + beq _0812B51E + b _0812B540 + .align 2, 0 +_0812B508: .4byte gMain +_0812B50C: .4byte gUnknown_02024E60 +_0812B510: .4byte gUnknown_02024A60 +_0812B514: + cmp r0, 0x2 + beq _0812B52A + cmp r0, 0x3 + beq _0812B536 + b _0812B540 +_0812B51E: + movs r0, 0x1 + movs r1, 0x5 + b _0812B52E +_0812B524: + movs r0, 0x1 + movs r1, 0x6 + b _0812B52E +_0812B52A: + movs r0, 0x1 + movs r1, 0x7 +_0812B52E: + movs r2, 0 + bl dp01_build_cmdbuf_x21_a_bb + b _0812B540 +_0812B536: + movs r0, 0x1 + movs r1, 0x8 + movs r2, 0 + bl dp01_build_cmdbuf_x21_a_bb +_0812B540: + bl dp01_tbl6_exec_completed + b _0812B64E +_0812B546: + movs r0, 0x20 + ands r0, r1 + cmp r0, 0 + beq _0812B584 + ldr r5, _0812B57C @ =gUnknown_02024E60 + ldr r4, _0812B580 @ =gUnknown_02024A60 + ldrb r0, [r4] + adds r0, r5 + ldrb r1, [r0] + adds r0, r2, 0 + ands r0, r1 + cmp r0, 0 + beq _0812B64E + movs r0, 0x5 + bl PlaySE + ldrb r0, [r4] + adds r0, r5 + ldrb r0, [r0] + bl nullsub_8 + ldrb r1, [r4] + adds r1, r5 + ldrb r0, [r1] + movs r2, 0x1 + b _0812B5F2 + .align 2, 0 +_0812B57C: .4byte gUnknown_02024E60 +_0812B580: .4byte gUnknown_02024A60 +_0812B584: + movs r0, 0x10 + ands r0, r1 + cmp r0, 0 + beq _0812B5C0 + ldr r5, _0812B5B8 @ =gUnknown_02024E60 + ldr r4, _0812B5BC @ =gUnknown_02024A60 + ldrb r0, [r4] + adds r0, r5 + ldrb r1, [r0] + adds r0, r2, 0 + ands r0, r1 + cmp r0, 0 + bne _0812B64E + movs r0, 0x5 + bl PlaySE + ldrb r0, [r4] + adds r0, r5 + ldrb r0, [r0] + bl nullsub_8 + ldrb r1, [r4] + adds r1, r5 + ldrb r0, [r1] + movs r2, 0x1 + b _0812B5F2 + .align 2, 0 +_0812B5B8: .4byte gUnknown_02024E60 +_0812B5BC: .4byte gUnknown_02024A60 +_0812B5C0: + movs r0, 0x40 + ands r0, r1 + cmp r0, 0 + beq _0812B60C + ldr r5, _0812B604 @ =gUnknown_02024E60 + ldr r4, _0812B608 @ =gUnknown_02024A60 + ldrb r0, [r4] + adds r0, r5 + ldrb r1, [r0] + movs r0, 0x2 + ands r0, r1 + cmp r0, 0 + beq _0812B64E + movs r0, 0x5 + bl PlaySE + ldrb r0, [r4] + adds r0, r5 + ldrb r0, [r0] + bl nullsub_8 + ldrb r1, [r4] + adds r1, r5 + ldrb r0, [r1] + movs r2, 0x2 +_0812B5F2: + eors r0, r2 + strb r0, [r1] + ldrb r0, [r4] + adds r0, r5 + ldrb r0, [r0] + movs r1, 0 + bl sub_802E3E4 + b _0812B64E + .align 2, 0 +_0812B604: .4byte gUnknown_02024E60 +_0812B608: .4byte gUnknown_02024A60 +_0812B60C: + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + beq _0812B64E + ldr r5, _0812B654 @ =gUnknown_02024E60 + ldr r4, _0812B658 @ =gUnknown_02024A60 + ldrb r0, [r4] + adds r0, r5 + ldrb r1, [r0] + movs r0, 0x2 + ands r0, r1 + cmp r0, 0 + bne _0812B64E + movs r0, 0x5 + bl PlaySE + ldrb r0, [r4] + adds r0, r5 + ldrb r0, [r0] + bl nullsub_8 + ldrb r1, [r4] + adds r1, r5 + ldrb r0, [r1] + movs r2, 0x2 + eors r0, r2 + strb r0, [r1] + ldrb r0, [r4] + adds r0, r5 + ldrb r0, [r0] + movs r1, 0 + bl sub_802E3E4 +_0812B64E: + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812B654: .4byte gUnknown_02024E60 +_0812B658: .4byte gUnknown_02024A60 + thumb_func_end bx_battle_menu_t6_2 + + thumb_func_start sub_812B65C +sub_812B65C: @ 812B65C + push {lr} + ldr r2, _0812B684 @ =gSprites + ldr r1, _0812B688 @ =gUnknown_02024BE0 + ldr r0, _0812B68C @ =gUnknown_02024A60 + ldrb r0, [r0] + adds r0, r1 + ldrb r1, [r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r2, 0x1C + adds r0, r2 + ldr r1, [r0] + ldr r0, _0812B690 @ =SpriteCallbackDummy + cmp r1, r0 + bne _0812B680 + bl dp01_tbl6_exec_completed +_0812B680: + pop {r0} + bx r0 + .align 2, 0 +_0812B684: .4byte gSprites +_0812B688: .4byte gUnknown_02024BE0 +_0812B68C: .4byte gUnknown_02024A60 +_0812B690: .4byte SpriteCallbackDummy + thumb_func_end sub_812B65C + + thumb_func_start sub_812B694 +sub_812B694: @ 812B694 + push {lr} + ldr r0, _0812B6A8 @ =gUnknown_03004210 + ldrh r0, [r0, 0x16] + cmp r0, 0 + bne _0812B6A2 + bl dp01_tbl6_exec_completed +_0812B6A2: + pop {r0} + bx r0 + .align 2, 0 +_0812B6A8: .4byte gUnknown_03004210 + thumb_func_end sub_812B694 + + thumb_func_start sub_812B6AC +sub_812B6AC: @ 812B6AC + push {lr} + ldr r0, _0812B6DC @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _0812B6D6 + ldr r2, _0812B6E0 @ =gMain + ldr r0, _0812B6E4 @ =0x0000043d + adds r3, r2, r0 + ldrb r1, [r3] + movs r0, 0x3 + negs r0, r0 + ands r0, r1 + strb r0, [r3] + ldr r0, _0812B6E8 @ =gUnknown_030042D0 + ldr r0, [r0] + str r0, [r2] + ldr r0, [r2, 0x8] + bl SetMainCallback2 +_0812B6D6: + pop {r0} + bx r0 + .align 2, 0 +_0812B6DC: .4byte gPaletteFade +_0812B6E0: .4byte gMain +_0812B6E4: .4byte 0x0000043d +_0812B6E8: .4byte gUnknown_030042D0 + thumb_func_end sub_812B6AC + + thumb_func_start bx_wait_t6 +bx_wait_t6: @ 812B6EC + push {lr} + ldr r0, _0812B718 @ =gUnknown_02024E6D + ldrb r0, [r0] + cmp r0, 0 + beq _0812B70E + ldr r0, _0812B71C @ =gUnknown_02024A60 + ldrb r1, [r0] + lsls r0, r1, 1 + adds r0, r1 + lsls r0, 2 + ldr r1, _0812B720 @ =0x02017810 + adds r0, r1 + ldrb r1, [r0] + movs r0, 0x40 + ands r0, r1 + cmp r0, 0 + bne _0812B712 +_0812B70E: + bl dp01_tbl6_exec_completed +_0812B712: + pop {r0} + bx r0 + .align 2, 0 +_0812B718: .4byte gUnknown_02024E6D +_0812B71C: .4byte gUnknown_02024A60 +_0812B720: .4byte 0x02017810 + thumb_func_end bx_wait_t6 + + thumb_func_start sub_812B724 +sub_812B724: @ 812B724 + push {lr} + ldr r0, _0812B748 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _0812B744 + ldr r1, _0812B74C @ =gUnknown_03004330 + ldr r0, _0812B750 @ =gUnknown_02024A60 + ldrb r0, [r0] + lsls r0, 2 + adds r0, r1 + ldr r1, _0812B754 @ =sub_812B758 + str r1, [r0] + bl sub_810BADC +_0812B744: + pop {r0} + bx r0 + .align 2, 0 +_0812B748: .4byte gPaletteFade +_0812B74C: .4byte gUnknown_03004330 +_0812B750: .4byte gUnknown_02024A60 +_0812B754: .4byte sub_812B758 + thumb_func_end sub_812B724 + + thumb_func_start sub_812B758 +sub_812B758: @ 812B758 + push {lr} + ldr r0, _0812B784 @ =gMain + ldr r1, [r0, 0x4] + ldr r0, _0812B788 @ =sub_800F808 + cmp r1, r0 + bne _0812B77E + ldr r0, _0812B78C @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _0812B77E + ldr r0, _0812B790 @ =gScriptItemId + ldrh r1, [r0] + movs r0, 0x1 + bl dp01_build_cmdbuf_x23_aa_0 + bl dp01_tbl6_exec_completed +_0812B77E: + pop {r0} + bx r0 + .align 2, 0 +_0812B784: .4byte gMain +_0812B788: .4byte sub_800F808 +_0812B78C: .4byte gPaletteFade +_0812B790: .4byte gScriptItemId + thumb_func_end sub_812B758 + + thumb_func_start sub_812B794 +sub_812B794: @ 812B794 + push {lr} + ldr r0, _0812B7B8 @ =gUnknown_02024A60 + ldrb r1, [r0] + lsls r0, r1, 1 + adds r0, r1 + lsls r0, 2 + ldr r1, _0812B7BC @ =0x02017810 + adds r0, r1 + ldrb r1, [r0] + movs r0, 0x20 + ands r0, r1 + cmp r0, 0 + bne _0812B7B2 + bl dp01_tbl6_exec_completed +_0812B7B2: + pop {r0} + bx r0 + .align 2, 0 +_0812B7B8: .4byte gUnknown_02024A60 +_0812B7BC: .4byte 0x02017810 + thumb_func_end sub_812B794 + + thumb_func_start dp01_tbl6_exec_completed +dp01_tbl6_exec_completed: @ 812B7C0 + push {r4,lr} + sub sp, 0x4 + ldr r1, _0812B800 @ =gUnknown_03004330 + ldr r4, _0812B804 @ =gUnknown_02024A60 + ldrb r0, [r4] + lsls r0, 2 + adds r0, r1 + ldr r1, _0812B808 @ =sub_812B484 + str r1, [r0] + ldr r0, _0812B80C @ =gBattleTypeFlags + ldrh r1, [r0] + movs r0, 0x2 + ands r0, r1 + cmp r0, 0 + beq _0812B814 + bl GetMultiplayerId + mov r1, sp + strb r0, [r1] + movs r0, 0x2 + movs r1, 0x4 + mov r2, sp + bl dp01_prepare_buffer_wireless_probably + ldr r1, _0812B810 @ =gUnknown_02023A60 + ldrb r0, [r4] + lsls r0, 9 + adds r0, r1 + movs r1, 0x38 + strb r1, [r0] + b _0812B826 + .align 2, 0 +_0812B800: .4byte gUnknown_03004330 +_0812B804: .4byte gUnknown_02024A60 +_0812B808: .4byte sub_812B484 +_0812B80C: .4byte gBattleTypeFlags +_0812B810: .4byte gUnknown_02023A60 +_0812B814: + ldr r2, _0812B830 @ =gUnknown_02024A64 + ldr r1, _0812B834 @ =gBitTable + ldrb r0, [r4] + lsls r0, 2 + adds r0, r1 + ldr r1, [r0] + ldr r0, [r2] + bics r0, r1 + str r0, [r2] +_0812B826: + add sp, 0x4 + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_0812B830: .4byte gUnknown_02024A64 +_0812B834: .4byte gBitTable + thumb_func_end dp01_tbl6_exec_completed + + thumb_func_start unref_sub_812B838 +unref_sub_812B838: @ 812B838 + push {lr} + ldr r0, _0812B85C @ =gUnknown_02024A60 + ldrb r1, [r0] + lsls r0, r1, 1 + adds r0, r1 + lsls r0, 2 + ldr r1, _0812B860 @ =0x02017810 + adds r0, r1 + ldrb r1, [r0] + movs r0, 0x10 + ands r0, r1 + cmp r0, 0 + bne _0812B856 + bl dp01_tbl6_exec_completed +_0812B856: + pop {r0} + bx r0 + .align 2, 0 +_0812B85C: .4byte gUnknown_02024A60 +_0812B860: .4byte 0x02017810 + thumb_func_end unref_sub_812B838 + + thumb_func_start sub_812B864 +sub_812B864: @ 812B864 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B864 + + thumb_func_start sub_812B870 +sub_812B870: @ 812B870 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B870 + + thumb_func_start sub_812B87C +sub_812B87C: @ 812B87C + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B87C + + thumb_func_start sub_812B888 +sub_812B888: @ 812B888 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B888 + + thumb_func_start sub_812B894 +sub_812B894: @ 812B894 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B894 + + thumb_func_start sub_812B8A0 +sub_812B8A0: @ 812B8A0 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B8A0 + + thumb_func_start sub_812B8AC +sub_812B8AC: @ 812B8AC + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B8AC + + thumb_func_start sub_812B8B8 +sub_812B8B8: @ 812B8B8 + push {r4-r6,lr} + ldr r4, _0812B96C @ =gSaveBlock2 + ldrb r0, [r4, 0x8] + ldr r5, _0812B970 @ =gUnknown_02024A60 + ldrb r1, [r5] + bl sub_8031AF4 + ldrb r6, [r4, 0x8] + ldrb r0, [r5] + bl battle_get_per_side_status + adds r1, r0, 0 + lsls r1, 24 + lsrs r1, 24 + adds r0, r6, 0 + bl GetMonSpriteTemplate_803C5A0 + ldr r0, _0812B974 @ =gUnknown_02024E8C + ldr r2, _0812B978 @ =gTrainerBackPicCoords + ldrb r1, [r4, 0x8] + lsls r1, 2 + adds r1, r2 + ldrb r1, [r1] + movs r2, 0x8 + subs r2, r1 + lsls r2, 18 + movs r1, 0xA0 + lsls r1, 15 + adds r2, r1 + asrs r2, 16 + movs r1, 0x50 + movs r3, 0x1E + bl CreateSprite + ldr r6, _0812B97C @ =gUnknown_02024BE0 + ldrb r1, [r5] + adds r1, r6 + strb r0, [r1] + ldr r4, _0812B980 @ =gSprites + ldrb r3, [r5] + adds r0, r3, r6 + ldrb r0, [r0] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r4 + lsls r3, 4 + ldrb r2, [r1, 0x5] + movs r0, 0xF + ands r0, r2 + orrs r0, r3 + strb r0, [r1, 0x5] + ldrb r0, [r5] + adds r0, r6 + ldrb r1, [r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + movs r1, 0xF0 + strh r1, [r0, 0x24] + ldrb r0, [r5] + adds r0, r6 + ldrb r1, [r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + ldr r1, _0812B984 @ =0x0000fffe + strh r1, [r0, 0x2E] + ldrb r0, [r5] + adds r0, r6 + ldrb r1, [r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r4, 0x1C + adds r0, r4 + ldr r1, _0812B988 @ =sub_80313A0 + str r1, [r0] + ldr r1, _0812B98C @ =gUnknown_03004330 + ldrb r0, [r5] + lsls r0, 2 + adds r0, r1 + ldr r1, _0812B990 @ =sub_812B65C + str r1, [r0] + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_0812B96C: .4byte gSaveBlock2 +_0812B970: .4byte gUnknown_02024A60 +_0812B974: .4byte gUnknown_02024E8C +_0812B978: .4byte gTrainerBackPicCoords +_0812B97C: .4byte gUnknown_02024BE0 +_0812B980: .4byte gSprites +_0812B984: .4byte 0x0000fffe +_0812B988: .4byte sub_80313A0 +_0812B98C: .4byte gUnknown_03004330 +_0812B990: .4byte sub_812B65C + thumb_func_end sub_812B8B8 + + thumb_func_start sub_812B994 +sub_812B994: @ 812B994 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B994 + + thumb_func_start sub_812B9A0 +sub_812B9A0: @ 812B9A0 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B9A0 + + thumb_func_start sub_812B9AC +sub_812B9AC: @ 812B9AC + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B9AC + + thumb_func_start sub_812B9B8 +sub_812B9B8: @ 812B9B8 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812B9B8 + + thumb_func_start sub_812B9C4 +sub_812B9C4: @ 812B9C4 + push {r4,r5,lr} + ldr r1, _0812BA00 @ =0x02017840 + movs r0, 0x4 + strb r0, [r1, 0x8] + ldr r1, _0812BA04 @ =gUnknown_02024E6D + movs r0, 0x1 + strb r0, [r1] + ldr r5, _0812BA08 @ =gUnknown_02024A60 + ldrb r4, [r5] + movs r0, 0x1 + bl battle_get_side_with_given_state + adds r2, r0, 0 + lsls r2, 24 + lsrs r2, 24 + adds r0, r4, 0 + adds r1, r4, 0 + movs r3, 0x4 + bl move_anim_start_t4 + ldr r1, _0812BA0C @ =gUnknown_03004330 + ldrb r0, [r5] + lsls r0, 2 + adds r0, r1 + ldr r1, _0812BA10 @ =bx_wait_t6 + str r1, [r0] + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812BA00: .4byte 0x02017840 +_0812BA04: .4byte gUnknown_02024E6D +_0812BA08: .4byte gUnknown_02024A60 +_0812BA0C: .4byte gUnknown_03004330 +_0812BA10: .4byte bx_wait_t6 + thumb_func_end sub_812B9C4 + + thumb_func_start sub_812BA14 +sub_812BA14: @ 812BA14 + push {r4,r5,lr} + ldr r1, _0812BA58 @ =gUnknown_02023A60 + ldr r5, _0812BA5C @ =gUnknown_02024A60 + ldrb r0, [r5] + lsls r0, 9 + adds r1, 0x1 + adds r0, r1 + ldrb r1, [r0] + ldr r0, _0812BA60 @ =0x02017840 + strb r1, [r0, 0x8] + ldr r1, _0812BA64 @ =gUnknown_02024E6D + movs r0, 0x1 + strb r0, [r1] + ldrb r4, [r5] + movs r0, 0x1 + bl battle_get_side_with_given_state + adds r2, r0, 0 + lsls r2, 24 + lsrs r2, 24 + adds r0, r4, 0 + adds r1, r4, 0 + movs r3, 0x4 + bl move_anim_start_t4 + ldr r1, _0812BA68 @ =gUnknown_03004330 + ldrb r0, [r5] + lsls r0, 2 + adds r0, r1 + ldr r1, _0812BA6C @ =bx_wait_t6 + str r1, [r0] + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812BA58: .4byte gUnknown_02023A60 +_0812BA5C: .4byte gUnknown_02024A60 +_0812BA60: .4byte 0x02017840 +_0812BA64: .4byte gUnknown_02024E6D +_0812BA68: .4byte gUnknown_03004330 +_0812BA6C: .4byte bx_wait_t6 + thumb_func_end sub_812BA14 + + thumb_func_start sub_812BA70 +sub_812BA70: @ 812BA70 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BA70 + + thumb_func_start sub_812BA7C +sub_812BA7C: @ 812BA7C + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BA7C + + thumb_func_start dp01t_10_6_message +dp01t_10_6_message: @ 812BA88 + push {r4,lr} + sub sp, 0x4 + ldr r0, _0812BACC @ =gUnknown_030042A4 + movs r1, 0 + strh r1, [r0] + ldr r0, _0812BAD0 @ =gUnknown_030042A0 + strh r1, [r0] + ldr r4, _0812BAD4 @ =gUnknown_02024A60 + ldrb r0, [r4] + lsls r0, 9 + ldr r1, _0812BAD8 @ =gUnknown_02023A62 + adds r0, r1 + ldrh r0, [r0] + bl sub_8120AA8 + ldr r0, _0812BADC @ =gUnknown_03004210 + ldr r1, _0812BAE0 @ =gUnknown_020238CC + movs r2, 0xF + str r2, [sp] + movs r2, 0x90 + movs r3, 0x2 + bl sub_8002EB0 + ldr r1, _0812BAE4 @ =gUnknown_03004330 + ldrb r0, [r4] + lsls r0, 2 + adds r0, r1 + ldr r1, _0812BAE8 @ =sub_812B694 + str r1, [r0] + add sp, 0x4 + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_0812BACC: .4byte gUnknown_030042A4 +_0812BAD0: .4byte gUnknown_030042A0 +_0812BAD4: .4byte gUnknown_02024A60 +_0812BAD8: .4byte gUnknown_02023A62 +_0812BADC: .4byte gUnknown_03004210 +_0812BAE0: .4byte gUnknown_020238CC +_0812BAE4: .4byte gUnknown_03004330 +_0812BAE8: .4byte sub_812B694 + thumb_func_end dp01t_10_6_message + + thumb_func_start dp01t_11_6_message_for_player_only +dp01t_11_6_message_for_player_only: @ 812BAEC + push {lr} + ldr r0, _0812BB04 @ =gUnknown_02024A60 + ldrb r0, [r0] + bl battle_side_get_owner + lsls r0, 24 + cmp r0, 0 + bne _0812BB08 + bl dp01t_10_6_message + b _0812BB0C + .align 2, 0 +_0812BB04: .4byte gUnknown_02024A60 +_0812BB08: + bl dp01_tbl6_exec_completed +_0812BB0C: + pop {r0} + bx r0 + thumb_func_end dp01t_11_6_message_for_player_only + + thumb_func_start sub_812BB10 +sub_812BB10: @ 812BB10 + push {r4,r5,lr} + sub sp, 0x8 + ldr r0, _0812BBCC @ =gUnknown_030042A4 + movs r2, 0 + strh r2, [r0] + ldr r1, _0812BBD0 @ =gUnknown_030042A0 + movs r0, 0xA0 + strh r0, [r1] + ldr r4, _0812BBD4 @ =gUnknown_03004210 + movs r5, 0 + strb r2, [r4, 0x6] + movs r0, 0x1B + str r0, [sp] + movs r0, 0x12 + str r0, [sp, 0x4] + adds r0, r4, 0 + movs r1, 0xA + movs r2, 0x2 + movs r3, 0xF + bl FillWindowRect_DefaultPalette + movs r0, 0x10 + str r0, [sp] + movs r0, 0x24 + str r0, [sp, 0x4] + adds r0, r4, 0 + movs r1, 0xA + movs r2, 0x2 + movs r3, 0x23 + bl FillWindowRect_DefaultPalette + ldr r1, _0812BBD8 @ =gUnknown_03004330 + ldr r0, _0812BBDC @ =gUnknown_02024A60 + ldrb r0, [r0] + lsls r0, 2 + adds r0, r1 + ldr r1, _0812BBE0 @ =bx_battle_menu_t6_2 + str r1, [r0] + ldr r1, _0812BBE4 @ =gUnknown_08400D15 + movs r2, 0xC8 + lsls r2, 1 + movs r0, 0x23 + str r0, [sp] + adds r0, r4, 0 + movs r3, 0x12 + bl InitWindow + adds r0, r4, 0 + bl sub_8002F44 + ldr r1, _0812BBE8 @ =0x0000ffff + ldr r3, _0812BBEC @ =0x00002d9f + str r5, [sp] + movs r0, 0 + movs r2, 0xC + bl sub_814A5C0 + movs r4, 0 +_0812BB84: + lsls r0, r4, 24 + lsrs r0, 24 + bl nullsub_8 + adds r4, 0x1 + cmp r4, 0x3 + ble _0812BB84 + ldr r1, _0812BBF0 @ =gUnknown_02024E60 + ldr r0, _0812BBDC @ =gUnknown_02024A60 + ldrb r0, [r0] + adds r0, r1 + ldrb r0, [r0] + movs r1, 0 + bl sub_802E3E4 + ldr r0, _0812BBF4 @ =gUnknown_08400CBB + bl get_battle_strings_ + ldr r4, _0812BBD4 @ =gUnknown_03004210 + ldr r1, _0812BBF8 @ =gUnknown_020238CC + movs r2, 0xDC + lsls r2, 1 + movs r0, 0x23 + str r0, [sp] + adds r0, r4, 0 + movs r3, 0x2 + bl InitWindow + adds r0, r4, 0 + bl sub_8002F44 + add sp, 0x8 + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812BBCC: .4byte gUnknown_030042A4 +_0812BBD0: .4byte gUnknown_030042A0 +_0812BBD4: .4byte gUnknown_03004210 +_0812BBD8: .4byte gUnknown_03004330 +_0812BBDC: .4byte gUnknown_02024A60 +_0812BBE0: .4byte bx_battle_menu_t6_2 +_0812BBE4: .4byte gUnknown_08400D15 +_0812BBE8: .4byte 0x0000ffff +_0812BBEC: .4byte 0x00002d9f +_0812BBF0: .4byte gUnknown_02024E60 +_0812BBF4: .4byte gUnknown_08400CBB +_0812BBF8: .4byte gUnknown_020238CC + thumb_func_end sub_812BB10 + + thumb_func_start sub_812BBFC +sub_812BBFC: @ 812BBFC + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BBFC + + thumb_func_start sub_812BC08 +sub_812BC08: @ 812BC08 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BC08 + + thumb_func_start sub_812BC14 +sub_812BC14: @ 812BC14 + push {lr} + sub sp, 0x4 + movs r0, 0x1 + negs r0, r0 + movs r1, 0 + str r1, [sp] + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + ldr r1, _0812BC44 @ =gUnknown_03004330 + ldr r2, _0812BC48 @ =gUnknown_02024A60 + ldrb r0, [r2] + lsls r0, 2 + adds r0, r1 + ldr r1, _0812BC4C @ =sub_812B724 + str r1, [r0] + ldr r1, _0812BC50 @ =gUnknown_02024E6C + ldrb r0, [r2] + strb r0, [r1] + add sp, 0x4 + pop {r0} + bx r0 + .align 2, 0 +_0812BC44: .4byte gUnknown_03004330 +_0812BC48: .4byte gUnknown_02024A60 +_0812BC4C: .4byte sub_812B724 +_0812BC50: .4byte gUnknown_02024E6C + thumb_func_end sub_812BC14 + + thumb_func_start sub_812BC54 +sub_812BC54: @ 812BC54 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BC54 + + thumb_func_start sub_812BC60 +sub_812BC60: @ 812BC60 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BC60 + + thumb_func_start sub_812BC6C +sub_812BC6C: @ 812BC6C + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BC6C + + thumb_func_start sub_812BC78 +sub_812BC78: @ 812BC78 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BC78 + + thumb_func_start sub_812BC84 +sub_812BC84: @ 812BC84 + push {lr} + ldr r0, _0812BCB0 @ =gUnknown_03004340 + ldr r1, _0812BCB4 @ =gUnknown_02024A60 + ldrb r1, [r1] + adds r0, r1, r0 + ldrb r0, [r0] + ldr r2, _0812BCB8 @ =gUnknown_02024A6A + lsls r1, 1 + adds r1, r2 + ldrh r2, [r1] + movs r1, 0x64 + muls r1, r2 + ldr r2, _0812BCBC @ =gPlayerParty + adds r1, r2 + movs r2, 0xB + bl sub_8045A5C + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + .align 2, 0 +_0812BCB0: .4byte gUnknown_03004340 +_0812BCB4: .4byte gUnknown_02024A60 +_0812BCB8: .4byte gUnknown_02024A6A +_0812BCBC: .4byte gPlayerParty + thumb_func_end sub_812BC84 + + thumb_func_start sub_812BCC0 +sub_812BCC0: @ 812BCC0 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BCC0 + + thumb_func_start sub_812BCCC +sub_812BCCC: @ 812BCCC + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BCCC + + thumb_func_start sub_812BCD8 +sub_812BCD8: @ 812BCD8 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BCD8 + + thumb_func_start sub_812BCE4 +sub_812BCE4: @ 812BCE4 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BCE4 + + thumb_func_start sub_812BCF0 +sub_812BCF0: @ 812BCF0 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BCF0 + + thumb_func_start sub_812BCFC +sub_812BCFC: @ 812BCFC + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BCFC + + thumb_func_start sub_812BD08 +sub_812BD08: @ 812BD08 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD08 + + thumb_func_start sub_812BD14 +sub_812BD14: @ 812BD14 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD14 + + thumb_func_start sub_812BD20 +sub_812BD20: @ 812BD20 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD20 + + thumb_func_start sub_812BD2C +sub_812BD2C: @ 812BD2C + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD2C + + thumb_func_start sub_812BD38 +sub_812BD38: @ 812BD38 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD38 + + thumb_func_start sub_812BD44 +sub_812BD44: @ 812BD44 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD44 + + thumb_func_start sub_812BD50 +sub_812BD50: @ 812BD50 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD50 + + thumb_func_start sub_812BD5C +sub_812BD5C: @ 812BD5C + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD5C + + thumb_func_start sub_812BD68 +sub_812BD68: @ 812BD68 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD68 + + thumb_func_start sub_812BD74 +sub_812BD74: @ 812BD74 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BD74 + + thumb_func_start sub_812BD80 +sub_812BD80: @ 812BD80 + push {r4,lr} + ldr r4, _0812BDBC @ =gUnknown_02024A60 + ldrb r0, [r4] + bl battle_side_get_owner + lsls r0, 24 + movs r3, 0x3F + cmp r0, 0 + bne _0812BD94 + movs r3, 0xC0 +_0812BD94: + ldr r2, _0812BDC0 @ =gUnknown_02023A60 + ldrb r1, [r4] + lsls r1, 9 + adds r0, r2, 0x1 + adds r0, r1, r0 + ldrb r0, [r0] + adds r2, 0x2 + adds r1, r2 + ldrb r1, [r1] + lsls r1, 8 + orrs r0, r1 + lsls r1, r3, 24 + asrs r1, 24 + bl PlaySE12WithPanning + bl dp01_tbl6_exec_completed + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_0812BDBC: .4byte gUnknown_02024A60 +_0812BDC0: .4byte gUnknown_02023A60 + thumb_func_end sub_812BD80 + + thumb_func_start sub_812BDC4 +sub_812BDC4: @ 812BDC4 + push {lr} + ldr r2, _0812BDEC @ =gUnknown_02023A60 + ldr r0, _0812BDF0 @ =gUnknown_02024A60 + ldrb r1, [r0] + lsls r1, 9 + adds r0, r2, 0x1 + adds r0, r1, r0 + ldrb r0, [r0] + adds r2, 0x2 + adds r1, r2 + ldrb r1, [r1] + lsls r1, 8 + orrs r0, r1 + bl PlayFanfare + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + .align 2, 0 +_0812BDEC: .4byte gUnknown_02023A60 +_0812BDF0: .4byte gUnknown_02024A60 + thumb_func_end sub_812BDC4 + + thumb_func_start sub_812BDF4 +sub_812BDF4: @ 812BDF4 + push {lr} + ldr r1, _0812BE24 @ =gUnknown_02024A6A + ldr r0, _0812BE28 @ =gUnknown_02024A60 + ldrb r0, [r0] + lsls r0, 1 + adds r0, r1 + ldrh r1, [r0] + movs r0, 0x64 + muls r0, r1 + ldr r1, _0812BE2C @ =gPlayerParty + adds r0, r1 + movs r1, 0xB + bl GetMonData + lsls r0, 16 + lsrs r0, 16 + movs r1, 0x19 + bl PlayCry1 + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + .align 2, 0 +_0812BE24: .4byte gUnknown_02024A6A +_0812BE28: .4byte gUnknown_02024A60 +_0812BE2C: .4byte gPlayerParty + thumb_func_end sub_812BDF4 + + thumb_func_start dp01t_2E_6_battle_intro +dp01t_2E_6_battle_intro: @ 812BE30 + push {lr} + ldr r1, _0812BE58 @ =gUnknown_02023A60 + ldr r0, _0812BE5C @ =gUnknown_02024A60 + ldrb r0, [r0] + lsls r0, 9 + adds r1, 0x1 + adds r0, r1 + ldrb r0, [r0] + bl sub_80E43C0 + ldr r2, _0812BE60 @ =gUnknown_02024DE8 + ldrh r0, [r2] + movs r1, 0x1 + orrs r0, r1 + strh r0, [r2] + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + .align 2, 0 +_0812BE58: .4byte gUnknown_02023A60 +_0812BE5C: .4byte gUnknown_02024A60 +_0812BE60: .4byte gUnknown_02024DE8 + thumb_func_end dp01t_2E_6_battle_intro + + thumb_func_start sub_812BE64 +sub_812BE64: @ 812BE64 + push {r4,r5,lr} + ldr r5, _0812BEA0 @ =gUnknown_03004340 + ldr r4, _0812BEA4 @ =gUnknown_02024A60 + ldrb r1, [r4] + adds r0, r1, r5 + ldrb r0, [r0] + ldr r2, _0812BEA8 @ =gUnknown_02024A6A + lsls r1, 1 + adds r1, r2 + ldrh r2, [r1] + movs r1, 0x64 + muls r1, r2 + ldr r2, _0812BEAC @ =gPlayerParty + adds r1, r2 + movs r2, 0xA + bl sub_8045A5C + ldrb r0, [r4] + bl sub_804777C + ldrb r0, [r4] + adds r0, r5 + ldrb r0, [r0] + bl sub_8043DFC + bl dp01_tbl6_exec_completed + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_0812BEA0: .4byte gUnknown_03004340 +_0812BEA4: .4byte gUnknown_02024A60 +_0812BEA8: .4byte gUnknown_02024A6A +_0812BEAC: .4byte gPlayerParty + thumb_func_end sub_812BE64 + + thumb_func_start sub_812BEB0 +sub_812BEB0: @ 812BEB0 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BEB0 + + thumb_func_start sub_812BEBC +sub_812BEBC: @ 812BEBC + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BEBC + + thumb_func_start sub_812BEC8 +sub_812BEC8: @ 812BEC8 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BEC8 + + thumb_func_start sub_812BED4 +sub_812BED4: @ 812BED4 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BED4 + + thumb_func_start sub_812BEE0 +sub_812BEE0: @ 812BEE0 + push {r4-r6,lr} + sub sp, 0x4 + ldr r5, _0812BF18 @ =gUnknown_02023A60 + ldr r6, _0812BF1C @ =gUnknown_02024A60 + ldrb r2, [r6] + lsls r1, r2, 9 + adds r0, r5, 0x1 + adds r0, r1, r0 + ldrb r3, [r0] + adds r0, r5, 0x2 + adds r0, r1, r0 + ldrb r4, [r0] + adds r5, 0x3 + adds r1, r5 + ldrb r0, [r1] + lsls r0, 8 + orrs r4, r0 + str r4, [sp] + adds r0, r2, 0 + adds r1, r2, 0 + bl move_anim_start_t3 + lsls r0, 24 + cmp r0, 0 + beq _0812BF20 + bl dp01_tbl6_exec_completed + b _0812BF2C + .align 2, 0 +_0812BF18: .4byte gUnknown_02023A60 +_0812BF1C: .4byte gUnknown_02024A60 +_0812BF20: + ldr r0, _0812BF34 @ =gUnknown_03004330 + ldrb r1, [r6] + lsls r1, 2 + adds r1, r0 + ldr r0, _0812BF38 @ =sub_812B794 + str r0, [r1] +_0812BF2C: + add sp, 0x4 + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_0812BF34: .4byte gUnknown_03004330 +_0812BF38: .4byte sub_812B794 + thumb_func_end sub_812BEE0 + + thumb_func_start sub_812BF3C +sub_812BF3C: @ 812BF3C + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BF3C + + thumb_func_start sub_812BF48 +sub_812BF48: @ 812BF48 + push {lr} + bl dp01_tbl6_exec_completed + pop {r0} + bx r0 + thumb_func_end sub_812BF48 + + thumb_func_start sub_812BF54 +sub_812BF54: @ 812BF54 + push {r4,lr} + ldr r2, _0812BF98 @ =gUnknown_02024D26 + ldr r1, _0812BF9C @ =gUnknown_02023A60 + ldr r4, _0812BFA0 @ =gUnknown_02024A60 + ldrb r0, [r4] + lsls r0, 9 + adds r1, 0x1 + adds r0, r1 + ldrb r0, [r0] + strb r0, [r2] + movs r0, 0x5 + bl FadeOutMapMusic + movs r0, 0x3 + bl BeginFastPaletteFade + bl dp01_tbl6_exec_completed + ldr r0, _0812BFA4 @ =gBattleTypeFlags + ldrh r1, [r0] + movs r0, 0x6 + ands r0, r1 + cmp r0, 0x2 + bne _0812BF90 + ldr r0, _0812BFA8 @ =gUnknown_03004330 + ldrb r1, [r4] + lsls r1, 2 + adds r1, r0 + ldr r0, _0812BFAC @ =sub_812B6AC + str r0, [r1] +_0812BF90: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_0812BF98: .4byte gUnknown_02024D26 +_0812BF9C: .4byte gUnknown_02023A60 +_0812BFA0: .4byte gUnknown_02024A60 +_0812BFA4: .4byte gBattleTypeFlags +_0812BFA8: .4byte gUnknown_03004330 +_0812BFAC: .4byte sub_812B6AC + thumb_func_end sub_812BF54 + + thumb_func_start nullsub_78 +nullsub_78: @ 812BFB0 + bx lr + thumb_func_end nullsub_78 + + .align 2, 0 @ Don't pad with nop. diff --git a/asm/rom_81258BC.s b/asm/battle_anim_812C144.s similarity index 68% rename from asm/rom_81258BC.s rename to asm/battle_anim_812C144.s index bd68a0240..0497d0462 100644 --- a/asm/rom_81258BC.s +++ b/asm/battle_anim_812C144.s @@ -5,2424 +5,7 @@ .syntax unified .text - - thumb_func_start unref_sub_812AECC -unref_sub_812AECC: @ 812AECC - push {lr} - bl sub_812613C - lsls r0, 24 - lsrs r0, 24 - adds r1, r0, 0 - cmp r0, 0x1 - beq _0812AEEA - cmp r0, 0x1 - ble _0812AF08 - cmp r1, 0x2 - beq _0812AEF4 - cmp r1, 0x3 - beq _0812AEFA - b _0812AF08 -_0812AEEA: - movs r0, 0x16 - bl PlaySE - movs r0, 0x1 - b _0812AF0A -_0812AEF4: - bl sub_812AF10 - b _0812AF08 -_0812AEFA: - movs r0, 0x16 - bl PlaySE - bl sub_812AF10 - movs r0, 0x1 - b _0812AF0A -_0812AF08: - movs r0, 0 -_0812AF0A: - pop {r1} - bx r1 - thumb_func_end unref_sub_812AECC - - thumb_func_start sub_812AF10 -sub_812AF10: @ 812AF10 - push {lr} - movs r0, 0x2 - movs r1, 0xE - movs r2, 0x1B - movs r3, 0x13 - bl MenuDrawTextWindow - ldr r0, _0812AF2C @ =gStringVar4 - movs r1, 0x3 - movs r2, 0xF - bl MenuPrint - pop {r0} - bx r0 - .align 2, 0 -_0812AF2C: .4byte gStringVar4 - thumb_func_end sub_812AF10 - - thumb_func_start sub_812AF30 -sub_812AF30: @ 812AF30 - push {r4-r6,lr} - lsls r0, 24 - lsrs r0, 24 - ldr r1, _0812AF8C @ =gTasks - lsls r6, r0, 2 - adds r6, r0 - lsls r6, 3 - adds r6, r1 - ldr r1, _0812AF90 @ =gBattleAnimArgs - ldrh r0, [r1] - strh r0, [r6, 0x8] - ldrh r0, [r1, 0x2] - strh r0, [r6, 0xA] - movs r0, 0x40 - negs r0, r0 - bl sub_8076F98 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - movs r0, 0x3F - bl sub_8076F98 - adds r5, r0, 0 - lsls r4, 24 - asrs r4, 24 - lsls r5, 24 - asrs r5, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x2 - bl sub_807712C - strh r4, [r6, 0xC] - strh r5, [r6, 0xE] - lsls r0, 24 - asrs r0, 24 - strh r0, [r6, 0x10] - movs r0, 0xA - strh r0, [r6, 0x1C] - ldr r0, _0812AF94 @ =sub_812AF98 - str r0, [r6] - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_0812AF8C: .4byte gTasks -_0812AF90: .4byte gBattleAnimArgs -_0812AF94: .4byte sub_812AF98 - thumb_func_end sub_812AF30 - - thumb_func_start sub_812AF98 -sub_812AF98: @ 812AF98 - push {r4-r6,lr} - lsls r0, 24 - lsrs r0, 24 - ldr r2, _0812AFC8 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r4, r1, r2 - ldrh r5, [r4, 0xC] - ldrb r6, [r4, 0x10] - ldrh r0, [r4, 0x1E] - adds r0, 0x1 - movs r1, 0 - strh r0, [r4, 0x1E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x6F - bne _0812AFD0 - movs r0, 0x5 - strh r0, [r4, 0x1C] - strh r1, [r4, 0x1E] - ldr r0, _0812AFCC @ =sub_812B004 - str r0, [r4] - b _0812AFFE - .align 2, 0 -_0812AFC8: .4byte gTasks -_0812AFCC: .4byte sub_812B004 -_0812AFD0: - ldrh r0, [r4, 0x1C] - adds r0, 0x1 - strh r0, [r4, 0x1C] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0xB - bne _0812AFEA - strh r1, [r4, 0x1C] - ldrh r0, [r4, 0x8] - lsls r1, r5, 24 - asrs r1, 24 - bl PlaySE12WithPanning -_0812AFEA: - lsls r1, r6, 24 - asrs r1, 24 - lsls r0, r5, 16 - asrs r0, 16 - adds r0, r1 - lsls r0, 16 - asrs r0, 16 - bl sub_8077104 - strh r0, [r4, 0xC] -_0812AFFE: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_812AF98 - - thumb_func_start sub_812B004 -sub_812B004: @ 812B004 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - ldr r1, _0812B054 @ =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r4, r0, r1 - ldrh r0, [r4, 0x1C] - adds r0, 0x1 - strh r0, [r4, 0x1C] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x6 - bne _0812B04C - movs r0, 0 - strh r0, [r4, 0x1C] - movs r0, 0x3F - bl sub_8076F98 - adds r1, r0, 0 - ldrh r0, [r4, 0xA] - lsls r1, 24 - asrs r1, 24 - bl PlaySE12WithPanning - ldrh r0, [r4, 0x1E] - adds r0, 0x1 - strh r0, [r4, 0x1E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x2 - bne _0812B04C - adds r0, r5, 0 - bl move_anim_related_task_del -_0812B04C: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812B054: .4byte gTasks - thumb_func_end sub_812B004 - - thumb_func_start sub_812B058 -sub_812B058: @ 812B058 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - mov r8, r0 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldr r0, _0812B0FC @ =gBattleAnimArgs - ldrh r1, [r0] - str r1, [sp] - ldrb r5, [r0, 0x4] - ldrb r6, [r0, 0x6] - ldrb r3, [r0, 0x8] - mov r10, r3 - ldrb r7, [r0, 0xA] - ldrb r1, [r0, 0xC] - mov r9, r1 - ldrb r0, [r0, 0x2] - lsls r0, 24 - asrs r0, 24 - bl sub_8076F98 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - lsls r5, 24 - asrs r5, 24 - adds r0, r5, 0 - bl sub_8076F98 - adds r5, r0, 0 - lsls r4, 24 - asrs r4, 24 - lsls r5, 24 - asrs r5, 24 - lsls r6, 24 - asrs r6, 24 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - bl sub_807712C - ldr r2, _0812B100 @ =gTasks - mov r3, r8 - lsls r1, r3, 2 - add r1, r8 - lsls r1, 3 - adds r1, r2 - movs r2, 0 - mov r6, sp - ldrh r6, [r6] - strh r6, [r1, 0x8] - strh r4, [r1, 0xA] - strh r5, [r1, 0xC] - lsls r0, 24 - asrs r0, 24 - strh r0, [r1, 0xE] - mov r0, r10 - strh r0, [r1, 0x10] - strh r7, [r1, 0x12] - mov r3, r9 - strh r3, [r1, 0x14] - strh r2, [r1, 0x1C] - strh r4, [r1, 0x1E] - strh r3, [r1, 0x20] - ldr r2, _0812B104 @ =sub_812B108 - str r2, [r1] - mov r0, r8 - bl _call_via_r2 - 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 -_0812B0FC: .4byte gBattleAnimArgs -_0812B100: .4byte gTasks -_0812B104: .4byte sub_812B108 - thumb_func_end sub_812B058 - - thumb_func_start sub_812B108 -sub_812B108: @ 812B108 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - ldr r1, _0812B14C @ =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r4, r0, r1 - ldrh r0, [r4, 0x20] - adds r1, r0, 0x1 - strh r1, [r4, 0x20] - lsls r0, 16 - asrs r0, 16 - movs r2, 0x14 - ldrsh r1, [r4, r2] - cmp r0, r1 - bne _0812B150 - movs r0, 0 - strh r0, [r4, 0x20] - ldrh r0, [r4, 0x8] - movs r1, 0x1E - ldrsb r1, [r4, r1] - bl PlaySE12WithPanning - ldrh r0, [r4, 0x10] - subs r0, 0x1 - strh r0, [r4, 0x10] - lsls r0, 16 - cmp r0, 0 - bne _0812B150 - adds r0, r5, 0 - bl move_anim_related_task_del - b _0812B182 - .align 2, 0 -_0812B14C: .4byte gTasks -_0812B150: - ldr r1, _0812B188 @ =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r4, r0, r1 - ldrh r0, [r4, 0x1C] - adds r1, r0, 0x1 - strh r1, [r4, 0x1C] - lsls r0, 16 - asrs r0, 16 - movs r2, 0x12 - ldrsh r1, [r4, r2] - cmp r0, r1 - bne _0812B182 - movs r0, 0 - strh r0, [r4, 0x1C] - ldrh r0, [r4, 0xE] - ldrh r1, [r4, 0x1E] - adds r0, r1 - strh r0, [r4, 0x1E] - movs r2, 0x1E - ldrsh r0, [r4, r2] - bl sub_8077104 - strh r0, [r4, 0x1E] -_0812B182: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812B188: .4byte gTasks - thumb_func_end sub_812B108 - - thumb_func_start sub_812B18C -sub_812B18C: @ 812B18C - push {r4-r6,lr} - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - movs r0, 0x40 - negs r0, r0 - bl sub_8076F98 - lsls r0, 24 - lsrs r6, r0, 24 - bl sub_8076BE0 - lsls r0, 24 - cmp r0, 0 - beq _0812B1CC - ldr r0, _0812B1BC @ =gBattleAnimArgs - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0 - bne _0812B1C4 - ldr r0, _0812B1C0 @ =0x02019348 - ldrh r4, [r0] - b _0812B272 - .align 2, 0 -_0812B1BC: .4byte gBattleAnimArgs -_0812B1C0: .4byte 0x02019348 -_0812B1C4: - adds r0, r5, 0 - bl move_anim_task_del - b _0812B272 -_0812B1CC: - ldr r0, _0812B1E0 @ =gBattleAnimArgs - movs r2, 0 - ldrsh r1, [r0, r2] - adds r2, r0, 0 - cmp r1, 0 - bne _0812B1E8 - ldr r0, _0812B1E4 @ =gUnknown_0202F7C8 - ldrb r4, [r0] - b _0812B20E - .align 2, 0 -_0812B1E0: .4byte gBattleAnimArgs -_0812B1E4: .4byte gUnknown_0202F7C8 -_0812B1E8: - cmp r1, 0x1 - bne _0812B1F8 - ldr r0, _0812B1F4 @ =gUnknown_0202F7C9 - ldrb r4, [r0] - b _0812B20E - .align 2, 0 -_0812B1F4: .4byte gUnknown_0202F7C9 -_0812B1F8: - cmp r1, 0x2 - bne _0812B204 - ldr r0, _0812B200 @ =gUnknown_0202F7C8 - b _0812B206 - .align 2, 0 -_0812B200: .4byte gUnknown_0202F7C8 -_0812B204: - ldr r0, _0812B230 @ =gUnknown_0202F7C9 -_0812B206: - ldrb r1, [r0] - movs r0, 0x2 - adds r4, r0, 0 - eors r4, r1 -_0812B20E: - movs r1, 0 - ldrsh r0, [r2, r1] - cmp r0, 0x1 - beq _0812B21A - cmp r0, 0x3 - bne _0812B234 -_0812B21A: - adds r0, r4, 0 - bl b_side_obj__get_some_boolean - lsls r0, 24 - cmp r0, 0 - bne _0812B234 - adds r0, r5, 0 - bl move_anim_task_del - b _0812B2B0 - .align 2, 0 -_0812B230: .4byte gUnknown_0202F7C9 -_0812B234: - adds r0, r4, 0 - bl battle_side_get_owner - lsls r0, 24 - cmp r0, 0 - beq _0812B258 - ldr r1, _0812B250 @ =gUnknown_02024A6A - lsls r0, r4, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, _0812B254 @ =gEnemyParty - b _0812B266 - .align 2, 0 -_0812B250: .4byte gUnknown_02024A6A -_0812B254: .4byte gEnemyParty -_0812B258: - ldr r1, _0812B290 @ =gUnknown_02024A6A - lsls r0, r4, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, _0812B294 @ =gPlayerParty -_0812B266: - adds r0, r1 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r4, r0, 16 -_0812B272: - cmp r4, 0 - beq _0812B2AA - ldr r0, _0812B298 @ =gBattleAnimArgs - ldrh r2, [r0, 0x2] - movs r1, 0x2 - ldrsh r0, [r0, r1] - cmp r0, 0xFF - bne _0812B29C - lsls r1, r6, 24 - asrs r1, 24 - adds r0, r4, 0 - bl PlayCry1 - b _0812B2AA - .align 2, 0 -_0812B290: .4byte gUnknown_02024A6A -_0812B294: .4byte gPlayerParty -_0812B298: .4byte gBattleAnimArgs -_0812B29C: - lsls r1, r6, 24 - asrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - bl PlayCry3 -_0812B2AA: - adds r0, r5, 0 - bl move_anim_task_del -_0812B2B0: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_812B18C - - thumb_func_start sub_812B2B8 -sub_812B2B8: @ 812B2B8 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - movs r0, 0x40 - negs r0, r0 - bl sub_8076F98 - lsls r0, 24 - lsrs r4, r0, 24 - bl sub_8076BE0 - lsls r0, 24 - cmp r0, 0 - beq _0812B2DC - ldr r0, _0812B2D8 @ =0x02019348 - b _0812B2E6 - .align 2, 0 -_0812B2D8: .4byte 0x02019348 -_0812B2DC: - ldr r1, _0812B304 @ =gUnknown_0202F7CA - ldr r0, _0812B308 @ =gUnknown_0202F7C8 - ldrb r0, [r0] - lsls r0, 1 - adds r0, r1 -_0812B2E6: - ldrh r0, [r0] - cmp r0, 0 - beq _0812B2F6 - lsls r1, r4, 24 - asrs r1, 24 - movs r2, 0x4 - bl PlayCry3 -_0812B2F6: - adds r0, r5, 0 - bl move_anim_task_del - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812B304: .4byte gUnknown_0202F7CA -_0812B308: .4byte gUnknown_0202F7C8 - thumb_func_end sub_812B2B8 - - thumb_func_start sub_812B30C -sub_812B30C: @ 812B30C - push {r4,r5,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r0, _0812B33C @ =gBattleAnimArgs - ldrh r5, [r0] - ldrb r0, [r0, 0x2] - lsls r0, 24 - asrs r0, 24 - bl sub_8076F98 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 24 - adds r0, r5, 0 - bl PlaySE1WithPanning - adds r0, r4, 0 - bl move_anim_task_del - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812B33C: .4byte gBattleAnimArgs - thumb_func_end sub_812B30C - - thumb_func_start sub_812B340 -sub_812B340: @ 812B340 - push {r4,r5,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r0, _0812B370 @ =gBattleAnimArgs - ldrh r5, [r0] - ldrb r0, [r0, 0x2] - lsls r0, 24 - asrs r0, 24 - bl sub_8076F98 - adds r1, r0, 0 - lsls r1, 24 - asrs r1, 24 - adds r0, r5, 0 - bl PlaySE2WithPanning - adds r0, r4, 0 - bl move_anim_task_del - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812B370: .4byte gBattleAnimArgs - thumb_func_end sub_812B340 - - thumb_func_start sub_812B374 -sub_812B374: @ 812B374 - push {r4-r6,lr} - mov r6, r9 - mov r5, r8 - push {r5,r6} - mov r8, r0 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldr r0, _0812B3F8 @ =gBattleAnimArgs - ldrb r5, [r0, 0x2] - ldrb r6, [r0, 0x4] - ldrh r1, [r0, 0x6] - mov r9, r1 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - bl sub_8076F98 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - lsls r5, 24 - asrs r5, 24 - adds r0, r5, 0 - bl sub_8076F98 - adds r5, r0, 0 - lsls r4, 24 - asrs r4, 24 - lsls r5, 24 - asrs r5, 24 - lsls r6, 24 - asrs r6, 24 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - bl sub_807712C - ldr r2, _0812B3FC @ =gTasks - mov r3, r8 - lsls r1, r3, 2 - add r1, r8 - lsls r1, 3 - adds r1, r2 - movs r2, 0 - strh r4, [r1, 0xA] - strh r5, [r1, 0xC] - lsls r0, 24 - asrs r0, 24 - strh r0, [r1, 0xE] - mov r0, r9 - strh r0, [r1, 0x12] - strh r2, [r1, 0x1C] - strh r4, [r1, 0x1E] - ldr r2, _0812B400 @ =sub_812B404 - str r2, [r1] - mov r0, r8 - bl _call_via_r2 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_0812B3F8: .4byte gBattleAnimArgs -_0812B3FC: .4byte gTasks -_0812B400: .4byte sub_812B404 - thumb_func_end sub_812B374 - - thumb_func_start sub_812B404 -sub_812B404: @ 812B404 - push {r4,r5,lr} - lsls r0, 24 - lsrs r0, 24 - adds r5, r0, 0 - ldr r1, _0812B45C @ =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r4, r0, r1 - ldrh r2, [r4, 0xE] - ldrh r0, [r4, 0x1C] - adds r1, r0, 0x1 - strh r1, [r4, 0x1C] - lsls r0, 16 - asrs r0, 16 - movs r3, 0x12 - ldrsh r1, [r4, r3] - cmp r0, r1 - bne _0812B43E - movs r0, 0 - strh r0, [r4, 0x1C] - ldrh r1, [r4, 0x1E] - adds r0, r2, r1 - strh r0, [r4, 0x1E] - movs r2, 0x1E - ldrsh r0, [r4, r2] - bl sub_8077104 - strh r0, [r4, 0x1E] -_0812B43E: - ldr r1, _0812B460 @ =gUnknown_0202F7D2 - ldrh r0, [r4, 0x1E] - strb r0, [r1] - movs r3, 0x1E - ldrsh r1, [r4, r3] - movs r2, 0xC - ldrsh r0, [r4, r2] - cmp r1, r0 - bne _0812B456 - adds r0, r5, 0 - bl move_anim_task_del -_0812B456: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812B45C: .4byte gTasks -_0812B460: .4byte gUnknown_0202F7D2 - thumb_func_end sub_812B404 - - thumb_func_start unref_sub_812B464 -unref_sub_812B464: @ 812B464 - bx lr - thumb_func_end unref_sub_812B464 - - thumb_func_start sub_812B468 -sub_812B468: @ 812B468 - ldr r1, _0812B478 @ =gUnknown_03004330 - ldr r0, _0812B47C @ =gUnknown_02024A60 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r1, _0812B480 @ =sub_812B484 - str r1, [r0] - bx lr - .align 2, 0 -_0812B478: .4byte gUnknown_03004330 -_0812B47C: .4byte gUnknown_02024A60 -_0812B480: .4byte sub_812B484 - thumb_func_end sub_812B468 - - thumb_func_start sub_812B484 -sub_812B484: @ 812B484 - push {lr} - ldr r2, _0812B4B8 @ =gUnknown_02024A64 - ldr r1, _0812B4BC @ =gBitTable - ldr r0, _0812B4C0 @ =gUnknown_02024A60 - ldrb r3, [r0] - lsls r0, r3, 2 - adds r0, r1 - ldr r1, [r2] - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _0812B4D0 - ldr r0, _0812B4C4 @ =gUnknown_02023A60 - lsls r1, r3, 9 - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0x38 - bhi _0812B4CC - ldr r0, _0812B4C8 @ =gUnknown_08402080 - ldrb r1, [r1] - lsls r1, 2 - adds r1, r0 - ldr r0, [r1] - bl _call_via_r0 - b _0812B4D0 - .align 2, 0 -_0812B4B8: .4byte gUnknown_02024A64 -_0812B4BC: .4byte gBitTable -_0812B4C0: .4byte gUnknown_02024A60 -_0812B4C4: .4byte gUnknown_02023A60 -_0812B4C8: .4byte gUnknown_08402080 -_0812B4CC: - bl dp01_tbl6_exec_completed -_0812B4D0: - pop {r0} - bx r0 - thumb_func_end sub_812B484 - - thumb_func_start bx_battle_menu_t6_2 -bx_battle_menu_t6_2: @ 812B4D4 - push {r4,r5,lr} - ldr r0, _0812B508 @ =gMain - ldrh r1, [r0, 0x2E] - movs r2, 0x1 - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - beq _0812B546 - movs r0, 0x5 - bl PlaySE - bl sub_814A7FC - ldr r1, _0812B50C @ =gUnknown_02024E60 - ldr r0, _0812B510 @ =gUnknown_02024A60 - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x1 - beq _0812B524 - cmp r0, 0x1 - bgt _0812B514 - cmp r0, 0 - beq _0812B51E - b _0812B540 - .align 2, 0 -_0812B508: .4byte gMain -_0812B50C: .4byte gUnknown_02024E60 -_0812B510: .4byte gUnknown_02024A60 -_0812B514: - cmp r0, 0x2 - beq _0812B52A - cmp r0, 0x3 - beq _0812B536 - b _0812B540 -_0812B51E: - movs r0, 0x1 - movs r1, 0x5 - b _0812B52E -_0812B524: - movs r0, 0x1 - movs r1, 0x6 - b _0812B52E -_0812B52A: - movs r0, 0x1 - movs r1, 0x7 -_0812B52E: - movs r2, 0 - bl dp01_build_cmdbuf_x21_a_bb - b _0812B540 -_0812B536: - movs r0, 0x1 - movs r1, 0x8 - movs r2, 0 - bl dp01_build_cmdbuf_x21_a_bb -_0812B540: - bl dp01_tbl6_exec_completed - b _0812B64E -_0812B546: - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _0812B584 - ldr r5, _0812B57C @ =gUnknown_02024E60 - ldr r4, _0812B580 @ =gUnknown_02024A60 - ldrb r0, [r4] - adds r0, r5 - ldrb r1, [r0] - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - beq _0812B64E - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4] - adds r0, r5 - ldrb r0, [r0] - bl nullsub_8 - ldrb r1, [r4] - adds r1, r5 - ldrb r0, [r1] - movs r2, 0x1 - b _0812B5F2 - .align 2, 0 -_0812B57C: .4byte gUnknown_02024E60 -_0812B580: .4byte gUnknown_02024A60 -_0812B584: - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _0812B5C0 - ldr r5, _0812B5B8 @ =gUnknown_02024E60 - ldr r4, _0812B5BC @ =gUnknown_02024A60 - ldrb r0, [r4] - adds r0, r5 - ldrb r1, [r0] - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - bne _0812B64E - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4] - adds r0, r5 - ldrb r0, [r0] - bl nullsub_8 - ldrb r1, [r4] - adds r1, r5 - ldrb r0, [r1] - movs r2, 0x1 - b _0812B5F2 - .align 2, 0 -_0812B5B8: .4byte gUnknown_02024E60 -_0812B5BC: .4byte gUnknown_02024A60 -_0812B5C0: - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0812B60C - ldr r5, _0812B604 @ =gUnknown_02024E60 - ldr r4, _0812B608 @ =gUnknown_02024A60 - ldrb r0, [r4] - adds r0, r5 - ldrb r1, [r0] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0812B64E - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4] - adds r0, r5 - ldrb r0, [r0] - bl nullsub_8 - ldrb r1, [r4] - adds r1, r5 - ldrb r0, [r1] - movs r2, 0x2 -_0812B5F2: - eors r0, r2 - strb r0, [r1] - ldrb r0, [r4] - adds r0, r5 - ldrb r0, [r0] - movs r1, 0 - bl sub_802E3E4 - b _0812B64E - .align 2, 0 -_0812B604: .4byte gUnknown_02024E60 -_0812B608: .4byte gUnknown_02024A60 -_0812B60C: - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0812B64E - ldr r5, _0812B654 @ =gUnknown_02024E60 - ldr r4, _0812B658 @ =gUnknown_02024A60 - ldrb r0, [r4] - adds r0, r5 - ldrb r1, [r0] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - bne _0812B64E - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4] - adds r0, r5 - ldrb r0, [r0] - bl nullsub_8 - ldrb r1, [r4] - adds r1, r5 - ldrb r0, [r1] - movs r2, 0x2 - eors r0, r2 - strb r0, [r1] - ldrb r0, [r4] - adds r0, r5 - ldrb r0, [r0] - movs r1, 0 - bl sub_802E3E4 -_0812B64E: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812B654: .4byte gUnknown_02024E60 -_0812B658: .4byte gUnknown_02024A60 - thumb_func_end bx_battle_menu_t6_2 - - thumb_func_start sub_812B65C -sub_812B65C: @ 812B65C - push {lr} - ldr r2, _0812B684 @ =gSprites - ldr r1, _0812B688 @ =gUnknown_02024BE0 - ldr r0, _0812B68C @ =gUnknown_02024A60 - ldrb r0, [r0] - adds r0, r1 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r2, 0x1C - adds r0, r2 - ldr r1, [r0] - ldr r0, _0812B690 @ =SpriteCallbackDummy - cmp r1, r0 - bne _0812B680 - bl dp01_tbl6_exec_completed -_0812B680: - pop {r0} - bx r0 - .align 2, 0 -_0812B684: .4byte gSprites -_0812B688: .4byte gUnknown_02024BE0 -_0812B68C: .4byte gUnknown_02024A60 -_0812B690: .4byte SpriteCallbackDummy - thumb_func_end sub_812B65C - - thumb_func_start sub_812B694 -sub_812B694: @ 812B694 - push {lr} - ldr r0, _0812B6A8 @ =gUnknown_03004210 - ldrh r0, [r0, 0x16] - cmp r0, 0 - bne _0812B6A2 - bl dp01_tbl6_exec_completed -_0812B6A2: - pop {r0} - bx r0 - .align 2, 0 -_0812B6A8: .4byte gUnknown_03004210 - thumb_func_end sub_812B694 - - thumb_func_start sub_812B6AC -sub_812B6AC: @ 812B6AC - push {lr} - ldr r0, _0812B6DC @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0812B6D6 - ldr r2, _0812B6E0 @ =gMain - ldr r0, _0812B6E4 @ =0x0000043d - adds r3, r2, r0 - ldrb r1, [r3] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r3] - ldr r0, _0812B6E8 @ =gUnknown_030042D0 - ldr r0, [r0] - str r0, [r2] - ldr r0, [r2, 0x8] - bl SetMainCallback2 -_0812B6D6: - pop {r0} - bx r0 - .align 2, 0 -_0812B6DC: .4byte gPaletteFade -_0812B6E0: .4byte gMain -_0812B6E4: .4byte 0x0000043d -_0812B6E8: .4byte gUnknown_030042D0 - thumb_func_end sub_812B6AC - - thumb_func_start bx_wait_t6 -bx_wait_t6: @ 812B6EC - push {lr} - ldr r0, _0812B718 @ =gUnknown_02024E6D - ldrb r0, [r0] - cmp r0, 0 - beq _0812B70E - ldr r0, _0812B71C @ =gUnknown_02024A60 - ldrb r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - ldr r1, _0812B720 @ =0x02017810 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - bne _0812B712 -_0812B70E: - bl dp01_tbl6_exec_completed -_0812B712: - pop {r0} - bx r0 - .align 2, 0 -_0812B718: .4byte gUnknown_02024E6D -_0812B71C: .4byte gUnknown_02024A60 -_0812B720: .4byte 0x02017810 - thumb_func_end bx_wait_t6 - - thumb_func_start sub_812B724 -sub_812B724: @ 812B724 - push {lr} - ldr r0, _0812B748 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0812B744 - ldr r1, _0812B74C @ =gUnknown_03004330 - ldr r0, _0812B750 @ =gUnknown_02024A60 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r1, _0812B754 @ =sub_812B758 - str r1, [r0] - bl sub_810BADC -_0812B744: - pop {r0} - bx r0 - .align 2, 0 -_0812B748: .4byte gPaletteFade -_0812B74C: .4byte gUnknown_03004330 -_0812B750: .4byte gUnknown_02024A60 -_0812B754: .4byte sub_812B758 - thumb_func_end sub_812B724 - - thumb_func_start sub_812B758 -sub_812B758: @ 812B758 - push {lr} - ldr r0, _0812B784 @ =gMain - ldr r1, [r0, 0x4] - ldr r0, _0812B788 @ =sub_800F808 - cmp r1, r0 - bne _0812B77E - ldr r0, _0812B78C @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0812B77E - ldr r0, _0812B790 @ =gScriptItemId - ldrh r1, [r0] - movs r0, 0x1 - bl dp01_build_cmdbuf_x23_aa_0 - bl dp01_tbl6_exec_completed -_0812B77E: - pop {r0} - bx r0 - .align 2, 0 -_0812B784: .4byte gMain -_0812B788: .4byte sub_800F808 -_0812B78C: .4byte gPaletteFade -_0812B790: .4byte gScriptItemId - thumb_func_end sub_812B758 - - thumb_func_start sub_812B794 -sub_812B794: @ 812B794 - push {lr} - ldr r0, _0812B7B8 @ =gUnknown_02024A60 - ldrb r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - ldr r1, _0812B7BC @ =0x02017810 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - bne _0812B7B2 - bl dp01_tbl6_exec_completed -_0812B7B2: - pop {r0} - bx r0 - .align 2, 0 -_0812B7B8: .4byte gUnknown_02024A60 -_0812B7BC: .4byte 0x02017810 - thumb_func_end sub_812B794 - - thumb_func_start dp01_tbl6_exec_completed -dp01_tbl6_exec_completed: @ 812B7C0 - push {r4,lr} - sub sp, 0x4 - ldr r1, _0812B800 @ =gUnknown_03004330 - ldr r4, _0812B804 @ =gUnknown_02024A60 - ldrb r0, [r4] - lsls r0, 2 - adds r0, r1 - ldr r1, _0812B808 @ =sub_812B484 - str r1, [r0] - ldr r0, _0812B80C @ =gBattleTypeFlags - ldrh r1, [r0] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0812B814 - bl GetMultiplayerId - mov r1, sp - strb r0, [r1] - movs r0, 0x2 - movs r1, 0x4 - mov r2, sp - bl dp01_prepare_buffer_wireless_probably - ldr r1, _0812B810 @ =gUnknown_02023A60 - ldrb r0, [r4] - lsls r0, 9 - adds r0, r1 - movs r1, 0x38 - strb r1, [r0] - b _0812B826 - .align 2, 0 -_0812B800: .4byte gUnknown_03004330 -_0812B804: .4byte gUnknown_02024A60 -_0812B808: .4byte sub_812B484 -_0812B80C: .4byte gBattleTypeFlags -_0812B810: .4byte gUnknown_02023A60 -_0812B814: - ldr r2, _0812B830 @ =gUnknown_02024A64 - ldr r1, _0812B834 @ =gBitTable - ldrb r0, [r4] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - ldr r0, [r2] - bics r0, r1 - str r0, [r2] -_0812B826: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0812B830: .4byte gUnknown_02024A64 -_0812B834: .4byte gBitTable - thumb_func_end dp01_tbl6_exec_completed - - thumb_func_start unref_sub_812B838 -unref_sub_812B838: @ 812B838 - push {lr} - ldr r0, _0812B85C @ =gUnknown_02024A60 - ldrb r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - ldr r1, _0812B860 @ =0x02017810 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - bne _0812B856 - bl dp01_tbl6_exec_completed -_0812B856: - pop {r0} - bx r0 - .align 2, 0 -_0812B85C: .4byte gUnknown_02024A60 -_0812B860: .4byte 0x02017810 - thumb_func_end unref_sub_812B838 - - thumb_func_start sub_812B864 -sub_812B864: @ 812B864 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B864 - - thumb_func_start sub_812B870 -sub_812B870: @ 812B870 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B870 - - thumb_func_start sub_812B87C -sub_812B87C: @ 812B87C - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B87C - - thumb_func_start sub_812B888 -sub_812B888: @ 812B888 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B888 - - thumb_func_start sub_812B894 -sub_812B894: @ 812B894 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B894 - - thumb_func_start sub_812B8A0 -sub_812B8A0: @ 812B8A0 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B8A0 - - thumb_func_start sub_812B8AC -sub_812B8AC: @ 812B8AC - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B8AC - - thumb_func_start sub_812B8B8 -sub_812B8B8: @ 812B8B8 - push {r4-r6,lr} - ldr r4, _0812B96C @ =gSaveBlock2 - ldrb r0, [r4, 0x8] - ldr r5, _0812B970 @ =gUnknown_02024A60 - ldrb r1, [r5] - bl sub_8031AF4 - ldrb r6, [r4, 0x8] - ldrb r0, [r5] - bl battle_get_per_side_status - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r6, 0 - bl GetMonSpriteTemplate_803C5A0 - ldr r0, _0812B974 @ =gUnknown_02024E8C - ldr r2, _0812B978 @ =gTrainerBackPicCoords - ldrb r1, [r4, 0x8] - lsls r1, 2 - adds r1, r2 - ldrb r1, [r1] - movs r2, 0x8 - subs r2, r1 - lsls r2, 18 - movs r1, 0xA0 - lsls r1, 15 - adds r2, r1 - asrs r2, 16 - movs r1, 0x50 - movs r3, 0x1E - bl CreateSprite - ldr r6, _0812B97C @ =gUnknown_02024BE0 - ldrb r1, [r5] - adds r1, r6 - strb r0, [r1] - ldr r4, _0812B980 @ =gSprites - ldrb r3, [r5] - adds r0, r3, r6 - ldrb r0, [r0] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - lsls r3, 4 - ldrb r2, [r1, 0x5] - movs r0, 0xF - ands r0, r2 - orrs r0, r3 - strb r0, [r1, 0x5] - ldrb r0, [r5] - adds r0, r6 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - movs r1, 0xF0 - strh r1, [r0, 0x24] - ldrb r0, [r5] - adds r0, r6 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldr r1, _0812B984 @ =0x0000fffe - strh r1, [r0, 0x2E] - ldrb r0, [r5] - adds r0, r6 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r4, 0x1C - adds r0, r4 - ldr r1, _0812B988 @ =sub_80313A0 - str r1, [r0] - ldr r1, _0812B98C @ =gUnknown_03004330 - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r1, _0812B990 @ =sub_812B65C - str r1, [r0] - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_0812B96C: .4byte gSaveBlock2 -_0812B970: .4byte gUnknown_02024A60 -_0812B974: .4byte gUnknown_02024E8C -_0812B978: .4byte gTrainerBackPicCoords -_0812B97C: .4byte gUnknown_02024BE0 -_0812B980: .4byte gSprites -_0812B984: .4byte 0x0000fffe -_0812B988: .4byte sub_80313A0 -_0812B98C: .4byte gUnknown_03004330 -_0812B990: .4byte sub_812B65C - thumb_func_end sub_812B8B8 - - thumb_func_start sub_812B994 -sub_812B994: @ 812B994 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B994 - - thumb_func_start sub_812B9A0 -sub_812B9A0: @ 812B9A0 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B9A0 - - thumb_func_start sub_812B9AC -sub_812B9AC: @ 812B9AC - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B9AC - - thumb_func_start sub_812B9B8 -sub_812B9B8: @ 812B9B8 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812B9B8 - - thumb_func_start sub_812B9C4 -sub_812B9C4: @ 812B9C4 - push {r4,r5,lr} - ldr r1, _0812BA00 @ =0x02017840 - movs r0, 0x4 - strb r0, [r1, 0x8] - ldr r1, _0812BA04 @ =gUnknown_02024E6D - movs r0, 0x1 - strb r0, [r1] - ldr r5, _0812BA08 @ =gUnknown_02024A60 - ldrb r4, [r5] - movs r0, 0x1 - bl battle_get_side_with_given_state - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r4, 0 - movs r3, 0x4 - bl move_anim_start_t4 - ldr r1, _0812BA0C @ =gUnknown_03004330 - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r1, _0812BA10 @ =bx_wait_t6 - str r1, [r0] - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812BA00: .4byte 0x02017840 -_0812BA04: .4byte gUnknown_02024E6D -_0812BA08: .4byte gUnknown_02024A60 -_0812BA0C: .4byte gUnknown_03004330 -_0812BA10: .4byte bx_wait_t6 - thumb_func_end sub_812B9C4 - - thumb_func_start sub_812BA14 -sub_812BA14: @ 812BA14 - push {r4,r5,lr} - ldr r1, _0812BA58 @ =gUnknown_02023A60 - ldr r5, _0812BA5C @ =gUnknown_02024A60 - ldrb r0, [r5] - lsls r0, 9 - adds r1, 0x1 - adds r0, r1 - ldrb r1, [r0] - ldr r0, _0812BA60 @ =0x02017840 - strb r1, [r0, 0x8] - ldr r1, _0812BA64 @ =gUnknown_02024E6D - movs r0, 0x1 - strb r0, [r1] - ldrb r4, [r5] - movs r0, 0x1 - bl battle_get_side_with_given_state - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r4, 0 - movs r3, 0x4 - bl move_anim_start_t4 - ldr r1, _0812BA68 @ =gUnknown_03004330 - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r1, _0812BA6C @ =bx_wait_t6 - str r1, [r0] - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812BA58: .4byte gUnknown_02023A60 -_0812BA5C: .4byte gUnknown_02024A60 -_0812BA60: .4byte 0x02017840 -_0812BA64: .4byte gUnknown_02024E6D -_0812BA68: .4byte gUnknown_03004330 -_0812BA6C: .4byte bx_wait_t6 - thumb_func_end sub_812BA14 - - thumb_func_start sub_812BA70 -sub_812BA70: @ 812BA70 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BA70 - - thumb_func_start sub_812BA7C -sub_812BA7C: @ 812BA7C - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BA7C - - thumb_func_start dp01t_10_6_message -dp01t_10_6_message: @ 812BA88 - push {r4,lr} - sub sp, 0x4 - ldr r0, _0812BACC @ =gUnknown_030042A4 - movs r1, 0 - strh r1, [r0] - ldr r0, _0812BAD0 @ =gUnknown_030042A0 - strh r1, [r0] - ldr r4, _0812BAD4 @ =gUnknown_02024A60 - ldrb r0, [r4] - lsls r0, 9 - ldr r1, _0812BAD8 @ =gUnknown_02023A62 - adds r0, r1 - ldrh r0, [r0] - bl sub_8120AA8 - ldr r0, _0812BADC @ =gUnknown_03004210 - ldr r1, _0812BAE0 @ =gUnknown_020238CC - movs r2, 0xF - str r2, [sp] - movs r2, 0x90 - movs r3, 0x2 - bl sub_8002EB0 - ldr r1, _0812BAE4 @ =gUnknown_03004330 - ldrb r0, [r4] - lsls r0, 2 - adds r0, r1 - ldr r1, _0812BAE8 @ =sub_812B694 - str r1, [r0] - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0812BACC: .4byte gUnknown_030042A4 -_0812BAD0: .4byte gUnknown_030042A0 -_0812BAD4: .4byte gUnknown_02024A60 -_0812BAD8: .4byte gUnknown_02023A62 -_0812BADC: .4byte gUnknown_03004210 -_0812BAE0: .4byte gUnknown_020238CC -_0812BAE4: .4byte gUnknown_03004330 -_0812BAE8: .4byte sub_812B694 - thumb_func_end dp01t_10_6_message - - thumb_func_start dp01t_11_6_message_for_player_only -dp01t_11_6_message_for_player_only: @ 812BAEC - push {lr} - ldr r0, _0812BB04 @ =gUnknown_02024A60 - ldrb r0, [r0] - bl battle_side_get_owner - lsls r0, 24 - cmp r0, 0 - bne _0812BB08 - bl dp01t_10_6_message - b _0812BB0C - .align 2, 0 -_0812BB04: .4byte gUnknown_02024A60 -_0812BB08: - bl dp01_tbl6_exec_completed -_0812BB0C: - pop {r0} - bx r0 - thumb_func_end dp01t_11_6_message_for_player_only - - thumb_func_start sub_812BB10 -sub_812BB10: @ 812BB10 - push {r4,r5,lr} - sub sp, 0x8 - ldr r0, _0812BBCC @ =gUnknown_030042A4 - movs r2, 0 - strh r2, [r0] - ldr r1, _0812BBD0 @ =gUnknown_030042A0 - movs r0, 0xA0 - strh r0, [r1] - ldr r4, _0812BBD4 @ =gUnknown_03004210 - movs r5, 0 - strb r2, [r4, 0x6] - movs r0, 0x1B - str r0, [sp] - movs r0, 0x12 - str r0, [sp, 0x4] - adds r0, r4, 0 - movs r1, 0xA - movs r2, 0x2 - movs r3, 0xF - bl FillWindowRect_DefaultPalette - movs r0, 0x10 - str r0, [sp] - movs r0, 0x24 - str r0, [sp, 0x4] - adds r0, r4, 0 - movs r1, 0xA - movs r2, 0x2 - movs r3, 0x23 - bl FillWindowRect_DefaultPalette - ldr r1, _0812BBD8 @ =gUnknown_03004330 - ldr r0, _0812BBDC @ =gUnknown_02024A60 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r1, _0812BBE0 @ =bx_battle_menu_t6_2 - str r1, [r0] - ldr r1, _0812BBE4 @ =gUnknown_08400D15 - movs r2, 0xC8 - lsls r2, 1 - movs r0, 0x23 - str r0, [sp] - adds r0, r4, 0 - movs r3, 0x12 - bl InitWindow - adds r0, r4, 0 - bl sub_8002F44 - ldr r1, _0812BBE8 @ =0x0000ffff - ldr r3, _0812BBEC @ =0x00002d9f - str r5, [sp] - movs r0, 0 - movs r2, 0xC - bl sub_814A5C0 - movs r4, 0 -_0812BB84: - lsls r0, r4, 24 - lsrs r0, 24 - bl nullsub_8 - adds r4, 0x1 - cmp r4, 0x3 - ble _0812BB84 - ldr r1, _0812BBF0 @ =gUnknown_02024E60 - ldr r0, _0812BBDC @ =gUnknown_02024A60 - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - movs r1, 0 - bl sub_802E3E4 - ldr r0, _0812BBF4 @ =gUnknown_08400CBB - bl get_battle_strings_ - ldr r4, _0812BBD4 @ =gUnknown_03004210 - ldr r1, _0812BBF8 @ =gUnknown_020238CC - movs r2, 0xDC - lsls r2, 1 - movs r0, 0x23 - str r0, [sp] - adds r0, r4, 0 - movs r3, 0x2 - bl InitWindow - adds r0, r4, 0 - bl sub_8002F44 - add sp, 0x8 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812BBCC: .4byte gUnknown_030042A4 -_0812BBD0: .4byte gUnknown_030042A0 -_0812BBD4: .4byte gUnknown_03004210 -_0812BBD8: .4byte gUnknown_03004330 -_0812BBDC: .4byte gUnknown_02024A60 -_0812BBE0: .4byte bx_battle_menu_t6_2 -_0812BBE4: .4byte gUnknown_08400D15 -_0812BBE8: .4byte 0x0000ffff -_0812BBEC: .4byte 0x00002d9f -_0812BBF0: .4byte gUnknown_02024E60 -_0812BBF4: .4byte gUnknown_08400CBB -_0812BBF8: .4byte gUnknown_020238CC - thumb_func_end sub_812BB10 - - thumb_func_start sub_812BBFC -sub_812BBFC: @ 812BBFC - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BBFC - - thumb_func_start sub_812BC08 -sub_812BC08: @ 812BC08 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BC08 - - thumb_func_start sub_812BC14 -sub_812BC14: @ 812BC14 - push {lr} - sub sp, 0x4 - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r1, _0812BC44 @ =gUnknown_03004330 - ldr r2, _0812BC48 @ =gUnknown_02024A60 - ldrb r0, [r2] - lsls r0, 2 - adds r0, r1 - ldr r1, _0812BC4C @ =sub_812B724 - str r1, [r0] - ldr r1, _0812BC50 @ =gUnknown_02024E6C - ldrb r0, [r2] - strb r0, [r1] - add sp, 0x4 - pop {r0} - bx r0 - .align 2, 0 -_0812BC44: .4byte gUnknown_03004330 -_0812BC48: .4byte gUnknown_02024A60 -_0812BC4C: .4byte sub_812B724 -_0812BC50: .4byte gUnknown_02024E6C - thumb_func_end sub_812BC14 - - thumb_func_start sub_812BC54 -sub_812BC54: @ 812BC54 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BC54 - - thumb_func_start sub_812BC60 -sub_812BC60: @ 812BC60 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BC60 - - thumb_func_start sub_812BC6C -sub_812BC6C: @ 812BC6C - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BC6C - - thumb_func_start sub_812BC78 -sub_812BC78: @ 812BC78 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BC78 - - thumb_func_start sub_812BC84 -sub_812BC84: @ 812BC84 - push {lr} - ldr r0, _0812BCB0 @ =gUnknown_03004340 - ldr r1, _0812BCB4 @ =gUnknown_02024A60 - ldrb r1, [r1] - adds r0, r1, r0 - ldrb r0, [r0] - ldr r2, _0812BCB8 @ =gUnknown_02024A6A - lsls r1, 1 - adds r1, r2 - ldrh r2, [r1] - movs r1, 0x64 - muls r1, r2 - ldr r2, _0812BCBC @ =gPlayerParty - adds r1, r2 - movs r2, 0xB - bl sub_8045A5C - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - .align 2, 0 -_0812BCB0: .4byte gUnknown_03004340 -_0812BCB4: .4byte gUnknown_02024A60 -_0812BCB8: .4byte gUnknown_02024A6A -_0812BCBC: .4byte gPlayerParty - thumb_func_end sub_812BC84 - - thumb_func_start sub_812BCC0 -sub_812BCC0: @ 812BCC0 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BCC0 - - thumb_func_start sub_812BCCC -sub_812BCCC: @ 812BCCC - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BCCC - - thumb_func_start sub_812BCD8 -sub_812BCD8: @ 812BCD8 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BCD8 - - thumb_func_start sub_812BCE4 -sub_812BCE4: @ 812BCE4 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BCE4 - - thumb_func_start sub_812BCF0 -sub_812BCF0: @ 812BCF0 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BCF0 - - thumb_func_start sub_812BCFC -sub_812BCFC: @ 812BCFC - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BCFC - - thumb_func_start sub_812BD08 -sub_812BD08: @ 812BD08 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD08 - - thumb_func_start sub_812BD14 -sub_812BD14: @ 812BD14 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD14 - - thumb_func_start sub_812BD20 -sub_812BD20: @ 812BD20 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD20 - - thumb_func_start sub_812BD2C -sub_812BD2C: @ 812BD2C - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD2C - - thumb_func_start sub_812BD38 -sub_812BD38: @ 812BD38 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD38 - - thumb_func_start sub_812BD44 -sub_812BD44: @ 812BD44 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD44 - - thumb_func_start sub_812BD50 -sub_812BD50: @ 812BD50 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD50 - - thumb_func_start sub_812BD5C -sub_812BD5C: @ 812BD5C - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD5C - - thumb_func_start sub_812BD68 -sub_812BD68: @ 812BD68 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD68 - - thumb_func_start sub_812BD74 -sub_812BD74: @ 812BD74 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BD74 - - thumb_func_start sub_812BD80 -sub_812BD80: @ 812BD80 - push {r4,lr} - ldr r4, _0812BDBC @ =gUnknown_02024A60 - ldrb r0, [r4] - bl battle_side_get_owner - lsls r0, 24 - movs r3, 0x3F - cmp r0, 0 - bne _0812BD94 - movs r3, 0xC0 -_0812BD94: - ldr r2, _0812BDC0 @ =gUnknown_02023A60 - ldrb r1, [r4] - lsls r1, 9 - adds r0, r2, 0x1 - adds r0, r1, r0 - ldrb r0, [r0] - adds r2, 0x2 - adds r1, r2 - ldrb r1, [r1] - lsls r1, 8 - orrs r0, r1 - lsls r1, r3, 24 - asrs r1, 24 - bl PlaySE12WithPanning - bl dp01_tbl6_exec_completed - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0812BDBC: .4byte gUnknown_02024A60 -_0812BDC0: .4byte gUnknown_02023A60 - thumb_func_end sub_812BD80 - - thumb_func_start sub_812BDC4 -sub_812BDC4: @ 812BDC4 - push {lr} - ldr r2, _0812BDEC @ =gUnknown_02023A60 - ldr r0, _0812BDF0 @ =gUnknown_02024A60 - ldrb r1, [r0] - lsls r1, 9 - adds r0, r2, 0x1 - adds r0, r1, r0 - ldrb r0, [r0] - adds r2, 0x2 - adds r1, r2 - ldrb r1, [r1] - lsls r1, 8 - orrs r0, r1 - bl PlayFanfare - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - .align 2, 0 -_0812BDEC: .4byte gUnknown_02023A60 -_0812BDF0: .4byte gUnknown_02024A60 - thumb_func_end sub_812BDC4 - - thumb_func_start sub_812BDF4 -sub_812BDF4: @ 812BDF4 - push {lr} - ldr r1, _0812BE24 @ =gUnknown_02024A6A - ldr r0, _0812BE28 @ =gUnknown_02024A60 - ldrb r0, [r0] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, _0812BE2C @ =gPlayerParty - adds r0, r1 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x19 - bl PlayCry1 - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - .align 2, 0 -_0812BE24: .4byte gUnknown_02024A6A -_0812BE28: .4byte gUnknown_02024A60 -_0812BE2C: .4byte gPlayerParty - thumb_func_end sub_812BDF4 - - thumb_func_start dp01t_2E_6_battle_intro -dp01t_2E_6_battle_intro: @ 812BE30 - push {lr} - ldr r1, _0812BE58 @ =gUnknown_02023A60 - ldr r0, _0812BE5C @ =gUnknown_02024A60 - ldrb r0, [r0] - lsls r0, 9 - adds r1, 0x1 - adds r0, r1 - ldrb r0, [r0] - bl sub_80E43C0 - ldr r2, _0812BE60 @ =gUnknown_02024DE8 - ldrh r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strh r0, [r2] - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - .align 2, 0 -_0812BE58: .4byte gUnknown_02023A60 -_0812BE5C: .4byte gUnknown_02024A60 -_0812BE60: .4byte gUnknown_02024DE8 - thumb_func_end dp01t_2E_6_battle_intro - - thumb_func_start sub_812BE64 -sub_812BE64: @ 812BE64 - push {r4,r5,lr} - ldr r5, _0812BEA0 @ =gUnknown_03004340 - ldr r4, _0812BEA4 @ =gUnknown_02024A60 - ldrb r1, [r4] - adds r0, r1, r5 - ldrb r0, [r0] - ldr r2, _0812BEA8 @ =gUnknown_02024A6A - lsls r1, 1 - adds r1, r2 - ldrh r2, [r1] - movs r1, 0x64 - muls r1, r2 - ldr r2, _0812BEAC @ =gPlayerParty - adds r1, r2 - movs r2, 0xA - bl sub_8045A5C - ldrb r0, [r4] - bl sub_804777C - ldrb r0, [r4] - adds r0, r5 - ldrb r0, [r0] - bl sub_8043DFC - bl dp01_tbl6_exec_completed - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_0812BEA0: .4byte gUnknown_03004340 -_0812BEA4: .4byte gUnknown_02024A60 -_0812BEA8: .4byte gUnknown_02024A6A -_0812BEAC: .4byte gPlayerParty - thumb_func_end sub_812BE64 - - thumb_func_start sub_812BEB0 -sub_812BEB0: @ 812BEB0 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BEB0 - - thumb_func_start sub_812BEBC -sub_812BEBC: @ 812BEBC - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BEBC - - thumb_func_start sub_812BEC8 -sub_812BEC8: @ 812BEC8 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BEC8 - - thumb_func_start sub_812BED4 -sub_812BED4: @ 812BED4 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BED4 - - thumb_func_start sub_812BEE0 -sub_812BEE0: @ 812BEE0 - push {r4-r6,lr} - sub sp, 0x4 - ldr r5, _0812BF18 @ =gUnknown_02023A60 - ldr r6, _0812BF1C @ =gUnknown_02024A60 - ldrb r2, [r6] - lsls r1, r2, 9 - adds r0, r5, 0x1 - adds r0, r1, r0 - ldrb r3, [r0] - adds r0, r5, 0x2 - adds r0, r1, r0 - ldrb r4, [r0] - adds r5, 0x3 - adds r1, r5 - ldrb r0, [r1] - lsls r0, 8 - orrs r4, r0 - str r4, [sp] - adds r0, r2, 0 - adds r1, r2, 0 - bl move_anim_start_t3 - lsls r0, 24 - cmp r0, 0 - beq _0812BF20 - bl dp01_tbl6_exec_completed - b _0812BF2C - .align 2, 0 -_0812BF18: .4byte gUnknown_02023A60 -_0812BF1C: .4byte gUnknown_02024A60 -_0812BF20: - ldr r0, _0812BF34 @ =gUnknown_03004330 - ldrb r1, [r6] - lsls r1, 2 - adds r1, r0 - ldr r0, _0812BF38 @ =sub_812B794 - str r0, [r1] -_0812BF2C: - add sp, 0x4 - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_0812BF34: .4byte gUnknown_03004330 -_0812BF38: .4byte sub_812B794 - thumb_func_end sub_812BEE0 - - thumb_func_start sub_812BF3C -sub_812BF3C: @ 812BF3C - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BF3C - - thumb_func_start sub_812BF48 -sub_812BF48: @ 812BF48 - push {lr} - bl dp01_tbl6_exec_completed - pop {r0} - bx r0 - thumb_func_end sub_812BF48 - - thumb_func_start sub_812BF54 -sub_812BF54: @ 812BF54 - push {r4,lr} - ldr r2, _0812BF98 @ =gUnknown_02024D26 - ldr r1, _0812BF9C @ =gUnknown_02023A60 - ldr r4, _0812BFA0 @ =gUnknown_02024A60 - ldrb r0, [r4] - lsls r0, 9 - adds r1, 0x1 - adds r0, r1 - ldrb r0, [r0] - strb r0, [r2] - movs r0, 0x5 - bl FadeOutMapMusic - movs r0, 0x3 - bl BeginFastPaletteFade - bl dp01_tbl6_exec_completed - ldr r0, _0812BFA4 @ =gBattleTypeFlags - ldrh r1, [r0] - movs r0, 0x6 - ands r0, r1 - cmp r0, 0x2 - bne _0812BF90 - ldr r0, _0812BFA8 @ =gUnknown_03004330 - ldrb r1, [r4] - lsls r1, 2 - adds r1, r0 - ldr r0, _0812BFAC @ =sub_812B6AC - str r0, [r1] -_0812BF90: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0812BF98: .4byte gUnknown_02024D26 -_0812BF9C: .4byte gUnknown_02023A60 -_0812BFA0: .4byte gUnknown_02024A60 -_0812BFA4: .4byte gBattleTypeFlags -_0812BFA8: .4byte gUnknown_03004330 -_0812BFAC: .4byte sub_812B6AC - thumb_func_end sub_812BF54 - - thumb_func_start nullsub_78 -nullsub_78: @ 812BFB0 - bx lr - thumb_func_end nullsub_78 - - thumb_func_start SetUpFieldMove_SweetScent -SetUpFieldMove_SweetScent: @ 812BFB4 - ldr r1, _0812BFC4 @ =gUnknown_0300485C - ldr r0, _0812BFC8 @ =sub_808AB90 - str r0, [r1] - ldr r1, _0812BFCC @ =gUnknown_03005CE4 - ldr r0, _0812BFD0 @ =sub_812BFD4 - str r0, [r1] - movs r0, 0x1 - bx lr - .align 2, 0 -_0812BFC4: .4byte gUnknown_0300485C -_0812BFC8: .4byte sub_808AB90 -_0812BFCC: .4byte gUnknown_03005CE4 -_0812BFD0: .4byte sub_812BFD4 - thumb_func_end SetUpFieldMove_SweetScent - - thumb_func_start sub_812BFD4 -sub_812BFD4: @ 812BFD4 - push {lr} - movs r0, 0x33 - bl FieldEffectStart - ldr r0, _0812BFE8 @ =gUnknown_0202FF84 - ldr r1, _0812BFEC @ =gLastFieldPokeMenuOpened - ldrb r1, [r1] - str r1, [r0] - pop {r0} - bx r0 - .align 2, 0 -_0812BFE8: .4byte gUnknown_0202FF84 -_0812BFEC: .4byte gLastFieldPokeMenuOpened - thumb_func_end sub_812BFD4 - - thumb_func_start FldEff_SweetScent -FldEff_SweetScent: @ 812BFF0 - push {lr} - bl oei_task_add - lsls r0, 24 - lsrs r0, 24 - ldr r2, _0812C014 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - ldr r2, _0812C018 @ =sub_812C01C - lsrs r0, r2, 16 - strh r0, [r1, 0x18] - strh r2, [r1, 0x1A] - movs r0, 0 - pop {r1} - bx r1 - .align 2, 0 -_0812C014: .4byte gTasks -_0812C018: .4byte sub_812C01C - thumb_func_end FldEff_SweetScent - - thumb_func_start sub_812C01C -sub_812C01C: @ 812C01C - push {lr} - sub sp, 0x4 - movs r0, 0xEC - bl PlaySE - bl GetPlayerAvatarObjectId - ldr r2, _0812C078 @ =gSprites - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r1, [r1, 0x5] - lsrs r1, 4 - adds r1, 0x10 - movs r0, 0x1 - lsls r0, r1 - mvns r0, r0 - movs r1, 0x1F - str r1, [sp] - movs r1, 0x4 - movs r2, 0 - movs r3, 0x8 - bl BeginNormalPaletteFade - ldr r0, _0812C07C @ =sub_812C084 - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, _0812C080 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - movs r0, 0 - strh r0, [r1, 0x8] - movs r0, 0x33 - bl FieldEffectActiveListRemove - add sp, 0x4 - pop {r0} - bx r0 - .align 2, 0 -_0812C078: .4byte gSprites -_0812C07C: .4byte sub_812C084 -_0812C080: .4byte gTasks - thumb_func_end sub_812C01C - - thumb_func_start sub_812C084 -sub_812C084: @ 812C084 - push {r4,r5,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r5, r0, 24 - ldr r0, _0812C0C8 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0 - bne _0812C110 - ldr r0, _0812C0CC @ =gTasks - lsls r1, r5, 2 - adds r1, r5 - lsls r1, 3 - adds r4, r1, r0 - ldrh r1, [r4, 0x8] - movs r3, 0x8 - ldrsh r0, [r4, r3] - cmp r0, 0x40 - bne _0812C10C - strh r2, [r4, 0x8] - bl SweetScentWildEncounter - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0812C0D0 - adds r0, r5, 0 - bl DestroyTask - b _0812C110 - .align 2, 0 -_0812C0C8: .4byte gPaletteFade -_0812C0CC: .4byte gTasks -_0812C0D0: - ldr r0, _0812C104 @ =sub_812C118 - str r0, [r4] - bl GetPlayerAvatarObjectId - ldr r2, _0812C108 @ =gSprites - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r1, [r1, 0x5] - lsrs r1, 4 - adds r1, 0x10 - movs r0, 0x1 - lsls r0, r1 - mvns r0, r0 - movs r1, 0x1F - str r1, [sp] - movs r1, 0x4 - movs r2, 0x8 - movs r3, 0 - bl BeginNormalPaletteFade - b _0812C110 - .align 2, 0 -_0812C104: .4byte sub_812C118 -_0812C108: .4byte gSprites -_0812C10C: - adds r0, r1, 0x1 - strh r0, [r4, 0x8] -_0812C110: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_812C084 - - thumb_func_start sub_812C118 -sub_812C118: @ 812C118 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _0812C13C @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0812C136 - ldr r0, _0812C140 @ =SweetScentNothingHereScript - bl ScriptContext1_SetupScript - adds r0, r4, 0 - bl DestroyTask -_0812C136: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_0812C13C: .4byte gPaletteFade -_0812C140: .4byte SweetScentNothingHereScript - thumb_func_end sub_812C118 - + thumb_func_start sub_812C144 sub_812C144: @ 812C144 push {lr} @@ -15511,3434 +13094,4 @@ _08132650: _08132658: .4byte gSprites thumb_func_end sub_81325C4 - thumb_func_start sub_813265C -sub_813265C: @ 813265C - push {lr} - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - pop {r0} - bx r0 - thumb_func_end sub_813265C - - thumb_func_start sub_8132670 -sub_8132670: @ 8132670 - push {lr} - sub sp, 0x4 - bl ScriptContext2_Enable - ldr r0, _08132698 @ =sub_813269C - movs r1, 0xA - bl CreateTask - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - add sp, 0x4 - pop {r0} - bx r0 - .align 2, 0 -_08132698: .4byte sub_813269C - thumb_func_end sub_8132670 - - thumb_func_start sub_813269C -sub_813269C: @ 813269C - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _081326C8 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _081326C0 - ldr r0, _081326CC @ =sub_81326D8 - bl SetMainCallback2 - ldr r1, _081326D0 @ =gUnknown_0300485C - ldr r0, _081326D4 @ =sub_8080990 - str r0, [r1] - adds r0, r4, 0 - bl DestroyTask -_081326C0: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_081326C8: .4byte gPaletteFade -_081326CC: .4byte sub_81326D8 -_081326D0: .4byte gUnknown_0300485C -_081326D4: .4byte sub_8080990 - thumb_func_end sub_813269C - - thumb_func_start sub_81326D8 -sub_81326D8: @ 81326D8 - push {r4,r5,lr} - movs r1, 0x80 - lsls r1, 19 - movs r0, 0 - strh r0, [r1] - bl ResetSpriteData - bl FreeAllSpritePalettes - bl ResetTasks - ldr r4, _08132778 @ =gUnknown_030007B0 - ldr r0, _0813277C @ =0x02017000 - str r0, [r4] - bl sub_81332A0 - ldr r1, [r4] - ldr r0, _08132780 @ =gSpecialVar_0x8004 - ldrh r0, [r0] - ldr r2, _08132784 @ =0x000002c5 - adds r1, r2 - movs r5, 0 - strb r0, [r1] - bl sub_8133558 - ldr r0, _08132788 @ =sub_813265C - bl SetVBlankCallback - ldr r4, _0813278C @ =gWindowConfig_81E7240 - adds r0, r4, 0 - bl SetUpWindowConfig - adds r0, r4, 0 - bl InitMenuWindow - bl MenuZeroFillScreen - ldr r4, _08132790 @ =gWindowConfig_81E6CE4 - adds r0, r4, 0 - bl SetUpWindowConfig - adds r0, r4, 0 - bl InitMenuWindow - bl MenuZeroFillScreen - ldr r0, _08132794 @ =REG_BG0VOFS - strh r5, [r0] - strh r5, [r0] - adds r0, 0x2 - strh r5, [r0] - strh r5, [r0] - ldr r0, _08132798 @ =gUnknown_08402D80 - bl LoadSpriteSheet - ldr r0, _0813279C @ =gUnknown_08402D88 - bl LoadSpritePalette - bl sub_8133358 - movs r0, 0 - movs r1, 0 - movs r2, 0x2 - bl FillPalette - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - ldr r0, _081327A0 @ =sub_8132870 - bl SetMainCallback2 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08132778: .4byte gUnknown_030007B0 -_0813277C: .4byte 0x02017000 -_08132780: .4byte gSpecialVar_0x8004 -_08132784: .4byte 0x000002c5 -_08132788: .4byte sub_813265C -_0813278C: .4byte gWindowConfig_81E7240 -_08132790: .4byte gWindowConfig_81E6CE4 -_08132794: .4byte REG_BG0VOFS -_08132798: .4byte gUnknown_08402D80 -_0813279C: .4byte gUnknown_08402D88 -_081327A0: .4byte sub_8132870 - thumb_func_end sub_81326D8 - - thumb_func_start sub_81327A4 -sub_81327A4: @ 81327A4 - push {r4,r5,lr} - bl ResetSpriteData - bl FreeAllSpritePalettes - bl ResetTasks - ldr r4, _08132844 @ =gUnknown_030007B0 - ldr r0, _08132848 @ =0x02017000 - str r0, [r4] - bl sub_8133558 - ldr r1, [r4] - ldr r0, _0813284C @ =gSpecialVar_0x8005 - ldrh r0, [r0] - ldr r2, _08132850 @ =0x000002c6 - adds r1, r2 - movs r5, 0 - strb r0, [r1] - ldr r0, _08132854 @ =sub_813265C - bl SetVBlankCallback - ldr r4, _08132858 @ =gWindowConfig_81E7240 - adds r0, r4, 0 - bl SetUpWindowConfig - adds r0, r4, 0 - bl InitMenuWindow - bl MenuZeroFillScreen - ldr r4, _0813285C @ =gWindowConfig_81E6CE4 - adds r0, r4, 0 - bl SetUpWindowConfig - adds r0, r4, 0 - bl InitMenuWindow - bl MenuZeroFillScreen - movs r1, 0x80 - lsls r1, 19 - movs r2, 0x9A - lsls r2, 5 - adds r0, r2, 0 - strh r0, [r1] - ldr r0, _08132860 @ =REG_BG0VOFS - strh r5, [r0] - subs r0, 0x2 - strh r5, [r0] - adds r0, 0x4 - strh r5, [r0] - strh r5, [r0] - ldr r0, _08132864 @ =gUnknown_08402D80 - bl LoadSpriteSheet - ldr r0, _08132868 @ =gUnknown_08402D88 - bl LoadSpritePalette - bl sub_8133358 - movs r0, 0 - movs r1, 0 - movs r2, 0x2 - bl FillPalette - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - ldr r0, _0813286C @ =sub_8132870 - bl SetMainCallback2 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08132844: .4byte gUnknown_030007B0 -_08132848: .4byte 0x02017000 -_0813284C: .4byte gSpecialVar_0x8005 -_08132850: .4byte 0x000002c6 -_08132854: .4byte sub_813265C -_08132858: .4byte gWindowConfig_81E7240 -_0813285C: .4byte gWindowConfig_81E6CE4 -_08132860: .4byte REG_BG0VOFS -_08132864: .4byte gUnknown_08402D80 -_08132868: .4byte gUnknown_08402D88 -_0813286C: .4byte sub_8132870 - thumb_func_end sub_81327A4 - - thumb_func_start sub_8132870 -sub_8132870: @ 8132870 - push {r4,lr} - bl sub_8132908 - ldr r4, _081328E0 @ =gUnknown_030007B0 - ldr r1, [r4] - ldrb r0, [r1, 0x1D] - cmp r0, 0 - beq _08132896 - movs r0, 0 - strb r0, [r1, 0x1D] - ldr r0, [r4] - ldrb r1, [r0, 0x18] - lsls r1, 1 - adds r1, 0x1 - lsls r1, 27 - lsrs r1, 24 - movs r0, 0x58 - bl sub_814AD7C -_08132896: - ldr r1, [r4] - ldrb r0, [r1, 0x1E] - cmp r0, 0 - beq _081328A6 - movs r0, 0 - strb r0, [r1, 0x1E] - bl sub_8133800 -_081328A6: - ldr r1, [r4] - ldr r2, _081328E4 @ =0x000002c3 - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0 - beq _081328C8 - adds r2, 0x1 - adds r0, r1, r2 - ldrb r0, [r0] - movs r1, 0x1 - bl sub_8133AEC - ldr r0, [r4] - ldr r1, _081328E4 @ =0x000002c3 - adds r0, r1 - movs r1, 0 - strb r1, [r0] -_081328C8: - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_081328E0: .4byte gUnknown_030007B0 -_081328E4: .4byte 0x000002c3 - thumb_func_end sub_8132870 - - thumb_func_start sub_81328E8 -sub_81328E8: @ 81328E8 - push {r4,lr} - adds r1, r0, 0 - ldr r4, _08132904 @ =gStringVar4 - adds r0, r4, 0 - bl StringExpandPlaceholders - adds r0, r4, 0 - movs r1, 0x3 - movs r2, 0xF - bl MenuPrintMessage - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08132904: .4byte gStringVar4 - thumb_func_end sub_81328E8 - - thumb_func_start sub_8132908 -sub_8132908: @ 8132908 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - ldr r1, _0813292C @ =gUnknown_030007B0 - ldr r0, [r1] - ldrb r0, [r0] - adds r7, r1, 0 - cmp r0, 0x21 - bls _08132920 - b _08132FD6 -_08132920: - lsls r0, 2 - ldr r1, _08132930 @ =_08132934 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_0813292C: .4byte gUnknown_030007B0 -_08132930: .4byte _08132934 - .align 2, 0 -_08132934: - .4byte _081329BC - .4byte _08132A0C - .4byte _08132A24 - .4byte _08132A2C - .4byte _08132A60 - .4byte _08132A66 - .4byte _08132A98 - .4byte _08132FD6 - .4byte _08132AAA - .4byte _08132AD0 - .4byte _08132FD6 - .4byte _08132FD6 - .4byte _08132B74 - .4byte _08132B98 - .4byte _08132DD8 - .4byte _08132DF8 - .4byte _08132BF0 - .4byte _08132C08 - .4byte _08132C2C - .4byte _08132D40 - .4byte _08132D68 - .4byte _08132DB8 - .4byte _08132DC6 - .4byte _08132FD6 - .4byte _08132C74 - .4byte _08132C8C - .4byte _08132CB0 - .4byte _08132D0C - .4byte _08132E18 - .4byte _08132E7C - .4byte _08132F58 - .4byte _08132F84 - .4byte _08132FA4 - .4byte _08132FBC -_081329BC: - ldr r1, [r7] - ldrb r0, [r1] - adds r0, 0x1 - movs r4, 0 - strb r0, [r1] - bl sub_8132FEC - movs r0, 0 - bl sub_8133030 - bl sub_8133800 - ldr r0, _08132A04 @ =gSprites - adds r0, 0x64 - movs r1, 0x48 - strh r1, [r0] - ldr r0, [r7] - ldr r1, _08132A08 @ =0x000002c3 - adds r0, r1 - movs r1, 0x1 - strb r1, [r0] - movs r0, 0x1 - negs r0, r0 - str r4, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - movs r1, 0x80 - lsls r1, 19 - movs r2, 0x9A - lsls r2, 5 - adds r0, r2, 0 - strh r0, [r1] - b _08132FD6 - .align 2, 0 -_08132A04: .4byte gSprites -_08132A08: .4byte 0x000002c3 -_08132A0C: - ldr r0, _08132A20 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08132A1A - b _08132FD6 -_08132A1A: - ldr r1, [r7] - movs r0, 0x4 - b _08132FD4 - .align 2, 0 -_08132A20: .4byte gPaletteFade -_08132A24: - ldr r1, [r7] - ldrb r0, [r1] - adds r0, 0x1 - b _08132FD4 -_08132A2C: - movs r0, 0 - bl sub_8133030 - bl sub_8133800 - ldr r2, _08132A54 @ =gUnknown_030007B0 - ldr r0, [r2] - ldr r1, _08132A58 @ =0x000002c3 - adds r0, r1 - movs r1, 0x1 - strb r1, [r0] - ldr r1, [r2] - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r0, _08132A5C @ =gSprites - adds r0, 0x64 - movs r1, 0x48 - strh r1, [r0] - b _08132FD6 - .align 2, 0 -_08132A54: .4byte gUnknown_030007B0 -_08132A58: .4byte 0x000002c3 -_08132A5C: .4byte gSprites -_08132A60: - bl sub_81330E8 - b _08132A9C -_08132A66: - movs r0, 0 - bl sub_8133140 - bl sub_8133800 - ldr r2, _08132A8C @ =gUnknown_030007B0 - ldr r0, [r2] - ldr r1, _08132A90 @ =0x000002c3 - adds r0, r1 - movs r1, 0x1 - strb r1, [r0] - ldr r0, _08132A94 @ =gSprites - adds r0, 0x64 - movs r1, 0x48 - strh r1, [r0] - ldr r1, [r2] - ldrb r0, [r1] - adds r0, 0x1 - b _08132FD4 - .align 2, 0 -_08132A8C: .4byte gUnknown_030007B0 -_08132A90: .4byte 0x000002c3 -_08132A94: .4byte gSprites -_08132A98: - bl sub_8133248 -_08132A9C: - lsls r0, 24 - cmp r0, 0 - beq _08132AA4 - b _08132FD6 -_08132AA4: - bl sub_813362C - b _08132FD6 -_08132AAA: - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - bne _08132AB6 - b _08132FD6 -_08132AB6: - movs r0, 0x15 - movs r1, 0x7 - movs r2, 0x1 - bl DisplayYesNoMenu - ldr r0, _08132ACC @ =gUnknown_030007B0 - ldr r1, [r0] - ldrb r0, [r1] - adds r0, 0x1 - b _08132FD4 - .align 2, 0 -_08132ACC: .4byte gUnknown_030007B0 -_08132AD0: - bl ProcessMenuInputNoWrap_ - lsls r0, 24 - asrs r1, r0, 24 - cmp r1, 0 - bne _08132B3A - bl sub_8133CA4 - ldr r4, _08132B1C @ =gUnknown_030007B0 - ldr r2, [r4] - ldr r1, _08132B20 @ =0x000002c5 - adds r0, r2, r1 - ldrb r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, _08132B24 @ =gPlayerParty - adds r0, r1 - ldrb r1, [r2, 0x1B] - lsls r1, 1 - adds r2, 0x20 - adds r2, r1 - ldrh r1, [r2] - bl GiveMoveToMon - lsls r0, 16 - ldr r1, _08132B28 @ =0xffff0000 - cmp r0, r1 - beq _08132B34 - ldr r0, _08132B2C @ =gOtherText_PokeLearnedMove - bl sub_81328E8 - ldr r1, _08132B30 @ =gSpecialVar_0x8004 - movs r0, 0x1 - strh r0, [r1] - ldr r1, [r4] - movs r0, 0x1F - b _08132FD4 - .align 2, 0 -_08132B1C: .4byte gUnknown_030007B0 -_08132B20: .4byte 0x000002c5 -_08132B24: .4byte gPlayerParty -_08132B28: .4byte 0xffff0000 -_08132B2C: .4byte gOtherText_PokeLearnedMove -_08132B30: .4byte gSpecialVar_0x8004 -_08132B34: - ldr r1, [r4] - movs r0, 0x10 - b _08132FD4 -_08132B3A: - movs r0, 0x1 - negs r0, r0 - cmp r1, r0 - beq _08132B48 - cmp r1, 0x1 - beq _08132B48 - b _08132FD6 -_08132B48: - bl sub_8133CA4 - ldr r3, _08132B70 @ =gUnknown_030007B0 - ldr r1, [r3] - movs r2, 0xB1 - lsls r2, 2 - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0 - bne _08132B60 - movs r0, 0x3 - strb r0, [r1] -_08132B60: - ldr r1, [r3] - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0x1 - beq _08132B6C - b _08132FD6 -_08132B6C: - movs r0, 0x5 - b _08132FD4 - .align 2, 0 -_08132B70: .4byte gUnknown_030007B0 -_08132B74: - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - bne _08132B80 - b _08132FD6 -_08132B80: - movs r0, 0x15 - movs r1, 0x7 - movs r2, 0x1 - bl DisplayYesNoMenu - ldr r0, _08132B94 @ =gUnknown_030007B0 - ldr r1, [r0] - ldrb r0, [r1] - adds r0, 0x1 - b _08132FD4 - .align 2, 0 -_08132B94: .4byte gUnknown_030007B0 -_08132B98: - bl ProcessMenuInputNoWrap_ - lsls r0, 24 - asrs r4, r0, 24 - cmp r4, 0 - bne _08132BB4 - bl sub_8133CA4 - ldr r0, _08132BB0 @ =gSpecialVar_0x8004 - strh r4, [r0] - b _08132FCE - .align 2, 0 -_08132BB0: .4byte gSpecialVar_0x8004 -_08132BB4: - movs r0, 0x1 - negs r0, r0 - cmp r4, r0 - beq _08132BC2 - cmp r4, 0x1 - beq _08132BC2 - b _08132FD6 -_08132BC2: - bl sub_8133CA4 - ldr r3, _08132BEC @ =gUnknown_030007B0 - ldr r1, [r3] - movs r2, 0xB1 - lsls r2, 2 - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0 - bne _08132BDA - movs r0, 0x3 - strb r0, [r1] -_08132BDA: - ldr r1, [r3] - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0x1 - beq _08132BE6 - b _08132FD6 -_08132BE6: - movs r0, 0x5 - b _08132FD4 - .align 2, 0 -_08132BEC: .4byte gUnknown_030007B0 -_08132BF0: - ldr r0, _08132C00 @ =gOtherText_DeleteOlderMove - bl sub_81328E8 - ldr r0, _08132C04 @ =gUnknown_030007B0 - ldr r1, [r0] - ldrb r0, [r1] - adds r0, 0x1 - b _08132FD4 - .align 2, 0 -_08132C00: .4byte gOtherText_DeleteOlderMove -_08132C04: .4byte gUnknown_030007B0 -_08132C08: - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - bne _08132C14 - b _08132FD6 -_08132C14: - movs r0, 0x15 - movs r1, 0x7 - movs r2, 0x1 - bl DisplayYesNoMenu - ldr r0, _08132C28 @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0x12 - b _08132FD4 - .align 2, 0 -_08132C28: .4byte gUnknown_030007B0 -_08132C2C: - bl ProcessMenuInputNoWrap_ - lsls r0, 24 - asrs r1, r0, 24 - cmp r1, 0 - bne _08132C54 - bl sub_8133CA4 - ldr r0, _08132C4C @ =gOtherText_WhichMoveToForget - bl sub_81328E8 - ldr r0, _08132C50 @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0x13 - b _08132FD4 - .align 2, 0 -_08132C4C: .4byte gOtherText_WhichMoveToForget -_08132C50: .4byte gUnknown_030007B0 -_08132C54: - movs r0, 0x1 - negs r0, r0 - cmp r1, r0 - beq _08132C62 - cmp r1, 0x1 - beq _08132C62 - b _08132FD6 -_08132C62: - bl sub_8133CA4 - ldr r0, _08132C70 @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0x18 - b _08132FD4 - .align 2, 0 -_08132C70: .4byte gUnknown_030007B0 -_08132C74: - ldr r0, _08132C84 @ =gOtherText_StopLearningMove - bl sub_81328E8 - ldr r0, _08132C88 @ =gUnknown_030007B0 - ldr r1, [r0] - ldrb r0, [r1] - adds r0, 0x1 - b _08132FD4 - .align 2, 0 -_08132C84: .4byte gOtherText_StopLearningMove -_08132C88: .4byte gUnknown_030007B0 -_08132C8C: - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - bne _08132C98 - b _08132FD6 -_08132C98: - ldr r0, _08132CAC @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0x1A - strb r0, [r1] - movs r0, 0x15 - movs r1, 0x7 - movs r2, 0x1 - bl DisplayYesNoMenu - b _08132FD6 - .align 2, 0 -_08132CAC: .4byte gUnknown_030007B0 -_08132CB0: - bl ProcessMenuInputNoWrap_ - lsls r0, 24 - asrs r1, r0, 24 - cmp r1, 0 - bne _08132CCC - bl sub_8133CA4 - ldr r0, _08132CC8 @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0x1B - b _08132FD4 - .align 2, 0 -_08132CC8: .4byte gUnknown_030007B0 -_08132CCC: - movs r0, 0x1 - negs r0, r0 - cmp r1, r0 - beq _08132CDA - cmp r1, 0x1 - beq _08132CDA - b _08132FD6 -_08132CDA: - bl sub_8133CA4 - ldr r1, _08132D08 @ =gUnknown_030007B0 - ldr r2, [r1] - movs r3, 0xB1 - lsls r3, 2 - adds r0, r2, r3 - ldrb r0, [r0] - cmp r0, 0 - bne _08132CF2 - movs r0, 0x3 - strb r0, [r2] -_08132CF2: - ldr r2, [r1] - adds r0, r2, r3 - ldrb r0, [r0] - cmp r0, 0x1 - bne _08132D00 - movs r0, 0x5 - strb r0, [r2] -_08132D00: - ldr r1, [r1] - movs r0, 0x10 - b _08132FD4 - .align 2, 0 -_08132D08: .4byte gUnknown_030007B0 -_08132D0C: - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - bne _08132D18 - b _08132FD6 -_08132D18: - ldr r3, _08132D3C @ =gUnknown_030007B0 - ldr r1, [r3] - movs r2, 0xB1 - lsls r2, 2 - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0 - bne _08132D2C - movs r0, 0x3 - strb r0, [r1] -_08132D2C: - ldr r1, [r3] - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0x1 - beq _08132D38 - b _08132FD6 -_08132D38: - movs r0, 0x5 - b _08132FD4 - .align 2, 0 -_08132D3C: .4byte gUnknown_030007B0 -_08132D40: - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - bne _08132D4C - b _08132FD6 -_08132D4C: - ldr r0, _08132D64 @ =gUnknown_030007B0 - ldr r1, [r0] - movs r2, 0 - movs r0, 0x14 - strb r0, [r1] - subs r0, 0x15 - str r2, [sp] - movs r1, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - b _08132FD6 - .align 2, 0 -_08132D64: .4byte gUnknown_030007B0 -_08132D68: - ldr r0, _08132DA4 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08132D76 - b _08132FD6 -_08132D76: - ldr r0, _08132DA8 @ =gPlayerParty - ldr r5, [r7] - ldr r2, _08132DAC @ =0x000002c5 - adds r1, r5, r2 - ldrb r1, [r1] - ldr r2, _08132DB0 @ =gPlayerPartyCount - ldrb r2, [r2] - subs r2, 0x1 - lsls r2, 24 - lsrs r2, 24 - ldr r3, _08132DB4 @ =sub_81327A4 - ldrb r4, [r5, 0x1B] - lsls r4, 1 - adds r5, 0x20 - adds r5, r4 - ldrh r4, [r5] - str r4, [sp] - bl sub_809D9F0 - ldr r1, [r7] - movs r0, 0x1C - b _08132FD4 - .align 2, 0 -_08132DA4: .4byte gPaletteFade -_08132DA8: .4byte gPlayerParty -_08132DAC: .4byte 0x000002c5 -_08132DB0: .4byte gPlayerPartyCount -_08132DB4: .4byte sub_81327A4 -_08132DB8: - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - bne _08132DC4 - b _08132FD6 -_08132DC4: - b _08132FCE -_08132DC6: - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - b _08132FD6 -_08132DD8: - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r0, _08132DF4 @ =gUnknown_030007B0 - ldr r1, [r0] - ldrb r0, [r1] - adds r0, 0x1 - b _08132FD4 - .align 2, 0 -_08132DF4: .4byte gUnknown_030007B0 -_08132DF8: - ldr r0, _08132E10 @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08132E06 - b _08132FD6 -_08132E06: - ldr r0, _08132E14 @ =c2_exit_to_overworld_2_switch - bl SetMainCallback2 - b _08132FD6 - .align 2, 0 -_08132E10: .4byte gPaletteFade -_08132E14: .4byte c2_exit_to_overworld_2_switch -_08132E18: - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r5, _08132E74 @ =gUnknown_030007B0 - ldr r1, [r5] - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - bl sub_8132FEC - bl sub_8133800 - ldr r0, [r5] - movs r4, 0xB1 - lsls r4, 2 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _08132E4E - movs r0, 0x1 - bl sub_8133030 -_08132E4E: - ldr r0, [r5] - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x1 - bne _08132E66 - ldr r0, _08132E78 @ =gSprites - adds r0, 0x64 - movs r1, 0x48 - strh r1, [r0] - movs r0, 0x1 - bl sub_8133140 -_08132E66: - ldr r0, [r5] - adds r0, r4 - ldrb r0, [r0] - movs r1, 0x1 - bl sub_8133AEC - b _08132FD6 - .align 2, 0 -_08132E74: .4byte gUnknown_030007B0 -_08132E78: .4byte gSprites -_08132E7C: - ldr r0, _08132E9C @ =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08132E8A - b _08132FD6 -_08132E8A: - ldr r1, [r7] - ldr r0, _08132EA0 @ =0x000002c6 - adds r2, r1, r0 - ldrb r0, [r2] - cmp r0, 0x4 - bne _08132EA4 - movs r0, 0x18 - b _08132FD4 - .align 2, 0 -_08132E9C: .4byte gPaletteFade -_08132EA0: .4byte 0x000002c6 -_08132EA4: - ldr r4, _08132F38 @ =0x000002c5 - adds r0, r1, r4 - ldrb r0, [r0] - movs r6, 0x64 - muls r0, r6 - ldr r5, _08132F3C @ =gPlayerParty - adds r0, r5 - ldrb r1, [r2] - adds r1, 0xD - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - ldr r2, _08132F40 @ =gStringVar3 - movs r1, 0xD - mov r9, r1 - mov r1, r9 - muls r1, r0 - ldr r0, _08132F44 @ =gMoveNames - mov r8, r0 - add r1, r8 - adds r0, r2, 0 - bl StringCopy - ldr r1, [r7] - adds r0, r1, r4 - ldrb r0, [r0] - muls r0, r6 - adds r0, r5 - ldr r2, _08132F48 @ =0x000002c6 - adds r1, r2 - ldrb r1, [r1] - bl RemoveMonPPBonus - ldr r3, [r7] - adds r4, r3, r4 - ldrb r0, [r4] - muls r0, r6 - adds r0, r5 - ldrb r2, [r3, 0x1B] - lsls r2, 1 - adds r1, r3, 0 - adds r1, 0x20 - adds r1, r2 - ldrh r1, [r1] - ldr r2, _08132F48 @ =0x000002c6 - adds r3, r2 - ldrb r2, [r3] - bl SetMonMoveSlot - ldr r0, _08132F4C @ =gStringVar2 - ldr r1, [r7] - ldrb r2, [r1, 0x1B] - lsls r2, 1 - adds r1, 0x20 - adds r1, r2 - ldrh r1, [r1] - mov r2, r9 - muls r2, r1 - adds r1, r2, 0 - add r1, r8 - bl StringCopy - ldr r0, _08132F50 @ =gOtherText_ForgotMove123 - bl sub_81328E8 - ldr r1, [r7] - movs r0, 0x1E - strb r0, [r1] - ldr r1, _08132F54 @ =gSpecialVar_0x8004 - movs r0, 0x1 - strh r0, [r1] - b _08132FD6 - .align 2, 0 -_08132F38: .4byte 0x000002c5 -_08132F3C: .4byte gPlayerParty -_08132F40: .4byte gStringVar3 -_08132F44: .4byte gMoveNames -_08132F48: .4byte 0x000002c6 -_08132F4C: .4byte gStringVar2 -_08132F50: .4byte gOtherText_ForgotMove123 -_08132F54: .4byte gSpecialVar_0x8004 -_08132F58: - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - beq _08132FD6 - ldr r0, _08132F78 @ =gOtherText_ForgotOrDidNotLearnMove - bl sub_81328E8 - ldr r0, _08132F7C @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0x1F - strb r0, [r1] - ldr r0, _08132F80 @ =0x0000016f - bl PlayFanfare - b _08132FD6 - .align 2, 0 -_08132F78: .4byte gOtherText_ForgotOrDidNotLearnMove -_08132F7C: .4byte gUnknown_030007B0 -_08132F80: .4byte 0x0000016f -_08132F84: - bl MenuUpdateWindowText - lsls r0, 24 - cmp r0, 0 - beq _08132FD6 - ldr r0, _08132F9C @ =0x0000016f - bl PlayFanfare - ldr r0, _08132FA0 @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0x20 - b _08132FD4 - .align 2, 0 -_08132F9C: .4byte 0x0000016f -_08132FA0: .4byte gUnknown_030007B0 -_08132FA4: - bl IsFanfareTaskInactive - lsls r0, 24 - cmp r0, 0 - beq _08132FD6 - ldr r0, _08132FB8 @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0x21 - b _08132FD4 - .align 2, 0 -_08132FB8: .4byte gUnknown_030007B0 -_08132FBC: - ldr r0, _08132FE4 @ =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08132FD6 - movs r0, 0x5 - bl PlaySE -_08132FCE: - ldr r0, _08132FE8 @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0xE -_08132FD4: - strb r0, [r1] -_08132FD6: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08132FE4: .4byte gMain -_08132FE8: .4byte gUnknown_030007B0 - thumb_func_end sub_8132908 - - thumb_func_start sub_8132FEC -sub_8132FEC: @ 8132FEC - push {r4-r6,lr} - ldr r0, _08133024 @ =gWindowConfig_81E7240 - bl BasicInitMenuWindow - movs r5, 0 - ldr r4, _08133028 @ =gUnknown_08402CF8 - adds r6, r4, 0 -_08132FFA: - lsls r3, r5, 2 - ldrb r0, [r4] - adds r1, r6, 0x1 - adds r1, r3, r1 - ldrb r1, [r1] - adds r2, r6, 0x2 - adds r3, r2 - ldrb r2, [r3] - ldrb r3, [r4, 0x3] - bl MenuDrawTextWindow - adds r4, 0x4 - adds r5, 0x1 - cmp r5, 0x3 - bls _08132FFA - ldr r0, _0813302C @ =gWindowConfig_81E6CE4 - bl BasicInitMenuWindow - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_08133024: .4byte gWindowConfig_81E7240 -_08133028: .4byte gUnknown_08402CF8 -_0813302C: .4byte gWindowConfig_81E6CE4 - thumb_func_end sub_8132FEC - - thumb_func_start sub_8133030 -sub_8133030: @ 8133030 - push {r4-r7,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r7, r0, 24 - ldr r4, _081330D4 @ =gSprites - ldr r5, _081330D8 @ =gUnknown_030007B0 - ldr r0, [r5] - ldrb r0, [r0, 0x3] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - adds r1, 0x3E - ldrb r3, [r1] - movs r2, 0x5 - negs r2, r2 - adds r0, r2, 0 - ands r0, r3 - strb r0, [r1] - ldr r0, [r5] - ldrb r1, [r0, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r0, 0x3E - ldrb r1, [r0] - ands r2, r1 - strb r2, [r0] - movs r2, 0 - ldr r6, _081330DC @ =gUnknown_08402D08 - movs r3, 0x4 -_08133070: - ldr r0, [r5] - adds r0, r2 - ldrb r1, [r0, 0x7] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r0, 0x3E - ldrb r1, [r0] - orrs r1, r3 - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0xF - ble _08133070 - ldr r0, [r6] - cmp r0, 0 - beq _081330B4 - ldr r5, _081330E0 @ =gTileBuffer - adds r4, r6, 0 -_08133096: - ldr r1, [r4] - adds r0, r5, 0 - movs r2, 0x40 - movs r3, 0x2 - bl sub_8072C74 - ldrb r1, [r4, 0x4] - ldrb r2, [r4, 0x5] - adds r0, r5, 0 - bl MenuPrint - adds r4, 0x8 - ldr r0, [r4] - cmp r0, 0 - bne _08133096 -_081330B4: - cmp r7, 0 - bne _081330CC - ldr r0, _081330E4 @ =gOtherText_TeachWhichMove - movs r1, 0x20 - str r1, [sp] - movs r1, 0x1 - str r1, [sp, 0x4] - movs r1, 0x18 - movs r2, 0x78 - movs r3, 0xC0 - bl sub_8072AB0 -_081330CC: - add sp, 0x8 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_081330D4: .4byte gSprites -_081330D8: .4byte gUnknown_030007B0 -_081330DC: .4byte gUnknown_08402D08 -_081330E0: .4byte gTileBuffer -_081330E4: .4byte gOtherText_TeachWhichMove - thumb_func_end sub_8133030 - - thumb_func_start sub_81330E8 -sub_81330E8: @ 81330E8 - push {r4,lr} - ldr r0, _08133134 @ =gMain - ldrh r2, [r0, 0x2E] - movs r1, 0x30 - ands r1, r2 - negs r0, r1 - orrs r0, r1 - lsrs r4, r0, 31 - ldr r0, _08133138 @ =gSaveBlock2 - ldrb r0, [r0, 0x13] - cmp r0, 0x1 - bne _0813310C - movs r0, 0xC0 - lsls r0, 2 - ands r0, r2 - cmp r0, 0 - beq _0813310C - adds r4, 0x1 -_0813310C: - cmp r4, 0 - beq _0813312A - movs r0, 0x5 - bl PlaySE - ldr r2, _0813313C @ =gUnknown_030007B0 - ldr r1, [r2] - movs r0, 0x5 - strb r0, [r1] - ldr r0, [r2] - movs r1, 0xB1 - lsls r1, 2 - adds r0, r1 - movs r1, 0x1 - strb r1, [r0] -_0813312A: - adds r0, r4, 0 - pop {r4} - pop {r1} - bx r1 - .align 2, 0 -_08133134: .4byte gMain -_08133138: .4byte gSaveBlock2 -_0813313C: .4byte gUnknown_030007B0 - thumb_func_end sub_81330E8 - - thumb_func_start sub_8133140 -sub_8133140: @ 8133140 - 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 - str r0, [sp, 0x8] - ldr r4, _08133234 @ =gSprites - ldr r5, _08133238 @ =gUnknown_030007B0 - ldr r0, [r5] - ldrb r0, [r0, 0x3] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - adds r1, 0x3E - ldrb r2, [r1] - movs r3, 0x5 - negs r3, r3 - adds r0, r3, 0 - ands r0, r2 - strb r0, [r1] - ldr r0, [r5] - ldrb r1, [r0, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r0, 0x3E - ldrb r2, [r0] - adds r1, r3, 0 - ands r1, r2 - strb r1, [r0] - movs r6, 0 - ldr r7, _0813323C @ =gUnknown_08402D08 -_0813318A: - ldr r0, [r5] - adds r0, r6 - ldrb r0, [r0, 0x7] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - adds r1, 0x3E - ldrb r2, [r1] - adds r0, r3, 0 - ands r0, r2 - strb r0, [r1] - adds r6, 0x1 - cmp r6, 0xF - ble _0813318A - movs r6, 0 - ldr r0, [r7] - cmp r0, 0 - beq _08133208 - mov r9, r7 - mov r10, r6 - movs r0, 0x24 - add r0, r9 - mov r8, r0 -_081331BA: - mov r0, r9 - adds r0, 0x20 - add r0, r10 - ldr r1, [r0] - ldr r0, _08133240 @ =gTileBuffer - movs r2, 0x40 - movs r3, 0x2 - bl sub_8072C74 - mov r0, r8 - ldrb r5, [r0] - ldrb r4, [r0, 0x1] - ldr r0, _08133240 @ =gTileBuffer - adds r1, r5, 0 - adds r2, r4, 0 - bl MenuPrint - cmp r6, 0 - beq _081331F8 - adds r1, r4, 0x2 - lsls r1, 24 - lsrs r1, 24 - adds r2, r5, 0x7 - lsls r2, 24 - lsrs r2, 24 - adds r3, r4, 0x3 - lsls r3, 24 - lsrs r3, 24 - adds r0, r5, 0 - bl MenuZeroFillWindowRect -_081331F8: - movs r0, 0x8 - add r10, r0 - add r8, r0 - adds r7, 0x8 - adds r6, 0x1 - ldr r0, [r7] - cmp r0, 0 - bne _081331BA -_08133208: - ldr r0, [sp, 0x8] - cmp r0, 0 - bne _08133222 - ldr r0, _08133244 @ =gOtherText_TeachWhichMove - movs r1, 0x20 - str r1, [sp] - movs r1, 0x1 - str r1, [sp, 0x4] - movs r1, 0x18 - movs r2, 0x78 - movs r3, 0xC0 - bl sub_8072AB0 -_08133222: - 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 -_08133234: .4byte gSprites -_08133238: .4byte gUnknown_030007B0 -_0813323C: .4byte gUnknown_08402D08 -_08133240: .4byte gTileBuffer -_08133244: .4byte gOtherText_TeachWhichMove - thumb_func_end sub_8133140 - - thumb_func_start sub_8133248 -sub_8133248: @ 8133248 - push {r4,lr} - ldr r0, _08133294 @ =gMain - ldrh r2, [r0, 0x2E] - movs r1, 0x30 - ands r1, r2 - negs r0, r1 - orrs r0, r1 - lsrs r4, r0, 31 - ldr r0, _08133298 @ =gSaveBlock2 - ldrb r0, [r0, 0x13] - cmp r0, 0x1 - bne _0813326C - movs r0, 0xC0 - lsls r0, 2 - ands r0, r2 - cmp r0, 0 - beq _0813326C - adds r4, 0x1 -_0813326C: - cmp r4, 0 - beq _0813328A - movs r0, 0x5 - bl PlaySE - ldr r2, _0813329C @ =gUnknown_030007B0 - ldr r1, [r2] - movs r3, 0 - movs r0, 0x3 - strb r0, [r1] - ldr r0, [r2] - movs r1, 0xB1 - lsls r1, 2 - adds r0, r1 - strb r3, [r0] -_0813328A: - adds r0, r4, 0 - pop {r4} - pop {r1} - bx r1 - .align 2, 0 -_08133294: .4byte gMain -_08133298: .4byte gSaveBlock2 -_0813329C: .4byte gUnknown_030007B0 - thumb_func_end sub_8133248 - - thumb_func_start sub_81332A0 -sub_81332A0: @ 81332A0 - push {r4,lr} - ldr r2, _081332F8 @ =gUnknown_030007B0 - ldr r0, [r2] - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - strb r1, [r0, 0x2] - ldr r0, [r2] - strb r1, [r0, 0x19] - ldr r0, [r2] - strb r1, [r0, 0x18] - ldr r0, [r2] - strb r1, [r0, 0x1C] - ldr r0, [r2] - strb r1, [r0, 0x1A] - ldr r0, [r2] - strb r1, [r0, 0x1B] - ldr r0, [r2] - strb r1, [r0, 0x1D] - ldr r0, [r2] - strb r1, [r0, 0x1E] - ldr r0, [r2] - ldr r3, _081332FC @ =0x000002c3 - adds r0, r3 - strb r1, [r0] - ldr r0, [r2] - adds r3, 0x1 - adds r0, r3 - strb r1, [r0] - movs r3, 0 - adds r4, r2, 0 - movs r2, 0 -_081332E0: - ldr r0, [r4] - lsls r1, r3, 1 - adds r0, 0x20 - adds r0, r1 - strh r2, [r0] - adds r3, 0x1 - cmp r3, 0x13 - ble _081332E0 - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_081332F8: .4byte gUnknown_030007B0 -_081332FC: .4byte 0x000002c3 - thumb_func_end sub_81332A0 - - thumb_func_start sub_8133300 -sub_8133300: @ 8133300 - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x30 - ldrsh r0, [r4, r1] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 1 - movs r0, 0xFF - ands r1, r0 - movs r2, 0x2E - ldrsh r0, [r4, r2] - cmp r0, 0x1 - beq _08133324 - cmp r0, 0x1 - ble _0813334A - cmp r0, 0x2 - beq _08133338 - b _0813334A -_08133324: - adds r0, r1, 0 - movs r1, 0x3 - bl Sin - ldrh r1, [r4, 0x32] - adds r2, r0, 0 - muls r2, r1 - adds r0, r2, 0 - strh r0, [r4, 0x24] - b _0813334A -_08133338: - adds r0, r1, 0 - movs r1, 0x1 - bl Sin - ldrh r1, [r4, 0x32] - adds r2, r0, 0 - muls r2, r1 - adds r0, r2, 0 - strh r0, [r4, 0x26] -_0813334A: - ldrh r0, [r4, 0x30] - adds r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8133300 - - thumb_func_start sub_8133358 -sub_8133358: @ 8133358 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - ldr r6, _0813353C @ =gSpriteTemplate_8402D90 - adds r0, r6, 0 - movs r1, 0x8 - movs r2, 0x10 - movs r3, 0 - bl CreateSprite - ldr r4, _08133540 @ =gUnknown_030007B0 - ldr r1, [r4] - strb r0, [r1, 0x3] - ldr r5, _08133544 @ =gSprites - ldr r2, [r4] - ldrb r1, [r2, 0x3] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r1, 0x1 - mov r8, r1 - mov r1, r8 - strh r1, [r0, 0x2E] - ldrb r1, [r2, 0x3] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - ldr r1, _08133548 @ =0x0000ffff - strh r1, [r0, 0x32] - adds r0, r6, 0 - movs r1, 0x48 - movs r2, 0x10 - movs r3, 0 - bl CreateSprite - ldr r1, [r4] - strb r0, [r1, 0x4] - ldr r0, [r4] - ldrb r1, [r0, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r1, 0x1 - bl StartSpriteAnim - ldr r2, [r4] - ldrb r1, [r2, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - mov r1, r8 - strh r1, [r0, 0x2E] - ldrb r1, [r2, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - mov r1, r8 - strh r1, [r0, 0x32] - ldr r0, _0813354C @ =gSpriteTemplate_8402DC0 - mov r9, r0 - movs r1, 0xA0 - movs r2, 0x4 - movs r3, 0 - bl CreateSprite - ldr r1, [r4] - strb r0, [r1, 0x5] - ldr r0, [r4] - ldrb r1, [r0, 0x5] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r1, 0x1 - bl StartSpriteAnim - ldr r2, [r4] - ldrb r1, [r2, 0x5] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r6, 0x2 - strh r6, [r0, 0x2E] - ldrb r1, [r2, 0x5] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r1, 0x1 - negs r1, r1 - strh r1, [r0, 0x32] - mov r0, r9 - movs r1, 0xA0 - movs r2, 0x3C - movs r3, 0 - bl CreateSprite - ldr r1, [r4] - strb r0, [r1, 0x6] - ldr r2, [r4] - ldrb r1, [r2, 0x6] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - strh r6, [r0, 0x2E] - ldrb r1, [r2, 0x6] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - mov r1, r8 - strh r1, [r0, 0x32] - movs r5, 0 - ldr r6, _08133550 @ =gSpriteTemplate_8402E08 -_0813344E: - adds r2, r5, 0 - cmp r5, 0 - bge _08133456 - adds r2, r5, 0x3 -_08133456: - asrs r2, 2 - lsls r1, r2, 2 - subs r1, r5, r1 - lsls r1, 19 - movs r0, 0xE0 - lsls r0, 13 - adds r1, r0 - asrs r1, 16 - lsls r2, 19 - movs r0, 0xD0 - lsls r0, 14 - adds r2, r0 - asrs r2, 16 - adds r0, r6, 0 - movs r3, 0 - bl CreateSprite - ldr r1, [r4] - adds r2, r5, 0x4 - adds r1, 0x3 - adds r1, r2 - strb r0, [r1] - ldr r0, [r4] - adds r0, 0x3 - adds r0, r2 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, _08133544 @ =gSprites - adds r0, r1 - movs r1, 0x2 - bl StartSpriteAnim - adds r5, 0x1 - cmp r5, 0x7 - ble _0813344E - movs r5, 0 - ldr r7, _08133550 @ =gSpriteTemplate_8402E08 - ldr r6, _08133540 @ =gUnknown_030007B0 -_081334A6: - adds r2, r5, 0 - cmp r5, 0 - bge _081334AE - adds r2, r5, 0x3 -_081334AE: - asrs r2, 2 - lsls r1, r2, 2 - subs r1, r5, r1 - lsls r1, 19 - movs r0, 0xE0 - lsls r0, 13 - adds r1, r0 - asrs r1, 16 - lsls r2, 19 - movs r0, 0xB8 - lsls r0, 15 - adds r2, r0 - asrs r2, 16 - adds r0, r7, 0 - movs r3, 0 - bl CreateSprite - ldr r1, [r6] - adds r2, r5, 0 - adds r2, 0xC - adds r1, 0x3 - adds r1, r2 - strb r0, [r1] - ldr r0, [r6] - adds r0, 0x3 - adds r0, r2 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r4, _08133544 @ =gSprites - adds r0, r4 - movs r1, 0x2 - bl StartSpriteAnim - adds r5, 0x1 - cmp r5, 0x7 - ble _081334A6 - movs r5, 0 - ldr r3, _08133540 @ =gUnknown_030007B0 - movs r2, 0x4 -_08133500: - ldr r0, [r3] - adds r0, 0x3 - adds r0, r5 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r0, 0x3E - ldrb r1, [r0] - orrs r1, r2 - strb r1, [r0] - adds r5, 0x1 - cmp r5, 0x13 - ble _08133500 - ldr r1, _08133548 @ =0x0000ffff - ldr r3, _08133554 @ =0x00002d9f - movs r0, 0x12 - str r0, [sp] - movs r0, 0x10 - movs r2, 0xC - bl CreateBlendedOutlineCursor - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_0813353C: .4byte gSpriteTemplate_8402D90 -_08133540: .4byte gUnknown_030007B0 -_08133544: .4byte gSprites -_08133548: .4byte 0x0000ffff -_0813354C: .4byte gSpriteTemplate_8402DC0 -_08133550: .4byte gSpriteTemplate_8402E08 -_08133554: .4byte 0x00002d9f - thumb_func_end sub_8133358 - - thumb_func_start sub_8133558 -sub_8133558: @ 8133558 - push {r4-r6,lr} - sub sp, 0xC - ldr r5, _081335F4 @ =gUnknown_030007B0 - ldr r1, [r5] - ldr r2, _081335F8 @ =0x000002c5 - adds r0, r1, r2 - ldrb r2, [r0] - movs r0, 0x64 - muls r0, r2 - ldr r2, _081335FC @ =gPlayerParty - adds r0, r2 - adds r1, 0x20 - bl sub_80403CC - ldr r1, [r5] - strb r0, [r1, 0x1A] - movs r4, 0 - ldr r0, [r5] - ldrb r0, [r0, 0x1A] - cmp r4, r0 - bge _081335AA - adds r6, r5, 0 - movs r5, 0x52 -_08133586: - lsls r2, r4, 1 - ldr r1, [r6] - adds r0, r1, r5 - adds r1, 0x20 - adds r1, r2 - ldrh r2, [r1] - movs r1, 0xD - muls r1, r2 - ldr r2, _08133600 @ =gMoveNames - adds r1, r2 - bl StringCopy - adds r5, 0x19 - adds r4, 0x1 - ldr r0, [r6] - ldrb r0, [r0, 0x1A] - cmp r4, r0 - blt _08133586 -_081335AA: - ldr r4, _081335F4 @ =gUnknown_030007B0 - ldr r0, [r4] - ldr r1, _081335F8 @ =0x000002c5 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, _081335FC @ =gPlayerParty - adds r0, r1 - movs r1, 0x2 - mov r2, sp - bl GetMonData - ldr r0, _08133604 @ =gStringVar1 - mov r1, sp - bl StringCopy10 - ldr r0, [r4] - ldrb r2, [r0, 0x1A] - lsls r1, r2, 1 - adds r1, r2 - lsls r1, 3 - adds r1, r2 - adds r1, 0x52 - adds r0, r1 - ldr r1, _08133608 @ =gUnknownText_Exit - bl StringCopy - ldr r1, [r4] - ldrb r0, [r1, 0x1A] - adds r0, 0x1 - strb r0, [r1, 0x1A] - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_081335F4: .4byte gUnknown_030007B0 -_081335F8: .4byte 0x000002c5 -_081335FC: .4byte gPlayerParty -_08133600: .4byte gMoveNames -_08133604: .4byte gStringVar1 -_08133608: .4byte gUnknownText_Exit - thumb_func_end sub_8133558 - - thumb_func_start sub_813360C -sub_813360C: @ 813360C - lsls r0, 24 - ldr r3, _08133628 @ =gUnknown_030007B0 - ldr r2, [r3] - ldrb r1, [r2, 0x18] - strb r1, [r2, 0x1C] - ldr r1, [r3] - lsrs r0, 24 - ldrb r2, [r1, 0x18] - adds r0, r2 - strb r0, [r1, 0x18] - ldr r1, [r3] - movs r0, 0x1 - strb r0, [r1, 0x1D] - bx lr - .align 2, 0 -_08133628: .4byte gUnknown_030007B0 - thumb_func_end sub_813360C - - thumb_func_start sub_813362C -sub_813362C: @ 813362C - push {r4,r5,lr} - ldr r2, _08133670 @ =gMain - ldrh r1, [r2, 0x30] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08133688 - ldr r4, _08133674 @ =gUnknown_030007B0 - ldr r0, [r4] - ldrb r0, [r0, 0x1B] - cmp r0, 0 - bne _08133646 - b _08133796 -_08133646: - movs r0, 0x5 - bl PlaySE - ldr r1, [r4] - ldrb r0, [r1, 0x1B] - subs r0, 0x1 - strb r0, [r1, 0x1B] - ldr r0, [r4] - ldr r1, _08133678 @ =0x000002c3 - adds r0, r1 - movs r1, 0x1 - strb r1, [r0] - ldr r1, [r4] - ldrb r0, [r1, 0x18] - cmp r0, 0 - beq _0813367C - movs r0, 0x1 - negs r0, r0 - bl sub_813360C - b _08133796 - .align 2, 0 -_08133670: .4byte gMain -_08133674: .4byte gUnknown_030007B0 -_08133678: .4byte 0x000002c3 -_0813367C: - ldrb r0, [r1, 0x19] - cmp r0, 0 - bne _08133684 - b _08133796 -_08133684: - subs r0, 0x1 - b _081336DC -_08133688: - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _081336E8 - ldr r4, _081336C8 @ =gUnknown_030007B0 - ldr r0, [r4] - ldrb r1, [r0, 0x1B] - ldrb r0, [r0, 0x1A] - subs r0, 0x1 - cmp r1, r0 - blt _081336A0 - b _08133796 -_081336A0: - movs r0, 0x5 - bl PlaySE - ldr r1, [r4] - ldrb r0, [r1, 0x1B] - adds r0, 0x1 - strb r0, [r1, 0x1B] - ldr r0, [r4] - ldr r3, _081336CC @ =0x000002c3 - adds r0, r3 - movs r1, 0x1 - strb r1, [r0] - ldr r1, [r4] - ldrb r0, [r1, 0x18] - cmp r0, 0x2 - beq _081336D0 - movs r0, 0x1 - bl sub_813360C - b _08133796 - .align 2, 0 -_081336C8: .4byte gUnknown_030007B0 -_081336CC: .4byte 0x000002c3 -_081336D0: - ldrb r2, [r1, 0x19] - ldrb r0, [r1, 0x1A] - subs r0, 0x3 - cmp r2, r0 - beq _08133796 - adds r0, r2, 0x1 -_081336DC: - strb r0, [r1, 0x19] - ldr r1, [r4] - ldrb r0, [r1, 0x1E] - adds r0, 0x1 - strb r0, [r1, 0x1E] - b _08133796 -_081336E8: - ldrh r1, [r2, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0813376C - movs r0, 0x5 - bl PlaySE - ldr r5, _08133738 @ =gUnknown_030007B0 - ldr r2, [r5] - ldrb r1, [r2, 0x1B] - ldrb r0, [r2, 0x1A] - subs r0, 0x1 - cmp r1, r0 - beq _08133748 - movs r0, 0x8 - strb r0, [r2] - ldr r0, _0813373C @ =gStringVar2 - ldr r1, [r5] - ldrb r3, [r1, 0x1B] - lsls r2, r3, 1 - adds r2, r3 - lsls r2, 3 - adds r2, r3 - adds r2, 0x52 - adds r1, r2 - bl StringCopy - ldr r4, _08133740 @ =gStringVar4 - ldr r1, _08133744 @ =gOtherText_TeachSpecificMove - adds r0, r4, 0 - bl StringExpandPlaceholders - adds r0, r4, 0 - movs r1, 0x3 - movs r2, 0xF - bl MenuPrintMessage - b _08133796 - .align 2, 0 -_08133738: .4byte gUnknown_030007B0 -_0813373C: .4byte gStringVar2 -_08133740: .4byte gStringVar4 -_08133744: .4byte gOtherText_TeachSpecificMove -_08133748: - ldr r4, _08133764 @ =gStringVar4 - ldr r1, _08133768 @ =gOtherText_GiveUpTeachingMove - adds r0, r4, 0 - bl StringExpandPlaceholders - adds r0, r4, 0 - movs r1, 0x3 - movs r2, 0xF - bl MenuPrintMessage - ldr r1, [r5] - movs r0, 0xC - strb r0, [r1] - b _08133796 - .align 2, 0 -_08133764: .4byte gStringVar4 -_08133768: .4byte gOtherText_GiveUpTeachingMove -_0813376C: - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08133796 - movs r0, 0x5 - bl PlaySE - ldr r0, _081337D4 @ =gUnknown_030007B0 - ldr r1, [r0] - movs r0, 0xC - strb r0, [r1] - ldr r4, _081337D8 @ =gStringVar4 - ldr r1, _081337DC @ =gOtherText_GiveUpTeachingMove - adds r0, r4, 0 - bl StringExpandPlaceholders - adds r0, r4, 0 - movs r1, 0x3 - movs r2, 0xF - bl MenuPrintMessage -_08133796: - ldr r0, _081337D4 @ =gUnknown_030007B0 - ldr r4, [r0] - ldrb r0, [r4, 0x1A] - cmp r0, 0x3 - bls _081337F8 - ldr r3, _081337E0 @ =gSprites - adds r5, r3, 0 - adds r5, 0xC6 - ldrb r0, [r5] - movs r1, 0x5 - negs r1, r1 - adds r2, r1, 0 - ands r2, r0 - strb r2, [r5] - movs r0, 0x85 - lsls r0, 1 - adds r0, r3 - mov r12, r0 - ldrb r0, [r0] - adds r3, r1, 0 - ands r3, r0 - mov r1, r12 - strb r3, [r1] - ldrb r0, [r4, 0x19] - cmp r0, 0 - bne _081337E4 - movs r1, 0x4 - adds r0, r2, 0 - orrs r0, r1 - strb r0, [r5] - b _081337F8 - .align 2, 0 -_081337D4: .4byte gUnknown_030007B0 -_081337D8: .4byte gStringVar4 -_081337DC: .4byte gOtherText_GiveUpTeachingMove -_081337E0: .4byte gSprites -_081337E4: - ldrb r1, [r4, 0x19] - ldrb r0, [r4, 0x1A] - subs r0, 0x3 - cmp r1, r0 - bne _081337F8 - movs r1, 0x4 - adds r0, r3, 0 - orrs r0, r1 - mov r3, r12 - strb r0, [r3] -_081337F8: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_813362C - - thumb_func_start sub_8133800 -sub_8133800: @ 8133800 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r1, _08133834 @ =gUnknown_030007B0 - ldr r0, [r1] - ldrb r6, [r0, 0x19] - ldr r3, _08133838 @ =gTileBuffer - mov r10, r1 - ldr r0, _0813383C @ =gBattleMoves - mov r9, r0 - movs r1, 0x2 - mov r8, r1 -_0813381C: - mov r4, r10 - ldr r2, [r4] - ldrb r0, [r2, 0x1A] - cmp r6, r0 - bcc _08133844 - adds r0, r3, 0 - ldr r1, _08133840 @ =gEmptyString_81E72B0 - movs r2, 0x90 - movs r3, 0 - bl sub_8072C74 - b _081338FA - .align 2, 0 -_08133834: .4byte gUnknown_030007B0 -_08133838: .4byte gTileBuffer -_0813383C: .4byte gBattleMoves -_08133840: .4byte gEmptyString_81E72B0 -_08133844: - ldrb r0, [r2, 0x1A] - subs r0, 0x1 - cmp r6, r0 - bne _08133860 - adds r0, r3, 0 - ldr r1, _0813385C @ =gUnknownText_Exit - movs r2, 0x90 - movs r3, 0 - bl sub_8072C74 - b _081338FA - .align 2, 0 -_0813385C: .4byte gUnknownText_Exit -_08133860: - lsls r1, r6, 1 - adds r0, r2, 0 - adds r0, 0x20 - adds r0, r1 - ldrh r5, [r0] - movs r4, 0xB1 - lsls r4, 2 - adds r0, r2, r4 - ldrb r0, [r0] - adds r7, r1, 0 - cmp r0, 0 - beq _081338A4 - ldr r1, _0813389C @ =gContestMoves - lsls r0, r5, 3 - adds r0, r1 - ldrb r0, [r0, 0x1] - lsls r0, 29 - lsrs r0, 27 - ldr r1, _081338A0 @ =gUnknown_083CAF70 - adds r0, r1 - ldr r1, [r0] - adds r0, r3, 0 - movs r2, 0x27 - movs r3, 0 - bl sub_8072C74 - adds r3, r0, 0 - lsls r4, r5, 1 - b _081338C2 - .align 2, 0 -_0813389C: .4byte gContestMoves -_081338A0: .4byte gUnknown_083CAF70 -_081338A4: - lsls r4, r5, 1 - adds r0, r4, r5 - lsls r0, 2 - add r0, r9 - ldrb r0, [r0, 0x2] - lsls r1, r0, 3 - subs r1, r0 - ldr r0, _08133938 @ =gTypeNames - adds r1, r0 - adds r0, r3, 0 - movs r2, 0x27 - movs r3, 0 - bl sub_8072C74 - adds r3, r0, 0 -_081338C2: - adds r0, r7, r6 - lsls r0, 3 - adds r0, r6 - adds r0, 0x52 - mov r2, r10 - ldr r1, [r2] - adds r1, r0 - adds r0, r3, 0 - movs r2, 0x72 - movs r3, 0 - bl sub_8072C74 - adds r3, r0, 0 - movs r0, 0xCA - strb r0, [r3] - strb r0, [r3, 0x1] - movs r0, 0xBA - strb r0, [r3, 0x2] - adds r3, 0x3 - adds r0, r4, r5 - lsls r0, 2 - add r0, r9 - ldrb r1, [r0, 0x4] - adds r0, r3, 0 - movs r2, 0x90 - movs r3, 0 - bl sub_8072C14 -_081338FA: - adds r3, r0, 0 - movs r0, 0xFE - strb r0, [r3] - adds r3, 0x1 - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - movs r4, 0x1 - negs r4, r4 - add r8, r4 - mov r0, r8 - cmp r0, 0 - blt _08133916 - b _0813381C -_08133916: - movs r0, 0xFF - strb r0, [r3] - ldr r0, _0813393C @ =gTileBuffer - movs r1, 0xB - movs r2, 0x1 - bl MenuPrint - movs r0, 0 - bl sub_813360C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08133938: .4byte gTypeNames -_0813393C: .4byte gTileBuffer - thumb_func_end sub_8133800 - - thumb_func_start sub_8133940 -sub_8133940: @ 8133940 - push {r4-r7,lr} - sub sp, 0x34 - adds r4, r1, 0 - lsls r0, 16 - lsrs r5, r0, 16 - ldr r1, _08133968 @ =gExpandedPlaceholder_Empty - mov r0, sp - bl StringCopy - ldrb r0, [r4, 0x2] - subs r0, 0x1 - cmp r0, 0x6 - bls _0813395C - b _08133AE2 -_0813395C: - lsls r0, 2 - ldr r1, _0813396C @ =_08133970 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .align 2, 0 -_08133968: .4byte gExpandedPlaceholder_Empty -_0813396C: .4byte _08133970 - .align 2, 0 -_08133970: - .4byte _08133AE2 - .4byte _0813398C - .4byte _08133AE2 - .4byte _081339A4 - .4byte _08133AE2 - .4byte _081339E4 - .4byte _08133A64 -_0813398C: - ldr r0, _081339A0 @ =gBattleMoves - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0x1 - bls _081339B4 - ldrb r1, [r1, 0x1] - b _081339CE - .align 2, 0 -_081339A0: .4byte gBattleMoves -_081339A4: - ldr r0, _081339C4 @ =gBattleMoves - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x3] - cmp r0, 0 - bne _081339CC -_081339B4: - ldr r1, _081339C8 @ =gOtherText_ThreeDashes2 - mov r0, sp - movs r2, 0x20 - movs r3, 0x2 - bl sub_8072C74 - b _081339D8 - .align 2, 0 -_081339C4: .4byte gBattleMoves -_081339C8: .4byte gOtherText_ThreeDashes2 -_081339CC: - ldrb r1, [r1, 0x3] -_081339CE: - mov r0, sp - movs r2, 0x20 - movs r3, 0x2 - bl sub_8072C14 -_081339D8: - ldrb r1, [r4] - ldrb r2, [r4, 0x1] - mov r0, sp - bl MenuPrint - b _08133AE2 -_081339E4: - ldrb r2, [r4] - ldrb r1, [r4, 0x1] - adds r3, r1, 0x1 - lsls r3, 24 - lsrs r3, 24 - adds r0, r2, 0 - bl MenuZeroFillWindowRect - ldr r2, _08133A34 @ =gContestEffects - ldr r1, _08133A38 @ =gContestMoves - lsls r0, r5, 3 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - movs r1, 0xA - bl __udivsi3 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0xFF - bne _08133A14 - movs r5, 0 -_08133A14: - movs r4, 0 - ldr r7, _08133A3C @ =gUnknown_030007B0 - ldr r6, _08133A40 @ =gSprites -_08133A1A: - cmp r4, r5 - bcs _08133A44 - ldr r0, [r7] - adds r0, r4 - ldrb r1, [r0, 0x7] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - movs r1, 0x1 - bl StartSpriteAnim - b _08133A58 - .align 2, 0 -_08133A34: .4byte gContestEffects -_08133A38: .4byte gContestMoves -_08133A3C: .4byte gUnknown_030007B0 -_08133A40: .4byte gSprites -_08133A44: - ldr r0, [r7] - adds r0, r4 - ldrb r1, [r0, 0x7] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - movs r1, 0 - bl StartSpriteAnim -_08133A58: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x7 - bls _08133A1A - b _08133AE2 -_08133A64: - ldrb r2, [r4] - ldrb r1, [r4, 0x1] - adds r3, r1, 0x1 - lsls r3, 24 - lsrs r3, 24 - adds r0, r2, 0 - bl MenuZeroFillWindowRect - ldr r2, _08133AB4 @ =gContestEffects - ldr r1, _08133AB8 @ =gContestMoves - lsls r0, r5, 3 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x2] - movs r1, 0xA - bl __udivsi3 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0xFF - bne _08133A94 - movs r5, 0 -_08133A94: - movs r4, 0 - ldr r7, _08133ABC @ =gUnknown_030007B0 - ldr r6, _08133AC0 @ =gSprites -_08133A9A: - cmp r4, r5 - bcs _08133AC4 - ldr r0, [r7] - adds r0, r4 - ldrb r1, [r0, 0xF] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - movs r1, 0x3 - bl StartSpriteAnim - b _08133AD8 - .align 2, 0 -_08133AB4: .4byte gContestEffects -_08133AB8: .4byte gContestMoves -_08133ABC: .4byte gUnknown_030007B0 -_08133AC0: .4byte gSprites -_08133AC4: - ldr r0, [r7] - adds r0, r4 - ldrb r1, [r0, 0xF] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - movs r1, 0x2 - bl StartSpriteAnim -_08133AD8: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x7 - bls _08133A9A -_08133AE2: - add sp, 0x34 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8133940 - - thumb_func_start sub_8133AEC -sub_8133AEC: @ 8133AEC - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x8 - lsls r0, 24 - lsrs r3, r0, 24 - ldr r6, _08133B88 @ =gUnknown_030007B0 - ldr r2, [r6] - ldrb r1, [r2, 0x1B] - ldrb r0, [r2, 0x1A] - subs r0, 0x1 - cmp r1, r0 - bne _08133B08 - b _08133C04 -_08133B08: - lsls r1, 1 - adds r0, r2, 0 - adds r0, 0x20 - adds r0, r1 - ldrh r5, [r0] - cmp r3, 0 - beq _08133BA0 - movs r4, 0 - lsls r0, r5, 3 - mov r8, r0 - ldr r7, _08133B8C @ =gSprites - adds r3, r6, 0 - movs r6, 0x5 - negs r6, r6 -_08133B24: - ldr r0, [r3] - adds r0, r4 - ldrb r0, [r0, 0x7] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r7 - adds r1, 0x3E - ldrb r2, [r1] - adds r0, r6, 0 - ands r0, r2 - strb r0, [r1] - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0xF - bls _08133B24 - movs r4, 0 -_08133B48: - ldr r0, _08133B90 @ =gUnknown_08402E3D - adds r0, r4, r0 - ldrb r0, [r0] - lsls r1, r0, 1 - adds r1, r0 - ldr r0, _08133B94 @ =gUnknown_08402E24 - adds r1, r0 - adds r0, r5, 0 - bl sub_8133940 - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0x2 - bls _08133B48 - ldr r1, _08133B98 @ =gUnknown_083CADD4 - ldr r0, _08133B9C @ =gContestMoves - add r0, r8 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x20 - str r1, [sp] - movs r1, 0x1 - str r1, [sp, 0x4] - movs r1, 0x58 - movs r2, 0x48 - movs r3, 0x90 - bl sub_8072AB0 - b _08133C92 - .align 2, 0 -_08133B88: .4byte gUnknown_030007B0 -_08133B8C: .4byte gSprites -_08133B90: .4byte gUnknown_08402E3D -_08133B94: .4byte gUnknown_08402E24 -_08133B98: .4byte gUnknown_083CADD4 -_08133B9C: .4byte gContestMoves -_08133BA0: - movs r4, 0 - subs r6, r5, 0x1 -_08133BA4: - ldr r0, _08133BF8 @ =gUnknown_08402E39 - adds r0, r4, r0 - ldrb r0, [r0] - lsls r1, r0, 1 - adds r1, r0 - ldr r0, _08133BFC @ =gUnknown_08402E24 - adds r1, r0 - adds r0, r5, 0 - bl sub_8133940 - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0x3 - bls _08133BA4 - ldr r1, _08133C00 @ =gMoveDescriptions - lsls r0, r6, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x1 - str r1, [sp] - movs r1, 0x58 - movs r2, 0x48 - movs r3, 0x90 - bl sub_8072A18 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bhi _08133C92 - lsls r1, r0, 25 - movs r0, 0x90 - lsls r0, 20 - adds r1, r0 - lsrs r1, 24 - movs r0, 0xB - movs r2, 0x1C - movs r3, 0xC - bl MenuFillWindowRectWithBlankTile - b _08133C92 - .align 2, 0 -_08133BF8: .4byte gUnknown_08402E39 -_08133BFC: .4byte gUnknown_08402E24 -_08133C00: .4byte gMoveDescriptions -_08133C04: - cmp r3, 0 - beq _08133C5C - ldr r4, _08133C54 @ =gUnknown_08402E24 - ldrb r2, [r4, 0xF] - ldrb r1, [r4, 0x10] - adds r3, r1, 0x1 - lsls r3, 24 - lsrs r3, 24 - adds r0, r2, 0 - bl MenuZeroFillWindowRect - ldrb r2, [r4, 0x12] - ldrb r1, [r4, 0x13] - adds r3, r1, 0x1 - lsls r3, 24 - lsrs r3, 24 - adds r0, r2, 0 - bl MenuZeroFillWindowRect - movs r4, 0 - ldr r5, _08133C58 @ =gSprites - adds r3, r6, 0 - movs r2, 0x4 -_08133C32: - ldr r0, [r3] - adds r0, r4 - ldrb r1, [r0, 0x7] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - adds r0, 0x3E - ldrb r1, [r0] - orrs r1, r2 - strb r1, [r0] - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0xF - bls _08133C32 - b _08133C86 - .align 2, 0 -_08133C54: .4byte gUnknown_08402E24 -_08133C58: .4byte gSprites -_08133C5C: - ldr r4, _08133CA0 @ =gUnknown_08402E24 - ldrb r0, [r4, 0x3] - ldrb r1, [r4, 0x4] - adds r2, r0, 0x3 - lsls r2, 24 - lsrs r2, 24 - adds r3, r1, 0x1 - lsls r3, 24 - lsrs r3, 24 - bl MenuZeroFillWindowRect - ldrb r0, [r4, 0x9] - ldrb r1, [r4, 0xA] - adds r2, r0, 0x3 - lsls r2, 24 - lsrs r2, 24 - adds r3, r1, 0x1 - lsls r3, 24 - lsrs r3, 24 - bl MenuZeroFillWindowRect -_08133C86: - movs r0, 0xB - movs r1, 0x9 - movs r2, 0x1C - movs r3, 0xC - bl MenuZeroFillWindowRect -_08133C92: - add sp, 0x8 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08133CA0: .4byte gUnknown_08402E24 - thumb_func_end sub_8133AEC - - thumb_func_start sub_8133CA4 -sub_8133CA4: @ 8133CA4 - push {lr} - movs r0, 0x15 - movs r1, 0x7 - movs r2, 0x1B - movs r3, 0xC - bl MenuZeroFillWindowRect - ldr r0, _08133CC8 @ =gUnknown_030007B0 - ldr r0, [r0] - movs r1, 0xB1 - lsls r1, 2 - adds r0, r1 - ldrb r0, [r0] - movs r1, 0 - bl sub_8133AEC - pop {r0} - bx r0 - .align 2, 0 -_08133CC8: .4byte gUnknown_030007B0 - thumb_func_end sub_8133CA4 - - thumb_func_start SetUpFieldMove_SoftBoiled -SetUpFieldMove_SoftBoiled: @ 8133CCC - push {r4-r6,lr} - mov r6, r8 - push {r6} - ldr r0, _08133D14 @ =gLastFieldPokeMenuOpened - mov r8, r0 - ldrb r0, [r0] - movs r6, 0x64 - muls r0, r6 - ldr r4, _08133D18 @ =gPlayerParty - adds r0, r4 - movs r1, 0x3A - bl GetMonData - adds r5, r0, 0 - lsls r5, 16 - lsrs r5, 16 - mov r1, r8 - ldrb r0, [r1] - muls r0, r6 - adds r0, r4 - movs r1, 0x39 - bl GetMonData - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r5, 0 - movs r1, 0x5 - bl __udivsi3 - lsls r0, 16 - lsrs r0, 16 - cmp r4, r0 - bcs _08133D1C - movs r0, 0 - b _08133D1E - .align 2, 0 -_08133D14: .4byte gLastFieldPokeMenuOpened -_08133D18: .4byte gPlayerParty -_08133D1C: - movs r0, 0x1 -_08133D1E: - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end SetUpFieldMove_SoftBoiled - - thumb_func_start sub_8133D28 -sub_8133D28: @ 8133D28 - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r1, _08133D44 @ =0x02001000 - ldr r2, _08133D48 @ =sub_8133D50 - str r2, [r1, 0xC] - ldr r2, _08133D4C @ =0x0001a272 - adds r1, r2 - movs r2, 0x3 - strh r2, [r1] - bl sub_808A004 - pop {r0} - bx r0 - .align 2, 0 -_08133D44: .4byte 0x02001000 -_08133D48: .4byte sub_8133D50 -_08133D4C: .4byte 0x0001a272 - thumb_func_end sub_8133D28 - - thumb_func_start sub_8133D50 -sub_8133D50: @ 8133D50 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 24 - lsrs r7, r0, 24 - ldr r0, _08133DA0 @ =gSprites - mov r9, r0 - ldr r1, _08133DA4 @ =0x02001000 - mov r10, r1 - ldrb r1, [r1, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - add r0, r9 - ldrh r0, [r0, 0x2E] - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - mov r2, r10 - ldrb r1, [r2, 0x2] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - mov r2, r9 - adds r1, r0, r2 - ldrh r0, [r1, 0x2E] - lsls r0, 24 - lsrs r6, r0, 24 - mov r0, r8 - cmp r0, 0x5 - bhi _08133D96 - cmp r6, 0x5 - bls _08133DA8 -_08133D96: - adds r0, r7, 0 - bl sub_806CD44 - b _08133E4E - .align 2, 0 -_08133DA0: .4byte gSprites -_08133DA4: .4byte 0x02001000 -_08133DA8: - movs r5, 0xD8 - lsls r5, 9 - add r5, r10 - movs r2, 0x2E - ldrsh r0, [r1, r2] - movs r1, 0x64 - muls r0, r1 - ldr r2, _08133DE4 @ =gPlayerParty - adds r0, r2 - str r0, [r5] - movs r1, 0x39 - bl GetMonData - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0 - beq _08133DDA - cmp r8, r6 - beq _08133DDA - ldr r0, [r5] - movs r1, 0x3A - bl GetMonData - cmp r0, r4 - bne _08133DE8 -_08133DDA: - adds r0, r7, 0 - bl sub_8133EB8 - b _08133E4E - .align 2, 0 -_08133DE4: .4byte gPlayerParty -_08133DE8: - movs r0, 0x1 - bl PlaySE - mov r0, r10 - ldrb r1, [r0, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - add r0, r9 - ldrh r0, [r0, 0x2E] - movs r1, 0 - strb r0, [r5, 0x5] - ldrb r0, [r5, 0x5] - movs r2, 0x64 - muls r0, r2 - ldr r2, _08133E5C @ =gPlayerParty - adds r0, r2 - str r0, [r5] - strh r1, [r5, 0x6] - ldr r1, _08133E60 @ =0xffff8000 - str r1, [r5, 0xC] - ldr r1, _08133E64 @ =sub_8133EF8 - str r1, [r5, 0x10] - movs r1, 0x3A - bl GetMonData - ldr r1, _08133E68 @ =gTasks - lsls r4, r7, 2 - adds r4, r7 - lsls r4, 3 - adds r4, r1 - strh r0, [r4, 0x1C] - ldr r0, [r5] - movs r1, 0x39 - bl GetMonData - strh r0, [r4, 0x1E] - movs r1, 0x1C - ldrsh r0, [r4, r1] - movs r1, 0x5 - bl __divsi3 - strh r0, [r4, 0x20] - bl sub_806D5A4 - ldr r0, _08133E6C @ =sub_806FA18 - str r0, [r4] - ldrh r1, [r4, 0x1E] - ldr r0, _08133E70 @ =0x0001a282 - add r0, r10 - strh r1, [r0] -_08133E4E: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_08133E5C: .4byte gPlayerParty -_08133E60: .4byte 0xffff8000 -_08133E64: .4byte sub_8133EF8 -_08133E68: .4byte gTasks -_08133E6C: .4byte sub_806FA18 -_08133E70: .4byte 0x0001a282 - thumb_func_end sub_8133D50 - - thumb_func_start sub_8133E74 -sub_8133E74: @ 8133E74 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, _08133EAC @ =gUnknown_0202E8F6 - ldrb r0, [r0] - cmp r0, 0 - bne _08133EA4 - movs r0, 0x3 - movs r1, 0xE - movs r2, 0x1A - movs r3, 0x13 - bl MenuZeroFillWindowRect - movs r0, 0x3 - movs r1, 0 - bl sub_806D538 - ldr r0, _08133EB0 @ =gTasks - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 3 - adds r1, r0 - ldr r0, _08133EB4 @ =sub_806CB74 - str r0, [r1] -_08133EA4: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08133EAC: .4byte gUnknown_0202E8F6 -_08133EB0: .4byte gTasks -_08133EB4: .4byte sub_806CB74 - thumb_func_end sub_8133E74 - - thumb_func_start sub_8133EB8 -sub_8133EB8: @ 8133EB8 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r1, _08133EE8 @ =gUnknown_0202E8F4 - movs r0, 0 - strb r0, [r1] - bl sub_806D5A4 - ldr r0, _08133EEC @ =gOtherText_CantUseOnPoke - movs r1, 0x1 - bl sub_806E834 - ldr r1, _08133EF0 @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, _08133EF4 @ =sub_8133E74 - str r1, [r0] - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08133EE8: .4byte gUnknown_0202E8F4 -_08133EEC: .4byte gOtherText_CantUseOnPoke -_08133EF0: .4byte gTasks -_08133EF4: .4byte sub_8133E74 - thumb_func_end sub_8133EB8 - - thumb_func_start sub_8133EF8 -sub_8133EF8: @ 8133EF8 - push {r4,lr} - bl sub_806CCE4 - ldr r4, _08133F3C @ =0x0201b000 - ldr r0, _08133F40 @ =0x00000261 - adds r1, r4, r0 - movs r0, 0x2 - strb r0, [r1] - ldr r0, _08133F44 @ =0xfffe6000 - adds r4, r0 - ldrb r1, [r4, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, _08133F48 @ =gSprites - adds r0, r1 - bl DestroySprite - movs r0, 0x3 - movs r1, 0xE - movs r2, 0x1A - movs r3, 0x13 - bl MenuZeroFillWindowRect - movs r0, 0 - movs r1, 0 - bl sub_806D538 - ldrb r0, [r4] - bl SwitchTaskToFollowupFunc - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_08133F3C: .4byte 0x0201b000 -_08133F40: .4byte 0x00000261 -_08133F44: .4byte 0xfffe6000 -_08133F48: .4byte gSprites - thumb_func_end sub_8133EF8 - - thumb_func_start sub_8133F4C -sub_8133F4C: @ 8133F4C - push {r4,r5,lr} - lsls r0, 24 - movs r3, 0 - ldr r1, _08133F7C @ =gDecorationInventories - lsrs r2, r0, 21 - adds r0, r2, r1 - ldrb r0, [r0, 0x4] - cmp r3, r0 - bcs _08133F76 - adds r5, r1, 0 - movs r4, 0 -_08133F62: - adds r0, r2, r5 - ldr r1, [r0] - adds r1, r3 - strb r4, [r1] - adds r1, r3, 0x1 - lsls r1, 24 - lsrs r3, r1, 24 - ldrb r0, [r0, 0x4] - cmp r3, r0 - bcc _08133F62 -_08133F76: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_08133F7C: .4byte gDecorationInventories - thumb_func_end sub_8133F4C - - thumb_func_start sub_8133F80 -sub_8133F80: @ 8133F80 - push {r4,lr} - movs r4, 0 -_08133F84: - adds r0, r4, 0 - bl sub_8133F4C - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x7 - bls _08133F84 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8133F80 - - thumb_func_start sub_8133F9C -sub_8133F9C: @ 8133F9C - push {r4,lr} - lsls r0, 24 - movs r2, 0 - ldr r1, _08133FC8 @ =gDecorationInventories - lsrs r0, 21 - adds r0, r1 - movs r1, 0x4 - ldrsb r1, [r0, r1] - cmp r2, r1 - bge _08133FD8 - adds r4, r0, 0 - adds r3, r1, 0 -_08133FB4: - lsls r0, r2, 24 - asrs r1, r0, 24 - ldr r0, [r4] - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _08133FCC - adds r0, r1, 0 - b _08133FDC - .align 2, 0 -_08133FC8: .4byte gDecorationInventories -_08133FCC: - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - asrs r0, 24 - cmp r0, r3 - blt _08133FB4 -_08133FD8: - movs r0, 0x1 - negs r0, r0 -_08133FDC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8133F9C - - thumb_func_start sub_8133FE4 -sub_8133FE4: @ 8133FE4 - push {r4,lr} - lsls r0, 24 - lsrs r3, r0, 24 - ldr r1, _08134010 @ =gDecorations - lsls r0, r3, 5 - adds r0, r1 - ldrb r0, [r0, 0x13] - movs r2, 0 - ldr r1, _08134014 @ =gDecorationInventories - lsls r0, 3 - adds r0, r1 - ldrb r1, [r0, 0x4] - cmp r2, r1 - bcs _08134022 - ldr r4, [r0] -_08134002: - adds r0, r4, r2 - ldrb r0, [r0] - cmp r0, r3 - bne _08134018 - movs r0, 0x1 - b _08134024 - .align 2, 0 -_08134010: .4byte gDecorations -_08134014: .4byte gDecorationInventories -_08134018: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, r1 - bcc _08134002 -_08134022: - movs r0, 0 -_08134024: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8133FE4 - - thumb_func_start IsThereStorageSpaceForDecoration -IsThereStorageSpaceForDecoration: @ 813402C - push {r4,r5,lr} - lsls r0, 24 - lsrs r0, 24 - adds r4, r0, 0 - cmp r4, 0 - beq _0813406C - ldr r1, _08134064 @ =gDecorations - lsls r0, r4, 5 - adds r0, r1 - ldrb r5, [r0, 0x13] - adds r0, r5, 0 - bl sub_8133F9C - lsls r0, 24 - asrs r2, r0, 24 - movs r0, 0x1 - negs r0, r0 - cmp r2, r0 - beq _0813406C - ldr r0, _08134068 @ =gDecorationInventories - lsls r1, r5, 3 - adds r1, r0 - ldr r0, [r1] - adds r0, r2 - strb r4, [r0] - movs r0, 0x1 - b _0813406E - .align 2, 0 -_08134064: .4byte gDecorations -_08134068: .4byte gDecorationInventories -_0813406C: - movs r0, 0 -_0813406E: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end IsThereStorageSpaceForDecoration - - thumb_func_start sub_8134074 -sub_8134074: @ 8134074 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _081340A0 - ldr r1, _0813409C @ =gDecorations - lsls r0, 5 - adds r0, r1 - ldrb r0, [r0, 0x13] - bl sub_8133F9C - lsls r0, 24 - asrs r0, 24 - movs r1, 0x1 - negs r1, r1 - cmp r0, r1 - beq _081340A0 - movs r0, 0x1 - b _081340A2 - .align 2, 0 -_0813409C: .4byte gDecorations -_081340A0: - movs r0, 0 -_081340A2: - pop {r1} - bx r1 - thumb_func_end sub_8134074 - - thumb_func_start sub_81340A8 -sub_81340A8: @ 81340A8 - push {r4-r6,lr} - lsls r0, 24 - lsrs r5, r0, 24 - movs r3, 0 - cmp r5, 0 - bne _081340C4 - b _081340F2 -_081340B6: - movs r0, 0 - strb r0, [r1] - adds r0, r6, 0 - bl sub_8134104 - movs r0, 0x1 - b _081340F4 -_081340C4: - ldr r2, _081340FC @ =gDecorationInventories - ldr r1, _08134100 @ =gDecorations - lsls r0, r5, 5 - adds r0, r1 - ldrb r4, [r0, 0x13] - lsls r0, r4, 3 - adds r0, r2 - ldrb r1, [r0, 0x4] - cmp r3, r1 - bcs _081340F2 - adds r6, r4, 0 - adds r4, r0, 0 - adds r2, r1, 0 -_081340DE: - ldr r0, [r4] - adds r1, r0, r3 - ldrb r0, [r1] - cmp r0, r5 - beq _081340B6 - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, r2 - bcc _081340DE -_081340F2: - movs r0, 0 -_081340F4: - pop {r4-r6} - pop {r1} - bx r1 - .align 2, 0 -_081340FC: .4byte gDecorationInventories -_08134100: .4byte gDecorations - thumb_func_end sub_81340A8 - - thumb_func_start sub_8134104 -sub_8134104: @ 8134104 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - lsls r0, 24 - movs r6, 0 - ldr r2, _08134190 @ =gDecorationInventories - lsrs r1, r0, 21 - adds r0, r1, r2 - ldrb r0, [r0, 0x4] - cmp r6, r0 - bcs _08134180 - adds r7, r1, 0 - mov r8, r0 - str r0, [sp] -_08134126: - adds r1, r6, 0x1 - lsls r0, r1, 24 - lsrs r3, r0, 24 - adds r2, r7, 0 - mov r12, r1 - cmp r3, r8 - bcs _08134174 - ldr r1, _08134190 @ =gDecorationInventories - mov r10, r1 - adds r0, r1, 0 - mov r9, r0 -_0813413C: - mov r1, r10 - adds r5, r2, r1 - ldr r1, [r5] - adds r0, r1, r3 - ldrb r4, [r0] - adds r2, r4, 0 - cmp r2, 0 - beq _08134162 - adds r0, r1, r6 - ldrb r1, [r0] - cmp r1, 0 - beq _08134158 - cmp r1, r2 - bls _08134162 -_08134158: - ldrb r1, [r0] - strb r4, [r0] - ldr r0, [r5] - adds r0, r3 - strb r1, [r0] -_08134162: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - adds r2, r7, 0 - mov r1, r9 - adds r0, r2, r1 - ldrb r0, [r0, 0x4] - cmp r3, r0 - bcc _0813413C -_08134174: - mov r1, r12 - lsls r0, r1, 24 - lsrs r6, r0, 24 - ldr r0, [sp] - cmp r6, r0 - bcc _08134126 -_08134180: - 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 -_08134190: .4byte gDecorationInventories - thumb_func_end sub_8134104 - - thumb_func_start sub_8134194 -sub_8134194: @ 8134194 - push {r4,r5,lr} - lsls r0, 24 - movs r4, 0 - movs r3, 0 - ldr r2, _081341D0 @ =gDecorationInventories - lsrs r1, r0, 21 - adds r0, r1, r2 - ldrb r0, [r0, 0x4] - cmp r4, r0 - bcs _081341C8 - adds r5, r2, 0 -_081341AA: - adds r2, r1, r5 - ldr r0, [r2] - adds r0, r3 - ldrb r0, [r0] - cmp r0, 0 - beq _081341BC - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 -_081341BC: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - ldrb r2, [r2, 0x4] - cmp r3, r2 - bcc _081341AA -_081341C8: - adds r0, r4, 0 - pop {r4,r5} - pop {r1} - bx r1 - .align 2, 0 -_081341D0: .4byte gDecorationInventories - thumb_func_end sub_8134194 - - thumb_func_start sub_81341D4 -sub_81341D4: @ 81341D4 - push {r4,r5,lr} - movs r5, 0 - movs r4, 0 -_081341DA: - adds r0, r4, 0 - bl sub_8134194 - adds r0, r5, r0 - lsls r0, 24 - lsrs r5, r0, 24 - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x7 - bls _081341DA - adds r0, r5, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_81341D4 - .align 2, 0 @ Don't pad with nop. diff --git a/asm/decoration_inventory.s b/asm/decoration_inventory.s new file mode 100644 index 000000000..e44c1abf2 --- /dev/null +++ b/asm/decoration_inventory.s @@ -0,0 +1,404 @@ + .include "constants/gba_constants.inc" + .include "constants/species_constants.inc" + .include "asm/macros.inc" + + .syntax unified + + .text + + thumb_func_start sub_8133F4C +sub_8133F4C: @ 8133F4C + push {r4,r5,lr} + lsls r0, 24 + movs r3, 0 + ldr r1, _08133F7C @ =gDecorationInventories + lsrs r2, r0, 21 + adds r0, r2, r1 + ldrb r0, [r0, 0x4] + cmp r3, r0 + bcs _08133F76 + adds r5, r1, 0 + movs r4, 0 +_08133F62: + adds r0, r2, r5 + ldr r1, [r0] + adds r1, r3 + strb r4, [r1] + adds r1, r3, 0x1 + lsls r1, 24 + lsrs r3, r1, 24 + ldrb r0, [r0, 0x4] + cmp r3, r0 + bcc _08133F62 +_08133F76: + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_08133F7C: .4byte gDecorationInventories + thumb_func_end sub_8133F4C + + thumb_func_start sub_8133F80 +sub_8133F80: @ 8133F80 + push {r4,lr} + movs r4, 0 +_08133F84: + adds r0, r4, 0 + bl sub_8133F4C + adds r0, r4, 0x1 + lsls r0, 24 + lsrs r4, r0, 24 + cmp r4, 0x7 + bls _08133F84 + pop {r4} + pop {r0} + bx r0 + thumb_func_end sub_8133F80 + + thumb_func_start sub_8133F9C +sub_8133F9C: @ 8133F9C + push {r4,lr} + lsls r0, 24 + movs r2, 0 + ldr r1, _08133FC8 @ =gDecorationInventories + lsrs r0, 21 + adds r0, r1 + movs r1, 0x4 + ldrsb r1, [r0, r1] + cmp r2, r1 + bge _08133FD8 + adds r4, r0, 0 + adds r3, r1, 0 +_08133FB4: + lsls r0, r2, 24 + asrs r1, r0, 24 + ldr r0, [r4] + adds r0, r1 + ldrb r0, [r0] + cmp r0, 0 + bne _08133FCC + adds r0, r1, 0 + b _08133FDC + .align 2, 0 +_08133FC8: .4byte gDecorationInventories +_08133FCC: + adds r0, r1, 0x1 + lsls r0, 24 + lsrs r2, r0, 24 + asrs r0, 24 + cmp r0, r3 + blt _08133FB4 +_08133FD8: + movs r0, 0x1 + negs r0, r0 +_08133FDC: + pop {r4} + pop {r1} + bx r1 + thumb_func_end sub_8133F9C + + thumb_func_start sub_8133FE4 +sub_8133FE4: @ 8133FE4 + push {r4,lr} + lsls r0, 24 + lsrs r3, r0, 24 + ldr r1, _08134010 @ =gDecorations + lsls r0, r3, 5 + adds r0, r1 + ldrb r0, [r0, 0x13] + movs r2, 0 + ldr r1, _08134014 @ =gDecorationInventories + lsls r0, 3 + adds r0, r1 + ldrb r1, [r0, 0x4] + cmp r2, r1 + bcs _08134022 + ldr r4, [r0] +_08134002: + adds r0, r4, r2 + ldrb r0, [r0] + cmp r0, r3 + bne _08134018 + movs r0, 0x1 + b _08134024 + .align 2, 0 +_08134010: .4byte gDecorations +_08134014: .4byte gDecorationInventories +_08134018: + adds r0, r2, 0x1 + lsls r0, 24 + lsrs r2, r0, 24 + cmp r2, r1 + bcc _08134002 +_08134022: + movs r0, 0 +_08134024: + pop {r4} + pop {r1} + bx r1 + thumb_func_end sub_8133FE4 + + thumb_func_start IsThereStorageSpaceForDecoration +IsThereStorageSpaceForDecoration: @ 813402C + push {r4,r5,lr} + lsls r0, 24 + lsrs r0, 24 + adds r4, r0, 0 + cmp r4, 0 + beq _0813406C + ldr r1, _08134064 @ =gDecorations + lsls r0, r4, 5 + adds r0, r1 + ldrb r5, [r0, 0x13] + adds r0, r5, 0 + bl sub_8133F9C + lsls r0, 24 + asrs r2, r0, 24 + movs r0, 0x1 + negs r0, r0 + cmp r2, r0 + beq _0813406C + ldr r0, _08134068 @ =gDecorationInventories + lsls r1, r5, 3 + adds r1, r0 + ldr r0, [r1] + adds r0, r2 + strb r4, [r0] + movs r0, 0x1 + b _0813406E + .align 2, 0 +_08134064: .4byte gDecorations +_08134068: .4byte gDecorationInventories +_0813406C: + movs r0, 0 +_0813406E: + pop {r4,r5} + pop {r1} + bx r1 + thumb_func_end IsThereStorageSpaceForDecoration + + thumb_func_start sub_8134074 +sub_8134074: @ 8134074 + push {lr} + lsls r0, 24 + lsrs r0, 24 + cmp r0, 0 + beq _081340A0 + ldr r1, _0813409C @ =gDecorations + lsls r0, 5 + adds r0, r1 + ldrb r0, [r0, 0x13] + bl sub_8133F9C + lsls r0, 24 + asrs r0, 24 + movs r1, 0x1 + negs r1, r1 + cmp r0, r1 + beq _081340A0 + movs r0, 0x1 + b _081340A2 + .align 2, 0 +_0813409C: .4byte gDecorations +_081340A0: + movs r0, 0 +_081340A2: + pop {r1} + bx r1 + thumb_func_end sub_8134074 + + thumb_func_start sub_81340A8 +sub_81340A8: @ 81340A8 + push {r4-r6,lr} + lsls r0, 24 + lsrs r5, r0, 24 + movs r3, 0 + cmp r5, 0 + bne _081340C4 + b _081340F2 +_081340B6: + movs r0, 0 + strb r0, [r1] + adds r0, r6, 0 + bl sub_8134104 + movs r0, 0x1 + b _081340F4 +_081340C4: + ldr r2, _081340FC @ =gDecorationInventories + ldr r1, _08134100 @ =gDecorations + lsls r0, r5, 5 + adds r0, r1 + ldrb r4, [r0, 0x13] + lsls r0, r4, 3 + adds r0, r2 + ldrb r1, [r0, 0x4] + cmp r3, r1 + bcs _081340F2 + adds r6, r4, 0 + adds r4, r0, 0 + adds r2, r1, 0 +_081340DE: + ldr r0, [r4] + adds r1, r0, r3 + ldrb r0, [r1] + cmp r0, r5 + beq _081340B6 + adds r0, r3, 0x1 + lsls r0, 24 + lsrs r3, r0, 24 + cmp r3, r2 + bcc _081340DE +_081340F2: + movs r0, 0 +_081340F4: + pop {r4-r6} + pop {r1} + bx r1 + .align 2, 0 +_081340FC: .4byte gDecorationInventories +_08134100: .4byte gDecorations + thumb_func_end sub_81340A8 + + thumb_func_start sub_8134104 +sub_8134104: @ 8134104 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + sub sp, 0x4 + lsls r0, 24 + movs r6, 0 + ldr r2, _08134190 @ =gDecorationInventories + lsrs r1, r0, 21 + adds r0, r1, r2 + ldrb r0, [r0, 0x4] + cmp r6, r0 + bcs _08134180 + adds r7, r1, 0 + mov r8, r0 + str r0, [sp] +_08134126: + adds r1, r6, 0x1 + lsls r0, r1, 24 + lsrs r3, r0, 24 + adds r2, r7, 0 + mov r12, r1 + cmp r3, r8 + bcs _08134174 + ldr r1, _08134190 @ =gDecorationInventories + mov r10, r1 + adds r0, r1, 0 + mov r9, r0 +_0813413C: + mov r1, r10 + adds r5, r2, r1 + ldr r1, [r5] + adds r0, r1, r3 + ldrb r4, [r0] + adds r2, r4, 0 + cmp r2, 0 + beq _08134162 + adds r0, r1, r6 + ldrb r1, [r0] + cmp r1, 0 + beq _08134158 + cmp r1, r2 + bls _08134162 +_08134158: + ldrb r1, [r0] + strb r4, [r0] + ldr r0, [r5] + adds r0, r3 + strb r1, [r0] +_08134162: + adds r0, r3, 0x1 + lsls r0, 24 + lsrs r3, r0, 24 + adds r2, r7, 0 + mov r1, r9 + adds r0, r2, r1 + ldrb r0, [r0, 0x4] + cmp r3, r0 + bcc _0813413C +_08134174: + mov r1, r12 + lsls r0, r1, 24 + lsrs r6, r0, 24 + ldr r0, [sp] + cmp r6, r0 + bcc _08134126 +_08134180: + 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 +_08134190: .4byte gDecorationInventories + thumb_func_end sub_8134104 + + thumb_func_start sub_8134194 +sub_8134194: @ 8134194 + push {r4,r5,lr} + lsls r0, 24 + movs r4, 0 + movs r3, 0 + ldr r2, _081341D0 @ =gDecorationInventories + lsrs r1, r0, 21 + adds r0, r1, r2 + ldrb r0, [r0, 0x4] + cmp r4, r0 + bcs _081341C8 + adds r5, r2, 0 +_081341AA: + adds r2, r1, r5 + ldr r0, [r2] + adds r0, r3 + ldrb r0, [r0] + cmp r0, 0 + beq _081341BC + adds r0, r4, 0x1 + lsls r0, 24 + lsrs r4, r0, 24 +_081341BC: + adds r0, r3, 0x1 + lsls r0, 24 + lsrs r3, r0, 24 + ldrb r2, [r2, 0x4] + cmp r3, r2 + bcc _081341AA +_081341C8: + adds r0, r4, 0 + pop {r4,r5} + pop {r1} + bx r1 + .align 2, 0 +_081341D0: .4byte gDecorationInventories + thumb_func_end sub_8134194 + + thumb_func_start sub_81341D4 +sub_81341D4: @ 81341D4 + push {r4,r5,lr} + movs r5, 0 + movs r4, 0 +_081341DA: + adds r0, r4, 0 + bl sub_8134194 + adds r0, r5, r0 + lsls r0, 24 + lsrs r5, r0, 24 + adds r0, r4, 0x1 + lsls r0, 24 + lsrs r4, r0, 24 + cmp r4, 0x7 + bls _081341DA + adds r0, r5, 0 + pop {r4,r5} + pop {r1} + bx r1 + thumb_func_end sub_81341D4 + + .align 2, 0 @ Don't pad with nop. diff --git a/asm/fldeff_softboiled.s b/asm/fldeff_softboiled.s new file mode 100644 index 000000000..dc863129c --- /dev/null +++ b/asm/fldeff_softboiled.s @@ -0,0 +1,318 @@ + .include "constants/gba_constants.inc" + .include "constants/species_constants.inc" + .include "asm/macros.inc" + + .syntax unified + + .text + + thumb_func_start SetUpFieldMove_SoftBoiled +SetUpFieldMove_SoftBoiled: @ 8133CCC + push {r4-r6,lr} + mov r6, r8 + push {r6} + ldr r0, _08133D14 @ =gLastFieldPokeMenuOpened + mov r8, r0 + ldrb r0, [r0] + movs r6, 0x64 + muls r0, r6 + ldr r4, _08133D18 @ =gPlayerParty + adds r0, r4 + movs r1, 0x3A + bl GetMonData + adds r5, r0, 0 + lsls r5, 16 + lsrs r5, 16 + mov r1, r8 + ldrb r0, [r1] + muls r0, r6 + adds r0, r4 + movs r1, 0x39 + bl GetMonData + adds r4, r0, 0 + lsls r4, 16 + lsrs r4, 16 + adds r0, r5, 0 + movs r1, 0x5 + bl __udivsi3 + lsls r0, 16 + lsrs r0, 16 + cmp r4, r0 + bcs _08133D1C + movs r0, 0 + b _08133D1E + .align 2, 0 +_08133D14: .4byte gLastFieldPokeMenuOpened +_08133D18: .4byte gPlayerParty +_08133D1C: + movs r0, 0x1 +_08133D1E: + pop {r3} + mov r8, r3 + pop {r4-r6} + pop {r1} + bx r1 + thumb_func_end SetUpFieldMove_SoftBoiled + + thumb_func_start sub_8133D28 +sub_8133D28: @ 8133D28 + push {lr} + lsls r0, 24 + lsrs r0, 24 + ldr r1, _08133D44 @ =0x02001000 + ldr r2, _08133D48 @ =sub_8133D50 + str r2, [r1, 0xC] + ldr r2, _08133D4C @ =0x0001a272 + adds r1, r2 + movs r2, 0x3 + strh r2, [r1] + bl sub_808A004 + pop {r0} + bx r0 + .align 2, 0 +_08133D44: .4byte 0x02001000 +_08133D48: .4byte sub_8133D50 +_08133D4C: .4byte 0x0001a272 + thumb_func_end sub_8133D28 + + thumb_func_start sub_8133D50 +sub_8133D50: @ 8133D50 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + lsls r0, 24 + lsrs r7, r0, 24 + ldr r0, _08133DA0 @ =gSprites + mov r9, r0 + ldr r1, _08133DA4 @ =0x02001000 + mov r10, r1 + ldrb r1, [r1, 0x1] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + add r0, r9 + ldrh r0, [r0, 0x2E] + lsls r0, 24 + lsrs r0, 24 + mov r8, r0 + mov r2, r10 + ldrb r1, [r2, 0x2] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + mov r2, r9 + adds r1, r0, r2 + ldrh r0, [r1, 0x2E] + lsls r0, 24 + lsrs r6, r0, 24 + mov r0, r8 + cmp r0, 0x5 + bhi _08133D96 + cmp r6, 0x5 + bls _08133DA8 +_08133D96: + adds r0, r7, 0 + bl sub_806CD44 + b _08133E4E + .align 2, 0 +_08133DA0: .4byte gSprites +_08133DA4: .4byte 0x02001000 +_08133DA8: + movs r5, 0xD8 + lsls r5, 9 + add r5, r10 + movs r2, 0x2E + ldrsh r0, [r1, r2] + movs r1, 0x64 + muls r0, r1 + ldr r2, _08133DE4 @ =gPlayerParty + adds r0, r2 + str r0, [r5] + movs r1, 0x39 + bl GetMonData + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, 0 + beq _08133DDA + cmp r8, r6 + beq _08133DDA + ldr r0, [r5] + movs r1, 0x3A + bl GetMonData + cmp r0, r4 + bne _08133DE8 +_08133DDA: + adds r0, r7, 0 + bl sub_8133EB8 + b _08133E4E + .align 2, 0 +_08133DE4: .4byte gPlayerParty +_08133DE8: + movs r0, 0x1 + bl PlaySE + mov r0, r10 + ldrb r1, [r0, 0x1] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + add r0, r9 + ldrh r0, [r0, 0x2E] + movs r1, 0 + strb r0, [r5, 0x5] + ldrb r0, [r5, 0x5] + movs r2, 0x64 + muls r0, r2 + ldr r2, _08133E5C @ =gPlayerParty + adds r0, r2 + str r0, [r5] + strh r1, [r5, 0x6] + ldr r1, _08133E60 @ =0xffff8000 + str r1, [r5, 0xC] + ldr r1, _08133E64 @ =sub_8133EF8 + str r1, [r5, 0x10] + movs r1, 0x3A + bl GetMonData + ldr r1, _08133E68 @ =gTasks + lsls r4, r7, 2 + adds r4, r7 + lsls r4, 3 + adds r4, r1 + strh r0, [r4, 0x1C] + ldr r0, [r5] + movs r1, 0x39 + bl GetMonData + strh r0, [r4, 0x1E] + movs r1, 0x1C + ldrsh r0, [r4, r1] + movs r1, 0x5 + bl __divsi3 + strh r0, [r4, 0x20] + bl sub_806D5A4 + ldr r0, _08133E6C @ =sub_806FA18 + str r0, [r4] + ldrh r1, [r4, 0x1E] + ldr r0, _08133E70 @ =0x0001a282 + add r0, r10 + strh r1, [r0] +_08133E4E: + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08133E5C: .4byte gPlayerParty +_08133E60: .4byte 0xffff8000 +_08133E64: .4byte sub_8133EF8 +_08133E68: .4byte gTasks +_08133E6C: .4byte sub_806FA18 +_08133E70: .4byte 0x0001a282 + thumb_func_end sub_8133D50 + + thumb_func_start sub_8133E74 +sub_8133E74: @ 8133E74 + push {r4,lr} + lsls r0, 24 + lsrs r4, r0, 24 + ldr r0, _08133EAC @ =gUnknown_0202E8F6 + ldrb r0, [r0] + cmp r0, 0 + bne _08133EA4 + movs r0, 0x3 + movs r1, 0xE + movs r2, 0x1A + movs r3, 0x13 + bl MenuZeroFillWindowRect + movs r0, 0x3 + movs r1, 0 + bl sub_806D538 + ldr r0, _08133EB0 @ =gTasks + lsls r1, r4, 2 + adds r1, r4 + lsls r1, 3 + adds r1, r0 + ldr r0, _08133EB4 @ =sub_806CB74 + str r0, [r1] +_08133EA4: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08133EAC: .4byte gUnknown_0202E8F6 +_08133EB0: .4byte gTasks +_08133EB4: .4byte sub_806CB74 + thumb_func_end sub_8133E74 + + thumb_func_start sub_8133EB8 +sub_8133EB8: @ 8133EB8 + push {r4,lr} + adds r4, r0, 0 + lsls r4, 24 + lsrs r4, 24 + ldr r1, _08133EE8 @ =gUnknown_0202E8F4 + movs r0, 0 + strb r0, [r1] + bl sub_806D5A4 + ldr r0, _08133EEC @ =gOtherText_CantUseOnPoke + movs r1, 0x1 + bl sub_806E834 + ldr r1, _08133EF0 @ =gTasks + lsls r0, r4, 2 + adds r0, r4 + lsls r0, 3 + adds r0, r1 + ldr r1, _08133EF4 @ =sub_8133E74 + str r1, [r0] + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08133EE8: .4byte gUnknown_0202E8F4 +_08133EEC: .4byte gOtherText_CantUseOnPoke +_08133EF0: .4byte gTasks +_08133EF4: .4byte sub_8133E74 + thumb_func_end sub_8133EB8 + + thumb_func_start sub_8133EF8 +sub_8133EF8: @ 8133EF8 + push {r4,lr} + bl sub_806CCE4 + ldr r4, _08133F3C @ =0x0201b000 + ldr r0, _08133F40 @ =0x00000261 + adds r1, r4, r0 + movs r0, 0x2 + strb r0, [r1] + ldr r0, _08133F44 @ =0xfffe6000 + adds r4, r0 + ldrb r1, [r4, 0x1] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + ldr r1, _08133F48 @ =gSprites + adds r0, r1 + bl DestroySprite + movs r0, 0x3 + movs r1, 0xE + movs r2, 0x1A + movs r3, 0x13 + bl MenuZeroFillWindowRect + movs r0, 0 + movs r1, 0 + bl sub_806D538 + ldrb r0, [r4] + bl SwitchTaskToFollowupFunc + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08133F3C: .4byte 0x0201b000 +_08133F40: .4byte 0x00000261 +_08133F44: .4byte 0xfffe6000 +_08133F48: .4byte gSprites + thumb_func_end sub_8133EF8 + + .align 2, 0 @ Don't pad with nop. diff --git a/asm/fldeff_sweetscent.s b/asm/fldeff_sweetscent.s new file mode 100644 index 000000000..6ac0fdb21 --- /dev/null +++ b/asm/fldeff_sweetscent.s @@ -0,0 +1,211 @@ + .include "constants/gba_constants.inc" + .include "constants/species_constants.inc" + .include "asm/macros.inc" + + .syntax unified + + .text + + thumb_func_start SetUpFieldMove_SweetScent +SetUpFieldMove_SweetScent: @ 812BFB4 + ldr r1, _0812BFC4 @ =gUnknown_0300485C + ldr r0, _0812BFC8 @ =sub_808AB90 + str r0, [r1] + ldr r1, _0812BFCC @ =gUnknown_03005CE4 + ldr r0, _0812BFD0 @ =sub_812BFD4 + str r0, [r1] + movs r0, 0x1 + bx lr + .align 2, 0 +_0812BFC4: .4byte gUnknown_0300485C +_0812BFC8: .4byte sub_808AB90 +_0812BFCC: .4byte gUnknown_03005CE4 +_0812BFD0: .4byte sub_812BFD4 + thumb_func_end SetUpFieldMove_SweetScent + + thumb_func_start sub_812BFD4 +sub_812BFD4: @ 812BFD4 + push {lr} + movs r0, 0x33 + bl FieldEffectStart + ldr r0, _0812BFE8 @ =gUnknown_0202FF84 + ldr r1, _0812BFEC @ =gLastFieldPokeMenuOpened + ldrb r1, [r1] + str r1, [r0] + pop {r0} + bx r0 + .align 2, 0 +_0812BFE8: .4byte gUnknown_0202FF84 +_0812BFEC: .4byte gLastFieldPokeMenuOpened + thumb_func_end sub_812BFD4 + + thumb_func_start FldEff_SweetScent +FldEff_SweetScent: @ 812BFF0 + push {lr} + bl oei_task_add + lsls r0, 24 + lsrs r0, 24 + ldr r2, _0812C014 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r1, r2 + ldr r2, _0812C018 @ =sub_812C01C + lsrs r0, r2, 16 + strh r0, [r1, 0x18] + strh r2, [r1, 0x1A] + movs r0, 0 + pop {r1} + bx r1 + .align 2, 0 +_0812C014: .4byte gTasks +_0812C018: .4byte sub_812C01C + thumb_func_end FldEff_SweetScent + + thumb_func_start sub_812C01C +sub_812C01C: @ 812C01C + push {lr} + sub sp, 0x4 + movs r0, 0xEC + bl PlaySE + bl GetPlayerAvatarObjectId + ldr r2, _0812C078 @ =gSprites + lsls r0, 24 + lsrs r0, 24 + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r2 + ldrb r1, [r1, 0x5] + lsrs r1, 4 + adds r1, 0x10 + movs r0, 0x1 + lsls r0, r1 + mvns r0, r0 + movs r1, 0x1F + str r1, [sp] + movs r1, 0x4 + movs r2, 0 + movs r3, 0x8 + bl BeginNormalPaletteFade + ldr r0, _0812C07C @ =sub_812C084 + movs r1, 0 + bl CreateTask + lsls r0, 24 + lsrs r0, 24 + ldr r2, _0812C080 @ =gTasks + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 3 + adds r1, r2 + movs r0, 0 + strh r0, [r1, 0x8] + movs r0, 0x33 + bl FieldEffectActiveListRemove + add sp, 0x4 + pop {r0} + bx r0 + .align 2, 0 +_0812C078: .4byte gSprites +_0812C07C: .4byte sub_812C084 +_0812C080: .4byte gTasks + thumb_func_end sub_812C01C + + thumb_func_start sub_812C084 +sub_812C084: @ 812C084 + push {r4,r5,lr} + sub sp, 0x4 + lsls r0, 24 + lsrs r5, r0, 24 + ldr r0, _0812C0C8 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + lsls r0, 24 + lsrs r2, r0, 24 + cmp r2, 0 + bne _0812C110 + ldr r0, _0812C0CC @ =gTasks + lsls r1, r5, 2 + adds r1, r5 + lsls r1, 3 + adds r4, r1, r0 + ldrh r1, [r4, 0x8] + movs r3, 0x8 + ldrsh r0, [r4, r3] + cmp r0, 0x40 + bne _0812C10C + strh r2, [r4, 0x8] + bl SweetScentWildEncounter + lsls r0, 24 + lsrs r0, 24 + cmp r0, 0x1 + bne _0812C0D0 + adds r0, r5, 0 + bl DestroyTask + b _0812C110 + .align 2, 0 +_0812C0C8: .4byte gPaletteFade +_0812C0CC: .4byte gTasks +_0812C0D0: + ldr r0, _0812C104 @ =sub_812C118 + str r0, [r4] + bl GetPlayerAvatarObjectId + ldr r2, _0812C108 @ =gSprites + lsls r0, 24 + lsrs r0, 24 + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r2 + ldrb r1, [r1, 0x5] + lsrs r1, 4 + adds r1, 0x10 + movs r0, 0x1 + lsls r0, r1 + mvns r0, r0 + movs r1, 0x1F + str r1, [sp] + movs r1, 0x4 + movs r2, 0x8 + movs r3, 0 + bl BeginNormalPaletteFade + b _0812C110 + .align 2, 0 +_0812C104: .4byte sub_812C118 +_0812C108: .4byte gSprites +_0812C10C: + adds r0, r1, 0x1 + strh r0, [r4, 0x8] +_0812C110: + add sp, 0x4 + pop {r4,r5} + pop {r0} + bx r0 + thumb_func_end sub_812C084 + + thumb_func_start sub_812C118 +sub_812C118: @ 812C118 + push {r4,lr} + lsls r0, 24 + lsrs r4, r0, 24 + ldr r0, _0812C13C @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _0812C136 + ldr r0, _0812C140 @ =SweetScentNothingHereScript + bl ScriptContext1_SetupScript + adds r0, r4, 0 + bl DestroyTask +_0812C136: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_0812C13C: .4byte gPaletteFade +_0812C140: .4byte SweetScentNothingHereScript + thumb_func_end sub_812C118 + + .align 2, 0 @ Don't pad with nop. diff --git a/asm/learn_move.s b/asm/learn_move.s new file mode 100644 index 000000000..d10cc5cd5 --- /dev/null +++ b/asm/learn_move.s @@ -0,0 +1,2735 @@ + .include "constants/gba_constants.inc" + .include "constants/species_constants.inc" + .include "asm/macros.inc" + + .syntax unified + + .text + + thumb_func_start sub_813265C +sub_813265C: @ 813265C + push {lr} + bl LoadOam + bl ProcessSpriteCopyRequests + bl TransferPlttBuffer + pop {r0} + bx r0 + thumb_func_end sub_813265C + + thumb_func_start sub_8132670 +sub_8132670: @ 8132670 + push {lr} + sub sp, 0x4 + bl ScriptContext2_Enable + ldr r0, _08132698 @ =sub_813269C + movs r1, 0xA + bl CreateTask + movs r0, 0x1 + negs r0, r0 + movs r1, 0 + str r1, [sp] + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + add sp, 0x4 + pop {r0} + bx r0 + .align 2, 0 +_08132698: .4byte sub_813269C + thumb_func_end sub_8132670 + + thumb_func_start sub_813269C +sub_813269C: @ 813269C + push {r4,lr} + lsls r0, 24 + lsrs r4, r0, 24 + ldr r0, _081326C8 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + bne _081326C0 + ldr r0, _081326CC @ =sub_81326D8 + bl SetMainCallback2 + ldr r1, _081326D0 @ =gUnknown_0300485C + ldr r0, _081326D4 @ =sub_8080990 + str r0, [r1] + adds r0, r4, 0 + bl DestroyTask +_081326C0: + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_081326C8: .4byte gPaletteFade +_081326CC: .4byte sub_81326D8 +_081326D0: .4byte gUnknown_0300485C +_081326D4: .4byte sub_8080990 + thumb_func_end sub_813269C + + thumb_func_start sub_81326D8 +sub_81326D8: @ 81326D8 + push {r4,r5,lr} + movs r1, 0x80 + lsls r1, 19 + movs r0, 0 + strh r0, [r1] + bl ResetSpriteData + bl FreeAllSpritePalettes + bl ResetTasks + ldr r4, _08132778 @ =gUnknown_030007B0 + ldr r0, _0813277C @ =0x02017000 + str r0, [r4] + bl sub_81332A0 + ldr r1, [r4] + ldr r0, _08132780 @ =gSpecialVar_0x8004 + ldrh r0, [r0] + ldr r2, _08132784 @ =0x000002c5 + adds r1, r2 + movs r5, 0 + strb r0, [r1] + bl sub_8133558 + ldr r0, _08132788 @ =sub_813265C + bl SetVBlankCallback + ldr r4, _0813278C @ =gWindowConfig_81E7240 + adds r0, r4, 0 + bl SetUpWindowConfig + adds r0, r4, 0 + bl InitMenuWindow + bl MenuZeroFillScreen + ldr r4, _08132790 @ =gWindowConfig_81E6CE4 + adds r0, r4, 0 + bl SetUpWindowConfig + adds r0, r4, 0 + bl InitMenuWindow + bl MenuZeroFillScreen + ldr r0, _08132794 @ =REG_BG0VOFS + strh r5, [r0] + strh r5, [r0] + adds r0, 0x2 + strh r5, [r0] + strh r5, [r0] + ldr r0, _08132798 @ =gUnknown_08402D80 + bl LoadSpriteSheet + ldr r0, _0813279C @ =gUnknown_08402D88 + bl LoadSpritePalette + bl sub_8133358 + movs r0, 0 + movs r1, 0 + movs r2, 0x2 + bl FillPalette + bl RunTasks + bl AnimateSprites + bl BuildOamBuffer + bl UpdatePaletteFade + ldr r0, _081327A0 @ =sub_8132870 + bl SetMainCallback2 + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_08132778: .4byte gUnknown_030007B0 +_0813277C: .4byte 0x02017000 +_08132780: .4byte gSpecialVar_0x8004 +_08132784: .4byte 0x000002c5 +_08132788: .4byte sub_813265C +_0813278C: .4byte gWindowConfig_81E7240 +_08132790: .4byte gWindowConfig_81E6CE4 +_08132794: .4byte REG_BG0VOFS +_08132798: .4byte gUnknown_08402D80 +_0813279C: .4byte gUnknown_08402D88 +_081327A0: .4byte sub_8132870 + thumb_func_end sub_81326D8 + + thumb_func_start sub_81327A4 +sub_81327A4: @ 81327A4 + push {r4,r5,lr} + bl ResetSpriteData + bl FreeAllSpritePalettes + bl ResetTasks + ldr r4, _08132844 @ =gUnknown_030007B0 + ldr r0, _08132848 @ =0x02017000 + str r0, [r4] + bl sub_8133558 + ldr r1, [r4] + ldr r0, _0813284C @ =gSpecialVar_0x8005 + ldrh r0, [r0] + ldr r2, _08132850 @ =0x000002c6 + adds r1, r2 + movs r5, 0 + strb r0, [r1] + ldr r0, _08132854 @ =sub_813265C + bl SetVBlankCallback + ldr r4, _08132858 @ =gWindowConfig_81E7240 + adds r0, r4, 0 + bl SetUpWindowConfig + adds r0, r4, 0 + bl InitMenuWindow + bl MenuZeroFillScreen + ldr r4, _0813285C @ =gWindowConfig_81E6CE4 + adds r0, r4, 0 + bl SetUpWindowConfig + adds r0, r4, 0 + bl InitMenuWindow + bl MenuZeroFillScreen + movs r1, 0x80 + lsls r1, 19 + movs r2, 0x9A + lsls r2, 5 + adds r0, r2, 0 + strh r0, [r1] + ldr r0, _08132860 @ =REG_BG0VOFS + strh r5, [r0] + subs r0, 0x2 + strh r5, [r0] + adds r0, 0x4 + strh r5, [r0] + strh r5, [r0] + ldr r0, _08132864 @ =gUnknown_08402D80 + bl LoadSpriteSheet + ldr r0, _08132868 @ =gUnknown_08402D88 + bl LoadSpritePalette + bl sub_8133358 + movs r0, 0 + movs r1, 0 + movs r2, 0x2 + bl FillPalette + bl RunTasks + bl AnimateSprites + bl BuildOamBuffer + bl UpdatePaletteFade + ldr r0, _0813286C @ =sub_8132870 + bl SetMainCallback2 + pop {r4,r5} + pop {r0} + bx r0 + .align 2, 0 +_08132844: .4byte gUnknown_030007B0 +_08132848: .4byte 0x02017000 +_0813284C: .4byte gSpecialVar_0x8005 +_08132850: .4byte 0x000002c6 +_08132854: .4byte sub_813265C +_08132858: .4byte gWindowConfig_81E7240 +_0813285C: .4byte gWindowConfig_81E6CE4 +_08132860: .4byte REG_BG0VOFS +_08132864: .4byte gUnknown_08402D80 +_08132868: .4byte gUnknown_08402D88 +_0813286C: .4byte sub_8132870 + thumb_func_end sub_81327A4 + + thumb_func_start sub_8132870 +sub_8132870: @ 8132870 + push {r4,lr} + bl sub_8132908 + ldr r4, _081328E0 @ =gUnknown_030007B0 + ldr r1, [r4] + ldrb r0, [r1, 0x1D] + cmp r0, 0 + beq _08132896 + movs r0, 0 + strb r0, [r1, 0x1D] + ldr r0, [r4] + ldrb r1, [r0, 0x18] + lsls r1, 1 + adds r1, 0x1 + lsls r1, 27 + lsrs r1, 24 + movs r0, 0x58 + bl sub_814AD7C +_08132896: + ldr r1, [r4] + ldrb r0, [r1, 0x1E] + cmp r0, 0 + beq _081328A6 + movs r0, 0 + strb r0, [r1, 0x1E] + bl sub_8133800 +_081328A6: + ldr r1, [r4] + ldr r2, _081328E4 @ =0x000002c3 + adds r0, r1, r2 + ldrb r0, [r0] + cmp r0, 0 + beq _081328C8 + adds r2, 0x1 + adds r0, r1, r2 + ldrb r0, [r0] + movs r1, 0x1 + bl sub_8133AEC + ldr r0, [r4] + ldr r1, _081328E4 @ =0x000002c3 + adds r0, r1 + movs r1, 0 + strb r1, [r0] +_081328C8: + bl RunTasks + bl AnimateSprites + bl BuildOamBuffer + bl UpdatePaletteFade + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_081328E0: .4byte gUnknown_030007B0 +_081328E4: .4byte 0x000002c3 + thumb_func_end sub_8132870 + + thumb_func_start sub_81328E8 +sub_81328E8: @ 81328E8 + push {r4,lr} + adds r1, r0, 0 + ldr r4, _08132904 @ =gStringVar4 + adds r0, r4, 0 + bl StringExpandPlaceholders + adds r0, r4, 0 + movs r1, 0x3 + movs r2, 0xF + bl MenuPrintMessage + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_08132904: .4byte gStringVar4 + thumb_func_end sub_81328E8 + + thumb_func_start sub_8132908 +sub_8132908: @ 8132908 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + sub sp, 0x4 + ldr r1, _0813292C @ =gUnknown_030007B0 + ldr r0, [r1] + ldrb r0, [r0] + adds r7, r1, 0 + cmp r0, 0x21 + bls _08132920 + b _08132FD6 +_08132920: + lsls r0, 2 + ldr r1, _08132930 @ =_08132934 + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_0813292C: .4byte gUnknown_030007B0 +_08132930: .4byte _08132934 + .align 2, 0 +_08132934: + .4byte _081329BC + .4byte _08132A0C + .4byte _08132A24 + .4byte _08132A2C + .4byte _08132A60 + .4byte _08132A66 + .4byte _08132A98 + .4byte _08132FD6 + .4byte _08132AAA + .4byte _08132AD0 + .4byte _08132FD6 + .4byte _08132FD6 + .4byte _08132B74 + .4byte _08132B98 + .4byte _08132DD8 + .4byte _08132DF8 + .4byte _08132BF0 + .4byte _08132C08 + .4byte _08132C2C + .4byte _08132D40 + .4byte _08132D68 + .4byte _08132DB8 + .4byte _08132DC6 + .4byte _08132FD6 + .4byte _08132C74 + .4byte _08132C8C + .4byte _08132CB0 + .4byte _08132D0C + .4byte _08132E18 + .4byte _08132E7C + .4byte _08132F58 + .4byte _08132F84 + .4byte _08132FA4 + .4byte _08132FBC +_081329BC: + ldr r1, [r7] + ldrb r0, [r1] + adds r0, 0x1 + movs r4, 0 + strb r0, [r1] + bl sub_8132FEC + movs r0, 0 + bl sub_8133030 + bl sub_8133800 + ldr r0, _08132A04 @ =gSprites + adds r0, 0x64 + movs r1, 0x48 + strh r1, [r0] + ldr r0, [r7] + ldr r1, _08132A08 @ =0x000002c3 + adds r0, r1 + movs r1, 0x1 + strb r1, [r0] + movs r0, 0x1 + negs r0, r0 + str r4, [sp] + movs r1, 0 + movs r2, 0x10 + movs r3, 0 + bl BeginNormalPaletteFade + movs r1, 0x80 + lsls r1, 19 + movs r2, 0x9A + lsls r2, 5 + adds r0, r2, 0 + strh r0, [r1] + b _08132FD6 + .align 2, 0 +_08132A04: .4byte gSprites +_08132A08: .4byte 0x000002c3 +_08132A0C: + ldr r0, _08132A20 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + beq _08132A1A + b _08132FD6 +_08132A1A: + ldr r1, [r7] + movs r0, 0x4 + b _08132FD4 + .align 2, 0 +_08132A20: .4byte gPaletteFade +_08132A24: + ldr r1, [r7] + ldrb r0, [r1] + adds r0, 0x1 + b _08132FD4 +_08132A2C: + movs r0, 0 + bl sub_8133030 + bl sub_8133800 + ldr r2, _08132A54 @ =gUnknown_030007B0 + ldr r0, [r2] + ldr r1, _08132A58 @ =0x000002c3 + adds r0, r1 + movs r1, 0x1 + strb r1, [r0] + ldr r1, [r2] + ldrb r0, [r1] + adds r0, 0x1 + strb r0, [r1] + ldr r0, _08132A5C @ =gSprites + adds r0, 0x64 + movs r1, 0x48 + strh r1, [r0] + b _08132FD6 + .align 2, 0 +_08132A54: .4byte gUnknown_030007B0 +_08132A58: .4byte 0x000002c3 +_08132A5C: .4byte gSprites +_08132A60: + bl sub_81330E8 + b _08132A9C +_08132A66: + movs r0, 0 + bl sub_8133140 + bl sub_8133800 + ldr r2, _08132A8C @ =gUnknown_030007B0 + ldr r0, [r2] + ldr r1, _08132A90 @ =0x000002c3 + adds r0, r1 + movs r1, 0x1 + strb r1, [r0] + ldr r0, _08132A94 @ =gSprites + adds r0, 0x64 + movs r1, 0x48 + strh r1, [r0] + ldr r1, [r2] + ldrb r0, [r1] + adds r0, 0x1 + b _08132FD4 + .align 2, 0 +_08132A8C: .4byte gUnknown_030007B0 +_08132A90: .4byte 0x000002c3 +_08132A94: .4byte gSprites +_08132A98: + bl sub_8133248 +_08132A9C: + lsls r0, 24 + cmp r0, 0 + beq _08132AA4 + b _08132FD6 +_08132AA4: + bl sub_813362C + b _08132FD6 +_08132AAA: + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + bne _08132AB6 + b _08132FD6 +_08132AB6: + movs r0, 0x15 + movs r1, 0x7 + movs r2, 0x1 + bl DisplayYesNoMenu + ldr r0, _08132ACC @ =gUnknown_030007B0 + ldr r1, [r0] + ldrb r0, [r1] + adds r0, 0x1 + b _08132FD4 + .align 2, 0 +_08132ACC: .4byte gUnknown_030007B0 +_08132AD0: + bl ProcessMenuInputNoWrap_ + lsls r0, 24 + asrs r1, r0, 24 + cmp r1, 0 + bne _08132B3A + bl sub_8133CA4 + ldr r4, _08132B1C @ =gUnknown_030007B0 + ldr r2, [r4] + ldr r1, _08132B20 @ =0x000002c5 + adds r0, r2, r1 + ldrb r1, [r0] + movs r0, 0x64 + muls r0, r1 + ldr r1, _08132B24 @ =gPlayerParty + adds r0, r1 + ldrb r1, [r2, 0x1B] + lsls r1, 1 + adds r2, 0x20 + adds r2, r1 + ldrh r1, [r2] + bl GiveMoveToMon + lsls r0, 16 + ldr r1, _08132B28 @ =0xffff0000 + cmp r0, r1 + beq _08132B34 + ldr r0, _08132B2C @ =gOtherText_PokeLearnedMove + bl sub_81328E8 + ldr r1, _08132B30 @ =gSpecialVar_0x8004 + movs r0, 0x1 + strh r0, [r1] + ldr r1, [r4] + movs r0, 0x1F + b _08132FD4 + .align 2, 0 +_08132B1C: .4byte gUnknown_030007B0 +_08132B20: .4byte 0x000002c5 +_08132B24: .4byte gPlayerParty +_08132B28: .4byte 0xffff0000 +_08132B2C: .4byte gOtherText_PokeLearnedMove +_08132B30: .4byte gSpecialVar_0x8004 +_08132B34: + ldr r1, [r4] + movs r0, 0x10 + b _08132FD4 +_08132B3A: + movs r0, 0x1 + negs r0, r0 + cmp r1, r0 + beq _08132B48 + cmp r1, 0x1 + beq _08132B48 + b _08132FD6 +_08132B48: + bl sub_8133CA4 + ldr r3, _08132B70 @ =gUnknown_030007B0 + ldr r1, [r3] + movs r2, 0xB1 + lsls r2, 2 + adds r0, r1, r2 + ldrb r0, [r0] + cmp r0, 0 + bne _08132B60 + movs r0, 0x3 + strb r0, [r1] +_08132B60: + ldr r1, [r3] + adds r0, r1, r2 + ldrb r0, [r0] + cmp r0, 0x1 + beq _08132B6C + b _08132FD6 +_08132B6C: + movs r0, 0x5 + b _08132FD4 + .align 2, 0 +_08132B70: .4byte gUnknown_030007B0 +_08132B74: + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + bne _08132B80 + b _08132FD6 +_08132B80: + movs r0, 0x15 + movs r1, 0x7 + movs r2, 0x1 + bl DisplayYesNoMenu + ldr r0, _08132B94 @ =gUnknown_030007B0 + ldr r1, [r0] + ldrb r0, [r1] + adds r0, 0x1 + b _08132FD4 + .align 2, 0 +_08132B94: .4byte gUnknown_030007B0 +_08132B98: + bl ProcessMenuInputNoWrap_ + lsls r0, 24 + asrs r4, r0, 24 + cmp r4, 0 + bne _08132BB4 + bl sub_8133CA4 + ldr r0, _08132BB0 @ =gSpecialVar_0x8004 + strh r4, [r0] + b _08132FCE + .align 2, 0 +_08132BB0: .4byte gSpecialVar_0x8004 +_08132BB4: + movs r0, 0x1 + negs r0, r0 + cmp r4, r0 + beq _08132BC2 + cmp r4, 0x1 + beq _08132BC2 + b _08132FD6 +_08132BC2: + bl sub_8133CA4 + ldr r3, _08132BEC @ =gUnknown_030007B0 + ldr r1, [r3] + movs r2, 0xB1 + lsls r2, 2 + adds r0, r1, r2 + ldrb r0, [r0] + cmp r0, 0 + bne _08132BDA + movs r0, 0x3 + strb r0, [r1] +_08132BDA: + ldr r1, [r3] + adds r0, r1, r2 + ldrb r0, [r0] + cmp r0, 0x1 + beq _08132BE6 + b _08132FD6 +_08132BE6: + movs r0, 0x5 + b _08132FD4 + .align 2, 0 +_08132BEC: .4byte gUnknown_030007B0 +_08132BF0: + ldr r0, _08132C00 @ =gOtherText_DeleteOlderMove + bl sub_81328E8 + ldr r0, _08132C04 @ =gUnknown_030007B0 + ldr r1, [r0] + ldrb r0, [r1] + adds r0, 0x1 + b _08132FD4 + .align 2, 0 +_08132C00: .4byte gOtherText_DeleteOlderMove +_08132C04: .4byte gUnknown_030007B0 +_08132C08: + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + bne _08132C14 + b _08132FD6 +_08132C14: + movs r0, 0x15 + movs r1, 0x7 + movs r2, 0x1 + bl DisplayYesNoMenu + ldr r0, _08132C28 @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0x12 + b _08132FD4 + .align 2, 0 +_08132C28: .4byte gUnknown_030007B0 +_08132C2C: + bl ProcessMenuInputNoWrap_ + lsls r0, 24 + asrs r1, r0, 24 + cmp r1, 0 + bne _08132C54 + bl sub_8133CA4 + ldr r0, _08132C4C @ =gOtherText_WhichMoveToForget + bl sub_81328E8 + ldr r0, _08132C50 @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0x13 + b _08132FD4 + .align 2, 0 +_08132C4C: .4byte gOtherText_WhichMoveToForget +_08132C50: .4byte gUnknown_030007B0 +_08132C54: + movs r0, 0x1 + negs r0, r0 + cmp r1, r0 + beq _08132C62 + cmp r1, 0x1 + beq _08132C62 + b _08132FD6 +_08132C62: + bl sub_8133CA4 + ldr r0, _08132C70 @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0x18 + b _08132FD4 + .align 2, 0 +_08132C70: .4byte gUnknown_030007B0 +_08132C74: + ldr r0, _08132C84 @ =gOtherText_StopLearningMove + bl sub_81328E8 + ldr r0, _08132C88 @ =gUnknown_030007B0 + ldr r1, [r0] + ldrb r0, [r1] + adds r0, 0x1 + b _08132FD4 + .align 2, 0 +_08132C84: .4byte gOtherText_StopLearningMove +_08132C88: .4byte gUnknown_030007B0 +_08132C8C: + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + bne _08132C98 + b _08132FD6 +_08132C98: + ldr r0, _08132CAC @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0x1A + strb r0, [r1] + movs r0, 0x15 + movs r1, 0x7 + movs r2, 0x1 + bl DisplayYesNoMenu + b _08132FD6 + .align 2, 0 +_08132CAC: .4byte gUnknown_030007B0 +_08132CB0: + bl ProcessMenuInputNoWrap_ + lsls r0, 24 + asrs r1, r0, 24 + cmp r1, 0 + bne _08132CCC + bl sub_8133CA4 + ldr r0, _08132CC8 @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0x1B + b _08132FD4 + .align 2, 0 +_08132CC8: .4byte gUnknown_030007B0 +_08132CCC: + movs r0, 0x1 + negs r0, r0 + cmp r1, r0 + beq _08132CDA + cmp r1, 0x1 + beq _08132CDA + b _08132FD6 +_08132CDA: + bl sub_8133CA4 + ldr r1, _08132D08 @ =gUnknown_030007B0 + ldr r2, [r1] + movs r3, 0xB1 + lsls r3, 2 + adds r0, r2, r3 + ldrb r0, [r0] + cmp r0, 0 + bne _08132CF2 + movs r0, 0x3 + strb r0, [r2] +_08132CF2: + ldr r2, [r1] + adds r0, r2, r3 + ldrb r0, [r0] + cmp r0, 0x1 + bne _08132D00 + movs r0, 0x5 + strb r0, [r2] +_08132D00: + ldr r1, [r1] + movs r0, 0x10 + b _08132FD4 + .align 2, 0 +_08132D08: .4byte gUnknown_030007B0 +_08132D0C: + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + bne _08132D18 + b _08132FD6 +_08132D18: + ldr r3, _08132D3C @ =gUnknown_030007B0 + ldr r1, [r3] + movs r2, 0xB1 + lsls r2, 2 + adds r0, r1, r2 + ldrb r0, [r0] + cmp r0, 0 + bne _08132D2C + movs r0, 0x3 + strb r0, [r1] +_08132D2C: + ldr r1, [r3] + adds r0, r1, r2 + ldrb r0, [r0] + cmp r0, 0x1 + beq _08132D38 + b _08132FD6 +_08132D38: + movs r0, 0x5 + b _08132FD4 + .align 2, 0 +_08132D3C: .4byte gUnknown_030007B0 +_08132D40: + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + bne _08132D4C + b _08132FD6 +_08132D4C: + ldr r0, _08132D64 @ =gUnknown_030007B0 + ldr r1, [r0] + movs r2, 0 + movs r0, 0x14 + strb r0, [r1] + subs r0, 0x15 + str r2, [sp] + movs r1, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + b _08132FD6 + .align 2, 0 +_08132D64: .4byte gUnknown_030007B0 +_08132D68: + ldr r0, _08132DA4 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + beq _08132D76 + b _08132FD6 +_08132D76: + ldr r0, _08132DA8 @ =gPlayerParty + ldr r5, [r7] + ldr r2, _08132DAC @ =0x000002c5 + adds r1, r5, r2 + ldrb r1, [r1] + ldr r2, _08132DB0 @ =gPlayerPartyCount + ldrb r2, [r2] + subs r2, 0x1 + lsls r2, 24 + lsrs r2, 24 + ldr r3, _08132DB4 @ =sub_81327A4 + ldrb r4, [r5, 0x1B] + lsls r4, 1 + adds r5, 0x20 + adds r5, r4 + ldrh r4, [r5] + str r4, [sp] + bl sub_809D9F0 + ldr r1, [r7] + movs r0, 0x1C + b _08132FD4 + .align 2, 0 +_08132DA4: .4byte gPaletteFade +_08132DA8: .4byte gPlayerParty +_08132DAC: .4byte 0x000002c5 +_08132DB0: .4byte gPlayerPartyCount +_08132DB4: .4byte sub_81327A4 +_08132DB8: + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + bne _08132DC4 + b _08132FD6 +_08132DC4: + b _08132FCE +_08132DC6: + movs r0, 0x1 + negs r0, r0 + movs r1, 0 + str r1, [sp] + movs r2, 0x10 + movs r3, 0 + bl BeginNormalPaletteFade + b _08132FD6 +_08132DD8: + movs r0, 0x1 + negs r0, r0 + movs r1, 0 + str r1, [sp] + movs r2, 0 + movs r3, 0x10 + bl BeginNormalPaletteFade + ldr r0, _08132DF4 @ =gUnknown_030007B0 + ldr r1, [r0] + ldrb r0, [r1] + adds r0, 0x1 + b _08132FD4 + .align 2, 0 +_08132DF4: .4byte gUnknown_030007B0 +_08132DF8: + ldr r0, _08132E10 @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + beq _08132E06 + b _08132FD6 +_08132E06: + ldr r0, _08132E14 @ =c2_exit_to_overworld_2_switch + bl SetMainCallback2 + b _08132FD6 + .align 2, 0 +_08132E10: .4byte gPaletteFade +_08132E14: .4byte c2_exit_to_overworld_2_switch +_08132E18: + movs r0, 0x1 + negs r0, r0 + movs r1, 0 + str r1, [sp] + movs r2, 0x10 + movs r3, 0 + bl BeginNormalPaletteFade + ldr r5, _08132E74 @ =gUnknown_030007B0 + ldr r1, [r5] + ldrb r0, [r1] + adds r0, 0x1 + strb r0, [r1] + bl sub_8132FEC + bl sub_8133800 + ldr r0, [r5] + movs r4, 0xB1 + lsls r4, 2 + adds r0, r4 + ldrb r0, [r0] + cmp r0, 0 + bne _08132E4E + movs r0, 0x1 + bl sub_8133030 +_08132E4E: + ldr r0, [r5] + adds r0, r4 + ldrb r0, [r0] + cmp r0, 0x1 + bne _08132E66 + ldr r0, _08132E78 @ =gSprites + adds r0, 0x64 + movs r1, 0x48 + strh r1, [r0] + movs r0, 0x1 + bl sub_8133140 +_08132E66: + ldr r0, [r5] + adds r0, r4 + ldrb r0, [r0] + movs r1, 0x1 + bl sub_8133AEC + b _08132FD6 + .align 2, 0 +_08132E74: .4byte gUnknown_030007B0 +_08132E78: .4byte gSprites +_08132E7C: + ldr r0, _08132E9C @ =gPaletteFade + ldrb r1, [r0, 0x7] + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + beq _08132E8A + b _08132FD6 +_08132E8A: + ldr r1, [r7] + ldr r0, _08132EA0 @ =0x000002c6 + adds r2, r1, r0 + ldrb r0, [r2] + cmp r0, 0x4 + bne _08132EA4 + movs r0, 0x18 + b _08132FD4 + .align 2, 0 +_08132E9C: .4byte gPaletteFade +_08132EA0: .4byte 0x000002c6 +_08132EA4: + ldr r4, _08132F38 @ =0x000002c5 + adds r0, r1, r4 + ldrb r0, [r0] + movs r6, 0x64 + muls r0, r6 + ldr r5, _08132F3C @ =gPlayerParty + adds r0, r5 + ldrb r1, [r2] + adds r1, 0xD + bl GetMonData + lsls r0, 16 + lsrs r0, 16 + ldr r2, _08132F40 @ =gStringVar3 + movs r1, 0xD + mov r9, r1 + mov r1, r9 + muls r1, r0 + ldr r0, _08132F44 @ =gMoveNames + mov r8, r0 + add r1, r8 + adds r0, r2, 0 + bl StringCopy + ldr r1, [r7] + adds r0, r1, r4 + ldrb r0, [r0] + muls r0, r6 + adds r0, r5 + ldr r2, _08132F48 @ =0x000002c6 + adds r1, r2 + ldrb r1, [r1] + bl RemoveMonPPBonus + ldr r3, [r7] + adds r4, r3, r4 + ldrb r0, [r4] + muls r0, r6 + adds r0, r5 + ldrb r2, [r3, 0x1B] + lsls r2, 1 + adds r1, r3, 0 + adds r1, 0x20 + adds r1, r2 + ldrh r1, [r1] + ldr r2, _08132F48 @ =0x000002c6 + adds r3, r2 + ldrb r2, [r3] + bl SetMonMoveSlot + ldr r0, _08132F4C @ =gStringVar2 + ldr r1, [r7] + ldrb r2, [r1, 0x1B] + lsls r2, 1 + adds r1, 0x20 + adds r1, r2 + ldrh r1, [r1] + mov r2, r9 + muls r2, r1 + adds r1, r2, 0 + add r1, r8 + bl StringCopy + ldr r0, _08132F50 @ =gOtherText_ForgotMove123 + bl sub_81328E8 + ldr r1, [r7] + movs r0, 0x1E + strb r0, [r1] + ldr r1, _08132F54 @ =gSpecialVar_0x8004 + movs r0, 0x1 + strh r0, [r1] + b _08132FD6 + .align 2, 0 +_08132F38: .4byte 0x000002c5 +_08132F3C: .4byte gPlayerParty +_08132F40: .4byte gStringVar3 +_08132F44: .4byte gMoveNames +_08132F48: .4byte 0x000002c6 +_08132F4C: .4byte gStringVar2 +_08132F50: .4byte gOtherText_ForgotMove123 +_08132F54: .4byte gSpecialVar_0x8004 +_08132F58: + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + beq _08132FD6 + ldr r0, _08132F78 @ =gOtherText_ForgotOrDidNotLearnMove + bl sub_81328E8 + ldr r0, _08132F7C @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0x1F + strb r0, [r1] + ldr r0, _08132F80 @ =0x0000016f + bl PlayFanfare + b _08132FD6 + .align 2, 0 +_08132F78: .4byte gOtherText_ForgotOrDidNotLearnMove +_08132F7C: .4byte gUnknown_030007B0 +_08132F80: .4byte 0x0000016f +_08132F84: + bl MenuUpdateWindowText + lsls r0, 24 + cmp r0, 0 + beq _08132FD6 + ldr r0, _08132F9C @ =0x0000016f + bl PlayFanfare + ldr r0, _08132FA0 @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0x20 + b _08132FD4 + .align 2, 0 +_08132F9C: .4byte 0x0000016f +_08132FA0: .4byte gUnknown_030007B0 +_08132FA4: + bl IsFanfareTaskInactive + lsls r0, 24 + cmp r0, 0 + beq _08132FD6 + ldr r0, _08132FB8 @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0x21 + b _08132FD4 + .align 2, 0 +_08132FB8: .4byte gUnknown_030007B0 +_08132FBC: + ldr r0, _08132FE4 @ =gMain + ldrh r1, [r0, 0x2E] + movs r0, 0x1 + ands r0, r1 + cmp r0, 0 + beq _08132FD6 + movs r0, 0x5 + bl PlaySE +_08132FCE: + ldr r0, _08132FE8 @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0xE +_08132FD4: + strb r0, [r1] +_08132FD6: + add sp, 0x4 + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08132FE4: .4byte gMain +_08132FE8: .4byte gUnknown_030007B0 + thumb_func_end sub_8132908 + + thumb_func_start sub_8132FEC +sub_8132FEC: @ 8132FEC + push {r4-r6,lr} + ldr r0, _08133024 @ =gWindowConfig_81E7240 + bl BasicInitMenuWindow + movs r5, 0 + ldr r4, _08133028 @ =gUnknown_08402CF8 + adds r6, r4, 0 +_08132FFA: + lsls r3, r5, 2 + ldrb r0, [r4] + adds r1, r6, 0x1 + adds r1, r3, r1 + ldrb r1, [r1] + adds r2, r6, 0x2 + adds r3, r2 + ldrb r2, [r3] + ldrb r3, [r4, 0x3] + bl MenuDrawTextWindow + adds r4, 0x4 + adds r5, 0x1 + cmp r5, 0x3 + bls _08132FFA + ldr r0, _0813302C @ =gWindowConfig_81E6CE4 + bl BasicInitMenuWindow + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_08133024: .4byte gWindowConfig_81E7240 +_08133028: .4byte gUnknown_08402CF8 +_0813302C: .4byte gWindowConfig_81E6CE4 + thumb_func_end sub_8132FEC + + thumb_func_start sub_8133030 +sub_8133030: @ 8133030 + push {r4-r7,lr} + sub sp, 0x8 + lsls r0, 24 + lsrs r7, r0, 24 + ldr r4, _081330D4 @ =gSprites + ldr r5, _081330D8 @ =gUnknown_030007B0 + ldr r0, [r5] + ldrb r0, [r0, 0x3] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r4 + adds r1, 0x3E + ldrb r3, [r1] + movs r2, 0x5 + negs r2, r2 + adds r0, r2, 0 + ands r0, r3 + strb r0, [r1] + ldr r0, [r5] + ldrb r1, [r0, 0x4] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + adds r0, 0x3E + ldrb r1, [r0] + ands r2, r1 + strb r2, [r0] + movs r2, 0 + ldr r6, _081330DC @ =gUnknown_08402D08 + movs r3, 0x4 +_08133070: + ldr r0, [r5] + adds r0, r2 + ldrb r1, [r0, 0x7] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + adds r0, 0x3E + ldrb r1, [r0] + orrs r1, r3 + strb r1, [r0] + adds r2, 0x1 + cmp r2, 0xF + ble _08133070 + ldr r0, [r6] + cmp r0, 0 + beq _081330B4 + ldr r5, _081330E0 @ =gTileBuffer + adds r4, r6, 0 +_08133096: + ldr r1, [r4] + adds r0, r5, 0 + movs r2, 0x40 + movs r3, 0x2 + bl sub_8072C74 + ldrb r1, [r4, 0x4] + ldrb r2, [r4, 0x5] + adds r0, r5, 0 + bl MenuPrint + adds r4, 0x8 + ldr r0, [r4] + cmp r0, 0 + bne _08133096 +_081330B4: + cmp r7, 0 + bne _081330CC + ldr r0, _081330E4 @ =gOtherText_TeachWhichMove + movs r1, 0x20 + str r1, [sp] + movs r1, 0x1 + str r1, [sp, 0x4] + movs r1, 0x18 + movs r2, 0x78 + movs r3, 0xC0 + bl sub_8072AB0 +_081330CC: + add sp, 0x8 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_081330D4: .4byte gSprites +_081330D8: .4byte gUnknown_030007B0 +_081330DC: .4byte gUnknown_08402D08 +_081330E0: .4byte gTileBuffer +_081330E4: .4byte gOtherText_TeachWhichMove + thumb_func_end sub_8133030 + + thumb_func_start sub_81330E8 +sub_81330E8: @ 81330E8 + push {r4,lr} + ldr r0, _08133134 @ =gMain + ldrh r2, [r0, 0x2E] + movs r1, 0x30 + ands r1, r2 + negs r0, r1 + orrs r0, r1 + lsrs r4, r0, 31 + ldr r0, _08133138 @ =gSaveBlock2 + ldrb r0, [r0, 0x13] + cmp r0, 0x1 + bne _0813310C + movs r0, 0xC0 + lsls r0, 2 + ands r0, r2 + cmp r0, 0 + beq _0813310C + adds r4, 0x1 +_0813310C: + cmp r4, 0 + beq _0813312A + movs r0, 0x5 + bl PlaySE + ldr r2, _0813313C @ =gUnknown_030007B0 + ldr r1, [r2] + movs r0, 0x5 + strb r0, [r1] + ldr r0, [r2] + movs r1, 0xB1 + lsls r1, 2 + adds r0, r1 + movs r1, 0x1 + strb r1, [r0] +_0813312A: + adds r0, r4, 0 + pop {r4} + pop {r1} + bx r1 + .align 2, 0 +_08133134: .4byte gMain +_08133138: .4byte gSaveBlock2 +_0813313C: .4byte gUnknown_030007B0 + thumb_func_end sub_81330E8 + + thumb_func_start sub_8133140 +sub_8133140: @ 8133140 + 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 + str r0, [sp, 0x8] + ldr r4, _08133234 @ =gSprites + ldr r5, _08133238 @ =gUnknown_030007B0 + ldr r0, [r5] + ldrb r0, [r0, 0x3] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r4 + adds r1, 0x3E + ldrb r2, [r1] + movs r3, 0x5 + negs r3, r3 + adds r0, r3, 0 + ands r0, r2 + strb r0, [r1] + ldr r0, [r5] + ldrb r1, [r0, 0x4] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + adds r0, 0x3E + ldrb r2, [r0] + adds r1, r3, 0 + ands r1, r2 + strb r1, [r0] + movs r6, 0 + ldr r7, _0813323C @ =gUnknown_08402D08 +_0813318A: + ldr r0, [r5] + adds r0, r6 + ldrb r0, [r0, 0x7] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r4 + adds r1, 0x3E + ldrb r2, [r1] + adds r0, r3, 0 + ands r0, r2 + strb r0, [r1] + adds r6, 0x1 + cmp r6, 0xF + ble _0813318A + movs r6, 0 + ldr r0, [r7] + cmp r0, 0 + beq _08133208 + mov r9, r7 + mov r10, r6 + movs r0, 0x24 + add r0, r9 + mov r8, r0 +_081331BA: + mov r0, r9 + adds r0, 0x20 + add r0, r10 + ldr r1, [r0] + ldr r0, _08133240 @ =gTileBuffer + movs r2, 0x40 + movs r3, 0x2 + bl sub_8072C74 + mov r0, r8 + ldrb r5, [r0] + ldrb r4, [r0, 0x1] + ldr r0, _08133240 @ =gTileBuffer + adds r1, r5, 0 + adds r2, r4, 0 + bl MenuPrint + cmp r6, 0 + beq _081331F8 + adds r1, r4, 0x2 + lsls r1, 24 + lsrs r1, 24 + adds r2, r5, 0x7 + lsls r2, 24 + lsrs r2, 24 + adds r3, r4, 0x3 + lsls r3, 24 + lsrs r3, 24 + adds r0, r5, 0 + bl MenuZeroFillWindowRect +_081331F8: + movs r0, 0x8 + add r10, r0 + add r8, r0 + adds r7, 0x8 + adds r6, 0x1 + ldr r0, [r7] + cmp r0, 0 + bne _081331BA +_08133208: + ldr r0, [sp, 0x8] + cmp r0, 0 + bne _08133222 + ldr r0, _08133244 @ =gOtherText_TeachWhichMove + movs r1, 0x20 + str r1, [sp] + movs r1, 0x1 + str r1, [sp, 0x4] + movs r1, 0x18 + movs r2, 0x78 + movs r3, 0xC0 + bl sub_8072AB0 +_08133222: + 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 +_08133234: .4byte gSprites +_08133238: .4byte gUnknown_030007B0 +_0813323C: .4byte gUnknown_08402D08 +_08133240: .4byte gTileBuffer +_08133244: .4byte gOtherText_TeachWhichMove + thumb_func_end sub_8133140 + + thumb_func_start sub_8133248 +sub_8133248: @ 8133248 + push {r4,lr} + ldr r0, _08133294 @ =gMain + ldrh r2, [r0, 0x2E] + movs r1, 0x30 + ands r1, r2 + negs r0, r1 + orrs r0, r1 + lsrs r4, r0, 31 + ldr r0, _08133298 @ =gSaveBlock2 + ldrb r0, [r0, 0x13] + cmp r0, 0x1 + bne _0813326C + movs r0, 0xC0 + lsls r0, 2 + ands r0, r2 + cmp r0, 0 + beq _0813326C + adds r4, 0x1 +_0813326C: + cmp r4, 0 + beq _0813328A + movs r0, 0x5 + bl PlaySE + ldr r2, _0813329C @ =gUnknown_030007B0 + ldr r1, [r2] + movs r3, 0 + movs r0, 0x3 + strb r0, [r1] + ldr r0, [r2] + movs r1, 0xB1 + lsls r1, 2 + adds r0, r1 + strb r3, [r0] +_0813328A: + adds r0, r4, 0 + pop {r4} + pop {r1} + bx r1 + .align 2, 0 +_08133294: .4byte gMain +_08133298: .4byte gSaveBlock2 +_0813329C: .4byte gUnknown_030007B0 + thumb_func_end sub_8133248 + + thumb_func_start sub_81332A0 +sub_81332A0: @ 81332A0 + push {r4,lr} + ldr r2, _081332F8 @ =gUnknown_030007B0 + ldr r0, [r2] + movs r1, 0 + strb r1, [r0] + ldr r0, [r2] + strb r1, [r0, 0x2] + ldr r0, [r2] + strb r1, [r0, 0x19] + ldr r0, [r2] + strb r1, [r0, 0x18] + ldr r0, [r2] + strb r1, [r0, 0x1C] + ldr r0, [r2] + strb r1, [r0, 0x1A] + ldr r0, [r2] + strb r1, [r0, 0x1B] + ldr r0, [r2] + strb r1, [r0, 0x1D] + ldr r0, [r2] + strb r1, [r0, 0x1E] + ldr r0, [r2] + ldr r3, _081332FC @ =0x000002c3 + adds r0, r3 + strb r1, [r0] + ldr r0, [r2] + adds r3, 0x1 + adds r0, r3 + strb r1, [r0] + movs r3, 0 + adds r4, r2, 0 + movs r2, 0 +_081332E0: + ldr r0, [r4] + lsls r1, r3, 1 + adds r0, 0x20 + adds r0, r1 + strh r2, [r0] + adds r3, 0x1 + cmp r3, 0x13 + ble _081332E0 + pop {r4} + pop {r0} + bx r0 + .align 2, 0 +_081332F8: .4byte gUnknown_030007B0 +_081332FC: .4byte 0x000002c3 + thumb_func_end sub_81332A0 + + thumb_func_start sub_8133300 +sub_8133300: @ 8133300 + push {r4,lr} + adds r4, r0, 0 + movs r1, 0x30 + ldrsh r0, [r4, r1] + lsls r1, r0, 2 + adds r1, r0 + lsls r1, 1 + movs r0, 0xFF + ands r1, r0 + movs r2, 0x2E + ldrsh r0, [r4, r2] + cmp r0, 0x1 + beq _08133324 + cmp r0, 0x1 + ble _0813334A + cmp r0, 0x2 + beq _08133338 + b _0813334A +_08133324: + adds r0, r1, 0 + movs r1, 0x3 + bl Sin + ldrh r1, [r4, 0x32] + adds r2, r0, 0 + muls r2, r1 + adds r0, r2, 0 + strh r0, [r4, 0x24] + b _0813334A +_08133338: + adds r0, r1, 0 + movs r1, 0x1 + bl Sin + ldrh r1, [r4, 0x32] + adds r2, r0, 0 + muls r2, r1 + adds r0, r2, 0 + strh r0, [r4, 0x26] +_0813334A: + ldrh r0, [r4, 0x30] + adds r0, 0x1 + strh r0, [r4, 0x30] + pop {r4} + pop {r0} + bx r0 + thumb_func_end sub_8133300 + + thumb_func_start sub_8133358 +sub_8133358: @ 8133358 + push {r4-r7,lr} + mov r7, r9 + mov r6, r8 + push {r6,r7} + sub sp, 0x4 + ldr r6, _0813353C @ =gSpriteTemplate_8402D90 + adds r0, r6, 0 + movs r1, 0x8 + movs r2, 0x10 + movs r3, 0 + bl CreateSprite + ldr r4, _08133540 @ =gUnknown_030007B0 + ldr r1, [r4] + strb r0, [r1, 0x3] + ldr r5, _08133544 @ =gSprites + ldr r2, [r4] + ldrb r1, [r2, 0x3] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r1, 0x1 + mov r8, r1 + mov r1, r8 + strh r1, [r0, 0x2E] + ldrb r1, [r2, 0x3] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + ldr r1, _08133548 @ =0x0000ffff + strh r1, [r0, 0x32] + adds r0, r6, 0 + movs r1, 0x48 + movs r2, 0x10 + movs r3, 0 + bl CreateSprite + ldr r1, [r4] + strb r0, [r1, 0x4] + ldr r0, [r4] + ldrb r1, [r0, 0x4] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r1, 0x1 + bl StartSpriteAnim + ldr r2, [r4] + ldrb r1, [r2, 0x4] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + mov r1, r8 + strh r1, [r0, 0x2E] + ldrb r1, [r2, 0x4] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + mov r1, r8 + strh r1, [r0, 0x32] + ldr r0, _0813354C @ =gSpriteTemplate_8402DC0 + mov r9, r0 + movs r1, 0xA0 + movs r2, 0x4 + movs r3, 0 + bl CreateSprite + ldr r1, [r4] + strb r0, [r1, 0x5] + ldr r0, [r4] + ldrb r1, [r0, 0x5] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r1, 0x1 + bl StartSpriteAnim + ldr r2, [r4] + ldrb r1, [r2, 0x5] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r6, 0x2 + strh r6, [r0, 0x2E] + ldrb r1, [r2, 0x5] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + movs r1, 0x1 + negs r1, r1 + strh r1, [r0, 0x32] + mov r0, r9 + movs r1, 0xA0 + movs r2, 0x3C + movs r3, 0 + bl CreateSprite + ldr r1, [r4] + strb r0, [r1, 0x6] + ldr r2, [r4] + ldrb r1, [r2, 0x6] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + strh r6, [r0, 0x2E] + ldrb r1, [r2, 0x6] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + mov r1, r8 + strh r1, [r0, 0x32] + movs r5, 0 + ldr r6, _08133550 @ =gSpriteTemplate_8402E08 +_0813344E: + adds r2, r5, 0 + cmp r5, 0 + bge _08133456 + adds r2, r5, 0x3 +_08133456: + asrs r2, 2 + lsls r1, r2, 2 + subs r1, r5, r1 + lsls r1, 19 + movs r0, 0xE0 + lsls r0, 13 + adds r1, r0 + asrs r1, 16 + lsls r2, 19 + movs r0, 0xD0 + lsls r0, 14 + adds r2, r0 + asrs r2, 16 + adds r0, r6, 0 + movs r3, 0 + bl CreateSprite + ldr r1, [r4] + adds r2, r5, 0x4 + adds r1, 0x3 + adds r1, r2 + strb r0, [r1] + ldr r0, [r4] + adds r0, 0x3 + adds r0, r2 + ldrb r1, [r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + ldr r1, _08133544 @ =gSprites + adds r0, r1 + movs r1, 0x2 + bl StartSpriteAnim + adds r5, 0x1 + cmp r5, 0x7 + ble _0813344E + movs r5, 0 + ldr r7, _08133550 @ =gSpriteTemplate_8402E08 + ldr r6, _08133540 @ =gUnknown_030007B0 +_081334A6: + adds r2, r5, 0 + cmp r5, 0 + bge _081334AE + adds r2, r5, 0x3 +_081334AE: + asrs r2, 2 + lsls r1, r2, 2 + subs r1, r5, r1 + lsls r1, 19 + movs r0, 0xE0 + lsls r0, 13 + adds r1, r0 + asrs r1, 16 + lsls r2, 19 + movs r0, 0xB8 + lsls r0, 15 + adds r2, r0 + asrs r2, 16 + adds r0, r7, 0 + movs r3, 0 + bl CreateSprite + ldr r1, [r6] + adds r2, r5, 0 + adds r2, 0xC + adds r1, 0x3 + adds r1, r2 + strb r0, [r1] + ldr r0, [r6] + adds r0, 0x3 + adds r0, r2 + ldrb r1, [r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + ldr r4, _08133544 @ =gSprites + adds r0, r4 + movs r1, 0x2 + bl StartSpriteAnim + adds r5, 0x1 + cmp r5, 0x7 + ble _081334A6 + movs r5, 0 + ldr r3, _08133540 @ =gUnknown_030007B0 + movs r2, 0x4 +_08133500: + ldr r0, [r3] + adds r0, 0x3 + adds r0, r5 + ldrb r1, [r0] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r4 + adds r0, 0x3E + ldrb r1, [r0] + orrs r1, r2 + strb r1, [r0] + adds r5, 0x1 + cmp r5, 0x13 + ble _08133500 + ldr r1, _08133548 @ =0x0000ffff + ldr r3, _08133554 @ =0x00002d9f + movs r0, 0x12 + str r0, [sp] + movs r0, 0x10 + movs r2, 0xC + bl CreateBlendedOutlineCursor + add sp, 0x4 + pop {r3,r4} + mov r8, r3 + mov r9, r4 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_0813353C: .4byte gSpriteTemplate_8402D90 +_08133540: .4byte gUnknown_030007B0 +_08133544: .4byte gSprites +_08133548: .4byte 0x0000ffff +_0813354C: .4byte gSpriteTemplate_8402DC0 +_08133550: .4byte gSpriteTemplate_8402E08 +_08133554: .4byte 0x00002d9f + thumb_func_end sub_8133358 + + thumb_func_start sub_8133558 +sub_8133558: @ 8133558 + push {r4-r6,lr} + sub sp, 0xC + ldr r5, _081335F4 @ =gUnknown_030007B0 + ldr r1, [r5] + ldr r2, _081335F8 @ =0x000002c5 + adds r0, r1, r2 + ldrb r2, [r0] + movs r0, 0x64 + muls r0, r2 + ldr r2, _081335FC @ =gPlayerParty + adds r0, r2 + adds r1, 0x20 + bl sub_80403CC + ldr r1, [r5] + strb r0, [r1, 0x1A] + movs r4, 0 + ldr r0, [r5] + ldrb r0, [r0, 0x1A] + cmp r4, r0 + bge _081335AA + adds r6, r5, 0 + movs r5, 0x52 +_08133586: + lsls r2, r4, 1 + ldr r1, [r6] + adds r0, r1, r5 + adds r1, 0x20 + adds r1, r2 + ldrh r2, [r1] + movs r1, 0xD + muls r1, r2 + ldr r2, _08133600 @ =gMoveNames + adds r1, r2 + bl StringCopy + adds r5, 0x19 + adds r4, 0x1 + ldr r0, [r6] + ldrb r0, [r0, 0x1A] + cmp r4, r0 + blt _08133586 +_081335AA: + ldr r4, _081335F4 @ =gUnknown_030007B0 + ldr r0, [r4] + ldr r1, _081335F8 @ =0x000002c5 + adds r0, r1 + ldrb r1, [r0] + movs r0, 0x64 + muls r0, r1 + ldr r1, _081335FC @ =gPlayerParty + adds r0, r1 + movs r1, 0x2 + mov r2, sp + bl GetMonData + ldr r0, _08133604 @ =gStringVar1 + mov r1, sp + bl StringCopy10 + ldr r0, [r4] + ldrb r2, [r0, 0x1A] + lsls r1, r2, 1 + adds r1, r2 + lsls r1, 3 + adds r1, r2 + adds r1, 0x52 + adds r0, r1 + ldr r1, _08133608 @ =gUnknownText_Exit + bl StringCopy + ldr r1, [r4] + ldrb r0, [r1, 0x1A] + adds r0, 0x1 + strb r0, [r1, 0x1A] + add sp, 0xC + pop {r4-r6} + pop {r0} + bx r0 + .align 2, 0 +_081335F4: .4byte gUnknown_030007B0 +_081335F8: .4byte 0x000002c5 +_081335FC: .4byte gPlayerParty +_08133600: .4byte gMoveNames +_08133604: .4byte gStringVar1 +_08133608: .4byte gUnknownText_Exit + thumb_func_end sub_8133558 + + thumb_func_start sub_813360C +sub_813360C: @ 813360C + lsls r0, 24 + ldr r3, _08133628 @ =gUnknown_030007B0 + ldr r2, [r3] + ldrb r1, [r2, 0x18] + strb r1, [r2, 0x1C] + ldr r1, [r3] + lsrs r0, 24 + ldrb r2, [r1, 0x18] + adds r0, r2 + strb r0, [r1, 0x18] + ldr r1, [r3] + movs r0, 0x1 + strb r0, [r1, 0x1D] + bx lr + .align 2, 0 +_08133628: .4byte gUnknown_030007B0 + thumb_func_end sub_813360C + + thumb_func_start sub_813362C +sub_813362C: @ 813362C + push {r4,r5,lr} + ldr r2, _08133670 @ =gMain + ldrh r1, [r2, 0x30] + movs r0, 0x40 + ands r0, r1 + cmp r0, 0 + beq _08133688 + ldr r4, _08133674 @ =gUnknown_030007B0 + ldr r0, [r4] + ldrb r0, [r0, 0x1B] + cmp r0, 0 + bne _08133646 + b _08133796 +_08133646: + movs r0, 0x5 + bl PlaySE + ldr r1, [r4] + ldrb r0, [r1, 0x1B] + subs r0, 0x1 + strb r0, [r1, 0x1B] + ldr r0, [r4] + ldr r1, _08133678 @ =0x000002c3 + adds r0, r1 + movs r1, 0x1 + strb r1, [r0] + ldr r1, [r4] + ldrb r0, [r1, 0x18] + cmp r0, 0 + beq _0813367C + movs r0, 0x1 + negs r0, r0 + bl sub_813360C + b _08133796 + .align 2, 0 +_08133670: .4byte gMain +_08133674: .4byte gUnknown_030007B0 +_08133678: .4byte 0x000002c3 +_0813367C: + ldrb r0, [r1, 0x19] + cmp r0, 0 + bne _08133684 + b _08133796 +_08133684: + subs r0, 0x1 + b _081336DC +_08133688: + movs r0, 0x80 + ands r0, r1 + cmp r0, 0 + beq _081336E8 + ldr r4, _081336C8 @ =gUnknown_030007B0 + ldr r0, [r4] + ldrb r1, [r0, 0x1B] + ldrb r0, [r0, 0x1A] + subs r0, 0x1 + cmp r1, r0 + blt _081336A0 + b _08133796 +_081336A0: + movs r0, 0x5 + bl PlaySE + ldr r1, [r4] + ldrb r0, [r1, 0x1B] + adds r0, 0x1 + strb r0, [r1, 0x1B] + ldr r0, [r4] + ldr r3, _081336CC @ =0x000002c3 + adds r0, r3 + movs r1, 0x1 + strb r1, [r0] + ldr r1, [r4] + ldrb r0, [r1, 0x18] + cmp r0, 0x2 + beq _081336D0 + movs r0, 0x1 + bl sub_813360C + b _08133796 + .align 2, 0 +_081336C8: .4byte gUnknown_030007B0 +_081336CC: .4byte 0x000002c3 +_081336D0: + ldrb r2, [r1, 0x19] + ldrb r0, [r1, 0x1A] + subs r0, 0x3 + cmp r2, r0 + beq _08133796 + adds r0, r2, 0x1 +_081336DC: + strb r0, [r1, 0x19] + ldr r1, [r4] + ldrb r0, [r1, 0x1E] + adds r0, 0x1 + strb r0, [r1, 0x1E] + b _08133796 +_081336E8: + ldrh r1, [r2, 0x2E] + movs r0, 0x1 + ands r0, r1 + cmp r0, 0 + beq _0813376C + movs r0, 0x5 + bl PlaySE + ldr r5, _08133738 @ =gUnknown_030007B0 + ldr r2, [r5] + ldrb r1, [r2, 0x1B] + ldrb r0, [r2, 0x1A] + subs r0, 0x1 + cmp r1, r0 + beq _08133748 + movs r0, 0x8 + strb r0, [r2] + ldr r0, _0813373C @ =gStringVar2 + ldr r1, [r5] + ldrb r3, [r1, 0x1B] + lsls r2, r3, 1 + adds r2, r3 + lsls r2, 3 + adds r2, r3 + adds r2, 0x52 + adds r1, r2 + bl StringCopy + ldr r4, _08133740 @ =gStringVar4 + ldr r1, _08133744 @ =gOtherText_TeachSpecificMove + adds r0, r4, 0 + bl StringExpandPlaceholders + adds r0, r4, 0 + movs r1, 0x3 + movs r2, 0xF + bl MenuPrintMessage + b _08133796 + .align 2, 0 +_08133738: .4byte gUnknown_030007B0 +_0813373C: .4byte gStringVar2 +_08133740: .4byte gStringVar4 +_08133744: .4byte gOtherText_TeachSpecificMove +_08133748: + ldr r4, _08133764 @ =gStringVar4 + ldr r1, _08133768 @ =gOtherText_GiveUpTeachingMove + adds r0, r4, 0 + bl StringExpandPlaceholders + adds r0, r4, 0 + movs r1, 0x3 + movs r2, 0xF + bl MenuPrintMessage + ldr r1, [r5] + movs r0, 0xC + strb r0, [r1] + b _08133796 + .align 2, 0 +_08133764: .4byte gStringVar4 +_08133768: .4byte gOtherText_GiveUpTeachingMove +_0813376C: + movs r0, 0x2 + ands r0, r1 + cmp r0, 0 + beq _08133796 + movs r0, 0x5 + bl PlaySE + ldr r0, _081337D4 @ =gUnknown_030007B0 + ldr r1, [r0] + movs r0, 0xC + strb r0, [r1] + ldr r4, _081337D8 @ =gStringVar4 + ldr r1, _081337DC @ =gOtherText_GiveUpTeachingMove + adds r0, r4, 0 + bl StringExpandPlaceholders + adds r0, r4, 0 + movs r1, 0x3 + movs r2, 0xF + bl MenuPrintMessage +_08133796: + ldr r0, _081337D4 @ =gUnknown_030007B0 + ldr r4, [r0] + ldrb r0, [r4, 0x1A] + cmp r0, 0x3 + bls _081337F8 + ldr r3, _081337E0 @ =gSprites + adds r5, r3, 0 + adds r5, 0xC6 + ldrb r0, [r5] + movs r1, 0x5 + negs r1, r1 + adds r2, r1, 0 + ands r2, r0 + strb r2, [r5] + movs r0, 0x85 + lsls r0, 1 + adds r0, r3 + mov r12, r0 + ldrb r0, [r0] + adds r3, r1, 0 + ands r3, r0 + mov r1, r12 + strb r3, [r1] + ldrb r0, [r4, 0x19] + cmp r0, 0 + bne _081337E4 + movs r1, 0x4 + adds r0, r2, 0 + orrs r0, r1 + strb r0, [r5] + b _081337F8 + .align 2, 0 +_081337D4: .4byte gUnknown_030007B0 +_081337D8: .4byte gStringVar4 +_081337DC: .4byte gOtherText_GiveUpTeachingMove +_081337E0: .4byte gSprites +_081337E4: + ldrb r1, [r4, 0x19] + ldrb r0, [r4, 0x1A] + subs r0, 0x3 + cmp r1, r0 + bne _081337F8 + movs r1, 0x4 + adds r0, r3, 0 + orrs r0, r1 + mov r3, r12 + strb r0, [r3] +_081337F8: + pop {r4,r5} + pop {r0} + bx r0 + thumb_func_end sub_813362C + + thumb_func_start sub_8133800 +sub_8133800: @ 8133800 + push {r4-r7,lr} + mov r7, r10 + mov r6, r9 + mov r5, r8 + push {r5-r7} + ldr r1, _08133834 @ =gUnknown_030007B0 + ldr r0, [r1] + ldrb r6, [r0, 0x19] + ldr r3, _08133838 @ =gTileBuffer + mov r10, r1 + ldr r0, _0813383C @ =gBattleMoves + mov r9, r0 + movs r1, 0x2 + mov r8, r1 +_0813381C: + mov r4, r10 + ldr r2, [r4] + ldrb r0, [r2, 0x1A] + cmp r6, r0 + bcc _08133844 + adds r0, r3, 0 + ldr r1, _08133840 @ =gEmptyString_81E72B0 + movs r2, 0x90 + movs r3, 0 + bl sub_8072C74 + b _081338FA + .align 2, 0 +_08133834: .4byte gUnknown_030007B0 +_08133838: .4byte gTileBuffer +_0813383C: .4byte gBattleMoves +_08133840: .4byte gEmptyString_81E72B0 +_08133844: + ldrb r0, [r2, 0x1A] + subs r0, 0x1 + cmp r6, r0 + bne _08133860 + adds r0, r3, 0 + ldr r1, _0813385C @ =gUnknownText_Exit + movs r2, 0x90 + movs r3, 0 + bl sub_8072C74 + b _081338FA + .align 2, 0 +_0813385C: .4byte gUnknownText_Exit +_08133860: + lsls r1, r6, 1 + adds r0, r2, 0 + adds r0, 0x20 + adds r0, r1 + ldrh r5, [r0] + movs r4, 0xB1 + lsls r4, 2 + adds r0, r2, r4 + ldrb r0, [r0] + adds r7, r1, 0 + cmp r0, 0 + beq _081338A4 + ldr r1, _0813389C @ =gContestMoves + lsls r0, r5, 3 + adds r0, r1 + ldrb r0, [r0, 0x1] + lsls r0, 29 + lsrs r0, 27 + ldr r1, _081338A0 @ =gUnknown_083CAF70 + adds r0, r1 + ldr r1, [r0] + adds r0, r3, 0 + movs r2, 0x27 + movs r3, 0 + bl sub_8072C74 + adds r3, r0, 0 + lsls r4, r5, 1 + b _081338C2 + .align 2, 0 +_0813389C: .4byte gContestMoves +_081338A0: .4byte gUnknown_083CAF70 +_081338A4: + lsls r4, r5, 1 + adds r0, r4, r5 + lsls r0, 2 + add r0, r9 + ldrb r0, [r0, 0x2] + lsls r1, r0, 3 + subs r1, r0 + ldr r0, _08133938 @ =gTypeNames + adds r1, r0 + adds r0, r3, 0 + movs r2, 0x27 + movs r3, 0 + bl sub_8072C74 + adds r3, r0, 0 +_081338C2: + adds r0, r7, r6 + lsls r0, 3 + adds r0, r6 + adds r0, 0x52 + mov r2, r10 + ldr r1, [r2] + adds r1, r0 + adds r0, r3, 0 + movs r2, 0x72 + movs r3, 0 + bl sub_8072C74 + adds r3, r0, 0 + movs r0, 0xCA + strb r0, [r3] + strb r0, [r3, 0x1] + movs r0, 0xBA + strb r0, [r3, 0x2] + adds r3, 0x3 + adds r0, r4, r5 + lsls r0, 2 + add r0, r9 + ldrb r1, [r0, 0x4] + adds r0, r3, 0 + movs r2, 0x90 + movs r3, 0 + bl sub_8072C14 +_081338FA: + adds r3, r0, 0 + movs r0, 0xFE + strb r0, [r3] + adds r3, 0x1 + adds r0, r6, 0x1 + lsls r0, 24 + lsrs r6, r0, 24 + movs r4, 0x1 + negs r4, r4 + add r8, r4 + mov r0, r8 + cmp r0, 0 + blt _08133916 + b _0813381C +_08133916: + movs r0, 0xFF + strb r0, [r3] + ldr r0, _0813393C @ =gTileBuffer + movs r1, 0xB + movs r2, 0x1 + bl MenuPrint + movs r0, 0 + bl sub_813360C + pop {r3-r5} + mov r8, r3 + mov r9, r4 + mov r10, r5 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08133938: .4byte gTypeNames +_0813393C: .4byte gTileBuffer + thumb_func_end sub_8133800 + + thumb_func_start sub_8133940 +sub_8133940: @ 8133940 + push {r4-r7,lr} + sub sp, 0x34 + adds r4, r1, 0 + lsls r0, 16 + lsrs r5, r0, 16 + ldr r1, _08133968 @ =gExpandedPlaceholder_Empty + mov r0, sp + bl StringCopy + ldrb r0, [r4, 0x2] + subs r0, 0x1 + cmp r0, 0x6 + bls _0813395C + b _08133AE2 +_0813395C: + lsls r0, 2 + ldr r1, _0813396C @ =_08133970 + adds r0, r1 + ldr r0, [r0] + mov pc, r0 + .align 2, 0 +_08133968: .4byte gExpandedPlaceholder_Empty +_0813396C: .4byte _08133970 + .align 2, 0 +_08133970: + .4byte _08133AE2 + .4byte _0813398C + .4byte _08133AE2 + .4byte _081339A4 + .4byte _08133AE2 + .4byte _081339E4 + .4byte _08133A64 +_0813398C: + ldr r0, _081339A0 @ =gBattleMoves + lsls r1, r5, 1 + adds r1, r5 + lsls r1, 2 + adds r1, r0 + ldrb r0, [r1, 0x1] + cmp r0, 0x1 + bls _081339B4 + ldrb r1, [r1, 0x1] + b _081339CE + .align 2, 0 +_081339A0: .4byte gBattleMoves +_081339A4: + ldr r0, _081339C4 @ =gBattleMoves + lsls r1, r5, 1 + adds r1, r5 + lsls r1, 2 + adds r1, r0 + ldrb r0, [r1, 0x3] + cmp r0, 0 + bne _081339CC +_081339B4: + ldr r1, _081339C8 @ =gOtherText_ThreeDashes2 + mov r0, sp + movs r2, 0x20 + movs r3, 0x2 + bl sub_8072C74 + b _081339D8 + .align 2, 0 +_081339C4: .4byte gBattleMoves +_081339C8: .4byte gOtherText_ThreeDashes2 +_081339CC: + ldrb r1, [r1, 0x3] +_081339CE: + mov r0, sp + movs r2, 0x20 + movs r3, 0x2 + bl sub_8072C14 +_081339D8: + ldrb r1, [r4] + ldrb r2, [r4, 0x1] + mov r0, sp + bl MenuPrint + b _08133AE2 +_081339E4: + ldrb r2, [r4] + ldrb r1, [r4, 0x1] + adds r3, r1, 0x1 + lsls r3, 24 + lsrs r3, 24 + adds r0, r2, 0 + bl MenuZeroFillWindowRect + ldr r2, _08133A34 @ =gContestEffects + ldr r1, _08133A38 @ =gContestMoves + lsls r0, r5, 3 + adds r0, r1 + ldrb r0, [r0] + lsls r0, 2 + adds r0, r2 + ldrb r0, [r0, 0x1] + movs r1, 0xA + bl __udivsi3 + lsls r0, 24 + lsrs r5, r0, 24 + cmp r5, 0xFF + bne _08133A14 + movs r5, 0 +_08133A14: + movs r4, 0 + ldr r7, _08133A3C @ =gUnknown_030007B0 + ldr r6, _08133A40 @ =gSprites +_08133A1A: + cmp r4, r5 + bcs _08133A44 + ldr r0, [r7] + adds r0, r4 + ldrb r1, [r0, 0x7] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r6 + movs r1, 0x1 + bl StartSpriteAnim + b _08133A58 + .align 2, 0 +_08133A34: .4byte gContestEffects +_08133A38: .4byte gContestMoves +_08133A3C: .4byte gUnknown_030007B0 +_08133A40: .4byte gSprites +_08133A44: + ldr r0, [r7] + adds r0, r4 + ldrb r1, [r0, 0x7] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r6 + movs r1, 0 + bl StartSpriteAnim +_08133A58: + adds r0, r4, 0x1 + lsls r0, 24 + lsrs r4, r0, 24 + cmp r4, 0x7 + bls _08133A1A + b _08133AE2 +_08133A64: + ldrb r2, [r4] + ldrb r1, [r4, 0x1] + adds r3, r1, 0x1 + lsls r3, 24 + lsrs r3, 24 + adds r0, r2, 0 + bl MenuZeroFillWindowRect + ldr r2, _08133AB4 @ =gContestEffects + ldr r1, _08133AB8 @ =gContestMoves + lsls r0, r5, 3 + adds r0, r1 + ldrb r0, [r0] + lsls r0, 2 + adds r0, r2 + ldrb r0, [r0, 0x2] + movs r1, 0xA + bl __udivsi3 + lsls r0, 24 + lsrs r5, r0, 24 + cmp r5, 0xFF + bne _08133A94 + movs r5, 0 +_08133A94: + movs r4, 0 + ldr r7, _08133ABC @ =gUnknown_030007B0 + ldr r6, _08133AC0 @ =gSprites +_08133A9A: + cmp r4, r5 + bcs _08133AC4 + ldr r0, [r7] + adds r0, r4 + ldrb r1, [r0, 0xF] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r6 + movs r1, 0x3 + bl StartSpriteAnim + b _08133AD8 + .align 2, 0 +_08133AB4: .4byte gContestEffects +_08133AB8: .4byte gContestMoves +_08133ABC: .4byte gUnknown_030007B0 +_08133AC0: .4byte gSprites +_08133AC4: + ldr r0, [r7] + adds r0, r4 + ldrb r1, [r0, 0xF] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r6 + movs r1, 0x2 + bl StartSpriteAnim +_08133AD8: + adds r0, r4, 0x1 + lsls r0, 24 + lsrs r4, r0, 24 + cmp r4, 0x7 + bls _08133A9A +_08133AE2: + add sp, 0x34 + pop {r4-r7} + pop {r0} + bx r0 + thumb_func_end sub_8133940 + + thumb_func_start sub_8133AEC +sub_8133AEC: @ 8133AEC + push {r4-r7,lr} + mov r7, r8 + push {r7} + sub sp, 0x8 + lsls r0, 24 + lsrs r3, r0, 24 + ldr r6, _08133B88 @ =gUnknown_030007B0 + ldr r2, [r6] + ldrb r1, [r2, 0x1B] + ldrb r0, [r2, 0x1A] + subs r0, 0x1 + cmp r1, r0 + bne _08133B08 + b _08133C04 +_08133B08: + lsls r1, 1 + adds r0, r2, 0 + adds r0, 0x20 + adds r0, r1 + ldrh r5, [r0] + cmp r3, 0 + beq _08133BA0 + movs r4, 0 + lsls r0, r5, 3 + mov r8, r0 + ldr r7, _08133B8C @ =gSprites + adds r3, r6, 0 + movs r6, 0x5 + negs r6, r6 +_08133B24: + ldr r0, [r3] + adds r0, r4 + ldrb r0, [r0, 0x7] + lsls r1, r0, 4 + adds r1, r0 + lsls r1, 2 + adds r1, r7 + adds r1, 0x3E + ldrb r2, [r1] + adds r0, r6, 0 + ands r0, r2 + strb r0, [r1] + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, 0xF + bls _08133B24 + movs r4, 0 +_08133B48: + ldr r0, _08133B90 @ =gUnknown_08402E3D + adds r0, r4, r0 + ldrb r0, [r0] + lsls r1, r0, 1 + adds r1, r0 + ldr r0, _08133B94 @ =gUnknown_08402E24 + adds r1, r0 + adds r0, r5, 0 + bl sub_8133940 + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, 0x2 + bls _08133B48 + ldr r1, _08133B98 @ =gUnknown_083CADD4 + ldr r0, _08133B9C @ =gContestMoves + add r0, r8 + ldrb r0, [r0] + lsls r0, 2 + adds r0, r1 + ldr r0, [r0] + movs r1, 0x20 + str r1, [sp] + movs r1, 0x1 + str r1, [sp, 0x4] + movs r1, 0x58 + movs r2, 0x48 + movs r3, 0x90 + bl sub_8072AB0 + b _08133C92 + .align 2, 0 +_08133B88: .4byte gUnknown_030007B0 +_08133B8C: .4byte gSprites +_08133B90: .4byte gUnknown_08402E3D +_08133B94: .4byte gUnknown_08402E24 +_08133B98: .4byte gUnknown_083CADD4 +_08133B9C: .4byte gContestMoves +_08133BA0: + movs r4, 0 + subs r6, r5, 0x1 +_08133BA4: + ldr r0, _08133BF8 @ =gUnknown_08402E39 + adds r0, r4, r0 + ldrb r0, [r0] + lsls r1, r0, 1 + adds r1, r0 + ldr r0, _08133BFC @ =gUnknown_08402E24 + adds r1, r0 + adds r0, r5, 0 + bl sub_8133940 + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, 0x3 + bls _08133BA4 + ldr r1, _08133C00 @ =gMoveDescriptions + lsls r0, r6, 2 + adds r0, r1 + ldr r0, [r0] + movs r1, 0x1 + str r1, [sp] + movs r1, 0x58 + movs r2, 0x48 + movs r3, 0x90 + bl sub_8072A18 + lsls r0, 24 + lsrs r0, 24 + cmp r0, 0x1 + bhi _08133C92 + lsls r1, r0, 25 + movs r0, 0x90 + lsls r0, 20 + adds r1, r0 + lsrs r1, 24 + movs r0, 0xB + movs r2, 0x1C + movs r3, 0xC + bl MenuFillWindowRectWithBlankTile + b _08133C92 + .align 2, 0 +_08133BF8: .4byte gUnknown_08402E39 +_08133BFC: .4byte gUnknown_08402E24 +_08133C00: .4byte gMoveDescriptions +_08133C04: + cmp r3, 0 + beq _08133C5C + ldr r4, _08133C54 @ =gUnknown_08402E24 + ldrb r2, [r4, 0xF] + ldrb r1, [r4, 0x10] + adds r3, r1, 0x1 + lsls r3, 24 + lsrs r3, 24 + adds r0, r2, 0 + bl MenuZeroFillWindowRect + ldrb r2, [r4, 0x12] + ldrb r1, [r4, 0x13] + adds r3, r1, 0x1 + lsls r3, 24 + lsrs r3, 24 + adds r0, r2, 0 + bl MenuZeroFillWindowRect + movs r4, 0 + ldr r5, _08133C58 @ =gSprites + adds r3, r6, 0 + movs r2, 0x4 +_08133C32: + ldr r0, [r3] + adds r0, r4 + ldrb r1, [r0, 0x7] + lsls r0, r1, 4 + adds r0, r1 + lsls r0, 2 + adds r0, r5 + adds r0, 0x3E + ldrb r1, [r0] + orrs r1, r2 + strb r1, [r0] + adds r0, r4, 0x1 + lsls r0, 16 + lsrs r4, r0, 16 + cmp r4, 0xF + bls _08133C32 + b _08133C86 + .align 2, 0 +_08133C54: .4byte gUnknown_08402E24 +_08133C58: .4byte gSprites +_08133C5C: + ldr r4, _08133CA0 @ =gUnknown_08402E24 + ldrb r0, [r4, 0x3] + ldrb r1, [r4, 0x4] + adds r2, r0, 0x3 + lsls r2, 24 + lsrs r2, 24 + adds r3, r1, 0x1 + lsls r3, 24 + lsrs r3, 24 + bl MenuZeroFillWindowRect + ldrb r0, [r4, 0x9] + ldrb r1, [r4, 0xA] + adds r2, r0, 0x3 + lsls r2, 24 + lsrs r2, 24 + adds r3, r1, 0x1 + lsls r3, 24 + lsrs r3, 24 + bl MenuZeroFillWindowRect +_08133C86: + movs r0, 0xB + movs r1, 0x9 + movs r2, 0x1C + movs r3, 0xC + bl MenuZeroFillWindowRect +_08133C92: + add sp, 0x8 + pop {r3} + mov r8, r3 + pop {r4-r7} + pop {r0} + bx r0 + .align 2, 0 +_08133CA0: .4byte gUnknown_08402E24 + thumb_func_end sub_8133AEC + + thumb_func_start sub_8133CA4 +sub_8133CA4: @ 8133CA4 + push {lr} + movs r0, 0x15 + movs r1, 0x7 + movs r2, 0x1B + movs r3, 0xC + bl MenuZeroFillWindowRect + ldr r0, _08133CC8 @ =gUnknown_030007B0 + ldr r0, [r0] + movs r1, 0xB1 + lsls r1, 2 + adds r0, r1 + ldrb r0, [r0] + movs r1, 0 + bl sub_8133AEC + pop {r0} + bx r0 + .align 2, 0 +_08133CC8: .4byte gUnknown_030007B0 + thumb_func_end sub_8133CA4 + + .align 2, 0 @ Don't pad with nop. diff --git a/ld_script.txt b/ld_script.txt index c9c0191c7..380473480 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -240,7 +240,12 @@ SECTIONS { asm/mystery_event_script.o(.text); asm/field_effect_helpers.o(.text); asm/contest_ai.o(.text); - asm/rom_81258BC.o(.text); + asm/battle_anim_81258BC.o(.text); + asm/fldeff_sweetscent.o(.text); + asm/battle_anim_812C144.o(.text); + asm/learn_move.o(.text); + asm/fldeff_softboiled.o(.text); + asm/decoration_inventory.o(.text); asm/roamer.o(.text); asm/battle_tower.o(.text); asm/use_pokeblock.o(.text);