summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/field_specials.s1551
-rw-r--r--common_syms/field_specials.txt1
-rw-r--r--data/field_specials.s186
-rw-r--r--graphics/misc/deoxys1.pal19
-rw-r--r--graphics/misc/deoxys10.pal19
-rw-r--r--graphics/misc/deoxys11.pal19
-rw-r--r--graphics/misc/deoxys2.pal19
-rw-r--r--graphics/misc/deoxys3.pal19
-rw-r--r--graphics/misc/deoxys4.pal19
-rw-r--r--graphics/misc/deoxys5.pal19
-rw-r--r--graphics/misc/deoxys6.pal19
-rw-r--r--graphics/misc/deoxys7.pal19
-rw-r--r--graphics/misc/deoxys8.pal19
-rw-r--r--graphics/misc/deoxys9.pal19
-rw-r--r--graphics/unknown/unknown_5B3280.pal179
-rw-r--r--include/decoration.h1
-rw-r--r--include/field_effect.h5
-rw-r--r--include/field_specials.h2
-rw-r--r--include/menu.h1
-rw-r--r--include/party_menu.h2
-rw-r--r--include/strings.h168
-rw-r--r--src/field_specials.c876
-rw-r--r--src/menu.c1
23 files changed, 1230 insertions, 1952 deletions
diff --git a/asm/field_specials.s b/asm/field_specials.s
index 6e6329a42..8b2fe920e 100644
--- a/asm/field_specials.s
+++ b/asm/field_specials.s
@@ -5,1557 +5,6 @@
.text
- thumb_func_start sub_813A4EC
-sub_813A4EC: @ 813A4EC
- push {r4-r6,lr}
- lsls r0, 24
- lsrs r5, r0, 24
- lsls r0, r5, 2
- adds r0, r5
- lsls r0, 3
- ldr r1, =gTasks
- adds r6, r0, r1
- ldrh r0, [r6, 0x24]
- lsls r0, 24
- lsrs r0, 24
- bl ListMenuHandleInputGetItemId
- adds r4, r0, 0
- movs r0, 0x2
- negs r0, r0
- cmp r4, r0
- beq _0813A51C
- adds r0, 0x1
- cmp r4, r0
- bne _0813A530
- b _0813A566
- .pool
-_0813A51C:
- ldr r1, =gSpecialVar_Result
- movs r0, 0x7F
- strh r0, [r1]
- movs r0, 0x5
- bl PlaySE
- b _0813A54C
- .pool
-_0813A530:
- ldr r0, =gSpecialVar_Result
- strh r4, [r0]
- movs r0, 0x5
- bl PlaySE
- movs r1, 0x14
- ldrsh r0, [r6, r1]
- cmp r0, 0
- beq _0813A54C
- movs r1, 0xA
- ldrsh r0, [r6, r1]
- subs r0, 0x1
- cmp r4, r0
- bne _0813A558
-_0813A54C:
- adds r0, r5, 0
- bl sub_813A570
- b _0813A566
- .pool
-_0813A558:
- adds r0, r5, 0
- bl sub_813A738
- ldr r0, =sub_813A600
- str r0, [r6]
- bl EnableBothScriptContexts
-_0813A566:
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A4EC
-
- thumb_func_start sub_813A570
-sub_813A570: @ 813A570
- push {r4,r5,lr}
- sub sp, 0x4
- adds r5, r0, 0
- lsls r5, 24
- lsrs r5, 24
- lsls r4, r5, 2
- adds r4, r5
- lsls r4, 3
- ldr r0, =gTasks
- adds r4, r0
- ldrh r0, [r4, 0x24]
- lsls r0, 24
- lsrs r0, 24
- mov r1, sp
- bl ListMenuGetCurrentItemArrayId
- ldrh r0, [r4, 0x1E]
- mov r1, sp
- ldrh r1, [r1]
- bl sub_813AC44
- adds r0, r5, 0
- bl sub_813A738
- ldrh r0, [r4, 0x24]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0
- movs r2, 0
- bl DestroyListMenuTask
- ldr r0, =gUnknown_0203AB64
- ldr r0, [r0]
- bl Free
- ldrh r0, [r4, 0x22]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0x1
- bl sub_8198070
- ldrh r0, [r4, 0x22]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0
- bl FillWindowPixelBuffer
- ldrh r0, [r4, 0x22]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0x2
- bl CopyWindowToVram
- ldrh r0, [r4, 0x22]
- lsls r0, 24
- lsrs r0, 24
- bl RemoveWindow
- adds r0, r5, 0
- bl DestroyTask
- bl EnableBothScriptContexts
- add sp, 0x4
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A570
-
- thumb_func_start sub_813A600
-sub_813A600: @ 813A600
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- ldr r2, =gTasks
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- adds r1, r2
- movs r2, 0x14
- ldrsh r0, [r1, r2]
- cmp r0, 0x1
- beq _0813A624
- cmp r0, 0x2
- bne _0813A624
- movs r0, 0x1
- strh r0, [r1, 0x14]
- ldr r0, =sub_813A664
- str r0, [r1]
-_0813A624:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A600
-
- thumb_func_start sub_813A630
-sub_813A630: @ 813A630
- push {lr}
- ldr r0, =sub_813A600
- bl FindTaskIdByFunc
- lsls r0, 24
- lsrs r2, r0, 24
- cmp r2, 0xFF
- bne _0813A64C
- bl EnableBothScriptContexts
- b _0813A65C
- .pool
-_0813A64C:
- ldr r0, =gTasks
- lsls r1, r2, 2
- adds r1, r2
- lsls r1, 3
- adds r1, r0
- ldrh r0, [r1, 0x14]
- adds r0, 0x1
- strh r0, [r1, 0x14]
-_0813A65C:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A630
-
- thumb_func_start sub_813A664
-sub_813A664: @ 813A664
- push {r4,lr}
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- bl ScriptContext2_Enable
- adds r0, r4, 0
- bl sub_813A694
- ldr r1, =gTasks
- lsls r0, r4, 2
- adds r0, r4
- lsls r0, 3
- adds r0, r1
- ldr r1, =sub_813A4EC
- str r1, [r0]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A664
-
- thumb_func_start sub_813A694
-sub_813A694: @ 813A694
- push {r4,r5,lr}
- sub sp, 0x10
- lsls r0, 24
- lsrs r0, 24
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- ldr r0, =gTasks
- adds r4, r1, r0
- mov r1, sp
- ldr r0, =gUnknown_085B3030
- ldm r0!, {r2,r3,r5}
- stm r1!, {r2,r3,r5}
- ldr r0, [r0]
- str r0, [r1]
- movs r0, 0x8
- ldrsh r1, [r4, r0]
- movs r2, 0xA
- ldrsh r0, [r4, r2]
- cmp r1, r0
- beq _0813A724
- mov r2, sp
- movs r3, 0x10
- ldrsh r1, [r4, r3]
- lsrs r0, r1, 31
- adds r1, r0
- asrs r1, 1
- lsls r1, 3
- adds r1, 0xC
- movs r5, 0xC
- ldrsh r0, [r4, r5]
- subs r0, 0x1
- lsls r0, 3
- adds r1, r0
- movs r3, 0
- strb r1, [r2, 0x1]
- mov r1, sp
- movs r0, 0x8
- strb r0, [r1, 0x2]
- movs r0, 0x10
- ldrsh r1, [r4, r0]
- lsrs r0, r1, 31
- adds r1, r0
- asrs r1, 1
- lsls r1, 3
- adds r1, 0xC
- movs r5, 0xC
- ldrsh r0, [r4, r5]
- subs r0, 0x1
- lsls r0, 3
- adds r1, r0
- strb r1, [r2, 0x4]
- mov r1, sp
- movs r2, 0x12
- ldrsh r0, [r4, r2]
- lsls r0, 3
- adds r0, 0xA
- strb r0, [r1, 0x5]
- mov r0, sp
- strh r3, [r0, 0x6]
- mov r2, sp
- ldrh r0, [r4, 0xA]
- ldrh r1, [r4, 0x8]
- subs r0, r1
- strh r0, [r2, 0x8]
- ldr r1, =gUnknown_0203AB68
- mov r0, sp
- bl AddScrollIndicatorArrowPair
- lsls r0, 24
- lsrs r0, 24
- strh r0, [r4, 0x20]
-_0813A724:
- add sp, 0x10
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A694
-
- thumb_func_start sub_813A738
-sub_813A738: @ 813A738
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- ldr r0, =gTasks
- adds r2, r1, r0
- movs r0, 0x8
- ldrsh r1, [r2, r0]
- movs r3, 0xA
- ldrsh r0, [r2, r3]
- cmp r1, r0
- beq _0813A75E
- ldrh r0, [r2, 0x20]
- lsls r0, 24
- lsrs r0, 24
- bl RemoveScrollIndicatorArrowPair
-_0813A75E:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A738
-
- thumb_func_start nullsub_55
-nullsub_55: @ 813A768
- bx lr
- thumb_func_end nullsub_55
-
- thumb_func_start sub_813A76C
-sub_813A76C: @ 813A76C
- push {r4-r6,lr}
- movs r4, 0
- ldr r6, =gLinkPlayers
- ldr r0, =0x0000401f
- adds r5, r0, 0
-_0813A776:
- lsls r0, r4, 3
- subs r0, r4
- lsls r0, 2
- adds r0, r6
- ldrb r0, [r0, 0x13]
- cmp r0, 0
- bne _0813A79C
- subs r0, r5, r4
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0
- bl VarSet
- b _0813A7A8
- .pool
-_0813A79C:
- subs r0, r5, r4
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x69
- bl VarSet
-_0813A7A8:
- adds r0, r4, 0x1
- lsls r0, 24
- lsrs r4, r0, 24
- cmp r4, 0x1
- bls _0813A776
- pop {r4-r6}
- pop {r0}
- bx r0
- thumb_func_end sub_813A76C
-
- thumb_func_start sub_813A7B8
-sub_813A7B8: @ 813A7B8
- push {lr}
- ldr r1, =gSpecialVar_0x8004
- ldrh r0, [r1]
- cmp r0, 0x5
- bls _0813A7C6
- movs r0, 0
- strh r0, [r1]
-_0813A7C6:
- ldrh r1, [r1]
- movs r0, 0x64
- muls r0, r1
- ldr r1, =gPlayerParty
- adds r0, r1
- bl GetNature
- lsls r0, 24
- ldr r1, =gUnknown_085B3040
- lsrs r0, 22
- adds r0, r1
- ldr r0, [r0]
- bl ShowFieldMessage
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A7B8
-
- thumb_func_start UpdateFrontierGambler
-UpdateFrontierGambler: @ 813A7F4
- push {r4,r5,lr}
- adds r4, r0, 0
- lsls r4, 16
- lsrs r4, 16
- ldr r0, =0x00004030
- bl GetVarPointer
- adds r5, r0, 0
- ldrh r0, [r5]
- adds r4, r0
- strh r4, [r5]
- ldrh r0, [r5]
- movs r1, 0xC
- bl __umodsi3
- strh r0, [r5]
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end UpdateFrontierGambler
-
- thumb_func_start sub_813A820
-sub_813A820: @ 813A820
- push {r4,lr}
- ldr r0, =0x00004030
- bl VarGet
- adds r4, r0, 0
- lsls r4, 16
- lsrs r4, 16
- ldr r1, =gUnknown_085B30A4
- lsls r0, r4, 2
- adds r0, r1
- ldr r0, [r0]
- bl ShowFieldMessage
- ldr r0, =0x00004031
- adds r1, r4, 0
- bl VarSet
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A820
-
- thumb_func_start sub_813A854
-sub_813A854: @ 813A854
- push {r4,lr}
- ldr r4, =gUnknown_085B30D4
- ldr r0, =0x00004031
- bl VarGet
- lsls r0, 16
- lsrs r0, 14
- adds r0, r4
- ldr r0, [r0]
- bl ShowFieldMessage
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A854
-
- thumb_func_start sub_813A878
-sub_813A878: @ 813A878
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- lsls r0, 24
- lsrs r0, 24
- mov r8, r0
- ldr r0, =0x000040ce
- bl VarGet
- lsls r0, 16
- lsrs r7, r0, 16
- ldr r0, =0x00004031
- bl VarGet
- lsls r0, 16
- lsrs r6, r0, 16
- ldr r0, =0x000040cf
- bl VarGet
- lsls r0, 16
- lsrs r5, r0, 16
- ldr r4, =0x00004033
- adds r0, r4, 0
- bl VarGet
- lsls r0, 16
- lsrs r0, 16
- cmp r0, 0x1
- bne _0813A8F0
- ldr r1, =gUnknown_085B3104
- lsls r0, r6, 1
- adds r0, r1
- ldrh r1, [r0]
- lsls r0, r5, 8
- adds r0, r7
- cmp r1, r0
- bne _0813A8F0
- mov r0, r8
- cmp r0, 0
- beq _0813A8E8
- adds r0, r4, 0
- movs r1, 0x2
- bl VarSet
- b _0813A8F0
- .pool
-_0813A8E8:
- adds r0, r4, 0
- movs r1, 0x3
- bl VarSet
-_0813A8F0:
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_813A878
-
- thumb_func_start sub_813A8FC
-sub_813A8FC: @ 813A8FC
- push {lr}
- sub sp, 0x2C
- ldr r0, =gSaveBlock2Ptr
- ldr r0, [r0]
- ldr r1, =0x00000eb8
- adds r0, r1
- ldrh r1, [r0]
- add r0, sp, 0xC
- movs r2, 0x1
- movs r3, 0x4
- bl ConvertIntToDecimalStringN
- ldr r1, =gText_BP
- bl StringCopy
- movs r0, 0x1
- add r1, sp, 0xC
- movs r2, 0x30
- bl GetStringRightAlignXOffset
- adds r3, r0, 0
- ldr r0, =gUnknown_0203AB6D
- ldrb r0, [r0]
- lsls r3, 24
- lsrs r3, 24
- movs r1, 0x1
- str r1, [sp]
- movs r1, 0
- str r1, [sp, 0x4]
- str r1, [sp, 0x8]
- movs r1, 0x1
- add r2, sp, 0xC
- bl PrintTextOnWindow
- add sp, 0x2C
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A8FC
-
- thumb_func_start sub_813A958
-sub_813A958: @ 813A958
- push {r4,lr}
- ldr r4, =gUnknown_0203AB6D
- ldr r0, =gUnknown_085B311C
- bl AddWindow
- strb r0, [r4]
- ldrb r0, [r4]
- movs r1, 0
- bl SetStandardWindowBorderStyle
- bl sub_813A8FC
- ldrb r0, [r4]
- movs r1, 0x2
- bl CopyWindowToVram
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A958
-
- thumb_func_start sub_813A988
-sub_813A988: @ 813A988
- push {r4,lr}
- ldr r4, =gUnknown_0203AB6D
- ldrb r0, [r4]
- movs r1, 0x1
- bl sub_8198070
- ldrb r0, [r4]
- bl RemoveWindow
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813A988
-
- thumb_func_start sub_813A9A4
-sub_813A9A4: @ 813A9A4
- push {lr}
- ldr r0, =gSaveBlock2Ptr
- ldr r0, [r0]
- ldr r2, =0x00000eb8
- adds r1, r0, r2
- ldr r0, =gSpecialVar_0x8004
- ldrh r2, [r1]
- ldrh r0, [r0]
- cmp r2, r0
- bcs _0813A9C8
- movs r0, 0
- b _0813A9CA
- .pool
-_0813A9C8:
- subs r0, r2, r0
-_0813A9CA:
- strh r0, [r1]
- pop {r0}
- bx r0
- thumb_func_end sub_813A9A4
-
- thumb_func_start sub_813A9D0
-sub_813A9D0: @ 813A9D0
- push {lr}
- ldr r0, =gSaveBlock2Ptr
- ldr r0, [r0]
- ldr r1, =0x00000eb8
- adds r2, r0, r1
- ldrh r1, [r2]
- ldr r0, =gSpecialVar_0x8004
- ldrh r0, [r0]
- adds r1, r0
- ldr r0, =0x0000270f
- cmp r1, r0
- ble _0813A9FC
- strh r0, [r2]
- b _0813A9FE
- .pool
-_0813A9FC:
- strh r1, [r2]
-_0813A9FE:
- pop {r0}
- bx r0
- thumb_func_end sub_813A9D0
-
- thumb_func_start sub_813AA04
-sub_813AA04: @ 813AA04
- ldr r0, =gSaveBlock2Ptr
- ldr r0, [r0]
- ldr r1, =0x00000eb8
- adds r0, r1
- ldrh r0, [r0]
- bx lr
- .pool
- thumb_func_end sub_813AA04
-
- thumb_func_start sub_813AA18
-sub_813AA18: @ 813AA18
- push {r4,lr}
- ldr r4, =gUnknown_0203AB6E
- ldr r0, =gUnknown_085B3124
- bl AddWindow
- strb r0, [r4]
- ldrb r0, [r4]
- movs r1, 0
- bl SetStandardWindowBorderStyle
- ldrb r0, [r4]
- movs r1, 0x2
- bl CopyWindowToVram
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813AA18
-
- thumb_func_start sub_813AA44
-sub_813AA44: @ 813AA44
- push {r4,lr}
- ldr r4, =gUnknown_0203AB6E
- ldrb r0, [r4]
- movs r1, 0x1
- bl sub_8198070
- ldrb r0, [r4]
- bl RemoveWindow
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813AA44
-
- thumb_func_start sub_813AA60
-sub_813AA60: @ 813AA60
- push {r4,r5,lr}
- sub sp, 0x10
- lsls r0, 16
- lsls r1, 16
- lsrs r5, r1, 16
- lsrs r4, r0, 16
- ldr r1, =0xfffd0000
- adds r0, r1
- lsrs r0, 16
- cmp r0, 0x3
- bls _0813AA78
- b _0813ABC2
-_0813AA78:
- movs r0, 0xD8
- str r0, [sp]
- movs r0, 0x20
- str r0, [sp, 0x4]
- movs r0, 0
- movs r1, 0x11
- movs r2, 0
- movs r3, 0
- bl FillWindowPixelRect
- cmp r4, 0x4
- beq _0813AAE8
- cmp r4, 0x4
- bgt _0813AAA0
- cmp r4, 0x3
- beq _0813AAAA
- b _0813ABC2
- .pool
-_0813AAA0:
- cmp r4, 0x5
- beq _0813AB5C
- cmp r4, 0x6
- beq _0813AB94
- b _0813ABC2
-_0813AAAA:
- ldr r1, =gUnknown_085B3170
- lsls r0, r5, 2
- adds r0, r1
- ldr r2, [r0]
- movs r0, 0
- str r0, [sp]
- movs r0, 0x2
- str r0, [sp, 0x4]
- movs r0, 0x1
- str r0, [sp, 0x8]
- str r4, [sp, 0xC]
- movs r0, 0
- movs r1, 0x1
- movs r3, 0
- bl AddTextPrinterParameterized
- ldr r1, =gUnknown_085B312C
- lsls r0, r5, 1
- adds r1, r0, r1
- ldrh r5, [r1]
- ldr r0, =0x0000ffff
- cmp r5, r0
- beq _0813AB18
- b _0813AB2C
- .pool
-_0813AAE8:
- ldr r1, =gUnknown_085B319C
- lsls r0, r5, 2
- adds r0, r1
- ldr r2, [r0]
- movs r0, 0
- str r0, [sp]
- movs r0, 0x2
- str r0, [sp, 0x4]
- movs r0, 0x1
- str r0, [sp, 0x8]
- movs r0, 0x3
- str r0, [sp, 0xC]
- movs r0, 0
- movs r1, 0x1
- movs r3, 0
- bl AddTextPrinterParameterized
- ldr r1, =gUnknown_085B3142
- lsls r0, r5, 1
- adds r1, r0, r1
- ldrh r5, [r1]
- ldr r0, =0x0000ffff
- cmp r5, r0
- bne _0813AB2C
-_0813AB18:
- ldrh r0, [r1]
- bl sub_813ABD4
- b _0813ABC2
- .pool
-_0813AB2C:
- ldr r4, =0x0000157c
- adds r0, r4, 0
- bl FreeSpriteTilesByTag
- adds r0, r4, 0
- bl FreeSpritePaletteByTag
- lsls r0, r5, 24
- lsrs r0, 24
- str r4, [sp]
- str r4, [sp, 0x4]
- movs r1, 0x21
- movs r2, 0x58
- movs r3, 0
- bl AddDecorationIconObject
- ldr r1, =gUnknown_0203AB6C
- strb r0, [r1]
- b _0813ABC2
- .pool
-_0813AB5C:
- ldr r1, =gUnknown_085B31B4
- lsls r0, r5, 2
- adds r0, r1
- ldr r2, [r0]
- movs r0, 0
- str r0, [sp]
- movs r0, 0x2
- str r0, [sp, 0x4]
- movs r0, 0x1
- str r0, [sp, 0x8]
- movs r0, 0x3
- str r0, [sp, 0xC]
- movs r0, 0
- movs r1, 0x1
- movs r3, 0
- bl AddTextPrinterParameterized
- ldr r1, =gUnknown_085B314E
- lsls r0, r5, 1
- adds r0, r1
- ldrh r0, [r0]
- bl sub_813ABD4
- b _0813ABC2
- .pool
-_0813AB94:
- ldr r1, =gUnknown_085B31D0
- lsls r0, r5, 2
- adds r0, r1
- ldr r2, [r0]
- movs r0, 0
- str r0, [sp]
- movs r0, 0x2
- str r0, [sp, 0x4]
- movs r0, 0x1
- str r0, [sp, 0x8]
- movs r0, 0x3
- str r0, [sp, 0xC]
- movs r0, 0
- movs r1, 0x1
- movs r3, 0
- bl AddTextPrinterParameterized
- ldr r1, =gUnknown_085B315C
- lsls r0, r5, 1
- adds r0, r1
- ldrh r0, [r0]
- bl sub_813ABD4
-_0813ABC2:
- add sp, 0x10
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813AA60
-
- thumb_func_start sub_813ABD4
-sub_813ABD4: @ 813ABD4
- push {r4,r5,lr}
- adds r5, r0, 0
- lsls r5, 16
- lsrs r5, 16
- ldr r4, =0x0000157c
- adds r0, r4, 0
- bl FreeSpriteTilesByTag
- adds r0, r4, 0
- bl FreeSpritePaletteByTag
- adds r0, r4, 0
- adds r1, r4, 0
- adds r2, r5, 0
- bl AddItemIconSprite
- ldr r4, =gUnknown_0203AB6C
- strb r0, [r4]
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x40
- beq _0813AC32
- ldr r3, =gSprites
- ldrb r0, [r4]
- lsls r1, r0, 4
- adds r1, r0
- lsls r1, 2
- adds r1, r3
- ldrb r2, [r1, 0x5]
- movs r0, 0xD
- negs r0, r0
- ands r0, r2
- strb r0, [r1, 0x5]
- ldrb r1, [r4]
- lsls r0, r1, 4
- adds r0, r1
- lsls r0, 2
- adds r0, r3
- movs r1, 0x24
- strh r1, [r0, 0x20]
- ldrb r1, [r4]
- lsls r0, r1, 4
- adds r0, r1
- lsls r0, 2
- adds r0, r3
- movs r1, 0x5C
- strh r1, [r0, 0x22]
-_0813AC32:
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813ABD4
-
- thumb_func_start sub_813AC44
-sub_813AC44: @ 813AC44
- push {lr}
- lsls r0, 16
- lsrs r1, r0, 16
- ldr r2, =gUnknown_0203AB6C
- ldrb r0, [r2]
- cmp r0, 0x40
- beq _0813AC70
- cmp r1, 0x6
- bgt _0813AC6A
- cmp r1, 0x3
- blt _0813AC6A
- adds r1, r0, 0
- lsls r0, r1, 4
- adds r0, r1
- lsls r0, 2
- ldr r1, =gSprites
- adds r0, r1
- bl DestroySpriteAndFreeResources
-_0813AC6A:
- ldr r1, =gUnknown_0203AB6C
- movs r0, 0x40
- strb r0, [r1]
-_0813AC70:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813AC44
-
- thumb_func_start sub_813AC7C
-sub_813AC7C: @ 813AC7C
- push {lr}
- ldr r0, =gSpecialVar_0x8005
- ldrh r0, [r0]
- cmp r0, 0
- beq _0813ACB8
- ldr r0, =gStringVar1
- ldr r2, =gUnknown_085B320C
- ldr r1, =gSpecialVar_0x8004
- ldrh r1, [r1]
- lsls r1, 1
- adds r1, r2
- ldrh r2, [r1]
- movs r1, 0xD
- muls r1, r2
- ldr r2, =gMoveNames
- adds r1, r2
- bl StringCopy
- b _0813ACD2
- .pool
-_0813ACB8:
- ldr r0, =gStringVar1
- ldr r2, =gUnknown_085B31F8
- ldr r1, =gSpecialVar_0x8004
- ldrh r1, [r1]
- lsls r1, 1
- adds r1, r2
- ldrh r2, [r1]
- movs r1, 0xD
- muls r1, r2
- ldr r2, =gMoveNames
- adds r1, r2
- bl StringCopy
-_0813ACD2:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813AC7C
-
- thumb_func_start sub_813ACE8
-sub_813ACE8: @ 813ACE8
- push {r4-r6,lr}
- lsls r0, 24
- lsrs r0, 24
- adds r5, r0, 0
- lsls r1, 16
- lsrs r6, r1, 16
- subs r0, 0x9
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bhi _0813AD20
- ldr r0, =gSpecialVar_0x8006
- ldrh r0, [r0]
- cmp r0, 0
- bne _0813AD18
- ldr r4, =gUnknown_0203AB5E
- ldr r0, =gUnknown_085B3220
- bl AddWindow
- strb r0, [r4]
- ldrb r0, [r4]
- movs r1, 0
- bl SetStandardWindowBorderStyle
-_0813AD18:
- adds r0, r5, 0
- adds r1, r6, 0
- bl sub_813AD34
-_0813AD20:
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813ACE8
-
- thumb_func_start sub_813AD34
-sub_813AD34: @ 813AD34
- push {r4-r7,lr}
- sub sp, 0xC
- lsls r0, 24
- lsls r1, 16
- lsrs r5, r1, 16
- adds r7, r5, 0
- lsrs r6, r0, 24
- movs r1, 0xF7
- lsls r1, 24
- adds r0, r1
- lsrs r0, 24
- cmp r0, 0x1
- bhi _0813ADAC
- ldr r4, =gUnknown_0203AB5E
- ldrb r0, [r4]
- movs r1, 0x60
- str r1, [sp]
- movs r1, 0x30
- str r1, [sp, 0x4]
- movs r1, 0x11
- movs r2, 0
- movs r3, 0
- bl FillWindowPixelRect
- cmp r6, 0xA
- bne _0813AD90
- ldrb r0, [r4]
- ldr r2, =gUnknown_085B3254
- lsls r1, r5, 2
- adds r1, r2
- ldr r2, [r1]
- movs r1, 0x1
- str r1, [sp]
- movs r1, 0
- str r1, [sp, 0x4]
- str r1, [sp, 0x8]
- movs r1, 0x1
- movs r3, 0
- bl PrintTextOnWindow
- b _0813ADAC
- .pool
-_0813AD90:
- ldrb r0, [r4]
- ldr r2, =gUnknown_085B3228
- lsls r1, r7, 2
- adds r1, r2
- ldr r2, [r1]
- movs r1, 0x1
- str r1, [sp]
- movs r1, 0
- str r1, [sp, 0x4]
- str r1, [sp, 0x8]
- movs r1, 0x1
- movs r3, 0
- bl PrintTextOnWindow
-_0813ADAC:
- add sp, 0xC
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813AD34
-
- thumb_func_start sub_813ADB8
-sub_813ADB8: @ 813ADB8
- push {r4,lr}
- ldr r4, =gUnknown_0203AB5E
- ldrb r0, [r4]
- movs r1, 0x1
- bl sub_8198070
- ldrb r0, [r4]
- bl RemoveWindow
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813ADB8
-
- thumb_func_start sub_813ADD4
-sub_813ADD4: @ 813ADD4
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- sub sp, 0x18
- ldr r0, =sub_813A600
- bl FindTaskIdByFunc
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0xFF
- beq _0813AE90
- lsls r0, r1, 2
- adds r0, r1
- lsls r0, 3
- ldr r1, =gTasks
- adds r6, r0, r1
- ldrh r0, [r6, 0x24]
- lsls r0, 24
- lsrs r0, 24
- mov r4, sp
- adds r4, 0x16
- add r1, sp, 0x14
- adds r2, r4, 0
- bl ListMenuGetScrollAndRow
- ldrh r0, [r6, 0x22]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0
- bl SetStandardWindowBorderStyle
- movs r5, 0
- mov r9, r4
- ldr r0, =gUnknown_085B2CF0
- mov r8, r0
- movs r4, 0
-_0813AE1E:
- ldrh r0, [r6, 0x22]
- lsls r0, 24
- lsrs r0, 24
- add r1, sp, 0x14
- ldrh r2, [r1]
- adds r2, r5
- lsls r2, 2
- ldr r1, =gSpecialVar_0x8004
- ldrh r1, [r1]
- lsls r1, 6
- adds r2, r1
- add r2, r8
- ldr r2, [r2]
- lsls r1, r5, 28
- lsrs r1, 24
- str r1, [sp]
- movs r7, 0xFF
- str r7, [sp, 0x4]
- str r4, [sp, 0x8]
- str r4, [sp, 0xC]
- str r4, [sp, 0x10]
- movs r1, 0x1
- movs r3, 0xA
- bl sub_8199F74
- adds r0, r5, 0x1
- lsls r0, 24
- lsrs r5, r0, 24
- cmp r5, 0x5
- bls _0813AE1E
- ldrh r0, [r6, 0x22]
- lsls r0, 24
- lsrs r0, 24
- ldr r2, =gText_SelectorArrow
- mov r3, r9
- ldrh r1, [r3]
- lsls r1, 28
- lsrs r1, 24
- str r1, [sp]
- str r7, [sp, 0x4]
- movs r1, 0
- str r1, [sp, 0x8]
- movs r1, 0x1
- movs r3, 0
- bl PrintTextOnWindow
- ldrh r0, [r6, 0x22]
- lsls r0, 24
- lsrs r0, 24
- bl PutWindowTilemap
- ldrh r0, [r6, 0x22]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0x3
- bl CopyWindowToVram
-_0813AE90:
- add sp, 0x18
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813ADD4
-
- thumb_func_start sub_813AEB4
-sub_813AEB4: @ 813AEB4
- push {r4,lr}
- movs r1, 0
- ldr r0, =gSpecialVar_0x8005
- strh r1, [r0]
- ldr r0, =0x0000400e
- bl VarGet
- adds r4, r0, 0
- lsls r4, 16
- lsrs r4, 16
- ldr r0, =0x0000400d
- bl VarGet
- lsls r0, 16
- lsrs r1, r0, 16
- cmp r4, 0
- beq _0813AF18
- movs r2, 0
- lsls r1, 1
- ldr r3, =gUnknown_0861500C
- ldr r0, =gUnknown_085B320C
- adds r0, r1, r0
- ldrh r1, [r0]
-_0813AEE2:
- lsls r0, r2, 1
- adds r0, r3
- ldrh r0, [r0]
- cmp r0, r1
- beq _0813AF0C
- adds r0, r2, 0x1
- lsls r0, 24
- lsrs r2, r0, 24
- cmp r2, 0x1D
- bls _0813AEE2
- b _0813AF38
- .pool
-_0813AF0C:
- ldr r0, =gSpecialVar_0x8005
- strh r2, [r0]
- b _0813AF38
- .pool
-_0813AF18:
- movs r2, 0
- lsls r1, 1
- ldr r3, =gUnknown_0861500C
- ldr r0, =gUnknown_085B31F8
- adds r0, r1, r0
- ldrh r1, [r0]
-_0813AF24:
- lsls r0, r2, 1
- adds r0, r3
- ldrh r0, [r0]
- cmp r0, r1
- beq _0813AF0C
- adds r0, r2, 0x1
- lsls r0, 24
- lsrs r2, r0, 24
- cmp r2, 0x1D
- bls _0813AF24
-_0813AF38:
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813AEB4
-
- thumb_func_start sub_813AF48
-sub_813AF48: @ 813AF48
- push {r4,r5,lr}
- ldr r0, =sub_813A600
- bl FindTaskIdByFunc
- lsls r0, 24
- lsrs r5, r0, 24
- cmp r5, 0xFF
- beq _0813AFB6
- lsls r4, r5, 2
- adds r4, r5
- lsls r4, 3
- ldr r0, =gTasks
- adds r4, r0
- ldrh r0, [r4, 0x24]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0
- movs r2, 0
- bl DestroyListMenuTask
- ldr r0, =gUnknown_0203AB64
- ldr r0, [r0]
- bl Free
- ldrh r0, [r4, 0x22]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0x1
- bl sub_8198070
- ldrh r0, [r4, 0x22]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0
- bl FillWindowPixelBuffer
- ldrh r0, [r4, 0x22]
- lsls r0, 24
- lsrs r0, 24
- bl ClearWindowTilemap
- ldrh r0, [r4, 0x22]
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0x2
- bl CopyWindowToVram
- ldrh r0, [r4, 0x22]
- lsls r0, 24
- lsrs r0, 24
- bl RemoveWindow
- adds r0, r5, 0
- bl DestroyTask
-_0813AFB6:
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813AF48
-
- thumb_func_start sub_813AFC8
-sub_813AFC8: @ 813AFC8
- push {lr}
- ldr r0, =task_deoxys_sound
- movs r1, 0x8
- bl CreateTask
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813AFC8
-
- thumb_func_start task_deoxys_sound
-task_deoxys_sound: @ 813AFDC
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- lsls r0, 24
- lsrs r7, r0, 24
- ldr r0, =0x000008d4
- bl FlagGet
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _0813B004
- ldr r1, =gSpecialVar_Result
- movs r0, 0x3
- b _0813B06A
- .pool
-_0813B004:
- ldr r0, =0x00004035
- mov r8, r0
- bl VarGet
- lsls r0, 16
- lsrs r5, r0, 16
- ldr r4, =0x00004034
- adds r0, r4, 0
- bl VarGet
- lsls r0, 16
- lsrs r6, r0, 16
- adds r0, r4, 0
- movs r1, 0
- bl VarSet
- cmp r5, 0
- beq _0813B05C
- ldr r0, =gUnknown_085B33F6
- subs r1, r5, 0x1
- adds r1, r0
- ldrb r0, [r1]
- cmp r0, r6
- bcs _0813B05C
- movs r0, 0
- bl sub_813B0B4
- mov r0, r8
- movs r1, 0
- bl VarSet
- ldr r1, =gSpecialVar_Result
- movs r0, 0
- strh r0, [r1]
- b _0813B070
- .pool
-_0813B05C:
- cmp r5, 0xA
- bne _0813B080
- ldr r0, =0x000008d4
- bl FlagSet
- ldr r1, =gSpecialVar_Result
- movs r0, 0x2
-_0813B06A:
- strh r0, [r1]
- bl EnableBothScriptContexts
-_0813B070:
- adds r0, r7, 0
- bl DestroyTask
- b _0813B0A2
- .pool
-_0813B080:
- adds r0, r5, 0x1
- lsls r0, 16
- lsrs r5, r0, 16
- lsls r0, r5, 24
- lsrs r0, 24
- bl sub_813B0B4
- ldr r0, =0x00004035
- adds r1, r5, 0
- bl VarSet
- ldr r1, =gSpecialVar_Result
- movs r0, 0x1
- strh r0, [r1]
- adds r0, r7, 0
- bl DestroyTask
-_0813B0A2:
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end task_deoxys_sound
-
- thumb_func_start sub_813B0B4
-sub_813B0B4: @ 813B0B4
- push {r4,r5,lr}
- sub sp, 0x4
- lsls r0, 24
- lsrs r4, r0, 24
- lsls r0, r4, 5
- ldr r1, =gUnknown_085B3280
- adds r0, r1
- movs r1, 0xD0
- lsls r1, 1
- movs r2, 0x8
- bl LoadPalette
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldrb r1, [r0, 0x5]
- ldrb r2, [r0, 0x4]
- movs r0, 0x1
- mov r3, sp
- bl TryGetEventObjectIdByLocalIdAndMap
- cmp r4, 0
- bne _0813B0F0
- movs r0, 0xC4
- bl PlaySE
- b _0813B0F8
- .pool
-_0813B0F0:
- movs r0, 0x82
- lsls r0, 1
- bl PlaySE
-_0813B0F8:
- ldr r0, =sub_813B160
- movs r1, 0x8
- bl CreateTask
- ldr r3, =gFieldEffectArguments
- movs r0, 0x1
- str r0, [r3]
- movs r0, 0x3A
- str r0, [r3, 0x4]
- movs r0, 0x1A
- str r0, [r3, 0x8]
- ldr r0, =gUnknown_085B33E0
- lsls r2, r4, 1
- adds r1, r2, r0
- ldrb r1, [r1]
- str r1, [r3, 0xC]
- adds r0, 0x1
- adds r0, r2, r0
- ldrb r0, [r0]
- str r0, [r3, 0x10]
- adds r5, r2, 0
- cmp r4, 0
- bne _0813B138
- movs r0, 0x3C
- b _0813B13A
- .pool
-_0813B138:
- movs r0, 0x5
-_0813B13A:
- str r0, [r3, 0x14]
- movs r0, 0x42
- bl FieldEffectStart
- ldr r0, =gUnknown_085B33E0
- adds r1, r5, r0
- ldrb r1, [r1]
- adds r0, 0x1
- adds r0, r5, r0
- ldrb r2, [r0]
- movs r0, 0x1
- bl Overworld_SetEventObjTemplateCoords
- add sp, 0x4
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813B0B4
-
- thumb_func_start sub_813B160
-sub_813B160: @ 813B160
- push {r4,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- movs r0, 0x42
- bl FieldEffectActiveListContains
- lsls r0, 24
- cmp r0, 0
- bne _0813B17C
- bl EnableBothScriptContexts
- adds r0, r4, 0
- bl DestroyTask
-_0813B17C:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_813B160
-
- thumb_func_start increment_var_x4026_on_birth_island_modulo_100
-increment_var_x4026_on_birth_island_modulo_100: @ 813B184
- push {r4,lr}
- ldr r4, =0x00004034
- adds r0, r4, 0
- bl VarGet
- lsls r0, 16
- lsrs r2, r0, 16
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldrh r1, [r0, 0x4]
- ldr r0, =0x00003a1a
- cmp r1, r0
- bne _0813B1C8
- adds r0, r2, 0x1
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r2, 0x63
- bls _0813B1C0
- adds r0, r4, 0
- movs r1, 0
- bl VarSet
- b _0813B1C8
- .pool
-_0813B1C0:
- adds r0, r4, 0
- adds r1, r2, 0
- bl VarSet
-_0813B1C8:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end increment_var_x4026_on_birth_island_modulo_100
-
- thumb_func_start sub_813B1D0
-sub_813B1D0: @ 813B1D0
- push {lr}
- ldr r0, =0x00004035
- bl VarGet
- lsls r0, 24
- lsrs r0, 19
- ldr r1, =gUnknown_085B3280
- adds r0, r1
- movs r1, 0xD0
- lsls r1, 1
- movs r2, 0x8
- bl LoadPalette
- movs r0, 0x80
- lsls r0, 19
- movs r1, 0x10
- movs r2, 0
- bl BlendPalettes
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813B1D0
-
- thumb_func_start set_unknown_box_id
-@ void set_unknown_box_id(char id)
-set_unknown_box_id: @ 813B204
- ldr r1, =gUnknown_0203AB6F
- strb r0, [r1]
- bx lr
- .pool
- thumb_func_end set_unknown_box_id
-
- thumb_func_start get_unknown_box_id
-get_unknown_box_id: @ 813B210
- ldr r0, =gUnknown_0203AB6F
- ldrb r0, [r0]
- bx lr
- .pool
- thumb_func_end get_unknown_box_id
-
thumb_func_start sub_813B21C
sub_813B21C: @ 813B21C
push {r4,r5,lr}
diff --git a/common_syms/field_specials.txt b/common_syms/field_specials.txt
new file mode 100644
index 000000000..25d874a65
--- /dev/null
+++ b/common_syms/field_specials.txt
@@ -0,0 +1 @@
+gUnknown_030061D0
diff --git a/data/field_specials.s b/data/field_specials.s
index 0f52cb891..1c2fb32da 100644
--- a/data/field_specials.s
+++ b/data/field_specials.s
@@ -3,192 +3,6 @@
.section .rodata
- .align 2
-gUnknown_085B3030:: @ 85B3030
- .4byte 0x03000002, 0x00000000, 0x07d00000, 0x00000064
-
- .align 2
-gUnknown_085B3040:: @ 85B3040
- .4byte BattleFrontier_Lounge5_Text_26468D
- .4byte BattleFrontier_Lounge5_Text_2646E5
- .4byte BattleFrontier_Lounge5_Text_264741
- .4byte BattleFrontier_Lounge5_Text_2647A4
- .4byte BattleFrontier_Lounge5_Text_2647FC
- .4byte BattleFrontier_Lounge5_Text_264858
- .4byte BattleFrontier_Lounge5_Text_2648BE
- .4byte BattleFrontier_Lounge5_Text_264916
- .4byte BattleFrontier_Lounge5_Text_264972
- .4byte BattleFrontier_Lounge5_Text_2649D5
- .4byte BattleFrontier_Lounge5_Text_264A3F
- .4byte BattleFrontier_Lounge5_Text_264A9B
- .4byte BattleFrontier_Lounge5_Text_264AF3
- .4byte BattleFrontier_Lounge5_Text_264B5D
- .4byte BattleFrontier_Lounge5_Text_2648BE
- .4byte BattleFrontier_Lounge5_Text_264BC3
- .4byte BattleFrontier_Lounge5_Text_264C36
- .4byte BattleFrontier_Lounge5_Text_2648BE
- .4byte BattleFrontier_Lounge5_Text_264C95
- .4byte BattleFrontier_Lounge5_Text_264D01
- .4byte BattleFrontier_Lounge5_Text_264D6B
- .4byte BattleFrontier_Lounge5_Text_264DD7
- .4byte BattleFrontier_Lounge5_Text_264E33
- .4byte BattleFrontier_Lounge5_Text_264E8F
- .4byte BattleFrontier_Lounge5_Text_2648BE
-
- .align 2
-gUnknown_085B30A4:: @ 85B30A4
- .4byte BattleFrontier_Lounge3_Text_262261
- .4byte BattleFrontier_Lounge3_Text_26230D
- .4byte BattleFrontier_Lounge3_Text_2623B9
- .4byte BattleFrontier_Lounge3_Text_262464
- .4byte BattleFrontier_Lounge3_Text_26250E
- .4byte BattleFrontier_Lounge3_Text_2625B8
- .4byte BattleFrontier_Lounge3_Text_26266A
- .4byte BattleFrontier_Lounge3_Text_26271C
- .4byte BattleFrontier_Lounge3_Text_2627C9
- .4byte BattleFrontier_Lounge3_Text_262876
- .4byte BattleFrontier_Lounge3_Text_26291A
- .4byte BattleFrontier_Lounge3_Text_2629BC
-
- .align 2
-gUnknown_085B30D4:: @ 85B30D4
- .4byte BattleFrontier_Lounge3_Text_262C04
- .4byte BattleFrontier_Lounge3_Text_262C90
- .4byte BattleFrontier_Lounge3_Text_262D1C
- .4byte BattleFrontier_Lounge3_Text_262DA7
- .4byte BattleFrontier_Lounge3_Text_262E34
- .4byte BattleFrontier_Lounge3_Text_262EC1
- .4byte BattleFrontier_Lounge3_Text_262F56
- .4byte BattleFrontier_Lounge3_Text_262FEB
- .4byte BattleFrontier_Lounge3_Text_263078
- .4byte BattleFrontier_Lounge3_Text_263105
- .4byte BattleFrontier_Lounge3_Text_26318C
- .4byte BattleFrontier_Lounge3_Text_263211
-
- .align 1
-gUnknown_085B3104:: @ 85B3104
- .2byte 0x0000, 0x0001, 0x0002, 0x0100, 0x0101, 0x0400, 0x0401, 0x0200, 0x0201, 0x0300, 0x0500, 0x0600
-
- .align 2
-gUnknown_085B311C:: @ 85B311C
- window_template 0x00, 0x01, 0x01, 0x06, 0x02, 0x0f, 0x0008
-
- .align 2
-gUnknown_085B3124:: @ 85B3124
- window_template 0x00, 0x02, 0x09, 0x04, 0x04, 0x0f, 0x0014
-
- .align 1
-gUnknown_085B312C:: @ 85B312C
- .2byte 0x004b, 0x0067, 0x0057, 0x004f, 0x0054, 0x0055, 0x0056, 0x0050, 0x0051, 0x0052, 0xffff
-
- .align 1
-gUnknown_085B3142:: @ 85B3142
- .2byte 0x0071, 0x006f, 0x0072, 0x0073, 0x0074, 0xffff
-
- .align 1
-gUnknown_085B314E:: @ 85B314E
- .2byte 0x0040, 0x0043, 0x0041, 0x0046, 0x0042, 0x003f, 0xffff
-
- .align 1
-gUnknown_085B315C:: @ 85B315C
- .2byte 0x00c8, 0x00b4, 0x00b7, 0x00b9, 0x00b3, 0x00ba, 0x00bb, 0x00c4, 0x00c6, 0xffff
-
- .align 2
-gUnknown_085B3170:: @ 85B3170
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2601AA
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2601D0
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_260201
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26022F
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26025B
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_260287
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2602B5
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2602E0
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26030F
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26033E
- .4byte gText_Exit
-
- .align 2
-gUnknown_085B319C:: @ 85B319C
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C
- .4byte gText_Exit
-
- .align 2
-gUnknown_085B31B4:: @ 85B31B4
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_260397
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2603BE
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2603E6
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26040E
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_260436
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26045C
- .4byte gText_Exit
-
- .align 2
-gUnknown_085B31D0:: @ 85B31D0
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26047A
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2604AC
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2604D8
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_26050F
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_260542
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_260575
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2605A8
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_2605E2
- .4byte BattleFrontier_BattlePointExchangeServiceCorner_Text_260613
- .4byte gText_Exit
-
- .align 1
-gUnknown_085B31F8:: @ 85B31F8
- .2byte 0x0087, 0x0045, 0x008a, 0x0005, 0x0019, 0x0022, 0x009d, 0x0044, 0x0056, 0x000e
-
- .align 1
-gUnknown_085B320C:: @ 85B320C
- .2byte 0x006f, 0x00ad, 0x00bd, 0x0081, 0x00c4, 0x00cb, 0x00f4, 0x0008, 0x0009, 0x0007
-
- .align 2
-gUnknown_085B3220:: @ 85B3220
- window_template 0x00, 0x01, 0x07, 0x0c, 0x06, 0x0f, 0x001c
-
- .align 2
-gUnknown_085B3228:: @ 85B3228
- .4byte BattleFrontier_Lounge7_Text_265E30
- .4byte BattleFrontier_Lounge7_Text_265E5B
- .4byte BattleFrontier_Lounge7_Text_265E8A
- .4byte BattleFrontier_Lounge7_Text_265EC0
- .4byte BattleFrontier_Lounge7_Text_265EED
- .4byte BattleFrontier_Lounge7_Text_265F1C
- .4byte BattleFrontier_Lounge7_Text_265F47
- .4byte BattleFrontier_Lounge7_Text_265F77
- .4byte BattleFrontier_Lounge7_Text_265FAA
- .4byte BattleFrontier_Lounge7_Text_265FDD
- .4byte gText_Exit
-
- .align 2
-gUnknown_085B3254:: @ 85B3254
- .4byte BattleFrontier_Lounge7_Text_26600A
- .4byte BattleFrontier_Lounge7_Text_26603E
- .4byte BattleFrontier_Lounge7_Text_266070
- .4byte BattleFrontier_Lounge7_Text_2660A6
- .4byte BattleFrontier_Lounge7_Text_2660D0
- .4byte BattleFrontier_Lounge7_Text_2660FF
- .4byte BattleFrontier_Lounge7_Text_26612D
- .4byte BattleFrontier_Lounge7_Text_26615F
- .4byte BattleFrontier_Lounge7_Text_266185
- .4byte BattleFrontier_Lounge7_Text_2661B5
- .4byte gText_Exit
-
- .align 2
-gUnknown_085B3280:: @ 85B3280
- .incbin "graphics/unknown/unknown_5B3280.gbapal"
-
-gUnknown_085B33E0:: @ 85B33E0
- .byte 0x0f, 0x0c, 0x0b, 0x0e, 0x0f, 0x08, 0x13, 0x0e, 0x0c, 0x0b, 0x12, 0x0b, 0x0f, 0x0e, 0x0b, 0x0e, 0x13, 0x0e, 0x0f, 0x0f, 0x0f, 0x0a
-
-gUnknown_085B33F6:: @ 85B33F6
- .byte 0x04, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x06, 0x03, 0x03
-
gUnknown_085B3400:: @ 85B3400
.byte 0x1d, 0x1d, 0x1e, 0x1e, 0x1f, 0x1f, 0x21, 0x21, 0x14, 0x14, 0x28, 0x28, 0x2a, 0x2a, 0x2c, 0x2c
diff --git a/graphics/misc/deoxys1.pal b/graphics/misc/deoxys1.pal
new file mode 100644
index 000000000..d90c4cb38
--- /dev/null
+++ b/graphics/misc/deoxys1.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+180 180 180
+148 148 148
+90 90 98
+57 57 74
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+222 222 222
+0 0 0
diff --git a/graphics/misc/deoxys10.pal b/graphics/misc/deoxys10.pal
new file mode 100644
index 000000000..8bdd860fb
--- /dev/null
+++ b/graphics/misc/deoxys10.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+246 197 156
+238 82 82
+189 32 32
+123 8 8
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/misc/deoxys11.pal b/graphics/misc/deoxys11.pal
new file mode 100644
index 000000000..9a9ee2530
--- /dev/null
+++ b/graphics/misc/deoxys11.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+255 205 156
+255 82 82
+205 32 32
+131 8 8
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/misc/deoxys2.pal b/graphics/misc/deoxys2.pal
new file mode 100644
index 000000000..38806db0f
--- /dev/null
+++ b/graphics/misc/deoxys2.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+180 180 172
+156 139 139
+98 82 90
+57 49 65
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/misc/deoxys3.pal b/graphics/misc/deoxys3.pal
new file mode 100644
index 000000000..24db0e343
--- /dev/null
+++ b/graphics/misc/deoxys3.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+189 180 172
+164 131 131
+106 74 82
+65 41 57
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/misc/deoxys4.pal b/graphics/misc/deoxys4.pal
new file mode 100644
index 000000000..5db08f366
--- /dev/null
+++ b/graphics/misc/deoxys4.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+197 180 172
+172 123 123
+123 65 74
+74 41 49
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/misc/deoxys5.pal b/graphics/misc/deoxys5.pal
new file mode 100644
index 000000000..25a62aae6
--- /dev/null
+++ b/graphics/misc/deoxys5.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+205 189 164
+189 115 115
+131 65 65
+82 32 41
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/misc/deoxys6.pal b/graphics/misc/deoxys6.pal
new file mode 100644
index 000000000..0f636873e
--- /dev/null
+++ b/graphics/misc/deoxys6.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+213 189 164
+197 115 115
+148 57 65
+90 32 41
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/misc/deoxys7.pal b/graphics/misc/deoxys7.pal
new file mode 100644
index 000000000..2dba57eef
--- /dev/null
+++ b/graphics/misc/deoxys7.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+222 189 164
+205 106 106
+156 49 57
+98 24 32
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/misc/deoxys8.pal b/graphics/misc/deoxys8.pal
new file mode 100644
index 000000000..d46c26996
--- /dev/null
+++ b/graphics/misc/deoxys8.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+230 197 156
+222 98 98
+164 49 49
+106 16 24
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/misc/deoxys9.pal b/graphics/misc/deoxys9.pal
new file mode 100644
index 000000000..f65fee065
--- /dev/null
+++ b/graphics/misc/deoxys9.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+238 197 156
+230 90 90
+180 41 41
+115 16 16
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/unknown/unknown_5B3280.pal b/graphics/unknown/unknown_5B3280.pal
deleted file mode 100644
index a23813afb..000000000
--- a/graphics/unknown/unknown_5B3280.pal
+++ /dev/null
@@ -1,179 +0,0 @@
-JASC-PAL
-0100
-176
-115 197 164
-180 180 180
-148 148 148
-90 90 98
-57 57 74
-255 0 255
-255 0 255
-255 0 255
-255 0 255
-255 0 255
-255 0 255
-255 0 255
-255 0 255
-255 0 255
-222 222 222
-0 0 0
-115 197 164
-180 180 172
-156 139 139
-98 82 90
-57 49 65
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-115 197 164
-189 180 172
-164 131 131
-106 74 82
-65 41 57
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-115 197 164
-197 180 172
-172 123 123
-123 65 74
-74 41 49
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-115 197 164
-205 189 164
-189 115 115
-131 65 65
-82 32 41
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-115 197 164
-213 189 164
-197 115 115
-148 57 65
-90 32 41
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-115 197 164
-222 189 164
-205 106 106
-156 49 57
-98 24 32
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-115 197 164
-230 197 156
-222 98 98
-164 49 49
-106 16 24
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-115 197 164
-238 197 156
-230 90 90
-180 41 41
-115 16 16
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-115 197 164
-246 197 156
-238 82 82
-189 32 32
-123 8 8
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-115 197 164
-255 205 156
-255 82 82
-205 32 32
-131 8 8
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
diff --git a/include/decoration.h b/include/decoration.h
index 76b2f2ec4..f613c25d2 100644
--- a/include/decoration.h
+++ b/include/decoration.h
@@ -73,5 +73,6 @@ void sub_8126B2C(u8 taskId);
void sub_8127208(u8 taskId);
void sub_8127250(u8 *dest, u8 decorCat);
bool8 IsSelectedDecorInThePC(void);
+u8 AddDecorationIconObject(u8 decor, s16 x, s16 y, u8 priority, u16 tilesTag, u16 paletteTag);
#endif //GUARD_DECORATION_H
diff --git a/include/field_effect.h b/include/field_effect.h
index 9c9501bfa..cdabd5c99 100644
--- a/include/field_effect.h
+++ b/include/field_effect.h
@@ -74,7 +74,10 @@ enum FieldEffectScriptIdx
FLDEFF_USE_FLY_ANCIENT_TOMB,
FLDEFF_PCTURN_ON,
FLDEFF_HALL_OF_FAME_RECORD,
- FLDEFF_USE_TELEPORT
+ FLDEFF_USE_TELEPORT,
+ FLDEFF_64,
+ FLDEFF_65,
+ FLDEFF_66,
};
extern s32 gFieldEffectArguments[8];
diff --git a/include/field_specials.h b/include/field_specials.h
index c1f70a399..8065b061c 100644
--- a/include/field_specials.h
+++ b/include/field_specials.h
@@ -3,7 +3,7 @@
u8 GetLeadMonIndex(void);
u8 sub_813B260(void);
-u16 get_unknown_box_id(void);
+u8 get_unknown_box_id(void);
bool8 InMultiBattleRoom(void);
#endif // GUARD_FIELD_SPECIALS_H
diff --git a/include/menu.h b/include/menu.h
index 0c191de57..4cc43dd4c 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -84,5 +84,6 @@ void sub_819A344(u8 a0, u8 *dest, u8 color);
void RemoveMapNamePopUpWindow(void);
u8 GetMapNamePopUpWindowId(void);
u8 AddMapNamePopUpWindow(void);
+void sub_8199F74(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 letterSpacing, u8 lineSpacing);
#endif // GUARD_MENU_H
diff --git a/include/party_menu.h b/include/party_menu.h
index d24bc817f..cb2c38891 100644
--- a/include/party_menu.h
+++ b/include/party_menu.h
@@ -34,6 +34,8 @@ struct Struct203CEC8
extern struct Struct203CEC8 gUnknown_0203CEC8;
+extern const u16 gUnknown_0861500C[];
+
bool8 pokemon_has_move(struct Pokemon *, u16);
void sub_81B58A8(void);
void DoWallyTutorialBagMenu(void);
diff --git a/include/strings.h b/include/strings.h
index 14ff0048f..afb26b7cb 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -490,37 +490,6 @@ extern const u8 gText_B4F[];
extern const u8 gText_Rooftop[];
extern const u8 gText_ElevatorNowOn[];
-extern const u8 BattleFrontier_Lounge2_Text_260971[];
-extern const u8 BattleFrontier_Lounge2_Text_260A1E[];
-extern const u8 BattleFrontier_Lounge2_Text_260AE7[];
-extern const u8 BattleFrontier_Lounge2_Text_2619AC[];
-extern const u8 BattleFrontier_Lounge2_Text_261A91[];
-extern const u8 BattleFrontier_Lounge2_Text_261B0C[];
-extern const u8 BattleFrontier_Lounge2_Text_261B95[];
-extern const u8 BattleFrontier_Lounge2_Text_261B95[];
-extern const u8 BattleFrontier_Lounge2_Text_261B95[];
-extern const u8 BattleFrontier_Lounge2_Text_261C1A[];
-extern const u8 BattleFrontier_Lounge2_Text_261C1A[];
-extern const u8 BattleFrontier_Lounge2_Text_261C1A[];
-extern const u8 BattleFrontier_Lounge2_Text_260BC4[];
-extern const u8 BattleFrontier_Lounge2_Text_260C6D[];
-extern const u8 BattleFrontier_Lounge2_Text_260D3A[];
-extern const u8 BattleFrontier_Lounge2_Text_260E1E[];
-extern const u8 BattleFrontier_Lounge2_Text_260EC7[];
-extern const u8 BattleFrontier_Lounge2_Text_260F74[];
-extern const u8 BattleFrontier_Lounge2_Text_2614E6[];
-extern const u8 BattleFrontier_Lounge2_Text_261591[];
-extern const u8 BattleFrontier_Lounge2_Text_26166F[];
-extern const u8 BattleFrontier_Lounge2_Text_261282[];
-extern const u8 BattleFrontier_Lounge2_Text_261329[];
-extern const u8 BattleFrontier_Lounge2_Text_261403[];
-extern const u8 BattleFrontier_Lounge2_Text_261026[];
-extern const u8 BattleFrontier_Lounge2_Text_2610CC[];
-extern const u8 BattleFrontier_Lounge2_Text_261194[];
-extern const u8 BattleFrontier_Lounge2_Text_26174D[];
-extern const u8 BattleFrontier_Lounge2_Text_2617F9[];
-extern const u8 BattleFrontier_Lounge2_Text_2618C4[];
-
extern const u8 gText_Exit[];
extern const u8 gText_BlueFlute[];
@@ -647,4 +616,141 @@ extern const u8 gText_Underpowered[];
extern const u8 gText_WhenInDanger[];
extern const u8 gText_Exit[];
+extern const u8 BattleFrontier_Lounge2_Text_260971[];
+extern const u8 BattleFrontier_Lounge2_Text_260A1E[];
+extern const u8 BattleFrontier_Lounge2_Text_260AE7[];
+extern const u8 BattleFrontier_Lounge2_Text_2619AC[];
+extern const u8 BattleFrontier_Lounge2_Text_261A91[];
+extern const u8 BattleFrontier_Lounge2_Text_261B0C[];
+extern const u8 BattleFrontier_Lounge2_Text_261B95[];
+extern const u8 BattleFrontier_Lounge2_Text_261B95[];
+extern const u8 BattleFrontier_Lounge2_Text_261B95[];
+extern const u8 BattleFrontier_Lounge2_Text_261C1A[];
+extern const u8 BattleFrontier_Lounge2_Text_261C1A[];
+extern const u8 BattleFrontier_Lounge2_Text_261C1A[];
+extern const u8 BattleFrontier_Lounge2_Text_260BC4[];
+extern const u8 BattleFrontier_Lounge2_Text_260C6D[];
+extern const u8 BattleFrontier_Lounge2_Text_260D3A[];
+extern const u8 BattleFrontier_Lounge2_Text_260E1E[];
+extern const u8 BattleFrontier_Lounge2_Text_260EC7[];
+extern const u8 BattleFrontier_Lounge2_Text_260F74[];
+extern const u8 BattleFrontier_Lounge2_Text_2614E6[];
+extern const u8 BattleFrontier_Lounge2_Text_261591[];
+extern const u8 BattleFrontier_Lounge2_Text_26166F[];
+extern const u8 BattleFrontier_Lounge2_Text_261282[];
+extern const u8 BattleFrontier_Lounge2_Text_261329[];
+extern const u8 BattleFrontier_Lounge2_Text_261403[];
+extern const u8 BattleFrontier_Lounge2_Text_261026[];
+extern const u8 BattleFrontier_Lounge2_Text_2610CC[];
+extern const u8 BattleFrontier_Lounge2_Text_261194[];
+extern const u8 BattleFrontier_Lounge2_Text_26174D[];
+extern const u8 BattleFrontier_Lounge2_Text_2617F9[];
+extern const u8 BattleFrontier_Lounge2_Text_2618C4[];
+
+extern const u8 BattleFrontier_Lounge5_Text_26468D[];
+extern const u8 BattleFrontier_Lounge5_Text_2646E5[];
+extern const u8 BattleFrontier_Lounge5_Text_264741[];
+extern const u8 BattleFrontier_Lounge5_Text_2647A4[];
+extern const u8 BattleFrontier_Lounge5_Text_2647FC[];
+extern const u8 BattleFrontier_Lounge5_Text_264858[];
+extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
+extern const u8 BattleFrontier_Lounge5_Text_264916[];
+extern const u8 BattleFrontier_Lounge5_Text_264972[];
+extern const u8 BattleFrontier_Lounge5_Text_2649D5[];
+extern const u8 BattleFrontier_Lounge5_Text_264A3F[];
+extern const u8 BattleFrontier_Lounge5_Text_264A9B[];
+extern const u8 BattleFrontier_Lounge5_Text_264AF3[];
+extern const u8 BattleFrontier_Lounge5_Text_264B5D[];
+extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
+extern const u8 BattleFrontier_Lounge5_Text_264BC3[];
+extern const u8 BattleFrontier_Lounge5_Text_264C36[];
+extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
+extern const u8 BattleFrontier_Lounge5_Text_264C95[];
+extern const u8 BattleFrontier_Lounge5_Text_264D01[];
+extern const u8 BattleFrontier_Lounge5_Text_264D6B[];
+extern const u8 BattleFrontier_Lounge5_Text_264DD7[];
+extern const u8 BattleFrontier_Lounge5_Text_264E33[];
+extern const u8 BattleFrontier_Lounge5_Text_264E8F[];
+extern const u8 BattleFrontier_Lounge5_Text_2648BE[];
+
+extern const u8 BattleFrontier_Lounge3_Text_262261[];
+extern const u8 BattleFrontier_Lounge3_Text_26230D[];
+extern const u8 BattleFrontier_Lounge3_Text_2623B9[];
+extern const u8 BattleFrontier_Lounge3_Text_262464[];
+extern const u8 BattleFrontier_Lounge3_Text_26250E[];
+extern const u8 BattleFrontier_Lounge3_Text_2625B8[];
+extern const u8 BattleFrontier_Lounge3_Text_26266A[];
+extern const u8 BattleFrontier_Lounge3_Text_26271C[];
+extern const u8 BattleFrontier_Lounge3_Text_2627C9[];
+extern const u8 BattleFrontier_Lounge3_Text_262876[];
+extern const u8 BattleFrontier_Lounge3_Text_26291A[];
+extern const u8 BattleFrontier_Lounge3_Text_2629BC[];
+
+extern const u8 BattleFrontier_Lounge3_Text_262C04[];
+extern const u8 BattleFrontier_Lounge3_Text_262C90[];
+extern const u8 BattleFrontier_Lounge3_Text_262D1C[];
+extern const u8 BattleFrontier_Lounge3_Text_262DA7[];
+extern const u8 BattleFrontier_Lounge3_Text_262E34[];
+extern const u8 BattleFrontier_Lounge3_Text_262EC1[];
+extern const u8 BattleFrontier_Lounge3_Text_262F56[];
+extern const u8 BattleFrontier_Lounge3_Text_262FEB[];
+extern const u8 BattleFrontier_Lounge3_Text_263078[];
+extern const u8 BattleFrontier_Lounge3_Text_263105[];
+extern const u8 BattleFrontier_Lounge3_Text_26318C[];
+extern const u8 BattleFrontier_Lounge3_Text_263211[];
+
+extern const u8 gText_BP[];
+
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2601AA[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2601D0[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260201[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26022F[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26025B[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260287[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2602B5[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2602E0[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26030F[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26033E[];
+
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C[];
+
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260397[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2603BE[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2603E6[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26040E[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260436[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26045C[];
+
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26047A[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2604AC[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2604D8[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_26050F[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260542[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260575[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2605A8[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_2605E2[];
+extern const u8 BattleFrontier_BattlePointExchangeServiceCorner_Text_260613[];
+
+extern const u8 BattleFrontier_Lounge7_Text_265E30[];
+extern const u8 BattleFrontier_Lounge7_Text_265E5B[];
+extern const u8 BattleFrontier_Lounge7_Text_265E8A[];
+extern const u8 BattleFrontier_Lounge7_Text_265EC0[];
+extern const u8 BattleFrontier_Lounge7_Text_265EED[];
+extern const u8 BattleFrontier_Lounge7_Text_265F1C[];
+extern const u8 BattleFrontier_Lounge7_Text_265F47[];
+extern const u8 BattleFrontier_Lounge7_Text_265F77[];
+extern const u8 BattleFrontier_Lounge7_Text_265FAA[];
+extern const u8 BattleFrontier_Lounge7_Text_265FDD[];
+
+extern const u8 BattleFrontier_Lounge7_Text_26600A[];
+extern const u8 BattleFrontier_Lounge7_Text_26603E[];
+extern const u8 BattleFrontier_Lounge7_Text_266070[];
+extern const u8 BattleFrontier_Lounge7_Text_2660A6[];
+extern const u8 BattleFrontier_Lounge7_Text_2660D0[];
+extern const u8 BattleFrontier_Lounge7_Text_2660FF[];
+extern const u8 BattleFrontier_Lounge7_Text_26612D[];
+extern const u8 BattleFrontier_Lounge7_Text_26615F[];
+extern const u8 BattleFrontier_Lounge7_Text_266185[];
+extern const u8 BattleFrontier_Lounge7_Text_2661B5[];
+
#endif //GUARD_STRINGS_H
diff --git a/src/field_specials.c b/src/field_specials.c
index 5f4b4f784..20165180b 100644
--- a/src/field_specials.c
+++ b/src/field_specials.c
@@ -3,17 +3,20 @@
#include "battle.h"
#include "battle_tower.h"
#include "data2.h"
+#include "decoration.h"
#include "diploma.h"
#include "event_data.h"
#include "event_object_movement.h"
#include "fieldmap.h"
#include "field_camera.h"
+#include "field_effect.h"
#include "field_message_box.h"
#include "field_player_avatar.h"
#include "field_region_map.h"
#include "field_specials.h"
#include "field_weather.h"
#include "international_string_util.h"
+#include "item_icon.h"
#include "link.h"
#include "list_menu.h"
#include "malloc.h"
@@ -1806,10 +1809,10 @@ void sub_8139B60(void)
SetStandardWindowBorderStyle(gUnknown_0203AB5E, 0);
xPos = GetStringCenterAlignXOffset(1, gText_ElevatorNowOn, 64);
- PrintTextOnWindow(gUnknown_0203AB5E, 1, gText_ElevatorNowOn, xPos, 1, 0xFF, NULL);
+ PrintTextOnWindow(gUnknown_0203AB5E, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
xPos = GetStringCenterAlignXOffset(1, gElevatorFloorsTable[gSpecialVar_0x8005], 64);
- PrintTextOnWindow(gUnknown_0203AB5E, 1, gElevatorFloorsTable[gSpecialVar_0x8005], xPos, 17, 0xFF, NULL);
+ PrintTextOnWindow(gUnknown_0203AB5E, 1, gElevatorFloorsTable[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
PutWindowTilemap(gUnknown_0203AB5E);
CopyWindowToVram(gUnknown_0203AB5E, 3);
@@ -2716,3 +2719,872 @@ void sub_813A46C(s32 itemIndex, bool8 onInit, struct ListMenu *list)
gUnknown_0203AB6A = misc;
}
}
+
+void sub_813A570(u8 taskId);
+void sub_813A738(u8 taskId);
+void sub_813A600(u8 taskId);
+
+// stupid r5<->r6 swap
+#ifdef NONMATCHING
+void sub_813A4EC(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+ s32 itemId = ListMenuHandleInputGetItemId(task->data[14]);
+
+ switch (itemId)
+ {
+ case LIST_NOTHING_CHOSEN:
+ break;
+ case LIST_B_PRESSED:
+ gSpecialVar_Result = 0x7F;
+ PlaySE(SE_SELECT);
+ sub_813A570(taskId);
+ break;
+ default:
+ gSpecialVar_Result = itemId;
+ PlaySE(SE_SELECT);
+ if (task->data[6])
+ {
+ if (itemId == task->data[1] - 1)
+ {
+ sub_813A570(taskId);
+ }
+ else
+ {
+ sub_813A738(taskId);
+ task->func = sub_813A600;
+ EnableBothScriptContexts();
+ }
+ }
+ break;
+ }
+}
+#else
+NAKED
+void sub_813A4EC(u8 taskId)
+{
+ asm_unified("push {r4-r6,lr}\n\
+ lsls r0, 24\n\
+ lsrs r5, r0, 24\n\
+ lsls r0, r5, 2\n\
+ adds r0, r5\n\
+ lsls r0, 3\n\
+ ldr r1, =gTasks\n\
+ adds r6, r0, r1\n\
+ ldrh r0, [r6, 0x24]\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ bl ListMenuHandleInputGetItemId\n\
+ adds r4, r0, 0\n\
+ movs r0, 0x2\n\
+ negs r0, r0\n\
+ cmp r4, r0\n\
+ beq _0813A51C\n\
+ adds r0, 0x1\n\
+ cmp r4, r0\n\
+ bne _0813A530\n\
+ b _0813A566\n\
+ .pool\n\
+_0813A51C:\n\
+ ldr r1, =gSpecialVar_Result\n\
+ movs r0, 0x7F\n\
+ strh r0, [r1]\n\
+ movs r0, 0x5\n\
+ bl PlaySE\n\
+ b _0813A54C\n\
+ .pool\n\
+_0813A530:\n\
+ ldr r0, =gSpecialVar_Result\n\
+ strh r4, [r0]\n\
+ movs r0, 0x5\n\
+ bl PlaySE\n\
+ movs r1, 0x14\n\
+ ldrsh r0, [r6, r1]\n\
+ cmp r0, 0\n\
+ beq _0813A54C\n\
+ movs r1, 0xA\n\
+ ldrsh r0, [r6, r1]\n\
+ subs r0, 0x1\n\
+ cmp r4, r0\n\
+ bne _0813A558\n\
+_0813A54C:\n\
+ adds r0, r5, 0\n\
+ bl sub_813A570\n\
+ b _0813A566\n\
+ .pool\n\
+_0813A558:\n\
+ adds r0, r5, 0\n\
+ bl sub_813A738\n\
+ ldr r0, =sub_813A600\n\
+ str r0, [r6]\n\
+ bl EnableBothScriptContexts\n\
+_0813A566:\n\
+ pop {r4-r6}\n\
+ pop {r0}\n\
+ bx r0\n\
+ .pool");
+}
+#endif // NONMATCHING
+
+void sub_813A570(u8 taskId)
+{
+ u16 array;
+ struct Task *task = &gTasks[taskId];
+ ListMenuGetCurrentItemArrayId(task->data[14], &array);
+ sub_813AC44(task->data[11], array);
+ sub_813A738(taskId);
+ DestroyListMenuTask(task->data[14], NULL, NULL);
+ Free(gUnknown_0203AB64);
+ sub_8198070(task->data[13], 1);
+ FillWindowPixelBuffer(task->data[13], 0);
+ CopyWindowToVram(task->data[13], 2);
+ RemoveWindow(task->data[13]);
+ DestroyTask(taskId);
+ EnableBothScriptContexts();
+}
+
+void sub_813A664(u8 taskId);
+
+void sub_813A600(u8 taskId)
+{
+ switch (gTasks[taskId].data[6])
+ {
+ case 1:
+ default:
+ break;
+ case 2:
+ gTasks[taskId].data[6] = 1;
+ gTasks[taskId].func = sub_813A664;
+ break;
+ }
+}
+
+void sub_813A630(void)
+{
+ u8 taskId = FindTaskIdByFunc(sub_813A600);
+ if (taskId == 0xFF)
+ {
+ EnableBothScriptContexts();
+ }
+ else
+ {
+ gTasks[taskId].data[6]++;
+ }
+}
+
+void sub_813A664(u8 taskId)
+{
+ ScriptContext2_Enable();
+ sub_813A694(taskId);
+ gTasks[taskId].func = sub_813A4EC;
+}
+
+const struct ScrollArrowsTemplate gUnknown_085B3030 = {
+ .firstArrowType = 2,
+ .firstX = 0,
+ .firstY = 0,
+ .secondArrowType = 3,
+ .secondX = 0,
+ .secondY = 0,
+ .fullyUpThreshold = 0,
+ .fullyDownThreshold = 0,
+ .tileTag = 2000,
+ .palTag = 100,
+ .palNum = 0
+};
+
+void sub_813A694(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+ struct ScrollArrowsTemplate template = gUnknown_085B3030;
+ if (task->data[0] != task->data[1])
+ {
+ template.firstX = (task->data[4] / 2) * 8 + 12 + (task->data[2] - 1) * 8;
+ template.firstY = 8;
+ template.secondX = (task->data[4] / 2) * 8 + 12 + (task->data[2] - 1) * 8;
+ template.secondY = task->data[5] * 8 + 10;
+ template.fullyUpThreshold = 0;
+ template.fullyDownThreshold = task->data[1] - task->data[0];
+ task->data[12] = AddScrollIndicatorArrowPair(&template, &gUnknown_0203AB68);
+ }
+}
+
+void sub_813A738(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+ if (task->data[0] != task->data[1])
+ {
+ RemoveScrollIndicatorArrowPair(task->data[12]);
+ }
+}
+
+void nullsub_55(void)
+{
+
+}
+
+void sub_813A76C(void)
+{
+ u8 i;
+ for (i = 0; i < 2; i++)
+ {
+ if (gLinkPlayers[i].gender == MALE)
+ {
+ VarSet(VAR_OBJ_GFX_ID_F - i, EVENT_OBJ_GFX_BRENDAN_NORMAL);
+ }
+ else
+ {
+ VarSet(VAR_OBJ_GFX_ID_F - i, EVENT_OBJ_GFX_RIVAL_MAY_NORMAL);
+ }
+ }
+}
+
+const u8 *const gUnknown_085B3040[] = {
+ BattleFrontier_Lounge5_Text_26468D,
+ BattleFrontier_Lounge5_Text_2646E5,
+ BattleFrontier_Lounge5_Text_264741,
+ BattleFrontier_Lounge5_Text_2647A4,
+ BattleFrontier_Lounge5_Text_2647FC,
+ BattleFrontier_Lounge5_Text_264858,
+ BattleFrontier_Lounge5_Text_2648BE,
+ BattleFrontier_Lounge5_Text_264916,
+ BattleFrontier_Lounge5_Text_264972,
+ BattleFrontier_Lounge5_Text_2649D5,
+ BattleFrontier_Lounge5_Text_264A3F,
+ BattleFrontier_Lounge5_Text_264A9B,
+ BattleFrontier_Lounge5_Text_264AF3,
+ BattleFrontier_Lounge5_Text_264B5D,
+ BattleFrontier_Lounge5_Text_2648BE,
+ BattleFrontier_Lounge5_Text_264BC3,
+ BattleFrontier_Lounge5_Text_264C36,
+ BattleFrontier_Lounge5_Text_2648BE,
+ BattleFrontier_Lounge5_Text_264C95,
+ BattleFrontier_Lounge5_Text_264D01,
+ BattleFrontier_Lounge5_Text_264D6B,
+ BattleFrontier_Lounge5_Text_264DD7,
+ BattleFrontier_Lounge5_Text_264E33,
+ BattleFrontier_Lounge5_Text_264E8F,
+ BattleFrontier_Lounge5_Text_2648BE,
+};
+
+void sub_813A7B8(void)
+{
+ u8 nature;
+
+ if (gSpecialVar_0x8004 >= PARTY_SIZE)
+ {
+ gSpecialVar_0x8004 = 0;
+ }
+
+ nature = GetNature(&gPlayerParty[gSpecialVar_0x8004]);
+ ShowFieldMessage(gUnknown_085B3040[nature]);
+}
+
+void UpdateFrontierGambler(u16 a0)
+{
+ u16 *var = GetVarPointer(VAR_FRONTIER_GAMBLER_FACILITY);
+ *var += a0;
+ *var %= 12;
+}
+
+const u8 *const gUnknown_085B30A4[] = {
+ BattleFrontier_Lounge3_Text_262261,
+ BattleFrontier_Lounge3_Text_26230D,
+ BattleFrontier_Lounge3_Text_2623B9,
+ BattleFrontier_Lounge3_Text_262464,
+ BattleFrontier_Lounge3_Text_26250E,
+ BattleFrontier_Lounge3_Text_2625B8,
+ BattleFrontier_Lounge3_Text_26266A,
+ BattleFrontier_Lounge3_Text_26271C,
+ BattleFrontier_Lounge3_Text_2627C9,
+ BattleFrontier_Lounge3_Text_262876,
+ BattleFrontier_Lounge3_Text_26291A,
+ BattleFrontier_Lounge3_Text_2629BC,
+};
+
+void sub_813A820(void)
+{
+ u16 var = VarGet(VAR_FRONTIER_GAMBLER_FACILITY);
+ ShowFieldMessage(gUnknown_085B30A4[var]);
+ VarSet(VAR_FRONTIER_GAMBLER_SET_FACILITY_F, var);
+}
+
+const u8 *const gUnknown_085B30D4[] = {
+ BattleFrontier_Lounge3_Text_262C04,
+ BattleFrontier_Lounge3_Text_262C90,
+ BattleFrontier_Lounge3_Text_262D1C,
+ BattleFrontier_Lounge3_Text_262DA7,
+ BattleFrontier_Lounge3_Text_262E34,
+ BattleFrontier_Lounge3_Text_262EC1,
+ BattleFrontier_Lounge3_Text_262F56,
+ BattleFrontier_Lounge3_Text_262FEB,
+ BattleFrontier_Lounge3_Text_263078,
+ BattleFrontier_Lounge3_Text_263105,
+ BattleFrontier_Lounge3_Text_26318C,
+ BattleFrontier_Lounge3_Text_263211,
+};
+
+void sub_813A854(void)
+{
+ ShowFieldMessage(gUnknown_085B30D4[VarGet(VAR_FRONTIER_GAMBLER_SET_FACILITY_F)]);
+}
+
+const u16 gUnknown_085B3104[] = {0x0000, 0x0001, 0x0002, 0x0100, 0x0101, 0x0400, 0x0401, 0x0200, 0x0201, 0x0300, 0x0500, 0x0600};
+
+void sub_813A878(u8 a0)
+{
+ u16 var1 = VarGet(VAR_0x40CE);
+ u16 var2 = VarGet(VAR_FRONTIER_GAMBLER_SET_FACILITY_F);
+ u16 var3 = VarGet(VAR_FRONTIER_FACILITY);
+
+ if (VarGet(VAR_FRONTIER_GAMBLER_PLACED_BET_F) == 1)
+ {
+ if (gUnknown_085B3104[var2] == (var3 << 8) + var1)
+ {
+ if (a0 != 0)
+ {
+ VarSet(VAR_FRONTIER_GAMBLER_PLACED_BET_F, 2);
+ }
+ else
+ {
+ VarSet(VAR_FRONTIER_GAMBLER_PLACED_BET_F, 3);
+ }
+ }
+ }
+}
+
+void sub_813A8FC(void)
+{
+ u8 string[32];
+ u32 x;
+ StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.frontierBattlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP);
+ x = GetStringRightAlignXOffset(1, string, 48);
+ PrintTextOnWindow(gUnknown_0203AB6D, 1, string, x, 1, 0, NULL);
+}
+
+const struct WindowTemplate gUnknown_085B311C = {
+ .priority = 0,
+ .tilemapLeft = 1,
+ .tilemapTop = 1,
+ .width = 6,
+ .height = 2,
+ .paletteNum = 15,
+ .baseBlock = 8,
+};
+
+void sub_813A958(void)
+{
+ gUnknown_0203AB6D = AddWindow(&gUnknown_085B311C);
+ SetStandardWindowBorderStyle(gUnknown_0203AB6D, 0);
+ sub_813A8FC();
+ CopyWindowToVram(gUnknown_0203AB6D, 2);
+}
+
+void sub_813A988(void)
+{
+ sub_8198070(gUnknown_0203AB6D, TRUE);
+ RemoveWindow(gUnknown_0203AB6D);
+}
+
+void sub_813A9A4(void)
+{
+ if (gSaveBlock2Ptr->frontier.frontierBattlePoints < gSpecialVar_0x8004)
+ {
+ gSaveBlock2Ptr->frontier.frontierBattlePoints = 0;
+ }
+ else
+ {
+ gSaveBlock2Ptr->frontier.frontierBattlePoints -= gSpecialVar_0x8004;
+ }
+}
+
+void sub_813A9D0(void)
+{
+ if (gSaveBlock2Ptr->frontier.frontierBattlePoints + gSpecialVar_0x8004 > 0x270F)
+ {
+ gSaveBlock2Ptr->frontier.frontierBattlePoints = 0x270f;
+ }
+ else
+ {
+ gSaveBlock2Ptr->frontier.frontierBattlePoints = gSaveBlock2Ptr->frontier.frontierBattlePoints + gSpecialVar_0x8004;
+ }
+}
+
+u16 sub_813AA04(void)
+{
+ return gSaveBlock2Ptr->frontier.frontierBattlePoints;
+}
+
+const struct WindowTemplate gUnknown_085B3124 = {
+ .priority = 0,
+ .tilemapLeft = 2,
+ .tilemapTop = 9,
+ .width = 4,
+ .height = 4,
+ .paletteNum = 15,
+ .baseBlock = 20,
+};
+
+void sub_813AA18(void)
+{
+ gUnknown_0203AB6E = AddWindow(&gUnknown_085B3124);
+ SetStandardWindowBorderStyle(gUnknown_0203AB6E, 0);
+ CopyWindowToVram(gUnknown_0203AB6E, 2);
+}
+
+void sub_813AA44(void)
+{
+ sub_8198070(gUnknown_0203AB6E, TRUE);
+ RemoveWindow(gUnknown_0203AB6E);
+}
+
+const u16 gUnknown_085B312C[] = { 0x004b, 0x0067, 0x0057, 0x004f, 0x0054, 0x0055, 0x0056, 0x0050, 0x0051, 0x0052, 0xffff };
+const u16 gUnknown_085B3142[] = { 0x0071, 0x006f, 0x0072, 0x0073, 0x0074, 0xffff };
+const u16 gUnknown_085B314E[] = { 0x0040, 0x0043, 0x0041, 0x0046, 0x0042, 0x003f, 0xffff };
+const u16 gUnknown_085B315C[] = { 0x00c8, 0x00b4, 0x00b7, 0x00b9, 0x00b3, 0x00ba, 0x00bb, 0x00c4, 0x00c6, 0xffff };
+
+const u8 *const gUnknown_085B3170[] = {
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2601AA,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2601D0,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260201,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26022F,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26025B,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260287,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2602B5,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2602E0,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26030F,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26033E,
+ gText_Exit,
+};
+
+const u8 *const gUnknown_085B319C[] = {
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
+ gText_Exit
+};
+
+const u8 *const gUnknown_085B31B4[] = {
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260397,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2603BE,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2603E6,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26040E,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260436,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26045C,
+ gText_Exit
+};
+
+const u8 *const gUnknown_085B31D0[] = {
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26047A,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2604AC,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2604D8,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_26050F,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260542,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260575,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2605A8,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_2605E2,
+ BattleFrontier_BattlePointExchangeServiceCorner_Text_260613,
+ gText_Exit
+};
+
+void sub_813ABD4(u16 a0);
+
+void sub_813AA60(u16 a0, u16 a1)
+{
+ if (a0 > 2 && a0 < 7)
+ {
+ FillWindowPixelRect(0, 0x11, 0, 0, 216, 32);
+ switch (a0)
+ {
+ case 3:
+ AddTextPrinterParameterized(0, 1, gUnknown_085B3170[a1], 0, NULL, 2, 1, 3);
+ if (gUnknown_085B312C[a1] == 0xFFFF)
+ {
+ sub_813ABD4(gUnknown_085B312C[a1]);
+ }
+ else
+ {
+ FreeSpriteTilesByTag(5500);
+ FreeSpritePaletteByTag(5500);
+ gUnknown_0203AB6C = AddDecorationIconObject(gUnknown_085B312C[a1], 33, 88, 0, 5500, 5500);
+ }
+ break;
+ case 4:
+ AddTextPrinterParameterized(0, 1, gUnknown_085B319C[a1], 0, NULL, 2, 1, 3);
+ if (gUnknown_085B3142[a1] == 0xFFFF)
+ {
+ sub_813ABD4(gUnknown_085B3142[a1]);
+ }
+ else
+ {
+ FreeSpriteTilesByTag(5500);
+ FreeSpritePaletteByTag(5500);
+ gUnknown_0203AB6C = AddDecorationIconObject(gUnknown_085B3142[a1], 33, 88, 0, 5500, 5500);
+ }
+ break;
+ case 5:
+ AddTextPrinterParameterized(0, 1, gUnknown_085B31B4[a1], 0, NULL, 2, 1, 3);
+ sub_813ABD4(gUnknown_085B314E[a1]);
+ break;
+ case 6:
+ AddTextPrinterParameterized(0, 1, gUnknown_085B31D0[a1], 0, NULL, 2, 1, 3);
+ sub_813ABD4(gUnknown_085B315C[a1]);
+ break;
+ }
+ }
+}
+
+void sub_813ABD4(u16 a0)
+{
+ FreeSpriteTilesByTag(5500);
+ FreeSpritePaletteByTag(5500);
+ gUnknown_0203AB6C = AddItemIconSprite(5500, 5500, a0);
+
+ if (gUnknown_0203AB6C != MAX_SPRITES)
+ {
+ gSprites[gUnknown_0203AB6C].oam.priority = 0;
+ gSprites[gUnknown_0203AB6C].pos1.x = 36;
+ gSprites[gUnknown_0203AB6C].pos1.y = 92;
+ }
+}
+
+void sub_813AC44(u16 a0, u16 unused)
+{
+ if (gUnknown_0203AB6C != MAX_SPRITES)
+ {
+ switch (a0)
+ {
+ case 3 ... 6:
+ DestroySpriteAndFreeResources(&gSprites[gUnknown_0203AB6C]);
+ break;
+ }
+ gUnknown_0203AB6C = MAX_SPRITES;
+ }
+}
+
+const u16 gUnknown_085B31F8[] = { 0x0087, 0x0045, 0x008a, 0x0005, 0x0019, 0x0022, 0x009d, 0x0044, 0x0056, 0x000e };
+const u16 gUnknown_085B320C[] = { 0x006f, 0x00ad, 0x00bd, 0x0081, 0x00c4, 0x00cb, 0x00f4, 0x0008, 0x0009, 0x0007 };
+
+void sub_813AC7C(void)
+{
+ if (gSpecialVar_0x8005 != 0)
+ {
+ StringCopy(gStringVar1, gMoveNames[gUnknown_085B320C[gSpecialVar_0x8004]]);
+ }
+ else
+ {
+ StringCopy(gStringVar1, gMoveNames[gUnknown_085B31F8[gSpecialVar_0x8004]]);
+ }
+}
+
+const struct WindowTemplate gUnknown_085B3220 = {
+ .priority = 0,
+ .tilemapLeft = 1,
+ .tilemapTop = 7,
+ .width = 12,
+ .height = 6,
+ .paletteNum = 15,
+ .baseBlock = 28,
+};
+
+void sub_813ACE8(u8 a0, u16 a1)
+{
+ if (a0 == 9 || a0 == 10)
+ {
+ if (gSpecialVar_0x8006 == 0)
+ {
+ gUnknown_0203AB5E = AddWindow(&gUnknown_085B3220);
+ SetStandardWindowBorderStyle(gUnknown_0203AB5E, 0);
+ }
+ sub_813AD34(a0, a1);
+ }
+}
+
+const u8 *const gUnknown_085B3228[] = {
+ BattleFrontier_Lounge7_Text_265E30,
+ BattleFrontier_Lounge7_Text_265E5B,
+ BattleFrontier_Lounge7_Text_265E8A,
+ BattleFrontier_Lounge7_Text_265EC0,
+ BattleFrontier_Lounge7_Text_265EED,
+ BattleFrontier_Lounge7_Text_265F1C,
+ BattleFrontier_Lounge7_Text_265F47,
+ BattleFrontier_Lounge7_Text_265F77,
+ BattleFrontier_Lounge7_Text_265FAA,
+ BattleFrontier_Lounge7_Text_265FDD,
+ gText_Exit,
+};
+
+const u8 *const gUnknown_085B3254[] = {
+ BattleFrontier_Lounge7_Text_26600A,
+ BattleFrontier_Lounge7_Text_26603E,
+ BattleFrontier_Lounge7_Text_266070,
+ BattleFrontier_Lounge7_Text_2660A6,
+ BattleFrontier_Lounge7_Text_2660D0,
+ BattleFrontier_Lounge7_Text_2660FF,
+ BattleFrontier_Lounge7_Text_26612D,
+ BattleFrontier_Lounge7_Text_26615F,
+ BattleFrontier_Lounge7_Text_266185,
+ BattleFrontier_Lounge7_Text_2661B5,
+ gText_Exit,
+};
+
+void sub_813AD34(u8 a0, u16 a1)
+{
+ if (a0 == 9 || a0 == 10)
+ {
+ FillWindowPixelRect(gUnknown_0203AB5E, 0x11, 0, 0, 96, 48);
+ if (a0 == 10)
+ {
+ PrintTextOnWindow(gUnknown_0203AB5E, 1, gUnknown_085B3254[a1], 0, 1, 0, NULL);
+ }
+ else
+ {
+ PrintTextOnWindow(gUnknown_0203AB5E, 1, gUnknown_085B3228[a1], 0, 1, 0, NULL);
+ }
+ }
+}
+
+void sub_813ADB8(void)
+{
+ sub_8198070(gUnknown_0203AB5E, TRUE);
+ RemoveWindow(gUnknown_0203AB5E);
+}
+
+void sub_813ADD4(void)
+{
+ u16 scrollOffset, selectedRow;
+ u8 i;
+ u8 taskId = FindTaskIdByFunc(sub_813A600);
+ if (taskId != 0xFF)
+ {
+ struct Task *task = &gTasks[taskId];
+ ListMenuGetScrollAndRow(task->data[14], &scrollOffset, &selectedRow);
+ SetStandardWindowBorderStyle(task->data[13], 0);
+
+ for (i = 0; i < 6; i++)
+ {
+ sub_8199F74(task->data[13], 1, gUnknown_085B2CF0[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
+ }
+
+ PrintTextOnWindow(task->data[13], 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
+ PutWindowTilemap(task->data[13]);
+ CopyWindowToVram(task->data[13], 3);
+ }
+}
+
+void sub_813AEB4(void)
+{
+ u8 i;
+ u16 temp1 = 0;
+ u16 temp2 = 0;
+ gSpecialVar_0x8005 = 0;
+
+ temp1 = VarGet(VAR_TEMP_E);
+ temp2 = VarGet(VAR_TEMP_D);
+
+ if (temp1 != 0)
+ {
+ i = 0;
+ do
+ {
+ if (gUnknown_0861500C[i] == gUnknown_085B320C[temp2])
+ {
+ gSpecialVar_0x8005 = i;
+ break;
+ }
+ i++;
+ } while (i < 30);
+ }
+ else
+ {
+ i = 0;
+ do
+ {
+ if (gUnknown_0861500C[i] == gUnknown_085B31F8[temp2])
+ {
+ gSpecialVar_0x8005 = i;
+ break;
+ }
+ i++;
+ } while (i < 30);
+ }
+}
+
+void sub_813AF48(void)
+{
+ u8 taskId = FindTaskIdByFunc(sub_813A600);
+ if (taskId != 0xFF)
+ {
+ struct Task *task = &gTasks[taskId];
+ DestroyListMenuTask(task->data[14], NULL, NULL);
+ Free(gUnknown_0203AB64);
+ sub_8198070(task->data[13], TRUE);
+ FillWindowPixelBuffer(task->data[13], 0);
+ ClearWindowTilemap(task->data[13]);
+ CopyWindowToVram(task->data[13], 2);
+ RemoveWindow(task->data[13]);
+ DestroyTask(taskId);
+ }
+}
+
+void task_deoxys_sound(u8 taskId);
+
+void sub_813AFC8(void)
+{
+ CreateTask(task_deoxys_sound, 8);
+}
+
+const u16 gUnknown_085B3280[][16] = {
+ INCBIN_U16("graphics/misc/deoxys1.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys2.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys3.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys4.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys5.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys6.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys7.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys8.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys9.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys10.gbapal"),
+ INCBIN_U16("graphics/misc/deoxys11.gbapal"),
+};
+
+const u8 gUnknown_085B33E0[][2] = {
+ { 0x0f, 0x0c },
+ { 0x0b, 0x0e },
+ { 0x0f, 0x08 },
+ { 0x13, 0x0e },
+ { 0x0c, 0x0b },
+ { 0x12, 0x0b },
+ { 0x0f, 0x0e },
+ { 0x0b, 0x0e },
+ { 0x13, 0x0e },
+ { 0x0f, 0x0f },
+ { 0x0f, 0x0a },
+};
+
+const u8 gUnknown_085B33F6[] = { 0x04, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x06, 0x03, 0x03 };
+
+void sub_813B0B4(u8 a0);
+
+void task_deoxys_sound(u8 taskId)
+{
+ if (FlagGet(FLAG_0x8D4) == TRUE)
+ {
+ gSpecialVar_Result = 3;
+ EnableBothScriptContexts();
+ DestroyTask(taskId);
+ }
+ else
+ {
+ u16 temp1 = VarGet(VAR_0x4035);
+ u16 temp2 = VarGet(VAR_0x4034);
+
+ VarSet(VAR_0x4034, 0);
+ if (temp1 != 0 && gUnknown_085B33F6[temp1 - 1] < temp2)
+ {
+ sub_813B0B4(0);
+ VarSet(VAR_0x4035, 0);
+ gSpecialVar_Result = 0;
+ DestroyTask(taskId);
+ }
+ else if (temp1 == 10)
+ {
+ FlagSet(FLAG_0x8D4);
+ gSpecialVar_Result = 2;
+ EnableBothScriptContexts();
+ DestroyTask(taskId);
+ }
+ else
+ {
+ temp1++;
+ sub_813B0B4(temp1);
+ VarSet(VAR_0x4035, temp1);
+ gSpecialVar_Result = 1;
+ DestroyTask(taskId);
+ }
+ }
+}
+
+void sub_813B160(u8 taskId);
+
+void sub_813B0B4(u8 a0)
+{
+ u8 eventObjectId;
+ LoadPalette(&gUnknown_085B3280[a0], 0x1A0, 8);
+ TryGetEventObjectIdByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &eventObjectId);
+
+ if (a0 == 0)
+ {
+ PlaySE(SE_W109);
+ }
+ else
+ {
+ PlaySE(SE_RG_DEOMOV);
+ }
+
+ CreateTask(sub_813B160, 8);
+
+ gFieldEffectArguments[0] = 1;
+ gFieldEffectArguments[1] = 58;
+ gFieldEffectArguments[2] = 26;
+ gFieldEffectArguments[3] = gUnknown_085B33E0[a0][0];
+ gFieldEffectArguments[4] = gUnknown_085B33E0[a0][1];
+
+ if (a0 == 0)
+ {
+ gFieldEffectArguments[5] = 60;
+ }
+ else
+ {
+ gFieldEffectArguments[5] = 5;
+ }
+
+ FieldEffectStart(FLDEFF_66);
+ Overworld_SetEventObjTemplateCoords(1, gUnknown_085B33E0[a0][0], gUnknown_085B33E0[a0][1]);
+}
+
+void sub_813B160(u8 taskId)
+{
+ if (FieldEffectActiveListContains(FLDEFF_66) == FALSE)
+ {
+ EnableBothScriptContexts();
+ DestroyTask(taskId);
+ }
+}
+
+void increment_var_x4026_on_birth_island_modulo_100(void)
+{
+ u16 var = VarGet(VAR_0x4034);
+ if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(BIRTH_ISLAND_EXTERIOR) && gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BIRTH_ISLAND_EXTERIOR))
+ {
+ var++;
+ if (var > 99)
+ {
+ VarSet(VAR_0x4034, 0);
+ }
+ else
+ {
+ VarSet(VAR_0x4034, var);
+ }
+ }
+}
+
+extern void BlendPalettes(u32, u8, u16);
+
+void sub_813B1D0(void)
+{
+ LoadPalette(&gUnknown_085B3280[(u8)VarGet(VAR_0x4035)], 0x1A0, 8);
+ BlendPalettes(0x04000000, 16, 0);
+}
+
+void set_unknown_box_id(u8 id)
+{
+ gUnknown_0203AB6F = id;
+}
+
+u8 get_unknown_box_id(void)
+{
+ return gUnknown_0203AB6F;
+}
diff --git a/src/menu.c b/src/menu.c
index 223f8fd52..f4ffec023 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -120,7 +120,6 @@ extern void DrawWindowBorder(u8, u8, u8, u8, u8, u8);
extern void sub_81980A8(u8, u8, u8, u8, u8, u8);
extern u8 MoveMenuCursor(s8);
extern u8 sub_8199134(s8, s8);
-extern void sub_8199F74(u8 windowId, u8 fontId, const u8 *str, u8 left, u8 top, u8 speed, void (*callback)(struct TextSubPrinter *, u16), u8 letterSpacing, u8 lineSpacing);
extern void sub_8198C78(void);
extern void task_free_buf_after_copying_tile_data_to_vram(u8 taskId);