summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/easy_chat.s2
-rw-r--r--asm/field_door.s754
-rw-r--r--asm/macros.inc14
-rw-r--r--asm/pokemon_animation.s2
-rw-r--r--data/battle_anim_8170478.s48
-rw-r--r--data/battle_link_817C95C.s174
-rw-r--r--data/data2b.s2
-rw-r--r--data/data2c.s2
-rw-r--r--data/data_860A4AC.s50
-rw-r--r--data/easy_chat.s430
-rw-r--r--data/field_door.s17
-rw-r--r--data/graphics.s6
-rw-r--r--data/pokemon_animation.s240
-rw-r--r--data/rom_8486FEC.s8
-rw-r--r--data/strings.s112
-rw-r--r--graphics/door_anims/00/0.pngbin0 -> 170 bytes
-rw-r--r--graphics/door_anims/00/1.pngbin0 -> 158 bytes
-rw-r--r--graphics/door_anims/00/2.pngbin0 -> 134 bytes
-rw-r--r--graphics/door_anims/01/0.pngbin0 -> 183 bytes
-rw-r--r--graphics/door_anims/01/1.pngbin0 -> 179 bytes
-rw-r--r--graphics/door_anims/01/2.pngbin0 -> 161 bytes
-rw-r--r--graphics/door_anims/02/0.pngbin0 -> 151 bytes
-rw-r--r--graphics/door_anims/02/1.pngbin0 -> 153 bytes
-rw-r--r--graphics/door_anims/02/2.pngbin0 -> 129 bytes
-rw-r--r--graphics/door_anims/03/0.pngbin0 -> 183 bytes
-rw-r--r--graphics/door_anims/03/1.pngbin0 -> 179 bytes
-rw-r--r--graphics/door_anims/03/2.pngbin0 -> 161 bytes
-rw-r--r--graphics/door_anims/04/0.pngbin0 -> 180 bytes
-rw-r--r--graphics/door_anims/04/1.pngbin0 -> 167 bytes
-rw-r--r--graphics/door_anims/04/2.pngbin0 -> 145 bytes
-rw-r--r--graphics/door_anims/05/0.pngbin0 -> 165 bytes
-rw-r--r--graphics/door_anims/05/1.pngbin0 -> 156 bytes
-rw-r--r--graphics/door_anims/05/2.pngbin0 -> 138 bytes
-rw-r--r--graphics/door_anims/06/0.pngbin0 -> 172 bytes
-rw-r--r--graphics/door_anims/06/1.pngbin0 -> 171 bytes
-rw-r--r--graphics/door_anims/06/2.pngbin0 -> 142 bytes
-rw-r--r--graphics/door_anims/07/0.pngbin0 -> 172 bytes
-rw-r--r--graphics/door_anims/07/1.pngbin0 -> 171 bytes
-rw-r--r--graphics/door_anims/07/2.pngbin0 -> 142 bytes
-rw-r--r--graphics/door_anims/08/0.pngbin0 -> 186 bytes
-rw-r--r--graphics/door_anims/08/1.pngbin0 -> 171 bytes
-rw-r--r--graphics/door_anims/08/2.pngbin0 -> 151 bytes
-rw-r--r--graphics/door_anims/09/0.pngbin0 -> 181 bytes
-rw-r--r--graphics/door_anims/09/1.pngbin0 -> 169 bytes
-rw-r--r--graphics/door_anims/09/2.pngbin0 -> 145 bytes
-rw-r--r--graphics/door_anims/10/0.pngbin0 -> 177 bytes
-rw-r--r--graphics/door_anims/10/1.pngbin0 -> 167 bytes
-rw-r--r--graphics/door_anims/10/2.pngbin0 -> 139 bytes
-rw-r--r--graphics/door_anims/11/0.pngbin0 -> 199 bytes
-rw-r--r--graphics/door_anims/11/1.pngbin0 -> 177 bytes
-rw-r--r--graphics/door_anims/11/2.pngbin0 -> 148 bytes
-rw-r--r--graphics/door_anims/12/0.pngbin0 -> 170 bytes
-rw-r--r--graphics/door_anims/12/1.pngbin0 -> 158 bytes
-rw-r--r--graphics/door_anims/12/2.pngbin0 -> 134 bytes
-rw-r--r--graphics/door_anims/13/0.pngbin0 -> 178 bytes
-rw-r--r--graphics/door_anims/13/1.pngbin0 -> 177 bytes
-rw-r--r--graphics/door_anims/13/2.pngbin0 -> 149 bytes
-rw-r--r--graphics/door_anims/14/0.pngbin0 -> 187 bytes
-rw-r--r--graphics/door_anims/14/1.pngbin0 -> 180 bytes
-rw-r--r--graphics/door_anims/14/2.pngbin0 -> 117 bytes
-rw-r--r--graphics/door_anims/15/0.pngbin0 -> 177 bytes
-rw-r--r--graphics/door_anims/15/1.pngbin0 -> 171 bytes
-rw-r--r--graphics/door_anims/15/2.pngbin0 -> 146 bytes
-rw-r--r--graphics/door_anims/16/0.pngbin0 -> 162 bytes
-rw-r--r--graphics/door_anims/16/1.pngbin0 -> 152 bytes
-rw-r--r--graphics/door_anims/16/2.pngbin0 -> 136 bytes
-rw-r--r--graphics/door_anims/17/0.pngbin0 -> 162 bytes
-rw-r--r--graphics/door_anims/17/1.pngbin0 -> 152 bytes
-rw-r--r--graphics/door_anims/17/2.pngbin0 -> 130 bytes
-rw-r--r--graphics/door_anims/18/0.pngbin0 -> 194 bytes
-rw-r--r--graphics/door_anims/18/1.pngbin0 -> 167 bytes
-rw-r--r--graphics/door_anims/18/2.pngbin0 -> 152 bytes
-rw-r--r--graphics/door_anims/19/0.pngbin0 -> 196 bytes
-rw-r--r--graphics/door_anims/19/1.pngbin0 -> 168 bytes
-rw-r--r--graphics/door_anims/19/2.pngbin0 -> 152 bytes
-rw-r--r--graphics/door_anims/20/0.pngbin0 -> 205 bytes
-rw-r--r--graphics/door_anims/20/1.pngbin0 -> 205 bytes
-rw-r--r--graphics/door_anims/20/2.pngbin0 -> 180 bytes
-rw-r--r--graphics/door_anims/21/0.pngbin0 -> 198 bytes
-rw-r--r--graphics/door_anims/21/1.pngbin0 -> 192 bytes
-rw-r--r--graphics/door_anims/21/2.pngbin0 -> 162 bytes
-rw-r--r--graphics/door_anims/22/0.pngbin0 -> 154 bytes
-rw-r--r--graphics/door_anims/22/1.pngbin0 -> 136 bytes
-rw-r--r--graphics/door_anims/22/2.pngbin0 -> 119 bytes
-rw-r--r--graphics/door_anims/23/0.pngbin0 -> 186 bytes
-rw-r--r--graphics/door_anims/23/1.pngbin0 -> 176 bytes
-rw-r--r--graphics/door_anims/23/2.pngbin0 -> 143 bytes
-rw-r--r--graphics/door_anims/24/0.pngbin0 -> 176 bytes
-rw-r--r--graphics/door_anims/24/1.pngbin0 -> 176 bytes
-rw-r--r--graphics/door_anims/24/2.pngbin0 -> 152 bytes
-rw-r--r--graphics/door_anims/25/0.pngbin0 -> 188 bytes
-rw-r--r--graphics/door_anims/25/1.pngbin0 -> 183 bytes
-rw-r--r--graphics/door_anims/25/2.pngbin0 -> 157 bytes
-rw-r--r--graphics/door_anims/26/0.pngbin0 -> 232 bytes
-rw-r--r--graphics/door_anims/26/1.pngbin0 -> 223 bytes
-rw-r--r--graphics/door_anims/26/2.pngbin0 -> 185 bytes
-rw-r--r--graphics/door_anims/27/0.pngbin0 -> 126 bytes
-rw-r--r--graphics/door_anims/27/1.pngbin0 -> 137 bytes
-rw-r--r--graphics/door_anims/27/2.pngbin0 -> 124 bytes
-rw-r--r--graphics/door_anims/28/0.pngbin0 -> 167 bytes
-rw-r--r--graphics/door_anims/28/1.pngbin0 -> 155 bytes
-rw-r--r--graphics/door_anims/28/2.pngbin0 -> 118 bytes
-rw-r--r--graphics/door_anims/29/0.pngbin0 -> 186 bytes
-rw-r--r--graphics/door_anims/29/1.pngbin0 -> 171 bytes
-rw-r--r--graphics/door_anims/29/2.pngbin0 -> 151 bytes
-rw-r--r--graphics/door_anims/30/0.pngbin0 -> 167 bytes
-rw-r--r--graphics/door_anims/30/1.pngbin0 -> 154 bytes
-rw-r--r--graphics/door_anims/30/2.pngbin0 -> 117 bytes
-rw-r--r--graphics/door_anims/31/0.pngbin0 -> 129 bytes
-rw-r--r--graphics/door_anims/31/1.pngbin0 -> 121 bytes
-rw-r--r--graphics/door_anims/31/2.pngbin0 -> 104 bytes
-rw-r--r--graphics/door_anims/32/0.pngbin0 -> 194 bytes
-rw-r--r--graphics/door_anims/32/1.pngbin0 -> 198 bytes
-rw-r--r--graphics/door_anims/32/2.pngbin0 -> 138 bytes
-rw-r--r--graphics/door_anims/33/0.pngbin0 -> 144 bytes
-rw-r--r--graphics/door_anims/33/1.pngbin0 -> 147 bytes
-rw-r--r--graphics/door_anims/33/2.pngbin0 -> 144 bytes
-rw-r--r--graphics/door_anims/34/0.pngbin0 -> 148 bytes
-rw-r--r--graphics/door_anims/34/1.pngbin0 -> 157 bytes
-rw-r--r--graphics/door_anims/34/2.pngbin0 -> 126 bytes
-rw-r--r--graphics/door_anims/35/0.pngbin0 -> 161 bytes
-rw-r--r--graphics/door_anims/35/1.pngbin0 -> 155 bytes
-rw-r--r--graphics/door_anims/35/2.pngbin0 -> 148 bytes
-rw-r--r--graphics/door_anims/36/0.pngbin0 -> 138 bytes
-rw-r--r--graphics/door_anims/36/1.pngbin0 -> 150 bytes
-rw-r--r--graphics/door_anims/36/2.pngbin0 -> 144 bytes
-rw-r--r--graphics/door_anims/37/0.pngbin0 -> 201 bytes
-rw-r--r--graphics/door_anims/37/1.pngbin0 -> 188 bytes
-rw-r--r--graphics/door_anims/37/2.pngbin0 -> 115 bytes
-rw-r--r--graphics/door_anims/38/0.pngbin0 -> 206 bytes
-rw-r--r--graphics/door_anims/38/1.pngbin0 -> 213 bytes
-rw-r--r--graphics/door_anims/38/2.pngbin0 -> 161 bytes
-rw-r--r--graphics/door_anims/39/0.pngbin0 -> 133 bytes
-rw-r--r--graphics/door_anims/39/1.pngbin0 -> 146 bytes
-rw-r--r--graphics/door_anims/39/2.pngbin0 -> 132 bytes
-rw-r--r--graphics/door_anims/40/0.pngbin0 -> 205 bytes
-rw-r--r--graphics/door_anims/40/1.pngbin0 -> 194 bytes
-rw-r--r--graphics/door_anims/40/2.pngbin0 -> 168 bytes
-rw-r--r--graphics/door_anims/41/0.pngbin0 -> 198 bytes
-rw-r--r--graphics/door_anims/41/1.pngbin0 -> 184 bytes
-rw-r--r--graphics/door_anims/41/2.pngbin0 -> 159 bytes
-rw-r--r--graphics/door_anims/42/0.pngbin0 -> 211 bytes
-rw-r--r--graphics/door_anims/42/1.pngbin0 -> 216 bytes
-rw-r--r--graphics/door_anims/42/2.pngbin0 -> 190 bytes
-rw-r--r--graphics/door_anims/42/3.pngbin0 -> 180 bytes
-rw-r--r--graphics/door_anims/43/0.pngbin0 -> 170 bytes
-rw-r--r--graphics/door_anims/43/1.pngbin0 -> 168 bytes
-rw-r--r--graphics/door_anims/43/2.pngbin0 -> 161 bytes
-rw-r--r--graphics/door_anims/44/0_left.pngbin0 -> 172 bytes
-rw-r--r--graphics/door_anims/44/0_right.pngbin0 -> 172 bytes
-rw-r--r--graphics/door_anims/44/1_left.pngbin0 -> 162 bytes
-rw-r--r--graphics/door_anims/44/1_right.pngbin0 -> 161 bytes
-rw-r--r--graphics/door_anims/44/2_left.pngbin0 -> 120 bytes
-rw-r--r--graphics/door_anims/44/2_right.pngbin0 -> 121 bytes
-rw-r--r--graphics/door_anims/45/0.pngbin0 -> 167 bytes
-rw-r--r--graphics/door_anims/45/1.pngbin0 -> 153 bytes
-rw-r--r--graphics/door_anims/45/2.pngbin0 -> 127 bytes
-rw-r--r--graphics/door_anims/46/0.pngbin0 -> 144 bytes
-rw-r--r--graphics/door_anims/46/1.pngbin0 -> 142 bytes
-rw-r--r--graphics/door_anims/46/2.pngbin0 -> 127 bytes
-rw-r--r--graphics/door_anims/47/0.pngbin0 -> 193 bytes
-rw-r--r--graphics/door_anims/47/1.pngbin0 -> 189 bytes
-rw-r--r--graphics/door_anims/47/2.pngbin0 -> 183 bytes
-rw-r--r--graphics/door_anims/48/0.pngbin0 -> 167 bytes
-rw-r--r--graphics/door_anims/48/1.pngbin0 -> 193 bytes
-rw-r--r--graphics/door_anims/48/2.pngbin0 -> 150 bytes
-rw-r--r--graphics/door_anims/48/3.pngbin0 -> 133 bytes
-rw-r--r--graphics/door_anims/49/0.pngbin0 -> 125 bytes
-rw-r--r--graphics/door_anims/49/1.pngbin0 -> 120 bytes
-rw-r--r--graphics/door_anims/49/2.pngbin0 -> 116 bytes
-rw-r--r--graphics/door_anims/50/0.pngbin0 -> 121 bytes
-rw-r--r--graphics/door_anims/50/1.pngbin0 -> 116 bytes
-rw-r--r--graphics/door_anims/50/2.pngbin0 -> 113 bytes
-rw-r--r--graphics/door_anims/unused_848EDEC/0_bottom.pngbin0 -> 106 bytes
-rw-r--r--graphics/door_anims/unused_848EDEC/0_top.pngbin0 -> 111 bytes
-rw-r--r--graphics/door_anims/unused_848EDEC/1_bottom.pngbin0 -> 105 bytes
-rw-r--r--graphics/door_anims/unused_848EDEC/1_top.pngbin0 -> 99 bytes
-rw-r--r--graphics/door_anims/unused_848EDEC/2_bottom.pngbin0 -> 89 bytes
-rw-r--r--graphics/door_anims/unused_848EDEC/2_top.pngbin0 -> 90 bytes
-rw-r--r--graphics/misc/8597C1C.pal7
-rw-r--r--graphics/misc/8597C24.pal9
-rw-r--r--graphics/misc/interview.pal19
-rw-r--r--graphics/misc/interview_arrow.pngbin0 -> 160 bytes
-rw-r--r--graphics/misc/interview_buttons.pngbin0 -> 214 bytes
-rw-r--r--graphics/misc/interview_frame.pngbin0 -> 192 bytes
-rw-r--r--graphics/misc/interview_frame_2.pngbin0 -> 260 bytes
-rw-r--r--graphics/misc/interview_frame_green.pal19
-rw-r--r--graphics/misc/interview_frame_orange.pal19
-rw-r--r--graphics/misc/interview_triangle_cursor.pngbin0 -> 147 bytes
-rw-r--r--include/field_camera.h1
-rw-r--r--include/field_door.h15
-rw-r--r--ld_script.txt8
-rw-r--r--src/field_door.c898
193 files changed, 1881 insertions, 975 deletions
diff --git a/asm/easy_chat.s b/asm/easy_chat.s
index b7a35d964..86c78d2cf 100644
--- a/asm/easy_chat.s
+++ b/asm/easy_chat.s
@@ -6075,7 +6075,7 @@ _0811D19C:
b _0811D1BC
.pool
_0811D1A8:
- ldr r0, =gText_CombineTwoWordsOrPhrases
+ ldr r0, =gText_CombineTwoWordsOrPhrases3
str r0, [sp, 0xC]
b _0811D1BC
.pool
diff --git a/asm/field_door.s b/asm/field_door.s
deleted file mode 100644
index 037c76566..000000000
--- a/asm/field_door.s
+++ /dev/null
@@ -1,754 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start sub_808A400
-sub_808A400: @ 808A400
- push {lr}
- adds r2, r0, 0
- ldrb r0, [r2, 0x3]
- cmp r0, 0x2
- bne _0808A420
- ldrh r1, [r1, 0x2]
- ldr r0, [r2, 0x4]
- adds r0, r1
- ldr r1, =0x06007e00
- movs r2, 0x80
- bl CpuFastSet
- b _0808A42E
- .pool
-_0808A420:
- ldrh r1, [r1, 0x2]
- ldr r0, [r2, 0x4]
- adds r0, r1
- ldr r1, =0x06007f00
- movs r2, 0x40
- bl CpuFastSet
-_0808A42E:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_808A400
-
- thumb_func_start door_build_blockdef
-door_build_blockdef: @ 808A438
- push {r4-r6,lr}
- adds r6, r0, 0
- lsls r1, 16
- lsrs r5, r1, 16
- movs r4, 0
- adds r1, r6, 0
-_0808A444:
- ldrb r0, [r2]
- lsls r0, 28
- lsrs r3, r0, 16
- adds r2, 0x1
- adds r0, r5, r4
- orrs r3, r0
- strh r3, [r1]
- adds r1, 0x2
- adds r4, 0x1
- cmp r4, 0x3
- ble _0808A444
- cmp r4, 0x7
- bgt _0808A472
- lsls r0, r4, 1
- adds r1, r0, r6
-_0808A462:
- ldrb r0, [r2]
- lsls r3, r0, 12
- adds r2, 0x1
- strh r3, [r1]
- adds r1, 0x2
- adds r4, 0x1
- cmp r4, 0x7
- ble _0808A462
-_0808A472:
- pop {r4-r6}
- pop {r0}
- bx r0
- thumb_func_end door_build_blockdef
-
- thumb_func_start door_patch_tilemap
-door_patch_tilemap: @ 808A478
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- sub sp, 0x30
- adds r7, r1, 0
- mov r9, r2
- adds r5, r3, 0
- ldrb r0, [r0, 0x3]
- cmp r0, 0x2
- bne _0808A4F4
- add r4, sp, 0x10
- movs r1, 0xFC
- lsls r1, 2
- adds r0, r4, 0
- adds r2, r5, 0
- bl door_build_blockdef
- mov r6, r9
- subs r6, 0x1
- adds r0, r7, 0
- adds r1, r6, 0
- adds r2, r4, 0
- bl DrawDoorMetatileAt
- movs r1, 0xFD
- lsls r1, 2
- adds r0, r5, 0x4
- mov r8, r0
- adds r0, r4, 0
- mov r2, r8
- bl door_build_blockdef
- adds r0, r7, 0
- mov r1, r9
- adds r2, r4, 0
- bl DrawDoorMetatileAt
- movs r1, 0xFE
- lsls r1, 2
- adds r0, r4, 0
- adds r2, r5, 0
- bl door_build_blockdef
- adds r5, r7, 0x1
- adds r0, r5, 0
- adds r1, r6, 0
- adds r2, r4, 0
- bl DrawDoorMetatileAt
- movs r1, 0xFF
- lsls r1, 2
- adds r0, r4, 0
- mov r2, r8
- bl door_build_blockdef
- adds r0, r5, 0
- mov r1, r9
- adds r2, r4, 0
- bl DrawDoorMetatileAt
- b _0808A522
-_0808A4F4:
- movs r1, 0xFE
- lsls r1, 2
- mov r0, sp
- adds r2, r5, 0
- bl door_build_blockdef
- mov r1, r9
- subs r1, 0x1
- adds r0, r7, 0
- mov r2, sp
- bl DrawDoorMetatileAt
- movs r1, 0xFF
- lsls r1, 2
- adds r2, r5, 0x4
- mov r0, sp
- bl door_build_blockdef
- adds r0, r7, 0
- mov r1, r9
- mov r2, sp
- bl DrawDoorMetatileAt
-_0808A522:
- add sp, 0x30
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end door_patch_tilemap
-
- thumb_func_start sub_808A530
-sub_808A530: @ 808A530
- push {r4-r7,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- adds r6, r2, 0
- subs r7, r6, 0x1
- adds r0, r5, 0
- adds r1, r7, 0
- bl CurrentMapDrawMetatileAt
- adds r0, r5, 0
- adds r1, r6, 0
- bl CurrentMapDrawMetatileAt
- ldrb r0, [r4, 0x3]
- cmp r0, 0x2
- bne _0808A562
- adds r4, r5, 0x1
- adds r0, r4, 0
- adds r1, r7, 0
- bl CurrentMapDrawMetatileAt
- adds r0, r4, 0
- adds r1, r6, 0
- bl CurrentMapDrawMetatileAt
-_0808A562:
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_808A530
-
- thumb_func_start sub_808A568
-sub_808A568: @ 808A568
- push {r4-r7,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- adds r6, r2, 0
- adds r7, r3, 0
- ldrh r1, [r5, 0x2]
- ldr r0, =0x0000ffff
- cmp r1, r0
- bne _0808A5B0
- adds r0, r4, 0
- adds r1, r6, 0
- adds r2, r7, 0
- bl sub_808A530
- bl sub_808A964
- lsls r0, 24
- cmp r0, 0
- beq _0808A5E2
- ldr r0, =gSpecialVar_0x8004
- ldrh r1, [r0]
- adds r1, 0x7
- ldr r0, =gSpecialVar_0x8005
- ldrh r2, [r0]
- adds r2, 0x7
- adds r0, r4, 0
- bl sub_808A530
- b _0808A5E2
- .pool
-_0808A5B0:
- adds r0, r4, 0
- adds r1, r5, 0
- bl sub_808A400
- ldr r3, [r4, 0x8]
- adds r0, r4, 0
- adds r1, r6, 0
- adds r2, r7, 0
- bl door_patch_tilemap
- bl sub_808A964
- lsls r0, 24
- cmp r0, 0
- beq _0808A5E2
- ldr r0, =gSpecialVar_0x8004
- ldrh r1, [r0]
- adds r1, 0x7
- ldr r0, =gSpecialVar_0x8005
- ldrh r2, [r0]
- adds r2, 0x7
- ldr r3, [r4, 0x8]
- adds r0, r4, 0
- bl door_patch_tilemap
-_0808A5E2:
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_808A568
-
- thumb_func_start sub_808A5F0
-sub_808A5F0: @ 808A5F0
- push {r4-r6,lr}
- adds r6, r0, 0
- adds r5, r1, 0
- adds r4, r2, 0
- movs r1, 0xA
- ldrsh r0, [r4, r1]
- cmp r0, 0
- bne _0808A616
- movs r2, 0x8
- ldrsh r1, [r4, r2]
- lsls r1, 2
- adds r1, r5, r1
- movs r0, 0xC
- ldrsh r2, [r4, r0]
- movs r0, 0xE
- ldrsh r3, [r4, r0]
- adds r0, r6, 0
- bl sub_808A568
-_0808A616:
- movs r2, 0xA
- ldrsh r1, [r4, r2]
- movs r2, 0x8
- ldrsh r0, [r4, r2]
- lsls r0, 2
- adds r0, r5
- ldrb r0, [r0]
- cmp r1, r0
- bne _0808A644
- movs r0, 0
- strh r0, [r4, 0xA]
- ldrh r0, [r4, 0x8]
- adds r0, 0x1
- strh r0, [r4, 0x8]
- movs r1, 0x8
- ldrsh r0, [r4, r1]
- lsls r0, 2
- adds r0, r5
- ldrb r0, [r0]
- cmp r0, 0
- bne _0808A64A
- movs r0, 0
- b _0808A64C
-_0808A644:
- ldrh r0, [r4, 0xA]
- adds r0, 0x1
- strh r0, [r4, 0xA]
-_0808A64A:
- movs r0, 0x1
-_0808A64C:
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end sub_808A5F0
-
- thumb_func_start task50_overworld_door
-task50_overworld_door: @ 808A654
- push {r4,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- lsls r2, r4, 2
- adds r2, r4
- lsls r2, 3
- ldr r0, =gTasks + 0x8
- adds r2, r0
- ldrh r1, [r2]
- lsls r1, 16
- ldrh r0, [r2, 0x2]
- orrs r1, r0
- ldrh r0, [r2, 0x4]
- lsls r0, 16
- ldrh r3, [r2, 0x6]
- orrs r0, r3
- bl sub_808A5F0
- cmp r0, 0
- bne _0808A682
- adds r0, r4, 0
- bl DestroyTask
-_0808A682:
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end task50_overworld_door
-
- thumb_func_start door_frame_last
-door_frame_last: @ 808A68C
- push {lr}
- adds r1, r0, 0
- b _0808A694
-_0808A692:
- adds r1, 0x4
-_0808A694:
- ldrb r0, [r1]
- cmp r0, 0
- bne _0808A692
- subs r0, r1, 0x4
- pop {r1}
- bx r1
- thumb_func_end door_frame_last
-
- thumb_func_start door_find
-door_find: @ 808A6A0
- push {lr}
- adds r2, r0, 0
- lsls r1, 16
- lsrs r1, 16
- b _0808A6B6
-_0808A6AA:
- ldrh r0, [r2]
- cmp r0, r1
- bne _0808A6B4
- adds r0, r2, 0
- b _0808A6BE
-_0808A6B4:
- adds r2, 0xC
-_0808A6B6:
- ldr r0, [r2, 0x4]
- cmp r0, 0
- bne _0808A6AA
- movs r0, 0
-_0808A6BE:
- pop {r1}
- bx r1
- thumb_func_end door_find
-
- thumb_func_start task_overworld_door_add_if_inactive
-task_overworld_door_add_if_inactive: @ 808A6C4
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- adds r6, r0, 0
- adds r5, r1, 0
- adds r7, r2, 0
- mov r8, r3
- ldr r4, =task50_overworld_door
- adds r0, r4, 0
- bl FuncIsActiveTask
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- beq _0808A718
- adds r0, r4, 0
- movs r1, 0x50
- bl CreateTask
- lsls r0, 24
- lsrs r0, 24
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- ldr r2, =gTasks + 0x8
- adds r1, r2
- strh r7, [r1, 0xC]
- mov r2, r8
- strh r2, [r1, 0xE]
- strh r5, [r1, 0x2]
- lsrs r2, r5, 16
- strh r2, [r1]
- strh r6, [r1, 0x6]
- lsrs r2, r6, 16
- strh r2, [r1, 0x4]
- lsls r0, 24
- asrs r0, 24
- b _0808A71C
- .pool
-_0808A718:
- movs r0, 0x1
- negs r0, r0
-_0808A71C:
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end task_overworld_door_add_if_inactive
-
- thumb_func_start sub_808A728
-sub_808A728: @ 808A728
- push {lr}
- bl sub_808A530
- pop {r0}
- bx r0
- thumb_func_end sub_808A728
-
- thumb_func_start sub_808A734
-sub_808A734: @ 808A734
- push {r4-r6,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- adds r6, r2, 0
- adds r0, r5, 0
- adds r1, r6, 0
- bl MapGridGetMetatileIdAt
- adds r1, r0, 0
- lsls r1, 16
- lsrs r1, 16
- adds r0, r4, 0
- bl door_find
- adds r4, r0, 0
- cmp r4, 0
- beq _0808A76A
- ldr r1, =gUnknown_08496F8C
- adds r0, r1, 0
- bl door_frame_last
- adds r1, r0, 0
- adds r0, r4, 0
- adds r2, r5, 0
- adds r3, r6, 0
- bl sub_808A568
-_0808A76A:
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_808A734
-
- thumb_func_start task_overworld_door_add_for_opening_door_at
-@ s32 task_overworld_door_add_for_opening_door_at(void *a1, s32 x, s32 y)
-task_overworld_door_add_for_opening_door_at: @ 808A774
- push {r4-r6,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- adds r6, r2, 0
- adds r0, r5, 0
- adds r1, r6, 0
- bl MapGridGetMetatileIdAt
- adds r1, r0, 0
- lsls r1, 16
- lsrs r1, 16
- adds r0, r4, 0
- bl door_find
- adds r2, r0, 0
- adds r4, r2, 0
- cmp r2, 0
- bne _0808A79E
- movs r0, 0x1
- negs r0, r0
- b _0808A7C0
-_0808A79E:
- ldrb r0, [r2, 0x3]
- cmp r0, 0x2
- beq _0808A7B0
- ldr r1, =gUnknown_08496F8C
- adds r0, r2, 0
- b _0808A7B4
- .pool
-_0808A7B0:
- ldr r1, =gUnknown_08496FB4
- adds r0, r4, 0
-_0808A7B4:
- adds r2, r5, 0
- adds r3, r6, 0
- bl task_overworld_door_add_if_inactive
- lsls r0, 24
- asrs r0, 24
-_0808A7C0:
- pop {r4-r6}
- pop {r1}
- bx r1
- .pool
- thumb_func_end task_overworld_door_add_for_opening_door_at
-
- thumb_func_start sub_808A7CC
-sub_808A7CC: @ 808A7CC
- push {r4-r6,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- adds r6, r2, 0
- adds r0, r5, 0
- adds r1, r6, 0
- bl MapGridGetMetatileIdAt
- adds r1, r0, 0
- lsls r1, 16
- lsrs r1, 16
- adds r0, r4, 0
- bl door_find
- cmp r0, 0
- beq _0808A800
- ldr r1, =gUnknown_08496FA0
- adds r2, r5, 0
- adds r3, r6, 0
- bl task_overworld_door_add_if_inactive
- lsls r0, 24
- asrs r0, 24
- b _0808A804
- .pool
-_0808A800:
- movs r0, 0x1
- negs r0, r0
-_0808A804:
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end sub_808A7CC
-
- thumb_func_start cur_mapdata_get_door_x2_at
-cur_mapdata_get_door_x2_at: @ 808A80C
- push {r4,lr}
- adds r4, r0, 0
- adds r0, r1, 0
- adds r1, r2, 0
- bl MapGridGetMetatileIdAt
- adds r1, r0, 0
- lsls r1, 16
- lsrs r1, 16
- adds r0, r4, 0
- bl door_find
- cmp r0, 0
- beq _0808A830
- ldrb r0, [r0, 0x2]
- lsls r0, 24
- asrs r0, 24
- b _0808A834
-_0808A830:
- movs r0, 0x1
- negs r0, r0
-_0808A834:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end cur_mapdata_get_door_x2_at
-
- thumb_func_start sub_808A83C
-sub_808A83C: @ 808A83C
- push {lr}
- adds r3, r0, 0
- adds r2, r1, 0
- ldr r0, =gUnknown_08497174
- adds r1, r3, 0
- bl task_overworld_door_add_for_opening_door_at
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_808A83C
-
- thumb_func_start FieldSetDoorOpened
-FieldSetDoorOpened: @ 808A854
- push {r4,r5,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- bl MapGridGetMetatileBehaviorAt
- lsls r0, 24
- lsrs r0, 24
- bl MetatileBehavior_IsDoor
- lsls r0, 24
- cmp r0, 0
- beq _0808A876
- ldr r0, =gUnknown_08497174
- adds r1, r4, 0
- adds r2, r5, 0
- bl sub_808A734
-_0808A876:
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end FieldSetDoorOpened
-
- thumb_func_start FieldSetDoorClosed
-FieldSetDoorClosed: @ 808A880
- push {r4,r5,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- bl MapGridGetMetatileBehaviorAt
- lsls r0, 24
- lsrs r0, 24
- bl MetatileBehavior_IsDoor
- lsls r0, 24
- cmp r0, 0
- beq _0808A8A2
- ldr r0, =gUnknown_08497174
- adds r1, r4, 0
- adds r2, r5, 0
- bl sub_808A728
-_0808A8A2:
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end FieldSetDoorClosed
-
- thumb_func_start FieldAnimateDoorClose
-FieldAnimateDoorClose: @ 808A8AC
- push {r4,r5,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- bl MapGridGetMetatileBehaviorAt
- lsls r0, 24
- lsrs r0, 24
- bl MetatileBehavior_IsDoor
- lsls r0, 24
- cmp r0, 0
- beq _0808A8D8
- ldr r0, =gUnknown_08497174
- adds r1, r4, 0
- adds r2, r5, 0
- bl sub_808A7CC
- lsls r0, 24
- asrs r0, 24
- b _0808A8DC
- .pool
-_0808A8D8:
- movs r0, 0x1
- negs r0, r0
-_0808A8DC:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end FieldAnimateDoorClose
-
- thumb_func_start FieldAnimateDoorOpen
-FieldAnimateDoorOpen: @ 808A8E4
- push {r4,r5,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- bl MapGridGetMetatileBehaviorAt
- lsls r0, 24
- lsrs r0, 24
- bl MetatileBehavior_IsDoor
- lsls r0, 24
- cmp r0, 0
- beq _0808A910
- ldr r0, =gUnknown_08497174
- adds r1, r4, 0
- adds r2, r5, 0
- bl task_overworld_door_add_for_opening_door_at
- lsls r0, 24
- asrs r0, 24
- b _0808A914
- .pool
-_0808A910:
- movs r0, 0x1
- negs r0, r0
-_0808A914:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end FieldAnimateDoorOpen
-
- thumb_func_start FieldIsDoorAnimationRunning
-FieldIsDoorAnimationRunning: @ 808A91C
- push {lr}
- ldr r0, =task50_overworld_door
- bl FuncIsActiveTask
- lsls r0, 24
- lsrs r0, 24
- pop {r1}
- bx r1
- .pool
- thumb_func_end FieldIsDoorAnimationRunning
-
- thumb_func_start GetDoorSoundEffect
-GetDoorSoundEffect: @ 808A930
- push {lr}
- adds r3, r0, 0
- adds r2, r1, 0
- ldr r0, =gUnknown_08497174
- adds r1, r3, 0
- bl cur_mapdata_get_door_x2_at
- lsls r0, 24
- asrs r0, 24
- cmp r0, 0
- beq _0808A958
- cmp r0, 0x1
- bne _0808A954
- movs r0, 0x12
- b _0808A95E
- .pool
-_0808A954:
- cmp r0, 0x2
- beq _0808A95C
-_0808A958:
- movs r0, 0x8
- b _0808A95E
-_0808A95C:
- movs r0, 0x2F
-_0808A95E:
- pop {r1}
- bx r1
- thumb_func_end GetDoorSoundEffect
-
- thumb_func_start sub_808A964
-sub_808A964: @ 808A964
- push {lr}
- ldr r0, =0x00004002
- bl FlagGet
- lsls r0, 24
- cmp r0, 0
- beq _0808A990
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldrh r1, [r0, 0x4]
- ldr r0, =0x0000101a
- cmp r1, r0
- bne _0808A990
- movs r0, 0x1
- b _0808A992
- .pool
-_0808A990:
- movs r0, 0
-_0808A992:
- pop {r1}
- bx r1
- thumb_func_end sub_808A964
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/macros.inc b/asm/macros.inc
index ee58cc14e..7c35e059d 100644
--- a/asm/macros.inc
+++ b/asm/macros.inc
@@ -119,3 +119,17 @@
.2byte \unknown
.fill 4 @ padding
.endm
+
+ .macro door_anim_frame unknown, offset
+ .byte \unknown
+ .byte 0 @ padding
+ .2byte \offset
+ .endm
+
+ .macro door_anim_gfx metatile_num, unknown, unknown2, tile_addr, palette_addr
+ .2byte \metatile_num
+ .byte \unknown
+ .byte \unknown2
+ .4byte \tile_addr
+ .4byte \palette_addr
+ .endm
diff --git a/asm/pokemon_animation.s b/asm/pokemon_animation.s
index 870e658f7..a625f8511 100644
--- a/asm/pokemon_animation.s
+++ b/asm/pokemon_animation.s
@@ -333,7 +333,7 @@ sub_817F670: @ 817F670
movs r1, 0x3
orrs r0, r1
strb r0, [r4, 0x1]
- ldr r0, =gUnknown_0860AD68
+ ldr r0, =gSpriteAffineAnimTable_860AD68
str r0, [r4, 0x10]
ldr r0, =gUnknown_03001274
ldr r0, [r0]
diff --git a/data/battle_anim_8170478.s b/data/battle_anim_8170478.s
index e63f4e4a7..07516ba35 100644
--- a/data/battle_anim_8170478.s
+++ b/data/battle_anim_8170478.s
@@ -10,33 +10,33 @@ gUnknown_085E5088:: @ 85E5088
.align 2
gUnknown_085E5094:: @ 85E5094
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6ec0100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6ed0100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6ee0100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6ef0100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6f00100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6f10100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6f20100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6f30100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6f40100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6f50100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6f60100
- .4byte gBattleAnimSpriteSheet_Particles, 0xd6f70100
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6ec
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6ed
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6ee
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6ef
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6f0
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6f1
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6f2
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6f3
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6f4
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6f5
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6f6
+ obj_tiles gBattleAnimSpriteSheet_Particles, 0x0100, 0xd6f7
.align 2
gUnknown_085E50F4:: @ 85E50F4
- .4byte gBattleAnimSpritePalette_136, 0x0000d6ec
- .4byte gBattleAnimSpritePalette_136, 0x0000d6ed
- .4byte gBattleAnimSpritePalette_136, 0x0000d6ee
- .4byte gBattleAnimSpritePalette_136, 0x0000d6ef
- .4byte gBattleAnimSpritePalette_136, 0x0000d6f0
- .4byte gBattleAnimSpritePalette_136, 0x0000d6f1
- .4byte gBattleAnimSpritePalette_136, 0x0000d6f2
- .4byte gBattleAnimSpritePalette_136, 0x0000d6f3
- .4byte gBattleAnimSpritePalette_136, 0x0000d6f4
- .4byte gBattleAnimSpritePalette_136, 0x0000d6f5
- .4byte gBattleAnimSpritePalette_136, 0x0000d6f6
- .4byte gBattleAnimSpritePalette_136, 0x0000d6f7
+ obj_pal gBattleAnimSpritePalette_136, 0xd6ec
+ obj_pal gBattleAnimSpritePalette_136, 0xd6ed
+ obj_pal gBattleAnimSpritePalette_136, 0xd6ee
+ obj_pal gBattleAnimSpritePalette_136, 0xd6ef
+ obj_pal gBattleAnimSpritePalette_136, 0xd6f0
+ obj_pal gBattleAnimSpritePalette_136, 0xd6f1
+ obj_pal gBattleAnimSpritePalette_136, 0xd6f2
+ obj_pal gBattleAnimSpritePalette_136, 0xd6f3
+ obj_pal gBattleAnimSpritePalette_136, 0xd6f4
+ obj_pal gBattleAnimSpritePalette_136, 0xd6f5
+ obj_pal gBattleAnimSpritePalette_136, 0xd6f6
+ obj_pal gBattleAnimSpritePalette_136, 0xd6f7
.align 2
gUnknown_085E5154:: @ 85E5154
diff --git a/data/battle_link_817C95C.s b/data/battle_link_817C95C.s
new file mode 100644
index 000000000..24f70c79c
--- /dev/null
+++ b/data/battle_link_817C95C.s
@@ -0,0 +1,174 @@
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
+
+ .section .rodata
+
+ .align 1
+gUnknown_0860A4AC:: @ 860A4AC
+ .2byte 0x0044, 0x005a, 0x0075, 0x00f3, 0x0020, 0x00af, 0x00b3, 0x00ed, 0x0149, 0x0108, 0x011c, 0x0143, 0x008a, 0x0137, 0x00ad, 0x00dc
+ .2byte 0x000c, 0x00da, 0x00d8, 0x011b, 0x00d9, 0x0117, 0xffff, 0x00de, 0x0095, 0xffff
+
+ .align 1
+gUnknown_0860A4E0:: @ 860A4E0
+ .2byte 0x0001, 0x0001, 0x0001, 0x0004, 0x0001, 0x0001, 0x0001, 0x0000, 0x0005, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001
+ .2byte 0x0001, 0x0002, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0005, 0x0005, 0x0004, 0x0005, 0x0001, 0x0003, 0x0001
+ .2byte 0x0003, 0x0005, 0x0001, 0x0007, 0x0001, 0x0007, 0x0007, 0x0001, 0x0005, 0x0002, 0x0004, 0x0001, 0x0001, 0x0001, 0x0005, 0x0001
+ .2byte 0x0002, 0x0004, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001
+ .2byte 0x0001, 0x0007, 0x0004, 0x0004, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0004, 0x0001, 0x0001, 0x0001, 0x0004
+ .2byte 0x0005, 0x0002, 0x0004, 0x0001, 0x0004, 0x0001, 0x0007, 0x0002, 0x0001, 0x0005, 0x0007, 0x0003, 0x0003, 0x0004, 0x0003, 0x0003
+ .2byte 0x0003, 0x0003, 0x0003, 0x0002, 0x0004, 0x0001, 0x0005, 0x0001, 0x0001, 0x0004, 0x0005, 0x0003, 0x0001, 0x0002, 0x0001, 0x0005
+ .2byte 0x0004, 0x0003, 0x0006, 0x0004, 0x0003, 0x0003, 0x0003, 0x0002, 0x0004, 0x0001, 0x0001, 0x0001, 0x0005, 0x0001, 0x0001, 0x0007
+ .2byte 0x0002, 0x0002, 0x0001, 0x0001, 0x0004, 0x0004, 0x0004, 0x0001, 0x0004, 0x0004, 0x0001, 0x0001, 0x0001, 0x0001, 0x0007, 0x0007
+ .2byte 0x0006, 0x0003, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0002, 0x0003, 0x0001, 0x0001, 0x0004, 0x0004
+ .2byte 0x0003, 0x0003, 0x0003, 0x0001, 0x0004, 0x0007, 0x0007, 0x0005, 0x0007, 0x0001, 0x0007, 0x0001, 0x0005, 0x0000, 0x0004, 0x0004
+ .2byte 0x0004, 0x0004, 0x0004, 0x0002, 0x0002, 0x0006, 0x0003, 0x0006, 0x0004, 0x0004, 0x0002, 0x0005, 0x0002, 0x0001, 0x0001, 0x0006
+ .2byte 0x0006, 0x0006, 0x0001, 0x0001, 0x0001, 0x0001, 0x0002, 0x0006, 0x0001, 0x0004, 0x0001, 0x0001, 0x0003, 0x0001, 0x0001, 0x0001
+ .2byte 0x0001, 0x0001, 0x0004, 0x0001, 0x0001, 0x0003
+
+ .align 1
+gUnknown_0860A68C:: @ 860A68C
+ .2byte 0x0004, 0xfffd, 0xfffa
+
+ .align 1
+gUnknown_0860A692:: @ 860A692
+ .2byte 0x0004, 0x0004, 0x0006, 0x0006, 0x0007, 0x0006, 0x0002
+
+ .align 1
+gUnknown_0860A6A0:: @ 860A6A0
+ .2byte 0x0091, 0x0003, 0x00fa, 0x0003, 0x00be, 0x0003, 0x0080, 0x0003, 0x006e, 0x0003, 0x0098, 0x0003, 0x0143, 0x0003, 0x0123, 0x0003
+ .2byte 0x007f, 0x0003, 0x014a, 0x0003, 0x0039, 0x0003, 0x0134, 0x0003, 0x0038, 0x0003, 0x003d, 0x0003, 0x015a, 0x0000, 0x0037, 0x0003
+ .2byte 0x0160, 0x0003, 0x0137, 0x0003, 0x0057, 0x0003, 0x004c, 0xfffc, 0x013b, 0xfffc, 0x00ac, 0xfffc, 0x0035, 0xfffc, 0x00dd, 0xfffc
+ .2byte 0x007e, 0xfffc, 0x0101, 0xfffc, 0x0034, 0xfffc, 0x0133, 0xfffc, 0x012b, 0xfffc, 0x011c, 0xfffc, 0x0053, 0xfffc, 0x0007, 0xfffc
+ .2byte 0x004c, 0xfffc, 0xffff, 0x0000
+
+ .align 1
+gUnknown_0860A728:: @ 860A728
+ .2byte 0x013b, 0x0003, 0x00ac, 0x0003, 0x0035, 0x0003, 0x00dd, 0x0003, 0x007e, 0x0003, 0x0101, 0x0003, 0x0034, 0x0003, 0x0133, 0x0003
+ .2byte 0x012b, 0x0003, 0x011c, 0x0003, 0x0053, 0x0003, 0x0007, 0x0003, 0x004c, 0x0005, 0x00eb, 0x0003, 0x00ea, 0x0003, 0x00ec, 0x0003
+ .2byte 0x0137, 0x0003, 0xffff, 0x0000
+
+ .align 1
+gUnknown_0860A770:: @ 860A770
+ .2byte 0x0137, 0x0003, 0x004c, 0xfffd, 0xffff, 0x0000
+
+ .align 1
+gUnknown_0860A77C:: @ 860A77C
+ .2byte 0x0137, 0x0003, 0x004c, 0xfffd, 0xffff, 0x0000
+
+ .align 1
+gUnknown_0860A788:: @ 860A788
+ .2byte 0x0055, 0x0003, 0x0009, 0x0003, 0x00d1, 0x0003, 0x0054, 0x0003, 0x00c0, 0x0003, 0x015f, 0x0003, 0x0056, 0x0000, 0x0057, 0x0003
+ .2byte 0x0158, 0x0003, 0xffff, 0x0000
+
+ .align 1
+gUnknown_0860A7B0:: @ 860A7B0
+ .2byte 0x0005, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003
+
+ .align 1
+gUnknown_0860A7BE:: @ 860A7BE
+ .2byte 0x0005, 0x0005, 0x0005, 0x0005, 0x0005
+
+ .align 1
+gUnknown_0860A7C8:: @ 860A7C8
+ .2byte 0x0004
+
+ .align 1
+gUnknown_0860A7CA:: @ 860A7CA
+ .2byte 0x0005
+
+ .align 1
+gUnknown_0860A7CC:: @ 860A7CC
+ .2byte 0x0005
+
+ .align 1
+gUnknown_0860A7CE:: @ 860A7CE
+ .2byte 0x0003
+
+ .align 1
+gUnknown_0860A7D0:: @ 860A7D0
+ .2byte 0x0003
+
+ .align 1
+gUnknown_0860A7D2:: @ 860A7D2
+ .2byte 0x0004
+
+ .align 1
+gUnknown_0860A7D4:: @ 860A7D4
+ .2byte 0x0003
+
+ .align 1
+gUnknown_0860A7D6:: @ 860A7D6
+ .2byte 0x0006
+
+ .align 1
+gUnknown_0860A7D8:: @ 860A7D8
+ .2byte 0x0006
+
+ .align 1
+gUnknown_0860A7DA:: @ 860A7DA
+ .2byte 0x0006
+
+ .align 1
+gUnknown_0860A7DC:: @ 860A7DC
+ .2byte 0x0004
+
+ .align 1
+gUnknown_0860A7DE:: @ 860A7DE
+ .2byte 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002
+
+ .align 1
+gUnknown_0860A7EC:: @ 860A7EC
+ .2byte 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004
+
+ .align 1
+gUnknown_0860A7FA:: @ 860A7FA
+ .2byte 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
+
+ .align 1
+gUnknown_0860A808:: @ 860A808
+ .2byte 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002
+
+ .align 1
+gUnknown_0860A816:: @ 860A816
+ .2byte 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004
+
+ .align 1
+gUnknown_0860A824:: @ 860A824
+ .2byte 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe, 0xfffe
+
+ .align 2
+gUnknown_0860A834:: @ 860A834
+ .4byte gUnknown_0860A4E0
+ .4byte gUnknown_0860A68C
+ .4byte gUnknown_0860A692
+ .4byte gUnknown_0860A6A0
+ .4byte gUnknown_0860A728
+ .4byte gUnknown_0860A770
+ .4byte gUnknown_0860A77C
+ .4byte gUnknown_0860A788
+ .4byte gUnknown_0860A7B0
+ .4byte gUnknown_0860A7BE
+ .4byte gUnknown_0860A7C8
+ .4byte gUnknown_0860A7CA
+ .4byte gUnknown_0860A7CC
+ .4byte gUnknown_0860A7CE
+ .4byte gUnknown_0860A7D0
+ .4byte gUnknown_0860A7D2
+ .4byte gUnknown_0860A7D4
+ .4byte gUnknown_0860A7D6
+ .4byte gUnknown_0860A7D8
+ .4byte gUnknown_0860A7DA
+ .4byte gUnknown_0860A7DA
+ .4byte gUnknown_0860A7DC
+ .4byte gUnknown_0860A7DE
+ .4byte gUnknown_0860A7EC
+ .4byte gUnknown_0860A7FA
+ .4byte gUnknown_0860A808
+ .4byte gUnknown_0860A816
+ .4byte gUnknown_0860A824
+
+ .align 1
+gUnknown_0860A8A4:: @ 860A8A4
+ .2byte 0x0097, 0x00b2, 0x00bc, 0x008c, 0x00b4, 0x00b5, 0x0093, 0x006a, 0x0091, 0x005e, 0x0030, 0x002a, 0x0095, 0x001c, 0x001d, 0x0064
+ .2byte 0x0060, 0xffff
+
diff --git a/data/data2b.s b/data/data2b.s
index 74e13cc7f..1400b31d3 100644
--- a/data/data2b.s
+++ b/data/data2b.s
@@ -1,5 +1,3 @@
-@ the second big chunk of data
-
#include "constants/items.h"
#include "constants/moves.h"
#include "constants/species.h"
diff --git a/data/data2c.s b/data/data2c.s
index 904009254..86418ce62 100644
--- a/data/data2c.s
+++ b/data/data2c.s
@@ -1,5 +1,3 @@
-@ the second big chunk of data
-
#include "constants/abilities.h"
#include "constants/items.h"
#include "constants/moves.h"
diff --git a/data/data_860A4AC.s b/data/data_860A4AC.s
deleted file mode 100644
index bac17590d..000000000
--- a/data/data_860A4AC.s
+++ /dev/null
@@ -1,50 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
-gUnknown_0860A4AC:: @ 860A4AC
- .incbin "baserom.gba", 0x60a4ac, 0x388
-
-gUnknown_0860A834:: @ 860A834
- .incbin "baserom.gba", 0x60a834, 0x70
-
-gUnknown_0860A8A4:: @ 860A8A4
- .incbin "baserom.gba", 0x60a8a4, 0x24
-
-gUnknown_0860A8C8:: @ 860A8C8
- .incbin "baserom.gba", 0x60a8c8, 0x19c
-
-gUnknown_0860AA64:: @ 860AA64
- .incbin "baserom.gba", 0x60aa64, 0x1c
-
-gUnknown_0860AA80:: @ 860AA80
- .incbin "baserom.gba", 0x60aa80, 0x8
-
-gUnknown_0860AA88:: @ 860AA88
- .incbin "baserom.gba", 0x60aa88, 0x25c
-
-gUnknown_0860ACE4:: @ 860ACE4
- .incbin "baserom.gba", 0x60ace4, 0x4b
-
-gUnknown_0860AD2F:: @ 860AD2F
- .incbin "baserom.gba", 0x60ad2f, 0x39
-
-gUnknown_0860AD68:: @ 860AD68
- .incbin "baserom.gba", 0x60ad68, 0x8
-
-gUnknown_0860AD70:: @ 860AD70
- .incbin "baserom.gba", 0x60ad70, 0x1e
-
-gUnknown_0860AD8E:: @ 860AD8E
- .incbin "baserom.gba", 0x60ad8e, 0x30
-
-gUnknown_0860ADBE:: @ 860ADBE
- .incbin "baserom.gba", 0x60adbe, 0xbe
-
-gUnknown_0860AE7C:: @ 860AE7C
- .incbin "baserom.gba", 0x60ae7c, 0xc
-
-gUnknown_0860AE88:: @ 860AE88
- .incbin "baserom.gba", 0x60ae88, 0x8
-
diff --git a/data/easy_chat.s b/data/easy_chat.s
index 3894cc13d..edbb77f59 100644
--- a/data/easy_chat.s
+++ b/data/easy_chat.s
@@ -5,13 +5,207 @@
.include "constants/constants.inc"
.section .rodata
- .align 2, 0
+ .align 2
gUnknown_08597530:: @ 8597530
- .incbin "baserom.gba", 0x597530, 0x20
+ .4byte 0x0000001a
+ .4byte sub_811A8CC
+ .4byte 0x00000019
+ .4byte sub_811A8F0
+ .4byte 0x0000001c
+ .4byte sub_811A914
+ .4byte 0x0000001b
+ .4byte sub_811A938
gUnknown_08597550:: @ 8597550
- .incbin "baserom.gba", 0x597550, 0x1f8
+ .byte 0x00, 0x02, 0x02, 0x00
+
+ .align 2
+ .4byte gText_Profile
+ .4byte gText_CombineFourWordsOrPhrases
+ .4byte gText_AndMakeYourProfile
+ .4byte gText_YourProfile
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x01, 0x02, 0x03, 0x01
+
+ .align 2
+ .4byte gText_AtTheBattlesStart
+ .4byte gText_CombineSixWordsOrPhrases
+ .4byte gText_AndMakeAMessage
+ .4byte gText_YourFeelingAtTheBattlesStart
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x02, 0x02, 0x03, 0x01
+
+ .align 2
+ .4byte gText_UponWinningABattle
+ .4byte gText_CombineSixWordsOrPhrases
+ .4byte gText_AndMakeAMessage
+ .4byte gText_WhatYouSayIfYouWin
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x03, 0x02, 0x03, 0x01
+
+ .align 2
+ .4byte gText_UponLosingABattle
+ .4byte gText_CombineSixWordsOrPhrases
+ .4byte gText_AndMakeAMessage
+ .4byte gText_WhatYouSayIfYouLose
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x04, 0x02, 0x05, 0x02
+
+ .align 2
+ .4byte NULL
+ .4byte gText_CombineNineWordsOrPhrases
+ .4byte gText_AndMakeAMessage2
+ .4byte gText_TheMailMessage
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x05, 0x02, 0x02, 0x05
+
+ .align 2
+ .4byte gText_Interview
+ .4byte gText_CombineFourWordsOrPhrases
+ .4byte gText_LetsReplyToTheInterview
+ .4byte gText_TheAnswer
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x06, 0x02, 0x03, 0x01
+
+ .align 2
+ .4byte gText_TheBardsSong
+ .4byte gText_ChangeJustOneWordOrPhrase
+ .4byte gText_AndImproveTheBardsSong
+ .4byte gText_TheBardsSong2
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x07, 0x01, 0x01, 0x04
+
+ .align 2
+ .4byte gText_Interview
+ .4byte gText_FindWordsThatDescribeYour
+ .4byte gText_FeelingsRightNow
+ .4byte gText_TheAnswer
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x09, 0x02, 0x01, 0x03
+
+ .align 2
+ .4byte gText_WhatsHipAndHappening
+ .4byte gText_CombineTwoWordsOrPhrases
+ .4byte gText_AndMakeATrendySaying
+ .4byte gText_TheTrendySaying
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x10, 0x02, 0x05, 0x87
+
+ .align 2
+ .4byte NULL
+ .4byte gText_AfterYouHaveReadTheQuiz
+ .4byte gText_QuestionPressTheAButton
+ .4byte NULL
+ .4byte NULL
+
+ .byte 0x0f, 0x01, 0x01, 0x86
+
+ .align 2
+ .4byte gText_TheQuizAnswerIs
+ .4byte gText_OutOfTheListedChoices
+ .4byte gText_SelectTheAnswerToTheQuiz
+ .4byte gText_TheAnswerColon
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x11, 0x02, 0x05, 0x88
+
+ .align 2
+ .4byte NULL
+ .4byte gText_CombineNineWordsOrPhrases
+ .4byte gText_AndCreateAQuiz
+ .4byte gText_IsThisQuizOK
+ .4byte NULL
+
+ .byte 0x12, 0x01, 0x01, 0x86
+
+ .align 2
+ .4byte gText_TheQuizAnswerIs
+ .4byte gText_PickAWordOrPhraseAnd
+ .4byte gText_SetTheQuizAnswer
+ .4byte gText_IsThisQuizOK
+ .4byte NULL
+
+ .byte 0x06, 0x02, 0x03, 0x01
+
+ .align 2
+ .4byte gText_TheBardsSong
+ .4byte gText_ChangeJustOneWordOrPhrase
+ .4byte gText_AndImproveTheBardsSong
+ .4byte gText_TheBardsSong2
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x13, 0x02, 0x03, 0x01
+
+ .align 2
+ .4byte gText_ApprenticesPhrase
+ .4byte gText_FindWordsWhichFit
+ .4byte gText_TheTrainersImage
+ .4byte gText_ApprenticePhrase
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x0d, 0x02, 0x01, 0x03
+
+ .align 2
+ .4byte gText_GoodSaying
+ .4byte gText_CombineTwoWordsOrPhrases2
+ .4byte gText_ToTeachHerAGoodSaying
+ .4byte gText_TheAnswer
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x0a, 0x01, 0x01, 0x04
+
+ .align 2
+ .4byte gText_Interview
+ .4byte gText_FindWordsThatDescribeYour
+ .4byte gText_FeelingsRightNow
+ .4byte gText_TheAnswer
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x0c, 0x01, 0x01, 0x04
+
+ .align 2
+ .4byte gText_Interview
+ .4byte gText_FindWordsThatDescribeYour
+ .4byte gText_FeelingsRightNow
+ .4byte gText_TheAnswer
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x0b, 0x01, 0x01, 0x04
+
+ .align 2
+ .4byte gText_Interview
+ .4byte gText_FindWordsThatDescribeYour
+ .4byte gText_FeelingsRightNow
+ .4byte gText_TheAnswer
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x0e, 0x01, 0x01, 0x04
+
+ .align 2
+ .4byte gText_FansQuestion
+ .4byte gText_FindWordsWhichFit
+ .4byte gText_TheTrainersImage
+ .4byte gText_TheImage
+ .4byte gText_IsAsShownOkay
+
+ .byte 0x14, 0x02, 0x02, 0x00
+
+ .align 2
+ .4byte gText_Questionnaire
+ .4byte gText_CombineFourWordsOrPhrases
+ .4byte gText_AndFillOutTheQuestionnaire
+ .4byte gText_TheAnswer
+ .4byte gText_IsAsShownOkay
gUnknown_08597748:: @ 8597748
.byte 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x00, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a
@@ -20,109 +214,239 @@ gUnknown_08597764:: @ 8597764
.2byte 0x0209, 0x140b, 0x1030, 0x102a
gUnknown_0859776C:: @ 859776C
- .2byte 0x1240, 0x0628, 0x061f, 0x2204, 0x1422, 0x0197, 0x0415, 0x0198, 0x2207, 0x0449, 0x4bff, 0x4b1f, 0x2e3d, 0x1577, 0x6b5f, 0x5ade
- .2byte 0x4218, 0x0000, 0x0000, 0x0000, 0x0000, 0x18c5, 0x318c, 0x5af6, 0x6f5b, 0x7fff, 0xccc0, 0x0000, 0xddc0, 0x000c, 0xddc0, 0x00cd
- .2byte 0xddc0, 0x0cdd, 0xddc0, 0x0cdd, 0xddc0, 0x00cd, 0xddc0, 0x000c, 0xccc0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
- .2byte 0x0000, 0x0000, 0x0000, 0xc000, 0x0000, 0x6c00, 0x0000, 0x66c0, 0x0000, 0x666c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
- .2byte 0x0000, 0x0000, 0x000c, 0x0000, 0x00c6, 0x0000, 0x0c66, 0x0000, 0xc666, 0x0000, 0xc000, 0x6666, 0xc000, 0x6666, 0xc000, 0x6666
- .2byte 0xc000, 0xcccc, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6666, 0x000c, 0x6666, 0x000c, 0x6666, 0x000c
- .2byte 0xcccc, 0x000c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
- .2byte 0x0000, 0x0000, 0x0000, 0xc000, 0x0000, 0x6c00, 0x0000, 0x66c0, 0x0000, 0x666c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
- .2byte 0x0000, 0x0000, 0x000c, 0x0000, 0x00c6, 0x0000, 0x0c66, 0x0000, 0xc666, 0x0000, 0xc000, 0x6666, 0xc000, 0x6666, 0xc000, 0x6666
- .2byte 0xc000, 0xcccc, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x6666, 0x000c, 0x6666, 0x000c, 0x6666, 0x000c
- .2byte 0xcccc, 0x000c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x99c0, 0x9999, 0xf99c, 0xff9f, 0xf99c, 0xf999
- .2byte 0xf99c, 0xf99f, 0x999c, 0xf99f, 0xf99c, 0xf99f, 0x99c0, 0x9999, 0xcc00, 0xcccc, 0x9999, 0x9999, 0xff9f, 0xff9f, 0x9f99, 0x9f9f
- .2byte 0xff99, 0xff9f, 0x9f99, 0x9f9f, 0x9f99, 0x9f9f, 0x9999, 0x9999, 0xcccc, 0xcccc, 0x9999, 0x9999, 0xff9f, 0x999f, 0xf99f, 0x9999
- .2byte 0xf999, 0x9999, 0xf99f, 0xf999, 0xf99f, 0x9999, 0x9999, 0x9999, 0xcccc, 0xcccc, 0x9999, 0x0c99, 0x9999, 0xc999, 0x9ff9, 0xc999
- .2byte 0xffff, 0xc999, 0xffff, 0xc99f, 0x9999, 0xc999, 0x9999, 0xcc99, 0xcccc, 0x0ccc, 0x99c0, 0x9999, 0xf99c, 0xff9f, 0xf99c, 0x9f99
- .2byte 0xf99c, 0xff9f, 0x999c, 0x9f9f, 0xf99c, 0xff9f, 0x99c0, 0x9999, 0xcc00, 0xcccc, 0x9999, 0x9999, 0x99f9, 0xf9ff, 0x99f9, 0xf99f
- .2byte 0x99f9, 0xf9ff, 0x99f9, 0xf99f, 0x9ff9, 0xf9ff, 0x9999, 0x9999, 0xcccc, 0xcccc, 0x9999, 0x9999, 0xff9f, 0x999f, 0xf999, 0xf999
- .2byte 0xf999, 0x9999, 0xf999, 0x9999, 0xf99f, 0x9999, 0x9999, 0x9999, 0xcccc, 0xcccc, 0x9999, 0x0c99, 0x9999, 0xc999, 0xffff, 0xc99f
- .2byte 0xffff, 0xc999, 0x9ff9, 0xc999, 0x9999, 0xc999, 0x9999, 0xcc99, 0xcccc, 0x0ccc, 0x0000, 0x5fff, 0x67bd, 0x4b1a, 0x6fff, 0x0000
- .2byte 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x0008, 0x003f, 0xf000, 0xf001, 0xf001
- .2byte 0xf001, 0xf001, 0xf001, 0xff01, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0xf0d5, 0x0001, 0x1001, 0x0300
- .2byte 0x0024, 0x1106, 0x0600, 0x2240, 0x1cd0, 0x1111, 0x1111, 0x2222, 0x223f, 0x5022, 0xf007, 0xf01f, 0xf01f, 0xf01f, 0xf01f, 0xfb1f
- .2byte 0x1ff0, 0x1ff0, 0x1ff0, 0x1ff0, 0x01b0, 0x0001, 0x1003, 0x4f14, 0x0011, 0x2208, 0x3032, 0x3031, 0xf0e7, 0x1007, 0xff07, 0x4fd0
- .2byte 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0xf0ff, 0xf007, 0xd007, 0x3007, 0xf0e7, 0xf007, 0xf0ff, 0xf007, 0xffff
- .2byte 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0xf0ff, 0xf007, 0xf0ff, 0xf0f7, 0xf0ff, 0xf007, 0xf0ff, 0xf007
- .2byte 0xff07, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0xf0ff, 0xf0f7, 0xf0ff, 0xf0f7, 0xf0ff, 0xf007, 0xf007
- .2byte 0xf007, 0xff07, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0x07f0, 0xff60, 0xcd40, 0xf0db, 0x50ff, 0x40ff, 0x1224, 0x0300, 0xf430
- .2byte 0x704f, 0x0f4f, 0x3333, 0x3333, 0x1ff0, 0x1ff0, 0x1ff0, 0x1ff0, 0xf0fe, 0xf01f, 0xf01f, 0xf01f, 0xf01f, 0xd01f, 0x001f, 0x03e7
- .2byte 0x30ff, 0x00dc, 0xf006, 0xf001, 0xf001, 0xf001, 0xf001, 0xf001, 0xff01, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0, 0x01f0
- .2byte 0x01f0, 0xf0c0, 0x0001, 0x0001
+ .2byte 0x1240, 0x0628, 0x061f, 0x2204, 0x1422, 0x0197, 0x0415, 0x0198, 0x2207, 0x0449
+ .align 2
+gUnknown_08597780:: @ 8597780
+ .incbin "graphics/misc/interview_triangle_cursor.gbapal"
+
+ .align 2
+gUnknown_085977A0:: @ 85977A0
+ .incbin "graphics/misc/interview_triangle_cursor.4bpp"
+
+ .align 2
+gUnknown_085977C0:: @ 85977C0
+ .incbin "graphics/misc/interview_arrow.4bpp"
+
+ .align 2
+gUnknown_085978C0:: @ 85978C0
+ .incbin "graphics/misc/interview_buttons.4bpp"
+
+ .align 2
+gUnknown_085979C0:: @ 85979C0
+ .incbin "graphics/misc/interview_frame.gbapal"
+
+ .align 2
+gUnknown_085979E0:: @ 85979E0
+ .incbin "graphics/misc/interview_frame.4bpp.lz"
+
+ .align 2
gUnknown_08597B14:: @ 8597B14
- .incbin "baserom.gba", 0x597b14, 0x20
+ .incbin "graphics/misc/interview_frame_orange.gbapal"
+ .align 2
gUnknown_08597B34:: @ 8597B34
- .incbin "baserom.gba", 0x597b34, 0x20
+ .incbin "graphics/misc/interview_frame_green.gbapal"
+ .align 2
gUnknown_08597B54:: @ 8597B54
- .incbin "baserom.gba", 0x597b54, 0xc8
+ .incbin "graphics/misc/interview_frame_2.4bpp.lz"
+ .align 2
gUnknown_08597C1C:: @ 8597C1C
- .incbin "baserom.gba", 0x597c1c, 0x8
+ .incbin "graphics/misc/8597C1C.gbapal"
+ .align 2
gUnknown_08597C24:: @ 8597C24
- .incbin "baserom.gba", 0x597c24, 0xc
+ .incbin "graphics/misc/8597C24.gbapal"
gUnknown_08597C30:: @ 8597C30
.byte 0x83, 0x18, 0x04, 0x00, 0x63, 0x18, 0x06, 0x00, 0x03, 0x18, 0x0a, 0x00, 0xa3, 0x18, 0x02, 0x00, 0xb0, 0x0c, 0x02, 0x00, 0x83, 0x18, 0x04, 0x00, 0x89, 0x0c, 0x02, 0x01, 0x65, 0x14, 0x0a, 0x03
.byte 0x03, 0x18, 0x0a, 0x02
+ .align 2
gUnknown_08597C54:: @ 8597C54
- .incbin "baserom.gba", 0x597c54, 0x10
+ .4byte 0x000001c0, 0x000011dd, 0x002021e2, 0x000031fb
+ .align 2
gUnknown_08597C64:: @ 8597C64
- .incbin "baserom.gba", 0x597c64, 0x20
+ window_template 0x01, 0x06, 0x00, 0x12, 0x02, 0x0a, 0x0010
+ window_template 0x00, 0x03, 0x0f, 0x18, 0x04, 0x0f, 0x000a
+ window_template 0x02, 0x01, 0x00, 0x1c, 0x20, 0x03, 0x0000
+ window_template_terminator
+ .align 2
gUnknown_08597C84:: @ 8597C84
- .incbin "baserom.gba", 0x597c84, 0x8
+ window_template 0x00, 0x16, 0x09, 0x05, 0x04, 0x0f, 0x006a
gUnknown_08597C8C:: @ 8597C8C
- .incbin "baserom.gba", 0x597c8c, 0x4
+ .string "{CLEAR 17}$"
+ .align 2
gUnknown_08597C90:: @ 8597C90
.4byte gUnknown_862B810
.4byte gUnknown_862B832
.4byte gUnknown_862B84B
.4byte gUnknown_862B86C
+ .align 2
gUnknown_08597CA0:: @ 8597CA0
- .incbin "baserom.gba", 0x597ca0, 0x20
+ obj_tiles gUnknown_085977A0, 0x0020, 0x0000
+ obj_tiles gUnknown_085977C0, 0x0100, 0x0002
+ obj_tiles gUnknown_085978C0, 0x0100, 0x0003
+ null_obj_tiles
+ .align 2
gUnknown_08597CC0:: @ 8597CC0
- .incbin "baserom.gba", 0x597cc0, 0x28
+ obj_pal gUnknown_08597780, 0x0000
+ obj_pal gEasyChatCursor_Pal, 0x0001
+ obj_pal gEasyChatRightWindow_Pal, 0x0002
+ obj_pal gUnknown_085979C0, 0x0003
+ null_obj_pal
+ .align 2
gUnknown_08597CE8:: @ 8597CE8
- .incbin "baserom.gba", 0x597ce8, 0x20
+ obj_tiles gUnknown_085979E0, 0x0800, 0x0005
+ obj_tiles gEasyChatCursor_Gfx, 0x1000, 0x0001
+ obj_tiles gEasyChatRightWindow_Gfx, 0x0800, 0x0006
+ obj_tiles gEasyChatMode_Gfx, 0x1000, 0x0004
gUnknown_08597D08:: @ 8597D08
- .byte 0x00, 0x0c, 0x18, 0x38, 0x44, 0x50, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00
+ .byte 0x00, 0x0c, 0x18, 0x38, 0x44, 0x50, 0x5c, 0x00
+
+ .align 2
+gOamData_8597D10:: @ 8597D10
+ .2byte 0x0000
+ .2byte 0x0000
+ .2byte 0x0C00
+ .align 2
gUnknown_08597D18:: @ 8597D18
- .incbin "baserom.gba", 0x597d18, 0x50
+ spr_template 0x0000, 0x0000, gOamData_8597D10, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_811DF28
+
+ .align 2
+gUnknown_08597D30:: @ 8597D30
+ .2byte 0x4000, 0xc000, 0x0400, 0x0000
+
+ .align 2
+gUnknown_08597D38:: @ 8597D38
+ .2byte 0x0000, 0x0000, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597D40:: @ 8597D40
+ .2byte 0x0020, 0x0000, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597D48:: @ 8597D48
+ .2byte 0x0040, 0x0000, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597D50:: @ 8597D50
+ .2byte 0x0060, 0x0000, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597D58:: @ 8597D58
+ .4byte gUnknown_08597D38
+ .4byte gUnknown_08597D40
+ .4byte gUnknown_08597D48
+ .4byte gUnknown_08597D50
+ .align 2
gUnknown_08597D68:: @ 8597D68
- .incbin "baserom.gba", 0x597d68, 0x68
+ spr_template 0x0001, 0x0001, gUnknown_08597D30, gUnknown_08597D58, NULL, gDummySpriteAffineAnimTable, sub_811DF28
+ .align 2
+gUnknown_08597D80:: @ 8597D80
+ .2byte 0x4000, 0xc000, 0x0400, 0x0000
+
+ .align 2
+gUnknown_08597D88:: @ 8597D88
+ .2byte 0x0060, 0x0000, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597D90:: @ 8597D90
+ .2byte 0x0040, 0x0004, 0x0020, 0x0004, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597D9C:: @ 8597D9C
+ .2byte 0x0040, 0x0004, 0x0000, 0x0004, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597DA8:: @ 8597DA8
+ .2byte 0x0040, 0x0004, 0x0060, 0x0000, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597DB4:: @ 8597DB4
+ .2byte 0x0040, 0x0004, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597DBC:: @ 8597DBC
+ .4byte gUnknown_08597D88
+ .4byte gUnknown_08597D90
+ .4byte gUnknown_08597D9C
+ .4byte gUnknown_08597DA8
+ .4byte gUnknown_08597DB4
+
+ .align 2
gUnknown_08597DD0:: @ 8597DD0
- .incbin "baserom.gba", 0x597dd0, 0x20
+ spr_template 0x0004, 0x0002, gUnknown_08597D80, gUnknown_08597DBC, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
+ .align 2
+gUnknown_08597DE8:: @ 8597DE8
+ .2byte 0x0000, 0xc000, 0x0c00, 0x0000
+
+ .align 2
gUnknown_08597DF0:: @ 8597DF0
- .incbin "baserom.gba", 0x597df0, 0x40
+ spr_template 0x0006, 0x0002, gUnknown_08597DE8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
+
+ .align 2
+gUnknown_08597E08:: @ 8597E08
+ .2byte 0x4000, 0x4000, 0x0400, 0x0000
+
+ .align 2
+gUnknown_08597E10:: @ 8597E10
+ .2byte 0x0000, 0x4000, 0x0400, 0x0000
+
+ .align 2
+gUnknown_08597E18:: @ 8597E18
+ .2byte 0x0000, 0x0000, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597E20:: @ 8597E20
+ .2byte 0x0004, 0x0000, 0xffff, 0x0000
+
+ .align 2
+gUnknown_08597E28:: @ 8597E28
+ .4byte gUnknown_08597E18
+ .4byte gUnknown_08597E20
+ .align 2
gUnknown_08597E30:: @ 8597E30
- .incbin "baserom.gba", 0x597e30, 0x18
+ spr_template 0x0003, 0x0002, gUnknown_08597E08, gUnknown_08597E28, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
+ .align 2
gUnknown_08597E48:: @ 8597E48
- .incbin "baserom.gba", 0x597e48, 0x18
+ spr_template 0x0002, 0x0002, gUnknown_08597E10, gUnknown_08597E28, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08597E60:: @ 8597E60
.byte 0x10, 0x6f, 0xc4, 0x00, 0x10, 0x4e, 0x82, 0xa0, 0x10, 0x50, 0x86, 0xaa
+ .align 2
gUnknown_08597E6C:: @ 8597E6C
- .incbin "baserom.gba", 0x597e6c, 0x30
+ .4byte gText_DelAll
+ .4byte gText_Cancel5
+ .4byte gText_Ok2
+ .4byte NULL
+
+ .4byte gText_DelAll
+ .4byte gText_Cancel5
+ .4byte gText_Ok2
+ .4byte gText_Quiz
+
+ .4byte gText_DelAll
+ .4byte gText_Cancel5
+ .4byte gText_Ok2
+ .4byte gText_Answer
@ 8597E9C
.include "data/text/easy_chat/easy_chat_groups.inc"
diff --git a/data/field_door.s b/data/field_door.s
deleted file mode 100644
index 69a7c6534..000000000
--- a/data/field_door.s
+++ /dev/null
@@ -1,17 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
- .align 2, 0
-
-gUnknown_08496F8C:: @ 8496F8C
- .incbin "baserom.gba", 0x496f8c, 0x14
-
-gUnknown_08496FA0:: @ 8496FA0
- .incbin "baserom.gba", 0x496fa0, 0x14
-
-gUnknown_08496FB4:: @ 8496FB4
- .incbin "baserom.gba", 0x496fb4, 0x1c0
-
-gUnknown_08497174:: @ 8497174
- .incbin "baserom.gba", 0x497174, 0x288
diff --git a/data/graphics.s b/data/graphics.s
index 7cb4b0e54..b16e30c8e 100644
--- a/data/graphics.s
+++ b/data/graphics.s
@@ -4476,7 +4476,7 @@ gBerryBlenderArrowTiles:: @ 8DCAB88
.space 0x2C0
.align 2
-gEasyChatCursor_Pal::
+gEasyChatCursor_Pal:: @ 8DCB648
.incbin "graphics/easy_chat/cursor.gbapal"
.align 2
@@ -4484,11 +4484,11 @@ gEasyChatCursor_Gfx:: @ 8DCB668
.incbin "graphics/easy_chat/cursor.4bpp.lz"
.align 2
-gEasyChatRightWindow_Pal::
+gEasyChatRightWindow_Pal:: @ 8DCB86C
.incbin "graphics/easy_chat/rwindow.gbapal"
.align 2
-gEasyChatRightWindow_Gfx::
+gEasyChatRightWindow_Gfx:: @ 8DCB88C
.incbin "graphics/easy_chat/rwindow.4bpp.lz"
.align 2
diff --git a/data/pokemon_animation.s b/data/pokemon_animation.s
new file mode 100644
index 000000000..535c91b2d
--- /dev/null
+++ b/data/pokemon_animation.s
@@ -0,0 +1,240 @@
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
+
+ .section .rodata
+
+gUnknown_0860A8C8:: @ 860A8C8
+ .byte 0x00, 0x13, 0x02, 0x08, 0x12, 0x15, 0x17, 0x12, 0x12, 0x19, 0x02, 0x13, 0x11, 0x02, 0x13, 0x01, 0x0f, 0x15, 0x0f, 0x0a, 0x0a, 0x0f, 0x15, 0x0f, 0x09, 0x16, 0x16, 0x12, 0x10, 0x12, 0x15, 0x09
+ .byte 0x12, 0x15, 0x09, 0x13, 0x13, 0x10, 0x01, 0x13, 0x06, 0x11, 0x09, 0x02, 0x02, 0x14, 0x02, 0x08, 0x0a, 0x11, 0x09, 0x09, 0x10, 0x0f, 0x02, 0x14, 0x10, 0x10, 0x15, 0x15, 0x12, 0x09, 0x0e, 0x14
+ .byte 0x14, 0x0d, 0x15, 0x09, 0x09, 0x0b, 0x0b, 0x0b, 0x02, 0x02, 0x0e, 0x08, 0x08, 0x17, 0x15, 0x02, 0x13, 0x0f, 0x0f, 0x02, 0x0f, 0x15, 0x13, 0x02, 0x0b, 0x0c, 0x13, 0x0f, 0x01, 0x01, 0x14, 0x09
+ .byte 0x13, 0x14, 0x0a, 0x09, 0x15, 0x15, 0x02, 0x10, 0x15, 0x10, 0x02, 0x0f, 0x02, 0x06, 0x06, 0x0e, 0x0e, 0x12, 0x0b, 0x12, 0x13, 0x11, 0x11, 0x11, 0x13, 0x19, 0x14, 0x0f, 0x13, 0x16, 0x17, 0x0e
+ .byte 0x0e, 0x10, 0x09, 0x19, 0x05, 0x12, 0x19, 0x16, 0x17, 0x01, 0x13, 0x13, 0x13, 0x15, 0x15, 0x13, 0x19, 0x16, 0x17, 0x02, 0x0f, 0x09, 0x0d, 0x12, 0x12, 0x02, 0x09, 0x12, 0x15, 0x17, 0x15, 0x15
+ .byte 0x09, 0x12, 0x10, 0x11, 0x0f, 0x0a, 0x11, 0x0a, 0x02, 0x0f, 0x0b, 0x16, 0x12, 0x13, 0x13, 0x13, 0x11, 0x12, 0x14, 0x12, 0x13, 0x16, 0x11, 0x12, 0x13, 0x02, 0x10, 0x11, 0x11, 0x11, 0x10, 0x13
+ .byte 0x02, 0x11, 0x0b, 0x02, 0x14, 0x14, 0x12, 0x13, 0x01, 0x14, 0x0b, 0x14, 0x08, 0x09, 0x0f, 0x05, 0x09, 0x15, 0x09, 0x0d, 0x15, 0x13, 0x15, 0x0f, 0x13, 0x09, 0x17, 0x17, 0x0a, 0x08, 0x02, 0x02
+ .byte 0x05, 0x0f, 0x02, 0x15, 0x09, 0x09, 0x19, 0x15, 0x0e, 0x01, 0x13, 0x02, 0x0f, 0x07, 0x02, 0x08, 0x17, 0x02, 0x13, 0x16, 0x17, 0x19, 0x0e, 0x09, 0x0e, 0x19, 0x17, 0x18, 0x00, 0x00, 0x00, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x15, 0x09, 0x12, 0x10, 0x17, 0x02, 0x12, 0x19, 0x12, 0x08
+ .byte 0x0f, 0x15, 0x0b, 0x08, 0x11, 0x08, 0x0f, 0x02, 0x10, 0x10, 0x13, 0x09, 0x14, 0x0a, 0x01, 0x14, 0x12, 0x15, 0x13, 0x15, 0x07, 0x11, 0x11, 0x03, 0x11, 0x19, 0x19, 0x13, 0x12, 0x01, 0x13, 0x14
+ .byte 0x0e, 0x17, 0x01, 0x0b, 0x09, 0x04, 0x0f, 0x15, 0x03, 0x19, 0x04, 0x15, 0x13, 0x01, 0x0f, 0x0e, 0x0e, 0x15, 0x09, 0x0e, 0x17, 0x13, 0x09, 0x09, 0x0a, 0x08, 0x0f, 0x0f, 0x13, 0x13, 0x10, 0x10
+ .byte 0x14, 0x12, 0x12, 0x09, 0x14, 0x14, 0x11, 0x11, 0x12, 0x01, 0x01, 0x18, 0x02, 0x10, 0x08, 0x0b, 0x0b, 0x0e, 0x13, 0x09, 0x0d, 0x13, 0x11, 0x11, 0x14, 0x01, 0x01, 0x0b, 0x15, 0x02, 0x15, 0x09
+ .byte 0x0e, 0x11, 0x11, 0x11, 0x0c, 0x0b, 0x0f, 0x09, 0x14, 0x14, 0x14, 0x09, 0x09, 0x08, 0x0f, 0x15, 0x09, 0x09, 0x09, 0x09, 0x19, 0x17, 0x0d, 0x01, 0x01, 0x11, 0x14, 0x11
+
+gUnknown_0860AA64:: @ 860AA64
+ .byte 0x00, 0x05, 0x01, 0x01, 0x00, 0x0f, 0x01, 0x04, 0x00, 0x02, 0x01, 0x02, 0x00, 0x02, 0x01, 0x02, 0x00, 0x02, 0x01, 0x02, 0x00, 0x02, 0x01, 0x02, 0x00, 0x02, 0x00, 0xff
+
+gUnknown_0860AA80:: @ 860AA80
+ .byte 0x06, 0x1e, 0xfe, 0x0f, 0x06, 0x1e, 0xff, 0x00
+
+ .align 2
+gUnknown_0860AA88:: @ 860AA88
+ .4byte pokemonanimfunc_00
+ .4byte pokemonanimfunc_01
+ .4byte pokemonanimfunc_02
+ .4byte pokemonanimfunc_03
+ .4byte pokemonanimfunc_04
+ .4byte pokemonanimfunc_05
+ .4byte pokemonanimfunc_06
+ .4byte pokemonanimfunc_07
+ .4byte pokemonanimfunc_08
+ .4byte pokemonanimfunc_09
+ .4byte pokemonanimfunc_0A
+ .4byte pokemonanimfunc_0B
+ .4byte pokemonanimfunc_0C
+ .4byte pokemonanimfunc_0D
+ .4byte pokemonanimfunc_0E
+ .4byte pokemonanimfunc_0F
+ .4byte pokemonanimfunc_10
+ .4byte pokemonanimfunc_11
+ .4byte pokemonanimfunc_12
+ .4byte pokemonanimfunc_13
+ .4byte pokemonanimfunc_14
+ .4byte pokemonanimfunc_15
+ .4byte pokemonanimfunc_16
+ .4byte pokemonanimfunc_17
+ .4byte pokemonanimfunc_18
+ .4byte pokemonanimfunc_19
+ .4byte pokemonanimfunc_1A
+ .4byte pokemonanimfunc_1B
+ .4byte pokemonanimfunc_1C
+ .4byte pokemonanimfunc_1D
+ .4byte pokemonanimfunc_1E
+ .4byte pokemonanimfunc_1F
+ .4byte pokemonanimfunc_20
+ .4byte pokemonanimfunc_21
+ .4byte pokemonanimfunc_22
+ .4byte pokemonanimfunc_23
+ .4byte pokemonanimfunc_24
+ .4byte pokemonanimfunc_25
+ .4byte pokemonanimfunc_26
+ .4byte pokemonanimfunc_27
+ .4byte pokemonanimfunc_28
+ .4byte pokemonanimfunc_29
+ .4byte pokemonanimfunc_2A
+ .4byte pokemonanimfunc_2B
+ .4byte pokemonanimfunc_2C
+ .4byte pokemonanimfunc_2D
+ .4byte pokemonanimfunc_2E
+ .4byte pokemonanimfunc_2F
+ .4byte pokemonanimfunc_30
+ .4byte pokemonanimfunc_31
+ .4byte pokemonanimfunc_32
+ .4byte pokemonanimfunc_33
+ .4byte pokemonanimfunc_34
+ .4byte pokemonanimfunc_35
+ .4byte pokemonanimfunc_36
+ .4byte pokemonanimfunc_37
+ .4byte pokemonanimfunc_38
+ .4byte pokemonanimfunc_39
+ .4byte pokemonanimfunc_3A
+ .4byte pokemonanimfunc_3B
+ .4byte pokemonanimfunc_3C
+ .4byte pokemonanimfunc_3D
+ .4byte pokemonanimfunc_3E
+ .4byte pokemonanimfunc_3F
+ .4byte pokemonanimfunc_40
+ .4byte pokemonanimfunc_41
+ .4byte pokemonanimfunc_42
+ .4byte pokemonanimfunc_43
+ .4byte pokemonanimfunc_44
+ .4byte pokemonanimfunc_45
+ .4byte pokemonanimfunc_46
+ .4byte pokemonanimfunc_47
+ .4byte pokemonanimfunc_48
+ .4byte pokemonanimfunc_49
+ .4byte pokemonanimfunc_4A
+ .4byte pokemonanimfunc_4B
+ .4byte pokemonanimfunc_4C
+ .4byte pokemonanimfunc_4D
+ .4byte pokemonanimfunc_4E
+ .4byte pokemonanimfunc_4F
+ .4byte pokemonanimfunc_50
+ .4byte pokemonanimfunc_51
+ .4byte pokemonanimfunc_52
+ .4byte pokemonanimfunc_53
+ .4byte pokemonanimfunc_54
+ .4byte pokemonanimfunc_55
+ .4byte pokemonanimfunc_56
+ .4byte pokemonanimfunc_57
+ .4byte pokemonanimfunc_58
+ .4byte pokemonanimfunc_59
+ .4byte pokemonanimfunc_5A
+ .4byte pokemonanimfunc_5B
+ .4byte pokemonanimfunc_5C
+ .4byte pokemonanimfunc_5D
+ .4byte pokemonanimfunc_5E
+ .4byte pokemonanimfunc_5F
+ .4byte pokemonanimfunc_60
+ .4byte pokemonanimfunc_61
+ .4byte pokemonanimfunc_62
+ .4byte pokemonanimfunc_63
+ .4byte pokemonanimfunc_64
+ .4byte pokemonanimfunc_65
+ .4byte pokemonanimfunc_66
+ .4byte pokemonanimfunc_67
+ .4byte pokemonanimfunc_68
+ .4byte pokemonanimfunc_69
+ .4byte pokemonanimfunc_6A
+ .4byte pokemonanimfunc_6B
+ .4byte pokemonanimfunc_6C
+ .4byte pokemonanimfunc_6D
+ .4byte pokemonanimfunc_6E
+ .4byte pokemonanimfunc_6F
+ .4byte pokemonanimfunc_70
+ .4byte pokemonanimfunc_71
+ .4byte pokemonanimfunc_72
+ .4byte pokemonanimfunc_73
+ .4byte pokemonanimfunc_74
+ .4byte pokemonanimfunc_75
+ .4byte pokemonanimfunc_76
+ .4byte pokemonanimfunc_77
+ .4byte pokemonanimfunc_78
+ .4byte pokemonanimfunc_79
+ .4byte pokemonanimfunc_7A
+ .4byte pokemonanimfunc_7B
+ .4byte pokemonanimfunc_7C
+ .4byte pokemonanimfunc_7D
+ .4byte pokemonanimfunc_7E
+ .4byte pokemonanimfunc_7F
+ .4byte pokemonanimfunc_80
+ .4byte pokemonanimfunc_81
+ .4byte pokemonanimfunc_82
+ .4byte pokemonanimfunc_83
+ .4byte pokemonanimfunc_84
+ .4byte pokemonanimfunc_85
+ .4byte pokemonanimfunc_86
+ .4byte pokemonanimfunc_87
+ .4byte pokemonanimfunc_88
+ .4byte pokemonanimfunc_89
+ .4byte pokemonanimfunc_8A
+ .4byte pokemonanimfunc_8B
+ .4byte pokemonanimfunc_8C
+ .4byte pokemonanimfunc_8D
+ .4byte pokemonanimfunc_8E
+ .4byte pokemonanimfunc_8F
+ .4byte pokemonanimfunc_90
+ .4byte pokemonanimfunc_91
+ .4byte pokemonanimfunc_92
+ .4byte pokemonanimfunc_93
+ .4byte pokemonanimfunc_94
+ .4byte pokemonanimfunc_95
+ .4byte pokemonanimfunc_96
+
+gUnknown_0860ACE4:: @ 860ACE4
+ .byte 0x60, 0x5f, 0x02, 0x5e, 0x03, 0x46, 0x6d, 0x3e, 0x6e, 0x6f, 0x70, 0x3f, 0x71, 0x13, 0x72, 0x6c, 0x6b, 0x3a, 0x64, 0x14, 0x4f, 0x5d, 0x0f, 0x4c, 0x61, 0x57, 0x58, 0x67, 0x66, 0x59, 0x74, 0x73
+ .byte 0x5a, 0x75, 0x76, 0x5b, 0x77, 0x78, 0x65, 0x63, 0x5c, 0x62, 0x6a, 0x69, 0x68, 0x7b, 0x7a, 0x79, 0x7e, 0x7d, 0x7c, 0x81, 0x80, 0x7f, 0x84, 0x82, 0x83, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b
+ .byte 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96
+
+gUnknown_0860AD2F:: @ 860AD2F
+ .byte 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x02, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x02, 0x01, 0x02, 0x01
+
+ .align 2
+gSpriteAffineAnim_860AD48:: @ 860AD48
+ obj_rot_scal_anim_frame 0x100, 0x100, 0, 0
+ obj_rot_scal_anim_end
+
+ .align 2
+gSpriteAffineAnim_860AD58:: @ 860AD58
+ obj_rot_scal_anim_frame -0x100, 0x100, 0, 0
+ obj_rot_scal_anim_end
+
+ .align 2
+gSpriteAffineAnimTable_860AD68:: @ 860AD68
+ .4byte gSpriteAffineAnim_860AD48
+ .4byte gSpriteAffineAnim_860AD58
+
+gUnknown_0860AD70:: @ 860AD70
+ .byte 0xff, 0xff, 0x06, 0x02, 0x00, 0x06, 0xfe, 0x02, 0x06, 0x02, 0x00, 0x06, 0xfe, 0xfe, 0x06, 0x02, 0x00, 0x06, 0xfe, 0x02, 0x06, 0x02, 0x00, 0x06, 0xff, 0xff, 0x06, 0x00, 0x00, 0x00
+
+gUnknown_0860AD8E:: @ 860AD8E
+ .byte 0x00, 0x08, 0x08, 0x08, 0xf8, 0x0c, 0xf8, 0x08, 0x0c, 0x08, 0xf8, 0x0c, 0xf8, 0x08, 0x0c, 0x08, 0xf8, 0x0c, 0xf8, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x08, 0xf8, 0x18, 0xf8, 0x08
+ .byte 0x18, 0x08, 0xf8, 0x18, 0xf8, 0x08, 0x18, 0x08, 0xf8, 0x18, 0xf8, 0x00, 0x18, 0x00, 0x00, 0x00
+
+gUnknown_0860ADBE:: @ 860ADBE
+ .byte 0x01, 0x01, 0x0c, 0xfe, 0x00, 0x0c, 0x01, 0xff, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00
+
+gUnknown_0860ADCC:: @ 860ADCC
+ .byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
+ .byte 0x00, 0x0f, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
+ .byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
+ .byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
+ .byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00
+
+gUnknown_0860AE1C:: @ 860AE1C
+ .byte 0x00, 0x05, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00
+ .byte 0x00, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00
+ .byte 0x00, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00
+ .byte 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00
+
+gUnknown_0860AE54:: @ 860AE54
+ .byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
+ .byte 0x00, 0x14, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00
+ .byte 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00
+
+ .align 2
+gUnknown_0860AE7C:: @ 860AE7C
+ .4byte gUnknown_0860ADCC
+ .4byte gUnknown_0860AE1C
+ .4byte gUnknown_0860AE54
+
+ .align 1
+gUnknown_0860AE88:: @ 860AE88
+ .2byte 0x001f, 0x03e0, 0x7c00, 0x0000
diff --git a/data/rom_8486FEC.s b/data/rom_8486FEC.s
deleted file mode 100644
index 850ae5032..000000000
--- a/data/rom_8486FEC.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
- .align 2, 0
-
-gUnknown_8486FEC:: @ 8486FEC
- .incbin "baserom.gba", 0x486fec, 0xFFA0
diff --git a/data/strings.s b/data/strings.s
index 9e45b2e04..e3db2f0b0 100644
--- a/data/strings.s
+++ b/data/strings.s
@@ -2906,112 +2906,112 @@ gUnknown_085EC04F:: @ 85EC04F
gUnknown_085EC063:: @ 85EC063
.string "{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$"
-gUnknown_085EC06C:: @ 85EC06C
+gText_CombineFourWordsOrPhrases:: @ 85EC06C
.string "Combine four words or phrases$"
-gUnknown_085EC08A:: @ 85EC08A
+gText_AndMakeYourProfile:: @ 85EC08A
.string "and make your profile.$"
-gUnknown_085EC0A1:: @ 85EC0A1
+gText_CombineSixWordsOrPhrases:: @ 85EC0A1
.string "Combine six words or phrases$"
-gUnknown_085EC0BE:: @ 85EC0BE
+gText_AndMakeAMessage:: @ 85EC0BE
.string "and make a message.$"
-gUnknown_085EC0D2:: @ 85EC0D2
+gText_FindWordsThatDescribeYour:: @ 85EC0D2
.string "Find words that describe your$"
-gUnknown_085EC0F0:: @ 85EC0F0
+gText_FeelingsRightNow:: @ 85EC0F0
.string "feelings right now.$"
gUnknown_085EC104:: @ 85EC104
.string "With four phrases,$"
-gUnknown_085EC117:: @ 85EC117
+gText_CombineNineWordsOrPhrases:: @ 85EC117
.string "Combine nine words or phrases$"
-gUnknown_085EC135:: @ 85EC135
+gText_AndMakeAMessage2:: @ 85EC135
.string "and make a message.$"
-gUnknown_085EC149:: @ 85EC149
+gText_ChangeJustOneWordOrPhrase:: @ 85EC149
.string "Change just one word or phrase$"
-gUnknown_085EC168:: @ 85EC168
+gText_AndImproveTheBardsSong:: @ 85EC168
.string "and improve the BARD’s song.$"
-gUnknown_085EC185:: @ 85EC185
+gText_YourProfile:: @ 85EC185
.string "Your profile$"
-gUnknown_085EC192:: @ 85EC192
+gText_YourFeelingAtTheBattlesStart:: @ 85EC192
.string "Your feeling at the battle’s start$"
-gUnknown_085EC1B5:: @ 85EC1B5
+gText_WhatYouSayIfYouWin:: @ 85EC1B5
.string "What you say if you win a battle$"
-gUnknown_085EC1D6:: @ 85EC1D6
+gText_WhatYouSayIfYouLose:: @ 85EC1D6
.string "What you say if you lose a battle$"
-gUnknown_085EC1F8:: @ 85EC1F8
+gText_TheAnswer:: @ 85EC1F8
.string "The answer$"
-gUnknown_085EC203:: @ 85EC203
+gText_TheMailMessage:: @ 85EC203
.string "The MAIL message$"
gUnknown_085EC214:: @ 85EC214
.string "The MAIL salutation$"
-gUnknown_085EC228:: @ 85EC228
+gText_TheBardsSong2:: @ 85EC228
.string "The new song$"
-gUnknown_085EC235:: @ 85EC235
+gText_CombineTwoWordsOrPhrases:: @ 85EC235
.string "Combine two words or phrases$"
-gUnknown_085EC252:: @ 85EC252
+gText_AndMakeATrendySaying:: @ 85EC252
.string "and make a trendy saying.$"
-gUnknown_085EC26C:: @ 85EC26C
+gText_TheTrendySaying:: @ 85EC26C
.string "The trendy saying$"
-gUnknown_085EC27E:: @ 85EC27E
+gText_IsAsShownOkay:: @ 85EC27E
.string "is as shown. Okay?$"
-gUnknown_085EC291:: @ 85EC291
+gText_CombineTwoWordsOrPhrases2:: @ 85EC291
.string "Combine two words or phrases$"
-gUnknown_085EC2AE:: @ 85EC2AE
+gText_ToTeachHerAGoodSaying:: @ 85EC2AE
.string "to teach her a good saying.$"
-gUnknown_085EC2CA:: @ 85EC2CA
+gText_FindWordsWhichFit:: @ 85EC2CA
.string "Find words which fit$"
-gUnknown_085EC2DF:: @ 85EC2DF
+gText_TheTrainersImage:: @ 85EC2DF
.string "the TRAINER’s image.$"
-gUnknown_085EC2F4:: @ 85EC2F4
+gText_TheImage:: @ 85EC2F4
.string "The image:$"
-gUnknown_085EC2FF:: @ 85EC2FF
+gText_OutOfTheListedChoices:: @ 85EC2FF
.string "Out of the listed choices,$"
-gUnknown_085EC31A:: @ 85EC31A
+gText_SelectTheAnswerToTheQuiz:: @ 85EC31A
.string "select the answer to the quiz!$"
-gUnknown_085EC339:: @ 85EC339
+gText_AndCreateAQuiz:: @ 85EC339
.string "and create a quiz!$"
-gUnknown_085EC34C:: @ 85EC34C
+gText_PickAWordOrPhraseAnd:: @ 85EC34C
.string "Pick a word or phrase and$"
-gUnknown_085EC366:: @ 85EC366
+gText_SetTheQuizAnswer:: @ 85EC366
.string "set the quiz answer.$"
-gUnknown_085EC37B:: @ 85EC37B
+gText_TheAnswerColon:: @ 85EC37B
.string "The answer:$"
gUnknown_085EC387:: @ 85EC387
.string "The quiz:$"
-gUnknown_085EC391:: @ 85EC391
+gText_ApprenticePhrase:: @ 85EC391
.string "Apprentice’s phrase:$"
gText_QuitEditing:: @ 85EC3A6
@@ -3020,10 +3020,10 @@ gText_QuitEditing:: @ 85EC3A6
gText_StopGivingPkmnMail:: @ 85EC3B4
.string "Stop giving the POKéMON MAIL?$"
-gUnknown_085EC3D2:: @ 85EC3D2
+gText_AndFillOutTheQuestionnaire:: @ 85EC3D2
.string "and fill out the questionnaire.$"
-gUnknown_085EC3F2:: @ 85EC3F2
+gText_LetsReplyToTheInterview:: @ 85EC3F2
.string "Let’s reply to the interview!$"
gText_AllTextBeingEditedWill:: @ 85EC410
@@ -3056,7 +3056,7 @@ gText_OriginalSongWillBeUsed:: @ 85EC4E9
gUnknown_085EC509:: @ 85EC509
.string "That’s trendy already!$"
-gText_CombineTwoWordsOrPhrases:: @ 85EC520
+gText_CombineTwoWordsOrPhrases3:: @ 85EC520
.string "Combine two words or phrases.$"
gUnknown_085EC53E:: @ 85EC53E
@@ -3074,40 +3074,40 @@ gUnknown_085EC584:: @ 85EC584
gUnknown_085EC594:: @ 85EC594
.string "Cancel the selection?$"
-gUnknown_085EC5AA:: @ 85EC5AA
+gText_Profile:: @ 85EC5AA
.string "PROFILE$"
-gUnknown_085EC5B2:: @ 85EC5B2
+gText_AtTheBattlesStart:: @ 85EC5B2
.string "At the battle’s start:$"
-gUnknown_085EC5C9:: @ 85EC5C9
+gText_UponWinningABattle:: @ 85EC5C9
.string "Upon winning a battle:$"
-gUnknown_085EC5E0:: @ 85EC5E0
+gText_UponLosingABattle:: @ 85EC5E0
.string "Upon losing a battle:$"
-gUnknown_085EC5F6:: @ 85EC5F6
+gText_TheBardsSong:: @ 85EC5F6
.string "The BARD’s Song$"
-gUnknown_085EC606:: @ 85EC606
+gText_WhatsHipAndHappening:: @ 85EC606
.string "What’s hip and happening?$"
-gUnknown_085EC620:: @ 85EC620
+gText_Interview:: @ 85EC620
.string "Interview$"
-gUnknown_085EC62A:: @ 85EC62A
+gText_GoodSaying:: @ 85EC62A
.string "Good saying$"
-gUnknown_085EC636:: @ 85EC636
+gText_FansQuestion:: @ 85EC636
.string "Fan’s question$"
gUnknown_085EC645:: @ 85EC645
.string "クイズの こたえは?$" @ "kuizuno kotaeha?" ("The quiz's answer is?" in Japanese)
-gUnknown_085EC650:: @ 85EC650
+gText_ApprenticesPhrase:: @ 85EC650
.string "Apprentice’s phrase$"
-gUnknown_085EC664:: @ 85EC664
+gText_Questionnaire:: @ 85EC664
.string "QUESTIONNAIRE$"
gText_YouCannotQuitHere:: @ 85EC672
@@ -3122,13 +3122,13 @@ gText_F700sQuiz:: @ 85EC6A8
gText_Lady:: @ 85EC6B2
.string "Lady$"
-gUnknown_085EC6B7:: @ 85EC6B7
+gText_AfterYouHaveReadTheQuiz:: @ 85EC6B7
.string "After you have read the quiz$"
-gUnknown_085EC6D4:: @ 85EC6D4
+gText_QuestionPressTheAButton:: @ 85EC6D4
.string "question, press the A Button.$"
-gUnknown_085EC6F2:: @ 85EC6F2
+gText_TheQuizAnswerIs:: @ 85EC6F2
.string "The quiz answer is?$"
gText_LikeToQuitQuiz:: @ 85EC706
@@ -3137,7 +3137,7 @@ gText_LikeToQuitQuiz:: @ 85EC706
gText_ChallengeQuestionMark:: @ 85EC727
.string "challenge?$"
-gUnknown_085EC732:: @ 85EC732
+gText_IsThisQuizOK:: @ 85EC732
.string "Is this quiz OK?$"
gText_CreateAQuiz:: @ 85EC743
@@ -5370,19 +5370,19 @@ gUnknown_085EFCA0:: @ 85EFCA0
gUnknown_085EFCAB:: @ 85EFCAB
.string "SEAFLOOR2$"
-gUnknown_085EFCB5:: @ 85EFCB5
+gText_DelAll:: @ 85EFCB5
.string "DEL. ALL$"
-gUnknown_085EFCBE:: @ 85EFCBE
+gText_Cancel5:: @ 85EFCBE
.string "CANCEL$"
-gUnknown_085EFCC5:: @ 85EFCC5
+gText_Ok2:: @ 85EFCC5
.string "OK$"
-gUnknown_085EFCC8:: @ 85EFCC8
+gText_Quiz:: @ 85EFCC8
.string "QUIZ$"
-gUnknown_085EFCCD:: @ 85EFCCD
+gText_Answer:: @ 85EFCCD
.string "ANSWER$"
gText_PokeBalls:: @ 85EFCD4
diff --git a/graphics/door_anims/00/0.png b/graphics/door_anims/00/0.png
new file mode 100644
index 000000000..ac2c4b438
--- /dev/null
+++ b/graphics/door_anims/00/0.png
Binary files differ
diff --git a/graphics/door_anims/00/1.png b/graphics/door_anims/00/1.png
new file mode 100644
index 000000000..cfe812f75
--- /dev/null
+++ b/graphics/door_anims/00/1.png
Binary files differ
diff --git a/graphics/door_anims/00/2.png b/graphics/door_anims/00/2.png
new file mode 100644
index 000000000..88e5d480c
--- /dev/null
+++ b/graphics/door_anims/00/2.png
Binary files differ
diff --git a/graphics/door_anims/01/0.png b/graphics/door_anims/01/0.png
new file mode 100644
index 000000000..cb8c6fc4c
--- /dev/null
+++ b/graphics/door_anims/01/0.png
Binary files differ
diff --git a/graphics/door_anims/01/1.png b/graphics/door_anims/01/1.png
new file mode 100644
index 000000000..102db4cef
--- /dev/null
+++ b/graphics/door_anims/01/1.png
Binary files differ
diff --git a/graphics/door_anims/01/2.png b/graphics/door_anims/01/2.png
new file mode 100644
index 000000000..0a97da6ce
--- /dev/null
+++ b/graphics/door_anims/01/2.png
Binary files differ
diff --git a/graphics/door_anims/02/0.png b/graphics/door_anims/02/0.png
new file mode 100644
index 000000000..744949971
--- /dev/null
+++ b/graphics/door_anims/02/0.png
Binary files differ
diff --git a/graphics/door_anims/02/1.png b/graphics/door_anims/02/1.png
new file mode 100644
index 000000000..6c328b9ff
--- /dev/null
+++ b/graphics/door_anims/02/1.png
Binary files differ
diff --git a/graphics/door_anims/02/2.png b/graphics/door_anims/02/2.png
new file mode 100644
index 000000000..0ee9ba8f0
--- /dev/null
+++ b/graphics/door_anims/02/2.png
Binary files differ
diff --git a/graphics/door_anims/03/0.png b/graphics/door_anims/03/0.png
new file mode 100644
index 000000000..cb8c6fc4c
--- /dev/null
+++ b/graphics/door_anims/03/0.png
Binary files differ
diff --git a/graphics/door_anims/03/1.png b/graphics/door_anims/03/1.png
new file mode 100644
index 000000000..102db4cef
--- /dev/null
+++ b/graphics/door_anims/03/1.png
Binary files differ
diff --git a/graphics/door_anims/03/2.png b/graphics/door_anims/03/2.png
new file mode 100644
index 000000000..0a97da6ce
--- /dev/null
+++ b/graphics/door_anims/03/2.png
Binary files differ
diff --git a/graphics/door_anims/04/0.png b/graphics/door_anims/04/0.png
new file mode 100644
index 000000000..1c2cd1db1
--- /dev/null
+++ b/graphics/door_anims/04/0.png
Binary files differ
diff --git a/graphics/door_anims/04/1.png b/graphics/door_anims/04/1.png
new file mode 100644
index 000000000..65b58bc82
--- /dev/null
+++ b/graphics/door_anims/04/1.png
Binary files differ
diff --git a/graphics/door_anims/04/2.png b/graphics/door_anims/04/2.png
new file mode 100644
index 000000000..8c8e37b7d
--- /dev/null
+++ b/graphics/door_anims/04/2.png
Binary files differ
diff --git a/graphics/door_anims/05/0.png b/graphics/door_anims/05/0.png
new file mode 100644
index 000000000..8f4fe425f
--- /dev/null
+++ b/graphics/door_anims/05/0.png
Binary files differ
diff --git a/graphics/door_anims/05/1.png b/graphics/door_anims/05/1.png
new file mode 100644
index 000000000..52002fb32
--- /dev/null
+++ b/graphics/door_anims/05/1.png
Binary files differ
diff --git a/graphics/door_anims/05/2.png b/graphics/door_anims/05/2.png
new file mode 100644
index 000000000..2b4f36508
--- /dev/null
+++ b/graphics/door_anims/05/2.png
Binary files differ
diff --git a/graphics/door_anims/06/0.png b/graphics/door_anims/06/0.png
new file mode 100644
index 000000000..2b3cade89
--- /dev/null
+++ b/graphics/door_anims/06/0.png
Binary files differ
diff --git a/graphics/door_anims/06/1.png b/graphics/door_anims/06/1.png
new file mode 100644
index 000000000..c397bd4da
--- /dev/null
+++ b/graphics/door_anims/06/1.png
Binary files differ
diff --git a/graphics/door_anims/06/2.png b/graphics/door_anims/06/2.png
new file mode 100644
index 000000000..8883dad1c
--- /dev/null
+++ b/graphics/door_anims/06/2.png
Binary files differ
diff --git a/graphics/door_anims/07/0.png b/graphics/door_anims/07/0.png
new file mode 100644
index 000000000..2b3cade89
--- /dev/null
+++ b/graphics/door_anims/07/0.png
Binary files differ
diff --git a/graphics/door_anims/07/1.png b/graphics/door_anims/07/1.png
new file mode 100644
index 000000000..c397bd4da
--- /dev/null
+++ b/graphics/door_anims/07/1.png
Binary files differ
diff --git a/graphics/door_anims/07/2.png b/graphics/door_anims/07/2.png
new file mode 100644
index 000000000..8883dad1c
--- /dev/null
+++ b/graphics/door_anims/07/2.png
Binary files differ
diff --git a/graphics/door_anims/08/0.png b/graphics/door_anims/08/0.png
new file mode 100644
index 000000000..832abe1c4
--- /dev/null
+++ b/graphics/door_anims/08/0.png
Binary files differ
diff --git a/graphics/door_anims/08/1.png b/graphics/door_anims/08/1.png
new file mode 100644
index 000000000..f6a402eec
--- /dev/null
+++ b/graphics/door_anims/08/1.png
Binary files differ
diff --git a/graphics/door_anims/08/2.png b/graphics/door_anims/08/2.png
new file mode 100644
index 000000000..082f1a212
--- /dev/null
+++ b/graphics/door_anims/08/2.png
Binary files differ
diff --git a/graphics/door_anims/09/0.png b/graphics/door_anims/09/0.png
new file mode 100644
index 000000000..6205d426d
--- /dev/null
+++ b/graphics/door_anims/09/0.png
Binary files differ
diff --git a/graphics/door_anims/09/1.png b/graphics/door_anims/09/1.png
new file mode 100644
index 000000000..333f28fac
--- /dev/null
+++ b/graphics/door_anims/09/1.png
Binary files differ
diff --git a/graphics/door_anims/09/2.png b/graphics/door_anims/09/2.png
new file mode 100644
index 000000000..5288fc4ea
--- /dev/null
+++ b/graphics/door_anims/09/2.png
Binary files differ
diff --git a/graphics/door_anims/10/0.png b/graphics/door_anims/10/0.png
new file mode 100644
index 000000000..c1fc3d631
--- /dev/null
+++ b/graphics/door_anims/10/0.png
Binary files differ
diff --git a/graphics/door_anims/10/1.png b/graphics/door_anims/10/1.png
new file mode 100644
index 000000000..3daffe355
--- /dev/null
+++ b/graphics/door_anims/10/1.png
Binary files differ
diff --git a/graphics/door_anims/10/2.png b/graphics/door_anims/10/2.png
new file mode 100644
index 000000000..48e2d3a8c
--- /dev/null
+++ b/graphics/door_anims/10/2.png
Binary files differ
diff --git a/graphics/door_anims/11/0.png b/graphics/door_anims/11/0.png
new file mode 100644
index 000000000..d5b78a46f
--- /dev/null
+++ b/graphics/door_anims/11/0.png
Binary files differ
diff --git a/graphics/door_anims/11/1.png b/graphics/door_anims/11/1.png
new file mode 100644
index 000000000..72ed6d148
--- /dev/null
+++ b/graphics/door_anims/11/1.png
Binary files differ
diff --git a/graphics/door_anims/11/2.png b/graphics/door_anims/11/2.png
new file mode 100644
index 000000000..8b20c59c4
--- /dev/null
+++ b/graphics/door_anims/11/2.png
Binary files differ
diff --git a/graphics/door_anims/12/0.png b/graphics/door_anims/12/0.png
new file mode 100644
index 000000000..ac2c4b438
--- /dev/null
+++ b/graphics/door_anims/12/0.png
Binary files differ
diff --git a/graphics/door_anims/12/1.png b/graphics/door_anims/12/1.png
new file mode 100644
index 000000000..cfe812f75
--- /dev/null
+++ b/graphics/door_anims/12/1.png
Binary files differ
diff --git a/graphics/door_anims/12/2.png b/graphics/door_anims/12/2.png
new file mode 100644
index 000000000..88e5d480c
--- /dev/null
+++ b/graphics/door_anims/12/2.png
Binary files differ
diff --git a/graphics/door_anims/13/0.png b/graphics/door_anims/13/0.png
new file mode 100644
index 000000000..8c3b85068
--- /dev/null
+++ b/graphics/door_anims/13/0.png
Binary files differ
diff --git a/graphics/door_anims/13/1.png b/graphics/door_anims/13/1.png
new file mode 100644
index 000000000..1b92f4bca
--- /dev/null
+++ b/graphics/door_anims/13/1.png
Binary files differ
diff --git a/graphics/door_anims/13/2.png b/graphics/door_anims/13/2.png
new file mode 100644
index 000000000..e4be80873
--- /dev/null
+++ b/graphics/door_anims/13/2.png
Binary files differ
diff --git a/graphics/door_anims/14/0.png b/graphics/door_anims/14/0.png
new file mode 100644
index 000000000..af845aef4
--- /dev/null
+++ b/graphics/door_anims/14/0.png
Binary files differ
diff --git a/graphics/door_anims/14/1.png b/graphics/door_anims/14/1.png
new file mode 100644
index 000000000..53725c901
--- /dev/null
+++ b/graphics/door_anims/14/1.png
Binary files differ
diff --git a/graphics/door_anims/14/2.png b/graphics/door_anims/14/2.png
new file mode 100644
index 000000000..1b3a8e178
--- /dev/null
+++ b/graphics/door_anims/14/2.png
Binary files differ
diff --git a/graphics/door_anims/15/0.png b/graphics/door_anims/15/0.png
new file mode 100644
index 000000000..d9f37092b
--- /dev/null
+++ b/graphics/door_anims/15/0.png
Binary files differ
diff --git a/graphics/door_anims/15/1.png b/graphics/door_anims/15/1.png
new file mode 100644
index 000000000..b9dbb58c4
--- /dev/null
+++ b/graphics/door_anims/15/1.png
Binary files differ
diff --git a/graphics/door_anims/15/2.png b/graphics/door_anims/15/2.png
new file mode 100644
index 000000000..ce6a1fe2b
--- /dev/null
+++ b/graphics/door_anims/15/2.png
Binary files differ
diff --git a/graphics/door_anims/16/0.png b/graphics/door_anims/16/0.png
new file mode 100644
index 000000000..a385f7ad0
--- /dev/null
+++ b/graphics/door_anims/16/0.png
Binary files differ
diff --git a/graphics/door_anims/16/1.png b/graphics/door_anims/16/1.png
new file mode 100644
index 000000000..67b16f45d
--- /dev/null
+++ b/graphics/door_anims/16/1.png
Binary files differ
diff --git a/graphics/door_anims/16/2.png b/graphics/door_anims/16/2.png
new file mode 100644
index 000000000..e796302f0
--- /dev/null
+++ b/graphics/door_anims/16/2.png
Binary files differ
diff --git a/graphics/door_anims/17/0.png b/graphics/door_anims/17/0.png
new file mode 100644
index 000000000..90774f8f7
--- /dev/null
+++ b/graphics/door_anims/17/0.png
Binary files differ
diff --git a/graphics/door_anims/17/1.png b/graphics/door_anims/17/1.png
new file mode 100644
index 000000000..06a278c0c
--- /dev/null
+++ b/graphics/door_anims/17/1.png
Binary files differ
diff --git a/graphics/door_anims/17/2.png b/graphics/door_anims/17/2.png
new file mode 100644
index 000000000..e0e60042c
--- /dev/null
+++ b/graphics/door_anims/17/2.png
Binary files differ
diff --git a/graphics/door_anims/18/0.png b/graphics/door_anims/18/0.png
new file mode 100644
index 000000000..2605a89a2
--- /dev/null
+++ b/graphics/door_anims/18/0.png
Binary files differ
diff --git a/graphics/door_anims/18/1.png b/graphics/door_anims/18/1.png
new file mode 100644
index 000000000..d76dd3157
--- /dev/null
+++ b/graphics/door_anims/18/1.png
Binary files differ
diff --git a/graphics/door_anims/18/2.png b/graphics/door_anims/18/2.png
new file mode 100644
index 000000000..2280e92fc
--- /dev/null
+++ b/graphics/door_anims/18/2.png
Binary files differ
diff --git a/graphics/door_anims/19/0.png b/graphics/door_anims/19/0.png
new file mode 100644
index 000000000..80309914b
--- /dev/null
+++ b/graphics/door_anims/19/0.png
Binary files differ
diff --git a/graphics/door_anims/19/1.png b/graphics/door_anims/19/1.png
new file mode 100644
index 000000000..5097cd859
--- /dev/null
+++ b/graphics/door_anims/19/1.png
Binary files differ
diff --git a/graphics/door_anims/19/2.png b/graphics/door_anims/19/2.png
new file mode 100644
index 000000000..52487c3c3
--- /dev/null
+++ b/graphics/door_anims/19/2.png
Binary files differ
diff --git a/graphics/door_anims/20/0.png b/graphics/door_anims/20/0.png
new file mode 100644
index 000000000..5e93af90b
--- /dev/null
+++ b/graphics/door_anims/20/0.png
Binary files differ
diff --git a/graphics/door_anims/20/1.png b/graphics/door_anims/20/1.png
new file mode 100644
index 000000000..438d0f16a
--- /dev/null
+++ b/graphics/door_anims/20/1.png
Binary files differ
diff --git a/graphics/door_anims/20/2.png b/graphics/door_anims/20/2.png
new file mode 100644
index 000000000..4483dacd0
--- /dev/null
+++ b/graphics/door_anims/20/2.png
Binary files differ
diff --git a/graphics/door_anims/21/0.png b/graphics/door_anims/21/0.png
new file mode 100644
index 000000000..839dc109d
--- /dev/null
+++ b/graphics/door_anims/21/0.png
Binary files differ
diff --git a/graphics/door_anims/21/1.png b/graphics/door_anims/21/1.png
new file mode 100644
index 000000000..5cabacdc9
--- /dev/null
+++ b/graphics/door_anims/21/1.png
Binary files differ
diff --git a/graphics/door_anims/21/2.png b/graphics/door_anims/21/2.png
new file mode 100644
index 000000000..73353c9bb
--- /dev/null
+++ b/graphics/door_anims/21/2.png
Binary files differ
diff --git a/graphics/door_anims/22/0.png b/graphics/door_anims/22/0.png
new file mode 100644
index 000000000..96dd8ea11
--- /dev/null
+++ b/graphics/door_anims/22/0.png
Binary files differ
diff --git a/graphics/door_anims/22/1.png b/graphics/door_anims/22/1.png
new file mode 100644
index 000000000..446d5bec3
--- /dev/null
+++ b/graphics/door_anims/22/1.png
Binary files differ
diff --git a/graphics/door_anims/22/2.png b/graphics/door_anims/22/2.png
new file mode 100644
index 000000000..59438d105
--- /dev/null
+++ b/graphics/door_anims/22/2.png
Binary files differ
diff --git a/graphics/door_anims/23/0.png b/graphics/door_anims/23/0.png
new file mode 100644
index 000000000..a331665a8
--- /dev/null
+++ b/graphics/door_anims/23/0.png
Binary files differ
diff --git a/graphics/door_anims/23/1.png b/graphics/door_anims/23/1.png
new file mode 100644
index 000000000..7ea47bba0
--- /dev/null
+++ b/graphics/door_anims/23/1.png
Binary files differ
diff --git a/graphics/door_anims/23/2.png b/graphics/door_anims/23/2.png
new file mode 100644
index 000000000..9d2b940cc
--- /dev/null
+++ b/graphics/door_anims/23/2.png
Binary files differ
diff --git a/graphics/door_anims/24/0.png b/graphics/door_anims/24/0.png
new file mode 100644
index 000000000..49dd2b432
--- /dev/null
+++ b/graphics/door_anims/24/0.png
Binary files differ
diff --git a/graphics/door_anims/24/1.png b/graphics/door_anims/24/1.png
new file mode 100644
index 000000000..10bb6c2f4
--- /dev/null
+++ b/graphics/door_anims/24/1.png
Binary files differ
diff --git a/graphics/door_anims/24/2.png b/graphics/door_anims/24/2.png
new file mode 100644
index 000000000..328b692ea
--- /dev/null
+++ b/graphics/door_anims/24/2.png
Binary files differ
diff --git a/graphics/door_anims/25/0.png b/graphics/door_anims/25/0.png
new file mode 100644
index 000000000..291e71e90
--- /dev/null
+++ b/graphics/door_anims/25/0.png
Binary files differ
diff --git a/graphics/door_anims/25/1.png b/graphics/door_anims/25/1.png
new file mode 100644
index 000000000..4c0b5a105
--- /dev/null
+++ b/graphics/door_anims/25/1.png
Binary files differ
diff --git a/graphics/door_anims/25/2.png b/graphics/door_anims/25/2.png
new file mode 100644
index 000000000..a19c6c27b
--- /dev/null
+++ b/graphics/door_anims/25/2.png
Binary files differ
diff --git a/graphics/door_anims/26/0.png b/graphics/door_anims/26/0.png
new file mode 100644
index 000000000..a4e6ef57c
--- /dev/null
+++ b/graphics/door_anims/26/0.png
Binary files differ
diff --git a/graphics/door_anims/26/1.png b/graphics/door_anims/26/1.png
new file mode 100644
index 000000000..495b7d743
--- /dev/null
+++ b/graphics/door_anims/26/1.png
Binary files differ
diff --git a/graphics/door_anims/26/2.png b/graphics/door_anims/26/2.png
new file mode 100644
index 000000000..dece153ab
--- /dev/null
+++ b/graphics/door_anims/26/2.png
Binary files differ
diff --git a/graphics/door_anims/27/0.png b/graphics/door_anims/27/0.png
new file mode 100644
index 000000000..45056f579
--- /dev/null
+++ b/graphics/door_anims/27/0.png
Binary files differ
diff --git a/graphics/door_anims/27/1.png b/graphics/door_anims/27/1.png
new file mode 100644
index 000000000..287f7e55a
--- /dev/null
+++ b/graphics/door_anims/27/1.png
Binary files differ
diff --git a/graphics/door_anims/27/2.png b/graphics/door_anims/27/2.png
new file mode 100644
index 000000000..02c810637
--- /dev/null
+++ b/graphics/door_anims/27/2.png
Binary files differ
diff --git a/graphics/door_anims/28/0.png b/graphics/door_anims/28/0.png
new file mode 100644
index 000000000..3da426d0f
--- /dev/null
+++ b/graphics/door_anims/28/0.png
Binary files differ
diff --git a/graphics/door_anims/28/1.png b/graphics/door_anims/28/1.png
new file mode 100644
index 000000000..77f8a5991
--- /dev/null
+++ b/graphics/door_anims/28/1.png
Binary files differ
diff --git a/graphics/door_anims/28/2.png b/graphics/door_anims/28/2.png
new file mode 100644
index 000000000..f90e0d148
--- /dev/null
+++ b/graphics/door_anims/28/2.png
Binary files differ
diff --git a/graphics/door_anims/29/0.png b/graphics/door_anims/29/0.png
new file mode 100644
index 000000000..832abe1c4
--- /dev/null
+++ b/graphics/door_anims/29/0.png
Binary files differ
diff --git a/graphics/door_anims/29/1.png b/graphics/door_anims/29/1.png
new file mode 100644
index 000000000..f6a402eec
--- /dev/null
+++ b/graphics/door_anims/29/1.png
Binary files differ
diff --git a/graphics/door_anims/29/2.png b/graphics/door_anims/29/2.png
new file mode 100644
index 000000000..082f1a212
--- /dev/null
+++ b/graphics/door_anims/29/2.png
Binary files differ
diff --git a/graphics/door_anims/30/0.png b/graphics/door_anims/30/0.png
new file mode 100644
index 000000000..f199a34b9
--- /dev/null
+++ b/graphics/door_anims/30/0.png
Binary files differ
diff --git a/graphics/door_anims/30/1.png b/graphics/door_anims/30/1.png
new file mode 100644
index 000000000..15beb5a36
--- /dev/null
+++ b/graphics/door_anims/30/1.png
Binary files differ
diff --git a/graphics/door_anims/30/2.png b/graphics/door_anims/30/2.png
new file mode 100644
index 000000000..2306a6b53
--- /dev/null
+++ b/graphics/door_anims/30/2.png
Binary files differ
diff --git a/graphics/door_anims/31/0.png b/graphics/door_anims/31/0.png
new file mode 100644
index 000000000..94c738d3f
--- /dev/null
+++ b/graphics/door_anims/31/0.png
Binary files differ
diff --git a/graphics/door_anims/31/1.png b/graphics/door_anims/31/1.png
new file mode 100644
index 000000000..817eff6e7
--- /dev/null
+++ b/graphics/door_anims/31/1.png
Binary files differ
diff --git a/graphics/door_anims/31/2.png b/graphics/door_anims/31/2.png
new file mode 100644
index 000000000..cf05cc488
--- /dev/null
+++ b/graphics/door_anims/31/2.png
Binary files differ
diff --git a/graphics/door_anims/32/0.png b/graphics/door_anims/32/0.png
new file mode 100644
index 000000000..a18d49d80
--- /dev/null
+++ b/graphics/door_anims/32/0.png
Binary files differ
diff --git a/graphics/door_anims/32/1.png b/graphics/door_anims/32/1.png
new file mode 100644
index 000000000..2fc91d012
--- /dev/null
+++ b/graphics/door_anims/32/1.png
Binary files differ
diff --git a/graphics/door_anims/32/2.png b/graphics/door_anims/32/2.png
new file mode 100644
index 000000000..6d05fcc11
--- /dev/null
+++ b/graphics/door_anims/32/2.png
Binary files differ
diff --git a/graphics/door_anims/33/0.png b/graphics/door_anims/33/0.png
new file mode 100644
index 000000000..3597efaa6
--- /dev/null
+++ b/graphics/door_anims/33/0.png
Binary files differ
diff --git a/graphics/door_anims/33/1.png b/graphics/door_anims/33/1.png
new file mode 100644
index 000000000..6c9c4db27
--- /dev/null
+++ b/graphics/door_anims/33/1.png
Binary files differ
diff --git a/graphics/door_anims/33/2.png b/graphics/door_anims/33/2.png
new file mode 100644
index 000000000..d52c8243f
--- /dev/null
+++ b/graphics/door_anims/33/2.png
Binary files differ
diff --git a/graphics/door_anims/34/0.png b/graphics/door_anims/34/0.png
new file mode 100644
index 000000000..26e0a0654
--- /dev/null
+++ b/graphics/door_anims/34/0.png
Binary files differ
diff --git a/graphics/door_anims/34/1.png b/graphics/door_anims/34/1.png
new file mode 100644
index 000000000..89baa478c
--- /dev/null
+++ b/graphics/door_anims/34/1.png
Binary files differ
diff --git a/graphics/door_anims/34/2.png b/graphics/door_anims/34/2.png
new file mode 100644
index 000000000..35cf42295
--- /dev/null
+++ b/graphics/door_anims/34/2.png
Binary files differ
diff --git a/graphics/door_anims/35/0.png b/graphics/door_anims/35/0.png
new file mode 100644
index 000000000..d9703db87
--- /dev/null
+++ b/graphics/door_anims/35/0.png
Binary files differ
diff --git a/graphics/door_anims/35/1.png b/graphics/door_anims/35/1.png
new file mode 100644
index 000000000..da3ecb839
--- /dev/null
+++ b/graphics/door_anims/35/1.png
Binary files differ
diff --git a/graphics/door_anims/35/2.png b/graphics/door_anims/35/2.png
new file mode 100644
index 000000000..32acbcaa2
--- /dev/null
+++ b/graphics/door_anims/35/2.png
Binary files differ
diff --git a/graphics/door_anims/36/0.png b/graphics/door_anims/36/0.png
new file mode 100644
index 000000000..0bb35c0c5
--- /dev/null
+++ b/graphics/door_anims/36/0.png
Binary files differ
diff --git a/graphics/door_anims/36/1.png b/graphics/door_anims/36/1.png
new file mode 100644
index 000000000..c3a2aa3e2
--- /dev/null
+++ b/graphics/door_anims/36/1.png
Binary files differ
diff --git a/graphics/door_anims/36/2.png b/graphics/door_anims/36/2.png
new file mode 100644
index 000000000..33b2a1e02
--- /dev/null
+++ b/graphics/door_anims/36/2.png
Binary files differ
diff --git a/graphics/door_anims/37/0.png b/graphics/door_anims/37/0.png
new file mode 100644
index 000000000..cf0bcd397
--- /dev/null
+++ b/graphics/door_anims/37/0.png
Binary files differ
diff --git a/graphics/door_anims/37/1.png b/graphics/door_anims/37/1.png
new file mode 100644
index 000000000..a5fcb7e27
--- /dev/null
+++ b/graphics/door_anims/37/1.png
Binary files differ
diff --git a/graphics/door_anims/37/2.png b/graphics/door_anims/37/2.png
new file mode 100644
index 000000000..70774fcf7
--- /dev/null
+++ b/graphics/door_anims/37/2.png
Binary files differ
diff --git a/graphics/door_anims/38/0.png b/graphics/door_anims/38/0.png
new file mode 100644
index 000000000..b952321b7
--- /dev/null
+++ b/graphics/door_anims/38/0.png
Binary files differ
diff --git a/graphics/door_anims/38/1.png b/graphics/door_anims/38/1.png
new file mode 100644
index 000000000..a7dd729d3
--- /dev/null
+++ b/graphics/door_anims/38/1.png
Binary files differ
diff --git a/graphics/door_anims/38/2.png b/graphics/door_anims/38/2.png
new file mode 100644
index 000000000..cad72bd9d
--- /dev/null
+++ b/graphics/door_anims/38/2.png
Binary files differ
diff --git a/graphics/door_anims/39/0.png b/graphics/door_anims/39/0.png
new file mode 100644
index 000000000..60e983141
--- /dev/null
+++ b/graphics/door_anims/39/0.png
Binary files differ
diff --git a/graphics/door_anims/39/1.png b/graphics/door_anims/39/1.png
new file mode 100644
index 000000000..3173d57c8
--- /dev/null
+++ b/graphics/door_anims/39/1.png
Binary files differ
diff --git a/graphics/door_anims/39/2.png b/graphics/door_anims/39/2.png
new file mode 100644
index 000000000..04f77999d
--- /dev/null
+++ b/graphics/door_anims/39/2.png
Binary files differ
diff --git a/graphics/door_anims/40/0.png b/graphics/door_anims/40/0.png
new file mode 100644
index 000000000..5e1504117
--- /dev/null
+++ b/graphics/door_anims/40/0.png
Binary files differ
diff --git a/graphics/door_anims/40/1.png b/graphics/door_anims/40/1.png
new file mode 100644
index 000000000..cf185c5ab
--- /dev/null
+++ b/graphics/door_anims/40/1.png
Binary files differ
diff --git a/graphics/door_anims/40/2.png b/graphics/door_anims/40/2.png
new file mode 100644
index 000000000..7b34bef94
--- /dev/null
+++ b/graphics/door_anims/40/2.png
Binary files differ
diff --git a/graphics/door_anims/41/0.png b/graphics/door_anims/41/0.png
new file mode 100644
index 000000000..61d365737
--- /dev/null
+++ b/graphics/door_anims/41/0.png
Binary files differ
diff --git a/graphics/door_anims/41/1.png b/graphics/door_anims/41/1.png
new file mode 100644
index 000000000..f9480e4d9
--- /dev/null
+++ b/graphics/door_anims/41/1.png
Binary files differ
diff --git a/graphics/door_anims/41/2.png b/graphics/door_anims/41/2.png
new file mode 100644
index 000000000..5b8c3fa44
--- /dev/null
+++ b/graphics/door_anims/41/2.png
Binary files differ
diff --git a/graphics/door_anims/42/0.png b/graphics/door_anims/42/0.png
new file mode 100644
index 000000000..a88a24cd6
--- /dev/null
+++ b/graphics/door_anims/42/0.png
Binary files differ
diff --git a/graphics/door_anims/42/1.png b/graphics/door_anims/42/1.png
new file mode 100644
index 000000000..ca8cd3853
--- /dev/null
+++ b/graphics/door_anims/42/1.png
Binary files differ
diff --git a/graphics/door_anims/42/2.png b/graphics/door_anims/42/2.png
new file mode 100644
index 000000000..e9e5122b4
--- /dev/null
+++ b/graphics/door_anims/42/2.png
Binary files differ
diff --git a/graphics/door_anims/42/3.png b/graphics/door_anims/42/3.png
new file mode 100644
index 000000000..d077bca49
--- /dev/null
+++ b/graphics/door_anims/42/3.png
Binary files differ
diff --git a/graphics/door_anims/43/0.png b/graphics/door_anims/43/0.png
new file mode 100644
index 000000000..eec2d2c65
--- /dev/null
+++ b/graphics/door_anims/43/0.png
Binary files differ
diff --git a/graphics/door_anims/43/1.png b/graphics/door_anims/43/1.png
new file mode 100644
index 000000000..a013b2990
--- /dev/null
+++ b/graphics/door_anims/43/1.png
Binary files differ
diff --git a/graphics/door_anims/43/2.png b/graphics/door_anims/43/2.png
new file mode 100644
index 000000000..8f3dc2a18
--- /dev/null
+++ b/graphics/door_anims/43/2.png
Binary files differ
diff --git a/graphics/door_anims/44/0_left.png b/graphics/door_anims/44/0_left.png
new file mode 100644
index 000000000..37a2530e7
--- /dev/null
+++ b/graphics/door_anims/44/0_left.png
Binary files differ
diff --git a/graphics/door_anims/44/0_right.png b/graphics/door_anims/44/0_right.png
new file mode 100644
index 000000000..f7a5d4dc7
--- /dev/null
+++ b/graphics/door_anims/44/0_right.png
Binary files differ
diff --git a/graphics/door_anims/44/1_left.png b/graphics/door_anims/44/1_left.png
new file mode 100644
index 000000000..cb3474672
--- /dev/null
+++ b/graphics/door_anims/44/1_left.png
Binary files differ
diff --git a/graphics/door_anims/44/1_right.png b/graphics/door_anims/44/1_right.png
new file mode 100644
index 000000000..ed367c276
--- /dev/null
+++ b/graphics/door_anims/44/1_right.png
Binary files differ
diff --git a/graphics/door_anims/44/2_left.png b/graphics/door_anims/44/2_left.png
new file mode 100644
index 000000000..d66ecc90d
--- /dev/null
+++ b/graphics/door_anims/44/2_left.png
Binary files differ
diff --git a/graphics/door_anims/44/2_right.png b/graphics/door_anims/44/2_right.png
new file mode 100644
index 000000000..de82f04cf
--- /dev/null
+++ b/graphics/door_anims/44/2_right.png
Binary files differ
diff --git a/graphics/door_anims/45/0.png b/graphics/door_anims/45/0.png
new file mode 100644
index 000000000..867a8b0e9
--- /dev/null
+++ b/graphics/door_anims/45/0.png
Binary files differ
diff --git a/graphics/door_anims/45/1.png b/graphics/door_anims/45/1.png
new file mode 100644
index 000000000..263a31f87
--- /dev/null
+++ b/graphics/door_anims/45/1.png
Binary files differ
diff --git a/graphics/door_anims/45/2.png b/graphics/door_anims/45/2.png
new file mode 100644
index 000000000..f3039a7c1
--- /dev/null
+++ b/graphics/door_anims/45/2.png
Binary files differ
diff --git a/graphics/door_anims/46/0.png b/graphics/door_anims/46/0.png
new file mode 100644
index 000000000..5d2fd8b8d
--- /dev/null
+++ b/graphics/door_anims/46/0.png
Binary files differ
diff --git a/graphics/door_anims/46/1.png b/graphics/door_anims/46/1.png
new file mode 100644
index 000000000..f79cc787d
--- /dev/null
+++ b/graphics/door_anims/46/1.png
Binary files differ
diff --git a/graphics/door_anims/46/2.png b/graphics/door_anims/46/2.png
new file mode 100644
index 000000000..1a1afcaa1
--- /dev/null
+++ b/graphics/door_anims/46/2.png
Binary files differ
diff --git a/graphics/door_anims/47/0.png b/graphics/door_anims/47/0.png
new file mode 100644
index 000000000..0dbf2ece9
--- /dev/null
+++ b/graphics/door_anims/47/0.png
Binary files differ
diff --git a/graphics/door_anims/47/1.png b/graphics/door_anims/47/1.png
new file mode 100644
index 000000000..7e16467fa
--- /dev/null
+++ b/graphics/door_anims/47/1.png
Binary files differ
diff --git a/graphics/door_anims/47/2.png b/graphics/door_anims/47/2.png
new file mode 100644
index 000000000..592268d98
--- /dev/null
+++ b/graphics/door_anims/47/2.png
Binary files differ
diff --git a/graphics/door_anims/48/0.png b/graphics/door_anims/48/0.png
new file mode 100644
index 000000000..a7d64821e
--- /dev/null
+++ b/graphics/door_anims/48/0.png
Binary files differ
diff --git a/graphics/door_anims/48/1.png b/graphics/door_anims/48/1.png
new file mode 100644
index 000000000..97b09977f
--- /dev/null
+++ b/graphics/door_anims/48/1.png
Binary files differ
diff --git a/graphics/door_anims/48/2.png b/graphics/door_anims/48/2.png
new file mode 100644
index 000000000..72eb0bc55
--- /dev/null
+++ b/graphics/door_anims/48/2.png
Binary files differ
diff --git a/graphics/door_anims/48/3.png b/graphics/door_anims/48/3.png
new file mode 100644
index 000000000..ea5d9843c
--- /dev/null
+++ b/graphics/door_anims/48/3.png
Binary files differ
diff --git a/graphics/door_anims/49/0.png b/graphics/door_anims/49/0.png
new file mode 100644
index 000000000..3125df9b4
--- /dev/null
+++ b/graphics/door_anims/49/0.png
Binary files differ
diff --git a/graphics/door_anims/49/1.png b/graphics/door_anims/49/1.png
new file mode 100644
index 000000000..b5b9acf88
--- /dev/null
+++ b/graphics/door_anims/49/1.png
Binary files differ
diff --git a/graphics/door_anims/49/2.png b/graphics/door_anims/49/2.png
new file mode 100644
index 000000000..6234d8928
--- /dev/null
+++ b/graphics/door_anims/49/2.png
Binary files differ
diff --git a/graphics/door_anims/50/0.png b/graphics/door_anims/50/0.png
new file mode 100644
index 000000000..47d33217a
--- /dev/null
+++ b/graphics/door_anims/50/0.png
Binary files differ
diff --git a/graphics/door_anims/50/1.png b/graphics/door_anims/50/1.png
new file mode 100644
index 000000000..1a5a8c05c
--- /dev/null
+++ b/graphics/door_anims/50/1.png
Binary files differ
diff --git a/graphics/door_anims/50/2.png b/graphics/door_anims/50/2.png
new file mode 100644
index 000000000..38242302c
--- /dev/null
+++ b/graphics/door_anims/50/2.png
Binary files differ
diff --git a/graphics/door_anims/unused_848EDEC/0_bottom.png b/graphics/door_anims/unused_848EDEC/0_bottom.png
new file mode 100644
index 000000000..51c624396
--- /dev/null
+++ b/graphics/door_anims/unused_848EDEC/0_bottom.png
Binary files differ
diff --git a/graphics/door_anims/unused_848EDEC/0_top.png b/graphics/door_anims/unused_848EDEC/0_top.png
new file mode 100644
index 000000000..1a1971336
--- /dev/null
+++ b/graphics/door_anims/unused_848EDEC/0_top.png
Binary files differ
diff --git a/graphics/door_anims/unused_848EDEC/1_bottom.png b/graphics/door_anims/unused_848EDEC/1_bottom.png
new file mode 100644
index 000000000..a3cc83feb
--- /dev/null
+++ b/graphics/door_anims/unused_848EDEC/1_bottom.png
Binary files differ
diff --git a/graphics/door_anims/unused_848EDEC/1_top.png b/graphics/door_anims/unused_848EDEC/1_top.png
new file mode 100644
index 000000000..e6c96394c
--- /dev/null
+++ b/graphics/door_anims/unused_848EDEC/1_top.png
Binary files differ
diff --git a/graphics/door_anims/unused_848EDEC/2_bottom.png b/graphics/door_anims/unused_848EDEC/2_bottom.png
new file mode 100644
index 000000000..f8466fa9c
--- /dev/null
+++ b/graphics/door_anims/unused_848EDEC/2_bottom.png
Binary files differ
diff --git a/graphics/door_anims/unused_848EDEC/2_top.png b/graphics/door_anims/unused_848EDEC/2_top.png
new file mode 100644
index 000000000..1864760e3
--- /dev/null
+++ b/graphics/door_anims/unused_848EDEC/2_top.png
Binary files differ
diff --git a/graphics/misc/8597C1C.pal b/graphics/misc/8597C1C.pal
new file mode 100644
index 000000000..c075c5ce1
--- /dev/null
+++ b/graphics/misc/8597C1C.pal
@@ -0,0 +1,7 @@
+JASC-PAL
+0100
+4
+0 0 0
+0 0 0
+57 205 255
+172 172 238
diff --git a/graphics/misc/8597C24.pal b/graphics/misc/8597C24.pal
new file mode 100644
index 000000000..5c8eed0ba
--- /dev/null
+++ b/graphics/misc/8597C24.pal
@@ -0,0 +1,9 @@
+JASC-PAL
+0100
+6
+0 0 0
+255 255 255
+98 98 98
+222 213 222
+65 139 74
+230 230 230
diff --git a/graphics/misc/interview.pal b/graphics/misc/interview.pal
new file mode 100644
index 000000000..dfe91b5de
--- /dev/null
+++ b/graphics/misc/interview.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+255 255 148
+255 197 148
+238 139 90
+189 90 41
+255 213 213
+246 180 180
+197 131 131
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+41 49 49
+98 98 98
+180 189 180
+222 213 222
+255 255 255
diff --git a/graphics/misc/interview_arrow.png b/graphics/misc/interview_arrow.png
new file mode 100644
index 000000000..1c1073d2f
--- /dev/null
+++ b/graphics/misc/interview_arrow.png
Binary files differ
diff --git a/graphics/misc/interview_buttons.png b/graphics/misc/interview_buttons.png
new file mode 100644
index 000000000..d6dfc7cbd
--- /dev/null
+++ b/graphics/misc/interview_buttons.png
Binary files differ
diff --git a/graphics/misc/interview_frame.png b/graphics/misc/interview_frame.png
new file mode 100644
index 000000000..63470e729
--- /dev/null
+++ b/graphics/misc/interview_frame.png
Binary files differ
diff --git a/graphics/misc/interview_frame_2.png b/graphics/misc/interview_frame_2.png
new file mode 100644
index 000000000..c0fbba87d
--- /dev/null
+++ b/graphics/misc/interview_frame_2.png
Binary files differ
diff --git a/graphics/misc/interview_frame_green.pal b/graphics/misc/interview_frame_green.pal
new file mode 100644
index 000000000..c64a7216f
--- /dev/null
+++ b/graphics/misc/interview_frame_green.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+189 255 139
+156 230 106
+123 180 90
+180 213 255
+139 180 230
+115 139 172
+0 0 0
+255 131 131
+238 82 82
+255 238 180
+255 255 213
+115 115 115
+180 189 180
+222 213 222
+255 255 255
diff --git a/graphics/misc/interview_frame_orange.pal b/graphics/misc/interview_frame_orange.pal
new file mode 100644
index 000000000..165bad8de
--- /dev/null
+++ b/graphics/misc/interview_frame_orange.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+255 189 115
+255 139 57
+205 98 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 238 180
+255 255 213
+115 115 115
+180 189 180
+222 213 222
+255 255 255
diff --git a/graphics/misc/interview_triangle_cursor.png b/graphics/misc/interview_triangle_cursor.png
new file mode 100644
index 000000000..a4a3f0bb1
--- /dev/null
+++ b/graphics/misc/interview_triangle_cursor.png
Binary files differ
diff --git a/include/field_camera.h b/include/field_camera.h
index a8559e1c2..f68c67854 100644
--- a/include/field_camera.h
+++ b/include/field_camera.h
@@ -24,5 +24,6 @@ extern u16 gUnknown_03005DE8;
void DrawWholeMapView(void);
void CurrentMapDrawMetatileAt(int x, int y);
+void DrawDoorMetatileAt(int x, int y, u16 *arr);
#endif //GUARD_FIELD_CAMERA_H
diff --git a/include/field_door.h b/include/field_door.h
index f1dfc551d..8b4955cac 100644
--- a/include/field_door.h
+++ b/include/field_door.h
@@ -1,6 +1,21 @@
#ifndef GUARD_FIELDDOOR_H
#define GUARD_FIELDDOOR_H
+struct DoorGraphics
+{
+ u16 metatileNum;
+ u8 sound;
+ u8 size;
+ const void *tiles;
+ const void *palette;
+};
+
+struct DoorAnimFrame
+{
+ u8 time;
+ u16 offset;
+};
+
void FieldSetDoorOpened(u32, u32);
void FieldSetDoorClosed(u32, u32);
s8 FieldAnimateDoorClose(u32, u32);
diff --git a/ld_script.txt b/ld_script.txt
index f4492b499..0618bcc55 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -132,7 +132,7 @@ SECTIONS {
asm/fieldmap.o(.text);
src/metatile_behavior.o(.text);
asm/field_camera.o(.text);
- asm/field_door.o(.text);
+ src/field_door.o(.text);
asm/field_player_avatar.o(.text);
src/field_map_obj.o(.text);
asm/field_ground_effect.o(.text);
@@ -441,8 +441,7 @@ SECTIONS {
data/maps.o(.rodata);
data/fieldmap.o(.rodata);
src/metatile_behavior.o(.rodata);
- data/rom_8486FEC.o(.rodata);
- data/field_door.o(.rodata);
+ src/field_door.o(.rodata);
data/field_player_avatar.o(.rodata);
data/field_map_obj.o(.rodata);
data/field_ground_effect.o(.rodata);
@@ -555,7 +554,8 @@ SECTIONS {
data/intro_credits_graphics.o(.rodata);
src/evolution_graphics.o(.rodata);
src/bard_music.o(.rodata);
- data/data_860A4AC.o(.rodata);
+ data/battle_link_817C95C.o(.rodata);
+ data/pokemon_animation.o(.rodata);
src/battle_controller_recorded_opponent.o(.rodata);
src/battle_controller_recorded_player.o(.rodata);
src/battle_dome_cards.o(.rodata);
diff --git a/src/field_door.c b/src/field_door.c
new file mode 100644
index 000000000..f73c6bb55
--- /dev/null
+++ b/src/field_door.c
@@ -0,0 +1,898 @@
+#include "global.h"
+#include "field_door.h"
+#include "field_camera.h"
+#include "fieldmap.h"
+#include "metatile_behavior.h"
+#include "event_data.h"
+#include "constants/songs.h"
+#include "constants/flags.h"
+#include "constants/maps.h"
+#include "task.h"
+
+bool8 sub_808A964(void);
+
+const u8 DoorAnimTiles_04[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/04/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/04/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/04/2.4bpp"),
+};
+
+// TODO: Make these blank palette includes?
+asm(".space 32");
+
+const u8 DoorAnimTiles_05[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/05/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/05/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/05/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_08[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/08/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/08/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/08/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_15[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/15/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/15/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/15/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_16[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/16/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/16/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/16/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_00[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/00/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/00/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/00/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_01[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/01/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/01/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/01/2.4bpp"),
+};
+
+const u8 DoorAnimTiles_02[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/02/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/02/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/02/2.4bpp"),
+};
+
+const u8 DoorAnimTiles_03[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/03/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/03/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/03/2.4bpp"),
+};
+
+const u8 DoorAnimTiles_06[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/06/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/06/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/06/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_07[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/07/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/07/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/07/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_09[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/09/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/09/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/09/2.4bpp"),
+};
+
+asm(".space 0x5900");
+
+const u8 DoorAnimTiles_UnusedTops[][0x40] =
+{
+ INCBIN_U8("graphics/door_anims/unused_848EDEC/0_top.4bpp"),
+ INCBIN_U8("graphics/door_anims/unused_848EDEC/1_top.4bpp"),
+ INCBIN_U8("graphics/door_anims/unused_848EDEC/2_top.4bpp"),
+};
+
+asm(".space 0x140");
+
+const u8 DoorAnimTiles_UnusedBottoms[][0x40] =
+{
+ INCBIN_U8("graphics/door_anims/unused_848EDEC/0_bottom.4bpp"),
+ INCBIN_U8("graphics/door_anims/unused_848EDEC/1_bottom.4bpp"),
+ INCBIN_U8("graphics/door_anims/unused_848EDEC/2_bottom.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_10[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/10/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/10/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/10/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_11[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/11/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/11/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/11/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_12[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/12/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/12/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/12/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_13[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/13/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/13/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/13/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_14[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/14/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/14/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/14/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_17[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/17/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/17/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/17/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_18[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/18/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/18/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/18/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_19[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/19/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/19/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/19/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_20[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/20/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/20/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/20/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_21[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/21/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/21/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/21/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_22[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/22/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/22/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/22/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_23[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/23/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/23/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/23/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_24[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/24/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/24/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/24/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_25[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/25/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/25/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/25/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_26[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/26/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/26/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/26/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_27[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/27/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/27/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/27/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_28[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/28/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/28/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/28/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_29[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/29/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/29/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/29/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_30[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/30/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/30/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/30/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_31[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/31/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/31/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/31/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_32[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/32/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/32/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/32/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_33[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/33/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/33/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/33/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_34[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/34/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/34/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/34/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_35[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/35/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/35/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/35/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_36[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/36/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/36/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/36/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_37[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/37/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/37/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/37/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_38[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/38/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/38/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/38/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_39[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/39/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/39/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/39/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_40[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/40/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/40/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/40/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_41[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/41/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/41/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/41/2.4bpp"),
+};
+
+const u8 DoorAnimTiles_42[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/42/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/42/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/42/2.4bpp"),
+ INCBIN_U8("graphics/door_anims/42/3.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_43[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/43/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/43/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/43/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_44[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/44/0_left.4bpp"),
+ INCBIN_U8("graphics/door_anims/44/0_right.4bpp"),
+ INCBIN_U8("graphics/door_anims/44/1_left.4bpp"),
+ INCBIN_U8("graphics/door_anims/44/1_right.4bpp"),
+ INCBIN_U8("graphics/door_anims/44/2_left.4bpp"),
+ INCBIN_U8("graphics/door_anims/44/2_right.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_45[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/45/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/45/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/45/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_46[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/46/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/46/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/46/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_47[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/47/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/47/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/47/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_48[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/48/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/48/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/48/2.4bpp"),
+ INCBIN_U8("graphics/door_anims/48/3.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_49[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/49/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/49/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/49/2.4bpp"),
+};
+
+asm(".space 32");
+
+const u8 DoorAnimTiles_50[][0x100] =
+{
+ INCBIN_U8("graphics/door_anims/50/0.4bpp"),
+ INCBIN_U8("graphics/door_anims/50/1.4bpp"),
+ INCBIN_U8("graphics/door_anims/50/2.4bpp"),
+};
+
+asm(".space 32");
+
+static const struct DoorAnimFrame gDoorOpenAnimFrames[] =
+{
+ {4, -1},
+ {4, 0},
+ {4, 0x100},
+ {4, 0x200},
+ {0, 0},
+};
+
+static const struct DoorAnimFrame gDoorCloseAnimFrames[] =
+{
+ {4, 0x200},
+ {4, 0x100},
+ {4, 0},
+ {4, -1},
+ {0, 0},
+};
+
+static const struct DoorAnimFrame gBigDoorOpenAnimFrames[] =
+{
+ {4, -1},
+ {4, 0},
+ {4, 0x200},
+ {4, 0x400},
+ {0, 0},
+};
+
+static const struct DoorAnimFrame gBigDoorCloseAnimFrames[] =
+{
+ {4, 0x400},
+ {4, 0x200},
+ {4, 0},
+ {4, -1},
+ {0, 0},
+};
+
+const u8 DoorAnimPalettes_8496FDC[] = {1, 1, 1, 1, 1, 1, 1, 1}; // door 00
+const u8 DoorAnimPalettes_8496FE4[] = {1, 1, 1, 1, 1, 1, 1, 1}; // door 01
+const u8 DoorAnimPalettes_8496FEC[] = {5, 5, 5, 5, 5, 5, 5, 5}; // door 02
+const u8 DoorAnimPalettes_8496FF4[] = {0, 0, 1, 1, 1, 1, 1, 1}; // door 03
+const u8 DoorAnimPalettes_8496FFC[] = {10, 10, 6, 6, 6, 6, 6, 6}; // door 04
+const u8 DoorAnimPalettes_8497004[] = {8, 8, 8, 8, 8, 8, 8, 8}; // door 05
+const u8 DoorAnimPalettes_849700C[] = {11, 11, 11, 11, 11, 11, 11, 11}; // door 06
+const u8 DoorAnimPalettes_8497014[] = {10, 10, 10, 10, 10, 10, 10, 10}; // door 07
+const u8 DoorAnimPalettes_849701C[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 08
+const u8 DoorAnimPalettes_8497024[] = {8, 8, 8, 8, 8, 8, 8, 8}; // door 09
+const u8 DoorAnimPalettes_849702C[] = {10, 10, 9, 9, 9, 9, 9, 9}; // door 10
+const u8 DoorAnimPalettes_8497034[] = {9, 9, 1, 1, 1, 1, 1, 1}; // door 11
+const u8 DoorAnimPalettes_849703C[] = {8, 8, 8, 8, 8, 8, 8, 8}; // door 12
+const u8 DoorAnimPalettes_8497044[] = {9, 9, 9, 9, 9, 9, 9, 9}; // door 13
+const u8 DoorAnimPalettes_849704C[] = {6, 6, 6, 6, 6, 6, 6, 6}; // door 14
+const u8 DoorAnimPalettes_8497054[] = {6, 6, 6, 6, 6, 6, 6, 6}; // door 15
+const u8 DoorAnimPalettes_849705C[] = {0, 0, 5, 5, 5, 5, 5, 5}; // door 16
+const u8 DoorAnimPalettes_8497064[] = {6, 6, 1, 1, 1, 1, 1, 1}; // door 17
+const u8 DoorAnimPalettes_849706C[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 18
+const u8 DoorAnimPalettes_8497074[] = {6, 6, 5, 5, 5, 5, 5, 5}; // door 19
+const u8 DoorAnimPalettes_849707C[] = {5, 5, 5, 5, 5, 5, 5, 5}; // door 20
+const u8 DoorAnimPalettes_8497084[] = {1, 1, 1, 1, 1, 1, 1, 1}; // door 21
+const u8 DoorAnimPalettes_849708C[] = {6, 6, 6, 6, 6, 6, 6, 6}; // door 22
+const u8 DoorAnimPalettes_8497094[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 23
+const u8 DoorAnimPalettes_849709C[] = {5, 5, 5, 5, 5, 5, 5, 5}; // door 24
+const u8 DoorAnimPalettes_84970A4[] = {9, 9, 9, 9, 9, 9, 9, 9}; // door 25
+const u8 DoorAnimPalettes_84970AC[] = {8, 8, 8, 8, 8, 8, 8, 8}; // door 26
+const u8 DoorAnimPalettes_84970B4[] = {6, 6, 6, 6, 6, 6, 6, 6}; // door 27
+const u8 DoorAnimPalettes_84970BC[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 28
+const u8 DoorAnimPalettes_84970C4[] = {11, 11, 7, 7, 7, 7, 7, 7}; // door 29
+const u8 DoorAnimPalettes_84970CC[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 30
+const u8 DoorAnimPalettes_84970D4[] = {6, 6, 7, 7, 7, 7, 7, 7}; // door 31
+const u8 DoorAnimPalettes_84970DC[] = {9, 9, 9, 9, 9, 9, 9, 9}; // door 32
+const u8 DoorAnimPalettes_84970E4[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 33
+const u8 DoorAnimPalettes_84970EC[] = {9, 9, 9, 9, 9, 9, 9, 9}; // door 34
+const u8 DoorAnimPalettes_84970F4[] = {1, 1, 1, 1, 1, 1, 1, 1}; // door 35
+const u8 DoorAnimPalettes_84970FC[] = {9, 9, 9, 9, 9, 9, 9, 9}; // door 36
+const u8 DoorAnimPalettes_8497104[] = {0, 0, 0, 0, 0, 0, 0, 0}; // door 37
+const u8 DoorAnimPalettes_849710C[] = {5, 5, 5, 5, 5, 5, 5, 5}; // door 38
+const u8 DoorAnimPalettes_8497114[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 39
+const u8 DoorAnimPalettes_849711C[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 40
+const u8 DoorAnimPalettes_8497124[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 41
+const u8 DoorAnimPalettes_849712C[] = {1, 1, 1, 1, 1, 1, 1, 1}; // doors 42, 43, and 44
+const u8 DoorAnimPalettes_8497134[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 45
+const u8 DoorAnimPalettes_849713C[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 46
+const u8 DoorAnimPalettes_8497144[] = {1, 1, 1, 1, 1, 1, 1, 1}; // unused
+const u8 DoorAnimPalettes_849714C[] = {1, 1, 1, 1, 1, 1, 1, 1}; // doors 47 and 48
+const u8 DoorAnimPalettes_8497154[] = {9, 9, 7, 7, 7, 7, 7, 7}; // door 49
+const u8 DoorAnimPalettes_849715C[] = {9, 9, 9, 9, 9, 9, 9, 9}; // door 50
+const u8 DoorAnimPalettes_8497164[] = {7, 7, 7, 7, 7, 7, 7, 7}; // door 51
+const u8 DoorAnimPalettes_849716C[] = {9, 9, 7, 7, 7, 7, 7, 7}; // door 52
+
+static const struct DoorGraphics gDoorAnimGraphicsTable[] =
+{
+ {0x021, 0, 1, DoorAnimTiles_00, DoorAnimPalettes_8496FDC}, // door 00
+ {0x061, 1, 1, DoorAnimTiles_01, DoorAnimPalettes_8496FE4}, // door 01
+ {0x1CD, 1, 1, DoorAnimTiles_02, DoorAnimPalettes_8496FEC}, // door 02
+ {0x041, 1, 1, DoorAnimTiles_03, DoorAnimPalettes_8496FF4}, // door 03
+ {0x248, 0, 1, DoorAnimTiles_04, DoorAnimPalettes_8496FFC}, // door 04
+ {0x249, 0, 1, DoorAnimTiles_05, DoorAnimPalettes_8497004}, // door 05
+ {0x22F, 0, 1, DoorAnimTiles_06, DoorAnimPalettes_849700C}, // door 06
+ {0x21F, 0, 1, DoorAnimTiles_07, DoorAnimPalettes_8497014}, // door 07
+ {0x2A5, 0, 1, DoorAnimTiles_08, DoorAnimPalettes_849701C}, // door 08
+ {0x287, 0, 1, DoorAnimTiles_09, DoorAnimPalettes_849702C}, // door 09
+ {0x2AC, 0, 1, DoorAnimTiles_10, DoorAnimPalettes_849706C}, // door 10
+ {0x3A1, 0, 1, DoorAnimTiles_11, DoorAnimPalettes_8497074}, // door 11
+ {0x2DC, 0, 1, DoorAnimTiles_12, DoorAnimPalettes_8497064}, // door 12
+ {0x225, 0, 1, DoorAnimTiles_13, DoorAnimPalettes_849705C}, // door 13
+ {0x1DB, 1, 1, DoorAnimTiles_14, DoorAnimPalettes_8497084}, // door 14
+ {0x246, 0, 1, DoorAnimTiles_15, DoorAnimPalettes_8497024}, // door 15
+ {0x28E, 0, 1, DoorAnimTiles_16, DoorAnimPalettes_849707C}, // door 16
+ {0x2A1, 0, 1, DoorAnimTiles_17, DoorAnimPalettes_8497034}, // door 17
+ {0x21C, 0, 1, DoorAnimTiles_18, DoorAnimPalettes_849704C}, // door 18
+ {0x21E, 0, 1, DoorAnimTiles_19, DoorAnimPalettes_8497054}, // door 19
+ {0x21D, 1, 1, DoorAnimTiles_20, DoorAnimPalettes_849703C}, // door 20
+ {0x21A, 0, 1, DoorAnimTiles_21, DoorAnimPalettes_8497044}, // door 21
+ {0x224, 0, 1, DoorAnimTiles_22, DoorAnimPalettes_849708C}, // door 22
+ {0x289, 0, 1, DoorAnimTiles_23, DoorAnimPalettes_8497094}, // door 23
+ {0x30C, 1, 1, DoorAnimTiles_24, DoorAnimPalettes_849709C}, // door 24
+ {0x32D, 1, 1, DoorAnimTiles_25, DoorAnimPalettes_84970A4}, // door 25
+ {0x2ED, 1, 1, DoorAnimTiles_26, DoorAnimPalettes_84970AC}, // door 26
+ {0x264, 1, 1, DoorAnimTiles_27, DoorAnimPalettes_84970B4}, // door 27
+ {0x22B, 0, 1, DoorAnimTiles_28, DoorAnimPalettes_84970BC}, // door 28
+ {0x2F7, 0, 1, DoorAnimTiles_29, DoorAnimPalettes_84970C4}, // door 29
+ {0x297, 0, 1, DoorAnimTiles_30, DoorAnimPalettes_84970CC}, // door 30
+ {0x285, 1, 1, DoorAnimTiles_31, DoorAnimPalettes_84970D4}, // door 31
+ {0x25D, 1, 1, DoorAnimTiles_32, DoorAnimPalettes_84970DC}, // door 32
+ {0x20E, 1, 1, DoorAnimTiles_33, DoorAnimPalettes_84970E4}, // door 33
+ {0x3B0, 1, 1, DoorAnimTiles_34, DoorAnimPalettes_84970EC}, // door 34
+ {0x28A, 1, 1, DoorAnimTiles_35, DoorAnimPalettes_84970F4}, // door 35
+ {0x263, 1, 1, DoorAnimTiles_36, DoorAnimPalettes_84970FC}, // door 36
+ {0x329, 1, 1, DoorAnimTiles_37, DoorAnimPalettes_8497104}, // door 37
+ {0x291, 0, 1, DoorAnimTiles_38, DoorAnimPalettes_849710C}, // door 38
+ {0x21B, 2, 1, DoorAnimTiles_39, DoorAnimPalettes_8497114}, // door 39
+ {0x209, 1, 1, DoorAnimTiles_40, DoorAnimPalettes_849711C}, // door 40
+ {0x219, 0, 1, DoorAnimTiles_41, DoorAnimPalettes_8497124}, // door 41
+ {0x393, 1, 1, DoorAnimTiles_42, DoorAnimPalettes_849712C}, // door 42
+ {0x3D4, 1, 1, DoorAnimTiles_42, DoorAnimPalettes_849712C}, // door 43
+ {0x36C, 1, 1, DoorAnimTiles_42, DoorAnimPalettes_849712C}, // door 44
+ {0x25E, 1, 1, DoorAnimTiles_43, DoorAnimPalettes_8497134}, // door 45
+ {0x2AD, 1, 2, DoorAnimTiles_44, DoorAnimPalettes_849713C}, // door 46
+ {0x3FC, 0, 1, DoorAnimTiles_45, DoorAnimPalettes_849714C}, // door 47
+ {0x396, 1, 1, DoorAnimTiles_46, DoorAnimPalettes_849714C}, // door 48
+ {0x20A, 1, 1, DoorAnimTiles_47, DoorAnimPalettes_8497154}, // door 49
+ {0x26B, 1, 1, DoorAnimTiles_48, DoorAnimPalettes_849715C}, // door 50
+ {0x32C, 1, 1, DoorAnimTiles_49, DoorAnimPalettes_8497164}, // door 51
+ {0x383, 1, 1, DoorAnimTiles_50, DoorAnimPalettes_849716C}, // door 52
+ {0, 0, 0, NULL, NULL},
+};
+
+static void CopyDoorTilesToVram(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frame)
+{
+ if (gfx->size == 2)
+ CpuFastSet(gfx->tiles + frame->offset, (void *)(VRAM + 0x7E00), 0x80);
+ else
+ CpuFastSet(gfx->tiles + frame->offset, (void *)(VRAM + 0x7F00), 0x40);
+}
+
+static void door_build_blockdef(u16 *a, u16 b, const u8 *c)
+{
+ int i;
+ u16 unk;
+
+ for (i = 0; i < 4; i++)
+ {
+ unk = *(c++) << 12;
+ a[i] = unk | (b + i);
+ }
+ for (; i < 8; i++)
+ {
+ unk = *(c++) << 12;
+ a[i] = unk;
+ }
+}
+
+static void DrawCurrentDoorAnimFrame(const struct DoorGraphics *gfx, u32 x, u32 y, const u8 *pal)
+{
+ u16 arr[24];
+
+ if (gfx->size == 2)
+ {
+ door_build_blockdef(&arr[8], 0x3F0, pal);
+ DrawDoorMetatileAt(x, y - 1, &arr[8]);
+ door_build_blockdef(&arr[8], 0x3F4, pal + 4);
+ DrawDoorMetatileAt(x, y, &arr[8]);
+ door_build_blockdef(&arr[8], 0x3F8, pal);
+ DrawDoorMetatileAt(x + 1, y - 1, &arr[8]);
+ door_build_blockdef(&arr[8], 0x3FC, pal + 4);
+ DrawDoorMetatileAt(x + 1, y, &arr[8]);
+ }
+ else
+ {
+ door_build_blockdef(&arr[0], 0x3F8, pal);
+ DrawDoorMetatileAt(x, y - 1, &arr[0]);
+ door_build_blockdef(&arr[0], 0x3FC, pal + 4);
+ DrawDoorMetatileAt(x, y, &arr[0]);
+ }
+}
+
+static void DrawClosedDoorTiles(const struct DoorGraphics *gfx, u32 x, u32 y)
+{
+ CurrentMapDrawMetatileAt(x, y - 1);
+ CurrentMapDrawMetatileAt(x, y);
+
+ if (gfx->size == 2)
+ {
+ CurrentMapDrawMetatileAt(x + 1, y - 1);
+ CurrentMapDrawMetatileAt(x + 1, y);
+ }
+}
+
+static void DrawDoor(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frame, u32 x, u32 y)
+{
+ if (frame->offset == 0xFFFF)
+ {
+ DrawClosedDoorTiles(gfx, x, y);
+ if (sub_808A964())
+ DrawClosedDoorTiles(gfx, gSpecialVar_0x8004 + 7, gSpecialVar_0x8005 + 7);
+ }
+ else
+ {
+ CopyDoorTilesToVram(gfx, frame);
+ DrawCurrentDoorAnimFrame(gfx, x, y, gfx->palette);
+ if (sub_808A964())
+ DrawCurrentDoorAnimFrame(gfx, gSpecialVar_0x8004 + 7, gSpecialVar_0x8005 + 7, gfx->palette);
+ }
+}
+
+enum
+{
+ TD_FRAMELIST = 0,
+ TD_GFX = 2,
+ TD_FRAME = 4,
+ TD_COUNTER,
+ TD_X,
+ TD_Y
+};
+
+static bool32 sub_808A5F0(struct DoorGraphics *gfx, struct DoorAnimFrame *frames, s16 *taskData)
+{
+ if (taskData[TD_COUNTER] == 0)
+ DrawDoor(gfx, &frames[taskData[TD_FRAME]], taskData[TD_X], taskData[TD_Y]);
+ if (taskData[TD_COUNTER] == frames[taskData[TD_FRAME]].time)
+ {
+ taskData[TD_COUNTER] = 0;
+ taskData[TD_FRAME]++;
+ if (frames[taskData[TD_FRAME]].time == 0)
+ return FALSE;
+ else
+ return TRUE;
+ }
+ taskData[TD_COUNTER]++;
+ return TRUE;
+}
+
+static void Task_AnimateDoor(u8 taskId)
+{
+ u16 *taskData = gTasks[taskId].data;
+ struct DoorAnimFrame *frames = (struct DoorAnimFrame *)(taskData[TD_FRAMELIST] << 16 | taskData[TD_FRAMELIST + 1]);
+ struct DoorGraphics *gfx = (struct DoorGraphics *)(taskData[TD_GFX] << 16 | taskData[TD_GFX + 1]);
+
+ if (sub_808A5F0(gfx, frames, taskData) == FALSE)
+ DestroyTask(taskId);
+}
+
+static const struct DoorAnimFrame *GetLastDoorFrame(const struct DoorAnimFrame *frame, const void *unused)
+{
+ while (frame->time != 0)
+ frame++;
+ return frame - 1;
+}
+
+static const struct DoorGraphics *GetDoorGraphics(const struct DoorGraphics *gfx, u16 metatileNum)
+{
+ while (gfx->tiles != NULL)
+ {
+ if (gfx->metatileNum == metatileNum)
+ return gfx;
+ gfx++;
+ }
+ return NULL;
+}
+
+static s8 StartDoorAnimationTask(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, u32 x, u32 y)
+{
+ if (FuncIsActiveTask(Task_AnimateDoor) == TRUE)
+ return -1;
+ else
+ {
+ u8 taskId = CreateTask(Task_AnimateDoor, 0x50);
+ s16 *taskData = gTasks[taskId].data;
+
+ taskData[TD_X] = x;
+ taskData[TD_Y] = y;
+
+ taskData[TD_FRAMELIST + 1] = (u32)frames;
+ taskData[TD_FRAMELIST] = (u32)frames >> 16;
+
+ taskData[TD_GFX + 1] = (u32)gfx;
+ taskData[TD_GFX] = (u32)gfx >> 16;
+
+ return taskId;
+ }
+}
+
+static void DrawClosedDoor(const struct DoorGraphics *gfx, u32 x, u32 y)
+{
+ DrawClosedDoorTiles(gfx, x, y);
+}
+
+static void DrawOpenedDoor(const struct DoorGraphics *gfx, u32 x, u32 y)
+{
+ gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y));
+ if (gfx != NULL)
+ DrawDoor(gfx, GetLastDoorFrame(gDoorOpenAnimFrames, gDoorOpenAnimFrames), x, y);
+}
+
+static s8 StartDoorOpenAnimation(const struct DoorGraphics *gfx, u32 x, u32 y)
+{
+ gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y));
+ if (gfx == NULL)
+ {
+ return -1;
+ }
+ else
+ {
+ if (gfx->size == 2)
+ return StartDoorAnimationTask(gfx, gBigDoorOpenAnimFrames, x, y);
+ else
+ return StartDoorAnimationTask(gfx, gDoorOpenAnimFrames, x, y);
+ }
+}
+
+static s8 StartDoorCloseAnimation(const struct DoorGraphics *gfx, u32 x, u32 y)
+{
+ gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y));
+ if (gfx == NULL)
+ return -1;
+ else
+ return StartDoorAnimationTask(gfx, gDoorCloseAnimFrames, x, y);
+}
+
+static s8 cur_mapdata_get_door_x2_at(const struct DoorGraphics *gfx, u32 x, u32 y)
+{
+ gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y));
+ if (gfx == NULL)
+ return -1;
+ else
+ return gfx->sound;
+}
+
+void unref_sub_808A83C(u32 x, u32 y)
+{
+ StartDoorOpenAnimation(gDoorAnimGraphicsTable, x, y);
+}
+
+void FieldSetDoorOpened(u32 x, u32 y)
+{
+ if (MetatileBehavior_IsDoor(MapGridGetMetatileBehaviorAt(x, y)))
+ DrawOpenedDoor(gDoorAnimGraphicsTable, x, y);
+}
+
+void FieldSetDoorClosed(u32 x, u32 y)
+{
+ if (MetatileBehavior_IsDoor(MapGridGetMetatileBehaviorAt(x, y)))
+ DrawClosedDoor(gDoorAnimGraphicsTable, x, y);
+}
+
+s8 FieldAnimateDoorClose(u32 x, u32 y)
+{
+ if (!MetatileBehavior_IsDoor(MapGridGetMetatileBehaviorAt(x, y)))
+ return -1;
+ else
+ return StartDoorCloseAnimation(gDoorAnimGraphicsTable, x, y);
+}
+
+s8 FieldAnimateDoorOpen(u32 x, u32 y)
+{
+ if (!MetatileBehavior_IsDoor(MapGridGetMetatileBehaviorAt(x, y)))
+ return -1;
+ else
+ return StartDoorOpenAnimation(gDoorAnimGraphicsTable, x, y);
+}
+
+bool8 FieldIsDoorAnimationRunning(void)
+{
+ return FuncIsActiveTask(Task_AnimateDoor);
+}
+
+u32 GetDoorSoundEffect(u32 x, u32 y)
+{
+ int sound = cur_mapdata_get_door_x2_at(gDoorAnimGraphicsTable, x, y);
+
+ if (sound == 0)
+ return SE_DOOR;
+ else if (sound == 1)
+ return SE_JIDO_DOA;
+ else if (sound == 2)
+ return SE_TU_SAA;
+ else
+ return SE_DOOR;
+}
+
+bool8 sub_808A964(void)
+{
+ if (FlagGet(FLAG_SPECIAL_FLAG_0x4002))
+ {
+ if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR_2) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR_2))
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}