summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2018-01-07 18:47:05 -0600
committerDiegoisawesome <diego@domoreaweso.me>2018-01-07 18:47:05 -0600
commit75f9c1650420a5d6a0e8130f471481ab19e27a77 (patch)
tree77a75a4277cd12d19c7f72977e105fcefe271a23
parenta11c65ff1ac380cd213b26d0bb7a2787936b33f9 (diff)
parent75c359e3001badee4eaaf496255d3a51bdcb124e (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald
-rw-r--r--.gitignore3
-rw-r--r--INSTALL.md19
-rw-r--r--README.md4
-rw-r--r--asm/battle_anim_80A9C70.s2
-rw-r--r--asm/battle_anim_80FE840.s24
-rwxr-xr-xasm/battle_anim_815A0D4.s12
-rw-r--r--asm/battle_anim_sound_tasks.s6
-rwxr-xr-xasm/battle_frontier_1.s2
-rwxr-xr-xasm/battle_frontier_2.s12
-rw-r--r--asm/bike.s2199
-rw-r--r--asm/contest.s4
-rw-r--r--asm/easy_chat.s6
-rw-r--r--asm/field_control_avatar.s2
-rw-r--r--asm/field_effect.s12
-rw-r--r--asm/field_player_avatar.s176
-rw-r--r--asm/field_screen.s20
-rw-r--r--asm/field_specials.s10
-rw-r--r--asm/field_tasks.s2
-rw-r--r--asm/fldeff_80F9BCC.s6
-rwxr-xr-xasm/fldeff_cut.s6
-rw-r--r--asm/fldeff_flash.s4
-rw-r--r--asm/fldeff_strength.s2
-rw-r--r--asm/fldeff_sweetscent.s2
-rw-r--r--asm/fldeff_teleport.s84
-rw-r--r--asm/hof_pc.s2
-rw-r--r--asm/intro.s58
-rwxr-xr-xasm/item_menu.s8
-rw-r--r--asm/item_use.s2
-rw-r--r--asm/link.s6
-rw-r--r--asm/macros/battle_ai_script.inc619
-rw-r--r--asm/macros/battle_anim_script.inc268
-rwxr-xr-xasm/menu.s8
-rw-r--r--asm/mon_markings.s4
-rw-r--r--asm/naming_screen.s4
-rw-r--r--asm/overworld.s18
-rwxr-xr-xasm/party_menu.s20
-rw-r--r--asm/pokedex.s52
-rw-r--r--asm/pokedex_area_screen.s2
-rwxr-xr-xasm/pokemon_icon.s18
-rwxr-xr-xasm/pokemon_storage_system.s8
-rwxr-xr-xasm/pokemon_summary_screen.s2
-rwxr-xr-xasm/pokenav.s28
-rwxr-xr-xasm/rayquaza_scene.s68
-rw-r--r--asm/rom6.s8
-rw-r--r--asm/rotating_gate.s4
-rw-r--r--asm/roulette.s2
-rw-r--r--asm/slot_machine.s8
-rw-r--r--asm/trade.s10
-rw-r--r--asm/trainer_card.s10
-rwxr-xr-xasm/use_pokeblock.s10
-rw-r--r--build_tools.sh8
-rw-r--r--data/battle_ai_scripts.s3464
-rw-r--r--data/battle_anim_80A9C70.s3
-rw-r--r--data/battle_anim_80FE840.s6
-rw-r--r--data/battle_anim_815A0D4.s20
-rw-r--r--data/battle_anim_8170478.s49
-rw-r--r--data/battle_anim_scripts.s10937
-rw-r--r--data/battle_anims.s2
-rw-r--r--data/battle_frontier_1.s2
-rw-r--r--data/battle_scripts_1.s1
-rw-r--r--data/bike.s58
-rw-r--r--data/contest.s2
-rw-r--r--data/easy_chat.s10
-rw-r--r--data/graphics.s4800
-rw-r--r--data/graphics/pokemon/icon_palette_indices.inc442
-rw-r--r--data/graphics/pokemon/icon_palette_table.inc11
-rw-r--r--data/graphics/pokemon/icon_table.inc442
-rw-r--r--data/item_menu_icons.s19
-rw-r--r--data/party_menu.s65
-rw-r--r--data/pokedex.s219
-rw-r--r--data/pokedex_area_screen.s2
-rw-r--r--data/pokedex_entries.inc460
-rw-r--r--data/pokemon_icon.s27
-rw-r--r--data/pokemon_storage_system.s149
-rw-r--r--data/pokemon_summary_screen.s33
-rw-r--r--data/pokenav.s1606
-rw-r--r--data/rayquaza_scene.s160
-rw-r--r--data/record_mixing.s2
-rw-r--r--data/reset_rtc_screen.s8
-rw-r--r--data/rom_8525F58.s18
-rw-r--r--data/save.s28
-rw-r--r--data/script_menu.s2
-rw-r--r--data/script_pokemon_util_80F87D8.s4
-rw-r--r--data/slot_machine.s33
-rw-r--r--data/smokescreen.s6
-rw-r--r--data/specials.inc8
-rw-r--r--data/start_menu.s29
-rw-r--r--data/starter_choose.s8
-rw-r--r--data/strings.s61
-rw-r--r--data/text_window.s169
-rw-r--r--data/trade.s10
-rw-r--r--data/trainer_card.s202
-rw-r--r--data/trainer_money.inc112
-rw-r--r--data/type_effectiveness.inc192
-rw-r--r--data/unk_sprite_file.s30
-rw-r--r--data/use_pokeblock.s9
-rw-r--r--data/wild_encounter.s8
-rwxr-xr-xgraphics/battle_anims/backgrounds/00.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/00.pngbin0 -> 1021 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/02.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/02.pngbin0 -> 2426 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/03.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/03.pngbin0 -> 418 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/04.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/04.pngbin0 -> 2672 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/05.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/06.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/07.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/07.pngbin0 -> 373 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/08.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/09.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/09.pngbin0 -> 964 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/10.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/11.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/11.pngbin0 -> 1714 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/12.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/12.pngbin0 -> 2504 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/13.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/14.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/15.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/15.pngbin0 -> 1859 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/16.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/16.pngbin0 -> 634 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/17.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/17.pngbin0 -> 388 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/18.pal19
-rwxr-xr-xgraphics/battle_anims/backgrounds/20.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/20.pngbin0 -> 1998 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/21.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/21.pngbin0 -> 672 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/22.pal19
-rwxr-xr-xgraphics/battle_anims/backgrounds/24.pal19
-rwxr-xr-xgraphics/battle_anims/backgrounds/attract.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/attract.pngbin0 -> 2150 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/fog.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/sandstorm_brew.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/sandstorm_brew.pngbin0 -> 997 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/scary_face.pngbin0 -> 428 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/scary_face_contest.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/scary_face_opponent.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/scary_face_player.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/water.pngbin0 -> 3793 bytes
-rwxr-xr-xgraphics/battle_anims/backgrounds/water_muddy.pal19
-rwxr-xr-xgraphics/battle_anims/masks/cure_bubbles.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/masks/cure_bubbles.pngbin0 -> 336 bytes
-rwxr-xr-xgraphics/battle_anims/masks/curse.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/masks/curse.pngbin0 -> 138 bytes
-rwxr-xr-xgraphics/battle_anims/masks/metal_shine.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/masks/metal_shine.pngbin0 -> 183 bytes
-rwxr-xr-xgraphics/battle_anims/masks/morning_sun.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/masks/morning_sun.pngbin0 -> 188 bytes
-rwxr-xr-xgraphics/battle_anims/masks/stat.pngbin0 -> 430 bytes
-rwxr-xr-xgraphics/battle_anims/masks/stat1.pal19
-rwxr-xr-xgraphics/battle_anims/masks/stat2.pal19
-rwxr-xr-xgraphics/battle_anims/masks/stat3.pal19
-rwxr-xr-xgraphics/battle_anims/masks/stat4.pal19
-rwxr-xr-xgraphics/battle_anims/masks/stat5.pal19
-rwxr-xr-xgraphics/battle_anims/masks/stat6.pal19
-rwxr-xr-xgraphics/battle_anims/masks/stat7.pal19
-rwxr-xr-xgraphics/battle_anims/masks/stat8.pal19
-rwxr-xr-xgraphics/battle_anims/masks/stat_tilemap_1.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/masks/stat_tilemap_2.bin1
-rwxr-xr-xgraphics/battle_anims/masks/unknown_C2EA50.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/masks/unknown_C2EA50.pngbin0 -> 175 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/000.pngbin0 -> 223 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/001.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/001_0.pngbin0 -> 178 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/001_1.pngbin0 -> 198 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/002.pngbin0 -> 251 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/003.pngbin0 -> 197 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/004.pngbin0 -> 233 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/005.pngbin0 -> 200 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/006.pngbin0 -> 275 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/007.pngbin0 -> 334 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/008.pngbin0 -> 147 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/009.pngbin0 -> 635 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/010.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/010_0.pngbin0 -> 346 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/010_1.pngbin0 -> 272 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/010_2.pngbin0 -> 257 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/010_3.pngbin0 -> 222 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/011.pngbin0 -> 212 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/012.pngbin0 -> 199 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/013.pngbin0 -> 161 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/014.pngbin0 -> 198 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/015.pngbin0 -> 199 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/016.pngbin0 -> 198 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/017.pngbin0 -> 149 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/018.pngbin0 -> 172 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/019.pngbin0 -> 255 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/020.pngbin0 -> 260 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/021.pngbin0 -> 671 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/022.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/023.pngbin0 -> 312 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/024.pngbin0 -> 231 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/025.pngbin0 -> 274 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/026.pngbin0 -> 671 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/027.pngbin0 -> 619 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/028.pngbin0 -> 707 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/029.pngbin0 -> 537 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/030.pngbin0 -> 761 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/031.pngbin0 -> 736 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/032.pngbin0 -> 283 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/033.pngbin0 -> 1916 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/034.pngbin0 -> 850 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/035.pngbin0 -> 721 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/036.pngbin0 -> 783 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/037.pngbin0 -> 645 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/038.pngbin0 -> 386 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/039.pngbin0 -> 590 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/040.pngbin0 -> 362 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/041.pngbin0 -> 249 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/042.pngbin0 -> 633 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/043.pngbin0 -> 864 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/044.pngbin0 -> 500 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/045.pngbin0 -> 422 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/046.pngbin0 -> 716 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/047.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/048.pngbin0 -> 666 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/049.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/050.pngbin0 -> 225 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/051.pngbin0 -> 224 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/052.pngbin0 -> 245 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/053.pngbin0 -> 456 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/054.pngbin0 -> 159 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/055.pngbin0 -> 242 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/056.pngbin0 -> 862 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/057.pngbin0 -> 214 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/058.pngbin0 -> 818 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/059.pngbin0 -> 193 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/060.pngbin0 -> 154 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/061.pngbin0 -> 259 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/062.pngbin0 -> 845 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/063.pngbin0 -> 414 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/064.pngbin0 -> 289 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/065.pngbin0 -> 343 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/066.pngbin0 -> 164 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/067.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/068.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/070.pngbin0 -> 195 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/071.pngbin0 -> 412 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/072.pngbin0 -> 277 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/073.pngbin0 -> 319 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/074.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/074_0.pngbin0 -> 153 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/074_1.pngbin0 -> 172 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/075.pngbin0 -> 541 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/076.pngbin0 -> 555 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/077.pngbin0 -> 279 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/078.pngbin0 -> 403 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/079.pngbin0 -> 880 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/080.pngbin0 -> 661 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/081.pngbin0 -> 217 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/082.pngbin0 -> 148 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/083.pngbin0 -> 846 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/084.pngbin0 -> 587 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/085.pngbin0 -> 221 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/086.pngbin0 -> 393 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/087.pngbin0 -> 183 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/088.pngbin0 -> 194 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/089.pngbin0 -> 488 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/090.pngbin0 -> 229 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/091.pngbin0 -> 359 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/092.pngbin0 -> 199 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/093.pngbin0 -> 1351 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/094.pngbin0 -> 281 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/095.pngbin0 -> 252 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/096.pngbin0 -> 356 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/097.pngbin0 -> 405 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/098.pngbin0 -> 328 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/099.pngbin0 -> 334 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/100.pngbin0 -> 293 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/101.pngbin0 -> 352 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/102.pngbin0 -> 397 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/103.pngbin0 -> 193 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/104.pngbin0 -> 427 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/105.pngbin0 -> 1101 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/106.pngbin0 -> 287 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/107.pngbin0 -> 576 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/108.pngbin0 -> 800 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/109.pngbin0 -> 161 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/110.pngbin0 -> 688 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/111.pngbin0 -> 169 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/112.pngbin0 -> 762 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/113.pngbin0 -> 586 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/114.pngbin0 -> 284 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/115.pngbin0 -> 267 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/116.pngbin0 -> 576 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/117.pngbin0 -> 474 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/118.pngbin0 -> 296 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/119.pngbin0 -> 580 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/120.pngbin0 -> 301 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/121.pngbin0 -> 163 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/122.pngbin0 -> 293 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/123.pngbin0 -> 274 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/124.pngbin0 -> 594 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/125.pngbin0 -> 287 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/126.pngbin0 -> 200 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/127.pngbin0 -> 441 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/128.pngbin0 -> 500 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/129.pngbin0 -> 205 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/130.pngbin0 -> 776 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/131.pngbin0 -> 354 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/132.pngbin0 -> 291 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/133.pngbin0 -> 207 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/134.pngbin0 -> 248 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/135.pngbin0 -> 243 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/136.pngbin0 -> 150 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/137.pngbin0 -> 377 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/138.pngbin0 -> 234 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/139.pngbin0 -> 299 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/140.pngbin0 -> 224 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/141.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/141_0.pngbin0 -> 180 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/141_1.pngbin0 -> 170 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/141_2.pngbin0 -> 184 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/141_3.pngbin0 -> 168 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/141_4.pngbin0 -> 155 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/142.pngbin0 -> 191 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/143.pngbin0 -> 461 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/144.pngbin0 -> 191 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/145.pngbin0 -> 270 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/146.pngbin0 -> 253 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/147.pngbin0 -> 311 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/148.pngbin0 -> 259 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/149.pngbin0 -> 233 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/150.pngbin0 -> 259 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/151.pngbin0 -> 239 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/152.pngbin0 -> 175 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/153.pngbin0 -> 183 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/154.pngbin0 -> 225 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/155.pngbin0 -> 255 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/156.pngbin0 -> 332 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/157.pngbin0 -> 184 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/158.pngbin0 -> 251 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/159.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/159_0.pngbin0 -> 200 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/159_1.pngbin0 -> 147 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/160.pngbin0 -> 219 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/161.pngbin0 -> 143 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/162.pngbin0 -> 179 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/163.pngbin0 -> 188 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/164.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/165.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/166.pngbin0 -> 401 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/167.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/168.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/169.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/170.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/171.pngbin0 -> 184 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/172.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/173.pngbin0 -> 212 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/174.pngbin0 -> 210 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/175.pngbin0 -> 196 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/176.pngbin0 -> 330 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/177.pngbin0 -> 186 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/178.pngbin0 -> 358 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/179.pngbin0 -> 226 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/180.pngbin0 -> 139 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/181.pngbin0 -> 542 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/182.pngbin0 -> 235 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/183.pngbin0 -> 546 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/184.pngbin0 -> 332 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/185.pngbin0 -> 819 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/186.pngbin0 -> 599 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/187.pngbin0 -> 336 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/188.pngbin0 -> 249 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/189.pngbin0 -> 196 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/190.pngbin0 -> 463 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/191.pngbin0 -> 399 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/192.pngbin0 -> 541 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/193.pngbin0 -> 358 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/194.pngbin0 -> 616 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/195.pngbin0 -> 235 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/196.pngbin0 -> 726 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/197.pngbin0 -> 375 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/198.pngbin0 -> 845 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/199.pngbin0 -> 229 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/200.pngbin0 -> 333 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/201.pngbin0 -> 1316 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/202.pngbin0 -> 312 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/203.pngbin0 -> 323 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/204.pngbin0 -> 390 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/205.pngbin0 -> 479 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/206.pal83
-rwxr-xr-xgraphics/battle_anims/sprites/206.pngbin0 -> 747 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/207.pngbin0 -> 262 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/208.pngbin0 -> 815 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/209.pngbin0 -> 620 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/210.pngbin0 -> 200 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/211.pngbin0 -> 190 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/212.pngbin0 -> 354 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/213.pngbin0 -> 501 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/214.pngbin0 -> 534 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/215.pngbin0 -> 357 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/216.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/217.pngbin0 -> 195 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/218.pngbin0 -> 239 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/219.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/220.pngbin0 -> 329 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/221.pngbin0 -> 521 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/222.pngbin0 -> 554 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/223.pngbin0 -> 524 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/224.pngbin0 -> 300 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/225.pngbin0 -> 408 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/226.pngbin0 -> 245 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/227.pngbin0 -> 269 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/228.pngbin0 -> 203 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/229.pngbin0 -> 445 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/230.pngbin0 -> 481 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/231.pngbin0 -> 391 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/232.pngbin0 -> 1085 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/233.pngbin0 -> 213 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/234.pngbin0 -> 333 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/235.pngbin0 -> 195 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/236.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/237.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/238.pngbin0 -> 210 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/239.pngbin0 -> 313 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/240.pngbin0 -> 258 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/241.pngbin0 -> 258 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/242.pngbin0 -> 339 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/243.pngbin0 -> 160 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/244.pngbin0 -> 226 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/245.pngbin0 -> 329 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/246.pngbin0 -> 758 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/247.pngbin0 -> 441 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/248.pngbin0 -> 141 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/249.pngbin0 -> 175 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/250.pngbin0 -> 457 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/251.pngbin0 -> 187 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/252.pngbin0 -> 323 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/253.pngbin0 -> 467 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/254.pngbin0 -> 334 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/255.pngbin0 -> 208 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/256.pngbin0 -> 686 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/257.pngbin0 -> 317 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/258.pngbin0 -> 290 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/259.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/260.pngbin0 -> 342 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/261.pngbin0 -> 378 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/262.pngbin0 -> 249 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/263.pngbin0 -> 166 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/264.pngbin0 -> 152 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/265.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/266.pngbin0 -> 167 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/267.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/268.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/269.pngbin0 -> 179 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/270.pngbin0 -> 304 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/271.pngbin0 -> 172 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/272.pngbin0 -> 384 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/273.pngbin0 -> 159 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/274.pngbin0 -> 261 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/275.pngbin0 -> 221 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/276.pngbin0 -> 245 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/277.pngbin0 -> 684 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/278.pngbin0 -> 421 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/279.pngbin0 -> 184 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/280.pngbin0 -> 601 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/281.pngbin0 -> 399 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/282.pngbin0 -> 401 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/283.pngbin0 -> 323 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/284.pngbin0 -> 679 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/285.pngbin0 -> 228 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/286.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/287.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/288.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/effect.pal27
-rwxr-xr-xgraphics/battle_anims/sprites/particles.pngbin0 -> 277 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/smokescreen_impact.pal19
-rwxr-xr-xgraphics/battle_anims/sprites/smokescreen_impact.pngbin0 -> 254 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/substitute.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_anims/sprites/substitute.pngbin0 -> 446 bytes
-rwxr-xr-xgraphics/battle_frontier/battle_tilemap1.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_frontier/battle_tilemap2.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_frontier/dome_anim1.pal19
-rwxr-xr-xgraphics/battle_frontier/dome_anim2.pal19
-rwxr-xr-xgraphics/battle_frontier/dome_anim3.pal19
-rwxr-xr-xgraphics/battle_frontier/dome_anim4.pal19
-rwxr-xr-xgraphics/battle_frontier/factory_menu.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_frontier/factory_menu1.pngbin0 -> 309 bytes
-rwxr-xr-xgraphics/battle_frontier/factory_menu2.pngbin0 -> 234 bytes
-rwxr-xr-xgraphics/battle_frontier/misc1.pngbin0 -> 1606 bytes
-rwxr-xr-xgraphics/battle_frontier/options.pngbin0 -> 576 bytes
-rwxr-xr-xgraphics/battle_frontier/options_pal1.pal259
-rwxr-xr-xgraphics/battle_frontier/options_pal2.pal259
-rwxr-xr-xgraphics/battle_frontier/options_pal3.pal19
-rwxr-xr-xgraphics/battle_frontier/pyramid_light.pal115
-rwxr-xr-xgraphics/battle_frontier/symbols.pngbin0 -> 277 bytes
-rwxr-xr-xgraphics/battle_frontier/text.pal19
-rwxr-xr-xgraphics/battle_frontier/text_pp.pal19
-rwxr-xr-xgraphics/battle_frontier/tourney_bg.pngbin0 -> 983 bytes
-rwxr-xr-xgraphics/battle_frontier/tourney_line.pngbin0 -> 349 bytes
-rwxr-xr-xgraphics/battle_interface/ball_display_unused_extra.pngbin0 -> 103 bytes
-rwxr-xr-xgraphics/battle_interface/enemy_mon_shadow.pngbin0 -> 154 bytes
-rwxr-xr-xgraphics/battle_interface/expbar.pngbin0 -> 166 bytes
-rwxr-xr-xgraphics/battle_interface/hpbar.pngbin0 -> 217 bytes
-rwxr-xr-xgraphics/battle_interface/hpbar_anim.pngbin0 -> 205 bytes
-rwxr-xr-xgraphics/battle_interface/misc.pngbin0 -> 156 bytes
-rwxr-xr-xgraphics/battle_interface/misc_frameend.pngbin0 -> 140 bytes
-rwxr-xr-xgraphics/battle_interface/status2.pngbin0 -> 198 bytes
-rwxr-xr-xgraphics/battle_interface/status3.pngbin0 -> 199 bytes
-rwxr-xr-xgraphics/battle_interface/status4.pngbin0 -> 198 bytes
-rwxr-xr-xgraphics/battle_interface/status_brn.pngbin0 -> 176 bytes
-rwxr-xr-xgraphics/battle_interface/status_frz.pngbin0 -> 177 bytes
-rwxr-xr-xgraphics/battle_interface/status_par.pngbin0 -> 176 bytes
-rwxr-xr-xgraphics/battle_interface/status_psn.pngbin0 -> 176 bytes
-rwxr-xr-xgraphics/battle_interface/status_slp.pngbin0 -> 176 bytes
-rwxr-xr-xgraphics/battle_interface/unused_window.pal19
-rwxr-xr-xgraphics/battle_interface/unused_window.pngbin0 -> 608 bytes
-rwxr-xr-xgraphics/battle_interface/unused_window2.pngbin0 -> 445 bytes
-rwxr-xr-xgraphics/battle_interface/unused_window2bar.pngbin0 -> 91 bytes
-rwxr-xr-xgraphics/battle_interface/unused_window3.pngbin0 -> 235 bytes
-rwxr-xr-xgraphics/battle_interface/unused_window4.pngbin0 -> 362 bytes
-rwxr-xr-xgraphics/battle_interface/window.pngbin0 -> 336 bytes
-rwxr-xr-xgraphics/battle_interface/window2.pngbin0 -> 296 bytes
-rwxr-xr-xgraphics/battle_interface/window3.pngbin0 -> 293 bytes
-rwxr-xr-xgraphics/battle_interface/window4.pngbin0 -> 284 bytes
-rwxr-xr-xgraphics/battle_interface/window5.pngbin0 -> 297 bytes
-rwxr-xr-xgraphics/battle_terrain/building/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/building/anim_tiles.pngbin0 -> 308 bytes
-rwxr-xr-xgraphics/battle_terrain/building/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/building/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/building/palette2.pal51
-rwxr-xr-xgraphics/battle_terrain/building/palette3.pal51
-rwxr-xr-xgraphics/battle_terrain/building/tiles.pngbin0 -> 709 bytes
-rwxr-xr-xgraphics/battle_terrain/cave/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/cave/anim_tiles.pngbin0 -> 1416 bytes
-rwxr-xr-xgraphics/battle_terrain/cave/groudon.pal51
-rwxr-xr-xgraphics/battle_terrain/cave/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/cave/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/cave/tiles.pngbin0 -> 864 bytes
-rwxr-xr-xgraphics/battle_terrain/long_grass/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/long_grass/anim_tiles.pngbin0 -> 1127 bytes
-rwxr-xr-xgraphics/battle_terrain/long_grass/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/long_grass/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/long_grass/tiles.pngbin0 -> 900 bytes
-rwxr-xr-xgraphics/battle_terrain/plain/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/pond_water/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/pond_water/anim_tiles.pngbin0 -> 592 bytes
-rwxr-xr-xgraphics/battle_terrain/pond_water/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/pond_water/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/pond_water/tiles.pngbin0 -> 732 bytes
-rwxr-xr-xgraphics/battle_terrain/rock/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/rock/anim_tiles.pngbin0 -> 760 bytes
-rwxr-xr-xgraphics/battle_terrain/rock/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/rock/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/rock/tiles.pngbin0 -> 725 bytes
-rwxr-xr-xgraphics/battle_terrain/sand/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/sand/anim_tiles.pngbin0 -> 644 bytes
-rwxr-xr-xgraphics/battle_terrain/sand/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/sand/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/sand/tiles.pngbin0 -> 805 bytes
-rwxr-xr-xgraphics/battle_terrain/sky/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/sky/anim_tiles.pngbin0 -> 961 bytes
-rwxr-xr-xgraphics/battle_terrain/sky/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/sky/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/sky/tiles.pngbin0 -> 820 bytes
-rwxr-xr-xgraphics/battle_terrain/stadium/battle_frontier.pal51
-rwxr-xr-xgraphics/battle_terrain/stadium/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/stadium/palette1.pal51
-rwxr-xr-xgraphics/battle_terrain/stadium/palette2.pal51
-rwxr-xr-xgraphics/battle_terrain/stadium/palette3.pal51
-rwxr-xr-xgraphics/battle_terrain/stadium/palette4.pal51
-rwxr-xr-xgraphics/battle_terrain/stadium/palette5.pal51
-rwxr-xr-xgraphics/battle_terrain/stadium/palette6.pal51
-rwxr-xr-xgraphics/battle_terrain/stadium/palette7.pal51
-rwxr-xr-xgraphics/battle_terrain/stadium/tiles.pngbin0 -> 712 bytes
-rwxr-xr-xgraphics/battle_terrain/tall_grass/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/tall_grass/anim_tiles.pngbin0 -> 793 bytes
-rwxr-xr-xgraphics/battle_terrain/tall_grass/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/tall_grass/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/tall_grass/tiles.pngbin0 -> 739 bytes
-rwxr-xr-xgraphics/battle_terrain/underwater/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/underwater/anim_tiles.pngbin0 -> 506 bytes
-rwxr-xr-xgraphics/battle_terrain/underwater/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/underwater/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/underwater/tiles.pngbin0 -> 773 bytes
-rwxr-xr-xgraphics/battle_terrain/water/anim_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_terrain/water/anim_tiles.pngbin0 -> 887 bytes
-rwxr-xr-xgraphics/battle_terrain/water/kyogre.pal51
-rwxr-xr-xgraphics/battle_terrain/water/map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/battle_terrain/water/palette.pal51
-rwxr-xr-xgraphics/battle_terrain/water/tiles.pngbin0 -> 766 bytes
-rwxr-xr-xgraphics/battle_transitions/vs.pngbin0 -> 343 bytes
-rwxr-xr-xgraphics/battle_transitions/vs_frame.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/battle_transitions/vs_frame.pngbin0 -> 317 bytes
-rwxr-xr-xgraphics/berry_blender/arrow_old.pngbin0 -> 228 bytes
-rwxr-xr-xgraphics/berry_crusher/tiles.bin1
-rwxr-xr-xgraphics/berry_crusher/tiles.pal147
-rwxr-xr-xgraphics/berry_crusher/tiles.pngbin0 -> 2151 bytes
-rwxr-xr-xgraphics/berry_fix/gba_small.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/berry_fix/gba_small.pal35
-rwxr-xr-xgraphics/berry_fix/gba_small.pngbin0 -> 982 bytes
-rwxr-xr-xgraphics/berry_fix/gba_transfer.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/berry_fix/gba_transfer.pal35
-rwxr-xr-xgraphics/berry_fix/gba_transfer.pngbin0 -> 900 bytes
-rwxr-xr-xgraphics/berry_fix/gba_transfer_error.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/berry_fix/gba_transfer_error.pal35
-rwxr-xr-xgraphics/berry_fix/gba_transfer_error.pngbin0 -> 1014 bytes
-rwxr-xr-xgraphics/berry_fix/gba_transfer_highlight.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/berry_fix/gba_transfer_highlight.pal35
-rwxr-xr-xgraphics/berry_fix/gba_transfer_highlight.pngbin0 -> 1060 bytes
-rwxr-xr-xgraphics/berry_fix/logo.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/berry_fix/logo.pal51
-rwxr-xr-xgraphics/berry_fix/logo.pngbin0 -> 811 bytes
-rwxr-xr-xgraphics/berry_fix/window.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/berry_fix/window.pal35
-rwxr-xr-xgraphics/berry_fix/window.pngbin0 -> 211 bytes
-rwxr-xr-xgraphics/contest/applause.pngbin0 -> 291 bytes
-rwxr-xr-xgraphics/contest/applause_meter.pngbin0 -> 184 bytes
-rwxr-xr-xgraphics/contest/audience.pngbin0 -> 2086 bytes
-rwxr-xr-xgraphics/contest/clink_tilemap1.binbin0 -> 40 bytes
-rwxr-xr-xgraphics/contest/clink_tilemap10.bin1
-rwxr-xr-xgraphics/contest/clink_tilemap11.binbin0 -> 24 bytes
-rwxr-xr-xgraphics/contest/clink_tilemap2.binbin0 -> 40 bytes
-rwxr-xr-xgraphics/contest/clink_tilemap3.binbin0 -> 40 bytes
-rwxr-xr-xgraphics/contest/clink_tilemap4.binbin0 -> 40 bytes
-rwxr-xr-xgraphics/contest/clink_tilemap5.binbin0 -> 20 bytes
-rwxr-xr-xgraphics/contest/clink_tilemap6.binbin0 -> 20 bytes
-rwxr-xr-xgraphics/contest/clink_tilemap7.bin1
-rwxr-xr-xgraphics/contest/clink_tilemap8.bin1
-rwxr-xr-xgraphics/contest/clink_tilemap9.bin1
-rwxr-xr-xgraphics/contest/faces.pngbin0 -> 1028 bytes
-rwxr-xr-xgraphics/contest/heart.pngbin0 -> 873 bytes
-rwxr-xr-xgraphics/contest/judge.pngbin0 -> 593 bytes
-rwxr-xr-xgraphics/contest/judge_symbols.pngbin0 -> 401 bytes
-rwxr-xr-xgraphics/contest/misc.pngbin0 -> 1680 bytes
-rwxr-xr-xgraphics/contest/misc_2.pal259
-rwxr-xr-xgraphics/contest/misc_2.pngbin0 -> 1775 bytes
-rwxr-xr-xgraphics/contest/misc_2_tilemap_1.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/contest/misc_2_tilemap_2.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/contest/misc_2_tilemap_3.bin1
-rwxr-xr-xgraphics/contest/nextturn.pngbin0 -> 195 bytes
-rwxr-xr-xgraphics/contest/nextturn_numbers.pngbin0 -> 181 bytes
-rwxr-xr-xgraphics/contest/nextturn_random.pngbin0 -> 158 bytes
-rwxr-xr-xgraphics/easy_chat/cursor.pngbin0 -> 199 bytes
-rwxr-xr-xgraphics/easy_chat/mode.pngbin0 -> 420 bytes
-rwxr-xr-xgraphics/easy_chat/rwindow.pngbin0 -> 419 bytes
-rwxr-xr-xgraphics/easy_chat/window.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/easy_chat/window.pngbin0 -> 313 bytes
-rwxr-xr-xgraphics/frontier_pass/cursor.pngbin0 -> 226 bytes
-rwxr-xr-xgraphics/frontier_pass/gold.pal19
-rwxr-xr-xgraphics/frontier_pass/map_cursor.pngbin0 -> 240 bytes
-rwxr-xr-xgraphics/frontier_pass/medals.pngbin0 -> 651 bytes
-rwxr-xr-xgraphics/frontier_pass/silver.pal19
-rwxr-xr-xgraphics/frontier_pass/tilemap1.binbin0 -> 36 bytes
-rwxr-xr-xgraphics/frontier_pass/tilemap2.binbin0 -> 36 bytes
-rwxr-xr-xgraphics/frontier_pass/tiles.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/frontier_pass/tiles.pal131
-rwxr-xr-xgraphics/frontier_pass/tiles.pngbin0 -> 4011 bytes
-rwxr-xr-xgraphics/frontier_pass/tiles2.pngbin0 -> 2765 bytes
-rwxr-xr-xgraphics/interface/bag_pyramid.pal35
-rwxr-xr-xgraphics/interface/bag_pyramid.pngbin0 -> 778 bytes
-rwxr-xr-xgraphics/interface/bag_screen.pngbin0 -> 548 bytes
-rwxr-xr-xgraphics/interface/bag_screen_female.pal35
-rwxr-xr-xgraphics/interface/bag_screen_male.pal35
-rwxr-xr-xgraphics/interface/bag_swap.pngbin0 -> 159 bytes
-rwxr-xr-xgraphics/interface/ball/ultra.pal19
-rwxr-xr-xgraphics/interface/ball/ultra.pngbin0 -> 245 bytes
-rwxr-xr-xgraphics/interface/ball_open.pngbin0 -> 215 bytes
-rwxr-xr-xgraphics/interface/berry_tag.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/berry_tag_title.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/check_berry.pal99
-rwxr-xr-xgraphics/interface/check_berry.pngbin0 -> 743 bytes
-rwxr-xr-xgraphics/interface/check_berry_circle.pngbin0 -> 233 bytes
-rwxr-xr-xgraphics/interface/hm.pngbin0 -> 184 bytes
-rwxr-xr-xgraphics/interface/hpbar_anim.pngbin0 -> 192 bytes
-rwxr-xr-xgraphics/interface/mart_frame.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/mart_frame.pngbin0 -> 314 bytes
-rwxr-xr-xgraphics/interface/menu.pngbin0 -> 444 bytes
-rwxr-xr-xgraphics/interface/menu_0.pal19
-rwxr-xr-xgraphics/interface/menu_1.pal19
-rwxr-xr-xgraphics/interface/menu_map.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/interface/money.pngbin0 -> 210 bytes
-rwxr-xr-xgraphics/interface/numbers1.pngbin0 -> 201 bytes
-rwxr-xr-xgraphics/interface/numbers2.pngbin0 -> 215 bytes
-rwxr-xr-xgraphics/interface/party_menu_hpbar.pngbin0 -> 136 bytes
-rwxr-xr-xgraphics/interface/party_menu_misc.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/party_menu_misc.pal179
-rwxr-xr-xgraphics/interface/party_menu_misc.pngbin0 -> 613 bytes
-rwxr-xr-xgraphics/interface/party_menu_pokeball.pngbin0 -> 330 bytes
-rwxr-xr-xgraphics/interface/party_menu_pokeball_small.pngbin0 -> 261 bytes
-rwxr-xr-xgraphics/interface/pokeblock.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/pokeblock_case_frame.pal99
-rwxr-xr-xgraphics/interface/pokeblock_case_frame.pngbin0 -> 426 bytes
-rwxr-xr-xgraphics/interface/pokeblock_device.pngbin0 -> 530 bytes
-rwxr-xr-xgraphics/interface/pokeblock_feeding_bg_map.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/powacc_tilemap.binbin0 -> 160 bytes
-rwxr-xr-xgraphics/interface/status_icons.pngbin0 -> 455 bytes
-rwxr-xr-xgraphics/interface/status_screen.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/status_screen.pal131
-rwxr-xr-xgraphics/interface/status_screen.pngbin0 -> 1633 bytes
-rwxr-xr-xgraphics/interface/status_tilemap0.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/status_tilemap1.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/status_tilemap2.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/status_tilemap3.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/interface/summary.binbin0 -> 128 bytes
-rwxr-xr-xgraphics/interface/summary_frames.pngbin0 -> 273 bytes
-rwxr-xr-xgraphics/interface/textbox.pngbin0 -> 198 bytes
-rwxr-xr-xgraphics/interface/unk_tilemap.binbin0 -> 160 bytes
-rwxr-xr-xgraphics/interface/wallclock.pngbin0 -> 1195 bytes
-rwxr-xr-xgraphics/interface/wallclock1.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/interface/wallclock2.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/interface/wallclock_female.pal19
-rwxr-xr-xgraphics/interface/wallclock_male.pal19
-rwxr-xr-xgraphics/interface_fr/menu.pngbin0 -> 1904 bytes
-rwxr-xr-xgraphics/interface_fr/menu1.pal19
-rwxr-xr-xgraphics/interface_fr/menu2.pal19
-rwxr-xr-xgraphics/interface_fr/menu3.pal19
-rwxr-xr-xgraphics/intro/intro1_text.pal51
-rwxr-xr-xgraphics/intro/intro3.pal259
-rwxr-xr-xgraphics/intro/intro3_clouds.pngbin0 -> 1360 bytes
-rwxr-xr-xgraphics/intro/intro3_clouds1.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/intro/intro3_clouds2.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/intro/intro3_clouds2.pngbin0 -> 468 bytes
-rwxr-xr-xgraphics/intro/intro3_clouds3.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/intro/intro3_clouds4.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/intro/intro3_groudon.binbin0 -> 8192 bytes
-rwxr-xr-xgraphics/intro/intro3_groudon.pngbin0 -> 2166 bytes
-rwxr-xr-xgraphics/intro/intro3_kyogre.binbin0 -> 8192 bytes
-rwxr-xr-xgraphics/intro/intro3_kyogre.pngbin0 -> 1946 bytes
-rwxr-xr-xgraphics/intro/intro3_rayquaza.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/intro/intro3_rayquaza.pngbin0 -> 1138 bytes
-rwxr-xr-xgraphics/intro/legend_bg.pngbin0 -> 474 bytes
-rwxr-xr-xgraphics/intro/legend_bg1.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/intro/legend_bg2.bin1
-rwxr-xr-xgraphics/link/gba.pngbin0 -> 1253 bytes
-rwxr-xr-xgraphics/link/gba_pal2.pal51
-rwxr-xr-xgraphics/link/link1.pal19
-rwxr-xr-xgraphics/link/link2.pal19
-rwxr-xr-xgraphics/link/link_winedge.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/link/link_winedge.pngbin0 -> 189 bytes
-rwxr-xr-xgraphics/link/misc.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/link/misc.pngbin0 -> 513 bytes
-rwxr-xr-xgraphics/mail/bead/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/bead/palette.pal19
-rwxr-xr-xgraphics/mail/bead/tiles.pngbin0 -> 263 bytes
-rwxr-xr-xgraphics/mail/dream/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/dream/palette.pal19
-rwxr-xr-xgraphics/mail/dream/tiles.pngbin0 -> 351 bytes
-rwxr-xr-xgraphics/mail/fab/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/fab/palette.pal19
-rwxr-xr-xgraphics/mail/fab/tiles.pngbin0 -> 388 bytes
-rwxr-xr-xgraphics/mail/glitter/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/glitter/palette.pal19
-rwxr-xr-xgraphics/mail/glitter/tiles.pngbin0 -> 548 bytes
-rwxr-xr-xgraphics/mail/harbor/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/harbor/palette.pal19
-rwxr-xr-xgraphics/mail/harbor/tiles.pngbin0 -> 366 bytes
-rwxr-xr-xgraphics/mail/mech/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/mech/palette.pal19
-rwxr-xr-xgraphics/mail/mech/tiles.pngbin0 -> 299 bytes
-rwxr-xr-xgraphics/mail/orange/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/orange/palette.pal19
-rwxr-xr-xgraphics/mail/orange/tiles.pngbin0 -> 439 bytes
-rwxr-xr-xgraphics/mail/retro/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/retro/palette.pal19
-rwxr-xr-xgraphics/mail/retro/tiles.pngbin0 -> 615 bytes
-rwxr-xr-xgraphics/mail/shadow/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/shadow/palette.pal19
-rwxr-xr-xgraphics/mail/shadow/tiles.pngbin0 -> 400 bytes
-rwxr-xr-xgraphics/mail/tropic/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/tropic/palette.pal19
-rwxr-xr-xgraphics/mail/tropic/tiles.pngbin0 -> 389 bytes
-rwxr-xr-xgraphics/mail/wave/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/wave/palette.pal19
-rwxr-xr-xgraphics/mail/wave/tiles.pngbin0 -> 409 bytes
-rwxr-xr-xgraphics/mail/wood/map.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/mail/wood/palette.pal19
-rwxr-xr-xgraphics/mail/wood/tiles.pngbin0 -> 518 bytes
-rwxr-xr-xgraphics/misc/bag.pal19
-rwxr-xr-xgraphics/misc/bag_female.pngbin0 -> 1460 bytes
-rwxr-xr-xgraphics/misc/bag_male.pngbin0 -> 1637 bytes
-rwxr-xr-xgraphics/misc/confetti.pngbin0 -> 355 bytes
-rwxr-xr-xgraphics/naming_screen/cursor.pngbin0 -> 223 bytes
-rwxr-xr-xgraphics/naming_screen/keyboard_button.pngbin0 -> 89 bytes
-rwxr-xr-xgraphics/naming_screen/menu.pal99
-rwxr-xr-xgraphics/naming_screen/menu.pngbin0 -> 441 bytes
-rwxr-xr-xgraphics/naming_screen/right_pointing_triangle.pngbin0 -> 95 bytes
-rwxr-xr-xgraphics/naming_screen/roptions.pngbin0 -> 309 bytes
-rwxr-xr-xgraphics/naming_screen/rwindow.pngbin0 -> 480 bytes
-rwxr-xr-xgraphics/naming_screen/underscore.pngbin0 -> 81 bytes
-rwxr-xr-xgraphics/pokeblock/use_screen/condition.pngbin0 -> 287 bytes
-rwxr-xr-xgraphics/pokeblock/use_screen/graph.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokeblock/use_screen/graph.pngbin0 -> 1571 bytes
-rwxr-xr-xgraphics/pokeblock/use_screen/nature.pal51
-rwxr-xr-xgraphics/pokeblock/use_screen/updown.pngbin0 -> 234 bytes
-rwxr-xr-xgraphics/pokedex/area_unknown.pngbin0 -> 397 bytes
-rwxr-xr-xgraphics/pokedex/fade.pal51
-rwxr-xr-xgraphics/pokedex/hoenn_bg.pal99
-rwxr-xr-xgraphics/pokedex/menu.pngbin0 -> 2045 bytes
-rwxr-xr-xgraphics/pokedex/menu2.pngbin0 -> 1044 bytes
-rwxr-xr-xgraphics/pokedex/national_bg.pal99
-rwxr-xr-xgraphics/pokedex/noball_unused.pngbin0 -> 160 bytes
-rwxr-xr-xgraphics/pokedex/search1.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokedex/search2.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokedex/search_menu.pal67
-rwxr-xr-xgraphics/pokedex/search_menu.pngbin0 -> 1116 bytes
-rwxr-xr-xgraphics/pokedex/text.pal51
-rwxr-xr-xgraphics/pokedex/tilemap1.binbin0 -> 768 bytes
-rwxr-xr-xgraphics/pokedex/tilemap2.binbin0 -> 768 bytes
-rwxr-xr-xgraphics/pokedex/tilemap3.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokedex/tilemap4.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokedex/tilemap5.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokedex/tilemap6.binbin0 -> 192 bytes
-rwxr-xr-xgraphics/pokedex/tilemap7.binbin0 -> 192 bytes
-rwxr-xr-xgraphics/pokedex/tilemap8.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokedex/tilemap9.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokemon_storage/menu.pngbin0 -> 1242 bytes
-rwxr-xr-xgraphics/pokemon_storage/pss_window.pal35
-rwxr-xr-xgraphics/pokemon_storage/pss_window.pngbin0 -> 381 bytes
-rwxr-xr-xgraphics/pokemon_storage/pss_window2.binbin0 -> 720 bytes
-rwxr-xr-xgraphics/pokemon_storage/pss_window2.pal35
-rwxr-xr-xgraphics/pokemon_storage/pss_window2.pngbin0 -> 392 bytes
-rwxr-xr-xgraphics/pokenav/cancel.pal35
-rwxr-xr-xgraphics/pokenav/cancel.pngbin0 -> 180 bytes
-rwxr-xr-xgraphics/pokenav/condition.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/pokenav/condition.pngbin0 -> 1603 bytes
-rwxr-xr-xgraphics/pokenav/header.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/pokenav/header.pngbin0 -> 479 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/beauty.pngbin0 -> 315 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/condition.pngbin0 -> 287 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/cool.pngbin0 -> 259 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/cute.pngbin0 -> 293 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/hoenn_map.pngbin0 -> 444 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/main_menu.pngbin0 -> 298 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/match_call.pngbin0 -> 298 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/palette.pal83
-rwxr-xr-xgraphics/pokenav/left_headers/party.pngbin0 -> 323 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/ribbons.pngbin0 -> 274 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/search.pngbin0 -> 300 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/smart.pngbin0 -> 308 bytes
-rwxr-xr-xgraphics/pokenav/left_headers/tough.pngbin0 -> 287 bytes
-rwxr-xr-xgraphics/pokenav/marker.pngbin0 -> 353 bytes
-rwxr-xr-xgraphics/pokenav/message.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokenav/message.pngbin0 -> 159 bytes
-rwxr-xr-xgraphics/pokenav/options/beauty.pngbin0 -> 259 bytes
-rwxr-xr-xgraphics/pokenav/options/cancel.pngbin0 -> 273 bytes
-rwxr-xr-xgraphics/pokenav/options/condition.pngbin0 -> 295 bytes
-rwxr-xr-xgraphics/pokenav/options/cool.pngbin0 -> 212 bytes
-rwxr-xr-xgraphics/pokenav/options/cute.pngbin0 -> 228 bytes
-rwxr-xr-xgraphics/pokenav/options/hoenn_map.pngbin0 -> 305 bytes
-rwxr-xr-xgraphics/pokenav/options/match_call.pngbin0 -> 304 bytes
-rwxr-xr-xgraphics/pokenav/options/options.bin1
-rwxr-xr-xgraphics/pokenav/options/options.pal83
-rwxr-xr-xgraphics/pokenav/options/party.pngbin0 -> 318 bytes
-rwxr-xr-xgraphics/pokenav/options/ribbons.pngbin0 -> 291 bytes
-rwxr-xr-xgraphics/pokenav/options/search.pngbin0 -> 286 bytes
-rwxr-xr-xgraphics/pokenav/options/smart.pngbin0 -> 256 bytes
-rwxr-xr-xgraphics/pokenav/options/switch_off.pngbin0 -> 314 bytes
-rwxr-xr-xgraphics/pokenav/options/tough.pngbin0 -> 239 bytes
-rwxr-xr-xgraphics/pokenav/ribbons.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/pokenav/ribbons.pngbin0 -> 291 bytes
-rwxr-xr-xgraphics/pokenav/zoom.pngbin0 -> 536 bytes
-rwxr-xr-xgraphics/rayquaza_scene/chase.pal67
-rwxr-xr-xgraphics/rayquaza_scene/chase_bg.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/chase_bg.pngbin0 -> 336 bytes
-rwxr-xr-xgraphics/rayquaza_scene/chase_streaks.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/chase_streaks.pngbin0 -> 279 bytes
-rwxr-xr-xgraphics/rayquaza_scene/clouds.pal35
-rwxr-xr-xgraphics/rayquaza_scene/clouds.pngbin0 -> 964 bytes
-rwxr-xr-xgraphics/rayquaza_scene/clouds1.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/clouds2.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/clouds3.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/groudon.pngbin0 -> 1578 bytes
-rwxr-xr-xgraphics/rayquaza_scene/groudon_claw.pngbin0 -> 445 bytes
-rwxr-xr-xgraphics/rayquaza_scene/groudon_left.pngbin0 -> 1153 bytes
-rwxr-xr-xgraphics/rayquaza_scene/groudon_shoulder.pngbin0 -> 259 bytes
-rwxr-xr-xgraphics/rayquaza_scene/groudon_tail.pngbin0 -> 168 bytes
-rwxr-xr-xgraphics/rayquaza_scene/hush_bg.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/hush_bg.pal51
-rwxr-xr-xgraphics/rayquaza_scene/hush_bg.pngbin0 -> 339 bytes
-rwxr-xr-xgraphics/rayquaza_scene/hush_ring.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/hush_ring.pngbin0 -> 385 bytes
-rwxr-xr-xgraphics/rayquaza_scene/hush_ring_map.binbin0 -> 256 bytes
-rwxr-xr-xgraphics/rayquaza_scene/kyogre.pngbin0 -> 1110 bytes
-rwxr-xr-xgraphics/rayquaza_scene/kyogre_fin.pngbin0 -> 261 bytes
-rwxr-xr-xgraphics/rayquaza_scene/kyogre_right.pngbin0 -> 505 bytes
-rwxr-xr-xgraphics/rayquaza_scene/kyogre_shoulder.pngbin0 -> 179 bytes
-rwxr-xr-xgraphics/rayquaza_scene/overcast.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/overcast.pngbin0 -> 3705 bytes
-rwxr-xr-xgraphics/rayquaza_scene/overcast2.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/overcast2.pal35
-rwxr-xr-xgraphics/rayquaza_scene/overcast2.pngbin0 -> 2408 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza.binbin0 -> 1024 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza.pngbin0 -> 3187 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza_chase.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza_chase.pngbin0 -> 2184 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza_chase2.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza_fly1.pngbin0 -> 815 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza_flyin.pngbin0 -> 391 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza_hover.pngbin0 -> 2370 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza_light.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza_light.pngbin0 -> 534 bytes
-rwxr-xr-xgraphics/rayquaza_scene/rayquaza_tail.pngbin0 -> 264 bytes
-rwxr-xr-xgraphics/rayquaza_scene/smoke.pngbin0 -> 242 bytes
-rwxr-xr-xgraphics/rayquaza_scene/splash.pngbin0 -> 205 bytes
-rwxr-xr-x[-rw-r--r--]graphics/roulette/center.pngbin589 -> 589 bytes
-rwxr-xr-x[-rw-r--r--]graphics/roulette/credit.pngbin325 -> 325 bytes
-rwxr-xr-x[-rw-r--r--]graphics/roulette/headers.pngbin1060 -> 1060 bytes
-rwxr-xr-x[-rw-r--r--]graphics/roulette/multiplier.pngbin399 -> 399 bytes
-rwxr-xr-x[-rw-r--r--]graphics/roulette/numbers.pngbin300 -> 300 bytes
-rwxr-xr-x[-rw-r--r--]graphics/roulette/wheel.pngbin3248 -> 3248 bytes
-rwxr-xr-xgraphics/roulette/window.pngbin0 -> 1077 bytes
-rwxr-xr-xgraphics/slot_machine/bolt.pngbin0 -> 146 bytes
-rwxr-xr-xgraphics/slot_machine/duck.pngbin0 -> 162 bytes
-rwxr-xr-xgraphics/slot_machine/large_bolt/0.pngbin0 -> 211 bytes
-rwxr-xr-xgraphics/slot_machine/large_bolt/1.pngbin0 -> 217 bytes
-rwxr-xr-xgraphics/slot_machine/menu.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/slot_machine/menu.pal83
-rwxr-xr-xgraphics/slot_machine/menu.pngbin0 -> 2396 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/0.pngbin0 -> 155 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/1.pngbin0 -> 137 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/2.pngbin0 -> 153 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/3.pngbin0 -> 144 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/4.pngbin0 -> 150 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/5.pngbin0 -> 153 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/6.pngbin0 -> 156 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/7.pngbin0 -> 147 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/8.pngbin0 -> 152 bytes
-rwxr-xr-xgraphics/slot_machine/numbers/9.pngbin0 -> 155 bytes
-rwxr-xr-xgraphics/slot_machine/pika_aura.pngbin0 -> 273 bytes
-rwxr-xr-xgraphics/slot_machine/reel_pikachu.pngbin0 -> 2210 bytes
-rwxr-xr-xgraphics/slot_machine/reel_symbols/1.pngbin0 -> 260 bytes
-rwxr-xr-xgraphics/slot_machine/reel_symbols/2.pngbin0 -> 259 bytes
-rwxr-xr-xgraphics/slot_machine/reel_symbols/3.pngbin0 -> 275 bytes
-rwxr-xr-xgraphics/slot_machine/reel_symbols/4.pngbin0 -> 249 bytes
-rwxr-xr-xgraphics/slot_machine/reel_symbols/5.pngbin0 -> 291 bytes
-rwxr-xr-xgraphics/slot_machine/reel_symbols/6.pngbin0 -> 259 bytes
-rwxr-xr-xgraphics/slot_machine/reel_symbols/7.pngbin0 -> 227 bytes
-rwxr-xr-xgraphics/slot_machine/reel_time.pngbin0 -> 1050 bytes
-rwxr-xr-xgraphics/slot_machine/reel_time_explosion/0.pngbin0 -> 308 bytes
-rwxr-xr-xgraphics/slot_machine/reel_time_explosion/1.pngbin0 -> 459 bytes
-rwxr-xr-xgraphics/slot_machine/reel_time_numbers/0.pngbin0 -> 149 bytes
-rwxr-xr-xgraphics/slot_machine/reel_time_numbers/1.pngbin0 -> 144 bytes
-rwxr-xr-xgraphics/slot_machine/reel_time_numbers/2.pngbin0 -> 156 bytes
-rwxr-xr-xgraphics/slot_machine/reel_time_numbers/3.pngbin0 -> 149 bytes
-rwxr-xr-xgraphics/slot_machine/reel_time_numbers/4.pngbin0 -> 149 bytes
-rwxr-xr-xgraphics/slot_machine/reel_time_numbers/5.pngbin0 -> 155 bytes
-rwxr-xr-xgraphics/slot_machine/shadow.pngbin0 -> 182 bytes
-rwxr-xr-xgraphics/slot_machine/slots_layout.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/slot_machine/smoke.pngbin0 -> 201 bytes
-rwxr-xr-xgraphics/slot_machine/spr6.pal19
-rwxr-xr-xgraphics/title_screen/title_screen1.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/title_screen/title_screen2.binbin0 -> 1024 bytes
-rwxr-xr-xgraphics/trade/buttons.pngbin0 -> 227 bytes
-rwxr-xr-xgraphics/trade/menu.pal51
-rwxr-xr-xgraphics/trade/menu.pngbin0 -> 608 bytes
-rwxr-xr-xgraphics/trainer_card/0star.pal51
-rwxr-xr-xgraphics/trainer_card/0star_fr.pal51
-rwxr-xr-xgraphics/trainer_card/card.pngbin0 -> 970 bytes
-rwxr-xr-xgraphics/trainer_card/card_fr.pngbin0 -> 1467 bytes
-rwxr-xr-xgraphics/types/bug.pngbin0 -> 204 bytes
-rwxr-xr-xgraphics/types/contest_beauty.pngbin0 -> 224 bytes
-rwxr-xr-xgraphics/types/contest_cool.pngbin0 -> 213 bytes
-rwxr-xr-xgraphics/types/contest_cute.pngbin0 -> 214 bytes
-rwxr-xr-xgraphics/types/contest_smart.pngbin0 -> 223 bytes
-rwxr-xr-xgraphics/types/contest_tough.pngbin0 -> 217 bytes
-rwxr-xr-xgraphics/types/dark.pngbin0 -> 219 bytes
-rwxr-xr-xgraphics/types/dragon.pngbin0 -> 223 bytes
-rwxr-xr-xgraphics/types/electric.pngbin0 -> 227 bytes
-rwxr-xr-xgraphics/types/fight.pngbin0 -> 227 bytes
-rwxr-xr-xgraphics/types/fire.pngbin0 -> 216 bytes
-rwxr-xr-xgraphics/types/flying.pngbin0 -> 229 bytes
-rwxr-xr-xgraphics/types/ghost.pngbin0 -> 233 bytes
-rwxr-xr-xgraphics/types/grass.pngbin0 -> 230 bytes
-rwxr-xr-xgraphics/types/ground.pngbin0 -> 231 bytes
-rwxr-xr-xgraphics/types/ice.pngbin0 -> 208 bytes
-rwxr-xr-xgraphics/types/move_types_1.pal19
-rwxr-xr-xgraphics/types/move_types_2.pal19
-rwxr-xr-xgraphics/types/move_types_3.pal19
-rwxr-xr-xgraphics/types/mystery.pngbin0 -> 215 bytes
-rwxr-xr-xgraphics/types/normal.pngbin0 -> 221 bytes
-rwxr-xr-xgraphics/types/poison.pngbin0 -> 236 bytes
-rwxr-xr-xgraphics/types/psychic.pngbin0 -> 234 bytes
-rwxr-xr-xgraphics/types/rock.pngbin0 -> 220 bytes
-rwxr-xr-xgraphics/types/steel.pngbin0 -> 221 bytes
-rwxr-xr-xgraphics/types/water.pngbin0 -> 218 bytes
-rw-r--r--graphics/unknown/unknown_5B3544.pal19
-rwxr-xr-xgraphics/unknown/unknown_C035B8.pngbin0 -> 156 bytes
-rwxr-xr-xgraphics/unknown/unknown_C06D98.pngbin0 -> 181 bytes
-rwxr-xr-xgraphics/unknown/unknown_C06D98_2.pal35
-rwxr-xr-xgraphics/unknown/unknown_C0CA1C.binbin0 -> 36 bytes
-rwxr-xr-xgraphics/unknown/unknown_C0CA40.binbin0 -> 36 bytes
-rwxr-xr-xgraphics/unknown/unknown_C0CA64.binbin0 -> 36 bytes
-rwxr-xr-xgraphics/unknown/unknown_C0CAE0.binbin0 -> 32 bytes
-rwxr-xr-xgraphics/unknown/unknown_C15BC0.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/unknown/unknown_C17170.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/unknown/unknown_C17410.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_C1751C.binbin0 -> 8192 bytes
-rwxr-xr-xgraphics/unknown/unknown_C17980.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_C19470.pngbin0 -> 255 bytes
-rwxr-xr-xgraphics/unknown/unknown_C2F9E0.pal19
-rwxr-xr-xgraphics/unknown/unknown_D0D2B4.binbin0 -> 32 bytes
-rwxr-xr-xgraphics/unknown/unknown_D12FEC.pngbin0 -> 84 bytes
-rwxr-xr-xgraphics/unknown/unknown_D1300C.pngbin0 -> 92 bytes
-rwxr-xr-xgraphics/unknown/unknown_D1C060.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_D1C060.pngbin0 -> 159 bytes
-rwxr-xr-xgraphics/unknown/unknown_D83900.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_D83B2C.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_D83C3C.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_D84970.binbin0 -> 8192 bytes
-rwxr-xr-xgraphics/unknown/unknown_D84F00.bin1
-rwxr-xr-xgraphics/unknown/unknown_D8C374.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_D8C5C4.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_D95E00.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/unknown/unknown_D960D0.bin1
-rwxr-xr-xgraphics/unknown/unknown_D963A4.bin1
-rwxr-xr-xgraphics/unknown/unknown_D9A88C.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_D9AE04.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_D9AF44.pal19
-rwxr-xr-xgraphics/unknown/unknown_DD19F8.bin1
-rwxr-xr-xgraphics/unknown/unknown_DD1A18.pngbin0 -> 131 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD1F78.bin1
-rwxr-xr-xgraphics/unknown/unknown_DD2010.binbin0 -> 1200 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD21B0.binbin0 -> 1200 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD228C.binbin0 -> 1200 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD2AE0.bin1
-rwxr-xr-xgraphics/unknown/unknown_DD2B78.binbin0 -> 1200 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD2D30.binbin0 -> 1200 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD2E5C.binbin0 -> 1200 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD36C8.binbin0 -> 528 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD4544.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD4620.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD46E0.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/unknown/unknown_DD47A0.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/unknown/unknown_DDB444.pal19
-rwxr-xr-xgraphics/unknown/unknown_DDCF04.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unknown/unknown_DDD704.binbin0 -> 36 bytes
-rwxr-xr-xgraphics/unknown/unknown_DDD908.bin1
-rwxr-xr-xgraphics/unknown/unknown_DDD920.bin1
-rwxr-xr-xgraphics/unknown/unknown_DDD938.bin1
-rwxr-xr-xgraphics/unknown/unknown_DDDB80.binbin0 -> 720 bytes
-rwxr-xr-xgraphics/unknown/unknown_E6BC04.binbin0 -> 1280 bytes
-rwxr-xr-xgraphics/unused/basic_frame.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unused/basic_frame.pngbin0 -> 230 bytes
-rwxr-xr-xgraphics/unused/battle_anim_023.pal19
-rwxr-xr-xgraphics/unused/blank_frame.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unused/blue_frame.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unused/color_frames.pngbin0 -> 282 bytes
-rwxr-xr-xgraphics/unused/goosuto.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unused/goosuto.pngbin0 -> 290 bytes
-rwxr-xr-xgraphics/unused/green_frame.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unused/line_sketch.pngbin0 -> 328 bytes
-rwxr-xr-xgraphics/unused/line_sketch_2.binbin0 -> 1024 bytes
-rwxr-xr-xgraphics/unused/line_sketch_2.pngbin0 -> 154 bytes
-rwxr-xr-xgraphics/unused/metronome_hand_small.pngbin0 -> 202 bytes
-rwxr-xr-xgraphics/unused/music_notes.pngbin0 -> 310 bytes
-rwxr-xr-xgraphics/unused/old_battle_interface_1.pngbin0 -> 524 bytes
-rwxr-xr-xgraphics/unused/old_battle_interface_2.pngbin0 -> 198 bytes
-rwxr-xr-xgraphics/unused/old_battle_interface_3.pngbin0 -> 226 bytes
-rwxr-xr-xgraphics/unused/old_battle_interface_tilemap.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unused/old_beatup.pngbin0 -> 220 bytes
-rwxr-xr-xgraphics/unused/old_bulbasaur.pngbin0 -> 490 bytes
-rwxr-xr-xgraphics/unused/old_bulbasaur2.pngbin0 -> 520 bytes
-rwxr-xr-xgraphics/unused/old_charizard.pngbin0 -> 335 bytes
-rwxr-xr-xgraphics/unused/old_charmap.binbin0 -> 4096 bytes
-rwxr-xr-xgraphics/unused/old_charmap.pal19
-rwxr-xr-xgraphics/unused/old_charmap.pngbin0 -> 1934 bytes
-rwxr-xr-xgraphics/unused/old_contest.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unused/old_contest.pal259
-rwxr-xr-xgraphics/unused/old_contest_2.binbin0 -> 2048 bytes
-rwxr-xr-xgraphics/unused/old_contest_2.pal259
-rwxr-xr-xgraphics/unused/old_contest_2_1.pngbin0 -> 1829 bytes
-rwxr-xr-xgraphics/unused/old_contest_2_2.pngbin0 -> 1274 bytes
-rwxr-xr-xgraphics/unused/old_contest_classes.pngbin0 -> 292 bytes
-rwxr-xr-xgraphics/unused/old_contest_floor.pngbin0 -> 614 bytes
-rwxr-xr-xgraphics/unused/old_contest_frame_1.pngbin0 -> 359 bytes
-rwxr-xr-xgraphics/unused/old_contest_frame_2.pngbin0 -> 259 bytes
-rwxr-xr-xgraphics/unused/old_contest_meter.pngbin0 -> 212 bytes
-rwxr-xr-xgraphics/unused/old_contest_numbers.pngbin0 -> 324 bytes
-rwxr-xr-xgraphics/unused/old_contest_symbols.pngbin0 -> 237 bytes
-rwxr-xr-xgraphics/unused/old_pal1.pal19
-rwxr-xr-xgraphics/unused/old_pal2.pal19
-rwxr-xr-xgraphics/unused/old_pal3.pal19
-rwxr-xr-xgraphics/unused/old_pal4.pal19
-rwxr-xr-xgraphics/unused/old_pal5.pal19
-rwxr-xr-xgraphics/unused/old_pal6.pal19
-rwxr-xr-xgraphics/unused/old_pal7.pal19
-rwxr-xr-xgraphics/unused/red_frame.binbin0 -> 2048 bytes
-rw-r--r--graphics/unused/redyellowgreen_frame.binbin0 -> 8192 bytes
-rwxr-xr-xgraphics/unused/shadow.pngbin0 -> 170 bytes
-rwxr-xr-xgraphics/unused/unused_DDCEE4.binbin0 -> 32 bytes
-rwxr-xr-xgraphics/unused/water_splash.binbin0 -> 1024 bytes
-rwxr-xr-xgraphics/unused/water_splash.pngbin0 -> 1064 bytes
-rwxr-xr-xgraphics/unused/yellow_frame.binbin0 -> 2048 bytes
-rw-r--r--graphics_file_rules.mk120
-rw-r--r--include/battle.h46
-rw-r--r--include/battle_anim.h8
-rw-r--r--include/bike.h78
-rw-r--r--include/constants/battle_ai.h52
-rw-r--r--include/constants/battle_anim.h85
-rw-r--r--include/constants/opponents.h860
-rw-r--r--include/constants/vars.h3
-rw-r--r--include/data/pokedex_orders.h1199
-rw-r--r--include/field_effect.h2
-rw-r--r--include/field_player_avatar.h21
-rw-r--r--include/fldeff_teleport.h7
-rw-r--r--include/global.fieldmap.h45
-rw-r--r--include/global.h2
-rw-r--r--include/graphics.h2479
-rw-r--r--include/overworld.h3
-rw-r--r--include/party_menu.h2
-rw-r--r--include/rom6.h1
-rw-r--r--include/sprite.h4
-rw-r--r--include/strings.h33
-rw-r--r--ld_script.txt17
-rw-r--r--src/battle_ai_script_commands.c451
-rw-r--r--src/battle_anim.c55
-rw-r--r--src/battle_controller_link_opponent.c1
-rw-r--r--src/battle_controller_link_partner.c1
-rw-r--r--src/battle_controller_opponent.c1
-rw-r--r--src/battle_controller_player.c1
-rw-r--r--src/battle_controller_player_partner.c1
-rw-r--r--src/battle_controller_recorded_opponent.c1
-rw-r--r--src/battle_controller_recorded_player.c1
-rw-r--r--src/battle_controller_safari.c1
-rw-r--r--src/battle_controller_wally.c1
-rw-r--r--src/battle_gfx_sfx_util.c11
-rw-r--r--src/battle_script_commands.c1
-rw-r--r--src/battle_util.c1
-rw-r--r--src/berry_fix_program.c72
-rw-r--r--src/bike.c1078
-rw-r--r--src/dma3_manager.c430
-rw-r--r--src/egg_hatch.c8
-rw-r--r--src/evolution_scene.c6
-rwxr-xr-xsrc/field_map_obj.c4
-rw-r--r--src/fldeff_teleport.c46
-rw-r--r--src/load_save.c162
-rw-r--r--src/mail.c96
-rw-r--r--src/main.c2
-rw-r--r--src/pokedex.c542
-rw-r--r--src/pokemon_icon.c1014
-rw-r--r--src/pokemon_storage_system.c67
-rwxr-xr-xsrc/pokemon_summary_screen.c22
-rw-r--r--src/rayquaza_scene.c1164
-rw-r--r--src/reset_save_heap.c4
-rw-r--r--src/start_menu.c102
-rw-r--r--src/unk_81BAD84.c36
-rw-r--r--src/wallclock.c10
-rw-r--r--src/window.c736
-rw-r--r--sym_ewram.txt4
-rw-r--r--tools/aif2pcm/.gitignore2
-rw-r--r--tools/aif2pcm/LICENSE20
-rw-r--r--tools/aif2pcm/Makefile15
-rw-r--r--tools/aif2pcm/extended.c172
-rw-r--r--tools/aif2pcm/main.c830
-rw-r--r--tools/bin2c/.gitignore1
-rw-r--r--tools/bin2c/LICENSE19
-rw-r--r--tools/bin2c/Makefile13
-rw-r--r--tools/bin2c/bin2c.c201
-rw-r--r--tools/gbagfx/.gitignore1
-rw-r--r--tools/gbagfx/LICENSE19
-rw-r--r--tools/gbagfx/Makefile15
-rw-r--r--tools/gbagfx/convert_png.c212
-rw-r--r--tools/gbagfx/convert_png.h12
-rw-r--r--tools/gbagfx/font.c326
-rw-r--r--tools/gbagfx/font.h16
-rw-r--r--tools/gbagfx/gfx.c329
-rw-r--r--tools/gbagfx/gfx.h36
-rw-r--r--tools/gbagfx/global.h31
-rw-r--r--tools/gbagfx/jasc_pal.c172
-rw-r--r--tools/gbagfx/jasc_pal.h9
-rw-r--r--tools/gbagfx/lz.c155
-rw-r--r--tools/gbagfx/lz.h9
-rw-r--r--tools/gbagfx/main.c402
-rw-r--r--tools/gbagfx/rl.c149
-rw-r--r--tools/gbagfx/rl.h9
-rw-r--r--tools/gbagfx/util.c124
-rw-r--r--tools/gbagfx/util.h14
-rw-r--r--tools/mid2agb/.gitignore1
-rw-r--r--tools/mid2agb/LICENSE19
-rw-r--r--tools/mid2agb/Makefile15
-rw-r--r--tools/mid2agb/agb.cpp462
-rw-r--r--tools/mid2agb/agb.h33
-rw-r--r--tools/mid2agb/error.cpp36
-rw-r--r--tools/mid2agb/error.h26
-rw-r--r--tools/mid2agb/main.cpp230
-rw-r--r--tools/mid2agb/main.h39
-rw-r--r--tools/mid2agb/midi.cpp942
-rw-r--r--tools/mid2agb/midi.h87
-rw-r--r--tools/mid2agb/tables.cpp286
-rw-r--r--tools/mid2agb/tables.h29
-rw-r--r--tools/preproc/.gitignore1
-rw-r--r--tools/preproc/LICENSE19
-rw-r--r--tools/preproc/Makefile17
-rw-r--r--tools/preproc/asm_file.cpp529
-rw-r--r--tools/preproc/asm_file.h72
-rw-r--r--tools/preproc/c_file.cpp421
-rw-r--r--tools/preproc/c_file.h58
-rw-r--r--tools/preproc/char_util.h71
-rw-r--r--tools/preproc/charmap.cpp408
-rw-r--r--tools/preproc/charmap.h64
-rw-r--r--tools/preproc/preproc.cpp156
-rw-r--r--tools/preproc/preproc.h54
-rw-r--r--tools/preproc/string_parser.cpp355
-rw-r--r--tools/preproc/string_parser.h55
-rw-r--r--tools/preproc/utf8.cpp92
-rw-r--r--tools/preproc/utf8.h34
-rw-r--r--tools/ramscrgen/.gitignore1
-rw-r--r--tools/ramscrgen/LICENSE19
-rw-r--r--tools/ramscrgen/Makefile15
-rw-r--r--tools/ramscrgen/char_util.h71
-rw-r--r--tools/ramscrgen/elf.cpp195
-rw-r--r--tools/ramscrgen/elf.h30
-rw-r--r--tools/ramscrgen/main.cpp173
-rw-r--r--tools/ramscrgen/ramscrgen.h49
-rw-r--r--tools/ramscrgen/sym_file.cpp492
-rw-r--r--tools/ramscrgen/sym_file.h71
-rw-r--r--tools/rsfont/.gitignore1
-rw-r--r--tools/rsfont/LICENSE19
-rw-r--r--tools/rsfont/Makefile15
-rw-r--r--tools/rsfont/convert_png.c169
-rw-r--r--tools/rsfont/convert_png.h11
-rw-r--r--tools/rsfont/font.c455
-rw-r--r--tools/rsfont/font.h30
-rw-r--r--tools/rsfont/gfx.h50
-rw-r--r--tools/rsfont/global.h31
-rw-r--r--tools/rsfont/main.c93
-rw-r--r--tools/rsfont/util.c124
-rw-r--r--tools/rsfont/util.h14
-rw-r--r--tools/scaninc/.gitignore1
-rw-r--r--tools/scaninc/LICENSE19
-rw-r--r--tools/scaninc/Makefile15
-rw-r--r--tools/scaninc/asm_file.cpp191
-rw-r--r--tools/scaninc/asm_file.h119
-rw-r--r--tools/scaninc/c_file.cpp298
-rw-r--r--tools/scaninc/c_file.h57
-rw-r--r--tools/scaninc/scaninc.cpp165
-rw-r--r--tools/scaninc/scaninc.h59
1232 files changed, 50126 insertions, 7017 deletions
diff --git a/.gitignore b/.gitignore
index 9f10eb5b1..69183a51a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,8 +15,7 @@
*.latfont
*.hwjpnfont
*.fwjpnfont
-src/*.s
-tools/*
+tools/agbcc
*.map
*.ld
*.bat
diff --git a/INSTALL.md b/INSTALL.md
index 954bd1d97..75adc2ea1 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -2,12 +2,27 @@ First, you must put a Pokémon Emerald (US) ROM in the root directory of the rep
# Linux
-TBD
+Install [**devkitARM**](http://devkitpro.org/wiki/Getting_Started/devkitARM).
+
+Make sure that there is an environment variable called DEVKITARM with the path of the directory before the "bin" directory containing "arm-none-eabi-as", "arm-none-eabi-cpp", "arm-none-eabi-ld" and "arm-none-eabi-objcopy".
+
+Then get the compiler from https://github.com/pret/agbcc and run the following commands.
+
+ build.sh
+ install.sh PATH_OF_POKEEMERALD_DIRECTORY
+
+Then in the pokeemerald directory, build the tools.
+
+ build_tools.sh
+
+Finally, build the rom.
+
+ make
# Windows
Install [**devkitARM**](http://devkitpro.org/wiki/Getting_Started/devkitARM).
-Then download [**pokeruby-tools**](https://github.com/pret/pokeruby-tools). Copy the `tools/` folder with the compiled `exe`s to the `tools/` folder in your `pokeemerald/` directory.
+Then get the compiled tools from https://github.com/pret/pokeruby-tools. Copy the `tools/` folder over the `tools/` folder in your pokeemerald directory.
You can then build pokeemerald using `make` in the MSYS environment provided with devkitARM.
diff --git a/README.md b/README.md
index 814ed4833..727f74abf 100644
--- a/README.md
+++ b/README.md
@@ -13,18 +13,22 @@ To set up the repository, see [**INSTALL.md**](INSTALL.md).
* Disassembly of [**Pokémon Red/Blue**][pokered]
* Disassembly of [**Pokémon Yellow**][pokeyellow]
+* Disassembly of [**Pokémon Gold**][pokegold]
* Disassembly of [**Pokémon Crystal**][pokecrystal]
* Disassembly of [**Pokémon Pinball**][pokepinball]
* Disassembly of [**Pokémon TCG**][poketcg]
* Disassembly of [**Pokémon Ruby**][pokeruby]
+* Disassembly of [**Pokémon Fire Red**][pokefirered]
* Discord: [**pret**][Discord]
* irc: **irc.freenode.net** [**#pret**][irc]
[pokered]: https://github.com/pret/pokered
[pokeyellow]: https://github.com/pret/pokeyellow
+[pokegold]: https://github.com/pret/pokegold
[pokecrystal]: https://github.com/pret/pokecrystal
[pokepinball]: https://github.com/pret/pokepinball
[poketcg]: https://github.com/pret/poketcg
[pokeruby]: https://github.com/pret/pokeruby
+[pokefirered]: https://github.com/pret/pokefirered
[Discord]: https://discord.gg/cJxDDVP
[irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret
diff --git a/asm/battle_anim_80A9C70.s b/asm/battle_anim_80A9C70.s
index bdb1a51ec..c471cc729 100644
--- a/asm/battle_anim_80A9C70.s
+++ b/asm/battle_anim_80A9C70.s
@@ -867,7 +867,7 @@ LaunchStatusAnimation: @ 80AA364
strb r4, [r0]
ldr r0, =gAnimBankTarget
strb r4, [r0]
- ldr r0, =gUnknown_082C92FC
+ ldr r0, =gBattleAnims_Statuses
movs r2, 0
bl LaunchBattleAnimation
ldr r0, =task0A_80788BC
diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s
index 75879519e..a60163139 100644
--- a/asm/battle_anim_80FE840.s
+++ b/asm/battle_anim_80FE840.s
@@ -14567,7 +14567,7 @@ _08105CCC:
lsls r2, 1
adds r0, r2
str r1, [r0]
- ldr r0, =gUnknown_08C22610
+ ldr r0, =gBattleAnimSpritePalette_206
bl LZDecompressWram
movs r4, 0
_08105D00:
@@ -15557,7 +15557,7 @@ _0810653A:
lsls r0, 24
cmp r0, 0
beq _08106578
- ldr r1, =gUnknown_08D93960
+ ldr r1, =gBattleAnimBackgroundTilemap_ScaryFaceContest
b _0810658A
.pool
_08106578:
@@ -15568,7 +15568,7 @@ _08106578:
lsrs r0, 24
cmp r0, 0x1
bne _0810659C
- ldr r1, =gUnknown_08D93598
+ ldr r1, =gBattleAnimBackgroundTilemap_ScaryFacePlayer
_0810658A:
mov r0, sp
movs r2, 0
@@ -15576,7 +15576,7 @@ _0810658A:
b _081065A6
.pool
_0810659C:
- ldr r1, =gUnknown_08D9377C
+ ldr r1, =gBattleAnimBackgroundTilemap_ScaryFaceOpponent
mov r0, sp
movs r2, 0
bl sub_80A6D60
@@ -17067,8 +17067,8 @@ sub_8107144: @ 8107144
.pool
thumb_func_end sub_8107144
- thumb_func_start update_fury_cutter_counter_copy
-update_fury_cutter_counter_copy: @ 8107168
+ thumb_func_start sub_8107168
+sub_8107168: @ 8107168
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -17081,7 +17081,7 @@ update_fury_cutter_counter_copy: @ 8107168
pop {r0}
bx r0
.pool
- thumb_func_end update_fury_cutter_counter_copy
+ thumb_func_end sub_8107168
thumb_func_start sub_8107188
sub_8107188: @ 8107188
@@ -18097,7 +18097,7 @@ _081079E0:
_081079EA:
mov r0, sp
ldrb r0, [r0, 0x9]
- ldr r1, =gUnknown_08D94AB8
+ ldr r1, =gBattleAnimBackgroundImage_Surf
mov r2, sp
ldrh r2, [r2, 0xA]
bl sub_80A6CC0
@@ -18106,7 +18106,7 @@ _081079EA:
ldrsh r0, [r0, r1]
cmp r0, 0
bne _08107A24
- ldr r0, =gUnknown_08D95DD8
+ ldr r0, =gBattleAnimBackgroundPalette_Surf
mov r1, sp
ldrb r1, [r1, 0x8]
lsls r1, 4
@@ -18115,7 +18115,7 @@ _081079EA:
b _08107A32
.pool
_08107A24:
- ldr r0, =gUnknown_08D8FB9C
+ ldr r0, =gBattleAnimBackgroundImageMuddyWater_Pal
mov r1, sp
ldrb r1, [r1, 0x8]
lsls r1, 4
@@ -26969,7 +26969,7 @@ _0810C0E2:
mov r3, sp
ldrh r3, [r3, 0xA]
bl LoadBgTiles
- ldr r1, =gUnknown_08D932E0
+ ldr r1, =gBattleAnimFogTilemap
mov r0, sp
movs r2, 0
bl sub_80A6D60
@@ -27251,7 +27251,7 @@ _0810C366:
mov r3, sp
ldrh r3, [r3, 0xA]
bl LoadBgTiles
- ldr r1, =gUnknown_08D932E0
+ ldr r1, =gBattleAnimFogTilemap
mov r0, sp
movs r2, 0
bl sub_80A6D60
diff --git a/asm/battle_anim_815A0D4.s b/asm/battle_anim_815A0D4.s
index 611e4b067..d583f1e85 100755
--- a/asm/battle_anim_815A0D4.s
+++ b/asm/battle_anim_815A0D4.s
@@ -639,8 +639,8 @@ _0815A5AC:
.pool
thumb_func_end sub_815A52C
- thumb_func_start c3_80DE6F0
-c3_80DE6F0: @ 815A5C8
+ thumb_func_start sub_815A5C8
+sub_815A5C8: @ 815A5C8
lsls r0, 24
lsrs r0, 24
ldr r2, =gTasks
@@ -656,7 +656,7 @@ c3_80DE6F0: @ 815A5C8
strb r0, [r1]
bx lr
.pool
- thumb_func_end c3_80DE6F0
+ thumb_func_end sub_815A5C8
thumb_func_start sub_815A5F0
sub_815A5F0: @ 815A5F0
@@ -3271,8 +3271,8 @@ _0815BAFC:
.pool
thumb_func_end sub_815B7D0
- thumb_func_start c3_80DFBE4
-c3_80DFBE4: @ 815BB18
+ thumb_func_start sub_815BB18
+sub_815BB18: @ 815BB18
push {r4,lr}
lsls r0, 24
lsrs r0, 24
@@ -3297,7 +3297,7 @@ c3_80DFBE4: @ 815BB18
pop {r0}
bx r0
.pool
- thumb_func_end c3_80DFBE4
+ thumb_func_end sub_815BB18
thumb_func_start sub_815BB58
sub_815BB58: @ 815BB58
diff --git a/asm/battle_anim_sound_tasks.s b/asm/battle_anim_sound_tasks.s
index 4bfd7ae68..949934e1d 100644
--- a/asm/battle_anim_sound_tasks.s
+++ b/asm/battle_anim_sound_tasks.s
@@ -150,8 +150,8 @@ _08158C4C:
.pool
thumb_func_end sub_8158C04
- thumb_func_start mas_80DCF38
-mas_80DCF38: @ 8158C58
+ thumb_func_start sub_8158C58
+sub_8158C58: @ 8158C58
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@@ -230,7 +230,7 @@ mas_80DCF38: @ 8158C58
pop {r0}
bx r0
.pool
- thumb_func_end mas_80DCF38
+ thumb_func_end sub_8158C58
thumb_func_start sub_8158D08
sub_8158D08: @ 8158D08
diff --git a/asm/battle_frontier_1.s b/asm/battle_frontier_1.s
index f6e395065..8e82de6c6 100755
--- a/asm/battle_frontier_1.s
+++ b/asm/battle_frontier_1.s
@@ -13641,7 +13641,7 @@ sub_8195ED8: @ 8195ED8
push {r4,lr}
ldr r4, =gMapHeader
ldrb r0, [r4, 0x17]
- bl is_light_level_1_2_3_or_6
+ bl Overworld_MapTypeAllowsTeleportAndFly
lsls r0, 24
cmp r0, 0
beq _08195F30
diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s
index fc5aaf958..1909a7a02 100755
--- a/asm/battle_frontier_2.s
+++ b/asm/battle_frontier_2.s
@@ -189,7 +189,7 @@ _0819A69C:
bl ResetSpriteData
bl ResetTasks
bl FreeAllSpritePalettes
- ldr r0, =gUnknown_08DC0754
+ ldr r0, =gFrontierFactorySelectMenu_Gfx
ldr r5, =gUnknown_0203CE2C
ldr r1, [r5]
movs r2, 0x88
@@ -211,7 +211,7 @@ _0819A69C:
movs r2, 0x60
movs r3, 0
bl LoadBgTiles
- ldr r0, =gUnknown_08DC0B94
+ ldr r0, =gFrontierFactorySelectMenu_Tilemap
ldr r4, =gUnknown_0203CE34
ldr r1, [r4]
movs r2, 0x80
@@ -223,7 +223,7 @@ _0819A69C:
movs r0, 0x1
movs r3, 0
bl LoadBgTilemap
- ldr r0, =gUnknown_08DC0714
+ ldr r0, =gFrontierFactorySelectMenu_Pal
movs r1, 0
movs r2, 0x40
bl LoadPalette
@@ -6646,7 +6646,7 @@ _0819DDA8:
bl ResetTasks
bl FreeAllSpritePalettes
bl dp13_810BB8C
- ldr r0, =gUnknown_08DC0754
+ ldr r0, =gFrontierFactorySelectMenu_Gfx
ldr r5, =gUnknown_0203CE40
ldr r1, [r5]
movs r2, 0x88
@@ -6668,7 +6668,7 @@ _0819DDA8:
movs r2, 0x60
movs r3, 0
bl LoadBgTiles
- ldr r0, =gUnknown_08DC0B94
+ ldr r0, =gFrontierFactorySelectMenu_Tilemap
ldr r4, =gUnknown_0203CE48
ldr r1, [r4]
movs r2, 0x80
@@ -6680,7 +6680,7 @@ _0819DDA8:
movs r0, 0x1
movs r3, 0
bl LoadBgTilemap
- ldr r0, =gUnknown_08DC0714
+ ldr r0, =gFrontierFactorySelectMenu_Pal
movs r1, 0
movs r2, 0x40
bl LoadPalette
diff --git a/asm/bike.s b/asm/bike.s
deleted file mode 100644
index 89791b987..000000000
--- a/asm/bike.s
+++ /dev/null
@@ -1,2199 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start MovePlayerOnBike
-@ void MovePlayerOnBike(int dpad_direction, int buttons_new, int buttons_held)
-MovePlayerOnBike: @ 8119164
- push {r4,lr}
- lsls r0, 24
- lsrs r3, r0, 24
- lsls r1, 16
- lsrs r4, r1, 16
- lsls r2, 16
- lsrs r2, 16
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0]
- movs r0, 0x2
- ands r0, r1
- cmp r0, 0
- beq _0811918C
- adds r0, r3, 0
- adds r1, r4, 0
- bl MovePlayerOnMachBike
- b _08119194
- .pool
-_0811918C:
- adds r0, r3, 0
- adds r1, r4, 0
- bl MovePlayerOnAcroBike
-_08119194:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end MovePlayerOnBike
-
- thumb_func_start MovePlayerOnMachBike
-MovePlayerOnMachBike: @ 811919C
- push {r4,lr}
- sub sp, 0x4
- mov r1, sp
- strb r0, [r1]
- ldr r4, =gUnknown_0859744C
- mov r0, sp
- bl CheckMovementInputMachBike
- lsls r0, 24
- lsrs r0, 22
- adds r0, r4
- mov r1, sp
- ldrb r1, [r1]
- ldr r2, [r0]
- adds r0, r1, 0
- bl _call_via_r2
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end MovePlayerOnMachBike
-
- thumb_func_start CheckMovementInputMachBike
-CheckMovementInputMachBike: @ 81191CC
- push {r4,lr}
- adds r4, r0, 0
- bl player_get_direction_upper_nybble
- lsls r0, 24
- lsrs r0, 24
- adds r3, r0, 0
- ldrb r1, [r4]
- cmp r1, 0
- bne _081191F4
- strb r0, [r4]
- ldr r2, =gPlayerAvatar
- ldrb r0, [r2, 0xB]
- cmp r0, 0
- bne _08119208
- strb r1, [r2, 0x2]
- movs r0, 0
- b _0811921C
- .pool
-_081191F4:
- ldr r2, =gPlayerAvatar
- cmp r1, r3
- beq _08119218
- ldrb r0, [r2, 0x2]
- cmp r0, 0x2
- beq _08119218
- ldrb r0, [r2, 0xB]
- cmp r0, 0
- beq _08119214
- strb r3, [r4]
-_08119208:
- movs r0, 0x2
- strb r0, [r2, 0x2]
- movs r0, 0x3
- b _0811921C
- .pool
-_08119214:
- movs r0, 0x1
- b _0811921A
-_08119218:
- movs r0, 0x2
-_0811921A:
- strb r0, [r2, 0x2]
-_0811921C:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end CheckMovementInputMachBike
-
- thumb_func_start sub_8119224
-sub_8119224: @ 8119224
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- bl PlayerFaceDirection
- bl sub_811A128
- pop {r0}
- bx r0
- thumb_func_end sub_8119224
-
- thumb_func_start sub_8119238
-sub_8119238: @ 8119238
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r5, r0, 24
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r4, r0, r1
- ldrb r1, [r4, 0x1E]
- adds r0, r5, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- beq _08119270
- adds r0, r5, 0
- bl PlayerTurnInPlace
- bl sub_811A128
- b _0811927A
- .pool
-_08119270:
- ldrb r0, [r4, 0x18]
- lsls r0, 28
- lsrs r0, 28
- bl sub_8119224
-_0811927A:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8119238
-
- thumb_func_start sub_8119280
-sub_8119280: @ 8119280
- push {r4-r7,lr}
- lsls r0, 24
- lsrs r5, r0, 24
- adds r7, r5, 0
- ldr r6, =gPlayerAvatar
- ldrb r1, [r6, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r4, r0, r1
- ldrb r1, [r4, 0x1E]
- adds r0, r5, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _081192C6
- ldrb r0, [r6, 0xB]
- cmp r0, 0
- beq _081192BC
- ldrb r0, [r4, 0x18]
- lsrs r0, 4
- bl sub_8119344
- b _0811933A
- .pool
-_081192BC:
- ldrb r0, [r4, 0x18]
- lsrs r0, 4
- bl sub_8119224
- b _0811933A
-_081192C6:
- adds r0, r5, 0
- bl sub_8119E38
- lsls r0, 24
- lsrs r4, r0, 24
- movs r1, 0xFF
- lsls r1, 24
- adds r0, r1
- lsrs r0, 24
- cmp r0, 0xA
- bhi _08119316
- cmp r4, 0x6
- bne _081192E8
- adds r0, r5, 0
- bl PlayerJumpLedge
- b _0811933A
-_081192E8:
- bl sub_811A128
- cmp r4, 0x4
- bne _08119304
- adds r0, r5, 0
- bl IsPlayerCollidingWithFarawayIslandMew
- lsls r0, 24
- cmp r0, 0
- beq _08119304
- adds r0, r5, 0
- bl PlayerOnBikeCollideWithFarawayIslandMew
- b _0811933A
-_08119304:
- subs r0, r4, 0x5
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x3
- bls _0811933A
- adds r0, r7, 0
- bl PlayerOnBikeCollide
- b _0811933A
-_08119316:
- ldr r1, =gUnknown_0859745C
- ldrb r0, [r6, 0xA]
- lsls r0, 2
- adds r0, r1
- ldr r1, [r0]
- adds r0, r7, 0
- bl _call_via_r1
- ldrb r2, [r6, 0xA]
- lsls r0, r2, 24
- lsrs r1, r0, 24
- lsrs r0, 25
- adds r0, r2, r0
- strb r0, [r6, 0xB]
- cmp r1, 0x1
- bhi _0811933A
- adds r0, r2, 0x1
- strb r0, [r6, 0xA]
-_0811933A:
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8119280
-
- thumb_func_start sub_8119344
-sub_8119344: @ 8119344
- push {r4-r7,lr}
- lsls r0, 24
- lsrs r5, r0, 24
- adds r7, r5, 0
- ldr r6, =gPlayerAvatar
- ldrb r0, [r6, 0xB]
- cmp r0, 0
- beq _0811935A
- subs r0, 0x1
- strb r0, [r6, 0xB]
- strb r0, [r6, 0xA]
-_0811935A:
- adds r0, r5, 0
- bl sub_8119E38
- lsls r0, 24
- lsrs r4, r0, 24
- movs r1, 0xFF
- lsls r1, 24
- adds r0, r1
- lsrs r0, 24
- cmp r0, 0xA
- bhi _081193AE
- cmp r4, 0x6
- bne _08119380
- adds r0, r5, 0
- bl PlayerJumpLedge
- b _081193BE
- .pool
-_08119380:
- bl sub_811A128
- cmp r4, 0x4
- bne _0811939C
- adds r0, r5, 0
- bl IsPlayerCollidingWithFarawayIslandMew
- lsls r0, 24
- cmp r0, 0
- beq _0811939C
- adds r0, r5, 0
- bl PlayerOnBikeCollideWithFarawayIslandMew
- b _081193BE
-_0811939C:
- subs r0, r4, 0x5
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x3
- bls _081193BE
- adds r0, r7, 0
- bl PlayerOnBikeCollide
- b _081193BE
-_081193AE:
- ldr r0, =gUnknown_0859745C
- ldrb r1, [r6, 0xA]
- lsls r1, 2
- adds r1, r0
- ldr r1, [r1]
- adds r0, r7, 0
- bl _call_via_r1
-_081193BE:
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8119344
-
- thumb_func_start MovePlayerOnAcroBike
-@ void MovePlayerOnAcroBike(int dpad_direction, int buttons_new, int buttons_held)
-MovePlayerOnAcroBike: @ 81193C8
- push {r4,lr}
- sub sp, 0x4
- mov r3, sp
- strb r0, [r3]
- lsls r1, 16
- lsrs r1, 16
- lsls r2, 16
- lsrs r2, 16
- ldr r4, =gUnknown_08597468
- mov r0, sp
- bl CheckMovementInputAcroBike
- lsls r0, 24
- lsrs r0, 22
- adds r0, r4
- mov r1, sp
- ldrb r1, [r1]
- ldr r2, [r0]
- adds r0, r1, 0
- bl _call_via_r2
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end MovePlayerOnAcroBike
-
- thumb_func_start CheckMovementInputAcroBike
-CheckMovementInputAcroBike: @ 8119400
- push {r4,lr}
- lsls r1, 16
- lsrs r1, 16
- lsls r2, 16
- lsrs r2, 16
- ldr r4, =gUnknown_0859749C
- ldr r3, =gPlayerAvatar
- ldrb r3, [r3, 0x8]
- lsls r3, 2
- adds r3, r4
- ldr r3, [r3]
- bl _call_via_r3
- lsls r0, 24
- lsrs r0, 24
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end CheckMovementInputAcroBike
-
- thumb_func_start CheckMovementInputAcroBikeNormal
-CheckMovementInputAcroBikeNormal: @ 811942C
- push {r4-r6,lr}
- adds r4, r0, 0
- lsls r1, 16
- lsrs r6, r1, 16
- lsls r2, 16
- lsrs r5, r2, 16
- bl player_get_direction_upper_nybble
- lsls r0, 24
- lsrs r3, r0, 24
- ldr r2, =gPlayerAvatar
- movs r0, 0
- strb r0, [r2, 0xA]
- ldrb r1, [r4]
- cmp r1, 0
- bne _0811946C
- movs r0, 0x2
- ands r0, r6
- cmp r0, 0
- beq _08119464
- strb r3, [r4]
- strb r1, [r2, 0x2]
- movs r0, 0x2
- strb r0, [r2, 0x8]
- movs r0, 0x3
- b _081194C0
- .pool
-_08119464:
- strb r3, [r4]
- strb r1, [r2, 0x2]
- movs r0, 0
- b _081194C0
-_0811946C:
- cmp r1, r3
- bne _08119492
- movs r0, 0x2
- ands r0, r5
- cmp r0, 0
- beq _0811948A
- ldrb r0, [r2, 0xB]
- cmp r0, 0
- bne _0811948A
- adds r0, 0x1
- strb r0, [r2, 0xB]
- movs r0, 0x4
- strb r0, [r2, 0x8]
- movs r0, 0xB
- b _081194C0
-_0811948A:
- ldrb r0, [r4]
- ldr r2, =gPlayerAvatar
- cmp r0, r3
- beq _081194BC
-_08119492:
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x2]
- adds r2, r0, 0
- cmp r1, 0x2
- beq _081194BC
- movs r1, 0
- movs r0, 0x1
- strb r0, [r2, 0x8]
- ldrb r0, [r4]
- strb r0, [r2, 0x9]
- strb r1, [r2, 0x2]
- adds r0, r4, 0
- adds r1, r6, 0
- adds r2, r5, 0
- bl CheckMovementInputAcroBike
- lsls r0, 24
- lsrs r0, 24
- b _081194C0
- .pool
-_081194BC:
- movs r0, 0x2
- strb r0, [r2, 0x2]
-_081194C0:
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end CheckMovementInputAcroBikeNormal
-
- thumb_func_start CheckMovementInputAcroBikeChangingDirection
-CheckMovementInputAcroBikeChangingDirection: @ 81194C8
- push {r4-r6,lr}
- adds r5, r0, 0
- ldr r4, =gPlayerAvatar
- ldrb r0, [r4, 0x9]
- strb r0, [r5]
- ldrb r0, [r4, 0xA]
- adds r0, 0x1
- strb r0, [r4, 0xA]
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x6
- bls _081194F4
- movs r0, 0x1
- strb r0, [r4, 0x2]
- movs r0, 0
- strb r0, [r4, 0x8]
- bl sub_811A128
- movs r0, 0x1
- b _0811953A
- .pool
-_081194F4:
- bl player_get_direction_upper_nybble
- lsls r0, 24
- lsrs r6, r0, 24
- bl sub_8119D30
- ldrb r1, [r5]
- lsls r0, 24
- lsrs r0, 24
- cmp r1, r0
- bne _08119536
- bl sub_811A128
- movs r0, 0x1
- strb r0, [r4, 0xB]
- adds r0, r6, 0
- bl GetOppositeDirection
- ldrb r1, [r5]
- lsls r0, 24
- lsrs r0, 24
- cmp r1, r0
- bne _0811952A
- movs r0, 0x6
- strb r0, [r4, 0x8]
- movs r0, 0x9
- b _0811953A
-_0811952A:
- movs r0, 0x2
- strb r0, [r4, 0x2]
- movs r0, 0x5
- strb r0, [r4, 0x8]
- movs r0, 0x8
- b _0811953A
-_08119536:
- strb r6, [r5]
- movs r0, 0
-_0811953A:
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end CheckMovementInputAcroBikeChangingDirection
-
- thumb_func_start CheckMovementInputAcroBikeStandingWheelie
-CheckMovementInputAcroBikeStandingWheelie: @ 8119540
- push {r4-r7,lr}
- adds r7, r0, 0
- lsls r4, r2, 16
- lsrs r4, 16
- bl player_get_direction_upper_nybble
- lsls r0, 24
- lsrs r6, r0, 24
- ldr r5, =gPlayerAvatar
- ldrb r1, [r5, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r1, r0, r1
- movs r0, 0
- strb r0, [r5, 0x2]
- movs r0, 0x2
- ands r4, r0
- lsls r4, 16
- lsrs r4, 16
- cmp r4, 0
- bne _08119594
- strb r4, [r5, 0xA]
- ldrb r0, [r1, 0x1E]
- bl MetatileBehavior_IsBumpySlope
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0
- bne _0811959A
- strb r6, [r7]
- strb r0, [r5, 0x8]
- bl sub_811A128
- movs r0, 0x4
- b _081195D8
- .pool
-_08119594:
- ldrb r0, [r5, 0xA]
- adds r0, 0x1
- strb r0, [r5, 0xA]
-_0811959A:
- ldr r1, =gPlayerAvatar
- ldrb r0, [r1, 0xA]
- cmp r0, 0x27
- bls _081195B4
- strb r6, [r7]
- movs r0, 0x3
- strb r0, [r1, 0x8]
- bl sub_811A128
- movs r0, 0x6
- b _081195D8
- .pool
-_081195B4:
- ldrb r0, [r7]
- cmp r0, r6
- bne _081195CA
- movs r0, 0x2
- strb r0, [r1, 0x2]
- movs r0, 0x4
- strb r0, [r1, 0x8]
- bl sub_811A128
- movs r0, 0xA
- b _081195D8
-_081195CA:
- cmp r0, 0
- beq _081195D4
- movs r0, 0x1
- strb r0, [r1, 0x2]
- b _081195D6
-_081195D4:
- strb r6, [r7]
-_081195D6:
- movs r0, 0x5
-_081195D8:
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end CheckMovementInputAcroBikeStandingWheelie
-
- thumb_func_start CheckMovementInputAcroBikeBunnyHop
-CheckMovementInputAcroBikeBunnyHop: @ 81195E0
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- adds r6, r0, 0
- lsls r1, 16
- lsrs r1, 16
- mov r9, r1
- lsls r2, 16
- lsrs r2, 16
- mov r8, r2
- bl player_get_direction_upper_nybble
- lsls r0, 24
- lsrs r5, r0, 24
- adds r2, r5, 0
- ldr r4, =gPlayerAvatar
- ldrb r1, [r4, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r7, r0, r1
- movs r0, 0x2
- mov r1, r8
- ands r0, r1
- cmp r0, 0
- bne _08119652
- bl sub_811A128
- ldrb r0, [r7, 0x1E]
- bl MetatileBehavior_IsBumpySlope
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0
- beq _08119648
- movs r0, 0x2
- strb r0, [r4, 0x8]
- adds r0, r6, 0
- mov r1, r9
- mov r2, r8
- bl CheckMovementInputAcroBike
- lsls r0, 24
- lsrs r0, 24
- b _08119676
- .pool
-_08119648:
- strb r5, [r6]
- strb r0, [r4, 0x2]
- strb r0, [r4, 0x8]
- movs r0, 0x4
- b _08119676
-_08119652:
- ldrb r0, [r6]
- cmp r0, 0
- bne _0811965C
- strb r5, [r6]
- b _08119668
-_0811965C:
- cmp r0, r2
- beq _0811966E
- ldrb r0, [r4, 0x2]
- cmp r0, 0x2
- beq _0811966E
- movs r0, 0x1
-_08119668:
- strb r0, [r4, 0x2]
- movs r0, 0x6
- b _08119676
-_0811966E:
- ldr r1, =gPlayerAvatar
- movs r0, 0x2
- strb r0, [r1, 0x2]
- movs r0, 0x7
-_08119676:
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r1}
- bx r1
- .pool
- thumb_func_end CheckMovementInputAcroBikeBunnyHop
-
- thumb_func_start CheckMovementInputAcroBikeMovingWheelie
-CheckMovementInputAcroBikeMovingWheelie: @ 8119688
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- adds r6, r0, 0
- lsls r1, 16
- lsrs r1, 16
- mov r10, r1
- lsls r2, 16
- lsrs r2, 16
- mov r8, r2
- bl player_get_direction_lower_nybble
- lsls r0, 24
- lsrs r5, r0, 24
- adds r2, r5, 0
- ldr r4, =gPlayerAvatar
- ldrb r1, [r4, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r7, r0, r1
- movs r0, 0x2
- mov r9, r0
- movs r0, 0x2
- mov r1, r8
- ands r0, r1
- cmp r0, 0
- bne _08119720
- bl sub_811A128
- ldrb r0, [r7, 0x1E]
- bl MetatileBehavior_IsBumpySlope
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0
- bne _0811970C
- strb r1, [r4, 0x8]
- ldrb r0, [r6]
- cmp r0, 0
- bne _081196EC
- strb r5, [r6]
- b _081196F6
- .pool
-_081196EC:
- cmp r0, r5
- beq _081196FC
- ldrb r0, [r4, 0x2]
- cmp r0, 0x2
- beq _081196FC
-_081196F6:
- strb r1, [r4, 0x2]
- movs r0, 0x4
- b _08119750
-_081196FC:
- ldr r1, =gPlayerAvatar
- movs r0, 0x2
- strb r0, [r1, 0x2]
- movs r0, 0xC
- b _08119750
- .pool
-_0811970C:
- mov r0, r9
- strb r0, [r4, 0x8]
- adds r0, r6, 0
- mov r1, r10
- mov r2, r8
- bl CheckMovementInputAcroBike
- lsls r0, 24
- lsrs r0, 24
- b _08119750
-_08119720:
- ldrb r0, [r6]
- cmp r0, 0
- bne _08119736
- strb r5, [r6]
- mov r1, r9
- strb r1, [r4, 0x8]
- strb r0, [r4, 0x2]
- bl sub_811A128
- movs r0, 0x5
- b _08119750
-_08119736:
- cmp r2, r0
- beq _08119748
- ldrb r0, [r4, 0x2]
- cmp r0, 0x2
- beq _08119748
- movs r0, 0
- strb r0, [r4, 0x2]
- movs r0, 0x5
- b _08119750
-_08119748:
- ldr r1, =gPlayerAvatar
- movs r0, 0x2
- strb r0, [r1, 0x2]
- movs r0, 0xA
-_08119750:
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r1}
- bx r1
- .pool
- thumb_func_end CheckMovementInputAcroBikeMovingWheelie
-
- thumb_func_start CheckMovementInputAcroBikeUnknownMode5
-CheckMovementInputAcroBikeUnknownMode5: @ 8119764
- push {r4-r6,lr}
- mov r6, r8
- push {r6}
- mov r8, r0
- adds r4, r1, 0
- adds r5, r2, 0
- lsls r4, 16
- lsrs r4, 16
- lsls r5, 16
- lsrs r5, 16
- ldr r6, =gPlayerAvatar
- ldrb r1, [r6, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r0, r1
- ldrb r2, [r0, 0x1]
- movs r1, 0x3
- negs r1, r1
- ands r1, r2
- strb r1, [r0, 0x1]
- ldrb r1, [r0, 0x18]
- lsls r1, 28
- lsrs r1, 28
- bl FieldObjectSetDirection
- movs r0, 0
- strb r0, [r6, 0x8]
- mov r0, r8
- adds r1, r4, 0
- adds r2, r5, 0
- bl CheckMovementInputAcroBike
- lsls r0, 24
- lsrs r0, 24
- pop {r3}
- mov r8, r3
- pop {r4-r6}
- pop {r1}
- bx r1
- .pool
- thumb_func_end CheckMovementInputAcroBikeUnknownMode5
-
- thumb_func_start CheckMovementInputAcroBikeUnknownMode6
-CheckMovementInputAcroBikeUnknownMode6: @ 81197C0
- push {r4,lr}
- lsls r1, 16
- lsrs r1, 16
- lsls r2, 16
- lsrs r2, 16
- ldr r4, =gPlayerAvatar
- movs r3, 0
- strb r3, [r4, 0x8]
- bl CheckMovementInputAcroBike
- lsls r0, 24
- lsrs r0, 24
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end CheckMovementInputAcroBikeUnknownMode6
-
- thumb_func_start sub_81197E4
-sub_81197E4: @ 81197E4
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- bl PlayerFaceDirection
- pop {r0}
- bx r0
- thumb_func_end sub_81197E4
-
- thumb_func_start sub_81197F4
-sub_81197F4: @ 81197F4
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r5, r0, r1
- ldrb r1, [r5, 0x1E]
- adds r0, r4, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _0811981A
- ldrb r0, [r5, 0x18]
- lsrs r4, r0, 4
-_0811981A:
- adds r0, r4, 0
- bl PlayerFaceDirection
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81197F4
-
- thumb_func_start sub_8119830
-sub_8119830: @ 8119830
- push {r4-r6,lr}
- lsls r0, 24
- lsrs r5, r0, 24
- adds r6, r5, 0
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r4, r0, r1
- ldrb r1, [r4, 0x1E]
- adds r0, r5, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _08119868
- ldrb r0, [r4, 0x18]
- lsrs r0, 4
- bl sub_81197E4
- b _081198BA
- .pool
-_08119868:
- adds r0, r5, 0
- bl sub_8119E38
- lsls r0, 24
- lsrs r4, r0, 24
- movs r1, 0xFF
- lsls r1, 24
- adds r0, r1
- lsrs r0, 24
- cmp r0, 0xA
- bhi _081198B4
- cmp r4, 0x6
- bne _0811988A
- adds r0, r5, 0
- bl PlayerJumpLedge
- b _081198BA
-_0811988A:
- cmp r4, 0x4
- bne _081198A2
- adds r0, r5, 0
- bl IsPlayerCollidingWithFarawayIslandMew
- lsls r0, 24
- cmp r0, 0
- beq _081198A2
- adds r0, r5, 0
- bl PlayerOnBikeCollideWithFarawayIslandMew
- b _081198BA
-_081198A2:
- subs r0, r4, 0x5
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x3
- bls _081198BA
- adds r0, r6, 0
- bl PlayerOnBikeCollide
- b _081198BA
-_081198B4:
- adds r0, r6, 0
- bl PlayerGoSpeed2
-_081198BA:
- pop {r4-r6}
- pop {r0}
- bx r0
- thumb_func_end sub_8119830
-
- thumb_func_start sub_81198C0
-sub_81198C0: @ 81198C0
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r5, r0, r1
- ldrb r1, [r5, 0x1E]
- adds r0, r4, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _081198E6
- ldrb r0, [r5, 0x18]
- lsrs r4, r0, 4
-_081198E6:
- adds r0, r4, 0
- bl sub_808B8C0
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81198C0
-
- thumb_func_start sub_81198FC
-sub_81198FC: @ 81198FC
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r5, r0, r1
- ldrb r1, [r5, 0x1E]
- adds r0, r4, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _08119922
- ldrb r0, [r5, 0x18]
- lsrs r4, r0, 4
-_08119922:
- adds r0, r4, 0
- bl sub_808B8D8
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81198FC
-
- thumb_func_start sub_8119938
-sub_8119938: @ 8119938
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r5, r0, r1
- ldrb r1, [r5, 0x1E]
- adds r0, r4, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _0811995E
- ldrb r0, [r5, 0x18]
- lsrs r4, r0, 4
-_0811995E:
- adds r0, r4, 0
- bl sub_808B8A8
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8119938
-
- thumb_func_start sub_8119974
-sub_8119974: @ 8119974
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r5, r0, r1
- ldrb r1, [r5, 0x1E]
- adds r0, r4, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _0811999A
- ldrb r0, [r5, 0x18]
- lsrs r4, r0, 4
-_0811999A:
- adds r0, r4, 0
- bl sub_808B8F0
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8119974
-
- thumb_func_start sub_81199B0
-sub_81199B0: @ 81199B0
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r5, r0, r1
- ldrb r1, [r5, 0x1E]
- adds r0, r4, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _081199E4
- ldrb r0, [r5, 0x18]
- lsrs r0, 4
- bl sub_8119974
- b _08119A1E
- .pool
-_081199E4:
- adds r0, r4, 0
- bl sub_8119E38
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0
- beq _08119A18
- cmp r1, 0x9
- beq _08119A18
- cmp r1, 0x6
- bne _08119A02
- adds r0, r4, 0
- bl sub_808B938
- b _08119A1E
-_08119A02:
- subs r0, r1, 0x5
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x3
- bls _08119A1E
- cmp r1, 0xB
- bhi _08119A18
- adds r0, r4, 0
- bl sub_8119974
- b _08119A1E
-_08119A18:
- adds r0, r4, 0
- bl sub_808B914
-_08119A1E:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_81199B0
-
- thumb_func_start sub_8119A24
-sub_8119A24: @ 8119A24
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r5, r0, 24
- adds r0, r5, 0
- bl sub_8119E38
- lsls r0, 24
- lsrs r0, 24
- adds r1, r0, 0
- cmp r0, 0
- beq _08119A58
- cmp r0, 0x7
- beq _08119A84
- cmp r0, 0x9
- bls _08119A50
- adds r0, r1, 0
- adds r1, r5, 0
- bl sub_8119FC4
- lsls r0, 24
- cmp r0, 0
- bne _08119A58
-_08119A50:
- adds r0, r5, 0
- bl sub_81197F4
- b _08119A84
-_08119A58:
- ldr r0, =gPlayerAvatar
- ldrb r0, [r0, 0x5]
- lsls r4, r0, 3
- adds r4, r0
- lsls r4, 2
- ldr r0, =gMapObjects
- adds r4, r0
- movs r0, 0x22
- bl PlaySE
- ldrb r0, [r4, 0x1]
- movs r1, 0x2
- orrs r0, r1
- strb r0, [r4, 0x1]
- adds r0, r5, 0
- bl sub_8093514
- lsls r0, 24
- lsrs r0, 24
- movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
-_08119A84:
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8119A24
-
- thumb_func_start sub_8119A94
-sub_8119A94: @ 8119A94
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- bl sub_808B95C
- pop {r0}
- bx r0
- thumb_func_end sub_8119A94
-
- thumb_func_start sub_8119AA4
-sub_8119AA4: @ 8119AA4
- push {r4-r7,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- adds r6, r4, 0
- ldr r7, =gPlayerAvatar
- ldrb r1, [r7, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r5, r0, r1
- ldrb r1, [r5, 0x1E]
- adds r0, r4, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _08119ADC
- ldrb r0, [r5, 0x18]
- lsrs r0, 4
- bl sub_808B8A8
- b _08119B2C
- .pool
-_08119ADC:
- adds r0, r4, 0
- bl sub_8119E38
- lsls r0, 24
- lsrs r1, r0, 24
- movs r2, 0xFF
- lsls r2, 24
- adds r0, r2
- lsrs r0, 24
- cmp r0, 0xA
- bhi _08119B22
- cmp r1, 0x6
- bne _08119AFE
- adds r0, r4, 0
- bl sub_808B938
- b _08119B2C
-_08119AFE:
- cmp r1, 0x9
- beq _08119B12
- cmp r1, 0x4
- bhi _08119B2C
- ldrb r0, [r5, 0x1E]
- bl MetatileBehavior_IsBumpySlope
- lsls r0, 24
- cmp r0, 0
- beq _08119B1A
-_08119B12:
- adds r0, r4, 0
- bl sub_808B8A8
- b _08119B2C
-_08119B1A:
- adds r0, r4, 0
- bl sub_808B980
- b _08119B2C
-_08119B22:
- adds r0, r6, 0
- bl sub_808B9BC
- movs r0, 0x2
- strb r0, [r7, 0x2]
-_08119B2C:
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_8119AA4
-
- thumb_func_start sub_8119B34
-sub_8119B34: @ 8119B34
- push {r4-r7,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- adds r6, r4, 0
- ldr r7, =gPlayerAvatar
- ldrb r1, [r7, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r5, r0, r1
- ldrb r1, [r5, 0x1E]
- adds r0, r4, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _08119B6C
- ldrb r0, [r5, 0x18]
- lsrs r0, 4
- bl sub_808B8C0
- b _08119BBC
- .pool
-_08119B6C:
- adds r0, r4, 0
- bl sub_8119E38
- lsls r0, 24
- lsrs r1, r0, 24
- movs r2, 0xFF
- lsls r2, 24
- adds r0, r2
- lsrs r0, 24
- cmp r0, 0xA
- bhi _08119BB2
- cmp r1, 0x6
- bne _08119B8E
- adds r0, r4, 0
- bl sub_808B938
- b _08119BBC
-_08119B8E:
- cmp r1, 0x9
- beq _08119BA2
- cmp r1, 0x4
- bhi _08119BBC
- ldrb r0, [r5, 0x1E]
- bl MetatileBehavior_IsBumpySlope
- lsls r0, 24
- cmp r0, 0
- beq _08119BAA
-_08119BA2:
- adds r0, r4, 0
- bl sub_808B8A8
- b _08119BBC
-_08119BAA:
- adds r0, r4, 0
- bl sub_808B980
- b _08119BBC
-_08119BB2:
- adds r0, r6, 0
- bl sub_808B9A4
- movs r0, 0x2
- strb r0, [r7, 0x2]
-_08119BBC:
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_8119B34
-
- thumb_func_start sub_8119BC4
-sub_8119BC4: @ 8119BC4
- push {r4-r6,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- adds r6, r4, 0
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, =gMapObjects
- adds r5, r0, r1
- ldrb r1, [r5, 0x1E]
- adds r0, r4, 0
- bl sub_8119F74
- lsls r0, 24
- cmp r0, 0
- bne _08119BFC
- ldrb r0, [r5, 0x18]
- lsrs r0, 4
- bl sub_808B8D8
- b _08119C36
- .pool
-_08119BFC:
- adds r0, r4, 0
- bl sub_8119E38
- lsls r0, 24
- lsrs r1, r0, 24
- movs r2, 0xFF
- lsls r2, 24
- adds r0, r2
- lsrs r0, 24
- cmp r0, 0xA
- bhi _08119C30
- cmp r1, 0x6
- bne _08119C1E
- adds r0, r4, 0
- bl PlayerJumpLedge
- b _08119C36
-_08119C1E:
- subs r0, r1, 0x5
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x3
- bls _08119C36
- adds r0, r4, 0
- bl sub_808B8D8
- b _08119C36
-_08119C30:
- adds r0, r6, 0
- bl npc_use_some_d2s
-_08119C36:
- pop {r4-r6}
- pop {r0}
- bx r0
- thumb_func_end sub_8119BC4
-
- thumb_func_start sub_8119C3C
-@ void sub_8119C3C(int buttons_new, int buttons_held)
-sub_8119C3C: @ 8119C3C
- push {lr}
- lsls r0, 16
- lsrs r3, r0, 16
- lsls r1, 16
- lsrs r2, r1, 16
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _08119C5A
- adds r0, r3, 0
- adds r1, r2, 0
- bl sub_8119C64
-_08119C5A:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8119C3C
-
- thumb_func_start sub_8119C64
-@ void sub_8119C64(int buttons_new, int buttons_held)
-sub_8119C64: @ 8119C64
- push {r4,r5,lr}
- lsls r1, 16
- lsrs r5, r1, 16
- adds r0, r5, 0
- bl sub_8119DF8
- lsls r0, 24
- lsrs r2, r0, 24
- ldr r4, =gPlayerAvatar
- ldr r0, [r4, 0xC]
- movs r1, 0xF
- ands r0, r1
- cmp r2, r0
- bne _08119C90
- ldrb r0, [r4, 0x14]
- cmp r0, 0xFE
- bhi _08119C9A
- adds r0, 0x1
- strb r0, [r4, 0x14]
- b _08119C9A
- .pool
-_08119C90:
- adds r0, r2, 0
- bl sub_8119D80
- movs r0, 0
- strb r0, [r4, 0xB]
-_08119C9A:
- movs r0, 0xF
- adds r2, r5, 0
- ands r2, r0
- ldr r4, =gPlayerAvatar
- ldr r0, [r4, 0x10]
- movs r1, 0xF
- ands r0, r1
- cmp r2, r0
- bne _08119CBC
- ldrb r0, [r4, 0x1C]
- cmp r0, 0xFE
- bhi _08119CC6
- adds r0, 0x1
- strb r0, [r4, 0x1C]
- b _08119CC6
- .pool
-_08119CBC:
- adds r0, r2, 0
- bl sub_8119DBC
- movs r0, 0
- strb r0, [r4, 0xB]
-_08119CC6:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_8119C64
-
- thumb_func_start sub_8119CCC
-sub_8119CCC: @ 8119CCC
- push {r4,r5,lr}
- adds r3, r0, 0
- adds r4, r1, 0
- movs r2, 0
- ldrb r0, [r3]
- cmp r0, 0
- beq _08119CF6
- ldr r5, =gUnknown_020375A4
-_08119CDC:
- adds r0, r2, r5
- adds r1, r3, r2
- ldrb r0, [r0]
- ldrb r1, [r1]
- cmp r0, r1
- bhi _08119D0C
- adds r0, r2, 0x1
- lsls r0, 24
- lsrs r2, r0, 24
- adds r0, r3, r2
- ldrb r0, [r0]
- cmp r0, 0
- bne _08119CDC
-_08119CF6:
- movs r2, 0
- ldrb r0, [r4]
- cmp r0, 0
- beq _08119D26
- ldr r3, =gUnknown_020375AC
-_08119D00:
- adds r0, r2, r3
- adds r1, r4, r2
- ldrb r0, [r0]
- ldrb r1, [r1]
- cmp r0, r1
- bls _08119D18
-_08119D0C:
- movs r0, 0
- b _08119D28
- .pool
-_08119D18:
- adds r0, r2, 0x1
- lsls r0, 24
- lsrs r2, r0, 24
- adds r0, r4, r2
- ldrb r0, [r0]
- cmp r0, 0
- bne _08119D00
-_08119D26:
- movs r0, 0x1
-_08119D28:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end sub_8119CCC
-
- thumb_func_start sub_8119D30
-sub_8119D30: @ 8119D30
- push {r4-r6,lr}
- movs r6, 0
- movs r5, 0
-_08119D36:
- ldr r0, =gUnknown_085974C0
- adds r4, r5, r0
- ldr r0, =gPlayerAvatar
- ldr r1, [r0, 0xC]
- ldr r2, [r0, 0x10]
- ldr r0, [r4, 0x8]
- ands r1, r0
- ldr r0, [r4, 0xC]
- ands r2, r0
- ldr r0, [r4]
- cmp r1, r0
- bne _08119D70
- ldr r0, [r4, 0x4]
- cmp r2, r0
- bne _08119D70
- ldr r0, [r4, 0x10]
- ldr r1, [r4, 0x14]
- bl sub_8119CCC
- lsls r0, 24
- cmp r0, 0
- beq _08119D70
- ldrb r0, [r4, 0x18]
- b _08119D7A
- .pool
-_08119D70:
- adds r5, 0x1C
- adds r6, 0x1
- cmp r6, 0x3
- bls _08119D36
- movs r0, 0
-_08119D7A:
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end sub_8119D30
-
- thumb_func_start sub_8119D80
-sub_8119D80: @ 8119D80
- push {r4,lr}
- lsls r0, 24
- ldr r3, =gPlayerAvatar
- ldr r2, [r3, 0xC]
- lsls r2, 4
- movs r1, 0xF0
- lsls r1, 20
- ands r1, r0
- lsrs r1, 24
- orrs r2, r1
- str r2, [r3, 0xC]
- movs r1, 0x7
- adds r4, r3, 0
- adds r3, 0x14
-_08119D9C:
- adds r2, r1, r3
- subs r1, 0x1
- adds r0, r1, r3
- ldrb r0, [r0]
- strb r0, [r2]
- lsls r1, 24
- lsrs r1, 24
- cmp r1, 0
- bne _08119D9C
- movs r0, 0x1
- strb r0, [r4, 0x14]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8119D80
-
- thumb_func_start sub_8119DBC
-sub_8119DBC: @ 8119DBC
- push {r4,lr}
- lsls r0, 24
- ldr r3, =gPlayerAvatar
- ldr r2, [r3, 0x10]
- lsls r2, 4
- movs r1, 0xF0
- lsls r1, 20
- ands r1, r0
- lsrs r1, 24
- orrs r2, r1
- str r2, [r3, 0x10]
- movs r1, 0x7
- adds r4, r3, 0
- adds r3, 0x1C
-_08119DD8:
- adds r2, r1, r3
- subs r1, 0x1
- adds r0, r1, r3
- ldrb r0, [r0]
- strb r0, [r2]
- lsls r1, 24
- lsrs r1, 24
- cmp r1, 0
- bne _08119DD8
- movs r0, 0x1
- strb r0, [r4, 0x1C]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8119DBC
-
- thumb_func_start sub_8119DF8
-sub_8119DF8: @ 8119DF8
- push {lr}
- lsls r0, 16
- lsrs r1, r0, 16
- adds r2, r1, 0
- movs r0, 0x40
- ands r0, r1
- cmp r0, 0
- beq _08119E0C
- movs r0, 0x2
- b _08119E32
-_08119E0C:
- movs r0, 0x80
- ands r0, r1
- cmp r0, 0
- beq _08119E18
- movs r0, 0x1
- b _08119E32
-_08119E18:
- movs r0, 0x20
- ands r0, r1
- cmp r0, 0
- beq _08119E24
- movs r0, 0x3
- b _08119E32
-_08119E24:
- movs r0, 0x10
- ands r2, r0
- cmp r2, 0
- bne _08119E30
- movs r0, 0
- b _08119E32
-_08119E30:
- movs r0, 0x4
-_08119E32:
- pop {r1}
- bx r1
- thumb_func_end sub_8119DF8
-
- thumb_func_start sub_8119E38
-sub_8119E38: @ 8119E38
- push {r4-r6,lr}
- sub sp, 0x8
- adds r6, r0, 0
- lsls r6, 24
- lsrs r6, 24
- ldr r0, =gPlayerAvatar
- ldrb r0, [r0, 0x5]
- lsls r4, r0, 3
- adds r4, r0
- lsls r4, 2
- ldr r0, =gMapObjects
- adds r4, r0
- ldrh r1, [r4, 0x10]
- add r0, sp, 0x4
- strh r1, [r0]
- ldrh r0, [r4, 0x12]
- mov r5, sp
- adds r5, 0x6
- strh r0, [r5]
- adds r0, r6, 0
- add r1, sp, 0x4
- adds r2, r5, 0
- bl MoveCoords
- add r0, sp, 0x4
- movs r1, 0
- ldrsh r0, [r0, r1]
- movs r2, 0
- ldrsh r1, [r5, r2]
- bl MapGridGetMetatileBehaviorAt
- lsls r0, 24
- lsrs r0, 24
- add r1, sp, 0x4
- movs r3, 0
- ldrsh r1, [r1, r3]
- movs r3, 0
- ldrsh r2, [r5, r3]
- str r0, [sp]
- adds r0, r4, 0
- adds r3, r6, 0
- bl sub_8119EA4
- lsls r0, 24
- lsrs r0, 24
- add sp, 0x8
- pop {r4-r6}
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_8119E38
-
- thumb_func_start sub_8119EA4
-sub_8119EA4: @ 8119EA4
- push {r4,r5,lr}
- sub sp, 0x4
- ldr r4, [sp, 0x10]
- lsls r3, 24
- lsrs r3, 24
- lsls r4, 24
- lsrs r4, 24
- adds r5, r4, 0
- lsls r1, 16
- asrs r1, 16
- lsls r2, 16
- asrs r2, 16
- str r5, [sp]
- bl CheckForFieldObjectCollision
- lsls r0, 24
- lsrs r4, r0, 24
- cmp r4, 0x4
- bhi _08119EE4
- cmp r4, 0
- bne _08119EE0
- adds r0, r5, 0
- bl IsRunningDisallowedByMetatile
- lsls r0, 24
- cmp r0, 0
- beq _08119EDC
- movs r4, 0x2
-_08119EDC:
- cmp r4, 0
- beq _08119EE4
-_08119EE0:
- bl sub_8119F50
-_08119EE4:
- adds r0, r4, 0
- add sp, 0x4
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end sub_8119EA4
-
- thumb_func_start sub_8119EF0
-sub_8119EF0: @ 8119EF0
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- bl IsRunningDisallowedByMetatile
- lsls r0, 24
- cmp r0, 0
- bne _08119F08
- ldr r0, =gMapHeader
- ldrb r0, [r0, 0x17]
- cmp r0, 0x8
- bne _08119F10
-_08119F08:
- movs r0, 0x1
- b _08119F12
- .pool
-_08119F10:
- movs r0, 0
-_08119F12:
- pop {r1}
- bx r1
- thumb_func_end sub_8119EF0
-
- thumb_func_start IsRunningDisallowedByMetatile
-@ bool8 IsRunningDisallowedByMetatile(u8 metatileBehavior)
-IsRunningDisallowedByMetatile: @ 8119F18
- push {r4,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- adds r0, r4, 0
- bl MetatileBehavior_IsRunningDisallowed
- lsls r0, 24
- cmp r0, 0
- bne _08119F42
- adds r0, r4, 0
- bl MetatileBehavior_IsFortreeBridge
- lsls r0, 24
- cmp r0, 0
- beq _08119F46
- bl PlayerGetZCoord
- movs r1, 0x1
- ands r1, r0
- cmp r1, 0
- bne _08119F46
-_08119F42:
- movs r0, 0x1
- b _08119F48
-_08119F46:
- movs r0, 0
-_08119F48:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end IsRunningDisallowedByMetatile
-
- thumb_func_start sub_8119F50
-sub_8119F50: @ 8119F50
- push {lr}
- ldr r0, =gUnknown_0203AB54
- ldrb r0, [r0]
- cmp r0, 0
- beq _08119F66
- ldr r1, =gUnknown_0203AB55
- ldrb r0, [r1]
- cmp r0, 0x63
- bhi _08119F66
- adds r0, 0x1
- strb r0, [r1]
-_08119F66:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8119F50
-
- thumb_func_start sub_8119F74
-sub_8119F74: @ 8119F74
- push {r4,r5,lr}
- lsls r0, 24
- lsls r1, 24
- lsrs r4, r1, 24
- adds r5, r4, 0
- movs r1, 0xFD
- lsls r1, 24
- adds r0, r1
- lsrs r0, 24
- cmp r0, 0x1
- bhi _08119F9E
- adds r0, r4, 0
- bl MetatileBehavior_IsIsolatedVerticalRail
- lsls r0, 24
- cmp r0, 0
- bne _08119FB6
- adds r0, r4, 0
- bl MetatileBehavior_IsVerticalRail
- b _08119FB0
-_08119F9E:
- adds r0, r5, 0
- bl MetatileBehavior_IsIsolatedHorizontalRail
- lsls r0, 24
- cmp r0, 0
- bne _08119FB6
- adds r0, r5, 0
- bl MetatileBehavior_IsHorizontalRail
-_08119FB0:
- lsls r0, 24
- cmp r0, 0
- beq _08119FBA
-_08119FB6:
- movs r0, 0
- b _08119FBC
-_08119FBA:
- movs r0, 0x1
-_08119FBC:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end sub_8119F74
-
- thumb_func_start sub_8119FC4
-sub_8119FC4: @ 8119FC4
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- adds r2, r0, 0
- lsls r1, 24
- movs r3, 0xFF
- lsls r3, 24
- adds r1, r3
- lsrs r1, 24
- cmp r1, 0x1
- bhi _08119FE4
- cmp r0, 0xA
- beq _08119FEC
- cmp r0, 0xC
- bne _08119FF0
- b _08119FEC
-_08119FE4:
- cmp r2, 0xB
- beq _08119FEC
- cmp r2, 0xD
- bne _08119FF0
-_08119FEC:
- movs r0, 0
- b _08119FF2
-_08119FF0:
- movs r0, 0x1
-_08119FF2:
- pop {r1}
- bx r1
- thumb_func_end sub_8119FC4
-
- thumb_func_start sub_8119FF8
-sub_8119FF8: @ 8119FF8
- push {r4,lr}
- sub sp, 0x4
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0]
- movs r0, 0x18
- ands r0, r1
- cmp r0, 0
- bne _0811A038
- mov r4, sp
- adds r4, 0x2
- mov r0, sp
- adds r1, r4, 0
- bl PlayerGetDestCoords
- mov r0, sp
- movs r1, 0
- ldrsh r0, [r0, r1]
- movs r2, 0
- ldrsh r1, [r4, r2]
- bl MapGridGetMetatileBehaviorAt
- lsls r0, 24
- lsrs r0, 24
- bl IsRunningDisallowedByMetatile
- lsls r0, 24
- cmp r0, 0
- bne _0811A038
- movs r0, 0
- b _0811A03A
- .pool
-_0811A038:
- movs r0, 0x1
-_0811A03A:
- add sp, 0x4
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end sub_8119FF8
-
- thumb_func_start player_should_look_direction_be_enforced_upon_movement
-player_should_look_direction_be_enforced_upon_movement: @ 811A044
- push {lr}
- movs r0, 0x4
- bl TestPlayerAvatarFlags
- lsls r0, 24
- cmp r0, 0
- beq _0811A078
- ldr r2, =gMapObjects
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0, 0x5]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- adds r0, r2
- ldrb r0, [r0, 0x1E]
- bl MetatileBehavior_IsBumpySlope
- lsls r0, 24
- cmp r0, 0
- beq _0811A078
- movs r0, 0
- b _0811A07A
- .pool
-_0811A078:
- movs r0, 0x1
-_0811A07A:
- pop {r1}
- bx r1
- thumb_func_end player_should_look_direction_be_enforced_upon_movement
-
- thumb_func_start GetOnOffBike
-@ void GetOnOffBike(u8 transitionFlags)
-GetOnOffBike: @ 811A080
- push {r4,lr}
- lsls r0, 24
- lsrs r2, r0, 24
- ldr r1, =gUnknown_02037348
- movs r0, 0
- strb r0, [r1]
- ldr r0, =gPlayerAvatar
- ldrb r1, [r0]
- movs r0, 0x6
- ands r0, r1
- cmp r0, 0
- beq _0811A0B0
- movs r0, 0x1
- bl SetPlayerAvatarTransitionFlags
- bl Overworld_ClearSavedMusic
- bl sub_8085784
- b _0811A0C4
- .pool
-_0811A0B0:
- adds r0, r2, 0
- bl SetPlayerAvatarTransitionFlags
- ldr r4, =0x00000193
- adds r0, r4, 0
- bl Overworld_SetSavedMusic
- adds r0, r4, 0
- bl Overworld_ChangeMusicTo
-_0811A0C4:
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end GetOnOffBike
-
- thumb_func_start sub_811A0D0
-sub_811A0D0: @ 811A0D0
- push {lr}
- ldr r2, =gPlayerAvatar
- movs r3, 0
- strb r3, [r2, 0x8]
- strb r3, [r2, 0x9]
- strb r3, [r2, 0xA]
- strb r3, [r2, 0xB]
- str r0, [r2, 0xC]
- str r1, [r2, 0x10]
- movs r1, 0
- adds r2, 0x14
-_0811A0E6:
- adds r0, r1, r2
- strb r3, [r0]
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x7
- bls _0811A0E6
- movs r1, 0
- ldr r3, =gUnknown_020375AC
- movs r2, 0
-_0811A0FA:
- adds r0, r1, r3
- strb r2, [r0]
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x7
- bls _0811A0FA
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811A0D0
-
- thumb_func_start sub_811A114
-sub_811A114: @ 811A114
- lsls r0, 24
- lsrs r0, 24
- ldr r2, =gPlayerAvatar
- strb r0, [r2, 0xA]
- lsrs r1, r0, 1
- adds r0, r1
- strb r0, [r2, 0xB]
- bx lr
- .pool
- thumb_func_end sub_811A114
-
- thumb_func_start sub_811A128
-sub_811A128: @ 811A128
- ldr r1, =gPlayerAvatar
- movs r0, 0
- strb r0, [r1, 0xA]
- strb r0, [r1, 0xB]
- bx lr
- .pool
- thumb_func_end sub_811A128
-
- thumb_func_start sub_811A138
-sub_811A138: @ 811A138
- push {lr}
- sub sp, 0x8
- ldr r1, =gUnknown_085974B8
- mov r0, sp
- movs r2, 0x6
- bl memcpy
- ldr r2, =gPlayerAvatar
- ldrb r1, [r2]
- movs r0, 0x2
- ands r0, r1
- cmp r0, 0
- beq _0811A168
- ldrb r0, [r2, 0xA]
- lsls r0, 1
- add r0, sp
- movs r1, 0
- ldrsh r0, [r0, r1]
- b _0811A182
- .pool
-_0811A168:
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _0811A174
- movs r0, 0x3
- b _0811A182
-_0811A174:
- movs r0, 0x88
- ands r0, r1
- cmp r0, 0
- bne _0811A180
- movs r0, 0x1
- b _0811A182
-_0811A180:
- movs r0, 0x2
-_0811A182:
- add sp, 0x8
- pop {r1}
- bx r1
- thumb_func_end sub_811A138
-
- thumb_func_start sub_811A188
-sub_811A188: @ 811A188
- push {r4,r5,lr}
- sub sp, 0x4
- ldr r5, =gPlayerAvatar
- ldrb r1, [r5]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _0811A1D0
- mov r4, sp
- adds r4, 0x2
- mov r0, sp
- adds r1, r4, 0
- bl PlayerGetDestCoords
- mov r0, sp
- movs r1, 0
- ldrsh r0, [r0, r1]
- movs r2, 0
- ldrsh r1, [r4, r2]
- bl MapGridGetMetatileBehaviorAt
- lsls r0, 24
- lsrs r0, 24
- bl MetatileBehavior_IsBumpySlope
- lsls r0, 24
- cmp r0, 0
- beq _0811A1D0
- movs r0, 0x2
- strb r0, [r5, 0x8]
- bl player_get_direction_upper_nybble
- lsls r0, 24
- lsrs r0, 24
- bl sub_808C1B4
-_0811A1D0:
- add sp, 0x4
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_811A188
-
- thumb_func_start IsRunningDisallowed
-@ bool8 IsRunningDisallowed(u8 metatileBehavior)
-IsRunningDisallowed: @ 811A1DC
- push {lr}
- lsls r0, 24
- lsrs r2, r0, 24
- ldr r0, =gMapHeader
- ldrb r1, [r0, 0x1A]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _0811A1FC
- adds r0, r2, 0
- bl IsRunningDisallowedByMetatile
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _0811A204
-_0811A1FC:
- movs r0, 0x1
- b _0811A206
- .pool
-_0811A204:
- movs r0, 0
-_0811A206:
- pop {r1}
- bx r1
- thumb_func_end IsRunningDisallowed
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/contest.s b/asm/contest.s
index 5749350c7..7577826cf 100644
--- a/asm/contest.s
+++ b/asm/contest.s
@@ -6652,7 +6652,7 @@ sub_80DB0C4: @ 80DB0C4
push {r4,r5,lr}
ldr r0, =gUnknown_08587C00
bl LoadCompressedObjectPic
- ldr r0, =gUnknown_08C1C6B8
+ ldr r0, =gContest2Pal
movs r1, 0x88
lsls r1, 1
movs r2, 0x20
@@ -11731,7 +11731,7 @@ _080DD956:
ldr r1, [r0]
movs r0, 0x13
ldrsb r0, [r1, r0]
- ldr r4, =gUnknown_08D8EC24
+ ldr r4, =gContestApplauseMeterGfx
cmp r5, r0
bge _080DD966
adds r4, 0x40
diff --git a/asm/easy_chat.s b/asm/easy_chat.s
index f65c379c2..86c78d2cf 100644
--- a/asm/easy_chat.s
+++ b/asm/easy_chat.s
@@ -3966,14 +3966,14 @@ _0811BFE0:
b _0811C124
.pool
_0811C044:
- ldr r1, =gUnknown_08DCBDD0
+ ldr r1, =gEasyChatWindow_Gfx
movs r0, 0
str r0, [sp]
movs r0, 0x3
movs r2, 0
movs r3, 0
bl copy_decompressed_tile_data_to_vram_autofree
- ldr r1, =gUnknown_08DCBF10
+ ldr r1, =gEasyChatWindow_Tilemap
movs r0, 0x3
movs r2, 0
movs r3, 0
@@ -5810,7 +5810,7 @@ sub_811CF04: @ 811CF04
sub_811CF64: @ 811CF64
push {r4,lr}
bl ResetPaletteFade
- ldr r0, =gUnknown_08DCBDB0
+ ldr r0, =gEasyChatMode_Pal
movs r1, 0
movs r2, 0x20
bl LoadPalette
diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s
index 9252b79d2..e0e7b5efb 100644
--- a/asm/field_control_avatar.s
+++ b/asm/field_control_avatar.s
@@ -62,7 +62,7 @@ _0809BF3C:
cmp r6, 0
bne _0809BFA2
_0809BF40:
- bl sub_811A138
+ bl GetPlayerSpeed
lsls r0, 16
asrs r0, 16
cmp r0, 0x4
diff --git a/asm/field_effect.s b/asm/field_effect.s
index 170aa6a63..b6b4803d8 100644
--- a/asm/field_effect.s
+++ b/asm/field_effect.s
@@ -2027,7 +2027,7 @@ _080B6A8A:
thumb_func_start mapldr_08084390
mapldr_08084390: @ 80B6AA4
push {r4,lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_black
ldr r0, =c3_080843F8
movs r1, 0
@@ -2113,7 +2113,7 @@ _080B6B58:
thumb_func_start sub_80B6B68
sub_80B6B68: @ 80B6B68
push {lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_for_maplights
bl ScriptContext2_Enable
bl FreezeMapObjects
@@ -2780,7 +2780,7 @@ _080B709C:
thumb_func_start sub_80B70B4
sub_80B70B4: @ 80B70B4
push {lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_for_maplights
bl ScriptContext2_Enable
ldr r0, =sub_80B70DC
@@ -3747,7 +3747,7 @@ _080B784C:
thumb_func_start mapldr_080851BC
mapldr_080851BC: @ 80B7868
push {lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_for_maplights
bl ScriptContext2_Enable
ldr r0, =gFieldCallback
@@ -4458,7 +4458,7 @@ _080B7E40:
thumb_func_start mapldr_080859D4
mapldr_080859D4: @ 80B7E48
push {lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_for_maplights
bl ScriptContext2_Enable
bl FreezeMapObjects
@@ -4903,7 +4903,7 @@ _080B81E6:
thumb_func_start mapldr_08085D88
mapldr_08085D88: @ 80B8200
push {lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_for_maplights
bl ScriptContext2_Enable
bl FreezeMapObjects
diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s
index 62681e7fb..5385e2eba 100644
--- a/asm/field_player_avatar.s
+++ b/asm/field_player_avatar.s
@@ -57,7 +57,7 @@ player_step: @ 808A9C0
bne _0808AA26
adds r0, r7, 0
adds r1, r6, 0
- bl sub_8119C3C
+ bl Bike_TryAcroBikeHistoryUpdate
adds r0, r5, 0
mov r1, r8
bl TryInterruptFieldObjectSpecialAnim
@@ -405,7 +405,7 @@ DoForcedMovementInCurrentDirection: @ 808AC58
thumb_func_start ForcedMovement_Slip
ForcedMovement_Slip: @ 808AC8C
push {lr}
- ldr r0, =PlayerGoSpeed1
+ ldr r0, =PlayerGoSpeed2
bl DoForcedMovementInCurrentDirection
lsls r0, 24
lsrs r0, 24
@@ -417,7 +417,7 @@ ForcedMovement_Slip: @ 808AC8C
thumb_func_start ForcedMovement_WalkSouth
ForcedMovement_WalkSouth: @ 808ACA0
push {lr}
- ldr r1, =PlayerGoSpeed0
+ ldr r1, =PlayerGoSpeed1
movs r0, 0x1
bl DoForcedMovement
lsls r0, 24
@@ -430,7 +430,7 @@ ForcedMovement_WalkSouth: @ 808ACA0
thumb_func_start ForcedMovement_WalkNorth
ForcedMovement_WalkNorth: @ 808ACB8
push {lr}
- ldr r1, =PlayerGoSpeed0
+ ldr r1, =PlayerGoSpeed1
movs r0, 0x2
bl DoForcedMovement
lsls r0, 24
@@ -443,7 +443,7 @@ ForcedMovement_WalkNorth: @ 808ACB8
thumb_func_start ForcedMovement_WalkWest
ForcedMovement_WalkWest: @ 808ACD0
push {lr}
- ldr r1, =PlayerGoSpeed0
+ ldr r1, =PlayerGoSpeed1
movs r0, 0x3
bl DoForcedMovement
lsls r0, 24
@@ -456,7 +456,7 @@ ForcedMovement_WalkWest: @ 808ACD0
thumb_func_start ForcedMovement_WalkEast
ForcedMovement_WalkEast: @ 808ACE8
push {lr}
- ldr r1, =PlayerGoSpeed0
+ ldr r1, =PlayerGoSpeed1
movs r0, 0x4
bl DoForcedMovement
lsls r0, 24
@@ -469,7 +469,7 @@ ForcedMovement_WalkEast: @ 808ACE8
thumb_func_start ForcedMovement_PushedSouthByCurrent
ForcedMovement_PushedSouthByCurrent: @ 808AD00
push {lr}
- ldr r1, =PlayerGoSpeed2
+ ldr r1, =PlayerGoSpeed3
movs r0, 0x1
bl DoForcedMovement
lsls r0, 24
@@ -482,7 +482,7 @@ ForcedMovement_PushedSouthByCurrent: @ 808AD00
thumb_func_start ForcedMovement_PushedNorthByCurrent
ForcedMovement_PushedNorthByCurrent: @ 808AD18
push {lr}
- ldr r1, =PlayerGoSpeed2
+ ldr r1, =PlayerGoSpeed3
movs r0, 0x2
bl DoForcedMovement
lsls r0, 24
@@ -495,7 +495,7 @@ ForcedMovement_PushedNorthByCurrent: @ 808AD18
thumb_func_start ForcedMovement_PushedWestByCurrent
ForcedMovement_PushedWestByCurrent: @ 808AD30
push {lr}
- ldr r1, =PlayerGoSpeed2
+ ldr r1, =PlayerGoSpeed3
movs r0, 0x3
bl DoForcedMovement
lsls r0, 24
@@ -508,7 +508,7 @@ ForcedMovement_PushedWestByCurrent: @ 808AD30
thumb_func_start ForcedMovement_PushedEastByCurrent
ForcedMovement_PushedEastByCurrent: @ 808AD48
push {lr}
- ldr r1, =PlayerGoSpeed2
+ ldr r1, =PlayerGoSpeed3
movs r0, 0x4
bl DoForcedMovement
lsls r0, 24
@@ -548,7 +548,7 @@ ForcedMovement_Slide: @ 808AD60
thumb_func_start ForcedMovement_SlideSouth
ForcedMovement_SlideSouth: @ 808AD98
push {lr}
- ldr r1, =PlayerGoSpeed1
+ ldr r1, =PlayerGoSpeed2
movs r0, 0x1
bl ForcedMovement_Slide
lsls r0, 24
@@ -561,7 +561,7 @@ ForcedMovement_SlideSouth: @ 808AD98
thumb_func_start ForcedMovement_SlideNorth
ForcedMovement_SlideNorth: @ 808ADB0
push {lr}
- ldr r1, =PlayerGoSpeed1
+ ldr r1, =PlayerGoSpeed2
movs r0, 0x2
bl ForcedMovement_Slide
lsls r0, 24
@@ -574,7 +574,7 @@ ForcedMovement_SlideNorth: @ 808ADB0
thumb_func_start ForcedMovement_SlideWest
ForcedMovement_SlideWest: @ 808ADC8
push {lr}
- ldr r1, =PlayerGoSpeed1
+ ldr r1, =PlayerGoSpeed2
movs r0, 0x3
bl ForcedMovement_Slide
lsls r0, 24
@@ -587,7 +587,7 @@ ForcedMovement_SlideWest: @ 808ADC8
thumb_func_start ForcedMovement_SlideEast
ForcedMovement_SlideEast: @ 808ADE0
push {lr}
- ldr r1, =PlayerGoSpeed1
+ ldr r1, =PlayerGoSpeed2
movs r0, 0x4
bl ForcedMovement_Slide
lsls r0, 24
@@ -630,19 +630,19 @@ ForcedMovement_MuddySlope: @ 808AE10
ands r0, r1
cmp r0, 0x20
bne _0808AE36
- bl sub_811A138
+ bl GetPlayerSpeed
lsls r0, 16
asrs r0, 16
cmp r0, 0x3
bgt _0808AE60
_0808AE36:
movs r0, 0
- bl sub_811A114
+ bl Bike_UpdateBikeCounterSpeed
ldrb r0, [r4, 0x1]
movs r1, 0x2
orrs r0, r1
strb r0, [r4, 0x1]
- ldr r1, =PlayerGoSpeed1
+ ldr r1, =PlayerGoSpeed2
movs r0, 0x1
bl DoForcedMovement
lsls r0, 24
@@ -791,7 +791,7 @@ _0808AF4E:
cmp r0, 0
beq _0808AF68
adds r0, r5, 0
- bl PlayerGoSpeed1
+ bl PlayerGoSpeed2
b _0808AFB6
.pool
_0808AF68:
@@ -829,7 +829,7 @@ _0808AF68:
.pool
_0808AFB0:
adds r0, r5, 0
- bl PlayerGoSpeed0
+ bl PlayerGoSpeed1
_0808AFB6:
pop {r4-r6}
pop {r0}
@@ -1471,7 +1471,7 @@ PlayerAvatarTransition_MachBike: @ 808B46C
bl SetPlayerAvatarStateMask
movs r0, 0
movs r1, 0
- bl sub_811A0D0
+ bl BikeClearState
pop {r4}
pop {r0}
bx r0
@@ -1497,8 +1497,8 @@ PlayerAvatarTransition_AcroBike: @ 808B4A0
bl SetPlayerAvatarStateMask
movs r0, 0
movs r1, 0
- bl sub_811A0D0
- bl sub_811A188
+ bl BikeClearState
+ bl Bike_HandleBumpySlopeJump
pop {r4}
pop {r0}
bx r0
@@ -1774,9 +1774,9 @@ sub_808B6BC: @ 808B6BC
.pool
thumb_func_end sub_808B6BC
- thumb_func_start player_npc_set_state_and_x22_etc
-@ void player_npc_set_state_and_x22_etc(u8 animState, u8 a2)
-player_npc_set_state_and_x22_etc: @ 808B6E4
+ thumb_func_start PlayerSetAnimId
+@ void PlayerSetAnimId(u8 animState, u8 a2)
+PlayerSetAnimId: @ 808B6E4
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
@@ -1802,11 +1802,11 @@ _0808B712:
pop {r0}
bx r0
.pool
- thumb_func_end player_npc_set_state_and_x22_etc
+ thumb_func_end PlayerSetAnimId
- thumb_func_start PlayerGoSpeed0
-@ void PlayerGoSpeed0(u8 direction)
-PlayerGoSpeed0: @ 808B720
+ thumb_func_start PlayerGoSpeed1
+@ void PlayerGoSpeed1(u8 direction)
+PlayerGoSpeed1: @ 808B720
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -1814,14 +1814,14 @@ PlayerGoSpeed0: @ 808B720
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
- thumb_func_end PlayerGoSpeed0
+ thumb_func_end PlayerGoSpeed1
- thumb_func_start PlayerGoSpeed1
-@ void PlayerGoSpeed1(u8 direction)
-PlayerGoSpeed1: @ 808B738
+ thumb_func_start PlayerGoSpeed2
+@ void PlayerGoSpeed2(u8 direction)
+PlayerGoSpeed2: @ 808B738
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -1829,14 +1829,14 @@ PlayerGoSpeed1: @ 808B738
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
- thumb_func_end PlayerGoSpeed1
+ thumb_func_end PlayerGoSpeed2
- thumb_func_start PlayerGoSpeed2
-@ void PlayerGoSpeed2(u8 direction)
-PlayerGoSpeed2: @ 808B750
+ thumb_func_start PlayerGoSpeed3
+@ void PlayerGoSpeed3(u8 direction)
+PlayerGoSpeed3: @ 808B750
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -1844,14 +1844,14 @@ PlayerGoSpeed2: @ 808B750
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
- thumb_func_end PlayerGoSpeed2
+ thumb_func_end PlayerGoSpeed3
- thumb_func_start PlayerGoSpeed3
-@ void PlayerGoSpeed3(u8 direction)
-PlayerGoSpeed3: @ 808B768
+ thumb_func_start PlayerGoSpeed4
+@ void PlayerGoSpeed4(u8 direction)
+PlayerGoSpeed4: @ 808B768
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -1859,10 +1859,10 @@ PlayerGoSpeed3: @ 808B768
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
- thumb_func_end PlayerGoSpeed3
+ thumb_func_end PlayerGoSpeed4
thumb_func_start PlayerRun
@ void PlayerRun(u8 direction)
@@ -1874,7 +1874,7 @@ PlayerRun: @ 808B780
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
thumb_func_end PlayerRun
@@ -1893,7 +1893,7 @@ PlayerOnBikeCollide: @ 808B798
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r4}
pop {r0}
bx r0
@@ -1909,7 +1909,7 @@ PlayerOnBikeCollideWithFarawayIslandMew: @ 808B7BC
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
thumb_func_end PlayerOnBikeCollideWithFarawayIslandMew
@@ -1928,7 +1928,7 @@ PlayerNotOnBikeCollide: @ 808B7D4
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r4}
pop {r0}
bx r0
@@ -1944,7 +1944,7 @@ PlayerNotOnBikeCollideWithFarawayIslandMew: @ 808B7F8
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
thumb_func_end PlayerNotOnBikeCollideWithFarawayIslandMew
@@ -1959,7 +1959,7 @@ PlayerFaceDirection: @ 808B810
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
thumb_func_end PlayerFaceDirection
@@ -1974,7 +1974,7 @@ PlayerTurnInPlace: @ 808B828
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
thumb_func_end PlayerTurnInPlace
@@ -1993,7 +1993,7 @@ PlayerJumpLedge: @ 808B840
lsls r0, 24
lsrs r0, 24
movs r1, 0x8
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r4}
pop {r0}
bx r0
@@ -2033,8 +2033,8 @@ _0808B89A:
.pool
thumb_func_end sub_808B864
- thumb_func_start sub_808B8A8
-sub_808B8A8: @ 808B8A8
+ thumb_func_start PlayerIdleWheelie
+PlayerIdleWheelie: @ 808B8A8
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -2042,13 +2042,13 @@ sub_808B8A8: @ 808B8A8
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
- thumb_func_end sub_808B8A8
+ thumb_func_end PlayerIdleWheelie
- thumb_func_start sub_808B8C0
-sub_808B8C0: @ 808B8C0
+ thumb_func_start PlayerStartWheelie
+PlayerStartWheelie: @ 808B8C0
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -2056,13 +2056,13 @@ sub_808B8C0: @ 808B8C0
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
- thumb_func_end sub_808B8C0
+ thumb_func_end PlayerStartWheelie
- thumb_func_start sub_808B8D8
-sub_808B8D8: @ 808B8D8
+ thumb_func_start PlayerEndWheelie
+PlayerEndWheelie: @ 808B8D8
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -2070,13 +2070,13 @@ sub_808B8D8: @ 808B8D8
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
- thumb_func_end sub_808B8D8
+ thumb_func_end PlayerEndWheelie
- thumb_func_start sub_808B8F0
-sub_808B8F0: @ 808B8F0
+ thumb_func_start PlayerStandingHoppingWheelie
+PlayerStandingHoppingWheelie: @ 808B8F0
push {r4,lr}
adds r4, r0, 0
lsls r4, 24
@@ -2088,14 +2088,14 @@ sub_808B8F0: @ 808B8F0
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r4}
pop {r0}
bx r0
- thumb_func_end sub_808B8F0
+ thumb_func_end PlayerStandingHoppingWheelie
- thumb_func_start sub_808B914
-sub_808B914: @ 808B914
+ thumb_func_start PlayerMovingHoppingWheelie
+PlayerMovingHoppingWheelie: @ 808B914
push {r4,lr}
adds r4, r0, 0
lsls r4, 24
@@ -2107,14 +2107,14 @@ sub_808B914: @ 808B914
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r4}
pop {r0}
bx r0
- thumb_func_end sub_808B914
+ thumb_func_end PlayerMovingHoppingWheelie
- thumb_func_start sub_808B938
-sub_808B938: @ 808B938
+ thumb_func_start PlayerLedgeHoppingWheelie
+PlayerLedgeHoppingWheelie: @ 808B938
push {r4,lr}
adds r4, r0, 0
lsls r4, 24
@@ -2126,14 +2126,14 @@ sub_808B938: @ 808B938
lsls r0, 24
lsrs r0, 24
movs r1, 0x8
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r4}
pop {r0}
bx r0
- thumb_func_end sub_808B938
+ thumb_func_end PlayerLedgeHoppingWheelie
- thumb_func_start sub_808B95C
-sub_808B95C: @ 808B95C
+ thumb_func_start PlayerAcroTurnJump
+PlayerAcroTurnJump: @ 808B95C
push {r4,lr}
adds r4, r0, 0
lsls r4, 24
@@ -2145,11 +2145,11 @@ sub_808B95C: @ 808B95C
lsls r0, 24
lsrs r0, 24
movs r1, 0x1
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r4}
pop {r0}
bx r0
- thumb_func_end sub_808B95C
+ thumb_func_end PlayerAcroTurnJump
thumb_func_start sub_808B980
sub_808B980: @ 808B980
@@ -2164,7 +2164,7 @@ sub_808B980: @ 808B980
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r4}
pop {r0}
bx r0
@@ -2179,7 +2179,7 @@ sub_808B9A4: @ 808B9A4
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
thumb_func_end sub_808B9A4
@@ -2193,7 +2193,7 @@ sub_808B9BC: @ 808B9BC
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
thumb_func_end sub_808B9BC
@@ -2207,7 +2207,7 @@ npc_use_some_d2s: @ 808B9D4
lsls r0, 24
lsrs r0, 24
movs r1, 0x2
- bl player_npc_set_state_and_x22_etc
+ bl PlayerSetAnimId
pop {r0}
bx r0
thumb_func_end npc_use_some_d2s
@@ -2592,9 +2592,9 @@ sub_808BCF4: @ 808BCF4
lsls r0, 24
cmp r0, 0
beq _0808BD2C
- bl sub_811A188
+ bl Bike_HandleBumpySlopeJump
movs r0, 0
- bl sub_811A114
+ bl Bike_UpdateBikeCounterSpeed
_0808BD2C:
pop {r4}
pop {r0}
diff --git a/asm/field_screen.s b/asm/field_screen.s
index 408f131c7..c16068a15 100644
--- a/asm/field_screen.s
+++ b/asm/field_screen.s
@@ -7975,7 +7975,7 @@ _080AF120:
sub_80AF128: @ 80AF128
push {lr}
bl ScriptContext2_Enable
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_black
ldr r0, =task0A_nop_for_a_while
movs r1, 0xA
@@ -8006,7 +8006,7 @@ _080AF160:
sub_80AF168: @ 80AF168
push {lr}
bl ScriptContext2_Enable
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_black
ldr r0, =task0A_asap_script_env_2_enable_and_set_ctx_running
movs r1, 0xA
@@ -8092,7 +8092,7 @@ _080AF20E:
sub_80AF214: @ 80AF214
push {lr}
bl ScriptContext2_Enable
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl palette_bg_faded_fill_black
ldr r0, =task_mpl_807DD60
movs r1, 0xA
@@ -8220,7 +8220,7 @@ _080AF30C:
sub_80AF314: @ 80AF314
push {lr}
bl ScriptContext2_Enable
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl palette_bg_faded_fill_black
ldr r0, =sub_80AF234
movs r1, 0xA
@@ -8279,7 +8279,7 @@ _080AF37E:
thumb_func_start mapldr_default
mapldr_default: @ 80AF398
push {lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_for_maplights
bl sub_80AF334
bl ScriptContext2_Enable
@@ -8290,7 +8290,7 @@ mapldr_default: @ 80AF398
thumb_func_start sub_80AF3B0
sub_80AF3B0: @ 80AF3B0
push {lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl sub_80AF08C
bl sub_80AF334
bl ScriptContext2_Enable
@@ -8304,7 +8304,7 @@ sub_80AF3C8: @ 80AF3C8
bl sub_81D6534
cmp r0, 0
bne _080AF3D6
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
_080AF3D6:
bl pal_fill_black
bl sub_80AF334
@@ -8316,7 +8316,7 @@ _080AF3D6:
thumb_func_start sub_80AF3E8
sub_80AF3E8: @ 80AF3E8
push {lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_for_maplights
movs r0, 0x2E
bl PlaySE
@@ -8332,7 +8332,7 @@ sub_80AF3E8: @ 80AF3E8
thumb_func_start sub_80AF40C
sub_80AF40C: @ 80AF40C
push {lr}
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_for_maplights
movs r0, 0x2E
bl PlaySE
@@ -8680,7 +8680,7 @@ sub_80AF6D4: @ 80AF6D4
sub_80AF6F0: @ 80AF6F0
push {lr}
bl ScriptContext2_Enable
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl pal_fill_black
ldr r0, =task_mpl_807E3C8
movs r1, 0xA
diff --git a/asm/field_specials.s b/asm/field_specials.s
index 608924603..ec4ce00b5 100644
--- a/asm/field_specials.s
+++ b/asm/field_specials.s
@@ -32,10 +32,10 @@ Special_ViewWallClock: @ 8137CC8
thumb_func_start ResetCyclingRoadChallengeData
ResetCyclingRoadChallengeData: @ 8137CEC
- ldr r0, =gUnknown_0203AB54
+ ldr r0, =gBikeCyclingChallenge
movs r1, 0
strb r1, [r0]
- ldr r0, =gUnknown_0203AB55
+ ldr r0, =0x0203ab55
strb r1, [r0]
ldr r1, =gUnknown_0203AB58
movs r0, 0
@@ -46,10 +46,10 @@ ResetCyclingRoadChallengeData: @ 8137CEC
thumb_func_start Special_BeginCyclingRoadChallenge
Special_BeginCyclingRoadChallenge: @ 8137D0C
- ldr r1, =gUnknown_0203AB54
+ ldr r1, =gBikeCyclingChallenge
movs r0, 0x1
strb r0, [r1]
- ldr r1, =gUnknown_0203AB55
+ ldr r1, =0x0203ab55
movs r0, 0
strb r0, [r1]
ldr r1, =gUnknown_0203AB58
@@ -218,7 +218,7 @@ FinishCyclingRoadChallenge: @ 8137E6C
ldr r4, [r0, 0x20]
ldr r0, [r1]
subs r4, r0
- ldr r5, =gUnknown_0203AB55
+ ldr r5, =0x0203ab55
ldrb r1, [r5]
adds r0, r4, 0
bl DetermineCyclingRoadResults
diff --git a/asm/field_tasks.s b/asm/field_tasks.s
index 39bd3b545..4befe0ca7 100644
--- a/asm/field_tasks.s
+++ b/asm/field_tasks.s
@@ -1662,7 +1662,7 @@ _0809E572:
lsls r0, 24
cmp r0, 0
beq _0809E5D2
- bl sub_811A138
+ bl GetPlayerSpeed
lsls r0, 16
asrs r0, 16
cmp r0, 0x4
diff --git a/asm/fldeff_80F9BCC.s b/asm/fldeff_80F9BCC.s
index a1e4f4ff6..e31375f9f 100644
--- a/asm/fldeff_80F9BCC.s
+++ b/asm/fldeff_80F9BCC.s
@@ -591,7 +591,7 @@ sub_80FA004: @ 80FA004
bne _080FA070
bl sub_80F9F5C
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =sub_80FA0DC
@@ -606,7 +606,7 @@ _080FA070:
bne _080FA0A0
bl sub_80F9F5C
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =sub_80FA1E8
@@ -625,7 +625,7 @@ _080FA0AE:
_080FA0B2:
bl sub_80F9F5C
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =sub_80FA34C
diff --git a/asm/fldeff_cut.s b/asm/fldeff_cut.s
index 71137b705..20380e478 100755
--- a/asm/fldeff_cut.s
+++ b/asm/fldeff_cut.s
@@ -20,7 +20,7 @@ sub_80D3718: @ 80D3718
cmp r0, 0x1
bne _080D3754
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =sub_80D3A9C
@@ -322,7 +322,7 @@ _080D395A:
bne _080D39F8
_080D39BC:
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =hm2_ruin_valley
@@ -360,7 +360,7 @@ _080D3A18:
bne _080D3A2A
_080D3A1E:
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =hm2_ruin_valley
diff --git a/asm/fldeff_flash.s b/asm/fldeff_flash.s
index 9cc3a59a5..d52ee34fc 100644
--- a/asm/fldeff_flash.s
+++ b/asm/fldeff_flash.s
@@ -18,7 +18,7 @@ SetUpFieldMove_Flash: @ 81370FC
lsrs r0, 24
strh r0, [r4]
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =sub_8179918
@@ -35,7 +35,7 @@ _08137134:
cmp r0, 0
bne _08137170
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =hm2_flash
diff --git a/asm/fldeff_strength.s b/asm/fldeff_strength.s
index 53a088aa3..fdadd2aac 100644
--- a/asm/fldeff_strength.s
+++ b/asm/fldeff_strength.s
@@ -23,7 +23,7 @@ _08145DD8:
lsrs r0, 24
strh r0, [r4]
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =sub_8145E0C
diff --git a/asm/fldeff_sweetscent.s b/asm/fldeff_sweetscent.s
index eea0df12f..2055f7069 100644
--- a/asm/fldeff_sweetscent.s
+++ b/asm/fldeff_sweetscent.s
@@ -8,7 +8,7 @@
thumb_func_start SetUpFieldMove_SweetScent
SetUpFieldMove_SweetScent: @ 8159EF0
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =hm2_sweet_scent
diff --git a/asm/fldeff_teleport.s b/asm/fldeff_teleport.s
deleted file mode 100644
index 17bab1496..000000000
--- a/asm/fldeff_teleport.s
+++ /dev/null
@@ -1,84 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start SetUpFieldMove_Teleport
-SetUpFieldMove_Teleport: @ 817C8BC
- push {lr}
- ldr r0, =gMapHeader
- ldrb r0, [r0, 0x17]
- bl is_light_level_1_2_3_or_6
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- beq _0817C8D8
- movs r0, 0
- b _0817C8E6
- .pool
-_0817C8D8:
- ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
- str r0, [r1]
- ldr r1, =gUnknown_0203CEEC
- ldr r0, =hm_teleport_run_dp02scr
- str r0, [r1]
- movs r0, 0x1
-_0817C8E6:
- pop {r1}
- bx r1
- .pool
- thumb_func_end SetUpFieldMove_Teleport
-
- thumb_func_start hm_teleport_run_dp02scr
-hm_teleport_run_dp02scr: @ 817C8FC
- push {lr}
- bl sub_808469C
- movs r0, 0x3F
- bl FieldEffectStart
- bl GetCursorSelectionMonId
- ldr r1, =gFieldEffectArguments
- lsls r0, 24
- lsrs r0, 24
- str r0, [r1]
- pop {r0}
- bx r0
- .pool
- thumb_func_end hm_teleport_run_dp02scr
-
- thumb_func_start FldEff_UseTeleport
-FldEff_UseTeleport: @ 817C91C
- push {lr}
- bl oei_task_add
- lsls r0, 24
- lsrs r0, 24
- ldr r2, =gTasks
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- adds r1, r2
- ldr r2, =sub_817C94C
- lsrs r0, r2, 16
- strh r0, [r1, 0x18]
- strh r2, [r1, 0x1A]
- movs r0, 0x1
- bl SetPlayerAvatarTransitionFlags
- movs r0, 0
- pop {r1}
- bx r1
- .pool
- thumb_func_end FldEff_UseTeleport
-
- thumb_func_start sub_817C94C
-sub_817C94C: @ 817C94C
- push {lr}
- movs r0, 0x3F
- bl FieldEffectActiveListRemove
- bl sub_80B7FC8
- pop {r0}
- bx r0
- thumb_func_end sub_817C94C
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/hof_pc.s b/asm/hof_pc.s
index 2456c18ba..29ca9204f 100644
--- a/asm/hof_pc.s
+++ b/asm/hof_pc.s
@@ -34,7 +34,7 @@ ReshowPCMenuAfterHallOfFamePC: @ 8137C5C
push {lr}
sub sp, 0x4
bl ScriptContext2_Enable
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
bl sp109_CreatePCMenu
bl sub_80E2514
movs r0, 0x1
diff --git a/asm/intro.s b/asm/intro.s
index 32b52ed06..d9f6e558f 100644
--- a/asm/intro.s
+++ b/asm/intro.s
@@ -1945,24 +1945,24 @@ task_intro_13: @ 816DD28
ldr r1, =gReservedSpritePaletteCount
movs r0, 0x8
strb r0, [r1]
- ldr r0, =gUnknown_08D88494
+ ldr r0, =gIntro3GroudonGfx
movs r1, 0xC0
lsls r1, 19
bl LZDecompressVram
- ldr r0, =gUnknown_08D88D40
+ ldr r0, =gIntro3GroudonTilemap
ldr r1, =0x0600c000
bl LZDecompressVram
- ldr r0, =gUnknown_08D89F7C
+ ldr r0, =gIntro3LegendBgGfx
ldr r1, =0x06004000
bl LZDecompressVram
- ldr r0, =gUnknown_08D8A818
+ ldr r0, =gIntro3GroudonBgTilemap
ldr r1, =0x0600e000
bl LZDecompressVram
ldr r0, =gBattleAnimPicTable + 0x1D0
bl LoadCompressedObjectPicUsingHeap
ldr r0, =gBattleAnimPaletteTable + 0x1D0
bl LoadCompressedObjectPaletteUsingHeap
- ldr r0, =gUnknown_08D85CD0
+ ldr r0, =gIntro3BgPal
ldr r1, =gPlttBufferUnfaded
movs r2, 0x80
lsls r2, 1
@@ -2229,7 +2229,7 @@ _0816DFF4:
strh r0, [r4, 0xC]
movs r1, 0xE
ldrsh r0, [r4, r1]
- ldr r1, =gUnknown_08D85CD0
+ ldr r1, =gIntro3BgPal
adds r0, r1
ldr r1, =gPlttBufferFaded + 0x3E
movs r2, 0x1
@@ -2271,7 +2271,7 @@ _0816E046:
strh r0, [r4, 0xC]
movs r2, 0xE
ldrsh r0, [r4, r2]
- ldr r1, =gUnknown_08D85CD0
+ ldr r1, =gIntro3BgPal
adds r0, r1
ldr r1, =gPlttBufferFaded + 0x3E
movs r2, 0x1
@@ -2571,14 +2571,14 @@ task_intro_19: @ 816E2A0
lsls r4, 24
lsrs r4, 24
bl ResetSpriteData
- ldr r0, =gUnknown_08D89224
+ ldr r0, =gIntro3KyogreGfx
movs r1, 0xC0
lsls r1, 19
bl LZDecompressVram
- ldr r0, =gUnknown_08D89ABC
+ ldr r0, =gIntro3KyogreTilemap
ldr r1, =0x0600c000
bl LZDecompressVram
- ldr r0, =gUnknown_08D8A934
+ ldr r0, =gIntro3KyogreBgTilemap
ldr r1, =0x0600e000
bl LZDecompressVram
ldr r0, =gUnknown_085E4C88
@@ -2888,7 +2888,7 @@ _0816E56E:
strh r0, [r5, 0xC]
movs r2, 0xE
ldrsh r0, [r5, r2]
- ldr r1, =gUnknown_08D85CD0
+ ldr r1, =gIntro3BgPal
adds r0, r1
ldr r1, =gPlttBufferFaded + 0x5E
movs r2, 0x1
@@ -2932,7 +2932,7 @@ _0816E5BC:
strh r0, [r5, 0xC]
movs r2, 0xE
ldrsh r0, [r5, r2]
- ldr r1, =gUnknown_08D85CD0
+ ldr r1, =gIntro3BgPal
adds r0, r1
ldr r1, =gPlttBufferFaded + 0x5E
movs r2, 0x1
@@ -3319,7 +3319,7 @@ task_intro_21: @ 816E888
movs r0, 0x1A
movs r1, 0
bl SetGpuReg
- ldr r4, =gUnknown_08D8AA54
+ ldr r4, =gIntro3CloudsGfx
movs r1, 0xC0
lsls r1, 19
adds r0, r4, 0
@@ -3327,7 +3327,7 @@ task_intro_21: @ 816E888
ldr r1, =0x06004000
adds r0, r4, 0
bl LZDecompressVram
- ldr r0, =gUnknown_08D8B6E8
+ ldr r0, =gIntro3Clouds3Tilemap
ldr r1, =0x0600e000
bl LZDecompressVram
ldr r1, =gTasks
@@ -3349,10 +3349,10 @@ task_intro_22: @ 816E954
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
- ldr r0, =gUnknown_08D8B180
+ ldr r0, =gIntro3Clouds1Tilemap
ldr r1, =0x0600c000
bl LZDecompressVram
- ldr r0, =gUnknown_08D8B440
+ ldr r0, =gIntro3Clouds2Tilemap
ldr r1, =0x0600d000
bl LZDecompressVram
ldr r1, =gTasks
@@ -3509,16 +3509,16 @@ task_intro_25: @ 816EAB8
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
- ldr r0, =gUnknown_08D8C16C
+ ldr r0, =gIntro3RayquazaTilemap
ldr r1, =0x0600e000
bl LZDecompressVram
- ldr r0, =gUnknown_08D8CCC8
+ ldr r0, =gIntro3Clouds4Tilemap
ldr r1, =0x0600c000
bl LZDecompressVram
- ldr r0, =gUnknown_08D8BA74
+ ldr r0, =gIntro3RayquazaGfx
ldr r1, =0x06004000
bl LZDecompressVram
- ldr r0, =gUnknown_08D8C838
+ ldr r0, =gIntro3Clouds2Gfx
movs r1, 0xC0
lsls r1, 19
bl LZDecompressVram
@@ -3725,7 +3725,7 @@ _0816ECA0:
_0816ECAC:
movs r1, 0x30
ldrsh r0, [r4, r1]
- ldr r1, =gUnknown_08D85CD0
+ ldr r1, =gIntro3BgPal
adds r0, r1
ldr r1, =gPlttBufferFaded + 0xBA
movs r2, 0x1
@@ -3757,7 +3757,7 @@ _0816ECDC:
strh r0, [r4, 0x32]
movs r1, 0x30
ldrsh r0, [r4, r1]
- ldr r1, =gUnknown_08D85CD0
+ ldr r1, =gIntro3BgPal
adds r0, r1
ldr r1, =gPlttBufferFaded + 0xBA
movs r2, 0x1
@@ -4007,7 +4007,7 @@ _0816EEF4:
movs r2, 0x2
ldrsh r0, [r5, r2]
lsls r0, 1
- ldr r1, =gUnknown_08D85E72
+ ldr r1, =gIntro3BgPal + 0x1A2
adds r0, r1
ldr r1, =gPlttBufferFaded + 0xBC
movs r2, 0x1
@@ -4043,7 +4043,7 @@ _0816EF34:
movs r1, 0x2
ldrsh r0, [r5, r1]
lsls r0, 1
- ldr r1, =gUnknown_08D85E72
+ ldr r1, =gIntro3BgPal + 0x1A2
adds r0, r1
ldr r1, =gPlttBufferFaded + 0xB0
movs r2, 0x1
@@ -4080,7 +4080,7 @@ _0816EF80:
movs r1, 0x2
ldrsh r0, [r5, r1]
lsls r0, 1
- ldr r1, =gUnknown_08D85E52
+ ldr r1, =gIntro3BgPal + 0x182
adds r0, r1
ldr r1, =gPlttBufferFaded + 0xB8
movs r2, 0x1
@@ -4148,7 +4148,7 @@ _0816F00A:
movs r0, 0x50
movs r1, 0x10
bl BlendPalette
- ldr r4, =gUnknown_08D85E7C
+ ldr r4, =gIntro3BgPal + 0x1AC
ldr r5, =gPlttBufferFaded + 0xBC
adds r0, r4, 0
adds r1, r5, 0
@@ -5617,7 +5617,7 @@ _0816FBB4:
cmp r0, 0
beq _0816FC14
lsls r0, 1
- ldr r4, =gUnknown_08D85C50
+ ldr r4, =gIntro1GameFreakTextFadePal
adds r0, r4
ldr r5, =gPlttBufferFaded + 0x23E
adds r1, r5, 0
@@ -5651,7 +5651,7 @@ _0816FC14:
movs r1, 0x30
ldrsh r0, [r6, r1]
lsls r0, 1
- ldr r4, =gUnknown_08D85C50
+ ldr r4, =gIntro1GameFreakTextFadePal
adds r0, r4
ldr r5, =gPlttBufferFaded + 0x23E
adds r1, r5, 0
@@ -5696,7 +5696,7 @@ _0816FC6C:
cmp r0, 0x9
bgt _0816FCE6
lsls r0, 1
- ldr r4, =gUnknown_08D85C50
+ ldr r4, =gIntro1GameFreakTextFadePal
adds r0, r4
ldr r5, =gPlttBufferFaded + 0x23E
adds r1, r5, 0
diff --git a/asm/item_menu.s b/asm/item_menu.s
index 49f587939..db3d38668 100755
--- a/asm/item_menu.s
+++ b/asm/item_menu.s
@@ -637,7 +637,7 @@ _081AB0E8:
.4byte _081AB1A8
_081AB0FC:
bl reset_temp_tile_data_buffers
- ldr r1, =gUnknown_08D9A620
+ ldr r1, =gBagScreen_Gfx
movs r0, 0
str r0, [sp]
movs r0, 0x2
@@ -670,14 +670,14 @@ _081AB13C:
ldrb r0, [r0, 0x8]
cmp r0, 0
beq _081AB164
- ldr r0, =gUnknown_08D9A5D4
+ ldr r0, =gBagScreenFemale_Pal
movs r1, 0
movs r2, 0x40
bl LoadCompressedPalette
b _081AB1AE
.pool
_081AB164:
- ldr r0, =gUnknown_08D9A588
+ ldr r0, =gBagScreenMale_Pal
movs r1, 0
movs r2, 0x40
bl LoadCompressedPalette
@@ -1164,7 +1164,7 @@ _081AB570:
lsrs r0, 16
cmp r0, 0x7
bhi _081AB5BE
- ldr r1, =gUnknown_08DC6378
+ ldr r1, =gBagMenuHMIcon_Gfx
subs r3, r7, 0x1
lsls r3, 16
lsrs r3, 16
diff --git a/asm/item_use.s b/asm/item_use.s
index ebf5ac979..0d9f30ec3 100644
--- a/asm/item_use.s
+++ b/asm/item_use.s
@@ -354,7 +354,7 @@ _080FD320:
bl sav1_map_is_biking_allowed
cmp r0, 0x1
bne _080FD348
- bl sub_8119FF8
+ bl IsBikingDisallowedByPlayer
lsls r0, 24
cmp r0, 0
bne _080FD348
diff --git a/asm/link.s b/asm/link.s
index a6e580d5c..a270c8f62 100644
--- a/asm/link.s
+++ b/asm/link.s
@@ -44695,11 +44695,11 @@ sub_80205B4: @ 80205B4
task_tutorial_story_unknown: @ 8020604
push {r4,r5,lr}
sub sp, 0x4
- ldr r0, =gUnknown_08DD4860
+ ldr r0, =gLinkMiscMenu_Pal
movs r1, 0
movs r2, 0x20
bl LoadPalette
- ldr r1, =gUnknown_08DD4880
+ ldr r1, =gLinkMiscMenu_Gfx
movs r0, 0
str r0, [sp]
movs r0, 0x2
@@ -44727,7 +44727,7 @@ task_tutorial_story_unknown: @ 8020604
movs r2, 0x8
bl CpuFastSet
_0802064E:
- ldr r1, =gUnknown_08DD4AB8
+ ldr r1, =gLinkMiscMenu_Tilemap
movs r0, 0x2
movs r2, 0
movs r3, 0
diff --git a/asm/macros/battle_ai_script.inc b/asm/macros/battle_ai_script.inc
new file mode 100644
index 000000000..5e81686bf
--- /dev/null
+++ b/asm/macros/battle_ai_script.inc
@@ -0,0 +1,619 @@
+ .macro if_random_less_than param0, param1
+ .byte 0x0
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_random_greater_than param0, param1
+ .byte 0x1
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_random_equal param0, param1
+ .byte 0x2
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_random_not_equal param0, param1
+ .byte 0x3
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro score param0
+ .byte 0x4
+ .byte \param0
+ .endm
+
+ .macro if_hp_less_than bank, param1, param2
+ .byte 0x5
+ .byte \bank
+ .byte \param1
+ .4byte \param2
+ .endm
+
+ .macro if_hp_more_than bank, param1, param2
+ .byte 0x6
+ .byte \bank
+ .byte \param1
+ .4byte \param2
+ .endm
+
+ .macro if_hp_equal bank, param1, param2
+ .byte 0x7
+ .byte \bank
+ .byte \param1
+ .4byte \param2
+ .endm
+
+ .macro if_hp_not_equal bank, param1, param2
+ .byte 0x8
+ .byte \bank
+ .byte \param1
+ .4byte \param2
+ .endm
+
+ .macro if_status bank, status1, param2
+ .byte 0x9
+ .byte \bank
+ .4byte \status1
+ .4byte \param2
+ .endm
+
+ .macro if_not_status bank, status1, param2
+ .byte 0xa
+ .byte \bank
+ .4byte \status1
+ .4byte \param2
+ .endm
+
+ .macro if_status2 bank, status2, param2
+ .byte 0xb
+ .byte \bank
+ .4byte \status2
+ .4byte \param2
+ .endm
+
+ .macro if_not_status2 bank, status2, param2
+ .byte 0xc
+ .byte \bank
+ .4byte \status2
+ .4byte \param2
+ .endm
+
+ .macro if_status3 bank, status3, param2
+ .byte 0xd
+ .byte \bank
+ .4byte \status3
+ .4byte \param2
+ .endm
+
+ .macro if_not_status3 bank, status3, param2
+ .byte 0xe
+ .byte \bank
+ .4byte \status3
+ .4byte \param2
+ .endm
+
+ .macro if_side_affecting bank, sidestatus, param2
+ .byte 0xf
+ .byte \bank
+ .4byte \sidestatus
+ .4byte \param2
+ .endm
+
+ .macro if_not_side_affecting bank, sidestatus, param2
+ .byte 0x10
+ .byte \bank
+ .4byte \sidestatus
+ .4byte \param2
+ .endm
+
+ .macro if_less_than param0, param1
+ .byte 0x11
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_more_than param0, param1
+ .byte 0x12
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_equal param0, param1
+ .byte 0x13
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_not_equal param0, param1
+ .byte 0x14
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_less_than_ptr param0, param1
+ .byte 0x15
+ .4byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_more_than_ptr param0, param1
+ .byte 0x16
+ .4byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_equal_ptr param0, param1
+ .byte 0x17
+ .4byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_not_equal_ptr param0, param1
+ .byte 0x18
+ .4byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_move param0, param1
+ .byte 0x19
+ .2byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_not_move param0, param1
+ .byte 0x1a
+ .2byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_in_bytes param0, param1
+ .byte 0x1b
+ .4byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_not_in_bytes param0, param1
+ .byte 0x1c
+ .4byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_in_hwords param0, param1
+ .byte 0x1d
+ .4byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_not_in_hwords param0, param1
+ .byte 0x1e
+ .4byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_user_has_attacking_move param0
+ .byte 0x1f
+ .4byte \param0
+ .endm
+
+ .macro if_user_has_no_attacking_moves param0
+ .byte 0x20
+ .4byte \param0
+ .endm
+
+ .macro get_turn_count
+ .byte 0x21
+ .endm
+
+ .macro get_type param0
+ .byte 0x22
+ .byte \param0
+ .endm
+
+ .macro get_considered_move_power
+ .byte 0x23
+ .endm
+
+ .macro get_how_powerful_move_is
+ .byte 0x24
+ .endm
+
+ .macro get_last_used_bank_move bank
+ .byte 0x25
+ .byte \bank
+ .endm
+
+ .macro if_equal_ param0, param1
+ .byte 0x26
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_not_equal_ param0, param1
+ .byte 0x27
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_user_goes param0, param1
+ .byte 0x28
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_user_doesnt_go param0, param1
+ .byte 0x29
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro nullsub_2A
+ .byte 0x2a
+ .endm
+
+ .macro nullsub_2B
+ .byte 0x2b
+ .endm
+
+ .macro count_usable_party_mons bank
+ .byte 0x2c
+ .byte \bank
+ .endm
+
+ .macro get_considered_move
+ .byte 0x2d
+ .endm
+
+ .macro get_considered_move_effect
+ .byte 0x2e
+ .endm
+
+ .macro get_ability bank
+ .byte 0x2f
+ .byte \bank
+ .endm
+
+ .macro get_highest_type_effectiveness
+ .byte 0x30
+ .endm
+
+ .macro if_type_effectiveness param0, param1
+ .byte 0x31
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro nullsub_32
+ .byte 0x32
+ .endm
+
+ .macro nullsub_33
+ .byte 0x33
+ .endm
+
+ .macro if_status_in_party bank, status1, param2
+ .byte 0x34
+ .byte \bank
+ .4byte \status1
+ .4byte \param2
+ .endm
+
+ .macro if_status_not_in_party bank, status1, param2
+ .byte 0x35
+ .byte \bank
+ .4byte \status1
+ .4byte \param2
+ .endm
+
+ .macro get_weather
+ .byte 0x36
+ .endm
+
+ .macro if_effect param0, param1
+ .byte 0x37
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_not_effect param0, param1
+ .byte 0x38
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_stat_level_less_than bank, stat, param2, param3
+ .byte 0x39
+ .byte \bank
+ .byte \stat
+ .byte \param2
+ .4byte \param3
+ .endm
+
+ .macro if_stat_level_more_than bank, stat, param2, param3
+ .byte 0x3a
+ .byte \bank
+ .byte \stat
+ .byte \param2
+ .4byte \param3
+ .endm
+
+ .macro if_stat_level_equal bank, stat, param2, param3
+ .byte 0x3b
+ .byte \bank
+ .byte \stat
+ .byte \param2
+ .4byte \param3
+ .endm
+
+ .macro if_stat_level_not_equal bank, stat, param2, param3
+ .byte 0x3c
+ .byte \bank
+ .byte \stat
+ .byte \param2
+ .4byte \param3
+ .endm
+
+ .macro if_can_faint param0
+ .byte 0x3d
+ .4byte \param0
+ .endm
+
+ .macro if_cant_faint param0
+ .byte 0x3e
+ .4byte \param0
+ .endm
+
+ .macro if_has_move bank, param1, param2
+ .byte 0x3f
+ .byte \bank
+ .2byte \param1
+ .4byte \param2
+ .endm
+
+ .macro if_doesnt_have_move bank, param1, param2
+ .byte 0x40
+ .byte \bank
+ .2byte \param1
+ .4byte \param2
+ .endm
+
+ .macro if_has_move_with_effect bank, param1, param2
+ .byte 0x41
+ .byte \bank
+ .byte \param1
+ .4byte \param2
+ .endm
+
+ .macro if_doesnt_have_move_with_effect bank, param1, param2
+ .byte 0x42
+ .byte \bank
+ .byte \param1
+ .4byte \param2
+ .endm
+
+ .macro if_any_move_disabled_or_encored bank, param1, param2
+ .byte 0x43
+ .byte \bank
+ .byte \param1
+ .4byte \param2
+ .endm
+
+ .macro if_curr_move_disabled_or_encored param0, param1
+ .byte 0x44
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro flee
+ .byte 0x45
+ .endm
+
+ .macro if_random_safari_flee param0
+ .byte 0x46
+ .4byte \param0
+ .endm
+
+ .macro watch
+ .byte 0x47
+ .endm
+
+ .macro get_hold_effect bank
+ .byte 0x48
+ .byte \bank
+ .endm
+
+ .macro get_gender bank
+ .byte 0x49
+ .byte \bank
+ .endm
+
+ .macro is_first_turn_for bank
+ .byte 0x4a
+ .byte \bank
+ .endm
+
+ .macro get_stockpile_count bank
+ .byte 0x4b
+ .byte \bank
+ .endm
+
+ .macro is_double_battle
+ .byte 0x4c
+ .endm
+
+ .macro get_used_held_item bank
+ .byte 0x4d
+ .byte \bank
+ .endm
+
+ .macro get_move_type_from_result
+ .byte 0x4e
+ .endm
+
+ .macro get_move_power_from_result
+ .byte 0x4f
+ .endm
+
+ .macro get_move_effect_from_result
+ .byte 0x50
+ .endm
+
+ .macro get_protect_count bank
+ .byte 0x51
+ .byte \bank
+ .endm
+
+ .macro nullsub_52
+ .byte 0x52
+ .endm
+
+ .macro nullsub_53
+ .byte 0x53
+ .endm
+
+ .macro nullsub_54
+ .byte 0x54
+ .endm
+
+ .macro nullsub_55
+ .byte 0x55
+ .endm
+
+ .macro nullsub_56
+ .byte 0x56
+ .endm
+
+ .macro nullsub_57
+ .byte 0x57
+ .endm
+
+ .macro call param0
+ .byte 0x58
+ .4byte \param0
+ .endm
+
+ .macro goto param0
+ .byte 0x59
+ .4byte \param0
+ .endm
+
+ .macro end
+ .byte 0x5a
+ .endm
+
+ .macro if_level_cond param0, param1
+ .byte 0x5b
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro if_target_taunted param0
+ .byte 0x5c
+ .4byte \param0
+ .endm
+
+ .macro if_target_not_taunted param0
+ .byte 0x5d
+ .4byte \param0
+ .endm
+
+ .macro if_target_is_ally param0
+ .byte 0x5e
+ .4byte \param0
+ .endm
+
+ .macro is_of_type bank, type
+ .byte 0x5f
+ .byte \bank
+ .byte \type
+ .endm
+
+ .macro check_ability bank, ability
+ .byte 0x60
+ .byte \bank
+ .byte \ability
+ .endm
+
+ .macro if_flash_fired bank, param1
+ .byte 0x61
+ .byte \bank
+ .4byte \param1
+ .endm
+
+ .macro if_holds_item bank, param1, param2
+ .byte 0x62
+ .byte \bank
+ .2byte \param1
+ .4byte \param2
+ .endm
+
+@ useful script macros
+ .macro get_curr_move_type
+ get_type AI_TYPE_MOVE
+ .endm
+
+ .macro get_user_type1
+ get_type AI_TYPE1_USER
+ .endm
+
+ .macro get_user_type2
+ get_type AI_TYPE2_USER
+ .endm
+
+ .macro get_target_type1
+ get_type AI_TYPE1_TARGET
+ .endm
+
+ .macro get_target_type2
+ get_type AI_TYPE2_TARGET
+ .endm
+
+ .macro if_ability bank, ability, ptr
+ check_ability \bank, \ability
+ if_equal 1, \ptr
+ .endm
+
+ .macro if_no_ability bank, ability, ptr
+ check_ability \bank, \ability
+ if_equal 0, \ptr
+ .endm
+
+ .macro if_type bank, type, ptr
+ is_of_type \bank, \type
+ if_equal 1, \ptr
+ .endm
+
+ .macro if_no_type bank, type, ptr
+ is_of_type \bank, \type
+ if_equal 0, \ptr
+ .endm
+
+ .macro if_target_faster ptr
+ if_user_goes 1, \ptr
+ .endm
+
+ .macro if_user_faster ptr
+ if_user_goes 0, \ptr
+ .endm
+
+ .macro if_double_battle ptr
+ is_double_battle
+ if_equal 1, \ptr
+ .endm
+
+ .macro if_not_double_battle ptr
+ is_double_battle
+ if_equal 0, \ptr
+ .endm
+
+ .macro if_any_move_disabled bank, ptr
+ if_any_move_disabled_or_encored \bank, 0, \ptr
+ .endm
+
+ .macro if_any_move_encored bank, ptr
+ if_any_move_disabled_or_encored \bank, 1, \ptr
+ .endm
diff --git a/asm/macros/battle_anim_script.inc b/asm/macros/battle_anim_script.inc
new file mode 100644
index 000000000..b26d1218d
--- /dev/null
+++ b/asm/macros/battle_anim_script.inc
@@ -0,0 +1,268 @@
+@ commands
+
+ .macro loadspritegfx param0
+ .byte 0x0
+ .2byte \param0
+ .endm
+
+ .macro unloadspritegfx param0
+ .byte 0x1
+ .2byte \param0
+ .endm
+
+ .macro createsprite template, priority, argv:vararg
+ .byte 0x02
+ .4byte \template
+ .byte \priority
+ .byte (.Lsprite_\@_2 - .Lsprite_\@_1) / 2
+.Lsprite_\@_1:
+ .2byte \argv
+.Lsprite_\@_2:
+ .endm
+
+ .macro createvisualtask addr, priority, argv:vararg
+ .byte 0x03
+ .4byte \addr
+ .byte \priority
+ .byte (.Lcreatetask_\@_2 - .Lcreatetask_\@_1) / 2
+.Lcreatetask_\@_1:
+ .2byte \argv
+.Lcreatetask_\@_2:
+ .endm
+
+ .macro delay param0
+ .byte 0x4
+ .byte \param0
+ .endm
+
+ .macro waitforvisualfinish
+ .byte 0x5
+ .endm
+
+ .macro hang1
+ .byte 0x6
+ .endm
+
+ .macro hang2
+ .byte 0x7
+ .endm
+
+ .macro end
+ .byte 0x8
+ .endm
+
+ .macro playse param0
+ .byte 0x9
+ .2byte \param0
+ .endm
+
+ .macro monbg bank
+ .byte 0xa
+ .byte \bank
+ .endm
+
+ .macro clearmonbg bank
+ .byte 0xb
+ .byte \bank
+ .endm
+
+ .macro setalpha param0
+ .byte 0xc
+ .2byte \param0
+ .endm
+
+ .macro blendoff
+ .byte 0xd
+ .endm
+
+ .macro call param0
+ .byte 0xe
+ .4byte \param0
+ .endm
+
+ .macro return
+ .byte 0xf
+ .endm
+
+ .macro setarg param0, param1
+ .byte 0x10
+ .byte \param0
+ .2byte \param1
+ .endm
+
+ .macro choosetwoturnanim param0, param1
+ .byte 0x11
+ .4byte \param0
+ .4byte \param1
+ .endm
+
+ .macro jumpifmoveturn param0, param1
+ .byte 0x12
+ .byte \param0
+ .4byte \param1
+ .endm
+
+ .macro goto param0
+ .byte 0x13
+ .4byte \param0
+ .endm
+
+ .macro fadetobg param0
+ .byte 0x14
+ .byte \param0
+ .endm
+
+ .macro restorebg
+ .byte 0x15
+ .endm
+
+ .macro waitbgfadeout
+ .byte 0x16
+ .endm
+
+ .macro waitbgfadein
+ .byte 0x17
+ .endm
+
+ .macro changebg param0
+ .byte 0x18
+ .byte \param0
+ .endm
+
+ .macro playsewithpan param0, param1
+ .byte 0x19
+ .2byte \param0
+ .byte \param1
+ .endm
+
+ .macro setpan param0
+ .byte 0x1a
+ .byte \param0
+ .endm
+
+ .macro panse_1B param0, param1, param2, param3, param4
+ .byte 0x1b
+ .2byte \param0
+ .byte \param1
+ .byte \param2
+ .byte \param3
+ .byte \param4
+ .endm
+
+ .macro loopsewithpan param0, param1, param2, param3
+ .byte 0x1c
+ .2byte \param0
+ .byte \param1
+ .byte \param2
+ .byte \param3
+ .endm
+
+ .macro waitplaysewithpan param0, param1, param2
+ .byte 0x1d
+ .2byte \param0
+ .byte \param1
+ .byte \param2
+ .endm
+
+ .macro setbldcnt param0
+ .byte 0x1e
+ .2byte \param0
+ .endm
+
+ .macro createsoundtask addr, argv:vararg
+ .byte 0x1F
+ .4byte \addr
+ .byte (.Lcreatetask_1F_\@_2 - .Lcreatetask_1F_\@_1) / 2
+.Lcreatetask_1F_\@_1:
+ .2byte \argv
+.Lcreatetask_1F_\@_2:
+ .endm
+
+ .macro waitsound
+ .byte 0x20
+ .endm
+
+ .macro jumpargeq param0, param1, param2
+ .byte 0x21
+ .byte \param0
+ .2byte \param1
+ .4byte \param2
+ .endm
+
+ .macro monbg_22 bank
+ .byte 0x22
+ .byte \bank
+ .endm
+
+ .macro clearmonbg_23 bank
+ .byte 0x23
+ .byte \bank
+ .endm
+
+ .macro jumpifcontest param0
+ .byte 0x24
+ .4byte \param0
+ .endm
+
+ .macro fadetobgfromset param0, param1, param2
+ .byte 0x25
+ .byte \param0
+ .byte \param1
+ .byte \param2
+ .endm
+
+ .macro panse_26 param0, param1, param2, param3, param4
+ .byte 0x26
+ .2byte \param0
+ .byte \param1
+ .byte \param2
+ .byte \param3
+ .byte \param4
+ .endm
+
+ .macro panse_27 param0, param1, param2, param3, param4
+ .byte 0x27
+ .2byte \param0
+ .byte \param1
+ .byte \param2
+ .byte \param3
+ .byte \param4
+ .endm
+
+ .macro monbgprio_28 bank
+ .byte 0x28
+ .byte \bank
+ .endm
+
+ .macro monbgprio_29
+ .byte 0x29
+ .endm
+
+ .macro monbgprio_2A bank
+ .byte 0x2a
+ .byte \bank
+ .endm
+
+ .macro invisible bank
+ .byte 0x2b
+ .byte \bank
+ .endm
+
+ .macro visible bank
+ .byte 0x2c
+ .byte \bank
+ .endm
+
+ .macro doublebattle_2D bank
+ .byte 0x2d
+ .byte \bank
+ .endm
+
+ .macro doublebattle_2E bank
+ .byte 0x2e
+ .byte \bank
+ .endm
+
+ .macro stopsound
+ .byte 0x2f
+ .endm
diff --git a/asm/menu.s b/asm/menu.s
index 64644504e..fac6ed72a 100755
--- a/asm/menu.s
+++ b/asm/menu.s
@@ -5257,15 +5257,15 @@ sub_819A2BC: @ 819A2BC
cmp r1, 0x2
beq _0819A2E4
_0819A2D2:
- ldr r0, =gUnknown_08DC4318
+ ldr r0, =gFireRedMenuElements1_Pal
b _0819A2E6
.pool
_0819A2DC:
- ldr r0, =gUnknown_08DC4338
+ ldr r0, =gFireRedMenuElements2_Pal
b _0819A2E6
.pool
_0819A2E4:
- ldr r0, =gUnknown_08DC4358
+ ldr r0, =gFireRedMenuElements3_Pal
_0819A2E6:
adds r1, r2, 0
movs r2, 0x20
@@ -5292,7 +5292,7 @@ blit_move_info_icon: @ 819A2F8
adds r1, r4
ldrh r5, [r1, 0x2]
lsls r5, 5
- ldr r4, =gUnknown_08DC4378
+ ldr r4, =gFireRedMenuElements_Gfx
adds r5, r4
movs r4, 0x80
str r4, [sp]
diff --git a/asm/mon_markings.s b/asm/mon_markings.s
index 7c927399f..1624fddca 100644
--- a/asm/mon_markings.s
+++ b/asm/mon_markings.s
@@ -480,7 +480,7 @@ sub_811FC80: @ 811FC80
adds r0, 0x1E
strh r5, [r0]
add r1, sp, 0x20
- ldr r0, =gUnknown_08DC9628
+ ldr r0, =gPokenavConditionMarker_Gfx
str r0, [sp, 0x20]
movs r0, 0xC8
lsls r0, 2
@@ -503,7 +503,7 @@ sub_811FC80: @ 811FC80
add r0, sp, 0x34
strh r6, [r0]
add r1, sp, 0x38
- ldr r0, =gUnknown_08DC9608
+ ldr r0, =gPokenavConditionMarker_Pal
str r0, [sp, 0x38]
adds r0, r6, 0x1
strh r0, [r1, 0x4]
diff --git a/asm/naming_screen.s b/asm/naming_screen.s
index cded48783..07ec0662f 100644
--- a/asm/naming_screen.s
+++ b/asm/naming_screen.s
@@ -3712,7 +3712,7 @@ _080E4C4A:
thumb_func_start choose_name_or_words_screen_load_bg_tile_patterns
choose_name_or_words_screen_load_bg_tile_patterns: @ 80E4C54
push {r4-r6,lr}
- ldr r0, =gUnknown_08DD3838
+ ldr r0, =gNamingScreenMenu_Gfx
ldr r6, =gUnknown_02039F94
ldr r1, [r6]
ldr r4, =0x00001810
@@ -3760,7 +3760,7 @@ sub_80E4CB8: @ 80E4CB8
thumb_func_start choose_name_or_words_screen_apply_bg_pals
choose_name_or_words_screen_apply_bg_pals: @ 80E4CC8
push {lr}
- ldr r0, =gUnknown_08DD3778
+ ldr r0, =gNamingScreenMenu_Pal
movs r1, 0
movs r2, 0xC0
bl LoadPalette
diff --git a/asm/overworld.s b/asm/overworld.s
index 5f58e6d14..c3140f7a9 100644
--- a/asm/overworld.s
+++ b/asm/overworld.s
@@ -50,8 +50,8 @@ flag_var_implications_of_teleport_: @ 8084660
.pool
thumb_func_end flag_var_implications_of_teleport_
- thumb_func_start sub_808469C
-sub_808469C: @ 808469C
+ thumb_func_start Overworld_ResetStateAfterTeleport
+Overworld_ResetStateAfterTeleport: @ 808469C
push {lr}
bl player_avatar_init_params_reset
ldr r0, =0x0000088b
@@ -69,7 +69,7 @@ sub_808469C: @ 808469C
pop {r0}
bx r0
.pool
- thumb_func_end sub_808469C
+ thumb_func_end Overworld_ResetStateAfterTeleport
thumb_func_start flagmods_08054D70
flagmods_08054D70: @ 80846E4
@@ -2212,8 +2212,8 @@ call_ResetMapMusic: @ 8085778
bx r0
thumb_func_end call_ResetMapMusic
- thumb_func_start sub_8085784
-sub_8085784: @ 8085784
+ thumb_func_start Overworld_PlaySpecialMapMusic
+Overworld_PlaySpecialMapMusic: @ 8085784
push {r4,lr}
bl sav1_map_get_music
lsls r0, 16
@@ -2261,7 +2261,7 @@ _080857E8:
pop {r0}
bx r0
.pool
- thumb_func_end sub_8085784
+ thumb_func_end Overworld_PlaySpecialMapMusic
thumb_func_start Overworld_SetSavedMusic
Overworld_SetSavedMusic: @ 80857F4
@@ -2772,8 +2772,8 @@ _08085BF0:
bx r1
thumb_func_end is_light_level_1_2_3_5_or_6
- thumb_func_start is_light_level_1_2_3_or_6
-is_light_level_1_2_3_or_6: @ 8085BF4
+ thumb_func_start Overworld_MapTypeAllowsTeleportAndFly
+Overworld_MapTypeAllowsTeleportAndFly: @ 8085BF4
push {lr}
lsls r0, 24
lsrs r0, 24
@@ -2793,7 +2793,7 @@ _08085C0E:
_08085C10:
pop {r1}
bx r1
- thumb_func_end is_light_level_1_2_3_or_6
+ thumb_func_end Overworld_MapTypeAllowsTeleportAndFly
thumb_func_start is_light_level_8_or_9
is_light_level_8_or_9: @ 8085C14
diff --git a/asm/party_menu.s b/asm/party_menu.s
index 4a70ab1da..844043a95 100755
--- a/asm/party_menu.s
+++ b/asm/party_menu.s
@@ -487,7 +487,7 @@ _081B05F0:
.4byte _081B0694
_081B0610:
ldr r4, =gUnknown_0203CEE0
- ldr r0, =gUnknown_08D967EC
+ ldr r0, =gPartyMenuMisc_Gfx
mov r1, sp
bl malloc_and_decompress
adds r1, r0, 0
@@ -505,14 +505,14 @@ _081B0638:
lsls r0, 24
cmp r0, 0
bne _081B06B4
- ldr r0, =gUnknown_08D96BA0
+ ldr r0, =gPartyMenuMisc_Tilemap
ldr r1, =gUnknown_0203CEE4
ldr r1, [r1]
bl LZDecompressWram
b _081B069A
.pool
_081B0658:
- ldr r0, =gUnknown_08D96AB4
+ ldr r0, =gPartyMenuMisc_Pal
movs r2, 0xB0
lsls r2, 1
movs r1, 0
@@ -10027,8 +10027,8 @@ _081B572A:
.pool
thumb_func_end sub_81B56D8
- thumb_func_start hm_add_c3_launch_phase_2
-hm_add_c3_launch_phase_2: @ 81B5738
+ thumb_func_start FieldCallback_Teleport
+FieldCallback_Teleport: @ 81B5738
push {lr}
bl pal_fill_black
ldr r0, =task_launch_hm_phase_2
@@ -10038,7 +10038,7 @@ hm_add_c3_launch_phase_2: @ 81B5738
pop {r1}
bx r1
.pool
- thumb_func_end hm_add_c3_launch_phase_2
+ thumb_func_end FieldCallback_Teleport
thumb_func_start task_launch_hm_phase_2
task_launch_hm_phase_2: @ 81B5750
@@ -10160,7 +10160,7 @@ sub_81B5820: @ 81B5820
cmp r0, 0x1
bne _081B585C
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =hm_surf_run_dp02scr
@@ -10199,7 +10199,7 @@ sub_81B5884: @ 81B5884
push {lr}
ldr r0, =gMapHeader
ldrb r0, [r0, 0x17]
- bl is_light_level_1_2_3_or_6
+ bl Overworld_MapTypeAllowsTeleportAndFly
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
@@ -10278,7 +10278,7 @@ hm_prepare_waterfall: @ 81B58F0
cmp r0, 0x1
bne _081B594C
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =hm2_waterfall
@@ -10325,7 +10325,7 @@ sub_81B5974: @ 81B5974
.pool
_081B5990:
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =sub_81B5958
diff --git a/asm/pokedex.s b/asm/pokedex.s
index a0edbab0e..147f8921b 100644
--- a/asm/pokedex.s
+++ b/asm/pokedex.s
@@ -2028,7 +2028,7 @@ _080BC56E:
bl SetGpuReg
movs r0, 0
bl ResetBgsAndClearDma3BusyFlags
- ldr r1, =gUnknown_0855D298
+ ldr r1, =gBgTemplates_0855D298
movs r0, 0
movs r2, 0x4
bl InitBgsFromTemplates
@@ -2054,7 +2054,7 @@ _080BC56E:
adds r1, r0, 0
movs r0, 0
bl SetBgTilemapBuffer
- ldr r1, =gUnknown_08DC1934
+ ldr r1, =gPokedexMenu_Gfx
movs r2, 0x80
lsls r2, 6
str r6, [sp]
@@ -2119,7 +2119,7 @@ _080BC682:
lsls r0, 31
lsrs r0, 31
bl sub_80BC844
- ldr r0, =gUnknown_0855D2A8
+ ldr r0, =sWindowTemplates_0855D2A8
bl InitWindows
bl DeactivateAllTextPrinters
movs r0, 0
@@ -2141,9 +2141,9 @@ _080BC6CC:
ldr r1, =gReservedSpritePaletteCount
movs r0, 0x8
strb r0, [r1]
- ldr r0, =gUnknown_0855D26C
+ ldr r0, =gSpriteSheets_0855D26C
bl LoadCompressedObjectPic
- ldr r0, =gUnknown_0855D27C
+ ldr r0, =gSpritePalettes_0855D26C
bl LoadSpritePalettes
adds r0, r5, 0
bl sub_80BDB7C
@@ -2291,14 +2291,14 @@ sub_80BC844: @ 80BC844
lsrs r0, 24
cmp r0, 0x1
bne _080BC858
- ldr r0, =gUnknown_08DC17B6
+ ldr r0, =gPokedexHoennBg_Pal + 0x2
b _080BC862
.pool
_080BC858:
bl IsNationalPokedexEnabled
cmp r0, 0
bne _080BC870
- ldr r0, =gUnknown_08DC16F6
+ ldr r0, =gPokedexText_Pal + 2
_080BC862:
movs r1, 0x1
movs r2, 0xBE
@@ -2306,7 +2306,7 @@ _080BC862:
b _080BC87A
.pool
_080BC870:
- ldr r0, =gUnknown_08DC1876
+ ldr r0, =gPokedexNationalBg_Pal + 0x2
movs r1, 0x1
movs r2, 0xBE
bl LoadPalette
@@ -2609,7 +2609,7 @@ _080BCACC:
movs r7, 0x1
mov r9, r7
_080BCADA:
- ldr r1, =gUnknown_0855C6A4
+ ldr r1, =gPokedexOrder_Alphabetical
lsls r4, 16
asrs r0, r4, 15
adds r0, r1
@@ -2687,7 +2687,7 @@ _080BCB78:
ldr r7, =gUnknown_02039B4C
ldr r6, =0x0000060c
_080BCB82:
- ldr r1, =gUnknown_0855C9DA
+ ldr r1, =gPokedexOrder_Weight
asrs r0, 15
adds r0, r1
ldrh r0, [r0]
@@ -2752,7 +2752,7 @@ _080BCC08:
ldr r0, =0x00000181
mov r9, r0
_080BCC16:
- ldr r1, =gUnknown_0855C9DA
+ ldr r1, =gPokedexOrder_Weight
lsls r4, 16
asrs r0, r4, 15
adds r0, r1
@@ -2819,7 +2819,7 @@ _080BCCA0:
ldr r7, =gUnknown_02039B4C
ldr r6, =0x0000060c
_080BCCAA:
- ldr r1, =gUnknown_0855CCDE
+ ldr r1, =gPokedexOrder_Height
asrs r0, 15
adds r0, r1
ldrh r0, [r0]
@@ -2884,7 +2884,7 @@ _080BCD30:
ldr r0, =0x00000181
mov r9, r0
_080BCD3E:
- ldr r1, =gUnknown_0855CCDE
+ ldr r1, =gPokedexOrder_Height
lsls r4, 16
asrs r0, r4, 15
adds r0, r1
@@ -3517,7 +3517,7 @@ sub_80BD23C: @ 80BD23C
b _080BD266
.pool
_080BD264:
- ldr r4, =gUnknown_0855D2FE
+ ldr r4, =sText_TenDashes
_080BD266:
str r5, [sp]
movs r0, 0
@@ -6369,7 +6369,7 @@ _080BEACA:
b _080BEDA0
.pool
_080BEAF0:
- ldr r1, =gUnknown_08DC1934
+ ldr r1, =gPokedexMenu_Gfx
movs r2, 0x80
lsls r2, 6
movs r0, 0
@@ -7257,7 +7257,7 @@ _080BF2B6:
b _080BF5B2
.pool
_080BF310:
- ldr r1, =gUnknown_08DC1934
+ ldr r1, =gPokedexMenu_Gfx
movs r2, 0x80
lsls r2, 6
movs r0, 0
@@ -7856,7 +7856,7 @@ _080BF88E:
b _080BFB94
.pool
_080BF8D8:
- ldr r1, =gUnknown_08DC1934
+ ldr r1, =gPokedexMenu_Gfx
movs r2, 0x80
lsls r2, 6
movs r0, 0
@@ -8543,7 +8543,7 @@ _080BFE92:
b _080C0074
.pool
_080BFF0C:
- ldr r1, =gUnknown_08DC1934
+ ldr r1, =gPokedexMenu_Gfx
movs r2, 0x80
lsls r2, 6
movs r0, 0
@@ -8751,14 +8751,14 @@ _080C00E8:
ands r1, r0
cmp r1, 0
beq _080C0114
- ldr r0, =gUnknown_08DC16F6
+ ldr r0, =gPokedexText_Pal + 2
movs r1, 0x31
movs r2, 0xE
bl LoadPalette
b _080C011E
.pool
_080C0114:
- ldr r0, =gUnknown_08DC1756
+ ldr r0, =gPokedexCaughtScreenFade_Pal + 0x2
movs r1, 0x31
movs r2, 0xE
bl LoadPalette
@@ -11135,7 +11135,7 @@ _080C1332:
bl DeactivateAllTextPrinters
movs r0, 0
bl PutWindowTilemap
- ldr r1, =gUnknown_08DC3304
+ ldr r1, =gPokedexSearchMenu_Gfx
movs r2, 0x80
lsls r2, 6
str r5, [sp]
@@ -11145,7 +11145,7 @@ _080C1332:
bl IsNationalPokedexEnabled
cmp r0, 0
bne _080C13E4
- ldr r1, =gUnknown_08DC3A0C
+ ldr r1, =gPokedexSearch2_Tilemap
movs r0, 0x3
movs r2, 0
movs r3, 0
@@ -11153,13 +11153,13 @@ _080C1332:
b _080C13F0
.pool
_080C13E4:
- ldr r1, =gUnknown_08DC3870
+ ldr r1, =gPokedexSearch1_Tilemap
movs r0, 0x3
movs r2, 0
movs r3, 0
bl CopyToBgTilemapBuffer
_080C13F0:
- ldr r0, =gUnknown_08DC3286
+ ldr r0, =gPokedexSearchMenu_Pal + 0x2
movs r1, 0x1
movs r2, 0x7E
bl LoadPalette
@@ -11172,9 +11172,9 @@ _080C13F0:
b _080C1516
.pool
_080C1414:
- ldr r0, =gUnknown_0855D26C
+ ldr r0, =gSpriteSheets_0855D26C
bl LoadCompressedObjectPic
- ldr r0, =gUnknown_0855D27C
+ ldr r0, =gSpritePalettes_0855D26C
bl LoadSpritePalettes
adds r0, r4, 0
bl sub_80C2594
diff --git a/asm/pokedex_area_screen.s b/asm/pokedex_area_screen.s
index a222c43f9..5f9e01974 100644
--- a/asm/pokedex_area_screen.s
+++ b/asm/pokedex_area_screen.s
@@ -1781,7 +1781,7 @@ sub_813D8A8: @ 813D8A8
str r1, [sp]
ldr r0, =0x00030600
str r0, [sp, 0x4]
- ldr r0, =gUnknown_08DC4140
+ ldr r0, =gPokedexAreaScreenAreaUnknown_Gfx
bl LZ77UnCompWram
mov r0, sp
bl LoadSpriteSheet
diff --git a/asm/pokemon_icon.s b/asm/pokemon_icon.s
index 79838f6f9..9157059db 100755
--- a/asm/pokemon_icon.s
+++ b/asm/pokemon_icon.s
@@ -28,15 +28,15 @@ sub_80D2CC4: @ 80D2CC4
lsls r0, 24
lsrs r0, 24
mov r9, r0
- ldr r0, =gUnknown_0857C570
+ ldr r0, =sMonIconOamData
str r0, [sp, 0x18]
adds r0, r4, 0
adds r2, r5, 0
bl GetMonIconPtr
str r0, [sp, 0x1C]
- ldr r0, =gUnknown_0857C5B4
+ ldr r0, =sMonIconAnims
str r0, [sp, 0x20]
- ldr r0, =gUnknown_0857C5E8
+ ldr r0, =sMonIconAffineAnims
str r0, [sp, 0x24]
str r6, [sp, 0x28]
ldr r0, =gMonIconPaletteIndices
@@ -102,13 +102,13 @@ sub_80D2D78: @ 80D2D78
lsls r6, 24
lsrs r6, 24
mov r3, sp
- ldr r2, =gUnknown_0857C570
+ ldr r2, =sMonIconOamData
str r2, [sp]
movs r2, 0
str r2, [sp, 0x4]
- ldr r2, =gUnknown_0857C5B4
+ ldr r2, =sMonIconAnims
str r2, [sp, 0x8]
- ldr r2, =gUnknown_0857C5E8
+ ldr r2, =sMonIconAffineAnims
str r2, [sp, 0xC]
str r1, [sp, 0x10]
ldr r2, =gMonIconPaletteIndices
@@ -601,7 +601,7 @@ _080D3126:
strb r7, [r5]
b _080D31A4
_080D312A:
- ldr r2, =gUnknown_0857C5F0
+ ldr r2, =sSpriteImageSizes
ldrb r1, [r4, 0x3]
lsrs r1, 6
lsls r1, 1
@@ -689,7 +689,7 @@ sub_80D31B4: @ 80D31B4
mov r8, r0
movs r0, 0
str r0, [sp, 0x30]
- ldr r2, =gUnknown_0857C5F0
+ ldr r2, =sSpriteImageSizes
mov r0, r9
ldr r6, [r0]
ldrb r1, [r6, 0x3]
@@ -776,7 +776,7 @@ sub_80D328C: @ 80D328C
sub sp, 0x8
movs r1, 0
str r1, [sp]
- ldr r3, =gUnknown_0857C5F0
+ ldr r3, =sSpriteImageSizes
ldrb r2, [r0, 0x3]
lsrs r2, 6
lsls r2, 1
diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s
index 1ba3b773d..00a8b4d92 100755
--- a/asm/pokemon_storage_system.s
+++ b/asm/pokemon_storage_system.s
@@ -1106,7 +1106,7 @@ sub_80C7958: @ 80C7958
ldrh r0, [r3]
adds r0, 0x1
strh r0, [r1]
- ldr r0, =gUnknown_08571710
+ ldr r0, =sSpriteAnimTable_8571710
str r0, [sp, 0xC]
movs r4, 0
_080C7A10:
@@ -5343,7 +5343,7 @@ sub_80CA044: @ 80CA044
movs r0, 0
movs r2, 0x4
bl InitBgsFromTemplates
- ldr r1, =gUnknown_08DD2FE8
+ ldr r1, =gPSSMenu_Gfx
movs r0, 0
str r0, [sp]
movs r0, 0x1
@@ -6104,7 +6104,7 @@ sub_80CA704: @ 80CA704
ldr r1, [r4]
adds r1, 0xB0
bl LZ77UnCompWram
- ldr r0, =gUnknown_08DD36A8
+ ldr r0, =gPSSMenu_Pal
movs r1, 0x10
movs r2, 0x20
bl LoadPalette
@@ -9124,7 +9124,7 @@ _080CBF80:
adds r1, r3
ldr r0, [r1]
ldr r2, [r0]
- ldr r0, =gUnknown_0857291C
+ ldr r0, =gSpriteAffineAnimTable_857291C
str r0, [r2, 0x10]
ldr r0, [r1]
ldr r0, [r0]
diff --git a/asm/pokemon_summary_screen.s b/asm/pokemon_summary_screen.s
index 5ae458d6d..51f322e1e 100755
--- a/asm/pokemon_summary_screen.s
+++ b/asm/pokemon_summary_screen.s
@@ -2411,7 +2411,7 @@ _081C5264:
.4byte _081C52D4
_081C5278:
bl reset_temp_tile_data_buffers
- ldr r1, =gUnknown_08D9A620
+ ldr r1, =gBagScreen_Gfx
movs r0, 0
str r0, [sp]
movs r0, 0x2
diff --git a/asm/pokenav.s b/asm/pokenav.s
index a01117868..b52715cb4 100755
--- a/asm/pokenav.s
+++ b/asm/pokenav.s
@@ -683,7 +683,7 @@ _081C77B0:
movs r0, 0
bl sub_81C763C
adds r4, r0, 0
- ldr r1, =gUnknown_08DC7B80
+ ldr r1, =gPokenavHeader_Gfx
movs r0, 0
str r0, [sp]
movs r2, 0
@@ -693,12 +693,12 @@ _081C77B0:
movs r0, 0
adds r1, r4, 0
bl SetBgTilemapBuffer
- ldr r1, =gUnknown_08DC7D84
+ ldr r1, =gPokenavHeader_Tilemap
movs r0, 0
movs r2, 0
movs r3, 0
bl CopyToBgTilemapBuffer
- ldr r0, =gUnknown_08DC7B60
+ ldr r0, =gPokenavHeader_Pal
movs r1, 0
movs r2, 0x20
bl sub_81C7944
@@ -1571,7 +1571,7 @@ sub_81C7E58: @ 81C7E58
bl sub_8034974
adds r5, r0, 0
lsls r4, 5
- ldr r0, =gUnknown_08DC7F00
+ ldr r0, =gPokenavLeftHeader_Pal
adds r4, r0
movs r0, 0x1
bl IndexOfSpritePaletteTag
@@ -1653,7 +1653,7 @@ sub_81C7F24: @ 81C7F24
bl sub_8034974
adds r5, r0, 0
lsls r4, 5
- ldr r0, =gUnknown_08DC7F00
+ ldr r0, =gPokenavLeftHeader_Pal
adds r4, r0
movs r0, 0x2
bl IndexOfSpritePaletteTag
@@ -5198,7 +5198,7 @@ _081C9A5C:
ldr r0, =gUnknown_08620194
movs r1, 0x3
bl sub_81C7B54
- ldr r1, =gUnknown_08DC90E0
+ ldr r1, =gPokenavMessageBox_Gfx
movs r0, 0
str r0, [sp]
movs r0, 0x1
@@ -5209,14 +5209,14 @@ _081C9A5C:
adds r1, 0x8C
movs r0, 0x1
bl SetBgTilemapBuffer
- ldr r1, =gUnknown_08DC9130
+ ldr r1, =gPokenavMessageBox_Tilemap
movs r0, 0x1
movs r2, 0
movs r3, 0
bl CopyToBgTilemapBuffer
movs r0, 0x1
bl CopyBgTilemapBufferToVram
- ldr r0, =gUnknown_08DC90C0
+ ldr r0, =gPokenavMessageBox_Pal
movs r1, 0x10
movs r2, 0x20
bl sub_81C7944
@@ -7924,7 +7924,7 @@ sub_81CAF78: @ 81CAF78
strb r0, [r6]
ldr r0, =gMapHeader
ldrb r0, [r0, 0x17]
- bl is_light_level_1_2_3_or_6
+ bl Overworld_MapTypeAllowsTeleportAndFly
lsls r0, 24
cmp r0, 0
bne _081CAFA4
@@ -11374,7 +11374,7 @@ sub_81CCA1C: @ 81CCA1C
movs r1, 0x10
movs r2, 0x20
bl sub_81C7944
- ldr r0, =gUnknown_08DC91E8
+ ldr r0, =gHoennMapZoomIcons_Pal
movs r1, 0x30
movs r2, 0x20
bl sub_81C7944
@@ -13941,7 +13941,7 @@ _081CDF18:
ldr r1, =0x0000040b
movs r0, 0x52
bl SetGpuReg
- ldr r1, =gUnknown_08DC6548
+ ldr r1, =gPokenavCondition_Gfx
movs r0, 0
str r0, [sp]
movs r0, 0x3
@@ -13973,7 +13973,7 @@ _081CDFB8:
beq _081CDFC4
b _081CE2C0
_081CDFC4:
- ldr r0, =gUnknown_08DC6DFC
+ ldr r0, =gPokenavCondition_Tilemap
adds r4, r5, 0x4
adds r1, r4, 0
bl LZ77UnCompVram
@@ -13983,7 +13983,7 @@ _081CDFC4:
bl sub_81CDD5C
cmp r0, 0x1
bne _081CDFF2
- ldr r1, =gUnknown_08DC7070
+ ldr r1, =gPokenavOptions_Tilemap
movs r0, 0x9
str r0, [sp]
movs r0, 0x4
@@ -13995,7 +13995,7 @@ _081CDFC4:
_081CDFF2:
movs r0, 0x3
bl CopyBgTilemapBufferToVram
- ldr r0, =gUnknown_08DC6528
+ ldr r0, =gPokenavCondition_Pal
movs r1, 0x10
movs r2, 0x20
bl sub_81C7944
diff --git a/asm/rayquaza_scene.s b/asm/rayquaza_scene.s
index 58380a354..ab04d8660 100755
--- a/asm/rayquaza_scene.s
+++ b/asm/rayquaza_scene.s
@@ -1119,7 +1119,7 @@ sub_81D706C: @ 81D706C
push {r4,lr}
sub sp, 0x4
bl reset_temp_tile_data_buffers
- ldr r1, =gUnknown_08DA33C0
+ ldr r1, =gRaySceneClouds_Gfx
movs r0, 0
str r0, [sp]
movs r2, 0
@@ -1130,22 +1130,22 @@ _081D7082:
lsls r0, 24
cmp r0, 0
bne _081D7082
- ldr r0, =gUnknown_08DA3988
+ ldr r0, =gRaySceneClouds2_Tilemap
ldr r4, =gUnknown_0203CF60
ldr r1, [r4]
adds r1, 0x4
bl LZDecompressWram
- ldr r0, =gUnknown_08DA3824
+ ldr r0, =gRaySceneClouds1_Tilemap
ldr r1, [r4]
ldr r2, =0x00000804
adds r1, r2
bl LZDecompressWram
- ldr r0, =gUnknown_08DA3A88
+ ldr r0, =gRaySceneClouds3_Tilemap
ldr r1, [r4]
ldr r2, =0x00001004
adds r1, r2
bl LZDecompressWram
- ldr r0, =gUnknown_08DA37E8
+ ldr r0, =gRaySceneClouds_Pal
movs r1, 0
movs r2, 0x40
bl LoadCompressedPalette
@@ -1172,8 +1172,8 @@ _081D7082:
.pool
thumb_func_end sub_81D706C
- thumb_func_start task_add_00_WIN0V_open_close_above_and_more
-task_add_00_WIN0V_open_close_above_and_more: @ 81D7134
+ thumb_func_start sub_81D7134
+sub_81D7134: @ 81D7134
push {r4-r7,lr}
sub sp, 0x8
lsls r0, 24
@@ -1264,7 +1264,7 @@ _081D71EE:
pop {r0}
bx r0
.pool
- thumb_func_end task_add_00_WIN0V_open_close_above_and_more
+ thumb_func_end sub_81D7134
thumb_func_start sub_81D7228
sub_81D7228: @ 81D7228
@@ -2811,20 +2811,20 @@ sub_81D7E9C: @ 81D7E9C
push {r4,lr}
sub sp, 0x4
bl reset_temp_tile_data_buffers
- ldr r1, =gUnknown_08DA33C0
+ ldr r1, =gRaySceneClouds_Gfx
movs r4, 0
str r4, [sp]
movs r0, 0
movs r2, 0
movs r3, 0
bl decompress_and_copy_tile_data_to_vram
- ldr r1, =gUnknown_08DA4F70
+ ldr r1, =gRaySceneOvercast_Gfx
str r4, [sp]
movs r0, 0x1
movs r2, 0
movs r3, 0
bl decompress_and_copy_tile_data_to_vram
- ldr r1, =gUnknown_08DA3C94
+ ldr r1, =gRaySceneRayquaza_Gfx
str r4, [sp]
movs r0, 0x2
movs r2, 0
@@ -2835,22 +2835,22 @@ _081D7ED0:
lsls r0, 24
cmp r0, 0
bne _081D7ED0
- ldr r0, =gUnknown_08DA3988
+ ldr r0, =gRaySceneClouds2_Tilemap
ldr r4, =gUnknown_0203CF60
ldr r1, [r4]
adds r1, 0x4
bl LZDecompressWram
- ldr r0, =gUnknown_08DA60B8
+ ldr r0, =gRaySceneOvercast_Tilemap
ldr r1, [r4]
ldr r2, =0x00000804
adds r1, r2
bl LZDecompressWram
- ldr r0, =gUnknown_08DA4DEC
+ ldr r0, =gRaySceneRayquaza_Tilemap
ldr r1, [r4]
ldr r2, =0x00001004
adds r1, r2
bl LZDecompressWram
- ldr r0, =gUnknown_08DA4DA8
+ ldr r0, =gRaySceneRayquaza_Pal
movs r1, 0
movs r2, 0x40
bl LoadCompressedPalette
@@ -3354,14 +3354,14 @@ sub_81D8358: @ 81D8358
push {r4-r7,lr}
sub sp, 0xC
bl reset_temp_tile_data_buffers
- ldr r1, =gUnknown_08DA7528
+ ldr r1, =gRaySceneRayquazaLight_Gfx
movs r4, 0
str r4, [sp]
movs r0, 0
movs r2, 0
movs r3, 0
bl decompress_and_copy_tile_data_to_vram
- ldr r1, =gUnknown_08DA69BC
+ ldr r1, =gRaySceneOvercast2_Gfx
str r4, [sp]
movs r0, 0x1
movs r2, 0
@@ -3374,12 +3374,12 @@ _081D8380:
lsrs r6, r0, 24
cmp r6, 0
bne _081D8380
- ldr r0, =gUnknown_08DA7AAC
+ ldr r0, =gRaySceneRayquazaLight_Tilemap
ldr r5, =gUnknown_0203CF60
ldr r1, [r5]
adds r1, 0x4
bl LZDecompressWram
- ldr r0, =gUnknown_08DA7784
+ ldr r0, =gRaySceneOvercast2_Tilemap
ldr r1, [r5]
ldr r4, =0x00001804
adds r1, r4
@@ -3406,7 +3406,7 @@ _081D8380:
ldr r2, =0x010000d0
adds r0, r7, 0
bl CpuFastSet
- ldr r0, =gUnknown_08DA7744
+ ldr r0, =gRaySceneOvercast2_Pal
movs r1, 0
movs r2, 0x40
bl LoadCompressedPalette
@@ -3961,20 +3961,20 @@ sub_81D88D0: @ 81D88D0
push {r4,lr}
sub sp, 0x4
bl reset_temp_tile_data_buffers
- ldr r1, =gUnknown_08DA80BC
+ ldr r1, =gRaySceneRayquazaChase_Gfx
movs r4, 0
str r4, [sp]
movs r0, 0x1
movs r2, 0
movs r3, 0
bl decompress_and_copy_tile_data_to_vram
- ldr r1, =gUnknown_08DA7EAC
+ ldr r1, =gRaySceneChaseStreaks_Gfx
str r4, [sp]
movs r0, 0x2
movs r2, 0
movs r3, 0
bl decompress_and_copy_tile_data_to_vram
- ldr r1, =gUnknown_08DA7C30
+ ldr r1, =gRaySceneChaseBg_Gfx
str r4, [sp]
movs r0, 0x3
movs r2, 0
@@ -3985,27 +3985,27 @@ _081D8904:
lsls r0, 24
cmp r0, 0
bne _081D8904
- ldr r0, =gUnknown_08DA8D6C
+ ldr r0, =gRayChaseRayquazaChase2_Tilemap
ldr r4, =gUnknown_0203CF60
ldr r1, [r4]
adds r1, 0x4
bl LZDecompressWram
- ldr r0, =gUnknown_08DA8B40
+ ldr r0, =gRayChaseRayquazaChase_Tilemap
ldr r1, [r4]
ldr r2, =0x00000804
adds r1, r2
bl LZDecompressWram
- ldr r0, =gUnknown_08DA7FB4
+ ldr r0, =gRaySceneChaseStreaks_Tilemap
ldr r1, [r4]
ldr r2, =0x00001004
adds r1, r2
bl LZDecompressWram
- ldr r0, =gUnknown_08DA7D6C
+ ldr r0, =gRaySceneChaseBg_Tilemap
ldr r1, [r4]
ldr r2, =0x00001804
adds r1, r2
bl LZDecompressWram
- ldr r0, =gUnknown_08DA8E84
+ ldr r0, =gRaySceneChase_Pal
movs r1, 0
movs r2, 0x80
bl LoadCompressedPalette
@@ -4407,14 +4407,14 @@ sub_81D8CC4: @ 81D8CC4
push {r4,lr}
sub sp, 0x4
bl reset_temp_tile_data_buffers
- ldr r1, =gUnknown_08DAAB24
+ ldr r1, =gRaySceneHushRing_Gfx
movs r4, 0
str r4, [sp]
movs r0, 0x2
movs r2, 0
movs r3, 0
bl decompress_and_copy_tile_data_to_vram
- ldr r1, =gUnknown_08DAA8B4
+ ldr r1, =gRaySceneHushBg_Gfx
str r4, [sp]
movs r0, 0
movs r2, 0
@@ -4425,22 +4425,22 @@ _081D8CEA:
lsls r0, 24
cmp r0, 0
bne _081D8CEA
- ldr r0, =gUnknown_08DAAE54
+ ldr r0, =gRaySceneHushRing_Tilemap
ldr r4, =gUnknown_0203CF60
ldr r1, [r4]
ldr r2, =0x00000804
adds r1, r2
bl LZDecompressWram
- ldr r0, =gUnknown_08DAAC1C
+ ldr r0, =gRaySceneHushBg_Tilemap
ldr r1, [r4]
adds r1, 0x4
bl LZDecompressWram
- ldr r0, =gUnknown_08DAAF98
+ ldr r0, =gRaySceneHushRing_Map
ldr r1, [r4]
ldr r2, =0x00001004
adds r1, r2
bl LZDecompressWram
- ldr r0, =gUnknown_08DAAFEC
+ ldr r0, =gRaySceneHushBg_Pal
movs r1, 0
movs r2, 0x60
bl LoadCompressedPalette
diff --git a/asm/rom6.s b/asm/rom6.s
index e3145fb8a..cc02638bc 100644
--- a/asm/rom6.s
+++ b/asm/rom6.s
@@ -268,7 +268,7 @@ sub_8135654: @ 8135654
lsrs r0, 24
strh r0, [r4]
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =sub_8179834
@@ -285,7 +285,7 @@ _0813568C:
b _081356AC
_0813569E:
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =sub_81356C4
@@ -361,7 +361,7 @@ sub_813572C: @ 813572C
b _0813574C
_0813573E:
ldr r1, =gUnknown_03005DB0
- ldr r0, =hm_add_c3_launch_phase_2
+ ldr r0, =FieldCallback_Teleport
str r0, [r1]
ldr r1, =gUnknown_0203CEEC
ldr r0, =hm2_dig
@@ -447,5 +447,5 @@ _081357EE:
bx r0
.pool
thumb_func_end sub_81357BC
-
+
.align 2, 0 @ Don't pad with nop.
diff --git a/asm/rotating_gate.s b/asm/rotating_gate.s
index 5b7671bf8..da5e73034 100644
--- a/asm/rotating_gate.s
+++ b/asm/rotating_gate.s
@@ -410,7 +410,7 @@ sub_80FBAE4: @ 80FBAE4
adds r0, r4, 0x4
lsls r0, 24
lsrs r4, r0, 24
- bl sub_811A138
+ bl GetPlayerSpeed
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
@@ -433,7 +433,7 @@ _080FBB2A:
adds r0, 0x8
lsls r0, 24
lsrs r4, r0, 24
- bl sub_811A138
+ bl GetPlayerSpeed
lsls r0, 16
asrs r0, 16
cmp r0, 0x1
diff --git a/asm/roulette.s b/asm/roulette.s
index 74a4d455b..bb1d5fed6 100644
--- a/asm/roulette.s
+++ b/asm/roulette.s
@@ -452,7 +452,7 @@ _08140662:
lsls r2, 1
movs r1, 0
bl LoadPalette
- ldr r1, =gUnknown_08DBC2E8
+ ldr r1, =gRouletteMenuTiles
movs r4, 0
str r4, [sp]
movs r0, 0x1
diff --git a/asm/slot_machine.s b/asm/slot_machine.s
index 24e755648..800b66a55 100644
--- a/asm/slot_machine.s
+++ b/asm/slot_machine.s
@@ -10588,7 +10588,7 @@ sub_812F7E4: @ 812F7E4
bl Alloc
adds r1, r0, 0
str r1, [r4]
- ldr r0, =gUnknown_08DD0050
+ ldr r0, =gSlotMachineReelTime_Gfx
bl LZDecompressWram
ldr r4, =gUnknown_0203AAD8
movs r0, 0xD8
@@ -10715,14 +10715,14 @@ sub_812F908: @ 812F908
bl Alloc
adds r1, r0, 0
str r1, [r4]
- ldr r0, =gUnknown_08DCDB30
+ ldr r0, =gSlotMachineMenu_Gfx
bl LZDecompressWram
ldr r1, [r4]
movs r0, 0x2
adds r2, r5, 0
movs r3, 0
bl LoadBgTiles
- ldr r0, =gUnknown_08DCDA90
+ ldr r0, =gSlotMachineMenu_Pal
movs r1, 0
movs r2, 0xA0
bl LoadPalette
@@ -10748,7 +10748,7 @@ sub_812F958: @ 812F958
thumb_func_start sub_812F968
sub_812F968: @ 812F968
push {lr}
- ldr r1, =gUnknown_08DCE770
+ ldr r1, =gSlotMachineMenu_Tilemap
movs r2, 0xA0
lsls r2, 3
movs r0, 0x2
diff --git a/asm/trade.s b/asm/trade.s
index f576be122..bfca20a70 100644
--- a/asm/trade.s
+++ b/asm/trade.s
@@ -8105,11 +8105,11 @@ _0807B668:
ldr r1, =0x00005206
movs r0, 0xC
bl SetGpuReg
- ldr r0, =gUnknown_08DD7300
+ ldr r0, =gTradeGba2_Pal
movs r1, 0x10
movs r2, 0x60
bl LoadPalette
- ldr r3, =gUnknown_08DD7360
+ ldr r3, =gTradeGba_Gfx
ldr r4, =0x06004000
movs r5, 0xA1
lsls r5, 5
@@ -8168,7 +8168,7 @@ _0807B726:
ldr r1, =0x80000800
str r1, [r0, 0x8]
ldr r0, [r0, 0x8]
- ldr r3, =gUnknown_08DD7360
+ ldr r3, =gTradeGba_Gfx
movs r4, 0xC0
lsls r4, 19
movs r5, 0xA1
@@ -8446,11 +8446,11 @@ _0807B9FC:
ldr r1, =0x00005206
movs r0, 0xC
bl SetGpuReg
- ldr r0, =gUnknown_08DD7300
+ ldr r0, =gTradeGba2_Pal
movs r1, 0x10
movs r2, 0x60
bl LoadPalette
- ldr r3, =gUnknown_08DD7360
+ ldr r3, =gTradeGba_Gfx
ldr r4, =0x06004000
movs r5, 0xA1
lsls r5, 5
diff --git a/asm/trainer_card.s b/asm/trainer_card.s
index 49ff1748d..ab1b199e7 100644
--- a/asm/trainer_card.s
+++ b/asm/trainer_card.s
@@ -601,12 +601,12 @@ _080C2C04:
ldrb r0, [r0]
cmp r0, 0
beq _080C2C28
- ldr r0, =gUnknown_08DD1AB8
+ ldr r0, =gEmeraldTrainerCard_Gfx
ldr r2, =0x000019a8
b _080C2C4A
.pool
_080C2C28:
- ldr r0, =gUnknown_08DD246C
+ ldr r0, =gFireRedTrainerCard_Gfx
ldr r2, =0x000019a8
b _080C2C4A
.pool
@@ -3317,7 +3317,7 @@ _080C4418:
ldrb r0, [r0]
cmp r0, 0
beq _080C447C
- ldr r1, =gUnknown_0856FAE4
+ ldr r1, =gEmeraldTrainerCardStarPals
ldr r3, =0x00000535
adds r0, r2, r3
ldrb r0, [r0]
@@ -3344,7 +3344,7 @@ _080C4418:
b _080C44B2
.pool
_080C447C:
- ldr r1, =gUnknown_0856FAF8
+ ldr r1, =gFireRedTrainerCardStarPals
ldr r3, =0x00000535
adds r0, r2, r3
ldrb r0, [r0]
@@ -5766,7 +5766,7 @@ sub_80C58D4: @ 80C58D4
beq _080C5914
cmp r0, 0x2
beq _080C591C
- bl sub_8085784
+ bl Overworld_PlaySpecialMapMusic
b _080C5924
.pool
_080C5914:
diff --git a/asm/use_pokeblock.s b/asm/use_pokeblock.s
index b01f1eff4..60c11524a 100755
--- a/asm/use_pokeblock.s
+++ b/asm/use_pokeblock.s
@@ -2397,7 +2397,7 @@ _08167A74:
b _08167B7E
.pool
_08167A9C:
- ldr r0, =gUnknown_08DCCF7C
+ ldr r0, =gUsePokeblockGraph_Gfx
ldr r1, =gUnknown_0203BCA4
_08167AA0:
ldr r1, [r1]
@@ -2405,11 +2405,11 @@ _08167AA0:
b _08167B7E
.pool
_08167AB0:
- ldr r0, =gUnknown_08DCD81C
+ ldr r0, =gUsePokeblockGraph_Tilemap
ldr r1, =gUnknown_0203BCA0
ldr r1, [r1]
bl LZ77UnCompVram
- ldr r0, =gUnknown_08DCCF5C
+ ldr r0, =gUsePokeblockGraph_Pal
movs r1, 0x20
movs r2, 0x20
bl LoadPalette
@@ -2431,7 +2431,7 @@ _08167AEC:
ldr r1, [r0]
movs r0, 0x1
bl SetBgTilemapBuffer
- ldr r1, =gUnknown_08DCDA30
+ ldr r1, =gUsePokeblockNatureWin_Pal
movs r0, 0xC
str r0, [sp]
movs r0, 0x4
@@ -3259,7 +3259,7 @@ sub_8168248: @ 8168248
ldr r0, [r0]
str r0, [sp, 0x8]
str r1, [sp, 0xC]
- ldr r0, =gUnknown_08DCCBB8
+ ldr r0, =gUsePokeblockCondition_Gfx
str r0, [sp]
ldr r1, =0xffff0000
ldr r0, [sp, 0x4]
diff --git a/build_tools.sh b/build_tools.sh
new file mode 100644
index 000000000..26f1f35b3
--- /dev/null
+++ b/build_tools.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+make -C tools/gbagfx
+make -C tools/scaninc
+make -C tools/preproc
+make -C tools/bin2c
+make -C tools/rsfont
+make -C tools/aif2pcm
+make -C tools/ramscrgen
diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s
index 834c4bf9d..2b9b6864b 100644
--- a/data/battle_ai_scripts.s
+++ b/data/battle_ai_scripts.s
@@ -1,81 +1,3393 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
+ .include "include/constants/battle_ai.h"
+ .include "include/constants/abilities.h"
+ .include "include/constants/items.h"
+ .include "include/constants/moves.h"
+ .include "include/constants/battle_move_effects.h"
+ .include "include/constants/hold_effects.h"
+ .include "constants/battle_constants.inc"
+ .include "constants/type_constants.inc"
+ .include "asm/macros/battle_ai_script.inc"
.section script_data, "aw", %progbits
.align 2
gBattleAI_ScriptsTable:: @ 82DBEF8
- .4byte gBattleAIScript_82DBF78
- .4byte gBattleAIScript_82DDE3F
- .4byte gBattleAIScript_82DC7B0
- .4byte gBattleAIScript_82DDE71
- .4byte gBattleAIScript_82DDEDD
- .4byte gBattleAIScript_82DDEC8
- .4byte gBattleAIScript_82DDF09
- .4byte gBattleAIScript_82DDFB4
- .4byte gBattleAIScript_82DE193
- .4byte gBattleAIScript_82DE2ED
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE34E
- .4byte gBattleAIScript_82DE309
- .4byte gBattleAIScript_82DE337
- .4byte gBattleAIScript_82DE33E
-
-gBattleAIScript_82DBF78:: @ 82DBF78
- .incbin "baserom.gba", 0x2dbf78, 0x838
-
-gBattleAIScript_82DC7B0:: @ 82DC7B0
- .incbin "baserom.gba", 0x2dc7b0, 0x168F
-
-gBattleAIScript_82DDE3F:: @ 82DDE3F
- .incbin "baserom.gba", 0x2dde3f, 0x32
-
-gBattleAIScript_82DDE71:: @ 82DDE71
- .incbin "baserom.gba", 0x2dde71, 0x57
-
-gBattleAIScript_82DDEC8:: @ 82DDEC8
- .incbin "baserom.gba", 0x2ddec8, 0x15
-
-gBattleAIScript_82DDEDD:: @ 82DDEDD
- .incbin "baserom.gba", 0x2ddedd, 0x2c
-
-gBattleAIScript_82DDF09:: @ 82DDF09
- .incbin "baserom.gba", 0x2ddf09, 0xab
-
-gBattleAIScript_82DDFB4:: @ 82DDFB4
- .incbin "baserom.gba", 0x2ddfb4, 0x1df
-
-gBattleAIScript_82DE193:: @ 82DE193
- .incbin "baserom.gba", 0x2de193, 0x15a
-
-gBattleAIScript_82DE2ED:: @ 82DE2ED
- .incbin "baserom.gba", 0x2de2ed, 0x1c
-
-gBattleAIScript_82DE309:: @ 82DE309
- .incbin "baserom.gba", 0x2de309, 0x2e
-
-gBattleAIScript_82DE337:: @ 82DE337
- .incbin "baserom.gba", 0x2de337, 0x7
-
-gBattleAIScript_82DE33E:: @ 82DE33E
- .incbin "baserom.gba", 0x2de33e, 0x10
-
-gBattleAIScript_82DE34E:: @ 82DE34E
- .incbin "baserom.gba", 0x2de34e, 0x2
+ .4byte AI_CheckBadMove
+ .4byte AI_CheckViability
+ .4byte AI_TryToFaint
+ .4byte AI_SetupFirstTurn
+ .4byte AI_Risky
+ .4byte AI_PreferStrongestMove
+ .4byte AI_PreferBatonPass
+ .4byte AI_DoubleBattle
+ .4byte AI_HPAware
+ .4byte AI_Unknown
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Ret
+ .4byte AI_Roaming
+ .4byte AI_Safari
+ .4byte AI_FirstBattle
+
+AI_CheckBadMove:
+ if_target_is_ally AI_Ret
+ if_move MOVE_FISSURE, BattleAIScript_82DBF92
+ if_move MOVE_HORN_DRILL, BattleAIScript_82DBF92
+ get_how_powerful_move_is
+ if_equal 0, BattleAIScript_82DBFFE
+
+BattleAIScript_82DBF92:
+ if_type_effectiveness AI_EFFECTIVENESS_x0, Score_Minus10
+ get_ability AI_TARGET
+ if_equal ABILITY_VOLT_ABSORB, BattleAIScript_82DBFBD
+ if_equal ABILITY_WATER_ABSORB, BattleAIScript_82DBFCA
+ if_equal ABILITY_FLASH_FIRE, BattleAIScript_82DBFD7
+ if_equal ABILITY_WONDER_GUARD, BattleAIScript_82DBFE4
+ if_equal ABILITY_LEVITATE, BattleAIScript_82DBFEF
+ goto BattleAIScript_82DBFF7
+
+BattleAIScript_82DBFBD:
+ get_curr_move_type
+ if_equal_ TYPE_ELECTRIC, Score_Minus12
+ goto BattleAIScript_82DBFF7
+
+BattleAIScript_82DBFCA:
+ get_curr_move_type
+ if_equal_ TYPE_WATER, Score_Minus12
+ goto BattleAIScript_82DBFF7
+
+BattleAIScript_82DBFD7:
+ get_curr_move_type
+ if_equal_ TYPE_FIRE, Score_Minus12
+ goto BattleAIScript_82DBFF7
+
+BattleAIScript_82DBFE4:
+ if_type_effectiveness AI_EFFECTIVENESS_x2, BattleAIScript_82DBFF7
+ goto Score_Minus10
+
+BattleAIScript_82DBFEF:
+ get_curr_move_type
+ if_equal_ TYPE_GROUND, Score_Minus10
+
+BattleAIScript_82DBFF7:
+ get_how_powerful_move_is
+ if_equal 0, BattleAIScript_82DBFFE
+
+BattleAIScript_82DBFFE:
+ get_ability AI_TARGET
+ if_not_equal ABILITY_SOUNDPROOF, BattleAIScript_82DC045
+ if_move MOVE_GROWL, Score_Minus10
+ if_move MOVE_ROAR, Score_Minus10
+ if_move MOVE_SING, Score_Minus10
+ if_move MOVE_SUPERSONIC, Score_Minus10
+ if_move MOVE_SCREECH, Score_Minus10
+ if_move MOVE_SNORE, Score_Minus10
+ if_move MOVE_UPROAR, Score_Minus10
+ if_move MOVE_METAL_SOUND, Score_Minus10
+ if_move MOVE_GRASS_WHISTLE, Score_Minus10
+
+BattleAIScript_82DC045:
+ if_effect EFFECT_SLEEP, BattleAIScript_82DC2D4
+ if_effect EFFECT_EXPLOSION, BattleAIScript_82DC2F7
+ if_effect EFFECT_DREAM_EATER, BattleAIScript_82DC330
+ if_effect EFFECT_ATTACK_UP, BattleAIScript_82DC348
+ if_effect EFFECT_DEFENSE_UP, BattleAIScript_82DC351
+ if_effect EFFECT_SPEED_UP, BattleAIScript_82DC35A
+ if_effect EFFECT_SPECIAL_ATTACK_UP, BattleAIScript_82DC363
+ if_effect EFFECT_SPECIAL_DEFENSE_UP, BattleAIScript_82DC36C
+ if_effect EFFECT_ACCURACY_UP, BattleAIScript_82DC375
+ if_effect EFFECT_EVASION_UP, BattleAIScript_82DC37E
+ if_effect EFFECT_ATTACK_DOWN, BattleAIScript_82DC387
+ if_effect EFFECT_DEFENSE_DOWN, BattleAIScript_82DC39C
+ if_effect EFFECT_SPEED_DOWN, BattleAIScript_82DC3A9
+ if_effect EFFECT_SPECIAL_ATTACK_DOWN, BattleAIScript_82DC3BF
+ if_effect EFFECT_SPECIAL_DEFENSE_DOWN, BattleAIScript_82DC3CC
+ if_effect EFFECT_ACCURACY_DOWN, BattleAIScript_82DC3D9
+ if_effect EFFECT_EVASION_DOWN, BattleAIScript_82DC3EE
+ if_effect EFFECT_HAZE, BattleAIScript_82DC405
+ if_effect EFFECT_BIDE, BattleAIScript_82DC4ED
+ if_effect EFFECT_ROAR, BattleAIScript_82DC47B
+ if_effect EFFECT_TOXIC, BattleAIScript_82DC48C
+ if_effect EFFECT_LIGHT_SCREEN, BattleAIScript_82DC4C5
+ if_effect EFFECT_OHKO, BattleAIScript_82DC4D0
+ if_effect EFFECT_RAZOR_WIND, BattleAIScript_82DC4ED
+ if_effect EFFECT_SUPER_FANG, BattleAIScript_82DC4ED
+ if_effect EFFECT_MIST, BattleAIScript_82DC507
+ if_effect EFFECT_FOCUS_ENERGY, BattleAIScript_82DC512
+ if_effect EFFECT_CONFUSE, BattleAIScript_82DC51D
+ if_effect EFFECT_ATTACK_UP_2, BattleAIScript_82DC348
+ if_effect EFFECT_DEFENSE_UP_2, BattleAIScript_82DC351
+ if_effect EFFECT_SPEED_UP_2, BattleAIScript_82DC35A
+ if_effect EFFECT_SPECIAL_ATTACK_UP_2, BattleAIScript_82DC363
+ if_effect EFFECT_SPECIAL_DEFENSE_UP_2, BattleAIScript_82DC36C
+ if_effect EFFECT_ACCURACY_UP_2, BattleAIScript_82DC375
+ if_effect EFFECT_EVASION_UP_2, BattleAIScript_82DC37E
+ if_effect EFFECT_ATTACK_DOWN_2, BattleAIScript_82DC387
+ if_effect EFFECT_DEFENSE_DOWN_2, BattleAIScript_82DC39C
+ if_effect EFFECT_SPEED_DOWN_2, BattleAIScript_82DC3A9
+ if_effect EFFECT_SPECIAL_ATTACK_DOWN_2, BattleAIScript_82DC3BF
+ if_effect EFFECT_SPECIAL_DEFENSE_DOWN_2, BattleAIScript_82DC3CC
+ if_effect EFFECT_ACCURACY_DOWN_2, BattleAIScript_82DC3D9
+ if_effect EFFECT_EVASION_DOWN_2, BattleAIScript_82DC3EE
+ if_effect EFFECT_REFLECT, BattleAIScript_82DC53A
+ if_effect EFFECT_POISON, BattleAIScript_82DC48C
+ if_effect EFFECT_PARALYZE, BattleAIScript_82DC545
+ if_effect EFFECT_SUBSTITUTE, BattleAIScript_82DC568
+ if_effect EFFECT_RECHARGE, BattleAIScript_82DC4ED
+ if_effect EFFECT_LEECH_SEED, BattleAIScript_82DC57A
+ if_effect EFFECT_DISABLE, BattleAIScript_82DC595
+ if_effect EFFECT_LEVEL_DAMAGE, BattleAIScript_82DC4ED
+ if_effect EFFECT_PSYWAVE, BattleAIScript_82DC4ED
+ if_effect EFFECT_COUNTER, BattleAIScript_82DC4ED
+ if_effect EFFECT_ENCORE, BattleAIScript_82DC59D
+ if_effect EFFECT_SNORE, BattleAIScript_82DC5A5
+ if_effect EFFECT_SLEEP_TALK, BattleAIScript_82DC5A5
+ if_effect EFFECT_FLAIL, BattleAIScript_82DC4ED
+ if_effect EFFECT_MEAN_LOOK, BattleAIScript_82DC5B0
+ if_effect EFFECT_NIGHTMARE, BattleAIScript_82DC31B
+ if_effect EFFECT_MINIMIZE, BattleAIScript_82DC37E
+ if_effect EFFECT_CURSE, BattleAIScript_82DC5BB
+ if_effect EFFECT_SPIKES, BattleAIScript_82DC5CC
+ if_effect EFFECT_FORESIGHT, BattleAIScript_82DC5D7
+ if_effect EFFECT_PERISH_SONG, BattleAIScript_82DC5E2
+ if_effect EFFECT_SANDSTORM, BattleAIScript_82DC5ED
+ if_effect EFFECT_SWAGGER, BattleAIScript_82DC51D
+ if_effect EFFECT_ATTRACT, BattleAIScript_82DC5F5
+ if_effect EFFECT_RETURN, BattleAIScript_82DC4ED
+ if_effect EFFECT_PRESENT, BattleAIScript_82DC4ED
+ if_effect EFFECT_FRUSTRATION, BattleAIScript_82DC4ED
+ if_effect EFFECT_SAFEGUARD, BattleAIScript_82DC635
+ if_effect EFFECT_MAGNITUDE, BattleAIScript_82DC4E5
+ if_effect EFFECT_BATON_PASS, BattleAIScript_82DC650
+ if_effect EFFECT_SONICBOOM, BattleAIScript_82DC4ED
+ if_effect EFFECT_RAIN_DANCE, BattleAIScript_82DC659
+ if_effect EFFECT_SUNNY_DAY, BattleAIScript_82DC661
+ if_effect EFFECT_BELLY_DRUM, BattleAIScript_82DC341
+ if_effect EFFECT_PSYCH_UP, BattleAIScript_82DC405
+ if_effect EFFECT_MIRROR_COAT, BattleAIScript_82DC4ED
+ if_effect EFFECT_SKULL_BASH, BattleAIScript_82DC4ED
+ if_effect EFFECT_FUTURE_SIGHT, BattleAIScript_82DC669
+ if_effect EFFECT_TELEPORT, Score_Minus10
+ if_effect EFFECT_DEFENSE_CURL, BattleAIScript_82DC351
+ if_effect EFFECT_FAKE_OUT, BattleAIScript_82DC680
+ if_effect EFFECT_STOCKPILE, BattleAIScript_82DC689
+ if_effect EFFECT_SPIT_UP, BattleAIScript_82DC692
+ if_effect EFFECT_SWALLOW, BattleAIScript_82DC692
+ if_effect EFFECT_HAIL, BattleAIScript_82DC6A1
+ if_effect EFFECT_TORMENT, BattleAIScript_82DC6A9
+ if_effect EFFECT_FLATTER, BattleAIScript_82DC51D
+ if_effect EFFECT_WILL_O_WISP, BattleAIScript_82DC6B4
+ if_effect EFFECT_MEMENTO, BattleAIScript_82DC640
+ if_effect EFFECT_FOCUS_PUNCH, BattleAIScript_82DC4ED
+ if_effect EFFECT_HELPING_HAND, BattleAIScript_82DC6E3
+ if_effect EFFECT_TRICK, BattleAIScript_82DC6EB
+ if_effect EFFECT_INGRAIN, BattleAIScript_82DC6F4
+ if_effect EFFECT_SUPERPOWER, BattleAIScript_82DC4ED
+ if_effect EFFECT_RECYCLE, BattleAIScript_82DC6FF
+ if_effect EFFECT_KNOCK_OFF, BattleAIScript_82DC6EB
+ if_effect EFFECT_ENDEAVOR, BattleAIScript_82DC4ED
+ if_effect EFFECT_IMPRISON, BattleAIScript_82DC708
+ if_effect EFFECT_REFRESH, BattleAIScript_82DC713
+ if_effect EFFECT_LOW_KICK, BattleAIScript_82DC4ED
+ if_effect EFFECT_MUD_SPORT, BattleAIScript_82DC71E
+ if_effect EFFECT_TICKLE, BattleAIScript_82DC729
+ if_effect EFFECT_COSMIC_POWER, BattleAIScript_82DC73A
+ if_effect EFFECT_BULK_UP, BattleAIScript_82DC74B
+ if_effect EFFECT_WATER_SPORT, BattleAIScript_82DC75C
+ if_effect EFFECT_CALM_MIND, BattleAIScript_82DC767
+ if_effect EFFECT_DRAGON_DANCE, BattleAIScript_82DC778
+ end
+
+BattleAIScript_82DC2D4:
+ get_ability AI_TARGET
+ if_equal ABILITY_INSOMNIA, Score_Minus10
+ if_equal ABILITY_VITAL_SPIRIT, Score_Minus10
+ if_status AI_TARGET, STATUS_ANY, Score_Minus10
+ if_side_affecting AI_TARGET, SIDE_STATUS_SAFEGUARD, Score_Minus10
+ end
+
+BattleAIScript_82DC2F7:
+ if_type_effectiveness AI_EFFECTIVENESS_x0, Score_Minus10
+ get_ability AI_TARGET
+ if_equal ABILITY_DAMP, Score_Minus10
+ count_usable_party_mons AI_USER
+ if_not_equal 0, BattleAIScript_82DC31A
+ count_usable_party_mons AI_TARGET
+ if_not_equal 0, Score_Minus10
+ goto Score_Minus1
+
+BattleAIScript_82DC31A:
+ end
+
+BattleAIScript_82DC31B:
+ if_status2 AI_TARGET, STATUS2_NIGHTMARE, Score_Minus10
+ if_not_status AI_TARGET, STATUS_SLEEP, Score_Minus8
+ end
+
+BattleAIScript_82DC330:
+ if_not_status AI_TARGET, STATUS_SLEEP, Score_Minus8
+ if_type_effectiveness AI_EFFECTIVENESS_x0, Score_Minus10
+ end
+
+BattleAIScript_82DC341:
+ if_hp_less_than AI_USER, 51, Score_Minus10
+
+BattleAIScript_82DC348:
+ if_stat_level_equal AI_USER, ATK, 12, Score_Minus10
+ end
+
+BattleAIScript_82DC351:
+ if_stat_level_equal AI_USER, DEF, 12, Score_Minus10
+ end
+
+BattleAIScript_82DC35A:
+ if_stat_level_equal AI_USER, SPEED, 12, Score_Minus10
+ end
+
+BattleAIScript_82DC363:
+ if_stat_level_equal AI_USER, SPATK, 12, Score_Minus10
+ end
+
+BattleAIScript_82DC36C:
+ if_stat_level_equal AI_USER, SPDEF, 12, Score_Minus10
+ end
+
+BattleAIScript_82DC375:
+ if_stat_level_equal AI_USER, ACC, 12, Score_Minus10
+ end
+
+BattleAIScript_82DC37E:
+ if_stat_level_equal AI_USER, EVASION, 12, Score_Minus10
+ end
+
+BattleAIScript_82DC387:
+ if_stat_level_equal AI_TARGET, ATK, 0, Score_Minus10
+ get_ability AI_TARGET
+ if_equal ABILITY_HYPER_CUTTER, Score_Minus10
+ goto BattleAIScript_82DC3F6
+
+BattleAIScript_82DC39C:
+ if_stat_level_equal AI_TARGET, DEF, 0, Score_Minus10
+ goto BattleAIScript_82DC3F6
+
+BattleAIScript_82DC3A9:
+ if_stat_level_equal AI_TARGET, SPEED, 0, Score_Minus10
+ if_ability AI_TARGET, ABILITY_SPEED_BOOST, Score_Minus10
+ goto BattleAIScript_82DC3F6
+
+BattleAIScript_82DC3BF:
+ if_stat_level_equal AI_TARGET, SPATK, 0, Score_Minus10
+ goto BattleAIScript_82DC3F6
+
+BattleAIScript_82DC3CC:
+ if_stat_level_equal AI_TARGET, SPDEF, 0, Score_Minus10
+ goto BattleAIScript_82DC3F6
+
+BattleAIScript_82DC3D9:
+ if_stat_level_equal AI_TARGET, ACC, 0, Score_Minus10
+ get_ability AI_TARGET
+ if_equal ABILITY_KEEN_EYE, Score_Minus10
+ goto BattleAIScript_82DC3F6
+
+BattleAIScript_82DC3EE:
+ if_stat_level_equal AI_TARGET, EVASION, 0, Score_Minus10
+
+BattleAIScript_82DC3F6:
+ get_ability AI_TARGET
+ if_equal ABILITY_CLEAR_BODY, Score_Minus10
+ if_equal ABILITY_WHITE_SMOKE, Score_Minus10
+ end
+
+BattleAIScript_82DC405:
+ if_stat_level_less_than AI_USER, ATK, 6, BattleAIScript_82DC47A
+ if_stat_level_less_than AI_USER, DEF, 6, BattleAIScript_82DC47A
+ if_stat_level_less_than AI_USER, SPEED, 6, BattleAIScript_82DC47A
+ if_stat_level_less_than AI_USER, SPATK, 6, BattleAIScript_82DC47A
+ if_stat_level_less_than AI_USER, SPDEF, 6, BattleAIScript_82DC47A
+ if_stat_level_less_than AI_USER, ACC, 6, BattleAIScript_82DC47A
+ if_stat_level_less_than AI_USER, EVASION, 6, BattleAIScript_82DC47A
+ if_stat_level_more_than AI_TARGET, ATK, 6, BattleAIScript_82DC47A
+ if_stat_level_more_than AI_TARGET, DEF, 6, BattleAIScript_82DC47A
+ if_stat_level_more_than AI_TARGET, SPEED, 6, BattleAIScript_82DC47A
+ if_stat_level_more_than AI_TARGET, SPATK, 6, BattleAIScript_82DC47A
+ if_stat_level_more_than AI_TARGET, SPDEF, 6, BattleAIScript_82DC47A
+ if_stat_level_more_than AI_TARGET, ACC, 6, BattleAIScript_82DC47A
+ if_stat_level_more_than AI_TARGET, EVASION, 6, BattleAIScript_82DC47A
+ goto Score_Minus10
+
+BattleAIScript_82DC47A:
+ end
+
+BattleAIScript_82DC47B:
+ count_usable_party_mons AI_TARGET
+ if_equal 0, Score_Minus10
+ get_ability AI_TARGET
+ if_equal ABILITY_SUCTION_CUPS, Score_Minus10
+ end
+
+BattleAIScript_82DC48C:
+ get_target_type1
+ if_equal TYPE_STEEL, Score_Minus10
+ if_equal TYPE_POISON, Score_Minus10
+ get_target_type2
+ if_equal TYPE_STEEL, Score_Minus10
+ if_equal TYPE_POISON, Score_Minus10
+ get_ability AI_TARGET
+ if_equal ABILITY_IMMUNITY, Score_Minus10
+ if_status AI_TARGET, STATUS_ANY, Score_Minus10
+ if_side_affecting AI_TARGET, SIDE_STATUS_SAFEGUARD, Score_Minus10
+ end
+
+BattleAIScript_82DC4C5:
+ if_side_affecting AI_USER, SIDE_STATUS_LIGHTSCREEN, Score_Minus8
+ end
+
+BattleAIScript_82DC4D0:
+ if_type_effectiveness AI_EFFECTIVENESS_x0, Score_Minus10
+ get_ability AI_TARGET
+ if_equal ABILITY_STURDY, Score_Minus10
+ if_level_cond 1, Score_Minus10
+ end
+
+BattleAIScript_82DC4E5:
+ get_ability AI_TARGET
+ if_equal ABILITY_LEVITATE, Score_Minus10
+
+BattleAIScript_82DC4ED:
+ if_type_effectiveness AI_EFFECTIVENESS_x0, Score_Minus10
+ get_ability AI_TARGET
+ if_not_equal ABILITY_WONDER_GUARD, BattleAIScript_82DC506
+ if_type_effectiveness AI_EFFECTIVENESS_x2, BattleAIScript_82DC506
+ goto Score_Minus10
+
+BattleAIScript_82DC506:
+ end
+
+BattleAIScript_82DC507:
+ if_side_affecting AI_USER, SIDE_STATUS_MIST, Score_Minus8
+ end
+
+BattleAIScript_82DC512:
+ if_status2 AI_USER, STATUS2_FOCUS_ENERGY, Score_Minus10
+ end
+
+BattleAIScript_82DC51D:
+ if_status2 AI_TARGET, STATUS2_CONFUSION, Score_Minus5
+ get_ability AI_TARGET
+ if_equal ABILITY_OWN_TEMPO, Score_Minus10
+ if_side_affecting AI_TARGET, SIDE_STATUS_SAFEGUARD, Score_Minus10
+ end
+
+BattleAIScript_82DC53A:
+ if_side_affecting AI_USER, SIDE_STATUS_REFLECT, Score_Minus8
+ end
+
+BattleAIScript_82DC545:
+ if_type_effectiveness AI_EFFECTIVENESS_x0, Score_Minus10
+ get_ability AI_TARGET
+ if_equal ABILITY_LIMBER, Score_Minus10
+ if_status AI_TARGET, STATUS_ANY, Score_Minus10
+ if_side_affecting AI_TARGET, SIDE_STATUS_SAFEGUARD, Score_Minus10
+ end
+
+BattleAIScript_82DC568:
+ if_status2 AI_USER, STATUS2_SUBSTITUTE, Score_Minus8
+ if_hp_less_than AI_USER, 26, Score_Minus10
+ end
+
+BattleAIScript_82DC57A:
+ if_status3 AI_TARGET, STATUS3_LEECHSEED, Score_Minus10
+ get_target_type1
+ if_equal TYPE_GRASS, Score_Minus10
+ get_target_type2
+ if_equal TYPE_GRASS, Score_Minus10
+ end
+
+BattleAIScript_82DC595:
+ if_any_move_disabled AI_TARGET, Score_Minus8
+ end
+
+BattleAIScript_82DC59D:
+ if_any_move_encored AI_TARGET, Score_Minus8
+ end
+
+BattleAIScript_82DC5A5:
+ if_not_status AI_USER, STATUS_SLEEP, Score_Minus8
+ end
+
+BattleAIScript_82DC5B0:
+ if_status2 AI_TARGET, STATUS2_ESCAPE_PREVENTION, Score_Minus10
+ end
+
+BattleAIScript_82DC5BB:
+ if_stat_level_equal AI_USER, ATK, 12, Score_Minus10
+ if_stat_level_equal AI_USER, DEF, 12, Score_Minus8
+ end
+
+BattleAIScript_82DC5CC:
+ if_side_affecting AI_TARGET, SIDE_STATUS_SPIKES, Score_Minus10
+ end
+
+BattleAIScript_82DC5D7:
+ if_status2 AI_TARGET, STATUS2_FORESIGHT, Score_Minus10
+ end
+
+BattleAIScript_82DC5E2:
+ if_status3 AI_TARGET, STATUS3_PERISH_SONG, Score_Minus10
+ end
+
+BattleAIScript_82DC5ED:
+ get_weather
+ if_equal AI_WEATHER_SANDSTORM, Score_Minus8
+ end
+
+BattleAIScript_82DC5F5:
+ if_status2 AI_TARGET, STATUS2_INFATUATION, Score_Minus10
+ get_ability AI_TARGET
+ if_equal ABILITY_OBLIVIOUS, Score_Minus10
+ get_gender AI_USER
+ if_equal 0, BattleAIScript_82DC61A
+ if_equal 254, BattleAIScript_82DC627
+ goto Score_Minus10
+
+BattleAIScript_82DC61A:
+ get_gender AI_TARGET
+ if_equal 254, BattleAIScript_82DC634
+ goto Score_Minus10
+
+BattleAIScript_82DC627:
+ get_gender AI_TARGET
+ if_equal 0, BattleAIScript_82DC634
+ goto Score_Minus10
+
+BattleAIScript_82DC634:
+ end
+
+BattleAIScript_82DC635:
+ if_side_affecting AI_USER, SIDE_STATUS_SAFEGUARD, Score_Minus8
+ end
+
+BattleAIScript_82DC640:
+ if_stat_level_equal AI_TARGET, ATK, 0, Score_Minus10
+ if_stat_level_equal AI_TARGET, SPATK, 0, Score_Minus8
+
+BattleAIScript_82DC650:
+ count_usable_party_mons AI_USER
+ if_equal 0, Score_Minus10
+ end
+
+BattleAIScript_82DC659:
+ get_weather
+ if_equal AI_WEATHER_RAIN, Score_Minus8
+ end
+
+BattleAIScript_82DC661:
+ get_weather
+ if_equal AI_WEATHER_SUN, Score_Minus8
+ end
+
+BattleAIScript_82DC669:
+ if_side_affecting AI_TARGET, SIDE_STATUS_FUTUREATTACK, Score_Minus12
+ if_side_affecting AI_USER, SIDE_STATUS_FUTUREATTACK, Score_Minus12
+ score +5
+ end
+
+BattleAIScript_82DC680:
+ is_first_turn_for AI_USER
+ if_equal 0, Score_Minus10
+ end
+
+BattleAIScript_82DC689:
+ get_stockpile_count AI_USER
+ if_equal 3, Score_Minus10
+ end
+
+BattleAIScript_82DC692:
+ if_type_effectiveness AI_EFFECTIVENESS_x0, Score_Minus10
+ get_stockpile_count AI_USER
+ if_equal 0, Score_Minus10
+ end
+
+BattleAIScript_82DC6A1:
+ get_weather
+ if_equal AI_WEATHER_HAIL, Score_Minus8
+ end
+
+BattleAIScript_82DC6A9:
+ if_status2 AI_TARGET, STATUS2_TORMENT, Score_Minus10
+ end
+
+BattleAIScript_82DC6B4:
+ get_ability AI_TARGET
+ if_equal ABILITY_WATER_VEIL, Score_Minus10
+ if_status AI_TARGET, STATUS_ANY, Score_Minus10
+ if_type_effectiveness AI_EFFECTIVENESS_x0, Score_Minus10
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, Score_Minus10
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, Score_Minus10
+ if_side_affecting AI_TARGET, SIDE_STATUS_SAFEGUARD, Score_Minus10
+ end
+
+BattleAIScript_82DC6E3:
+ if_not_double_battle Score_Minus10
+ end
+
+BattleAIScript_82DC6EB:
+ get_ability AI_TARGET
+ if_equal ABILITY_STICKY_HOLD, Score_Minus10
+ end
+
+BattleAIScript_82DC6F4:
+ if_status3 AI_USER, STATUS3_ROOTED, Score_Minus10
+ end
+
+BattleAIScript_82DC6FF:
+ get_used_held_item AI_USER
+ if_equal 0, Score_Minus10
+ end
+
+BattleAIScript_82DC708:
+ if_status3 AI_USER, STATUS3_IMPRISONED_OTHERS, Score_Minus10
+ end
+
+BattleAIScript_82DC713:
+ if_not_status AI_USER, STATUS_POISON | STATUS_BURN | STATUS_PARALYSIS | STATUS_TOXIC_POISON, Score_Minus10
+ end
+
+BattleAIScript_82DC71E:
+ if_status3 AI_USER, STATUS3_MUDSPORT, Score_Minus10
+ end
+
+BattleAIScript_82DC729:
+ if_stat_level_equal AI_TARGET, ATK, 0, Score_Minus10
+ if_stat_level_equal AI_TARGET, DEF, 0, Score_Minus8
+ end
+
+BattleAIScript_82DC73A:
+ if_stat_level_equal AI_USER, DEF, 12, Score_Minus10
+ if_stat_level_equal AI_USER, SPDEF, 12, Score_Minus8
+ end
+
+BattleAIScript_82DC74B:
+ if_stat_level_equal AI_USER, ATK, 12, Score_Minus10
+ if_stat_level_equal AI_USER, DEF, 12, Score_Minus8
+ end
+
+BattleAIScript_82DC75C:
+ if_status3 AI_USER, STATUS3_WATERSPORT, Score_Minus10
+ end
+
+BattleAIScript_82DC767:
+ if_stat_level_equal AI_USER, SPATK, 12, Score_Minus10
+ if_stat_level_equal AI_USER, SPDEF, 12, Score_Minus8
+ end
+
+BattleAIScript_82DC778:
+ if_stat_level_equal AI_USER, ATK, 12, Score_Minus10
+ if_stat_level_equal AI_USER, SPEED, 12, Score_Minus8
+ end
+
+Score_Minus1:
+ score -1
+ end
+
+Score_Minus2:
+ score -2
+ end
+
+Score_Minus3:
+ score -3
+ end
+
+Score_Minus5:
+ score -5
+ end
+
+Score_Minus8:
+ score -8
+ end
+
+Score_Minus10:
+ score -10
+ end
+
+Score_Minus12:
+ score -12
+ end
+
+Score_Minus30:
+ score -30
+ end
+
+Score_Plus1:
+ score +1
+ end
+
+Score_Plus2:
+ score +2
+ end
+
+Score_Plus3:
+ score +3
+ end
+
+Score_Plus5:
+ score +5
+ end
+
+Score_Plus10:
+ score +10
+ end
+
+AI_TryToFaint:
+ if_target_is_ally AI_Ret
+ if_effect EFFECT_SLEEP, BattleAIScript_82DCA92
+ if_effect EFFECT_ABSORB, BattleAIScript_82DCAAE
+ if_effect EFFECT_EXPLOSION, BattleAIScript_82DCAC8
+ if_effect EFFECT_DREAM_EATER, BattleAIScript_82DCB26
+ if_effect EFFECT_MIRROR_MOVE, BattleAIScript_82DCB3A
+ if_effect EFFECT_ATTACK_UP, BattleAIScript_82DCBBC
+ if_effect EFFECT_DEFENSE_UP, BattleAIScript_82DCBF7
+ if_effect EFFECT_SPEED_UP, BattleAIScript_82DCC5D
+ if_effect EFFECT_SPECIAL_ATTACK_UP, BattleAIScript_82DCC73
+ if_effect EFFECT_SPECIAL_DEFENSE_UP, BattleAIScript_82DCCAE
+ if_effect EFFECT_ACCURACY_UP, BattleAIScript_82DCD14
+ if_effect EFFECT_EVASION_UP, BattleAIScript_82DCD2E
+ if_effect EFFECT_ALWAYS_HIT, BattleAIScript_82DCDC8
+ if_effect EFFECT_ATTACK_DOWN, BattleAIScript_82DCDF8
+ if_effect EFFECT_DEFENSE_DOWN, BattleAIScript_82DCE4A
+ if_effect EFFECT_SPEED_DOWN, BattleAIScript_82DCE81
+ if_effect EFFECT_SPECIAL_ATTACK_DOWN, BattleAIScript_82DCE97
+ if_effect EFFECT_SPECIAL_DEFENSE_DOWN, BattleAIScript_82DCEEB
+ if_effect EFFECT_ACCURACY_DOWN, BattleAIScript_82DCF0C
+ if_effect EFFECT_EVASION_DOWN, BattleAIScript_82DCFA0
+ if_effect EFFECT_HAZE, BattleAIScript_82DCFC1
+ if_effect EFFECT_BIDE, BattleAIScript_82DD084
+ if_effect EFFECT_ROAR, BattleAIScript_82DD08E
+ if_effect EFFECT_CONVERSION, BattleAIScript_82DD0C6
+ if_effect EFFECT_RESTORE_HP, BattleAIScript_82DD0F7
+ if_effect EFFECT_TOXIC, BattleAIScript_82DD150
+ if_effect EFFECT_LIGHT_SCREEN, BattleAIScript_82DD18F
+ if_effect EFFECT_REST, BattleAIScript_82DD1BE
+ if_effect EFFECT_OHKO, BattleAIScript_82DD21E
+ if_effect EFFECT_RAZOR_WIND, BattleAIScript_82DDA0B
+ if_effect EFFECT_SUPER_FANG, BattleAIScript_82DD21F
+ if_effect EFFECT_TRAP, BattleAIScript_82DD229
+ if_effect EFFECT_HIGH_CRITICAL, BattleAIScript_82DD25F
+ if_effect EFFECT_CONFUSE, BattleAIScript_82DD296
+ if_effect EFFECT_ATTACK_UP_2, BattleAIScript_82DCBBC
+ if_effect EFFECT_DEFENSE_UP_2, BattleAIScript_82DCBF7
+ if_effect EFFECT_SPEED_UP_2, BattleAIScript_82DCC5D
+ if_effect EFFECT_SPECIAL_ATTACK_UP_2, BattleAIScript_82DCC73
+ if_effect EFFECT_SPECIAL_DEFENSE_UP_2, BattleAIScript_82DCCAE
+ if_effect EFFECT_ACCURACY_UP_2, BattleAIScript_82DCD14
+ if_effect EFFECT_EVASION_UP_2, BattleAIScript_82DCD2E
+ if_effect EFFECT_ATTACK_DOWN_2, BattleAIScript_82DCDF8
+ if_effect EFFECT_DEFENSE_DOWN_2, BattleAIScript_82DCE4A
+ if_effect EFFECT_SPEED_DOWN_2, BattleAIScript_82DCE81
+ if_effect EFFECT_SPECIAL_ATTACK_DOWN_2, BattleAIScript_82DCE97
+ if_effect EFFECT_SPECIAL_DEFENSE_DOWN_2, BattleAIScript_82DCEEB
+ if_effect EFFECT_ACCURACY_DOWN_2, BattleAIScript_82DCF0C
+ if_effect EFFECT_EVASION_DOWN_2, BattleAIScript_82DCFA0
+ if_effect EFFECT_REFLECT, BattleAIScript_82DD2D3
+ if_effect EFFECT_POISON, BattleAIScript_82DD303
+ if_effect EFFECT_PARALYZE, BattleAIScript_82DD314
+ if_effect EFFECT_SWAGGER, BattleAIScript_82DD286
+ if_effect EFFECT_SPEED_DOWN_HIT, BattleAIScript_82DCE6B
+ if_effect EFFECT_SKY_ATTACK, BattleAIScript_82DDA0B
+ if_effect EFFECT_VITAL_THROW, BattleAIScript_82DD331
+ if_effect EFFECT_SUBSTITUTE, BattleAIScript_82DD354
+ if_effect EFFECT_RECHARGE, BattleAIScript_82DD3EA
+ if_effect EFFECT_LEECH_SEED, BattleAIScript_82DD150
+ if_effect EFFECT_DISABLE, BattleAIScript_82DD412
+ if_effect EFFECT_COUNTER, BattleAIScript_82DD431
+ if_effect EFFECT_ENCORE, BattleAIScript_82DD4E3
+ if_effect EFFECT_PAIN_SPLIT, BattleAIScript_82DD54B
+ if_effect EFFECT_SNORE, BattleAIScript_82DD577
+ if_effect EFFECT_LOCK_ON, BattleAIScript_82DD57A
+ if_effect EFFECT_SLEEP_TALK, BattleAIScript_82DD583
+ if_effect EFFECT_DESTINY_BOND, BattleAIScript_82DD590
+ if_effect EFFECT_FLAIL, BattleAIScript_82DD5C6
+ if_effect EFFECT_HEAL_BELL, BattleAIScript_82DD60B
+ if_effect EFFECT_THIEF, BattleAIScript_82DD622
+ if_effect EFFECT_MEAN_LOOK, BattleAIScript_82DD229
+ if_effect EFFECT_MINIMIZE, BattleAIScript_82DCD2E
+ if_effect EFFECT_CURSE, BattleAIScript_82DD645
+ if_effect EFFECT_PROTECT, BattleAIScript_82DD694
+ if_effect EFFECT_FORESIGHT, BattleAIScript_82DD75D
+ if_effect EFFECT_ENDURE, BattleAIScript_82DD78B
+ if_effect EFFECT_BATON_PASS, BattleAIScript_82DD7A9
+ if_effect EFFECT_PURSUIT, BattleAIScript_82DD845
+ if_effect EFFECT_MORNING_SUN, BattleAIScript_82DD0DD
+ if_effect EFFECT_SYNTHESIS, BattleAIScript_82DD0DD
+ if_effect EFFECT_MOONLIGHT, BattleAIScript_82DD0DD
+ if_effect EFFECT_RAIN_DANCE, BattleAIScript_82DD87B
+ if_effect EFFECT_SUNNY_DAY, BattleAIScript_82DD8BA
+ if_effect EFFECT_BELLY_DRUM, BattleAIScript_82DD8E3
+ if_effect EFFECT_PSYCH_UP, BattleAIScript_82DD8F2
+ if_effect EFFECT_MIRROR_COAT, BattleAIScript_82DD95A
+ if_effect EFFECT_SKULL_BASH, BattleAIScript_82DDA0B
+ if_effect EFFECT_SOLARBEAM, BattleAIScript_82DDA0B
+ if_effect EFFECT_SEMI_INVULNERABLE, BattleAIScript_82DDA2F
+ if_effect EFFECT_SOFTBOILED, BattleAIScript_82DD0F7
+ if_effect EFFECT_FAKE_OUT, BattleAIScript_82DDAB9
+ if_effect EFFECT_SPIT_UP, BattleAIScript_82DDABC
+ if_effect EFFECT_SWALLOW, BattleAIScript_82DD0F7
+ if_effect EFFECT_HAIL, BattleAIScript_82DDACD
+ if_effect EFFECT_FLATTER, BattleAIScript_82DD28E
+ if_effect EFFECT_MEMENTO, BattleAIScript_82DCAC8
+ if_effect EFFECT_FACADE, BattleAIScript_82DDAF6
+ if_effect EFFECT_FOCUS_PUNCH, BattleAIScript_82DDB03
+ if_effect EFFECT_SMELLINGSALT, BattleAIScript_82DDB5C
+ if_effect EFFECT_TRICK, BattleAIScript_82DDB6E
+ if_effect EFFECT_ROLE_PLAY, BattleAIScript_82DDBB9
+ if_effect EFFECT_SUPERPOWER, BattleAIScript_82DDBF0
+ if_effect EFFECT_MAGIC_COAT, BattleAIScript_82DDC20
+ if_effect EFFECT_RECYCLE, BattleAIScript_82DDC53
+ if_effect EFFECT_REVENGE, BattleAIScript_82DDC72
+ if_effect EFFECT_BRICK_BREAK, BattleAIScript_82DDCA0
+ if_effect EFFECT_KNOCK_OFF, BattleAIScript_82DDCB2
+ if_effect EFFECT_ENDEAVOR, BattleAIScript_82DDCCA
+ if_effect EFFECT_ERUPTION, BattleAIScript_82DDCF6
+ if_effect EFFECT_SKILL_SWAP, BattleAIScript_82DDBB9
+ if_effect EFFECT_IMPRISON, BattleAIScript_82DDD1E
+ if_effect EFFECT_REFRESH, BattleAIScript_82DDD2F
+ if_effect EFFECT_SNATCH, BattleAIScript_82DDD3E
+ if_effect EFFECT_BLAZE_KICK, BattleAIScript_82DD25F
+ if_effect EFFECT_MUD_SPORT, BattleAIScript_82DDDA8
+ if_effect EFFECT_OVERHEAT, BattleAIScript_82DDDCE
+ if_effect EFFECT_TICKLE, BattleAIScript_82DCE4A
+ if_effect EFFECT_COSMIC_POWER, BattleAIScript_82DCCAE
+ if_effect EFFECT_BULK_UP, BattleAIScript_82DCBF7
+ if_effect EFFECT_POISON_TAIL, BattleAIScript_82DD25F
+ if_effect EFFECT_WATER_SPORT, BattleAIScript_82DDDF6
+ if_effect EFFECT_CALM_MIND, BattleAIScript_82DCCAE
+ if_effect EFFECT_DRAGON_DANCE, BattleAIScript_82DDE1C
+ end
+
+BattleAIScript_82DCA92:
+ if_has_move_with_effect AI_TARGET, EFFECT_DREAM_EATER, BattleAIScript_82DCAA5
+ if_has_move_with_effect AI_TARGET, EFFECT_NIGHTMARE, BattleAIScript_82DCAA5
+ goto BattleAIScript_82DCAAD
+
+BattleAIScript_82DCAA5:
+ if_random_less_than 128, BattleAIScript_82DCAAD
+ score +1
+
+BattleAIScript_82DCAAD:
+ end
+
+BattleAIScript_82DCAAE:
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, BattleAIScript_82DCABF
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, BattleAIScript_82DCABF
+ goto BattleAIScript_82DCAC7
+
+BattleAIScript_82DCABF:
+ if_random_less_than 50, BattleAIScript_82DCAC7
+ score -3
+
+BattleAIScript_82DCAC7:
+ end
+
+BattleAIScript_82DCAC8:
+ if_stat_level_less_than AI_TARGET, EVASION, 7, BattleAIScript_82DCAE2
+ score -1
+ if_stat_level_less_than AI_TARGET, EVASION, 10, BattleAIScript_82DCAE2
+ if_random_less_than 128, BattleAIScript_82DCAE2
+ score -1
+
+BattleAIScript_82DCAE2:
+ if_hp_less_than AI_USER, 80, BattleAIScript_82DCAFA
+ if_target_faster BattleAIScript_82DCAFA
+ if_random_less_than 50, BattleAIScript_82DCB25
+ goto Score_Minus3
+
+BattleAIScript_82DCAFA:
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DCB1D
+ if_random_less_than 128, BattleAIScript_82DCB09
+ score +1
+
+BattleAIScript_82DCB09:
+ if_hp_more_than AI_USER, 30, BattleAIScript_82DCB25
+ if_random_less_than 50, BattleAIScript_82DCB25
+ score +1
+ goto BattleAIScript_82DCB25
+
+BattleAIScript_82DCB1D:
+ if_random_less_than 50, BattleAIScript_82DCB25
+ score -1
+
+BattleAIScript_82DCB25:
+ end
+
+BattleAIScript_82DCB26:
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, BattleAIScript_82DCB37
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, BattleAIScript_82DCB37
+ goto BattleAIScript_82DCB39
+
+BattleAIScript_82DCB37:
+ score -1
+
+BattleAIScript_82DCB39:
+ end
+
+BattleAIScript_82DCB3A:
+ if_target_faster BattleAIScript_82DCB58
+ get_last_used_bank_move AI_TARGET
+ if_not_in_hwords sMovesTable_82DCB6C, BattleAIScript_82DCB58
+ if_random_less_than 128, BattleAIScript_82DCB6B
+ score +2
+ goto BattleAIScript_82DCB6B
+
+BattleAIScript_82DCB58:
+ get_last_used_bank_move AI_TARGET
+ if_in_hwords sMovesTable_82DCB6C, BattleAIScript_82DCB6B
+ if_random_less_than 80, BattleAIScript_82DCB6B
+ score -1
+
+BattleAIScript_82DCB6B:
+ end
+
+sMovesTable_82DCB6C:
+ .2byte MOVE_SLEEP_POWDER
+ .2byte MOVE_LOVELY_KISS
+ .2byte MOVE_SPORE
+ .2byte MOVE_HYPNOSIS
+ .2byte MOVE_SING
+ .2byte MOVE_GRASS_WHISTLE
+ .2byte MOVE_SHADOW_PUNCH
+ .2byte MOVE_SAND_ATTACK
+ .2byte MOVE_SMOKESCREEN
+ .2byte MOVE_TOXIC
+ .2byte MOVE_GUILLOTINE
+ .2byte MOVE_HORN_DRILL
+ .2byte MOVE_FISSURE
+ .2byte MOVE_SHEER_COLD
+ .2byte MOVE_CROSS_CHOP
+ .2byte MOVE_AEROBLAST
+ .2byte MOVE_CONFUSE_RAY
+ .2byte MOVE_SWEET_KISS
+ .2byte MOVE_SCREECH
+ .2byte MOVE_COTTON_SPORE
+ .2byte MOVE_SCARY_FACE
+ .2byte MOVE_FAKE_TEARS
+ .2byte MOVE_METAL_SOUND
+ .2byte MOVE_THUNDER_WAVE
+ .2byte MOVE_GLARE
+ .2byte MOVE_POISON_POWDER
+ .2byte MOVE_SHADOW_BALL
+ .2byte MOVE_DYNAMIC_PUNCH
+ .2byte MOVE_HYPER_BEAM
+ .2byte MOVE_EXTREME_SPEED
+ .2byte MOVE_THIEF
+ .2byte MOVE_COVET
+ .2byte MOVE_ATTRACT
+ .2byte MOVE_SWAGGER
+ .2byte MOVE_TORMENT
+ .2byte MOVE_FLATTER
+ .2byte MOVE_TRICK
+ .2byte MOVE_SUPERPOWER
+ .2byte MOVE_SKILL_SWAP
+ .2byte -1
+
+BattleAIScript_82DCBBC:
+ if_stat_level_less_than AI_USER, ATK, 9, BattleAIScript_82DCBD1
+ if_random_less_than 100, BattleAIScript_82DCBE0
+ score -1
+ goto BattleAIScript_82DCBE0
+
+BattleAIScript_82DCBD1:
+ if_hp_not_equal AI_USER, 100, BattleAIScript_82DCBE0
+ if_random_less_than 128, BattleAIScript_82DCBE0
+ score +2
+
+BattleAIScript_82DCBE0:
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DCBF6
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DCBF4
+ if_random_less_than 40, BattleAIScript_82DCBF6
+
+BattleAIScript_82DCBF4:
+ score -2
+
+BattleAIScript_82DCBF6:
+ end
+
+BattleAIScript_82DCBF7:
+ if_stat_level_less_than AI_USER, DEF, 9, BattleAIScript_82DCC0C
+ if_random_less_than 100, BattleAIScript_82DCC1B
+ score -1
+ goto BattleAIScript_82DCC1B
+
+BattleAIScript_82DCC0C:
+ if_hp_not_equal AI_USER, 100, BattleAIScript_82DCC1B
+ if_random_less_than 128, BattleAIScript_82DCC1B
+ score +2
+
+BattleAIScript_82DCC1B:
+ if_hp_less_than AI_USER, 70, BattleAIScript_82DCC28
+ if_random_less_than 200, BattleAIScript_82DCC52
+
+BattleAIScript_82DCC28:
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DCC50
+ get_last_used_bank_move AI_TARGET
+ get_move_power_from_result
+ if_equal 0, BattleAIScript_82DCC4A
+ get_last_used_bank_move AI_TARGET
+ get_move_type_from_result
+ if_not_in_bytes sTypesTable_82DCC53, BattleAIScript_82DCC50
+ if_random_less_than 60, BattleAIScript_82DCC52
+
+BattleAIScript_82DCC4A:
+ if_random_less_than 60, BattleAIScript_82DCC52
+
+BattleAIScript_82DCC50:
+ score -2
+
+BattleAIScript_82DCC52:
+ end
+
+sTypesTable_82DCC53:
+ .byte TYPE_NORMAL
+ .byte TYPE_FIGHTING
+ .byte TYPE_POISON
+ .byte TYPE_GROUND
+ .byte TYPE_FLYING
+ .byte TYPE_ROCK
+ .byte TYPE_BUG
+ .byte TYPE_GHOST
+ .byte TYPE_STEEL
+ .byte -1
+
+BattleAIScript_82DCC5D:
+ if_target_faster BattleAIScript_82DCC6A
+ score -3
+ goto BattleAIScript_82DCC72
+
+BattleAIScript_82DCC6A:
+ if_random_less_than 70, BattleAIScript_82DCC72
+ score +3
+
+BattleAIScript_82DCC72:
+ end
+
+BattleAIScript_82DCC73:
+ if_stat_level_less_than AI_USER, SPATK, 9, BattleAIScript_82DCC88
+ if_random_less_than 100, BattleAIScript_82DCC97
+ score -1
+ goto BattleAIScript_82DCC97
+
+BattleAIScript_82DCC88:
+ if_hp_not_equal AI_USER, 100, BattleAIScript_82DCC97
+ if_random_less_than 128, BattleAIScript_82DCC97
+ score +2
+
+BattleAIScript_82DCC97:
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DCCAD
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DCCAB
+ if_random_less_than 70, BattleAIScript_82DCCAD
+
+BattleAIScript_82DCCAB:
+ score -2
+
+BattleAIScript_82DCCAD:
+ end
+
+BattleAIScript_82DCCAE:
+ if_stat_level_less_than AI_USER, SPDEF, 9, BattleAIScript_82DCCC3
+ if_random_less_than 100, BattleAIScript_82DCCD2
+ score -1
+ goto BattleAIScript_82DCCD2
+
+BattleAIScript_82DCCC3:
+ if_hp_not_equal AI_USER, 100, BattleAIScript_82DCCD2
+ if_random_less_than 128, BattleAIScript_82DCCD2
+ score +2
+
+BattleAIScript_82DCCD2:
+ if_hp_less_than AI_USER, 70, BattleAIScript_82DCCDF
+ if_random_less_than 200, BattleAIScript_82DCD09
+
+BattleAIScript_82DCCDF:
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DCD07
+ get_last_used_bank_move AI_TARGET
+ get_move_power_from_result
+ if_equal 0, BattleAIScript_82DCD01
+ get_last_used_bank_move AI_TARGET
+ get_move_type_from_result
+ if_in_bytes sTypesTable_82DCD0A, BattleAIScript_82DCD07
+ if_random_less_than 60, BattleAIScript_82DCD09
+
+BattleAIScript_82DCD01:
+ if_random_less_than 60, BattleAIScript_82DCD09
+
+BattleAIScript_82DCD07:
+ score -2
+
+BattleAIScript_82DCD09:
+ end
+
+sTypesTable_82DCD0A:
+ .byte TYPE_NORMAL
+ .byte TYPE_FIGHTING
+ .byte TYPE_POISON
+ .byte TYPE_GROUND
+ .byte TYPE_FLYING
+ .byte TYPE_ROCK
+ .byte TYPE_BUG
+ .byte TYPE_GHOST
+ .byte TYPE_STEEL
+ .byte -1
+
+BattleAIScript_82DCD14:
+ if_stat_level_less_than AI_USER, ACC, 9, BattleAIScript_82DCD24
+ if_random_less_than 50, BattleAIScript_82DCD24
+ score -2
+
+BattleAIScript_82DCD24:
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DCD2D
+ score -2
+
+BattleAIScript_82DCD2D:
+ end
+
+BattleAIScript_82DCD2E:
+ if_hp_less_than AI_USER, 90, BattleAIScript_82DCD3D
+ if_random_less_than 100, BattleAIScript_82DCD3D
+ score +3
+
+BattleAIScript_82DCD3D:
+ if_stat_level_less_than AI_USER, EVASION, 9, BattleAIScript_82DCD4D
+ if_random_less_than 128, BattleAIScript_82DCD4D
+ score -1
+
+BattleAIScript_82DCD4D:
+ if_not_status AI_TARGET, STATUS_TOXIC_POISON, BattleAIScript_82DCD6C
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DCD64
+ if_random_less_than 80, BattleAIScript_82DCD6C
+
+BattleAIScript_82DCD64:
+ if_random_less_than 50, BattleAIScript_82DCD6C
+ score +3
+
+BattleAIScript_82DCD6C:
+ if_not_status3 AI_TARGET, STATUS3_LEECHSEED, BattleAIScript_82DCD7E
+ if_random_less_than 70, BattleAIScript_82DCD7E
+ score +3
+
+BattleAIScript_82DCD7E:
+ if_not_status3 AI_USER, STATUS3_ROOTED, BattleAIScript_82DCD90
+ if_random_less_than 128, BattleAIScript_82DCD90
+ score +2
+
+BattleAIScript_82DCD90:
+ if_not_status2 AI_TARGET, STATUS2_CURSED, BattleAIScript_82DCDA2
+ if_random_less_than 70, BattleAIScript_82DCDA2
+ score +3
+
+BattleAIScript_82DCDA2:
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DCDC7
+ if_stat_level_equal AI_USER, EVASION, 6, BattleAIScript_82DCDC7
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DCDC5
+ if_hp_less_than AI_TARGET, 40, BattleAIScript_82DCDC5
+ if_random_less_than 70, BattleAIScript_82DCDC7
+
+BattleAIScript_82DCDC5:
+ score -2
+
+BattleAIScript_82DCDC7:
+ end
+
+BattleAIScript_82DCDC8:
+ if_stat_level_more_than AI_TARGET, EVASION, 10, BattleAIScript_82DCDED
+ if_stat_level_less_than AI_USER, ACC, 2, BattleAIScript_82DCDED
+ if_stat_level_more_than AI_TARGET, EVASION, 8, BattleAIScript_82DCDEF
+ if_stat_level_less_than AI_USER, ACC, 4, BattleAIScript_82DCDEF
+ goto BattleAIScript_82DCDF7
+
+BattleAIScript_82DCDED:
+ score +1
+
+BattleAIScript_82DCDEF:
+ if_random_less_than 100, BattleAIScript_82DCDF7
+ score +1
+
+BattleAIScript_82DCDF7:
+ end
+
+BattleAIScript_82DCDF8:
+ if_stat_level_equal AI_TARGET, ATK, 6, BattleAIScript_82DCE1B
+ score -1
+ if_hp_more_than AI_USER, 90, BattleAIScript_82DCE0B
+ score -1
+
+BattleAIScript_82DCE0B:
+ if_stat_level_more_than AI_TARGET, ATK, 3, BattleAIScript_82DCE1B
+ if_random_less_than 50, BattleAIScript_82DCE1B
+ score -2
+
+BattleAIScript_82DCE1B:
+ if_hp_more_than AI_TARGET, 70, BattleAIScript_82DCE24
+ score -2
+
+BattleAIScript_82DCE24:
+ get_target_type1
+ if_in_bytes sTypesTable_82DCE43, BattleAIScript_82DCE42
+ get_target_type2
+ if_in_bytes sTypesTable_82DCE43, BattleAIScript_82DCE42
+ if_random_less_than 50, BattleAIScript_82DCE42
+ score -2
+
+BattleAIScript_82DCE42:
+ end
+
+sTypesTable_82DCE43:
+ .byte TYPE_NORMAL
+ .byte TYPE_FIGHTING
+ .byte TYPE_GROUND
+ .byte TYPE_ROCK
+ .byte TYPE_BUG
+ .byte TYPE_STEEL
+ .byte -1
+
+BattleAIScript_82DCE4A:
+ if_hp_less_than AI_USER, 70, BattleAIScript_82DCE59
+ if_stat_level_more_than AI_TARGET, DEF, 3, BattleAIScript_82DCE61
+
+BattleAIScript_82DCE59:
+ if_random_less_than 50, BattleAIScript_82DCE61
+ score -2
+
+BattleAIScript_82DCE61:
+ if_hp_more_than AI_TARGET, 70, BattleAIScript_82DCE6A
+ score -2
+
+BattleAIScript_82DCE6A:
+ end
+
+BattleAIScript_82DCE6B:
+ if_move MOVE_ICY_WIND, BattleAIScript_82DCE81
+ if_move MOVE_ROCK_TOMB, BattleAIScript_82DCE81
+ if_move MOVE_MUD_SHOT, BattleAIScript_82DCE81
+ end
+
+BattleAIScript_82DCE81:
+ if_target_faster BattleAIScript_82DCE8E
+ score -3
+ goto BattleAIScript_82DCE96
+
+BattleAIScript_82DCE8E:
+ if_random_less_than 70, BattleAIScript_82DCE96
+ score +2
+
+BattleAIScript_82DCE96:
+ end
+
+BattleAIScript_82DCE97:
+ if_stat_level_equal AI_TARGET, ATK, 6, BattleAIScript_82DCEBA
+ score -1
+ if_hp_more_than AI_USER, 90, BattleAIScript_82DCEAA
+ score -1
+
+BattleAIScript_82DCEAA:
+ if_stat_level_more_than AI_TARGET, SPATK, 3, BattleAIScript_82DCEBA
+ if_random_less_than 50, BattleAIScript_82DCEBA
+ score -2
+
+BattleAIScript_82DCEBA:
+ if_hp_more_than AI_TARGET, 70, BattleAIScript_82DCEC3
+ score -2
+
+BattleAIScript_82DCEC3:
+ get_target_type1
+ if_in_bytes sTypesTable_82DCEE2, BattleAIScript_82DCEE1
+ get_target_type2
+ if_in_bytes sTypesTable_82DCEE2, BattleAIScript_82DCEE1
+ if_random_less_than 50, BattleAIScript_82DCEE1
+ score -2
+
+BattleAIScript_82DCEE1:
+ end
+
+sTypesTable_82DCEE2:
+ .byte TYPE_FIRE
+ .byte TYPE_WATER
+ .byte TYPE_GRASS
+ .byte TYPE_ELECTRIC
+ .byte TYPE_PSYCHIC
+ .byte TYPE_ICE
+ .byte TYPE_DRAGON
+ .byte TYPE_DARK
+ .byte -1
+
+BattleAIScript_82DCEEB:
+ if_hp_less_than AI_USER, 70, BattleAIScript_82DCEFA
+ if_stat_level_more_than AI_TARGET, SPDEF, 3, BattleAIScript_82DCF02
+
+BattleAIScript_82DCEFA:
+ if_random_less_than 50, BattleAIScript_82DCF02
+ score -2
+
+BattleAIScript_82DCF02:
+ if_hp_more_than AI_TARGET, 70, BattleAIScript_82DCF0B
+ score -2
+
+BattleAIScript_82DCF0B:
+ end
+
+BattleAIScript_82DCF0C:
+ if_hp_less_than AI_USER, 70, BattleAIScript_82DCF1A
+ if_hp_more_than AI_TARGET, 70, BattleAIScript_82DCF22
+
+BattleAIScript_82DCF1A:
+ if_random_less_than 100, BattleAIScript_82DCF22
+ score -1
+
+BattleAIScript_82DCF22:
+ if_stat_level_more_than AI_USER, ACC, 4, BattleAIScript_82DCF32
+ if_random_less_than 80, BattleAIScript_82DCF32
+ score -2
+
+BattleAIScript_82DCF32:
+ if_not_status AI_TARGET, STATUS_TOXIC_POISON, BattleAIScript_82DCF44
+ if_random_less_than 70, BattleAIScript_82DCF44
+ score +2
+
+BattleAIScript_82DCF44:
+ if_not_status3 AI_TARGET, STATUS3_LEECHSEED, BattleAIScript_82DCF56
+ if_random_less_than 70, BattleAIScript_82DCF56
+ score +2
+
+BattleAIScript_82DCF56:
+ if_not_status3 AI_USER, STATUS3_ROOTED, BattleAIScript_82DCF68
+ if_random_less_than 128, BattleAIScript_82DCF68
+ score +1
+
+BattleAIScript_82DCF68:
+ if_not_status2 AI_TARGET, STATUS2_CURSED, BattleAIScript_82DCF7A
+ if_random_less_than 70, BattleAIScript_82DCF7A
+ score +2
+
+BattleAIScript_82DCF7A:
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DCF9F
+ if_stat_level_equal AI_TARGET, ACC, 6, BattleAIScript_82DCF9F
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DCF9D
+ if_hp_less_than AI_TARGET, 40, BattleAIScript_82DCF9D
+ if_random_less_than 70, BattleAIScript_82DCF9F
+
+BattleAIScript_82DCF9D:
+ score -2
+
+BattleAIScript_82DCF9F:
+ end
+
+BattleAIScript_82DCFA0:
+ if_hp_less_than AI_USER, 70, BattleAIScript_82DCFAF
+ if_stat_level_more_than AI_TARGET, EVASION, 3, BattleAIScript_82DCFB7
+
+BattleAIScript_82DCFAF:
+ if_random_less_than 50, BattleAIScript_82DCFB7
+ score -2
+
+BattleAIScript_82DCFB7:
+ if_hp_more_than AI_TARGET, 70, BattleAIScript_82DCFC0
+ score -2
+
+BattleAIScript_82DCFC0:
+ end
+
+BattleAIScript_82DCFC1:
+ if_stat_level_more_than AI_USER, ATK, 8, BattleAIScript_82DD016
+ if_stat_level_more_than AI_USER, DEF, 8, BattleAIScript_82DD016
+ if_stat_level_more_than AI_USER, SPATK, 8, BattleAIScript_82DD016
+ if_stat_level_more_than AI_USER, SPDEF, 8, BattleAIScript_82DD016
+ if_stat_level_more_than AI_USER, EVASION, 8, BattleAIScript_82DD016
+ if_stat_level_less_than AI_TARGET, ATK, 4, BattleAIScript_82DD016
+ if_stat_level_less_than AI_TARGET, DEF, 4, BattleAIScript_82DD016
+ if_stat_level_less_than AI_TARGET, SPATK, 4, BattleAIScript_82DD016
+ if_stat_level_less_than AI_TARGET, SPDEF, 4, BattleAIScript_82DD016
+ if_stat_level_less_than AI_TARGET, ACC, 4, BattleAIScript_82DD016
+ goto BattleAIScript_82DD01E
+
+BattleAIScript_82DD016:
+ if_random_less_than 50, BattleAIScript_82DD01E
+ score -3
+
+BattleAIScript_82DD01E:
+ if_stat_level_more_than AI_TARGET, ATK, 8, BattleAIScript_82DD07B
+ if_stat_level_more_than AI_TARGET, DEF, 8, BattleAIScript_82DD07B
+ if_stat_level_more_than AI_TARGET, SPATK, 8, BattleAIScript_82DD07B
+ if_stat_level_more_than AI_TARGET, SPDEF, 8, BattleAIScript_82DD07B
+ if_stat_level_more_than AI_TARGET, EVASION, 8, BattleAIScript_82DD07B
+ if_stat_level_less_than AI_USER, ATK, 4, BattleAIScript_82DD07B
+ if_stat_level_less_than AI_USER, DEF, 4, BattleAIScript_82DD07B
+ if_stat_level_less_than AI_USER, SPATK, 4, BattleAIScript_82DD07B
+ if_stat_level_less_than AI_USER, SPDEF, 4, BattleAIScript_82DD07B
+ if_stat_level_less_than AI_USER, ACC, 4, BattleAIScript_82DD07B
+ if_random_less_than 50, BattleAIScript_82DD083
+ score -1
+ goto BattleAIScript_82DD083
+
+BattleAIScript_82DD07B:
+ if_random_less_than 50, BattleAIScript_82DD083
+ score +3
+
+BattleAIScript_82DD083:
+ end
+
+BattleAIScript_82DD084:
+ if_hp_more_than AI_USER, 90, BattleAIScript_82DD08D
+ score -2
+
+BattleAIScript_82DD08D:
+ end
+
+BattleAIScript_82DD08E:
+ if_stat_level_more_than AI_TARGET, ATK, 8, BattleAIScript_82DD0BD
+ if_stat_level_more_than AI_TARGET, DEF, 8, BattleAIScript_82DD0BD
+ if_stat_level_more_than AI_TARGET, SPATK, 8, BattleAIScript_82DD0BD
+ if_stat_level_more_than AI_TARGET, SPDEF, 8, BattleAIScript_82DD0BD
+ if_stat_level_more_than AI_TARGET, EVASION, 8, BattleAIScript_82DD0BD
+ score -3
+ goto BattleAIScript_82DD0C5
+
+BattleAIScript_82DD0BD:
+ if_random_less_than 128, BattleAIScript_82DD0C5
+ score +2
+
+BattleAIScript_82DD0C5:
+ end
+
+BattleAIScript_82DD0C6:
+ if_hp_more_than AI_USER, 90, BattleAIScript_82DD0CF
+ score -2
+
+BattleAIScript_82DD0CF:
+ get_turn_count
+ if_equal 0, BattleAIScript_82DD0DC
+ if_random_less_than 200, Score_Minus2
+
+BattleAIScript_82DD0DC:
+ end
+
+BattleAIScript_82DD0DD:
+ get_weather
+ if_equal AI_WEATHER_HAIL, BattleAIScript_82DD0F5
+ if_equal AI_WEATHER_RAIN, BattleAIScript_82DD0F5
+ if_equal AI_WEATHER_SANDSTORM, BattleAIScript_82DD0F5
+ goto BattleAIScript_82DD0F7
+
+BattleAIScript_82DD0F5:
+ score -2
+
+BattleAIScript_82DD0F7:
+ if_hp_equal AI_USER, 100, BattleAIScript_82DD11F
+ if_target_faster BattleAIScript_82DD126
+ score -8
+ goto BattleAIScript_82DD14F
+
+AI_CV_Heal2:
+ if_hp_less_than AI_USER, 50, BattleAIScript_82DD13A
+ if_hp_more_than AI_USER, 80, BattleAIScript_82DD11F
+ if_random_less_than 70, BattleAIScript_82DD13A
+
+BattleAIScript_82DD11F:
+ score -3
+ goto BattleAIScript_82DD14F
+
+BattleAIScript_82DD126:
+ if_hp_less_than AI_USER, 70, BattleAIScript_82DD13A
+ if_random_less_than 30, BattleAIScript_82DD13A
+ score -3
+ goto BattleAIScript_82DD14F
+
+BattleAIScript_82DD13A:
+ if_doesnt_have_move_with_effect AI_TARGET, EFFECT_SNATCH, BattleAIScript_82DD147
+ if_random_less_than 100, BattleAIScript_82DD14F
+
+BattleAIScript_82DD147:
+ if_random_less_than 20, BattleAIScript_82DD14F
+ score +2
+
+BattleAIScript_82DD14F:
+ end
+
+BattleAIScript_82DD150:
+ if_user_has_no_attacking_moves BattleAIScript_82DD173
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DD164
+ if_random_less_than 50, BattleAIScript_82DD164
+ score -3
+
+BattleAIScript_82DD164:
+ if_hp_more_than AI_TARGET, 50, BattleAIScript_82DD173
+ if_random_less_than 50, BattleAIScript_82DD173
+ score -3
+
+BattleAIScript_82DD173:
+ if_has_move_with_effect AI_USER, EFFECT_SPECIAL_DEFENSE_UP, BattleAIScript_82DD186
+ if_has_move_with_effect AI_USER, EFFECT_PROTECT, BattleAIScript_82DD186
+ goto BattleAIScript_82DD18E
+
+BattleAIScript_82DD186:
+ if_random_less_than 60, BattleAIScript_82DD18E
+ score +2
+
+BattleAIScript_82DD18E:
+ end
+
+BattleAIScript_82DD18F:
+ if_hp_less_than AI_USER, 50, BattleAIScript_82DD1B2
+ get_target_type1
+ if_in_bytes sTypesTable_82DD1B5, BattleAIScript_82DD1B4
+ get_target_type2
+ if_in_bytes sTypesTable_82DD1B5, BattleAIScript_82DD1B4
+ if_random_less_than 50, BattleAIScript_82DD1B4
+
+BattleAIScript_82DD1B2:
+ score -2
+
+BattleAIScript_82DD1B4:
+ end
+
+sTypesTable_82DD1B5:
+ .byte TYPE_FIRE
+ .byte TYPE_WATER
+ .byte TYPE_GRASS
+ .byte TYPE_ELECTRIC
+ .byte TYPE_PSYCHIC
+ .byte TYPE_ICE
+ .byte TYPE_DRAGON
+ .byte TYPE_DARK
+ .byte -1
+
+BattleAIScript_82DD1BE:
+ if_target_faster BattleAIScript_82DD1ED
+ if_hp_not_equal AI_USER, 100, BattleAIScript_82DD1D2
+ score -8
+ goto BattleAIScript_82DD21D
+
+BattleAIScript_82DD1D2:
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DD208
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DD1E6
+ if_random_less_than 70, BattleAIScript_82DD208
+
+BattleAIScript_82DD1E6:
+ score -3
+ goto BattleAIScript_82DD21D
+
+BattleAIScript_82DD1ED:
+ if_hp_less_than AI_USER, 60, BattleAIScript_82DD208
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DD201
+ if_random_less_than 50, BattleAIScript_82DD208
+
+BattleAIScript_82DD201:
+ score -3
+ goto BattleAIScript_82DD21D
+
+BattleAIScript_82DD208:
+ if_doesnt_have_move_with_effect AI_TARGET, EFFECT_SNATCH, BattleAIScript_82DD215
+ if_random_less_than 50, BattleAIScript_82DD21D
+
+BattleAIScript_82DD215:
+ if_random_less_than 10, BattleAIScript_82DD21D
+ score +3
+
+BattleAIScript_82DD21D:
+ end
+
+BattleAIScript_82DD21E:
+ end
+
+BattleAIScript_82DD21F:
+ if_hp_more_than AI_TARGET, 50, BattleAIScript_82DD228
+ score -1
+
+BattleAIScript_82DD228:
+ end
+
+BattleAIScript_82DD229:
+ if_status AI_TARGET, STATUS_TOXIC_POISON, BattleAIScript_82DD256
+ if_status2 AI_TARGET, STATUS2_CURSED, BattleAIScript_82DD256
+ if_status3 AI_TARGET, STATUS3_PERISH_SONG, BattleAIScript_82DD256
+ if_status2 AI_TARGET, STATUS2_INFATUATION, BattleAIScript_82DD256
+ goto BattleAIScript_82DD25E
+
+BattleAIScript_82DD256:
+ if_random_less_than 128, BattleAIScript_82DD25E
+ score +1
+
+BattleAIScript_82DD25E:
+ end
+
+BattleAIScript_82DD25F:
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, BattleAIScript_82DD285
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, BattleAIScript_82DD285
+ if_type_effectiveness AI_EFFECTIVENESS_x2, BattleAIScript_82DD27D
+ if_type_effectiveness AI_EFFECTIVENESS_x4, BattleAIScript_82DD27D
+ if_random_less_than 128, BattleAIScript_82DD285
+
+BattleAIScript_82DD27D:
+ if_random_less_than 128, BattleAIScript_82DD285
+ score +1
+
+BattleAIScript_82DD285:
+ end
+
+BattleAIScript_82DD286:
+ if_has_move AI_USER, MOVE_PSYCH_UP, BattleAIScript_82DD2B8
+
+BattleAIScript_82DD28E:
+ if_random_less_than 128, BattleAIScript_82DD296
+ score +1
+
+BattleAIScript_82DD296:
+ if_hp_more_than AI_TARGET, 70, BattleAIScript_82DD2B7
+ if_random_less_than 128, BattleAIScript_82DD2A5
+ score -1
+
+BattleAIScript_82DD2A5:
+ if_hp_more_than AI_TARGET, 50, BattleAIScript_82DD2B7
+ score -1
+ if_hp_more_than AI_TARGET, 30, BattleAIScript_82DD2B7
+ score -1
+
+BattleAIScript_82DD2B7:
+ end
+
+BattleAIScript_82DD2B8:
+ if_stat_level_more_than AI_TARGET, ATK, 3, BattleAIScript_82DD2D0
+ score +3
+ get_turn_count
+ if_not_equal 0, BattleAIScript_82DD2D2
+ score +2
+ goto BattleAIScript_82DD2D2
+
+BattleAIScript_82DD2D0:
+ score -5
+
+BattleAIScript_82DD2D2:
+ end
+
+BattleAIScript_82DD2D3:
+ if_hp_less_than AI_USER, 50, BattleAIScript_82DD2F6
+ get_target_type1
+ if_in_bytes sTypesTable_82DD2F9, BattleAIScript_82DD2F8
+ get_target_type2
+ if_in_bytes sTypesTable_82DD2F9, BattleAIScript_82DD2F8
+ if_random_less_than 50, BattleAIScript_82DD2F8
+
+BattleAIScript_82DD2F6:
+ score -2
+
+BattleAIScript_82DD2F8:
+ end
+
+sTypesTable_82DD2F9:
+ .byte TYPE_NORMAL
+ .byte TYPE_FIGHTING
+ .byte TYPE_FLYING
+ .byte TYPE_POISON
+ .byte TYPE_GROUND
+ .byte TYPE_ROCK
+ .byte TYPE_BUG
+ .byte TYPE_GHOST
+ .byte TYPE_STEEL
+ .byte -1
+
+BattleAIScript_82DD303:
+ if_hp_less_than AI_USER, 50, BattleAIScript_82DD311
+ if_hp_more_than AI_TARGET, 50, BattleAIScript_82DD313
+
+BattleAIScript_82DD311:
+ score -1
+
+BattleAIScript_82DD313:
+ end
+
+BattleAIScript_82DD314:
+ if_target_faster BattleAIScript_82DD328
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DD330
+ score -1
+ goto BattleAIScript_82DD330
+
+BattleAIScript_82DD328:
+ if_random_less_than 20, BattleAIScript_82DD330
+ score +3
+
+BattleAIScript_82DD330:
+ end
+
+BattleAIScript_82DD331:
+ if_target_faster BattleAIScript_82DD353
+ if_hp_more_than AI_USER, 60, BattleAIScript_82DD353
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DD34B
+ if_random_less_than 180, BattleAIScript_82DD353
+
+BattleAIScript_82DD34B:
+ if_random_less_than 50, BattleAIScript_82DD353
+ score -1
+
+BattleAIScript_82DD353:
+ end
+
+BattleAIScript_82DD354:
+ if_hp_more_than AI_USER, 90, BattleAIScript_82DD381
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DD379
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DD371
+ if_random_less_than 100, BattleAIScript_82DD371
+ score -1
+
+BattleAIScript_82DD371:
+ if_random_less_than 100, BattleAIScript_82DD379
+ score -1
+
+BattleAIScript_82DD379:
+ if_random_less_than 100, BattleAIScript_82DD381
+ score -1
+
+BattleAIScript_82DD381:
+ if_target_faster BattleAIScript_82DD3E9
+ get_last_used_bank_move AI_TARGET
+ get_move_effect_from_result
+ if_equal EFFECT_SLEEP, BattleAIScript_82DD3B9
+ if_equal EFFECT_TOXIC, BattleAIScript_82DD3B9
+ if_equal EFFECT_POISON, BattleAIScript_82DD3B9
+ if_equal EFFECT_PARALYZE, BattleAIScript_82DD3B9
+ if_equal EFFECT_WILL_O_WISP, BattleAIScript_82DD3B9
+ if_equal EFFECT_CONFUSE, BattleAIScript_82DD3C8
+ if_equal EFFECT_LEECH_SEED, BattleAIScript_82DD3D7
+ goto BattleAIScript_82DD3E9
+
+BattleAIScript_82DD3B9:
+ if_not_status AI_TARGET, STATUS_ANY, BattleAIScript_82DD3E1
+ goto BattleAIScript_82DD3E9
+
+BattleAIScript_82DD3C8:
+ if_not_status2 AI_TARGET, STATUS2_CONFUSION, BattleAIScript_82DD3E1
+ goto BattleAIScript_82DD3E9
+
+BattleAIScript_82DD3D7:
+ if_status3 AI_TARGET, STATUS3_LEECHSEED, BattleAIScript_82DD3E9
+
+BattleAIScript_82DD3E1:
+ if_random_less_than 100, BattleAIScript_82DD3E9
+ score +1
+
+BattleAIScript_82DD3E9:
+ end
+
+BattleAIScript_82DD3EA:
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, BattleAIScript_82DD40F
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, BattleAIScript_82DD40F
+ if_target_faster BattleAIScript_82DD408
+ if_hp_more_than AI_USER, 40, BattleAIScript_82DD40F
+ goto BattleAIScript_82DD411
+
+BattleAIScript_82DD408:
+ if_hp_less_than AI_USER, 60, BattleAIScript_82DD411
+
+BattleAIScript_82DD40F:
+ score -1
+
+BattleAIScript_82DD411:
+ end
+
+BattleAIScript_82DD412:
+ if_target_faster BattleAIScript_82DD430
+ get_last_used_bank_move AI_TARGET
+ get_move_power_from_result
+ if_equal 0, BattleAIScript_82DD428
+ score +1
+ goto BattleAIScript_82DD430
+
+BattleAIScript_82DD428:
+ if_random_less_than 100, BattleAIScript_82DD430
+ score -1
+
+BattleAIScript_82DD430:
+ end
+
+BattleAIScript_82DD431:
+ if_status AI_TARGET, STATUS_SLEEP, BattleAIScript_82DD4D6
+ if_status2 AI_TARGET, STATUS2_INFATUATION, BattleAIScript_82DD4D6
+ if_status2 AI_TARGET, STATUS2_CONFUSION, BattleAIScript_82DD4D6
+ if_hp_more_than AI_USER, 30, BattleAIScript_82DD45E
+ if_random_less_than 10, BattleAIScript_82DD45E
+ score -1
+
+BattleAIScript_82DD45E:
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DD46D
+ if_random_less_than 100, BattleAIScript_82DD46D
+ score -1
+
+BattleAIScript_82DD46D:
+ if_has_move AI_USER, MOVE_MIRROR_COAT, BattleAIScript_82DD4CD
+ get_last_used_bank_move AI_TARGET
+ get_move_power_from_result
+ if_equal 0, BattleAIScript_82DD4A4
+ if_target_not_taunted BattleAIScript_82DD48B
+ if_random_less_than 100, BattleAIScript_82DD48B
+ score +1
+
+BattleAIScript_82DD48B:
+ get_last_used_bank_move AI_TARGET
+ get_move_type_from_result
+ if_not_in_bytes sTypesTable_82DD4D9, BattleAIScript_82DD4D6
+ if_random_less_than 100, BattleAIScript_82DD4D8
+ score +1
+ goto BattleAIScript_82DD4D8
+
+BattleAIScript_82DD4A4:
+ if_target_not_taunted BattleAIScript_82DD4B1
+ if_random_less_than 100, BattleAIScript_82DD4B1
+ score +1
+
+BattleAIScript_82DD4B1:
+ get_target_type1
+ if_in_bytes sTypesTable_82DD4D9, BattleAIScript_82DD4D8
+ get_target_type2
+ if_in_bytes sTypesTable_82DD4D9, BattleAIScript_82DD4D8
+ if_random_less_than 50, BattleAIScript_82DD4D8
+
+BattleAIScript_82DD4CD:
+ if_random_less_than 100, BattleAIScript_82DD4D5
+ score +4
+
+BattleAIScript_82DD4D5:
+ end
+
+BattleAIScript_82DD4D6:
+ score -1
+
+BattleAIScript_82DD4D8:
+ end
+
+sTypesTable_82DD4D9:
+ .byte TYPE_NORMAL
+ .byte TYPE_FIGHTING
+ .byte TYPE_FLYING
+ .byte TYPE_POISON
+ .byte TYPE_GROUND
+ .byte TYPE_ROCK
+ .byte TYPE_BUG
+ .byte TYPE_GHOST
+ .byte TYPE_STEEL
+ .byte -1
+
+BattleAIScript_82DD4E3:
+ if_any_move_disabled AI_TARGET, BattleAIScript_82DD4FC
+ if_target_faster BattleAIScript_82DD509
+ get_last_used_bank_move AI_TARGET
+ get_move_effect_from_result
+ if_not_in_bytes sMoveEffectsTable_82DD50C, BattleAIScript_82DD509
+
+BattleAIScript_82DD4FC:
+ if_random_less_than 30, BattleAIScript_82DD50B
+ score +3
+ goto BattleAIScript_82DD50B
+
+BattleAIScript_82DD509:
+ score -2
+
+BattleAIScript_82DD50B:
+ end
+
+sMoveEffectsTable_82DD50C:
+ .byte EFFECT_DREAM_EATER
+ .byte EFFECT_ATTACK_UP
+ .byte EFFECT_DEFENSE_UP
+ .byte EFFECT_SPEED_UP
+ .byte EFFECT_SPECIAL_ATTACK_UP
+ .byte EFFECT_HAZE
+ .byte EFFECT_ROAR
+ .byte EFFECT_CONVERSION
+ .byte EFFECT_TOXIC
+ .byte EFFECT_LIGHT_SCREEN
+ .byte EFFECT_REST
+ .byte EFFECT_SUPER_FANG
+ .byte EFFECT_SPECIAL_DEFENSE_UP_2
+ .byte EFFECT_CONFUSE
+ .byte EFFECT_POISON
+ .byte EFFECT_PARALYZE
+ .byte EFFECT_LEECH_SEED
+ .byte EFFECT_SPLASH
+ .byte EFFECT_ATTACK_UP_2
+ .byte EFFECT_ENCORE
+ .byte EFFECT_CONVERSION_2
+ .byte EFFECT_LOCK_ON
+ .byte EFFECT_HEAL_BELL
+ .byte EFFECT_MEAN_LOOK
+ .byte EFFECT_NIGHTMARE
+ .byte EFFECT_PROTECT
+ .byte EFFECT_SKILL_SWAP
+ .byte EFFECT_FORESIGHT
+ .byte EFFECT_PERISH_SONG
+ .byte EFFECT_SANDSTORM
+ .byte EFFECT_ENDURE
+ .byte EFFECT_SWAGGER
+ .byte EFFECT_ATTRACT
+ .byte EFFECT_SAFEGUARD
+ .byte EFFECT_RAIN_DANCE
+ .byte EFFECT_SUNNY_DAY
+ .byte EFFECT_BELLY_DRUM
+ .byte EFFECT_PSYCH_UP
+ .byte EFFECT_FUTURE_SIGHT
+ .byte EFFECT_FAKE_OUT
+ .byte EFFECT_STOCKPILE
+ .byte EFFECT_SPIT_UP
+ .byte EFFECT_SWALLOW
+ .byte EFFECT_HAIL
+ .byte EFFECT_TORMENT
+ .byte EFFECT_WILL_O_WISP
+ .byte EFFECT_FOLLOW_ME
+ .byte EFFECT_CHARGE
+ .byte EFFECT_TRICK
+ .byte EFFECT_ROLE_PLAY
+ .byte EFFECT_INGRAIN
+ .byte EFFECT_RECYCLE
+ .byte EFFECT_KNOCK_OFF
+ .byte EFFECT_SKILL_SWAP
+ .byte EFFECT_IMPRISON
+ .byte EFFECT_REFRESH
+ .byte EFFECT_GRUDGE
+ .byte EFFECT_TEETER_DANCE
+ .byte EFFECT_MUD_SPORT
+ .byte EFFECT_WATER_SPORT
+ .byte EFFECT_DRAGON_DANCE
+ .byte EFFECT_CAMOUFLAGE
+ .byte -1
+
+BattleAIScript_82DD54B:
+ if_hp_less_than AI_TARGET, 80, BattleAIScript_82DD574
+ if_target_faster BattleAIScript_82DD566
+ if_hp_more_than AI_USER, 40, BattleAIScript_82DD574
+ score +1
+ goto BattleAIScript_82DD576
+
+BattleAIScript_82DD566:
+ if_hp_more_than AI_USER, 60, BattleAIScript_82DD574
+ score +1
+ goto BattleAIScript_82DD576
+
+BattleAIScript_82DD574:
+ score -1
+
+BattleAIScript_82DD576:
+ end
+
+BattleAIScript_82DD577:
+ score +2
+ end
+
+BattleAIScript_82DD57A:
+ if_random_less_than 128, BattleAIScript_82DD582
+ score +2
+
+BattleAIScript_82DD582:
+ end
+
+BattleAIScript_82DD583:
+ if_status AI_USER, STATUS_SLEEP, Score_Plus10
+ score -5
+ end
+
+BattleAIScript_82DD590:
+ score -1
+ if_target_faster BattleAIScript_82DD5C5
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DD5C5
+ if_random_less_than 128, BattleAIScript_82DD5A7
+ score +1
+
+BattleAIScript_82DD5A7:
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DD5C5
+ if_random_less_than 128, BattleAIScript_82DD5B6
+ score +1
+
+BattleAIScript_82DD5B6:
+ if_hp_more_than AI_USER, 30, BattleAIScript_82DD5C5
+ if_random_less_than 100, BattleAIScript_82DD5C5
+ score +2
+
+BattleAIScript_82DD5C5:
+ end
+
+BattleAIScript_82DD5C6:
+ if_target_faster BattleAIScript_82DD5E6
+ if_hp_more_than AI_USER, 33, BattleAIScript_82DD608
+ if_hp_more_than AI_USER, 20, BattleAIScript_82DD60A
+ if_hp_less_than AI_USER, 8, BattleAIScript_82DD5F9
+ goto BattleAIScript_82DD5FB
+
+BattleAIScript_82DD5E6:
+ if_hp_more_than AI_USER, 60, BattleAIScript_82DD608
+ if_hp_more_than AI_USER, 40, BattleAIScript_82DD60A
+ goto BattleAIScript_82DD5FB
+
+BattleAIScript_82DD5F9:
+ score +1
+
+BattleAIScript_82DD5FB:
+ if_random_less_than 100, BattleAIScript_82DD60A
+ score +1
+ goto BattleAIScript_82DD60A
+
+BattleAIScript_82DD608:
+ score -1
+
+BattleAIScript_82DD60A:
+ end
+
+BattleAIScript_82DD60B:
+ if_status AI_TARGET, STATUS_ANY, BattleAIScript_82DD621
+ if_status_in_party AI_TARGET, STATUS_ANY, BattleAIScript_82DD621
+ score -5
+
+BattleAIScript_82DD621:
+ end
+
+BattleAIScript_82DD622:
+ get_hold_effect AI_TARGET
+ if_not_in_bytes sHoldEffectsTable_82DD63D, BattleAIScript_82DD63A
+ if_random_less_than 50, BattleAIScript_82DD63C
+ score +1
+ goto BattleAIScript_82DD63C
+
+BattleAIScript_82DD63A:
+ score -2
+
+BattleAIScript_82DD63C:
+ end
+
+sHoldEffectsTable_82DD63D:
+ .byte HOLD_EFFECT_CURE_SLP
+ .byte HOLD_EFFECT_CURE_STATUS
+ .byte HOLD_EFFECT_RESTORE_HP
+ .byte HOLD_EFFECT_EVASION_UP
+ .byte HOLD_EFFECT_LEFTOVERS
+ .byte HOLD_EFFECT_LIGHT_BALL
+ .byte HOLD_EFFECT_THICK_CLUB
+ .byte -1
+
+BattleAIScript_82DD645:
+ get_user_type1
+ if_equal TYPE_GHOST, BattleAIScript_82DD68A
+ get_user_type2
+ if_equal TYPE_GHOST, BattleAIScript_82DD68A
+ if_stat_level_more_than AI_USER, DEF, 9, BattleAIScript_82DD693
+ if_random_less_than 128, BattleAIScript_82DD665
+ score +1
+
+BattleAIScript_82DD665:
+ if_stat_level_more_than AI_USER, DEF, 7, BattleAIScript_82DD693
+ if_random_less_than 128, BattleAIScript_82DD675
+ score +1
+
+BattleAIScript_82DD675:
+ if_stat_level_more_than AI_USER, DEF, 6, BattleAIScript_82DD693
+ if_random_less_than 128, BattleAIScript_82DD693
+ score +1
+ goto BattleAIScript_82DD693
+
+BattleAIScript_82DD68A:
+ if_hp_more_than AI_USER, 80, BattleAIScript_82DD693
+ score -1
+
+BattleAIScript_82DD693:
+ end
+
+BattleAIScript_82DD694:
+ get_protect_count AI_USER
+ if_more_than 1, BattleAIScript_82DD75A
+ if_status AI_USER, STATUS_TOXIC_POISON, BattleAIScript_82DD751
+ if_status2 AI_USER, STATUS2_CURSED, BattleAIScript_82DD751
+ if_status3 AI_USER, STATUS3_PERISH_SONG, BattleAIScript_82DD751
+ if_status2 AI_USER, STATUS2_INFATUATION, BattleAIScript_82DD751
+ if_status3 AI_USER, STATUS3_LEECHSEED, BattleAIScript_82DD751
+ if_status3 AI_USER, STATUS3_YAWN, BattleAIScript_82DD751
+ if_has_move_with_effect AI_TARGET, EFFECT_RESTORE_HP, BattleAIScript_82DD751
+ if_has_move_with_effect AI_TARGET, EFFECT_DEFENSE_CURL, BattleAIScript_82DD751
+ if_status AI_TARGET, STATUS_TOXIC_POISON, BattleAIScript_82DD730
+ if_status2 AI_TARGET, STATUS2_CURSED, BattleAIScript_82DD730
+ if_status3 AI_TARGET, STATUS3_PERISH_SONG, BattleAIScript_82DD730
+ if_status2 AI_TARGET, STATUS2_INFATUATION, BattleAIScript_82DD730
+ if_status3 AI_TARGET, STATUS3_LEECHSEED, BattleAIScript_82DD730
+ if_status3 AI_TARGET, STATUS3_YAWN, BattleAIScript_82DD730
+ get_last_used_bank_move AI_TARGET
+ get_move_effect_from_result
+ if_not_equal EFFECT_LOCK_ON, BattleAIScript_82DD730
+ goto BattleAIScript_82DD732
+
+BattleAIScript_82DD730:
+ score +2
+
+BattleAIScript_82DD732:
+ if_random_less_than 128, BattleAIScript_82DD73A
+ score -1
+
+BattleAIScript_82DD73A:
+ get_protect_count AI_USER
+ if_equal 0, BattleAIScript_82DD75C
+ score -1
+ if_random_less_than 128, BattleAIScript_82DD75C
+ score -1
+ goto BattleAIScript_82DD75C
+
+BattleAIScript_82DD751:
+ get_last_used_bank_move AI_TARGET
+ get_move_effect_from_result
+ if_not_equal EFFECT_LOCK_ON, BattleAIScript_82DD75C
+
+BattleAIScript_82DD75A:
+ score -2
+
+BattleAIScript_82DD75C:
+ end
+
+BattleAIScript_82DD75D:
+ get_user_type1
+ if_equal TYPE_GHOST, BattleAIScript_82DD77C
+ get_user_type2
+ if_equal TYPE_GHOST, BattleAIScript_82DD77C
+ if_stat_level_more_than AI_USER, EVASION, 8, BattleAIScript_82DD782
+ score -2
+ goto BattleAIScript_82DD78A
+
+BattleAIScript_82DD77C:
+ if_random_less_than 80, BattleAIScript_82DD78A
+
+BattleAIScript_82DD782:
+ if_random_less_than 80, BattleAIScript_82DD78A
+ score +2
+
+BattleAIScript_82DD78A:
+ end
+
+BattleAIScript_82DD78B:
+ if_hp_less_than AI_USER, 4, BattleAIScript_82DD799
+ if_hp_less_than AI_USER, 35, BattleAIScript_82DD7A0
+
+BattleAIScript_82DD799:
+ score -1
+ goto BattleAIScript_82DD7A8
+
+BattleAIScript_82DD7A0:
+ if_random_less_than 70, BattleAIScript_82DD7A8
+ score +1
+
+BattleAIScript_82DD7A8:
+ end
+
+BattleAIScript_82DD7A9:
+ if_stat_level_more_than AI_USER, ATK, 8, BattleAIScript_82DD7D6
+ if_stat_level_more_than AI_USER, DEF, 8, BattleAIScript_82DD7D6
+ if_stat_level_more_than AI_USER, SPATK, 8, BattleAIScript_82DD7D6
+ if_stat_level_more_than AI_USER, SPDEF, 8, BattleAIScript_82DD7D6
+ if_stat_level_more_than AI_USER, EVASION, 8, BattleAIScript_82DD7D6
+ goto BattleAIScript_82DD7FC
+
+BattleAIScript_82DD7D6:
+ if_target_faster BattleAIScript_82DD7E8
+ if_hp_more_than AI_USER, 60, BattleAIScript_82DD844
+ goto BattleAIScript_82DD7EF
+
+BattleAIScript_82DD7E8:
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DD844
+
+BattleAIScript_82DD7EF:
+ if_random_less_than 80, BattleAIScript_82DD844
+ score +2
+ goto BattleAIScript_82DD844
+
+BattleAIScript_82DD7FC:
+ if_stat_level_more_than AI_USER, ATK, 7, BattleAIScript_82DD829
+ if_stat_level_more_than AI_USER, DEF, 7, BattleAIScript_82DD829
+ if_stat_level_more_than AI_USER, SPATK, 7, BattleAIScript_82DD829
+ if_stat_level_more_than AI_USER, SPDEF, 7, BattleAIScript_82DD829
+ if_stat_level_more_than AI_USER, EVASION, 7, BattleAIScript_82DD829
+ goto BattleAIScript_82DD842
+
+BattleAIScript_82DD829:
+ if_target_faster BattleAIScript_82DD83B
+ if_hp_more_than AI_USER, 60, BattleAIScript_82DD842
+ goto BattleAIScript_82DD844
+
+BattleAIScript_82DD83B:
+ if_hp_less_than AI_USER, 70, BattleAIScript_82DD844
+
+BattleAIScript_82DD842:
+ score -2
+
+BattleAIScript_82DD844:
+ end
+
+BattleAIScript_82DD845:
+ is_first_turn_for AI_USER
+ if_not_equal 0, BattleAIScript_82DD87A
+ get_target_type1
+ if_equal TYPE_GHOST, BattleAIScript_82DD872
+ get_target_type1
+ if_equal TYPE_PSYCHIC, BattleAIScript_82DD872
+ get_target_type2
+ if_equal TYPE_GHOST, BattleAIScript_82DD872
+ get_target_type2
+ if_equal TYPE_PSYCHIC, BattleAIScript_82DD872
+ goto BattleAIScript_82DD87A
+
+BattleAIScript_82DD872:
+ if_random_less_than 128, BattleAIScript_82DD87A
+ score +1
+
+BattleAIScript_82DD87A:
+ end
+
+BattleAIScript_82DD87B:
+ if_user_faster BattleAIScript_82DD889
+ get_ability AI_USER
+ if_equal ABILITY_SWIFT_SWIM, BattleAIScript_82DD8B0
+
+BattleAIScript_82DD889:
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DD8B7
+ get_weather
+ if_equal AI_WEATHER_HAIL, BattleAIScript_82DD8B0
+ if_equal AI_WEATHER_SUN, BattleAIScript_82DD8B0
+ if_equal AI_WEATHER_SANDSTORM, BattleAIScript_82DD8B0
+ get_ability AI_USER
+ if_equal ABILITY_RAIN_DISH, BattleAIScript_82DD8B0
+ goto BattleAIScript_82DD8B9
+
+BattleAIScript_82DD8B0:
+ score +1
+ goto BattleAIScript_82DD8B9
+
+BattleAIScript_82DD8B7:
+ score -1
+
+BattleAIScript_82DD8B9:
+ end
+
+BattleAIScript_82DD8BA:
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DD8E0
+ get_weather
+ if_equal AI_WEATHER_HAIL, BattleAIScript_82DD8D9
+ if_equal AI_WEATHER_RAIN, BattleAIScript_82DD8D9
+ if_equal AI_WEATHER_SANDSTORM, BattleAIScript_82DD8D9
+ goto BattleAIScript_82DD8E2
+
+BattleAIScript_82DD8D9:
+ score +1
+ goto BattleAIScript_82DD8E2
+
+BattleAIScript_82DD8E0:
+ score -1
+
+BattleAIScript_82DD8E2:
+ end
+
+BattleAIScript_82DD8E3:
+ if_hp_less_than AI_USER, 90, BattleAIScript_82DD8EF
+ goto BattleAIScript_82DD8F1
+
+BattleAIScript_82DD8EF:
+ score -2
+
+BattleAIScript_82DD8F1:
+ end
+
+BattleAIScript_82DD8F2:
+ if_stat_level_more_than AI_TARGET, ATK, 8, BattleAIScript_82DD91F
+ if_stat_level_more_than AI_TARGET, DEF, 8, BattleAIScript_82DD91F
+ if_stat_level_more_than AI_TARGET, SPATK, 8, BattleAIScript_82DD91F
+ if_stat_level_more_than AI_TARGET, SPDEF, 8, BattleAIScript_82DD91F
+ if_stat_level_more_than AI_TARGET, EVASION, 8, BattleAIScript_82DD91F
+ goto BattleAIScript_82DD957
+
+BattleAIScript_82DD91F:
+ if_stat_level_less_than AI_USER, ATK, 7, BattleAIScript_82DD954
+ if_stat_level_less_than AI_USER, DEF, 7, BattleAIScript_82DD954
+ if_stat_level_less_than AI_USER, SPATK, 7, BattleAIScript_82DD954
+ if_stat_level_less_than AI_USER, SPDEF, 7, BattleAIScript_82DD954
+ if_stat_level_less_than AI_USER, EVASION, 7, BattleAIScript_82DD952
+ if_random_less_than 50, BattleAIScript_82DD959
+ goto BattleAIScript_82DD957
+
+BattleAIScript_82DD952:
+ score +1
+
+BattleAIScript_82DD954:
+ score +1
+ end
+
+BattleAIScript_82DD957:
+ score -2
+
+BattleAIScript_82DD959:
+ end
+
+BattleAIScript_82DD95A:
+ if_status AI_TARGET, STATUS_SLEEP, BattleAIScript_82DD9FF
+ if_status2 AI_TARGET, STATUS2_INFATUATION, BattleAIScript_82DD9FF
+ if_status2 AI_TARGET, STATUS2_CONFUSION, BattleAIScript_82DD9FF
+ if_hp_more_than AI_USER, 30, BattleAIScript_82DD987
+ if_random_less_than 10, BattleAIScript_82DD987
+ score -1
+
+BattleAIScript_82DD987:
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DD996
+ if_random_less_than 100, BattleAIScript_82DD996
+ score -1
+
+BattleAIScript_82DD996:
+ if_has_move AI_USER, MOVE_COUNTER, BattleAIScript_82DD9F6
+ get_last_used_bank_move AI_TARGET
+ get_move_power_from_result
+ if_equal 0, BattleAIScript_82DD9CD
+ if_target_not_taunted BattleAIScript_82DD9B4
+ if_random_less_than 100, BattleAIScript_82DD9B4
+ score +1
+
+BattleAIScript_82DD9B4:
+ get_last_used_bank_move AI_TARGET
+ get_move_type_from_result
+ if_not_in_bytes sTypesTable_82DDA02, BattleAIScript_82DD9FF
+ if_random_less_than 100, BattleAIScript_82DDA01
+ score +1
+ goto BattleAIScript_82DDA01
+
+BattleAIScript_82DD9CD:
+ if_target_not_taunted BattleAIScript_82DD9DA
+ if_random_less_than 100, BattleAIScript_82DD9DA
+ score +1
+
+BattleAIScript_82DD9DA:
+ get_target_type1
+ if_in_bytes sTypesTable_82DDA02, BattleAIScript_82DDA01
+ get_target_type2
+ if_in_bytes sTypesTable_82DDA02, BattleAIScript_82DDA01
+ if_random_less_than 50, BattleAIScript_82DDA01
+
+BattleAIScript_82DD9F6:
+ if_random_less_than 100, BattleAIScript_82DD9FE
+ score +4
+
+BattleAIScript_82DD9FE:
+ end
+
+BattleAIScript_82DD9FF:
+ score -1
+
+BattleAIScript_82DDA01:
+ end
+
+sTypesTable_82DDA02:
+ .byte TYPE_FIRE
+ .byte TYPE_WATER
+ .byte TYPE_GRASS
+ .byte TYPE_ELECTRIC
+ .byte TYPE_PSYCHIC
+ .byte TYPE_ICE
+ .byte TYPE_DRAGON
+ .byte TYPE_DARK
+ .byte -1
+
+BattleAIScript_82DDA0B:
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, BattleAIScript_82DDA2C
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, BattleAIScript_82DDA2C
+ if_has_move_with_effect AI_TARGET, EFFECT_PROTECT, BattleAIScript_82DDA2C
+ if_hp_more_than AI_USER, 38, BattleAIScript_82DDA2E
+ score -1
+ goto BattleAIScript_82DDA2E
+
+BattleAIScript_82DDA2C:
+ score -2
+
+BattleAIScript_82DDA2E:
+ end
+
+BattleAIScript_82DDA2F:
+ if_doesnt_have_move_with_effect AI_TARGET, EFFECT_PROTECT, BattleAIScript_82DDA3D
+ score -1
+ goto BattleAIScript_82DDAB4
+
+BattleAIScript_82DDA3D:
+ if_status AI_TARGET, STATUS_TOXIC_POISON, BattleAIScript_82DDAAC
+ if_status2 AI_TARGET, STATUS2_CURSED, BattleAIScript_82DDAAC
+ if_status3 AI_TARGET, STATUS3_LEECHSEED, BattleAIScript_82DDAAC
+ get_weather
+ if_equal AI_WEATHER_HAIL, BattleAIScript_82DDA6D
+ if_equal AI_WEATHER_SANDSTORM, BattleAIScript_82DDA88
+ goto BattleAIScript_82DDA98
+
+BattleAIScript_82DDA6D:
+ get_user_type1
+ if_in_bytes sTypesTable_82DDAB5, BattleAIScript_82DDAAC
+ get_user_type2
+ if_in_bytes sTypesTable_82DDAB5, BattleAIScript_82DDAAC
+ goto BattleAIScript_82DDA98
+
+BattleAIScript_82DDA88:
+ get_user_type1
+ if_equal TYPE_ICE, BattleAIScript_82DDAAC
+ get_user_type2
+ if_equal TYPE_ICE, BattleAIScript_82DDAAC
+
+BattleAIScript_82DDA98:
+ if_target_faster BattleAIScript_82DDAB4
+ get_last_used_bank_move AI_TARGET
+ get_move_effect_from_result
+ if_not_equal EFFECT_LOCK_ON, BattleAIScript_82DDAAC
+ goto BattleAIScript_82DDAB4
+
+BattleAIScript_82DDAAC:
+ if_random_less_than 80, BattleAIScript_82DDAB4
+ score +1
+
+BattleAIScript_82DDAB4:
+ end
+
+sTypesTable_82DDAB5:
+ .byte TYPE_GROUND
+ .byte TYPE_ROCK
+ .byte TYPE_STEEL
+ .byte -1
+
+BattleAIScript_82DDAB9:
+ score +2
+ end
+
+BattleAIScript_82DDABC:
+ get_stockpile_count AI_USER
+ if_less_than 2, BattleAIScript_82DDACC
+ if_random_less_than 80, BattleAIScript_82DDACC
+ score +2
+
+BattleAIScript_82DDACC:
+ end
+
+BattleAIScript_82DDACD:
+ if_hp_less_than AI_USER, 40, BattleAIScript_82DDAF3
+ get_weather
+ if_equal AI_WEATHER_SUN, BattleAIScript_82DDAEC
+ if_equal AI_WEATHER_RAIN, BattleAIScript_82DDAEC
+ if_equal AI_WEATHER_SANDSTORM, BattleAIScript_82DDAEC
+ goto BattleAIScript_82DDAF5
+
+BattleAIScript_82DDAEC:
+ score +1
+ goto BattleAIScript_82DDAF5
+
+BattleAIScript_82DDAF3:
+ score -1
+
+BattleAIScript_82DDAF5:
+ end
+
+BattleAIScript_82DDAF6:
+ if_not_status AI_TARGET, STATUS_POISON | STATUS_BURN | STATUS_PARALYSIS | STATUS_TOXIC_POISON, BattleAIScript_82DDB02
+ score +1
+
+BattleAIScript_82DDB02:
+ end
+
+BattleAIScript_82DDB03:
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, BattleAIScript_82DDB42
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, BattleAIScript_82DDB42
+ if_status AI_TARGET, STATUS_SLEEP, BattleAIScript_82DDB59
+ if_status2 AI_TARGET, STATUS2_INFATUATION, BattleAIScript_82DDB49
+ if_status2 AI_TARGET, STATUS2_CONFUSION, BattleAIScript_82DDB49
+ is_first_turn_for AI_USER
+ if_not_equal 0, BattleAIScript_82DDB5B
+ if_random_less_than 100, BattleAIScript_82DDB5B
+ score +1
+ goto BattleAIScript_82DDB5B
+
+BattleAIScript_82DDB42:
+ score -1
+ goto BattleAIScript_82DDB5B
+
+BattleAIScript_82DDB49:
+ if_random_less_than 100, BattleAIScript_82DDB5B
+ if_status2 AI_USER, STATUS2_SUBSTITUTE, Score_Plus5
+
+BattleAIScript_82DDB59:
+ score +1
+
+BattleAIScript_82DDB5B:
+ end
+
+BattleAIScript_82DDB5C:
+ if_status AI_TARGET, STATUS_PARALYSIS, BattleAIScript_82DDB6B
+ goto BattleAIScript_82DDB6D
+
+BattleAIScript_82DDB6B:
+ score +1
+
+BattleAIScript_82DDB6D:
+ end
+
+BattleAIScript_82DDB6E:
+ get_hold_effect AI_USER
+ if_in_bytes sHoldEffectsTable_82DDBB7, BattleAIScript_82DDB89
+ if_in_bytes sHoldEffectsTable_82DDBAF, BattleAIScript_82DDB9B
+
+BattleAIScript_82DDB82:
+ score -3
+ goto BattleAIScript_82DDBAE
+
+BattleAIScript_82DDB89:
+ get_hold_effect AI_TARGET
+ if_in_bytes sHoldEffectsTable_82DDBB7, BattleAIScript_82DDB82
+ score +5
+ goto BattleAIScript_82DDBAE
+
+BattleAIScript_82DDB9B:
+ get_hold_effect AI_TARGET
+ if_in_bytes sHoldEffectsTable_82DDBAF, BattleAIScript_82DDB82
+ if_random_less_than 50, BattleAIScript_82DDBAE
+ score +2
+
+BattleAIScript_82DDBAE:
+ end
+
+sHoldEffectsTable_82DDBAF:
+ .byte HOLD_EFFECT_CONFUSE_SPICY
+ .byte HOLD_EFFECT_CONFUSE_DRY
+ .byte HOLD_EFFECT_CONFUSE_SWEET
+ .byte HOLD_EFFECT_CONFUSE_BITTER
+ .byte HOLD_EFFECT_CONFUSE_SOUR
+ .byte HOLD_EFFECT_MACHO_BRACE
+ .byte HOLD_EFFECT_CHOICE_BAND
+ .byte -1
+
+sHoldEffectsTable_82DDBB7:
+ .byte HOLD_EFFECT_CHOICE_BAND
+ .byte -1
+
+BattleAIScript_82DDBB9:
+ get_ability AI_USER
+ if_in_bytes sAbilitiesTable_82DDBDF, BattleAIScript_82DDBCF
+ get_ability AI_TARGET
+ if_in_bytes sAbilitiesTable_82DDBDF, BattleAIScript_82DDBD6
+
+BattleAIScript_82DDBCF:
+ score -1
+ goto BattleAIScript_82DDBDE
+
+BattleAIScript_82DDBD6:
+ if_random_less_than 50, BattleAIScript_82DDBDE
+ score +2
+
+BattleAIScript_82DDBDE:
+ end
+
+sAbilitiesTable_82DDBDF:
+ .byte ABILITY_SPEED_BOOST
+ .byte ABILITY_BATTLE_ARMOR
+ .byte ABILITY_SAND_VEIL
+ .byte ABILITY_STATIC
+ .byte ABILITY_FLASH_FIRE
+ .byte ABILITY_WONDER_GUARD
+ .byte ABILITY_EFFECT_SPORE
+ .byte ABILITY_SWIFT_SWIM
+ .byte ABILITY_HUGE_POWER
+ .byte ABILITY_RAIN_DISH
+ .byte ABILITY_CUTE_CHARM
+ .byte ABILITY_SHED_SKIN
+ .byte ABILITY_MARVEL_SCALE
+ .byte ABILITY_PURE_POWER
+ .byte ABILITY_CHLOROPHYLL
+ .byte ABILITY_SHIELD_DUST
+ .byte -1
+
+BattleAIScript_82DDBF0:
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, BattleAIScript_82DDC1D
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, BattleAIScript_82DDC1D
+ if_stat_level_less_than AI_USER, ATK, 6, BattleAIScript_82DDC1D
+ if_target_faster BattleAIScript_82DDC16
+ if_hp_more_than AI_USER, 40, BattleAIScript_82DDC1D
+ goto BattleAIScript_82DDC1F
+
+BattleAIScript_82DDC16:
+ if_hp_less_than AI_USER, 60, BattleAIScript_82DDC1F
+
+BattleAIScript_82DDC1D:
+ score -1
+
+BattleAIScript_82DDC1F:
+ end
+
+BattleAIScript_82DDC20:
+ if_hp_more_than AI_TARGET, 30, BattleAIScript_82DDC2F
+ if_random_less_than 100, BattleAIScript_82DDC2F
+ score -1
+
+BattleAIScript_82DDC2F:
+ is_first_turn_for AI_USER
+ if_equal 0, BattleAIScript_82DDC4A
+ if_random_less_than 150, BattleAIScript_82DDC52
+ score +1
+ goto BattleAIScript_82DDC52
+
+AI_CV_MagicCoat3:
+ if_random_less_than 50, BattleAIScript_82DDC52
+
+BattleAIScript_82DDC4A:
+ if_random_less_than 30, BattleAIScript_82DDC52
+ score -1
+
+BattleAIScript_82DDC52:
+ end
+
+BattleAIScript_82DDC53:
+ get_used_held_item AI_USER
+ if_not_in_bytes sItemsTable_82DDC6E, BattleAIScript_82DDC6B
+ if_random_less_than 50, BattleAIScript_82DDC6D
+ score +1
+ goto BattleAIScript_82DDC6D
+
+BattleAIScript_82DDC6B:
+ score -2
+
+BattleAIScript_82DDC6D:
+ end
+
+sItemsTable_82DDC6E:
+ .byte ITEM_CHESTO_BERRY
+ .byte ITEM_LUM_BERRY
+ .byte ITEM_STARF_BERRY
+ .byte -1
+
+BattleAIScript_82DDC72:
+ if_status AI_TARGET, STATUS_SLEEP, BattleAIScript_82DDC9D
+ if_status2 AI_TARGET, STATUS2_INFATUATION, BattleAIScript_82DDC9D
+ if_status2 AI_TARGET, STATUS2_CONFUSION, BattleAIScript_82DDC9D
+ if_random_less_than 180, BattleAIScript_82DDC9D
+ score +2
+ goto BattleAIScript_82DDC9F
+
+BattleAIScript_82DDC9D:
+ score -2
+
+BattleAIScript_82DDC9F:
+ end
+
+BattleAIScript_82DDCA0:
+ if_side_affecting AI_TARGET, SIDE_STATUS_REFLECT, BattleAIScript_82DDCAF
+ goto BattleAIScript_82DDCB1
+
+BattleAIScript_82DDCAF:
+ score +1
+
+BattleAIScript_82DDCB1:
+ end
+
+BattleAIScript_82DDCB2:
+ if_hp_less_than AI_TARGET, 30, BattleAIScript_82DDCC9
+ is_first_turn_for AI_USER
+ if_more_than 0, BattleAIScript_82DDCC9
+ if_random_less_than 180, BattleAIScript_82DDCC9
+ score +1
+
+BattleAIScript_82DDCC9:
+ end
+
+BattleAIScript_82DDCCA:
+ if_hp_less_than AI_TARGET, 70, BattleAIScript_82DDCF3
+ if_target_faster BattleAIScript_82DDCE5
+ if_hp_more_than AI_USER, 40, BattleAIScript_82DDCF3
+ score +1
+ goto BattleAIScript_82DDCF5
+
+BattleAIScript_82DDCE5:
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DDCF3
+ score +1
+ goto BattleAIScript_82DDCF5
+
+BattleAIScript_82DDCF3:
+ score -1
+
+BattleAIScript_82DDCF5:
+ end
+
+BattleAIScript_82DDCF6:
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, BattleAIScript_82DDD1B
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, BattleAIScript_82DDD1B
+ if_target_faster BattleAIScript_82DDD14
+ if_hp_more_than AI_TARGET, 50, BattleAIScript_82DDD1D
+ goto BattleAIScript_82DDD1B
+
+BattleAIScript_82DDD14:
+ if_hp_more_than AI_TARGET, 70, BattleAIScript_82DDD1D
+
+BattleAIScript_82DDD1B:
+ score -1
+
+BattleAIScript_82DDD1D:
+ end
+
+BattleAIScript_82DDD1E:
+ is_first_turn_for AI_USER
+ if_more_than 0, BattleAIScript_82DDD2E
+ if_random_less_than 100, BattleAIScript_82DDD2E
+ score +2
+
+BattleAIScript_82DDD2E:
+ end
+
+BattleAIScript_82DDD2F:
+ if_hp_less_than AI_TARGET, 50, BattleAIScript_82DDD3B
+ goto BattleAIScript_82DDD3D
+
+BattleAIScript_82DDD3B:
+ score -1
+
+BattleAIScript_82DDD3D:
+ end
+
+BattleAIScript_82DDD3E:
+ is_first_turn_for AI_USER
+ if_equal 1, BattleAIScript_82DDD85
+ if_random_less_than 30, BattleAIScript_82DDDA7
+ if_target_faster BattleAIScript_82DDD6B
+ if_hp_not_equal AI_USER, 100, BattleAIScript_82DDD9F
+ if_hp_less_than AI_TARGET, 70, BattleAIScript_82DDD9F
+ if_random_less_than 60, BattleAIScript_82DDDA7
+ goto BattleAIScript_82DDD9F
+
+BattleAIScript_82DDD6B:
+ if_hp_more_than AI_TARGET, 25, BattleAIScript_82DDD9F
+ if_has_move_with_effect AI_TARGET, EFFECT_RESTORE_HP, BattleAIScript_82DDD85
+ if_has_move_with_effect AI_TARGET, EFFECT_DEFENSE_CURL, BattleAIScript_82DDD85
+ goto BattleAIScript_82DDD92
+
+BattleAIScript_82DDD85:
+ if_random_less_than 150, BattleAIScript_82DDDA7
+ score +2
+ goto BattleAIScript_82DDDA7
+
+BattleAIScript_82DDD92:
+ if_random_less_than 230, BattleAIScript_82DDD9F
+ score +1
+ goto BattleAIScript_82DDDA7
+
+BattleAIScript_82DDD9F:
+ if_random_less_than 30, BattleAIScript_82DDDA7
+ score -2
+
+BattleAIScript_82DDDA7:
+ end
+
+BattleAIScript_82DDDA8:
+ if_hp_less_than AI_USER, 50, BattleAIScript_82DDDCB
+ get_target_type1
+ if_equal TYPE_ELECTRIC, BattleAIScript_82DDDC4
+ get_target_type2
+ if_equal TYPE_ELECTRIC, BattleAIScript_82DDDC4
+ goto BattleAIScript_82DDDCB
+
+BattleAIScript_82DDDC4:
+ score +1
+ goto BattleAIScript_82DDDCD
+
+BattleAIScript_82DDDCB:
+ score -1
+
+BattleAIScript_82DDDCD:
+ end
+
+BattleAIScript_82DDDCE:
+ if_type_effectiveness AI_EFFECTIVENESS_x0_25, BattleAIScript_82DDDF3
+ if_type_effectiveness AI_EFFECTIVENESS_x0_5, BattleAIScript_82DDDF3
+ if_target_faster BattleAIScript_82DDDEC
+ if_hp_more_than AI_USER, 60, BattleAIScript_82DDDF5
+ goto BattleAIScript_82DDDF3
+
+BattleAIScript_82DDDEC:
+ if_hp_more_than AI_USER, 80, BattleAIScript_82DDDF5
+
+BattleAIScript_82DDDF3:
+ score -1
+
+BattleAIScript_82DDDF5:
+ end
+
+BattleAIScript_82DDDF6:
+ if_hp_less_than AI_USER, 50, BattleAIScript_82DDE19
+ get_target_type1
+ if_equal TYPE_FIRE, BattleAIScript_82DDE12
+ get_target_type2
+ if_equal TYPE_FIRE, BattleAIScript_82DDE12
+ goto BattleAIScript_82DDE19
+
+BattleAIScript_82DDE12:
+ score +1
+ goto BattleAIScript_82DDE1B
+
+BattleAIScript_82DDE19:
+ score -1
+
+BattleAIScript_82DDE1B:
+ end
+
+BattleAIScript_82DDE1C:
+ if_target_faster BattleAIScript_82DDE36
+ if_hp_more_than AI_USER, 50, BattleAIScript_82DDE3E
+ if_random_less_than 70, BattleAIScript_82DDE3E
+ score -1
+ goto BattleAIScript_82DDE3E
+
+BattleAIScript_82DDE36:
+ if_random_less_than 128, BattleAIScript_82DDE3E
+ score +1
+
+BattleAIScript_82DDE3E:
+ end
+
+AI_CheckViability:
+ if_target_is_ally AI_Ret
+ if_can_faint BattleAIScript_82DDE60
+ get_how_powerful_move_is
+ if_equal 1, Score_Minus1
+ if_type_effectiveness AI_EFFECTIVENESS_x4, BattleAIScript_82DDE57
+ end
+
+BattleAIScript_82DDE57:
+ if_random_less_than 80, BattleAIScript_82DDE70
+ score +2
+ end
+
+BattleAIScript_82DDE60:
+ if_effect EFFECT_EXPLOSION, BattleAIScript_82DDE70
+ if_not_effect EFFECT_QUICK_ATTACK, BattleAIScript_82DDE6E
+ score +2
+
+BattleAIScript_82DDE6E:
+ score +4
+
+BattleAIScript_82DDE70:
+ end
+
+AI_SetupFirstTurn:
+ if_target_is_ally AI_Ret
+ get_turn_count
+ if_not_equal 0, BattleAIScript_82DDE8F
+ get_considered_move_effect
+ if_not_in_bytes sMoveEffectsTable_82DDE90, BattleAIScript_82DDE8F
+ if_random_less_than 80, BattleAIScript_82DDE8F
+ score +2
+
+BattleAIScript_82DDE8F:
+ end
+
+sMoveEffectsTable_82DDE90:
+ .byte EFFECT_ATTACK_UP
+ .byte EFFECT_DEFENSE_UP
+ .byte EFFECT_SPEED_UP
+ .byte EFFECT_SPECIAL_ATTACK_UP
+ .byte EFFECT_SPECIAL_DEFENSE_UP
+ .byte EFFECT_ACCURACY_UP
+ .byte EFFECT_EVASION_UP
+ .byte EFFECT_ATTACK_DOWN
+ .byte EFFECT_DEFENSE_DOWN
+ .byte EFFECT_SPEED_DOWN
+ .byte EFFECT_SPECIAL_ATTACK_DOWN
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN
+ .byte EFFECT_ACCURACY_DOWN
+ .byte EFFECT_EVASION_DOWN
+ .byte EFFECT_CONVERSION
+ .byte EFFECT_LIGHT_SCREEN
+ .byte EFFECT_SPECIAL_DEFENSE_UP_2
+ .byte EFFECT_FOCUS_ENERGY
+ .byte EFFECT_CONFUSE
+ .byte EFFECT_ATTACK_UP_2
+ .byte EFFECT_DEFENSE_UP_2
+ .byte EFFECT_SPEED_UP_2
+ .byte EFFECT_SPECIAL_ATTACK_UP_2
+ .byte EFFECT_SPECIAL_DEFENSE_UP_2
+ .byte EFFECT_ACCURACY_UP_2
+ .byte EFFECT_EVASION_UP_2
+ .byte EFFECT_ATTACK_DOWN_2
+ .byte EFFECT_DEFENSE_DOWN_2
+ .byte EFFECT_SPEED_DOWN_2
+ .byte EFFECT_SPECIAL_ATTACK_DOWN_2
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN_2
+ .byte EFFECT_ACCURACY_DOWN_2
+ .byte EFFECT_EVASION_DOWN_2
+ .byte EFFECT_REFLECT
+ .byte EFFECT_POISON
+ .byte EFFECT_PARALYZE
+ .byte EFFECT_SUBSTITUTE
+ .byte EFFECT_LEECH_SEED
+ .byte EFFECT_MINIMIZE
+ .byte EFFECT_CURSE
+ .byte EFFECT_SWAGGER
+ .byte EFFECT_CAMOUFLAGE
+ .byte EFFECT_YAWN
+ .byte EFFECT_DEFENSE_CURL
+ .byte EFFECT_TORMENT
+ .byte EFFECT_FLATTER
+ .byte EFFECT_WILL_O_WISP
+ .byte EFFECT_INGRAIN
+ .byte EFFECT_IMPRISON
+ .byte EFFECT_TEETER_DANCE
+ .byte EFFECT_TICKLE
+ .byte EFFECT_COSMIC_POWER
+ .byte EFFECT_BULK_UP
+ .byte EFFECT_CALM_MIND
+ .byte EFFECT_CAMOUFLAGE
+ .byte -1
+
+AI_PreferStrongestMove:
+ if_target_is_ally AI_Ret
+ get_how_powerful_move_is
+ if_not_equal 0, BattleAIScript_82DDEDC
+ if_random_less_than 100, BattleAIScript_82DDEDC
+ score +2
+
+BattleAIScript_82DDEDC:
+ end
+
+AI_Risky:
+ if_target_is_ally AI_Ret
+ get_considered_move_effect
+ if_not_in_bytes sMoveEffectsTable_82DDEF5, BattleAIScript_82DDEF4
+ if_random_less_than 128, BattleAIScript_82DDEF4
+ score +2
+
+BattleAIScript_82DDEF4:
+ end
+
+sMoveEffectsTable_82DDEF5:
+ .byte EFFECT_SLEEP
+ .byte EFFECT_EXPLOSION
+ .byte EFFECT_MIRROR_MOVE
+ .byte EFFECT_OHKO
+ .byte EFFECT_HIGH_CRITICAL
+ .byte EFFECT_CONFUSE
+ .byte EFFECT_METRONOME
+ .byte EFFECT_PSYWAVE
+ .byte EFFECT_COUNTER
+ .byte EFFECT_DESTINY_BOND
+ .byte EFFECT_SWAGGER
+ .byte EFFECT_ATTRACT
+ .byte EFFECT_PRESENT
+ .byte EFFECT_ALL_STATS_UP_HIT
+ .byte EFFECT_BELLY_DRUM
+ .byte EFFECT_MIRROR_COAT
+ .byte EFFECT_FOCUS_PUNCH
+ .byte EFFECT_REVENGE
+ .byte EFFECT_TEETER_DANCE
+ .byte -1
+
+AI_PreferBatonPass:
+ if_target_is_ally AI_Ret
+ count_usable_party_mons AI_USER
+ if_equal 0, BattleAIScript_82DDFB3
+ get_how_powerful_move_is
+ if_not_equal 0, BattleAIScript_82DDFB3
+ if_has_move_with_effect AI_USER, EFFECT_BATON_PASS, BattleAIScript_82DDF2A
+ if_random_less_than 80, BattleAIScript_82DDEF4
+
+BattleAIScript_82DDF2A:
+ if_move MOVE_SWORDS_DANCE, BattleAIScript_82DDF54
+ if_move MOVE_DRAGON_DANCE, BattleAIScript_82DDF54
+ if_move MOVE_CALM_MIND, BattleAIScript_82DDF54
+ if_effect EFFECT_PROTECT, BattleAIScript_82DDF67
+ if_move MOVE_BATON_PASS, BattleAIScript_82DDF7B
+ if_random_less_than 20, BattleAIScript_82DDEF4
+ score +3
+
+BattleAIScript_82DDF54:
+ get_turn_count
+ if_equal 0, Score_Plus5
+ if_hp_less_than AI_USER, 60, Score_Minus10
+ goto Score_Plus1
+
+BattleAIScript_82DDF67:
+ get_last_used_bank_move AI_USER
+ if_in_hwords sMovesTable_82DDF75, Score_Minus2
+ score +2
+ end
+
+sMovesTable_82DDF75:
+ .2byte MOVE_PROTECT
+ .2byte MOVE_DETECT
+ .2byte -1
+
+BattleAIScript_82DDF7B:
+ get_turn_count
+ if_equal 0, Score_Minus2
+ if_stat_level_more_than AI_USER, ATK, 8, Score_Plus3
+ if_stat_level_more_than AI_USER, ATK, 7, Score_Plus2
+ if_stat_level_more_than AI_USER, ATK, 6, Score_Plus1
+ if_stat_level_more_than AI_USER, SPATK, 8, Score_Plus3
+ if_stat_level_more_than AI_USER, SPATK, 7, Score_Plus2
+ if_stat_level_more_than AI_USER, SPATK, 6, Score_Plus1
+ end
+
+BattleAIScript_82DDFB3:
+ end
+
+AI_DoubleBattle:
+ if_target_is_ally AI_TryOnAlly
+ if_move MOVE_SKILL_SWAP, BattleAIScript_82DE04B
+ get_curr_move_type
+ if_move MOVE_EARTHQUAKE, BattleAIScript_82DE010
+ if_move MOVE_MAGNITUDE, BattleAIScript_82DE010
+ if_equal 13, BattleAIScript_82DE062
+ if_equal 10, BattleAIScript_82DE079
+ get_ability AI_USER
+ if_not_equal ABILITY_GUTS, BattleAIScript_82DDFF5
+ if_has_move AI_USER_PARTNER, MOVE_HELPING_HAND, BattleAIScript_82DDFED
+ end
+
+BattleAIScript_82DDFED:
+ get_how_powerful_move_is
+ if_not_equal 0, Score_Plus1
+ end
+
+BattleAIScript_82DDFF5:
+ if_status AI_USER, STATUS_ANY, BattleAIScript_82DE000
+ end
+
+BattleAIScript_82DE000:
+ get_how_powerful_move_is
+ if_equal 0, Score_Minus5
+ score +1
+ if_equal 2, Score_Plus2
+ end
+
+BattleAIScript_82DE010:
+ if_ability AI_USER_PARTNER, ABILITY_LEVITATE, Score_Plus2
+ if_type AI_USER_PARTNER, TYPE_FLYING, Score_Plus2
+ if_type AI_USER_PARTNER, TYPE_FIRE, Score_Minus10
+ if_type AI_USER_PARTNER, TYPE_ELECTRIC, Score_Minus10
+ if_type AI_USER_PARTNER, TYPE_POISON, Score_Minus10
+ if_type AI_USER_PARTNER, TYPE_ROCK, Score_Minus10
+ goto Score_Minus3
+
+BattleAIScript_82DE04B:
+ get_ability AI_USER
+ if_equal ABILITY_TRUANT, Score_Plus5
+ get_ability AI_TARGET
+ if_equal ABILITY_SHADOW_TAG, Score_Plus2
+ if_equal ABILITY_PURE_POWER, Score_Plus2
+ end
+
+BattleAIScript_82DE062:
+ if_no_ability AI_TARGET_PARTNER, ABILITY_LIGHTNING_ROD, BattleAIScript_82DE078
+ score -2
+ if_no_type AI_TARGET_PARTNER, TYPE_GROUND, BattleAIScript_82DE078
+ score -8
+
+BattleAIScript_82DE078:
+ end
+
+BattleAIScript_82DE079:
+ if_flash_fired AI_USER, BattleAIScript_82DE080
+ end
+
+BattleAIScript_82DE080:
+ goto Score_Plus1
+
+AI_TryOnAlly:
+ get_how_powerful_move_is
+ if_equal 0, BattleAIScript_82DE0B2
+ get_curr_move_type
+ if_equal TYPE_FIRE, BattleAIScript_82DE099
+
+AI_DiscourageOnAlly:
+ goto Score_Minus30
+
+BattleAIScript_82DE099:
+ if_ability AI_USER_PARTNER, ABILITY_FLASH_FIRE, BattleAIScript_82DE0A7
+ goto AI_DiscourageOnAlly
+
+BattleAIScript_82DE0A7:
+ if_flash_fired AI_USER_PARTNER, AI_DiscourageOnAlly
+ goto Score_Plus3
+
+BattleAIScript_82DE0B2:
+ if_move MOVE_SKILL_SWAP, BattleAIScript_82DE0DA
+ if_move MOVE_WILL_O_WISP, BattleAIScript_82DE14F
+ if_move MOVE_TOXIC, BattleAIScript_82DE14F
+ if_move MOVE_HELPING_HAND, BattleAIScript_82DE16D
+ if_move MOVE_SWAGGER, BattleAIScript_82DE178
+ goto Score_Minus30_
+
+BattleAIScript_82DE0DA:
+ get_ability AI_TARGET
+ if_equal ABILITY_TRUANT, Score_Plus10
+ get_ability AI_USER
+ if_not_equal ABILITY_LEVITATE, BattleAIScript_82DE107
+ get_ability AI_TARGET
+ if_equal ABILITY_LEVITATE, Score_Minus30_
+ get_target_type1
+ if_not_equal TYPE_ELECTRIC, BattleAIScript_82DE107
+ score +1
+ get_target_type2
+ if_not_equal TYPE_ELECTRIC, BattleAIScript_82DE107
+ score +1
+ end
+
+BattleAIScript_82DE107:
+ if_not_equal 14, Score_Minus30_
+ if_has_move AI_USER_PARTNER, MOVE_FIRE_BLAST, BattleAIScript_82DE14A
+ if_has_move AI_USER_PARTNER, MOVE_THUNDER, BattleAIScript_82DE14A
+ if_has_move AI_USER_PARTNER, MOVE_CROSS_CHOP, BattleAIScript_82DE14A
+ if_has_move AI_USER_PARTNER, MOVE_HYDRO_PUMP, BattleAIScript_82DE14A
+ if_has_move AI_USER_PARTNER, MOVE_DYNAMIC_PUNCH, BattleAIScript_82DE14A
+ if_has_move AI_USER_PARTNER, MOVE_BLIZZARD, BattleAIScript_82DE14A
+ if_has_move AI_USER_PARTNER, MOVE_MEGAHORN, BattleAIScript_82DE14A
+ goto Score_Minus30_
+
+BattleAIScript_82DE14A:
+ goto Score_Plus3
+
+BattleAIScript_82DE14F:
+ get_ability AI_TARGET
+ if_not_equal ABILITY_GUTS, Score_Minus30_
+ if_status AI_TARGET, STATUS_ANY, Score_Minus30_
+ if_hp_less_than AI_USER, 91, Score_Minus30_
+ goto Score_Plus5
+
+BattleAIScript_82DE16D:
+ if_random_less_than 64, Score_Minus1
+ goto Score_Plus2
+
+BattleAIScript_82DE178:
+ if_holds_item AI_TARGET, ITEM_PERSIM_BERRY, BattleAIScript_82DE185
+ goto Score_Minus30_
+
+BattleAIScript_82DE185:
+ if_stat_level_more_than AI_TARGET, ATK, 7, BattleAIScript_82DE18F
+ score +3
+
+BattleAIScript_82DE18F:
+ end
+
+Score_Minus30_:
+ score -30
+ end
+
+AI_HPAware:
+ if_target_is_ally AI_TryOnAlly
+ if_hp_more_than AI_USER, 70, BattleAIScript_82DE1B5
+ if_hp_more_than AI_USER, 30, BattleAIScript_82DE1C4
+ get_considered_move_effect
+ if_in_bytes sMoveEffectsTable_82DE258, BattleAIScript_82DE1D3
+ goto BattleAIScript_82DE1DB
+
+BattleAIScript_82DE1B5:
+ get_considered_move_effect
+ if_in_bytes sMoveEffectsTable_82DE21F, BattleAIScript_82DE1D3
+ goto BattleAIScript_82DE1DB
+
+BattleAIScript_82DE1C4:
+ get_considered_move_effect
+ if_in_bytes sMoveEffectsTable_82DE22D, BattleAIScript_82DE1D3
+ goto BattleAIScript_82DE1DB
+
+BattleAIScript_82DE1D3:
+ if_random_less_than 50, BattleAIScript_82DE1DB
+ score -2
+
+BattleAIScript_82DE1DB:
+ if_hp_more_than AI_TARGET, 70, BattleAIScript_82DE1F8
+ if_hp_more_than AI_TARGET, 30, BattleAIScript_82DE207
+ get_considered_move_effect
+ if_in_bytes sMoveEffectsTable_82DE2B1, BattleAIScript_82DE216
+ goto BattleAIScript_82DE21E
+
+BattleAIScript_82DE1F8:
+ get_considered_move_effect
+ if_in_bytes sMoveEffectsTable_82DE288, BattleAIScript_82DE216
+ goto BattleAIScript_82DE21E
+
+BattleAIScript_82DE207:
+ get_considered_move_effect
+ if_in_bytes sMoveEffectsTable_82DE289, BattleAIScript_82DE216
+ goto BattleAIScript_82DE21E
+
+BattleAIScript_82DE216:
+ if_random_less_than 50, BattleAIScript_82DE21E
+ score -2
+
+BattleAIScript_82DE21E:
+ end
+
+sMoveEffectsTable_82DE21F:
+ .byte EFFECT_EXPLOSION
+ .byte EFFECT_RESTORE_HP
+ .byte EFFECT_REST
+ .byte EFFECT_DESTINY_BOND
+ .byte EFFECT_FLAIL
+ .byte EFFECT_ENDURE
+ .byte EFFECT_MORNING_SUN
+ .byte EFFECT_SYNTHESIS
+ .byte EFFECT_MOONLIGHT
+ .byte EFFECT_SOFTBOILED
+ .byte EFFECT_MEMENTO
+ .byte EFFECT_GRUDGE
+ .byte EFFECT_OVERHEAT
+ .byte -1
+
+sMoveEffectsTable_82DE22D:
+ .byte EFFECT_EXPLOSION
+ .byte EFFECT_ATTACK_UP
+ .byte EFFECT_DEFENSE_UP
+ .byte EFFECT_SPEED_UP
+ .byte EFFECT_SPECIAL_ATTACK_UP
+ .byte EFFECT_SPECIAL_DEFENSE_UP
+ .byte EFFECT_ACCURACY_UP
+ .byte EFFECT_EVASION_UP
+ .byte EFFECT_ATTACK_DOWN
+ .byte EFFECT_DEFENSE_DOWN
+ .byte EFFECT_SPEED_DOWN
+ .byte EFFECT_SPECIAL_ATTACK_DOWN
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN
+ .byte EFFECT_ACCURACY_DOWN
+ .byte EFFECT_EVASION_DOWN
+ .byte EFFECT_BIDE
+ .byte EFFECT_CONVERSION
+ .byte EFFECT_LIGHT_SCREEN
+ .byte EFFECT_MIST
+ .byte EFFECT_FOCUS_ENERGY
+ .byte EFFECT_ATTACK_UP_2
+ .byte EFFECT_DEFENSE_UP_2
+ .byte EFFECT_SPEED_UP_2
+ .byte EFFECT_SPECIAL_ATTACK_UP_2
+ .byte EFFECT_SPECIAL_DEFENSE_UP_2
+ .byte EFFECT_ACCURACY_UP_2
+ .byte EFFECT_EVASION_UP_2
+ .byte EFFECT_ATTACK_DOWN_2
+ .byte EFFECT_DEFENSE_DOWN_2
+ .byte EFFECT_SPEED_DOWN_2
+ .byte EFFECT_SPECIAL_ATTACK_DOWN_2
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN_2
+ .byte EFFECT_ACCURACY_DOWN_2
+ .byte EFFECT_EVASION_DOWN_2
+ .byte EFFECT_CONVERSION_2
+ .byte EFFECT_SAFEGUARD
+ .byte EFFECT_BELLY_DRUM
+ .byte EFFECT_TICKLE
+ .byte EFFECT_COSMIC_POWER
+ .byte EFFECT_BULK_UP
+ .byte EFFECT_CALM_MIND
+ .byte EFFECT_DRAGON_DANCE
+ .byte -1
+
+sMoveEffectsTable_82DE258:
+ .byte EFFECT_ATTACK_UP
+ .byte EFFECT_DEFENSE_UP
+ .byte EFFECT_SPEED_UP
+ .byte EFFECT_SPECIAL_ATTACK_UP
+ .byte EFFECT_SPECIAL_DEFENSE_UP
+ .byte EFFECT_ACCURACY_UP
+ .byte EFFECT_EVASION_UP
+ .byte EFFECT_ATTACK_DOWN
+ .byte EFFECT_DEFENSE_DOWN
+ .byte EFFECT_SPEED_DOWN
+ .byte EFFECT_SPECIAL_ATTACK_DOWN
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN
+ .byte EFFECT_ACCURACY_DOWN
+ .byte EFFECT_EVASION_DOWN
+ .byte EFFECT_BIDE
+ .byte EFFECT_CONVERSION
+ .byte EFFECT_LIGHT_SCREEN
+ .byte EFFECT_MIST
+ .byte EFFECT_FOCUS_ENERGY
+ .byte EFFECT_ATTACK_UP_2
+ .byte EFFECT_DEFENSE_UP_2
+ .byte EFFECT_SPEED_UP_2
+ .byte EFFECT_SPECIAL_ATTACK_UP_2
+ .byte EFFECT_SPECIAL_DEFENSE_UP_2
+ .byte EFFECT_ACCURACY_UP_2
+ .byte EFFECT_EVASION_UP_2
+ .byte EFFECT_ATTACK_DOWN_2
+ .byte EFFECT_DEFENSE_DOWN_2
+ .byte EFFECT_SPEED_DOWN_2
+ .byte EFFECT_SPECIAL_ATTACK_DOWN_2
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN_2
+ .byte EFFECT_ACCURACY_DOWN_2
+ .byte EFFECT_EVASION_DOWN_2
+ .byte EFFECT_RAGE
+ .byte EFFECT_CONVERSION_2
+ .byte EFFECT_LOCK_ON
+ .byte EFFECT_SAFEGUARD
+ .byte EFFECT_BELLY_DRUM
+ .byte EFFECT_PSYCH_UP
+ .byte EFFECT_MIRROR_COAT
+ .byte EFFECT_SOLARBEAM
+ .byte EFFECT_ERUPTION
+ .byte EFFECT_TICKLE
+ .byte EFFECT_COSMIC_POWER
+ .byte EFFECT_BULK_UP
+ .byte EFFECT_CALM_MIND
+ .byte EFFECT_DRAGON_DANCE
+ .byte -1
+
+sMoveEffectsTable_82DE288:
+ .byte -1
+
+sMoveEffectsTable_82DE289:
+ .byte EFFECT_ATTACK_UP
+ .byte EFFECT_DEFENSE_UP
+ .byte EFFECT_SPEED_UP
+ .byte EFFECT_SPECIAL_ATTACK_UP
+ .byte EFFECT_SPECIAL_DEFENSE_UP
+ .byte EFFECT_ACCURACY_UP
+ .byte EFFECT_EVASION_UP
+ .byte EFFECT_ATTACK_DOWN
+ .byte EFFECT_DEFENSE_DOWN
+ .byte EFFECT_SPEED_DOWN
+ .byte EFFECT_SPECIAL_ATTACK_DOWN
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN
+ .byte EFFECT_ACCURACY_DOWN
+ .byte EFFECT_EVASION_DOWN
+ .byte EFFECT_MIST
+ .byte EFFECT_FOCUS_ENERGY
+ .byte EFFECT_ATTACK_UP_2
+ .byte EFFECT_DEFENSE_UP_2
+ .byte EFFECT_SPEED_UP_2
+ .byte EFFECT_SPECIAL_ATTACK_UP_2
+ .byte EFFECT_SPECIAL_DEFENSE_UP_2
+ .byte EFFECT_ACCURACY_UP_2
+ .byte EFFECT_EVASION_UP_2
+ .byte EFFECT_ATTACK_DOWN_2
+ .byte EFFECT_DEFENSE_DOWN_2
+ .byte EFFECT_SPEED_DOWN_2
+ .byte EFFECT_SPECIAL_ATTACK_DOWN_2
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN_2
+ .byte EFFECT_ACCURACY_DOWN_2
+ .byte EFFECT_EVASION_DOWN_2
+ .byte EFFECT_POISON
+ .byte EFFECT_PAIN_SPLIT
+ .byte EFFECT_PERISH_SONG
+ .byte EFFECT_SAFEGUARD
+ .byte EFFECT_TICKLE
+ .byte EFFECT_COSMIC_POWER
+ .byte EFFECT_BULK_UP
+ .byte EFFECT_CALM_MIND
+ .byte EFFECT_DRAGON_DANCE
+ .byte -1
+
+sMoveEffectsTable_82DE2B1:
+ .byte EFFECT_SLEEP
+ .byte EFFECT_EXPLOSION
+ .byte EFFECT_ATTACK_UP
+ .byte EFFECT_DEFENSE_UP
+ .byte EFFECT_SPEED_UP
+ .byte EFFECT_SPECIAL_ATTACK_UP
+ .byte EFFECT_SPECIAL_DEFENSE_UP
+ .byte EFFECT_ACCURACY_UP
+ .byte EFFECT_EVASION_UP
+ .byte EFFECT_ATTACK_DOWN
+ .byte EFFECT_DEFENSE_DOWN
+ .byte EFFECT_SPEED_DOWN
+ .byte EFFECT_SPECIAL_ATTACK_DOWN
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN
+ .byte EFFECT_ACCURACY_DOWN
+ .byte EFFECT_EVASION_DOWN
+ .byte EFFECT_BIDE
+ .byte EFFECT_CONVERSION
+ .byte EFFECT_TOXIC
+ .byte EFFECT_LIGHT_SCREEN
+ .byte EFFECT_OHKO
+ .byte EFFECT_SUPER_FANG
+ .byte EFFECT_SUPER_FANG
+ .byte EFFECT_MIST
+ .byte EFFECT_FOCUS_ENERGY
+ .byte EFFECT_CONFUSE
+ .byte EFFECT_ATTACK_UP_2
+ .byte EFFECT_DEFENSE_UP_2
+ .byte EFFECT_SPEED_UP_2
+ .byte EFFECT_SPECIAL_ATTACK_UP_2
+ .byte EFFECT_SPECIAL_DEFENSE_UP_2
+ .byte EFFECT_ACCURACY_UP_2
+ .byte EFFECT_EVASION_UP_2
+ .byte EFFECT_ATTACK_DOWN_2
+ .byte EFFECT_DEFENSE_DOWN_2
+ .byte EFFECT_SPEED_DOWN_2
+ .byte EFFECT_SPECIAL_ATTACK_DOWN_2
+ .byte EFFECT_SPECIAL_DEFENSE_DOWN_2
+ .byte EFFECT_ACCURACY_DOWN_2
+ .byte EFFECT_EVASION_DOWN_2
+ .byte EFFECT_POISON
+ .byte EFFECT_PARALYZE
+ .byte EFFECT_PAIN_SPLIT
+ .byte EFFECT_CONVERSION_2
+ .byte EFFECT_LOCK_ON
+ .byte EFFECT_SPITE
+ .byte EFFECT_PERISH_SONG
+ .byte EFFECT_SWAGGER
+ .byte EFFECT_FURY_CUTTER
+ .byte EFFECT_ATTRACT
+ .byte EFFECT_SAFEGUARD
+ .byte EFFECT_PSYCH_UP
+ .byte EFFECT_MIRROR_COAT
+ .byte EFFECT_WILL_O_WISP
+ .byte EFFECT_TICKLE
+ .byte EFFECT_COSMIC_POWER
+ .byte EFFECT_BULK_UP
+ .byte EFFECT_CALM_MIND
+ .byte EFFECT_DRAGON_DANCE
+ .byte -1
+
+AI_Unknown:
+ if_target_is_ally AI_TryOnAlly
+ if_not_effect EFFECT_SUNNY_DAY, BattleAIScript_82DE308
+ if_equal 0, BattleAIScript_82DE308
+ is_first_turn_for AI_USER
+ if_equal 0, BattleAIScript_82DE308
+ score +5
+
+BattleAIScript_82DE308:
+ end
+
+AI_Roaming:
+ if_status2 AI_USER, STATUS2_WRAPPED, BattleAIScript_82DE336
+ if_status2 AI_USER, STATUS2_ESCAPE_PREVENTION, BattleAIScript_82DE336
+ get_ability AI_TARGET
+ if_equal ABILITY_SHADOW_TAG, BattleAIScript_82DE336
+ get_ability AI_USER
+ if_equal ABILITY_LEVITATE, BattleAIScript_82DE335
+ get_ability AI_TARGET
+ if_equal ABILITY_ARENA_TRAP, BattleAIScript_82DE336
+
+BattleAIScript_82DE335:
+ flee
+
+BattleAIScript_82DE336:
+ end
+
+AI_Safari:
+ if_random_safari_flee BattleAIScript_82DE33D
+ watch
+
+BattleAIScript_82DE33D:
+ flee
+
+AI_FirstBattle:
+ if_hp_equal AI_TARGET, 20, BattleAIScript_82DE34D
+ if_hp_less_than AI_TARGET, 20, BattleAIScript_82DE34D
+ end
+
+BattleAIScript_82DE34D:
+ flee
+
+AI_Ret:
+ end
diff --git a/data/battle_anim_80A9C70.s b/data/battle_anim_80A9C70.s
index c3768b355..56486b8b7 100644
--- a/data/battle_anim_80A9C70.s
+++ b/data/battle_anim_80A9C70.s
@@ -27,6 +27,9 @@ gUnknown_0853EE34:: @ 853EE34
.align 2
gUnknown_0853EE38:: @ 853EE38
spr_template 0x282b, 0x282b, gUnknown_08524914, gUnknown_0853EE34, NULL, gDummySpriteAffineAnimTable, sub_80A8E30
+
+ .align 2
+gUnknown_0853EE50:: @ 853EE50
spr_template 0x282b, 0x282b, gUnknown_08524914, gUnknown_0853EE34, NULL, gDummySpriteAffineAnimTable, sub_80A8EE4
.align 2
diff --git a/data/battle_anim_80FE840.s b/data/battle_anim_80FE840.s
index 78631ee6e..749db42f8 100644
--- a/data/battle_anim_80FE840.s
+++ b/data/battle_anim_80FE840.s
@@ -16,7 +16,13 @@ gUnknown_08592114:: @ 8592114
.align 2
gUnknown_08592118:: @ 8592118
spr_template 0x2753, 0x2753, gUnknown_08524944, gUnknown_08592114, NULL, gDummySpriteAffineAnimTable, sub_80FE840
+
+ .align 2
+gUnknown_08592130:: @ 8592130
spr_template 0x2754, 0x2754, gUnknown_08524944, gUnknown_08592114, NULL, gDummySpriteAffineAnimTable, sub_80FE840
+
+ .align 2
+gUnknown_08592148:: @ 8592148
spr_template 0x2751, 0x2751, gUnknown_08524944, gUnknown_08592114, NULL, gDummySpriteAffineAnimTable, sub_80FE840
.align 2
diff --git a/data/battle_anim_815A0D4.s b/data/battle_anim_815A0D4.s
index f8ebc0971..1b4cc5af9 100644
--- a/data/battle_anim_815A0D4.s
+++ b/data/battle_anim_815A0D4.s
@@ -18,9 +18,11 @@ gUnknown_085CE020:: @ 85CE020
spr_template 0x2799, 0x2799, gUnknown_08524A34, gUnknown_085CE01C, NULL, gDummySpriteAffineAnimTable, sub_80A77C8
.align 2
+gUnknown_085CE038:: @ 85CE038
spr_template 0x2720, 0x2720, gUnknown_08524934, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815A0D4
.align 2
+gUnknown_085CE050:: @ 85CE050
spr_template 0x2721, 0x2721, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80A78AC
.align 2
@@ -37,9 +39,11 @@ gUnknown_085CE07C:: @ 85CE07C
spr_template 0x27ce, 0x27ce, gUnknown_08524914, gUnknown_085CE078, NULL, gDummySpriteAffineAnimTable, sub_80A77C8
.align 2
+gUnknown_085CE094::
spr_template 0x27cf, 0x27cf, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815A1B0
.align 2
+gUnknown_085CE0AC::
spr_template 0x27cd, 0x27cd, gUnknown_08524974, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815A254
.align 2
@@ -65,6 +69,7 @@ gUnknown_085CE104:: @ 85CE104
spr_template 0x27cb, 0x27cb, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_085CE0FC, sub_815A2F0
.align 2
+gUnknown_085CE11C:: @ 85CE11C
spr_template 0x27a8, 0x27a8, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815A6C4
.align 2
@@ -147,9 +152,11 @@ gUnknown_085CE22C:: @ 85CE22C
spr_template 0x27f3, 0x27f3, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gUnknown_085CE224, sub_815A934
.align 2
+gUnknown_085CE244::
spr_template 0x2807, 0x2807, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815AAA4
.align 2
+gUnknown_085CE25C::
spr_template 0x2807, 0x2807, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815ABD0
.align 2
@@ -319,8 +326,11 @@ gUnknown_085CE58C:: @ 85CE58C
.align 2
gUnknown_085CE590:: @ 85CE590
spr_template 0x27ff, 0x27ff, gUnknown_0852490C, gUnknown_085CE58C, NULL, gDummySpriteAffineAnimTable, sub_815C95C
+gUnknown_085CE5A8::
spr_template 0x2800, 0x2800, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815CB88
+gUnknown_085CE5C0::
spr_template 0x27f3, 0x27f3, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gUnknown_085CE224, sub_815CC94
+gUnknown_085CE5D8::
spr_template 0x27fc, 0x27fc, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815CDB4
.align 2
@@ -410,6 +420,7 @@ gUnknown_085CE7D4:: @ 85CE7D4
.align 2
gUnknown_085CE7EC:: @ 85CE7EC
spr_template 0x2808, 0x2808, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815E404
+gUnknown_085CE804::
spr_template 0x280c, 0x280c, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815E444
.align 2
@@ -429,6 +440,9 @@ gUnknown_085CE844:: @ 85CE844
.align 2
gUnknown_085CE84C:: @ 85CE84C
spr_template 0x280e, 0x280e, gUnknown_08524974, gDummySpriteAnimTable, NULL, gUnknown_085CE844, SpriteCallbackDummy
+
+ .align 2
+gUnknown_085CE864::
spr_template 0x2807, 0x2807, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815E6D8
.align 2
@@ -438,11 +452,17 @@ gUnknown_085CE87C:: @ 85CE87C
.align 2
gUnknown_085CE894:: @ 85CE894
spr_template 0x280f, 0x280f, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815E954
+gUnknown_085CE8AC::
spr_template 0x2807, 0x2807, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815EA14
+gUnknown_085CE8C4::
spr_template 0x2812, 0x2812, gUnknown_08524A34, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815EE84
+gUnknown_085CE8DC::
spr_template 0x27f9, 0x27f9, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815F18C
+gUnknown_085CE8F4::
spr_template 0x27f9, 0x27f9, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81061C4
+gUnknown_085CE90C::
spr_template 0x280a, 0x280a, gUnknown_0852491C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815F48C
+gUnknown_085CE924::
spr_template 0x27f0, 0x27f0, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815FE80
.align 2
diff --git a/data/battle_anim_8170478.s b/data/battle_anim_8170478.s
index e5d599a3c..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
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6ec
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6ed
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6ee
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6ef
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6f0
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6f1
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6f2
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6f3
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6f4
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6f5
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6f6
- obj_tiles gUnknown_08C1A490, 0x0100, 0xd6f7
+ 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
- obj_pal gUnknown_08C1A564, 0xd6ec
- obj_pal gUnknown_08C1A564, 0xd6ed
- obj_pal gUnknown_08C1A564, 0xd6ee
- obj_pal gUnknown_08C1A564, 0xd6ef
- obj_pal gUnknown_08C1A564, 0xd6f0
- obj_pal gUnknown_08C1A564, 0xd6f1
- obj_pal gUnknown_08C1A564, 0xd6f2
- obj_pal gUnknown_08C1A564, 0xd6f3
- obj_pal gUnknown_08C1A564, 0xd6f4
- obj_pal gUnknown_08C1A564, 0xd6f5
- obj_pal gUnknown_08C1A564, 0xd6f6
- obj_pal gUnknown_08C1A564, 0xd6f7
+ 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
@@ -140,6 +140,7 @@ gUnknown_085E5310:: @ 85E5310
.2byte 0x0100, 0x0503, 0x0506, 0x0004
.align 2
+gUnknown_085E5338:: @ 85E5338
spr_template 0x281d, 0x281d, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_817330C
.align 2
diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s
index e97943840..a0c3b39d2 100644
--- a/data/battle_anim_scripts.s
+++ b/data/battle_anim_scripts.s
@@ -1,19 +1,10936 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
+ .include "asm/macros/battle_anim_script.inc"
+ .include "include/constants/battle_anim.h"
+ .include "include/constants/songs.h"
.section script_data, "aw", %progbits
+.align 2
gUnknown_082C8D64:: @ 82C8D64
- .incbin "baserom.gba", 0x2c8d64, 0x8
+ .2byte 0x2F, 0xC3, 0x140, 0xFFFF
+.align 2
gBattleAnims_Moves:: @ 82C8D6C
- .incbin "baserom.gba", 0x2c8d6c, 0x590
+ .4byte Move_NONE
+ .4byte Move_POUND
+ .4byte Move_KARATE_CHOP
+ .4byte Move_DOUBLE_SLAP
+ .4byte Move_COMET_PUNCH
+ .4byte Move_MEGA_PUNCH
+ .4byte Move_PAY_DAY
+ .4byte Move_FIRE_PUNCH
+ .4byte Move_ICE_PUNCH
+ .4byte Move_THUNDER_PUNCH
+ .4byte Move_SCRATCH
+ .4byte Move_VICE_GRIP
+ .4byte Move_GUILLOTINE
+ .4byte Move_RAZOR_WIND
+ .4byte Move_SWORDS_DANCE
+ .4byte Move_CUT
+ .4byte Move_GUST
+ .4byte Move_WING_ATTACK
+ .4byte Move_WHIRLWIND
+ .4byte Move_FLY
+ .4byte Move_BIND
+ .4byte Move_SLAM
+ .4byte Move_VINE_WHIP
+ .4byte Move_STOMP
+ .4byte Move_DOUBLE_KICK
+ .4byte Move_MEGA_KICK
+ .4byte Move_JUMP_KICK
+ .4byte Move_ROLLING_KICK
+ .4byte Move_SAND_ATTACK
+ .4byte Move_HEADBUTT
+ .4byte Move_HORN_ATTACK
+ .4byte Move_FURY_ATTACK
+ .4byte Move_HORN_DRILL
+ .4byte Move_TACKLE
+ .4byte Move_BODY_SLAM
+ .4byte Move_WRAP
+ .4byte Move_TAKE_DOWN
+ .4byte Move_THRASH
+ .4byte Move_DOUBLE_EDGE
+ .4byte Move_TAIL_WHIP
+ .4byte Move_POISON_STING
+ .4byte Move_TWINEEDLE
+ .4byte Move_PIN_MISSILE
+ .4byte Move_LEER
+ .4byte Move_BITE
+ .4byte Move_GROWL
+ .4byte Move_ROAR
+ .4byte Move_SING
+ .4byte Move_SUPERSONIC
+ .4byte Move_SONIC_BOOM
+ .4byte Move_DISABLE
+ .4byte Move_ACID
+ .4byte Move_EMBER
+ .4byte Move_FLAMETHROWER
+ .4byte Move_MIST
+ .4byte Move_WATER_GUN
+ .4byte Move_HYDRO_PUMP
+ .4byte Move_SURF
+ .4byte Move_ICE_BEAM
+ .4byte Move_BLIZZARD
+ .4byte Move_PSYBEAM
+ .4byte Move_BUBBLE_BEAM
+ .4byte Move_AURORA_BEAM
+ .4byte Move_HYPER_BEAM
+ .4byte Move_PECK
+ .4byte Move_DRILL_PECK
+ .4byte Move_SUBMISSION
+ .4byte Move_LOW_KICK
+ .4byte Move_COUNTER
+ .4byte Move_SEISMIC_TOSS
+ .4byte Move_STRENGTH
+ .4byte Move_ABSORB
+ .4byte Move_MEGA_DRAIN
+ .4byte Move_LEECH_SEED
+ .4byte Move_GROWTH
+ .4byte Move_RAZOR_LEAF
+ .4byte Move_SOLAR_BEAM
+ .4byte Move_POISON_POWDER
+ .4byte Move_STUN_SPORE
+ .4byte Move_SLEEP_POWDER
+ .4byte Move_PETAL_DANCE
+ .4byte Move_STRING_SHOT
+ .4byte Move_DRAGON_RAGE
+ .4byte Move_FIRE_SPIN
+ .4byte Move_THUNDER_SHOCK
+ .4byte Move_THUNDERBOLT
+ .4byte Move_THUNDER_WAVE
+ .4byte Move_THUNDER
+ .4byte Move_ROCK_THROW
+ .4byte Move_EARTHQUAKE
+ .4byte Move_FISSURE
+ .4byte Move_DIG
+ .4byte Move_TOXIC
+ .4byte Move_CONFUSION
+ .4byte Move_PSYCHIC
+ .4byte Move_HYPNOSIS
+ .4byte Move_MEDITATE
+ .4byte Move_AGILITY
+ .4byte Move_QUICK_ATTACK
+ .4byte Move_RAGE
+ .4byte Move_TELEPORT
+ .4byte Move_NIGHT_SHADE
+ .4byte Move_MIMIC
+ .4byte Move_SCREECH
+ .4byte Move_DOUBLE_TEAM
+ .4byte Move_RECOVER
+ .4byte Move_HARDEN
+ .4byte Move_MINIMIZE
+ .4byte Move_SMOKESCREEN
+ .4byte Move_CONFUSE_RAY
+ .4byte Move_WITHDRAW
+ .4byte Move_DEFENSE_CURL
+ .4byte Move_BARRIER
+ .4byte Move_LIGHT_SCREEN
+ .4byte Move_HAZE
+ .4byte Move_REFLECT
+ .4byte Move_FOCUS_ENERGY
+ .4byte Move_BIDE
+ .4byte Move_METRONOME
+ .4byte Move_MIRROR_MOVE @ doesn't have an actual animation
+ .4byte Move_SELF_DESTRUCT
+ .4byte Move_EGG_BOMB
+ .4byte Move_LICK
+ .4byte Move_SMOG
+ .4byte Move_SLUDGE
+ .4byte Move_BONE_CLUB
+ .4byte Move_FIRE_BLAST
+ .4byte Move_WATERFALL
+ .4byte Move_CLAMP
+ .4byte Move_SWIFT
+ .4byte Move_SKULL_BASH
+ .4byte Move_SPIKE_CANNON
+ .4byte Move_CONSTRICT
+ .4byte Move_AMNESIA
+ .4byte Move_KINESIS
+ .4byte Move_SOFT_BOILED
+ .4byte Move_HI_JUMP_KICK
+ .4byte Move_GLARE
+ .4byte Move_DREAM_EATER
+ .4byte Move_POISON_GAS
+ .4byte Move_BARRAGE
+ .4byte Move_LEECH_LIFE
+ .4byte Move_LOVELY_KISS
+ .4byte Move_SKY_ATTACK
+ .4byte Move_TRANSFORM
+ .4byte Move_BUBBLE
+ .4byte Move_DIZZY_PUNCH
+ .4byte Move_SPORE
+ .4byte Move_FLASH
+ .4byte Move_PSYWAVE
+ .4byte Move_SPLASH
+ .4byte Move_ACID_ARMOR
+ .4byte Move_CRABHAMMER
+ .4byte Move_EXPLOSION
+ .4byte Move_FURY_SWIPES
+ .4byte Move_BONEMERANG
+ .4byte Move_REST
+ .4byte Move_ROCK_SLIDE
+ .4byte Move_HYPER_FANG
+ .4byte Move_SHARPEN
+ .4byte Move_CONVERSION
+ .4byte Move_TRI_ATTACK
+ .4byte Move_SUPER_FANG
+ .4byte Move_SLASH
+ .4byte Move_SUBSTITUTE
+ .4byte Move_STRUGGLE
+ .4byte Move_SKETCH
+ .4byte Move_TRIPLE_KICK
+ .4byte Move_THIEF
+ .4byte Move_SPIDER_WEB
+ .4byte Move_MIND_READER
+ .4byte Move_NIGHTMARE
+ .4byte Move_FLAME_WHEEL
+ .4byte Move_SNORE
+ .4byte Move_CURSE
+ .4byte Move_FLAIL
+ .4byte Move_CONVERSION_2
+ .4byte Move_AEROBLAST
+ .4byte Move_COTTON_SPORE
+ .4byte Move_REVERSAL
+ .4byte Move_SPITE
+ .4byte Move_POWDER_SNOW
+ .4byte Move_PROTECT
+ .4byte Move_MACH_PUNCH
+ .4byte Move_SCARY_FACE
+ .4byte Move_FAINT_ATTACK
+ .4byte Move_SWEET_KISS
+ .4byte Move_BELLY_DRUM
+ .4byte Move_SLUDGE_BOMB
+ .4byte Move_MUD_SLAP
+ .4byte Move_OCTAZOOKA
+ .4byte Move_SPIKES
+ .4byte Move_ZAP_CANNON
+ .4byte Move_FORESIGHT
+ .4byte Move_DESTINY_BOND
+ .4byte Move_PERISH_SONG
+ .4byte Move_ICY_WIND
+ .4byte Move_DETECT
+ .4byte Move_BONE_RUSH
+ .4byte Move_LOCK_ON
+ .4byte Move_OUTRAGE
+ .4byte Move_SANDSTORM
+ .4byte Move_GIGA_DRAIN
+ .4byte Move_ENDURE
+ .4byte Move_CHARM
+ .4byte Move_ROLLOUT
+ .4byte Move_FALSE_SWIPE
+ .4byte Move_SWAGGER
+ .4byte Move_MILK_DRINK
+ .4byte Move_SPARK
+ .4byte Move_FURY_CUTTER
+ .4byte Move_STEEL_WING
+ .4byte Move_MEAN_LOOK
+ .4byte Move_ATTRACT
+ .4byte Move_SLEEP_TALK
+ .4byte Move_HEAL_BELL
+ .4byte Move_RETURN
+ .4byte Move_PRESENT
+ .4byte Move_FRUSTRATION
+ .4byte Move_SAFEGUARD
+ .4byte Move_PAIN_SPLIT
+ .4byte Move_SACRED_FIRE
+ .4byte Move_MAGNITUDE
+ .4byte Move_DYNAMIC_PUNCH
+ .4byte Move_MEGAHORN
+ .4byte Move_DRAGON_BREATH
+ .4byte Move_BATON_PASS
+ .4byte Move_ENCORE
+ .4byte Move_PURSUIT
+ .4byte Move_RAPID_SPIN
+ .4byte Move_SWEET_SCENT
+ .4byte Move_IRON_TAIL
+ .4byte Move_METAL_CLAW
+ .4byte Move_VITAL_THROW
+ .4byte Move_MORNING_SUN
+ .4byte Move_SYNTHESIS
+ .4byte Move_MOONLIGHT
+ .4byte Move_HIDDEN_POWER
+ .4byte Move_CROSS_CHOP
+ .4byte Move_TWISTER
+ .4byte Move_RAIN_DANCE
+ .4byte Move_SUNNY_DAY
+ .4byte Move_CRUNCH
+ .4byte Move_MIRROR_COAT
+ .4byte Move_PSYCH_UP
+ .4byte Move_EXTREME_SPEED
+ .4byte Move_ANCIENT_POWER
+ .4byte Move_SHADOW_BALL
+ .4byte Move_FUTURE_SIGHT
+ .4byte Move_ROCK_SMASH
+ .4byte Move_WHIRLPOOL
+ .4byte Move_BEAT_UP
+ .4byte Move_FAKE_OUT
+ .4byte Move_UPROAR
+ .4byte Move_STOCKPILE
+ .4byte Move_SPIT_UP
+ .4byte Move_SWALLOW
+ .4byte Move_HEAT_WAVE
+ .4byte Move_HAIL
+ .4byte Move_TORMENT
+ .4byte Move_FLATTER
+ .4byte Move_WILL_O_WISP
+ .4byte Move_MEMENTO
+ .4byte Move_FACADE
+ .4byte Move_FOCUS_PUNCH
+ .4byte Move_SMELLING_SALT
+ .4byte Move_FOLLOW_ME
+ .4byte Move_NATURE_POWER @ doesnt have an actual animation
+ .4byte Move_CHARGE
+ .4byte Move_TAUNT
+ .4byte Move_HELPING_HAND
+ .4byte Move_TRICK
+ .4byte Move_ROLE_PLAY
+ .4byte Move_WISH
+ .4byte Move_ASSIST
+ .4byte Move_INGRAIN
+ .4byte Move_SUPERPOWER
+ .4byte Move_MAGIC_COAT
+ .4byte Move_RECYCLE
+ .4byte Move_REVENGE
+ .4byte Move_BRICK_BREAK
+ .4byte Move_YAWN
+ .4byte Move_KNOCK_OFF
+ .4byte Move_ENDEAVOR
+ .4byte Move_ERUPTION
+ .4byte Move_SKILL_SWAP
+ .4byte Move_IMPRISON
+ .4byte Move_REFRESH
+ .4byte Move_GRUDGE
+ .4byte Move_SNATCH
+ .4byte Move_SECRET_POWER
+ .4byte Move_DIVE
+ .4byte Move_ARM_THRUST
+ .4byte Move_CAMOUFLAGE
+ .4byte Move_TAIL_GLOW
+ .4byte Move_LUSTER_PURGE
+ .4byte Move_MIST_BALL
+ .4byte Move_FEATHER_DANCE
+ .4byte Move_TEETER_DANCE
+ .4byte Move_BLAZE_KICK
+ .4byte Move_MUD_SPORT
+ .4byte Move_ICE_BALL
+ .4byte Move_NEEDLE_ARM
+ .4byte Move_SLACK_OFF
+ .4byte Move_HYPER_VOICE
+ .4byte Move_POISON_FANG
+ .4byte Move_CRUSH_CLAW
+ .4byte Move_BLAST_BURN
+ .4byte Move_HYDRO_CANNON
+ .4byte Move_METEOR_MASH
+ .4byte Move_ASTONISH
+ .4byte Move_WEATHER_BALL
+ .4byte Move_AROMATHERAPY
+ .4byte Move_FAKE_TEARS
+ .4byte Move_AIR_CUTTER
+ .4byte Move_OVERHEAT
+ .4byte Move_ODOR_SLEUTH
+ .4byte Move_ROCK_TOMB
+ .4byte Move_SILVER_WIND
+ .4byte Move_METAL_SOUND
+ .4byte Move_GRASS_WHISTLE
+ .4byte Move_TICKLE
+ .4byte Move_COSMIC_POWER
+ .4byte Move_WATER_SPOUT
+ .4byte Move_SIGNAL_BEAM
+ .4byte Move_SHADOW_PUNCH
+ .4byte Move_EXTRASENSORY
+ .4byte Move_SKY_UPPERCUT
+ .4byte Move_SAND_TOMB
+ .4byte Move_SHEER_COLD
+ .4byte Move_MUDDY_WATER
+ .4byte Move_BULLET_SEED
+ .4byte Move_AERIAL_ACE
+ .4byte Move_ICICLE_SPEAR
+ .4byte Move_IRON_DEFENSE
+ .4byte Move_BLOCK
+ .4byte Move_HOWL
+ .4byte Move_DRAGON_CLAW
+ .4byte Move_FRENZY_PLANT
+ .4byte Move_BULK_UP
+ .4byte Move_BOUNCE
+ .4byte Move_MUD_SHOT
+ .4byte Move_POISON_TAIL
+ .4byte Move_COVET
+ .4byte Move_VOLT_TACKLE
+ .4byte Move_MAGICAL_LEAF
+ .4byte Move_WATER_SPORT
+ .4byte Move_CALM_MIND
+ .4byte Move_LEAF_BLADE
+ .4byte Move_DRAGON_DANCE
+ .4byte Move_ROCK_BLAST
+ .4byte Move_SHOCK_WAVE
+ .4byte Move_WATER_PULSE
+ .4byte Move_DOOM_DESIRE
+ .4byte Move_PSYCHO_BOOST
+ .4byte Move_COUNT @ cannot be reached, because last move is Psycho Boost
-gUnknown_082C92FC:: @ 82C92FC
- .incbin "baserom.gba", 0x2c92fc, 0x24
+.align 2
+gBattleAnims_Statuses:: @ 82C92FC
+ .4byte Status_Poison
+ .4byte Status_Confusion
+ .4byte Status_Burn
+ .4byte Status_Infatuation
+ .4byte Status_Sleep
+ .4byte Status_Paralysis
+ .4byte Status_Freeze
+ .4byte Status_Curse
+ .4byte Status_Nightmare
-gUnknown_082C9320:: @ 82C9320
- .incbin "baserom.gba", 0x2c9320, 0x5c
+.align 2
+gBattleAnims_VariousTable:: @ 82C9320
+ .4byte Anim_CastformTransform
+ .4byte Anim_StatChange
+ .4byte Anim_SubsituteOff
+ .4byte Anim_SubsituteOn
+ .4byte Anim_Table_4
+ .4byte Anim_ItemKnockOff
+ .4byte Status_Wrap
+ .4byte Anim_ItemEffect
+ .4byte Anim_SmokeBallEscape
+ .4byte Anim_HangedOn
+ .4byte Anim_Rain
+ .4byte Anim_Sun
+ .4byte Anim_Sandstorm
+ .4byte Anim_Hail
+ .4byte Status_LeechSeed
+ .4byte Anim_Hit
+ .4byte Anim_ItemSteal
+ .4byte Anim_SnatchMove
+ .4byte Anim_FutureSightHit
+ .4byte Anim_DoomDesireHit
+ .4byte Anim_Table_x14
+ .4byte Status_Ingrain
+ .4byte Anim_WishHeal
-gUnknown_082C937C:: @ 82C937C
- .incbin "baserom.gba", 0x2c937c, 0xf32c
+.align 2
+gBattleAnims_Special:: @ 82C937C
+ .4byte Anim_LevelUp
+ .4byte Anim_SwitchOutPlayer
+ .4byte Anim_SwitchOutOpponent
+ .4byte Anim_BallThrow
+ .4byte Anim_SafariBallThrow
+ .4byte Anim_SubstituteToMon
+ .4byte Anim_MonToSubstitute
+
+Move_NONE:
+Move_MIRROR_MOVE:
+Move_POUND:
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W003, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_DOUBLE_SLAP:
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ choosetwoturnanim AnimScript_82C93F4, AnimScript_82C9408
+
+AnimScript_82C93DA:
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W003, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+AnimScript_82C93F4:
+ createsprite gUnknown_08597358, 0x2, -8, 0, 1, 2
+ goto AnimScript_82C93DA
+
+AnimScript_82C9408:
+ createsprite gUnknown_08597358, 0x2, 8, 0, 1, 2
+ goto AnimScript_82C93DA
+
+Move_POISON_POWDER:
+ loadspritegfx 0x2751
+ loadspritegfx 0x27A6
+ loopsewithpan SE_W077, +63, 0xA, 0x6
+ createsprite gUnknown_08592148, 0x82, -30, -22, 117, 80, 5, 1
+ createsprite gUnknown_08592148, 0x82, 10, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592148, 0x82, -25, -22, 117, 112, 5, 3
+ delay 0xF
+ createsprite gUnknown_08592148, 0x82, -5, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592148, 0x82, 5, -22, 117, 96, 5, 1
+ createsprite gUnknown_08592148, 0x82, 0, -22, 117, 69, -5, 1
+ createsprite gUnknown_08592148, 0x82, -15, -22, 117, 112, 5, 2
+ delay 0x1E
+ createsprite gUnknown_08592148, 0x82, -15, -22, 117, 112, 5, 2
+ createsprite gUnknown_08592148, 0x82, 15, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592148, 0x82, -10, -22, 117, 96, 7, 2
+ createsprite gUnknown_08592148, 0x82, -5, -22, 117, 90, -8, 0
+ delay 0x14
+ createsprite gUnknown_08592148, 0x82, -10, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592148, 0x82, 0, -22, 117, 89, 5, 2
+ createsprite gUnknown_08592148, 0x82, 20, -22, 117, 112, -8, 2
+ createsprite gUnknown_08592148, 0x82, 5, -22, 117, 80, 5, 1
+ waitforvisualfinish
+ end
+
+Move_STUN_SPORE:
+ loadspritegfx 0x2754
+ loopsewithpan SE_W077, +63, 0xA, 0x6
+ createsprite gUnknown_08592130, 0x82, -30, -22, 117, 80, 5, 1
+ createsprite gUnknown_08592130, 0x82, 10, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592130, 0x82, -25, -22, 117, 112, 5, 3
+ delay 0xF
+ createsprite gUnknown_08592130, 0x82, -5, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592130, 0x82, 5, -22, 117, 96, 5, 1
+ createsprite gUnknown_08592130, 0x82, 0, -22, 117, 69, -5, 1
+ createsprite gUnknown_08592130, 0x82, -15, -22, 117, 112, 5, 2
+ delay 0x1E
+ createsprite gUnknown_08592130, 0x82, -15, -22, 117, 112, 5, 2
+ createsprite gUnknown_08592130, 0x82, 15, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592130, 0x82, -10, -22, 117, 96, 7, 2
+ createsprite gUnknown_08592130, 0x82, -5, -22, 117, 90, -8, 0
+ delay 0x14
+ createsprite gUnknown_08592130, 0x82, -10, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592130, 0x82, 0, -22, 117, 89, 5, 2
+ createsprite gUnknown_08592130, 0x82, 20, -22, 117, 112, -8, 2
+ createsprite gUnknown_08592130, 0x82, 5, -22, 117, 80, 5, 1
+ waitforvisualfinish
+ end
+
+Move_SLEEP_POWDER:
+ loadspritegfx 0x2753
+ loopsewithpan SE_W077, +63, 0xA, 0x6
+ createsprite gUnknown_08592118, 0x82, -30, -22, 117, 80, 5, 1
+ createsprite gUnknown_08592118, 0x82, 10, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592118, 0x82, -25, -22, 117, 112, 5, 3
+ delay 0xF
+ createsprite gUnknown_08592118, 0x82, -5, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592118, 0x82, 5, -22, 117, 96, 5, 1
+ createsprite gUnknown_08592118, 0x82, 0, -22, 117, 69, -5, 1
+ createsprite gUnknown_08592118, 0x82, -15, -22, 117, 112, 5, 2
+ delay 0x1E
+ createsprite gUnknown_08592118, 0x82, -15, -22, 117, 112, 5, 2
+ createsprite gUnknown_08592118, 0x82, 15, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592118, 0x82, -10, -22, 117, 96, 7, 2
+ createsprite gUnknown_08592118, 0x82, -5, -22, 117, 90, -8, 0
+ delay 0x14
+ createsprite gUnknown_08592118, 0x82, -10, -22, 117, 80, -5, 1
+ createsprite gUnknown_08592118, 0x82, 0, -22, 117, 89, 5, 2
+ createsprite gUnknown_08592118, 0x82, 20, -22, 117, 112, -8, 2
+ createsprite gUnknown_08592118, 0x82, 5, -22, 117, 80, 5, 1
+ waitforvisualfinish
+ end
+
+Move_SWIFT:
+ loadspritegfx 0x27BE
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_08592404, 0x83, 20, -10, 20, 0, 22, 20, 1
+ delay 0x5
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_08592404, 0x83, 20, -10, 20, 5, 22, -18, 1
+ delay 0x5
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_08592404, 0x83, 20, -10, 20, -10, 22, 15, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 18, 1
+ createvisualtask sub_80D52D0, 0x2, 3, 2, 0, 18, 1
+ delay 0x5
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_08592404, 0x83, 20, -10, 20, 0, 22, -20, 1
+ delay 0x5
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_08592404, 0x83, 20, -10, 20, 0, 22, 12, 1
+ delay 0x5
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_STRENGTH:
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W036, -64
+ createvisualtask sub_80D5644, 0x5, 0, 2, 0, 96, 30
+ waitforvisualfinish
+ delay 0xA
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 4
+ createvisualtask sub_80D5830, 0x2, 1, 18, 6, 2, 4
+ delay 0x4
+ playsewithpan SE_W025B, +63
+ createsprite gUnknown_08597358, 0x3, 16, 12, 1, 1
+ delay 0x4
+ playsewithpan SE_W025B, +63
+ createsprite gUnknown_08597358, 0x3, -16, -12, 1, 1
+ delay 0x4
+ playsewithpan SE_W025B, +63
+ createsprite gUnknown_08597358, 0x3, 3, 4, 1, 1
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_TACKLE:
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_0857FE28, 0x2, 4, 4
+ delay 0x6
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W004, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_BODY_SLAM:
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W036, -64
+ createsprite gUnknown_0857FE40, 0x2, 6, 1, 0
+ waitforvisualfinish
+ delay 0xB
+ createsprite gUnknown_0857FE70, 0x2, 0, 26, 0, 0, 5
+ delay 0x6
+ createsprite gUnknown_08597358, 0x4, -10, 0, 1, 0
+ loopsewithpan SE_W025B, +63, 0xA, 0x2
+ delay 0x1
+ createsprite gUnknown_0857FE70, 0x2, 1, -28, 0, 0, 3
+ waitforvisualfinish
+ createvisualtask sub_80D5484, 0x2, 1, 4, 0, 12, 1
+ waitforvisualfinish
+ delay 0xA
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 6
+ delay 0x5
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 6
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_SUPERSONIC:
+ loadspritegfx 0x27B3
+ monbg ANIM_ATK_PARTNER
+ monbgprio_2A ANIM_ATTACKER
+ setalpha 0x80C
+ createvisualtask sub_80D52D0, 0x2, 0, 2, 0, 8, 1
+ call AnimScript_82C99FF
+ call AnimScript_82C99FF
+ call AnimScript_82C99FF
+ call AnimScript_82C99FF
+ call AnimScript_82C99FF
+ call AnimScript_82C99FF
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ end
+
+AnimScript_82C99FF:
+ playsewithpan SE_W048, -64
+ createsprite gUnknown_08593428, 0x82, 16, 0, 0, 0, 30, 0
+ delay 0x2
+ return
+
+Move_SCREECH:
+ loadspritegfx 0x27B4
+ createvisualtask sub_80D52D0, 0x2, 0, 3, 0, 2, 1
+ call AnimScript_82C9A4C
+ call AnimScript_82C9A4C
+ delay 0x10
+ createvisualtask sub_80D5EB8, 0x5, 0, 6, 2048, 2, 1
+ waitforvisualfinish
+ end
+
+AnimScript_82C9A4C:
+ playsewithpan SE_W103, -64
+ createsprite gUnknown_08593440, 0x82, 16, 0, 0, 0, 30, 0
+ delay 0x2
+ return
+
+Move_FLAME_WHEEL:
+ loadspritegfx 0x272D
+ monbg ANIM_DEF_PARTNER
+ monbgprio_2A ANIM_TARGET
+ createsprite gUnknown_08595584, 0x3, 0, 0, 56, 0
+ playsewithpan SE_W172, -64
+ delay 0x2
+ createsprite gUnknown_08595584, 0x3, 0, 0, 56, 4
+ playsewithpan SE_W172, -64
+ delay 0x2
+ createsprite gUnknown_08595584, 0x3, 0, 0, 56, 8
+ playsewithpan SE_W172, -64
+ delay 0x2
+ createsprite gUnknown_08595584, 0x3, 0, 0, 56, 12
+ playsewithpan SE_W172, -64
+ delay 0x2
+ createsprite gUnknown_08595584, 0x3, 0, 0, 56, 16
+ playsewithpan SE_W172, -64
+ delay 0x2
+ createsprite gUnknown_08595584, 0x3, 0, 0, 56, 20
+ playsewithpan SE_W172, -64
+ delay 0x2
+ createsprite gUnknown_08595584, 0x3, 0, 0, 56, 24
+ playsewithpan SE_W172, -64
+ waitforvisualfinish
+ createsprite gUnknown_0857FE70, 0x2, 0, 24, 0, 0, 6
+ delay 0x4
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 8, 1
+ createvisualtask sub_80A7B98, 0x3, 1, 31, 12, 1, 1
+ playsewithpan SE_W172B, +63
+ call AnimScript_82D2D18
+ delay 0x7
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 9
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+AnimScript_82C9B50:
+ createsprite gUnknown_08595584, 0x3, 0, 0, 50
+ delay 0x4
+ return
+
+Move_PIN_MISSILE:
+ loadspritegfx 0x27B1
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W026, -64
+ createsprite gUnknown_08596A5C, 0x2, 20, -8, -8, -8, 20, -32
+ delay 0xF
+ createsprite gUnknown_08596A5C, 0x2, 20, -8, 8, 8, 20, -40
+ delay 0x4
+ playsewithpan SE_W030, +63
+ createsprite gUnknown_08597358, 0x3, -8, -8, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 2, 1
+ delay 0x9
+ createsprite gUnknown_08596A5C, 0x2, 20, -8, 0, 0, 20, -32
+ delay 0x4
+ playsewithpan SE_W030, +63
+ createsprite gUnknown_08597358, 0x3, 8, 8, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 2, 1
+ delay 0xE
+ playsewithpan SE_W030, +63
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 2, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_ICICLE_SPEAR:
+ loadspritegfx 0x2816
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W196, -64
+ createsprite gUnknown_08596A74, 0x2, 20, -8, -8, -8, 20, -32
+ delay 0xF
+ createsprite gUnknown_08596A74, 0x2, 20, -8, 8, 8, 20, -40
+ delay 0x4
+ playsewithpan SE_W030, +63
+ createsprite gUnknown_08597358, 0x3, -8, -8, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 2, 1
+ delay 0x9
+ createsprite gUnknown_08596A74, 0x2, 20, -8, 0, 0, 20, -32
+ delay 0x4
+ playsewithpan SE_W030, +63
+ createsprite gUnknown_08597358, 0x3, 8, 8, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 2, 1
+ delay 0xE
+ playsewithpan SE_W030, +63
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 2, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_TAKE_DOWN:
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_80D5C50, 0x5, 0, -24, 8, 23, 10, 40, 10
+ delay 0x23
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 0, 10, 0, 0
+ createsprite gUnknown_08597358, 0x4, -10, 0, 1, 0
+ playsewithpan SE_W025B, +63
+ delay 0x1
+ createsprite gUnknown_0857FE70, 0x2, 1, -16, 0, 0, 4
+ waitforvisualfinish
+ createvisualtask sub_80D5484, 0x2, 1, 4, 0, 12, 1
+ waitforvisualfinish
+ delay 0x2
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 5
+ delay 0x3
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 7
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_DOUBLE_EDGE:
+ loadspritegfx 0x2797
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_0859728C, 0x2, 2, 4, 2, 0x7FFF, 10, 0, 0
+ waitforvisualfinish
+ delay 0xA
+ playsewithpan SE_W207, -64
+ waitplaysewithpan SE_W207, -64, 0x8
+ createvisualtask sub_80D5830, 0x2, 0, 18, 6, 2, 4
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 0, 16, 16, 0x7FFF
+ createsprite gUnknown_0857FE70, 0x2, 0, 20, 0, 0, 4
+ delay 0x3
+ waitforvisualfinish
+ playsewithpan SE_W025B, +63
+ createsprite gUnknown_08597358, 0x84, -10, 0, 1, 0
+ createsprite gUnknown_0857FE70, 0x2, 1, -32, 0, 0, 3
+ waitforvisualfinish
+ createvisualtask sub_80D6134, 0x2, 8, -256, 0, 0
+ createvisualtask sub_80D6134, 0x2, 8, -256, 1, 0
+ createvisualtask sub_80D5484, 0x2, 0, 4, 0, 12, 1
+ createvisualtask sub_80D5484, 0x2, 1, 4, 0, 12, 1
+ createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, 0x7FFF
+ waitforvisualfinish
+ createvisualtask sub_80D6134, 0x2, 8, -256, 0, 1
+ createvisualtask sub_80D6134, 0x2, 8, -256, 1, 1
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 5
+ delay 0x3
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 7
+ waitforvisualfinish
+ end
+
+Move_POISON_STING:
+ loadspritegfx 0x27B1
+ loadspritegfx 0x2797
+ loadspritegfx 0x27A6
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W013B, -64
+ createsprite gUnknown_08596A44, 0x82, 20, 0, -8, 0, 20
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 5, 1
+ playsewithpan SE_W030, +63
+ waitforvisualfinish
+ call AnimScript_82D7A71
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_TWINEEDLE:
+ loadspritegfx 0x27B1
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ loopsewithpan SE_W013B, -64, 0x6, 0x2
+ createsprite gUnknown_08596A44, 0x82, 10, -4, 0, -4, 20
+ createsprite gUnknown_08596A44, 0x82, 20, 12, 10, 12, 20
+ delay 0x14
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 5, 1
+ createsprite gUnknown_08597370, 0x3, 0, -4, 1, 3
+ loopsewithpan SE_W030, +63, 0x5, 0x2
+ delay 0x1
+ createsprite gUnknown_08597370, 0x3, 10, 12, 1, 3
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_FIRE_BLAST:
+ loadspritegfx 0x272D
+ createsoundtask sub_8158B30, 144, 145
+ call AnimScript_82C9FE9
+ call AnimScript_82C9FE9
+ call AnimScript_82C9FE9
+ delay 0x18
+ createvisualtask sub_8116620, 0xA, 1, 3, 0, 8, 0
+ waitforvisualfinish
+ delay 0x13
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 20, 1
+ call AnimScript_82CA02D
+ delay 0x3
+ call AnimScript_82CA02D
+ delay 0x3
+ call AnimScript_82CA02D
+ delay 0x3
+ call AnimScript_82CA02D
+ delay 0x3
+ call AnimScript_82CA02D
+ delay 0x3
+ call AnimScript_82CA02D
+ delay 0x3
+ call AnimScript_82CA02D
+ delay 0x3
+ call AnimScript_82CA02D
+ delay 0x3
+ call AnimScript_82CA02D
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 1, 2, 8, 0, 0
+ waitforvisualfinish
+ end
+
+AnimScript_82C9FE9:
+ createsprite gUnknown_0859551C, 0x82, 0, 0, 0
+ createsprite gUnknown_0859551C, 0x82, 0, 0, 51
+ createsprite gUnknown_0859551C, 0x82, 0, 0, 102
+ createsprite gUnknown_0859551C, 0x82, 0, 0, 153
+ createsprite gUnknown_0859551C, 0x82, 0, 0, 204
+ delay 0x5
+ return
+
+AnimScript_82CA02D:
+ createsprite gUnknown_0859556C, 0x82, 0, 0, 10, 0, -2
+ createsprite gUnknown_0859556C, 0x82, 0, 0, 13, -2, 0
+ createsprite gUnknown_0859556C, 0x82, 0, 0, 13, 2, 0
+ createsprite gUnknown_0859556C, 0x82, 0, 0, 15, -2, 2
+ createsprite gUnknown_0859556C, 0x82, 0, 0, 15, 2, 2
+ return
+
+Move_LEECH_SEED:
+ loadspritegfx 0x2716
+ playsewithpan SE_W077, -64
+ createsprite gUnknown_085922BC, 0x82, 15, 0, 0, 24, 35, -32
+ delay 0x8
+ playsewithpan SE_W077, -64
+ createsprite gUnknown_085922BC, 0x82, 15, 0, -16, 24, 35, -40
+ delay 0x8
+ playsewithpan SE_W077, -64
+ createsprite gUnknown_085922BC, 0x82, 15, 0, 16, 24, 35, -37
+ delay 0xC
+ loopsewithpan SE_W039, +63, 0xA, 0x8
+ waitforvisualfinish
+ end
+
+Move_EMBER:
+ loadspritegfx 0x272D
+ loopsewithpan SE_W052, -64, 0x5, 0x2
+ createsprite gUnknown_085954D4, 0x82, 20, 0, -16, 24, 20, 1
+ delay 0x4
+ createsprite gUnknown_085954D4, 0x82, 20, 0, 0, 24, 20, 1
+ delay 0x4
+ createsprite gUnknown_085954D4, 0x82, 20, 0, 16, 24, 20, 1
+ delay 0x10
+ playsewithpan SE_W172, +63
+ call AnimScript_82CA135
+ call AnimScript_82CA135
+ call AnimScript_82CA135
+ end
+
+AnimScript_82CA135:
+ createsprite gUnknown_085954EC, 0x82, -24, 24, 24, 24, 20, 1, 1
+ delay 0x4
+ return
+
+Move_MEGA_PUNCH:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ monbg ANIM_TARGET
+ delay 0x2
+ createsprite gUnknown_08597274, 0x2, 1, 0, 0, 16, 0
+ setalpha 0x80C
+ playsewithpan SE_W025, +63
+ createsprite gUnknown_08595F48, 0x3, 0, 0, 0, 50
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 7, 0x7FFF
+ delay 0x32
+ call AnimScript_82CA1E9
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 0
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 22, 1
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 0, 0x7FFF
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 0, 8, 0, 0
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ delay 0x2
+ restorebg
+ waitbgfadein
+ end
+
+AnimScript_82CA1E9:
+ delay 0x2
+ createvisualtask sub_8117E60, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82CA220
+ createvisualtask sub_815A8C8, 0x2
+ jumpargeq 0x7, 0x0, AnimScript_82CA212
+ jumpargeq 0x7, 0x1, AnimScript_82CA219
+
+AnimScript_82CA211:
+ return
+
+AnimScript_82CA212:
+ changebg BG_IMPACT_OPPONENT
+ goto AnimScript_82CA211
+
+AnimScript_82CA219:
+ changebg BG_IMPACT_PLAYER
+ goto AnimScript_82CA211
+
+AnimScript_82CA220:
+ changebg BG_IMPACT_CONTESTS
+ goto AnimScript_82CA211
+
+Move_MEGA_KICK:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ monbg ANIM_TARGET
+ delay 0x2
+ createsprite gUnknown_08597274, 0x2, 1, 0, 0, 16, 0
+ setalpha 0x80C
+ playsewithpan SE_W025, +63
+ createsprite gUnknown_08595F48, 0x3, 0, 0, 1, 50
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 7, 0x7FFF
+ delay 0x32
+ playsewithpan SE_W025B, +63
+ call AnimScript_82CA1E9
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 0
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 22, 1
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 0, 0x7FFF
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 0, 8, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ delay 0x2
+ restorebg
+ waitbgfadein
+ end
+
+Move_COMET_PUNCH:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ choosetwoturnanim AnimScript_82CA2F1, AnimScript_82CA316
+
+AnimScript_82CA2D7:
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W004, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+AnimScript_82CA2F1:
+ createsprite gUnknown_08597358, 0x2, -8, -8, 1, 2
+ createsprite gUnknown_08595E98, 0x3, -8, 0, 8, 1, 0
+ goto AnimScript_82CA2D7
+
+AnimScript_82CA316:
+ createsprite gUnknown_08597358, 0x2, 8, -8, 1, 2
+ createsprite gUnknown_08595E98, 0x3, 8, 0, 8, 1, 0
+ goto AnimScript_82CA2D7
+
+Move_SONIC_BOOM:
+ loadspritegfx 0x2713
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ call AnimScript_82CA372
+ call AnimScript_82CA372
+ call AnimScript_82CA372
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 10, 1
+ call AnimScript_82CA38A
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82CA372:
+ playsewithpan SE_W013B, -64
+ createsprite gUnknown_08593398, 0x82, 16, 0, 0, 0, 15
+ delay 0x4
+ return
+
+AnimScript_82CA38A:
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 2
+ delay 0x4
+ return
+
+Move_THUNDER_SHOCK:
+ loadspritegfx 0x2711
+ loadspritegfx 0x271B
+ createvisualtask sub_8116620, 0xA, 1, 0, 0, 6, 0
+ waitforvisualfinish
+ delay 0xA
+ createvisualtask sub_810A7DC, 0x5, 0, -44, 0
+ playsewithpan SE_W085, +63
+ delay 0x9
+ createvisualtask sub_8116620, 0xA, 4, 0, 0, 13, 0
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 4, 0, 13, 0, 0
+ waitforvisualfinish
+ delay 0x14
+ call AnimScript_82D7BEA
+ waitforvisualfinish
+ delay 0x14
+ createvisualtask sub_8116620, 0xA, 1, 0, 6, 0, 0
+ waitforvisualfinish
+ end
+
+Move_THUNDERBOLT:
+ loadspritegfx 0x2711
+ loadspritegfx 0x282A
+ loadspritegfx 0x271B
+ createvisualtask sub_8116620, 0xA, 1, 0, 0, 6, 0
+ waitforvisualfinish
+ delay 0xA
+ createvisualtask sub_810A7DC, 0x5, 24, -52, 0
+ playsewithpan SE_W085, +63
+ delay 0x7
+ createvisualtask sub_810A7DC, 0x5, -24, -52, 0
+ playsewithpan SE_W085, +63
+ delay 0x7
+ createvisualtask sub_810A7DC, 0x5, 0, -60, 1
+ playsewithpan SE_W085, +63
+ delay 0x9
+ createvisualtask sub_8116620, 0xA, 4, 0, 0, 13, 0
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 4, 0, 13, 0, 0
+ waitforvisualfinish
+ delay 0x14
+ createsprite gUnknown_085957E0, 0x83, 44, 0, 0, 3
+ createsprite gUnknown_085957F8, 0x84, 0, 0, 32, 44, 0, 40, 0, -32765
+ createsprite gUnknown_085957F8, 0x84, 0, 0, 32, 44, 64, 40, 1, -32765
+ createsprite gUnknown_085957F8, 0x84, 0, 0, 32, 44, 128, 40, 0, -32765
+ createsprite gUnknown_085957F8, 0x84, 0, 0, 32, 44, 192, 40, 2, -32765
+ createsprite gUnknown_085957F8, 0x84, 0, 0, 16, 44, 32, 40, 0, -32765
+ createsprite gUnknown_085957F8, 0x84, 0, 0, 16, 44, 96, 40, 1, -32765
+ createsprite gUnknown_085957F8, 0x84, 0, 0, 16, 44, 160, 40, 0, -32765
+ createsprite gUnknown_085957F8, 0x84, 0, 0, 16, 44, 224, 40, 2, -32765
+ playsewithpan SE_W063, +63
+ delay 0x0
+ createvisualtask sub_8116620, 0xA, 1, 0, 2, 2, 0
+ delay 0x6
+ createvisualtask sub_8116620, 0xA, 1, 0, 6, 6, 0
+ delay 0x6
+ createvisualtask sub_8116620, 0xA, 1, 0, 2, 2, 0
+ delay 0x6
+ createvisualtask sub_8116620, 0xA, 1, 0, 6, 6, 0
+ waitforvisualfinish
+ delay 0x14
+ waitplaysewithpan SE_W085B, +63, 0x13
+ call AnimScript_82D7BEA
+ waitforvisualfinish
+ delay 0x14
+ createvisualtask sub_8116620, 0xA, 1, 0, 6, 0, 0
+ waitforvisualfinish
+ end
+
+Move_THUNDER_WAVE:
+ loadspritegfx 0x2711
+ loadspritegfx 0x271B
+ loadspritegfx 0x27BD
+ createvisualtask sub_8116620, 0xA, 1, 0, 0, 6, 0
+ waitforvisualfinish
+ delay 0xA
+ createvisualtask sub_810A7DC, 0x5, 0, -48, 0
+ playsewithpan SE_W086, +63
+ delay 0x14
+ loopsewithpan SE_W085B, +63, 0xA, 0x4
+ createsprite gUnknown_08595840, 0x82, -16, -16
+ delay 0x4
+ createsprite gUnknown_08595840, 0x82, -16, 0
+ delay 0x4
+ createsprite gUnknown_08595840, 0x82, -16, 16
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 1, 0, 6, 0, 0
+ waitforvisualfinish
+ end
+
+Move_BEAT_UP:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ choosetwoturnanim AnimScript_82CA648, AnimScript_82CA6B9
+
+AnimScript_82CA643:
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+AnimScript_82CA648:
+ createsprite gUnknown_08597358, 0x82, -20, -20, 1, 2
+ createsprite gUnknown_08595E98, 0x83, -20, -12, 8, 1, 0
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W233B, +63
+ delay 0x8
+ createsprite gUnknown_08597358, 0x82, 8, 0, 1, 2
+ createsprite gUnknown_08595E98, 0x83, 8, 8, 8, 1, 0
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W233B, +63
+ goto AnimScript_82CA643
+
+AnimScript_82CA6B9:
+ createsprite gUnknown_08597358, 0x82, 12, -20, 1, 2
+ createsprite gUnknown_08595E98, 0x83, 12, -12, 8, 1, 0
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W233B, +63
+ delay 0x8
+ createsprite gUnknown_08597358, 0x82, -12, 0, 1, 2
+ createsprite gUnknown_08595E98, 0x83, -12, 8, 8, 1, 0
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W233B, +63
+ goto AnimScript_82CA643
+
+Move_STOMP:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W104, +63
+ createsprite gUnknown_08595F60, 0x3, 0, -32, 15
+ delay 0x13
+ createsprite gUnknown_08597358, 0x2, 0, -8, 1, 1
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 4, 9, 1
+ playsewithpan SE_W025B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_TAIL_WHIP:
+ loopsewithpan SE_W039, -64, 0x18, 0x3
+ createvisualtask sub_80D5830, 0x2, 0, 12, 4, 2, 3
+ waitforvisualfinish
+ end
+
+Move_CUT:
+ loadspritegfx 0x279A
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W015, +63
+ createsprite gUnknown_08592A1C, 0x2, 40, -32, 0
+ delay 0x5
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 10, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ waitforvisualfinish
+ end
+
+Move_HIDDEN_POWER:
+ loadspritegfx 0x27E9
+ playsewithpan SE_W036, -64
+ createvisualtask sub_80D6064, 0x5, -7, -7, 11, 0, 0
+ waitforvisualfinish
+ delay 0x1E
+ createvisualtask sub_80A7B98, 0x5, 0, 20479, 12, 5, 1
+ delay 0x4
+ createvisualtask sub_80D6064, 0x5, -7, -7, 11, 0, 0
+ playsewithpan SE_W179, -64
+ createsprite gUnknown_08593A04, 0x2, 26, 0
+ createsprite gUnknown_08593A04, 0x2, 26, 42
+ createsprite gUnknown_08593A04, 0x2, 26, 84
+ createsprite gUnknown_08593A04, 0x2, 26, 126
+ createsprite gUnknown_08593A04, 0x2, 26, 168
+ createsprite gUnknown_08593A04, 0x2, 26, 210
+ delay 0x34
+ setarg 0x7, 0xFFFF
+ playsewithpan SE_W115, -64
+ createvisualtask sub_80D6064, 0x5, -7, -7, 11, 0, 0
+ createsprite gUnknown_08593A1C, 0x82, 0
+ createsprite gUnknown_08593A1C, 0x82, 32
+ createsprite gUnknown_08593A1C, 0x82, 64
+ createsprite gUnknown_08593A1C, 0x82, 96
+ createsprite gUnknown_08593A1C, 0x82, 128
+ createsprite gUnknown_08593A1C, 0x82, 160
+ createsprite gUnknown_08593A1C, 0x82, 192
+ createsprite gUnknown_08593A1C, 0x82, 224
+ end
+
+Move_REVERSAL:
+ loadspritegfx 0x27FC
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ playsewithpan SE_W197, -64
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 3, 0x7FFF, 8, 0, 0
+ waitforvisualfinish
+ delay 0x1E
+ createvisualtask sub_8115A04, 0x2, 31, 3, 2, 0, 10, 0x7FFF
+ delay 0xA
+ playsewithpan SE_W179, -64
+ createsprite gUnknown_085CE5D8, 0x2, 26, 0
+ createsprite gUnknown_085CE5D8, 0x2, 26, 42
+ createsprite gUnknown_085CE5D8, 0x2, 26, 84
+ createsprite gUnknown_085CE5D8, 0x2, 26, 126
+ createsprite gUnknown_085CE5D8, 0x2, 26, 168
+ createsprite gUnknown_085CE5D8, 0x2, 26, 210
+ waitforvisualfinish
+ delay 0x14
+ createsprite gUnknown_0857FE28, 0x2, 6, 4
+ delay 0x8
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 0x7FFF, 8, 0, 0
+ createsprite gUnknown_08595E98, 0x84, 0, 0, 10, 1, 0
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 1
+ createvisualtask sub_80D6388, 0x5, 0, 1, 8, 1, 0
+ end
+
+Move_PURSUIT:
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ fadetobg BG_DARK
+ waitbgfadein
+ delay 0x0
+ setalpha 0x80C
+ choosetwoturnanim AnimScript_82CA99F, AnimScript_82CA9C8
+
+AnimScript_82CA996:
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ delay 0x0
+ restorebg
+ waitbgfadein
+ end
+
+AnimScript_82CA99F:
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 2
+ createvisualtask sub_80D6388, 0x5, 0, 1, 6, 1, 0
+ goto AnimScript_82CA996
+
+AnimScript_82CA9C8:
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 1
+ createvisualtask sub_80D6388, 0x5, 0, 1, 6, 1, 0
+ goto AnimScript_82CA996
+
+Move_SPIKE_CANNON:
+ loadspritegfx 0x27B1
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80D5C50, 0x5, 0, -4, 0, 4, 6, 8, 4
+ waitforvisualfinish
+ loopsewithpan SE_W013B, -64, 0x5, 0x3
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 5
+ createsprite gUnknown_08596A44, 0x2, 10, -8, -8, -8, 20
+ createsprite gUnknown_08596A44, 0x2, 18, 0, 0, 0, 20
+ createsprite gUnknown_08596A44, 0x2, 26, 8, 8, 8, 20
+ waitforvisualfinish
+ createsprite gUnknown_08597370, 0x3, -8, -8, 1, 2
+ createsprite gUnknown_08597370, 0x3, 0, 0, 1, 2
+ createsprite gUnknown_08597370, 0x3, 8, 8, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 7, 1
+ loopsewithpan SE_W030, +63, 0x5, 0x3
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_SWORDS_DANCE:
+ loadspritegfx 0x2715
+ monbg ANIM_ATTACKER
+ setalpha 0x80C
+ playsewithpan SE_W014, -64
+ createvisualtask sub_80D5830, 0x2, 0, 16, 6, 1, 4
+ createsprite gUnknown_08593380, 0x2, 0, 0
+ delay 0x16
+ createvisualtask sub_8115D94, 0x2, 10005, 2, 2, 32754, 16, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ blendoff
+ delay 0x1
+ end
+
+Move_PSYCH_UP:
+ loadspritegfx 0x27D4
+ monbg ANIM_ATK_PARTNER
+ createvisualtask sub_8115B0C, 0x2, 1, 2, 6, 1, 11, 0
+ setalpha 0x80C
+ loopsewithpan SE_W060B, -64, 0x5, 0xA
+ createsprite gUnknown_08596548, 0x2, 0, 0, 0, 0
+ createvisualtask sub_80D5EB8, 0x5, 0, 5, 2560, 8, 0
+ delay 0x7F
+ delay 0x4
+ playsewithpan SE_W060, -64
+ createvisualtask sub_80D6064, 0x5, -5, -5, 10, 0, 1
+ createvisualtask sub_8116620, 0x9, 2, 2, 10, 0, 1023
+ delay 0x1E
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ waitforvisualfinish
+ end
+
+Move_DIZZY_PUNCH:
+ loadspritegfx 0x2759
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ call AnimScript_82CAC77
+ createsprite gUnknown_08595E98, 0x85, 16, 8, 20, 1, 0
+ createsprite gUnknown_08597358, 0x84, 16, 0, 1, 1
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08595F78, 0x83, 16, 8, 160, -32
+ createsprite gUnknown_08595F78, 0x83, 16, 8, -256, -40
+ createsprite gUnknown_08595F78, 0x83, 16, 8, 128, -16
+ createsprite gUnknown_08595F78, 0x83, 16, 8, 416, -38
+ createsprite gUnknown_08595F78, 0x83, 16, 8, -128, -22
+ createsprite gUnknown_08595F78, 0x83, 16, 8, -384, -31
+ delay 0xA
+ call AnimScript_82CAC77
+ createsprite gUnknown_08595E98, 0x85, -16, -8, 20, 1, 0
+ createsprite gUnknown_08597358, 0x84, -16, -16, 1, 1
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08595F78, 0x83, -16, -8, 160, -32
+ createsprite gUnknown_08595F78, 0x83, -16, -8, -256, -40
+ createsprite gUnknown_08595F78, 0x83, -16, -8, 128, -16
+ createsprite gUnknown_08595F78, 0x83, -16, -8, 416, -38
+ createsprite gUnknown_08595F78, 0x83, -16, -8, -128, -22
+ createsprite gUnknown_08595F78, 0x83, -16, -8, -384, -31
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+AnimScript_82CAC77:
+ createsprite gUnknown_0857FE28, 0x2, 6, 4
+ delay 0x6
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 7, 1
+ return
+
+Move_FIRE_SPIN:
+ loadspritegfx 0x272D
+ playsewithpan SE_W221B, +63
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 47, 1
+ call AnimScript_82CACBF
+ call AnimScript_82CACBF
+ call AnimScript_82CACBF
+ waitforvisualfinish
+ end
+
+AnimScript_82CACBF:
+ createsprite gUnknown_08596B88, 0x82, 0, 28, 528, 30, 13, 50, 1
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x82, 0, 32, 480, 20, 16, -46, 1
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x82, 0, 33, 576, 20, 8, 42, 1
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x82, 0, 31, 400, 25, 11, -42, 1
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x82, 0, 28, 512, 25, 16, 46, 1
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x82, 0, 33, 464, 30, 15, -50, 1
+ delay 0x2
+ return
+
+Move_FURY_CUTTER:
+ loadspritegfx 0x279A
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W013, +63
+ createvisualtask sub_8107144, 0x2
+ jumpargeq 0x7, 0x0, AnimScript_82CADA7
+ goto AnimScript_82CADB9
+
+AnimScript_82CAD6A:
+ createvisualtask sub_8107168, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82CAD8E
+ jumpargeq 0x7, 0x2, AnimScript_82CADCB
+ jumpargeq 0x7, 0x3, AnimScript_82CADE5
+ goto AnimScript_82CADFF
+
+AnimScript_82CAD8E:
+ delay 0x5
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 10, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ waitforvisualfinish
+ end
+
+AnimScript_82CADA7:
+ createsprite gUnknown_08592A1C, 0x2, 40, -32, 0
+ goto AnimScript_82CAD6A
+
+AnimScript_82CADB9:
+ createsprite gUnknown_08592A1C, 0x2, 40, -32, 1
+ goto AnimScript_82CAD6A
+
+AnimScript_82CADCB:
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 10505, 4, 0, 0
+ goto AnimScript_82CAD8E
+
+AnimScript_82CADE5:
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 3, 10505, 4, 0, 0
+ goto AnimScript_82CAD8E
+
+AnimScript_82CADFF:
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 3, 10505, 4, 0, 0
+ goto AnimScript_82CAD8E
+
+Move_SELF_DESTRUCT:
+ loadspritegfx 0x27D6
+ createvisualtask sub_8116620, 0xA, 2, 1, 0, 9, 31
+ createvisualtask sub_80D52D0, 0x5, 4, 6, 0, 38, 1
+ createvisualtask sub_80D52D0, 0x5, 5, 6, 0, 38, 1
+ createvisualtask sub_80D52D0, 0x5, 6, 6, 0, 38, 1
+ createvisualtask sub_80D52D0, 0x5, 7, 6, 0, 38, 1
+ createvisualtask sub_80D52D0, 0x5, 8, 6, 0, 38, 1
+ call AnimScript_82CAE9F
+ call AnimScript_82CAE9F
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 2, 1, 9, 0, 31
+ end
+
+AnimScript_82CAE9F:
+ playsewithpan SE_W120, -64
+ createsprite gUnknown_0859371C, 0x3, 0, 0, 0, 1
+ delay 0x6
+ playsewithpan SE_W120, -64
+ createsprite gUnknown_0859371C, 0x3, 24, -24, 0, 1
+ delay 0x6
+ playsewithpan SE_W120, -64
+ createsprite gUnknown_0859371C, 0x3, -16, 16, 0, 1
+ delay 0x6
+ playsewithpan SE_W120, -64
+ createsprite gUnknown_0859371C, 0x3, -24, -12, 0, 1
+ delay 0x6
+ playsewithpan SE_W120, -64
+ createsprite gUnknown_0859371C, 0x3, 16, 16, 0, 1
+ delay 0x6
+ return
+
+Move_SLAM:
+ loadspritegfx 0x2748
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W004, -64
+ createsprite gUnknown_0857FE70, 0x2, 0, 20, 3, 0, 4
+ delay 0x1
+ createsprite gUnknown_085928D0, 0x2, 0, 0
+ delay 0x3
+ playsewithpan SE_W025B, +63
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 1
+ createsprite gUnknown_0857FE70, 0x2, 1, -12, 10, 0, 3
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 5
+ delay 0x3
+ createvisualtask sub_80D5484, 0x2, 1, 0, 3, 6, 1
+ waitforvisualfinish
+ delay 0x5
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 6
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_VINE_WHIP:
+ loadspritegfx 0x282F
+ playsewithpan SE_W026, -64
+ createsprite gUnknown_0857FE28, 0x2, 4, 6
+ delay 0x6
+ playsewithpan SE_W010, +63
+ createsprite gUnknown_085928E8, 0x82, 0, 0
+ delay 0x6
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 6, 1
+ end
+
+Move_DRILL_PECK:
+ loadspritegfx 0x2797
+ loadspritegfx 0x27B2
+ createsprite gUnknown_08592CD8, 0x2, 0
+ playsewithpan SE_W029, -64
+ waitforvisualfinish
+ delay 0x2
+ createsprite gUnknown_08592CD8, 0x2, 1
+ delay 0x2
+ loopsewithpan SE_W030, +63, 0x4, 0x8
+ createvisualtask sub_810EB88, 0x5
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 18, 1
+ waitforvisualfinish
+ createsprite gUnknown_08592CD8, 0x2, 2
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 6
+ waitforvisualfinish
+ end
+
+Move_WATERFALL:
+ loadspritegfx 0x27A4
+ loadspritegfx 0x27AB
+ loadspritegfx 0x279D
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_80D51AC, 0x5, 0, 0, 2, 23, 1
+ delay 0x5
+ playsewithpan SE_W152, -64
+ createsprite gUnknown_08595238, 0x2, 10, 10, 25, 0
+ delay 0x4
+ playsewithpan SE_W152, -64
+ createsprite gUnknown_08595238, 0x2, -15, 0, 25, 0
+ delay 0x4
+ playsewithpan SE_W152, -64
+ createsprite gUnknown_08595238, 0x2, 20, 10, 25, 0
+ delay 0x4
+ playsewithpan SE_W152, -64
+ createsprite gUnknown_08595238, 0x2, 0, -10, 25, 0
+ delay 0x4
+ playsewithpan SE_W152, -64
+ createsprite gUnknown_08595238, 0x2, -10, 15, 25, 0
+ delay 0x4
+ playsewithpan SE_W152, -64
+ createsprite gUnknown_08595238, 0x2, 25, 20, 25, 0
+ delay 0x4
+ playsewithpan SE_W152, -64
+ createsprite gUnknown_08595238, 0x2, -20, 20, 25, 0
+ delay 0x4
+ playsewithpan SE_W152, -64
+ createsprite gUnknown_08595238, 0x2, 12, 0, 25, 0
+ waitforvisualfinish
+ delay 0xA
+ createsprite gUnknown_0857FE28, 0x2, 6, 5
+ delay 0x6
+ call AnimScript_82CB102
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82CB102:
+ playsewithpan SE_W127, +63
+ createvisualtask sub_80D52D0, 0x5, 1, 4, 0, 17, 1
+ createsprite gUnknown_08597388, 0x3, 0, 20, 1, 1
+ createsprite gUnknown_08595250, 0x4, 0, 20
+ createsprite gUnknown_08595250, 0x4, 0, 20
+ delay 0x2
+ createsprite gUnknown_08597388, 0x3, 0, 15, 1, 1
+ createsprite gUnknown_08595250, 0x4, 0, 15
+ createsprite gUnknown_08595250, 0x4, 0, 15
+ delay 0x2
+ createsprite gUnknown_08597388, 0x3, 0, 10, 1, 1
+ createsprite gUnknown_08595250, 0x4, 0, 10
+ createsprite gUnknown_08595250, 0x4, 0, 10
+ delay 0x2
+ createsprite gUnknown_08597388, 0x3, 0, 5, 1, 1
+ createsprite gUnknown_08595250, 0x4, 0, 5
+ createsprite gUnknown_08595250, 0x4, 0, 5
+ delay 0x2
+ createsprite gUnknown_08597388, 0x3, 0, 0, 1, 1
+ createsprite gUnknown_08595250, 0x4, 0, 0
+ createsprite gUnknown_08595250, 0x4, 0, 0
+ delay 0x2
+ createsprite gUnknown_08597388, 0x3, 0, -5, 1, 1
+ createsprite gUnknown_08595250, 0x4, 0, -5
+ createsprite gUnknown_08595250, 0x4, 0, -5
+ delay 0x2
+ createsprite gUnknown_08597388, 0x3, 0, -10, 1, 1
+ createsprite gUnknown_08595250, 0x4, 0, -10
+ createsprite gUnknown_08595250, 0x4, 0, -10
+ delay 0x2
+ createsprite gUnknown_08597388, 0x3, 0, -15, 1, 1
+ createsprite gUnknown_08595250, 0x4, 0, -15
+ createsprite gUnknown_08595250, 0x4, 0, -15
+ delay 0x2
+ createsprite gUnknown_08597388, 0x3, 0, -20, 1, 1
+ createsprite gUnknown_08595250, 0x4, 0, -20
+ createsprite gUnknown_08595250, 0x4, 0, -20
+ return
+
+Move_EXPLOSION:
+ loadspritegfx 0x27D6
+ createsprite gUnknown_0859728C, 0x2, 1, 8, 9, 8474, 8, 0, 8
+ createvisualtask sub_80D52D0, 0x5, 4, 8, 0, 40, 1
+ createvisualtask sub_80D52D0, 0x5, 5, 8, 0, 40, 1
+ createvisualtask sub_80D52D0, 0x5, 6, 8, 0, 40, 1
+ createvisualtask sub_80D52D0, 0x5, 7, 8, 0, 40, 1
+ createvisualtask sub_80D52D0, 0x5, 8, 8, 0, 40, 1
+ call AnimScript_82CB312
+ call AnimScript_82CB312
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 1, 1, 16, 16, 0x7FFF
+ delay 0x32
+ createvisualtask sub_8116620, 0xA, 1, 3, 16, 0, 0x7FFF
+ end
+
+AnimScript_82CB312:
+ playsewithpan SE_W153, -64
+ createsprite gUnknown_0859371C, 0x3, 0, 0, 0, 1
+ delay 0x6
+ playsewithpan SE_W153, -64
+ createsprite gUnknown_0859371C, 0x3, 24, -24, 0, 1
+ delay 0x6
+ playsewithpan SE_W153, -64
+ createsprite gUnknown_0859371C, 0x3, -16, 16, 0, 1
+ delay 0x6
+ playsewithpan SE_W153, -64
+ createsprite gUnknown_0859371C, 0x3, -24, -12, 0, 1
+ delay 0x6
+ playsewithpan SE_W153, -64
+ createsprite gUnknown_0859371C, 0x3, 16, 16, 0, 1
+ delay 0x6
+ return
+
+Move_DEFENSE_CURL:
+ loadspritegfx 0x27FA
+ loopsewithpan SE_W161, -64, 0x12, 0x3
+ createvisualtask sub_811489C, 0x5, 0, 0
+ createvisualtask sub_815B338, 0x5
+ waitforvisualfinish
+ createsprite gUnknown_085CE338, 0x2, 0, 6, 0, 1
+ waitforvisualfinish
+ createvisualtask sub_811489C, 0x5, 0, 1
+ waitforvisualfinish
+ end
+
+Move_PROTECT:
+ loadspritegfx 0x2828
+ monbg ANIM_ATK_PARTNER
+ monbgprio_28 ANIM_ATTACKER
+ waitplaysewithpan SE_W115, -64, 0x10
+ createsprite gUnknown_08592ADC, 0x2, 24, 0, 90
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ end
+
+Move_DETECT:
+ loadspritegfx 0x2757
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 9, 0
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 2, 1, 0, 9, 0x7FFF
+ delay 0x12
+ playsewithpan SE_W197, -64
+ createsprite gUnknown_0853EE84, 0xD, 20, -20
+ waitforvisualfinish
+ delay 0xA
+ createsprite gUnknown_08597274, 0x2, 1, 2, 9, 0, 0
+ createvisualtask sub_8116620, 0xA, 2, 2, 9, 0, 0x7FFF
+ waitforvisualfinish
+ end
+
+Move_FRUSTRATION:
+ loadspritegfx 0x2797
+ loadspritegfx 0x2767
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_80A8140, 0x1
+ jumpargeq 0x7, 0x0, AnimScript_82CB464
+ jumpargeq 0x7, 0x1, AnimScript_82CB56A
+ jumpargeq 0x7, 0x2, AnimScript_82CB637
+ goto AnimScript_82CB6B3
+
+AnimScript_82CB45F:
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82CB464:
+ playsewithpan SE_W082, -64
+ createvisualtask sub_80D52D0, 0x5, 0, 1, 0, 15, 1
+ createvisualtask sub_8116620, 0xA, 2, 3, 0, 9, 31
+ waitforvisualfinish
+ delay 0x14
+ playsewithpan SE_W207B, -64
+ createsprite gUnknown_0859368C, 0x2, 0, 20, -28
+ waitforvisualfinish
+ playsewithpan SE_W207B, -64
+ createsprite gUnknown_0859368C, 0x2, 0, 20, -28
+ waitforvisualfinish
+ delay 0xA
+ createvisualtask sub_80D5EB8, 0x5, 0, 16, 6144, 8, 0
+ delay 0x5
+ createvisualtask sub_80D52D0, 0x5, 1, 4, 0, 30, 1
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 0
+ playsewithpan SE_W004, +63
+ delay 0x5
+ createsprite gUnknown_08597358, 0x3, 24, 8, 1, 0
+ playsewithpan SE_W004, +63
+ delay 0x5
+ createsprite gUnknown_08597358, 0x3, -24, -16, 1, 0
+ playsewithpan SE_W004, +63
+ delay 0x5
+ createsprite gUnknown_08597358, 0x3, 8, 4, 1, 0
+ playsewithpan SE_W004, +63
+ delay 0x5
+ createsprite gUnknown_08597358, 0x3, -16, 19, 1, 0
+ playsewithpan SE_W004, +63
+ delay 0x5
+ createsprite gUnknown_08597358, 0x3, 18, -18, 1, 0
+ playsewithpan SE_W004, +63
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 2, 3, 9, 0, 31
+ goto AnimScript_82CB45F
+
+AnimScript_82CB56A:
+ playsewithpan SE_W082, -64
+ createvisualtask sub_80D52D0, 0x5, 0, 1, 0, 15, 1
+ createvisualtask sub_8116620, 0xA, 2, 3, 0, 9, 31
+ waitforvisualfinish
+ delay 0x14
+ playsewithpan SE_W207B, -64
+ createsprite gUnknown_0859368C, 0x2, 0, 20, -28
+ waitforvisualfinish
+ delay 0x5
+ createvisualtask sub_815C3A8, 0x5
+ delay 0x7
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x3, 0, 8, 1, 1
+ createvisualtask sub_80D52D0, 0x5, 1, 4, 0, 6, 1
+ delay 0xE
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x3, 12, -6, 1, 1
+ createvisualtask sub_80D52D0, 0x5, 1, 4, 0, 6, 1
+ delay 0xE
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x3, -12, -6, 1, 1
+ createvisualtask sub_80D52D0, 0x5, 1, 4, 0, 6, 1
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 2, 3, 9, 0, 31
+ goto AnimScript_82CB45F
+
+AnimScript_82CB637:
+ playsewithpan SE_W207B, -64
+ createsprite gUnknown_0859368C, 0x2, 0, 20, -28
+ waitforvisualfinish
+ delay 0x5
+ createsprite gUnknown_0857FE28, 0x2, 4, 4
+ delay 0x6
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x2, 10, 4, 1, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 6, 1
+ waitforvisualfinish
+ createsprite gUnknown_0857FE28, 0x2, 4, 4
+ delay 0x6
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x2, -10, -4, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 6, 1
+ goto AnimScript_82CB45F
+
+AnimScript_82CB6B3:
+ createsprite gUnknown_085CE4D0, 0x2, 20, -28
+ waitforvisualfinish
+ delay 0xA
+ createsprite gUnknown_0857FE28, 0x2, 10, 2
+ delay 0xC
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 1, 0, 6, 1
+ goto AnimScript_82CB45F
+
+Move_SAFEGUARD:
+ loadspritegfx 0x2804
+ monbg ANIM_ATK_PARTNER
+ setalpha 0x808
+ playsewithpan SE_W208, -64
+ createsprite gUnknown_08593C64, 0x2
+ delay 0x4
+ createsprite gUnknown_08593C64, 0x2
+ delay 0x4
+ createsprite gUnknown_08593C64, 0x2
+ waitforvisualfinish
+ playsewithpan SE_REAPOKE, -64
+ createvisualtask sub_8115A04, 0x2, 10, 0, 2, 0, 10, 0x7FFF
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ end
+
+Move_PAIN_SPLIT:
+ loadspritegfx 0x27FF
+ createsprite gUnknown_085CE590, 0x2, -8, -42, 0
+ createsprite gUnknown_085CE590, 0x82, -8, -42, 1
+ delay 0xA
+ playsewithpan SE_W207B, 0
+ createvisualtask sub_815CA20, 0x2, 0, 0
+ createvisualtask sub_815CA20, 0x2, 1, 0
+ waitforvisualfinish
+ createsprite gUnknown_085CE590, 0x2, -24, -42, 0
+ createsprite gUnknown_085CE590, 0x82, -24, -42, 1
+ delay 0xA
+ playsewithpan SE_W207B, 0
+ createvisualtask sub_815CA20, 0x2, 0, 1
+ createvisualtask sub_815CA20, 0x2, 1, 1
+ waitforvisualfinish
+ createsprite gUnknown_085CE590, 0x2, 8, -42, 0
+ createsprite gUnknown_085CE590, 0x82, 8, -42, 1
+ delay 0xA
+ playsewithpan SE_W207B, 0
+ createvisualtask sub_815CA20, 0x2, 0, 2
+ createvisualtask sub_815CA20, 0x2, 1, 2
+ end
+
+Move_VICE_GRIP:
+ loadspritegfx 0x279A
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W011, +63
+ createsprite gUnknown_08593590, 0x2, 0
+ createsprite gUnknown_08593590, 0x2, 1
+ delay 0x9
+ createsprite gUnknown_08597358, 0x1, 0, 0, 1, 2
+ createvisualtask sub_80D52D0, 0x5, 1, 2, 0, 5, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_GUILLOTINE:
+ loadspritegfx 0x279A
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ fadetobgfromset BG_GUILLOTINE_OPPONENT, BG_GUILLOTINE_PLAYER, BG_GUILLOTINE_CONTESTS
+ waitbgfadein
+ playsewithpan SE_W011, +63
+ createsprite gUnknown_085935D0, 0x2, 0
+ createsprite gUnknown_085935D0, 0x2, 1
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 16, 0
+ delay 0x9
+ createvisualtask sub_80D52D0, 0x5, 1, 2, 0, 23, 1
+ delay 0x2E
+ createvisualtask sub_80D52D0, 0x5, 1, 4, 0, 8, 1
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 0
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 0, 8, 0, 0
+ playsewithpan SE_W013, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ restorebg
+ waitbgfadein
+ end
+
+Move_PAY_DAY:
+ loadspritegfx 0x2774
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W013B, -64
+ createsprite gUnknown_085934D8, 0x2, 20, 0, 0, 0, 1152
+ waitforvisualfinish
+ playsewithpan SE_W006, +63
+ createsprite gUnknown_08597358, 0x1, 0, 0, 1, 2
+ createsprite gUnknown_085934F0, 0x2
+ createvisualtask sub_80D52D0, 0x2, 1, 1, 0, 6, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_OUTRAGE:
+ loadspritegfx 0x272D
+ loopsewithpan SE_W082, -64, 0x8, 0x3
+ createvisualtask sub_8115A04, 0x2, 7, 2, 5, 3, 8, 430
+ createvisualtask sub_80D5830, 0x2, 0, 12, 6, 5, 4
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 1280, 0, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, -1280, 0, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 0, 1280, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 0, -1280, 3
+ delay 0x0
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 40, 1
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 1280, 768, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, -1280, 768, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 1280, -768, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, -1280, -768, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 1280, 0, 3
+ call AnimScript_82CBA0F
+ call AnimScript_82CBA0F
+ waitforvisualfinish
+ end
+
+AnimScript_82CBA0F:
+ delay 0x3
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, -1280, 0, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 0, 1280, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 0, -1280, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 1280, 768, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, -1280, 768, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, 1280, -768, 3
+ delay 0x0
+ createsprite gUnknown_08596E7C, 0x82, 0, 0, 30, -1280, -768, 3
+ return
+
+Move_SPARK:
+ loadspritegfx 0x2797
+ loadspritegfx 0x271B
+ delay 0x0
+ createvisualtask sub_8115A04, 0x2, 3, -31, 1, 5, 5, 23551
+ playsewithpan SE_W085B, -64
+ createsprite gUnknown_0859574C, 0x0, 32, 24, 190, 12, 0, 1, 0
+ delay 0x0
+ createsprite gUnknown_0859574C, 0x0, 80, 24, 22, 12, 0, 1, 0
+ createsprite gUnknown_0859574C, 0x0, 156, 24, 121, 13, 0, 1, 1
+ delay 0x0
+ createvisualtask sub_8115A04, 0x2, 3, -31, 1, 0, 0, 23551
+ delay 0xA
+ createvisualtask sub_8115A04, 0x2, 3, -31, 1, 5, 5, 23551
+ playsewithpan SE_W085B, -64
+ createsprite gUnknown_0859574C, 0x0, 100, 24, 60, 10, 0, 1, 0
+ createsprite gUnknown_0859574C, 0x0, 170, 24, 42, 11, 0, 1, 1
+ delay 0x0
+ createsprite gUnknown_0859574C, 0x0, 238, 24, 165, 10, 0, 1, 1
+ delay 0x0
+ createvisualtask sub_8115A04, 0x2, 3, -31, 1, 0, 0, 23551
+ delay 0x14
+ createvisualtask sub_8115A04, 0x2, 3, -31, 1, 7, 7, 23551
+ playsewithpan SE_W085B, -64
+ createsprite gUnknown_085957F8, 0x4, 0, 0, 32, 12, 0, 20, 0, 0
+ createsprite gUnknown_085957F8, 0x4, 0, 0, 32, 12, 64, 20, 1, 0
+ createsprite gUnknown_085957F8, 0x4, 0, 0, 32, 12, 128, 20, 0, 0
+ createsprite gUnknown_085957F8, 0x4, 0, 0, 32, 12, 192, 20, 2, 0
+ createsprite gUnknown_085957F8, 0x4, 0, 0, 16, 12, 32, 20, 0, 0
+ createsprite gUnknown_085957F8, 0x4, 0, 0, 16, 12, 96, 20, 1, 0
+ createsprite gUnknown_085957F8, 0x4, 0, 0, 16, 12, 160, 20, 0, 0
+ createsprite gUnknown_085957F8, 0x4, 0, 0, 16, 12, 224, 20, 2, 0
+ delay 0x4
+ waitforvisualfinish
+ createvisualtask sub_8115A04, 0x2, 3, -31, 1, 0, 0, 23551
+ createsprite gUnknown_0857FE28, 0x2, 4, 4
+ delay 0x4
+ playsewithpan SE_W063, +63
+ createsprite gUnknown_08597358, 0x82, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ waitforvisualfinish
+ createvisualtask sub_8115A04, 0x2, 4, -31, 2, 0, 6, 23551
+ call AnimScript_82D7BEA
+ waitforvisualfinish
+ end
+
+Move_ATTRACT:
+ loadspritegfx 0x27E8
+ loopsewithpan SE_W204, -64, 0xC, 0x3
+ createvisualtask sub_80D5EB8, 0x5, 0, 12, 4096, 4, 0
+ delay 0xF
+ createsprite gUnknown_085939A0, 0x83, 20, -8
+ waitforvisualfinish
+ playsewithpan SE_W213, +63
+ createsprite gUnknown_085939B8, 0x83, 160, -32
+ createsprite gUnknown_085939B8, 0x83, -256, -40
+ createsprite gUnknown_085939B8, 0x83, 128, -16
+ createsprite gUnknown_085939B8, 0x83, 416, -38
+ createsprite gUnknown_085939B8, 0x83, -128, -22
+ createsprite gUnknown_085939B8, 0x83, -384, -31
+ waitforvisualfinish
+ waitplaysewithpan SE_W213B, 0, 0xF
+ createvisualtask sub_81062E8, 0x5
+ createsprite gUnknown_085939D0, 0x28, 16, 256, 0
+ createsprite gUnknown_085939D0, 0x28, 224, 240, 15
+ createsprite gUnknown_085939D0, 0x28, 126, 272, 30
+ createsprite gUnknown_085939D0, 0x28, 80, 224, 45
+ createsprite gUnknown_085939D0, 0x28, 170, 272, 60
+ createsprite gUnknown_085939D0, 0x28, 40, 256, 75
+ createsprite gUnknown_085939D0, 0x28, 112, 256, 90
+ createsprite gUnknown_085939D0, 0x28, 200, 272, 90
+ delay 0x4B
+ createvisualtask sub_8115A04, 0x2, 4, 4, 4, 0, 10, 28479
+ end
+
+Move_GROWTH:
+ call AnimScript_82CBDC0
+ waitforvisualfinish
+ call AnimScript_82CBDC0
+ waitforvisualfinish
+ end
+
+AnimScript_82CBDC0:
+ createvisualtask sub_8115A04, 0x2, 2, 0, 2, 0, 8, 0x7FFF
+ playsewithpan SE_W036, -64
+ createvisualtask sub_80D6064, 0x5, -3, -3, 16, 0, 0
+ return
+
+Move_WHIRLWIND:
+ loadspritegfx 0x27B2
+ createsprite gUnknown_085963D4, 0x2, 0, -8, 1, 60, 0
+ createsprite gUnknown_085963D4, 0x2, 0, 0, 1, 60, 1
+ createsprite gUnknown_085963D4, 0x2, 0, 8, 1, 60, 2
+ createsprite gUnknown_085963D4, 0x2, 0, 16, 1, 60, 3
+ createsprite gUnknown_085963D4, 0x2, 0, 24, 1, 60, 4
+ createsprite gUnknown_085963D4, 0x2, 0, 32, 1, 60, 0
+ delay 0x5
+ loopsewithpan SE_W104, +63, 0xA, 0x4
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 15, 1
+ delay 0x1D
+ createvisualtask sub_80D5830, 0x2, 1, 12, 6, 1, 5
+ delay 0x7
+ playsewithpan SE_W081, +63
+ createvisualtask sub_80D5DB0, 0x5, 1, 8
+ waitforvisualfinish
+ end
+
+Move_CONFUSE_RAY:
+ loadspritegfx 0x271D
+ monbg ANIM_DEF_PARTNER
+ fadetobg BG_GHOST
+ waitbgfadein
+ createvisualtask sub_8159278, 0x2, -64, 63, 2, 0
+ createvisualtask sub_8115C80, 0x2, 10013, 0, 6, 0, 14, 351
+ createsprite gUnknown_08596D14, 0x82, 28, 0, 288
+ waitforvisualfinish
+ setalpha 0x808
+ playsewithpan SE_W081B, +63
+ createsprite gUnknown_08596D2C, 0x82, 0, -16
+ waitforvisualfinish
+ delay 0x0
+ blendoff
+ clearmonbg ANIM_DEF_PARTNER
+ restorebg
+ waitbgfadein
+ end
+
+Move_LOCK_ON:
+ loadspritegfx 0x271E
+ createsprite gUnknown_08592CA0, 0x28
+ createsprite gUnknown_08592CB8, 0x28, 1
+ createsprite gUnknown_08592CB8, 0x28, 2
+ createsprite gUnknown_08592CB8, 0x28, 3
+ createsprite gUnknown_08592CB8, 0x28, 4
+ delay 0x78
+ setarg 0x7, 0xFFFF
+ waitforvisualfinish
+ end
+
+Move_MEAN_LOOK:
+ loadspritegfx 0x27CB
+ monbg ANIM_DEF_PARTNER
+ playsewithpan SE_W060, -64
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 16, 0
+ loopsewithpan SE_W109, +63, 0xF, 0x4
+ waitplaysewithpan SE_W043, +63, 0x55
+ createsprite gUnknown_085CE104, 0x2
+ delay 0x78
+ createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, 0
+ delay 0x1E
+ clearmonbg ANIM_DEF_PARTNER
+ waitforvisualfinish
+ end
+
+Move_ROCK_THROW:
+ loadspritegfx 0x274A
+ createsprite gUnknown_085972D8, 0x82, 6, 1, 15, 1
+ createsprite gUnknown_08596B04, 0x82, 0, 1, 0, 0
+ playsewithpan SE_W088, +63
+ delay 0x6
+ createsprite gUnknown_08596B04, 0x82, 19, 1, 10, 0
+ playsewithpan SE_W088, +63
+ delay 0x6
+ createsprite gUnknown_08596B04, 0x82, -23, 2, -10, 0
+ playsewithpan SE_W088, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 5, 20, 1
+ delay 0x6
+ createsprite gUnknown_08596B04, 0x82, -15, 1, -10, 0
+ playsewithpan SE_W088, +63
+ delay 0x6
+ createsprite gUnknown_08596B04, 0x82, 23, 2, 10, 0
+ playsewithpan SE_W088, +63
+ waitforvisualfinish
+ end
+
+Move_ROCK_SLIDE:
+ loadspritegfx 0x274A
+ monbg ANIM_DEF_PARTNER
+ createsprite gUnknown_085972D8, 0x2, 7, 1, 11, 1
+ createsprite gUnknown_08596B04, 0x82, -5, 1, -5, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, 5, 0, 6, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, 19, 1, 10, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, -23, 2, -10, 1
+ playsewithpan SE_W088, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 5, 50, 1
+ createvisualtask sub_80D51AC, 0x2, 3, 0, 5, 50, 1
+ delay 0x2
+ call AnimScript_82CC083
+ call AnimScript_82CC083
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+AnimScript_82CC083:
+ createsprite gUnknown_08596B04, 0x82, -20, 0, -10, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, 28, 1, 10, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, -10, 1, -5, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, 10, 0, 6, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, 24, 1, 10, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, -32, 2, -10, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, -20, 0, -10, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ createsprite gUnknown_08596B04, 0x82, 30, 2, 10, 1
+ playsewithpan SE_W088, +63
+ delay 0x2
+ return
+
+Move_THIEF:
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ delay 0x1
+ fadetobg BG_DARK
+ waitbgfadein
+ setalpha 0x80C
+ createsprite gUnknown_0857FE28, 0x2, 6, 4
+ delay 0x6
+ playsewithpan SE_W233, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 1, 0, 8, 1
+ waitforvisualfinish
+ delay 0x14
+ clearmonbg ANIM_TARGET
+ blendoff
+ restorebg
+ waitbgfadein
+ end
+
+Move_BUBBLE_BEAM:
+ loadspritegfx 0x27A2
+ loadspritegfx 0x27AB
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ delay 0x1
+ call AnimScript_82CC1AD
+ createvisualtask sub_80D5EB8, 0x5, 0, 3, 3072, 8, 1
+ call AnimScript_82CC1AD
+ call AnimScript_82CC1AD
+ waitforvisualfinish
+ call AnimScript_82D7AE2
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+AnimScript_82CC1AD:
+ createsprite gUnknown_08595068, 0x2, 18, 0, 35, 70, 0, 256, 50
+ playsewithpan SE_W145, -64
+ delay 0x3
+ createsprite gUnknown_08595068, 0x2, 18, 0, 20, 40, -10, 256, 50
+ playsewithpan SE_W145, -64
+ delay 0x3
+ createsprite gUnknown_08595068, 0x2, 18, 0, 10, -60, 0, 256, 50
+ playsewithpan SE_W145, -64
+ delay 0x3
+ createsprite gUnknown_08595068, 0x2, 18, 0, 15, -15, 10, 256, 50
+ playsewithpan SE_W145, -64
+ delay 0x3
+ createsprite gUnknown_08595068, 0x2, 18, 0, 30, 10, -10, 256, 50
+ playsewithpan SE_W145, -64
+ delay 0x3
+ createsprite gUnknown_08595068, 0x2, 18, 0, 25, -30, 10, 256, 50
+ playsewithpan SE_W145, -64
+ delay 0x3
+ return
+
+Move_ICY_WIND:
+ loadspritegfx 0x279D
+ loadspritegfx 0x279E
+ monbg ANIM_DEF_PARTNER
+ createvisualtask sub_8116620, 0xA, 11, 4, 0, 4, 0
+ fadetobg BG_ICE
+ waitbgfadeout
+ playsewithpan SE_W196, 0
+ waitbgfadein
+ waitforvisualfinish
+ panse_1B SE_W016, -64, +63, +2, 0x0
+ call AnimScript_82CC2A8
+ delay 0x5
+ call AnimScript_82CC2A8
+ playsewithpan SE_W016B, +63
+ delay 0x37
+ call AnimScript_82D78F8
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ restorebg
+ waitbgfadeout
+ createvisualtask sub_8116620, 0xA, 11, 4, 4, 0, 0
+ waitbgfadein
+ end
+
+AnimScript_82CC2A8:
+ createsprite gUnknown_08595B98, 0xA8, 0, 0, 0, 0, 72, 1
+ delay 0x5
+ createsprite gUnknown_08595B98, 0xA8, 0, 10, 0, 10, 72, 1
+ delay 0x5
+ createsprite gUnknown_08595B98, 0xA8, 0, -10, 0, -10, 72, 1
+ delay 0x5
+ createsprite gUnknown_08595B98, 0xA8, 0, 15, 0, 15, 72, 1
+ delay 0x5
+ createsprite gUnknown_08595B98, 0xA8, 0, -5, 0, -5, 72, 1
+ return
+
+Move_SMOKESCREEN:
+ loadspritegfx 0x2720
+ loadspritegfx 0x2721
+ playsewithpan SE_W104, -64
+ createsprite gUnknown_085CE050, 0x82, 20, 0, 0, 0, 35, -25
+ waitforvisualfinish
+ createvisualtask sub_815A160, 0x2
+ delay 0x2
+ playsewithpan SE_W028, +63
+ createsprite gUnknown_085CE038, 0x84, 0, -12, 104, 0, 75
+ createsprite gUnknown_085CE038, 0x84, 0, -12, 72, 1, 75
+ createsprite gUnknown_085CE038, 0x84, 0, -6, 56, 1, 75
+ createsprite gUnknown_085CE038, 0x84, 0, -6, 88, 0, 75
+ createsprite gUnknown_085CE038, 0x84, 0, 0, 56, 0, 75
+ createsprite gUnknown_085CE038, 0x84, 0, 0, 88, 1, 75
+ createsprite gUnknown_085CE038, 0x84, 0, 6, 72, 0, 75
+ createsprite gUnknown_085CE038, 0x84, 0, 6, 104, 1, 75
+ createsprite gUnknown_085CE038, 0x84, 0, 12, 72, 0, 75
+ createsprite gUnknown_085CE038, 0x84, 0, 12, 56, 1, 75
+ createsprite gUnknown_085CE038, 0x84, 0, 18, 80, 0, 75
+ createsprite gUnknown_085CE038, 0x84, 0, 18, 72, 1, 75
+ waitforvisualfinish
+ end
+
+Move_CONVERSION:
+ loadspritegfx 0x2722
+ monbg ANIM_ATK_PARTNER
+ monbgprio_28 ANIM_ATTACKER
+ setalpha 0x10
+ delay 0x0
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_08592E74, 0x2, -24, -24
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, -8, -24
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, 8, -24
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, 24, -24
+ delay 0x3
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_08592E74, 0x2, -24, -8
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, -8, -8
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, 8, -8
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, 24, -8
+ delay 0x3
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_08592E74, 0x2, -24, 8
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, -8, 8
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, 8, 8
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, 24, 8
+ delay 0x3
+ playsewithpan SE_W129, -64
+ createsprite gUnknown_08592E74, 0x2, -24, 24
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, -8, 24
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, 8, 24
+ delay 0x3
+ createsprite gUnknown_08592E74, 0x2, 24, 24
+ delay 0x14
+ playsewithpan SE_W112, -64
+ createvisualtask sub_8115D94, 0x2, 10018, 1, 1, 14335, 12, 0, 0
+ delay 0x6
+ createvisualtask sub_81022D4, 0x5
+ waitforvisualfinish
+ delay 0x1
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ end
+
+Move_CONVERSION_2:
+ loadspritegfx 0x2722
+ monbg ANIM_DEF_PARTNER
+ monbgprio_2A ANIM_TARGET
+ setalpha 0x1000
+ delay 0x0
+ playsewithpan SE_W112, +63
+ createsprite gUnknown_08592EA4, 0x2, -24, -24, 60
+ createsprite gUnknown_08592EA4, 0x2, -8, -24, 65
+ createsprite gUnknown_08592EA4, 0x2, 8, -24, 70
+ createsprite gUnknown_08592EA4, 0x2, 24, -24, 75
+ createsprite gUnknown_08592EA4, 0x2, -24, -8, 80
+ createsprite gUnknown_08592EA4, 0x2, -8, -8, 85
+ createsprite gUnknown_08592EA4, 0x2, 8, -8, 90
+ createsprite gUnknown_08592EA4, 0x2, 24, -8, 95
+ createsprite gUnknown_08592EA4, 0x2, -24, 8, 100
+ createsprite gUnknown_08592EA4, 0x2, -8, 8, 105
+ createsprite gUnknown_08592EA4, 0x2, 8, 8, 110
+ createsprite gUnknown_08592EA4, 0x2, 24, 8, 115
+ createsprite gUnknown_08592EA4, 0x2, -24, 24, 120
+ createsprite gUnknown_08592EA4, 0x2, -8, 24, 125
+ createsprite gUnknown_08592EA4, 0x2, 8, 24, 130
+ createsprite gUnknown_08592EA4, 0x2, 24, 24, 135
+ createvisualtask sub_81023E0, 0x5
+ delay 0x3C
+ playsewithpan SE_W129, +63
+ delay 0xA
+ playsewithpan SE_W129, +63
+ delay 0xA
+ playsewithpan SE_W129, +63
+ delay 0xA
+ playsewithpan SE_W129, +63
+ delay 0xA
+ playsewithpan SE_W129, +63
+ delay 0xA
+ playsewithpan SE_W129, +63
+ delay 0xA
+ playsewithpan SE_W129, +63
+ delay 0xA
+ playsewithpan SE_W129, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_ROLLING_KICK:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80D5830, 0x2, 0, 18, 6, 1, 4
+ playsewithpan SE_W104, -64
+ delay 0x6
+ playsewithpan SE_W104, -64
+ waitforvisualfinish
+ createsprite gUnknown_0857FE70, 0x2, 0, 20, 0, 0, 4
+ createsprite gUnknown_08595EE0, 0x2, -24, 0, 48, 10, 160, 0
+ delay 0x5
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08597358, 0x2, -8, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 6, 1
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 0, 1, 8
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_HEADBUTT:
+ loadspritegfx 0x2797
+ createsprite gUnknown_08592CD8, 0x2, 0
+ playsewithpan SE_W029, -64
+ waitforvisualfinish
+ delay 0x2
+ createsprite gUnknown_08592CD8, 0x2, 1
+ waitforvisualfinish
+ createvisualtask sub_80D5484, 0x2, 0, 2, 0, 4, 1
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 6, 1
+ createsprite gUnknown_08592CD8, 0x2, 2
+ createsprite gUnknown_085973E8, 0x83, 0, 0, 1, 1
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ end
+
+Move_HORN_ATTACK:
+ loadspritegfx 0x2797
+ loadspritegfx 0x2724
+ createsprite gUnknown_08592CD8, 0x2, 0
+ playsewithpan SE_W029, -64
+ waitforvisualfinish
+ delay 0x2
+ createsprite gUnknown_08592CD8, 0x2, 1
+ createsprite gUnknown_08592F44, 0x84, 0, 0, 10
+ waitforvisualfinish
+ createvisualtask sub_80D5484, 0x2, 0, 2, 0, 4, 1
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 6, 1
+ createsprite gUnknown_08592CD8, 0x2, 2
+ createsprite gUnknown_085973E8, 0x83, 0, 0, 1, 1
+ playsewithpan SE_W030, +63
+ waitforvisualfinish
+ end
+
+Move_FURY_ATTACK:
+ loadspritegfx 0x2797
+ loadspritegfx 0x2724
+ createvisualtask sub_80D6134, 0x2, 4, 256, 0, 2
+ choosetwoturnanim AnimScript_82CC7B8, AnimScript_82CC7DE
+
+AnimScript_82CC7A5:
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 6, 1
+ waitforvisualfinish
+ end
+
+AnimScript_82CC7B8:
+ createsprite gUnknown_08592F44, 0x84, 8, 8, 10
+ waitforvisualfinish
+ createsprite gUnknown_085973E8, 0x83, 0, 0, 1, 1
+ playsewithpan SE_W030, +63
+ goto AnimScript_82CC7A5
+
+AnimScript_82CC7DE:
+ createsprite gUnknown_08592F44, 0x84, -8, -8, 10
+ waitforvisualfinish
+ createsprite gUnknown_085973E8, 0x83, 0, 0, 1, 1
+ playsewithpan SE_W030, +63
+ goto AnimScript_82CC7A5
+
+Move_HORN_DRILL:
+ loadspritegfx 0x2797
+ loadspritegfx 0x2724
+ jumpifcontest AnimScript_82CC96A
+ fadetobg BG_DRILL
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, -2304, 768, 1, -1
+
+AnimScript_82CC821:
+ waitbgfadein
+ setalpha 0x80C
+ createsprite gUnknown_08592CD8, 0x2, 0
+ playsewithpan SE_W029, -64
+ waitforvisualfinish
+ delay 0x2
+ createsprite gUnknown_08592CD8, 0x2, 1
+ createsprite gUnknown_08592F44, 0x84, 0, 0, 12
+ waitforvisualfinish
+ playse SE_BAN
+ createvisualtask sub_80D5484, 0x2, 0, 2, 0, 40, 1
+ createvisualtask sub_80D5484, 0x2, 1, 10, 0, 40, 1
+ createsprite gUnknown_085973E8, 0x83, 0, 0, 1, 3
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, 0, 2, 1, 3
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, -4, 3, 1, 3
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, -8, -5, 1, 3
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, 4, -12, 1, 3
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, 16, 0, 1, 3
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, 5, 18, 1, 3
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, -17, 12, 1, 2
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, -21, -15, 1, 2
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, 8, -27, 1, 2
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_085973E8, 0x83, 32, 0, 1, 2
+ playsewithpan SE_W030, +63
+ delay 0x4
+ createsprite gUnknown_08592CD8, 0x2, 2
+ waitforvisualfinish
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ end
+
+AnimScript_82CC96A:
+ fadetobg BG_DRILL_CONTESTS
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, 2304, 768, 0, -1
+ goto AnimScript_82CC821
+
+Move_THRASH:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ createvisualtask sub_8104C38, 0x2
+ createvisualtask sub_8104CA4, 0x2
+ createsprite gUnknown_08595EB0, 0x83, 1, 10, 0
+ createvisualtask sub_80D5484, 0x2, 1, 4, 0, 7, 1
+ playsewithpan SE_W004, +63
+ delay 0x1C
+ createsprite gUnknown_08595EB0, 0x83, 1, 10, 1
+ createvisualtask sub_80D5484, 0x2, 1, 4, 0, 7, 1
+ playsewithpan SE_W233B, +63
+ delay 0x1C
+ createsprite gUnknown_08595EB0, 0x83, 1, 10, 3
+ createvisualtask sub_80D5484, 0x2, 1, 8, 0, 16, 1
+ playsewithpan SE_W025B, +63
+ end
+
+Move_SING:
+ loadspritegfx 0x2758
+ monbg ANIM_DEF_PARTNER
+ createvisualtask sub_8102BE8, 0x2
+ waitforvisualfinish
+ panse_1B SE_W047, -64, +63, +2, 0x0
+ createsprite gUnknown_08593008, 0x82, 7, 0, 12
+ delay 0x5
+ createsprite gUnknown_08593008, 0x82, 6, 1, 12
+ delay 0x5
+ createsprite gUnknown_08593008, 0x82, 1, 2, 12
+ delay 0x5
+ createsprite gUnknown_08593008, 0x82, 2, 3, 12
+ delay 0x5
+ createsprite gUnknown_08593008, 0x82, 3, 0, 12
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 2, 1, 12
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 5, 2, 12
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 6, 3, 12
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 2, 0, 12
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 2, 1, 12
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 1, 2, 12
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 5, 3, 12
+ delay 0x4
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ createvisualtask sub_8102CA0, 0x2
+ waitforvisualfinish
+ end
+
+Move_LOW_KICK:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ createsprite gUnknown_0857FE70, 0x2, 0, 20, 0, 0, 4
+ createsprite gUnknown_08595EE0, 0x82, -24, 28, 40, 8, 160, 0
+ delay 0x4
+ createsprite gUnknown_08597358, 0x82, -8, 8, 1, 2
+ createvisualtask sub_80D6134, 0x2, 6, 384, 1, 2
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 0, 1, 4
+ end
+
+Move_EARTHQUAKE:
+ createvisualtask sub_81152DC, 0x5, 5, 10, 50
+ createvisualtask sub_81152DC, 0x5, 4, 10, 50
+ playsewithpan SE_W089, 0
+ delay 0xA
+ createsprite gUnknown_0859728C, 0x2, 1, 3, 1, 0, 14, 0x7FFF, 14
+ delay 0x10
+ createsprite gUnknown_0859728C, 0x2, 1, 3, 1, 0, 14, 0x7FFF, 14
+ end
+
+Move_FISSURE:
+ loadspritegfx 0x275A
+ createvisualtask sub_81152DC, 0x3, 5, 10, 50
+ createvisualtask sub_81152DC, 0x3, 1, 10, 50
+ playsewithpan SE_W089, +63
+ delay 0x8
+ call AnimScript_82CCBFF
+ delay 0xF
+ createsprite gUnknown_0859728C, 0x2, 1, 3, 1, 0, 14, 0x7FFF, 14
+ delay 0xF
+ call AnimScript_82CCC50
+ delay 0xF
+ createsprite gUnknown_0859728C, 0x2, 1, 3, 1, 0, 14, 0x7FFF, 14
+ delay 0xF
+ call AnimScript_82CCBFF
+ delay 0x32
+ fadetobg BG_FISSURE
+ waitbgfadeout
+ createvisualtask sub_8115628, 0x5, 1, 5, -1
+ waitbgfadein
+ delay 0x28
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ end
+
+AnimScript_82CCBFF:
+ createsprite gUnknown_085971FC, 0x82, 1, 0, 12, -48, -16, 24
+ createsprite gUnknown_085971FC, 0x82, 1, 0, 16, -16, -10, 24
+ createsprite gUnknown_085971FC, 0x82, 1, 1, 14, -52, -18, 24
+ createsprite gUnknown_085971FC, 0x82, 1, 1, 12, -32, -16, 24
+ playsewithpan SE_W091, +63
+ return
+
+AnimScript_82CCC50:
+ createsprite gUnknown_085971FC, 0x82, 1, 0, 12, -24, -16, 24
+ createsprite gUnknown_085971FC, 0x82, 1, 0, 16, -38, -10, 24
+ createsprite gUnknown_085971FC, 0x82, 1, 1, 14, -20, -18, 24
+ createsprite gUnknown_085971FC, 0x82, 1, 1, 12, -36, -16, 24
+ playsewithpan SE_W091, +63
+ return
+
+Move_DIG:
+ choosetwoturnanim AnimScript_82CCCAB, AnimScript_82CCD06
+
+AnimScript_82CCCAA:
+ end
+
+AnimScript_82CCCAB:
+ loadspritegfx 0x275A
+ loadspritegfx 0x2829
+ createsprite gUnknown_08597214, 0x1, 0, 0, 180
+ createsprite gUnknown_08597214, 0x1, 0, 1, 180
+ monbg_22 ANIM_ATTACKER
+ delay 0x1
+ createvisualtask sub_8114CBC, 0x2, 0
+ delay 0x6
+ call AnimScript_82CCD6A
+ call AnimScript_82CCD6A
+ call AnimScript_82CCD6A
+ call AnimScript_82CCD6A
+ call AnimScript_82CCD6A
+ waitforvisualfinish
+ clearmonbg_23 ANIM_ATTACKER
+ delay 0x1
+ createvisualtask sub_8114CBC, 0x2, 1
+ goto AnimScript_82CCCAA
+
+AnimScript_82CCD06:
+ loadspritegfx 0x2797
+ loadspritegfx 0x2829
+ createvisualtask sub_8114F14, 0x2, 0
+ waitforvisualfinish
+ monbg ANIM_ATTACKER
+ createsprite gUnknown_08597214, 0x1, 0, 0, 48
+ createsprite gUnknown_08597214, 0x1, 0, 1, 48
+ delay 0x1
+ createvisualtask sub_8114F14, 0x2, 1
+ delay 0x10
+ createsprite gUnknown_08597358, 0x2, -8, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 6, 1
+ playsewithpan SE_W025B, -64
+ clearmonbg ANIM_ATTACKER
+ goto AnimScript_82CCCAA
+
+AnimScript_82CCD6A:
+ createsprite gUnknown_085971FC, 0x2, 0, 0, 12, 4, -16, 18
+ createsprite gUnknown_085971FC, 0x2, 0, 0, 16, 4, -10, 18
+ createsprite gUnknown_085971FC, 0x2, 0, 1, 14, 4, -18, 18
+ createsprite gUnknown_085971FC, 0x2, 0, 1, 12, 4, -16, 18
+ playsewithpan SE_W091, -64
+ delay 0x20
+ return
+
+Move_MEDITATE:
+ call AnimScript_82D7CD1
+ createvisualtask sub_810F7D4, 0x2
+ playsewithpan SE_W029, -64
+ delay 0x10
+ playsewithpan SE_W036, -64
+ waitforvisualfinish
+ call AnimScript_82D7CDD
+ end
+
+Move_AGILITY:
+ monbg ANIM_ATK_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_80D5830, 0x2, 0, 24, 6, 4, 4
+ createvisualtask sub_81169C0, 0x2, 0, 4, 7, 10
+ playsewithpan SE_W104, -64
+ delay 0xC
+ playsewithpan SE_W104, -64
+ delay 0xC
+ playsewithpan SE_W104, -64
+ delay 0xC
+ playsewithpan SE_W104, -64
+ delay 0xC
+ playsewithpan SE_W104, -64
+ delay 0xC
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ delay 0x1
+ end
+
+Move_QUICK_ATTACK:
+ loadspritegfx 0x2797
+ monbg ANIM_ATK_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_80D5830, 0x2, 0, 24, 6, 1, 5
+ createvisualtask sub_81169C0, 0x2, 0, 4, 7, 3
+ playsewithpan SE_W026, -64
+ delay 0x4
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 6, 1
+ createsprite gUnknown_08597358, 0x84, 0, 0, 1, 1
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ waitforvisualfinish
+ end
+
+Move_RAGE:
+ loadspritegfx 0x2797
+ loadspritegfx 0x2767
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80A7B98, 0x3, 0, 31, 10, 0, 2
+ createsprite gUnknown_0859368C, 0x2, 0, -20, -28
+ playsewithpan SE_W207B, -64
+ delay 0x14
+ createsprite gUnknown_0859368C, 0x2, 0, 20, -28
+ playsewithpan SE_W207B, -64
+ waitforvisualfinish
+ createsprite gUnknown_0857FE28, 0x2, 4, 6
+ delay 0x4
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D6388, 0x2, 1, 1, 10, 1, 0
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ end
+
+Move_TELEPORT:
+ call AnimScript_82D7CD1
+ createvisualtask sub_810F83C, 0x2
+ playsewithpan SE_W100, -64
+ delay 0xF
+ call AnimScript_82D7CDD
+ waitforvisualfinish
+ end
+
+Move_DOUBLE_TEAM:
+ createvisualtask sub_81029B4, 0x2
+ setalpha 0x80C
+ monbg ANIM_ATK_PARTNER
+ playsewithpan SE_W104, -64
+ delay 0x20
+ playsewithpan SE_W104, -64
+ delay 0x18
+ playsewithpan SE_W104, -64
+ delay 0x10
+ playsewithpan SE_W104, -64
+ delay 0x8
+ playsewithpan SE_W104, -64
+ delay 0x8
+ playsewithpan SE_W104, -64
+ delay 0x8
+ playsewithpan SE_W104, -64
+ delay 0x8
+ playsewithpan SE_W104, -64
+ delay 0x8
+ playsewithpan SE_W104, -64
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ delay 0x1
+ end
+
+Move_MINIMIZE:
+ setalpha 0x80A
+ createvisualtask sub_8104674, 0x2
+ loopsewithpan SE_W107, -64, 0x22, 0x3
+ waitforvisualfinish
+ blendoff
+ end
+
+Move_METRONOME:
+ loadspritegfx 0x2750
+ loadspritegfx 0x27E1
+ createsprite gUnknown_08593114, 0xB, 0, 100
+ playsewithpan SE_W118, -64
+ delay 0x6
+ createsprite gUnknown_085931BC, 0xC, 0
+ delay 0x18
+ loopsewithpan SE_W039, -64, 0x16, 0x3
+ waitforvisualfinish
+ end
+
+Move_SKULL_BASH:
+ choosetwoturnanim AnimScript_82CCF99, AnimScript_82CCFE6
+
+AnimScript_82CCF98:
+ end
+
+AnimScript_82CCF99:
+ call AnimScript_82CCFA9
+ call AnimScript_82CCFA9
+ waitforvisualfinish
+ goto AnimScript_82CCF98
+
+AnimScript_82CCFA9:
+ createsprite gUnknown_0857FE88, 0x2, 0, -24, 0, 0, 10, 0
+ playsewithpan SE_W036, -64
+ waitforvisualfinish
+ createvisualtask sub_80D6134, 0x2, 16, 96, 0, 2
+ waitforvisualfinish
+ createsprite gUnknown_0857FE88, 0x2, 0, 24, 0, 0, 10, 1
+ waitforvisualfinish
+ return
+
+AnimScript_82CCFE6:
+ loadspritegfx 0x2797
+ createvisualtask sub_8101C94, 0x2, 0
+ playsewithpan SE_W036, -64
+ waitforvisualfinish
+ playse SE_BAN
+ createsprite gUnknown_0859728C, 0x2, 1, 3, 1, 0, 14, 0x7FFF, 14
+ createvisualtask sub_80D5484, 0x2, 0, 2, 0, 40, 1
+ createvisualtask sub_80D5484, 0x2, 1, 10, 0, 40, 1
+ createsprite gUnknown_085973E8, 0x84, 0, 0, 1, 0
+ loopsewithpan SE_W025B, +63, 0x8, 0x3
+ waitforvisualfinish
+ createvisualtask sub_8101C94, 0x2, 1
+ goto AnimScript_82CCF98
+
+Move_AMNESIA:
+ loadspritegfx 0x276D
+ call AnimScript_82D7CD1
+ delay 0x8
+ createsprite gUnknown_08596744, 0x14
+ playsewithpan SE_W118, -64
+ delay 0x36
+ loopsewithpan SE_W118, -64, 0x10, 0x3
+ waitforvisualfinish
+ call AnimScript_82D7CDD
+ end
+
+Move_KINESIS:
+ loadspritegfx 0x275B
+ loadspritegfx 0x2771
+ playsewithpan SE_W060, -64
+ call AnimScript_82D7CD1
+ createsprite gUnknown_085966DC, 0x14
+ createsprite gUnknown_08593344, 0x13, 32, -8, 0
+ createsprite gUnknown_08593344, 0x13, 32, 16, 1
+ loopsewithpan SE_W109, -64, 0x15, 0x2
+ delay 0x3C
+ playsewithpan SE_W146, -64
+ delay 0x1E
+ loopsewithpan SE_W146, -64, 0x14, 0x2
+ delay 0x46
+ playsewithpan SE_W207B, -64
+ waitforvisualfinish
+ call AnimScript_82D7CDD
+ end
+
+Move_GLARE:
+ loadspritegfx 0x2808
+ loadspritegfx 0x27EA
+ createvisualtask sub_815E114, 0x5, 0
+ playsewithpan SE_W060B, -64
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0x5, 1, 0, 0, 16, 0
+ waitforvisualfinish
+ createsprite gUnknown_08593A84, 0x0, -16, -8
+ createsprite gUnknown_08593A84, 0x0, 16, -8
+ createvisualtask sub_81064F8, 0x5
+ playsewithpan SE_W043, -64
+ delay 0x2
+ createvisualtask sub_810A094, 0x3, 20, 1, 0
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0x5, 1, 0, 16, 0, 0
+ end
+
+Move_BARRAGE:
+ loadspritegfx 0x280E
+ createvisualtask sub_815E47C, 0x3
+ playsewithpan SE_W207, -64
+ delay 0x18
+ createsprite gUnknown_085972D8, 0x2, 8, 1, 40, 1
+ createvisualtask sub_80D51AC, 0x3, 1, 0, 4, 20, 1
+ createvisualtask sub_80D51AC, 0x3, 3, 0, 4, 20, 1
+ loopsewithpan SE_W070, +63, 0x8, 0x2
+ end
+
+Move_SKY_ATTACK:
+ choosetwoturnanim AnimScript_82CD185, AnimScript_82CD28E
+
+AnimScript_82CD184:
+ end
+
+AnimScript_82CD185:
+ monbg ANIM_DEF_PARTNER
+ setalpha 0xB0C
+ createvisualtask sub_81177AC, 0x5, 7
+ jumpargeq 0x7, 0x0, AnimScript_82CD1A0
+ goto AnimScript_82CD217
+
+AnimScript_82CD1A0:
+ createvisualtask sub_8116620, 0xA, 27, 1, 0, 12, 0
+ waitforvisualfinish
+ delay 0xC
+ createvisualtask sub_8116620, 0xA, 2, 1, 8, 0, 0
+ createvisualtask sub_81152DC, 0x5, 0, 2, 16
+ loopsewithpan SE_W287, -64, 0x4, 0x8
+ createvisualtask sub_8116620, 0xA, 2, 1, 0, 15, 0x7FFF
+ delay 0x14
+ createvisualtask sub_8116620, 0xA, 2, 1, 15, 0, 0x7FFF
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 25, 1, 8, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ goto AnimScript_82CD184
+
+AnimScript_82CD217:
+ createvisualtask sub_8116664, 0xA, 1, 1, 0, 12, 0
+ waitforvisualfinish
+ delay 0xC
+ createvisualtask sub_8116620, 0xA, 2, 1, 8, 0, 0
+ createvisualtask sub_81152DC, 0x5, 0, 2, 16
+ playsewithpan SE_W287, -64
+ delay 0x8
+ createvisualtask sub_8116620, 0xA, 2, 1, 0, 15, 0x7FFF
+ delay 0x14
+ createvisualtask sub_8116620, 0xA, 2, 1, 15, 0, 0x7FFF
+ waitforvisualfinish
+ createvisualtask sub_8116664, 0xA, 4, 1, 8, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ goto AnimScript_82CD184
+
+AnimScript_82CD28E:
+ loadspritegfx 0x2797
+ loadspritegfx 0x282C
+ call AnimScript_82D7CE5
+ monbg ANIM_ATTACKER
+ createvisualtask sub_8116620, 0xA, 2, 0, 0, 16, 0x7FFF
+ delay 0x4
+ createvisualtask sub_81136E8, 0x5, 0
+ waitforvisualfinish
+ createvisualtask sub_8159244, 0x5, 238, -64
+ createsprite gUnknown_08596514, 0x82
+ delay 0xE
+ createvisualtask sub_80D52D0, 0x2, 1, 10, 0, 18, 1
+ createvisualtask sub_8159210, 0x5, 141, 63
+ delay 0x14
+ createvisualtask sub_81137E4, 0x5, 1
+ delay 0x2
+ createvisualtask sub_8116620, 0xA, 2, 0, 15, 0, 0x7FFF
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ call AnimScript_82D7D15
+ goto AnimScript_82CD184
+
+Move_FLASH:
+ playsewithpan SE_W043, -64
+ createvisualtask sub_8117494, 0x2
+ waitforvisualfinish
+ end
+
+Move_SPLASH:
+ createvisualtask sub_8104938, 0x2, 0, 3
+ delay 0x8
+ loopsewithpan SE_W039, -64, 0x26, 0x3
+ waitforvisualfinish
+ end
+
+Move_ACID_ARMOR:
+ monbg ANIM_ATTACKER
+ setalpha 0xF
+ createvisualtask sub_815D240, 0x2, 0
+ playsewithpan SE_W151, -64
+ waitforvisualfinish
+ blendoff
+ clearmonbg ANIM_ATTACKER
+ delay 0x1
+ end
+
+Move_SHARPEN:
+ loadspritegfx 0x27C9
+ createsprite gUnknown_08592DE4, 0x2
+ waitforvisualfinish
+ end
+
+Move_SUPER_FANG:
+ loadspritegfx 0x27D0
+ createvisualtask sub_80D5484, 0x2, 0, 1, 0, 20, 1
+ playsewithpan SE_W082, -64
+ waitforvisualfinish
+ createvisualtask sub_80D5484, 0x2, 0, 3, 0, 48, 1
+ createvisualtask sub_80A7B98, 0x2, 0, 1247, 12, 4, 1
+ waitforvisualfinish
+ delay 0x14
+ createsprite gUnknown_0857FE28, 0x2, 4, 4
+ delay 0x4
+ createsprite gUnknown_08592F74, 0x82
+ playsewithpan SE_W044, +63
+ delay 0x8
+ createsprite gUnknown_0859728C, 0x2, 1, 3, 1, 2143, 14, 0x7FFF, 14
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 7, 12, 1
+ waitforvisualfinish
+ blendoff
+ end
+
+Move_SLASH:
+ loadspritegfx 0x27C7
+ createsprite gUnknown_08592D2C, 0x82, 1, -8, 0
+ playsewithpan SE_W013, +63
+ delay 0x4
+ createsprite gUnknown_08592D2C, 0x82, 1, 8, 0
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 18, 1
+ playsewithpan SE_W013, +63
+ waitforvisualfinish
+ end
+
+Move_STRUGGLE:
+ loadspritegfx 0x2797
+ loadspritegfx 0x27E7
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80D5484, 0x2, 0, 3, 0, 12, 4
+ createsprite gUnknown_08593B80, 0x2, 0, 0, 2
+ createsprite gUnknown_08593B80, 0x2, 0, 1, 2
+ loopsewithpan SE_W029, -64, 0xC, 0x4
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 2
+ createvisualtask sub_80D5484, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W025B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_SKETCH:
+ loadspritegfx 0x2712
+ monbg ANIM_TARGET
+ createvisualtask sub_8104E74, 0x2
+ createsprite gUnknown_085936D4, 0x82
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ createvisualtask sub_8104938, 0x2, 0, 2
+ loopsewithpan SE_W039, -64, 0x26, 0x2
+ end
+
+Move_NIGHTMARE:
+ fadetobg BG_GHOST
+ waitbgfadein
+ jumpifcontest AnimScript_82CD4CF
+ monbg ANIM_DEF_PARTNER
+ createvisualtask sub_8111C50, 0x2
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 40, 1
+ playsewithpan SE_W171, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ restorebg
+ waitbgfadein
+ end
+
+AnimScript_82CD4CF:
+ createvisualtask sub_80A7B98, 0x2, 0, 0x7FFF, 10, 2, 1
+ createvisualtask sub_80D51AC, 0x2, 0, 3, 0, 32, 1
+ playsewithpan SE_W171, +63
+ waitforvisualfinish
+ restorebg
+ waitbgfadein
+ end
+
+Move_FLAIL:
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_815C770, 0x2, 0
+ loopsewithpan SE_W029, -64, 0x8, 0x2
+ waitforvisualfinish
+ createsprite gUnknown_085973A0, 0x83, 1, 3
+ createvisualtask sub_80D6388, 0x2, 0, 1, 30, 1, 0
+ playsewithpan SE_W025B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_SPITE:
+ fadetobg BG_GHOST
+ playsewithpan SE_W060, -64
+ waitbgfadein
+ monbg ANIM_DEF_PARTNER
+ createvisualtask sub_8115A04, 0x2, 2, 2, 6, 0, 8, 0x7FFF
+ createvisualtask sub_8111E50, 0x2
+ loopsewithpan SE_W060, +63, 0x14, 0x3
+ waitforvisualfinish
+ restorebg
+ waitbgfadein
+ clearmonbg ANIM_TARGET
+ end
+
+Move_MACH_PUNCH:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ monbg ANIM_ATK_PARTNER
+ createvisualtask sub_8117754, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82CD5E6
+ fadetobg BG_HIGHSPEED_OPPONENT
+
+AnimScript_82CD57E:
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, -2304, 0, 1, -1
+ waitbgfadein
+ delay 0x0
+ setalpha 0x809
+ createvisualtask sub_80A8BC4, 0x2, 28968, 10
+ playsewithpan SE_W026, -64
+ delay 0x6
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 1
+ createsprite gUnknown_08595E98, 0x84, 0, 0, 8, 1, 0
+ playsewithpan SE_W004, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ end
+
+AnimScript_82CD5E6:
+ fadetobg BG_HIGHSPEED_PLAYER
+ goto AnimScript_82CD57E
+
+Move_FORESIGHT:
+ loadspritegfx 0x2812
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x10
+ createsprite gUnknown_085CE8C4, 0x82, 1
+ delay 0x11
+ loopsewithpan SE_W166, +63, 0x10, 0x4
+ delay 0x30
+ delay 0x18
+ playsewithpan SE_W166, +63
+ delay 0xA
+ createvisualtask sub_80A7B98, 0x5, 1, 0x7FFF, 12, 2, 1
+ playsewithpan SE_W197, +63
+ waitforvisualfinish
+ blendoff
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Move_DESTINY_BOND:
+ loadspritegfx 0x27CC
+ fadetobg BG_GHOST
+ playsewithpan SE_W060, -64
+ waitbgfadein
+ createvisualtask sub_81123C4, 0x5, 0, 48
+ playsewithpan SE_W109, -64
+ delay 0x30
+ createvisualtask sub_80D5484, 0x2, 0, 2, 0, 24, 1
+ createvisualtask sub_8116664, 0x2, 6, 1, 0, 12, 30653
+ delay 0x18
+ createvisualtask sub_8116664, 0x2, 6, 1, 12, 0, 30653
+ playsewithpan SE_W171, +63
+ waitforvisualfinish
+ restorebg
+ waitbgfadein
+ blendoff
+ clearmonbg 5
+ end
+
+Move_ENDURE:
+ loadspritegfx 0x27C8
+ playsewithpan SE_W082, -64
+ call AnimScript_82CD6C7
+ delay 0x8
+ createvisualtask sub_8115A04, 0x2, 2, 2, 2, 0, 11, 31
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 32, 1
+ call AnimScript_82CD6C7
+ delay 0x8
+ call AnimScript_82CD6C7
+ waitforvisualfinish
+ end
+
+AnimScript_82CD6C7:
+ createsprite gUnknown_08592D8C, 0x2, 0, -24, 26, 2
+ delay 0x4
+ createsprite gUnknown_08592D8C, 0x2, 0, 14, 28, 1
+ delay 0x4
+ createsprite gUnknown_08592D8C, 0x2, 0, -5, 10, 2
+ delay 0x4
+ createsprite gUnknown_08592D8C, 0x2, 0, 28, 26, 3
+ delay 0x4
+ createsprite gUnknown_08592D8C, 0x2, 0, -12, 0, 1
+ return
+
+Move_CHARM:
+ loadspritegfx 0x27E2
+ createvisualtask sub_815C478, 0x5, 0, 2, 0
+ createsprite gUnknown_08593970, 0x3, 0, 20
+ playsewithpan SE_W204, -64
+ delay 0xF
+ createsprite gUnknown_08593970, 0x3, -20, 20
+ playsewithpan SE_W204, -64
+ delay 0xF
+ createsprite gUnknown_08593970, 0x3, 20, 20
+ playsewithpan SE_W204, -64
+ waitforvisualfinish
+ end
+
+Move_ROLLOUT:
+ loadspritegfx 0x2797
+ loadspritegfx 0x275A
+ loadspritegfx 0x274A
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_8110F74, 0x2
+ waitforvisualfinish
+ createvisualtask sub_80D6388, 0x2, 0, 1, 30, 1, 0
+ createsprite gUnknown_08597358, 0x4, 0, 0, 1, 2
+ playsewithpan SE_W025B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_FALSE_SWIPE:
+ loadspritegfx 0x282E
+ loadspritegfx 0x2797
+ createsprite gUnknown_08592D44, 0x82
+ playsewithpan SE_W233, +63
+ delay 0x10
+ createsprite gUnknown_08592D5C, 0x82, 0
+ playsewithpan SE_W104, +63
+ delay 0x2
+ createsprite gUnknown_08592D5C, 0x82, 16
+ delay 0x2
+ createsprite gUnknown_08592D5C, 0x82, 32
+ playsewithpan SE_W104, +63
+ delay 0x2
+ createsprite gUnknown_08592D5C, 0x82, 48
+ delay 0x2
+ createsprite gUnknown_08592D5C, 0x82, 64
+ playsewithpan SE_W104, +63
+ delay 0x2
+ createsprite gUnknown_08592D5C, 0x82, 80
+ delay 0x2
+ waitforvisualfinish
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 6, 1
+ createsprite gUnknown_08597358, 0x84, 0, 0, 1, 3
+ playsewithpan SE_W004, +63
+ end
+
+Move_SWAGGER:
+ loadspritegfx 0x2766
+ loadspritegfx 0x2767
+ createvisualtask sub_8104AB4, 0x2
+ playsewithpan SE_W207, -64
+ waitforvisualfinish
+ createsprite gUnknown_08593658, 0x2
+ loopsewithpan SE_W207, -64, 0x4, 0x2
+ waitforvisualfinish
+ delay 0x18
+ createsprite gUnknown_0859368C, 0x82, 1, -20, -28
+ playsewithpan SE_W207B, +63
+ delay 0xC
+ createsprite gUnknown_0859368C, 0x82, 1, 20, -28
+ playsewithpan SE_W207B, +63
+ waitforvisualfinish
+ end
+
+Move_MILK_DRINK:
+ loadspritegfx 0x2773
+ loadspritegfx 0x27DB
+ loadspritegfx 0x272F
+ monbg ANIM_TARGET
+ createsprite gUnknown_08592B3C, 0x2
+ delay 0x28
+ playsewithpan SE_W152, -64
+ delay 0xC
+ playsewithpan SE_W152, -64
+ delay 0x14
+ playsewithpan SE_W152, -64
+ waitforvisualfinish
+ createsprite gUnknown_0859381C, 0x3, 0, 0, 1, 0
+ playsewithpan SE_W208, -64
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ call AnimScript_82D7A28
+ waitforvisualfinish
+ end
+
+Move_MAGNITUDE:
+ createvisualtask sub_8115600, 0x2
+ waitforvisualfinish
+ jumpargeq 0xF, 0x0, AnimScript_82CD8C9
+ jumpargeq 0xF, 0x1, AnimScript_82CD8EE
+
+AnimScript_82CD8C8:
+ end
+
+AnimScript_82CD8C9:
+ createvisualtask sub_81152DC, 0x5, 5, 0, 50
+ createvisualtask sub_81152DC, 0x5, 4, 0, 50
+ loopsewithpan SE_W070, +63, 0x8, 0xA
+ goto AnimScript_82CD8C8
+
+AnimScript_82CD8EE:
+ createvisualtask sub_81152DC, 0x5, 5, 0, 50
+ createvisualtask sub_81152DC, 0x5, 4, 0, 50
+ loopsewithpan SE_W070, +63, 0x8, 0xA
+ delay 0xA
+ createsprite gUnknown_0859728C, 0x2, 1, 3, 1, 0, 14, 0x7FFF, 14
+ delay 0x10
+ createsprite gUnknown_0859728C, 0x2, 1, 3, 1, 0, 14, 0x7FFF, 14
+ goto AnimScript_82CD8C8
+
+Move_RAPID_SPIN:
+ loadspritegfx 0x2797
+ loadspritegfx 0x27F5
+ monbg ANIM_ATTACKER
+ createsprite gUnknown_085CE288, 0x2, 0, 0, 32, -32, 40, -2
+ createvisualtask sub_815ADB0, 0x2, 0, 2, 0
+ loopsewithpan SE_W013B, -64, 0x8, 0x4
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x82, 0, 0, 1, 2
+ createvisualtask sub_80D6388, 0x2, 0, 1, 10, 1, 0
+ playsewithpan SE_W003, +63
+ waitforvisualfinish
+ delay 0x8
+ createvisualtask sub_815ADB0, 0x2, 0, 2, 1
+ loopsewithpan SE_W013B, -64, 0x8, 0x4
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ end
+
+Move_MOONLIGHT:
+ loadspritegfx 0x27D2
+ loadspritegfx 0x27D3
+ loadspritegfx 0x272F
+ setalpha 0x1000
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 16, 0
+ waitforvisualfinish
+ createsprite gUnknown_08592EBC, 0x2, 120, 56
+ createvisualtask sub_80A7A74, 0x3, 0, 16, 16, 0, 1
+ playsewithpan SE_W236, 0
+ delay 0x1E
+ createsprite gUnknown_08592EEC, 0x28, -12, 0
+ delay 0x1E
+ createsprite gUnknown_08592EEC, 0x28, -24, 0
+ delay 0x1E
+ createsprite gUnknown_08592EEC, 0x28, 21, 0
+ delay 0x1E
+ createsprite gUnknown_08592EEC, 0x28, 0, 0
+ delay 0x1E
+ createsprite gUnknown_08592EEC, 0x28, 10, 0
+ delay 0x14
+ createvisualtask sub_81025C0, 0x2
+ waitforvisualfinish
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ end
+
+Move_EXTREME_SPEED:
+ loadspritegfx 0x27DF
+ loadspritegfx 0x2797
+ createvisualtask sub_8117754, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82CDAF5
+ fadetobg BG_HIGHSPEED_OPPONENT
+
+AnimScript_82CDA55:
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, -2304, 0, 1, -1
+ waitbgfadein
+ createvisualtask sub_810577C, 0x2
+ loopsewithpan SE_W013B, -64, 0x8, 0x3
+ waitforvisualfinish
+ delay 0x1
+ createvisualtask sub_8117F60, 0x2
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ delay 0x12
+ createvisualtask sub_8105810, 0x2
+ delay 0x2
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_085973B8, 0x82, 1, 0, -12, 3
+ delay 0xA
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_085973B8, 0x82, 1, 0, 12, 3
+ delay 0xA
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_085973B8, 0x82, 1, 0, 0, 3
+ waitforvisualfinish
+ createvisualtask sub_8105AAC, 0x2
+ delay 0xA
+ createvisualtask sub_810599C, 0x2
+ loopsewithpan SE_W104, -64, 0x8, 0x4
+ waitforvisualfinish
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ clearmonbg ANIM_TARGET
+ blendoff
+ delay 0x1
+ setarg 0x7, 0x1000
+ delay 0x1
+ end
+
+AnimScript_82CDAF5:
+ fadetobg BG_HIGHSPEED_PLAYER
+ goto AnimScript_82CDA55
+
+Move_UPROAR:
+ loadspritegfx 0x27F1
+ loadspritegfx 0x27DB
+ monbg ANIM_DEF_PARTNER
+ createvisualtask sub_8106D90, 0x2, 0
+ createsprite gUnknown_08593898, 0x3, 0, 0, 0, 0, 31, 8
+ playsewithpan SE_W253, -64
+ createsprite gUnknown_08593BB8, 0x2, 0, 29, -12, 0
+ createsprite gUnknown_08593BB8, 0x2, 0, -12, -29, 1
+ delay 0x10
+ createvisualtask sub_8106D90, 0x2, 0
+ createsprite gUnknown_08593898, 0x3, 0, 0, 0, 0, 31, 8
+ playsewithpan SE_W253, -64
+ createsprite gUnknown_08593BB8, 0x2, 0, 12, -29, 1
+ createsprite gUnknown_08593BB8, 0x2, 0, -29, -12, 0
+ delay 0x10
+ createvisualtask sub_8106D90, 0x2, 0
+ createsprite gUnknown_08593898, 0x3, 0, 0, 0, 0, 31, 8
+ playsewithpan SE_W253, -64
+ createsprite gUnknown_08593BB8, 0x2, 0, 24, -24, 1
+ createsprite gUnknown_08593BB8, 0x2, 0, -24, -24, 0
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Move_HEAT_WAVE:
+ loadspritegfx 0x2815
+ createvisualtask sub_8116848, 0x5, 10261, 0, 6, 6, 31
+ createvisualtask sub_8110BCC, 0x5, 1
+ createvisualtask sub_810A060, 0x6, 6, 31
+ panse_1B SE_W257, -64, +63, +2, 0x0
+ delay 0x4
+ createvisualtask sub_8109DBC, 0x5
+ delay 0xC
+ createsprite gUnknown_08596BA0, 0x28, 10, 2304, 96, 1
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 90, 2048, 96, 1
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 50, 2560, 96, 1
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 20, 2304, 96, 1
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 70, 1984, 96, 1
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 0, 2816, 96, 1
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 60, 2560, 96, 1
+ end
+
+Move_HAIL:
+ loadspritegfx 0x2817
+ loadspritegfx 0x279D
+ createvisualtask sub_8116620, 0xA, 1, 3, 0, 6, 0
+ waitforvisualfinish
+ createvisualtask sub_810C918, 0x5
+ loopsewithpan SE_W258, 0, 0x8, 0xA
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 1, 3, 6, 0, 0
+ end
+
+Move_TORMENT:
+ loadspritegfx 0x2767
+ loadspritegfx 0x27E1
+ createvisualtask sub_815AFF0, 0x2
+ waitforvisualfinish
+ createvisualtask sub_80A7B98, 0x2, 1, 31, 10, 1, 1
+ createsprite gUnknown_0859368C, 0x82, 1, -20, -28
+ playsewithpan SE_W207B, +63
+ delay 0x14
+ createsprite gUnknown_0859368C, 0x82, 1, 20, -28
+ playsewithpan SE_W207B, +63
+ end
+
+Move_MEMENTO:
+ setalpha 0x1000
+ delay 0x1
+ createvisualtask sub_81143C0, 0x2
+ delay 0x1
+ createvisualtask sub_8113BAC, 0x5
+ playsewithpan SE_W060, -64
+ delay 0x30
+ playsewithpan SE_W060B, -64
+ waitforvisualfinish
+ createvisualtask sub_8114470, 0x2
+ delay 0xC
+ setalpha 0x1000
+ delay 0x1
+ monbg_22 ANIM_TARGET
+ createvisualtask sub_8113E78, 0x5
+ playsewithpan SE_W060, +63
+ waitforvisualfinish
+ clearmonbg_23 ANIM_TARGET
+ delay 0x1
+ blendoff
+ delay 0x1
+ end
+
+Move_FACADE:
+ loadspritegfx 0x2803
+ createvisualtask sub_815DCA4, 0x2, 0, 3
+ createvisualtask sub_815DF0C, 0x2, 0, 72
+ loopsewithpan SE_W207, -64, 0x18, 0x3
+ end
+
+Move_SMELLING_SALT:
+ loadspritegfx 0x2807
+ loadspritegfx 0x280F
+ createsprite gUnknown_085CE864, 0x82, 1, 0, 2
+ createsprite gUnknown_085CE864, 0x82, 1, 1, 2
+ delay 0x20
+ createvisualtask sub_815E840, 0x3, 1, 2
+ loopsewithpan SE_W003, +63, 0xC, 0x2
+ waitforvisualfinish
+ delay 0x4
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 6, 2
+ createsprite gUnknown_085CE894, 0x82, 1, 8, 3
+ loopsewithpan SE_W207B, +63, 0x10, 0x3
+ end
+
+Move_FOLLOW_ME:
+ loadspritegfx 0x2750
+ createsprite gUnknown_085931D4, 0x2, 0
+ playsewithpan SE_W039, -64
+ delay 0x12
+ playsewithpan SE_W213, -64
+ delay 0x47
+ loopsewithpan SE_W039, -64, 0x16, 0x3
+ end
+
+Move_CHARGE:
+ loadspritegfx 0x27E3
+ loadspritegfx 0x27E4
+ loadspritegfx 0x27E5
+ monbg ANIM_ATTACKER
+ setalpha 0x80C
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, 0
+ waitforvisualfinish
+ createvisualtask sub_810AAFC, 0x2, 0, 60, 2, 12
+ playsewithpan SE_W268, -64
+ delay 0x1E
+ playsewithpan SE_W268, -64
+ delay 0x1E
+ playsewithpan SE_W268, -64
+ createsprite gUnknown_0859595C, 0x2, 0
+ delay 0x19
+ playsewithpan SE_W268, -64
+ delay 0x14
+ playsewithpan SE_W268, -64
+ delay 0xF
+ playsewithpan SE_W268, -64
+ delay 0xA
+ delay 0x6
+ loopsewithpan SE_W268, -64, 0x6, 0x5
+ waitforvisualfinish
+ createsprite gUnknown_0859598C, 0x2, 0, 16, 16
+ delay 0x2
+ createsprite gUnknown_0859598C, 0x2, 0, -16, -16
+ playsewithpan SE_W085B, -64
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 4, 4, 0, 0
+ clearmonbg ANIM_ATTACKER
+ blendoff
+ end
+
+Move_TAUNT:
+ loadspritegfx 0x27E6
+ loadspritegfx 0x27E1
+ loadspritegfx 0x2767
+ createsprite gUnknown_08593114, 0xB, 0, 45
+ playsewithpan SE_W118, -64
+ delay 0x6
+ createsprite gUnknown_0859324C, 0xC, 0
+ delay 0x4
+ loopsewithpan SE_W039, -64, 0x10, 0x2
+ waitforvisualfinish
+ delay 0x8
+ createsprite gUnknown_0859368C, 0x82, 1, -20, -28
+ playsewithpan SE_W207B, +63
+ waitforvisualfinish
+ delay 0xC
+ createsprite gUnknown_0859368C, 0x82, 1, 20, -28
+ playsewithpan SE_W207B, +63
+ end
+
+Move_HELPING_HAND:
+ loadspritegfx 0x2807
+ createvisualtask sub_815EC48, 0x5
+ createsprite gUnknown_085CE8AC, 0x28, 0
+ createsprite gUnknown_085CE8AC, 0x28, 1
+ delay 0x13
+ playsewithpan SE_W227, 0
+ createvisualtask sub_80D52D0, 0x2, 2, 2, 0, 5, 1
+ delay 0xE
+ playsewithpan SE_W227, 0
+ createvisualtask sub_80D52D0, 0x2, 2, 2, 0, 5, 1
+ delay 0x14
+ playsewithpan SE_W227, 0
+ createvisualtask sub_80D52D0, 0x2, 2, 3, 0, 10, 1
+ createvisualtask sub_80A7B98, 0x2, 2, 1023, 12, 1, 1
+ end
+
+Move_ASSIST:
+ loadspritegfx 0x280C
+ createsprite gUnknown_085CE804, 0x32, 112, -16, 140, 128, 36
+ delay 0x2
+ createsprite gUnknown_085CE804, 0x32, 208, 128, -16, 48, 36
+ playsewithpan SE_W010, 0
+ delay 0x2
+ createsprite gUnknown_085CE804, 0x32, -16, 112, 256, -16, 36
+ playsewithpan SE_W010, 0
+ delay 0x2
+ createsprite gUnknown_085CE804, 0x32, 108, 128, 84, -16, 36
+ playsewithpan SE_W010, 0
+ delay 0x2
+ createsprite gUnknown_085CE804, 0x32, -16, 56, 256, 56, 36
+ playsewithpan SE_W010, 0
+ end
+
+Move_SUPERPOWER:
+ loadspritegfx 0x27E4
+ loadspritegfx 0x2810
+ loadspritegfx 0x2811
+ monbg ANIM_ATK_PARTNER
+ monbgprio_28 ANIM_ATTACKER
+ setalpha 0x80C
+ createsprite gUnknown_08595FEC, 0x82, 0
+ playsewithpan SE_W025, -64
+ delay 0x14
+ createsprite gUnknown_085972D8, 0x2, 4, 1, 180, 1
+ createvisualtask sub_8159244, 0x5, 234, 0
+ delay 0x28
+ createsprite gUnknown_08596004, 0x29, 200, 96, 1, 120
+ delay 0x8
+ createsprite gUnknown_08596004, 0x29, 20, 248, 4, 112
+ delay 0x8
+ createsprite gUnknown_08596004, 0x29, 130, 160, 2, 104
+ delay 0x8
+ createsprite gUnknown_08596004, 0x29, 160, 192, 0, 96
+ delay 0x8
+ createsprite gUnknown_08596004, 0x29, 60, 288, 3, 88
+ delay 0x4A
+ createsprite gUnknown_0859601C, 0x83, 0
+ playsewithpan SE_W207, -64
+ delay 0x10
+ createvisualtask sub_80D52D0, 0x2, 1, 8, 0, 16, 1
+ playsewithpan SE_W025B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ delay 0x1
+ end
+
+Move_RECYCLE:
+ loadspritegfx 0x2826
+ monbg ANIM_ATTACKER
+ setalpha 0x1000
+ delay 0x1
+ createsprite gUnknown_085CE9B0, 0x2
+ loopsewithpan SE_W036, -64, 0x18, 0x3
+ waitforvisualfinish
+ createvisualtask sub_80A7B98, 0x5, 0, 0x7FFF, 12, 2, 1
+ playsewithpan SE_W036, -64
+ waitforvisualfinish
+ blendoff
+ clearmonbg ANIM_ATTACKER
+ delay 0x1
+ end
+
+Move_BRICK_BREAK:
+ loadspritegfx 0x27B7
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ loadspritegfx 0x27E0
+ choosetwoturnanim AnimScript_82CE0A7, AnimScript_82CE154
+
+AnimScript_82CE0A7:
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_0857FE28, 0x2, 3, 8
+ delay 0x4
+ delay 0x1
+ createsprite gUnknown_08597358, 0x3, -18, -18, 1, 1
+ playsewithpan SE_W233, +63
+ delay 0x14
+ createsprite gUnknown_0857FE28, 0x2, 3, 8
+ delay 0x5
+ createsprite gUnknown_08597358, 0x3, 18, 18, 1, 1
+ playsewithpan SE_W233, +63
+ delay 0x14
+ createvisualtask sub_80D5C50, 0x2, 0, -24, 0, 24, 10, 24, 3
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 6, 0
+ delay 0x25
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 1
+ createsprite gUnknown_08595E98, 0x4, 0, 0, 10, 1, 0
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 2, 6, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ end
+
+AnimScript_82CE154:
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_0857FE28, 0x2, 3, 8
+ delay 0x4
+ createsprite gUnknown_08595F90, 0x3, 1, 0, 0, 90, 10
+ delay 0x1
+ createsprite gUnknown_08597358, 0x3, -18, -18, 1, 1
+ playsewithpan SE_W233, +63
+ delay 0x14
+ createsprite gUnknown_0857FE28, 0x2, 3, 8
+ delay 0x5
+ createsprite gUnknown_08597358, 0x3, 18, 18, 1, 1
+ playsewithpan SE_W233, +63
+ delay 0x14
+ createvisualtask sub_80D5C50, 0x2, 0, -24, 0, 24, 10, 24, 3
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 6, 0
+ delay 0x25
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 1
+ createsprite gUnknown_08595E98, 0x4, 0, 0, 10, 1, 0
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ createsprite gUnknown_08595FA8, 0x2, 1, 0, -8, -12
+ createsprite gUnknown_08595FA8, 0x2, 1, 1, 8, -12
+ createsprite gUnknown_08595FA8, 0x2, 1, 2, -8, 12
+ createsprite gUnknown_08595FA8, 0x2, 1, 3, 8, 12
+ playsewithpan SE_W280, +63
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 2, 6, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ end
+
+Move_YAWN:
+ loadspritegfx 0x2802
+ createvisualtask sub_815D64C, 0x2, 0
+ playsewithpan SE_W281, -64
+ waitforvisualfinish
+ createsprite gUnknown_085CE68C, 0x85, 2
+ playsewithpan SE_W255, -64
+ delay 0x4
+ createsprite gUnknown_085CE68C, 0x85, 1
+ delay 0x4
+ createsprite gUnknown_085CE68C, 0x85, 0
+ waitforvisualfinish
+ createvisualtask sub_815D64C, 0x2, 1
+ playsewithpan SE_W281, +63
+ end
+
+Move_ENDEAVOR:
+ loadspritegfx 0x2803
+ loadspritegfx 0x2797
+ createvisualtask sub_815DCA4, 0x2, 0, 2
+ loopsewithpan SE_W039, -64, 0x18, 0x2
+ createvisualtask sub_80A7B98, 0x5, 0, 703, 12, 1, 2
+ delay 0x6
+ createvisualtask sub_80D6388, 0x5, 0, 1, 8, 1, 0
+ createsprite gUnknown_08597358, 0x82, 12, -12, 1, 2
+ playsewithpan SE_W003, +63
+ delay 0x18
+ createvisualtask sub_80D6388, 0x5, 0, 1, 8, 1, 0
+ createsprite gUnknown_08597358, 0x82, -12, 12, 1, 2
+ playsewithpan SE_W004, +63
+ end
+
+Move_ERUPTION:
+ loadspritegfx 0x27D9
+ createsprite gUnknown_08597274, 0x2, 31, 2, 0, 4, 31
+ waitforvisualfinish
+ createvisualtask sub_8109460, 0x2
+ waitplaysewithpan SE_W153, -64, 0x3C
+ waitforvisualfinish
+ createvisualtask sub_8109460, 0x2
+ waitplaysewithpan SE_W153, -64, 0x3C
+ waitforvisualfinish
+ delay 0x1E
+ createsprite gUnknown_085955E8, 0x28, 200, -32, 0, 100, 0
+ createsprite gUnknown_085955E8, 0x28, 30, -32, 16, 90, 1
+ createsprite gUnknown_085955E8, 0x28, 150, -32, 32, 60, 2
+ createsprite gUnknown_085955E8, 0x28, 90, -32, 48, 80, 3
+ createsprite gUnknown_085955E8, 0x28, 110, -32, 64, 50, 0
+ createsprite gUnknown_085955E8, 0x28, 60, -32, 80, 70, 1
+ delay 0x16
+ createvisualtask sub_81152DC, 0x5, 5, 8, 60
+ createvisualtask sub_81152DC, 0x5, 4, 8, 60
+ loopsewithpan SE_W088, +63, 0x10, 0xC
+ delay 0x50
+ createsprite gUnknown_08597274, 0x28, 31, 4, 4, 0, 31
+ end
+
+Move_SKILL_SWAP:
+ loadspritegfx 0x280B
+ call AnimScript_82D7CD1
+ createvisualtask sub_810FBF0, 0x3, 1
+ createvisualtask sub_80A7B98, 0x5, 1, 0x7FFF, 12, 3, 1
+ loopsewithpan SE_W179, -64, 0x18, 0x3
+ delay 0x10
+ createvisualtask sub_810FBF0, 0x3, 0
+ createvisualtask sub_80A7B98, 0x5, 0, 0x7FFF, 12, 3, 1
+ waitforvisualfinish
+ call AnimScript_82D7CDD
+ end
+
+Move_IMPRISON:
+ loadspritegfx 0x2809
+ loadspritegfx 0x280A
+ call AnimScript_82D7CD1
+ monbg ANIM_DEF_PARTNER
+ createvisualtask sub_810F940, 0x5
+ delay 0x8
+ loopsewithpan SE_W030, -64, 0x8, 0x5
+ waitforvisualfinish
+ delay 0x4
+ createsprite gUnknown_085967AC, 0x5, 0, 40
+ createvisualtask sub_81152DC, 0x5, 4, 1, 10
+ playsewithpan SE_W063, -64
+ clearmonbg ANIM_DEF_PARTNER
+ call AnimScript_82D7CDD
+ end
+
+Move_GRUDGE:
+ loadspritegfx 0x280D
+ monbg ANIM_ATTACKER
+ monbgprio_29
+ fadetobg BG_GHOST
+ playsewithpan SE_W060, -64
+ waitbgfadein
+ createvisualtask sub_8112C6C, 0x3
+ loopsewithpan SE_W052, -64, 0x10, 0x4
+ delay 0xA
+ delay 0x50
+ playsewithpan SE_W171, +63
+ waitforvisualfinish
+ restorebg
+ waitbgfadein
+ clearmonbg ANIM_ATTACKER
+ end
+
+Move_CAMOUFLAGE:
+ monbg ANIM_ATK_PARTNER
+ monbgprio_28 ANIM_ATTACKER
+ setalpha 0x10
+ createvisualtask sub_811675C, 0x5, 2, 3, 0, 14
+ delay 0x10
+ createvisualtask sub_81136E8, 0x2, 4
+ playsewithpan SE_W185, -64
+ waitforvisualfinish
+ delay 0x8
+ createvisualtask sub_811675C, 0x5, 2, 0, 0, 0
+ waitforvisualfinish
+ createvisualtask sub_81137E4, 0x2, 1
+ waitforvisualfinish
+ blendoff
+ clearmonbg ANIM_ATK_PARTNER
+ end
+
+Move_TAIL_GLOW:
+ loadspritegfx 0x27E4
+ monbg ANIM_ATTACKER
+ setalpha 0x80C
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, 0
+ waitforvisualfinish
+ createsprite gUnknown_08596AC8, 0x42, 0
+ delay 0x12
+ loopsewithpan SE_W234, -64, 0x10, 0x6
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 4, 4, 0, 0
+ clearmonbg ANIM_ATTACKER
+ blendoff
+ delay 0x1
+ end
+
+Move_LUSTER_PURGE:
+ loadspritegfx 0x281B
+ loadspritegfx 0x2797
+ fadetobg BG_PSYCHIC
+ waitbgfadeout
+ createvisualtask sub_815A5C8, 0x5
+ waitbgfadein
+ monbg ANIM_ATTACKER
+ setalpha 0x80C
+ playsewithpan SE_W076, -64
+ createsprite gUnknown_08596898, 0x29, 0, 0, 0, 0
+ delay 0x14
+ createvisualtask sub_8116664, 0x5, 5, 2, 0, 16, -1
+ createvisualtask sub_8116848, 0x5, 10267, 2, 0, 16, -1
+ waitforvisualfinish
+ createvisualtask sub_8116848, 0x5, 10135, 0, 12, 12, 23552
+ waitforvisualfinish
+ createsprite gUnknown_085973A0, 0x83, 1, 2
+ createvisualtask sub_8159210, 0x5, 215, 63
+ delay 0x3
+ createsprite gUnknown_085973A0, 0x83, 1, 2
+ createvisualtask sub_8159210, 0x5, 215, 63
+ delay 0x3
+ createsprite gUnknown_085973A0, 0x83, 1, 2
+ createvisualtask sub_8159210, 0x5, 215, 63
+ delay 0x3
+ createsprite gUnknown_085973A0, 0x83, 1, 2
+ createvisualtask sub_8159210, 0x5, 215, 63
+ delay 0x3
+ createsprite gUnknown_085973A0, 0x83, 1, 2
+ createvisualtask sub_8159210, 0x5, 215, 63
+ delay 0x3
+ createsprite gUnknown_085973A0, 0x83, 1, 2
+ createvisualtask sub_8159210, 0x5, 215, 63
+ waitforvisualfinish
+ createvisualtask sub_8116664, 0x5, 5, 2, 16, 0, -1
+ createvisualtask sub_81152DC, 0x5, 1, 5, 14
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ blendoff
+ call AnimScript_82D7CDD
+ end
+
+Move_MIST_BALL:
+ loadspritegfx 0x27AB
+ loadspritegfx 0x281E
+ delay 0x0
+ playsewithpan SE_W081, -64
+ createsprite gUnknown_08595C70, 0x80, 0, 0, 0, 0, 30, 0
+ waitforvisualfinish
+ playsewithpan SE_W028, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 10, 0
+ createsprite gUnknown_0859728C, 0x0, 1, 1, 1, 32279, 16, 0x7FFF, 16
+ delay 0x0
+ playsewithpan SE_W114, 0
+ createvisualtask sub_810C324, 0x5
+ createvisualtask sub_8116620, 0xA, 4, 3, 0, 16, 0x7FFF
+ delay 0x8
+ createvisualtask sub_80D51AC, 0x2, 1, 4, 0, 70, 0
+ delay 0x46
+ createvisualtask sub_8116620, 0xA, 4, 2, 16, 0, 0x7FFF
+ end
+
+Move_FEATHER_DANCE:
+ loadspritegfx 0x281E
+ monbg ANIM_DEF_PARTNER
+ monbgprio_29
+ playsewithpan SE_W080, +63
+ delay 0x0
+ createsprite gUnknown_08596388, 0x80, 0, -16, 64, 2, 104, 11304, 32, 1
+ delay 0x6
+ createsprite gUnknown_08596388, 0x80, 0, -16, 32, 2, 104, 11304, 32, 1
+ createsprite gUnknown_08596388, 0x80, 0, -16, 0, 2, 104, 11304, 32, 1
+ delay 0x6
+ createsprite gUnknown_08596388, 0x80, 0, -16, 224, 2, 104, 11304, 32, 1
+ createsprite gUnknown_08596388, 0x80, 0, -16, 128, 2, 104, 11304, 32, 1
+ delay 0x6
+ createsprite gUnknown_08596388, 0x80, 0, -16, 192, 2, 104, 11304, 32, 1
+ createsprite gUnknown_08596388, 0x80, 0, -16, 160, 2, 104, 11304, 32, 1
+ delay 0x6
+ createsprite gUnknown_08596388, 0x80, 0, -16, 96, 2, 104, 11304, 32, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Move_TEETER_DANCE:
+ loadspritegfx 0x2758
+ loadspritegfx 0x2759
+ createvisualtask sub_8160164, 0x5
+ createsprite gUnknown_08593050, 0x2, 0, 16, -2
+ playsewithpan SE_W298, -64
+ delay 0x18
+ createsprite gUnknown_08593050, 0x2, 0, 0, -2
+ playsewithpan SE_W298, -64
+ delay 0x18
+ createsprite gUnknown_08593050, 0x2, 0, -16, -2
+ playsewithpan SE_W298, -64
+ delay 0x18
+ createsprite gUnknown_08593050, 0x2, 1, -8, -2
+ playsewithpan SE_W298, -64
+ delay 0x18
+ createsprite gUnknown_08593050, 0x2, 2, 8, -2
+ playsewithpan SE_W298, -64
+ end
+
+Move_MUD_SPORT:
+ loadspritegfx 0x275A
+ createvisualtask sub_8104938, 0x2, 0, 6
+ delay 0x18
+ createsprite gUnknown_085971E4, 0x82, 0, -4, -16
+ createsprite gUnknown_085971E4, 0x82, 0, 4, -12
+ playsewithpan SE_W091, -64
+ delay 0x20
+ createsprite gUnknown_085971E4, 0x82, 0, -3, -12
+ createsprite gUnknown_085971E4, 0x82, 0, 5, -14
+ playsewithpan SE_W091, -64
+ delay 0x20
+ createsprite gUnknown_085971E4, 0x82, 0, -5, -18
+ createsprite gUnknown_085971E4, 0x82, 0, 3, -14
+ playsewithpan SE_W091, -64
+ delay 0x10
+ createsprite gUnknown_085971E4, 0x82, 1, 220, 60
+ waitplaysewithpan SE_W145B, 0, 0xF
+ delay 0x2
+ createsprite gUnknown_085971E4, 0x82, 1, 60, 100
+ waitplaysewithpan SE_W145B, 0, 0x19
+ delay 0x2
+ createsprite gUnknown_085971E4, 0x82, 1, 140, 55
+ waitplaysewithpan SE_W145B, 0, 0xE
+ delay 0x2
+ createsprite gUnknown_085971E4, 0x82, 1, 180, 50
+ waitplaysewithpan SE_W145B, 0, 0xA
+ delay 0x2
+ createsprite gUnknown_085971E4, 0x82, 1, 20, 90
+ waitplaysewithpan SE_W145B, 0, 0x16
+ delay 0x2
+ createsprite gUnknown_085971E4, 0x82, 1, 90, 90
+ waitplaysewithpan SE_W145B, 0, 0x16
+ delay 0x2
+ createsprite gUnknown_085971E4, 0x82, 1, 160, 60
+ waitplaysewithpan SE_W145B, 0, 0xF
+ delay 0x2
+ createsprite gUnknown_085971E4, 0x82, 1, 30, 90
+ waitplaysewithpan SE_W145B, 0, 0x16
+ delay 0x2
+ createsprite gUnknown_085971E4, 0x82, 1, 120, 60
+ waitplaysewithpan SE_W145B, 0, 0xF
+ delay 0x2
+ createsprite gUnknown_085971E4, 0x82, 1, 200, 40
+ waitplaysewithpan SE_W145B, 0, 0xA
+ end
+
+Move_NEEDLE_ARM:
+ loadspritegfx 0x281A
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ loopsewithpan SE_W030, +63, 0x2, 0x10
+ createsprite gUnknown_08592888, 0x82, 1, 0, 0, -32, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, 22, -22, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, 30, 0, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, 20, 20, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, 0, 28, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, -19, 19, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, -27, 0, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, -18, -18, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, 0, -25, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, 17, -17, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, 23, 0, 16
+ delay 0x2
+ createsprite gUnknown_08592888, 0x82, 1, 0, 16, 16, 16
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 18, 1
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 1
+ createsprite gUnknown_08595E98, 0x84, 0, 0, 8, 1, 0
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08592888, 0x82, 1, 1, 0, -24, 10
+ createsprite gUnknown_08592888, 0x82, 1, 1, 17, -17, 10
+ createsprite gUnknown_08592888, 0x82, 1, 1, 24, 0, 10
+ createsprite gUnknown_08592888, 0x82, 1, 1, 17, 17, 10
+ createsprite gUnknown_08592888, 0x82, 1, 1, 0, 24, 10
+ createsprite gUnknown_08592888, 0x82, 1, 1, -17, 17, 10
+ createsprite gUnknown_08592888, 0x82, 1, 1, -24, 0, 10
+ createsprite gUnknown_08592888, 0x82, 1, 1, -17, -17, 10
+ end
+
+Move_SLACK_OFF:
+ loadspritegfx 0x272F
+ createvisualtask sub_8160544, 0x2, 0
+ playsewithpan SE_W281, -64
+ waitforvisualfinish
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ end
+
+Move_CRUSH_CLAW:
+ loadspritegfx 0x27B7
+ loadspritegfx 0x2737
+ loadspritegfx 0x27E0
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_0857FE28, 0x2, 6, 4
+ delay 0x4
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 18, 1
+ createsprite gUnknown_08597138, 0x82, -10, -10, 0
+ createsprite gUnknown_08597138, 0x82, -10, 10, 0
+ playsewithpan SE_W013, +63
+ delay 0xC
+ createsprite gUnknown_08597138, 0x82, 10, -10, 1
+ createsprite gUnknown_08597138, 0x82, 10, 10, 1
+ playsewithpan SE_W013, +63
+ waitforvisualfinish
+ blendoff
+ clearmonbg ANIM_TARGET
+ end
+
+Move_AROMATHERAPY:
+ playsewithpan SE_W080, 0
+ loadspritegfx 0x27AF
+ loadspritegfx 0x27DB
+ loadspritegfx 0x2741
+ createsprite gUnknown_08597274, 0x0, 1, 0, 0, 7, 13293
+ delay 0x1
+ monbg ANIM_ATTACKER
+ delay 0x1
+ createsprite gUnknown_085927AC, 0x0, 24, 16, 0, 2, 2, 0, 0
+ createsprite gUnknown_085927AC, 0x42, 64, 24, 0, 3, 1, 1, 0
+ createsprite gUnknown_085927C4, 0x0, 16, 24, 0, 2, 1, 0, 0
+ delay 0x14
+ createsprite gUnknown_085927AC, 0x42, 48, 12, 0, 4, 3, 1, 0
+ createsprite gUnknown_085927AC, 0x0, 100, 16, 0, 3, 2, 0, 0
+ createsprite gUnknown_085927AC, 0x0, 74, 24, 180, 3, 2, 0, 0
+ delay 0xA
+ createsprite gUnknown_085927AC, 0x42, 80, 30, 0, 4, 1, 1, 0
+ createsprite gUnknown_085927AC, 0x0, 128, 12, 0, 3, 3, 0, 0
+ createsprite gUnknown_085927C4, 0x0, 90, 16, 0, 2, 1, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ delay 0x1
+ createsprite gUnknown_08597274, 0x0, 1, 0, 7, 0, 13293
+ delay 0x1
+ playsewithpan SE_W287, -64
+ createvisualtask sub_815DFCC, 0x2, 1
+ waitforvisualfinish
+ playsewithpan SE_W234, -64
+ createsprite gUnknown_08592B94, 0x10, -15, 0, 0, 0, 32, 60, 1
+ delay 0x8
+ createsprite gUnknown_08592B94, 0x10, 12, -5, 0, 0, 32, 60, 1
+ waitforvisualfinish
+ playsewithpan SE_REAPOKE, -64
+ createsprite gUnknown_08597274, 0x0, 43, 3, 10, 0, 13293
+ createsprite gUnknown_08593868, 0x10, 0, 0, 0, 1
+ waitforvisualfinish
+ end
+
+Move_FAKE_TEARS:
+ loadspritegfx 0x27AB
+ loadspritegfx 0x27E1
+ loadspritegfx 0x2758
+ createvisualtask sub_8116848, 0x5, 10155, 0, 4, 4, 32108
+ waitforvisualfinish
+ createvisualtask sub_815C478, 0x5, 0, 2, 1
+ loopsewithpan SE_W039, -64, 0xC, 0x4
+ delay 0x8
+ createsprite gUnknown_085970E8, 0x2, 0, 0
+ createsprite gUnknown_085970E8, 0x2, 0, 1
+ delay 0x8
+ createsprite gUnknown_085970E8, 0x2, 0, 2
+ createsprite gUnknown_085970E8, 0x2, 0, 3
+ delay 0x8
+ createsprite gUnknown_085970E8, 0x2, 0, 0
+ createsprite gUnknown_085970E8, 0x2, 0, 1
+ delay 0x8
+ createsprite gUnknown_085970E8, 0x2, 0, 2
+ createsprite gUnknown_085970E8, 0x2, 0, 3
+ waitforvisualfinish
+ end
+
+Move_AIR_CUTTER:
+ loadspritegfx 0x2713
+ loadspritegfx 0x279A
+ loadspritegfx 0x2797
+ delay 0x0
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ delay 0x0
+ createvisualtask sub_8103CF0, 0x2, 32, -24, 1536, 2, 128
+ waitforvisualfinish
+ playsewithpan SE_W015, +63
+ createsprite gUnknown_08592A34, 0x2, 40, -32, 0, 2
+ delay 0x5
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ createvisualtask sub_80D52D0, 0x2, 3, 2, 0, 8, 1
+ waitforvisualfinish
+ blendoff
+ clearmonbg ANIM_DEF_PARTNER
+ delay 0x0
+ end
+
+Move_ODOR_SLEUTH:
+ monbg ANIM_TARGET
+ createvisualtask sub_815F620, 0x5
+ delay 0x18
+ createsprite gUnknown_0857FE28, 0x2, 3, 4
+ playsewithpan SE_W207, -64
+ delay 0x6
+ createsprite gUnknown_0857FE28, 0x2, 3, 4
+ playsewithpan SE_W207, -64
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ delay 0x1
+ createsprite gUnknown_0859728C, 0x2, 1, 3, 1, -1, 16, -1, 0
+ playsewithpan SE_W043, -64
+ end
+
+Move_GRASS_WHISTLE:
+ loadspritegfx 0x2758
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, 13298
+ waitforvisualfinish
+ createvisualtask sub_8102BE8, 0x2
+ waitforvisualfinish
+ panse_1B SE_W320, -64, +63, +2, 0x0
+ createsprite gUnknown_08593008, 0x82, 7, 1, 0
+ delay 0x5
+ createsprite gUnknown_08593008, 0x82, 6, 1, 0
+ delay 0x5
+ createsprite gUnknown_08593008, 0x82, 1, 1, 0
+ delay 0x5
+ createsprite gUnknown_08593008, 0x82, 2, 1, 0
+ delay 0x5
+ createsprite gUnknown_08593008, 0x82, 3, 1, 0
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 2, 1, 0
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 5, 1, 0
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 6, 1, 0
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 2, 1, 0
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 2, 1, 0
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 1, 1, 0
+ delay 0x4
+ createsprite gUnknown_08593008, 0x82, 5, 1, 0
+ delay 0x4
+ waitforvisualfinish
+ createvisualtask sub_8102CA0, 0x2
+ createsprite gUnknown_08597274, 0x2, 1, 4, 4, 0, 13298
+ waitforvisualfinish
+ end
+
+Move_TICKLE:
+ loadspritegfx 0x27EA
+ createsprite gUnknown_08597274, 0x2, 2, 0, 0, 16, 0
+ waitforvisualfinish
+ createsprite gUnknown_08593A84, 0x0, -16, -8
+ createsprite gUnknown_08593A84, 0x0, 16, -8
+ playsewithpan SE_W197, -64
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 2, 0, 16, 0, 0
+ waitforvisualfinish
+ delay 0x14
+ createvisualtask sub_80D5EB8, 0x3, 0, 6, 1280, 3, 0
+ delay 0xC
+ createvisualtask sub_815C478, 0x3, 1, 6, 2
+ loopsewithpan SE_W039, +63, 0x8, 0x8
+ waitforvisualfinish
+ end
+
+Move_WATER_SPOUT:
+ loadspritegfx 0x281C
+ loadspritegfx 0x27A4
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_81080E4, 0x5
+ playsewithpan SE_W029, -64
+ delay 0x2C
+ playsewithpan SE_W291, -64
+ waitforvisualfinish
+ delay 0x10
+ createvisualtask sub_81085C8, 0x5
+ playsewithpan SE_W057, +63
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_SHADOW_PUNCH:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ fadetobg BG_GHOST
+ waitbgfadein
+ monbg ANIM_ATK_PARTNER
+ setalpha 0x809
+ createvisualtask sub_80A8BC4, 0x2, 0, 13
+ playsewithpan SE_W026, -64
+ delay 0x6
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 1
+ createsprite gUnknown_08595E98, 0x84, 0, 0, 8, 1, 0
+ playsewithpan SE_W004, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ restorebg
+ waitbgfadein
+ end
+
+Move_EXTRASENSORY:
+ call AnimScript_82D7CD1
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_80A7B98, 0x5, 0, 891, 12, 1, 1
+ createvisualtask sub_810FE14, 0x5, 0
+ playsewithpan SE_W020, +63
+ waitforvisualfinish
+ createvisualtask sub_80A7B98, 0x5, 0, 891, 12, 1, 1
+ createvisualtask sub_810FE14, 0x5, 1
+ playsewithpan SE_W020, +63
+ waitforvisualfinish
+ createvisualtask sub_8110034, 0x5, 0
+ createvisualtask sub_810FE14, 0x5, 2
+ playsewithpan SE_W043, -64
+ waitforvisualfinish
+ blendoff
+ clearmonbg ANIM_DEF_PARTNER
+ call AnimScript_82D7CDD
+ end
+
+Move_AERIAL_ACE:
+ loadspritegfx 0x279A
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80D5830, 0x2, 0, 24, 6, 1, 5
+ createvisualtask sub_81169C0, 0x2, 0, 4, 7, 3
+ createsprite gUnknown_08592A1C, 0x2, 40, -32, 0
+ playsewithpan SE_W013B, -64
+ delay 0x5
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 10, 1
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 0, 10, 0, 0
+ playsewithpan SE_W013, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_IRON_DEFENSE:
+ loopsewithpan SE_REAPOKE, -64, 0x1C, 0x2
+ createvisualtask sub_81144F8, 0x5, 0, 0, 0
+ createsprite gUnknown_0859728C, 0x2, 1, 8, 2, -1, 14, -1, 0
+ waitforvisualfinish
+ end
+
+Move_BLOCK:
+ loadspritegfx 0x280A
+ createsprite gUnknown_085CE90C, 0xC2
+ playsewithpan SE_W207, +63
+ end
+
+Move_HOWL:
+ loadspritegfx 0x2745
+ createvisualtask sub_815D64C, 0x2, 0
+ delay 0xC
+ call AnimScript_82CFECB
+ createvisualtask sub_8158D8C, 0x2, 0, 3
+ waitforvisualfinish
+ delay 0x1E
+ end
+
+Move_BULK_UP:
+ loadspritegfx 0x2766
+ createvisualtask sub_8104AB4, 0x2
+ playsewithpan SE_W207, -64
+ waitforvisualfinish
+ createsprite gUnknown_08593658, 0x2
+ loopsewithpan SE_W207, -64, 0x4, 0x2
+ waitforvisualfinish
+ end
+
+Move_COVET:
+ loadspritegfx 0x27E2
+ loadspritegfx 0x27F0
+ createvisualtask sub_815C478, 0x5, 0, 2, 0
+ createsprite gUnknown_08593970, 0x3, 0, 20
+ playsewithpan SE_W204, -64
+ delay 0xF
+ createsprite gUnknown_08593970, 0x3, -20, 20
+ playsewithpan SE_W204, -64
+ delay 0xF
+ createsprite gUnknown_08593970, 0x3, 20, 20
+ playsewithpan SE_W204, -64
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ loopsewithpan SE_W146, +63, 0x4, 0x3
+ end
+
+Move_VOLT_TACKLE:
+ loadspritegfx 0x2711
+ loadspritegfx 0x27E4
+ loadspritegfx 0x27E5
+ monbg ANIM_ATTACKER
+ setalpha 0x80C
+ createvisualtask sub_8116620, 0xA, 1, 0, 0, 8, 0
+ waitforvisualfinish
+ createsprite gUnknown_085959A4, 0x1
+ playsewithpan SE_W268, -64
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ blendoff
+ delay 0x8
+ createvisualtask sub_810AFCC, 0x5, 0
+ playsewithpan SE_W085, -64
+ waitforvisualfinish
+ createvisualtask sub_810AFCC, 0x5, 1
+ playsewithpan SE_W085, +63
+ waitforvisualfinish
+ createvisualtask sub_810AFCC, 0x5, 2
+ playsewithpan SE_W085, -64
+ waitforvisualfinish
+ createvisualtask sub_810AFCC, 0x5, 3
+ playsewithpan SE_W085, +63
+ waitforvisualfinish
+ createvisualtask sub_810AFCC, 0x5, 4
+ playsewithpan SE_W085, -64
+ delay 0x8
+ createvisualtask sub_80D52D0, 0x2, 1, 10, 0, 18, 1
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859598C, 0x2, 1, 16, 16
+ delay 0x2
+ createsprite gUnknown_0859598C, 0x2, 1, -16, -16
+ delay 0x8
+ createvisualtask sub_810AE5C, 0x5
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x2, 0, 3, 0, 9, 1
+ playsewithpan SE_W085B, -64
+ createsprite gUnknown_0859598C, 0x2, 0, 16, 16
+ delay 0x2
+ createsprite gUnknown_0859598C, 0x2, 0, -16, -16
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 1, 0, 8, 0, 0
+ waitforvisualfinish
+ end
+
+Move_WATER_SPORT:
+ loadspritegfx 0x281C
+ createvisualtask sub_81088E4, 0x5
+ delay 0x8
+ playsewithpan SE_W057, -64
+ delay 0x2C
+ playsewithpan SE_W057, -64
+ delay 0x2C
+ playsewithpan SE_W057, -64
+ delay 0x2C
+ panse_1B SE_W057, -64, +63, +2, 0x0
+ end
+
+Move_CALM_MIND:
+ loadspritegfx 0x27DB
+ monbg ANIM_ATK_PARTNER
+ createvisualtask sub_8116664, 0x5, 0, 0, 0, 16, 0
+ waitforvisualfinish
+ createvisualtask sub_81177E4, 0x5, 1
+ waitforvisualfinish
+ createsprite gUnknown_08593850, 0x28, 0, 0, 0, 0
+ playsewithpan SE_W048, -64
+ delay 0xE
+ createsprite gUnknown_08593850, 0x28, 0, 0, 0, 0
+ playsewithpan SE_W048, -64
+ delay 0xE
+ createsprite gUnknown_08593850, 0x28, 0, 0, 0, 0
+ playsewithpan SE_W048, -64
+ waitforvisualfinish
+ createvisualtask sub_81177E4, 0x5, 0
+ waitforvisualfinish
+ createvisualtask sub_8116664, 0x5, 0, 0, 16, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ end
+
+Move_LEAF_BLADE:
+ loadspritegfx 0x274F
+ loadspritegfx 0x282D
+ createvisualtask sub_80FFFC0, 0x5
+ delay 0x2
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ playsewithpan SE_W015, +63
+ delay 0x32
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ playsewithpan SE_W015, +63
+ delay 0x32
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ playsewithpan SE_W015, +63
+ waitforvisualfinish
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ delay 0xC
+ createvisualtask sub_80D52D0, 0x2, 1, 8, 0, 18, 1
+ createsprite gUnknown_085973D0, 0x82, 0, 0, 1, 36
+ playsewithpan SE_W043, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_DRAGON_DANCE:
+ loadspritegfx 0x2809
+ monbg ANIM_ATTACKER
+ monbgprio_28 ANIM_ATTACKER
+ delay 0x1
+ createvisualtask sub_81133E8, 0x5
+ playsewithpan SE_W100, -64
+ delay 0x8
+ createvisualtask sub_80A7CB4, 0x5, 10249, 19456, 14, 0, 3
+ createsprite gUnknown_08596F98, 0x2, 0
+ createsprite gUnknown_08596F98, 0x2, 43
+ createsprite gUnknown_08596F98, 0x2, 85
+ createsprite gUnknown_08596F98, 0x2, 128
+ createsprite gUnknown_08596F98, 0x2, 170
+ createsprite gUnknown_08596F98, 0x2, 213
+ delay 0x1E
+ playsewithpan SE_W100, -64
+ delay 0x1E
+ playsewithpan SE_W100, -64
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ delay 0x1
+ end
+
+Move_SHOCK_WAVE:
+ loadspritegfx 0x27E3
+ loadspritegfx 0x27E4
+ loadspritegfx 0x2711
+ loadspritegfx 0x2735
+ monbg ANIM_ATTACKER
+ setalpha 0x80C
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 4, 0
+ waitforvisualfinish
+ createvisualtask sub_810AAFC, 0x2, 0, 20, 0, 2
+ playsewithpan SE_W268, -64
+ delay 0xC
+ createsprite gUnknown_08595A18, 0x2
+ delay 0x1E
+ createvisualtask sub_810B29C, 0x5
+ delay 0xC
+ waitforvisualfinish
+ createvisualtask sub_810B55C, 0x5
+ playsewithpan SE_W161B, +63
+ waitforvisualfinish
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 6, 18, 1
+ createvisualtask sub_8116620, 0x5, 1, 3, 16, 0, 0x7FFF
+ createvisualtask sub_8116620, 0x5, 4, 0, 16, 16, 0
+ delay 0x4
+ createvisualtask sub_8116620, 0x5, 4, 0, 0, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ blendoff
+ end
+
+Move_HARDEN:
+ loopsewithpan SE_W231, -64, 0x1C, 0x2
+ createvisualtask sub_81144F8, 0x5, 0, 0, 0
+ waitforvisualfinish
+ end
+
+Move_BELLY_DRUM:
+ loadspritegfx 0x2758
+ loadspritegfx 0x27D1
+ createvisualtask sub_8102BE8, 0x2
+ waitforvisualfinish
+ call AnimScript_82CF5A6
+ createsprite gUnknown_0859309C, 0x2, 0, 0, 0, 0
+ playsewithpan SE_W187, -64
+ delay 0xF
+ call AnimScript_82CF58B
+ createsprite gUnknown_0859309C, 0x2, 1, 1, 1, 0
+ playsewithpan SE_W187, -64
+ delay 0xF
+ call AnimScript_82CF5A6
+ createsprite gUnknown_0859309C, 0x2, 0, 3, 3, 128
+ playsewithpan SE_W187, -64
+ delay 0x7
+ call AnimScript_82CF58B
+ createsprite gUnknown_0859309C, 0x2, 1, 2, 0, 128
+ playsewithpan SE_W187, -64
+ delay 0x7
+ call AnimScript_82CF5A6
+ createsprite gUnknown_0859309C, 0x2, 0, 1, 1, 0
+ playsewithpan SE_W187, -64
+ delay 0x7
+ call AnimScript_82CF58B
+ createsprite gUnknown_0859309C, 0x2, 1, 0, 3, 0
+ playsewithpan SE_W187, -64
+ waitforvisualfinish
+ createvisualtask sub_8102CA0, 0x2
+ waitforvisualfinish
+ end
+
+AnimScript_82CF58B:
+ createsprite gUnknown_08593068, 0x3, 0
+ createvisualtask sub_80D51AC, 0x2, 0, 0, 8, 2, 1
+ return
+
+AnimScript_82CF5A6:
+ createsprite gUnknown_08593068, 0x3, 1
+ createvisualtask sub_80D51AC, 0x2, 0, 0, 8, 2, 1
+ return
+
+Move_MIND_READER:
+ loadspritegfx 0x27CD
+ loadspritegfx 0x27CE
+ loadspritegfx 0x27CF
+ monbg ANIM_DEF_PARTNER
+ playsewithpan SE_W109, +63
+ createsprite gUnknown_085CE07C, 0x5, 0, 0, 1, 0
+ createsprite gUnknown_085CE094, 0x5
+ delay 0x28
+ playsewithpan SE_W043, +63
+ createvisualtask sub_8115A04, 0x2, 1, 1, 2, 0, 10, 0
+ call AnimScript_82CF608
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+AnimScript_82CF608:
+ createsprite gUnknown_085CE0AC, 0x4, 70, 0, 6
+ createsprite gUnknown_085CE0AC, 0x4, 40, 40, 6
+ createsprite gUnknown_085CE0AC, 0x4, 10, -60, 6
+ createsprite gUnknown_085CE0AC, 0x4, -50, -40, 6
+ createsprite gUnknown_085CE0AC, 0x4, -40, 40, 6
+ createsprite gUnknown_085CE0AC, 0x4, 50, -50, 6
+ delay 0x2
+ createsprite gUnknown_085CE0AC, 0x4, 50, -30, 6
+ createsprite gUnknown_085CE0AC, 0x4, 60, 10, 6
+ createsprite gUnknown_085CE0AC, 0x4, 0, 60, 6
+ createsprite gUnknown_085CE0AC, 0x4, 0, -40, 6
+ createsprite gUnknown_085CE0AC, 0x4, -60, 20, 6
+ createsprite gUnknown_085CE0AC, 0x4, -60, -30, 6
+ delay 0x2
+ createsprite gUnknown_085CE0AC, 0x4, -50, 50, 6
+ createsprite gUnknown_085CE0AC, 0x4, -60, 20, 6
+ createsprite gUnknown_085CE0AC, 0x4, -40, -40, 6
+ createsprite gUnknown_085CE0AC, 0x4, 20, -60, 6
+ createsprite gUnknown_085CE0AC, 0x4, 50, -50, 6
+ createsprite gUnknown_085CE0AC, 0x4, 35, 40, 6
+ delay 0x2
+ return
+
+Move_ICE_PUNCH:
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ loadspritegfx 0x279D
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 7, 0
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 9, 32588
+ delay 0x14
+ playsewithpan SE_W081, +63
+ createsprite gUnknown_08595AE8, 0x2, 0
+ createsprite gUnknown_08595AE8, 0x2, 64
+ createsprite gUnknown_08595AE8, 0x2, 128
+ createsprite gUnknown_08595AE8, 0x2, 192
+ delay 0x5
+ createsprite gUnknown_08595AD0, 0x2, 32
+ createsprite gUnknown_08595AD0, 0x2, 96
+ createsprite gUnknown_08595AD0, 0x2, 160
+ createsprite gUnknown_08595AD0, 0x2, 224
+ delay 0x11
+ createsprite gUnknown_08595E98, 0x4, 0, -10, 8, 1, 0
+ createsprite gUnknown_08597358, 0x3, 0, -10, 1, 1
+ playsewithpan SE_W004, +63
+ delay 0x2
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 5, 3, 1
+ waitforvisualfinish
+ delay 0xF
+ call AnimScript_82D7720
+ delay 0x5
+ createvisualtask sub_8116620, 0xA, 4, 2, 9, 0, 32588
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 0, 7, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_REST:
+ playsewithpan SE_W173, -64
+ loadspritegfx 0x27F4
+ createsprite gUnknown_08592C88, 0x2, 4, -10, 16, 0, 0
+ delay 0x14
+ createsprite gUnknown_08592C88, 0x2, 4, -10, 16, 0, 0
+ delay 0x14
+ createsprite gUnknown_08592C88, 0x2, 4, -10, 16, 0, 0
+ waitforvisualfinish
+ end
+
+Move_CONFUSION:
+ monbg ANIM_DEF_PARTNER
+ call AnimScript_82D7CD1
+ setalpha 0x808
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 10, 1
+ createvisualtask sub_8115A04, 0x2, 2, 0, 2, 0, 8, 0x7FFF
+ waitforvisualfinish
+ playsewithpan SE_W048, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 15, 1
+ createvisualtask sub_80D6064, 0x5, -4, -4, 15, 1, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ delay 0x1
+ call AnimScript_82D7CDD
+ end
+
+Move_PSYCHIC:
+ monbg ANIM_DEF_PARTNER
+ call AnimScript_82D7CD1
+ setalpha 0x808
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 10, 1
+ createvisualtask sub_8115A04, 0x2, 2, 0, 2, 0, 8, 767
+ waitforvisualfinish
+ loopsewithpan SE_W048, +63, 0xA, 0x3
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 15, 1
+ createvisualtask sub_80D6064, 0x5, -6, -6, 15, 1, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ delay 0x1
+ call AnimScript_82D7CDD
+ end
+
+Move_FUTURE_SIGHT:
+ goto AnimScript_82CF8F6
+
+AnimScript_82CF8ED:
+ waitforvisualfinish
+ delay 0x1
+ call AnimScript_82D7CDD
+ end
+
+AnimScript_82CF8F6:
+ monbg ANIM_ATK_PARTNER
+ playsewithpan SE_W060, -64
+ call AnimScript_82D7CD1
+ setalpha 0x808
+ playsewithpan SE_W048, -64
+ createvisualtask sub_8115A04, 0x2, 2, 0, 2, 0, 8, 0x7FFF
+ createvisualtask sub_80D6064, 0x5, -4, -4, 15, 0, 1
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ goto AnimScript_82CF8ED
+
+Move_THUNDER:
+ loadspritegfx 0x2735
+ fadetobg BG_THUNDER
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, -256, 0, 1, -1
+ waitbgfadein
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 16, 0
+ delay 0x10
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ playsewithpan SE_W086, +63
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 16, -36
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 16, -20
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 16, 12
+ delay 0x14
+ createsprite gUnknown_085956C0, 0x86, -16, -32
+ playsewithpan SE_W086, +63
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x86, -16, -16
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x86, -16, 16
+ playsewithpan SE_W086, +63
+ delay 0x5
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 24, -32
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 24, -16
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 24, 16
+ delay 0x1E
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x5
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 0, -32
+ playsewithpan SE_W161B, +63
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 0, -16
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 0, 16
+ delay 0xA
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1
+ createvisualtask sub_810A094, 0x2, 30, 3, 1, 0
+ delay 0x2
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1
+ createsprite gUnknown_08597274, 0x82, 1, 2, 16, 0, 0
+ waitforvisualfinish
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ end
+
+Move_THUNDER_PUNCH:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ loadspritegfx 0x2735
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 16, 0
+ waitforvisualfinish
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08595E98, 0x84, 0, 0, 8, 1, 0
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 1
+ delay 0x1
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 0, -48
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x2, 0, -16
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x2, 0, 16
+ delay 0x1
+ playsewithpan SE_W161B, +63
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x2
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 15, 1
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 2
+ delay 0x1
+ createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, 0
+ delay 0x14
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_SACRED_FIRE:
+ loadspritegfx 0x2731
+ loadspritegfx 0x2733
+ loopsewithpan SE_W221, -64, 0x7, 0x5
+ createsprite gUnknown_08595428, 0x2, -32, 0, 50, 5, -2, 0
+ delay 0x1
+ createsprite gUnknown_08595428, 0x42, -20, -10, 50, 5, -1, -1
+ delay 0x1
+ createsprite gUnknown_08595428, 0x42, 0, -16, 50, 5, 0, -1
+ delay 0x1
+ createsprite gUnknown_08595428, 0x42, 20, -10, 50, 5, 1, -1
+ delay 0x1
+ createsprite gUnknown_08595428, 0x2, 32, 0, 50, 5, 2, 0
+ delay 0x1
+ createsprite gUnknown_08595428, 0x2, 20, 10, 50, 5, 1, 1
+ delay 0x1
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1
+ createsprite gUnknown_08595428, 0x2, 0, 16, 50, 5, 0, 1
+ delay 0x1
+ createsprite gUnknown_08595428, 0x2, -20, 10, 50, 5, -1, 1
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1
+ waitforvisualfinish
+ playsewithpan SE_W221B, +63
+ createsprite gUnknown_085953F8, 0x82, -16, 0, 70, 16, 0, 1
+ delay 0xA
+ playsewithpan SE_W221B, +63
+ createsprite gUnknown_085953F8, 0x82, 0, 0, 70, 16, 0, 1
+ delay 0xA
+ playsewithpan SE_W221B, +63
+ createsprite gUnknown_085953F8, 0x82, 16, 0, 80, 16, 0, 1
+ delay 0x1
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1
+ waitforvisualfinish
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1
+ playsewithpan SE_W172B, +63
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, -1, 0
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 0, 1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, -1, -1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 2, 1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 1, -1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, -1, 1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 1, -2
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 3, 1
+ waitforvisualfinish
+ end
+
+Move_SCRATCH:
+ loadspritegfx 0x2799
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W010, +63
+ createsprite gUnknown_085CE020, 0x2, 0, 0, 1, 0
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ waitforvisualfinish
+ end
+
+Move_DRAGON_BREATH:
+ loadspritegfx 0x272D
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ loopsewithpan SE_W172, -64, 0x7, 0x7
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createvisualtask sub_8116620, 0xA, 4, 1, 0, 9, 31
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 21, 1
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ delay 0x2
+ createsprite gUnknown_08596EF4, 0x82, 0, 0, 0, 0, 20
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 4, 1, 9, 0, 31
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Move_ROAR:
+ loadspritegfx 0x2745
+ monbg ANIM_ATTACKER
+ monbgprio_28 ANIM_ATTACKER
+ setalpha 0x808
+ createvisualtask sub_8158E9C, 0x2, 0, 2
+ createvisualtask sub_80D6064, 0x5, -5, -5, 10, 0, 1
+ call AnimScript_82CFECB
+ delay 0x14
+ createvisualtask sub_80D5DB0, 0x5, 1, 2
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ blendoff
+ waitforvisualfinish
+ createvisualtask sub_8159078, 0x5
+ waitforvisualfinish
+ end
+
+AnimScript_82CFECB:
+ createsprite gUnknown_085CE7D4, 0x2, 24, -8, 0
+ createsprite gUnknown_085CE7D4, 0x2, 24, 0, 2
+ createsprite gUnknown_085CE7D4, 0x2, 24, 8, 1
+ delay 0xF
+ createsprite gUnknown_085CE7D4, 0x2, 24, -8, 0
+ createsprite gUnknown_085CE7D4, 0x2, 24, 0, 2
+ createsprite gUnknown_085CE7D4, 0x2, 24, 8, 1
+ return
+
+Move_GROWL:
+ loadspritegfx 0x2745
+ createvisualtask sub_8158E9C, 0x2, 0, 255
+ call AnimScript_82CFECB
+ delay 0xA
+ createvisualtask sub_80D52D0, 0x2, 1, 1, 0, 9, 1
+ createvisualtask sub_80D52D0, 0x2, 3, 1, 0, 9, 1
+ waitforvisualfinish
+ createvisualtask sub_8159078, 0x5
+ waitforvisualfinish
+ end
+
+Move_SNORE:
+ loadspritegfx 0x27D5
+ monbg ANIM_ATK_PARTNER
+ setalpha 0x808
+ call AnimScript_82CFF76
+ delay 0x1E
+ call AnimScript_82CFF76
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ end
+
+AnimScript_82CFF76:
+ playsewithpan SE_W173, -64
+ createvisualtask sub_80D6064, 0x5, -7, -7, 7, 0, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 7, 1
+ createsprite gUnknown_085972D8, 0x2, 6, 1, 14, 0, 0
+ createsprite gUnknown_085936EC, 0x2, 0, 0, -42, -38, 24, 0, 0
+ createsprite gUnknown_085936EC, 0x2, 0, 0, 0, -42, 24, 0, 0
+ createsprite gUnknown_085936EC, 0x2, 0, 0, 42, -38, 24, 0, 0
+ return
+
+Move_LIGHT_SCREEN:
+ loadspritegfx 0x2756
+ loadspritegfx 0x27B6
+ setalpha 0x1000
+ waitplaysewithpan SE_W115, -64, 0xF
+ createsprite gUnknown_08596560, 0x1, 40, 0, 10166
+ delay 0xA
+ call AnimScript_82D0014
+ waitforvisualfinish
+ delay 0x1
+ blendoff
+ end
+
+AnimScript_82D0014:
+ createsprite gUnknown_08596624, 0x2, 23, 0, 0, 1
+ delay 0x6
+ createsprite gUnknown_08596624, 0x2, 31, -8, 0, 1
+ delay 0x5
+ createsprite gUnknown_08596624, 0x2, 30, 20, 0, 1
+ delay 0x7
+ createsprite gUnknown_08596624, 0x2, 10, -15, 0, 1
+ delay 0x6
+ createsprite gUnknown_08596624, 0x2, 20, 10, 0, 1
+ delay 0x6
+ createsprite gUnknown_08596624, 0x2, 10, 18, 0, 1
+ return
+
+Move_MIRROR_COAT:
+ loadspritegfx 0x2756
+ loadspritegfx 0x27B8
+ setalpha 0x1000
+ createsprite gUnknown_08596590, 0x1, 40, 0, 10168
+ delay 0xA
+ playsewithpan SE_W115, -64
+ call AnimScript_82D0014
+ waitforvisualfinish
+ delay 0x1
+ blendoff
+ end
+
+Move_REFLECT:
+ loadspritegfx 0x2757
+ loadspritegfx 0x27B7
+ setalpha 0x1000
+ waitplaysewithpan SE_W115, -64, 0xF
+ createsprite gUnknown_08596578, 0x1, 40, 0, 10167
+ delay 0x14
+ createsprite gUnknown_085965F4, 0x2, 30, 0, 0, 1
+ delay 0x7
+ createsprite gUnknown_085965F4, 0x2, 19, -12, 0, 1
+ delay 0x7
+ createsprite gUnknown_085965F4, 0x2, 10, 20, 0, 1
+ waitforvisualfinish
+ delay 0x1
+ blendoff
+ end
+
+Move_BARRIER:
+ loadspritegfx 0x27B9
+ setalpha 0x1000
+ waitplaysewithpan SE_W112, -64, 0xF
+ createsprite gUnknown_085965A8, 0x3, 40, 0, 10169
+ waitforvisualfinish
+ delay 0x1
+ blendoff
+ end
+
+Move_BUBBLE:
+ loadspritegfx 0x27A2
+ loadspritegfx 0x27AB
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ delay 0x1
+ createsprite gUnknown_08595068, 0x2, 18, 0, 15, -15, 10, 128, 100
+ playsewithpan SE_W145, -64
+ waitplaysewithpan SE_W145B, +63, 0x64
+ delay 0x6
+ createsprite gUnknown_08595068, 0x2, 18, 0, 35, 37, 40, 128, 100
+ playsewithpan SE_W145, -64
+ waitplaysewithpan SE_W145B, +63, 0x64
+ delay 0x6
+ createsprite gUnknown_08595068, 0x2, 18, 0, 10, -37, 30, 128, 100
+ playsewithpan SE_W145, -64
+ waitplaysewithpan SE_W145B, +63, 0x64
+ delay 0x6
+ createsprite gUnknown_08595068, 0x2, 18, 0, 30, 10, 15, 128, 100
+ playsewithpan SE_W145, -64
+ waitplaysewithpan SE_W145B, +63, 0x64
+ delay 0x6
+ createsprite gUnknown_08595068, 0x2, 18, 0, 20, 33, 20, 128, 100
+ playsewithpan SE_W145, -64
+ waitplaysewithpan SE_W145B, +63, 0x64
+ delay 0x6
+ createsprite gUnknown_08595068, 0x2, 18, 0, 25, -30, 10, 128, 100
+ playsewithpan SE_W145, -64
+ waitplaysewithpan SE_W145B, +63, 0x64
+ waitforvisualfinish
+ call AnimScript_82D7B53
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_SMOG:
+ loadspritegfx 0x27BC
+ monbg ANIM_DEF_PARTNER
+ monbgprio_29
+ setalpha 0x80C
+ loopsewithpan SE_W054, +63, 0x11, 0xA
+ call AnimScript_82D024A
+ call AnimScript_82D024A
+ call AnimScript_82D024A
+ call AnimScript_82D024A
+ call AnimScript_82D024A
+ call AnimScript_82D024A
+ call AnimScript_82D024A
+ delay 0x78
+ loopsewithpan SE_W092, +63, 0x12, 0x2
+ createvisualtask sub_8115A04, 0x2, 4, 2, 2, 0, 12, 26650
+ delay 0xA
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 15, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D024A:
+ createsprite gUnknown_08595C44, 0x2, 0, -24, 48, 240, 1, 0
+ delay 0x7
+ return
+
+Move_FAINT_ATTACK:
+ loadspritegfx 0x2797
+ monbg ANIM_ATTACKER
+ fadetobg BG_DARK
+ waitbgfadein
+ delay 0x0
+ playsewithpan SE_W185, -64
+ createvisualtask sub_80D5830, 0x2, 0, 18, 6, 1, 3
+ createvisualtask sub_81136E8, 0x2, 1
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ invisible ANIM_ATTACKER
+ delay 0x1
+ createvisualtask sub_8117F60, 0x2
+ setalpha 0x80C
+ monbg ANIM_TARGET
+ delay 0x1
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 9, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ delay 0x1
+ setarg 0x7, 0x1000
+ delay 0x20
+ createvisualtask sub_8113888, 0x2
+ monbg ANIM_ATTACKER
+ createvisualtask sub_81137E4, 0x2, 1
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ delay 0x1
+ restorebg
+ waitbgfadein
+ end
+
+Move_SAND_ATTACK:
+ loadspritegfx 0x275A
+ monbg ANIM_ATK_PARTNER
+ monbgprio_28 ANIM_ATTACKER
+ setalpha 0x80C
+ playsewithpan SE_W028, -64
+ createsprite gUnknown_0857FE70, 0x2, 0, -10, 0, 0, 3
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 2
+ call AnimScript_82D0337
+ call AnimScript_82D0337
+ call AnimScript_82D0337
+ call AnimScript_82D0337
+ call AnimScript_82D0337
+ call AnimScript_82D0337
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ end
+
+AnimScript_82D0337:
+ createsprite gUnknown_085971A8, 0x82, 15, 15, 20, 0, 0
+ createsprite gUnknown_085971A8, 0x82, 15, 15, 20, 10, 10
+ createsprite gUnknown_085971A8, 0x82, 15, 15, 20, -10, -10
+ createsprite gUnknown_085971A8, 0x82, 15, 15, 20, 20, 5
+ createsprite gUnknown_085971A8, 0x82, 15, 15, 20, -20, -5
+ delay 0x2
+ return
+
+Move_MUD_SLAP:
+ loadspritegfx 0x275A
+ playsewithpan SE_W028, -64
+ createsprite gUnknown_0857FE70, 0x2, 0, -10, 0, 0, 3
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 2
+ call AnimScript_82D03D5
+ call AnimScript_82D03D5
+ call AnimScript_82D03D5
+ call AnimScript_82D03D5
+ call AnimScript_82D03D5
+ call AnimScript_82D03D5
+ waitforvisualfinish
+ end
+
+AnimScript_82D03D5:
+ createsprite gUnknown_085971CC, 0x82, 15, 15, 20, 0, 0
+ createsprite gUnknown_085971CC, 0x82, 15, 15, 20, 10, 5
+ createsprite gUnknown_085971CC, 0x82, 15, 15, 20, -10, -5
+ createsprite gUnknown_085971CC, 0x82, 15, 15, 20, 20, 10
+ createsprite gUnknown_085971CC, 0x82, 15, 15, 20, -20, -10
+ delay 0x2
+ return
+
+Move_DRAGON_RAGE:
+ loadspritegfx 0x272D
+ loadspritegfx 0x2733
+ playsewithpan SE_W082, -64
+ createvisualtask sub_80D51AC, 0x5, 0, 0, 2, 40, 1
+ waitforvisualfinish
+ createsprite gUnknown_0857FE70, 0x82, 0, 15, 0, 0, 4
+ waitforvisualfinish
+ createsprite gUnknown_08596F80, 0x82, 30, 15, 0, 10, 10
+ waitforvisualfinish
+ loopsewithpan SE_W172B, +63, 0xB, 0x3
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 3, 25, 1
+ createsprite gUnknown_08596F28, 0xC2, 1, 5, 0
+ delay 0x1
+ createsprite gUnknown_08596F28, 0xC2, 1, -10, -15
+ delay 0x1
+ createsprite gUnknown_08596F28, 0x82, 1, 0, 25
+ delay 0x1
+ createsprite gUnknown_08596F28, 0xC2, 1, 15, 5
+ delay 0x1
+ createsprite gUnknown_08596F28, 0xC2, 1, -25, 0
+ delay 0x1
+ createsprite gUnknown_08596F28, 0x82, 1, 30, 30
+ delay 0x1
+ createsprite gUnknown_08596F28, 0x82, 1, -27, 25
+ delay 0x1
+ createsprite gUnknown_08596F28, 0xC2, 1, 0, 8
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0xC2, 0, 0, 4
+ waitforvisualfinish
+ end
+
+Move_RAIN_DANCE:
+ loadspritegfx 0x2783
+ playsewithpan SE_W240, -64
+ createvisualtask sub_8116620, 0xA, 1921, 2, 0, 4, 0
+ waitforvisualfinish
+ createvisualtask sub_8107188, 0x2, 0, 3, 120
+ createvisualtask sub_8107188, 0x2, 0, 3, 120
+ delay 0x78
+ delay 0x1E
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 1921, 2, 4, 0, 0
+ waitforvisualfinish
+ end
+
+Move_BITE:
+ loadspritegfx 0x279B
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W044, +63
+ createsprite gUnknown_08597080, 0x2, 0, -32, 0, 0, 819, 10
+ createsprite gUnknown_08597080, 0x2, 0, 32, 4, 0, -819, 10
+ delay 0xA
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 4, 7, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ delay 0x1
+ end
+
+Move_CRUNCH:
+ loadspritegfx 0x279B
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ fadetobg BG_DARK
+ waitbgfadein
+ setalpha 0x80C
+ playsewithpan SE_W044, +63
+ createsprite gUnknown_08597080, 0x2, -32, -32, 1, 819, 819, 10
+ createsprite gUnknown_08597080, 0x2, 32, 32, 5, -819, -819, 10
+ delay 0xA
+ createsprite gUnknown_08597358, 0x2, -8, 0, 1, 1
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 7, 5, 2
+ waitforvisualfinish
+ playsewithpan SE_W044, +63
+ createsprite gUnknown_08597080, 0x2, 32, -32, 7, -819, 819, 10
+ createsprite gUnknown_08597080, 0x2, -32, 32, 3, 819, -819, 10
+ delay 0xA
+ createsprite gUnknown_08597358, 0x2, 8, 0, 1, 1
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 8, 4, 2
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ delay 0x1
+ restorebg
+ waitbgfadein
+ end
+
+Move_CLAMP:
+ loadspritegfx 0x27A1
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W011, +63
+ createsprite gUnknown_08597098, 0x2, -32, 0, 2, 819, 0, 10
+ createsprite gUnknown_08597098, 0x2, 32, 0, 6, -819, 0, 10
+ delay 0xA
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x5, 1, 3, 0, 5, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ waitforvisualfinish
+ end
+
+Move_ICE_BEAM:
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ loadspritegfx 0x279D
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 7, 0
+ waitforvisualfinish
+ createsoundtask sub_8158C58, 183, -64, 63, 4, 4, 0, 10
+ createsprite gUnknown_08595B2C, 0x2, 20, 12, 0, 12, 20
+ createsprite gUnknown_08595B2C, 0x2, 20, -12, 0, -12, 20
+ delay 0x1
+ call AnimScript_82D07C1
+ call AnimScript_82D07C1
+ call AnimScript_82D07C1
+ createsprite gUnknown_08597274, 0x2, 4, -31, 0, 7, 32384
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 25, 1
+ call AnimScript_82D07C1
+ call AnimScript_82D07C1
+ call AnimScript_82D07C1
+ call AnimScript_82D07C1
+ call AnimScript_82D07C1
+ call AnimScript_82D07C1
+ call AnimScript_82D07C1
+ call AnimScript_82D07C1
+ createsprite gUnknown_08595B14, 0x2, 20, 0, 0, 0, 11
+ delay 0x1
+ createsprite gUnknown_08595B14, 0x2, 20, 0, 0, 0, 11
+ waitforvisualfinish
+ delay 0x14
+ call AnimScript_82D7720
+ createsprite gUnknown_08597274, 0x2, 4, 5, 7, 0, 32384
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 0, 7, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+AnimScript_82D07C1:
+ createsprite gUnknown_08595B2C, 0x2, 20, 12, 0, 12, 20
+ createsprite gUnknown_08595B2C, 0x2, 20, -12, 0, -12, 20
+ createsprite gUnknown_08595B14, 0x2, 20, 0, 0, 0, 11
+ delay 0x1
+ return
+
+Move_WITHDRAW:
+ playsewithpan SE_W029, -64
+ createvisualtask sub_81036A0, 0x5
+ waitforvisualfinish
+ end
+
+Move_AURORA_BEAM:
+ loadspritegfx 0x279C
+ fadetobg BG_AURORABEAM
+ waitbgfadein
+ playsewithpan SE_W062, -64
+ setarg 0x7, 0x0
+ createvisualtask sub_8107528, 0xA, 130
+ call AnimScript_82D088B
+ createvisualtask sub_80D52D0, 0x5, 1, 1, 0, 17, 1
+ call AnimScript_82D088B
+ call AnimScript_82D088B
+ call AnimScript_82D088B
+ setarg 0x7, 0xFFFF
+ createsoundtask sub_8158C58, 183, -64, 63, 3, 6, 0, 10
+ createvisualtask sub_80D52D0, 0x5, 1, 2, 0, 40, 1
+ call AnimScript_82D088B
+ call AnimScript_82D088B
+ call AnimScript_82D088B
+ call AnimScript_82D088B
+ call AnimScript_82D088B
+ call AnimScript_82D088B
+ waitforvisualfinish
+ restorebg
+ waitbgfadein
+ end
+
+AnimScript_82D088B:
+ createsprite gUnknown_085950B4, 0x82, 20, 0, 0, 0, 17
+ delay 0x1
+ createsprite gUnknown_085950B4, 0x82, 20, 0, 0, 0, 17
+ delay 0x1
+ createsprite gUnknown_085950B4, 0x82, 20, 0, 0, 0, 17
+ delay 0x1
+ createsprite gUnknown_085950B4, 0x82, 20, 0, 0, 0, 17
+ delay 0x1
+ return
+
+Move_SOLAR_BEAM:
+ loadspritegfx 0x27A3
+ choosetwoturnanim AnimScript_82D08E6, AnimScript_82D09E3
+
+AnimScript_82D08E4:
+ waitforvisualfinish
+ end
+
+AnimScript_82D08E6:
+ monbg ANIM_ATK_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_8115A04, 0x2, 2, 1, 4, 0, 11, 12287
+ playsewithpan SE_W025, -64
+ call AnimScript_82D0910
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ goto AnimScript_82D08E4
+
+AnimScript_82D0910:
+ createsprite gUnknown_085921E0, 0x2, 40, 40, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, -40, -40, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, 0, 40, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, 0, -40, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, 40, -20, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, 40, 20, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, -40, -20, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, -40, 20, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, -20, 30, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, 20, -30, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, -20, -30, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, 20, 30, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, -40, 0, 16
+ delay 0x2
+ createsprite gUnknown_085921E0, 0x2, 40, 0, 16
+ delay 0x2
+ return
+
+AnimScript_82D09E3:
+ call AnimScript_82D7D1D
+ panse_1B SE_W076, -64, +63, +2, 0x0
+ createvisualtask sub_80FEA58, 0x5
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 0
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 1
+ delay 0x4
+ createvisualtask sub_8116620, 0xA, 4, 1, 0, 10, 1017
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 2
+ delay 0x4
+ createvisualtask sub_80D52D0, 0x5, 1, 2, 0, 65, 1
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 3
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 4
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 5
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 6
+ delay 0x4
+ call AnimScript_82D0AB5
+ call AnimScript_82D0AB5
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 4, 1, 10, 0, 1017
+ call AnimScript_82D7D57
+ goto AnimScript_82D08E4
+
+AnimScript_82D0AB5:
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 0
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 1
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 2
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 3
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 4
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 5
+ delay 0x4
+ createsprite gUnknown_085921F8, 0x83, 15, 0, 20, 6
+ delay 0x4
+ return
+
+Move_BLIZZARD:
+ loadspritegfx 0x279D
+ monbg ANIM_DEF_PARTNER
+ createvisualtask sub_8117754, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82D0CB2
+ fadetobg BG_HIGHSPEED_OPPONENT
+
+AnimScript_82D0B43:
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, -2304, 0, 1, -1
+ waitbgfadein
+ waitforvisualfinish
+ panse_1B SE_W059, -64, +63, +2, 0x0
+ call AnimScript_82D0B7D
+ call AnimScript_82D0B7D
+ playsewithpan SE_W059B, +63
+ waitforvisualfinish
+ call AnimScript_82D77A4
+ waitforvisualfinish
+ delay 0x14
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+AnimScript_82D0B7D:
+ createsprite gUnknown_08595B98, 0x28, 0, -10, 0, -10, 72, 1
+ createsprite gUnknown_08595BB0, 0x28, 0, 0, 0, 0, 80, 0, 0, 1
+ delay 0x3
+ createsprite gUnknown_08595B98, 0x28, 0, -15, 0, -15, 72, 1
+ createsprite gUnknown_08595BB0, 0x28, 0, -10, 0, -10, 80, 0, 0, 1
+ delay 0x3
+ createsprite gUnknown_08595B98, 0x28, 0, -5, 0, -5, 72, 1
+ createsprite gUnknown_08595BB0, 0x28, 0, 10, 0, 10, 80, 0, 0, 1
+ delay 0x3
+ createsprite gUnknown_08595B98, 0x28, 0, -10, 0, -10, 72, 1
+ createsprite gUnknown_08595BB0, 0x28, 0, -20, 0, -20, 80, 0, 0, 1
+ delay 0x3
+ createsprite gUnknown_08595B98, 0x28, 0, -20, 0, -20, 72, 1
+ createsprite gUnknown_08595BB0, 0x28, 0, 15, 0, 15, 80, 0, 0, 1
+ delay 0x3
+ createsprite gUnknown_08595B98, 0x28, 0, -15, 0, -15, 72, 1
+ createsprite gUnknown_08595BB0, 0x28, 0, -20, 0, -20, 80, 0, 0, 1
+ delay 0x3
+ createsprite gUnknown_08595B98, 0x28, 0, -25, 0, -25, 72, 1
+ createsprite gUnknown_08595BB0, 0x28, 0, 20, 0, 20, 80, 0, 0, 1
+ delay 0x3
+ return
+
+AnimScript_82D0CB2:
+ fadetobg BG_HIGHSPEED_PLAYER
+ goto AnimScript_82D0B43
+
+Move_POWDER_SNOW:
+ loadspritegfx 0x279D
+ monbg ANIM_DEF_PARTNER
+ createsprite gUnknown_08597274, 0x2, 31, 1, 0, 3, 0
+ waitforvisualfinish
+ panse_1B SE_W016, -64, +63, +2, 0x0
+ call AnimScript_82D0D03
+ call AnimScript_82D0D03
+ playsewithpan SE_W016B, +63
+ waitforvisualfinish
+ waitsound
+ call AnimScript_82D77A4
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ delay 0x14
+ createsprite gUnknown_08597274, 0x2, 31, 1, 3, 0, 0
+ end
+
+AnimScript_82D0D03:
+ createsprite gUnknown_08595BC8, 0x28, 0, 0, 0, 0, 56, 4, 4, 1
+ delay 0x3
+ createsprite gUnknown_08595BC8, 0x28, 0, -10, 0, -10, 56, 4, 4, 1
+ delay 0x3
+ createsprite gUnknown_08595BC8, 0x28, 0, 10, 0, 10, 56, -4, 3, 1
+ delay 0x3
+ createsprite gUnknown_08595BC8, 0x28, 0, -20, 0, -20, 56, -4, 5, 1
+ delay 0x3
+ createsprite gUnknown_08595BC8, 0x28, 0, 15, 0, 15, 56, 4, 4, 1
+ delay 0x3
+ createsprite gUnknown_08595BC8, 0x28, 0, -20, 0, -20, 56, 4, 4, 1
+ delay 0x3
+ createsprite gUnknown_08595BC8, 0x28, 0, 20, 0, 20, 56, 4, 4, 1
+ delay 0x3
+ return
+
+Move_HYDRO_PUMP:
+ loadspritegfx 0x27A5
+ loadspritegfx 0x27A4
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80D51AC, 0x5, 0, 0, 2, 40, 1
+ delay 0x6
+ panse_1B SE_W056, -64, +63, +2, 0x0
+ createvisualtask sub_81076C8, 0x5, 100
+ call AnimScript_82D0E52
+ call AnimScript_82D0E52
+ call AnimScript_82D0E52
+ createvisualtask sub_80D51AC, 0x5, 1, 3, 0, 37, 1
+ call AnimScript_82D0E93
+ call AnimScript_82D0E52
+ call AnimScript_82D0E52
+ call AnimScript_82D0E93
+ call AnimScript_82D0E52
+ call AnimScript_82D0E52
+ call AnimScript_82D0E93
+ call AnimScript_82D0E52
+ call AnimScript_82D0E52
+ call AnimScript_82D0E93
+ call AnimScript_82D0E52
+ call AnimScript_82D0E52
+ call AnimScript_82D0E93
+ delay 0x1
+ delay 0x1
+ call AnimScript_82D0E93
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D0E52:
+ createsprite gUnknown_085950E4, 0x3, 10, 10, 0, 16
+ createsprite gUnknown_085950E4, 0x3, 10, 10, 0, -16
+ delay 0x1
+ createsprite gUnknown_085950E4, 0x3, 10, 10, 0, 16
+ createsprite gUnknown_085950E4, 0x3, 10, 10, 0, -16
+ delay 0x1
+ return
+
+AnimScript_82D0E93:
+ createsprite gUnknown_08597388, 0x4, 0, 15, 1, 1
+ createsprite gUnknown_08597388, 0x4, 0, -15, 1, 1
+ return
+
+Move_SIGNAL_BEAM:
+ loadspritegfx 0x2818
+ loadspritegfx 0x2819
+ loadspritegfx 0x2759
+ createvisualtask sub_80D51AC, 0x5, 0, 0, 2, 25, 1
+ delay 0x6
+ panse_1B SE_W062, -64, +63, +1, 0x0
+ createvisualtask sub_81076C8, 0x5, 100
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ createvisualtask sub_80D51AC, 0x5, 1, 3, 0, 25, 1
+ createsprite gUnknown_0859728C, 0x2, 4, 8, 5, 31, 8, 961, 8
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ call AnimScript_82D0F79
+ waitforvisualfinish
+ end
+
+AnimScript_82D0F79:
+ createsprite gUnknown_08595114, 0x83, 10, 10, 0, 16
+ createsprite gUnknown_0859512C, 0x83, 10, 10, 0, -16
+ delay 0x1
+ return
+
+Move_ABSORB:
+ loadspritegfx 0x27A3
+ loadspritegfx 0x272F
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_2A ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 4, 13293
+ waitforvisualfinish
+ playsewithpan SE_W071, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ delay 0x2
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 5, 5, 1
+ waitforvisualfinish
+ delay 0x3
+ call AnimScript_82D1009
+ waitforvisualfinish
+ delay 0xF
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 1, 4, 0, 13293
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D1009:
+ playsewithpan SE_W152, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ delay 0x4
+ playsewithpan SE_W152, +63
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ delay 0x4
+ playsewithpan SE_W152, +63
+ createsprite gUnknown_08592270, 0x3, -5, 15, 16, 33
+ delay 0x4
+ playsewithpan SE_W152, +63
+ createsprite gUnknown_08592270, 0x3, 0, -15, -16, 36
+ delay 0x4
+ playsewithpan SE_W152, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ delay 0x4
+ playsewithpan SE_W152, +63
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ delay 0x4
+ playsewithpan SE_W152, +63
+ createsprite gUnknown_08592270, 0x3, -10, 20, 20, 39
+ delay 0x4
+ playsewithpan SE_W152, +63
+ createsprite gUnknown_08592270, 0x3, 5, -18, -20, 35
+ delay 0x4
+ return
+
+Move_MEGA_DRAIN:
+ loadspritegfx 0x27A3
+ loadspritegfx 0x272F
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_2A ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 8, 13293
+ waitforvisualfinish
+ playsewithpan SE_W071, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 1
+ delay 0x2
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 5, 5, 1
+ waitforvisualfinish
+ delay 0x3
+ call AnimScript_82D1121
+ waitforvisualfinish
+ delay 0xF
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 1, 8, 0, 13293
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D1121:
+ playsewithpan SE_W145C, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 5, -18, -20, 35
+ delay 0x4
+ playsewithpan SE_W145C, +63
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ createsprite gUnknown_08592270, 0x3, -10, 20, 20, 39
+ delay 0x4
+ playsewithpan SE_W145C, +63
+ createsprite gUnknown_08592270, 0x3, -5, 15, 16, 33
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ delay 0x4
+ playsewithpan SE_W145C, +63
+ createsprite gUnknown_08592270, 0x3, 0, -15, -16, 36
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ delay 0x4
+ playsewithpan SE_W145C, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 0, -15, -16, 36
+ delay 0x4
+ playsewithpan SE_W145C, +63
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ createsprite gUnknown_08592270, 0x3, -5, 15, 16, 33
+ delay 0x4
+ playsewithpan SE_W145C, +63
+ createsprite gUnknown_08592270, 0x3, -10, 20, 20, 39
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ delay 0x4
+ playsewithpan SE_W145C, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 5, -18, -20, 35
+ delay 0x4
+ return
+
+Move_GIGA_DRAIN:
+ loadspritegfx 0x27A3
+ loadspritegfx 0x272F
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_2A ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 12, 13293
+ waitforvisualfinish
+ playsewithpan SE_W071, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 0
+ delay 0x2
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 5, 5, 1
+ waitforvisualfinish
+ delay 0x3
+ call AnimScript_82D12B1
+ waitforvisualfinish
+ delay 0xF
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 1, 12, 0, 13293
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D12B1:
+ playsewithpan SE_W202, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 5, -18, -40, 35
+ createsprite gUnknown_08592270, 0x3, -10, 20, 20, 39
+ delay 0x4
+ playsewithpan SE_W202, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 28, 26
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ createsprite gUnknown_08592270, 0x3, -10, 20, 40, 39
+ delay 0x4
+ playsewithpan SE_W202, +63
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ createsprite gUnknown_08592270, 0x3, -5, 15, 16, 33
+ createsprite gUnknown_08592270, 0x3, 10, -5, -32, 26
+ delay 0x4
+ playsewithpan SE_W202, +63
+ createsprite gUnknown_08592270, 0x3, 0, -15, -16, 36
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ delay 0x4
+ playsewithpan SE_W202, +63
+ createsprite gUnknown_08592270, 0x3, -5, 15, 16, 33
+ createsprite gUnknown_08592270, 0x3, 0, -15, -16, 36
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ delay 0x4
+ playsewithpan SE_W202, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, -5, 15, 16, 33
+ createsprite gUnknown_08592270, 0x3, 10, -5, -40, 26
+ delay 0x4
+ playsewithpan SE_W202, +63
+ createsprite gUnknown_08592270, 0x3, -5, 15, 36, 33
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ createsprite gUnknown_08592270, 0x3, -10, 20, 20, 39
+ delay 0x4
+ playsewithpan SE_W202, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 5, -18, -20, 35
+ delay 0x4
+ return
+
+Move_LEECH_LIFE:
+ loadspritegfx 0x27B1
+ loadspritegfx 0x27A3
+ delay 0x1
+ loadspritegfx 0x272F
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_2A ANIM_TARGET
+ setalpha 0x80C
+ delay 0x1
+ createsprite gUnknown_085969C8, 0x2, -20, 15, 12
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ playsewithpan SE_W071, +63
+ delay 0x2
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 5, 5, 1
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 7, 0
+ waitforvisualfinish
+ call AnimScript_82D1009
+ waitforvisualfinish
+ delay 0xF
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 1, 7, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_SYNTHESIS:
+ loadspritegfx 0x2741
+ createvisualtask sub_8115A04, 0x2, 2, 2, 2, 0, 16, 19451
+ playsewithpan SE_W025, -64
+ call AnimScript_82D79B4
+ waitforvisualfinish
+ unloadspritegfx 0x2741
+ delay 0x1
+ loadspritegfx 0x272F
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ end
+
+Move_TOXIC:
+ loadspritegfx 0x27A7
+ loadspritegfx 0x27A6
+ call AnimScript_82D1515
+ call AnimScript_82D1515
+ waitforvisualfinish
+ delay 0xF
+ call AnimScript_82D7A71
+ waitforvisualfinish
+ end
+
+AnimScript_82D1515:
+ createsprite gUnknown_08596134, 0x82, -24, 16, 1, 1
+ playsewithpan SE_W092, +63
+ delay 0xF
+ createsprite gUnknown_08596134, 0x82, 8, 16, 1, 1
+ playsewithpan SE_W092, +63
+ delay 0xF
+ createsprite gUnknown_08596134, 0x82, -8, 16, 1, 1
+ playsewithpan SE_W092, +63
+ delay 0xF
+ createsprite gUnknown_08596134, 0x82, 24, 16, 1, 1
+ playsewithpan SE_W092, +63
+ delay 0xF
+ return
+
+Move_SLUDGE:
+ loadspritegfx 0x27A6
+ playsewithpan SE_W145C, -64
+ createsprite gUnknown_085961A8, 0x82, 20, 0, 40, 0
+ waitforvisualfinish
+ createvisualtask sub_80D51AC, 0x5, 1, 3, 0, 5, 1
+ createvisualtask sub_8115A04, 0x2, 4, 1, 2, 0, 12, 31774
+ call AnimScript_82D7A71
+ waitforvisualfinish
+ end
+
+Move_SLUDGE_BOMB:
+ loadspritegfx 0x27A6
+ call AnimScript_82D16BC
+ call AnimScript_82D16BC
+ call AnimScript_82D16BC
+ call AnimScript_82D16BC
+ call AnimScript_82D16BC
+ call AnimScript_82D16BC
+ call AnimScript_82D16BC
+ call AnimScript_82D16BC
+ call AnimScript_82D16BC
+ call AnimScript_82D16BC
+ createvisualtask sub_80D52D0, 0x5, 1, 3, 0, 15, 1
+ createvisualtask sub_8115A04, 0x2, 4, 1, 2, 0, 12, 31774
+ createsprite gUnknown_085961D8, 0x82, 42, 27, 20
+ createsprite gUnknown_085961D8, 0x82, -27, 44, 20
+ createsprite gUnknown_085961D8, 0x82, 39, -28, 20
+ createsprite gUnknown_085961D8, 0x82, -42, -42, 20
+ playsewithpan SE_W091, +63
+ delay 0x5
+ createsprite gUnknown_085961D8, 0x82, 0, 40, 20
+ createsprite gUnknown_085961D8, 0x82, -8, -44, 20
+ createsprite gUnknown_085961D8, 0x82, -46, -28, 20
+ createsprite gUnknown_085961D8, 0x82, 46, 9, 20
+ playsewithpan SE_W091, +63
+ delay 0x5
+ createsprite gUnknown_085961D8, 0x82, 42, 0, 20
+ createsprite gUnknown_085961D8, 0x82, -43, -12, 20
+ createsprite gUnknown_085961D8, 0x82, 16, -46, 20
+ createsprite gUnknown_085961D8, 0x82, -16, 44, 20
+ playsewithpan SE_W091, +63
+ delay 0x0
+ waitsound
+ waitforvisualfinish
+ call AnimScript_82D7A71
+ waitforvisualfinish
+ end
+
+AnimScript_82D16BC:
+ playsewithpan SE_W145C, -64
+ createsprite gUnknown_085961A8, 0x82, 20, 0, 40, 0
+ delay 0x3
+ return
+
+Move_ACID:
+ loadspritegfx 0x27A6
+ monbg ANIM_DEF_PARTNER
+ createsprite gUnknown_085961C0, 0x82, 20, 0, 40, 1, 0, 0
+ playsewithpan SE_W145C, -64
+ delay 0x5
+ createsprite gUnknown_085961C0, 0x82, 20, 0, 40, 1, 24, 0
+ playsewithpan SE_W145C, -64
+ delay 0x5
+ createsprite gUnknown_085961C0, 0x82, 20, 0, 40, 1, -24, 0
+ playsewithpan SE_W145C, -64
+ delay 0xF
+ createvisualtask sub_80D52D0, 0x5, 1, 2, 0, 10, 1
+ createvisualtask sub_80D52D0, 0x5, 3, 2, 0, 10, 1
+ createvisualtask sub_8115A04, 0x2, 20, 2, 2, 0, 12, 31774
+ createsprite gUnknown_0859620C, 0x82, 0, -22, 0, 15, 55
+ playsewithpan SE_W145, +63
+ delay 0xA
+ createsprite gUnknown_0859620C, 0x82, -26, -24, 0, 15, 55
+ playsewithpan SE_W145, +63
+ delay 0xA
+ createsprite gUnknown_0859620C, 0x82, 15, -27, 0, 15, 50
+ playsewithpan SE_W145, +63
+ delay 0xA
+ createsprite gUnknown_0859620C, 0x82, -15, -17, 0, 10, 45
+ playsewithpan SE_W145, +63
+ delay 0xA
+ createsprite gUnknown_0859620C, 0x82, 27, -22, 0, 15, 50
+ playsewithpan SE_W145, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Move_BONEMERANG:
+ loadspritegfx 0x2710
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W155, -64
+ createsprite gUnknown_08597178, 0x2
+ delay 0x14
+ playsewithpan SE_W030, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 1
+ createvisualtask sub_80D51AC, 0x5, 1, 5, 0, 5, 1
+ delay 0x11
+ playsewithpan SE_W233, -64
+ createsprite gUnknown_0857FE28, 0x2, 6, -4
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_BONE_CLUB:
+ loadspritegfx 0x2710
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W155, +63
+ createsprite gUnknown_08597190, 0x2, -42, -25, 0, 0, 15
+ delay 0xC
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 1
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 5, 5, 1
+ createsprite gUnknown_0859728C, 0x2, 7, 5, 1, 0, 10, 0, 0
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_BONE_RUSH:
+ loadspritegfx 0x2710
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W155, +63
+ createsprite gUnknown_08597190, 0x2, -42, -25, 0, 0, 15
+ delay 0xC
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 3, 5, 1
+ playsewithpan SE_W030, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_SPIKES:
+ loadspritegfx 0x27A8
+ monbg ANIM_DEF_PARTNER
+ playsewithpan SE_W026, -64
+ waitplaysewithpan SE_W030, +63, 0x1C
+ createsprite gUnknown_085CE11C, 0x82, 20, 0, 0, 24, 30
+ delay 0xA
+ playsewithpan SE_W026, -64
+ waitplaysewithpan SE_W030, +63, 0x1C
+ createsprite gUnknown_085CE11C, 0x82, 20, 0, -24, 24, 30
+ delay 0xA
+ waitplaysewithpan SE_W030, +63, 0x1C
+ createsprite gUnknown_085CE11C, 0x82, 20, 0, 24, 24, 30
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Move_MEGAHORN:
+ loadspritegfx 0x27A9
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ playsewithpan SE_W082, -64
+ jumpifcontest AnimScript_82D19FA
+ fadetobg BG_DRILL
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, -2304, 768, 1, -1
+
+AnimScript_82D1947:
+ waitbgfadein
+ setalpha 0x80C
+ createvisualtask sub_80D51AC, 0x5, 0, 2, 0, 15, 1
+ waitforvisualfinish
+ delay 0xA
+ createsprite gUnknown_0857FE70, 0x2, 0, 24, 0, 0, 6
+ delay 0x3
+ createsprite gUnknown_08596974, 0x3, -42, 25, 0, 0, 6
+ delay 0x4
+ playsewithpan SE_W011, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 0
+ createsprite gUnknown_0857FE70, 0x2, 1, -16, 4, 1, 4
+ waitforvisualfinish
+ createvisualtask sub_80D5484, 0x2, 1, -4, 1, 12, 1
+ createsprite gUnknown_0859728C, 0x2, 7, 5, 1, 0x7FFF, 10, 0, 0
+ delay 0xA
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 11
+ delay 0x3
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 7
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ end
+
+AnimScript_82D19FA:
+ fadetobg BG_DRILL_CONTESTS
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, 2304, 768, 0, -1
+ goto AnimScript_82D1947
+
+Move_GUST:
+ loadspritegfx 0x2719
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W016, +63
+ createsprite gUnknown_08596270, 0x2, 0, -16
+ createvisualtask sub_810DED8, 0x5, 1, 70
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x5, 1, 1, 0, 7, 1
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ playsewithpan SE_W016B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_WING_ATTACK:
+ loadspritegfx 0x2719
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ loopsewithpan SE_W017, -64, 0x14, 0x2
+ createvisualtask sub_80D5738, 0x2, 0, 12, 4, 1, 4
+ createvisualtask sub_810DED8, 0x5, 1, 70
+ createsprite gUnknown_085962A4, 0x2, -25, 0, 0, 0, 20
+ createsprite gUnknown_085962A4, 0x2, 25, 0, 0, 0, 20
+ delay 0x18
+ createsprite gUnknown_0857FE70, 0x2, 0, 24, 0, 0, 9
+ delay 0x11
+ createsprite gUnknown_08597358, 0x2, 16, 0, 1, 1
+ createsprite gUnknown_08597358, 0x2, -16, 0, 1, 1
+ loopsewithpan SE_W003, +63, 0x5, 0x2
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 11
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_PECK:
+ loadspritegfx 0x2797
+ playsewithpan SE_W030, +63
+ createvisualtask sub_80D622C, 0x2, 3, -768, 1, 2
+ createsprite gUnknown_085973E8, 0x83, -12, 0, 1, 3
+ waitforvisualfinish
+ end
+
+Move_AEROBLAST:
+ loadspritegfx 0x27AA
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ call AnimScript_82D7CE5
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ call AnimScript_82D1B82
+ createvisualtask sub_80D51AC, 0x5, 1, 5, 0, 50, 1
+ call AnimScript_82D1B82
+ call AnimScript_82D1B82
+ call AnimScript_82D1B82
+ call AnimScript_82D1B82
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 0
+ playsewithpan SE_W013, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ delay 0x0
+ call AnimScript_82D7D15
+ end
+
+AnimScript_82D1B82:
+ playsewithpan SE_W026, -64
+ createsprite gUnknown_085962D4, 0x2, 14, -12, 0, -12, 15, 0, 0
+ createsprite gUnknown_085962D4, 0x2, 26, 8, 12, 8, 15, 0, 0
+ delay 0x3
+ playsewithpan SE_W026, -64
+ createsprite gUnknown_085962D4, 0x2, 14, -12, 0, -12, 15, 1, 0
+ createsprite gUnknown_085962D4, 0x2, 26, 8, 12, 8, 15, 1, 0
+ delay 0x3
+ playsewithpan SE_W026, -64
+ createsprite gUnknown_085962D4, 0x2, 14, -12, 0, -12, 15, 2, 0
+ createsprite gUnknown_085962D4, 0x2, 26, 8, 12, 8, 15, 2, 0
+ delay 0x3
+ playsewithpan SE_W026, -64
+ createsprite gUnknown_085962D4, 0x2, 14, -12, 0, -12, 15, 3, 0
+ createsprite gUnknown_085962D4, 0x2, 26, 8, 12, 8, 15, 3, 0
+ delay 0x3
+ return
+
+Move_WATER_GUN:
+ loadspritegfx 0x27AB
+ loadspritegfx 0x27A4
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_08595208, 0x2, 20, 0, 0, 0, 40, -25
+ playsewithpan SE_W145, -64
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x5, 1, 1, 0, 8, 1
+ createsprite gUnknown_08597388, 0x4, 0, 0, 1, 2
+ createsprite gUnknown_08595220, 0x2, 0, -15, 0, 15, 55
+ playsewithpan SE_W152, +63
+ delay 0xA
+ createsprite gUnknown_08595220, 0x2, 15, -20, 0, 15, 50
+ playsewithpan SE_W152, +63
+ delay 0xA
+ createsprite gUnknown_08595220, 0x2, -15, -10, 0, 10, 45
+ playsewithpan SE_W152, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_CRABHAMMER:
+ loadspritegfx 0x279D
+ loadspritegfx 0x27A4
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createsprite gUnknown_08597388, 0x4, 0, 0, 1, 0
+ playsewithpan SE_W233B, +63
+ delay 0x1
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 32429, 10, 0, 0
+ createsprite gUnknown_0857FE70, 0x2, 1, -24, 0, 0, 4
+ waitforvisualfinish
+ delay 0x8
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 4
+ waitforvisualfinish
+ loopsewithpan SE_W152, +63, 0x14, 0x3
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 4, 8, 1
+ createsprite gUnknown_08595238, 0x2, 10, 10, 20, 1
+ delay 0x4
+ createsprite gUnknown_08595238, 0x2, 20, -20, 20, 1
+ delay 0x4
+ createsprite gUnknown_08595238, 0x2, -15, 15, 20, 1
+ delay 0x4
+ createsprite gUnknown_08595238, 0x2, 0, 0, 20, 1
+ delay 0x4
+ createsprite gUnknown_08595238, 0x2, -10, -20, 20, 1
+ delay 0x4
+ createsprite gUnknown_08595238, 0x2, 16, -8, 20, 1
+ delay 0x4
+ createsprite gUnknown_08595238, 0x2, 5, 8, 20, 1
+ delay 0x4
+ createsprite gUnknown_08595238, 0x2, -16, 0, 20, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_SURF:
+ createvisualtask sub_8107954, 0x2, 0
+ delay 0x18
+ panse_1B SE_W057, -64, +63, +2, 0x0
+ waitforvisualfinish
+ end
+
+Move_FLAMETHROWER:
+ loadspritegfx 0x272D
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80D51AC, 0x5, 0, 0, 2, 46, 1
+ delay 0x6
+ createvisualtask sub_81076C8, 0x5, 100
+ panse_1B SE_W053, -64, +63, +2, 0x0
+ call AnimScript_82D1E58
+ call AnimScript_82D1E58
+ call AnimScript_82D1E58
+ createvisualtask sub_80D51AC, 0x5, 1, 3, 0, 43, 1
+ call AnimScript_82D1E58
+ call AnimScript_82D1E58
+ call AnimScript_82D1E58
+ call AnimScript_82D1E58
+ call AnimScript_82D1E58
+ call AnimScript_82D1E58
+ call AnimScript_82D1E58
+ call AnimScript_82D1E58
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D1E58:
+ createsprite gUnknown_08595158, 0x3, 10, 10, 0, 16
+ delay 0x2
+ createsprite gUnknown_08595158, 0x3, 10, 10, 0, 16
+ delay 0x2
+ return
+
+Move_SANDSTORM:
+ loadspritegfx 0x2815
+ playsewithpan SE_W201, 0
+ createvisualtask sub_8110BCC, 0x5, 0
+ delay 0x10
+ createsprite gUnknown_08596BA0, 0x28, 10, 2304, 96, 0
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 90, 2048, 96, 0
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 50, 2560, 96, 0
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 20, 2304, 96, 0
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 70, 1984, 96, 0
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 0, 2816, 96, 0
+ delay 0xA
+ createsprite gUnknown_08596BA0, 0x28, 60, 2560, 96, 0
+ end
+
+Move_WHIRLPOOL:
+ loadspritegfx 0x27A5
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ delay 0x0
+ createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, 23968
+ playsewithpan SE_W250, +63
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 50, 1
+ call AnimScript_82D1F5B
+ call AnimScript_82D1F5B
+ call AnimScript_82D1F5B
+ delay 0xC
+ createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, 23968
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+AnimScript_82D1F5B:
+ createsprite gUnknown_08596B70, 0x82, 0, 28, 384, 50, 8, 50, 1
+ delay 0x2
+ createsprite gUnknown_08596B70, 0x82, 0, 32, 240, 40, 11, -46, 1
+ delay 0x2
+ createsprite gUnknown_08596B70, 0x82, 0, 33, 416, 40, 4, 42, 1
+ delay 0x2
+ createsprite gUnknown_08596B70, 0x82, 0, 31, 288, 45, 6, -42, 1
+ delay 0x2
+ createsprite gUnknown_08596B70, 0x82, 0, 28, 448, 45, 11, 46, 1
+ delay 0x2
+ createsprite gUnknown_08596B70, 0x82, 0, 33, 464, 50, 10, -50, 1
+ delay 0x2
+ return
+
+Move_FLY:
+ loadspritegfx 0x27AC
+ loadspritegfx 0x2797
+ choosetwoturnanim AnimScript_82D1FF7, AnimScript_82D200F
+
+AnimScript_82D1FF5:
+ waitforvisualfinish
+ end
+
+AnimScript_82D1FF7:
+ playsewithpan SE_W019, -64
+ createsprite gUnknown_08596340, 0x2, 0, 0, 13, 336
+ goto AnimScript_82D1FF5
+
+AnimScript_82D200F:
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W104, -64
+ createsprite gUnknown_08596358, 0x2, 20
+ delay 0x14
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 0
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ playsewithpan SE_W013, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ goto AnimScript_82D1FF5
+
+Move_BOUNCE:
+ loadspritegfx 0x27AC
+ loadspritegfx 0x2797
+ choosetwoturnanim AnimScript_82D2060, AnimScript_82D2074
+
+AnimScript_82D205F:
+ end
+
+AnimScript_82D2060:
+ playsewithpan SE_W100, -64
+ createsprite gUnknown_08596420, 0x2, 0, 0
+ goto AnimScript_82D205F
+
+AnimScript_82D2074:
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_0859644C, 0x83
+ delay 0x7
+ playsewithpan SE_W025B, +63
+ createsprite gUnknown_08597358, 0x82, 0, 0, 1, 0
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 5, 11, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ goto AnimScript_82D205F
+
+Move_KARATE_CHOP:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W104, +63
+ createsprite gUnknown_08595E68, 0x2, -16, 0, 0, 0, 10, 1, 3, 0
+ waitforvisualfinish
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x5, 1, 4, 0, 6, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_CROSS_CHOP:
+ loadspritegfx 0x279F
+ loadspritegfx 0x282D
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W025, +63
+ createsprite gUnknown_08595EC8, 0x2, 0, 0, 0
+ createsprite gUnknown_08595EC8, 0x2, 0, 0, 1
+ delay 0x28
+ playsewithpan SE_W013, +63
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 0x7FFF, 10, 0, 10
+ createsprite gUnknown_085973D0, 0x3, 0, 0, 1, 20
+ createvisualtask sub_80D51AC, 0x5, 1, 7, 0, 9, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_JUMP_KICK:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createsprite gUnknown_0857FE28, 0x2, 4, 4
+ delay 0x3
+ createsprite gUnknown_08595E80, 0x2, -16, 8, 0, 0, 10, 1, 1, 1
+ playsewithpan SE_W026, +63
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x1, 0, 0, 1, 1
+ createvisualtask sub_80D51AC, 0x5, 1, 5, 0, 7, 1
+ playsewithpan SE_W004, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_HI_JUMP_KICK:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createsprite gUnknown_0857FE70, 0x2, 0, -24, 0, 0, 8
+ waitforvisualfinish
+ delay 0xA
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 3
+ delay 0x2
+ createsprite gUnknown_08595E80, 0x2, -16, 8, 0, 0, 10, 1, 1, 1
+ playsewithpan SE_W026, +63
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 1
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_0857FE70, 0x2, 1, -28, 0, 0, 3
+ delay 0x3
+ createvisualtask sub_80D5484, 0x2, 1, 3, 0, 11, 1
+ waitforvisualfinish
+ delay 0x5
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 6
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_DOUBLE_KICK:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createsprite gUnknown_08595EB0, 0x3, 1, 20, 1
+ createvisualtask sub_80D51AC, 0x5, 1, 4, 0, 6, 1
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_TRIPLE_KICK:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W233B, +63
+ jumpifmoveturn 0x0, AnimScript_82D22B8
+ jumpifmoveturn 0x1, AnimScript_82D22EE
+ goto AnimScript_82D2324
+
+AnimScript_82D22B3:
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D22B8:
+ createsprite gUnknown_08595E98, 0x84, -16, -8, 20, 1, 1
+ createsprite gUnknown_08597358, 0x83, -16, -16, 1, 2
+ createvisualtask sub_80D51AC, 0x5, 1, 4, 0, 6, 1
+ goto AnimScript_82D22B3
+
+AnimScript_82D22EE:
+ createsprite gUnknown_08595E98, 0x84, 8, 8, 20, 1, 1
+ createsprite gUnknown_08597358, 0x83, 8, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x5, 1, 4, 0, 6, 1
+ goto AnimScript_82D22B3
+
+AnimScript_82D2324:
+ createsprite gUnknown_08595E98, 0x84, 0, 0, 20, 1, 1
+ createsprite gUnknown_08597358, 0x83, 0, -8, 1, 1
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ goto AnimScript_82D22B3
+
+Move_DYNAMIC_PUNCH:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ loadspritegfx 0x27D6
+ loadspritegfx 0x2717
+ delay 0x1
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08595E98, 0x83, 0, 0, 20, 1, 0
+ createsprite gUnknown_08597358, 0x82, 0, 0, 1, 0
+ createvisualtask sub_80D51AC, 0x5, 1, 5, 0, 7, 1
+ delay 0x1
+ waitsound
+ playsewithpan SE_W120, +63
+ createvisualtask sub_80D52D0, 0x5, 1, 5, 0, 28, 1
+ createsprite gUnknown_0859371C, 0x3, 0, 0, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x3, 24, -24, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x3, -16, 16, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x3, -24, -12, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x3, 16, 16, 1, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_COUNTER:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_80D5830, 0x2, 0, 18, 6, 1, 4
+ playsewithpan SE_W233, -64
+ waitforvisualfinish
+ createsprite gUnknown_0857FE70, 0x2, 0, 20, 0, 0, 4
+ delay 0x4
+ createsprite gUnknown_08597358, 0x2, -15, 18, 1, 0
+ playsewithpan SE_W233B, +63
+ delay 0x1
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 25, 1
+ createsprite gUnknown_08595E98, 0x3, -15, 18, 8, 1, 0
+ delay 0x3
+ createsprite gUnknown_08597358, 0x2, 0, -4, 1, 0
+ playsewithpan SE_W233B, +63
+ delay 0x1
+ createsprite gUnknown_08595E98, 0x3, 0, -4, 8, 1, 0
+ delay 0x3
+ createsprite gUnknown_08597358, 0x2, 15, 9, 1, 0
+ playsewithpan SE_W233B, +63
+ delay 0x1
+ createsprite gUnknown_08595E98, 0x3, 15, 9, 8, 1, 0
+ delay 0x5
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 5
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_VITAL_THROW:
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W233, -64
+ createvisualtask sub_80D5830, 0x2, 0, 12, 4, 1, 2
+ waitforvisualfinish
+ createsprite gUnknown_0857FE70, 0x2, 0, 20, 0, 0, 4
+ delay 0x2
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 1
+ playsewithpan SE_W233B, +63
+ delay 0x1
+ createsprite gUnknown_0857FE70, 0x2, 1, -24, 0, 0, 4
+ waitforvisualfinish
+ delay 0x3
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 7
+ delay 0xB
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 10
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_ROCK_SMASH:
+ loadspritegfx 0x274A
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ delay 0x1
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 1
+ createsprite gUnknown_08595E98, 0x2, 0, 0, 8, 1, 0
+ playsewithpan SE_W233B, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 5, 1
+ waitforvisualfinish
+ playsewithpan SE_W088, +63
+ createsprite gUnknown_08596B1C, 0x2, 0, 0, 20, 24, 14, 2
+ createsprite gUnknown_08596B1C, 0x2, 5, 0, -20, 24, 14, 1
+ createsprite gUnknown_08596B1C, 0x2, 0, 5, 20, -24, 14, 2
+ createsprite gUnknown_08596B1C, 0x2, -5, 0, -20, -24, 14, 2
+ createsprite gUnknown_08596B1C, 0x2, 0, -5, 30, 18, 8, 2
+ createsprite gUnknown_08596B1C, 0x2, 0, 0, 30, -18, 8, 2
+ createsprite gUnknown_08596B1C, 0x2, 0, 0, -30, 18, 8, 2
+ createsprite gUnknown_08596B1C, 0x2, 0, 0, -30, -18, 8, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 7, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_SUBMISSION:
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W104, -64
+ waitplaysewithpan SE_W004, +63, 0xA
+ waitplaysewithpan SE_W104, -64, 0x14
+ waitplaysewithpan SE_W004, +63, 0x1E
+ waitplaysewithpan SE_W104, -64, 0x28
+ waitplaysewithpan SE_W004, +63, 0x32
+ waitplaysewithpan SE_W104, -64, 0x3C
+ waitplaysewithpan SE_W004, +63, 0x46
+ waitplaysewithpan SE_W104, -64, 0x50
+ waitplaysewithpan SE_W004, +63, 0x5A
+ createvisualtask sub_80D5738, 0x2, 0, -18, 6, 6, 4
+ createvisualtask sub_80D5738, 0x2, 1, 18, 6, 6, 4
+ call AnimScript_82D26D3
+ call AnimScript_82D26D3
+ call AnimScript_82D26D3
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D26D3:
+ createsprite gUnknown_08597358, 0x3, 0, -12, 1, 1
+ delay 0x8
+ createsprite gUnknown_08597358, 0x3, -12, 8, 1, 1
+ delay 0x8
+ createsprite gUnknown_08597358, 0x3, 12, 0, 1, 1
+ delay 0x8
+ return
+
+Move_SUNNY_DAY:
+ loadspritegfx 0x27AD
+ monbg ANIM_ATK_PARTNER
+ setalpha 0x30D
+ createvisualtask sub_8116620, 0xA, 1921, 1, 0, 6, 0x7FFF
+ waitforvisualfinish
+ panse_26 SE_W080, -64, +63, +1, 0x0
+ call AnimScript_82D2753
+ call AnimScript_82D2753
+ call AnimScript_82D2753
+ call AnimScript_82D2753
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 1921, 1, 6, 0, 0x7FFF
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ end
+
+AnimScript_82D2753:
+ createsprite gUnknown_085954A0, 0x28
+ delay 0x6
+ return
+
+Move_COTTON_SPORE:
+ loadspritegfx 0x27AE
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ loopsewithpan SE_W077, +63, 0x12, 0xA
+ call AnimScript_82D277D
+ call AnimScript_82D277D
+ call AnimScript_82D277D
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+AnimScript_82D277D:
+ createsprite gUnknown_085922EC, 0x2, 0, -20, 85, 80, 0
+ delay 0xC
+ createsprite gUnknown_085922EC, 0x2, 0, -10, 170, 80, 0
+ delay 0xC
+ createsprite gUnknown_085922EC, 0x2, 0, -15, 0, 80, 0
+ delay 0xC
+ return
+
+Move_SPORE:
+ loadspritegfx 0x27AE
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_80FEE1C, 0x2
+ loopsewithpan SE_W077, +63, 0x10, 0xB
+ call AnimScript_82D27E2
+ call AnimScript_82D27E2
+ call AnimScript_82D27E2
+ waitforvisualfinish
+ delay 0x1
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D27E2:
+ createsprite gUnknown_085922EC, 0x82, 0, -20, 85, 80, 1
+ delay 0xC
+ createsprite gUnknown_085922EC, 0x82, 0, -10, 170, 80, 1
+ delay 0xC
+ createsprite gUnknown_085922EC, 0x82, 0, -15, 0, 80, 1
+ delay 0xC
+ return
+
+Move_PETAL_DANCE:
+ loadspritegfx 0x27AF
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W080, -64
+ createvisualtask sub_80D5830, 0x2, 0, 12, 6, 6, 3
+ createsprite gUnknown_0859231C, 0x2, 0, -24, 8, 140
+ createsprite gUnknown_08592334, 0x2, 16, -24, 8, 100
+ createsprite gUnknown_08592334, 0x2, -16, -24, 8, 100
+ delay 0xF
+ createsprite gUnknown_0859231C, 0x2, 0, -24, 8, 140
+ createsprite gUnknown_08592334, 0x2, 32, -24, 8, 100
+ createsprite gUnknown_08592334, 0x2, -32, -24, 8, 100
+ delay 0xF
+ createsprite gUnknown_0859231C, 0x2, 0, -24, 8, 140
+ createsprite gUnknown_08592334, 0x2, 24, -24, 8, 100
+ createsprite gUnknown_08592334, 0x2, -24, -24, 8, 100
+ delay 0x1E
+ createsprite gUnknown_08592334, 0x2, 16, -24, 0, 100
+ createsprite gUnknown_08592334, 0x2, -16, -24, 0, 100
+ delay 0x1E
+ createsprite gUnknown_08592334, 0x2, 20, -16, 14, 80
+ createsprite gUnknown_08592334, 0x2, -20, -14, 16, 80
+ waitforvisualfinish
+ createsprite gUnknown_0857FE70, 0x2, 0, 24, 0, 0, 5
+ delay 0x3
+ playsewithpan SE_W025B, +63
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 0
+ createvisualtask sub_80D51AC, 0x2, 1, 6, 0, 8, 1
+ waitforvisualfinish
+ delay 0x8
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 7
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_RAZOR_LEAF:
+ loadspritegfx 0x274F
+ loadspritegfx 0x27B0
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ delay 0x1
+ loopsewithpan SE_W077, -64, 0xA, 0x5
+ createsprite gUnknown_08592390, 0x2, -3, -2, 10
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -1, -1, 15
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -4, -4, 7
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, 3, -3, 11
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -1, -6, 8
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, 2, -1, 12
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -3, -4, 13
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, 4, -5, 7
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, 2, -6, 11
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -3, -5, 8
+ delay 0x3C
+ playsewithpan SE_W013B, -64
+ createsprite gUnknown_085923D8, 0x83, 20, -10, 20, 0, 22, 20, 1
+ createsprite gUnknown_085923D8, 0x83, 20, -10, 20, 0, 22, -20, 1
+ delay 0x14
+ playsewithpan SE_W013, +63
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ createvisualtask sub_80D52D0, 0x2, 3, 2, 0, 8, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_NATURE_POWER:
+Move_ANCIENT_POWER:
+ loadspritegfx 0x274A
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createsprite gUnknown_085972D8, 0x2, 4, 1, 10, 1
+ createsprite gUnknown_08596C10, 0x2, 20, 32, -48, 50, 2
+ createsprite gUnknown_08596C10, 0x2, 0, 32, -38, 25, 5
+ createsprite gUnknown_08596C10, 0x2, 32, 32, -28, 40, 3
+ createsprite gUnknown_08596C10, 0x2, -20, 32, -48, 50, 2
+ createsprite gUnknown_08596C10, 0x2, 20, 32, -28, 60, 1
+ createsprite gUnknown_08596C10, 0x2, 0, 32, -28, 30, 4
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 30, 1
+ playsewithpan SE_W082, -64
+ delay 0xA
+ createsprite gUnknown_08596C10, 0x2, 15, 32, -48, 25, 5
+ createsprite gUnknown_08596C10, 0x2, -10, 32, -42, 30, 4
+ delay 0xA
+ createsprite gUnknown_08596C10, 0x2, 0, 32, -42, 25, 5
+ createsprite gUnknown_08596C10, 0x2, -25, 32, -48, 30, 4
+ waitforvisualfinish
+ createsprite gUnknown_0857FE70, 0x2, 0, 16, 0, 0, 4
+ delay 0x3
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 6, 1
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 7
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_OCTAZOOKA:
+ loadspritegfx 0x272E
+ loadspritegfx 0x2721
+ playsewithpan SE_W025B, -64
+ createsprite gUnknown_08592DFC, 0x82, 20, 0, 0, 0, 20, 0
+ waitforvisualfinish
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_08592E30, 0x82, 8, 8, 1, 0
+ delay 0x2
+ createsprite gUnknown_08592E30, 0x82, -8, -8, 1, 0
+ delay 0x2
+ createsprite gUnknown_08592E30, 0x82, 8, -8, 1, 0
+ delay 0x2
+ createsprite gUnknown_08592E30, 0x82, -8, 8, 1, 0
+ waitforvisualfinish
+ end
+
+Move_MIST:
+ loadspritegfx 0x27A0
+ monbg ANIM_ATK_PARTNER
+ setalpha 0x80C
+ loopsewithpan SE_W054, -64, 0x14, 0xF
+ call AnimScript_82D2C34
+ call AnimScript_82D2C34
+ call AnimScript_82D2C34
+ call AnimScript_82D2C34
+ call AnimScript_82D2C34
+ call AnimScript_82D2C34
+ call AnimScript_82D2C34
+ delay 0x20
+ createvisualtask sub_8115A04, 0x2, 10, 8, 2, 0, 14, 0x7FFF
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ end
+
+AnimScript_82D2C34:
+ createsprite gUnknown_08595C2C, 0x2, 0, -24, 48, 240, 0, 1
+ delay 0x7
+ return
+
+Move_HAZE:
+ waitforvisualfinish
+ playsewithpan SE_W114, 0
+ createvisualtask sub_810C0A0, 0x5
+ delay 0x1E
+ createvisualtask sub_8116620, 0xA, 1920, 2, 0, 16, 0
+ delay 0x5A
+ createvisualtask sub_8116620, 0xA, 1920, 1, 16, 0, 0
+ end
+
+Move_FIRE_PUNCH:
+ loadspritegfx 0x279F
+ loadspritegfx 0x272D
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 9, 31
+ createsprite gUnknown_08595368, 0x81, 0
+ createsprite gUnknown_08595368, 0x81, 64
+ createsprite gUnknown_08595368, 0x81, 128
+ createsprite gUnknown_08595368, 0x81, 196
+ playsewithpan SE_W172, +63
+ waitforvisualfinish
+ createsprite gUnknown_08595E98, 0x83, 0, 0, 8, 1, 0
+ createsprite gUnknown_08597358, 0x82, 0, 0, 1, 1
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 15, 1
+ call AnimScript_82D2D18
+ delay 0x4
+ playsewithpan SE_W007, +63
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 4, 0, 9, 0, 31
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D2D18:
+ createsprite gUnknown_08595380, 0x81, 0, 10, 192, 176, 40
+ createsprite gUnknown_08595380, 0x81, 0, 10, -192, 240, 40
+ createsprite gUnknown_08595380, 0x81, 0, 10, 192, -160, 40
+ createsprite gUnknown_08595380, 0x81, 0, 10, -192, -112, 40
+ createsprite gUnknown_08595380, 0x81, 0, 10, 160, 48, 40
+ createsprite gUnknown_08595380, 0x81, 0, 10, -224, -32, 40
+ createsprite gUnknown_08595380, 0x81, 0, 10, 112, -128, 40
+ return
+
+Move_LEER:
+ loadspritegfx 0x272B
+ monbg ANIM_ATTACKER
+ monbgprio_28 ANIM_ATTACKER
+ setalpha 0x808
+ playsewithpan SE_W043, -64
+ createsprite gUnknown_085CE150, 0x2, 24, -12
+ createvisualtask sub_80D6064, 0x5, -5, -5, 10, 0, 1
+ waitforvisualfinish
+ delay 0xA
+ createvisualtask sub_80D52D0, 0x2, 1, 1, 0, 9, 1
+ createvisualtask sub_80D52D0, 0x2, 3, 1, 0, 9, 1
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ blendoff
+ delay 0x1
+ waitforvisualfinish
+ end
+
+Move_DREAM_EATER:
+ loadspritegfx 0x27A3
+ loadspritegfx 0x272F
+ monbg ANIM_DEF_PARTNER
+ monbgprio_2A ANIM_TARGET
+ playsewithpan SE_W060, -64
+ call AnimScript_82D7CD1
+ setalpha 0x808
+ playsewithpan SE_W107, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 5, 0, 15, 1
+ createvisualtask sub_80D6064, 0x5, -6, -6, 15, 1, 1
+ waitforvisualfinish
+ setalpha 0x80C
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 2, 25, 1
+ call AnimScript_82D2E51
+ waitforvisualfinish
+ delay 0xF
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ delay 0x1
+ call AnimScript_82D7CDD
+ end
+
+AnimScript_82D2E51:
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 5, -18, -40, 35
+ createsprite gUnknown_08592270, 0x3, -10, 20, 20, 39
+ delay 0x4
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 28, 26
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ createsprite gUnknown_08592270, 0x3, -10, 20, 40, 39
+ delay 0x4
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ createsprite gUnknown_08592270, 0x3, -5, 15, 16, 33
+ createsprite gUnknown_08592270, 0x3, 10, -5, -32, 26
+ delay 0x4
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08592270, 0x3, 0, -15, -16, 36
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ delay 0x4
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08592270, 0x3, -5, 15, 16, 33
+ createsprite gUnknown_08592270, 0x3, 0, -15, -16, 36
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ delay 0x4
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, -5, 15, 16, 33
+ createsprite gUnknown_08592270, 0x3, 10, -5, -40, 26
+ delay 0x4
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08592270, 0x3, -5, 15, 36, 33
+ createsprite gUnknown_08592270, 0x3, 10, -5, -8, 26
+ createsprite gUnknown_08592270, 0x3, -10, 20, 20, 39
+ delay 0x4
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 0, 5, 8, 26
+ createsprite gUnknown_08592270, 0x3, 5, -18, -20, 35
+ delay 0x4
+ return
+
+Move_POISON_GAS:
+ loadspritegfx 0x27BC
+ loadspritegfx 0x27A6
+ delay 0x0
+ monbg ANIM_DEF_PARTNER
+ monbgprio_29
+ setalpha 0x80C
+ delay 0x0
+ playsewithpan SE_W054, -64
+ createsprite gUnknown_08595C9C, 0x80, 64, 0, 0, -32, -6, 4192, 1072, 0
+ delay 0x4
+ playsewithpan SE_W054, -64
+ createsprite gUnknown_08595C9C, 0x80, 64, 0, 0, -32, -6, 4192, 1072, 0
+ delay 0x4
+ playsewithpan SE_W054, -64
+ createsprite gUnknown_08595C9C, 0x80, 64, 0, 0, -32, -6, 4192, 1072, 0
+ delay 0x4
+ playsewithpan SE_W054, -64
+ createsprite gUnknown_08595C9C, 0x80, 64, 0, 0, -32, -6, 4192, 1072, 0
+ delay 0x4
+ playsewithpan SE_W054, -64
+ createsprite gUnknown_08595C9C, 0x80, 64, 0, 0, -32, -6, 4192, 1072, 0
+ delay 0x4
+ playsewithpan SE_W054, -64
+ createsprite gUnknown_08595C9C, 0x80, 64, 0, 0, -32, -6, 4192, 1072, 0
+ delay 0x28
+ loopsewithpan SE_W054, +63, 0x1C, 0x6
+ createvisualtask sub_8115A04, 0x2, 4, 6, 2, 0, 12, 26650
+ waitforvisualfinish
+ blendoff
+ clearmonbg ANIM_DEF_PARTNER
+ delay 0x0
+ end
+
+Move_BIND:
+ createvisualtask sub_80D5EB8, 0x5, 0, 6, 3328, 4, 0
+ goto AnimScript_82D30DE
+
+AnimScript_82D30DE:
+ playsewithpan SE_W020, +63
+ call AnimScript_82D30EE
+ call AnimScript_82D30EE
+ waitforvisualfinish
+ end
+
+AnimScript_82D30EE:
+ createvisualtask sub_80D6064, 0x5, 10, -5, 5, 1, 0
+ delay 0x10
+ return
+
+Move_WRAP:
+ createvisualtask sub_80D5830, 0x2, 0, 6, 4, 2, 4
+ goto AnimScript_82D30DE
+
+Move_PSYBEAM:
+ loadspritegfx 0x27B3
+ playsewithpan SE_W060, -64
+ call AnimScript_82D7CD1
+ createsoundtask sub_8158C58, 200, -64, 63, 3, 4, 0, 15
+ call AnimScript_82D319C
+ call AnimScript_82D319C
+ createvisualtask sub_80D5EB8, 0x5, 0, 6, 2048, 4, 1
+ createvisualtask sub_8115A04, 0x2, 4, 2, 2, 0, 12, 32351
+ call AnimScript_82D319C
+ call AnimScript_82D319C
+ call AnimScript_82D319C
+ call AnimScript_82D319C
+ call AnimScript_82D319C
+ call AnimScript_82D319C
+ call AnimScript_82D319C
+ call AnimScript_82D319C
+ call AnimScript_82D319C
+ waitforvisualfinish
+ delay 0x1
+ call AnimScript_82D7CDD
+ end
+
+AnimScript_82D319C:
+ createsprite gUnknown_0859663C, 0x82, 16, 0, 0, 0, 13, 0
+ delay 0x4
+ return
+
+Move_HYPNOSIS:
+ loadspritegfx 0x27B3
+ call AnimScript_82D7CD1
+ call AnimScript_82D31E5
+ call AnimScript_82D31E5
+ call AnimScript_82D31E5
+ createvisualtask sub_8115A04, 0x2, 4, 2, 2, 0, 12, 32351
+ waitforvisualfinish
+ delay 0x1
+ call AnimScript_82D7CDD
+ end
+
+AnimScript_82D31E5:
+ playsewithpan SE_W048, -64
+ createsprite gUnknown_0859663C, 0x82, 0, 8, 0, 8, 27, 0
+ createsprite gUnknown_0859663C, 0x82, 16, -8, 0, -8, 27, 0
+ delay 0x6
+ return
+
+Move_PSYWAVE:
+ loadspritegfx 0x27B5
+ playsewithpan SE_W060, -64
+ call AnimScript_82D7CD1
+ createvisualtask sub_81076C8, 0x5, 100
+ createsoundtask sub_8158C58, 203, -64, 63, 2, 9, 0, 10
+ call AnimScript_82D3275
+ call AnimScript_82D3275
+ createvisualtask sub_8115A04, 0x2, 4, 1, 4, 0, 12, 32351
+ call AnimScript_82D3275
+ call AnimScript_82D3275
+ call AnimScript_82D3275
+ call AnimScript_82D3275
+ waitforvisualfinish
+ delay 0x1
+ call AnimScript_82D7CDD
+ end
+
+AnimScript_82D3275:
+ createsprite gUnknown_08595170, 0x83, 10, 10, 0, 16
+ delay 0x4
+ createsprite gUnknown_08595170, 0x83, 10, 10, 0, 16
+ delay 0x4
+ return
+
+Move_ZAP_CANNON:
+ loadspritegfx 0x27BB
+ loadspritegfx 0x271B
+ playsewithpan SE_W086, -64
+ createsprite gUnknown_08595764, 0x83, 10, 0, 0, 0, 30, 0
+ createsprite gUnknown_08595790, 0x84, 10, 0, 16, 30, 0, 40, 0
+ createsprite gUnknown_08595790, 0x84, 10, 0, 16, 30, 64, 40, 1
+ createsprite gUnknown_08595790, 0x84, 10, 0, 16, 30, 128, 40, 0
+ createsprite gUnknown_08595790, 0x84, 10, 0, 16, 30, 192, 40, 2
+ createsprite gUnknown_08595790, 0x84, 10, 0, 8, 30, 32, 40, 0
+ createsprite gUnknown_08595790, 0x84, 10, 0, 8, 30, 96, 40, 1
+ createsprite gUnknown_08595790, 0x84, 10, 0, 8, 30, 160, 40, 0
+ createsprite gUnknown_08595790, 0x84, 10, 0, 8, 30, 224, 40, 2
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 5, 1
+ delay 0xF
+ waitplaysewithpan SE_W085B, +63, 0x13
+ call AnimScript_82D7BEA
+ waitforvisualfinish
+ end
+
+Move_STEEL_WING:
+ loadspritegfx 0x2719
+ loadspritegfx 0x2797
+ loopsewithpan SE_W231, -64, 0x1C, 0x2
+ createvisualtask sub_81144F8, 0x5, 0, 0, 0
+ waitforvisualfinish
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ loopsewithpan SE_W017, -64, 0x14, 0x2
+ createvisualtask sub_80D5738, 0x2, 0, 12, 4, 1, 4
+ createvisualtask sub_810DED8, 0x5, 1, 70
+ createsprite gUnknown_085962A4, 0x2, -25, 0, 0, 0, 20
+ createsprite gUnknown_085962A4, 0x2, 25, 0, 0, 0, 20
+ delay 0x18
+ createsprite gUnknown_0857FE70, 0x2, 0, 24, 0, 0, 9
+ delay 0x11
+ createsprite gUnknown_08597358, 0x2, 16, 0, 1, 1
+ createsprite gUnknown_08597358, 0x2, -16, 0, 1, 1
+ playsewithpan SE_W013, +63
+ waitforvisualfinish
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 11
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_IRON_TAIL:
+ loadspritegfx 0x2797
+ loopsewithpan SE_W231, -64, 0x1C, 0x2
+ createvisualtask sub_81144F8, 0x5, 1, 0, 0
+ waitforvisualfinish
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_0857FE28, 0x2, 4, 4
+ delay 0x6
+ createsprite gUnknown_08597358, 0x82, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ createvisualtask sub_811489C, 0x5, 0, 1
+ clearmonbg ANIM_TARGET
+ blendoff
+ waitforvisualfinish
+ end
+
+Move_POISON_TAIL:
+ loadspritegfx 0x2797
+ loadspritegfx 0x27A6
+ loopsewithpan SE_W231, -64, 0x1C, 0x2
+ createvisualtask sub_81144F8, 0x5, 1, 1, 23768
+ waitforvisualfinish
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_0857FE28, 0x2, 4, 4
+ delay 0x6
+ createsprite gUnknown_08597358, 0x82, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ playsewithpan SE_W233B, +63
+ waitforvisualfinish
+ createvisualtask sub_811489C, 0x5, 0, 1
+ clearmonbg ANIM_TARGET
+ blendoff
+ call AnimScript_82D7A71
+ waitforvisualfinish
+ end
+
+Move_METAL_CLAW:
+ loadspritegfx 0x2737
+ loopsewithpan SE_W231, -64, 0x1C, 0x2
+ createvisualtask sub_81144F8, 0x5, 0, 0, 0
+ waitforvisualfinish
+ createsprite gUnknown_0857FE28, 0x2, 6, 4
+ delay 0x2
+ playsewithpan SE_W013, +63
+ createsprite gUnknown_08597138, 0x82, -10, -10, 0
+ createsprite gUnknown_08597138, 0x82, -10, 10, 0
+ createsprite gUnknown_085972D8, 0x2, -4, 1, 10, 3, 1
+ delay 0x8
+ createsprite gUnknown_0857FE28, 0x2, 6, 4
+ delay 0x2
+ playsewithpan SE_W013, +63
+ createsprite gUnknown_08597138, 0x82, 10, -10, 1
+ createsprite gUnknown_08597138, 0x82, 10, 10, 1
+ createsprite gUnknown_085972D8, 0x2, -4, 1, 10, 3, 1
+ waitforvisualfinish
+ end
+
+Move_NIGHT_SHADE:
+ monbg ANIM_ATTACKER
+ monbgprio_28 ANIM_ATTACKER
+ playsewithpan SE_W060, -64
+ fadetobg BG_GHOST
+ waitbgfadein
+ delay 0xA
+ playsewithpan SE_W043, -64
+ createvisualtask sub_811188C, 0x5, 85
+ delay 0x46
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 12, 1
+ createvisualtask sub_8115A04, 0x2, 4, 0, 2, 0, 13, 0
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ delay 0x1
+ restorebg
+ waitbgfadein
+ end
+
+Move_EGG_BOMB:
+ loadspritegfx 0x27D6
+ loadspritegfx 0x27BF
+ playsewithpan SE_W039, -64
+ createsprite gUnknown_08593488, 0x82, 10, 0, 0, 0, 25, -32
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 16, 1
+ createsprite gUnknown_0859371C, 0x84, 6, 5, 1, 0
+ playsewithpan SE_W120, +63
+ delay 0x3
+ createsprite gUnknown_0859371C, 0x84, -16, -15, 1, 0
+ playsewithpan SE_W120, +63
+ delay 0x3
+ createsprite gUnknown_0859371C, 0x84, 16, -5, 1, 0
+ playsewithpan SE_W120, +63
+ delay 0x3
+ createsprite gUnknown_0859371C, 0x84, -12, 18, 1, 0
+ playsewithpan SE_W120, +63
+ delay 0x3
+ createsprite gUnknown_0859371C, 0x84, 0, 5, 1, 0
+ playsewithpan SE_W120, +63
+ delay 0x3
+ waitforvisualfinish
+ end
+
+Move_SHADOW_BALL:
+ loadspritegfx 0x27C0
+ fadetobg BG_GHOST
+ waitbgfadein
+ delay 0xF
+ createsoundtask sub_8158C58, 168, -64, 63, 5, 5, 0, 5
+ createsprite gUnknown_08596D58, 0x82, 16, 16, 8
+ waitforvisualfinish
+ playsewithpan SE_W028, +63
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 8, 1
+ waitforvisualfinish
+ restorebg
+ waitbgfadein
+ end
+
+Move_LICK:
+ loadspritegfx 0x27C1
+ delay 0xF
+ playsewithpan SE_W122, +63
+ createsprite gUnknown_08596D8C, 0x82, 0, 0
+ createvisualtask sub_80D52D0, 0x2, 1, 1, 0, 16, 1
+ waitforvisualfinish
+ end
+
+Move_FOCUS_ENERGY:
+ loadspritegfx 0x27C8
+ playsewithpan SE_W082, -64
+ call AnimScript_82CD6C7
+ delay 0x8
+ createvisualtask sub_8115A04, 0x2, 2, 2, 2, 0, 11, 0x7FFF
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 32, 1
+ call AnimScript_82CD6C7
+ delay 0x8
+ call AnimScript_82CD6C7
+ waitforvisualfinish
+ end
+
+Move_BIDE:
+ choosetwoturnanim AnimScript_82D3719, AnimScript_82D3745
+ end
+
+AnimScript_82D3719:
+ loopsewithpan SE_W036, -64, 0x9, 0x2
+ createvisualtask sub_8115A04, 0x2, 2, 2, 2, 0, 11, 31
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 32, 1
+ waitforvisualfinish
+ end
+
+AnimScript_82D3745:
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ loopsewithpan SE_W036, -64, 0x9, 0x2
+ createvisualtask sub_8116620, 0xA, 2, 2, 0, 11, 31
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 32, 1
+ waitforvisualfinish
+ createsprite gUnknown_0857FE70, 0x2, 0, 24, 0, 0, 4
+ waitforvisualfinish
+ createvisualtask sub_80D5484, 0x2, 0, 2, 0, 12, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 16, 1
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x1, 18, -8, 1, 1
+ delay 0x5
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x1, -18, 8, 1, 1
+ delay 0x5
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_08597358, 0x1, -8, -5, 1, 1
+ waitforvisualfinish
+ delay 0x5
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 7
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 2, 2, 11, 0, 31
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_STRING_SHOT:
+ loadspritegfx 0x27C3
+ loadspritegfx 0x27C4
+ monbg ANIM_DEF_PARTNER
+ delay 0x0
+ createsprite gUnknown_08597274, 0x5, 1, 2, 0, 9, 0
+ waitforvisualfinish
+ loopsewithpan SE_W081, -64, 0x9, 0x6
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ call AnimScript_82D38CC
+ waitforvisualfinish
+ playsewithpan SE_W081B, +63
+ createsprite gUnknown_085969F8, 0x82, 0, 10
+ delay 0x4
+ createsprite gUnknown_085969F8, 0x82, 0, -2
+ delay 0x4
+ createsprite gUnknown_085969F8, 0x82, 0, 22
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ delay 0x1
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x5, 1, 2, 9, 0, 0
+ end
+
+AnimScript_82D38CC:
+ createsprite gUnknown_085969E0, 0x82, 20, 0, 512, 20, 1
+ delay 0x1
+ return
+
+Move_SPIDER_WEB:
+ loadspritegfx 0x27C5
+ loadspritegfx 0x27C4
+ monbg ANIM_DEF_PARTNER
+ delay 0x0
+ createsprite gUnknown_08597274, 0x5, 1, 2, 0, 9, 0
+ waitforvisualfinish
+ monbgprio_28 ANIM_TARGET
+ loopsewithpan SE_W081, -64, 0x9, 0x6
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ call AnimScript_82D396D
+ waitforvisualfinish
+ playsewithpan SE_W081B, +63
+ createsprite gUnknown_08596A2C, 0x2
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ delay 0x1
+ createsprite gUnknown_08597274, 0x5, 1, 2, 9, 0, 0
+ end
+
+AnimScript_82D396D:
+ createsprite gUnknown_085969E0, 0x82, 20, 0, 512, 20, 0
+ delay 0x1
+ return
+
+Move_RAZOR_WIND:
+ choosetwoturnanim AnimScript_82D398C, AnimScript_82D39DC
+
+AnimScript_82D398A:
+ waitforvisualfinish
+ end
+
+AnimScript_82D398C:
+ loadspritegfx 0x2719
+ playsewithpan SE_W016, -64
+ createsprite gUnknown_08593550, 0x2, 32, 0, 16, 16, 0, 7, 40
+ createsprite gUnknown_08593550, 0x2, 32, 0, 16, 16, 85, 7, 40
+ createsprite gUnknown_08593550, 0x2, 32, 0, 16, 16, 170, 7, 40
+ waitforvisualfinish
+ playsewithpan SE_W016B, -64
+ goto AnimScript_82D398A
+
+AnimScript_82D39DC:
+ loadspritegfx 0x27AA
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W013B, -64
+ createsprite gUnknown_085962D4, 0x2, 14, 8, 0, 0, 22, 2, 1
+ delay 0x2
+ playsewithpan SE_W013B, -64
+ createsprite gUnknown_085962D4, 0x2, 14, -8, 16, 14, 22, 1, 1
+ delay 0x2
+ playsewithpan SE_W013B, -64
+ createsprite gUnknown_085962D4, 0x2, 14, 12, -16, -14, 22, 0, 1
+ delay 0x11
+ playsewithpan SE_W013, +63
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 10, 1
+ createvisualtask sub_80D52D0, 0x2, 3, 2, 0, 10, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ goto AnimScript_82D398A
+
+Move_DISABLE:
+ loadspritegfx 0x2757
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x808
+ playsewithpan SE_W197, -64
+ createsprite gUnknown_0853EE84, 0xD, 24, -16
+ waitforvisualfinish
+ createvisualtask sub_81045B0, 0x5
+ loopsewithpan SE_W020, +63, 0xF, 0x4
+ waitforvisualfinish
+ delay 0x1
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_RECOVER:
+ loadspritegfx 0x27A3
+ loadspritegfx 0x272F
+ monbg ANIM_ATK_PARTNER
+ setalpha 0x80C
+ loopsewithpan SE_W025, -64, 0xD, 0x3
+ createvisualtask sub_8115A04, 0x2, 2, 0, 6, 0, 11, 12287
+ call AnimScript_82D3AD5
+ call AnimScript_82D3AD5
+ call AnimScript_82D3AD5
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ delay 0x1
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ end
+
+AnimScript_82D3AD5:
+ createsprite gUnknown_085921E0, 0x2, 40, -10, 13
+ delay 0x3
+ createsprite gUnknown_085921E0, 0x2, -35, -10, 13
+ delay 0x3
+ createsprite gUnknown_085921E0, 0x2, 15, -40, 13
+ delay 0x3
+ createsprite gUnknown_085921E0, 0x2, -10, -32, 13
+ delay 0x3
+ createsprite gUnknown_085921E0, 0x2, 25, -20, 13
+ delay 0x3
+ createsprite gUnknown_085921E0, 0x2, -40, -20, 13
+ delay 0x3
+ createsprite gUnknown_085921E0, 0x2, 5, -40, 13
+ delay 0x3
+ return
+
+Move_MIMIC:
+ loadspritegfx 0x27A3
+ setalpha 0x50B
+ monbg_22 ANIM_DEF_PARTNER
+ monbgprio_29
+ panse_1B SE_W107, +63, -64, -3, 0x0
+ createvisualtask sub_80FF458, 0x5, 128, 24
+ delay 0xF
+ createsprite gUnknown_085924DC, 0x82, -12, 24
+ delay 0xA
+ setarg 0x7, 0xFFFF
+ waitforvisualfinish
+ playsewithpan SE_W036, -64
+ createvisualtask sub_8115A04, 0x2, 2, 0, 2, 0, 11, 0x7FFF
+ waitforvisualfinish
+ clearmonbg_23 ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_CONSTRICT:
+ loadspritegfx 0x27CA
+ loopsewithpan SE_W010, +63, 0x6, 0x4
+ createsprite gUnknown_08592494, 0x84, 0, 16, 0, 2
+ delay 0x7
+ createsprite gUnknown_08592494, 0x83, 0, 0, 0, 2
+ createsprite gUnknown_08592494, 0x82, 0, 8, 1, 2
+ delay 0x7
+ createsprite gUnknown_08592494, 0x83, 0, -8, 1, 2
+ delay 0x8
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 6, 1
+ delay 0x14
+ playsewithpan SE_W020, +63
+ setarg 0x7, 0xFFFF
+ waitforvisualfinish
+ end
+
+Move_CURSE:
+ choosetwoturnanim AnimScript_82D3BFB, AnimScript_82D3C78
+
+AnimScript_82D3BFB:
+ loadspritegfx 0x27D7
+ loadspritegfx 0x27D8
+ monbg ANIM_ATK_PARTNER
+ createvisualtask sub_8112758, 0x5
+ waitforvisualfinish
+ delay 0x14
+ createsprite gUnknown_08596DD0, 0x2
+ delay 0x3C
+ call AnimScript_82D3C62
+ delay 0x29
+ call AnimScript_82D3C62
+ delay 0x29
+ call AnimScript_82D3C62
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ delay 0x1
+ monbg ANIM_DEF_PARTNER
+ playsewithpan SE_W171, +63
+ createsprite gUnknown_08596DE8, 0x82
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 14, 1
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 1, 16, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+AnimScript_82D3C62:
+ createvisualtask sub_80D52D0, 0x2, 0, 4, 0, 10, 0
+ playsewithpan SE_W020, -64
+ return
+
+AnimScript_82D3C78:
+ createvisualtask sub_80D5EB8, 0x5, 0, 10, 1536, 3, 0
+ waitforvisualfinish
+ delay 0xA
+ call AnimScript_82D3C93
+ waitforvisualfinish
+ end
+
+AnimScript_82D3C93:
+ playsewithpan SE_W082, -64
+ createvisualtask sub_8116B14, 0x5
+ createvisualtask sub_8115A04, 0x5, 2, 4, 2, 0, 10, 31
+ return
+
+Move_SOFT_BOILED:
+ loadspritegfx 0x27DA
+ loadspritegfx 0x27DB
+ loadspritegfx 0x272F
+ monbg ANIM_ATK_PARTNER
+ playsewithpan SE_W039, -64
+ createvisualtask sub_80D51AC, 0x2, 0, 0, 2, 6, 1
+ createsprite gUnknown_085937B0, 0x4, 0, 16, 0
+ createsprite gUnknown_085937B0, 0x4, 0, 16, 1
+ delay 0x78
+ delay 0x7
+ playsewithpan SE_W030, -64
+ createsprite gUnknown_08597274, 0x2, 31, 3, 10, 0, 31500
+ createsprite gUnknown_0859381C, 0x3, 31, 16, 0, 1
+ delay 0x8
+ createsprite gUnknown_0859381C, 0x3, 31, 16, 0, 1
+ delay 0x3C
+ setarg 0x7, 0xFFFF
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ call AnimScript_82D7A28
+ end
+
+Move_HEAL_BELL:
+ loadspritegfx 0x27DD
+ loadspritegfx 0x27DE
+ loadspritegfx 0x27DB
+ createvisualtask sub_8116620, 0xA, 10, 0, 0, 10, 0x7FFF
+ waitforvisualfinish
+ createvisualtask sub_8105CB4, 0x5
+ createsprite gUnknown_08593938, 0x2, 0, -24, 0, 1
+ delay 0xC
+ createsprite gUnknown_08593958, 0x28, 0, -24, 48, -18, 35, 0, 0
+ createsprite gUnknown_08593958, 0x28, 0, -24, -48, 20, 30, 1, 1
+ createsprite gUnknown_08593958, 0x28, 0, -24, -38, -29, 30, 2, 2
+ createsprite gUnknown_08593958, 0x28, 0, -24, 36, 18, 30, 3, 3
+ call AnimScript_82D3EF8
+ delay 0x21
+ createsprite gUnknown_08593958, 0x28, 0, -24, 19, 26, 35, 4, 4
+ createsprite gUnknown_08593958, 0x28, 0, -24, -34, -12, 30, 5, 5
+ createsprite gUnknown_08593958, 0x28, 0, -24, 41, -20, 34, 6, 2
+ createsprite gUnknown_08593958, 0x28, 0, -24, -15, 26, 32, 7, 0
+ call AnimScript_82D3EF8
+ delay 0x21
+ createsprite gUnknown_08593958, 0x28, 0, -24, -48, 18, 31, 0, 2
+ createsprite gUnknown_08593958, 0x28, 0, -24, 48, -20, 30, 2, 5
+ createsprite gUnknown_08593958, 0x28, 0, -24, 38, 29, 33, 4, 3
+ createsprite gUnknown_08593958, 0x28, 0, -24, -36, -18, 30, 6, 1
+ call AnimScript_82D3EF8
+ waitforvisualfinish
+ createvisualtask sub_8105D60, 0x5
+ waitforvisualfinish
+ unloadspritegfx 0x27DD
+ unloadspritegfx 0x27DE
+ unloadspritegfx 0x27DB
+ loadspritegfx 0x2741
+ playsewithpan SE_W234, -64
+ createsprite gUnknown_08592B94, 0x10, -15, 0, 0, 0, 32, 60, 1
+ delay 0x8
+ createsprite gUnknown_08592B94, 0x10, 12, -5, 0, 0, 32, 60, 1
+ waitforvisualfinish
+ unloadspritegfx 0x2741
+ loadspritegfx 0x27DB
+ playsewithpan SE_REAPOKE, -64
+ createvisualtask sub_8116664, 0xA, 4, 3, 10, 0, 31500
+ createvisualtask sub_8116620, 0xA, 10, 3, 10, 0, 0x7FFF
+ createsprite gUnknown_08593868, 0x10, 0, 0, 0, 1
+ end
+
+AnimScript_82D3EF8:
+ createvisualtask sub_8116664, 0xA, 4, 3, 8, 0, 31500
+ createvisualtask sub_8116620, 0xA, 10, 3, 2, 10, 0x7FFF
+ createsprite gUnknown_0859381C, 0x28, 0, -24, 0, 1
+ playsewithpan SE_W215, -64
+ return
+
+Move_FAKE_OUT:
+ playsewithpan SE_W260, 0
+ createvisualtask sub_8105EB0, 0x5
+ waitforvisualfinish
+ playsewithpan SE_W166, +63
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 5, 1
+ createvisualtask sub_8106020, 0x3
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 3, 16, 0, 0x7FFF
+ end
+
+Move_SCARY_FACE:
+ loadspritegfx 0x27EA
+ createsprite gUnknown_08597274, 0x2, 27, 3, 0, 16, 0
+ playsewithpan SE_W060, -64
+ waitforvisualfinish
+ delay 0xA
+ playsewithpan SE_W043, -64
+ createvisualtask sub_81064F8, 0x5
+ delay 0xD
+ createsprite gUnknown_08593A84, 0x0, -16, -8
+ createsprite gUnknown_08593A84, 0x0, 16, -8
+ waitforvisualfinish
+ createvisualtask sub_810A094, 0x3, 20, 1, 0
+ playsewithpan SE_W081B, +63
+ createsprite gUnknown_08597274, 0x2, 27, 3, 16, 0, 0
+ waitforvisualfinish
+ end
+
+Move_SWEET_KISS:
+ loadspritegfx 0x27E8
+ loadspritegfx 0x27EC
+ createsprite gUnknown_08593AA8, 0x82, 16, -48
+ playsewithpan SE_W215, +63
+ delay 0x17
+ playsewithpan SE_W215, +63
+ delay 0x17
+ playsewithpan SE_W215, +63
+ waitforvisualfinish
+ createsprite gUnknown_085939B8, 0x83, 160, -30
+ playsewithpan SE_W213, +63
+ createsprite gUnknown_085939B8, 0x83, -256, -42
+ createsprite gUnknown_085939B8, 0x83, 128, -14
+ createsprite gUnknown_085939B8, 0x83, 416, -38
+ createsprite gUnknown_085939B8, 0x83, -128, -22
+ createsprite gUnknown_085939B8, 0x83, -384, -31
+ end
+
+Move_LOVELY_KISS:
+ loadspritegfx 0x27EB
+ loadspritegfx 0x27ED
+ createsprite gUnknown_08593AF0, 0x82, 0, -24
+ playsewithpan SE_W060B, +63
+ waitforvisualfinish
+ playsewithpan SE_W213, +63
+ createsprite gUnknown_08593AC0, 0x83, -256, -42
+ createsprite gUnknown_08593AC0, 0x83, 128, -14
+ createsprite gUnknown_08593AC0, 0x83, 416, -38
+ createsprite gUnknown_08593AC0, 0x83, -128, -22
+ end
+
+Move_FURY_SWIPES:
+ loadspritegfx 0x27EE
+ createsprite gUnknown_0857FE28, 0x2, 5, 5
+ delay 0x4
+ playsewithpan SE_W010, +63
+ createsprite gUnknown_08593B38, 0x82, 16, 0, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 5, 1
+ delay 0xA
+ createsprite gUnknown_0857FE28, 0x82, 5, 5
+ delay 0x4
+ playsewithpan SE_W010, +63
+ createsprite gUnknown_08593B38, 0x82, -16, 0, 0
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 7, 1
+ end
+
+Move_INGRAIN:
+ loadspritegfx 0x27EF
+ loadspritegfx 0x27A3
+ createsprite gUnknown_0859254C, 0x2, 16, 26, -1, 2, 150
+ playsewithpan SE_W010, -64
+ delay 0xA
+ createsprite gUnknown_0859254C, 0x2, -32, 20, 1, 1, 140
+ playsewithpan SE_W010, -64
+ delay 0xA
+ createsprite gUnknown_0859254C, 0x2, 32, 22, 1, 0, 130
+ playsewithpan SE_W010, -64
+ delay 0xA
+ createsprite gUnknown_0859254C, 0x2, -16, 25, -1, 3, 120
+ playsewithpan SE_W010, -64
+ delay 0x28
+ createsprite gUnknown_0859258C, 0x3, 32, 26, -1, 3, 30
+ delay 0x5
+ playsewithpan SE_W145C, -64
+ delay 0x5
+ createsprite gUnknown_0859258C, 0x3, -48, 20, 1, 2, 30
+ playsewithpan SE_W145C, -64
+ delay 0x5
+ playsewithpan SE_W145C, -64
+ delay 0x5
+ createsprite gUnknown_0859258C, 0x3, 48, 26, -2, 3, 18
+ playsewithpan SE_W145C, -64
+ delay 0xA
+ waitforvisualfinish
+ end
+
+Move_PRESENT:
+ loadspritegfx 0x27F0
+ createvisualtask sub_815A904, 0x2
+ createsprite gUnknown_08592610, 0x82, 0, -5, 10, 2, -1
+ playsewithpan SE_W039, -64
+ delay 0xE
+ playsewithpan SE_W145B, -64
+ delay 0xE
+ playsewithpan SE_W145B, 0
+ delay 0x14
+ playsewithpan SE_W145B, +63
+ waitforvisualfinish
+ jumpargeq 0x7, 0x0, AnimScript_82D41D4
+ jumpargeq 0x7, 0x1, AnimScript_82D423F
+ end
+
+AnimScript_82D41D4:
+ loadspritegfx 0x27D6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x83, 0, 0, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x83, 24, -24, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x83, -16, 16, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x83, -24, -12, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x83, 16, 16, 1, 1
+ end
+
+AnimScript_82D423F:
+ loadspritegfx 0x27D3
+ loadspritegfx 0x272F
+ playsewithpan SE_W234, +63
+ createsprite gUnknown_08592658, 0x84, -16, 32, -3, 1
+ delay 0x3
+ createsprite gUnknown_08592658, 0x84, 16, 32, -3, -1
+ delay 0x3
+ createsprite gUnknown_08592658, 0x84, 32, 32, -3, 1
+ delay 0x3
+ createsprite gUnknown_08592658, 0x84, -32, 32, -3, 1
+ delay 0x3
+ createsprite gUnknown_08592658, 0x84, 0, 32, -3, 1
+ delay 0x3
+ createsprite gUnknown_08592658, 0x84, -8, 32, -3, 1
+ delay 0x3
+ createsprite gUnknown_08592658, 0x84, -8, 32, -3, 1
+ delay 0x3
+ createsprite gUnknown_08592658, 0x84, 24, 32, -3, 1
+ delay 0x3
+ createsprite gUnknown_08592658, 0x84, -24, 32, -3, 1
+ waitforvisualfinish
+ waitsound
+ call AnimScript_82D7A28
+ end
+
+Move_BATON_PASS:
+ loadspritegfx 0x27F2
+ playsewithpan SE_W226, -64
+ createvisualtask sub_8115A04, 0x2, 31, 1, 2, 0, 11, 31455
+ createsprite gUnknown_085CE370, 0x2
+ end
+
+Move_PERISH_SONG:
+ loadspritegfx 0x27DE
+ createsprite gUnknown_08593C0C, 0x4, 0, 0, 0
+ createsprite gUnknown_08593C0C, 0x4, 1, 1, 16
+ createsprite gUnknown_08593C0C, 0x4, 2, 1, 32
+ createsprite gUnknown_08593C0C, 0x4, 3, 2, 48
+ createsprite gUnknown_08593C0C, 0x4, 4, 2, 64
+ createsprite gUnknown_08593C0C, 0x4, 5, 0, 80
+ createsprite gUnknown_08593C0C, 0x4, 6, 0, 96
+ createsprite gUnknown_08593C0C, 0x4, 7, 1, 112
+ createsprite gUnknown_08593C0C, 0x4, 8, 2, 128
+ createsprite gUnknown_08593C0C, 0x4, 9, 0, 144
+ createsprite gUnknown_08593C0C, 0x4, 10, 2, 160
+ createsprite gUnknown_08593C0C, 0x4, 11, 0, 176
+ createsprite gUnknown_08593C0C, 0x4, 12, 1, 192
+ createsprite gUnknown_08593C0C, 0x4, 13, 3, 208
+ createsprite gUnknown_08593C0C, 0x4, 14, 3, 224
+ createsprite gUnknown_08593C0C, 0x4, 15, 0, 240
+ createsprite gUnknown_08593C24, 0x4, 15, 0, 0
+ delay 0x14
+ panse_1B SE_W195, -64, +63, +2, 0x0
+ delay 0x50
+ createsprite gUnknown_08597274, 0x2, 1, 3, 0, 16, 0
+ createvisualtask sub_811489C, 0x5, 4, 0
+ createvisualtask sub_811489C, 0x5, 5, 0
+ createvisualtask sub_811489C, 0x5, 6, 0
+ createvisualtask sub_811489C, 0x5, 7, 0
+ delay 0x64
+ createsprite gUnknown_08597274, 0x2, 1, 3, 16, 0, 0
+ createvisualtask sub_811489C, 0x5, 4, 1
+ createvisualtask sub_811489C, 0x5, 5, 1
+ createvisualtask sub_811489C, 0x5, 6, 1
+ createvisualtask sub_811489C, 0x5, 7, 1
+ waitforvisualfinish
+ end
+
+Move_SLEEP_TALK:
+ loadspritegfx 0x27F4
+ createvisualtask sub_80D5EB8, 0x5, 0, 4, 4096, 2, 0
+ delay 0x14
+ createsprite gUnknown_085CE190, 0x82, 0, 20, 5, -1
+ playsewithpan SE_W173, -64
+ delay 0x6
+ createsprite gUnknown_085CE190, 0x82, 0, 20, 5, -1
+ delay 0x6
+ createsprite gUnknown_085CE190, 0x82, 0, 20, 5, -1
+ delay 0x14
+ createsprite gUnknown_085CE190, 0x82, 0, 20, 5, -5
+ playsewithpan SE_W173, -64
+ delay 0x6
+ createsprite gUnknown_085CE190, 0x82, 0, 20, 5, -5
+ delay 0x6
+ createsprite gUnknown_085CE190, 0x82, 0, 20, 5, -5
+ delay 0x14
+ createsprite gUnknown_085CE190, 0x82, 0, 20, 5, -3
+ playsewithpan SE_W173, -64
+ delay 0x6
+ createsprite gUnknown_085CE190, 0x82, 0, 20, 5, -3
+ delay 0x6
+ createsprite gUnknown_085CE190, 0x82, 0, 20, 5, -3
+ waitforvisualfinish
+ end
+
+Move_HYPER_FANG:
+ loadspritegfx 0x27D0
+ playsewithpan SE_W044, +63
+ delay 0x1
+ delay 0x2
+ createvisualtask sub_8117E60, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82D458E
+ createvisualtask sub_815A8C8, 0x2
+ jumpargeq 0x7, 0x0, AnimScript_82D4580
+ goto AnimScript_82D4587
+
+AnimScript_82D455C:
+ waitbgfadeout
+ createsprite gUnknown_085CE1DC, 0x82
+ waitbgfadein
+ createvisualtask sub_80D51AC, 0x3, 1, 0, 10, 10, 1
+ playsewithpan SE_W043, +63
+ delay 0x14
+ restorebg
+ waitbgfadein
+ waitforvisualfinish
+ end
+
+AnimScript_82D4580:
+ fadetobg BG_IMPACT_OPPONENT
+ goto AnimScript_82D455C
+
+AnimScript_82D4587:
+ fadetobg BG_IMPACT_PLAYER
+ goto AnimScript_82D455C
+
+AnimScript_82D458E:
+ fadetobg BG_IMPACT_CONTESTS
+ goto AnimScript_82D455C
+
+Move_TRI_ATTACK:
+ loadspritegfx 0x27F6
+ createsprite gUnknown_085CE2F8, 0x82, 16, 0
+ playsewithpan SE_W161, -64
+ delay 0x14
+ playsewithpan SE_W161, -64
+ delay 0x14
+ createsoundtask sub_8158C58, 220, -64, 63, 5, 6, 0, 7
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 16, 0
+ delay 0x10
+ loadspritegfx 0x2731
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, -1, 0
+ playsewithpan SE_W172B, +63
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 0, 1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, -1, -1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 2, 1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 1, -1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, -1, 1
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 1, -2
+ delay 0x1
+ createsprite gUnknown_08595410, 0x82, 0, 0, 30, 30, 3, 1
+ delay 0x2
+ createvisualtask sub_810A094, 0x2, 20, 3, 1, 1
+ waitforvisualfinish
+ loadspritegfx 0x2735
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ playsewithpan SE_W161B, +63
+ createsprite gUnknown_085956C0, 0x82, 0, -48
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 0, -16
+ delay 0x1
+ createsprite gUnknown_085956C0, 0x82, 0, 16
+ delay 0x14
+ createvisualtask sub_810A094, 0x2, 20, 3, 1, 0
+ delay 0x2
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ waitforvisualfinish
+ loadspritegfx 0x279D
+ call AnimScript_82D7720
+ createsprite gUnknown_08597274, 0x2, 1, 2, 16, 0, 0
+ waitforvisualfinish
+ end
+
+Move_WILL_O_WISP:
+ loadspritegfx 0x27F8
+ loadspritegfx 0x27F7
+ monbg ANIM_DEF_PARTNER
+ monbgprio_2A ANIM_TARGET
+ playsewithpan SE_W052, -64
+ waitplaysewithpan SE_W052, -64, 0xA
+ createvisualtask sub_8159278, 0x2, -64, -64, 1, 0
+ createsprite gUnknown_0859563C, 0x2, 0, 0, 0
+ delay 0x3
+ createsprite gUnknown_0859563C, 0x3, 0, 0, 1
+ delay 0x3
+ createsprite gUnknown_0859563C, 0x4, 0, 0, 2
+ delay 0x3
+ createsprite gUnknown_0859563C, 0x4, 0, 0, 3
+ delay 0x28
+ createvisualtask sub_8159278, 0x2, -64, 63, 2, 0
+ waitforvisualfinish
+ monbgprio_29
+ playsewithpan SE_W172B, +63
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 13, 1
+ createsprite gUnknown_0859566C, 0x2, 0
+ createsprite gUnknown_0859566C, 0x2, 42
+ createsprite gUnknown_0859566C, 0x2, 84
+ createsprite gUnknown_0859566C, 0x2, 126
+ createsprite gUnknown_0859566C, 0x2, 168
+ createsprite gUnknown_0859566C, 0x2, 210
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Move_ENCORE:
+ loadspritegfx 0x27F3
+ loadspritegfx 0x2807
+ createvisualtask sub_815ABEC, 0x2
+ createvisualtask sub_8116960, 0x2, 248, 3, 0, 10, 0
+ waitforvisualfinish
+ createsprite gUnknown_085CE22C, 0x82, 0, -8
+ createsprite gUnknown_085CE244, 0x2, -2, 0, 0, 0, 9
+ createsprite gUnknown_085CE244, 0x2, 2, 0, 1, 0, 9
+ createsprite gUnknown_085CE25C, 0x3, -2, 0, 0, 0, 9
+ createsprite gUnknown_085CE25C, 0x3, 2, 0, 1, 0, 9
+ delay 0x10
+ createvisualtask sub_8159244, 0x5, 223, 63
+ createvisualtask sub_80D5EB8, 0x5, 1, 8, 1536, 5, 1
+ waitforvisualfinish
+ createvisualtask sub_8116960, 0x2, 248, 3, 10, 0, 1
+ waitforvisualfinish
+ createvisualtask sub_815AC8C, 0x2
+ end
+
+Move_TRICK:
+ loadspritegfx 0x27F0
+ loadspritegfx 0x27DF
+ createsprite gUnknown_085926E8, 0x2, -40, 80
+ createsprite gUnknown_085926E8, 0x2, -40, 208
+ delay 0x10
+ playsewithpan SE_W166, 0
+ createvisualtask sub_8106020, 0x3
+ createvisualtask sub_81060B0, 0x3
+ delay 0x1E
+ playsewithpan SE_W104, 0
+ delay 0x18
+ playsewithpan SE_W104, 0
+ delay 0x10
+ playsewithpan SE_W104, 0
+ delay 0x10
+ playsewithpan SE_W104, 0
+ delay 0x10
+ playsewithpan SE_W104, 0
+ delay 0x10
+ playsewithpan SE_W104, 0
+ delay 0x10
+ playsewithpan SE_W213, 0
+ createvisualtask sub_80D51AC, 0x3, 0, 5, 0, 7, 2
+ createvisualtask sub_80D51AC, 0x3, 1, 5, 0, 7, 2
+ waitforvisualfinish
+ end
+
+Move_WISH:
+ loadspritegfx 0x27F9
+ loadspritegfx 0x2741
+ createsprite gUnknown_08597274, 0x2, 1, 3, 0, 10, 0
+ waitforvisualfinish
+ panse_27 SE_W115, +63, -64, -3, 0x0
+ createsprite gUnknown_085CE388, 0x28
+ waitforvisualfinish
+ delay 0x3C
+ loopsewithpan SE_W215, -64, 0x10, 0x3
+ call AnimScript_82D79B4
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 3, 10, 0, 0
+ waitforvisualfinish
+ end
+
+Move_STOCKPILE:
+ loadspritegfx 0x27FB
+ playsewithpan SE_W025, -64
+ createvisualtask sub_8115A04, 0x2, 2, 8, 1, 0, 12, 0x7FFF
+ createvisualtask sub_815B65C, 0x5
+ call AnimScript_82D4972
+ call AnimScript_82D4972
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 2, 0, 12, 0, 0x7FFF
+ end
+
+AnimScript_82D4972:
+ createsprite gUnknown_08592244, 0x2, 55, 55, 13
+ delay 0x1
+ createsprite gUnknown_08592244, 0x2, -55, -55, 13
+ delay 0x1
+ createsprite gUnknown_08592244, 0x2, 0, 55, 13
+ delay 0x1
+ createsprite gUnknown_08592244, 0x2, 0, -55, 13
+ delay 0x1
+ createsprite gUnknown_08592244, 0x2, 55, -34, 13
+ delay 0x1
+ createsprite gUnknown_08592244, 0x2, 55, 34, 13
+ delay 0x1
+ createsprite gUnknown_08592244, 0x2, -55, -34, 13
+ delay 0x1
+ createsprite gUnknown_08592244, 0x2, -55, 34, 13
+ delay 0x1
+ return
+
+Move_SPIT_UP:
+ loadspritegfx 0x27FD
+ loadspritegfx 0x2797
+ playsewithpan SE_W036, -64
+ createvisualtask sub_815B6B4, 0x5
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 8, 2
+ delay 0x2D
+ playsewithpan SE_W255, -64
+ delay 0x3
+ createsprite gUnknown_08593A50, 0x2, 0, 12
+ createsprite gUnknown_08593A50, 0x2, 32, 12
+ createsprite gUnknown_08593A50, 0x2, 64, 12
+ createsprite gUnknown_08593A50, 0x2, 96, 12
+ createsprite gUnknown_08593A50, 0x2, 128, 12
+ createsprite gUnknown_08593A50, 0x2, 160, 12
+ createsprite gUnknown_08593A50, 0x2, 192, 12
+ createsprite gUnknown_08593A50, 0x2, 224, 12
+ delay 0x5
+ jumpifmoveturn 0x2, AnimScript_82D4AB8
+ jumpifmoveturn 0x3, AnimScript_82D4AE1
+
+AnimScript_82D4A7B:
+ delay 0x5
+ createvisualtask sub_80D6388, 0x2, 0, 1, 8, 1, 0
+ playsewithpan SE_W003, +63
+ createsprite gUnknown_085973E8, 0x83, -12, 10, 1, 1
+ delay 0x5
+ playsewithpan SE_W003, +63
+ createsprite gUnknown_085973E8, 0x83, 12, -10, 1, 1
+ waitforvisualfinish
+ end
+
+AnimScript_82D4AB8:
+ createsprite gUnknown_08593A50, 0x2, 16
+ createsprite gUnknown_08593A50, 0x2, 80
+ createsprite gUnknown_08593A50, 0x2, 144
+ createsprite gUnknown_08593A50, 0x2, 208
+ goto AnimScript_82D4A7B
+
+AnimScript_82D4AE1:
+ createsprite gUnknown_08593A50, 0x2, 16
+ createsprite gUnknown_08593A50, 0x2, 48
+ createsprite gUnknown_08593A50, 0x2, 80
+ createsprite gUnknown_08593A50, 0x2, 112
+ createsprite gUnknown_08593A50, 0x2, 144
+ createsprite gUnknown_08593A50, 0x2, 176
+ createsprite gUnknown_08593A50, 0x2, 208
+ createsprite gUnknown_08593A50, 0x2, 240
+ goto AnimScript_82D4A7B
+
+Move_SWALLOW:
+ loadspritegfx 0x27FC
+ loadspritegfx 0x272F
+ playsewithpan SE_W036, -64
+ createvisualtask sub_815B778, 0x5
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 8, 2
+ delay 0x26
+ playsewithpan SE_W255, -64
+ createvisualtask sub_80D52D0, 0x2, 0, 2, 0, 12, 1
+ call AnimScript_82D4B7F
+ jumpifmoveturn 0x2, AnimScript_82D4BC1
+ jumpifmoveturn 0x3, AnimScript_82D4BCB
+
+AnimScript_82D4B78:
+ waitforvisualfinish
+ call AnimScript_82D79DF
+ end
+
+AnimScript_82D4B7F:
+ createsprite gUnknown_085CE418, 0x2, 0, -8
+ delay 0x1
+ createsprite gUnknown_085CE418, 0x2, -24, -8
+ delay 0x1
+ createsprite gUnknown_085CE418, 0x2, 16, -8
+ delay 0x1
+ createsprite gUnknown_085CE418, 0x2, -16, -8
+ delay 0x1
+ createsprite gUnknown_085CE418, 0x2, 24, -8
+ delay 0x1
+ return
+
+AnimScript_82D4BC1:
+ call AnimScript_82D4B7F
+ goto AnimScript_82D4B78
+
+AnimScript_82D4BCB:
+ call AnimScript_82D4B7F
+ call AnimScript_82D4B7F
+ goto AnimScript_82D4B78
+
+Move_TRANSFORM:
+ monbg ANIM_ATTACKER
+ playsewithpan SE_W100, -64
+ waitplaysewithpan SE_W107, -64, 0x30
+ createvisualtask sub_815B7D0, 0x2, 0
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ end
+
+Move_MORNING_SUN:
+ loadspritegfx 0x2801
+ loadspritegfx 0x272F
+ createvisualtask sub_815BB84, 0x5
+ delay 0x8
+ createvisualtask sub_8116620, 0xA, 1921, 8, 0, 12, 0x7FFF
+ delay 0xE
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ call AnimScript_82D4C78
+ createvisualtask sub_8116620, 0xA, 1921, 3, 12, 0, 0x7FFF
+ waitforvisualfinish
+ waitsound
+ call AnimScript_82D79DF
+ end
+
+AnimScript_82D4C78:
+ createsprite gUnknown_085CE48C, 0x2, 30, 640
+ delay 0x5
+ return
+
+Move_SWEET_SCENT:
+ loadspritegfx 0x27FE
+ playsewithpan SE_W230, -64
+ createsprite gUnknown_085CE544, 0x2, 100, 0, 100
+ delay 0x19
+ setpan 0
+ call AnimScript_82D4CCA
+ createsprite gUnknown_085CE544, 0x2, 55, 0
+ setpan +63
+ createvisualtask sub_8115A04, 0x2, 20, 1, 5, 5, 13, 22207
+ call AnimScript_82D4CCA
+ waitforvisualfinish
+ end
+
+AnimScript_82D4CCA:
+ createsprite gUnknown_085CE544, 0x2, 70, 1, 64
+ delay 0x2
+ createsprite gUnknown_085CE544, 0x2, 60, 0, 64
+ delay 0x5
+ createsprite gUnknown_085CE544, 0x2, 80, 1, 64
+ delay 0x2
+ createsprite gUnknown_085CE544, 0x2, 58, 0, 120
+ delay 0x2
+ createsprite gUnknown_085CE544, 0x2, 100, 0, 120
+ delay 0x2
+ createsprite gUnknown_085CE544, 0x2, 90, 0, 64
+ delay 0x2
+ createsprite gUnknown_085CE544, 0x2, 48, 0, 64
+ delay 0x2
+ createsprite gUnknown_085CE544, 0x2, 95, 1, 80
+ delay 0x2
+ createsprite gUnknown_085CE544, 0x2, 100, 0, 120
+ delay 0x2
+ createsprite gUnknown_085CE544, 0x2, 75, 1, 64
+ delay 0x2
+ createsprite gUnknown_085CE544, 0x2, 85, 0, 120
+ delay 0x2
+ return
+
+Move_HYPER_BEAM:
+ loadspritegfx 0x27A3
+ createsprite gUnknown_08597274, 0x2, 1, 4, 0, 16, 0
+ waitforvisualfinish
+ delay 0xA
+ playsewithpan SE_W063, -64
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 4, 1
+ waitforvisualfinish
+ delay 0x1E
+ createsoundtask sub_8158C58, 247, -64, 63, 1, 15, 0, 5
+ createvisualtask sub_80D51AC, 0x2, 0, 0, 4, 50, 1
+ createvisualtask sub_8115D94, 0x2, 10147, 1, 12, 31, 16, 0, 0
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 50, 1
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 11, 26425
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ call AnimScript_82D4EA1
+ createvisualtask sub_8116620, 0xA, 4, 2, 11, 0, 26425
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 4, 16, 0, 0
+ end
+
+AnimScript_82D4EA1:
+ createsprite gUnknown_08592288, 0x82
+ createsprite gUnknown_08592288, 0x82
+ delay 0x1
+ return
+
+Move_FLATTER:
+ loadspritegfx 0x27F3
+ loadspritegfx 0x2800
+ createvisualtask sub_8159244, 0x5, 223, 63
+ createvisualtask sub_815ABEC, 0x2
+ createvisualtask sub_8116960, 0x2, 248, 3, 0, 10, 0
+ waitforvisualfinish
+ createsprite gUnknown_085CE5C0, 0x82, 0, -8, 80
+ delay 0x0
+ createsprite gUnknown_0857FE40, 0x2, 5, 2, 1
+ delay 0xA
+ createsprite gUnknown_0857FE40, 0x2, 5, 2, 1
+ delay 0x0
+ createvisualtask sub_8159210, 0x5, 229, -64
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ call AnimScript_82D4F9B
+ delay 0x5
+ createvisualtask sub_8159210, 0x5, 229, 63
+ waitforvisualfinish
+ createvisualtask sub_8116960, 0x2, 248, 3, 10, 0, 1
+ waitforvisualfinish
+ createvisualtask sub_815AC8C, 0x2
+ end
+
+AnimScript_82D4F9B:
+ createsprite gUnknown_085CE5A8, 0x28, 0
+ createsprite gUnknown_085CE5A8, 0x28, 1
+ return
+
+Move_ROLE_PLAY:
+ monbg ANIM_ATK_PARTNER
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 16, 0x7FFF
+ createsprite gUnknown_08597274, 0x2, 1, 2, 0, 10, 0
+ waitforvisualfinish
+ playsewithpan SE_W161, -64
+ waitplaysewithpan SE_W197, -64, 0x1E
+ createvisualtask sub_815CED8, 0x2
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ createvisualtask sub_8116620, 0xA, 4, 2, 16, 0, 0x7FFF
+ delay 0x8
+ createsprite gUnknown_08597274, 0x2, 1, 2, 10, 0, 0
+ end
+
+Move_REFRESH:
+ loadspritegfx 0x27DB
+ loadspritegfx 0x2741
+ playsewithpan SE_W287, -64
+ createvisualtask sub_815DFCC, 0x2, 0
+ waitforvisualfinish
+ playsewithpan SE_W234, -64
+ call AnimScript_82D79B4
+ waitforvisualfinish
+ playsewithpan SE_REAPOKE, -64
+ createsprite gUnknown_08597274, 0x2, 31, 3, 10, 0, 31500
+ createsprite gUnknown_0859381C, 0x3, 0, 0, 0, 0
+ end
+
+Move_BLAZE_KICK:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ loadspritegfx 0x272D
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W172, +63
+ createsprite gUnknown_08595F14, 0x83, 0, 0, 1, 30
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 7, 0x7FFF
+ delay 0x1E
+ playsewithpan SE_W007, +63
+ createsprite gUnknown_08597358, 0x82, 0, 0, 1, 0
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 14, 1
+ createvisualtask sub_8116620, 0xA, 4, 2, 0, 0, 0x7FFF
+ createsprite gUnknown_0859728C, 0x2, 31, 3, 1, 0, 8, 0, 0
+ call AnimScript_82D2D18
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_HYPER_VOICE:
+ loadspritegfx 0x27DB
+ createvisualtask sub_81590B8, 0x5, 0
+ call AnimScript_82D50FA
+ waitforvisualfinish
+ delay 0x8
+ createvisualtask sub_81590B8, 0x5, 1
+ call AnimScript_82D50FA
+ waitforvisualfinish
+ end
+
+AnimScript_82D50FA:
+ createsprite gUnknown_08597274, 0x2, 31, 3, 8, 0, 1023
+ createvisualtask sub_80D6064, 0x5, -5, -5, 5, 0, 0
+ createsprite gUnknown_08593880, 0x0, 45, 0, 0, 0, 0, 0, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 1, 0, 6, 1
+ createvisualtask sub_80D52D0, 0x2, 3, 1, 0, 6, 1
+ createvisualtask sub_81162A4, 0x2, 1, 0, 6, 1
+ createvisualtask sub_8159078, 0x5
+ return
+
+Move_SAND_TOMB:
+ loadspritegfx 0x275A
+ createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, 563
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 43, 1
+ playsewithpan SE_W328, +63
+ call AnimScript_82D51B7
+ call AnimScript_82D51B7
+ call AnimScript_82D51B7
+ delay 0x16
+ createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, 563
+ waitforvisualfinish
+ end
+
+AnimScript_82D51B7:
+ createsprite gUnknown_08596B34, 0x82, 0, 32, 528, 30, 10, 50, 1
+ delay 0x2
+ createsprite gUnknown_08596B34, 0x82, 0, 36, 480, 20, 13, -46, 1
+ delay 0x2
+ createsprite gUnknown_08596B34, 0x82, 0, 37, 576, 20, 5, 42, 1
+ delay 0x2
+ createsprite gUnknown_08596B34, 0x82, 0, 35, 400, 25, 8, -42, 1
+ delay 0x2
+ createsprite gUnknown_08596B34, 0x82, 0, 32, 512, 25, 13, 46, 1
+ delay 0x2
+ createsprite gUnknown_08596B34, 0x82, 0, 37, 464, 30, 12, -50, 1
+ delay 0x2
+ return
+
+Move_SHEER_COLD:
+ fadetobg BG_ICE
+ waitbgfadeout
+ playsewithpan SE_W196, 0
+ waitbgfadein
+ loadspritegfx 0x271A
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80A9EF4, 0x2
+ waitplaysewithpan SE_W258, +63, 0x11
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ restorebg
+ waitbgfadein
+ end
+
+Move_ARM_THRUST:
+ loadspritegfx 0x279F
+ loadspritegfx 0x2797
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80D6134, 0x5, 8, 5, 0, 0
+ delay 0x6
+ createsprite gUnknown_0857FE28, 0x2, 4, 3
+ delay 0x4
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08596034, 0x82, 10, -8, 14, 3
+ waitforvisualfinish
+ createvisualtask sub_80D6134, 0x5, 8, 5, 0, 1
+ playsewithpan SE_W003, +63
+ choosetwoturnanim AnimScript_82D52D4, AnimScript_82D52E8
+
+AnimScript_82D52C0:
+ createvisualtask sub_80D51AC, 0x5, 1, 4, 0, 6, 1
+ waitforvisualfinish
+ blendoff
+ end
+
+AnimScript_82D52D4:
+ createsprite gUnknown_08597358, 0x82, 8, 0, 1, 2
+ goto AnimScript_82D52C0
+
+AnimScript_82D52E8:
+ createsprite gUnknown_08597358, 0x82, -8, 0, 1, 2
+ goto AnimScript_82D52C0
+
+Move_MUDDY_WATER:
+ panse_1B SE_W250, -64, +63, +2, 0x0
+ createvisualtask sub_8107954, 0x2, 1
+ waitforvisualfinish
+ end
+
+Move_BULLET_SEED:
+ loadspritegfx 0x2716
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ delay 0x5
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ delay 0x5
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ delay 0x5
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 30, 1
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ delay 0x5
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ delay 0x5
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ delay 0x5
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ delay 0x5
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ delay 0x5
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ delay 0x5
+ createsprite gUnknown_0859351C, 0x82, 20, 0
+ waitforvisualfinish
+ end
+
+Move_DRAGON_CLAW:
+ loadspritegfx 0x272D
+ loadspritegfx 0x2737
+ playsewithpan SE_W221B, -64
+ createvisualtask sub_8116620, 0xA, 2, 4, 0, 8, 639
+ createvisualtask sub_80D51AC, 0x5, 0, 0, 2, 15, 1
+ call AnimScript_82D5581
+ call AnimScript_82D5581
+ createsprite gUnknown_0857FE28, 0x2, 6, 4
+ createsprite gUnknown_08596B88, 0x2, 0, 28, 528, 30, 13, 50, 0
+ delay 0x2
+ createvisualtask sub_8159210, 0x5, 136, 63
+ createsprite gUnknown_08597138, 0x82, -10, -10, 0
+ createsprite gUnknown_08597138, 0x82, -10, 10, 0
+ createsprite gUnknown_085972D8, 0x2, -4, 1, 10, 3, 1
+ createsprite gUnknown_08596B88, 0x2, 0, 32, 480, 20, 16, -46, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 33, 576, 20, 8, 42, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 31, 400, 25, 11, -42, 0
+ delay 0x2
+ createsprite gUnknown_0857FE28, 0x2, 6, 4
+ createsprite gUnknown_08596B88, 0x2, 0, 28, 512, 25, 16, 46, 0
+ delay 0x2
+ createvisualtask sub_8159210, 0x5, 136, 63
+ createsprite gUnknown_08597138, 0x82, 10, -10, 1
+ createsprite gUnknown_08597138, 0x82, 10, 10, 1
+ createsprite gUnknown_085972D8, 0x2, -4, 1, 10, 3, 1
+ createsprite gUnknown_08596B88, 0x2, 0, 33, 464, 30, 15, -50, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 28, 528, 30, 13, 50, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 32, 480, 20, 16, -46, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 33, 576, 20, 8, 42, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 31, 400, 25, 11, -42, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 28, 512, 25, 16, 46, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 33, 464, 30, 15, -50, 0
+ createvisualtask sub_8116620, 0xA, 2, 4, 8, 0, 639
+ waitforvisualfinish
+ end
+
+AnimScript_82D5581:
+ createsprite gUnknown_08596B88, 0x2, 0, 28, 528, 30, 13, 50, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 32, 480, 20, 16, -46, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 33, 576, 20, 8, 42, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 31, 400, 25, 11, -42, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 28, 512, 25, 16, 46, 0
+ delay 0x2
+ createsprite gUnknown_08596B88, 0x2, 0, 33, 464, 30, 15, -50, 0
+ delay 0x2
+ return
+
+AnimScript_82D560C:
+ end
+
+Move_MUD_SHOT:
+ loadspritegfx 0x2813
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ createvisualtask sub_80D51AC, 0x5, 0, 0, 2, 46, 1
+ delay 0x6
+ createvisualtask sub_81076C8, 0x5, 100
+ panse_1B SE_W250, -64, +63, +1, 0x0
+ call AnimScript_82D5687
+ call AnimScript_82D5687
+ call AnimScript_82D5687
+ createvisualtask sub_80D51AC, 0x5, 1, 3, 0, 43, 1
+ call AnimScript_82D5687
+ call AnimScript_82D5687
+ call AnimScript_82D5687
+ call AnimScript_82D5687
+ call AnimScript_82D5687
+ call AnimScript_82D5687
+ call AnimScript_82D5687
+ call AnimScript_82D5687
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D5687:
+ createsprite gUnknown_085950FC, 0x3, 10, 10, 0, 16
+ delay 0x2
+ createsprite gUnknown_085950FC, 0x3, 10, 10, 0, 16
+ delay 0x2
+ return
+
+Move_METEOR_MASH:
+ loadspritegfx 0x27F9
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ panse_1B SE_W112, -64, +63, +3, 0x0
+ fadetobg BG_COSMIC
+ waitbgfadein
+ waitforvisualfinish
+ createsprite gUnknown_085CE8DC, 0x83, -48, -64, 72, 32, 30
+ delay 0xA
+ createsprite gUnknown_085CE8DC, 0x83, -112, -64, 8, 32, 30
+ delay 0x28
+ createsprite gUnknown_08595F14, 0x83, 0, 0, 0, 30
+ createsprite gUnknown_085CE8DC, 0x83, -80, -64, 40, 32, 30
+ delay 0x14
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 5, 0, 20, 1
+ waitforvisualfinish
+ delay 0xA
+ restorebg
+ waitbgfadein
+ waitforvisualfinish
+ end
+
+Move_REVENGE:
+ loadspritegfx 0x2805
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W036, -64
+ createsprite gUnknown_08596088, 0x2, 10, -10
+ waitforvisualfinish
+ createvisualtask sub_8115A04, 0x2, 2, 0, 4, 2, 8, 31
+ waitforvisualfinish
+ unloadspritegfx 0x2805
+ loadspritegfx 0x2806
+ createsprite gUnknown_0857FE28, 0x2, 6, 4
+ delay 0x4
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_085960D0, 0x82, 10, -10
+ waitforvisualfinish
+ unloadspritegfx 0x2806
+ loadspritegfx 0x2797
+ createvisualtask sub_80D52D0, 0x2, 1, 3, 0, 10, 1
+ createsprite gUnknown_08597400, 0x83, -10, -8, 1, 1, 8
+ playsewithpan SE_W233B, +63
+ delay 0x8
+ createsprite gUnknown_08597400, 0x83, 10, 8, 1, 1, 8
+ playsewithpan SE_W025B, +63
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_POISON_FANG:
+ loadspritegfx 0x27D0
+ loadspritegfx 0x27A6
+ playsewithpan SE_W044, +63
+ createsprite gUnknown_085CE1DC, 0x82
+ delay 0xA
+ createvisualtask sub_80D51AC, 0x3, 1, 3, 0, 10, 1
+ waitforvisualfinish
+ createvisualtask sub_8115A04, 0x2, 4, 0, 4, 0, 12, 26650
+ call AnimScript_82D7A71
+ waitforvisualfinish
+ end
+
+Move_SUBSTITUTE:
+ playsewithpan SE_W213, -64
+ createvisualtask sub_815F20C, 0x2
+ end
+
+Move_FRENZY_PLANT:
+ loadspritegfx 0x27EF
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ createsprite gUnknown_08597274, 0x0, 1, 2, 0, 5, 0
+ waitforvisualfinish
+ createsprite gUnknown_08592564, 0x2, 10, 8, 2, 0, 0, 100
+ playsewithpan SE_W010, -64
+ delay 0x5
+ createsprite gUnknown_08592564, 0x2, 20, -8, -2, 0, 1, 95
+ playsewithpan SE_W010, -43
+ delay 0x5
+ createsprite gUnknown_08592564, 0x2, 30, 8, -4, 0, 0, 90
+ playsewithpan SE_W010, -22
+ delay 0x5
+ createsprite gUnknown_08592564, 0x2, 40, -8, 4, 0, 1, 85
+ playsewithpan SE_W010, 0
+ delay 0x5
+ createsprite gUnknown_08592564, 0x2, 50, 8, 0, 0, 0, 85
+ playsewithpan SE_W010, +21
+ delay 0x5
+ createsprite gUnknown_08592564, 0x2, 60, -8, -2, 0, 1, 85
+ playsewithpan SE_W010, +42
+ delay 0x5
+ createsprite gUnknown_08592564, 0x2, 75, 8, 0, 0, 0, 85
+ playsewithpan SE_W010, +63
+ delay 0x5
+ createsprite gUnknown_08592564, 0x2, 85, 16, 6, 0, 3, 80
+ playsewithpan SE_W010, +63
+ delay 0x5
+ createsprite gUnknown_08592564, 0x2, 85, -16, -6, 0, 2, 75
+ playsewithpan SE_W010, +63
+ delay 0x5
+ createsprite gUnknown_08597358, 0x2, -10, -10, 1, 3
+ playsewithpan SE_W003, +63
+ createvisualtask sub_80D51AC, 0x3, 1, 8, 0, 20, 1
+ delay 0x3
+ createsprite gUnknown_08597358, 0x2, 10, 8, 1, 3
+ playsewithpan SE_W003, +63
+ delay 0x3
+ createsprite gUnknown_08597358, 0x2, 10, -3, 1, 2
+ playsewithpan SE_W003, +63
+ delay 0x3
+ createsprite gUnknown_08597358, 0x2, -3, 1, 1, 2
+ playsewithpan SE_W003, +63
+ delay 0x2
+ createsprite gUnknown_08597358, 0x2, -10, 1, 1, 1
+ playsewithpan SE_W003, +63
+ delay 0x2
+ createsprite gUnknown_08597358, 0x2, 0, 10, 1, 1
+ playsewithpan SE_W003, +63
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x0, 1, 2, 5, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Move_METAL_SOUND:
+ loadspritegfx 0x2814
+ monbg ANIM_DEF_PARTNER
+ monbgprio_2A ANIM_TARGET
+ createvisualtask sub_80D52D0, 0x2, 0, 2, 0, 8, 1
+ call AnimScript_82D59EA
+ call AnimScript_82D59EA
+ call AnimScript_82D59EA
+ call AnimScript_82D59EA
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ delay 0x0
+ waitforvisualfinish
+ end
+
+AnimScript_82D59EA:
+ panse_1B SE_W103, -64, +63, +2, 0x0
+ createsprite gUnknown_08593458, 0x82, 16, 0, 0, 0, 30, 0
+ delay 0x2
+ return
+
+Move_FOCUS_PUNCH:
+ goto AnimScript_82D5A0E
+
+AnimScript_82D5A0C:
+ waitforvisualfinish
+ end
+
+AnimScript_82D5A0E:
+ loadspritegfx 0x2797
+ loadspritegfx 0x279F
+ delay 0x1
+ createvisualtask sub_8117E60, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82D5AC7
+ createvisualtask sub_815A8C8, 0x2
+ jumpargeq 0x7, 0x0, AnimScript_82D5AB9
+ jumpargeq 0x7, 0x1, AnimScript_82D5AC0
+
+AnimScript_82D5A3C:
+ waitbgfadein
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W207, +63
+ createsprite gUnknown_08596104, 0x82
+ delay 0xA
+ createsprite gUnknown_08597358, 0x2, -10, -8, 1, 0
+ createvisualtask sub_80D51AC, 0x5, 1, 8, 0, 24, 1
+ delay 0x8
+ createsprite gUnknown_08597358, 0x2, 10, 2, 1, 0
+ playsewithpan SE_W233B, +63
+ delay 0x8
+ createsprite gUnknown_08597358, 0x2, 10, -6, 1, 0
+ playsewithpan SE_W233B, +63
+ delay 0x8
+ createsprite gUnknown_08597358, 0x2, 0, 8, 1, 0
+ playsewithpan SE_W025B, +63
+ waitforvisualfinish
+ restorebg
+ waitbgfadein
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ goto AnimScript_82D5A0C
+
+AnimScript_82D5AB9:
+ fadetobg BG_IMPACT_OPPONENT
+ goto AnimScript_82D5A3C
+
+AnimScript_82D5AC0:
+ fadetobg BG_IMPACT_PLAYER
+ goto AnimScript_82D5A3C
+
+AnimScript_82D5AC7:
+ fadetobg BG_IMPACT_CONTESTS
+ goto AnimScript_82D5A3C
+
+Move_RETURN:
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createvisualtask sub_815F8A0, 0x2
+ delay 0x2
+ jumpargeq 0x7, 0x0, AnimScript_82D5B04
+ jumpargeq 0x7, 0x1, AnimScript_82D5B56
+ jumpargeq 0x7, 0x2, AnimScript_82D5BB6
+ jumpargeq 0x7, 0x3, AnimScript_82D5CD1
+
+AnimScript_82D5AFF:
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D5B04:
+ createsprite gUnknown_0857FE40, 0x2, 16, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ waitforvisualfinish
+ createsprite gUnknown_0857FE40, 0x2, 16, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ delay 0x5
+ createsprite gUnknown_08597358, 0x2, -10, -8, 1, 2
+ createvisualtask sub_8159210, 0x5, 139, 63
+ goto AnimScript_82D5AFF
+
+AnimScript_82D5B56:
+ createsprite gUnknown_0857FE40, 0x2, 6, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ waitforvisualfinish
+ createsprite gUnknown_0857FE40, 0x2, 6, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ waitforvisualfinish
+ delay 0xB
+ createsprite gUnknown_0857FE28, 0x2, 5, 4
+ delay 0x6
+ createsprite gUnknown_08597358, 0x3, 0, 0, 1, 2
+ createvisualtask sub_8159210, 0x5, 141, 63
+ goto AnimScript_82D5AFF
+
+AnimScript_82D5BB6:
+ createsprite gUnknown_0857FE40, 0x2, 6, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ waitforvisualfinish
+ createsprite gUnknown_0857FE40, 0x2, 6, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ waitforvisualfinish
+ createsprite gUnknown_0857FE40, 0x2, 6, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ waitforvisualfinish
+ createsprite gUnknown_0857FE40, 0x2, 6, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x2, -10, -8, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ delay 0x8
+ createsprite gUnknown_08597358, 0x2, 10, 10, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ delay 0x8
+ createsprite gUnknown_08597358, 0x2, 3, -5, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ delay 0x8
+ createsprite gUnknown_08597358, 0x2, -5, 3, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ goto AnimScript_82D5AFF
+
+AnimScript_82D5CD1:
+ createsprite gUnknown_08597274, 0x2, 1, 0, 0, 6, 0
+ waitforvisualfinish
+ createsprite gUnknown_0857FE40, 0x2, 16, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ delay 0x8
+ createsprite gUnknown_08597358, 0x2, 3, -5, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ waitforvisualfinish
+ createsprite gUnknown_0857FE40, 0x2, 12, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ delay 0x5
+ createsprite gUnknown_08597358, 0x2, -10, -8, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ waitforvisualfinish
+ delay 0x4
+ createsprite gUnknown_0857FE40, 0x2, 8, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ delay 0x5
+ createsprite gUnknown_08597358, 0x2, -10, -8, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ waitforvisualfinish
+ delay 0x2
+ createvisualtask sub_81169C0, 0x2, 0, 4, 5, 1
+ createsprite gUnknown_0857FE40, 0x2, 4, 1, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ createsprite gUnknown_08597358, 0x2, -10, -8, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ createvisualtask sub_81169C0, 0x2, 0, 4, 5, 1
+ waitforvisualfinish
+ createsprite gUnknown_0857FE40, 0x2, 4, 2, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ delay 0x5
+ createsprite gUnknown_08597358, 0x2, -10, -8, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ createvisualtask sub_81169C0, 0x2, 0, 4, 5, 1
+ waitforvisualfinish
+ call AnimScript_82D5F09
+ call AnimScript_82D5F09
+ call AnimScript_82D5F09
+ call AnimScript_82D5F09
+ createsprite gUnknown_08597358, 0x2, -10, -8, 1, 0
+ createvisualtask sub_8159210, 0x5, 141, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 8, 0, 24, 1
+ delay 0x6
+ createsprite gUnknown_08597358, 0x2, 10, 10, 1, 0
+ createvisualtask sub_8159210, 0x5, 141, 63
+ delay 0x6
+ createsprite gUnknown_08597358, 0x2, 3, -5, 1, 0
+ createvisualtask sub_8159210, 0x5, 141, 63
+ delay 0x6
+ createsprite gUnknown_08597358, 0x2, -5, 3, 1, 0
+ createvisualtask sub_8159210, 0x5, 141, 63
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 0, 6, 0, 0
+ goto AnimScript_82D5AFF
+
+AnimScript_82D5F09:
+ createsprite gUnknown_0857FE40, 0x2, 4, 3, 0
+ createvisualtask sub_8159244, 0x5, 167, -64
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_8159210, 0x5, 123, 63
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ createvisualtask sub_81169C0, 0x2, 0, 4, 5, 1
+ waitforvisualfinish
+ return
+
+Move_COSMIC_POWER:
+ loadspritegfx 0x2741
+ createvisualtask sub_8159244, 0x5, 243, 0
+ playsewithpan SE_W322, 0
+ createvisualtask sub_8117610, 0x2, 0, 0, 15, 0
+ waitforvisualfinish
+ fadetobg BG_COSMIC
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x2, 0, 128, 0, -1
+ waitbgfadein
+ delay 0x46
+ createvisualtask sub_8159210, 0x5, 228, -64
+ createsprite gUnknown_08592B7C, 0x2, -15, 0, 0, 0, 32, 60
+ delay 0x8
+ createsprite gUnknown_08592B7C, 0x2, 12, -5, 0, 0, 32, 60
+ delay 0x28
+ createvisualtask sub_8117610, 0x2, 0, 15, 0, 0
+ waitforvisualfinish
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ waitforvisualfinish
+ end
+
+Move_BLAST_BURN:
+ loadspritegfx 0x2733
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W221, -64
+ createsprite gUnknown_08595428, 0x2, -32, 0, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x2, -20, -10, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x42, 0, -16, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x42, 20, -10, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x42, 32, 0, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x42, 20, 10, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x2, 0, 16, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x2, -20, 10, 24, 0, 0, 0
+ delay 0x19
+ playsewithpan SE_W172B, -64
+ createsprite gUnknown_08595428, 0x2, -64, 0, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x6, -40, -20, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x46, 0, -32, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x46, 40, -20, 24, 0, 0, 0
+ createvisualtask sub_80D51AC, 0x5, 1, 6, 0, 8, 1
+ createsprite gUnknown_08595428, 0x42, 64, 0, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x42, 40, 20, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x2, 0, 32, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x2, -40, 20, 24, 0, 0, 0
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x19
+ playsewithpan SE_W172B, -64
+ createsprite gUnknown_08595428, 0x2, -96, 0, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x6, -60, -30, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x46, 0, -48, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x46, 60, -30, 24, 0, 0, 0
+ createsprite gUnknown_08597358, 0x82, -4, 3, 1, 0
+ createvisualtask sub_80D51AC, 0x5, 1, 12, 0, 20, 1
+ createvisualtask sub_81162A4, 0x2, 2, 0, 10, 1
+ createsprite gUnknown_08595428, 0x42, 96, 0, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x42, 60, 30, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x2, 0, 48, 24, 0, 0, 0
+ createsprite gUnknown_08595428, 0x2, -60, 30, 24, 0, 0, 0
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_ROCK_TOMB:
+ loadspritegfx 0x280A
+ loadspritegfx 0x274A
+ createvisualtask sub_81162A4, 0x2, 2, 0, 10, 1
+ waitforvisualfinish
+ createsprite gUnknown_08596C58, 0x82, 20, 12, 64, 114, 0
+ delay 0x8
+ createvisualtask sub_81162A4, 0x2, 0, 2, 3, 1
+ playsewithpan SE_W070, +63
+ delay 0x8
+ createsprite gUnknown_08596C58, 0x82, -20, 12, 64, 98, 0
+ delay 0x8
+ createvisualtask sub_81162A4, 0x2, 0, 2, 3, 1
+ playsewithpan SE_W070, +63
+ delay 0x8
+ createsprite gUnknown_08596C58, 0xC2, 3, 6, 64, 82, 0
+ delay 0x8
+ createvisualtask sub_81162A4, 0x2, 0, 2, 3, 1
+ playsewithpan SE_W070, +63
+ delay 0x8
+ createsprite gUnknown_08596C58, 0x82, -3, 13, 64, 66, 0
+ delay 0x8
+ createvisualtask sub_81162A4, 0x2, 0, 2, 3, 1
+ playsewithpan SE_W070, +63
+ delay 0x18
+ playsewithpan SE_W063, +63
+ createsprite gUnknown_085967AC, 0x85, 1, 50
+ createvisualtask sub_80D51AC, 0x5, 1, 3, 0, 20, 1
+ createvisualtask sub_81162A4, 0x2, 2, 0, 10, 1
+ waitforvisualfinish
+ end
+
+Move_SILVER_WIND:
+ loadspritegfx 0x281F
+ panse_1B SE_W016, -64, +63, +2, 0x0
+ playsewithpan SE_W234, 0
+ delay 0x0
+ monbg ANIM_DEF_PARTNER
+ monbgprio_29
+ delay 0x0
+ createvisualtask sub_8116664, 0xA, 1, 0, 0, 4, 0
+ createvisualtask sub_8117780, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82D650C
+ fadetobg BG_BUG_OPPONENT
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, 1536, 0, 0, -1
+
+AnimScript_82D6352:
+ delay 0x0
+ createvisualtask sub_8116620, 0xA, 1, 0, 4, 4, 0
+ waitbgfadein
+ createsprite gUnknown_08592830, 0xC2, -32, 16, 0, 6, 2, 3, 1
+ createsprite gUnknown_08592830, 0xC2, -8, 18, 64, 3, 2, 2, 1
+ createsprite gUnknown_08592830, 0x78, -24, 18, 90, 5, 1, 2, 1
+ createsprite gUnknown_08592830, 0x78, -40, 14, 128, 4, 1, 2, 1
+ delay 0x0
+ createsprite gUnknown_08592848, 0xC2, -32, 16, 0, 6, 2, 3, 1
+ createsprite gUnknown_08592848, 0xC2, -8, 18, 64, 3, 2, 2, 1
+ createsprite gUnknown_08592848, 0x78, -24, 18, 90, 5, 1, 2, 1
+ createsprite gUnknown_08592848, 0x78, -40, 14, 128, 4, 1, 2, 1
+ delay 0x0
+ createsprite gUnknown_08592860, 0xC2, -32, 16, 0, 6, 2, 3, 1
+ createsprite gUnknown_08592860, 0xC2, -8, 18, 64, 3, 2, 2, 1
+ createsprite gUnknown_08592860, 0x78, -24, 18, 90, 5, 1, 2, 1
+ createsprite gUnknown_08592860, 0x78, -40, 14, 128, 4, 1, 2, 1
+ delay 0x6
+ createsprite gUnknown_08592830, 0xC2, -4, 16, 0, 6, 1, 2, 1
+ createsprite gUnknown_08592830, 0xC2, -16, 12, 192, 5, 2, 3, 1
+ delay 0x0
+ createsprite gUnknown_08592848, 0xC2, -4, 16, 0, 6, 1, 2, 1
+ createsprite gUnknown_08592848, 0xC2, -16, 12, 192, 5, 2, 3, 1
+ delay 0x0
+ createsprite gUnknown_08592860, 0xC2, -4, 16, 0, 6, 1, 2, 1
+ createsprite gUnknown_08592860, 0xC2, -16, 12, 192, 5, 2, 3, 1
+ waitforvisualfinish
+ playsewithpan SE_W016B, +63
+ clearmonbg ANIM_DEF_PARTNER
+ delay 0x0
+ restorebg
+ waitbgfadeout
+ createvisualtask sub_8116664, 0xA, 1, 0, 4, 0, 0
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ end
+
+AnimScript_82D650C:
+ fadetobg BG_BUG_PLAYER
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, -1536, 0, 0, -1
+ goto AnimScript_82D6352
+
+Move_SNATCH:
+ playsewithpan SE_W036, -64
+ createvisualtask sub_80D5C50, 0x5, 0, -12, 4, 10, 10, 12, 6
+ end
+
+Move_DIVE:
+ loadspritegfx 0x2820
+ loadspritegfx 0x2821
+ choosetwoturnanim AnimScript_82D654C, AnimScript_82D65A1
+
+AnimScript_82D654C:
+ loadspritegfx 0x27AC
+ playsewithpan SE_W029, -64
+ createsprite gUnknown_08596490, 0x2, 0, 0, 13, 336
+ waitforvisualfinish
+ playsewithpan SE_W291, -64
+ createsprite gUnknown_085964CC, 0x3, 0
+ call AnimScript_82D658A
+ call AnimScript_82D658A
+ call AnimScript_82D658A
+ call AnimScript_82D658A
+ call AnimScript_82D658A
+ end
+
+AnimScript_82D658A:
+ createsprite gUnknown_085964E4, 0x5, 0, 0
+ createsprite gUnknown_085964E4, 0x5, 1, 0
+ return
+
+AnimScript_82D65A1:
+ loadspritegfx 0x27A4
+ loadspritegfx 0x27AB
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W153, +63
+ createsprite gUnknown_085964CC, 0x83, 1
+ call AnimScript_82D65E0
+ call AnimScript_82D65E0
+ call AnimScript_82D65E0
+ call AnimScript_82D65E0
+ call AnimScript_82D65E0
+ delay 0xC
+ call AnimScript_82CB102
+ waitforvisualfinish
+ visible ANIM_ATTACKER
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D65E0:
+ createsprite gUnknown_085964E4, 0x85, 0, 1
+ createsprite gUnknown_085964E4, 0x85, 1, 1
+ return
+
+Move_ROCK_BLAST:
+ loadspritegfx 0x274A
+ loadspritegfx 0x2797
+ createsprite gUnknown_0857FE28, 0x2, 4, 6
+ delay 0x3
+ playsewithpan SE_W207, -64
+ createsprite gUnknown_08596C98, 0x82, 16, 0, 0, 0, 25, 257
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 1
+ playsewithpan SE_W088, +63
+ createsprite gUnknown_08596B1C, 0x82, 0, 0, 20, 24, 14, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 5, 1
+ createsprite gUnknown_08596B1C, 0x82, 5, 0, -20, 24, 14, 1
+ createsprite gUnknown_08596B1C, 0x82, 0, 5, 20, -24, 14, 2
+ createsprite gUnknown_08596B1C, 0x82, -5, 0, -20, -24, 14, 2
+ waitforvisualfinish
+ end
+
+Move_OVERHEAT:
+ loadspritegfx 0x272D
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x120C
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 5, 28
+ waitforvisualfinish
+ createvisualtask sub_8117C44, 0x5
+ waitforvisualfinish
+ createvisualtask sub_8117CA0, 0x5, 0, 1
+ delay 0x1
+ createvisualtask sub_8117DD8, 0x5, 0
+ delay 0x1
+ playsewithpan SE_W082, -64
+ createvisualtask sub_8117CA0, 0x5, 1, 0
+ delay 0x1
+ createsprite gUnknown_08597274, 0x2, 2, 1, 0, 13, 28
+ createvisualtask sub_80D51AC, 0x5, 0, 2, 0, 15, 1
+ waitforvisualfinish
+ playsewithpan SE_W172B, -64
+ createsprite gUnknown_08596FB0, 0x2, 1, 0, 30, 25, -20
+ createsprite gUnknown_08596FB0, 0x2, 1, 32, 30, 25, -20
+ createsprite gUnknown_08596FB0, 0x2, 1, 64, 30, 25, -20
+ createsprite gUnknown_08596FB0, 0x2, 1, 96, 30, 25, -20
+ createsprite gUnknown_08596FB0, 0x2, 1, 128, 30, 25, -20
+ createsprite gUnknown_08596FB0, 0x42, 1, 160, 30, 25, -20
+ createsprite gUnknown_08596FB0, 0x42, 1, 192, 30, 25, -20
+ createsprite gUnknown_08596FB0, 0x42, 1, 224, 30, 25, -20
+ delay 0x5
+ createsprite gUnknown_08596FB0, 0x2, 1, 0, 30, 25, 0
+ createsprite gUnknown_08596FB0, 0x2, 1, 32, 30, 25, 0
+ createsprite gUnknown_08596FB0, 0x2, 1, 64, 30, 25, 0
+ createsprite gUnknown_08596FB0, 0x2, 1, 96, 30, 25, 0
+ createsprite gUnknown_08596FB0, 0x2, 1, 128, 30, 25, 0
+ createsprite gUnknown_08596FB0, 0x42, 1, 160, 30, 25, 0
+ createsprite gUnknown_08596FB0, 0x42, 1, 192, 30, 25, 0
+ createsprite gUnknown_08596FB0, 0x42, 1, 224, 30, 25, 0
+ delay 0x5
+ createsprite gUnknown_08596FB0, 0x2, 1, 0, 30, 25, 10
+ createsprite gUnknown_08596FB0, 0x2, 1, 32, 30, 25, 10
+ createsprite gUnknown_08596FB0, 0x2, 1, 64, 30, 25, 10
+ createsprite gUnknown_08596FB0, 0x2, 1, 96, 30, 25, 10
+ createsprite gUnknown_08596FB0, 0x2, 1, 128, 30, 25, 10
+ createsprite gUnknown_08596FB0, 0x42, 1, 160, 30, 25, 10
+ createsprite gUnknown_08596FB0, 0x42, 1, 192, 30, 25, 10
+ createsprite gUnknown_08596FB0, 0x42, 1, 224, 30, 25, 10
+ delay 0x5
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x83, -5, 3, 1, 0
+ playsewithpan SE_W007, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 10, 0, 25, 1
+ delay 0x6
+ createsprite gUnknown_08597358, 0x83, 8, -5, 1, 0
+ playsewithpan SE_W007, +63
+ delay 0x8
+ createsprite gUnknown_08597358, 0x83, 10, 10, 1, 0
+ playsewithpan SE_W007, +63
+ delay 0x8
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 0
+ playsewithpan SE_W007, +63
+ createvisualtask sub_8117DD8, 0x5, 1
+ delay 0x1
+ createsprite gUnknown_08597274, 0x2, 2, -1, 0, 13, 19026
+ createvisualtask sub_80D51AC, 0x5, 0, 3, 0, 15, 1
+ waitforvisualfinish
+ createvisualtask sub_8117D3C, 0x5, 0, 1
+ delay 0x1
+ createsprite gUnknown_08597274, 0x2, 1, 1, 5, 0, 28
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ waitforvisualfinish
+ delay 0xF
+ createvisualtask sub_8117D3C, 0x5, 1, 0
+ delay 0x1
+ createsprite gUnknown_08597274, 0x2, 2, 0, 13, 0, 19026
+ waitforvisualfinish
+ createvisualtask sub_8117C70, 0x5
+ waitforvisualfinish
+ end
+
+Move_HYDRO_CANNON:
+ loadspritegfx 0x27A5
+ loadspritegfx 0x27A4
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ playsewithpan SE_W057, -64
+ createsprite gUnknown_085951C0, 0x82
+ delay 0xA
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ delay 0x1E
+ panse_1B SE_W056, -64, +63, +2, 0x0
+ call AnimScript_82D6A50
+ createvisualtask sub_80D51AC, 0x5, 1, 10, 0, 40, 1
+ createsprite gUnknown_08597388, 0x82, 0, 0, 1, 0
+ call AnimScript_82D6A50
+ createsprite gUnknown_08597388, 0x82, 0, 0, 1, 0
+ call AnimScript_82D6A50
+ createsprite gUnknown_08597388, 0x82, 0, 0, 1, 0
+ call AnimScript_82D6A50
+ createsprite gUnknown_08597388, 0x82, 0, 0, 1, 0
+ call AnimScript_82D6A50
+ createsprite gUnknown_08597388, 0x82, 0, 0, 1, 0
+ call AnimScript_82D6A50
+ createsprite gUnknown_08597388, 0x82, 0, 0, 1, 0
+ waitforvisualfinish
+ createvisualtask sub_8115F10, 0x2, 257, 257, 257
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D6A50:
+ createsprite gUnknown_085951D8, 0x82, 10, -10, 0, 0, 15, 257
+ delay 0x1
+ createsprite gUnknown_085951D8, 0x82, 10, -10, 0, 0, 15, 257
+ delay 0x1
+ createsprite gUnknown_085951D8, 0x82, 10, -10, 0, 0, 15, 257
+ delay 0x1
+ createsprite gUnknown_085951D8, 0x82, 10, -10, 0, 0, 15, 257
+ delay 0x1
+ createsprite gUnknown_085951D8, 0x82, 10, -10, 0, 0, 15, 257
+ return
+
+Move_ASTONISH:
+ loadspritegfx 0x2821
+ playsewithpan SE_W227, -64
+ createsprite gUnknown_0857FE28, 0x2, 4, 6
+ delay 0x19
+ createsprite gUnknown_085964E4, 0x85, 0, 1
+ playsewithpan SE_W166, +63
+ createsprite gUnknown_085964E4, 0x85, 1, 1
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 5, 1
+ createvisualtask sub_8106020, 0x3
+ waitforvisualfinish
+ end
+
+Move_SEISMIC_TOSS:
+ loadspritegfx 0x2797
+ loadspritegfx 0x274A
+ setarg 0x7, 0x0
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ waitforvisualfinish
+ createvisualtask sub_81114EC, 0x3
+ delay 0x1
+ fadetobg BG_SEISMICTOSS_SKUUPPERCUT
+ waitbgfadeout
+ createvisualtask sub_811152C, 0x3
+ playsewithpan SE_W327, 0
+ waitbgfadein
+ waitforvisualfinish
+ createvisualtask sub_8111590, 0x3
+ jumpargeq 0x7, 0x0, AnimScript_82D6B53
+ jumpargeq 0x7, 0x1, AnimScript_82D6B64
+ jumpargeq 0x7, 0x2, AnimScript_82D6B7C
+
+AnimScript_82D6B48:
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFF
+ waitbgfadein
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+AnimScript_82D6B53:
+ call AnimScript_82D6B9B
+ delay 0x10
+ call AnimScript_82D6BFC
+ goto AnimScript_82D6B48
+
+AnimScript_82D6B64:
+ call AnimScript_82D6B9B
+ delay 0xE
+ call AnimScript_82D6BFC
+ delay 0xE
+ call AnimScript_82D6B9B
+ goto AnimScript_82D6B48
+
+AnimScript_82D6B7C:
+ call AnimScript_82D6BFC
+ delay 0xA
+ call AnimScript_82D6B9B
+ delay 0xA
+ call AnimScript_82D6BFC
+ delay 0xA
+ call AnimScript_82D6B9B
+ goto AnimScript_82D6B48
+
+AnimScript_82D6B9B:
+ createsprite gUnknown_08597358, 0x83, -10, -8, 1, 1
+ playsewithpan SE_W070, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 5, 1
+ createsprite gUnknown_08596CB0, 0x82, -12, 27, 2, 3
+ createsprite gUnknown_08596CB0, 0x82, 8, 28, 3, 4
+ createsprite gUnknown_08596CB0, 0x82, -4, 30, 2, 3
+ createsprite gUnknown_08596CB0, 0x82, 12, 25, 4, 4
+ return
+
+AnimScript_82D6BFC:
+ createsprite gUnknown_08597358, 0x83, 10, -8, 1, 1
+ playsewithpan SE_W088, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 5, 1
+ createsprite gUnknown_08596CB0, 0x82, -12, 32, 3, 4
+ createsprite gUnknown_08596CB0, 0x82, 8, 31, 2, 2
+ createsprite gUnknown_08596CB0, 0x82, -4, 28, 2, 3
+ createsprite gUnknown_08596CB0, 0x82, 12, 30, 4, 3
+ return
+
+Move_MAGIC_COAT:
+ loadspritegfx 0x27BA
+ setalpha 0x1000
+ waitplaysewithpan SE_W112, -64, 0xF
+ createsprite gUnknown_085965C0, 0x3, 40, 0, 10170
+ waitforvisualfinish
+ delay 0x1
+ blendoff
+ end
+
+Move_WATER_PULSE:
+ loadspritegfx 0x27AB
+ loadspritegfx 0x2830
+ monbg ANIM_TARGET
+ monbgprio_28 ANIM_TARGET
+ playsewithpan SE_W145C, -64
+ createsprite gUnknown_08597274, 0x2, 1, 0, 0, 7, 29472
+ delay 0xA
+ createsprite gUnknown_085952F8, 0x42, 100, 100, 8, 1, 20, 40, 0
+ createsprite gUnknown_085952F8, 0x42, 20, 100, 16, 2, 10, 35, 1
+ createsprite gUnknown_085952F8, 0x42, 200, 80, 8, 1, 40, 20, 0
+ createsprite gUnknown_085952F8, 0x42, 80, 60, 10, 3, 20, 50, 0
+ createsprite gUnknown_085952F8, 0x42, 140, 100, 16, 1, 20, 30, 1
+ playsewithpan SE_W145C, +63
+ waitforvisualfinish
+ playsewithpan SE_W202, -64
+ createsprite gUnknown_08593470, 0x82, 0, 0, 40, 15
+ delay 0x5
+ playsewithpan SE_W202, -64
+ createsprite gUnknown_08593470, 0x82, 0, 0, 40, 15
+ delay 0x5
+ playsewithpan SE_W202, -64
+ createsprite gUnknown_08593470, 0x82, 0, 0, 40, 15
+ delay 0xD
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 8, 18, 1
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 1, 7, 0, 29472
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Move_PSYCHO_BOOST:
+ loadspritegfx 0x27E4
+ monbg ANIM_ATK_PARTNER
+ fadetobg BG_PSYCHIC
+ waitbgfadeout
+ createvisualtask sub_815A5C8, 0x5
+ waitbgfadein
+ delay 0x6
+ createvisualtask sub_8115A04, 0x2, 1, 2, 8, 0, 10, 0
+ delay 0x0
+ monbgprio_28 ANIM_ATTACKER
+ setalpha 0x808
+ delay 0xA
+ createvisualtask sub_80D51AC, 0x2, 0, 3, 0, 240, 0
+ loopsewithpan SE_W060B, -64, 0xE, 0xA
+ createsprite gUnknown_08596920, 0x2
+ delay 0x6E
+ loopsewithpan SE_W060B, -64, 0x7, 0xA
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x2, 1, -8, 1, 24, 1
+ playsewithpan SE_W043, +63
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ call AnimScript_82D7CDD
+ end
+
+Move_KNOCK_OFF:
+ loadspritegfx 0x2825
+ loadspritegfx 0x2797
+ createsprite gUnknown_0857FE28, 0x2, 4, 6
+ delay 0x4
+ playsewithpan SE_W233, +63
+ createsprite gUnknown_085CE984, 0x82, -16, -16
+ delay 0x8
+ createsprite gUnknown_0859728C, 0x2, 31, 5, 1, 0x7FFF, 10, 0, 0
+ createsprite gUnknown_08597358, 0x83, 0, 0, 1, 2
+ playsewithpan SE_W004, +63
+ createsprite gUnknown_0857FE70, 0x2, 1, -12, 10, 0, 3
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 5
+ delay 0x3
+ createvisualtask sub_80D5484, 0x2, 1, 0, 3, 6, 1
+ delay 0x5
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 6
+ delay 0xA
+ waitforvisualfinish
+ end
+
+Move_DOOM_DESIRE:
+ createvisualtask sub_8114960, 0x2
+ delay 0x1
+ monbg ANIM_ATK_PARTNER
+ createvisualtask sub_811489C, 0x5, 1, 0
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 4, 0
+ waitforvisualfinish
+ setalpha 0x808
+ playsewithpan SE_W060, -64
+ createvisualtask sub_80D6064, 0x5, -4, -4, 15, 0, 1
+ waitforvisualfinish
+ delay 0x14
+ createvisualtask sub_811489C, 0x5, 1, 1
+ createsprite gUnknown_08597274, 0x2, 1, 1, 4, 0, 0
+ waitforvisualfinish
+ clearmonbg ANIM_ATK_PARTNER
+ blendoff
+ end
+
+Move_SKY_UPPERCUT:
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ fadetobg BG_SEISMICTOSS_SKUUPPERCUT
+ waitbgfadeout
+ playsewithpan SE_W327, -64
+ createvisualtask sub_810DABC, 0x5, 55
+ waitbgfadein
+ setalpha 0x80C
+ delay 0x26
+ createsprite gUnknown_0857FE70, 0x2, 0, 28, 0, 0, 5
+ delay 0x4
+ createvisualtask sub_80D52D0, 0x2, 1, 4, 0, 6, 1
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08597358, 0x83, -28, 28, 1, 1
+ delay 0x1
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08597358, 0x83, -15, 8, 1, 1
+ playsewithpan SE_W233B, +63
+ delay 0x1
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08597358, 0x83, -5, -12, 1, 1
+ delay 0x1
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08597358, 0x83, 0, -32, 1, 1
+ delay 0x1
+ playsewithpan SE_W233B, +63
+ createsprite gUnknown_08597358, 0x83, 5, -52, 1, 1
+ createsprite gUnknown_0857FE70, 0x2, 1, -26, 16, 1, 4
+ delay 0x4
+ createvisualtask sub_80D5484, 0x2, 1, 0, 3, 6, 1
+ delay 0x1E
+ createsprite gUnknown_0857FE58, 0x2, 0, 0, 6
+ delay 0x4
+ createsprite gUnknown_0857FE58, 0x2, 1, 0, 6
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ end
+
+Move_SECRET_POWER:
+ createvisualtask sub_8117C24, 0x5
+ jumpargeq 0x0, 0x0, Move_NEEDLE_ARM
+ jumpargeq 0x0, 0x1, Move_MAGICAL_LEAF
+ jumpargeq 0x0, 0x2, Move_MUD_SHOT
+ jumpargeq 0x0, 0x3, Move_WATERFALL
+ jumpargeq 0x0, 0x4, Move_SURF
+ jumpargeq 0x0, 0x5, Move_BUBBLE_BEAM
+ jumpargeq 0x0, 0x6, Move_ROCK_THROW
+ jumpargeq 0x0, 0x7, Move_BITE
+ jumpargeq 0x0, 0x8, Move_STRENGTH
+ goto Move_SLAM
+
+Move_TWISTER:
+ loadspritegfx 0x274F
+ loadspritegfx 0x2797
+ loadspritegfx 0x274A
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ playsewithpan SE_W239, +63
+ createsprite gUnknown_085923A8, 0x82, 120, 70, 5, 70, 30
+ delay 0x1
+ createsprite gUnknown_085923A8, 0x82, 115, 55, 6, 60, 25
+ delay 0x1
+ createsprite gUnknown_085923A8, 0x82, 115, 60, 7, 60, 30
+ createsprite gUnknown_085923A8, 0x82, 115, 55, 10, 60, 30
+ delay 0x3
+ createsprite gUnknown_08596CC8, 0x82, 100, 50, 4, 50, 26
+ delay 0x1
+ createsprite gUnknown_085923A8, 0x82, 105, 25, 8, 60, 20
+ delay 0x1
+ createsprite gUnknown_085923A8, 0x82, 115, 40, 10, 48, 30
+ delay 0x3
+ createsprite gUnknown_08596CC8, 0x82, 120, 30, 6, 45, 25
+ createsprite gUnknown_085923A8, 0x82, 115, 35, 10, 60, 30
+ delay 0x3
+ createsprite gUnknown_08596CC8, 0x82, 105, 20, 8, 40, 0
+ delay 0x3
+ createsprite gUnknown_085923A8, 0x82, 20, 255, 15, 32, 0
+ createsprite gUnknown_085923A8, 0x82, 110, 10, 8, 32, 20
+ waitforvisualfinish
+ createsprite gUnknown_08597358, 0x83, -32, -16, 1, 3
+ playsewithpan SE_W004, +63
+ createvisualtask sub_80D5484, 0x2, 1, 3, 0, 12, 1
+ createvisualtask sub_80D5484, 0x2, 3, 3, 0, 12, 1
+ delay 0x4
+ createsprite gUnknown_085973A0, 0x83, 1, 3
+ playsewithpan SE_W004, +63
+ delay 0x4
+ createsprite gUnknown_085973A0, 0x83, 1, 3
+ playsewithpan SE_W004, +63
+ delay 0x4
+ createsprite gUnknown_08597358, 0x83, 32, 20, 1, 3
+ playsewithpan SE_W004, +63
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_MAGICAL_LEAF:
+ loadspritegfx 0x274F
+ loadspritegfx 0x27B0
+ loadspritegfx 0x2797
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ delay 0x1
+ loopsewithpan SE_W077, -64, 0xA, 0x5
+ createvisualtask sub_81007C4, 0x5
+ createsprite gUnknown_08592390, 0x2, -3, -2, 10
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -1, -1, 15
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -4, -4, 7
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, 3, -3, 11
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -1, -6, 8
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, 2, -1, 12
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -3, -4, 13
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, 4, -5, 7
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, 2, -6, 11
+ delay 0x2
+ createsprite gUnknown_08592390, 0x2, -3, -5, 8
+ delay 0x3C
+ playsewithpan SE_W013B, -64
+ createsprite gUnknown_085923D8, 0x83, 20, -10, 20, 0, 32, 20, 0
+ createsprite gUnknown_085923D8, 0x83, 20, -10, 20, 0, 32, -20, 0
+ delay 0x1E
+ playsewithpan SE_W013, +63
+ createsprite gUnknown_08597358, 0x84, -10, -4, 1, 2
+ createsprite gUnknown_08597358, 0x84, 10, 4, 1, 2
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ delay 0x14
+ setarg 0x7, 0xFFFF
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Move_ICE_BALL:
+ loadspritegfx 0x273B
+ loadspritegfx 0x279D
+ createvisualtask sub_810CDFC, 0x5, 0
+ jumpargeq 0x0, 0x4, AnimScript_82D731B
+
+AnimScript_82D72BB:
+ playsewithpan SE_W196, -64
+ createsprite gUnknown_08595DE4, 0x82, 15, 0, -12, -16, 30, -40
+ delay 0x1C
+ playsewithpan SE_W280, +63
+ createvisualtask sub_810CDFC, 0x5, 0
+ jumpargeq 0x0, 0x0, AnimScript_82D732C
+ jumpargeq 0x0, 0x1, AnimScript_82D735B
+ jumpargeq 0x0, 0x2, AnimScript_82D7394
+ jumpargeq 0x0, 0x3, AnimScript_82D73D7
+ jumpargeq 0x0, 0x4, AnimScript_82D741F
+
+AnimScript_82D7309:
+ createvisualtask sub_810CDFC, 0x5, 0
+ jumpargeq 0x0, 0x4, AnimScript_82D7322
+
+AnimScript_82D731A:
+ end
+
+AnimScript_82D731B:
+ fadetobg BG_ICE
+ goto AnimScript_82D72BB
+
+AnimScript_82D7322:
+ waitbgfadein
+ delay 0x2D
+ restorebg
+ waitbgfadein
+ goto AnimScript_82D731A
+
+AnimScript_82D732C:
+ createvisualtask sub_80D6388, 0x2, 0, 1, 8, 1, 0
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ goto AnimScript_82D7309
+
+AnimScript_82D735B:
+ createvisualtask sub_80D6388, 0x2, 0, 1, 10, 1, 0
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ goto AnimScript_82D7309
+
+AnimScript_82D7394:
+ createvisualtask sub_80D6388, 0x2, 0, 1, 14, 1, 0
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ goto AnimScript_82D7309
+
+AnimScript_82D73D7:
+ createvisualtask sub_80D6388, 0x2, 0, 1, 18, 1, 0
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ goto AnimScript_82D7309
+
+AnimScript_82D741F:
+ createvisualtask sub_80D6388, 0x2, 0, 1, 30, 1, 0
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ call AnimScript_82D7467
+ goto AnimScript_82D7309
+
+AnimScript_82D7467:
+ createsprite gUnknown_08595DFC, 0x84, -12, -16
+ return
+
+Move_WEATHER_BALL:
+ loadspritegfx 0x282B
+ createsprite gUnknown_0857FE40, 0x2, 8, 1, 0
+ delay 0x8
+ playsewithpan SE_W207, -64
+ createsprite gUnknown_0853EE38, 0x2
+ waitforvisualfinish
+ delay 0xF
+ playsewithpan SE_W197, 0
+ createsprite gUnknown_0859728C, 0x2, 31, 5, 1, 0x7FFF, 10, 0, 0
+ waitforvisualfinish
+ createvisualtask sub_81604F0, 0x2
+ delay 0x1
+ jumpargeq 0x7, 0x0, AnimScript_82D74DE
+ jumpargeq 0x7, 0x1, AnimScript_82D751B
+ jumpargeq 0x7, 0x2, AnimScript_82D757F
+ jumpargeq 0x7, 0x3, AnimScript_82D75E3
+ jumpargeq 0x7, 0x4, AnimScript_82D7683
+
+AnimScript_82D74DE:
+ loadspritegfx 0x2797
+ createsprite gUnknown_0853EE50, 0x82, -30, -100, 25, 1, 0, 0
+ waitforvisualfinish
+ playsewithpan SE_W025B, +63
+ createsprite gUnknown_08597358, 0x84, -10, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 8, 1
+ waitforvisualfinish
+ end
+
+AnimScript_82D751B:
+ loadspritegfx 0x272D
+ createsprite gUnknown_0859559C, 0x82, -30, -100, 25, 1, 40, 10
+ playsewithpan SE_W172, +63
+ delay 0xA
+ createsprite gUnknown_0859559C, 0x82, -30, -100, 25, 1, -40, 20
+ playsewithpan SE_W172, +63
+ delay 0xA
+ createsprite gUnknown_0859559C, 0x82, -30, -100, 25, 1, 0, 0
+ playsewithpan SE_W172, +63
+ waitforvisualfinish
+ playsewithpan SE_W172B, +63
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 8, 1
+ waitforvisualfinish
+ end
+
+AnimScript_82D757F:
+ loadspritegfx 0x27AB
+ createsprite gUnknown_08595328, 0x82, -30, -100, 25, 1, 50, 10
+ playsewithpan SE_W152, +63
+ delay 0x8
+ createsprite gUnknown_08595328, 0x82, -30, -100, 25, 1, -20, 20
+ playsewithpan SE_W152, +63
+ delay 0xD
+ createsprite gUnknown_08595328, 0x82, -30, -100, 25, 1, 0, 0
+ playsewithpan SE_W152, +63
+ waitforvisualfinish
+ createvisualtask sub_80D51AC, 0x2, 1, 0, 3, 8, 1
+ playsewithpan SE_W202, +63
+ waitforvisualfinish
+ end
+
+AnimScript_82D75E3:
+ loadspritegfx 0x274A
+ createsprite gUnknown_08596CE0, 0x82, -30, -100, 25, 1, 30, 0
+ playsewithpan SE_W088, +63
+ delay 0x5
+ createsprite gUnknown_08596CE0, 0x82, -30, -100, 25, 1, -40, 20
+ playsewithpan SE_W088, +63
+ delay 0xE
+ createsprite gUnknown_08596CE0, 0x82, -30, -100, 25, 1, 0, 0
+ playsewithpan SE_W088, +63
+ waitforvisualfinish
+ playsewithpan SE_W070, +63
+ createsprite gUnknown_08596CB0, 0x82, -12, 27, 2, 3
+ createsprite gUnknown_08596CB0, 0x82, 8, 28, 3, 4
+ createsprite gUnknown_08596CB0, 0x82, -4, 30, 2, 3
+ createsprite gUnknown_08596CB0, 0x82, 12, 25, 4, 4
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ waitforvisualfinish
+ end
+
+AnimScript_82D7683:
+ loadspritegfx 0x2817
+ loadspritegfx 0x279D
+ createsprite gUnknown_08595D44, 0x82, -30, -100, 25, 25, -40, 20
+ playsewithpan SE_W258, +63
+ delay 0xA
+ createsprite gUnknown_08595D44, 0x82, -30, -100, 25, 25, 40, 0
+ playsewithpan SE_W258, +63
+ delay 0xA
+ createsprite gUnknown_08595D44, 0x82, -30, -100, 25, 25, 0, 0
+ playsewithpan SE_W258, +63
+ waitforvisualfinish
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ playsewithpan SE_W196, +63
+ call AnimScript_82D7720
+ waitforvisualfinish
+ end
+
+Move_COUNT:
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W003, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+AnimScript_82D7720:
+ createsprite gUnknown_08595B68, 0x82, -10, -10, 0
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, 10, 20, 0
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B68, 0x82, -5, 10, 0
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, 17, -12, 0
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, -15, 15, 0
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, 0, 0, 0
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B68, 0x82, 20, 2, 0
+ playsewithpan SE_W196, +63
+ return
+
+AnimScript_82D77A4:
+ createsprite gUnknown_08595B68, 0x82, -10, -10, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, 10, 20, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B68, 0x82, -29, 0, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, 29, -20, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B68, 0x82, -5, 10, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, 17, -12, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B68, 0x82, -20, 0, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, -15, 15, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, 26, -5, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B80, 0x82, 0, 0, 1
+ playsewithpan SE_W196, +63
+ delay 0x4
+ createsprite gUnknown_08595B68, 0x82, 20, 2, 1
+ playsewithpan SE_W196, +63
+ return
+
+AnimScript_82D7874:
+ loopsewithpan SE_W196, +63, 0x6, 0x4
+ createsprite gUnknown_08595C04, 0x82, 0, 24, 0
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 8, 24, 0
+ createsprite gUnknown_08595C04, 0x82, -8, 24, 0
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 16, 24, 0
+ createsprite gUnknown_08595C04, 0x82, -16, 24, 0
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 24, 24, 0
+ createsprite gUnknown_08595C04, 0x82, -24, 24, 0
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 32, 24, 0
+ createsprite gUnknown_08595C04, 0x82, -32, 24, 0
+ return
+
+AnimScript_82D78F8:
+ loopsewithpan SE_W196, +63, 0x6, 0x4
+ createsprite gUnknown_08595C04, 0x82, 0, 24, 1
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 8, 24, 1
+ createsprite gUnknown_08595C04, 0x82, -8, 24, 1
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 16, 24, 1
+ createsprite gUnknown_08595C04, 0x82, -16, 24, 1
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 24, 24, 1
+ createsprite gUnknown_08595C04, 0x82, -24, 24, 1
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 32, 24, 1
+ createsprite gUnknown_08595C04, 0x82, -32, 24, 1
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 40, 24, 1
+ createsprite gUnknown_08595C04, 0x82, -40, 24, 1
+ delay 0x4
+ createsprite gUnknown_08595C04, 0x82, 48, 24, 1
+ createsprite gUnknown_08595C04, 0x82, -48, 24, 1
+ return
+
+AnimScript_82D79B4:
+ createsprite gUnknown_08592B7C, 0x2, -15, 0, 0, 0, 32, 60
+ delay 0x8
+ createsprite gUnknown_08592B7C, 0x2, 12, -5, 0, 0, 32, 60
+ delay 0x8
+ return
+
+AnimScript_82D79DF:
+ playsewithpan SE_W071B, -64
+ createsprite gUnknown_08592F2C, 0x2, 0, -5, 0, 0
+ delay 0x7
+ createsprite gUnknown_08592F2C, 0x2, -15, 10, 0, 0
+ delay 0x7
+ createsprite gUnknown_08592F2C, 0x2, -15, -15, 0, 0
+ delay 0x7
+ createsprite gUnknown_08592F2C, 0x2, 10, -5, 0, 0
+ delay 0x7
+ return
+
+AnimScript_82D7A28:
+ playsewithpan SE_W071B, +63
+ createsprite gUnknown_08592F2C, 0x82, 0, -5, 1, 0
+ delay 0x7
+ createsprite gUnknown_08592F2C, 0x82, -15, 10, 1, 0
+ delay 0x7
+ createsprite gUnknown_08592F2C, 0x82, -15, -15, 1, 0
+ delay 0x7
+ createsprite gUnknown_08592F2C, 0x82, 10, -5, 1, 0
+ delay 0x7
+ return
+
+AnimScript_82D7A71:
+ createsprite gUnknown_08596240, 0x82, 10, 10, 0
+ playsewithpan SE_W092, +63
+ delay 0x6
+ createsprite gUnknown_08596240, 0x82, 20, -20, 0
+ playsewithpan SE_W092, +63
+ delay 0x6
+ createsprite gUnknown_08596240, 0x82, -20, 15, 0
+ playsewithpan SE_W092, +63
+ delay 0x6
+ createsprite gUnknown_08596240, 0x82, 0, 0, 0
+ playsewithpan SE_W092, +63
+ delay 0x6
+ createsprite gUnknown_08596240, 0x82, -20, -20, 0
+ playsewithpan SE_W092, +63
+ delay 0x6
+ createsprite gUnknown_08596240, 0x82, 16, -8, 0
+ playsewithpan SE_W092, +63
+ return
+
+AnimScript_82D7AE2:
+ createsprite gUnknown_08596258, 0x2, 10, 10, 0
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, 20, -20, 0
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, -20, 15, 0
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, 0, 0, 0
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, -20, -20, 0
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, 16, -8, 0
+ playsewithpan SE_W145C, +63
+ return
+
+AnimScript_82D7B53:
+ createsprite gUnknown_08596258, 0x2, 10, 10, 1
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, -28, -10, 1
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, 20, -20, 1
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, -20, 15, 1
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, 0, 0, 1
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, 27, 8, 1
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, -20, -20, 1
+ playsewithpan SE_W145C, +63
+ delay 0x6
+ createsprite gUnknown_08596258, 0x2, 16, -8, 1
+ playsewithpan SE_W145C, +63
+ return
+
+AnimScript_82D7BEA:
+ playsewithpan SE_W085B, +63
+ createsprite gUnknown_08595810, 0x82, 5, 0, 5, 0
+ delay 0x2
+ createsprite gUnknown_08595810, 0x82, -5, 10, 5, 1
+ delay 0x2
+ createsprite gUnknown_08595810, 0x82, 15, 20, 5, 2
+ delay 0x2
+ createsprite gUnknown_08595810, 0x82, -15, -10, 5, 0
+ delay 0x2
+ createsprite gUnknown_08595810, 0x82, 25, 0, 5, 1
+ delay 0x2
+ createsprite gUnknown_08595810, 0x82, -8, 8, 5, 2
+ delay 0x2
+ createsprite gUnknown_08595810, 0x82, 2, -8, 5, 0
+ delay 0x2
+ createsprite gUnknown_08595810, 0x82, -20, 15, 5, 1
+ return
+
+AnimScript_82D7C75:
+ loopsewithpan SE_W146, +63, 0xD, 0x6
+ createsprite gUnknown_0859725C, 0x82, 0, -15, 0, 3, 90
+ createsprite gUnknown_0859725C, 0x82, 0, -15, 51, 3, 90
+ createsprite gUnknown_0859725C, 0x82, 0, -15, 102, 3, 90
+ createsprite gUnknown_0859725C, 0x82, 0, -15, 153, 3, 90
+ createsprite gUnknown_0859725C, 0x82, 0, -15, 204, 3, 90
+ return
+
+AnimScript_82D7CD1:
+ fadetobg BG_PSYCHIC
+ waitbgfadeout
+ createvisualtask sub_815A504, 0x5
+ waitbgfadein
+ return
+
+AnimScript_82D7CDD:
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ return
+
+AnimScript_82D7CE5:
+ jumpifcontest AnimScript_82D7CFE
+ fadetobg BG_FLYING
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, -2304, 768, 1, -1
+
+AnimScript_82D7CFC:
+ waitbgfadein
+ return
+
+AnimScript_82D7CFE:
+ fadetobg BG_FLYING_CONTESTS
+ waitbgfadeout
+ createvisualtask sub_8117660, 0x5, 2304, 768, 0, -1
+ goto AnimScript_82D7CFC
+
+AnimScript_82D7D15:
+ restorebg
+ waitbgfadeout
+ setarg 0x7, 0xFFFF
+ waitbgfadein
+ return
+
+AnimScript_82D7D1D:
+ createvisualtask sub_8117E60, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82D7D42
+ createvisualtask sub_815A8C8, 0x2
+ jumpargeq 0x7, 0x0, AnimScript_82D7D50
+ goto AnimScript_82D7D49
+
+AnimScript_82D7D40:
+ waitbgfadein
+ return
+
+AnimScript_82D7D42:
+ fadetobg BG_SOLARBEAM_CONTESTS
+ goto AnimScript_82D7D40
+
+AnimScript_82D7D49:
+ fadetobg BG_SOLARBEAM_PLAYER
+ goto AnimScript_82D7D40
+
+AnimScript_82D7D50:
+ fadetobg BG_SOLARBEAM_OPPONENT
+ goto AnimScript_82D7D40
+
+AnimScript_82D7D57:
+ restorebg
+ waitbgfadein
+ return
+
+Status_Poison:
+ loopsewithpan SE_W092, +63, 0xD, 0x6
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 18, 2
+ createvisualtask sub_8115A04, 0x2, 2, 2, 2, 0, 12, 31774
+ end
+
+Status_Confusion:
+ loadspritegfx 0x2759
+ call AnimScript_82D7C75
+ end
+
+Status_Burn:
+ loadspritegfx 0x272D
+ playsewithpan SE_W172, +63
+ call AnimScript_82D7DA6
+ call AnimScript_82D7DA6
+ call AnimScript_82D7DA6
+ waitforvisualfinish
+ end
+
+AnimScript_82D7DA6:
+ createsprite gUnknown_08595504, 0x82, -24, 24, 24, 24, 20, 1, 1
+ delay 0x4
+ return
+
+Status_Infatuation:
+ loadspritegfx 0x27E2
+ playsewithpan SE_W204, -64
+ createsprite gUnknown_08593970, 0x3, 0, 20
+ delay 0xF
+ playsewithpan SE_W204, -64
+ createsprite gUnknown_08593970, 0x3, -20, 20
+ delay 0xF
+ playsewithpan SE_W204, -64
+ createsprite gUnknown_08593970, 0x3, 20, 20
+ end
+
+Status_Sleep:
+ loadspritegfx 0x27F4
+ playsewithpan SE_W173, -64
+ createsprite gUnknown_08592C88, 0x2, 4, -10, 16, 0, 0
+ delay 0x1E
+ createsprite gUnknown_08592C88, 0x2, 4, -10, 16, 0, 0
+ end
+
+Status_Paralysis:
+ loadspritegfx 0x271B
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 10, 1
+ call AnimScript_82D7BEA
+ end
+
+Status_Freeze:
+ playsewithpan SE_W196, 0
+ loadspritegfx 0x271A
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ waitplaysewithpan SE_W258, +63, 0x11
+ createvisualtask sub_80A9EF4, 0x2
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Status_Curse:
+ loadspritegfx 0x27D8
+ monbg ANIM_DEF_PARTNER
+ playsewithpan SE_W171, +63
+ createsprite gUnknown_08596DE8, 0x82
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 14, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Status_Nightmare:
+ loadspritegfx 0x27ED
+ monbg ANIM_DEF_PARTNER
+ playsewithpan SE_W171, +63
+ createsprite gUnknown_08596E00, 0x82
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 14, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+Anim_CastformTransform:
+ createvisualtask sub_815BB18, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82D7ECA
+ goto AnimScript_82D7EB2
+
+AnimScript_82D7EB2:
+ monbg ANIM_ATTACKER
+ playsewithpan SE_W100, -64
+ waitplaysewithpan SE_W107, -64, 0x30
+ createvisualtask sub_815B7D0, 0x2, 1
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ end
+
+AnimScript_82D7ECA:
+ createvisualtask sub_815BB58, 0x2, 1
+ end
+
+Anim_StatChange:
+ createvisualtask sub_80AA18C, 0x5
+ waitforvisualfinish
+ end
+
+Anim_SubsituteOff:
+ monbg ANIM_ATTACKER
+ createvisualtask sub_8172D98, 0x5
+ createvisualtask sub_8116620, 0xA, 2, 0, 0, 16, 0x7FFF
+ waitforvisualfinish
+ delay 0x1
+ clearmonbg ANIM_ATTACKER
+ delay 0x2
+ blendoff
+ createvisualtask sub_8116620, 0xA, 2, 0, 0, 0, 0x7FFF
+ createvisualtask sub_8172BF0, 0x2, 1
+ end
+
+Anim_SubsituteOn:
+ createvisualtask sub_815F20C, 0x2
+ end
+
+Anim_Table_4:
+ createvisualtask sub_817345C, 0x2, 0
+ createvisualtask sub_81732B0, 0x2
+ delay 0x0
+ waitplaysewithpan SE_W026, -64, 0x16
+ createsprite gUnknown_085E5338, 0x83, -18, 12, 0, 32
+ delay 0x32
+ loopsewithpan SE_W039, +63, 0x13, 0x2
+ createvisualtask sub_80D5EB8, 0x5, 1, 8, 1536, 2, 1
+ waitforvisualfinish
+ createvisualtask sub_81732E4, 0x2
+ end
+
+Anim_ItemKnockOff:
+ loadspritegfx 0x27F0
+ createsprite gUnknown_08592628, 0x82
+ end
+
+Status_Wrap:
+ createvisualtask sub_81734B4, 0x5
+ jumpargeq 0x0, 0x1, AnimScript_82D7FE9
+ jumpargeq 0x0, 0x2, AnimScript_82D800E
+ jumpargeq 0x0, 0x3, AnimScript_82D8062
+ jumpargeq 0x0, 0x4, AnimScript_82D80BF
+ goto AnimScript_82D7FA1
+
+AnimScript_82D7FA1:
+ loadspritegfx 0x27CA
+ loopsewithpan SE_W010, +63, 0x6, 0x2
+ createsprite gUnknown_08592494, 0x84, 0, 16, 0, 1
+ delay 0x7
+ createsprite gUnknown_08592494, 0x82, 0, 8, 1, 1
+ delay 0x3
+ createvisualtask sub_80D52D0, 0x2, 1, 2, 0, 8, 1
+ delay 0x14
+ setarg 0x7, 0xFFFF
+ playsewithpan SE_W020, +63
+ waitforvisualfinish
+ end
+
+AnimScript_82D7FE9:
+ loadspritegfx 0x272D
+ playsewithpan SE_W221B, +63
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 30, 1
+ call AnimScript_82CACBF
+ call AnimScript_82CACBF
+ waitforvisualfinish
+ stopsound
+ end
+
+AnimScript_82D800E:
+ loadspritegfx 0x27A5
+ monbg ANIM_DEF_PARTNER
+ monbgprio_28 ANIM_TARGET
+ setalpha 0x80C
+ delay 0x0
+ createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, 23968
+ playsewithpan SE_W250, +63
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 30, 1
+ call AnimScript_82D1F5B
+ call AnimScript_82D1F5B
+ delay 0xC
+ createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, 23968
+ waitforvisualfinish
+ stopsound
+ clearmonbg ANIM_DEF_PARTNER
+ end
+
+AnimScript_82D8062:
+ loadspritegfx 0x27A1
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W011, +63
+ createsprite gUnknown_08597098, 0x2, -32, 0, 2, 819, 0, 10
+ createsprite gUnknown_08597098, 0x2, 32, 0, 6, -819, 0, 10
+ delay 0xA
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x5, 1, 3, 0, 5, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ waitforvisualfinish
+ end
+
+AnimScript_82D80BF:
+ loadspritegfx 0x275A
+ createsprite gUnknown_08597274, 0x0, 4, 2, 0, 7, 563
+ createvisualtask sub_80D51AC, 0x5, 1, 0, 2, 30, 1
+ playsewithpan SE_W328, +63
+ call AnimScript_82D51B7
+ call AnimScript_82D51B7
+ delay 0x16
+ createsprite gUnknown_08597274, 0x0, 4, 2, 7, 0, 563
+ waitforvisualfinish
+ stopsound
+ end
+
+Anim_ItemEffect:
+ loadspritegfx 0x27DB
+ loadspritegfx 0x2741
+ delay 0x0
+ playsewithpan SE_W036, -64
+ createvisualtask sub_80D622C, 0x2, 16, 128, 0, 2
+ waitforvisualfinish
+ playsewithpan SE_W036, -64
+ createvisualtask sub_80D622C, 0x2, 16, 128, 0, 2
+ waitforvisualfinish
+ playsewithpan SE_W036, -64
+ createvisualtask sub_80D622C, 0x2, 16, 128, 0, 2
+ waitforvisualfinish
+ playsewithpan SE_W234, -64
+ call AnimScript_82D79B4
+ waitforvisualfinish
+ playsewithpan SE_REAPOKE, -64
+ createsprite gUnknown_08597274, 0x2, 2, 3, 7, 0, 26609
+ createsprite gUnknown_0859381C, 0x3, 0, 0, 0, 0
+ waitforvisualfinish
+ end
+
+Anim_SmokeBallEscape:
+ loadspritegfx 0x2802
+ monbg ANIM_ATTACKER
+ setalpha 0x40C
+ delay 0x0
+ playsewithpan SE_BOWA2, +63
+ createsprite gUnknown_085CE734, 0x80, 0, 32, 28, 30
+ delay 0x4
+ playsewithpan SE_BOWA2, +63
+ createsprite gUnknown_085CE734, 0x7F, 2, 12, 20, 30
+ delay 0xC
+ playsewithpan SE_BOWA2, +63
+ createsprite gUnknown_085CE734, 0x7E, 2, -28, 4, 30
+ delay 0xC
+ playsewithpan SE_BOWA2, +63
+ createsprite gUnknown_085CE734, 0x7C, 2, 14, -20, 30
+ delay 0x4
+ playsewithpan SE_BOWA2, +63
+ createvisualtask sub_81136E8, 0x2, 2
+ createsprite gUnknown_085CE734, 0x7B, 3, 4, 4, 30
+ delay 0xE
+ playsewithpan SE_BOWA2, +63
+ createsprite gUnknown_085CE734, 0x7A, 3, -14, 18, 46
+ delay 0x0
+ createsprite gUnknown_085CE734, 0x79, 3, 14, -14, 46
+ delay 0x0
+ createsprite gUnknown_085CE734, 0x78, 3, -12, -10, 46
+ delay 0x0
+ createsprite gUnknown_085CE734, 0x77, 3, 14, 14, 46
+ delay 0x0
+ createsprite gUnknown_085CE734, 0x76, 3, 0, 0, 46
+ waitforvisualfinish
+ clearmonbg ANIM_ATTACKER
+ invisible ANIM_ATTACKER
+ delay 0x0
+ blendoff
+ end
+
+Anim_HangedOn:
+ createsprite gUnknown_08597274, 0x0, 2, 7, 0, 9, 31
+ playsewithpan SE_W082, -64
+ createvisualtask sub_815DB90, 0x5, 30, 128, 0, 1, 2, 0, 1
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x0, 2, 4, 9, 0, 31
+ waitforvisualfinish
+ delay 0x6
+ createsprite gUnknown_0857FE58, 0x0, 0, 0, 15
+ end
+
+Anim_Rain:
+ loadspritegfx 0x2783
+ playsewithpan SE_W240, -64
+ createvisualtask sub_8116620, 0xA, 1921, 2, 0, 4, 0
+ waitforvisualfinish
+ createvisualtask sub_8107188, 0x2, 0, 3, 60
+ createvisualtask sub_8107188, 0x2, 0, 3, 60
+ delay 0x32
+ waitforvisualfinish
+ createvisualtask sub_8116620, 0xA, 1921, 2, 4, 0, 0
+ waitforvisualfinish
+ end
+
+Anim_Sun:
+ goto Move_SUNNY_DAY
+
+Anim_Sandstorm:
+ goto Move_SANDSTORM
+
+Anim_Hail:
+ goto Move_HAIL
+
+Status_LeechSeed:
+ createvisualtask sub_817351C, 0x5
+ delay 0x0
+ goto Move_ABSORB
+
+Anim_Hit:
+ loadspritegfx 0x2797
+ monbg ANIM_TARGET
+ setalpha 0x80C
+ playsewithpan SE_W003, +63
+ createsprite gUnknown_08597358, 0x2, 0, 0, 1, 2
+ createvisualtask sub_80D51AC, 0x2, 1, 3, 0, 6, 1
+ waitforvisualfinish
+ clearmonbg ANIM_TARGET
+ blendoff
+ end
+
+Anim_ItemSteal:
+ loadspritegfx 0x27F0
+ createvisualtask sub_8117F30, 0x2
+ createvisualtask sub_8172ED0, 0x2
+ delay 0x1
+ createsprite gUnknown_08592670, 0x2, 0, -5, 10, 2, -1
+ end
+
+Anim_SnatchMove:
+ loadspritegfx 0x27F0
+ createvisualtask sub_8117E94, 0x2
+ call AnimScript_82D85A3
+ delay 0x1
+ createvisualtask sub_80D5EB8, 0x2, 0, 5, 5120, 4, 1
+ waitforvisualfinish
+ createvisualtask sub_8117EC4, 0x2
+ jumpargeq 0x7, 0x0, AnimScript_82D839F
+ goto AnimScript_82D83AF
+
+AnimScript_82D8398:
+ waitforvisualfinish
+ call AnimScript_82D85C3
+ end
+
+AnimScript_82D839F:
+ playsewithpan SE_W104, -64
+ createvisualtask sub_815F8F4, 0x2
+ goto AnimScript_82D8398
+
+AnimScript_82D83AF:
+ playsewithpan SE_W104, -64
+ createvisualtask sub_815FFC4, 0x2
+ goto AnimScript_82D8398
+
+Anim_FutureSightHit:
+ createvisualtask sub_8117F10, 0x2
+ monbg ANIM_DEF_PARTNER
+ playsewithpan SE_W060, -64
+ call AnimScript_82D7CD1
+ setalpha 0x808
+ playsewithpan SE_W048, +63
+ waitplaysewithpan SE_W048, +63, 0x8
+ createvisualtask sub_80D51AC, 0x2, 1, 4, 0, 15, 1
+ createvisualtask sub_80D6064, 0x5, -5, -5, 15, 1, 1
+ waitforvisualfinish
+ createvisualtask sub_80D51AC, 0x2, 1, 4, 0, 24, 1
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ waitforvisualfinish
+ delay 0x1
+ call AnimScript_82D7CDD
+ end
+
+Anim_DoomDesireHit:
+ createvisualtask sub_8117F10, 0x2
+ loadspritegfx 0x27D6
+ createsprite gUnknown_08597274, 0x2, 1, 3, 0, 16, 0x7FFF
+ waitforvisualfinish
+ delay 0xA
+ createvisualtask sub_815C0A4, 0x5
+ delay 0x9
+ playsewithpan SE_W109, -64
+ delay 0x9
+ playsewithpan SE_W109, 0
+ delay 0x9
+ playsewithpan SE_W109, +63
+ delay 0x19
+ createvisualtask sub_80D5484, 0x2, 1, 10, 0, 20, 1
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x3, 0, 0, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x3, 24, -24, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x3, -16, 16, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x3, -24, -12, 1, 1
+ delay 0x6
+ playsewithpan SE_W120, +63
+ createsprite gUnknown_0859371C, 0x3, 16, 16, 1, 1
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 3, 16, 0, 0x7FFF
+ waitforvisualfinish
+ end
+
+Anim_Table_x14:
+ loadspritegfx 0x27C8
+ playsewithpan SE_W082, -64
+ call AnimScript_82CD6C7
+ delay 0x8
+ createvisualtask sub_8115A04, 0x2, 2, 2, 2, 0, 11, 31
+ createvisualtask sub_80D52D0, 0x2, 0, 1, 0, 32, 1
+ call AnimScript_82CD6C7
+ delay 0x8
+ call AnimScript_82CD6C7
+ waitforvisualfinish
+ end
+
+Status_Ingrain:
+ loadspritegfx 0x27A3
+ loadspritegfx 0x272F
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ createsprite gUnknown_08597274, 0x2, 1, 1, 0, 4, 13293
+ waitforvisualfinish
+ delay 0x3
+ call AnimScript_82D1009
+ waitforvisualfinish
+ delay 0xF
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 1, 4, 0, 13293
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ end
+
+Anim_WishHeal:
+ loadspritegfx 0x2741
+ createsprite gUnknown_08597274, 0x2, 1, 3, 0, 10, 0
+ waitforvisualfinish
+ playsewithpan SE_W025, -64
+ call AnimScript_82D79B4
+ waitforvisualfinish
+ unloadspritegfx 0x2741
+ loadspritegfx 0x272F
+ call AnimScript_82D79DF
+ waitforvisualfinish
+ createsprite gUnknown_08597274, 0x2, 1, 3, 10, 0, 0
+ end
+
+AnimScript_82D85A3:
+ createvisualtask sub_8172E9C, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82D85B4
+
+AnimScript_82D85B2:
+ waitforvisualfinish
+ return
+
+AnimScript_82D85B4:
+ createvisualtask sub_8172BF0, 0x2, 1
+ waitforvisualfinish
+ goto AnimScript_82D85B2
+
+AnimScript_82D85C3:
+ createvisualtask sub_8172E9C, 0x2
+ jumpargeq 0x7, 0x1, AnimScript_82D85D4
+
+AnimScript_82D85D2:
+ waitforvisualfinish
+ return
+
+AnimScript_82D85D4:
+ createvisualtask sub_8172BF0, 0x2, 0
+ waitforvisualfinish
+ goto AnimScript_82D85D2
+
+Anim_LevelUp:
+ playsewithpan SE_EXPMAX, 0
+ createvisualtask sub_8170920, 0x2
+ delay 0x0
+ createvisualtask sub_8170A0C, 0x5, 0, 0
+ waitforvisualfinish
+ createvisualtask sub_81709EC, 0x2
+ end
+
+Anim_SwitchOutPlayer:
+ createvisualtask sub_8170BB0, 0x2
+ delay 0xA
+ createvisualtask sub_8170B04, 0x2
+ end
+
+Anim_SwitchOutOpponent:
+ createvisualtask sub_8170BB0, 0x2
+ delay 0xA
+ createvisualtask sub_8170B04, 0x2
+ end
+
+Anim_BallThrow:
+ createvisualtask sub_8170CFC, 0x2
+ delay 0x0
+ playsewithpan SE_NAGERU, 0
+ createvisualtask sub_8170E04, 0x2
+ createvisualtask sub_8170D4C, 0x2
+ jumpargeq 0x7, 0xFFFF, AnimScript_82D8652
+
+AnimScript_82D8649:
+ waitforvisualfinish
+ createvisualtask sub_8170D24, 0x2
+ end
+
+AnimScript_82D8652:
+ loadspritegfx 0x2797
+ delay 0x19
+ monbg ANIM_DEF_PARTNER
+ setalpha 0x80C
+ delay 0x0
+ playsewithpan SE_W003, +63
+ createsprite gUnknown_08597358, 0x82, -4, -20, 1, 2
+ waitforvisualfinish
+ clearmonbg ANIM_DEF_PARTNER
+ blendoff
+ goto AnimScript_82D8649
+
+Anim_SafariBallThrow:
+ createvisualtask sub_8170CFC, 0x2
+ delay 0x0
+ createvisualtask sub_8170F2C, 0x2
+ waitforvisualfinish
+ createvisualtask sub_8170D24, 0x2
+ end
+
+Anim_SubstituteToMon:
+ createvisualtask sub_8172BF0, 0x2, 1
+ end
+
+Anim_MonToSubstitute:
+ createvisualtask sub_8172BF0, 0x2, 0
+ end
diff --git a/data/battle_anims.s b/data/battle_anims.s
index 082a86fa1..4cceadafa 100644
--- a/data/battle_anims.s
+++ b/data/battle_anims.s
@@ -441,7 +441,7 @@ gBattleAnimPicTable:: @ 8524B44
obj_tiles 0x08c2cbac, 0x0800, 0x279f
obj_tiles 0x08c1bc64, 0x0200, 0x27a0
obj_tiles 0x08c1a9a0, 0x0800, 0x27a1
- obj_tiles 0x08c02478, 0x0180, 0x27a2
+ obj_tiles gBattleAnimSpriteSheet_146, 0x0180, 0x27a2
obj_tiles 0x08c1af6c, 0x0180, 0x27a3
obj_tiles 0x08c1b178, 0x0200, 0x27a4
obj_tiles 0x08c1b0a8, 0x0200, 0x27a5
diff --git a/data/battle_frontier_1.s b/data/battle_frontier_1.s
index de0d0cb46..177d8adfc 100644
--- a/data/battle_frontier_1.s
+++ b/data/battle_frontier_1.s
@@ -272,7 +272,7 @@ gUnknown_0860CF44:: @ 860CF44
.align 2
gUnknown_0860CF50:: @ 860CF50
- obj_tiles gUnknown_08D85058, 0x0600, 0x0000
+ obj_tiles gBattleFrontierGfx_DomeOptions, 0x0600, 0x0000
null_obj_tiles
.align 2
diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s
index b442d74b5..27aff5f19 100644
--- a/data/battle_scripts_1.s
+++ b/data/battle_scripts_1.s
@@ -10,6 +10,7 @@
.section script_data, "aw", %progbits
+.align 2
gBattleScriptsForMoveEffects:: @ 82D86A8
.4byte BattleScript_EffectHit
.4byte BattleScript_EffectSleep
diff --git a/data/bike.s b/data/bike.s
deleted file mode 100644
index ffb33e52b..000000000
--- a/data/bike.s
+++ /dev/null
@@ -1,58 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
- .align 2, 0
-
-gUnknown_0859744C:: @ 859744C
- .4byte sub_8119224
- .4byte sub_8119238
- .4byte sub_8119280
- .4byte sub_8119344
-
- .align 2
-gUnknown_0859745C:: @ 859745C
- .4byte PlayerGoSpeed0
- .4byte PlayerGoSpeed1
- .4byte PlayerGoSpeed3
-
- .align 2
-gUnknown_08597468:: @ 8597468
- .4byte sub_81197E4
- .4byte sub_81197F4
- .4byte sub_8119830
- .4byte sub_81198C0
- .4byte sub_81198FC
- .4byte sub_8119938
- .4byte sub_8119974
- .4byte sub_81199B0
- .4byte sub_8119A24
- .4byte sub_8119A94
- .4byte sub_8119AA4
- .4byte sub_8119B34
- .4byte sub_8119BC4
-
- .align 2
-gUnknown_0859749C:: @ 859749C
- .4byte CheckMovementInputAcroBikeNormal
- .4byte CheckMovementInputAcroBikeChangingDirection
- .4byte CheckMovementInputAcroBikeStandingWheelie
- .4byte CheckMovementInputAcroBikeBunnyHop
- .4byte CheckMovementInputAcroBikeMovingWheelie
- .4byte CheckMovementInputAcroBikeUnknownMode5
- .4byte CheckMovementInputAcroBikeUnknownMode6
-
- .align 2
-gUnknown_085974B8:: @ 85974B8
- .2byte 0x0001, 0x0002, 0x0004
-
- .align 1
-gUnknown_085974BE:: @ 85974BE
- .2byte 0x0004
-
- .align 2
-gUnknown_085974C0:: @ 85974C0
- .4byte 0x00000001, 0x00000002, 0x0000000f, 0x0000000f, gUnknown_085974BE, gUnknown_085974BE, 0x00000001
- .4byte 0x00000002, 0x00000002, 0x0000000f, 0x0000000f, gUnknown_085974BE, gUnknown_085974BE, 0x00000002
- .4byte 0x00000003, 0x00000002, 0x0000000f, 0x0000000f, gUnknown_085974BE, gUnknown_085974BE, 0x00000003
- .4byte 0x00000004, 0x00000002, 0x0000000f, 0x0000000f, gUnknown_085974BE, gUnknown_085974BE, 0x00000004
diff --git a/data/contest.s b/data/contest.s
index 970a5d9b8..4bb54bd00 100644
--- a/data/contest.s
+++ b/data/contest.s
@@ -12,7 +12,7 @@ gUnknown_08587A70:: @ 8587A70
.align 2
gUnknown_08587A74:: @ 8587A74
- obj_tiles gUnknown_08C19450, 0x0020, 0x4e20
+ obj_tiles gTiles_8C19450, 0x0020, 0x4e20
.align 2
gOamData_8587A7C:: @ 8587A7C
diff --git a/data/easy_chat.s b/data/easy_chat.s
index 09d33e660..edbb77f59 100644
--- a/data/easy_chat.s
+++ b/data/easy_chat.s
@@ -299,17 +299,17 @@ gUnknown_08597CA0:: @ 8597CA0
.align 2
gUnknown_08597CC0:: @ 8597CC0
obj_pal gUnknown_08597780, 0x0000
- obj_pal gUnknown_08DCB648, 0x0001
- obj_pal gUnknown_08DCB86C, 0x0002
+ obj_pal gEasyChatCursor_Pal, 0x0001
+ obj_pal gEasyChatRightWindow_Pal, 0x0002
obj_pal gUnknown_085979C0, 0x0003
null_obj_pal
.align 2
gUnknown_08597CE8:: @ 8597CE8
obj_tiles gUnknown_085979E0, 0x0800, 0x0005
- obj_tiles gUnknown_08DCB668, 0x1000, 0x0001
- obj_tiles gUnknown_08DCB88C, 0x0800, 0x0006
- obj_tiles gUnknown_08DCBAB0, 0x1000, 0x0004
+ 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
diff --git a/data/graphics.s b/data/graphics.s
index 278b0da1c..b16e30c8e 100644
--- a/data/graphics.s
+++ b/data/graphics.s
@@ -1,26 +1,33 @@
.section gfx_data, "aw", %progbits
+ .align 2
gBattleTextboxTiles:: @ 8C00000
- .incbin "baserom.gba", 0xc00000, 0x4e0
+ .incbin "graphics/interface/menu.4bpp.lz" @ menu window and arrows
+ .align 2
gBattleTextboxPalette:: @ 8C004E0
- .incbin "baserom.gba", 0xc004e0, 0x44
+ .incbin "graphics/interface/menu.gbapal.lz"
+ .align 2
gBattleTextboxTilemap:: @ 8C00524
- .incbin "baserom.gba", 0xc00524, 0x22c
+ .incbin "graphics/interface/menu_map.bin.lz"
@ 8C00750
.include "data/graphics/pokemon/circled_question_mark_graphics.inc"
@ 8C00C10
- .incbin "baserom.gba", 0xc00c10, 0xa34
+ .incbin "graphics/unused/old_charmap.4bpp.lz" @ japanese table and bunch of stuff
+ .incbin "graphics/unused/old_charmap.bin.lz"
+ .incbin "graphics/unused/old_charmap.gbapal.lz"
+
+ .align 2
+gSmokescreenImpactTiles:: @ 8C01644
+ .incbin "graphics/battle_anims/sprites/smokescreen_impact.4bpp.lz"
-gUnknown_08C01644:: @ 8C01644
- .incbin "baserom.gba", 0xc01644, 0xe0
+ .align 2
+gSmokescreenImpactPalette:: @ 8C01724
+ .incbin "graphics/battle_anims/sprites/smokescreen_impact.gbapal.lz"
-gUnknown_08C01724:: @ 8C01724
- .incbin "baserom.gba", 0xc01724, 0x18
-
.align 2
gInterfaceGfx_PokeBall::
.incbin "graphics/interface/ball/poke.4bpp.lz" @ 0xBC
@@ -47,11 +54,11 @@ gInterfacePal_SafariBall::
.align 2
gInterfaceGfx_UltraBall::
- .incbin "baserom.gba", 0xC019E0, 0xB4
+ .incbin "graphics/interface/ball/ultra.4bpp.lz" @ 0xBC
.align 2
gInterfacePal_UltraBall::
- .incbin "baserom.gba", 0xC01A94, 0x20
+ .incbin "graphics/interface/ball/ultra.gbapal.lz"
.align 2
gInterfaceGfx_MasterBall::
@@ -117,229 +124,2419 @@ gInterfaceGfx_PremierBall::
gInterfacePal_PremierBall::
.incbin "graphics/interface/ball/premier.gbapal.lz"
+ .align 2
gOpenPokeballGfx:: @ 8C02300
- .incbin "baserom.gba", 0xc02300, 0x7c
+ .incbin "graphics/interface/ball_open.4bpp.lz"
+ .align 2
gBlankGfxCompressed:: @ 8C0237C
- .incbin "baserom.gba", 0xc0237c, 0x7074
+ .incbin "graphics/interface/blank.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_146::
+ .incbin "graphics/battle_anims/sprites/146.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_000::
+ .incbin "graphics/battle_anims/sprites/000.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_003::
+ .incbin "graphics/battle_anims/sprites/003.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_004::
+ .incbin "graphics/battle_anims/sprites/004.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_005::
+ .incbin "graphics/battle_anims/sprites/005.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_006::
+ .incbin "graphics/battle_anims/sprites/006.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_115::
+ .incbin "graphics/battle_anims/sprites/115.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_000::
+ .incbin "graphics/battle_anims/sprites/000.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_003::
+ .incbin "graphics/battle_anims/sprites/003.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_004::
+ .incbin "graphics/battle_anims/sprites/004.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_005::
+ .incbin "graphics/battle_anims/sprites/005.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_006::
+ .incbin "graphics/battle_anims/sprites/006.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_161::
+ .incbin "graphics/battle_anims/sprites/161.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_161::
+ .incbin "graphics/battle_anims/sprites/161.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_007::
+ .incbin "graphics/battle_anims/sprites/007.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_007::
+ .incbin "graphics/battle_anims/sprites/007.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_008::
+ .incbin "graphics/battle_anims/sprites/008.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_008::
+ .incbin "graphics/battle_anims/sprites/008.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_010::
+ .incbin "graphics/battle_anims/sprites/010.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_010::
+ .incbin "graphics/battle_anims/sprites/010.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_009::
+ .incbin "graphics/battle_anims/sprites/009.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_009::
+ .incbin "graphics/battle_anims/sprites/009.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_011::
+ .incbin "graphics/battle_anims/sprites/011.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_011::
+ .incbin "graphics/battle_anims/sprites/011.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_012::
+ .incbin "graphics/battle_anims/sprites/012.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_012::
+ .incbin "graphics/battle_anims/sprites/012.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_152::
+ .incbin "graphics/battle_anims/sprites/152.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_152::
+ .incbin "graphics/battle_anims/sprites/152.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_013::
+ .incbin "graphics/battle_anims/sprites/013.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_013::
+ .incbin "graphics/battle_anims/sprites/013.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_015::
+ .incbin "graphics/battle_anims/sprites/015.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_015::
+ .incbin "graphics/battle_anims/sprites/015.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_016::
+ .incbin "graphics/battle_anims/sprites/016.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_016::
+ .incbin "graphics/battle_anims/sprites/016.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_017::
+ .incbin "graphics/battle_anims/sprites/017.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C035B8.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_019::
+ .incbin "graphics/battle_anims/sprites/019.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_019::
+ .incbin "graphics/battle_anims/sprites/019.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_020::
+ .incbin "graphics/battle_anims/sprites/020.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_020::
+ .incbin "graphics/battle_anims/sprites/020.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_023::
+ .incbin "graphics/battle_anims/sprites/023.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_023::
+ .incbin "graphics/battle_anims/sprites/023.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/battle_anim_023.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unused/music_notes.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_021::
+ .incbin "graphics/battle_anims/sprites/021.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_021::
+ .incbin "graphics/battle_anims/sprites/021.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_022::
+ .incbin "graphics/battle_anims/sprites/022.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_025::
+ .incbin "graphics/battle_anims/sprites/025.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_025::
+ .incbin "graphics/battle_anims/sprites/025.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_024::
+ .incbin "graphics/battle_anims/sprites/024.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_024::
+ .incbin "graphics/battle_anims/sprites/024.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_031::
+ .incbin "graphics/battle_anims/sprites/031.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_031::
+ .incbin "graphics/battle_anims/sprites/031.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_032::
+ .incbin "graphics/battle_anims/sprites/032.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_032::
+ .incbin "graphics/battle_anims/sprites/032.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_026::
+ .incbin "graphics/battle_anims/sprites/026.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_026::
+ .incbin "graphics/battle_anims/sprites/026.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_027::
+ .incbin "graphics/battle_anims/sprites/027.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_027::
+ .incbin "graphics/battle_anims/sprites/027.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_028::
+ .incbin "graphics/battle_anims/sprites/028.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_028::
+ .incbin "graphics/battle_anims/sprites/028.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_029::
+ .incbin "graphics/battle_anims/sprites/029.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_029::
+ .incbin "graphics/battle_anims/sprites/029.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_030::
+ .incbin "graphics/battle_anims/sprites/030.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_030::
+ .incbin "graphics/battle_anims/sprites/030.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_033::
+ .incbin "graphics/battle_anims/sprites/033.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_033::
+ .incbin "graphics/battle_anims/sprites/033.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_034::
+ .incbin "graphics/battle_anims/sprites/034.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_035::
+ .incbin "graphics/battle_anims/sprites/035.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_036::
+ .incbin "graphics/battle_anims/sprites/036.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_036::
+ .incbin "graphics/battle_anims/sprites/036.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_037::
+ .incbin "graphics/battle_anims/sprites/037.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C06D98.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C06D98.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C06D98_2.gbapal.lz"
+
+@ old battle interface data, unused
+
+ .align 2
+ .incbin "graphics/unused/obi1.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/obi_palpak1.gbapal.lz" @ palettes 1-3
+
+ .align 2
+ .incbin "graphics/unused/old_pal4.gbapal.lz" @ 4 is by itself
+
+ .align 2
+ .incbin "graphics/unused/obi_palpak3.gbapal.lz" @ palettes 5-7
+
+ .align 2
+ .incbin "graphics/unused/obi2.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/old_battle_interface_tilemap.bin.lz"
+
+ .align 2
+gBattleAnimSpritePalette_038::
+ .incbin "graphics/battle_anims/sprites/038.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_039::
+ .incbin "graphics/battle_anims/sprites/039.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_038::
+ .incbin "graphics/battle_anims/sprites/038.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_039::
+ .incbin "graphics/battle_anims/sprites/039.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_040::
+ .incbin "graphics/battle_anims/sprites/040.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_041::
+ .incbin "graphics/battle_anims/sprites/041.4bpp.lz"
+
+ @ why is this way up here?
+
+ .align 2
+gPartyMenuHpBar_Gfx::
+ .incbin "graphics/interface/party_menu_hpbar.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_042::
+ .incbin "graphics/battle_anims/sprites/042.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_042::
+ .incbin "graphics/battle_anims/sprites/042.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_043::
+ .incbin "graphics/battle_anims/sprites/043.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_043::
+ .incbin "graphics/battle_anims/sprites/043.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_044::
+ .incbin "graphics/battle_anims/sprites/044.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_044::
+ .incbin "graphics/battle_anims/sprites/044.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_045::
+ .incbin "graphics/battle_anims/sprites/045.gbapal.lz"
+ .align 2
+gBattleAnimSpriteSheet_045::
+ .incbin "graphics/battle_anims/sprites/045.4bpp.lz"
+
+ @ two unused window frames.
+
+ .align 2
+gUnknown_08C08F0C::
+ .incbin "graphics/battle_interface/unused_window.4bpp.lz"
+
+ .align 2
+gUnknown_08C093C8::
+ .incbin "graphics/battle_interface/unused_window.gbapal.lz"
+
+ .align 2
gUnknown_08C093F0:: @ 8C093F0
- .incbin "baserom.gba", 0xc093f0, 0x87ac
+ .incbin "graphics/interface/hp_numbers.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_046::
+ .incbin "graphics/battle_anims/sprites/046.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_046::
+ .incbin "graphics/battle_anims/sprites/046.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_047::
+ .incbin "graphics/battle_anims/sprites/047.gbapal.lz"
+
+ @ more unused windows
+ .align 2
+ .incbin "graphics/battle_interface/unused_window2.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/battle_interface/unused_window2bar.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_048::
+ .incbin "graphics/battle_anims/sprites/048.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_048::
+ .incbin "graphics/battle_anims/sprites/048.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_049::
+ .incbin "graphics/battle_anims/sprites/049.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_050::
+ .incbin "graphics/battle_anims/sprites/050.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_050::
+ .incbin "graphics/battle_anims/sprites/050.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_051::
+ .incbin "graphics/battle_anims/sprites/051.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_052::
+ .incbin "graphics/battle_anims/sprites/052.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/line_sketch.4bpp.lz" @ unused
+
+ .align 2
+ .incbin "graphics/unused/line_sketch.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_054::
+ .incbin "graphics/battle_anims/sprites/054.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_054::
+ .incbin "graphics/battle_anims/sprites/054.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_056::
+ .incbin "graphics/battle_anims/sprites/056.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_056::
+ .incbin "graphics/battle_anims/sprites/056.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_055::
+ .incbin "graphics/battle_anims/sprites/055.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_057::
+ .incbin "graphics/battle_anims/sprites/057.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_057::
+ .incbin "graphics/battle_anims/sprites/057.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_058::
+ .incbin "graphics/battle_anims/sprites/058.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_058::
+ .incbin "graphics/battle_anims/sprites/058.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_059::
+ .incbin "graphics/battle_anims/sprites/059.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_059::
+ .incbin "graphics/battle_anims/sprites/059.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_060::
+ .incbin "graphics/battle_anims/sprites/060.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_060::
+ .incbin "graphics/battle_anims/sprites/060.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_061::
+ .incbin "graphics/battle_anims/sprites/061.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_061::
+ .incbin "graphics/battle_anims/sprites/061.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_062::
+ .incbin "graphics/battle_anims/sprites/062.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_062::
+ .incbin "graphics/battle_anims/sprites/062.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_063::
+ .incbin "graphics/battle_anims/sprites/063.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_063::
+ .incbin "graphics/battle_anims/sprites/063.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unused/metronome_hand_small.4bpp.lz" @ unused, was for metronome at one point
+
+ .align 2
+gBattleAnimSpritePalette_091::
+ .incbin "graphics/battle_anims/sprites/091.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_065::
+ .incbin "graphics/battle_anims/sprites/065.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_065::
+ .incbin "graphics/battle_anims/sprites/065.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_066::
+ .incbin "graphics/battle_anims/sprites/066.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_066::
+ .incbin "graphics/battle_anims/sprites/066.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_070::
+ .incbin "graphics/battle_anims/sprites/070.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_070::
+ .incbin "graphics/battle_anims/sprites/070.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_071::
+ .incbin "graphics/battle_anims/sprites/071.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_072::
+ .incbin "graphics/battle_anims/sprites/072.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_072::
+ .incbin "graphics/battle_anims/sprites/072.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_073::
+ .incbin "graphics/battle_anims/sprites/073.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_073::
+ .incbin "graphics/battle_anims/sprites/073.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_075::
+ .incbin "graphics/battle_anims/sprites/075.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_075::
+ .incbin "graphics/battle_anims/sprites/075.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_078::
+ .incbin "graphics/battle_anims/sprites/078.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_078::
+ .incbin "graphics/battle_anims/sprites/078.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_079::
+ .incbin "graphics/battle_anims/sprites/079.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_080::
+ .incbin "graphics/battle_anims/sprites/080.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_080::
+ .incbin "graphics/battle_anims/sprites/080.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_081::
+ .incbin "graphics/battle_anims/sprites/081.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_081::
+ .incbin "graphics/battle_anims/sprites/081.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C0CA1C.bin"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C0CA40.bin"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C0CA64.bin"
+
+ .align 2
+ .incbin "graphics/unused/line_sketch_2.8bpp.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C0CAE0.bin"
+
+ .align 2
+ .incbin "graphics/unused/line_sketch_2.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_082::
+ .incbin "graphics/battle_anims/sprites/082.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_082::
+ .incbin "graphics/battle_anims/sprites/082.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_083::
+ .incbin "graphics/battle_anims/sprites/083.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_084::
+ .incbin "graphics/battle_anims/sprites/084.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_085::
+ .incbin "graphics/battle_anims/sprites/085.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_086::
+ .incbin "graphics/battle_anims/sprites/086.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_088::
+ .incbin "graphics/battle_anims/sprites/088.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_089::
+ .incbin "graphics/battle_anims/sprites/089.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_090::
+ .incbin "graphics/battle_anims/sprites/090.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_092::
+ .incbin "graphics/battle_anims/sprites/092.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_093::
+ .incbin "graphics/battle_anims/sprites/093.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_094::
+ .incbin "graphics/battle_anims/sprites/094.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_D0D2B4.bin.lz"
+
+ .align 2
+gBattleAnimSpritePalette_095::
+ .incbin "graphics/battle_anims/sprites/095.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_096::
+ .incbin "graphics/battle_anims/sprites/096.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_097::
+ .incbin "graphics/battle_anims/sprites/097.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_100::
+ .incbin "graphics/battle_anims/sprites/100.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_101::
+ .incbin "graphics/battle_anims/sprites/101.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_103::
+ .incbin "graphics/battle_anims/sprites/103.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_083::
+ .incbin "graphics/battle_anims/sprites/083.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_084::
+ .incbin "graphics/battle_anims/sprites/084.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_085::
+ .incbin "graphics/battle_anims/sprites/085.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_086::
+ .incbin "graphics/battle_anims/sprites/086.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_088::
+ .incbin "graphics/battle_anims/sprites/088.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_089::
+ .incbin "graphics/battle_anims/sprites/089.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_090::
+ .incbin "graphics/battle_anims/sprites/090.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_091::
+ .incbin "graphics/battle_anims/sprites/091.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_092::
+ .incbin "graphics/battle_anims/sprites/092.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_093::
+ .incbin "graphics/battle_anims/sprites/093.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_094::
+ .incbin "graphics/battle_anims/sprites/094.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_095::
+ .incbin "graphics/battle_anims/sprites/095.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_096::
+ .incbin "graphics/battle_anims/sprites/096.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_097::
+ .incbin "graphics/battle_anims/sprites/097.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_098::
+ .incbin "graphics/battle_anims/sprites/098.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_100::
+ .incbin "graphics/battle_anims/sprites/100.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_101::
+ .incbin "graphics/battle_anims/sprites/101.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_102::
+ .incbin "graphics/battle_anims/sprites/102.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_103::
+ .incbin "graphics/battle_anims/sprites/103.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_104::
+ .incbin "graphics/battle_anims/sprites/104.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_104::
+ .incbin "graphics/battle_anims/sprites/104.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_105::
+ .incbin "graphics/battle_anims/sprites/105.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_105::
+ .incbin "graphics/battle_anims/sprites/105.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_106::
+ .incbin "graphics/battle_anims/sprites/106.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_107::
+ .incbin "graphics/battle_anims/sprites/107.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_107::
+ .incbin "graphics/battle_anims/sprites/107.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_108::
+ .incbin "graphics/battle_anims/sprites/108.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_109::
+ .incbin "graphics/battle_anims/sprites/109.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_109::
+ .incbin "graphics/battle_anims/sprites/109.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_110::
+ .incbin "graphics/battle_anims/sprites/110.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_111::
+ .incbin "graphics/battle_anims/sprites/111.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_111::
+ .incbin "graphics/battle_anims/sprites/111.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_112::
+ .incbin "graphics/battle_anims/sprites/112.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_112::
+ .incbin "graphics/battle_anims/sprites/112.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_113::
+ .incbin "graphics/battle_anims/sprites/113.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_113::
+ .incbin "graphics/battle_anims/sprites/113.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_114::
+ .incbin "graphics/battle_anims/sprites/114.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_114::
+ .incbin "graphics/battle_anims/sprites/114.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unused/blue_frame.bin.lz" @ P1, P2, P3 and P4 tilemaps?
+
+ .align 2
+ .incbin "graphics/unused/redyellowgreen_frame.bin.lz"
+
+ .align 2
+ .incbin "graphics/unused/color_frames.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/color_frames.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_115::
+ .incbin "graphics/battle_anims/sprites/115.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/water_splash.8bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/water_splash.bin.lz"
+
+ .align 2
+ .incbin "graphics/unused/water_splash.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unused/basic_frame.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/basic_frame.gbapal.lz"
.align 2
+ .incbin "graphics/unused/basic_frame.bin.lz"
+
+ .align 2
gBattleInterface_BallStatusBarPal:: @ 8C11B9C
.incbin "graphics/battle_interface/ball_status_bar.gbapal"
- .align 2
+ .align 2
gBattleInterface_BallDisplayPal:: @ 8C11BBC
.incbin "graphics/battle_interface/ball_display.gbapal"
- .align 2
+ .align 2
gHealthboxElementsGfxTable:: @ 8C11BDC
- .incbin "baserom.gba", 0xc11bdc, 0x840
-
- .align 2
+ .incbin "graphics/battle_interface/hpbar.4bpp"
+ .incbin "graphics/battle_interface/expbar.4bpp"
+ .incbin "graphics/battle_interface/status_psn.4bpp"
+ .incbin "graphics/battle_interface/status_par.4bpp"
+ .incbin "graphics/battle_interface/status_slp.4bpp"
+ .incbin "graphics/battle_interface/status_frz.4bpp"
+ .incbin "graphics/battle_interface/status_brn.4bpp"
+ .incbin "graphics/battle_interface/misc.4bpp"
+ .incbin "graphics/battle_interface/hpbar_anim.4bpp"
+ .incbin "graphics/battle_interface/misc_frameend.4bpp"
+
+ .align 2
gBattleInterface_BallDisplayGfx:: @ 8C1241C
.incbin "graphics/battle_interface/ball_display.4bpp"
- .align 2
+ .align 2
gUnknown_08C1249C:: @ 8C1249C
- .incbin "baserom.gba", 0xc1249c, 0x49f4
+ .incbin "graphics/battle_interface/ball_display_unused_extra.4bpp"
+ .incbin "graphics/battle_interface/status2.4bpp" @ these three duplicate sets of graphics are for the opponent pokemon and are also for use in double battles. they use dynamic palettes so coloring them is an extreme headache and wont be done for now.
+ .incbin "graphics/battle_interface/status3.4bpp"
+ .incbin "graphics/battle_interface/status4.4bpp"
+ .incbin "graphics/unknown/unknown_D12FEC.4bpp"
+ .incbin "graphics/unknown/unknown_D1300C.4bpp"
+
+ @ even more seemingly unused windows. lovely.
+ .incbin "graphics/battle_interface/unused_window3.4bpp.lz"
+ .incbin "graphics/battle_interface/unused_window4.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_116::
+ .incbin "graphics/battle_anims/sprites/116.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_116::
+ .incbin "graphics/battle_anims/sprites/116.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_117::
+ .incbin "graphics/battle_anims/sprites/117.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_117::
+ .incbin "graphics/battle_anims/sprites/117.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_118::
+ .incbin "graphics/battle_anims/sprites/118.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_118::
+ .incbin "graphics/battle_anims/sprites/118.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_119::
+ .incbin "graphics/battle_anims/sprites/119.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_119::
+ .incbin "graphics/battle_anims/sprites/119.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_120::
+ .incbin "graphics/battle_anims/sprites/120.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_120::
+ .incbin "graphics/battle_anims/sprites/120.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_121::
+ .incbin "graphics/battle_anims/sprites/121.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_121::
+ .incbin "graphics/battle_anims/sprites/121.gbapal.lz"
+ .align 2
+gBattleAnimSpriteSheet_122::
+ .incbin "graphics/battle_anims/sprites/122.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_122::
+ .incbin "graphics/battle_anims/sprites/122.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_123::
+ .incbin "graphics/battle_anims/sprites/123.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_124::
+ .incbin "graphics/battle_anims/sprites/124.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_124::
+ .incbin "graphics/battle_anims/sprites/124.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_125::
+ .incbin "graphics/battle_anims/sprites/125.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_125::
+ .incbin "graphics/battle_anims/sprites/125.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_126::
+ .incbin "graphics/battle_anims/sprites/126.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_126::
+ .incbin "graphics/battle_anims/sprites/126.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_127::
+ .incbin "graphics/battle_anims/sprites/127.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_127::
+ .incbin "graphics/battle_anims/sprites/127.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_128::
+ .incbin "graphics/battle_anims/sprites/128.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_128::
+ .incbin "graphics/battle_anims/sprites/128.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_129::
+ .incbin "graphics/battle_anims/sprites/129.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_130::
+ .incbin "graphics/battle_anims/sprites/130.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_130::
+ .incbin "graphics/battle_anims/sprites/130.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_131::
+ .incbin "graphics/battle_anims/sprites/131.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_132::
+ .incbin "graphics/battle_anims/sprites/132.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_132::
+ .incbin "graphics/battle_anims/sprites/132.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_133::
+ .incbin "graphics/battle_anims/sprites/133.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_133::
+ .incbin "graphics/battle_anims/sprites/133.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_134::
+ .incbin "graphics/battle_anims/sprites/134.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_076::
+ .incbin "graphics/battle_anims/sprites/076.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_076::
+ .incbin "graphics/battle_anims/sprites/076.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_077::
+ .incbin "graphics/battle_anims/sprites/077.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/old_contest.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/old_contest.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unused/old_contest.bin.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C15BC0.bin.lz"
+
+ .align 2
+ .incbin "graphics/unused/old_contest_2.4bpp.lz"
+
+ .align 2
gUnknown_08C16E90:: @ 8C16E90
- .incbin "baserom.gba", 0xc16e90, 0x118
+ .incbin "graphics/unused/old_contest_2.gbapal.lz"
+ .align 2
gUnknown_08C16FA8:: @ 8C16FA8
- .incbin "baserom.gba", 0xc16fa8, 0x1c8
+ .incbin "graphics/unused/old_contest_2.bin.lz"
+ .align 2
gUnknown_08C17170:: @ 8C17170
- .incbin "baserom.gba", 0xc17170, 0x810
+ .incbin "graphics/unknown/unknown_C17170.bin.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C17410.bin.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_C1751C.bin.lz"
+ .align 2
gUnknown_08C17980:: @ 8C17980
- .incbin "baserom.gba", 0xc17980, 0x130
+ .incbin "graphics/unknown/unknown_C17980.bin.lz"
+ .align 2
gUnknown_08C17AB0:: @ 8C17AB0
- .incbin "baserom.gba", 0xc17ab0, 0xa5c
+ .incbin "graphics/contest/misc.4bpp.lz"
+ .align 2
gUnknown_08C1850C:: @ 8C1850C
- .incbin "baserom.gba", 0xc1850c, 0xc5c
+ .incbin "graphics/contest/audience.4bpp.lz"
-gUnknown_08C19168:: @ 8C19168
- .incbin "baserom.gba", 0xc19168, 0x11c
+ .align 2
+gUnknown_08C19168::
+ .incbin "graphics/contest/faces.4bpp.lz"
+
+ .align 2
+gContestJudgeSymbolsGfx::
+ .incbin "graphics/contest/judge_symbols.4bpp.lz"
+
+ .align 2
+gContest3Pal::
+ .incbin "graphics/contest/judge_symbols.gbapal.lz"
-gContestJudgeSymbolsGfx:: @ 8C19284
- .incbin "baserom.gba", 0xc19284, 0x1a4
+ .align 2
+gTiles_8C19450::
+ .incbin "graphics/contest/heart.4bpp"
-gContest3Pal:: @ 8C19428
- .incbin "baserom.gba", 0xc19428, 0x28
+ .align 2
+ .incbin "graphics/unknown/unknown_C19470.4bpp.lz"
-gUnknown_08C19450:: @ 8C19450
- .incbin "baserom.gba", 0xc19450, 0x138
+ .align 2
+ .incbin "graphics/unknown/unknown_C19470.gbapal.lz"
+ .align 2
gUnknown_08C19588:: @ 8C19588
- .incbin "baserom.gba", 0xc19588, 0x964
+ .incbin "graphics/contest/misc_2.4bpp.lz"
+ .align 2
gUnknown_08C19EEC:: @ 8C19EEC
- .incbin "baserom.gba", 0xc19eec, 0x114
+ .incbin "graphics/contest/misc_2_tilemap_1.bin.lz"
+ .align 2
gUnknown_08C1A000:: @ 8C1A000
- .incbin "baserom.gba", 0xc1a000, 0x12c
+ .incbin "graphics/contest/misc_2_tilemap_2.bin.lz"
+ .align 2
gUnknown_08C1A12C:: @ 8C1A12C
- .incbin "baserom.gba", 0xc1a12c, 0x188
+ .incbin "graphics/contest/misc_2_tilemap_3.bin.lz"
+ .align 2
gUnknown_08C1A2B4:: @ 8C1A2B4
- .incbin "baserom.gba", 0xc1a2b4, 0x1DC
+ .incbin "graphics/contest/misc_2.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_135::
+ .incbin "graphics/battle_anims/sprites/135.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_135::
+ .incbin "graphics/battle_anims/sprites/135.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_Particles::
+ .incbin "graphics/battle_anims/sprites/particles.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_136::
+ .incbin "graphics/battle_anims/sprites/136.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_136::
+ .incbin "graphics/battle_anims/sprites/136.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_137::
+ .incbin "graphics/battle_anims/sprites/137.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_139::
+ .incbin "graphics/battle_anims/sprites/139.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_139::
+ .incbin "graphics/battle_anims/sprites/139.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_145::
+ .incbin "graphics/battle_anims/sprites/145.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_138::
+ .incbin "graphics/battle_anims/sprites/138.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_140::
+ .incbin "graphics/battle_anims/sprites/140.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_140::
+ .incbin "graphics/battle_anims/sprites/140.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_141::
+ .incbin "graphics/battle_anims/sprites/141.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_141::
+ .incbin "graphics/battle_anims/sprites/141.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_142::
+ .incbin "graphics/battle_anims/sprites/142.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/old_beatup.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/old_beatup.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_147::
+ .incbin "graphics/battle_anims/sprites/147.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_147::
+ .incbin "graphics/battle_anims/sprites/147.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_149::
+ .incbin "graphics/battle_anims/sprites/149.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_148::
+ .incbin "graphics/battle_anims/sprites/148.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_148::
+ .incbin "graphics/battle_anims/sprites/148.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_259::
+ .incbin "graphics/battle_anims/sprites/259.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_074::
+ .incbin "graphics/battle_anims/sprites/074.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_074::
+ .incbin "graphics/battle_anims/sprites/074.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_150::
+ .incbin "graphics/battle_anims/sprites/150.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_150::
+ .incbin "graphics/battle_anims/sprites/150.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_151::
+ .incbin "graphics/battle_anims/sprites/151.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_153::
+ .incbin "graphics/battle_anims/sprites/153.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_153::
+ .incbin "graphics/battle_anims/sprites/153.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_154::
+ .incbin "graphics/battle_anims/sprites/154.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_154::
+ .incbin "graphics/battle_anims/sprites/154.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_155::
+ .incbin "graphics/battle_anims/sprites/155.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_155::
+ .incbin "graphics/battle_anims/sprites/155.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_156::
+ .incbin "graphics/battle_anims/sprites/156.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_156::
+ .incbin "graphics/battle_anims/sprites/156.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_157::
+ .incbin "graphics/battle_anims/sprites/157.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_157::
+ .incbin "graphics/battle_anims/sprites/157.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_158::
+ .incbin "graphics/battle_anims/sprites/158.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_158::
+ .incbin "graphics/battle_anims/sprites/158.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_159::
+ .incbin "graphics/battle_anims/sprites/159.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_159::
+ .incbin "graphics/battle_anims/sprites/159.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_160::
+ .incbin "graphics/battle_anims/sprites/160.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_160::
+ .incbin "graphics/battle_anims/sprites/160.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_144::
+ .incbin "graphics/battle_anims/sprites/144.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_144::
+ .incbin "graphics/battle_anims/sprites/144.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_D1C060.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_D1C060.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_D1C060.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_162::
+ .incbin "graphics/battle_anims/sprites/162.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_162::
+ .incbin "graphics/battle_anims/sprites/162.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_163::
+ .incbin "graphics/battle_anims/sprites/163.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_163::
+ .incbin "graphics/battle_anims/sprites/163.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_288::
+ .incbin "graphics/battle_anims/sprites/288.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_164::
+ .incbin "graphics/battle_anims/sprites/164.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_165::
+ .incbin "graphics/battle_anims/sprites/165.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_166::
+ .incbin "graphics/battle_anims/sprites/166.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_166::
+ .incbin "graphics/battle_anims/sprites/166.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_167::
+ .incbin "graphics/battle_anims/sprites/167.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_168::
+ .incbin "graphics/battle_anims/sprites/168.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_169::
+ .incbin "graphics/battle_anims/sprites/169.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_170::
+ .incbin "graphics/battle_anims/sprites/170.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_171::
+ .incbin "graphics/battle_anims/sprites/171.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_171::
+ .incbin "graphics/battle_anims/sprites/171.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_172::
+ .incbin "graphics/battle_anims/sprites/172.gbapal.lz"
+
+ .align 2
+gContestJudgeGfx::
+ .incbin "graphics/contest/judge.4bpp.lz"
+
+ .align 2
+gContest2Pal:: @ 8C1C6B8
+ .incbin "graphics/contest/judge.gbapal.lz"
-gUnknown_08C1A490:: @ 8C1A490
- .incbin "baserom.gba", 0xc1a490, 0xD4
+ .align 2
+gBattleAnimSpriteSheet_001::
+ .incbin "graphics/battle_anims/sprites/001.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_001::
+ .incbin "graphics/battle_anims/sprites/001.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_173::
+ .incbin "graphics/battle_anims/sprites/173.4bpp.lz"
-gUnknown_08C1A564:: @ 8C1A564
- .incbin "baserom.gba", 0xc1a564, 0x1E80
+ .align 2
+gBattleAnimBackgroundImage_00::
+ .incbin "graphics/battle_anims/backgrounds/00.4bpp.lz"
-gContestJudgeGfx:: @ 8C1C3E4
- .incbin "baserom.gba", 0xc1c3e4, 0x2d4
+ .align 2
+gBattleAnimBackgroundPalette_00::
+ .incbin "graphics/battle_anims/backgrounds/00.gbapal.lz"
-gUnknown_08C1C6B8:: @ 8C1C6B8
- .incbin "baserom.gba", 0xc1c6b8, 0x9f4
+ .align 2
+gBattleAnimBackgroundTilemap_00::
+ .incbin "graphics/battle_anims/backgrounds/00.bin.lz"
+ .align 2
gUnknown_08C1D0AC:: @ 8C1D0AC
- .incbin "baserom.gba", 0xc1d0ac, 0x13c
+ .incbin "graphics/battle_anims/masks/metal_shine.4bpp.lz"
+ .align 2
gUnknown_08C1D1E8:: @ 8C1D1E8
- .incbin "baserom.gba", 0xc1d1e8, 0x28
+ .incbin "graphics/battle_anims/masks/metal_shine.gbapal.lz"
+ .align 2
gUnknown_08C1D210:: @ 8C1D210
- .incbin "baserom.gba", 0xc1d210, 0x1fb8
+ .incbin "graphics/battle_anims/masks/metal_shine.bin.lz"
+
+ .align 2
+ .incbin "graphics/unused/goosuto.4bpp.lz" @ ghost
+
+ .align 2
+ .incbin "graphics/unused/goosuto.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unused/goosuto.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_174::
+ .incbin "graphics/battle_anims/sprites/174.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_174::
+ .incbin "graphics/battle_anims/sprites/174.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_175::
+ .incbin "graphics/battle_anims/sprites/175.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_175::
+ .incbin "graphics/battle_anims/sprites/175.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_176::
+ .incbin "graphics/battle_anims/sprites/176.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_176::
+ .incbin "graphics/battle_anims/sprites/176.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_177::
+ .incbin "graphics/battle_anims/sprites/177.4bpp.lz"
+ .align 2
+gBattleAnimSpritePalette_177::
+ .incbin "graphics/battle_anims/sprites/177.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_178::
+ .incbin "graphics/battle_anims/sprites/178.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_178::
+ .incbin "graphics/battle_anims/sprites/178.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_179::
+ .incbin "graphics/battle_anims/sprites/179.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_179::
+ .incbin "graphics/battle_anims/sprites/179.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_180::
+ .incbin "graphics/battle_anims/sprites/180.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_181::
+ .incbin "graphics/battle_anims/sprites/181.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_182::
+ .incbin "graphics/battle_anims/sprites/182.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_182::
+ .incbin "graphics/battle_anims/sprites/182.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_183::
+ .incbin "graphics/battle_anims/sprites/183.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_183::
+ .incbin "graphics/battle_anims/sprites/183.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_184::
+ .incbin "graphics/battle_anims/sprites/184.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_184::
+ .incbin "graphics/battle_anims/sprites/184.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_185::
+ .incbin "graphics/battle_anims/sprites/185.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_185::
+ .incbin "graphics/battle_anims/sprites/185.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_03::
+ .incbin "graphics/battle_anims/backgrounds/03.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_03::
+ .incbin "graphics/battle_anims/backgrounds/03.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_03::
+ .incbin "graphics/battle_anims/backgrounds/03.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_187::
+ .incbin "graphics/battle_anims/sprites/187.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_187::
+ .incbin "graphics/battle_anims/sprites/187.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_186::
+ .incbin "graphics/battle_anims/sprites/186.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_186::
+ .incbin "graphics/battle_anims/sprites/186.gbapal.lz"
+
+ .align 2
gUnknown_08C1F1C8:: @ 8C1F1C8
- .incbin "baserom.gba", 0xc1f1c8, 0x2a4
+ .incbin "graphics/battle_interface/window.4bpp.lz"
+ .align 2
gUnknown_08C1F46C:: @ 8C1F46C
- .incbin "baserom.gba", 0xc1f46c, 0x17c
+ .incbin "graphics/battle_interface/window2.4bpp.lz"
+ .align 2
gUnknown_08C1F5E8:: @ 8C1F5E8
- .incbin "baserom.gba", 0xc1f5e8, 0x184
+ .incbin "graphics/battle_interface/window3.4bpp.lz"
+ .align 2
gUnknown_08C1F76C:: @ 8C1F76C
- .incbin "baserom.gba", 0xc1f76c, 0x17c
+ .incbin "graphics/battle_interface/window4.4bpp.lz"
+ .align 2
gUnknown_08C1F8E8:: @ 8C1F8E8
- .incbin "baserom.gba", 0xc1f8e8, 0xd80
+ .incbin "graphics/battle_interface/window5.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/shadow.4bpp.lz"
+
+ .align 2
+ .incbin "graphics/unused/shadow.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_014::
+ .incbin "graphics/battle_anims/sprites/014.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_014::
+ .incbin "graphics/battle_anims/sprites/014.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_190::
+ .incbin "graphics/battle_anims/sprites/190.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_190::
+ .incbin "graphics/battle_anims/sprites/190.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_191::
+ .incbin "graphics/battle_anims/sprites/191.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_191::
+ .incbin "graphics/battle_anims/sprites/191.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_189::
+ .incbin "graphics/battle_anims/sprites/189.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_189::
+ .incbin "graphics/battle_anims/sprites/189.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_192::
+ .incbin "graphics/battle_anims/sprites/192.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_192::
+ .incbin "graphics/battle_anims/sprites/192.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_193::
+ .incbin "graphics/battle_anims/sprites/193.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_193::
+ .incbin "graphics/battle_anims/sprites/193.gbapal.lz"
+ .align 2
gUnknown_08C20668:: @ 8C20668
- .incbin "baserom.gba", 0xc20668, 0x1c
+ .incbin "graphics/battle_anims/masks/curse.4bpp.lz"
+ .align 2
gUnknown_08C20684:: @ 8C20684
- .incbin "baserom.gba", 0xc20684, 0x1f8c
+ .incbin "graphics/battle_anims/masks/curse.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_002:: @ 8D20B30
+ .incbin "graphics/battle_anims/sprites/002.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_002:: @ 8D20C14
+ .incbin "graphics/battle_anims/sprites/002.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_196:: @ 8D20C3C
+ .incbin "graphics/battle_anims/sprites/196.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_196:: @ 8D20FE0
+ .incbin "graphics/battle_anims/sprites/196.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_194:: @ 8D20FF8
+ .incbin "graphics/battle_anims/sprites/194.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_194:: @ 8D21330
+ .incbin "graphics/battle_anims/sprites/194.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_195:: @ 8D21358
+ .incbin "graphics/battle_anims/sprites/195.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_195:: @ 8D21410
+ .incbin "graphics/battle_anims/sprites/195.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_197:: @ 8D21430
+ .incbin "graphics/battle_anims/sprites/197.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_197:: @ 8D215A0
+ .incbin "graphics/battle_anims/sprites/197.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_198:: @ 8D215C8
+ .incbin "graphics/battle_anims/sprites/198.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_198:: @ 8D219B8
+ .incbin "graphics/battle_anims/sprites/198.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_199:: @ 8D219E0
+ .incbin "graphics/battle_anims/sprites/199.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_199:: @ 8D21AA8
+ .incbin "graphics/battle_anims/sprites/199.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_200:: @ 8D21AC4
+ .incbin "graphics/battle_anims/sprites/200.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_200:: @ 8D21C04
+ .incbin "graphics/battle_anims/sprites/200.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_201:: @ 8D21C20
+ .incbin "graphics/battle_anims/sprites/201.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_201:: @ 8D22290
+ .incbin "graphics/battle_anims/sprites/201.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_204:: @ 8D222B8
+ .incbin "graphics/battle_anims/sprites/204.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_204:: @ 8D2242C
+ .incbin "graphics/battle_anims/sprites/204.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_202:: @ 8D22454
+ .incbin "graphics/battle_anims/sprites/202.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_202:: @ 8D225BC
+ .incbin "graphics/battle_anims/sprites/202.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_203:: @ 8D225E0
+ .incbin "graphics/battle_anims/sprites/203.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_203:: @ 8D2278C
+ .incbin "graphics/battle_anims/sprites/203.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_206:: @ 8D227B0
+ .incbin "graphics/battle_anims/sprites/206.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_206:: @ 8D229BC
+ .incbin "graphics/battle_anims/sprites/206.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_205:: @ 8D22A50
+ .incbin "graphics/battle_anims/sprites/205.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_205:: @ 8D22C84
+ .incbin "graphics/battle_anims/sprites/205.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_207:: @ 8D22CA8
+ .incbin "graphics/battle_anims/sprites/207.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_207:: @ 8D22D74
+ .incbin "graphics/battle_anims/sprites/207.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_208:: @ 8D22D98
+ .incbin "graphics/battle_anims/sprites/208.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_209:: @ 8D23188
+ .incbin "graphics/battle_anims/sprites/209.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_209:: @ 8D23490
+ .incbin "graphics/battle_anims/sprites/209.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_064:: @ 8D234B0
+ .incbin "graphics/battle_anims/sprites/064.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_064:: @ 8D235A0
+ .incbin "graphics/battle_anims/sprites/064.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_210:: @ 8D235C4
+ .incbin "graphics/battle_anims/sprites/210.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_219:: @ 8D2362C
+ .incbin "graphics/battle_anims/sprites/219.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_210:: @ 8D2364C
+ .incbin "graphics/battle_anims/sprites/210.gbapal.lz"
-gUnknown_08C22610:: @ 8C22610
- .incbin "baserom.gba", 0xc22610, 0xcd0
+ .align 2
+gBattleAnimSpritePalette_216:: @ 8D2366C
+ .incbin "graphics/battle_anims/sprites/216.gbapal.lz"
+ .align 2
gUnknown_08C232E0:: @ 8C232E0
- .incbin "baserom.gba", 0xc232e0, 0xa70
+ .incbin "graphics/battle_anims/backgrounds/attract.4bpp.lz"
+ .align 2
gUnknown_08C23D50:: @ 8C23D50
- .incbin "baserom.gba", 0xc23d50, 0x28
+ .incbin "graphics/battle_anims/backgrounds/attract.gbapal.lz"
+ .align 2
gUnknown_08C23D78:: @ 8C23D78
- .incbin "baserom.gba", 0xc23d78, 0xc58
+ .incbin "graphics/battle_anims/backgrounds/attract.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_217:: @ 8D243A0
+ .incbin "graphics/battle_anims/sprites/217.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_217:: @ 8D24408
+ .incbin "graphics/battle_anims/sprites/217.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_212:: @ 8D24428
+ .incbin "graphics/battle_anims/sprites/212.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_211:: @ 8D2465C
+ .incbin "graphics/battle_anims/sprites/211.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_213:: @ 8D246AC
+ .incbin "graphics/battle_anims/sprites/213.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_211:: @ 8D24918
+ .incbin "graphics/battle_anims/sprites/211.gbapal.lz"
+ .align 2
+gBattleAnimSpriteSheet_214:: @ 8D2493C
+ .incbin "graphics/battle_anims/sprites/214.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_215:: @ 8D24BCC
+ .incbin "graphics/battle_anims/sprites/215.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_215:: @ 8D24D58
+ .incbin "graphics/battle_anims/sprites/215.gbapal.lz"
+
+ .align 2
gUnknown_08C249D0:: @ 8C249D0
- .incbin "baserom.gba", 0xc249d0, 0x28
+ .incbin "graphics/battle_anims/backgrounds/scary_face.gbapal.lz"
+ .align 2
gUnknown_08C249F8:: @ 8C249F8
- .incbin "baserom.gba", 0xc249f8, 0x5c3c
+ .incbin "graphics/battle_anims/backgrounds/scary_face.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_218:: @ 8D24FD4
+ .incbin "graphics/battle_anims/sprites/218.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_218:: @ 8D24FFC
+ .incbin "graphics/battle_anims/sprites/218.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_087:: @ 8D250A8
+ .incbin "graphics/battle_anims/sprites/087.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_087:: @ 8D25100
+ .incbin "graphics/battle_anims/sprites/087.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_018:: @ 8D25128
+ .incbin "graphics/battle_anims/sprites/018.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_018:: @ 8D25164
+ .incbin "graphics/battle_anims/sprites/018.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_220:: @ 8D25180
+ .incbin "graphics/battle_anims/sprites/220.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_220:: @ 8D251A8
+ .incbin "graphics/battle_anims/sprites/220.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_221:: @ 8D252D4
+ .incbin "graphics/battle_anims/sprites/221.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_221:: @ 8D252F4
+ .incbin "graphics/battle_anims/sprites/221.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_222:: @ 8D25558
+ .incbin "graphics/battle_anims/sprites/222.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_222:: @ 8D25844
+ .incbin "graphics/battle_anims/sprites/222.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_223:: @ 8D2586C
+ .incbin "graphics/battle_anims/sprites/223.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_223:: @ 8D2588C
+ .incbin "graphics/battle_anims/sprites/223.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_224:: @ 8D25B20
+ .incbin "graphics/battle_anims/sprites/224.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_224:: @ 8D25B40
+ .incbin "graphics/battle_anims/sprites/224.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_230:: @ 8D25C3C
+ .incbin "graphics/battle_anims/sprites/230.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_230:: @ 8D25C64
+ .incbin "graphics/battle_anims/sprites/230.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_228:: @ 8D25EA8
+ .incbin "graphics/battle_anims/sprites/228.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_228:: @ 8D25EC8
+ .incbin "graphics/battle_anims/sprites/228.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_04:: @ 8D25F70
+ .incbin "graphics/battle_anims/backgrounds/04.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_04:: @ 8D25F98
+ .incbin "graphics/battle_anims/backgrounds/04.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_04:: @ 8D26D04
+ .incbin "graphics/battle_anims/backgrounds/04.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_05:: @ 8D27200
+ .incbin "graphics/battle_anims/backgrounds/05.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_06:: @ 8D276D0
+ .incbin "graphics/battle_anims/backgrounds/06.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_225:: @ 8D27B10
+ .incbin "graphics/battle_anims/sprites/225.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_225:: @ 8D27C94
+ .incbin "graphics/battle_anims/sprites/225.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_227:: @ 8D27CBC
+ .incbin "graphics/battle_anims/sprites/227.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_226:: @ 8D27E04
+ .incbin "graphics/battle_anims/sprites/226.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_226:: @ 8D27E90
+ .incbin "graphics/battle_anims/sprites/226.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_229:: @ 8D27EB4
+ .incbin "graphics/battle_anims/sprites/229.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_229:: @ 8D28070
+ .incbin "graphics/battle_anims/sprites/229.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_099:: @ 8D28098
+ .incbin "graphics/battle_anims/sprites/099.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_099:: @ 8D281B8
+ .incbin "graphics/battle_anims/sprites/099.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_232:: @ 8D281E0
+ .incbin "graphics/battle_anims/sprites/232.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_231:: @ 8D28718
+ .incbin "graphics/battle_anims/sprites/231.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_231:: @ 8D28740
+ .incbin "graphics/battle_anims/sprites/231.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_233:: @ 8D28910
+ .incbin "graphics/battle_anims/sprites/233.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_233:: @ 8D28994
+ .incbin "graphics/battle_anims/sprites/233.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_234:: @ 8D289BC
+ .incbin "graphics/battle_anims/sprites/234.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_234:: @ 8D28B7C
+ .incbin "graphics/battle_anims/sprites/234.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_238:: @ 8D28BA0
+ .incbin "graphics/battle_anims/sprites/238.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_238:: @ 8D28C08
+ .incbin "graphics/battle_anims/sprites/238.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_235:: @ 8D28C2C
+ .incbin "graphics/battle_anims/sprites/235.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_235:: @ 8D28C7C
+ .incbin "graphics/battle_anims/sprites/235.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_236:: @ 8D28C98
+ .incbin "graphics/battle_anims/sprites/236.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_237:: @ 8D28CB4
+ .incbin "graphics/battle_anims/sprites/237.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_07:: @ 8D28CD0
+ .incbin "graphics/battle_anims/backgrounds/07.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_07:: @ 8D28E78
+ .incbin "graphics/battle_anims/backgrounds/07.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_18:: @ 8D28EA0
+ .incbin "graphics/battle_anims/backgrounds/18.gbapal.lz"
+ .align 2
+gBattleAnimBackgroundTilemap_07:: @ 8D28EC8
+ .incbin "graphics/battle_anims/backgrounds/07.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_08:: @ 8D29058
+ .incbin "graphics/battle_anims/backgrounds/08.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_20:: @ 8D291E4
+ .incbin "graphics/battle_anims/backgrounds/20.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_20:: @ 8D29C0C
+ .incbin "graphics/battle_anims/backgrounds/20.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_20:: @ 8D29C2C
+ .incbin "graphics/battle_anims/backgrounds/20.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_09:: @ 8D29E30
+ .incbin "graphics/battle_anims/backgrounds/09.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_09:: @ 8D2A128
+ .incbin "graphics/battle_anims/backgrounds/09.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_22:: @ 8D2A148
+ .incbin "graphics/battle_anims/backgrounds/22.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_09:: @ 8D2A168
+ .incbin "graphics/battle_anims/backgrounds/09.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_10:: @ 8D2A6E8
+ .incbin "graphics/battle_anims/backgrounds/10.bin.lz"
+
+ .align 2
gUnknown_08C2A634:: @ 8C2A634
- .incbin "baserom.gba", 0xc2a634, 0xa0
+ .incbin "graphics/battle_anims/masks/morning_sun.4bpp.lz"
+ .align 2
gUnknown_08C2A6D4:: @ 8C2A6D4
- .incbin "baserom.gba", 0xc2a6d4, 0x18
+ .incbin "graphics/battle_anims/masks/morning_sun.gbapal.lz"
+ .align 2
gUnknown_08C2A6EC:: @ 8C2A6EC
- .incbin "baserom.gba", 0xc2a6ec, 0x27d0
+ .incbin "graphics/battle_anims/masks/morning_sun.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_12:: @ 8D2ABB4
+ .incbin "graphics/battle_anims/backgrounds/12.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_13:: @ 8D2AE7C
+ .incbin "graphics/battle_anims/backgrounds/13.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_14:: @ 8D2B178
+ .incbin "graphics/battle_anims/backgrounds/14.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_12:: @ 8D2B408
+ .incbin "graphics/battle_anims/backgrounds/12.4bpp.lz"
+ .align 2
+gBattleAnimBackgroundPalette_12:: @ 8D2C170
+ .incbin "graphics/battle_anims/backgrounds/12.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_11:: @ 8D2C190
+ .incbin "graphics/battle_anims/backgrounds/11.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_11:: @ 8D2CB2C
+ .incbin "graphics/battle_anims/backgrounds/11.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_11:: @ 8D2CB54
+ .incbin "graphics/battle_anims/backgrounds/11.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_239:: @ 8D2CE4C
+ .incbin "graphics/battle_anims/sprites/239.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_239:: @ 8D2CF30
+ .incbin "graphics/battle_anims/sprites/239.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_143:: @ 8D2CF58
+ .incbin "graphics/battle_anims/sprites/143.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_143:: @ 8D2D188
+ .incbin "graphics/battle_anims/sprites/143.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_240:: @ 8D2D1A0
+ .incbin "graphics/battle_anims/sprites/240.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_240:: @ 8D2D240
+ .incbin "graphics/battle_anims/sprites/240.gbapal.lz"
+
+ .align 2
gSubstituteDollPal:: @ 8C2CEBC
- .incbin "baserom.gba", 0xc2cebc, 0x24
+ .incbin "graphics/battle_anims/sprites/substitute.gbapal.lz"
+ .align 2
gSubstituteDollGfx:: @ 8C2CEE0
- .incbin "baserom.gba", 0xc2cee0, 0x240
+ .incbin "graphics/battle_anims/sprites/substitute.4bpp.lz"
+ .align 2
gSubstituteDollTilemap:: @ 8C2D120
- .incbin "baserom.gba", 0xc2d120, 552
-
+ .incbin "graphics/battle_anims/sprites/substitute.bin.lz"
+
+ .align 2
gUnknown_08C2D348:: @ 8C2D348
- .incbin "baserom.gba", 0xC2D348, 196
-
+ .incbin "graphics/battle_anims/sprites/241.4bpp.lz"
+
+ .align 2
gUnknown_08C2D40C:: @ 8C2D40C
- .incbin "baserom.gba", 0xC2D40C, 28
-
+ .incbin "graphics/battle_anims/sprites/241.gbapal.lz"
+
+ .align 2
gContestConfetti_Gfx:: @ 8C2D428
- .incbin "baserom.gba", 0xC2D428, 288
-
+ .incbin "graphics/misc/confetti.4bpp.lz"
+
+ .align 2
gContestConfetti_Pal:: @ 8C2D548
- .incbin "baserom.gba", 0xC2D548, 40
-
+ .incbin "graphics/misc/confetti.gbapal.lz"
+
+ .align 2
gUnknown_08C2D570:: @ 8C2D570
- .incbin "baserom.gba", 0xC2D570, 316
-
+ .incbin "graphics/battle_anims/sprites/242.4bpp.lz"
+
+ .align 2
gUnknown_08C2D6AC:: @ 8C2D6AC
- .incbin "baserom.gba", 0xC2D6AC, 36
-
+ .incbin "graphics/battle_anims/sprites/242.gbapal.lz"
+
+ .align 2
gUnknown_08C2D6D0:: @ 8C2D6D0
- .incbin "baserom.gba", 0xC2D6D0, 40
-
+ .incbin "graphics/battle_anims/sprites/243.4bpp.lz"
+
+ .align 2
gUnknown_08C2D6F8:: @ 8C2D6F8
- .incbin "baserom.gba", 0xC2D6F8, 40
+ .incbin "graphics/battle_anims/sprites/243.gbapal.lz"
+ .align 2
gUnknown_08C2D720:: @ 8C2D720
- .incbin "baserom.gba", 0xc2d720, 0x210
+ .incbin "graphics/battle_anims/masks/stat.4bpp.lz"
+ .align 2
gUnknown_08C2D930:: @ 8C2D930
- .incbin "baserom.gba", 0xc2d930, 0x11c
+ .incbin "graphics/battle_anims/masks/stat_tilemap_1.bin.lz"
+ .align 2
gUnknown_08C2DA4C:: @ 8C2DA4C
- .incbin "baserom.gba", 0xc2da4c, 0x11c
+ .incbin "graphics/battle_anims/masks/stat_tilemap_2.bin.lz"
+ .align 2
gUnknown_08C2DB68:: @ 8C2DB68
- .incbin "baserom.gba", 0xc2db68, 0x20
+ .incbin "graphics/battle_anims/masks/stat1.gbapal.lz"
+ .align 2
gUnknown_08C2DB88:: @ 8C2DB88
- .incbin "baserom.gba", 0xc2db88, 0x20
+ .incbin "graphics/battle_anims/masks/stat2.gbapal.lz"
+ .align 2
gUnknown_08C2DBA8:: @ 8C2DBA8
- .incbin "baserom.gba", 0xc2dba8, 0x20
+ .incbin "graphics/battle_anims/masks/stat3.gbapal.lz"
+ .align 2
gUnknown_08C2DBC8:: @ 8C2DBC8
- .incbin "baserom.gba", 0xc2dbc8, 0x20
+ .incbin "graphics/battle_anims/masks/stat4.gbapal.lz"
+ .align 2
gUnknown_08C2DBE8:: @ 8C2DBE8
- .incbin "baserom.gba", 0xc2dbe8, 0x20
+ .incbin "graphics/battle_anims/masks/stat5.gbapal.lz"
+ .align 2
gUnknown_08C2DC08:: @ 8C2DC08
- .incbin "baserom.gba", 0xc2dc08, 0x20
+ .incbin "graphics/battle_anims/masks/stat6.gbapal.lz"
+ .align 2
gUnknown_08C2DC28:: @ 8C2DC28
- .incbin "baserom.gba", 0xc2dc28, 0x20
+ .incbin "graphics/battle_anims/masks/stat7.gbapal.lz"
+ .align 2
gUnknown_08C2DC48:: @ 8C2DC48
- .incbin "baserom.gba", 0xc2dc48, 0x20
+ .incbin "graphics/battle_anims/masks/stat8.gbapal.lz"
+ .align 2
gUnknown_08C2DC68:: @ 8C2DC68
- .incbin "baserom.gba", 0xc2dc68, 0x13c
+ .incbin "graphics/battle_anims/masks/cure_bubbles.4bpp.lz"
+ .align 2
gUnknown_08C2DDA4:: @ 8C2DDA4
- .incbin "baserom.gba", 0xc2dda4, 0x20
+ .incbin "graphics/battle_anims/masks/cure_bubbles.gbapal.lz"
+ .align 2
gUnknown_08C2DDC4:: @ 8C2DDC4
- .incbin "baserom.gba", 0xc2ddc4, 0xc8c
+ .incbin "graphics/battle_anims/masks/cure_bubbles.bin.lz"
+
+ .align 2
+gBattleAnimSpritePalette_245:: @ 8D2E28C
+ .incbin "graphics/battle_anims/sprites/245.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_245:: @ 8D2E2B4
+ .incbin "graphics/battle_anims/sprites/245.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_246:: @ 8D2E458
+ .incbin "graphics/battle_anims/sprites/246.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_244:: @ 8D2E900
+ .incbin "graphics/battle_anims/sprites/244.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_244:: @ 8D2E9DC
+ .incbin "graphics/battle_anims/sprites/244.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_247:: @ 8D2E9F8
+ .incbin "graphics/battle_anims/sprites/247.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_053:: @ 8D2EBDC
+ .incbin "graphics/battle_anims/sprites/053.4bpp.lz"
+ .align 2
gUnknown_08C2EA50:: @ 8C2EA50
- .incbin "baserom.gba", 0xc2ea50, 0x4c
+ .incbin "graphics/battle_anims/masks/unknown_C2EA50.4bpp.lz"
+ .align 2
gUnknown_08C2EA9C:: @ 8C2EA9C
- .incbin "baserom.gba", 0xc2ea9c, 0xf6c
+ .incbin "graphics/battle_anims/masks/unknown_C2EA50.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_248:: @ 8D2EF50
+ .incbin "graphics/battle_anims/sprites/248.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_248:: @ 8D2EF68
+ .incbin "graphics/battle_anims/sprites/248.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_249:: @ 8D2EF80
+ .incbin "graphics/battle_anims/sprites/249.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_249:: @ 8D2EFD0
+ .incbin "graphics/battle_anims/sprites/249.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_250:: @ 8D2EFF0
+ .incbin "graphics/battle_anims/sprites/250.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_251:: @ 8D2F1E4
+ .incbin "graphics/battle_anims/sprites/251.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_251:: @ 8D2F248
+ .incbin "graphics/battle_anims/sprites/251.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_252:: @ 8D2F260
+ .incbin "graphics/battle_anims/sprites/252.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_252:: @ 8D2F378
+ .incbin "graphics/battle_anims/sprites/252.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_253:: @ 8D2F39C
+ .incbin "graphics/battle_anims/sprites/253.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_253:: @ 8D2F578
+ .incbin "graphics/battle_anims/sprites/253.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_254:: @ 8D2F5A0
+ .incbin "graphics/battle_anims/sprites/254.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_254:: @ 8D2F6D8
+ .incbin "graphics/battle_anims/sprites/254.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_255:: @ 8D2F700
+ .incbin "graphics/battle_anims/sprites/255.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_255:: @ 8D2F778
+ .incbin "graphics/battle_anims/sprites/255.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_258:: @ 8D2F78C
+ .incbin "graphics/battle_anims/sprites/258.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_258:: @ 8D2F874
+ .incbin "graphics/battle_anims/sprites/258.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_256:: @ 8D2F89C
+ .incbin "graphics/battle_anims/sprites/256.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_256:: @ 8D2FC28
+ .incbin "graphics/battle_anims/sprites/256.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_257:: @ 8D2FC50
+ .incbin "graphics/battle_anims/sprites/257.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_257:: @ 8D2FD6C
+ .incbin "graphics/battle_anims/sprites/257.gbapal.lz"
+
+ .incbin "graphics/unknown/unknown_C2F9E0.gbapal.lz" @ likely a palette
@ 8C2FA08
.include "data/graphics/pokemon/graphics.inc"
@@ -355,301 +2552,390 @@ gMonIcon_QuestionMark:: @ 8D774D0
gMonFootprint_QuestionMark:: @ 8D778D0
.incbin "graphics/pokemon/footprints/question_mark_footprint.1bpp"
+ .align 2
gUnknown_08D778F0:: @ 8D778F0
- .incbin "baserom.gba", 0xd778f0, 0xe8
+ .incbin "graphics/battle_transitions/vs_frame.4bpp.lz"
+ .align 2
gUnknown_08D779D8:: @ 8D779D8
- .incbin "baserom.gba", 0xd779d8, 0x10c
+ .incbin "graphics/battle_transitions/vs_frame.bin.lz"
+ .align 2
gUnknown_08D77AE4:: @ 8D77AE4
- .incbin "baserom.gba", 0xd77ae4, 0x28
+ .incbin "graphics/battle_transitions/vs_frame.gbapal.lz"
+ .align 2
gUnknown_08D77B0C:: @ 8D77B0C
- .incbin "baserom.gba", 0xd77b0c, 0x25c
+ .incbin "graphics/battle_transitions/vs.4bpp.lz"
+ .align 2
gBattleTerrainTiles_TallGrass:: @ 8D77D68
- .incbin "baserom.gba", 0xd77d68, 0x5b0
+ .incbin "graphics/battle_terrain/tall_grass/tiles.4bpp.lz"
+ .align 2
gBattleTerrainPalette_TallGrass:: @ 8D78318
- .incbin "baserom.gba", 0xd78318, 0x38
+ .incbin "graphics/battle_terrain/tall_grass/palette.gbapal.lz"
+ .align 2
gBattleTerrainTilemap_TallGrass:: @ 8D78350
- .incbin "baserom.gba", 0xd78350, 0x2b0
+ .incbin "graphics/battle_terrain/tall_grass/map.bin.lz"
+ .align 2
gBattleTerrainTiles_LongGrass:: @ 8D78600
- .incbin "baserom.gba", 0xd78600, 0x678
+ .incbin "graphics/battle_terrain/long_grass/tiles.4bpp.lz"
+ .align 2
gBattleTerrainPalette_LongGrass:: @ 8D78C78
- .incbin "baserom.gba", 0xd78C78, 0x40
+ .incbin "graphics/battle_terrain/long_grass/palette.gbapal.lz"
+ .align 2
gBattleTerrainTilemap_LongGrass:: @ 8D78CB8
- .incbin "baserom.gba", 0xd78CB8, 0x2b0
+ .incbin "graphics/battle_terrain/long_grass/map.bin.lz"
+ .align 2
gBattleTerrainTiles_Sand:: @ 8D78F68
- .incbin "baserom.gba", 0xd78f68, 0x5f8
+ .incbin "graphics/battle_terrain/sand/tiles.4bpp.lz"
+ .align 2
gBattleTerrainPalette_Sand:: @ 8D79560
- .incbin "baserom.gba", 0xd79560, 0x48
+ .incbin "graphics/battle_terrain/sand/palette.gbapal.lz"
+ .align 2
gBattleTerrainTilemap_Sand:: @ 8D795A8
- .incbin "baserom.gba", 0xd795A8, 0x2b0
+ .incbin "graphics/battle_terrain/sand/map.bin.lz"
+ .align 2
gBattleTerrainTiles_Underwater:: @ 8D79858
- .incbin "baserom.gba", 0xd79858, 0x5b8
+ .incbin "graphics/battle_terrain/underwater/tiles.4bpp.lz"
+ .align 2
gBattleTerrainPalette_Underwater:: @ 8D79E10
- .incbin "baserom.gba", 0xd79E10, 0x48
+ .incbin "graphics/battle_terrain/underwater/palette.gbapal.lz"
+ .align 2
gBattleTerrainTilemap_Underwater:: @ 8D79E58
- .incbin "baserom.gba", 0xd79e58, 0x2b0
+ .incbin "graphics/battle_terrain/underwater/map.bin.lz"
+ .align 2
gBattleTerrainTiles_Water:: @ 8D7A108
- .incbin "baserom.gba", 0xd7a108, 0x5d4
+ .incbin "graphics/battle_terrain/water/tiles.4bpp.lz"
+ .align 2
gBattleTerrainPalette_Water:: @ 8D7A6DC
- .incbin "baserom.gba", 0xd7a6DC, 0x44
+ .incbin "graphics/battle_terrain/water/palette.gbapal.lz"
+ .align 2
gBattleTerrainTilemap_Water:: @ 8D7A720
- .incbin "baserom.gba", 0xd7a720, 0x2b0
+ .incbin "graphics/battle_terrain/water/map.bin.lz"
+ .align 2
gBattleTerrainTiles_PondWater:: @ 8D7A9D0
- .incbin "baserom.gba", 0xd7a9D0, 0x5a8
+ .incbin "graphics/battle_terrain/pond_water/tiles.4bpp.lz"
+ .align 2
gBattleTerrainPalette_PondWater:: @ 8D7AF78
- .incbin "baserom.gba", 0xd7af78, 0x40
+ .incbin "graphics/battle_terrain/pond_water/palette.gbapal.lz"
+ .align 2
gBattleTerrainTilemap_PondWater:: @ 8D7AFB8
- .incbin "baserom.gba", 0xd7aFB8, 0x2b0
+ .incbin "graphics/battle_terrain/pond_water/map.bin.lz"
+ .align 2
gBattleTerrainTiles_Rock:: @ 8D7B268
- .incbin "baserom.gba", 0xd7b268, 0x5c0
+ .incbin "graphics/battle_terrain/rock/tiles.4bpp.lz"
+ .align 2
gBattleTerrainPalette_Rock:: @ 8D7B828
- .incbin "baserom.gba", 0xd7b828, 0x3c
+ .incbin "graphics/battle_terrain/rock/palette.gbapal.lz"
+ .align 2
gBattleTerrainTilemap_Rock:: @ 8D7B864
- .incbin "baserom.gba", 0xd7b864, 0x2b0
+ .incbin "graphics/battle_terrain/rock/map.bin.lz"
+ .align 2
gBattleTerrainTiles_Cave:: @ 8D7BB14
- .incbin "baserom.gba", 0xd7bb14, 0x5f8
+ .incbin "graphics/battle_terrain/cave/tiles.4bpp.lz"
+ .align 2
gBattleTerrainPalette_Cave:: @ 8D7C10C
- .incbin "baserom.gba", 0xd7c10c, 0x48
+ .incbin "graphics/battle_terrain/cave/palette.gbapal.lz"
+ .align 2
gBattleTerrainTilemap_Cave:: @ 8D7C154
- .incbin "baserom.gba", 0xd7c154, 0x2b0
+ .incbin "graphics/battle_terrain/cave/map.bin.lz"
+ .align 2
gBattleTerrainPalette_Plain:: @ 8D7C404
- .incbin "baserom.gba", 0xd7c404, 0x3c
+ .incbin "graphics/battle_terrain/plain/palette.gbapal.lz"
+ .align 2
gBattleTerrainTiles_Building:: @ 8D7C440
- .incbin "baserom.gba", 0xd7c440, 0x5ac
+ .incbin "graphics/battle_terrain/building/tiles.4bpp.lz"
+ .align 2
gBattleTerrainPalette_Frontier:: @ 8D7C9EC
- .incbin "baserom.gba", 0xd7c9ec, 0x3c
+ .incbin "graphics/battle_terrain/stadium/battle_frontier.gbapal.lz" @ this is also used for link battles
+ .align 2
gBattleTerrainTilemap_Building:: @ 8D7CA28
- .incbin "baserom.gba", 0xd7ca28, 0x2b0
+ .incbin "graphics/battle_terrain/building/map.bin.lz"
+ .align 2
gBattleTerrainTiles_Stadium:: @ 8D7CCD8
- .incbin "baserom.gba", 0xd7ccd8, 0x608
+ .incbin "graphics/battle_terrain/stadium/tiles.4bpp.lz"
+ .align 2
gBattleTerrainTilemap_Stadium:: @ 8D7D2E0
- .incbin "baserom.gba", 0xd7d2e0, 0x2b0
+ .incbin "graphics/battle_terrain/stadium/map.bin.lz"
+ .align 2
gBattleTerrainTiles_Rayquaza:: @ 8D7D590
- .incbin "baserom.gba", 0xd7d590, 0x674
+ .incbin "graphics/battle_terrain/sky/tiles.4bpp.lz"
+ .align 2
gBattleTerrainTilemap_Rayquaza:: @ 8D7DC04
- .incbin "baserom.gba", 0xd7dc04, 0x2b0
+ .incbin "graphics/battle_terrain/sky/map.bin.lz"
+ .align 2
gBattleTerrainPalette_Building:: @ 8D7DEB4
- .incbin "baserom.gba", 0xd7deb4, 0x40
+ .incbin "graphics/battle_terrain/building/palette.gbapal.lz"
+ .align 2
gBattleTerrainPalette_Kyogre:: @ 8D7DEF4
- .incbin "baserom.gba", 0xd7def4, 0x3c
+ .incbin "graphics/battle_terrain/water/kyogre.gbapal.lz"
+ .align 2
gBattleTerrainPalette_Groudon:: @ 8D7DF30
- .incbin "baserom.gba", 0xd7df30, 0x58
+ .incbin "graphics/battle_terrain/cave/groudon.gbapal.lz"
+ .align 2
gBattleTerrainPalette_BuildingGym:: @ 8D7DF88
- .incbin "baserom.gba", 0xd7df88, 0x3c
+ .incbin "graphics/battle_terrain/building/palette2.gbapal.lz"
+ .align 2
gBattleTerrainPalette_BuildingLeader:: @ 8D7DFC4
- .incbin "baserom.gba", 0xd7dfc4, 0x3c
+ .incbin "graphics/battle_terrain/building/palette3.gbapal.lz"
+ .align 2
gBattleTerrainPalette_StadiumAqua:: @ 8D7E000
- .incbin "baserom.gba", 0xd7e000, 0x60
+ .incbin "graphics/battle_terrain/stadium/palette1.gbapal.lz"
+ .align 2
gBattleTerrainPalette_StadiumMagma:: @ 8D7E060
- .incbin "baserom.gba", 0xd7e060, 0x6c
+ .incbin "graphics/battle_terrain/stadium/palette2.gbapal.lz"
+ .align 2
gBattleTerrainPalette_StadiumSidney:: @ 8D7E0CC
- .incbin "baserom.gba", 0xd7e0cc, 0x50
+ .incbin "graphics/battle_terrain/stadium/palette3.gbapal.lz"
+ .align 2
gBattleTerrainPalette_StadiumPhoebe:: @ 8D7E11C
- .incbin "baserom.gba", 0xd7e11c, 0x48
+ .incbin "graphics/battle_terrain/stadium/palette4.gbapal.lz"
+ .align 2
gBattleTerrainPalette_StadiumGlacia:: @ 8D7E164
- .incbin "baserom.gba", 0xd7e164, 0x44
+ .incbin "graphics/battle_terrain/stadium/palette5.gbapal.lz"
+ .align 2
gBattleTerrainPalette_StadiumDrake:: @ 8D7E1A8
- .incbin "baserom.gba", 0xd7e1a8, 0x50
+ .incbin "graphics/battle_terrain/stadium/palette6.gbapal.lz"
+ .align 2
gBattleTerrainPalette_StadiumWallace:: @ 8D7E1F8
- .incbin "baserom.gba", 0xd7e1f8, 0x3c
+ .incbin "graphics/battle_terrain/stadium/palette7.gbapal.lz"
+ .align 2
gBattleTerrainPalette_Rayquaza:: @ 8D7E234
- .incbin "baserom.gba", 0xd7e234, 0x4c
+ .incbin "graphics/battle_terrain/sky/palette.gbapal.lz"
+ .align 2
gBattleTerrainAnimTiles_TallGrass:: @ 8D7E280
- .incbin "baserom.gba", 0xd7e280, 0x588
+ .incbin "graphics/battle_terrain/tall_grass/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_TallGrass:: @ 8D7E808
- .incbin "baserom.gba", 0xd7e808, 0x1bc
+ .incbin "graphics/battle_terrain/tall_grass/anim_map.bin.lz"
+ .align 2
gBattleTerrainAnimTiles_LongGrass:: @ 8D7E9C4
- .incbin "baserom.gba", 0xd7e9C4, 0x710
+ .incbin "graphics/battle_terrain/long_grass/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_LongGrass:: @ 8D7F0D4
- .incbin "baserom.gba", 0xd7F0D4, 0x238
+ .incbin "graphics/battle_terrain/long_grass/anim_map.bin.lz"
+ .align 2
gBattleTerrainAnimTiles_Sand:: @ 8D7F30C
- .incbin "baserom.gba", 0xd7F30c, 0x544
+ .incbin "graphics/battle_terrain/sand/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_Sand:: @ 8D7F850
- .incbin "baserom.gba", 0xd7F850, 0x1a8
+ .incbin "graphics/battle_terrain/sand/anim_map.bin.lz"
+ .align 2
gBattleTerrainAnimTiles_Underwater:: @ 8D7F9F8
- .incbin "baserom.gba", 0xd7f9f8, 0x4cc
+ .incbin "graphics/battle_terrain/underwater/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_Underwater:: @ 8D7FEC4
- .incbin "baserom.gba", 0xd7fec4, 0x190
+ .incbin "graphics/battle_terrain/underwater/anim_map.bin.lz"
+ .align 2
gBattleTerrainAnimTiles_Water:: @ 8D80054
- .incbin "baserom.gba", 0xd80054, 0x60c
+ .incbin "graphics/battle_terrain/water/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_Water:: @ 8D80660
- .incbin "baserom.gba", 0xd80660, 0x1a4
+ .incbin "graphics/battle_terrain/water/anim_map.bin.lz"
+ .align 2
gBattleTerrainAnimTiles_PondWater:: @ 8D80804
- .incbin "baserom.gba", 0xd80804, 0x54c
+ .incbin "graphics/battle_terrain/pond_water/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_PondWater:: @ 8D80D50
- .incbin "baserom.gba", 0xd80d50, 0x14C
+ .incbin "graphics/battle_terrain/pond_water/anim_map.bin.lz"
+ .align 2
gBattleTerrainAnimTiles_Rock:: @ 8D80E9C
- .incbin "baserom.gba", 0xd80e9c, 0x5e0
+ .incbin "graphics/battle_terrain/rock/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_Rock:: @ 8D8147C
- .incbin "baserom.gba", 0xd8147C, 0x194
+ .incbin "graphics/battle_terrain/rock/anim_map.bin.lz"
+ .align 2
gBattleTerrainAnimTiles_Cave:: @ 8D81610
- .incbin "baserom.gba", 0xd81610, 0x81c
+ .incbin "graphics/battle_terrain/cave/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_Cave:: @ 8D81E2C
- .incbin "baserom.gba", 0xd81e2c, 0x2a8
+ .incbin "graphics/battle_terrain/cave/anim_map.bin.lz"
+ .align 2
gBattleTerrainAnimTiles_Building:: @ 8D820D4
- .incbin "baserom.gba", 0xd820d4, 0x410
+ .incbin "graphics/battle_terrain/building/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_Building:: @ 8D824E4
- .incbin "baserom.gba", 0xd824e4, 0x124
+ .incbin "graphics/battle_terrain/building/anim_map.bin.lz"
+ .align 2
gBattleTerrainAnimTiles_Rayquaza:: @ 8D82608
- .incbin "baserom.gba", 0xd82608, 0x668
+ .incbin "graphics/battle_terrain/sky/anim_tiles.4bpp.lz"
+ .align 2
gBattleTerrainAnimTilemap_Rayquaza:: @ 8D82C70
- .incbin "baserom.gba", 0xd82c70, 0x2a0
+ .incbin "graphics/battle_terrain/sky/anim_map.bin.lz"
+ .align 2
gUnknown_08D82F10:: @ 8D82F10
- .incbin "baserom.gba", 0xd82f10, 0x5ec
+ .incbin "graphics/battle_frontier/tourney_bg.4bpp.lz"
+ .align 2
gUnknown_08D834FC:: @ 8D834FC
- .incbin "baserom.gba", 0xd834fc, 0x404
+ .incbin "graphics/battle_frontier/tourney_line.4bpp.lz" @ the red glow mask for the tourney advancement lines
+ .align 2
gUnknown_08D83900:: @ 8D83900
- .incbin "baserom.gba", 0xd83900, 0x22c
+ .incbin "graphics/unknown/unknown_D83900.bin.lz" @ tilemaps likely
+ .align 2
gUnknown_08D83B2C:: @ 8D83B2C
- .incbin "baserom.gba", 0xd83b2c, 0x110
+ .incbin "graphics/unknown/unknown_D83B2C.bin.lz"
+ .align 2
gUnknown_08D83C3C:: @ 8D83C3C
- .incbin "baserom.gba", 0xd83c3c, 0x114
+ .incbin "graphics/unknown/unknown_D83C3C.bin.lz"
+ .align 2
gUnknown_08D83D50:: @ 8D83D50
- .incbin "baserom.gba", 0xd83d50, 0xc20
+ .incbin "graphics/battle_frontier/misc1.4bpp.lz"
+ .align 2
gUnknown_08D84970:: @ 8D84970
- .incbin "baserom.gba", 0xd84970, 0x590
+ .incbin "graphics/unknown/unknown_D84970.bin.lz"
+ .align 2
gUnknown_08D84F00:: @ 8D84F00
- .incbin "baserom.gba", 0xd84f00, 0x158
+ .incbin "graphics/unknown/unknown_D84F00.bin.lz"
-gUnknown_08D85058:: @ 8D85058
- .incbin "baserom.gba", 0xd85058, 0x300
+ .align 2
+gBattleFrontierGfx_DomeOptions:: @ 8D85058
+ .incbin "graphics/battle_frontier/options.4bpp.lz"
+ .align 2
gUnknown_08D85358:: @ 8D85358
- .incbin "baserom.gba", 0xd85358, 0xec
+ .incbin "graphics/battle_frontier/options_pal1.gbapal.lz"
+ .align 2
gUnknown_08D85444:: @ 8D85444
- .incbin "baserom.gba", 0xd85444, 0x84
+ .incbin "graphics/battle_frontier/options_pal2.gbapal.lz" @ pokeball pal
+ .align 2
gUnknown_08D854C8:: @ 8D854C8
- .incbin "baserom.gba", 0xd854c8, 0x20
+ .incbin "graphics/battle_frontier/options_pal3.gbapal.lz" @ arrow pal
+ .align 2
gUnknown_08D854E8:: @ 8D854E8
- .incbin "baserom.gba", 0xd854E8, 0x100
+ .incbin "graphics/battle_frontier/symbols.4bpp.lz"
+ .align 2
gUnknown_08D855E8:: @ 8D855E8
- .incbin "baserom.gba", 0xd855e8, 0x18
+ .incbin "graphics/battle_frontier/symbols.gbapal.lz"
+ .align 2
gUnknown_08D85600:: @ 8D85600
- .incbin "baserom.gba", 0xd85600, 0x20
+ .incbin "graphics/battle_frontier/text.gbapal.lz" @ text palette for frontier text.
+ .align 2
gUnknown_08D85620:: @ 8D85620
- .incbin "baserom.gba", 0xd85620, 0x20
+ .incbin "graphics/battle_frontier/text_pp.gbapal" @ text palette for PP text
+
+ @ dome anim pals
+ .align 2
gUnknown_08D85640:: @ 8D85640
- .incbin "baserom.gba", 0xd85640, 0x20
+ .incbin "graphics/battle_frontier/dome_anim1.gbapal"
+ .align 2
gUnknown_08D85660:: @ 8D85660
- .incbin "baserom.gba", 0xd85660, 0x20
+ .incbin "graphics/battle_frontier/dome_anim2.gbapal"
+ .align 2
gUnknown_08D85680:: @ 8D85680
- .incbin "baserom.gba", 0xd85680, 0x20
+ .incbin "graphics/battle_frontier/dome_anim3.gbapal"
+ .align 2
gUnknown_08D856A0:: @ 8D856A0
- .incbin "baserom.gba", 0xd856a0, 0x28
+ .incbin "graphics/battle_frontier/dome_anim4.gbapal"
+ @ 8D856C0
+ .2byte 0x013F, 0x0119, 0x0113, 0x010E @ unused?
+
+ .align 2
gUnknown_08D856C8:: @ 8D856C8
- .incbin "baserom.gba", 0xd856c8, 0xe0
+ .incbin "graphics/battle_frontier/pyramid_light.gbapal" @ unfaded pal for the player light in battle pyramid
+ .align 2
gUnknown_08D857A8:: @ 8D857A8
- .incbin "baserom.gba", 0xd857a8, 0x274
+ .incbin "graphics/battle_frontier/battle_tilemap1.bin.lz"
+ .align 2
gUnknown_08D85A1C:: @ 8D85A1C
- .incbin "baserom.gba", 0xd85a1c, 0x234
+ .incbin "graphics/battle_frontier/battle_tilemap2.bin.lz"
-gUnknown_08D85C50:: @ 8D85C50
- .incbin "baserom.gba", 0xd85c50, 0x60
+ .align 2
+gIntro1GameFreakTextFadePal:: @ 8D85C50
+ .incbin "graphics/intro/intro1_text.gbapal" @ game freak text blue fade
.align 2
gIntro2BrendanNoTurnPal:: @ 8D85CB0
.incbin "graphics/intro/intro2_brendan_noturn.gbapal"
.align 2
-gUnknown_08D85CD0:: @ 8D85CD0
- .incbin "baserom.gba", 0xd85cd0, 0x182
-
-gUnknown_08D85E52:: @ 8D85E52
- .incbin "baserom.gba", 0xd85e52, 0x20
-
-gUnknown_08D85E72:: @ 8D85E72
- .incbin "baserom.gba", 0xd85e72, 0xa
-
-gUnknown_08D85E7C:: @ 8D85E7C
- .incbin "baserom.gba", 0xd85e7c, 0x54
+gIntro3BgPal:: @ 8D85CD0
+ .incbin "graphics/intro/intro3.gbapal"
.align 2
gIntro2VolbeatPal:: @ 8D85ED0
@@ -692,38 +2978,48 @@ gIntro2MayNoTurnGfx:: @ 8D87CA4
.incbin "graphics/intro/intro2_may_noturn.4bpp.lz"
.align 2
-gUnknown_08D88494:: @ 8D88494
- .incbin "baserom.gba", 0xd88494, 0x8ac
+gIntro3GroudonGfx:: @ 8D88494
+ .incbin "graphics/intro/intro3_groudon.8bpp.lz"
-gUnknown_08D88D40:: @ 8D88D40
- .incbin "baserom.gba", 0xd88d40, 0x4e4
+ .align 2
+gIntro3GroudonTilemap:: @ 8D88D40
+ .incbin "graphics/intro/intro3_groudon.bin.lz"
-gUnknown_08D89224:: @ 8D89224
- .incbin "baserom.gba", 0xd89224, 0x898
+ .align 2
+gIntro3KyogreGfx:: @ 8D89224
+ .incbin "graphics/intro/intro3_kyogre.8bpp.lz"
-gUnknown_08D89ABC:: @ 8D89ABC
- .incbin "baserom.gba", 0xd89abc, 0x4c0
+ .align 2
+gIntro3KyogreTilemap:: @ 8D89ABC
+ .incbin "graphics/intro/intro3_kyogre.bin.lz"
-gUnknown_08D89F7C:: @ 8D89F7C
- .incbin "baserom.gba", 0xd89f7c, 0x89c
+ .align 2
+gIntro3LegendBgGfx:: @ 8D89F7C
+ .incbin "graphics/intro/legend_bg.4bpp.lz" @ groudon/kyogre/bg
-gUnknown_08D8A818:: @ 8D8A818
- .incbin "baserom.gba", 0xd8a818, 0x11c
+ .align 2
+gIntro3GroudonBgTilemap:: @ 8D8A818
+ .incbin "graphics/intro/legend_bg1.bin.lz"
-gUnknown_08D8A934:: @ 8D8A934
- .incbin "baserom.gba", 0xd8a934, 0x120
+ .align 2
+gIntro3KyogreBgTilemap:: @ 8D8A934
+ .incbin "graphics/intro/legend_bg2.bin.lz"
-gUnknown_08D8AA54:: @ 8D8AA54
- .incbin "baserom.gba", 0xd8aa54, 0x72c
+ .align 2
+gIntro3CloudsGfx:: @ 8D8AA54
+ .incbin "graphics/intro/intro3_clouds.4bpp.lz"
-gUnknown_08D8B180:: @ 8D8B180
- .incbin "baserom.gba", 0xd8b180, 0x2c0
+ .align 2
+gIntro3Clouds1Tilemap:: @ 8D8B180
+ .incbin "graphics/intro/intro3_clouds1.bin.lz"
-gUnknown_08D8B440:: @ 8D8B440
- .incbin "baserom.gba", 0xd8b440, 0x2a8
+ .align 2
+gIntro3Clouds2Tilemap:: @ 8D8B440
+ .incbin "graphics/intro/intro3_clouds2.bin.lz"
-gUnknown_08D8B6E8:: @ 8D8B6E8
- .incbin "baserom.gba", 0xd8b6e8, 0x124
+ .align 2
+gIntro3Clouds3Tilemap:: @ 8D8B6E8
+ .incbin "graphics/intro/intro3_clouds3.bin.lz"
.align 2
gIntro3LightningGfx:: @ 8D8B80C
@@ -734,17 +3030,27 @@ gIntro3LightningPal:: @ 8D8BA54
.incbin "graphics/intro/intro3_lightning.gbapal"
.align 2
-gUnknown_08D8BA74:: @ 8D8BA74
- .incbin "baserom.gba", 0xd8ba74, 0x6f8
+gIntro3RayquazaGfx:: @ 8D8BA74
+ .incbin "graphics/intro/intro3_rayquaza.4bpp.lz"
+
+ .align 2
+gIntro3RayquazaTilemap:: @ 8D8C16C
+ .incbin "graphics/intro/intro3_rayquaza.bin.lz"
-gUnknown_08D8C16C:: @ 8D8C16C
- .incbin "baserom.gba", 0xd8c16c, 0x6cc
+ @ seems to be 2 unused tilemaps
+ .align 2
+ .incbin "graphics/unknown/unknown_D8C374.bin.lz"
-gUnknown_08D8C838:: @ 8D8C838
- .incbin "baserom.gba", 0xd8c838, 0x490
+ .align 2
+ .incbin "graphics/unknown/unknown_D8C5C4.bin.lz"
-gUnknown_08D8CCC8:: @ 8D8CCC8
- .incbin "baserom.gba", 0xd8ccc8, 0x27c
+ .align 2
+gIntro3Clouds2Gfx:: @ 8D8C838
+ .incbin "graphics/intro/intro3_clouds2.4bpp.lz" @ clouds 2, during the rayquaza flash
+
+ .align 2
+gIntro3Clouds4Tilemap:: @ 8D8CCC8
+ .incbin "graphics/intro/intro3_clouds4.bin.lz" @ this is the tilemap for clouds 2, but clouds
.align 2
gIntro2BubblesGfx:: @ 8D8CF44
@@ -763,40 +3069,156 @@ gIntro1SparkleGfx:: @ 8D8D208
.incbin "graphics/intro/intro1_sparkle.4bpp.lz"
.align 2
- .incbin "baserom.gba", 0xd8d2a4, 0x16c
+gBattleAnimSpriteSheet_261::
+ .incbin "graphics/battle_anims/sprites/261.4bpp.lz"
+ .align 2
gUnknown_08D8D410:: @ 8D8D410
- .incbin "baserom.gba", 0xd8d410, 0x17c
+ .incbin "graphics/battle_anims/backgrounds/sandstorm_brew.bin.lz"
+ .align 2
gUnknown_08D8D58C:: @ 8D8D58C
- .incbin "baserom.gba", 0xd8d58c, 0x52c
+ .incbin "graphics/battle_anims/backgrounds/sandstorm_brew.4bpp.lz"
+
+ .align 2
+gUnknown_08D8DAB8:: @ 8E68580
+ .incbin "graphics/battle_anims/sprites/261.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_260:: @ 8E685A8
+ .incbin "graphics/battle_anims/sprites/260.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_260:: @ 8E68764
+ .incbin "graphics/battle_anims/sprites/260.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_15:: @ 8E6877C
+ .incbin "graphics/battle_anims/backgrounds/15.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_15:: @ 8E690EC
+ .incbin "graphics/battle_anims/backgrounds/15.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_15:: @ 8E69110
+ .incbin "graphics/battle_anims/backgrounds/15.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_262:: @ 8E69308
+ .incbin "graphics/battle_anims/sprites/262.4bpp.lz"
-gUnknown_08D8DAB8:: @ 8D8DAB8
- .incbin "baserom.gba", 0xd8dab8, 0xe84
+ .align 2
+gBattleAnimSpritePalette_262:: @ 8E693DC
+ .incbin "graphics/battle_anims/sprites/262.gbapal.lz"
-gContestNextTurnGfx:: @ 8D8E93C
- .incbin "baserom.gba", 0xd8e93c, 0x78
+ .align 2
+gContestNextTurnGfx::
+ .incbin "graphics/contest/nextturn.4bpp.lz"
+ .align 2
gUnknown_08D8E9B4:: @ 8D8E9B4
- .incbin "baserom.gba", 0xd8e9b4, 0x80
+ .incbin "graphics/contest/nextturn_numbers.4bpp"
+ .align 2
gUnknown_08D8EA34:: @ 8D8EA34
- .incbin "baserom.gba", 0xd8ea34, 0xb0
+ .incbin "graphics/contest/nextturn_random.4bpp"
+
+ .align 2
+gBattleAnimSpriteSheet_264:: @ 8E695B8
+ .incbin "graphics/battle_anims/sprites/264.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_264:: @ 8E695D8
+ .incbin "graphics/battle_anims/sprites/264.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_265:: @ 8E695F0
+ .incbin "graphics/battle_anims/sprites/265.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_067:: @ 8E69608
+ .incbin "graphics/battle_anims/sprites/067.gbapal.lz"
+ .align 2
+gBattleAnimSpritePalette_068:: @ 8E69628
+ .incbin "graphics/battle_anims/sprites/068.gbapal.lz"
+
+ .align 2
gContestApplauseGfx:: @ 8D8EAE4
- .incbin "baserom.gba", 0xd8eaE4, 0x140
+ .incbin "graphics/contest/applause.4bpp.lz"
-gUnknown_08D8EC24:: @ 8D8EC24
- .incbin "baserom.gba", 0xd8ec24, 0x80
+ .align 2
+gContestApplauseMeterGfx:: @ 8D8EC24
+ .incbin "graphics/contest/applause_meter.4bpp"
+ .align 2
gContestPal:: @ 8D8ECA4
- .incbin "baserom.gba", 0xd8eca4, 0xef8
+ .incbin "graphics/contest/nextturn.gbapal"
+
+ .align 2
+gBattleAnimSpriteSheet_272:: @ 8E6982C
+ .incbin "graphics/battle_anims/sprites/272.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_272:: @ 8E69A48
+ .incbin "graphics/battle_anims/sprites/272.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_273:: @ 8E69A6C
+ .incbin "graphics/battle_anims/sprites/273.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_269:: @ 8E69A94
+ .incbin "graphics/battle_anims/sprites/269.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_269:: @ 8E69AE8
+ .incbin "graphics/battle_anims/sprites/269.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_274:: @ 8E69B00
+ .incbin "graphics/battle_anims/sprites/274.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_275:: @ 8E69C80
+ .incbin "graphics/battle_anims/sprites/275.4bpp.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_276:: @ 8E69DEC
+ .incbin "graphics/battle_anims/sprites/276.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_274:: @ 8E69F54
+ .incbin "graphics/battle_anims/sprites/274.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_17:: @ 8E69F7C
+ .incbin "graphics/battle_anims/backgrounds/17.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_17:: @ 8E6A0D8
+ .incbin "graphics/battle_anims/backgrounds/17.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_17:: @ 8E6A100
+ .incbin "graphics/battle_anims/backgrounds/17.bin.lz"
-gUnknown_08D8FB9C:: @ 8D8FB9C
- .incbin "baserom.gba", 0xd8fb9c, 0x24
+ .align 2
+gBattleAnimSpriteSheet_280:: @ 8E6A2E8
+ .incbin "graphics/battle_anims/sprites/280.4bpp.lz"
-gUnknown_08D8FBC0:: @ 8D8FBC0
- .incbin "baserom.gba", 0xd8fbc0, 0x30
+ .align 2
+gBattleAnimSpritePalette_280:: @ 8E6A6E4
+ .incbin "graphics/battle_anims/sprites/280.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImageMuddyWater_Pal:: @ 8D8FB9C
+ .incbin "graphics/battle_anims/backgrounds/water_muddy.gbapal.lz"
+
+ .align 2
+gEnemyMonShadow_Gfx:: @ 8D8FBC0
+ .incbin "graphics/battle_interface/enemy_mon_shadow.4bpp.lz"
.align 2
gBattleInterface_BallStatusBarGfx:: @ 8D8FBF0
@@ -806,125 +3228,357 @@ gBattleInterface_BallStatusBarGfx:: @ 8D8FBF0
gMonIcon_Egg:: @ 8D8FC74
.incbin "graphics/pokemon/icons/egg_icon.4bpp"
- .incbin "baserom.gba", 0xd90074, 0x1524
+ .align 2
+gBattleAnimBackgroundImage_02:: @ 8E6ABDC
+ .incbin "graphics/battle_anims/backgrounds/02.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_02:: @ 8E6B8A4
+ .incbin "graphics/battle_anims/backgrounds/02.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_02:: @ 8E6B8C0
+ .incbin "graphics/battle_anims/backgrounds/02.bin.lz"
+ .align 2
+gBattleAnimSpritePalette_287:: @ 8E6BBB4
+ .incbin "graphics/battle_anims/sprites/287.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_24:: @ 8E6BBDC
+ .incbin "graphics/battle_anims/backgrounds/24.gbapal.lz"
+
+ .align 2
+ .incbin "graphics/unknown/unknown_E6BC04.bin.lz" @ TODO: rename
+
+ .align 2
sBlenderCenterGfx:: @ 8D91598
- .incbin "baserom.gba", 0xd91598, 0x820
+ .incbin "graphics/berry_blender/center.8bpp.lz"
+ .align 2
gUnknown_08D91DB8:: @ 8D91DB8
- .incbin "baserom.gba", 0xd91db8, 0xa34
+ .incbin "graphics/berry_blender/outer.4bpp.lz"
+ .align 2
gUnknown_08D927EC:: @ 8D927EC
- .incbin "baserom.gba", 0xd927ec, 0xaf4
+ .incbin "graphics/berry_blender/outer_map.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_16:: @ 8E6D668
+ .incbin "graphics/battle_anims/backgrounds/16.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_16:: @ 8E6D690
+ .incbin "graphics/battle_anims/backgrounds/16.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_16:: @ 8E6D8F0
+ .incbin "graphics/battle_anims/backgrounds/16.bin.lz"
+
+ .align 2
+gBattleAnimSpritePalette_277:: @ 8E6DA2C
+ .incbin "graphics/battle_anims/sprites/277.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_277:: @ 8E6DA54
+ .incbin "graphics/battle_anims/sprites/277.4bpp.lz"
+
+ .align 2
+gBattleAnimFogTilemap:: @ 8E6DE48
+ .incbin "graphics/battle_anims/backgrounds/fog.bin.lz"
+
+ .align 2
+gBattleAnimSpritePalette_283:: @ 8E6DFC0
+ .incbin "graphics/battle_anims/sprites/283.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_283:: @ 8E6DFDC
+ .incbin "graphics/battle_anims/sprites/283.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_ScaryFacePlayer:: @ 8D93598
+ .incbin "graphics/battle_anims/backgrounds/scary_face_player.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_ScaryFaceOpponent:: @ 8D9377C
+ .incbin "graphics/battle_anims/backgrounds/scary_face_opponent.bin.lz"
+
+ .align 2
+gBattleAnimBackgroundTilemap_ScaryFaceContest:: @ 8D93960
+ .incbin "graphics/battle_anims/backgrounds/scary_face_contest.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_263:: @ 8E6E6AC
+ .incbin "graphics/battle_anims/sprites/263.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_263:: @ 8E6E6EC
+ .incbin "graphics/battle_anims/sprites/263.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_266:: @ 8E6E704
+ .incbin "graphics/battle_anims/sprites/266.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_266:: @ 8E6E744
+ .incbin "graphics/battle_anims/sprites/266.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_267:: @ 8E6E75C
+ .incbin "graphics/battle_anims/sprites/267.gbapal.lz"
+
+ .align 2
+gBattleAnimSpritePalette_268:: @ 8E6E774
+ .incbin "graphics/battle_anims/sprites/268.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_278:: @ 8E6E78C
+ .incbin "graphics/battle_anims/sprites/278.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_278:: @ 8E6E998
+ .incbin "graphics/battle_anims/sprites/278.gbapal.lz"
-gUnknown_08D932E0:: @ 8D932E0
- .incbin "baserom.gba", 0xd932e0, 0x2b8
+ .align 2
+gBattleAnimSpriteSheet_279:: @ 8E6E9B4
+ .incbin "graphics/battle_anims/sprites/279.4bpp.lz"
-gUnknown_08D93598:: @ 8D93598
- .incbin "baserom.gba", 0xd93598, 0x1e4
+ .align 2
+gBattleAnimSpritePalette_279:: @ 8E6EA00
+ .incbin "graphics/battle_anims/sprites/279.gbapal.lz"
-gUnknown_08D9377C:: @ 8D9377C
- .incbin "baserom.gba", 0xd9377c, 0x1e4
+ .align 2
+gBattleAnimSpriteSheet_281:: @ 8E6EA1C
+ .incbin "graphics/battle_anims/sprites/281.4bpp.lz"
-gUnknown_08D93960:: @ 8D93960
- .incbin "baserom.gba", 0xd93960, 0x1158
+ .align 2
+gBattleAnimSpritePalette_281:: @ 8E6EBA4
+ .incbin "graphics/battle_anims/sprites/281.gbapal.lz"
-gUnknown_08D94AB8:: @ 8D94AB8
- .incbin "baserom.gba", 0xd94ab8, 0x1320
+ .align 2
+gBattleAnimBackgroundImage_21:: @ 8E6EBC4
+ .incbin "graphics/battle_anims/backgrounds/21.4bpp.lz"
-gUnknown_08D95DD8:: @ 8D95DD8
- .incbin "baserom.gba", 0xd95dd8, 0x28
+ .align 2
+gBattleAnimBackgroundPalette_21:: @ 8E6EEB8
+ .incbin "graphics/battle_anims/backgrounds/21.gbapal.lz"
+ .align 2
+gBattleAnimBackgroundTilemap_21:: @ 8E6EED4
+ .incbin "graphics/battle_anims/backgrounds/21.bin.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_284:: @ 8E6F1C0
+ .incbin "graphics/battle_anims/sprites/284.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_284:: @ 8E6F53C
+ .incbin "graphics/battle_anims/sprites/284.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_285:: @ 8E6F558
+ .incbin "graphics/battle_anims/sprites/285.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_285:: @ 8E6F5F8
+ .incbin "graphics/battle_anims/sprites/285.gbapal.lz"
+
+ .align 2
+gBattleAnimBackgroundImage_Surf:: @ 8D94AB8
+ .incbin "graphics/battle_anims/backgrounds/water.4bpp.lz"
+
+ .align 2
+gBattleAnimBackgroundPalette_Surf:: @ 8D95DD8
+ .incbin "graphics/battle_anims/backgrounds/water.gbapal.lz"
+
+ .align 2
gUnknown_08D95E00:: @ 8D95E00
- .incbin "baserom.gba", 0xd95e00, 0x2d0
+ .incbin "graphics/unknown/unknown_D95E00.bin.lz"
+ .align 2
gUnknown_08D960D0:: @ 8D960D0
- .incbin "baserom.gba", 0xd960d0, 0x2d4
+ .incbin "graphics/unknown/unknown_D960D0.bin.lz"
+ .align 2
gUnknown_08D963A4:: @ 8D963A4
- .incbin "baserom.gba", 0xd963a4, 0x448
+ .incbin "graphics/unknown/unknown_D963A4.bin.lz"
+
+ .align 2
+gBattleAnimSpritePalette_286:: @ 8E71200
+ .incbin "graphics/battle_anims/sprites/286.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_188:: @ 8E71228
+ .incbin "graphics/battle_anims/sprites/188.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_188:: @ 8E7133C
+ .incbin "graphics/battle_anims/sprites/188.gbapal.lz"
+
+ .align 2
+gPartyMenuMisc_Gfx:: @ 8D967EC
+ .incbin "graphics/interface/party_menu_misc.4bpp.lz"
+
+ .align 2
+gPartyMenuMisc_Pal:: @ 8D96AB4
+ .incbin "graphics/interface/party_menu_misc.gbapal.lz"
-gUnknown_08D967EC:: @ 8D967EC
- .incbin "baserom.gba", 0xd967ec, 0x2c8
+ .align 2
+gPartyMenuMisc_Tilemap:: @ 8D96BA0
+ .incbin "graphics/interface/party_menu_misc.bin.lz"
-gUnknown_08D96AB4:: @ 8D96AB4
- .incbin "baserom.gba", 0xd96ab4, 0xec
+ .align 2
+gPartyMenuPokeball_Gfx:: @ 8D96CD8
+ .incbin "graphics/interface/party_menu_pokeball.4bpp.lz"
-gUnknown_08D96BA0:: @ 8D96BA0
- .incbin "baserom.gba", 0xd96ba0, 0xfe4
+ .align 2
+gPartyMenuPokeballSmall_Gfx:: @ 8D96E58
+ .incbin "graphics/interface/party_menu_pokeball_small.4bpp.lz" @ unused
-gUnknown_08D97B84:: @ 8D97B84
- .incbin "baserom.gba", 0xd97b84, 0x188
+ .align 2
+gPartyMenuPokeball_Pal:: @ 8D96F6C
+ .incbin "graphics/interface/party_menu_pokeball.gbapal.lz"
+ .align 2
+gStatusGfx_Icons:: @ 8D96F90
+ .incbin "graphics/interface/status_icons.4bpp.lz"
+
+ .align 2
+gStatusPal_Icons:: @ 8D97188
+ .incbin "graphics/interface/status_icons.gbapal.lz"
+
+ .align 2
+gMoveTypes_Gfx:: @ 8D971B0
+ .incbin "graphics/types/move_types.4bpp.lz"
+
+ .align 2
+gMoveTypes_Pal:: @ 8D97B84
+ .incbin "graphics/types/move_types.gbapal.lz"
+
+ .align 2
+gUnknown_08D97BEC:: @ 8D97BEC
+ .incbin "graphics/interface/summary_frames.4bpp.lz"
+
+ .align 2
+gUnknown_08D97CF4:: @ 8D97CF4
+ .incbin "graphics/interface/summary_frames.gbapal.lz"
+
+ .align 2
gUnknown_08D97D0C:: @ 8D97D0C
- .incbin "baserom.gba", 0xd97d0c, 0x830
+ .incbin "graphics/interface/status_screen.4bpp.lz"
+ .align 2
gUnknown_08D9853C:: @ 8D9853C
- .incbin "baserom.gba", 0xd9853c, 0xf0
+ .incbin "graphics/interface/status_screen.gbapal.lz"
+ .align 2
gUnknown_08D9862C:: @ 8D9862C
- .incbin "baserom.gba", 0xd9862c, 0x1d0
+ .incbin "graphics/interface/status_screen.bin.lz"
+ .align 2
gUnknown_08D987FC:: @ 8D987FC
- .incbin "baserom.gba", 0xd987fc, 0x190
+ .incbin "graphics/interface/status_tilemap1.bin.lz"
+ .align 2
gUnknown_08D9898C:: @ 8D9898C
- .incbin "baserom.gba", 0xd9898c, 0x19c
+ .incbin "graphics/interface/status_tilemap2.bin.lz"
+ .align 2
gUnknown_08D98B28:: @ 8D98B28
- .incbin "baserom.gba", 0xd98b28, 0x1a0
+ .incbin "graphics/interface/status_tilemap3.bin.lz"
+ .align 2
gUnknown_08D98CC8:: @ 8D98CC8
- .incbin "baserom.gba", 0xd98cc8, 0x18c0
+ .incbin "graphics/interface/status_tilemap0.bin.lz"
+
+ .align 2
+gBagMaleTiles:: @ 8E75024
+ .incbin "graphics/misc/bag_male.4bpp.lz"
+
+ .align 2
+gBagFemaleTiles:: @ 8E75BA0
+ .incbin "graphics/misc/bag_female.4bpp.lz"
+
+ .align 2
+gBagPalette:: @ 8E76700
+ .incbin "graphics/misc/bag.gbapal.lz"
-gUnknown_08D9A588:: @ 8D9A588
- .incbin "baserom.gba", 0xd9a588, 0x4c
+ .align 2
+gBagScreenMale_Pal:: @ 8D9A588
+ .incbin "graphics/interface/bag_screen_male.gbapal.lz"
-gUnknown_08D9A5D4:: @ 8D9A5D4
- .incbin "baserom.gba", 0xd9a5d4, 0x4c
+ .align 2
+gBagScreenFemale_Pal:: @ 8D9A5D4
+ .incbin "graphics/interface/bag_screen_female.gbapal.lz"
-gUnknown_08D9A620:: @ 8D9A620
- .incbin "baserom.gba", 0xd9a620, 0x26c
+ .align 2
+gBagScreen_Gfx:: @ 8D9A620
+ .incbin "graphics/interface/bag_screen.4bpp.lz"
+ .align 2
gUnknown_08D9A88C:: @ 8D9A88C
- .incbin "baserom.gba", 0xd9a88c, 0x544
+ .incbin "graphics/unknown/unknown_D9A88C.bin.lz"
+
+ .align 2
+gBattleFrontierGfx_PyramidBag:: @ 8D9A9EC
+ .incbin "graphics/interface/bag_pyramid.4bpp.lz"
+ .align 2
gUnknown_08D9ADD0:: @ 8D9ADD0
- .incbin "baserom.gba", 0xd9add0, 0x34
+ .incbin "graphics/interface/bag_pyramid.gbapal.lz" @ female palette is first and male is second.
+ .align 2
gUnknown_08D9AE04:: @ 8D9AE04
- .incbin "baserom.gba", 0xd9ae04, 0x140
+ .incbin "graphics/unknown/unknown_D9AE04.bin.lz" @ tilemap?
+ .align 2
gUnknown_08D9AF44:: @ 8D9AF44
- .incbin "baserom.gba", 0xd9af44, 0x78
+ .incbin "graphics/unknown/unknown_D9AF44.gbapal.lz"
+
+ .align 2
+gBagSwapLineGfx:: @ 8D9AF6C
+ .incbin "graphics/interface/bag_swap.4bpp.lz"
+ .align 2
+gBagSwapLinePal:: @ 8D9AFAC
+ .incbin "graphics/interface/bag_swap.gbapal.lz"
+
+ .align 2
gBuyMenuFrame_Gfx:: @ 8D9AFBC
- .incbin "baserom.gba", 0xd9afbc, 0x10c
+ .incbin "graphics/interface/mart_frame.4bpp.lz"
+ .align 2
gMenuMoneyPal:: @ 8D9B0C8
- .incbin "baserom.gba", 0xd9b0c8, 0x28
+ .incbin "graphics/interface/mart_frame.gbapal.lz"
+ .align 2
gBuyMenuFrame_Tilemap:: @ 8D9B0F0
- .incbin "baserom.gba", 0xd9b0f0, 0x140
-
+ .incbin "graphics/interface/mart_frame.bin.lz"
+
+ .align 2
gMenuMoneyGfx:: @ 8D9B230
- .incbin "baserom.gba", 0xd9b230, 0x84
+ .incbin "graphics/interface/money.4bpp.lz"
+ .align 2
gMenuPokeblock_Gfx:: @ 8D9B2B4
- .incbin "baserom.gba", 0xd9b2b4, 0x1bc
+ .incbin "graphics/interface/pokeblock_case_frame.4bpp.lz"
+ .align 2
gMenuPokeblock_Pal:: @ 8D9B470
- .incbin "baserom.gba", 0xd9b470, 0x70
-
+ .incbin "graphics/interface/pokeblock_case_frame.gbapal.lz"
+
+ .align 2
gMenuPokeblockDevice_Gfx:: @ 8D9B4E0
- .incbin "baserom.gba", 0xd9b4e0, 0x2c0
-
+ .incbin "graphics/interface/pokeblock_device.4bpp.lz"
+
+ .align 2
gMenuPokeblockDevice_Pal:: @ 8D9B7A0
- .incbin "baserom.gba", 0xd9b7a0, 0x28
+ .incbin "graphics/interface/pokeblock_device.gbapal.lz"
+ .align 2
gMenuPokeblock_Tilemap:: @ 8D9B7C8
- .incbin "baserom.gba", 0xd9b7c8, 0x148
-
+ .incbin "graphics/interface/pokeblock.bin.lz"
+
.align 2
gPokeblock_Gfx::
.incbin "graphics/pokeblock/pokeblock.4bpp.lz"
@@ -985,113 +3639,236 @@ gPokeblockWhite_Pal::
gPokeblockGold_Pal::
.incbin "graphics/pokeblock/gold.gbapal.lz"
+ .align 2
gUnknown_08D9BA44:: @ 8D9BA44
- .incbin "baserom.gba", 0xd9ba44, 0x100
+ .incbin "graphics/interface/pokeblock_feeding_bg_map.bin.lz"
+ .align 2
gUnknown_08D9BB44:: @ 8D9BB44
- .incbin "baserom.gba", 0xd9bb44, 0x3ac
+ .incbin "graphics/interface/check_berry.4bpp.lz"
+ .align 2
gUnknown_08D9BEF0:: @ 8D9BEF0
- .incbin "baserom.gba", 0xd9bef0, 0xa8
+ .incbin "graphics/interface/check_berry.gbapal.lz"
+ .align 2
gUnknown_08D9BF98:: @ 8D9BF98
- .incbin "baserom.gba", 0xd9bf98, 0x1a4
+ .incbin "graphics/interface/berry_tag.bin.lz"
+ .align 2
gUnknown_08D9C13C:: @ 8D9C13C
- .incbin "baserom.gba", 0xd9c13c, 0x26c
+ .incbin "graphics/interface/berry_tag_title.bin.lz"
+
+ .align 2
+gBerryCheckCircle_Gfx:: @ 8D9C24C
+ .incbin "graphics/interface/check_berry_circle.4bpp.lz"
@ 8D9C3A8
.include "data/graphics/berries/berry_graphics.inc"
-@ 8DA1E78
- .incbin "baserom.gba", 0xda1e78, 0x1548
+ .align 2
+gRaySceneGroudon_Gfx:: @ 8DA1E78
+ .incbin "graphics/rayquaza_scene/groudon.4bpp.lz"
+
+ .align 2
+gRaySceneGroudon2_Gfx:: @ 8DA2A5C
+ .incbin "graphics/rayquaza_scene/groudon_shoulder.4bpp.lz"
+
+ .align 2
+gRaySceneGroudon3_Gfx:: @ 8DA2B28
+ .incbin "graphics/rayquaza_scene/groudon_claw.4bpp.lz"
+
+ .align 2
+gRaySceneKyogre_Gfx:: @ 8DA2D1C
+ .incbin "graphics/rayquaza_scene/kyogre.4bpp.lz"
+
+ .align 2
+gRaySceneKyogre2_Gfx:: @ 8DA3250
+ .incbin "graphics/rayquaza_scene/kyogre_shoulder.4bpp.lz"
+
+ .align 2
+gRaySceneKyogre3_Gfx:: @ 8DA32A4
+ .incbin "graphics/rayquaza_scene/kyogre_fin.4bpp.lz"
+
+ .align 2
+gRaySceneGroudon_Pal:: @ 8DA3370
+ .incbin "graphics/rayquaza_scene/groudon.gbapal.lz"
+
+ .align 2
+gRaySceneKyogre_Pal:: @ 8DA3398
+ .incbin "graphics/rayquaza_scene/kyogre.gbapal.lz"
+
+ .align 2
+gRaySceneClouds_Gfx:: @ 8DA33C0
+ .incbin "graphics/rayquaza_scene/clouds.4bpp.lz"
+
+ .align 2
+gRaySceneClouds_Pal:: @ 8DA37E8
+ .incbin "graphics/rayquaza_scene/clouds.gbapal.lz" @ pal 1 clouds, pal 2 rain
+
+ .align 2
+gRaySceneClouds1_Tilemap:: @ 8DA3824
+ .incbin "graphics/rayquaza_scene/clouds1.bin.lz"
+
+ .align 2
+gRaySceneClouds2_Tilemap:: @ 8DA3988
+ .incbin "graphics/rayquaza_scene/clouds2.bin.lz"
+
+ .align 2
+gRaySceneClouds3_Tilemap:: @ 8DA3A88
+ .incbin "graphics/rayquaza_scene/clouds3.bin.lz"
+
+ .align 2
+gRaySceneSmoke_Gfx:: @ 8DA3BC0
+ .incbin "graphics/rayquaza_scene/smoke.4bpp.lz"
+
+ .align 2
+gRaySceneSmoke_Pal:: @ 8DA3C7C
+ .incbin "graphics/rayquaza_scene/smoke.gbapal.lz"
-gUnknown_08DA33C0:: @ 8DA33C0
- .incbin "baserom.gba", 0xda33c0, 0x428
+ .align 2
+gRaySceneRayquaza_Gfx:: @ 8DA3C94
+ .incbin "graphics/rayquaza_scene/rayquaza.8bpp.lz"
-gUnknown_08DA37E8:: @ 8DA37E8
- .incbin "baserom.gba", 0xda37e8, 0x3c
+ .align 2
+gRaySceneRayquaza_Pal:: @ 8DA4DA8
+ .incbin "graphics/rayquaza_scene/rayquaza.gbapal.lz"
-gUnknown_08DA3824:: @ 8DA3824
- .incbin "baserom.gba", 0xda3824, 0x164
+ .align 2
+gRaySceneRayquaza_Tilemap:: @ 8DA4DEC
+ .incbin "graphics/rayquaza_scene/rayquaza.bin.lz"
-gUnknown_08DA3988:: @ 8DA3988
- .incbin "baserom.gba", 0xda3988, 0x100
+ .align 2
+gRaySceneOvercast_Gfx:: @ 8DA4F70
+ .incbin "graphics/rayquaza_scene/overcast.4bpp.lz" @ uses pal 2 of gRaySceneRayquaza_Pal
+
+ .align 2
+gRaySceneOvercast_Tilemap:: @ 8DA60B8
+ .incbin "graphics/rayquaza_scene/overcast.bin.lz"
+
+ .align 2
+gRaySceneRayquazaFly1_Gfx:: @ 8DA6440
+ .incbin "graphics/rayquaza_scene/rayquaza_fly1.4bpp.lz"
+
+ .align 2
+gRaySceneRayquazaTail_Gfx:: @ 8DA68AC
+ .incbin "graphics/rayquaza_scene/rayquaza_tail_fix.4bpp.lz" @ for some reason there are an extra 0xC bytes at the end of the original 4bpp, so in order to produce the correct lz, we have to cat the bytes at the end with a make rule. not sure why those bytes are there, it may have been a bug in Game Freak's software.
+
+ .align 2
+gRaySceneOvercast2_Gfx:: @ 8DA69BC
+ .incbin "graphics/rayquaza_scene/overcast2.4bpp.lz"
+
+ .align 2
+gRaySceneRayquazaLight_Gfx:: @ 8DA7528
+ .incbin "graphics/rayquaza_scene/rayquaza_light.4bpp.lz" @ uses pal 2 of gRaySceneOvercast2_Pal
+
+ .align 2
+gRaySceneOvercast2_Pal:: @ 8DA7744
+ .incbin "graphics/rayquaza_scene/overcast2.gbapal.lz"
+
+ .align 2
+gRaySceneOvercast2_Tilemap:: @ 8DA7784
+ .incbin "graphics/rayquaza_scene/overcast2.bin.lz"
-gUnknown_08DA3A88:: @ 8DA3A88
- .incbin "baserom.gba", 0xda3a88, 0x20c
+ .align 2
+gRaySceneRayquazaLight_Tilemap:: @ 8DA7AAC
+ .incbin "graphics/rayquaza_scene/rayquaza_light.bin.lz"
-gUnknown_08DA3C94:: @ 8DA3C94
- .incbin "baserom.gba", 0xda3c94, 0x1114
+ .align 2
+gRaySceneChaseBg_Gfx:: @ 8DA7C30
+ .incbin "graphics/rayquaza_scene/chase_bg.4bpp.lz"
-gUnknown_08DA4DA8:: @ 8DA4DA8
- .incbin "baserom.gba", 0xda4da8, 0x44
+ .align 2
+gRaySceneChaseBg_Tilemap:: @ 8DA7D6C
+ .incbin "graphics/rayquaza_scene/chase_bg.bin.lz"
-gUnknown_08DA4DEC:: @ 8DA4DEC
- .incbin "baserom.gba", 0xda4dec, 0x184
+ .align 2
+gRaySceneChaseStreaks_Gfx:: @ 8DA7EAC
+ .incbin "graphics/rayquaza_scene/chase_streaks.4bpp.lz"
-gUnknown_08DA4F70:: @ 8DA4F70
- .incbin "baserom.gba", 0xda4f70, 0x1148
+ .align 2
+gRaySceneChaseStreaks_Tilemap:: @ 8DA7FB4
+ .incbin "graphics/rayquaza_scene/chase_streaks.bin.lz"
-gUnknown_08DA60B8:: @ 8DA60B8
- .incbin "baserom.gba", 0xda60b8, 0x904
+ .align 2
+gRaySceneRayquazaChase_Gfx:: @ 8DA80BC
+ .incbin "graphics/rayquaza_scene/rayquaza_chase.4bpp.lz"
-gUnknown_08DA69BC:: @ 8DA69BC
- .incbin "baserom.gba", 0xda69bc, 0xb6c
+ .align 2
+gRayChaseRayquazaChase_Tilemap:: @ 8DA8B40
+ .incbin "graphics/rayquaza_scene/rayquaza_chase.bin.lz"
-gUnknown_08DA7528:: @ 8DA7528
- .incbin "baserom.gba", 0xda7528, 0x21c
+ .align 2
+gRayChaseRayquazaChase2_Tilemap:: @ 8DA8D6C
+ .incbin "graphics/rayquaza_scene/rayquaza_chase2.bin.lz"
-gUnknown_08DA7744:: @ 8DA7744
- .incbin "baserom.gba", 0xda7744, 0x40
+ .align 2
+gRaySceneChase_Pal:: @ 8DA8E84
+ .incbin "graphics/rayquaza_scene/chase.gbapal.lz"
-gUnknown_08DA7784:: @ 8DA7784
- .incbin "baserom.gba", 0xda7784, 0x328
+ .align 2
+gRaySceneGroudonLeft_Gfx:: @ 8DA8ED8
+ .incbin "graphics/rayquaza_scene/groudon_left.4bpp.lz"
-gUnknown_08DA7AAC:: @ 8DA7AAC
- .incbin "baserom.gba", 0xda7aac, 0x184
+ .align 2
+gRaySceneGroudonTail_Gfx:: @ 8DA9670
+ .incbin "graphics/rayquaza_scene/groudon_tail.4bpp.lz"
-gUnknown_08DA7C30:: @ 8DA7C30
- .incbin "baserom.gba", 0xda7c30, 0x13c
+ .align 2
+gRaySceneKyogreRight_Gfx:: @ 8DA96B4
+ .incbin "graphics/rayquaza_scene/kyogre_right.4bpp.lz"
-gUnknown_08DA7D6C:: @ 8DA7D6C
- .incbin "baserom.gba", 0xda7d6c, 0x140
+ .align 2
+gRaySceneRayquazaHover_Gfx:: @ 8DA98FC
+ .incbin "graphics/rayquaza_scene/rayquaza_hover.4bpp.lz"
-gUnknown_08DA7EAC:: @ 8DA7EAC
- .incbin "baserom.gba", 0xda7eac, 0x108
+ .align 2
+gRaySceneRayquazaFlyIn_Gfx:: @ 8DAA5A4
+ .incbin "graphics/rayquaza_scene/rayquaza_flyin.4bpp.lz"
-gUnknown_08DA7FB4:: @ 8DA7FB4
- .incbin "baserom.gba", 0xda7fb4, 0x108
+ .align 2
+gRaySceneSplash_Gfx:: @ 8DAA794
+ .incbin "graphics/rayquaza_scene/splash.4bpp.lz"
-gUnknown_08DA80BC:: @ 8DA80BC
- .incbin "baserom.gba", 0xda80bc, 0xa84
+ .align 2
+gRaySceneGroudonLeft_Pal:: @ 8DAA82C
+ .incbin "graphics/rayquaza_scene/groudon_left.gbapal.lz"
-gUnknown_08DA8B40:: @ 8DA8B40
- .incbin "baserom.gba", 0xda8b40, 0x22c
+ .align 2
+gRaySceneKyogreRight_Pal:: @ 8DAA854
+ .incbin "graphics/rayquaza_scene/kyogre_right.gbapal.lz"
-gUnknown_08DA8D6C:: @ 8DA8D6C
- .incbin "baserom.gba", 0xda8d6c, 0x118
+ .align 2
+gRaySceneRayquazaHover_Pal:: @ 8DAA87C
+ .incbin "graphics/rayquaza_scene/rayquaza_hover.gbapal.lz"
-gUnknown_08DA8E84:: @ 8DA8E84
- .incbin "baserom.gba", 0xda8e84, 0x1a30
+ .align 2
+gRaySceneSplash_Pal:: @ 8DAA8A4
+ .incbin "graphics/rayquaza_scene/splash.gbapal.lz"
-gUnknown_08DAA8B4:: @ 8DAA8B4
- .incbin "baserom.gba", 0xdaa8b4, 0x270
+ .align 2
+gRaySceneHushBg_Gfx:: @ 8DAA8B4
+ .incbin "graphics/rayquaza_scene/hush_bg.4bpp.lz"
-gUnknown_08DAAB24:: @ 8DAAB24
- .incbin "baserom.gba", 0xdaab24, 0xf8
+ .align 2
+gRaySceneHushRing_Gfx:: @ 8DAAB24
+ .incbin "graphics/rayquaza_scene/hush_ring.8bpp.lz"
-gUnknown_08DAAC1C:: @ 8DAAC1C
- .incbin "baserom.gba", 0xdaac1c, 0x238
+ .align 2
+gRaySceneHushBg_Tilemap:: @ 8DAAC1C
+ .incbin "graphics/rayquaza_scene/hush_bg.bin.lz"
-gUnknown_08DAAE54:: @ 8DAAE54
- .incbin "baserom.gba", 0xdaae54, 0x144
+ .align 2
+gRaySceneHushRing_Tilemap:: @ 8DAAE54
+ .incbin "graphics/rayquaza_scene/hush_ring.bin.lz"
-gUnknown_08DAAF98:: @ 8DAAF98
- .incbin "baserom.gba", 0xdaaf98, 0x54
+ .align 2
+gRaySceneHushRing_Map:: @ 8DAAF98
+ .incbin "graphics/rayquaza_scene/hush_ring_map.bin.lz"
-gUnknown_08DAAFEC:: @ 8DAAFEC
- .incbin "baserom.gba", 0xdaafec, 0x6c
+ .align 2
+gRaySceneHushBg_Pal:: @ 8DAAFEC
+ .incbin "graphics/rayquaza_scene/hush_bg.gbapal.lz"
@ 8DAB058
.include "data/graphics/items/item_graphics.inc"
@@ -1099,11 +3876,33 @@ gUnknown_08DAAFEC:: @ 8DAAFEC
@ 8DB7AA0
.include "data/graphics/decorations/decoration_graphics.inc"
-@ 8DBA14C
- .incbin "baserom.gba", 0xdba14c, 0x3cc
+ .align 2
+gBattleAnimSpritePalette_282:: @ 8E7E7D0
+ .incbin "graphics/battle_anims/sprites/282.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_282:: @ 8E7E7F8
+ .incbin "graphics/battle_anims/sprites/282.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_270:: @ 8E7E9E0
+ .incbin "graphics/battle_anims/sprites/270.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_270:: @ 8E7E9FC
+ .incbin "graphics/battle_anims/sprites/270.4bpp.lz"
+
+ .align 2
+gBattleAnimSpritePalette_271:: @ 8E7EB24
+ .incbin "graphics/battle_anims/sprites/271.gbapal.lz"
+
+ .align 2
+gBattleAnimSpriteSheet_271:: @ 8E7EB3C
+ .incbin "graphics/battle_anims/sprites/271.4bpp.lz"
+ .align 2
gUnknown_08DBA518:: @ 8DBA518
- .incbin "baserom.gba", 0xdba518, 0x80
+ .incbin "graphics/misc/cable_car_bg.gbapal"
.align 2
gCableCar_Pal:: @ 8DBA598
@@ -1111,7 +3910,7 @@ gCableCar_Pal:: @ 8DBA598
.align 2
gUnknown_08DBA5B8:: @ 8DBA5B8
- .incbin "baserom.gba", 0xdba5b8, 0x19d8
+ .incbin "graphics/misc/cable_car_bg.4bpp.lz"
.align 2
gCableCar_Gfx:: @ 8DBBF90
@@ -1126,206 +3925,303 @@ gCableCarCord_Gfx:: @ 8DBC2C0
.incbin "graphics/misc/cable_car_cord.4bpp.lz"
.align 2
-gUnknown_08DBC2E8:: @ 8DBC2E8
- .incbin "baserom.gba", 0xdbc2e8, 0x72c
+gRouletteMenuTiles:: @ 8DBC2E8
+ .incbin "graphics/roulette/window.4bpp.lz"
.align 2
-gRouletteWheelTiles:: @ 0x08DBCA14
+gRouletteWheelTiles::
.incbin "graphics/roulette/wheel.8bpp.lz"
.align 2
-gRouletteCenter_Gfx:: @ 0x08DBDABC
+gRouletteCenter_Gfx::
.incbin "graphics/roulette/center.4bpp.lz"
.align 2
-gRouletteHeadersTiles:: @ 0x08DBDE38
+gRouletteHeadersTiles:: @ 8E824BC
.incbin "graphics/roulette/headers.4bpp.lz"
.align 2
-gRouletteCreditTiles:: @ 0x08DBE45C
+gRouletteCreditTiles:: @ 8E82AE0
.incbin "graphics/roulette/credit.4bpp.lz"
.align 2
-gRouletteNumbersTiles:: @ 0x08DBE5AC
+gRouletteNumbersTiles:: @ 8E82C30
.incbin "graphics/roulette/numbers.4bpp.lz"
.align 2
-gRouletteMultiplierTiles:: @ 0x08DBE690
+gRouletteMultiplierTiles:: @ 8E82D14
.incbin "graphics/roulette/multiplier.4bpp.lz"
-gUnknown_08DBE818:: @ 0x08DBE818
- .incbin "baserom.gba", 0xdbe818, 0x20
+ .align 2
+gMailPalette_Orange:: @ 0x08DBE818
+ .incbin "graphics/mail/orange/palette.gbapal"
+
+ .align 2
+gMailPalette_Harbor:: @ 0x08DBE838
+ .incbin "graphics/mail/harbor/palette.gbapal"
-gUnknown_08DBE838:: @ 0x08DBE838
- .incbin "baserom.gba", 0xdbe838, 0x20
+ .align 2
+gMailPalette_Glitter:: @ 0x08DBE858
+ .incbin "graphics/mail/glitter/palette.gbapal"
-gUnknown_08DBE858:: @ 0x08DBE858
- .incbin "baserom.gba", 0xdbe858, 0x20
+ .align 2
+gMailPalette_Mech:: @ 0x08DBE878
+ .incbin "graphics/mail/mech/palette.gbapal"
-gUnknown_08DBE878:: @ 0x08DBE878
- .incbin "baserom.gba", 0xdbe878, 0x20
+ .align 2
+gMailPalette_Wood:: @ 0x08DBE898
+ .incbin "graphics/mail/wood/palette.gbapal"
-gUnknown_08DBE898:: @ 0x08DBE898
- .incbin "baserom.gba", 0xdbe898, 0x20
+ .align 2
+gMailPalette_Wave:: @ 0x08DBE8B8
+ .incbin "graphics/mail/wave/palette.gbapal"
-gUnknown_08DBE8B8:: @ 0x08DBE8B8
- .incbin "baserom.gba", 0xdbe8b8, 0x20
+ .align 2
+gMailPalette_Bead:: @ 0x08DBE8D8
+ .incbin "graphics/mail/bead/palette.gbapal"
-gUnknown_08DBE8D8:: @ 0x08DBE8D8
- .incbin "baserom.gba", 0xdbe8d8, 0x20
+ .align 2
+gMailPalette_Shadow:: @ 0x08DBE8F8
+ .incbin "graphics/mail/shadow/palette.gbapal"
-gUnknown_08DBE8F8:: @ 0x08DBE8F8
- .incbin "baserom.gba", 0xdbe8f8, 0x20
+ .align 2
+gMailPalette_Tropic:: @ 0x08DBE918
+ .incbin "graphics/mail/tropic/palette.gbapal"
-gUnknown_08DBE918:: @ 0x08DBE918
- .incbin "baserom.gba", 0xdbe918, 0x20
+ .align 2
+gMailPalette_Dream:: @ 0x08DBE938
+ .incbin "graphics/mail/dream/palette.gbapal"
+
+ .align 2
+gMailPalette_Fab:: @ 0x08DBE958
+ .incbin "graphics/mail/fab/palette.gbapal"
+
+ .align 2
+gMailPalette_Retro:: @ 0x08DBE978
+ .incbin "graphics/mail/retro/palette.gbapal"
+
+ .align 2
+gMailTiles_Orange:: @ 0x08DBE998
+ .incbin "graphics/mail/orange/tiles.4bpp.lz"
+
+ .align 2
+gMailTiles_Harbor:: @ 0x08DBEB38
+ .incbin "graphics/mail/harbor/tiles.4bpp.lz"
+
+ .align 2
+gMailTiles_Glitter:: @ 0x08DBEC74
+ .incbin "graphics/mail/glitter/tiles.4bpp.lz"
+
+ .align 2
+gMailTiles_Mech:: @ 0x08DBEE84
+ .incbin "graphics/mail/mech/tiles.4bpp.lz"
+
+ .align 2
+gMailTiles_Wood:: @ 0x08DBEF5C
+ .incbin "graphics/mail/wood/tiles.4bpp.lz"
-gUnknown_08DBE938:: @ 0x08DBE938
- .incbin "baserom.gba", 0xdbe938, 0x20
+ .align 2
+gMailTiles_Wave:: @ 0x08DBF154
+ .incbin "graphics/mail/wave/tiles.4bpp.lz"
-gUnknown_08DBE958:: @ 0x08DBE958
- .incbin "baserom.gba", 0xdbe958, 0x20
+ .align 2
+gMailTiles_Bead:: @ 0x08DBF2D4
+ .incbin "graphics/mail/bead/tiles.4bpp.lz"
-gUnknown_08DBE978:: @ 0x08DBE978
- .incbin "baserom.gba", 0xdbe978, 0x20
+ .align 2
+gMailTiles_Shadow:: @ 0x08DBF37C
+ .incbin "graphics/mail/shadow/tiles.4bpp.lz"
-gUnknown_08DBE998:: @ 0x08DBE998
- .incbin "baserom.gba", 0xdbe998, 0x1a0
+ .align 2
+gMailTiles_Tropic:: @ 0x08DBF50C
+ .incbin "graphics/mail/tropic/tiles.4bpp.lz"
-gUnknown_08DBEB38:: @ 0x08DBEB38
- .incbin "baserom.gba", 0xdbeb38, 0x13c
+ .align 2
+gMailTiles_Dream:: @ 0x08DBF64C
+ .incbin "graphics/mail/dream/tiles.4bpp.lz"
-gUnknown_08DBEC74:: @ 0x08DBEC74
- .incbin "baserom.gba", 0xdbec74, 0x210
+ .align 2
+gMailTiles_Fab:: @ 0x08DBF7B4
+ .incbin "graphics/mail/fab/tiles.4bpp.lz"
-gUnknown_08DBEE84:: @ 0x08DBEE84
- .incbin "baserom.gba", 0xdbee84, 0xd8
+ .align 2
+gMailTiles_Retro:: @ 0x08DBF904
+ .incbin "graphics/mail/retro/tiles.4bpp.lz"
-gUnknown_08DBEF5C:: @ 0x08DBEF5C
- .incbin "baserom.gba", 0xdbef5c, 0x1f8
+ .align 2
+gMailTilemap_Orange:: @ 0x08DBFBA4
+ .incbin "graphics/mail/orange/map.bin.lz"
-gUnknown_08DBF154:: @ 0x08DBF154
- .incbin "baserom.gba", 0xdbf154, 0x180
+ .align 2
+gMailTilemap_Harbor:: @ 0x08DBFC7C
+ .incbin "graphics/mail/harbor/map.bin.lz"
-gUnknown_08DBF2D4:: @ 0x08DBF2D4
- .incbin "baserom.gba", 0xdbf2d4, 0xa8
+ .align 2
+gMailTilemap_Glitter:: @ 0x08DBFD5C
+ .incbin "graphics/mail/glitter/map.bin.lz"
-gUnknown_08DBF37C:: @ 0x08DBF37C
- .incbin "baserom.gba", 0xdbf37c, 0x190
+ .align 2
+gMailTilemap_Mech:: @ 0x08DBFE68
+ .incbin "graphics/mail/mech/map.bin.lz"
-gUnknown_08DBF50C:: @ 0x08DBF50C
- .incbin "baserom.gba", 0xdbf50c, 0x140
+ .align 2
+gMailTilemap_Wood:: @ 0x08DBFF44
+ .incbin "graphics/mail/wood/map.bin.lz"
-gUnknown_08DBF64C:: @ 0x08DBF64C
- .incbin "baserom.gba", 0xdbf64c, 0x168
+ .align 2
+gMailTilemap_Wave:: @ 0x08DC0034
+ .incbin "graphics/mail/wave/map.bin.lz"
-gUnknown_08DBF7B4:: @ 0x08DBF7B4
- .incbin "baserom.gba", 0xdbf7b4, 0x150
+ .align 2
+gMailTilemap_Bead:: @ 0x08DC0114
+ .incbin "graphics/mail/bead/map.bin.lz"
-gUnknown_08DBF904:: @ 0x08DBF904
- .incbin "baserom.gba", 0xdbf904, 0x2a0
+ .align 2
+gMailTilemap_Shadow:: @ 0x08DC01F4
+ .incbin "graphics/mail/shadow/map.bin.lz"
-gUnknown_08DBFBA4:: @ 0x08DBFBA4
- .incbin "baserom.gba", 0xdbfba4, 0xd8
+ .align 2
+gMailTilemap_Tropic:: @ 0x08DC0300
+ .incbin "graphics/mail/tropic/map.bin.lz"
-gUnknown_08DBFC7C:: @ 0x08DBFC7C
- .incbin "baserom.gba", 0xdbfc7c, 0xe0
+ .align 2
+gMailTilemap_Dream:: @ 0x08DC03F0
+ .incbin "graphics/mail/dream/map.bin.lz"
-gUnknown_08DBFD5C:: @ 0x08DBFD5C
- .incbin "baserom.gba", 0xdbfd5c, 0x10c
+ .align 2
+gMailTilemap_Fab:: @ 0x08DC04E8
+ .incbin "graphics/mail/fab/map.bin.lz"
-gUnknown_08DBFE68:: @ 0x08DBFE68
- .incbin "baserom.gba", 0xdbfe68, 0xdc
+ .align 2
+gMailTilemap_Retro:: @ 0x08DC0600
+ .incbin "graphics/mail/retro/map.bin.lz"
-gUnknown_08DBFF44:: @ 0x08DBFF44
- .incbin "baserom.gba", 0xdbff44, 0xf0
+ .align 2
+gFrontierFactorySelectMenu_Pal:: @ 8DC0714
+ .incbin "graphics/battle_frontier/factory_menu1.gbapal"
+ .incbin "graphics/battle_frontier/factory_menu2.gbapal"
-gUnknown_08DC0034:: @ 0x08DC0034
- .incbin "baserom.gba", 0xdc0034, 0xe0
+ .align 2
+gFrontierFactorySelectMenu_Gfx:: @ 8DC0754
+ .incbin "graphics/battle_frontier/factory_menu1.4bpp"
+ .incbin "graphics/battle_frontier/factory_menu2.4bpp"
-gUnknown_08DC0114:: @ 0x08DC0114
- .incbin "baserom.gba", 0xdc0114, 0xe0
+ .align 2
+gFrontierFactorySelectMenu_Tilemap:: @ 8DC0B94
+ .incbin "graphics/battle_frontier/factory_menu.bin"
-gUnknown_08DC01F4:: @ 0x08DC01F4
- .incbin "baserom.gba", 0xdc01f4, 0x10c
+ .align 2
+gFrontierPassMedals_Gfx:: @ 8DC1394
+ .incbin "graphics/frontier_pass/medals.4bpp.lz" @ battle frontier medals
-gUnknown_08DC0300:: @ 0x08DC0300
- .incbin "baserom.gba", 0xdc0300, 0xf0
+ .align 2
+gFrontierPassCursor_Pal:: @ 8DC1674
+ .incbin "graphics/frontier_pass/cursor.gbapal" @ frontier pass cursor pal
-gUnknown_08DC03F0:: @ 0x08DC03F0
- .incbin "baserom.gba", 0xdc03f0, 0xf8
+ .align 2
+gFrontierPassMapCursor_Pal:: @ 8DC1694
+ .incbin "graphics/frontier_pass/map_cursor.gbapal" @ frontier pass map cursor pal
-gUnknown_08DC04E8:: @ 0x08DC04E8
- .incbin "baserom.gba", 0xdc04e8, 0x118
+ .align 2
+gFrontierPassMedalsSilver_Pal:: @ 8DC16B4
+ .incbin "graphics/frontier_pass/silver.gbapal"
-gUnknown_08DC0600:: @ 0x08DC0600
- .incbin "baserom.gba", 0xdc0600, 0x114
+ .align 2
+gFrontierPassMedalsGold_Pal:: @ 8DC16D4
+ .incbin "graphics/frontier_pass/gold.gbapal"
-gUnknown_08DC0714:: @ 8DC0714
- .incbin "baserom.gba", 0xdc0714, 0x40
+ .align 2
+gPokedexText_Pal:: @ 8DC16F4
+ .incbin "graphics/pokedex/text.gbapal"
-gUnknown_08DC0754:: @ 8DC0754
- .incbin "baserom.gba", 0xdc0754, 0x440
+ .align 2
+gPokedexCaughtScreenFade_Pal:: @ 8DC1756
+ .incbin "graphics/pokedex/fade.gbapal"
-gUnknown_08DC0B94:: @ 8DC0B94
- .incbin "baserom.gba", 0xdc0b94, 0xb62
+ .align 2
+gPokedexHoennBg_Pal:: @ 8DC17B6
+ .incbin "graphics/pokedex/hoenn_bg.gbapal"
-gUnknown_08DC16F6:: @ 8DC16F6
- .incbin "baserom.gba", 0xdc16f6, 0x60
+ .align 2
+gPokedexNationalBg_Pal:: @ 8DC1876
+ .incbin "graphics/pokedex/national_bg.gbapal"
-gUnknown_08DC1756:: @ 8DC1756
- .incbin "baserom.gba", 0xdc1756, 0x60
+ .align 2
+gPokedexMenu_Gfx:: @ 8DC1934
+ .incbin "graphics/pokedex/menu.4bpp.lz"
-gUnknown_08DC17B6:: @ 8DC17B6
- .incbin "baserom.gba", 0xdc17b6, 0xc0
+ .align 2
+gPokedexMenu2_Gfx:: @ 8DC234C
+ .incbin "graphics/pokedex/menu2.4bpp.lz"
-gUnknown_08DC1876:: @ 8DC1876
- .incbin "baserom.gba", 0xdc1876, 0xbe
+ .align 2
+ .incbin "graphics/pokedex/noball_unused.4bpp.lz" @ unused
-gUnknown_08DC1934:: @ 8DC1934
- .incbin "baserom.gba", 0xdc1934, 0x10d4
+ @ these are a series of 9 tilemaps used for something pokedex related.
+ .align 2
gUnknown_08DC2A08:: @ 8DC2A08
- .incbin "baserom.gba", 0xdc2a08, 0x114
+ .incbin "graphics/pokedex/tilemap1.bin.lz"
+ .align 2
gUnknown_08DC2B1C:: @ 8DC2B1C
- .incbin "baserom.gba", 0xdc2b1c, 0x140
+ .incbin "graphics/pokedex/tilemap2.bin.lz"
+ .align 2
gUnknown_08DC2C5C:: @ 8DC2C5C
- .incbin "baserom.gba", 0xdc2c5c, 0x150
+ .incbin "graphics/pokedex/tilemap3.bin.lz"
+ .align 2
gUnknown_08DC2DAC:: @ 8DC2DAC
- .incbin "baserom.gba", 0xdc2dac, 0xc0
+ .incbin "graphics/pokedex/tilemap4.bin.lz"
+ .align 2
gUnknown_08DC2E6C:: @ 8DC2E6C
- .incbin "baserom.gba", 0xdc2e6c, 0xf0
+ .incbin "graphics/pokedex/tilemap5.bin.lz"
+ .align 2
gUnknown_08DC2F5C:: @ 8DC2F5C
- .incbin "baserom.gba", 0xdc2f5c, 0x90
+ .incbin "graphics/pokedex/tilemap6.bin.lz"
+ .align 2
gUnknown_08DC2FEC:: @ 8DC2FEC
- .incbin "baserom.gba", 0xdc2fec, 0x94
+ .incbin "graphics/pokedex/tilemap7.bin.lz"
+ .align 2
gUnknown_08DC3080:: @ 8DC3080
- .incbin "baserom.gba", 0xdc3080, 0x118
+ .incbin "graphics/pokedex/tilemap8.bin.lz"
+ .align 2
gUnknown_08DC3198:: @ 8DC3198
- .incbin "baserom.gba", 0xdc3198, 0xee
+ .incbin "graphics/pokedex/tilemap9.bin.lz" @ all tilemaps
-gUnknown_08DC3286:: @ 8DC3286
- .incbin "baserom.gba", 0xdc3286, 0x7e
+ .align 2
+gPokedexSearchMenu_Pal:: @ 8DC3284
+ .incbin "graphics/pokedex/search_menu.gbapal"
-gUnknown_08DC3304:: @ 8DC3304
- .incbin "baserom.gba", 0xdc3304, 0x56c
+ .align 2
+gPokedexSearchMenu_Gfx:: @ 8DC3304
+ .incbin "graphics/pokedex/search_menu.4bpp.lz"
-gUnknown_08DC3870:: @ 8DC3870
- .incbin "baserom.gba", 0xdc3870, 0x19c
+ .align 2
+gPokedexSearch1_Tilemap:: @ 8DC3870
+ .incbin "graphics/pokedex/search1.bin.lz"
-gUnknown_08DC3A0C:: @ 8DC3A0C
- .incbin "baserom.gba", 0xdc3a0c, 0x2c8
+ .align 2
+gPokedexSearch2_Tilemap:: @ 8DC3A0C
+ .incbin "graphics/pokedex/search2.bin.lz"
-gUnknown_08DC3CD4:: @ 8DC3CD4
- .incbin "baserom.gba", 0xdc3cd4, 0x80
+ .align 2
+gSummaryScreenPowAcc_Tilemap:: @ 8DC3B94
+ .incbin "graphics/interface/powacc_tilemap.bin" @ pow/acc tilemap
+
+ .align 2
+gUnknown_08DC3C34:: @ 8DC3C34
+ .incbin "graphics/interface/unk_tilemap.bin" @ probably trade summary screen related? cant check
+
+ .align 2
+gSummaryScreenWindow_Tilemap:: @ 8DC3CD4
+ .incbin "graphics/interface/summary.bin"
.align 2
gIntroCopyright_Pal:: @ 8DC3D54
@@ -1340,291 +4236,662 @@ gIntroCopyright_Tilemap:: @ 8DC3FD4
.incbin "graphics/intro/copyright.bin.lz"
.align 2
-gUnknown_08DC4120:: @ 8DC4120
- .incbin "baserom.gba", 0xdc4120, 0x20
+gPokedexAreaScreenAreaUnknown_Pal:: @ 8DC4120
+ .incbin "graphics/pokedex/area_unknown.gbapal"
-gUnknown_08DC4140:: @ 8DC4140
- .incbin "baserom.gba", 0xdc4140, 0x1d8
+ .align 2
+gPokedexAreaScreenAreaUnknown_Gfx:: @ 8DC4140
+ .incbin "graphics/pokedex/area_unknown.4bpp.lz"
-gUnknown_08DC4318:: @ 8DC4318
- .incbin "baserom.gba", 0xdc4318, 0x20
+ @ seems to be fire red leftovers, but the menu elements is reused in the item menu for TM descriptions.
-gUnknown_08DC4338:: @ 8DC4338
- .incbin "baserom.gba", 0xdc4338, 0x20
+ .align 2
+gFireRedMenuElements1_Pal:: @ 8DC4318
+ .incbin "graphics/interface_fr/menu1.gbapal"
-gUnknown_08DC4358:: @ 8DC4358
- .incbin "baserom.gba", 0xdc4358, 0x20
+ .align 2
+gFireRedMenuElements2_Pal:: @ 8DC4338
+ .incbin "graphics/interface_fr/menu2.gbapal"
-gUnknown_08DC4378:: @ 8DC4378
- .incbin "baserom.gba", 0xdc4378, 0x2000
+ .align 2
+gFireRedMenuElements3_Pal:: @ 8DC4358
+ .incbin "graphics/interface_fr/menu3.gbapal"
+
+ .align 2
+gFireRedMenuElements_Gfx:: @ 8DC4378
+ .incbin "graphics/interface_fr/menu.4bpp" @ the types are reused for item menu
-gUnknown_08DC6378:: @ 8DC6378
- .incbin "baserom.gba", 0xdc6378, 0x80
+ .align 2
+gBagMenuHMIcon_Gfx:: @ 8DC6378
+ .incbin "graphics/interface/hm.4bpp"
+ @ contest link stuff, appears to be a set of tilemaps
+
+ .align 2
gUnknown_08DC63F8:: @ 8DC63F8
- .incbin "baserom.gba", 0xdc63f8, 0x28
+ .incbin "graphics/contest/clink_tilemap1.bin"
+ .align 2
gUnknown_08DC6420:: @ 8DC6420
- .incbin "baserom.gba", 0xdc6420, 0x28
+ .incbin "graphics/contest/clink_tilemap2.bin"
+ .align 2
gUnknown_08DC6448:: @ 8DC6448
- .incbin "baserom.gba", 0xdc6448, 0x28
+ .incbin "graphics/contest/clink_tilemap3.bin"
+ .align 2
gUnknown_08DC6470:: @ 8DC6470
- .incbin "baserom.gba", 0xdc6470, 0x28
+ .incbin "graphics/contest/clink_tilemap4.bin"
+ .align 2
gUnknown_08DC6498:: @ 8DC6498
- .incbin "baserom.gba", 0xdc6498, 0x14
+ .incbin "graphics/contest/clink_tilemap5.bin"
+ .align 2
gUnknown_08DC64AC:: @ 8DC64AC
- .incbin "baserom.gba", 0xdc64ac, 0x14
+ .incbin "graphics/contest/clink_tilemap6.bin"
+ .align 2
gUnknown_08DC64C0:: @ 8DC64C0
- .incbin "baserom.gba", 0xdc64c0, 0x14
+ .incbin "graphics/contest/clink_tilemap7.bin"
+ .align 2
gUnknown_08DC64D4:: @ 8DC64D4
- .incbin "baserom.gba", 0xdc64d4, 0x14
+ .incbin "graphics/contest/clink_tilemap8.bin"
+ .align 2
gUnknown_08DC64E8:: @ 8DC64E8
- .incbin "baserom.gba", 0xdc64e8, 0x14
+ .incbin "graphics/contest/clink_tilemap9.bin"
+ .align 2
gUnknown_08DC64FC:: @ 8DC64FC
- .incbin "baserom.gba", 0xdc64fc, 0x14
+ .incbin "graphics/contest/clink_tilemap10.bin"
+ .align 2
gUnknown_08DC6510:: @ 8DC6510
- .incbin "baserom.gba", 0xdc6510, 0x18
+ .incbin "graphics/contest/clink_tilemap11.bin"
-gUnknown_08DC6528:: @ 8DC6528
- .incbin "baserom.gba", 0xdc6528, 0x20
+ @ pokenav
-gUnknown_08DC6548:: @ 8DC6548
- .incbin "baserom.gba", 0xdc6548, 0x8b4
+ .align 2
+gPokenavCondition_Pal:: @ 8DC6528
+ .incbin "graphics/pokenav/condition.gbapal"
-gUnknown_08DC6DFC:: @ 8DC6DFC
- .incbin "baserom.gba", 0xdc6dfc, 0x274
+ .align 2
+gPokenavCondition_Gfx:: @ 8DC6548
+ .incbin "graphics/pokenav/condition.4bpp.lz"
-gUnknown_08DC7070:: @ 8DC7070
- .incbin "baserom.gba", 0xdc7070, 0xaf0
+ .align 2
+gPokenavCondition_Tilemap:: @ 8DC6DFC
+ .incbin "graphics/pokenav/condition.bin.lz"
-gUnknown_08DC7B60:: @ 8DC7B60
- .incbin "baserom.gba", 0xdc7b60, 0x20
+ .align 2
+gPokenavOptions_Tilemap:: @ 8DC7070
+ .incbin "graphics/pokenav/options/options.bin"
-gUnknown_08DC7B80:: @ 8DC7B80
- .incbin "baserom.gba", 0xdc7b80, 0x204
+ .align 2
+gPokenavOptions_Gfx::
+ .incbin "graphics/pokenav/options/options.4bpp.lz"
-gUnknown_08DC7D84:: @ 8DC7D84
- .incbin "baserom.gba", 0xdc7d84, 0x17c
+ .align 2
+gPokenavOptions_Pal::
+ .incbin "graphics/pokenav/options/options.gbapal"
-gUnknown_08DC7F00:: @ 8DC7F00
- .incbin "baserom.gba", 0xdc7f00, 0x11c0
+ .align 2
+gPokenavHeader_Pal:: @ 8DC7B60
+ .incbin "graphics/pokenav/header.gbapal"
-gUnknown_08DC90C0:: @ 8DC90C0
- .incbin "baserom.gba", 0xdc90c0, 0x20
+ .align 2
+gPokenavHeader_Gfx:: @ 8DC7B80
+ .incbin "graphics/pokenav/header.4bpp.lz" @ TODO: use width 9 and makefile rule for cleanliness, make wasnt behaving, didnt want to apply num_tiles to this
+
+ .align 2
+gPokenavHeader_Tilemap:: @ 8DC7D84
+ .incbin "graphics/pokenav/header.bin.lz"
-gUnknown_08DC90E0:: @ 8DC90E0
- .incbin "baserom.gba", 0xdc90e0, 0x50
+ .align 2
+gPokenavLeftHeader_Pal:: @ 8DC7F00
+ .incbin "graphics/pokenav/left_headers/palette.gbapal"
-gUnknown_08DC9130:: @ 8DC9130
- .incbin "baserom.gba", 0xdc9130, 0xb8
+ .align 2
+gPokenavLeftHeaderBeauty_Gfx:: @ 8DC7FA0
+ .incbin "graphics/pokenav/left_headers/beauty.4bpp.lz"
-gUnknown_08DC91E8:: @ 8DC91E8
- .incbin "baserom.gba", 0xdc91e8, 0x420
+ .align 2
+gPokenavLeftHeaderSmart_Gfx:: @ 8DC80DC
+ .incbin "graphics/pokenav/left_headers/smart.4bpp.lz"
-gUnknown_08DC9608:: @ 8DC9608
- .incbin "baserom.gba", 0xdc9608, 0x20
+ .align 2
+gPokenavLeftHeaderCondition_Gfx:: @ 8DC8208
+ .incbin "graphics/pokenav/left_headers/condition.4bpp.lz"
-gUnknown_08DC9628:: @ 8DC9628
- .incbin "baserom.gba", 0xdc9628, 0x320
-
+ .align 2
+gPokenavLeftHeaderCute_Gfx:: @ 8DC838C
+ .incbin "graphics/pokenav/left_headers/cute.4bpp.lz"
+
+ .align 2
+gPokenavLeftHeaderMatchCall_Gfx:: @ 8DC84AC
+ .incbin "graphics/pokenav/left_headers/match_call.4bpp.lz"
+
+ .align 2
+gPokenavLeftHeaderMainMenu_Gfx:: @ 8DC864C
+ .incbin "graphics/pokenav/left_headers/main_menu.4bpp.lz"
+
+ .align 2
+gPokenavLeftHeaderHoennMap_Gfx:: @ 8DC87F8
+ .incbin "graphics/pokenav/left_headers/hoenn_map.4bpp.lz"
+
+ .align 2
+gPokenavLeftHeaderRibbons_Gfx:: @ 8DC8AA4
+ .incbin "graphics/pokenav/left_headers/ribbons.4bpp.lz"
+
+ .align 2
+gPokenavLeftHeaderSearch_Gfx:: @ 8DC8C14
+ .incbin "graphics/pokenav/left_headers/search.4bpp.lz"
+
+ .align 2
+gPokenavLeftHeaderTough_Gfx:: @ 8DC8D50
+ .incbin "graphics/pokenav/left_headers/tough.4bpp.lz"
+
+ .align 2
+gPokenavLeftHeaderCool_Gfx:: @ 8DC8E64
+ .incbin "graphics/pokenav/left_headers/cool.4bpp.lz"
+
+ .align 2
+gPokenavLeftHeaderParty_Gfx:: @ 8DC8F64
+ .incbin "graphics/pokenav/left_headers/party.4bpp.lz"
+
+ .align 2
+gPokenavMessageBox_Pal:: @ 8DC90C0
+ .incbin "graphics/pokenav/message.gbapal"
+
+ .align 2
+gPokenavMessageBox_Gfx:: @ 8DC90E0
+ .incbin "graphics/pokenav/message.4bpp.lz"
+
+ .align 2
+gPokenavMessageBox_Tilemap:: @ 8DC9130
+ .incbin "graphics/pokenav/message.bin.lz"
+
+ .align 2
+gHoennMapZoomIcons_Pal:: @ 8DC91E8
+ .incbin "graphics/pokenav/zoom.gbapal"
+
+ .align 2
+gHoennMapZoomIcons_Gfx:: @ 8DC9208
+ .incbin "graphics/pokenav/zoom.4bpp.lz"
+
+ .align 2
+gPokenavConditionCancel_Pal::
+ .incbin "graphics/pokenav/cancel.gbapal"
+
+ .align 2
+gPokenavConditionCancel_Gfx::
+ .incbin "graphics/pokenav/cancel.4bpp"
+
+ .align 2
+gPokenavConditionMarker_Pal:: @ 8DC9608
+ .incbin "graphics/pokenav/marker.gbapal"
+
+ .align 2
+gPokenavConditionMarker_Gfx:: @ 8DC9628
+ .incbin "graphics/pokenav/marker.4bpp"
+
+ .align 2
gBerryBlenderMiscPalette:: @ 8DCAB88
.incbin "graphics/berry_blender/misc.gbapal"
-
+
+ .align 2
gBerryBlenderArrowPalette:: @ 8DC9948
.incbin "graphics/berry_blender/arrow.gbapal"
-gUnknown_8DC9988:: @ 8DC9988
- .incbin "baserom.gba", 0xdc9988, 0x200
-
+ .align 2
+gBerryBlenderBetaArrow_Gfx:: @ 8DC9988
+ .incbin "graphics/berry_blender/arrow_old.4bpp" @ unused
+
.align 2
gBerryBlenderMarubatsuTiles:: @ 8DC9B88
.incbin "graphics/berry_blender/marubatsu.4bpp"
-
+
.align 2
gBerryBlenderParticlesTiles:: @ 8E90818
.incbin "graphics/berry_blender/particles.4bpp"
-
+
.space 0x120
.align 2
gBerryBlenderCountdownNumbersTiles:: @ 8DC9F88
.incbin "graphics/berry_blender/countdown_numbers.4bpp"
-
+
.align 2
gBerryBlenderStartTiles:: @ 8DCA588
.incbin "graphics/berry_blender/start.4bpp"
-
+
.space 0x200
-
- .align 2
+
+ .align 2
gBerryBlenderArrowTiles:: @ 8DCAB88
.incbin "graphics/berry_blender/arrow.4bpp"
- .align 2
-gUnknown_08DCB388:: @ 8DCB388
- .incbin "baserom.gba", 0xdcb388, 0x2C0
+ .space 0x2C0
- .align 2
-gUnknown_08DCB648:: @ 8DCB648
- .incbin "baserom.gba", 0xdcb648, 0x20
+ .align 2
+gEasyChatCursor_Pal:: @ 8DCB648
+ .incbin "graphics/easy_chat/cursor.gbapal"
- .align 2
-gUnknown_08DCB668:: @ 8DCB668
- .incbin "baserom.gba", 0xdcb668, 0x204
+ .align 2
+gEasyChatCursor_Gfx:: @ 8DCB668
+ .incbin "graphics/easy_chat/cursor.4bpp.lz"
- .align 2
-gUnknown_08DCB86C:: @ 8DCB86C
- .incbin "baserom.gba", 0xdcb86C, 0x20
+ .align 2
+gEasyChatRightWindow_Pal:: @ 8DCB86C
+ .incbin "graphics/easy_chat/rwindow.gbapal"
- .align 2
-gUnknown_08DCB88C:: @ 8DCB88C
- .incbin "baserom.gba", 0xdcb88C, 0x224
+ .align 2
+gEasyChatRightWindow_Gfx:: @ 8DCB88C
+ .incbin "graphics/easy_chat/rwindow.4bpp.lz"
- .align 2
-gUnknown_08DCBAB0:: @ 8DCBAB0
- .incbin "baserom.gba", 0xdcbab0, 0x300
+ .align 2
+gEasyChatMode_Gfx:: @ 8DCBAB0
+ .incbin "graphics/easy_chat/mode.4bpp.lz"
- .align 2
-gUnknown_08DCBDB0:: @ 8DCBDB0
- .incbin "baserom.gba", 0xdcbdb0, 0x20
+ .align 2
+gEasyChatMode_Pal:: @ 8DCBDB0
+ .incbin "graphics/easy_chat/mode.gbapal"
-gUnknown_08DCBDD0:: @ 8DCBDD0
- .incbin "baserom.gba", 0xdcbdd0, 0x140
+ .align 2
+gEasyChatWindow_Gfx:: @ 8DCBDD0
+ .incbin "graphics/easy_chat/window.4bpp.lz" @ uses mode pal
-gUnknown_08DCBF10:: @ 8DCBF10
- .incbin "baserom.gba", 0xdcbf10, 0x10c
+ .align 2
+gEasyChatWindow_Tilemap:: @ 8DCBF10
+ .incbin "graphics/easy_chat/window.bin.lz"
-gUnknown_08DCC01C:: @ 8DCC01C
- .incbin "baserom.gba", 0xdcc01c, 0x20
+ .align 2
+gWallclockMale_Pal:: @ 8DCC01C
+ .incbin "graphics/interface/wallclock_male.gbapal"
-gUnknown_08DCC03C:: @ 8DCC03C
- .incbin "baserom.gba", 0xdcc03c, 0x20
+ .align 2
+gWallclockFemale_Pal:: @ 8DCC03C
+ .incbin "graphics/interface/wallclock_female.gbapal"
-gUnknown_08DCC05C:: @ 8DCC05C
- .incbin "baserom.gba", 0xdcc05c, 0x5ec
+ .align 2
+gWallclock_Gfx:: @ 8DCC05C
+ .incbin "graphics/interface/wallclock.4bpp.lz"
+ .align 2
gUnknown_08DCC648:: @ 8DCC648
- .incbin "baserom.gba", 0xdcc648, 0x2c0
+ .incbin "graphics/interface/wallclock1.bin.lz"
+ .align 2
gUnknown_08DCC908:: @ 8DCC908
- .incbin "baserom.gba", 0xdcc908, 0x2b0
+ .incbin "graphics/interface/wallclock2.bin.lz"
+
+ .align 2
+gUsePokeblockCondition_Pal:: @ 8DCCB98
+ .incbin "graphics/pokeblock/use_screen/condition.gbapal"
-gUnknown_08DCCBB8:: @ 8DCCBB8
- .incbin "baserom.gba", 0xdccbb8, 0x3a4
+ .align 2
+gUsePokeblockCondition_Gfx:: @ 8DCCBB8
+ .incbin "graphics/pokeblock/use_screen/condition.4bpp.lz"
+
+ .align 2
+gUsePokeblockUpDown_Pal:: @ 8DCCD3C
+ .incbin "graphics/pokeblock/use_screen/updown.gbapal"
+
+ .align 2
+gUsePokeblockUpDown_Gfx:: @ 8DCCD5C
+ .incbin "graphics/pokeblock/use_screen/updown.4bpp"
+
+ .align 2
+gUsePokeblockGraph_Pal:: @ 8DCCF5C
+ .incbin "graphics/pokeblock/use_screen/graph.gbapal"
-gUnknown_08DCCF5C:: @ 8DCCF5C
- .incbin "baserom.gba", 0xdccf5c, 0x20
+ .align 2
+gUsePokeblockGraph_Gfx:: @ 8DCCF7C
+ .incbin "graphics/pokeblock/use_screen/graph.4bpp.lz"
-gUnknown_08DCCF7C:: @ 8DCCF7C
- .incbin "baserom.gba", 0xdccf7c, 0x8a0
+ .align 2
+gUsePokeblockGraph_Tilemap:: @ 8DCD81C
+ .incbin "graphics/pokeblock/use_screen/graph.bin.lz"
-gUnknown_08DCD81C:: @ 8DCD81C
- .incbin "baserom.gba", 0xdcd81c, 0x214
+ .align 2
+gUsePokeblockNatureWin_Pal:: @ 8DCDA30
+ .incbin "graphics/pokeblock/use_screen/nature.gbapal"
-gUnknown_08DCDA30:: @ 8DCDA30
- .incbin "baserom.gba", 0xdcda30, 0x60
+ @ slot machine
-gUnknown_08DCDA90:: @ 8DCDA90
- .incbin "baserom.gba", 0xdcda90, 0xa0
+ .align 2
+gSlotMachineMenu_Pal:: @ 8DCDA90
+ .incbin "graphics/slot_machine/menu.gbapal"
-gUnknown_08DCDB30:: @ 8DCDB30
- .incbin "baserom.gba", 0xdcdb30, 0xc40
+ .align 2
+gSlotMachineMenu_Gfx:: @ 8DCDB30
+ .incbin "graphics/slot_machine/menu.4bpp.lz"
-gUnknown_08DCE770:: @ 8DCE770
- .incbin "baserom.gba", 0xdce770, 0x500
+ .align 2
+gSlotMachineMenu_Tilemap:: @ 8DCE770
+ .incbin "graphics/slot_machine/menu.bin"
+ .align 2
gUnknown_08DCEC70:: @ 8DCEC70
- .incbin "baserom.gba", 0xdcec70, 0x13e0
+ .incbin "graphics/slot_machine/slots_layout.bin"
+
+ .align 2
+gUnknown_08DCF170::
+ .incbin "graphics/slot_machine/reel_symbols/1.gbapal"
+
+ .align 2
+gUnknown_08DCF190::
+ .incbin "graphics/slot_machine/reel_pikachu.gbapal"
+
+ .align 2
+gUnknown_08DCF1B0::
+ .incbin "graphics/slot_machine/shadow.gbapal"
+
+ .align 2
+gSlotMachineReelTime_Pal::
+ .incbin "graphics/slot_machine/reel_time.gbapal"
+
+ .align 2
+gUnknown_08DCF1F0::
+ .incbin "graphics/slot_machine/smoke.gbapal" @ also duck and pika aura
+
+ .align 2
+gUnknown_08DCF210::
+ .incbin "graphics/slot_machine/reel_time_explosion/0.gbapal"
+
+ .align 2
+gUnknown_08DCF230::
+ .incbin "graphics/slot_machine/spr6.gbapal" @ huh?
+
+ .align 2
+gSlotMachineReelSymbol1Tiles:: @ 8DCF250
+ .incbin "graphics/slot_machine/reel_symbols/1.4bpp"
+
+ .align 2
+gSlotMachineReelSymbol2Tiles::
+ .incbin "graphics/slot_machine/reel_symbols/2.4bpp"
+
+ .align 2
+gSlotMachineReelSymbol3Tiles::
+ .incbin "graphics/slot_machine/reel_symbols/3.4bpp"
+
+ .align 2
+gSlotMachineReelSymbol4Tiles::
+ .incbin "graphics/slot_machine/reel_symbols/4.4bpp"
+
+ .align 2
+gSlotMachineReelSymbol5Tiles::
+ .incbin "graphics/slot_machine/reel_symbols/5.4bpp"
+
+ .align 2
+gSlotMachineReelSymbol6Tiles::
+ .incbin "graphics/slot_machine/reel_symbols/6.4bpp"
+
+ .align 2
+gSlotMachineReelSymbol7Tiles::
+ .incbin "graphics/slot_machine/reel_symbols/7.4bpp"
+
+ .align 2
+gSlotMachineReelTime_Gfx:: @ 8DD0050
+ .incbin "graphics/slot_machine/reel_time.4bpp.lz"
+
+ .align 2
+gSlotMachineNumber0Tiles::
+ .incbin "graphics/slot_machine/numbers/0.4bpp"
+
+ .align 2
+gSlotMachineNumber1Tiles::
+ .incbin "graphics/slot_machine/numbers/1.4bpp"
+
+ .align 2
+gSlotMachineNumber2Tiles::
+ .incbin "graphics/slot_machine/numbers/2.4bpp"
+
+ .align 2
+gSlotMachineNumber3Tiles::
+ .incbin "graphics/slot_machine/numbers/3.4bpp"
+
+ .align 2
+gSlotMachineNumber4Tiles::
+ .incbin "graphics/slot_machine/numbers/4.4bpp"
+
+ .align 2
+gSlotMachineNumber5Tiles::
+ .incbin "graphics/slot_machine/numbers/5.4bpp"
+
+ .align 2
+gSlotMachineNumber6Tiles::
+ .incbin "graphics/slot_machine/numbers/6.4bpp"
+
+ .align 2
+gSlotMachineNumber7Tiles::
+ .incbin "graphics/slot_machine/numbers/7.4bpp"
+
+ .align 2
+gSlotMachineNumber8Tiles::
+ .incbin "graphics/slot_machine/numbers/8.4bpp"
+
+ .align 2
+gSlotMachineNumber9Tiles::
+ .incbin "graphics/slot_machine/numbers/9.4bpp"
+
+ .align 2
+gSlotMachineReelTimeBolt::
+ .incbin "graphics/slot_machine/bolt.4bpp"
+
+ .align 2
+gSlotMachineReelTimeDuck::
+ .incbin "graphics/slot_machine/duck.4bpp"
+
+ .align 2
+gSlotMachineReelTimeSmoke::
+ .incbin "graphics/slot_machine/smoke.4bpp"
+
+ .align 2
+gSlotMachineReelTimeNumber0::
+ .incbin "graphics/slot_machine/reel_time_numbers/0.4bpp"
+
+ .align 2
+gSlotMachineReelTimeNumber1::
+ .incbin "graphics/slot_machine/reel_time_numbers/1.4bpp"
+
+ .align 2
+gSlotMachineReelTimeNumber2::
+ .incbin "graphics/slot_machine/reel_time_numbers/2.4bpp"
+
+ .align 2
+gSlotMachineReelTimeNumber3::
+ .incbin "graphics/slot_machine/reel_time_numbers/3.4bpp"
+
+ .align 2
+gSlotMachineReelTimeNumber4::
+ .incbin "graphics/slot_machine/reel_time_numbers/4.4bpp"
+
+ .align 2
+gSlotMachineReelTimeNumber5::
+ .incbin "graphics/slot_machine/reel_time_numbers/5.4bpp"
+
+ .align 2
+gSlotMachineReelTimeLargeBolt0::
+ .incbin "graphics/slot_machine/large_bolt/0.4bpp"
+
+ .align 2
+gSlotMachineReelTimeLargeBolt1::
+ .incbin "graphics/slot_machine/large_bolt/1.4bpp"
+
+ .align 2
+gSlotMachineReelTimeExplosion0::
+ .incbin "graphics/slot_machine/reel_time_explosion/0.4bpp"
+
+ .align 2
+gSlotMachineReelTimeExplosion1::
+ .incbin "graphics/slot_machine/reel_time_explosion/1.4bpp"
+
+ .align 2
+gSlotMachineReelTimeShadow::
+ .incbin "graphics/slot_machine/shadow.4bpp"
+
+ .align 2
+gSlotMachineReelTimePikaAura::
+ .incbin "graphics/slot_machine/pika_aura.4bpp"
+
+ .align 2
+gUnknown_08DD19F8::
+ .incbin "graphics/unknown/unknown_DD19F8.bin" @ might be a palette?
+
+ .align 2
+gUnknown_08DD1A18::
+ .incbin "graphics/unknown/unknown_DD1A18.4bpp"
+
+ @ trainer card
+
+ .align 2
+gEmeraldTrainerCard0Star_Pal:: @ 8DD1A58
+ .incbin "graphics/trainer_card/0star.gbapal"
-gUnknown_08DD0050:: @ 8DD0050
- .incbin "baserom.gba", 0xdd0050, 0x1a68
+ .align 2
+gEmeraldTrainerCard_Gfx:: @ 8DD1AB8
+ .incbin "graphics/trainer_card/card.4bpp.lz"
-gUnknown_08DD1AB8:: @ 8DD1AB8
- .incbin "baserom.gba", 0xdd1ab8, 0x4c0
+ @ what are these? lz compressed files used for something, cant tell if tilemaps
+ .align 2
gUnknown_08DD1F78:: @ 8DD1F78
- .incbin "baserom.gba", 0xdd1f78, 0x98
+ .incbin "graphics/unknown/unknown_DD1F78.bin.lz"
+ .align 2
gUnknown_08DD2010:: @ 8DD2010
- .incbin "baserom.gba", 0xdd2010, 0x1a0
+ .incbin "graphics/unknown/unknown_DD2010.bin.lz"
+ .align 2
gUnknown_08DD21B0:: @ 8DD21B0
- .incbin "baserom.gba", 0xdd21b0, 0xdc
+ .incbin "graphics/unknown/unknown_DD21B0.bin.lz"
+ .align 2
gUnknown_08DD228C:: @ 8DD228C
- .incbin "baserom.gba", 0xdd228c, 0x1e0
+ .incbin "graphics/unknown/unknown_DD228C.bin.lz"
+
+ .align 2
+gFireRedTrainerCard0Star_Pal:: @ 8DD240C
+ .incbin "graphics/trainer_card/0star_fr.gbapal"
-gUnknown_08DD246C:: @ 8DD246C
- .incbin "baserom.gba", 0xdd246c, 0x674
+ .align 2
+gFireRedTrainerCard_Gfx:: @ 8DD246C
+ .incbin "graphics/trainer_card/card_fr.4bpp.lz"
+ @ more of these weird compressed files, probably for the FR trainer card
+
+ .align 2
gUnknown_08DD2AE0:: @ 8DD2AE0
- .incbin "baserom.gba", 0xdd2ae0, 0x98
+ .incbin "graphics/unknown/unknown_DD2AE0.bin.lz"
+ .align 2
gUnknown_08DD2B78:: @ 8DD2B78
- .incbin "baserom.gba", 0xdd2b78, 0x1b8
+ .incbin "graphics/unknown/unknown_DD2B78.bin.lz"
+ .align 2
gUnknown_08DD2D30:: @ 8DD2D30
- .incbin "baserom.gba", 0xdd2d30, 0x12c
+ .incbin "graphics/unknown/unknown_DD2D30.bin.lz"
+ .align 2
gUnknown_08DD2E5C:: @ 8DD2E5C
- .incbin "baserom.gba", 0xdd2e5c, 0x18c
+ .incbin "graphics/unknown/unknown_DD2E5C.bin.lz"
+
+ @ pokemon storage system
-gUnknown_08DD2FE8:: @ 8DD2FE8
- .incbin "baserom.gba", 0xdd2fe8, 0x6c0
+ .align 2
+gPSSMenu_Gfx:: @ 8DD2FE8
+ .incbin "graphics/pokemon_storage/menu.4bpp.lz"
-gUnknown_08DD36A8:: @ 8DD36A8
- .incbin "baserom.gba", 0xdd36a8, 0x20
+ .align 2
+gPSSMenu_Pal:: @ 8DD36A8
+ .incbin "graphics/pokemon_storage/menu.gbapal" @ pal for the options in the gfx
+ .align 2
gUnknown_08DD36C8:: @ 8DD36C8
- .incbin "baserom.gba", 0xdd36c8, 0xb0
+ .incbin "graphics/unknown/unknown_DD36C8.bin.lz"
+
+ @ naming screen
+
+ .align 2
+gNamingScreenMenu_Pal:: @ 8DD3778
+ .incbin "graphics/naming_screen/menu.gbapal"
+
+ .align 2
+gNamingScreenMenu_Gfx:: @ 8DD3838
+ .incbin "graphics/naming_screen/menu.4bpp.lz"
+
+ .align 2
+gNamingScreenRWindow_Gfx::
+ .incbin "graphics/naming_screen/rwindow.4bpp"
+
+ .align 2
+gNamingScreenROptions_Gfx::
+ .incbin "graphics/naming_screen/roptions.4bpp"
+
+ .align 2
+gNamingScreenCursor_Gfx::
+ .incbin "graphics/naming_screen/cursor.4bpp"
+
+ .align 2
+gNamingScreenKeyboardButton_Gfx::
+ .incbin "graphics/naming_screen/keyboard_button.4bpp"
-gUnknown_08DD3778:: @ 8DD3778
- .incbin "baserom.gba", 0xdd3778, 0xc0
+ .align 2
+gNamingScreenRightPointingTriangleTiles::
+ .incbin "graphics/naming_screen/right_pointing_triangle.4bpp"
-gUnknown_08DD3838:: @ 8DD3838
- .incbin "baserom.gba", 0xdd3838, 0xd0c
+ .align 2
+gNamingScreenUnderscoreTiles::
+ .incbin "graphics/naming_screen/underscore.4bpp"
+ .align 2
gUnknown_08DD4544:: @ 8DD4544
- .incbin "baserom.gba", 0xdd4544, 0xdc
+ .incbin "graphics/unknown/unknown_DD4544.bin.lz"
+ .align 2
gUnknown_08DD4620:: @ 8DD4620
- .incbin "baserom.gba", 0xdd4620, 0xc0
+ .incbin "graphics/unknown/unknown_DD4620.bin.lz"
+ .align 2
gUnknown_08DD46E0:: @ 8DD46E0
- .incbin "baserom.gba", 0xdd46e0, 0xc0
+ .incbin "graphics/unknown/unknown_DD46E0.bin.lz"
+ .align 2
gUnknown_08DD47A0:: @ 8DD47A0
- .incbin "baserom.gba", 0xdd47a0, 0xc0
-
-gUnknown_08DD4860:: @ 8DD4860
- .incbin "baserom.gba", 0xdd4860, 0x20
+ .incbin "graphics/unknown/unknown_DD47A0.bin.lz"
-gUnknown_08DD4880:: @ 8DD4880
- .incbin "baserom.gba", 0xdd4880, 0x238
+ @ link
-gUnknown_08DD4AB8:: @ 8DD4AB8
- .incbin "baserom.gba", 0xdd4ab8, 0xf8
+ .align 2
+gLinkMiscMenu_Pal:: @ 8DD4860
+ .incbin "graphics/link/misc.gbapal"
+ .align 2
+gLinkMiscMenu_Gfx:: @ 8DD4880
+ .incbin "graphics/link/misc.4bpp.lz" @ dont know where this is used
+
+ .align 2
+gLinkMiscMenu_Tilemap:: @ 8DD4AB8
+ .incbin "graphics/link/misc.bin.lz"
+
+ .align 2
gUnknown_08DD4BB0:: @ 8DD4BB0
- .incbin "baserom.gba", 0xdd4bb0, 0x20
+ .incbin "graphics/link/link1.gbapal"
+ .align 2
gUnknown_08DD4BD0:: @ 8DD4BD0
- .incbin "baserom.gba", 0xdd4bd0, 0x20
+ .incbin "graphics/link/link2.gbapal"
+ .align 2
gUnknown_08DD4BF0:: @ 8DD4BF0
- .incbin "baserom.gba", 0xdd4bf0, 0x5c
+ .incbin "graphics/link/link_winedge.4bpp.lz"
+ .align 2
gUnknown_08DD4C4C:: @ 8DD4C4C
- .incbin "baserom.gba", 0xdd4c4c, 0xac
+ .incbin "graphics/link/link_winedge.bin.lz"
.align 2
gUnknown_08DD4CF8:: @ 8DD4CF8
@@ -1653,95 +4920,183 @@ gTilesetPalettes_General:: @ 8DD4E10
gTilesetTiles_General:: @ 8DD5010
.incbin "data/tilesets/primary/general/tiles.4bpp.lz"
-@ 8DD72E0
- .incbin "baserom.gba", 0xdd72e0, 0x20
+ @ trade/egg hatch
-gUnknown_08DD7300:: @ 8DD7300
- .incbin "baserom.gba", 0xdd7300, 0x60
+ .align 2
+gTradeGba_Pal:: @ 8DD72E0
+ .incbin "graphics/link/gba.gbapal"
-gUnknown_08DD7360:: @ 8DD7360
- .incbin "baserom.gba", 0xdd7360, 0x1420
+ .align 2
+gTradeGba2_Pal:: @ 8DD7300
+ .incbin "graphics/link/gba_pal2.gbapal" @ used for in-game trade GBA?
+
+ .align 2
+gTradeGba_Gfx:: @ 8DD7360
+ .incbin "graphics/link/gba.4bpp"
+
+ @ 8DD8760
+ .space 0x20 @ blank palette??
+
+ @ berry fix program
+
+ .align 2
+gBerryFixGameboy_Pal:: @ 8DD8780
+ .incbin "graphics/berry_fix/gba_small.gbapal"
-gUnknown_08DD8780:: @ 8DD8780
- .incbin "baserom.gba", 0xdd8780, 0x40
+ .align 2
+gBerryFixGameboy_Gfx:: @ 8DD87C0
+ .incbin "graphics/berry_fix/gba_small.4bpp.lz"
-gUnknown_08DD87C0:: @ 8DD87C0
- .incbin "baserom.gba", 0xdd87c0, 0x720
+ .align 2
+gBerryFixGameboy_Tilemap:: @ 8DD8EE0
+ .incbin "graphics/berry_fix/gba_small.bin.lz"
-gUnknown_08DD8EE0:: @ 8DD8EE0
- .incbin "baserom.gba", 0xdd8ee0, 0x1a0
+ .align 2
+gBerryFixGameboyLogo_Pal:: @ 8DD9080
+ .incbin "graphics/berry_fix/logo.gbapal"
-gUnknown_08DD9080:: @ 8DD9080
- .incbin "baserom.gba", 0xdd9080, 0x60
+ .align 2
+gBerryFixGameboyLogo_Gfx:: @ 8DD90E0
+ .incbin "graphics/berry_fix/logo.4bpp.lz"
-gUnknown_08DD90E0:: @ 8DD90E0
- .incbin "baserom.gba", 0xdd90e0, 0x638
+ .align 2
+gBerryFixGameboyLogo_Tilemap:: @ 8DD9718
+ .incbin "graphics/berry_fix/logo.bin.lz"
-gUnknown_08DD9718:: @ 8DD9718
- .incbin "baserom.gba", 0xdd9718, 0x15c
+ .align 2
+gBerryFixGbaTransfer_Pal:: @ 8DD9874
+ .incbin "graphics/berry_fix/gba_transfer.gbapal"
-gUnknown_08DD9874:: @ 8DD9874
- .incbin "baserom.gba", 0xdd9874, 0x40
+ .align 2
+gBerryFixGbaTransfer_Gfx:: @ 8DD98B4
+ .incbin "graphics/berry_fix/gba_transfer.4bpp.lz"
-gUnknown_08DD98B4:: @ 8DD98B4
- .incbin "baserom.gba", 0xdd98b4, 0x5a4
+ .align 2
+gBerryFixGbaTransfer_Tilemap:: @ 8DD9E58
+ .incbin "graphics/berry_fix/gba_transfer.bin.lz"
-gUnknown_08DD9E58:: @ 8DD9E58
- .incbin "baserom.gba", 0xdd9e58, 0x194
+ .align 2
+gBerryFixGbaTransferHighlight_Pal:: @ 8DD9FEC
+ .incbin "graphics/berry_fix/gba_transfer_highlight.gbapal"
-gUnknown_08DD9FEC:: @ 8DD9FEC
- .incbin "baserom.gba", 0xdd9fec, 0x40
+ .align 2
+gBerryFixGbaTransferHighlight_Gfx:: @ 8DDA02C
+ .incbin "graphics/berry_fix/gba_transfer_highlight.4bpp.lz"
-gUnknown_08DDA02C:: @ 8DDA02C
- .incbin "baserom.gba", 0xdda02c, 0x610
+ .align 2
+gBerryFixGbaTransferHighlight_Tilemap:: @ 8DDA63C
+ .incbin "graphics/berry_fix/gba_transfer_highlight.bin.lz"
-gUnknown_08DDA63C:: @ 8DDA63C
- .incbin "baserom.gba", 0xdda63c, 0x1c4
+ .align 2
+gBerryFixGbaTransferError_Pal:: @ 8DDA800
+ .incbin "graphics/berry_fix/gba_transfer_error.gbapal"
-gUnknown_08DDA800:: @ 8DDA800
- .incbin "baserom.gba", 0xdda800, 0x40
+ .align 2
+gBerryFixGbaTransferError_Gfx:: @ 8DDA840
+ .incbin "graphics/berry_fix/gba_transfer_error.4bpp.lz"
-gUnknown_08DDA840:: @ 8DDA840
- .incbin "baserom.gba", 0xdda840, 0x600
+ .align 2
+gBerryFixGbaTransferError_Tilemap:: @ 8DDAE40
+ .incbin "graphics/berry_fix/gba_transfer_error.bin.lz"
-gUnknown_08DDAE40:: @ 8DDAE40
- .incbin "baserom.gba", 0xddae40, 0x1a0
+ .align 2
+gBerryFixWindow_Pal:: @ 8DDAFE0
+ .incbin "graphics/berry_fix/window.gbapal"
-gUnknown_08DDAFE0:: @ 8DDAFE0
- .incbin "baserom.gba", 0xddafe0, 0x40
+ .align 2
+gBerryFixWindow_Gfx:: @ 8DDB020
+ .incbin "graphics/berry_fix/window.4bpp.lz" @ why the absurd length?
-gUnknown_08DDB020:: @ 8DDB020
- .incbin "baserom.gba", 0xddb020, 0x2a4
+ .align 2
+gBerryFixWindow_Tilemap:: @ 8DDB2C4
+ .incbin "graphics/berry_fix/window.bin.lz"
-gUnknown_08DDB2C4:: @ 8DDB2C4
- .incbin "baserom.gba", 0xddb2c4, 0x120
+ @ more trade stuff?
+ .align 2
gUnknown_08DDB3E4:: @ 8DDB3E4
- .incbin "baserom.gba", 0xddb3e4, 0x80
+ .incbin "graphics/trade/menu.gbapal"
+
+ .align 2
+gUnknown_08DDB444:: @ 8DDB444
+ .incbin "graphics/unknown/unknown_DDB444.gbapal"
+ .align 2
gUnknown_08DDB464:: @ 8DDB464
- .incbin "baserom.gba", 0xddb464, 0x1aa0
+ .incbin "graphics/trade/menu.4bpp"
+
+ .align 2
+gUnknown_08DDC6E4:: @ 8DDC6E4
+ .incbin "graphics/trade/buttons.4bpp"
+ .align 2
+ .incbin "graphics/unused/unused_DDCEE4.bin" @ unused
+
+ .align 2
gUnknown_08DDCF04:: @ 8DDCF04
- .incbin "baserom.gba", 0xddcf04, 0x800
+ .incbin "graphics/unknown/unknown_DDCF04.bin" @ tilemap
+ .align 2
gUnknown_08DDD704:: @ 8DDD704
- .incbin "baserom.gba", 0xddd704, 0x24
+ .incbin "graphics/unknown/unknown_DDD704.bin" @ textbox tilemap??
+ .align 2
gUnknown_08DDD728:: @ 8DDD728
- .incbin "baserom.gba", 0xddd728, 0x20
+ .incbin "graphics/interface/textbox.gbapal" @ textbox palette?
+ .align 2
gUnknown_08DDD748:: @ 8DDD748
- .incbin "baserom.gba", 0xddd748, 0x8c8
+ .incbin "graphics/interface/textbox.4bpp"
+
+ .align 2
+gUnknown_08DDD908::
+ .incbin "graphics/unknown/unknown_DDD908.bin.lz"
+ .align 2
+gUnknown_08DDD920::
+ .incbin "graphics/unknown/unknown_DDD920.bin.lz"
+
+ .align 2
+gUnknown_08DDD938::
+ .incbin "graphics/unknown/unknown_DDD938.bin.lz"
+
+ .align 2
+gUnknown_08DDD950::
+ .incbin "graphics/pokemon_storage/pss_window.gbapal"
+
+ .align 2
+gUnknown_08DDD990::
+ .incbin "graphics/pokemon_storage/pss_window.4bpp.lz"
+
+ .align 2
+gUnknown_08DDDB80:: @ 8DDDB80
+ .incbin "graphics/unknown/unknown_DDDB80.bin.lz"
+
+ .align 2
+gUnknown_08DDDC8C::
+ .incbin "graphics/pokemon_storage/pss_window2.gbapal"
+
+ .align 2
+gUnknown_08DDDCCC::
+ .incbin "graphics/pokemon_storage/pss_window2.4bpp.lz"
+
+ .align 2
+gUnknown_08DDDEDC::
+ .incbin "graphics/pokemon_storage/pss_window2.bin.lz"
+
+ @ pokenav
+
+ .align 2
gUnknown_08DDE010:: @ 8DDE010
- .incbin "baserom.gba", 0xdde010, 0x20
+ .incbin "graphics/pokenav/ribbons.gbapal"
+ .align 2
gUnknown_08DDE030:: @ 8DDE030
- .incbin "baserom.gba", 0xdde030, 0xfc
+ .incbin "graphics/pokenav/ribbons.4bpp.lz"
+ .align 2
gUnknown_08DDE12C:: @ 8DDE12C
- .incbin "baserom.gba", 0xdde12c, 0xcc
+ .incbin "graphics/pokenav/ribbons.bin.lz"
.align 2
gMonIconPalettes:: @ 8DDE1F8
@@ -1760,7 +5115,7 @@ gTitleScreenEmeraldVersionPal:: @ 8DDE438
.align 2
gUnknown_08DDE458:: @ 8DDE458
- .incbin "baserom.gba", 0xdde458, 0x238
+ .incbin "graphics/title_screen/title_screen1.bin.lz"
gTitleScreenPokemonLogoGfx:: @ 8DDE690
.incbin "graphics/title_screen/pokemon_logo.8bpp.lz"
@@ -1779,31 +5134,54 @@ gTitleScreenPressStartGfx:: @ 8DE03E8
.align 2
gUnknown_08DE0644:: @ 8DE0644
- .incbin "baserom.gba", 0xde0644, 0x184
+ .incbin "graphics/title_screen/title_screen2.bin.lz"
+ @ more trainer card stuff
+
+ .align 2
gUnknown_08DE07C8:: @ 8DE07C8
- .incbin "baserom.gba", 0xde07c8, 0x100
+ .incbin "graphics/frontier_pass/tiles.gbapal" @ size in LoadPalette calls is reported as 0xD0 << 1, which is 0x1A0, but this is wrong? todo, investigate? (frontier pass pal)
+ .align 2
gUnknown_08DE08C8:: @ 8DE08C8
- .incbin "baserom.gba", 0xde08c8, 0x17bc
+ .incbin "graphics/frontier_pass/tiles.4bpp.lz"
+ .align 2
gUnknown_08DE2084:: @ 8DE2084
- .incbin "baserom.gba", 0xde2084, 0xfdc
+ .incbin "graphics/frontier_pass/tiles2.8bpp.lz"
+ .align 2
gUnknown_08DE3060:: @ 8DE3060
- .incbin "baserom.gba", 0xde3060, 0x2f0
+ .incbin "graphics/frontier_pass/tiles.bin.lz"
+ .align 2
gUnknown_08DE3350:: @ 8DE3350
- .incbin "baserom.gba", 0xde3350, 0x24
+ .incbin "graphics/frontier_pass/tilemap1.bin"
+ .align 2
gUnknown_08DE3374:: @ 8DE3374
- .incbin "baserom.gba", 0xde3374, 0x24
+ .incbin "graphics/frontier_pass/tilemap2.bin"
+
+ @ berry crusher
+ .align 2
gUnknown_08DE3398:: @ 8DE3398
- .incbin "baserom.gba", 0xde3398, 0x120
+ .incbin "graphics/berry_crusher/tiles.gbapal"
+ .align 2
gUnknown_08DE34B8:: @ 8DE34B8
- .incbin "baserom.gba", 0xde34b8, 0xb1c
+ .incbin "graphics/berry_crusher/tiles.4bpp.lz"
+ .align 2
gUnknown_08DE3FD4:: @ 8DE3FD4
- .incbin "baserom.gba", 0xde3fd4
+ .incbin "graphics/berry_crusher/tiles.bin.lz"
+
+ @ random garbage at the end. why, game freak?
+ .space 0x54BAC
+ .byte 0x0D, 0x00, 0x58, 0x02 @ why?
+ @ E38BC8
+ .space 0x1145
+ .byte 0x02 @ whyyyyy?
+ .space 0x3242
+ .byte 0x40 @ WHYYYYYYYY
+ .space 0x13
diff --git a/data/graphics/pokemon/icon_palette_indices.inc b/data/graphics/pokemon/icon_palette_indices.inc
deleted file mode 100644
index f1d57466c..000000000
--- a/data/graphics/pokemon/icon_palette_indices.inc
+++ /dev/null
@@ -1,442 +0,0 @@
- .align 2
-gMonIconPaletteIndices:: @ 857C388
- .byte 0 @ ??????????
- .byte 1 @ Bulbasaur
- .byte 1 @ Ivysaur
- .byte 1 @ Venusaur
- .byte 0 @ Charmander
- .byte 0 @ Charmeleon
- .byte 0 @ Charizard
- .byte 0 @ Squirtle
- .byte 2 @ Wartortle
- .byte 2 @ Blastoise
- .byte 1 @ Caterpie
- .byte 1 @ Metapod
- .byte 0 @ Butterfree
- .byte 1 @ Weedle
- .byte 2 @ Kakuna
- .byte 2 @ Beedrill
- .byte 0 @ Pidgey
- .byte 0 @ Pidgeotto
- .byte 0 @ Pidgeot
- .byte 2 @ Rattata
- .byte 1 @ Raticate
- .byte 0 @ Spearow
- .byte 0 @ Fearow
- .byte 2 @ Ekans
- .byte 2 @ Arbok
- .byte 2 @ Pikachu
- .byte 0 @ Raichu
- .byte 2 @ Sandshrew
- .byte 2 @ Sandslash
- .byte 2 @ Nidoran♀
- .byte 2 @ Nidorina
- .byte 2 @ Nidoqueen
- .byte 2 @ Nidoran♂
- .byte 2 @ Nidorino
- .byte 2 @ Nidoking
- .byte 0 @ Clefairy
- .byte 0 @ Clefable
- .byte 2 @ Vulpix
- .byte 1 @ Ninetales
- .byte 0 @ Jigglypuff
- .byte 0 @ Wigglytuff
- .byte 2 @ Zubat
- .byte 2 @ Golbat
- .byte 1 @ Oddish
- .byte 0 @ Gloom
- .byte 0 @ Vileplume
- .byte 0 @ Paras
- .byte 0 @ Parasect
- .byte 0 @ Venonat
- .byte 2 @ Venomoth
- .byte 2 @ Diglett
- .byte 2 @ Dugtrio
- .byte 1 @ Meowth
- .byte 1 @ Persian
- .byte 1 @ Psyduck
- .byte 2 @ Golduck
- .byte 1 @ Mankey
- .byte 2 @ Primeape
- .byte 0 @ Growlithe
- .byte 0 @ Arcanine
- .byte 0 @ Poliwag
- .byte 0 @ Poliwhirl
- .byte 0 @ Poliwrath
- .byte 2 @ Abra
- .byte 2 @ Kadabra
- .byte 2 @ Alakazam
- .byte 0 @ Machop
- .byte 2 @ Machoke
- .byte 0 @ Machamp
- .byte 1 @ Bellsprout
- .byte 1 @ Weepinbell
- .byte 1 @ Victreebel
- .byte 2 @ Tentacool
- .byte 2 @ Tentacruel
- .byte 1 @ Geodude
- .byte 1 @ Graveler
- .byte 1 @ Golem
- .byte 0 @ Ponyta
- .byte 0 @ Rapidash
- .byte 0 @ Slowpoke
- .byte 0 @ Slowbro
- .byte 0 @ Magnemite
- .byte 0 @ Magneton
- .byte 1 @ Farfetch'd
- .byte 2 @ Doduo
- .byte 2 @ Dodrio
- .byte 2 @ Seel
- .byte 2 @ Dewgong
- .byte 2 @ Grimer
- .byte 2 @ Muk
- .byte 2 @ Shellder
- .byte 2 @ Cloyster
- .byte 2 @ Gastly
- .byte 2 @ Haunter
- .byte 2 @ Gengar
- .byte 2 @ Onix
- .byte 2 @ Drowzee
- .byte 1 @ Hypno
- .byte 2 @ Krabby
- .byte 2 @ Kingler
- .byte 0 @ Voltorb
- .byte 0 @ Electrode
- .byte 0 @ Exeggcute
- .byte 1 @ Exeggutor
- .byte 1 @ Cubone
- .byte 1 @ Marowak
- .byte 2 @ Hitmonlee
- .byte 2 @ Hitmonchan
- .byte 1 @ Lickitung
- .byte 2 @ Koffing
- .byte 2 @ Weezing
- .byte 1 @ Rhyhorn
- .byte 1 @ Rhydon
- .byte 0 @ Chansey
- .byte 0 @ Tangela
- .byte 1 @ Kangaskhan
- .byte 0 @ Horsea
- .byte 0 @ Seadra
- .byte 0 @ Goldeen
- .byte 0 @ Seaking
- .byte 2 @ Staryu
- .byte 2 @ Starmie
- .byte 0 @ Mr. mime
- .byte 1 @ Scyther
- .byte 2 @ Jynx
- .byte 1 @ Electabuzz
- .byte 0 @ Magmar
- .byte 2 @ Pinsir
- .byte 2 @ Tauros
- .byte 0 @ Magikarp
- .byte 0 @ Gyarados
- .byte 2 @ Lapras
- .byte 2 @ Ditto
- .byte 2 @ Eevee
- .byte 0 @ Vaporeon
- .byte 0 @ Jolteon
- .byte 0 @ Flareon
- .byte 0 @ Porygon
- .byte 0 @ Omanyte
- .byte 0 @ Omastar
- .byte 2 @ Kabuto
- .byte 2 @ Kabutops
- .byte 0 @ Aerodactyl
- .byte 1 @ Snorlax
- .byte 0 @ Articuno
- .byte 0 @ Zapdos
- .byte 0 @ Moltres
- .byte 0 @ Dratini
- .byte 0 @ Dragonair
- .byte 2 @ Dragonite
- .byte 2 @ Mewtwo
- .byte 0 @ Mew
- .byte 1 @ Chikorita
- .byte 1 @ Bayleef
- .byte 1 @ Meganium
- .byte 1 @ Cyndaquil
- .byte 1 @ Quilava
- .byte 1 @ Typhlosion
- .byte 2 @ Totodile
- .byte 2 @ Croconaw
- .byte 2 @ Feraligatr
- .byte 2 @ Sentret
- .byte 2 @ Furret
- .byte 2 @ Hoothoot
- .byte 2 @ Noctowl
- .byte 0 @ Ledyba
- .byte 0 @ Ledian
- .byte 1 @ Spinarak
- .byte 0 @ Ariados
- .byte 2 @ Crobat
- .byte 2 @ Chinchou
- .byte 0 @ Lanturn
- .byte 0 @ Pichu
- .byte 0 @ Cleffa
- .byte 1 @ Igglybuff
- .byte 2 @ Togepi
- .byte 2 @ Togetic
- .byte 0 @ Natu
- .byte 0 @ Xatu
- .byte 2 @ Mareep
- .byte 0 @ Flaaffy
- .byte 0 @ Ampharos
- .byte 1 @ Bellossom
- .byte 2 @ Marill
- .byte 2 @ Azumarill
- .byte 1 @ Sudowoodo
- .byte 1 @ Politoed
- .byte 1 @ Hoppip
- .byte 1 @ Skiploom
- .byte 2 @ Jumpluff
- .byte 2 @ Aipom
- .byte 1 @ Sunkern
- .byte 1 @ Sunflora
- .byte 1 @ Yanma
- .byte 0 @ Wooper
- .byte 0 @ Quagsire
- .byte 2 @ Espeon
- .byte 2 @ Umbreon
- .byte 2 @ Murkrow
- .byte 0 @ Slowking
- .byte 0 @ Misdreavus
- .byte 0 @ Unown A
- .byte 0 @ Wobbuffet
- .byte 1 @ Girafarig
- .byte 0 @ Pineco
- .byte 2 @ Forretress
- .byte 2 @ Dunsparce
- .byte 2 @ Gligar
- .byte 0 @ Steelix
- .byte 0 @ Snubbull
- .byte 2 @ Granbull
- .byte 0 @ Qwilfish
- .byte 0 @ Scizor
- .byte 1 @ Shuckle
- .byte 2 @ Heracross
- .byte 0 @ Sneasel
- .byte 0 @ Teddiursa
- .byte 2 @ Ursaring
- .byte 0 @ Slugma
- .byte 0 @ Magcargo
- .byte 2 @ Swinub
- .byte 2 @ Piloswine
- .byte 0 @ Corsola
- .byte 0 @ Remoraid
- .byte 0 @ Octillery
- .byte 0 @ Delibird
- .byte 2 @ Mantine
- .byte 0 @ Skarmory
- .byte 0 @ Houndour
- .byte 0 @ Houndoom
- .byte 0 @ Kingdra
- .byte 0 @ Phanpy
- .byte 0 @ Donphan
- .byte 0 @ Porygon2
- .byte 2 @ Stantler
- .byte 1 @ Smeargle
- .byte 2 @ Tyrogue
- .byte 2 @ Hitmontop
- .byte 1 @ Smoochum
- .byte 1 @ Elekid
- .byte 1 @ Magby
- .byte 1 @ Miltank
- .byte 1 @ Blissey
- .byte 0 @ Raikou
- .byte 2 @ Entei
- .byte 0 @ Suicune
- .byte 1 @ Larvitar
- .byte 0 @ Pupitar
- .byte 1 @ Tyranitar
- .byte 0 @ Lugia
- .byte 1 @ Ho-Oh
- .byte 1 @ Celebi
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 0 @ ?
- .byte 1 @ Treecko
- .byte 0 @ Grovyle
- .byte 1 @ Sceptile
- .byte 0 @ Torchic
- .byte 0 @ Combusken
- .byte 0 @ Blaziken
- .byte 0 @ Mudkip
- .byte 0 @ Marshtomp
- .byte 0 @ Swampert
- .byte 2 @ Poochyena
- .byte 2 @ Mightyena
- .byte 2 @ Zigzagoon
- .byte 2 @ Linoone
- .byte 0 @ Wurmple
- .byte 2 @ Silcoon
- .byte 0 @ Beautifly
- .byte 2 @ Cascoon
- .byte 1 @ Dustox
- .byte 1 @ Lotad
- .byte 1 @ Lombre
- .byte 1 @ Ludicolo
- .byte 1 @ Seedot
- .byte 1 @ Nuzleaf
- .byte 0 @ Shiftry
- .byte 1 @ Nincada
- .byte 1 @ Ninjask
- .byte 1 @ Shedinja
- .byte 2 @ Taillow
- .byte 2 @ Swellow
- .byte 1 @ Shroomish
- .byte 1 @ Breloom
- .byte 1 @ Spinda
- .byte 0 @ Wingull
- .byte 0 @ Pelipper
- .byte 2 @ Surskit
- .byte 0 @ Masquerain
- .byte 2 @ Wailmer
- .byte 0 @ Wailord
- .byte 0 @ Skitty
- .byte 2 @ Delcatty
- .byte 1 @ Kecleon
- .byte 1 @ Baltoy
- .byte 0 @ Claydol
- .byte 0 @ Nosepass
- .byte 1 @ Torkoal
- .byte 2 @ Sableye
- .byte 0 @ Barboach
- .byte 0 @ Whiscash
- .byte 0 @ Luvdisc
- .byte 0 @ Corphish
- .byte 0 @ Crawdaunt
- .byte 2 @ Feebas
- .byte 0 @ Milotic
- .byte 0 @ Carvanha
- .byte 0 @ Sharpedo
- .byte 1 @ Trapinch
- .byte 1 @ Vibrava
- .byte 1 @ Flygon
- .byte 2 @ Makuhita
- .byte 1 @ Hariyama
- .byte 1 @ Electrike
- .byte 0 @ Manectric
- .byte 1 @ Numel
- .byte 0 @ Camerupt
- .byte 2 @ Spheal
- .byte 2 @ Sealeo
- .byte 0 @ Walrein
- .byte 1 @ Cacnea
- .byte 1 @ Cacturne
- .byte 2 @ Snorunt
- .byte 0 @ Glalie
- .byte 1 @ Lunatone
- .byte 0 @ Solrock
- .byte 2 @ Azurill
- .byte 0 @ Spoink
- .byte 2 @ Grumpig
- .byte 0 @ Plusle
- .byte 0 @ Minun
- .byte 2 @ Mawile
- .byte 0 @ Meditite
- .byte 0 @ Medicham
- .byte 0 @ Swablu
- .byte 0 @ Altaria
- .byte 0 @ Wynaut
- .byte 0 @ Duskull
- .byte 0 @ Dusclops
- .byte 0 @ Roselia
- .byte 2 @ Slakoth
- .byte 2 @ Vigoroth
- .byte 1 @ Slaking
- .byte 1 @ Gulpin
- .byte 2 @ Swalot
- .byte 1 @ Tropius
- .byte 0 @ Whismur
- .byte 2 @ Loudred
- .byte 2 @ Exploud
- .byte 0 @ Clamperl
- .byte 0 @ Huntail
- .byte 0 @ Gorebyss
- .byte 0 @ Absol
- .byte 0 @ Shuppet
- .byte 0 @ Banette
- .byte 2 @ Seviper
- .byte 0 @ Zangoose
- .byte 1 @ Relicanth
- .byte 2 @ Aron
- .byte 2 @ Lairon
- .byte 2 @ Aggron
- .byte 0 @ Castform
- .byte 0 @ Volbeat
- .byte 2 @ Illumise
- .byte 2 @ Lileep
- .byte 0 @ Cradily
- .byte 0 @ Anorith
- .byte 0 @ Armaldo
- .byte 1 @ Ralts
- .byte 1 @ Kirlia
- .byte 1 @ Gardevoir
- .byte 2 @ Bagon
- .byte 2 @ Shelgon
- .byte 0 @ Salamence
- .byte 0 @ Beldum
- .byte 0 @ Metang
- .byte 0 @ Metagross
- .byte 2 @ Regirock
- .byte 2 @ Regice
- .byte 2 @ Registeel
- .byte 2 @ Kyogre
- .byte 0 @ Groudon
- .byte 1 @ Rayquaza
- .byte 0 @ Latias
- .byte 2 @ Latios
- .byte 0 @ Jirachi
- .byte 0 @ Deoxys
- .byte 0 @ Chimecho
- .byte 1 @ Egg
- .byte 0 @ Unown B
- .byte 0 @ Unown C
- .byte 0 @ Unown D
- .byte 0 @ Unown E
- .byte 0 @ Unown F
- .byte 0 @ Unown G
- .byte 0 @ Unown H
- .byte 0 @ Unown I
- .byte 0 @ Unown J
- .byte 0 @ Unown K
- .byte 0 @ Unown L
- .byte 0 @ Unown M
- .byte 0 @ Unown N
- .byte 0 @ Unown O
- .byte 0 @ Unown P
- .byte 0 @ Unown Q
- .byte 0 @ Unown R
- .byte 0 @ Unown S
- .byte 0 @ Unown T
- .byte 0 @ Unown U
- .byte 0 @ Unown V
- .byte 0 @ Unown W
- .byte 0 @ Unown X
- .byte 0 @ Unown Y
- .byte 0 @ Unown Z
- .byte 0 @ Unown Exclamation Mark
- .byte 0 @ Unown Question Mark
diff --git a/data/graphics/pokemon/icon_palette_table.inc b/data/graphics/pokemon/icon_palette_table.inc
deleted file mode 100644
index eb7919423..000000000
--- a/data/graphics/pokemon/icon_palette_table.inc
+++ /dev/null
@@ -1,11 +0,0 @@
- .align 2
-gMonIconPaletteTable:: @ 857C540
- obj_pal gMonIconPalettes + 0 * 32, 56000
- obj_pal gMonIconPalettes + 1 * 32, 56001
- obj_pal gMonIconPalettes + 2 * 32, 56002
-
-@ These palettes are actually part of the title screen BG palette and are not
-@ used for Pokémon icons.
- obj_pal gMonIconPalettes + 3 * 32, 56003
- obj_pal gMonIconPalettes + 4 * 32, 56004
- obj_pal gMonIconPalettes + 5 * 32, 56005
diff --git a/data/graphics/pokemon/icon_table.inc b/data/graphics/pokemon/icon_table.inc
deleted file mode 100644
index 06a86de43..000000000
--- a/data/graphics/pokemon/icon_table.inc
+++ /dev/null
@@ -1,442 +0,0 @@
- .align 2
-gMonIconTable:: @ 857BCA8
- .4byte gMonIcon_Bulbasaur
- .4byte gMonIcon_Bulbasaur
- .4byte gMonIcon_Ivysaur
- .4byte gMonIcon_Venusaur
- .4byte gMonIcon_Charmander
- .4byte gMonIcon_Charmeleon
- .4byte gMonIcon_Charizard
- .4byte gMonIcon_Squirtle
- .4byte gMonIcon_Wartortle
- .4byte gMonIcon_Blastoise
- .4byte gMonIcon_Caterpie
- .4byte gMonIcon_Metapod
- .4byte gMonIcon_Butterfree
- .4byte gMonIcon_Weedle
- .4byte gMonIcon_Kakuna
- .4byte gMonIcon_Beedrill
- .4byte gMonIcon_Pidgey
- .4byte gMonIcon_Pidgeotto
- .4byte gMonIcon_Pidgeot
- .4byte gMonIcon_Rattata
- .4byte gMonIcon_Raticate
- .4byte gMonIcon_Spearow
- .4byte gMonIcon_Fearow
- .4byte gMonIcon_Ekans
- .4byte gMonIcon_Arbok
- .4byte gMonIcon_Pikachu
- .4byte gMonIcon_Raichu
- .4byte gMonIcon_Sandshrew
- .4byte gMonIcon_Sandslash
- .4byte gMonIcon_NidoranF
- .4byte gMonIcon_Nidorina
- .4byte gMonIcon_Nidoqueen
- .4byte gMonIcon_NidoranM
- .4byte gMonIcon_Nidorino
- .4byte gMonIcon_Nidoking
- .4byte gMonIcon_Clefairy
- .4byte gMonIcon_Clefable
- .4byte gMonIcon_Vulpix
- .4byte gMonIcon_Ninetales
- .4byte gMonIcon_Jigglypuff
- .4byte gMonIcon_Wigglytuff
- .4byte gMonIcon_Zubat
- .4byte gMonIcon_Golbat
- .4byte gMonIcon_Oddish
- .4byte gMonIcon_Gloom
- .4byte gMonIcon_Vileplume
- .4byte gMonIcon_Paras
- .4byte gMonIcon_Parasect
- .4byte gMonIcon_Venonat
- .4byte gMonIcon_Venomoth
- .4byte gMonIcon_Diglett
- .4byte gMonIcon_Dugtrio
- .4byte gMonIcon_Meowth
- .4byte gMonIcon_Persian
- .4byte gMonIcon_Psyduck
- .4byte gMonIcon_Golduck
- .4byte gMonIcon_Mankey
- .4byte gMonIcon_Primeape
- .4byte gMonIcon_Growlithe
- .4byte gMonIcon_Arcanine
- .4byte gMonIcon_Poliwag
- .4byte gMonIcon_Poliwhirl
- .4byte gMonIcon_Poliwrath
- .4byte gMonIcon_Abra
- .4byte gMonIcon_Kadabra
- .4byte gMonIcon_Alakazam
- .4byte gMonIcon_Machop
- .4byte gMonIcon_Machoke
- .4byte gMonIcon_Machamp
- .4byte gMonIcon_Bellsprout
- .4byte gMonIcon_Weepinbell
- .4byte gMonIcon_Victreebel
- .4byte gMonIcon_Tentacool
- .4byte gMonIcon_Tentacruel
- .4byte gMonIcon_Geodude
- .4byte gMonIcon_Graveler
- .4byte gMonIcon_Golem
- .4byte gMonIcon_Ponyta
- .4byte gMonIcon_Rapidash
- .4byte gMonIcon_Slowpoke
- .4byte gMonIcon_Slowbro
- .4byte gMonIcon_Magnemite
- .4byte gMonIcon_Magneton
- .4byte gMonIcon_Farfetchd
- .4byte gMonIcon_Doduo
- .4byte gMonIcon_Dodrio
- .4byte gMonIcon_Seel
- .4byte gMonIcon_Dewgong
- .4byte gMonIcon_Grimer
- .4byte gMonIcon_Muk
- .4byte gMonIcon_Shellder
- .4byte gMonIcon_Cloyster
- .4byte gMonIcon_Gastly
- .4byte gMonIcon_Haunter
- .4byte gMonIcon_Gengar
- .4byte gMonIcon_Onix
- .4byte gMonIcon_Drowzee
- .4byte gMonIcon_Hypno
- .4byte gMonIcon_Krabby
- .4byte gMonIcon_Kingler
- .4byte gMonIcon_Voltorb
- .4byte gMonIcon_Electrode
- .4byte gMonIcon_Exeggcute
- .4byte gMonIcon_Exeggutor
- .4byte gMonIcon_Cubone
- .4byte gMonIcon_Marowak
- .4byte gMonIcon_Hitmonlee
- .4byte gMonIcon_Hitmonchan
- .4byte gMonIcon_Lickitung
- .4byte gMonIcon_Koffing
- .4byte gMonIcon_Weezing
- .4byte gMonIcon_Rhyhorn
- .4byte gMonIcon_Rhydon
- .4byte gMonIcon_Chansey
- .4byte gMonIcon_Tangela
- .4byte gMonIcon_Kangaskhan
- .4byte gMonIcon_Horsea
- .4byte gMonIcon_Seadra
- .4byte gMonIcon_Goldeen
- .4byte gMonIcon_Seaking
- .4byte gMonIcon_Staryu
- .4byte gMonIcon_Starmie
- .4byte gMonIcon_Mrmime
- .4byte gMonIcon_Scyther
- .4byte gMonIcon_Jynx
- .4byte gMonIcon_Electabuzz
- .4byte gMonIcon_Magmar
- .4byte gMonIcon_Pinsir
- .4byte gMonIcon_Tauros
- .4byte gMonIcon_Magikarp
- .4byte gMonIcon_Gyarados
- .4byte gMonIcon_Lapras
- .4byte gMonIcon_Ditto
- .4byte gMonIcon_Eevee
- .4byte gMonIcon_Vaporeon
- .4byte gMonIcon_Jolteon
- .4byte gMonIcon_Flareon
- .4byte gMonIcon_Porygon
- .4byte gMonIcon_Omanyte
- .4byte gMonIcon_Omastar
- .4byte gMonIcon_Kabuto
- .4byte gMonIcon_Kabutops
- .4byte gMonIcon_Aerodactyl
- .4byte gMonIcon_Snorlax
- .4byte gMonIcon_Articuno
- .4byte gMonIcon_Zapdos
- .4byte gMonIcon_Moltres
- .4byte gMonIcon_Dratini
- .4byte gMonIcon_Dragonair
- .4byte gMonIcon_Dragonite
- .4byte gMonIcon_Mewtwo
- .4byte gMonIcon_Mew
- .4byte gMonIcon_Chikorita
- .4byte gMonIcon_Bayleef
- .4byte gMonIcon_Meganium
- .4byte gMonIcon_Cyndaquil
- .4byte gMonIcon_Quilava
- .4byte gMonIcon_Typhlosion
- .4byte gMonIcon_Totodile
- .4byte gMonIcon_Croconaw
- .4byte gMonIcon_Feraligatr
- .4byte gMonIcon_Sentret
- .4byte gMonIcon_Furret
- .4byte gMonIcon_Hoothoot
- .4byte gMonIcon_Noctowl
- .4byte gMonIcon_Ledyba
- .4byte gMonIcon_Ledian
- .4byte gMonIcon_Spinarak
- .4byte gMonIcon_Ariados
- .4byte gMonIcon_Crobat
- .4byte gMonIcon_Chinchou
- .4byte gMonIcon_Lanturn
- .4byte gMonIcon_Pichu
- .4byte gMonIcon_Cleffa
- .4byte gMonIcon_Igglybuff
- .4byte gMonIcon_Togepi
- .4byte gMonIcon_Togetic
- .4byte gMonIcon_Natu
- .4byte gMonIcon_Xatu
- .4byte gMonIcon_Mareep
- .4byte gMonIcon_Flaaffy
- .4byte gMonIcon_Ampharos
- .4byte gMonIcon_Bellossom
- .4byte gMonIcon_Marill
- .4byte gMonIcon_Azumarill
- .4byte gMonIcon_Sudowoodo
- .4byte gMonIcon_Politoed
- .4byte gMonIcon_Hoppip
- .4byte gMonIcon_Skiploom
- .4byte gMonIcon_Jumpluff
- .4byte gMonIcon_Aipom
- .4byte gMonIcon_Sunkern
- .4byte gMonIcon_Sunflora
- .4byte gMonIcon_Yanma
- .4byte gMonIcon_Wooper
- .4byte gMonIcon_Quagsire
- .4byte gMonIcon_Espeon
- .4byte gMonIcon_Umbreon
- .4byte gMonIcon_Murkrow
- .4byte gMonIcon_Slowking
- .4byte gMonIcon_Misdreavus
- .4byte gMonIcon_UnownA
- .4byte gMonIcon_Wobbuffet
- .4byte gMonIcon_Girafarig
- .4byte gMonIcon_Pineco
- .4byte gMonIcon_Forretress
- .4byte gMonIcon_Dunsparce
- .4byte gMonIcon_Gligar
- .4byte gMonIcon_Steelix
- .4byte gMonIcon_Snubbull
- .4byte gMonIcon_Granbull
- .4byte gMonIcon_Qwilfish
- .4byte gMonIcon_Scizor
- .4byte gMonIcon_Shuckle
- .4byte gMonIcon_Heracross
- .4byte gMonIcon_Sneasel
- .4byte gMonIcon_Teddiursa
- .4byte gMonIcon_Ursaring
- .4byte gMonIcon_Slugma
- .4byte gMonIcon_Magcargo
- .4byte gMonIcon_Swinub
- .4byte gMonIcon_Piloswine
- .4byte gMonIcon_Corsola
- .4byte gMonIcon_Remoraid
- .4byte gMonIcon_Octillery
- .4byte gMonIcon_Delibird
- .4byte gMonIcon_Mantine
- .4byte gMonIcon_Skarmory
- .4byte gMonIcon_Houndour
- .4byte gMonIcon_Houndoom
- .4byte gMonIcon_Kingdra
- .4byte gMonIcon_Phanpy
- .4byte gMonIcon_Donphan
- .4byte gMonIcon_Porygon2
- .4byte gMonIcon_Stantler
- .4byte gMonIcon_Smeargle
- .4byte gMonIcon_Tyrogue
- .4byte gMonIcon_Hitmontop
- .4byte gMonIcon_Smoochum
- .4byte gMonIcon_Elekid
- .4byte gMonIcon_Magby
- .4byte gMonIcon_Miltank
- .4byte gMonIcon_Blissey
- .4byte gMonIcon_Raikou
- .4byte gMonIcon_Entei
- .4byte gMonIcon_Suicune
- .4byte gMonIcon_Larvitar
- .4byte gMonIcon_Pupitar
- .4byte gMonIcon_Tyranitar
- .4byte gMonIcon_Lugia
- .4byte gMonIcon_HoOh
- .4byte gMonIcon_Celebi
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_QuestionMark
- .4byte gMonIcon_Treecko
- .4byte gMonIcon_Grovyle
- .4byte gMonIcon_Sceptile
- .4byte gMonIcon_Torchic
- .4byte gMonIcon_Combusken
- .4byte gMonIcon_Blaziken
- .4byte gMonIcon_Mudkip
- .4byte gMonIcon_Marshtomp
- .4byte gMonIcon_Swampert
- .4byte gMonIcon_Poochyena
- .4byte gMonIcon_Mightyena
- .4byte gMonIcon_Zigzagoon
- .4byte gMonIcon_Linoone
- .4byte gMonIcon_Wurmple
- .4byte gMonIcon_Silcoon
- .4byte gMonIcon_Beautifly
- .4byte gMonIcon_Cascoon
- .4byte gMonIcon_Dustox
- .4byte gMonIcon_Lotad
- .4byte gMonIcon_Lombre
- .4byte gMonIcon_Ludicolo
- .4byte gMonIcon_Seedot
- .4byte gMonIcon_Nuzleaf
- .4byte gMonIcon_Shiftry
- .4byte gMonIcon_Nincada
- .4byte gMonIcon_Ninjask
- .4byte gMonIcon_Shedinja
- .4byte gMonIcon_Taillow
- .4byte gMonIcon_Swellow
- .4byte gMonIcon_Shroomish
- .4byte gMonIcon_Breloom
- .4byte gMonIcon_Spinda
- .4byte gMonIcon_Wingull
- .4byte gMonIcon_Pelipper
- .4byte gMonIcon_Surskit
- .4byte gMonIcon_Masquerain
- .4byte gMonIcon_Wailmer
- .4byte gMonIcon_Wailord
- .4byte gMonIcon_Skitty
- .4byte gMonIcon_Delcatty
- .4byte gMonIcon_Kecleon
- .4byte gMonIcon_Baltoy
- .4byte gMonIcon_Claydol
- .4byte gMonIcon_Nosepass
- .4byte gMonIcon_Torkoal
- .4byte gMonIcon_Sableye
- .4byte gMonIcon_Barboach
- .4byte gMonIcon_Whiscash
- .4byte gMonIcon_Luvdisc
- .4byte gMonIcon_Corphish
- .4byte gMonIcon_Crawdaunt
- .4byte gMonIcon_Feebas
- .4byte gMonIcon_Milotic
- .4byte gMonIcon_Carvanha
- .4byte gMonIcon_Sharpedo
- .4byte gMonIcon_Trapinch
- .4byte gMonIcon_Vibrava
- .4byte gMonIcon_Flygon
- .4byte gMonIcon_Makuhita
- .4byte gMonIcon_Hariyama
- .4byte gMonIcon_Electrike
- .4byte gMonIcon_Manectric
- .4byte gMonIcon_Numel
- .4byte gMonIcon_Camerupt
- .4byte gMonIcon_Spheal
- .4byte gMonIcon_Sealeo
- .4byte gMonIcon_Walrein
- .4byte gMonIcon_Cacnea
- .4byte gMonIcon_Cacturne
- .4byte gMonIcon_Snorunt
- .4byte gMonIcon_Glalie
- .4byte gMonIcon_Lunatone
- .4byte gMonIcon_Solrock
- .4byte gMonIcon_Azurill
- .4byte gMonIcon_Spoink
- .4byte gMonIcon_Grumpig
- .4byte gMonIcon_Plusle
- .4byte gMonIcon_Minun
- .4byte gMonIcon_Mawile
- .4byte gMonIcon_Meditite
- .4byte gMonIcon_Medicham
- .4byte gMonIcon_Swablu
- .4byte gMonIcon_Altaria
- .4byte gMonIcon_Wynaut
- .4byte gMonIcon_Duskull
- .4byte gMonIcon_Dusclops
- .4byte gMonIcon_Roselia
- .4byte gMonIcon_Slakoth
- .4byte gMonIcon_Vigoroth
- .4byte gMonIcon_Slaking
- .4byte gMonIcon_Gulpin
- .4byte gMonIcon_Swalot
- .4byte gMonIcon_Tropius
- .4byte gMonIcon_Whismur
- .4byte gMonIcon_Loudred
- .4byte gMonIcon_Exploud
- .4byte gMonIcon_Clamperl
- .4byte gMonIcon_Huntail
- .4byte gMonIcon_Gorebyss
- .4byte gMonIcon_Absol
- .4byte gMonIcon_Shuppet
- .4byte gMonIcon_Banette
- .4byte gMonIcon_Seviper
- .4byte gMonIcon_Zangoose
- .4byte gMonIcon_Relicanth
- .4byte gMonIcon_Aron
- .4byte gMonIcon_Lairon
- .4byte gMonIcon_Aggron
- .4byte gMonIcon_Castform
- .4byte gMonIcon_Volbeat
- .4byte gMonIcon_Illumise
- .4byte gMonIcon_Lileep
- .4byte gMonIcon_Cradily
- .4byte gMonIcon_Anorith
- .4byte gMonIcon_Armaldo
- .4byte gMonIcon_Ralts
- .4byte gMonIcon_Kirlia
- .4byte gMonIcon_Gardevoir
- .4byte gMonIcon_Bagon
- .4byte gMonIcon_Shelgon
- .4byte gMonIcon_Salamence
- .4byte gMonIcon_Beldum
- .4byte gMonIcon_Metang
- .4byte gMonIcon_Metagross
- .4byte gMonIcon_Regirock
- .4byte gMonIcon_Regice
- .4byte gMonIcon_Registeel
- .4byte gMonIcon_Kyogre
- .4byte gMonIcon_Groudon
- .4byte gMonIcon_Rayquaza
- .4byte gMonIcon_Latias
- .4byte gMonIcon_Latios
- .4byte gMonIcon_Jirachi
- .4byte gMonIcon_Deoxys
- .4byte gMonIcon_Chimecho
- .4byte gMonIcon_Egg
- .4byte gMonIcon_UnownB
- .4byte gMonIcon_UnownC
- .4byte gMonIcon_UnownD
- .4byte gMonIcon_UnownE
- .4byte gMonIcon_UnownF
- .4byte gMonIcon_UnownG
- .4byte gMonIcon_UnownH
- .4byte gMonIcon_UnownI
- .4byte gMonIcon_UnownJ
- .4byte gMonIcon_UnownK
- .4byte gMonIcon_UnownL
- .4byte gMonIcon_UnownM
- .4byte gMonIcon_UnownN
- .4byte gMonIcon_UnownO
- .4byte gMonIcon_UnownP
- .4byte gMonIcon_UnownQ
- .4byte gMonIcon_UnownR
- .4byte gMonIcon_UnownS
- .4byte gMonIcon_UnownT
- .4byte gMonIcon_UnownU
- .4byte gMonIcon_UnownV
- .4byte gMonIcon_UnownW
- .4byte gMonIcon_UnownX
- .4byte gMonIcon_UnownY
- .4byte gMonIcon_UnownZ
- .4byte gMonIcon_UnownExclamationMark
- .4byte gMonIcon_UnownQuestionMark
diff --git a/data/item_menu_icons.s b/data/item_menu_icons.s
index 01aa67eb0..c79b59e43 100644
--- a/data/item_menu_icons.s
+++ b/data/item_menu_icons.s
@@ -1,4 +1,4 @@
-#include "constants/items.h"
+ #include "constants/items.h"
.include "asm/macros.inc"
.include "constants/constants.inc"
@@ -54,7 +54,22 @@ gUnknown_0857FDF4:: @ 857FDF4
.incbin "baserom.gba", 0x57fdf4, 0x1c
gUnknown_0857FE10:: @ 857FE10
- .incbin "baserom.gba", 0x57fe10, 0x90
+ .incbin "baserom.gba", 0x57fe10, 0x18
+
+gUnknown_0857FE28:: @ 857FE28
+ .incbin "baserom.gba", 0x57fe28, 0x18
+
+gUnknown_0857FE40:: @ 857FE40
+ .incbin "baserom.gba", 0x57fe40, 0x18
+
+gUnknown_0857FE58:: @ 857FE58
+ .incbin "baserom.gba", 0x57fe58, 0x18
+
+gUnknown_0857FE70:: @ 857FE70
+ .incbin "baserom.gba", 0x57fe70, 0x18
+
+gUnknown_0857FE88:: @ 857FE88
+ .incbin "baserom.gba", 0x57fe88, 0x18
@ 857FEA0
.include "data/text/item_descriptions.inc"
diff --git a/data/party_menu.s b/data/party_menu.s
index 36ee4f960..8013e5614 100644
--- a/data/party_menu.s
+++ b/data/party_menu.s
@@ -166,10 +166,51 @@ gUnknown_08615AF1:: @ 8615AF1
.incbin "baserom.gba", 0x615af1, 0x3
gUnknown_08615AF4:: @ 8615AF4
- .incbin "baserom.gba", 0x615af4, 0x6c
+ .4byte gUnknown_085E9E43
+ .4byte gUnknown_085EA010
+ .4byte gUnknown_085EA02A
+ .4byte gUnknown_085E9E55
+ .4byte gUnknown_085E9E64
+ .4byte gUnknown_085E9E79
+ .4byte gUnknown_085E9E8F
+ .4byte gUnknown_085E9EBC
+ .4byte gUnknown_085E9ED4
+ .4byte gUnknown_085E9EE9
+ .4byte gUnknown_085E9FDB
+ .4byte gUnknown_085EA046
+ .4byte gUnknown_085EA05B
+ .4byte gUnknown_085E9F01
+ .4byte gUnknown_085E9F58
+ .4byte gUnknown_085E9F6F
+ .4byte gUnknown_085E9F81
+ .4byte gUnknown_085E9F90
+ .4byte gUnknown_085E9FA7
+ .4byte gUnknown_085E9FC2
+ .4byte gText_EmptyString2
+ .4byte gUnknown_085E9EA6
+ .4byte gUnknown_085E9F16
+ .4byte gUnknown_085E9F2A
+ .4byte gUnknown_085E9F42
+ .4byte gUnknown_085E9FF9
+ .4byte gUnknown_085EA073
gUnknown_08615B60:: @ 8615B60
- .incbin "baserom.gba", 0x615b60, 0xa8
+ .4byte gUnknown_085EA091
+ .4byte gUnknown_085EA099
+ .4byte gUnknown_085EA09E
+ .4byte gUnknown_085EA0A4
+ .4byte gUnknown_085EA0AB
+ .4byte gUnknown_085EA0E7
+ .4byte gUnknown_085EA0B1
+ .4byte gUnknown_085EA0B6
+ .4byte gUnknown_085EA0BF
+ .4byte gUnknown_085EA0C5
+ .4byte gUnknown_085EA0CF
+ .4byte gUnknown_085EA0D7
+ .4byte gUnknown_085EA0DC
+
+gUnknown_08615B94:: @ 8615B94
+ .incbin "baserom.gba", 0x615b94, 0x74
gUnknown_08615C08:: @ 8615C08
.incbin "baserom.gba", 0x615c08, 0x130
@@ -187,22 +228,28 @@ gUnknown_08615D9C:: @ 8615D9C
.incbin "baserom.gba", 0x615d9c, 0x70
gUnknown_08615E0C:: @ 8615E0C
- .incbin "baserom.gba", 0x615e0c, 0xa4
+ .incbin "baserom.gba", 0x615e0c, 0x24
+
+gUnknown_08615E30:: @ 8615E30
+ .incbin "baserom.gba", 0x615e30, 0x40
+
+gUnknown_08615E70:: @ 8615E70
+ .incbin "baserom.gba", 0x615e70, 0x40
gUnknown_08615EB0:: @ 8615EB0
- .incbin "baserom.gba", 0x615eb0, 0x8
+ obj_tiles gUnknown_08615E30, 0x40, 55120
gUnknown_08615EB8:: @ 8615EB8
- .incbin "baserom.gba", 0x615eb8, 0x8
+ obj_pal gUnknown_08615E70, 55120
gUnknown_08615EC0:: @ 8615EC0
.incbin "baserom.gba", 0x615ec0, 0x38
gUnknown_08615EF8:: @ 8615EF8
- .incbin "baserom.gba", 0x615ef8, 0x8
+ obj_tiles gPartyMenuPokeball_Gfx, 0x400, 1200
gUnknown_08615F00:: @ 8615F00
- .incbin "baserom.gba", 0x615f00, 0x8
+ obj_pal gPartyMenuPokeball_Pal, 1200
gUnknown_08615F08:: @ 8615F08
.incbin "baserom.gba", 0x615f08, 0x68
@@ -214,10 +261,10 @@ gUnknown_08615F78:: @ 8615F78
.incbin "baserom.gba", 0x615f78, 0x80
gUnknown_08615FF8:: @ 8615FF8
- .incbin "baserom.gba", 0x615ff8, 0x8
+ obj_tiles gStatusGfx_Icons, 0x400, 1202
gUnknown_08616000:: @ 8616000
- .incbin "baserom.gba", 0x616000, 0x8
+ obj_pal gStatusPal_Icons, 1202
gUnknown_08616008:: @ 8616008
.incbin "baserom.gba", 0x616008, 0x18
diff --git a/data/pokedex.s b/data/pokedex.s
index 3ba94dbc5..3b783be34 100644
--- a/data/pokedex.s
+++ b/data/pokedex.s
@@ -1,62 +1,26 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
- .align 2, 0
-
-gUnknown_0855C6A4:: @ 855C6A4
- .incbin "baserom.gba", 0x55c6a4, 0x336
-
-gUnknown_0855C9DA:: @ 855C9DA
- .incbin "baserom.gba", 0x55c9da, 0x304
-
-gUnknown_0855CCDE:: @ 855CCDE
- .incbin "baserom.gba", 0x55ccde, 0x4b6
-
-gUnknown_0855D194:: @ 855D194
- .incbin "baserom.gba", 0x55d194, 0x18
-
-gUnknown_0855D1AC:: @ 855D1AC
- .incbin "baserom.gba", 0x55d1ac, 0x18
-
-gUnknown_0855D1C4:: @ 855D1C4
- .incbin "baserom.gba", 0x55d1c4, 0x18
-
-gUnknown_0855D1DC:: @ 855D1DC
- .incbin "baserom.gba", 0x55d1dc, 0x18
-
-gUnknown_0855D1F4:: @ 855D1F4
- .incbin "baserom.gba", 0x55d1f4, 0x18
-
-gUnknown_0855D20C:: @ 855D20C
- .incbin "baserom.gba", 0x55d20c, 0x18
-
-gUnknown_0855D224:: @ 855D224
- .incbin "baserom.gba", 0x55d224, 0x18
-
-gUnknown_0855D23C:: @ 855D23C
- .incbin "baserom.gba", 0x55d23c, 0x18
-
-gUnknown_0855D254:: @ 855D254
- .incbin "baserom.gba", 0x55d254, 0x18
-
-gUnknown_0855D26C:: @ 855D26C
- .incbin "baserom.gba", 0x55d26c, 0x10
-
-gUnknown_0855D27C:: @ 855D27C
- .incbin "baserom.gba", 0x55d27c, 0x10
-
-gUnknown_0855D28C:: @ 855D28C
- .incbin "baserom.gba", 0x55d28c, 0x5
-
-gUnknown_0855D291:: @ 855D291
- .incbin "baserom.gba", 0x55d291, 0x7
-
-gUnknown_0855D298:: @ 855D298
- .incbin "baserom.gba", 0x55d298, 0x10
-
-gUnknown_0855D2A8:: @ 855D2A8
- .incbin "baserom.gba", 0x55d2a8, 0x10
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
+
+ .section .rodata
+ .align 2, 0
+
+.macro unk_dex_struct texts, a2, a3, a4
+ .4byte \texts
+ .byte \a2, \a3, \a4
+ .byte 0 @padding
+.endm
+
+.macro unk_dex_struct_2 text, a2, a3, a4, a5, a6, a7
+ .4byte \text
+ .byte \a2, \a3, \a4, \a5, \a6, \a7
+ .2byte 0 @padding
+.endm
+
+.macro unk_dex_struct_3 text, a2, a3, a4
+ .4byte \text
+ .byte \a2, \a3, \a4
+ .byte 0 @padding
+.endm
gUnknown_0855D2B8:: @ 855D2B8
.incbin "baserom.gba", 0x55d2b8, 0x6
@@ -64,8 +28,10 @@ gUnknown_0855D2B8:: @ 855D2B8
gUnknown_0855D2BE:: @ 855D2BE
.incbin "baserom.gba", 0x55d2be, 0x40
-gUnknown_0855D2FE:: @ 855D2FE
- .incbin "baserom.gba", 0x55d2fe, 0xe
+sText_TenDashes:: @ 855D2FE
+ .string "----------$"
+
+.align 2
gUnknown_0855D30C:: @ 855D30C
.string "$"
@@ -101,10 +67,18 @@ gUnknown_0856ED08:: @ 856ED08
.incbin "baserom.gba", 0x56ed08, 0x28
gUnknown_0856ED30:: @ 856ED30
- .incbin "baserom.gba", 0x56ed30, 0x18
+ unk_dex_struct_3 gUnknown_085E87A5, 0, 0, 5
+ unk_dex_struct_3 gUnknown_085E87D6, 6, 0, 5
+ unk_dex_struct_3 gUnknown_085E87EF, 12, 0, 5
gUnknown_0856ED48:: @ 856ED48
- .incbin "baserom.gba", 0x56ed48, 0x54
+ unk_dex_struct_2 gUnknown_085E8840, 0, 2, 5, 5, 2, 12
+ unk_dex_struct_2 gUnknown_085E887C, 0, 4, 5, 5, 4, 12
+ unk_dex_struct_2 gUnknown_085E88A6, 0, 6, 5, 5, 6, 6
+ unk_dex_struct_2 gUnknown_085E88A6, 0, 6, 5, 11, 6, 6
+ unk_dex_struct_2 gUnknown_085E881F, 0, 8, 5, 5, 8, 12
+ unk_dex_struct_2 gUnknown_085E8806, 0, 10, 5, 5, 10, 12
+ unk_dex_struct_2 gUnknown_085E88C8, 0, 12, 5, 0, 0, 0
gUnknown_0856ED9C:: @ 856ED9C
.incbin "baserom.gba", 0x56ed9c, 0x1c
@@ -119,19 +93,119 @@ gUnknown_0856EDF0:: @ 856EDF0
.incbin "baserom.gba", 0x56edf0, 0x1c
gUnknown_0856EE0C:: @ 856EE0C
- .incbin "baserom.gba", 0x56ee0c, 0x18
+ .4byte gUnknown_085E89A4
+ .4byte gUnknown_085E88DF
+ .4byte gUnknown_085E89BB
+ .4byte gUnknown_085E88E9
+ .4byte NULL
+ .4byte NULL
gUnknown_0856EE24:: @ 856EE24
- .incbin "baserom.gba", 0x56ee24, 0x38
+ .4byte gUnknown_085E89D4
+ .4byte gUnknown_085E88F6
+ .4byte gUnknown_085E8A02
+ .4byte gUnknown_085E8905
+ .4byte gUnknown_085E8A37
+ .4byte gUnknown_085E8911
+ .4byte gUnknown_085E8A73
+ .4byte gUnknown_085E891F
+ .4byte gUnknown_085E8AAF
+ .4byte gUnknown_085E892D
+ .4byte gUnknown_085E8AEA
+ .4byte gUnknown_085E893A
+ .4byte 0
+ .4byte 0
gUnknown_0856EE5C:: @ 856EE5C
- .incbin "baserom.gba", 0x56ee5c, 0x58
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8B26
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8948
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E894C
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8950
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8954
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8958
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E895C
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8960
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8964
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8968
+ .4byte 0
+ .4byte 0
gUnknown_0856EEB4:: @ 856EEB4
- .incbin "baserom.gba", 0x56eeb4, 0x60
-
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8B26
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E896B
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E896F
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8974
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E897B
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8981
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8987
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E898D
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8994
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8999
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E899F
+ .4byte 0
+ .4byte 0
+
+@ read from type table for each type except ???, entry is 7 byte of length
gUnknown_0856EF14:: @ 856EF14
- .incbin "baserom.gba", 0x56ef14, 0x98
+ .4byte gUnknown_085E8B25
+ .4byte gUnknown_085E8B35
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 0
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 7
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 14
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 21
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 28
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 35
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 42
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 49
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 56
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 70
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 77
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 84
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 91
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 98
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 105
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 112
+ .4byte gUnknown_085E8B25
+ .4byte gTypeNames + 119
+ .4byte 0
+ .4byte 0
gUnknown_0856EFAC:: @ 856EFAC
.incbin "baserom.gba", 0x56efac, 0x2
@@ -143,7 +217,12 @@ gUnknown_0856EFB4:: @ 856EFB4
.incbin "baserom.gba", 0x56efb4, 0x14
gUnknown_0856EFC8:: @ 856EFC8
- .incbin "baserom.gba", 0x56efc8, 0x30
+ unk_dex_struct gUnknown_0856EE5C, 6, 7, 10
+ unk_dex_struct gUnknown_0856EEB4, 8, 9, 11
+ unk_dex_struct gUnknown_0856EF14, 10,11, 18
+ unk_dex_struct gUnknown_0856EF14, 12, 13, 18
+ unk_dex_struct gUnknown_0856EE24, 4, 5, 6
+ unk_dex_struct gUnknown_0856EE0C, 2, 3, 2
gUnknown_0856EFF8:: @ 856EFF8
.incbin "baserom.gba", 0x56eff8, 0x10
diff --git a/data/pokedex_area_screen.s b/data/pokedex_area_screen.s
index e55f03fab..77d17a047 100644
--- a/data/pokedex_area_screen.s
+++ b/data/pokedex_area_screen.s
@@ -79,7 +79,7 @@ AreaMarkerTiles:: @ 85B406C
.align 2
gUnknown_085B40EC:: @ 85B40EC
- obj_pal gUnknown_08DC4120, 0x0003
+ obj_pal gPokedexAreaScreenAreaUnknown_Pal, 0x0003
.align 2
gOamData_85B40F4:: @ 85B40F4
diff --git a/data/pokedex_entries.inc b/data/pokedex_entries.inc
index 76eedf023..ce98a7b26 100644
--- a/data/pokedex_entries.inc
+++ b/data/pokedex_entries.inc
@@ -1,11 +1,11 @@
.align 2
gPokedexEntries:: @ 856B5B0
.string "UNKNOWN$", 12
- pokedex_entry 0, 0, gDummyPokedexText, 256, 0, 256, 0
+ pokedex_entry 0, 0, gDummyPokedexText, 256, 0, 256, 0
.string "SEED$", 12
pokedex_entry 7, 69, gBulbasaurPokedexText, 356, 17, 256, 0
.string "SEED$", 12
- pokedex_entry 10, 130, gIvysaurPokedexText, 335, 13, 256, 0
+ pokedex_entry 10, 130, gIvysaurPokedexText, 335, 13, 256, 0
.string "SEED$", 12
pokedex_entry 20, 1000, gVenusaurPokedexText, 256, 0, 388, 6
.string "LIZARD$", 12
@@ -23,37 +23,37 @@ gPokedexEntries:: @ 856B5B0
.string "WORM$", 12
pokedex_entry 3, 29, gCaterpiePokedexText, 549, 22, 256, 0
.string "COCOON$", 12
- pokedex_entry 7, 99, gMetapodPokedexText, 350, 18, 256, 0
+ pokedex_entry 7, 99, gMetapodPokedexText, 350, 18, 256, 0
.string "BUTTERFLY$", 12
pokedex_entry 11, 320, gButterfreePokedexText, 312, 2, 256, 0
.string "HAIRY BUG$", 12
- pokedex_entry 3, 32, gWeedlePokedexText, 455, 22, 256, 0
+ pokedex_entry 3, 32, gWeedlePokedexText, 455, 22, 256, 0
.string "COCOON$", 12
- pokedex_entry 6, 100, gKakunaPokedexText, 424, 17, 256, 0
+ pokedex_entry 6, 100, gKakunaPokedexText, 424, 17, 256, 0
.string "POISON BEE$", 12
pokedex_entry 10, 295, gBeedrillPokedexText, 366, 2, 256, 0
.string "TINY BIRD$", 12
- pokedex_entry 3, 18, gPidgeyPokedexText, 508, -3, 256, 0
+ pokedex_entry 3, 18, gPidgeyPokedexText, 508, -3, 256, 0
.string "BIRD$", 12
pokedex_entry 11, 300, gPidgeottoPokedexText, 331, 10, 256, 0
.string "BIRD$", 12
- pokedex_entry 15, 395, gPidgeotPokedexText, 269, 0, 256, 0
+ pokedex_entry 15, 395, gPidgeotPokedexText, 269, 0, 256, 0
.string "MOUSE$", 12
- pokedex_entry 3, 35, gRattataPokedexText, 481, 21, 256, 0
+ pokedex_entry 3, 35, gRattataPokedexText, 481, 21, 256, 0
.string "MOUSE$", 12
pokedex_entry 7, 185, gRaticatePokedexText, 459, 18, 256, 0
.string "TINY BIRD$", 12
- pokedex_entry 3, 20, gSpearowPokedexText, 571, 22, 256, 0
+ pokedex_entry 3, 20, gSpearowPokedexText, 571, 22, 256, 0
.string "BEAK$", 12
- pokedex_entry 12, 380, gFearowPokedexText, 278, 1, 256, 0
+ pokedex_entry 12, 380, gFearowPokedexText, 278, 1, 256, 0
.string "SNAKE$", 12
- pokedex_entry 20, 69, gEkansPokedexText, 298, 12, 256, 0
+ pokedex_entry 20, 69, gEkansPokedexText, 298, 12, 256, 0
.string "COBRA$", 12
- pokedex_entry 35, 650, gArbokPokedexText, 256, 0, 296, 2
+ pokedex_entry 35, 650, gArbokPokedexText, 256, 0, 296, 2
.string "MOUSE$", 12
- pokedex_entry 4, 60, gPikachuPokedexText, 479, 19, 256, 0
+ pokedex_entry 4, 60, gPikachuPokedexText, 479, 19, 256, 0
.string "MOUSE$", 12
- pokedex_entry 8, 300, gRaichuPokedexText, 426, 13, 256, 0
+ pokedex_entry 8, 300, gRaichuPokedexText, 426, 13, 256, 0
.string "MOUSE$", 12
pokedex_entry 6, 120, gSandshrewPokedexText, 365, 18, 256, 0
.string "MOUSE$", 12
@@ -75,7 +75,7 @@ gPokedexEntries:: @ 856B5B0
.string "FAIRY$", 12
pokedex_entry 13, 400, gClefablePokedexText, 256, 5, 256, 0
.string "FOX$", 12
- pokedex_entry 6, 99, gVulpixPokedexText, 542, 19, 256, 0
+ pokedex_entry 6, 99, gVulpixPokedexText, 542, 19, 256, 0
.string "FOX$", 12
pokedex_entry 11, 199, gNinetalesPokedexText, 339, 10, 256, 0
.string "BALLOON$", 12
@@ -83,37 +83,37 @@ gPokedexEntries:: @ 856B5B0
.string "BALLOON$", 12
pokedex_entry 10, 120, gWigglytuffPokedexText, 328, 11, 256, 0
.string "BAT$", 12
- pokedex_entry 8, 75, gZubatPokedexText, 362, -5, 256, 0
+ pokedex_entry 8, 75, gZubatPokedexText, 362, -5, 256, 0
.string "BAT$", 12
- pokedex_entry 16, 550, gGolbatPokedexText, 256, 1, 256, 0
+ pokedex_entry 16, 550, gGolbatPokedexText, 256, 1, 256, 0
.string "WEED$", 12
- pokedex_entry 5, 54, gOddishPokedexText, 423, 19, 256, 0
+ pokedex_entry 5, 54, gOddishPokedexText, 423, 19, 256, 0
.string "WEED$", 12
- pokedex_entry 8, 86, gGloomPokedexText, 329, 13, 256, 0
+ pokedex_entry 8, 86, gGloomPokedexText, 329, 13, 256, 0
.string "FLOWER$", 12
pokedex_entry 12, 186, gVileplumePokedexText, 256, 4, 256, 0
.string "MUSHROOM$", 12
- pokedex_entry 3, 54, gParasPokedexText, 593, 22, 256, 0
+ pokedex_entry 3, 54, gParasPokedexText, 593, 22, 256, 0
.string "MUSHROOM$", 12
pokedex_entry 10, 295, gParasectPokedexText, 307, 8, 256, 0
.string "INSECT$", 12
- pokedex_entry 10, 300, gVenonatPokedexText, 360, 0, 256, -1
+ pokedex_entry 10, 300, gVenonatPokedexText, 360, 0, 256, -1
.string "POISON MOTH$", 12
pokedex_entry 15, 125, gVenomothPokedexText, 285, 2, 256, 1
.string "MOLE$", 12
- pokedex_entry 2, 8, gDiglettPokedexText, 833, 25, 256, 0
+ pokedex_entry 2, 8, gDiglettPokedexText, 833, 25, 256, 0
.string "MOLE$", 12
- pokedex_entry 7, 333, gDugtrioPokedexText, 406, 18, 256, 0
+ pokedex_entry 7, 333, gDugtrioPokedexText, 406, 18, 256, 0
.string "SCRATCH CAT$", 12
- pokedex_entry 4, 42, gMeowthPokedexText, 480, 19, 256, 0
+ pokedex_entry 4, 42, gMeowthPokedexText, 480, 19, 256, 0
.string "CLASSY CAT$", 12
- pokedex_entry 10, 320, gPersianPokedexText, 320, 10, 256, 0
+ pokedex_entry 10, 320, gPersianPokedexText, 320, 10, 256, 0
.string "DUCK$", 12
- pokedex_entry 8, 196, gPsyduckPokedexText, 369, 15, 256, 0
+ pokedex_entry 8, 196, gPsyduckPokedexText, 369, 15, 256, 0
.string "DUCK$", 12
- pokedex_entry 17, 766, gGolduckPokedexText, 256, 1, 273, 1
+ pokedex_entry 17, 766, gGolduckPokedexText, 256, 1, 273, 1
.string "PIG MONKEY$", 12
- pokedex_entry 5, 280, gMankeyPokedexText, 404, 19, 256, 0
+ pokedex_entry 5, 280, gMankeyPokedexText, 404, 19, 256, 0
.string "PIG MONKEY$", 12
pokedex_entry 10, 320, gPrimeapePokedexText, 326, 10, 256, 0
.string "PUPPY$", 12
@@ -121,23 +121,23 @@ gPokedexEntries:: @ 856B5B0
.string "LEGENDARY$", 12
pokedex_entry 19, 1550, gArcaninePokedexText, 256, 1, 312, 4
.string "TADPOLE$", 12
- pokedex_entry 6, 124, gPoliwagPokedexText, 369, 20, 256, 0
+ pokedex_entry 6, 124, gPoliwagPokedexText, 369, 20, 256, 0
.string "TADPOLE$", 12
pokedex_entry 10, 200, gPoliwhirlPokedexText, 288, 11, 256, 0
.string "TADPOLE$", 12
pokedex_entry 13, 540, gPoliwrathPokedexText, 256, 6, 256, 0
.string "PSI$", 12
- pokedex_entry 9, 195, gAbraPokedexText, 363, 14, 256, 0
+ pokedex_entry 9, 195, gAbraPokedexText, 363, 14, 256, 0
.string "PSI$", 12
- pokedex_entry 13, 565, gKadabraPokedexText, 256, 3, 256, 0
+ pokedex_entry 13, 565, gKadabraPokedexText, 256, 3, 256, 0
.string "PSI$", 12
pokedex_entry 15, 480, gAlakazamPokedexText, 256, 3, 256, 0
.string "SUPERPOWER$", 12
- pokedex_entry 8, 195, gMachopPokedexText, 342, 14, 256, 0
+ pokedex_entry 8, 195, gMachopPokedexText, 342, 14, 256, 0
.string "SUPERPOWER$", 12
- pokedex_entry 15, 705, gMachokePokedexText, 323, 9, 257, 0
+ pokedex_entry 15, 705, gMachokePokedexText, 323, 9, 257, 0
.string "SUPERPOWER$", 12
- pokedex_entry 16, 1300, gMachampPokedexText, 280, 1, 269, -1
+ pokedex_entry 16, 1300, gMachampPokedexText, 280, 1, 269, -1
.string "FLOWER$", 12
pokedex_entry 7, 40, gBellsproutPokedexText, 354, 16, 256, 0
.string "FLYCATCHER$", 12
@@ -149,19 +149,19 @@ gPokedexEntries:: @ 856B5B0
.string "JELLYFISH$", 12
pokedex_entry 16, 550, gTentacruelPokedexText, 256, 0, 312, 1
.string "ROCK$", 12
- pokedex_entry 4, 200, gGeodudePokedexText, 347, 18, 256, 0
+ pokedex_entry 4, 200, gGeodudePokedexText, 347, 18, 256, 0
.string "ROCK$", 12
pokedex_entry 10, 1050, gGravelerPokedexText, 256, 2, 256, 0
.string "MEGATON$", 12
- pokedex_entry 14, 3000, gGolemPokedexText, 256, 3, 296, 2
+ pokedex_entry 14, 3000, gGolemPokedexText, 256, 3, 296, 2
.string "FIRE HORSE$", 12
- pokedex_entry 10, 300, gPonytaPokedexText, 283, 8, 256, 0
+ pokedex_entry 10, 300, gPonytaPokedexText, 283, 8, 256, 0
.string "FIRE HORSE$", 12
pokedex_entry 17, 950, gRapidashPokedexText, 256, 0, 289, 1
.string "DOPEY$", 12
pokedex_entry 12, 360, gSlowpokePokedexText, 256, 10, 256, 0
.string "HERMIT CRAB$", 12
- pokedex_entry 16, 785, gSlowbroPokedexText, 256, 6, 296, 2
+ pokedex_entry 16, 785, gSlowbroPokedexText, 256, 6, 296, 2
.string "MAGNET$", 12
pokedex_entry 3, 60, gMagnemitePokedexText, 288, -9, 256, 0
.string "MAGNET$", 12
@@ -169,39 +169,39 @@ gPokedexEntries:: @ 856B5B0
.string "WILD DUCK$", 12
pokedex_entry 8, 150, gFarfetchdPokedexText, 330, 2, 293, 2
.string "TWIN BIRD$", 12
- pokedex_entry 14, 392, gDoduoPokedexText, 256, 3, 257, -1
+ pokedex_entry 14, 392, gDoduoPokedexText, 256, 3, 257, -1
.string "TRIPLE BIRD$", 12
- pokedex_entry 18, 852, gDodrioPokedexText, 256, 0, 268, 0
+ pokedex_entry 18, 852, gDodrioPokedexText, 256, 0, 268, 0
.string "SEA LION$", 12
- pokedex_entry 11, 900, gSeelPokedexText, 297, 8, 256, 0
+ pokedex_entry 11, 900, gSeelPokedexText, 297, 8, 256, 0
.string "SEA LION$", 12
- pokedex_entry 17, 1200, gDewgongPokedexText, 256, 0, 275, 0
+ pokedex_entry 17, 1200, gDewgongPokedexText, 256, 0, 275, 0
.string "SLUDGE$", 12
- pokedex_entry 9, 300, gGrimerPokedexText, 258, 10, 256, 0
+ pokedex_entry 9, 300, gGrimerPokedexText, 258, 10, 256, 0
.string "SLUDGE$", 12
- pokedex_entry 12, 300, gMukPokedexText, 256, 2, 256, 0
+ pokedex_entry 12, 300, gMukPokedexText, 256, 2, 256, 0
.string "BIVALVE$", 12
pokedex_entry 3, 40, gShellderPokedexText, 675, 24, 256, 0
.string "BIVALVE$", 12
pokedex_entry 15, 1325, gCloysterPokedexText, 256, 0, 269, 1
.string "GAS$", 12
- pokedex_entry 13, 1, gGastlyPokedexText, 256, 0, 256, 0
+ pokedex_entry 13, 1, gGastlyPokedexText, 256, 0, 256, 0
.string "GAS$", 12
- pokedex_entry 16, 1, gHaunterPokedexText, 256, 2, 293, 2
+ pokedex_entry 16, 1, gHaunterPokedexText, 256, 2, 293, 2
.string "SHADOW$", 12
- pokedex_entry 15, 405, gGengarPokedexText, 256, 2, 302, 2
+ pokedex_entry 15, 405, gGengarPokedexText, 256, 2, 302, 2
.string "ROCK SNAKE$", 12
- pokedex_entry 88, 2100, gOnixPokedexText, 256, 1, 515, 14
+ pokedex_entry 88, 2100, gOnixPokedexText, 256, 1, 515, 14
.string "HYPNOSIS$", 12
- pokedex_entry 10, 324, gDrowzeePokedexText, 274, 6, 256, 0
+ pokedex_entry 10, 324, gDrowzeePokedexText, 274, 6, 256, 0
.string "HYPNOSIS$", 12
- pokedex_entry 16, 756, gHypnoPokedexText, 256, 3, 257, 0
+ pokedex_entry 16, 756, gHypnoPokedexText, 256, 3, 257, 0
.string "RIVER CRAB$", 12
- pokedex_entry 4, 65, gKrabbyPokedexText, 469, 20, 256, 0
+ pokedex_entry 4, 65, gKrabbyPokedexText, 469, 20, 256, 0
.string "PINCER$", 12
- pokedex_entry 13, 600, gKinglerPokedexText, 256, 2, 256, 0
+ pokedex_entry 13, 600, gKinglerPokedexText, 256, 2, 256, 0
.string "BALL$", 12
- pokedex_entry 5, 104, gVoltorbPokedexText, 364, -8, 256, 0
+ pokedex_entry 5, 104, gVoltorbPokedexText, 364, -8, 256, 0
.string "BALL$", 12
pokedex_entry 12, 666, gElectrodePokedexText, 256, 0, 256, 0
.string "EGG$", 12
@@ -209,9 +209,9 @@ gPokedexEntries:: @ 856B5B0
.string "COCONUT$", 12
pokedex_entry 20, 1200, gExeggutorPokedexText, 256, 0, 309, 5
.string "LONELY$", 12
- pokedex_entry 4, 65, gCubonePokedexText, 545, 21, 256, 0
+ pokedex_entry 4, 65, gCubonePokedexText, 545, 21, 256, 0
.string "BONE KEEPER$", 12
- pokedex_entry 10, 450, gMarowakPokedexText, 293, 12, 256, 0
+ pokedex_entry 10, 450, gMarowakPokedexText, 293, 12, 256, 0
.string "KICKING$", 12
pokedex_entry 15, 498, gHitmonleePokedexText, 256, 3, 259, 1
.string "PUNCHING$", 12
@@ -219,101 +219,101 @@ gPokedexEntries:: @ 856B5B0
.string "LICKING$", 12
pokedex_entry 12, 655, gLickitungPokedexText, 256, 4, 256, 0
.string "POISON GAS$", 12
- pokedex_entry 6, 10, gKoffingPokedexText, 369, -1, 256, 0
+ pokedex_entry 6, 10, gKoffingPokedexText, 369, -1, 256, 0
.string "POISON GAS$", 12
- pokedex_entry 12, 95, gWeezingPokedexText, 305, 3, 256, 0
+ pokedex_entry 12, 95, gWeezingPokedexText, 305, 3, 256, 0
.string "SPIKES$", 12
- pokedex_entry 10, 1150, gRhyhornPokedexText, 267, 6, 256, 0
+ pokedex_entry 10, 1150, gRhyhornPokedexText, 267, 6, 256, 0
.string "DRILL$", 12
- pokedex_entry 19, 1200, gRhydonPokedexText, 256, 1, 299, 2
+ pokedex_entry 19, 1200, gRhydonPokedexText, 256, 1, 299, 2
.string "EGG$", 12
- pokedex_entry 11, 346, gChanseyPokedexText, 257, 7, 256, 0
+ pokedex_entry 11, 346, gChanseyPokedexText, 257, 7, 256, 0
.string "VINE$", 12
- pokedex_entry 10, 350, gTangelaPokedexText, 304, 1, 256, 0
+ pokedex_entry 10, 350, gTangelaPokedexText, 304, 1, 256, 0
.string "PARENT$", 12
pokedex_entry 22, 800, gKangaskhanPokedexText, 256, 0, 387, 8
.string "DRAGON$", 12
- pokedex_entry 4, 80, gHorseaPokedexText, 399, -1, 256, 0
+ pokedex_entry 4, 80, gHorseaPokedexText, 399, -1, 256, 0
.string "DRAGON$", 12
- pokedex_entry 12, 250, gSeadraPokedexText, 299, 3, 256, 0
+ pokedex_entry 12, 250, gSeadraPokedexText, 299, 3, 256, 0
.string "GOLDFISH$", 12
- pokedex_entry 6, 150, gGoldeenPokedexText, 379, 4, 256, 0
+ pokedex_entry 6, 150, gGoldeenPokedexText, 379, 4, 256, 0
.string "GOLDFISH$", 12
- pokedex_entry 13, 390, gSeakingPokedexText, 256, 3, 256, 0
+ pokedex_entry 13, 390, gSeakingPokedexText, 256, 3, 256, 0
.string "STAR SHAPE$", 12
- pokedex_entry 8, 345, gStaryuPokedexText, 326, 1, 256, 0
+ pokedex_entry 8, 345, gStaryuPokedexText, 326, 1, 256, 0
.string "MYSTERIOUS$", 12
- pokedex_entry 11, 800, gStarmiePokedexText, 301, 3, 256, 0
+ pokedex_entry 11, 800, gStarmiePokedexText, 301, 3, 256, 0
.string "BARRIER$", 12
- pokedex_entry 13, 545, gMrmimePokedexText, 258, 6, 256, 0
+ pokedex_entry 13, 545, gMrmimePokedexText, 258, 6, 256, 0
.string "MANTIS$", 12
- pokedex_entry 15, 560, gScytherPokedexText, 256, 1, 293, 2
+ pokedex_entry 15, 560, gScytherPokedexText, 256, 1, 293, 2
.string "HUMAN SHAPE$", 12
- pokedex_entry 14, 406, gJynxPokedexText, 256, 3, 300, 1
+ pokedex_entry 14, 406, gJynxPokedexText, 256, 3, 300, 1
.string "ELECTRIC$", 12
pokedex_entry 11, 300, gElectabuzzPokedexText, 351, 8, 256, 0
.string "SPITFIRE$", 12
- pokedex_entry 13, 445, gMagmarPokedexText, 277, 5, 256, 0
+ pokedex_entry 13, 445, gMagmarPokedexText, 277, 5, 256, 0
.string "STAG BEETLE$", 12
- pokedex_entry 15, 550, gPinsirPokedexText, 256, 2, 257, 0
+ pokedex_entry 15, 550, gPinsirPokedexText, 256, 2, 257, 0
.string "WILD BULL$", 12
- pokedex_entry 14, 884, gTaurosPokedexText, 256, 0, 256, 0
+ pokedex_entry 14, 884, gTaurosPokedexText, 256, 0, 256, 0
.string "FISH$", 12
pokedex_entry 9, 100, gMagikarpPokedexText, 310, 4, 256, 0
.string "ATROCIOUS$", 12
pokedex_entry 65, 2350, gGyaradosPokedexText, 256, 6, 481, 13
.string "TRANSPORT$", 12
- pokedex_entry 25, 2200, gLaprasPokedexText, 257, 10, 423, 8
+ pokedex_entry 25, 2200, gLaprasPokedexText, 257, 10, 423, 8
.string "TRANSFORM$", 12
- pokedex_entry 3, 40, gDittoPokedexText, 633, 23, 256, 0
+ pokedex_entry 3, 40, gDittoPokedexText, 633, 23, 256, 0
.string "EVOLUTION$", 12
- pokedex_entry 3, 65, gEeveePokedexText, 476, 18, 256, 0
+ pokedex_entry 3, 65, gEeveePokedexText, 476, 18, 256, 0
.string "BUBBLE JET$", 12
pokedex_entry 10, 290, gVaporeonPokedexText, 316, 8, 256, 0
.string "LIGHTNING$", 12
- pokedex_entry 8, 245, gJolteonPokedexText, 283, 8, 256, 0
+ pokedex_entry 8, 245, gJolteonPokedexText, 283, 8, 256, 0
.string "FLAME$", 12
- pokedex_entry 9, 250, gFlareonPokedexText, 306, 12, 256, 0
+ pokedex_entry 9, 250, gFlareonPokedexText, 306, 12, 256, 0
.string "VIRTUAL$", 12
- pokedex_entry 8, 365, gPorygonPokedexText, 328, 15, 256, 0
+ pokedex_entry 8, 365, gPorygonPokedexText, 328, 15, 256, 0
.string "SPIRAL$", 12
- pokedex_entry 4, 75, gOmanytePokedexText, 521, 22, 256, 0
+ pokedex_entry 4, 75, gOmanytePokedexText, 521, 22, 256, 0
.string "SPIRAL$", 12
- pokedex_entry 10, 350, gOmastarPokedexText, 307, 7, 256, 0
+ pokedex_entry 10, 350, gOmastarPokedexText, 307, 7, 256, 0
.string "SHELLFISH$", 12
- pokedex_entry 5, 115, gKabutoPokedexText, 454, 21, 256, 0
+ pokedex_entry 5, 115, gKabutoPokedexText, 454, 21, 256, 0
.string "SHELLFISH$", 12
pokedex_entry 13, 405, gKabutopsPokedexText, 271, 3, 256, 0
.string "FOSSIL$", 12
pokedex_entry 18, 590, gAerodactylPokedexText, 256, 0, 302, 4
.string "SLEEPING$", 12
- pokedex_entry 21, 4600, gSnorlaxPokedexText, 256, 4, 423, 11
+ pokedex_entry 21, 4600, gSnorlaxPokedexText, 256, 4, 423, 11
.string "FREEZE$", 12
pokedex_entry 17, 554, gArticunoPokedexText, 256, 0, 309, 2
.string "ELECTRIC$", 12
- pokedex_entry 16, 526, gZapdosPokedexText, 256, 0, 318, 3
+ pokedex_entry 16, 526, gZapdosPokedexText, 256, 0, 318, 3
.string "FLAME$", 12
- pokedex_entry 20, 600, gMoltresPokedexText, 270, 0, 387, 8
+ pokedex_entry 20, 600, gMoltresPokedexText, 270, 0, 387, 8
.string "DRAGON$", 12
- pokedex_entry 18, 33, gDratiniPokedexText, 256, 8, 386, 6
+ pokedex_entry 18, 33, gDratiniPokedexText, 256, 8, 386, 6
.string "DRAGON$", 12
pokedex_entry 40, 165, gDragonairPokedexText, 256, 0, 411, 5
.string "DRAGON$", 12
pokedex_entry 22, 2100, gDragonitePokedexText, 256, 0, 309, 4
.string "GENETIC$", 12
- pokedex_entry 20, 1220, gMewtwoPokedexText, 256, 0, 309, 4
+ pokedex_entry 20, 1220, gMewtwoPokedexText, 256, 0, 309, 4
.string "NEW SPECIES$", 12
- pokedex_entry 4, 40, gMewPokedexText, 457, -2, 256, 0
+ pokedex_entry 4, 40, gMewPokedexText, 457, -2, 256, 0
.string "LEAF$", 12
pokedex_entry 9, 64, gChikoritaPokedexText, 512, 20, 256, 0
.string "LEAF$", 12
- pokedex_entry 12, 158, gBayleefPokedexText, 296, 4, 256, 0
+ pokedex_entry 12, 158, gBayleefPokedexText, 296, 4, 256, 0
.string "HERB$", 12
pokedex_entry 18, 1005, gMeganiumPokedexText, 256, 0, 277, 1
.string "FIRE MOUSE$", 12
pokedex_entry 5, 79, gCyndaquilPokedexText, 539, 21, 256, 0
.string "VOLCANO$", 12
- pokedex_entry 9, 190, gQuilavaPokedexText, 329, 11, 256, 0
+ pokedex_entry 9, 190, gQuilavaPokedexText, 329, 11, 256, 0
.string "VOLCANO$", 12
pokedex_entry 17, 795, gTyphlosionPokedexText, 256, 0, 268, 1
.string "BIG JAW$", 12
@@ -323,51 +323,51 @@ gPokedexEntries:: @ 856B5B0
.string "BIG JAW$", 12
pokedex_entry 23, 888, gFeraligatrPokedexText, 256, 0, 342, 7
.string "SCOUT$", 12
- pokedex_entry 8, 60, gSentretPokedexText, 439, 12, 256, 0
+ pokedex_entry 8, 60, gSentretPokedexText, 439, 12, 256, 0
.string "LONG BODY$", 12
- pokedex_entry 18, 325, gFurretPokedexText, 346, 11, 256, 0
+ pokedex_entry 18, 325, gFurretPokedexText, 346, 11, 256, 0
.string "OWL$", 12
pokedex_entry 7, 212, gHoothootPokedexText, 380, -2, 256, 0
.string "OWL$", 12
- pokedex_entry 16, 408, gNoctowlPokedexText, 278, 3, 256, 0
+ pokedex_entry 16, 408, gNoctowlPokedexText, 278, 3, 256, 0
.string "FIVE STAR$", 12
- pokedex_entry 10, 108, gLedybaPokedexText, 256, 4, 256, 0
+ pokedex_entry 10, 108, gLedybaPokedexText, 256, 4, 256, 0
.string "FIVE STAR$", 12
- pokedex_entry 14, 356, gLedianPokedexText, 256, 2, 256, 0
+ pokedex_entry 14, 356, gLedianPokedexText, 256, 2, 256, 0
.string "STRING SPIT$", 12
pokedex_entry 5, 85, gSpinarakPokedexText, 414, 21, 256, 0
.string "LONG LEG$", 12
- pokedex_entry 11, 335, gAriadosPokedexText, 316, 8, 256, 0
+ pokedex_entry 11, 335, gAriadosPokedexText, 316, 8, 256, 0
.string "BAT$", 12
- pokedex_entry 18, 750, gCrobatPokedexText, 256, 0, 281, 1
+ pokedex_entry 18, 750, gCrobatPokedexText, 256, 0, 281, 1
.string "ANGLER$", 12
pokedex_entry 5, 120, gChinchouPokedexText, 424, -2, 256, 0
.string "LIGHT$", 12
- pokedex_entry 12, 225, gLanturnPokedexText, 269, 6, 256, 0
+ pokedex_entry 12, 225, gLanturnPokedexText, 269, 6, 256, 0
.string "TINY MOUSE$", 12
- pokedex_entry 3, 20, gPichuPokedexText, 508, 20, 256, 0
+ pokedex_entry 3, 20, gPichuPokedexText, 508, 20, 256, 0
.string "STAR SHAPE$", 12
- pokedex_entry 3, 30, gCleffaPokedexText, 462, 23, 256, 0
+ pokedex_entry 3, 30, gCleffaPokedexText, 462, 23, 256, 0
.string "BALLOON$", 12
pokedex_entry 3, 10, gIgglybuffPokedexText, 457, -1, 256, 0
.string "SPIKE BALL$", 12
- pokedex_entry 3, 15, gTogepiPokedexText, 507, 23, 256, 0
+ pokedex_entry 3, 15, gTogepiPokedexText, 507, 23, 256, 0
.string "HAPPINESS$", 12
- pokedex_entry 6, 32, gTogeticPokedexText, 424, 17, 256, 0
+ pokedex_entry 6, 32, gTogeticPokedexText, 424, 17, 256, 0
.string "TINY BIRD$", 12
- pokedex_entry 2, 20, gNatuPokedexText, 610, 25, 256, 0
+ pokedex_entry 2, 20, gNatuPokedexText, 610, 25, 256, 0
.string "MYSTIC$", 12
- pokedex_entry 15, 150, gXatuPokedexText, 256, 6, 318, 4
+ pokedex_entry 15, 150, gXatuPokedexText, 256, 6, 318, 4
.string "WOOL$", 12
- pokedex_entry 6, 78, gMareepPokedexText, 379, 18, 256, 0
+ pokedex_entry 6, 78, gMareepPokedexText, 379, 18, 256, 0
.string "WOOL$", 12
- pokedex_entry 8, 133, gFlaaffyPokedexText, 372, 15, 256, 0
+ pokedex_entry 8, 133, gFlaaffyPokedexText, 372, 15, 256, 0
.string "LIGHT$", 12
pokedex_entry 14, 615, gAmpharosPokedexText, 256, 4, 256, 0
.string "FLOWER$", 12
pokedex_entry 4, 58, gBellossomPokedexText, 472, 21, 256, 0
.string "AQUA MOUSE$", 12
- pokedex_entry 4, 85, gMarillPokedexText, 476, 20, 256, 0
+ pokedex_entry 4, 85, gMarillPokedexText, 476, 20, 256, 0
.string "AQUA RABBIT$", 12
pokedex_entry 8, 285, gAzumarillPokedexText, 448, 16, 256, 0
.string "IMITATION$", 12
@@ -375,49 +375,49 @@ gPokedexEntries:: @ 856B5B0
.string "FROG$", 12
pokedex_entry 11, 339, gPolitoedPokedexText, 289, 6, 256, 0
.string "COTTONWEED$", 12
- pokedex_entry 4, 5, gHoppipPokedexText, 562, -7, 256, 0
+ pokedex_entry 4, 5, gHoppipPokedexText, 562, -7, 256, 0
.string "COTTONWEED$", 12
pokedex_entry 6, 10, gSkiploomPokedexText, 387, 0, 256, 0
.string "COTTONWEED$", 12
pokedex_entry 8, 30, gJumpluffPokedexText, 418, -4, 256, 0
.string "LONG TAIL$", 12
- pokedex_entry 8, 115, gAipomPokedexText, 363, 6, 256, 0
+ pokedex_entry 8, 115, gAipomPokedexText, 363, 6, 256, 0
.string "SEED$", 12
- pokedex_entry 3, 18, gSunkernPokedexText, 541, 0, 256, 0
+ pokedex_entry 3, 18, gSunkernPokedexText, 541, 0, 256, 0
.string "SUN$", 12
pokedex_entry 8, 85, gSunfloraPokedexText, 444, 15, 256, 0
.string "CLEAR WING$", 12
- pokedex_entry 12, 380, gYanmaPokedexText, 274, -1, 256, 0
+ pokedex_entry 12, 380, gYanmaPokedexText, 274, -1, 256, 0
.string "WATER FISH$", 12
- pokedex_entry 4, 85, gWooperPokedexText, 479, 21, 256, 0
+ pokedex_entry 4, 85, gWooperPokedexText, 479, 21, 256, 0
.string "WATER FISH$", 12
pokedex_entry 14, 750, gQuagsirePokedexText, 256, 4, 256, 0
.string "SUN$", 12
- pokedex_entry 9, 265, gEspeonPokedexText, 363, 14, 256, 0
+ pokedex_entry 9, 265, gEspeonPokedexText, 363, 14, 256, 0
.string "MOONLIGHT$", 12
- pokedex_entry 10, 270, gUmbreonPokedexText, 317, 11, 256, 0
+ pokedex_entry 10, 270, gUmbreonPokedexText, 317, 11, 256, 0
.string "DARKNESS$", 12
- pokedex_entry 5, 21, gMurkrowPokedexText, 401, -8, 256, 1
+ pokedex_entry 5, 21, gMurkrowPokedexText, 401, -8, 256, 1
.string "ROYAL$", 12
pokedex_entry 20, 795, gSlowkingPokedexText, 256, 0, 309, 5
.string "SCREECH$", 12
pokedex_entry 7, 10, gMisdreavusPokedexText, 407, -8, 256, 0
.string "SYMBOL$", 12
- pokedex_entry 5, 50, gUnownPokedexText, 411, 2, 256, 0
+ pokedex_entry 5, 50, gUnownPokedexText, 411, 2, 256, 0
.string "PATIENT$", 12
pokedex_entry 13, 285, gWobbuffetPokedexText, 274, 4, 256, 0
.string "LONG NECK$", 12
pokedex_entry 15, 415, gGirafarigPokedexText, 281, 1, 256, 0
.string "BAGWORM$", 12
- pokedex_entry 6, 72, gPinecoPokedexText, 445, 2, 256, 0
+ pokedex_entry 6, 72, gPinecoPokedexText, 445, 2, 256, 0
.string "BAGWORM$", 12
pokedex_entry 12, 1258, gForretressPokedexText, 293, 5, 256, 0
.string "LAND SNAKE$", 12
pokedex_entry 15, 140, gDunsparcePokedexText, 316, 17, 256, 0
.string "FLYSCORPION$", 12
- pokedex_entry 11, 648, gGligarPokedexText, 350, -1, 256, 0
+ pokedex_entry 11, 648, gGligarPokedexText, 350, -1, 256, 0
.string "IRON SNAKE$", 12
- pokedex_entry 92, 4000, gSteelixPokedexText, 256, 0, 516, 13
+ pokedex_entry 92, 4000, gSteelixPokedexText, 256, 0, 516, 13
.string "FAIRY$", 12
pokedex_entry 6, 78, gSnubbullPokedexText, 465, 19, 256, 0
.string "FAIRY$", 12
@@ -425,27 +425,27 @@ gPokedexEntries:: @ 856B5B0
.string "BALLOON$", 12
pokedex_entry 5, 39, gQwilfishPokedexText, 430, 0, 256, 0
.string "PINCER$", 12
- pokedex_entry 18, 1180, gScizorPokedexText, 278, 1, 256, 0
+ pokedex_entry 18, 1180, gScizorPokedexText, 278, 1, 256, 0
.string "MOLD$", 12
- pokedex_entry 6, 205, gShucklePokedexText, 485, 18, 256, 0
+ pokedex_entry 6, 205, gShucklePokedexText, 485, 18, 256, 0
.string "SINGLE HORN$", 12
pokedex_entry 15, 540, gHeracrossPokedexText, 256, 0, 256, 0
.string "SHARP CLAW$", 12
- pokedex_entry 9, 280, gSneaselPokedexText, 413, -3, 256, 0
+ pokedex_entry 9, 280, gSneaselPokedexText, 413, -3, 256, 0
.string "LITTLE BEAR$", 12
pokedex_entry 6, 88, gTeddiursaPokedexText, 455, 19, 256, 0
.string "HIBERNATOR$", 12
pokedex_entry 18, 1258, gUrsaringPokedexText, 256, 0, 256, 0
.string "LAVA$", 12
- pokedex_entry 7, 350, gSlugmaPokedexText, 329, 15, 256, 0
+ pokedex_entry 7, 350, gSlugmaPokedexText, 329, 15, 256, 0
.string "LAVA$", 12
pokedex_entry 8, 550, gMagcargoPokedexText, 332, 15, 256, 0
.string "PIG$", 12
- pokedex_entry 4, 65, gSwinubPokedexText, 324, 20, 256, 0
+ pokedex_entry 4, 65, gSwinubPokedexText, 324, 20, 256, 0
.string "SWINE$", 12
pokedex_entry 11, 558, gPiloswinePokedexText, 306, 10, 256, 0
.string "CORAL$", 12
- pokedex_entry 6, 50, gCorsolaPokedexText, 410, 15, 256, 0
+ pokedex_entry 6, 50, gCorsolaPokedexText, 410, 15, 256, 0
.string "JET$", 12
pokedex_entry 6, 120, gRemoraidPokedexText, 316, 4, 256, 0
.string "JET$", 12
@@ -453,7 +453,7 @@ gPokedexEntries:: @ 856B5B0
.string "DELIVERY$", 12
pokedex_entry 9, 160, gDelibirdPokedexText, 293, 11, 256, 0
.string "KITE$", 12
- pokedex_entry 21, 2200, gMantinePokedexText, 256, 0, 342, 7
+ pokedex_entry 21, 2200, gMantinePokedexText, 256, 0, 342, 7
.string "ARMOR BIRD$", 12
pokedex_entry 17, 505, gSkarmoryPokedexText, 256, 0, 271, 1
.string "DARK$", 12
@@ -461,11 +461,11 @@ gPokedexEntries:: @ 856B5B0
.string "DARK$", 12
pokedex_entry 14, 350, gHoundoomPokedexText, 256, 4, 256, 0
.string "DRAGON$", 12
- pokedex_entry 18, 1520, gKingdraPokedexText, 256, 0, 287, 0
+ pokedex_entry 18, 1520, gKingdraPokedexText, 256, 0, 287, 0
.string "LONG NOSE$", 12
- pokedex_entry 5, 335, gPhanpyPokedexText, 465, 21, 256, 0
+ pokedex_entry 5, 335, gPhanpyPokedexText, 465, 21, 256, 0
.string "ARMOR$", 12
- pokedex_entry 11, 1200, gDonphanPokedexText, 313, 9, 256, 0
+ pokedex_entry 11, 1200, gDonphanPokedexText, 313, 9, 256, 0
.string "VIRTUAL$", 12
pokedex_entry 6, 325, gPorygon2PokedexText, 320, 17, 256, 0
.string "BIG HORN$", 12
@@ -473,51 +473,51 @@ gPokedexEntries:: @ 856B5B0
.string "PAINTER$", 12
pokedex_entry 12, 580, gSmearglePokedexText, 287, 5, 256, 0
.string "SCUFFLE$", 12
- pokedex_entry 7, 210, gTyroguePokedexText, 292, 9, 256, 0
+ pokedex_entry 7, 210, gTyroguePokedexText, 292, 9, 256, 0
.string "HANDSTAND$", 12
pokedex_entry 14, 480, gHitmontopPokedexText, 256, 2, 257, 0
.string "KISS$", 12
pokedex_entry 4, 60, gSmoochumPokedexText, 440, 20, 256, 0
.string "ELECTRIC$", 12
- pokedex_entry 6, 235, gElekidPokedexText, 363, 14, 256, 0
+ pokedex_entry 6, 235, gElekidPokedexText, 363, 14, 256, 0
.string "LIVE COAL$", 12
- pokedex_entry 7, 214, gMagbyPokedexText, 284, 13, 256, 0
+ pokedex_entry 7, 214, gMagbyPokedexText, 284, 13, 256, 0
.string "MILK COW$", 12
- pokedex_entry 12, 755, gMiltankPokedexText, 280, 5, 256, 0
+ pokedex_entry 12, 755, gMiltankPokedexText, 280, 5, 256, 0
.string "HAPPINESS$", 12
- pokedex_entry 15, 468, gBlisseyPokedexText, 256, 4, 310, 3
+ pokedex_entry 15, 468, gBlisseyPokedexText, 256, 4, 310, 3
.string "THUNDER$", 12
- pokedex_entry 19, 1780, gRaikouPokedexText, 256, 0, 345, 7
+ pokedex_entry 19, 1780, gRaikouPokedexText, 256, 0, 345, 7
.string "VOLCANO$", 12
- pokedex_entry 21, 1980, gEnteiPokedexText, 259, 0, 345, 7
+ pokedex_entry 21, 1980, gEnteiPokedexText, 259, 0, 345, 7
.string "AURORA$", 12
- pokedex_entry 20, 1870, gSuicunePokedexText, 269, 0, 345, 7
+ pokedex_entry 20, 1870, gSuicunePokedexText, 269, 0, 345, 7
.string "ROCK SKIN$", 12
pokedex_entry 6, 720, gLarvitarPokedexText, 472, 18, 256, 0
.string "HARD SHELL$", 12
- pokedex_entry 12, 1520, gPupitarPokedexText, 292, 8, 256, 0
+ pokedex_entry 12, 1520, gPupitarPokedexText, 292, 8, 256, 0
.string "ARMOR$", 12
pokedex_entry 20, 2020, gTyranitarPokedexText, 256, 0, 345, 7
.string "DIVING$", 12
- pokedex_entry 52, 2160, gLugiaPokedexText, 256, 0, 721, 19
+ pokedex_entry 52, 2160, gLugiaPokedexText, 256, 0, 721, 19
.string "RAINBOW$", 12
- pokedex_entry 38, 1990, gHoOhPokedexText, 256, 0, 610, 17
+ pokedex_entry 38, 1990, gHoOhPokedexText, 256, 0, 610, 17
.string "TIME TRAVEL$", 12
- pokedex_entry 6, 50, gCelebiPokedexText, 393, -10, 256, 0
+ pokedex_entry 6, 50, gCelebiPokedexText, 393, -10, 256, 0
.string "WOOD GECKO$", 12
- pokedex_entry 5, 50, gTreeckoPokedexText, 541, 19, 256, 0
+ pokedex_entry 5, 50, gTreeckoPokedexText, 541, 19, 256, 0
.string "WOOD GECKO$", 12
- pokedex_entry 9, 216, gGrovylePokedexText, 360, 5, 256, 0
+ pokedex_entry 9, 216, gGrovylePokedexText, 360, 5, 256, 0
.string "FOREST$", 12
pokedex_entry 17, 522, gSceptilePokedexText, 256, -1, 275, 2
.string "CHICK$", 12
- pokedex_entry 4, 25, gTorchicPokedexText, 566, 19, 256, 0
+ pokedex_entry 4, 25, gTorchicPokedexText, 566, 19, 256, 0
.string "YOUNG FOWL$", 12
pokedex_entry 9, 195, gCombuskenPokedexText, 343, 5, 256, 0
.string "BLAZE$", 12
pokedex_entry 19, 520, gBlazikenPokedexText, 256, 0, 301, 4
.string "MUD FISH$", 12
- pokedex_entry 4, 76, gMudkipPokedexText, 535, 20, 256, 0
+ pokedex_entry 4, 76, gMudkipPokedexText, 535, 20, 256, 0
.string "MUD FISH$", 12
pokedex_entry 7, 280, gMarshtompPokedexText, 340, 7, 256, 0
.string "MUD FISH$", 12
@@ -529,91 +529,91 @@ gPokedexEntries:: @ 856B5B0
.string "TINYRACCOON$", 12
pokedex_entry 4, 175, gZigzagoonPokedexText, 560, 22, 256, 0
.string "RUSHING$", 12
- pokedex_entry 5, 325, gLinoonePokedexText, 321, 7, 256, 0
+ pokedex_entry 5, 325, gLinoonePokedexText, 321, 7, 256, 0
.string "WORM$", 12
- pokedex_entry 3, 36, gWurmplePokedexText, 711, 24, 256, 0
+ pokedex_entry 3, 36, gWurmplePokedexText, 711, 24, 256, 0
.string "COCOON$", 12
- pokedex_entry 6, 100, gSilcoonPokedexText, 431, 19, 256, 0
+ pokedex_entry 6, 100, gSilcoonPokedexText, 431, 19, 256, 0
.string "BUTTERFLY$", 12
pokedex_entry 10, 284, gBeautiflyPokedexText, 298, -1, 256, 0
.string "COCOON$", 12
- pokedex_entry 7, 115, gCascoonPokedexText, 391, 20, 256, 0
+ pokedex_entry 7, 115, gCascoonPokedexText, 391, 20, 256, 0
.string "POISON MOTH$", 12
- pokedex_entry 12, 316, gDustoxPokedexText, 269, 1, 256, 0
+ pokedex_entry 12, 316, gDustoxPokedexText, 269, 1, 256, 0
.string "WATER WEED$", 12
- pokedex_entry 5, 26, gLotadPokedexText, 406, 19, 256, 0
+ pokedex_entry 5, 26, gLotadPokedexText, 406, 19, 256, 0
.string "JOLLY$", 12
- pokedex_entry 12, 325, gLombrePokedexText, 277, 9, 256, 0
+ pokedex_entry 12, 325, gLombrePokedexText, 277, 9, 256, 0
.string "CAREFREE$", 12
pokedex_entry 15, 550, gLudicoloPokedexText, 256, 0, 268, -1
.string "ACORN$", 12
- pokedex_entry 5, 40, gSeedotPokedexText, 472, 20, 256, 0
+ pokedex_entry 5, 40, gSeedotPokedexText, 472, 20, 256, 0
.string "WILY$", 12
- pokedex_entry 10, 280, gNuzleafPokedexText, 299, 10, 256, 0
+ pokedex_entry 10, 280, gNuzleafPokedexText, 299, 10, 256, 0
.string "WICKED$", 12
- pokedex_entry 13, 596, gShiftryPokedexText, 290, 4, 256, 0
+ pokedex_entry 13, 596, gShiftryPokedexText, 290, 4, 256, 0
.string "TINYSWALLOW$", 12
- pokedex_entry 3, 23, gTaillowPokedexText, 465, 21, 256, 0
+ pokedex_entry 3, 23, gTaillowPokedexText, 465, 21, 256, 0
.string "SWALLOW$", 12
- pokedex_entry 7, 198, gSwellowPokedexText, 428, 15, 256, 0
+ pokedex_entry 7, 198, gSwellowPokedexText, 428, 15, 256, 0
.string "SEAGULL$", 12
- pokedex_entry 6, 95, gWingullPokedexText, 295, -2, 256, 0
+ pokedex_entry 6, 95, gWingullPokedexText, 295, -2, 256, 0
.string "WATER BIRD$", 12
pokedex_entry 12, 280, gPelipperPokedexText, 288, 1, 256, 0
.string "FEELING$", 12
- pokedex_entry 4, 66, gRaltsPokedexText, 457, -3, 256, 0
+ pokedex_entry 4, 66, gRaltsPokedexText, 457, -3, 256, 0
.string "EMOTION$", 12
- pokedex_entry 8, 202, gKirliaPokedexText, 354, 0, 256, 0
+ pokedex_entry 8, 202, gKirliaPokedexText, 354, 0, 256, 0
.string "EMBRACE$", 12
pokedex_entry 16, 484, gGardevoirPokedexText, 256, 0, 256, 0
.string "POND SKATER$", 12
- pokedex_entry 5, 17, gSurskitPokedexText, 375, 17, 256, 0
+ pokedex_entry 5, 17, gSurskitPokedexText, 375, 17, 256, 0
.string "EYEBALL$", 12
pokedex_entry 8, 36, gMasquerainPokedexText, 378, 8, 256, 0
.string "MUSHROOM$", 12
pokedex_entry 4, 45, gShroomishPokedexText, 513, 22, 256, 0
.string "MUSHROOM$", 12
- pokedex_entry 12, 392, gBreloomPokedexText, 324, 6, 256, 0
+ pokedex_entry 12, 392, gBreloomPokedexText, 324, 6, 256, 0
.string "SLACKER$", 12
- pokedex_entry 8, 240, gSlakothPokedexText, 291, 16, 256, 0
+ pokedex_entry 8, 240, gSlakothPokedexText, 291, 16, 256, 0
.string "WILD MONKEY$", 12
pokedex_entry 14, 465, gVigorothPokedexText, 301, 2, 256, 0
.string "LAZY$", 12
- pokedex_entry 20, 1305, gSlakingPokedexText, 256, 2, 300, 1
+ pokedex_entry 20, 1305, gSlakingPokedexText, 256, 2, 300, 1
.string "TRAINEE$", 12
- pokedex_entry 5, 55, gNincadaPokedexText, 405, 21, 256, 0
+ pokedex_entry 5, 55, gNincadaPokedexText, 405, 21, 256, 0
.string "NINJA$", 12
- pokedex_entry 8, 120, gNinjaskPokedexText, 383, -9, 256, 0
+ pokedex_entry 8, 120, gNinjaskPokedexText, 383, -9, 256, 0
.string "SHED$", 12
pokedex_entry 8, 12, gShedinjaPokedexText, 372, -8, 256, 0
.string "WHISPER$", 12
- pokedex_entry 6, 163, gWhismurPokedexText, 373, 17, 256, 0
+ pokedex_entry 6, 163, gWhismurPokedexText, 373, 17, 256, 0
.string "BIG VOICE$", 12
- pokedex_entry 10, 405, gLoudredPokedexText, 356, 10, 256, 0
+ pokedex_entry 10, 405, gLoudredPokedexText, 356, 10, 256, 0
.string "LOUD NOISE$", 12
- pokedex_entry 15, 840, gExploudPokedexText, 284, 1, 256, 0
+ pokedex_entry 15, 840, gExploudPokedexText, 284, 1, 256, 0
.string "GUTS$", 12
pokedex_entry 10, 864, gMakuhitaPokedexText, 256, 10, 256, 0
.string "ARM THRUST$", 12
pokedex_entry 23, 2538, gHariyamaPokedexText, 256, 0, 343, 7
.string "POLKA DOT$", 12
- pokedex_entry 2, 20, gAzurillPokedexText, 603, 23, 256, 0
+ pokedex_entry 2, 20, gAzurillPokedexText, 603, 23, 256, 0
.string "COMPASS$", 12
pokedex_entry 10, 970, gNosepassPokedexText, 256, 9, 289, 3
.string "KITTEN$", 12
- pokedex_entry 6, 110, gSkittyPokedexText, 492, 19, 256, 0
+ pokedex_entry 6, 110, gSkittyPokedexText, 492, 19, 256, 0
.string "PRIM$", 12
pokedex_entry 11, 326, gDelcattyPokedexText, 322, 10, 256, 0
.string "DARKNESS$", 12
- pokedex_entry 5, 110, gSableyePokedexText, 451, 17, 256, 0
+ pokedex_entry 5, 110, gSableyePokedexText, 451, 17, 256, 0
.string "DECEIVER$", 12
- pokedex_entry 6, 115, gMawilePokedexText, 466, 17, 256, 0
+ pokedex_entry 6, 115, gMawilePokedexText, 466, 17, 256, 0
.string "IRON ARMOR$", 12
- pokedex_entry 4, 600, gAronPokedexText, 419, 23, 256, 0
+ pokedex_entry 4, 600, gAronPokedexText, 419, 23, 256, 0
.string "IRON ARMOR$", 12
- pokedex_entry 9, 1200, gLaironPokedexText, 275, 12, 256, 0
+ pokedex_entry 9, 1200, gLaironPokedexText, 275, 12, 256, 0
.string "IRON ARMOR$", 12
- pokedex_entry 21, 3600, gAggronPokedexText, 256, -1, 350, 6
+ pokedex_entry 21, 3600, gAggronPokedexText, 256, -1, 350, 6
.string "MEDITATE$", 12
pokedex_entry 6, 112, gMedititePokedexText, 465, 17, 256, 0
.string "MEDITATE$", 12
@@ -623,61 +623,61 @@ gPokedexEntries:: @ 856B5B0
.string "DISCHARGE$", 12
pokedex_entry 15, 402, gManectricPokedexText, 256, 3, 257, 0
.string "CHEERING$", 12
- pokedex_entry 4, 42, gPluslePokedexText, 515, -9, 256, 0
+ pokedex_entry 4, 42, gPluslePokedexText, 515, -9, 256, 0
.string "CHEERING$", 12
- pokedex_entry 4, 42, gMinunPokedexText, 512, -7, 256, 0
+ pokedex_entry 4, 42, gMinunPokedexText, 512, -7, 256, 0
.string "FIREFLY$", 12
- pokedex_entry 7, 177, gVolbeatPokedexText, 442, 16, 256, 0
+ pokedex_entry 7, 177, gVolbeatPokedexText, 442, 16, 256, 0
.string "FIREFLY$", 12
pokedex_entry 6, 177, gIllumisePokedexText, 572, 19, 256, 0
.string "THORN$", 12
- pokedex_entry 3, 20, gRoseliaPokedexText, 677, 20, 256, 0
+ pokedex_entry 3, 20, gRoseliaPokedexText, 677, 20, 256, 0
.string "STOMACH$", 12
- pokedex_entry 4, 103, gGulpinPokedexText, 593, 23, 256, 0
+ pokedex_entry 4, 103, gGulpinPokedexText, 593, 23, 256, 0
.string "POISON BAG$", 12
- pokedex_entry 17, 800, gSwalotPokedexText, 256, 6, 345, 3
+ pokedex_entry 17, 800, gSwalotPokedexText, 256, 6, 345, 3
.string "SAVAGE$", 12
pokedex_entry 8, 208, gCarvanhaPokedexText, 362, 0, 256, 0
.string "BRUTAL$", 12
pokedex_entry 18, 888, gSharpedoPokedexText, 256, 0, 317, 3
.string "BALL WHALE$", 12
- pokedex_entry 20, 1300, gWailmerPokedexText, 256, 2, 493, 0
+ pokedex_entry 20, 1300, gWailmerPokedexText, 256, 2, 493, 0
.string "FLOAT WHALE$", 12
- pokedex_entry 145, 3980, gWailordPokedexText, 256, 0, 1352, 18
+ pokedex_entry 145, 3980, gWailordPokedexText, 256, 0, 1352, 18
.string "NUMB$", 12
- pokedex_entry 7, 240, gNumelPokedexText, 342, 17, 256, 0
+ pokedex_entry 7, 240, gNumelPokedexText, 342, 17, 256, 0
.string "ERUPTION$", 12
pokedex_entry 19, 2200, gCameruptPokedexText, 256, 7, 345, 6
.string "COAL$", 12
- pokedex_entry 5, 804, gTorkoalPokedexText, 390, 9, 256, 0
+ pokedex_entry 5, 804, gTorkoalPokedexText, 390, 9, 256, 0
.string "BOUNCE$", 12
- pokedex_entry 7, 306, gSpoinkPokedexText, 423, 17, 256, 0
+ pokedex_entry 7, 306, gSpoinkPokedexText, 423, 17, 256, 0
.string "MANIPULATE$", 12
- pokedex_entry 9, 715, gGrumpigPokedexText, 358, 10, 256, 0
+ pokedex_entry 9, 715, gGrumpigPokedexText, 358, 10, 256, 0
.string "SPOT PANDA$", 12
- pokedex_entry 11, 50, gSpindaPokedexText, 321, 4, 256, 0
+ pokedex_entry 11, 50, gSpindaPokedexText, 321, 4, 256, 0
.string "ANT PIT$", 12
pokedex_entry 7, 150, gTrapinchPokedexText, 298, 17, 256, 0
.string "VIBRATION$", 12
- pokedex_entry 11, 153, gVibravaPokedexText, 370, 11, 256, 0
+ pokedex_entry 11, 153, gVibravaPokedexText, 370, 11, 256, 0
.string "MYSTIC$", 12
- pokedex_entry 20, 820, gFlygonPokedexText, 256, 0, 268, 1
+ pokedex_entry 20, 820, gFlygonPokedexText, 256, 0, 268, 1
.string "CACTUS$", 12
- pokedex_entry 4, 513, gCacneaPokedexText, 455, 20, 256, 0
+ pokedex_entry 4, 513, gCacneaPokedexText, 455, 20, 256, 0
.string "SCARECROW$", 12
pokedex_entry 13, 774, gCacturnePokedexText, 327, 5, 256, 0
.string "COTTON BIRD$", 12
- pokedex_entry 4, 12, gSwabluPokedexText, 422, -8, 256, 0
+ pokedex_entry 4, 12, gSwabluPokedexText, 422, -8, 256, 0
.string "HUMMING$", 12
- pokedex_entry 11, 206, gAltariaPokedexText, 327, 0, 256, 0
+ pokedex_entry 11, 206, gAltariaPokedexText, 327, 0, 256, 0
.string "CAT FERRET$", 12
pokedex_entry 13, 403, gZangoosePokedexText, 256, 3, 256, 0
.string "FANG SNAKE$", 12
- pokedex_entry 27, 525, gSeviperPokedexText, 275, 7, 256, 0
+ pokedex_entry 27, 525, gSeviperPokedexText, 275, 7, 256, 0
.string "METEORITE$", 12
pokedex_entry 10, 1680, gLunatonePokedexText, 300, 3, 256, 0
.string "METEORITE$", 12
- pokedex_entry 12, 1540, gSolrockPokedexText, 328, 0, 256, 0
+ pokedex_entry 12, 1540, gSolrockPokedexText, 328, 0, 256, 0
.string "WHISKERS$", 12
pokedex_entry 4, 19, gBarboachPokedexText, 581, -3, 256, 0
.string "WHISKERS$", 12
@@ -687,90 +687,90 @@ gPokedexEntries:: @ 856B5B0
.string "ROGUE$", 12
pokedex_entry 11, 328, gCrawdauntPokedexText, 365, 9, 256, 0
.string "CLAY DOLL$", 12
- pokedex_entry 5, 215, gBaltoyPokedexText, 457, 21, 256, 0
+ pokedex_entry 5, 215, gBaltoyPokedexText, 457, 21, 256, 0
.string "CLAY DOLL$", 12
- pokedex_entry 15, 1080, gClaydolPokedexText, 256, 3, 280, 1
+ pokedex_entry 15, 1080, gClaydolPokedexText, 256, 3, 280, 1
.string "SEA LILY$", 12
- pokedex_entry 10, 238, gLileepPokedexText, 305, 8, 256, 0
+ pokedex_entry 10, 238, gLileepPokedexText, 305, 8, 256, 0
.string "BARNACLE$", 12
- pokedex_entry 15, 604, gCradilyPokedexText, 267, 0, 256, 0
+ pokedex_entry 15, 604, gCradilyPokedexText, 267, 0, 256, 0
.string "OLD SHRIMP$", 12
- pokedex_entry 7, 125, gAnorithPokedexText, 296, 4, 256, 0
+ pokedex_entry 7, 125, gAnorithPokedexText, 296, 4, 256, 0
.string "PLATE$", 12
- pokedex_entry 15, 682, gArmaldoPokedexText, 312, 3, 271, 0
+ pokedex_entry 15, 682, gArmaldoPokedexText, 312, 3, 271, 0
.string "FISH$", 12
- pokedex_entry 6, 74, gFeebasPokedexText, 423, -4, 256, 0
+ pokedex_entry 6, 74, gFeebasPokedexText, 423, -4, 256, 0
.string "TENDER$", 12
- pokedex_entry 62, 1620, gMiloticPokedexText, 256, 0, 360, 7
+ pokedex_entry 62, 1620, gMiloticPokedexText, 256, 0, 360, 7
.string "WEATHER$", 12
- pokedex_entry 3, 8, gCastformPokedexText, 435, -5, 256, 0
+ pokedex_entry 3, 8, gCastformPokedexText, 435, -5, 256, 0
.string "COLOR SWAP$", 12
- pokedex_entry 10, 220, gKecleonPokedexText, 316, 10, 256, 0
+ pokedex_entry 10, 220, gKecleonPokedexText, 316, 10, 256, 0
.string "PUPPET$", 12
- pokedex_entry 6, 23, gShuppetPokedexText, 440, 20, 256, 0
+ pokedex_entry 6, 23, gShuppetPokedexText, 440, 20, 256, 0
.string "MARIONETTE$", 12
- pokedex_entry 11, 125, gBanettePokedexText, 262, 9, 256, 0
+ pokedex_entry 11, 125, gBanettePokedexText, 262, 9, 256, 0
.string "REQUIEM$", 12
- pokedex_entry 8, 150, gDuskullPokedexText, 406, -4, 256, 0
+ pokedex_entry 8, 150, gDuskullPokedexText, 406, -4, 256, 0
.string "BECKON$", 12
pokedex_entry 16, 306, gDusclopsPokedexText, 256, 3, 299, 1
.string "FRUIT$", 12
- pokedex_entry 20, 1000, gTropiusPokedexText, 256, 0, 344, 7
+ pokedex_entry 20, 1000, gTropiusPokedexText, 256, 0, 344, 7
.string "WIND CHIME$", 12
pokedex_entry 6, 10, gChimechoPokedexText, 505, 0, 256, 0
.string "DISASTER$", 12
- pokedex_entry 12, 470, gAbsolPokedexText, 301, 3, 256, 0
+ pokedex_entry 12, 470, gAbsolPokedexText, 301, 3, 256, 0
.string "BRIGHT$", 12
- pokedex_entry 6, 140, gWynautPokedexText, 484, 19, 256, 0
+ pokedex_entry 6, 140, gWynautPokedexText, 484, 19, 256, 0
.string "SNOW HAT$", 12
- pokedex_entry 7, 168, gSnoruntPokedexText, 380, 15, 256, 0
+ pokedex_entry 7, 168, gSnoruntPokedexText, 380, 15, 256, 0
.string "FACE$", 12
- pokedex_entry 15, 2565, gGlaliePokedexText, 256, 3, 344, 0
+ pokedex_entry 15, 2565, gGlaliePokedexText, 256, 3, 344, 0
.string "CLAP$", 12
- pokedex_entry 8, 395, gSphealPokedexText, 315, 16, 256, 0
+ pokedex_entry 8, 395, gSphealPokedexText, 315, 16, 256, 0
.string "BALL ROLL$", 12
- pokedex_entry 11, 876, gSealeoPokedexText, 338, 13, 256, 0
+ pokedex_entry 11, 876, gSealeoPokedexText, 338, 13, 256, 0
.string "ICE BREAK$", 12
- pokedex_entry 14, 1506, gWalreinPokedexText, 316, 4, 256, 0
+ pokedex_entry 14, 1506, gWalreinPokedexText, 316, 4, 256, 0
.string "BIVALVE$", 12
pokedex_entry 4, 525, gClamperlPokedexText, 691, 22, 256, 0
.string "DEEP SEA$", 12
- pokedex_entry 17, 270, gHuntailPokedexText, 307, 1, 256, 0
+ pokedex_entry 17, 270, gHuntailPokedexText, 307, 1, 256, 0
.string "SOUTH SEA$", 12
pokedex_entry 18, 226, gGorebyssPokedexText, 278, 5, 256, 0
.string "LONGEVITY$", 12
pokedex_entry 10, 234, gRelicanthPokedexText, 316, 7, 256, 0
.string "RENDEZVOUS$", 12
- pokedex_entry 6, 87, gLuvdiscPokedexText, 371, 2, 256, 0
+ pokedex_entry 6, 87, gLuvdiscPokedexText, 371, 2, 256, 0
.string "ROCK HEAD$", 12
- pokedex_entry 6, 421, gBagonPokedexText, 448, 18, 256, 0
+ pokedex_entry 6, 421, gBagonPokedexText, 448, 18, 256, 0
.string "ENDURANCE$", 12
- pokedex_entry 11, 1105, gShelgonPokedexText, 311, 12, 256, 0
+ pokedex_entry 11, 1105, gShelgonPokedexText, 311, 12, 256, 0
.string "DRAGON$", 12
pokedex_entry 15, 1026, gSalamencePokedexText, 256, 0, 256, 0
.string "IRON BALL$", 12
- pokedex_entry 6, 952, gBeldumPokedexText, 414, -1, 256, 0
+ pokedex_entry 6, 952, gBeldumPokedexText, 414, -1, 256, 0
.string "IRON CLAW$", 12
- pokedex_entry 12, 2025, gMetangPokedexText, 256, 6, 256, 0
+ pokedex_entry 12, 2025, gMetangPokedexText, 256, 6, 256, 0
.string "IRON LEG$", 12
pokedex_entry 16, 5500, gMetagrossPokedexText, 256, 4, 447, 9
.string "ROCK PEAK$", 12
pokedex_entry 17, 2300, gRegirockPokedexText, 256, 2, 309, 1
.string "ICEBERG$", 12
- pokedex_entry 18, 1750, gRegicePokedexText, 256, 0, 301, 2
+ pokedex_entry 18, 1750, gRegicePokedexText, 256, 0, 301, 2
.string "IRON$", 12
pokedex_entry 19, 2050, gRegisteelPokedexText, 256, 0, 359, 6
.string "EON$", 12
- pokedex_entry 14, 400, gLatiasPokedexText, 304, 3, 256, 0
+ pokedex_entry 14, 400, gLatiasPokedexText, 304, 3, 256, 0
.string "EON$", 12
- pokedex_entry 20, 600, gLatiosPokedexText, 256, 0, 294, 3
+ pokedex_entry 20, 600, gLatiosPokedexText, 256, 0, 294, 3
.string "SEA BASIN$", 12
- pokedex_entry 45, 3520, gKyogrePokedexText, 256, 0, 614, 13
+ pokedex_entry 45, 3520, gKyogrePokedexText, 256, 0, 614, 13
.string "CONTINENT$", 12
- pokedex_entry 35, 9500, gGroudonPokedexText, 256, 0, 515, 14
+ pokedex_entry 35, 9500, gGroudonPokedexText, 256, 0, 515, 14
.string "SKY HIGH$", 12
pokedex_entry 70, 2065, gRayquazaPokedexText, 256, 0, 448, 12
.string "WISH$", 12
- pokedex_entry 3, 11, gJirachiPokedexText, 608, -8, 256, 0
+ pokedex_entry 3, 11, gJirachiPokedexText, 608, -8, 256, 0
.string "DNA$", 12
- pokedex_entry 17, 608, gDeoxysPokedexText, 256, 0, 290, 2
+ pokedex_entry 17, 608, gDeoxysPokedexText, 256, 0, 290, 2
diff --git a/data/pokemon_icon.s b/data/pokemon_icon.s
deleted file mode 100644
index 9d6c7ac2e..000000000
--- a/data/pokemon_icon.s
+++ /dev/null
@@ -1,27 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
- .align 2, 0
-
-@ 857BCA8
- .include "data/graphics/pokemon/icon_table.inc"
-
-@ 857C388
- .include "data/graphics/pokemon/icon_palette_indices.inc"
-
-@ 857C540
- .include "data/graphics/pokemon/icon_palette_table.inc"
-
-gUnknown_0857C570:: @ 857C570
- .incbin "baserom.gba", 0x57c570, 0x44
-
-gUnknown_0857C5B4:: @ 857C5B4
- .incbin "baserom.gba", 0x57c5b4, 0x14
- .incbin "baserom.gba", 0x57c5c8, 0x20
-
-gUnknown_0857C5E8:: @ 857C5E8
- .incbin "baserom.gba", 0x57c5e8, 0x8
-
-gUnknown_0857C5F0:: @ 857C5F0
- .incbin "baserom.gba", 0x57c5f0, 0x18
diff --git a/data/pokemon_storage_system.s b/data/pokemon_storage_system.s
index 4f2815713..e419db55a 100644
--- a/data/pokemon_storage_system.s
+++ b/data/pokemon_storage_system.s
@@ -1,23 +1,8 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
- .section .rodata
- .align 2, 0
-
-gUnknown_085716C0:: @ 85716C0
- .incbin "baserom.gba", 0x5716c0, 0x28
-
-gUnknown_085716E8:: @ 85716E8
- .incbin "baserom.gba", 0x5716e8, 0x28
-
-gUnknown_08571710:: @ 8571710
- .incbin "baserom.gba", 0x571710, 0x24
-
-gUnknown_08571734:: @ 8571734
- .incbin "baserom.gba", 0x571734, 0x3
-
-gUnknown_08571737:: @ 8571737
- .incbin "baserom.gba", 0x571737, 0x5
+ .section .rodata
+ .align 2, 0
gUnknown_0857173C:: @ 857173C
.incbin "baserom.gba", 0x57173c, 0x20
@@ -59,7 +44,13 @@ gUnknown_085724A4:: @ 85724A4
.incbin "baserom.gba", 0x5724a4, 0x18
gUnknown_085724BC:: @ 85724BC
- .incbin "baserom.gba", 0x5724bc, 0x238
+ .incbin "baserom.gba", 0x5724bc, 0x18
+
+gUnknown_085724D4:: @ 85724D4
+ .incbin "baserom.gba", 0x5724d4, 0x20
+
+gUnknown_085724F4:: @ 85724F4
+ .incbin "baserom.gba", 0x5724f4, 0x200
gUnknown_085726F4:: @ 85726F4
.incbin "baserom.gba", 0x5726f4, 0x20
@@ -71,28 +62,126 @@ gUnknown_08572734:: @ 8572734
.incbin "baserom.gba", 0x572734, 0x10
gUnknown_08572744:: @ 8572744
- .incbin "baserom.gba", 0x572744, 0x8
+ obj_pal gUnknown_085724D4, 0xDACA
gUnknown_0857274C:: @ 857274C
- .incbin "baserom.gba", 0x57274c, 0x8
+ obj_tiles gUnknown_085724F4, 0x1C0, 5
gUnknown_08572754:: @ 8572754
- .incbin "baserom.gba", 0x572754, 0x18
+ spr_template 2, 0xDAC6, gOamData_857286C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_0857276C:: @ 857276C
- .incbin "baserom.gba", 0x57276c, 0xf8
+ .4byte gUnknown_085EB7EF, 0
+ .4byte gUnknown_085EB802, 0
+ .4byte gUnknown_085EB81A, 0
+ .4byte gUnknown_085EB82F, 0
+ .4byte gUnknown_085EB843, 1
+ .4byte gUnknown_085EB853, 0
+ .4byte gUnknown_085EB866, 0
+ .4byte gUnknown_085EB87C, 1
+ .4byte gUnknown_085EB88E, 0
+ .4byte gUnknown_085EB89F, 0
+ .4byte gUnknown_085EB8B5, 4
+ .4byte gUnknown_085EB8C6, 6
+ .4byte gUnknown_085EB8D3, 0
+ .4byte gUnknown_085EB8E6, 0
+ .4byte gUnknown_085EB900, 0
+ .4byte gUnknown_085EB913, 0
+ .4byte gUnknown_085EB92D, 0
+ .4byte gUnknown_085EB946, 0
+ .4byte gUnknown_085EB960, 0
+ .4byte gUnknown_085EB979, 1
+ .4byte gUnknown_085EB987, 0
+ .4byte gUnknown_085EB9A1, 0
+ .4byte gUnknown_085EB9AB, 0
+ .4byte gUnknown_085EB843, 7
+ .4byte gUnknown_085EB9C3, 0
+ .4byte gUnknown_085EB9D6, 7
+ .4byte gUnknown_085EB9EE, 0
+ .4byte gUnknown_085EB9FF, 0
+ .4byte gUnknown_085EBA19, 7
+ .4byte gUnknown_085EBA29, 7
+ .4byte gUnknown_085EBA38, 0
+
+ .align 2
gUnknown_08572864:: @ 8572864
- .incbin "baserom.gba", 0x572864, 0x58
+ window_template 0, 0x18, 0xB, 5, 4, 0xF, 0x5C
+
+ .align 2
+gOamData_857286C:: @ 857286C
+ .2byte 0x0000
+ .2byte 0xC000
+ .2byte 0x0000
+
+ .align 2
+gOamData_8572874:: @ 8572874
+ .2byte 0x4000
+ .2byte 0x0000
+ .2byte 0x0000
+
+ .align 2
+gSpriteAnim_857287C:: @ 857287C
+ obj_image_anim_frame 0, 5
+ obj_image_anim_end
+
+ .align 2
+gSpriteAnim_8572884:: @ 8572884
+ obj_image_anim_frame 2, 8
+ obj_image_anim_frame 4, 8
+ obj_image_anim_frame 6, 8
+ obj_image_anim_jump 0
+
+ .align 2
+gSpriteAnim_8572894:: @ 8572894
+ obj_image_anim_frame 8, 5
+ obj_image_anim_end
+
+ .align 2
+gSpriteAnim_857289C:: @ 857289C
+ obj_image_anim_frame 10, 8
+ obj_image_anim_frame 4, 8
+ obj_image_anim_frame 12, 8
+ obj_image_anim_jump 0
+
+ .align 2
+gSpriteAnimTable_85728AC:: @ 85728AC
+ .4byte gSpriteAnim_857287C
+ .4byte gSpriteAnim_8572884
+ .4byte gSpriteAnim_8572894
+ .4byte gSpriteAnim_857289C
gUnknown_085728BC:: @ 85728BC
- .incbin "baserom.gba", 0x5728bc, 0x18
+ spr_template 5, 0xDACA, gOamData_8572874, gSpriteAnimTable_85728AC, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
+ .align 2
gUnknown_085728D4:: @ 85728D4
- .incbin "baserom.gba", 0x5728d4, 0x48
-
-gUnknown_0857291C:: @ 857291C
- .incbin "baserom.gba", 0x57291c, 0x4c58
+ spr_template 0x12, 0xDAC0, gOamData_85728EC, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
+
+ .align 2
+gOamData_85728EC:: @ 85728EC
+ .2byte 0x0000
+ .2byte 0x8000
+ .2byte 0x0000
+
+ .align 2
+gSpriteAffineAnim_85728F4:: @ 85728F4
+ obj_rot_scal_anim_frame 0xFFFE, 0xFFFE, 0, 120
+ obj_rot_scal_anim_end
+
+ .align 2
+gSpriteAffineAnim_8572904:: @ 8572904
+ obj_rot_scal_anim_frame 0x10, 0x10, 0, 0
+ obj_rot_scal_anim_frame 0x10, 0x10, 0, 15
+ obj_rot_scal_anim_end
+
+ .align 2
+gSpriteAffineAnimTable_857291C:: @ 857291C
+ .4byte gSpriteAffineAnim_85728F4
+ .4byte gSpriteAffineAnim_8572904
+
+gUnknown_08572924:: @ 8572924
+ .incbin "baserom.gba", 0x572924, 0x4c50
gUnknown_08577574:: @ 8577574
.incbin "baserom.gba", 0x577574, 0x44
diff --git a/data/pokemon_summary_screen.s b/data/pokemon_summary_screen.s
index fc1c79096..659498743 100644
--- a/data/pokemon_summary_screen.s
+++ b/data/pokemon_summary_screen.s
@@ -18,12 +18,27 @@ gUnknown_0861CBEC:: @ 861CBEC
gUnknown_0861CBF8:: @ 861CBF8
.incbin "baserom.gba", 0x61cbf8, 0xc
+ .align 2
gUnknown_0861CC04:: @ 861CC04
- .incbin "baserom.gba", 0x61cc04, 0xc
-
+ .4byte gSummaryScreenPowAcc_Tilemap
+ .byte 0x00
+ .byte 0x00
+ .byte 0x0A
+ .byte 0x07
+ .byte 0x00
+ .byte 0x2D
+
+ .align 2
gUnknown_0861CC10:: @ 861CC10
- .incbin "baserom.gba", 0x61cc10, 0xc
-
+ .4byte gUnknown_08DC3C34
+ .byte 0x00
+ .byte 0x00
+ .byte 0x0A
+ .byte 0x07
+ .byte 0x00
+ .byte 0x2D
+
+ .align 2
gUnknown_0861CC1C:: @ 861CC1C
.incbin "baserom.gba", 0x61cc1c, 0x8
@@ -121,7 +136,12 @@ gUnknown_0861F2C0:: @ 861F2C0
.incbin "baserom.gba", 0x61f2c0, 0x18
gUnknown_0861F2D8:: @ 861F2D8
- .incbin "baserom.gba", 0x61f2d8, 0x30
+ .4byte gMenuText_Use, sub_81C61E0
+ .4byte gMenuText_Toss, sub_81C62C4
+ .4byte gMenuText_Give, sub_81C6648
+ .4byte gText_Cancel2, sub_81C6258
+ .4byte gMenuText_Use, sub_81C679C
+ .4byte gText_EmptyString2, NULL
gUnknown_0861F308:: @ 861F308
.incbin "baserom.gba", 0x61f308, 0x4
@@ -136,7 +156,8 @@ gUnknown_0861F310:: @ 861F310
.incbin "baserom.gba", 0x61f310, 0x4
gUnknown_0861F314:: @ 861F314
- .incbin "baserom.gba", 0x61f314, 0x8
+ .4byte sub_81C654C
+ .4byte sub_81C63D0
gUnknown_0861F31C:: @ 861F31C
.incbin "baserom.gba", 0x61f31c, 0xc
diff --git a/data/pokenav.s b/data/pokenav.s
index 8e8e24b65..35fdafee5 100644
--- a/data/pokenav.s
+++ b/data/pokenav.s
@@ -4,7 +4,117 @@
.section .rodata
gUnknown_0861F3EC:: @ 861F3EC
- .incbin "baserom.gba", 0x61f3ec, 0x618
+ .4byte sub_81C9298
+ .4byte sub_81C941C
+ .4byte sub_81C9924
+ .4byte sub_81C9990
+ .4byte sub_81C99C0
+ .4byte sub_81C9430
+ .4byte sub_81C99D4
+ .4byte sub_81C9298
+ .4byte sub_81C941C
+ .4byte sub_81C9940
+ .4byte sub_81C9990
+ .4byte sub_81C99C0
+ .4byte sub_81C9430
+ .4byte sub_81C99D4
+ .4byte sub_81C9338
+ .4byte sub_81C941C
+ .4byte sub_81C9940
+ .4byte sub_81C9990
+ .4byte sub_81C99C0
+ .4byte sub_81C9430
+ .4byte sub_81C99D4
+ .4byte sub_81C9368
+ .4byte sub_81C941C
+ .4byte sub_81C9940
+ .4byte sub_81C9990
+ .4byte sub_81C99C0
+ .4byte sub_81C9430
+ .4byte sub_81C99D4
+ .4byte sub_81C92CC
+ .4byte sub_81C941C
+ .4byte sub_81C9940
+ .4byte sub_81C9990
+ .4byte sub_81C99C0
+ .4byte sub_81C9430
+ .4byte sub_81C99D4
+ .4byte sub_81C9304
+ .4byte sub_81C941C
+ .4byte sub_81C9940
+ .4byte sub_81C9990
+ .4byte sub_81C99C0
+ .4byte sub_81C9430
+ .4byte sub_81C99D4
+ .4byte sub_81CC4D4
+ .4byte sub_81CC554
+ .4byte sub_81CC5F4
+ .4byte sub_81CC62C
+ .4byte sub_81CC65C
+ .4byte sub_81CC524
+ .4byte sub_81CC670
+ .4byte sub_81CCFD8
+ .4byte sub_81CD070
+ .4byte sub_81CDDD4
+ .4byte sub_81CDE2C
+ .4byte sub_81CDE64
+ .4byte sub_81CD1C0
+ .4byte sub_81CECA0
+ .4byte sub_81CEF3C
+ .4byte sub_81CEFDC
+ .4byte sub_81CF330
+ .4byte sub_81CF3A0
+ .4byte sub_81CF3D0
+ .4byte sub_81CEFF0
+ .4byte sub_81CF3F8
+ .4byte sub_81CD024
+ .4byte sub_81CD070
+ .4byte sub_81CDDD4
+ .4byte sub_81CDE2C
+ .4byte sub_81CDE64
+ .4byte sub_81CD1C0
+ .4byte sub_81CECA0
+ .4byte sub_81CEF98
+ .4byte sub_81CEFDC
+ .4byte sub_81CF368
+ .4byte sub_81CF3A0
+ .4byte sub_81CF3D0
+ .4byte sub_81CEFF0
+ .4byte sub_81CF3F8
+ .4byte sub_81CAAE8
+ .4byte sub_81CAB24
+ .4byte sub_81CB260
+ .4byte sub_81CB29C
+ .4byte sub_81CB2CC
+ .4byte sub_81CAB38
+ .4byte sub_81CB2E0
+ .4byte sub_81CF9BC
+ .4byte sub_81CFA34
+ .4byte sub_81CFDD0
+ .4byte sub_81CFE40
+ .4byte sub_81CFE70
+ .4byte sub_81CFA48
+ .4byte sub_81CFE98
+ .4byte sub_81D0450
+ .4byte sub_81D04A0
+ .4byte sub_81D0978
+ .4byte sub_81D09B0
+ .4byte sub_81D09E0
+ .4byte sub_81D04B8
+ .4byte sub_81D09F4
+ .4byte sub_81CFA04
+ .4byte sub_81CFA34
+ .4byte sub_81CFE08
+ .4byte sub_81CFE40
+ .4byte sub_81CFE70
+ .4byte sub_81CFA48
+ .4byte sub_81CFE98
+
+gUnknown_0861F590:: @ 861F590
+ .incbin "baserom.gba", 0x61F590, 0x20
+
+gUnknown_0861F5B0:: @ 861F5B0
+ .incbin "baserom.gba", 0x61f5b0, 0x454
gUnknown_0861FA04:: @ 861FA04
.incbin "baserom.gba", 0x61fa04, 0x4
@@ -13,31 +123,86 @@ gUnknown_0861FA08:: @ 861FA08
.incbin "baserom.gba", 0x61fa08, 0x10
gUnknown_0861FA18:: @ 861FA18
- .incbin "baserom.gba", 0x61fa18, 0x30
+ .4byte gUnknown_085EBED5
+ .4byte gUnknown_085EBED9
+ .4byte gUnknown_085EBEE9
+ .4byte gUnknown_085EBEF9
+ .4byte gUnknown_085EBF0E
+ .4byte gUnknown_085EBF22
+ .4byte gUnknown_085EBF39
+ .4byte gUnknown_085EBF49
+ .4byte gUnknown_085EBF57
+ .4byte gUnknown_085EBF60
+ .4byte gUnknown_085EBF73
+ .4byte gUnknown_085EBF84
gUnknown_0861FA48:: @ 861FA48
.incbin "baserom.gba", 0x61fa48, 0x4
gUnknown_0861FA4C:: @ 861FA4C
- .incbin "baserom.gba", 0x61fa4c, 0x8
+ obj_tiles gUnknown_0861F5B0, 0x1000, 0
gUnknown_0861FA54:: @ 861FA54
- .incbin "baserom.gba", 0x61fa54, 0x10
+ obj_pal gUnknown_0861F590, 0
+ null_obj_pal
gUnknown_0861FA64:: @ 861FA64
- .incbin "baserom.gba", 0x61fa64, 0x8
+ obj_tiles gPokenavLeftHeaderHoennMap_Gfx, 0xC00, 2
gUnknown_0861FA6C:: @ 861FA6C
- .incbin "baserom.gba", 0x61fa6c, 0x30
+ obj_tiles gPokenavLeftHeaderMainMenu_Gfx, 0x20, 3
+ obj_tiles gPokenavLeftHeaderCondition_Gfx, 0x20, 1
+ obj_tiles gPokenavLeftHeaderRibbons_Gfx, 0x20, 2
+ obj_tiles gPokenavLeftHeaderMatchCall_Gfx, 0x20, 4
+ obj_tiles gPokenavLeftHeaderHoennMap_Gfx, 0x20, 0
+ obj_tiles gPokenavLeftHeaderHoennMap_Gfx, 0x40, 0
gUnknown_0861FA9C:: @ 861FA9C
- .incbin "baserom.gba", 0x61fa9c, 0x68
+ .4byte gPokenavLeftHeaderParty_Gfx, 1
+ .4byte gPokenavLeftHeaderSearch_Gfx, 1
+ .4byte gPokenavLeftHeaderCool_Gfx, 4
+ .4byte gPokenavLeftHeaderBeauty_Gfx, 1
+ .4byte gPokenavLeftHeaderCute_Gfx, 2
+ .4byte gPokenavLeftHeaderSmart_Gfx, 0
+ .4byte gPokenavLeftHeaderTough_Gfx, 0
+
+gUnknown_0861FAD4:: @ 861FAD4
+ .2byte 0x0
+ .2byte 0x8000
+ .2byte 0x0
+ .2byte 0x0
+
+gUnknown_0861FADC::
+ obj_image_anim_frame 0, 8
+ obj_image_anim_frame 16, 8
+ obj_image_anim_frame 32, 8
+ obj_image_anim_frame 48, 8
+ obj_image_anim_frame 64, 8
+ obj_image_anim_frame 80, 8
+ obj_image_anim_frame 96, 8
+ obj_image_anim_frame 112, 8
+ obj_image_anim_jump 0
+
+gUnknown_0861FB00::
+ .4byte gUnknown_0861FADC
gUnknown_0861FB04:: @ 861FB04
- .incbin "baserom.gba", 0x61fb04, 0x28
+ spr_template 0, 0, gUnknown_0861FAD4, gUnknown_0861FB00, NULL, gDummySpriteAffineAnimTable, sub_81C7CB4
+
+gUnknown_0861FB1C::
+ .2byte 0x4000
+ .2byte 0xC000
+ .2byte 0x400
+ .2byte 0x0
+
+gUnknown_0861FB24::
+ .2byte 0x4000
+ .2byte 0x8000
+ .2byte 0x400
+ .2byte 0x0
gUnknown_0861FB2C:: @ 861FB2C
- .incbin "baserom.gba", 0x61fb2c, 0x18
+ spr_template 2, 1, gUnknown_0861FB1C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_0861FB44:: @ 861FB44
.incbin "baserom.gba", 0x61fb44, 0xa0
@@ -118,7 +283,20 @@ gUnknown_086202CC:: @ 86202CC
.incbin "baserom.gba", 0x6202cc, 0x8
gUnknown_086202D4:: @ 86202D4
- .incbin "baserom.gba", 0x6202d4, 0x38
+ .4byte gUnknown_085EBCC5
+ .4byte gUnknown_085EBCE8
+ .4byte gUnknown_085EBD01
+ .4byte gUnknown_085EBD1C
+ .4byte gUnknown_085EBD34
+ .4byte gUnknown_085EBD83
+ .4byte gUnknown_085EBDA2
+ .4byte gUnknown_085EBDBF
+ .4byte gUnknown_085EBDDB
+ .4byte gUnknown_085EBDEE
+ .4byte gUnknown_085EBE06
+ .4byte gUnknown_085EBE19
+ .4byte gUnknown_085EBE2D
+ .4byte gUnknown_085EBE41
gUnknown_0862030C:: @ 862030C
.incbin "baserom.gba", 0x62030c, 0x3
@@ -133,10 +311,1026 @@ gUnknown_0862036C:: @ 862036C
.incbin "baserom.gba", 0x62036c, 0x18
gUnknown_08620384:: @ 8620384
- .incbin "baserom.gba", 0x620384, 0x1ca4
+ .incbin "baserom.gba", 0x620384, 0xC
+
+gUnknown_08620390:: @ 8620390
+ .string "Becalm fighting emotions.$"
+
+gUnknown_086203AA:: @ 86203AA
+ .string "Fragrant GRASS POKéMON.$"
+
+gUnknown_086203C2:: @ 86203C2
+ .string "Soothing aromas make the$"
+
+gUnknown_086203DB:: @ 86203DB
+ .string "body and mind healthy.$"
+
+gUnknown_086203F2:: @ 86203F2
+ .string "I’m not very good at this.$"
+
+gUnknown_0862040D:: @ 862040D
+ .string "Ruin-exploration partners.$"
+
+gUnknown_08620428:: @ 8620428
+ .string "I am searching for undersea$"
+
+gUnknown_08620444:: @ 8620444
+ .string "ruins and relics.$"
+
+gUnknown_08620456:: @ 8620456
+ .string "Overwhelm with power!$"
+
+gUnknown_0862046C:: @ 862046C
+ .string "Craggy ROCK POKéMON.$"
+
+gUnknown_08620481:: @ 8620481
+ .string "In search of ancient lore,$"
+
+gUnknown_0862049C:: @ 862049C
+ .string "I travel the world.$"
+
+gUnknown_086204B0:: @ 86204B0
+ .string "I’m going to try hard!$"
+
+gUnknown_086204C7:: @ 86204C7
+ .string "Good swimmer POKéMON.$"
+
+gUnknown_086204DD:: @ 86204DD
+ .string "I wish I could swim without$"
+
+gUnknown_086204F9:: @ 86204F9
+ .string "using an inner tube.$"
+
+gUnknown_0862050E:: @ 862050E
+ .string "I don’t know. I’ll try hard.$"
+
+gUnknown_0862052B:: @ 862052B
+ .string "WATER POKéMON are buddies.$"
+
+gUnknown_08620546:: @ 8620546
+ .string "It’s not like I can’t swim.$"
+
+gUnknown_08620562:: @ 8620562
+ .string "I just like my inner tube.$"
+
+gUnknown_0862057D:: @ 862057D
+ .string "We split our duties.$"
+
+gUnknown_08620592:: @ 8620592
+ .string "We like friendly POKéMON.$"
+
+gUnknown_086205AC:: @ 86205AC
+ .string "We enjoy POKéMON together$"
+
+gUnknown_086205C6:: @ 86205C6
+ .string "as sister and brother.$"
+
+gUnknown_086205DD:: @ 86205DD
+ .string "I finish with power moves!$"
+
+gUnknown_086205F8:: @ 86205F8
+ .string "A mix of different types.$"
+
+gUnknown_08620612:: @ 8620612
+ .string "I aim to become the ultimate$"
+
+gUnknown_0862062F:: @ 862062F
+ .string "TRAINER!$"
+
+gUnknown_08620638:: @ 8620638
+ .string "Exploit the foe’s weakness.$"
+
+gUnknown_08620654:: @ 8620654
+ .string "Balance is crucial.$"
+
+gUnknown_08620668:: @ 8620668
+ .string "My goal is to become the$"
+
+gUnknown_08620681:: @ 8620681
+ .string "POKéMON CHAMPION.$"
+
+gUnknown_08620693:: @ 8620693
+ .string "Upset the opponent.$"
+
+gUnknown_086206A7:: @ 86206A7
+ .string "Type doesn’t matter.$"
+
+gUnknown_086206BC:: @ 86206BC
+ .string "I’m a top student at the$"
+
+gUnknown_086206D5:: @ 86206D5
+ .string "TRAINER’S SCHOOL.$"
+
+gUnknown_086206E7:: @ 86206E7
+ .string "Slow, steady suffering.$"
+
+gUnknown_086206FF:: @ 86206FF
+ .string "Scary to meet at night.$"
+
+gUnknown_08620717:: @ 8620717
+ .string "I see things that others$"
+
+gUnknown_08620730:: @ 8620730
+ .string "can’t see...$"
+
+gUnknown_0862073D:: @ 862073D
+ .string "Anything to win.$"
+
+gUnknown_0862074E:: @ 862074E
+ .string "Gorgeous type!$"
+
+gUnknown_0862075D:: @ 862075D
+ .string "I have a pool specially for$"
+
+gUnknown_08620779:: @ 8620779
+ .string "my POKéMON at home.$"
+
+gUnknown_0862078D:: @ 862078D
+ .string "You’ll fall under my spell!$"
+
+gUnknown_086207A9:: @ 86207A9
+ .string "Mature WATER type.$"
+
+gUnknown_086207BC:: @ 86207BC
+ .string "I dream of cruising around$"
+
+gUnknown_086207D7:: @ 86207D7
+ .string "the world on a luxury liner.$"
+
+gUnknown_086207F4:: @ 86207F4
+ .string "I’ll lead you astray.$"
+
+gUnknown_0862080A:: @ 862080A
+ .string "Cute, of course.$"
+
+gUnknown_0862081B:: @ 862081B
+ .string "I love the SAFARI ZONE.$"
+
+gUnknown_08620833:: @ 8620833
+ .string "I seem to end up there.$"
+
+gUnknown_0862084B:: @ 862084B
+ .string "Strategy? Who needs it?$"
+
+gUnknown_08620863:: @ 8620863
+ .string "I spent big money on it!$"
+
+gUnknown_0862087C:: @ 862087C
+ .string "I, being rich, sleep in a$"
+
+gUnknown_08620896:: @ 8620896
+ .string "custom POKéMON bed.$"
+
+gUnknown_086208AA:: @ 86208AA
+ .string "Wrestle down with power.$"
+
+gUnknown_086208C3:: @ 86208C3
+ .string "Took all night to catch.$"
+
+gUnknown_086208DC:: @ 86208DC
+ .string "Big, burly, and buff$"
+
+gUnknown_086208F1:: @ 86208F1
+ .string "POKéMON are the best...$"
+
+gUnknown_08620909:: @ 8620909
+ .string "Ram at full speed!$"
+
+gUnknown_0862091C:: @ 862091C
+ .string "Funky WATER type!$"
+
+gUnknown_0862092E:: @ 862092E
+ .string "If I can’t be out swimming,$"
+
+gUnknown_0862094A:: @ 862094A
+ .string "I’ll be pumping weights.$"
+
+gUnknown_08620963:: @ 8620963
+ .string "Grand slam pummeling!$"
+
+gUnknown_08620979:: @ 8620979
+ .string "FIGHTING type.$"
+
+gUnknown_08620988:: @ 8620988
+ .string "Not to brag, but I can bust$"
+
+gUnknown_086209A4:: @ 86209A4
+ .string "ten roof tiles!$"
+
+gUnknown_086209B4:: @ 86209B4
+ .string "Witness karate power!$"
+
+gUnknown_086209CA:: @ 86209CA
+ .string "My partners in training!$"
+
+gUnknown_086209E3:: @ 86209E3
+ .string "Let us discuss matters of$"
+
+gUnknown_086209FD:: @ 86209FD
+ .string "the world with bare fists!$"
+
+gUnknown_08620A18:: @ 8620A18
+ .string "Rock to stunning sounds!$"
+
+gUnknown_08620A31:: @ 8620A31
+ .string "Electric-and-sound combo!$"
+
+gUnknown_08620A4B:: @ 8620A4B
+ .string "My compositions will shock$"
+
+gUnknown_08620A66:: @ 8620A66
+ .string "you and stun you!$"
+
+gUnknown_08620A78:: @ 8620A78
+ .string "I’ll electrify you!$"
+
+gUnknown_08620A8C:: @ 8620A8C
+ .string "They’re ELECTRIC!$"
+
+gUnknown_08620A9E:: @ 8620A9E
+ .string "I want to make people cry$"
+
+gUnknown_08620AB8:: @ 8620AB8
+ .string "with songs from my heart.$"
+
+gUnknown_08620AD2:: @ 8620AD2
+ .string "Burn it all down!$"
+
+gUnknown_08620AE4:: @ 8620AE4
+ .string "Burn-inducing POKéMON.$"
+
+gUnknown_08620AFB:: @ 8620AFB
+ .string "When you light a campfire,$"
+
+gUnknown_08620B16:: @ 8620B16
+ .string "be sure there’s some water.$"
+
+gUnknown_08620B32:: @ 8620B32
+ .string "Hang in and be tenacious!$"
+
+gUnknown_08620B4C:: @ 8620B4C
+ .string "I’ll raise any POKéMON.$"
+
+gUnknown_08620B64:: @ 8620B64
+ .string "POKéMON raised in the wild$"
+
+gUnknown_08620B7F:: @ 8620B7F
+ .string "grow strong!$"
+
+gUnknown_08620B8C:: @ 8620B8C
+ .string "Our love lets us prevail.$"
+
+gUnknown_08620BA6:: @ 8620BA6
+ .string "We’ve had them for years.$"
+
+gUnknown_08620BC0:: @ 8620BC0
+ .string "Married 50 years, we’ve$"
+
+gUnknown_08620BD8:: @ 8620BD8
+ .string "devotedly raised POKéMON.$"
+
+gUnknown_08620BF2:: @ 8620BF2
+ .string "Attack in waves!$"
+
+gUnknown_08620C03:: @ 8620C03
+ .string "BUG POKéMON are cool.$"
+
+gUnknown_08620C19:: @ 8620C19
+ .string "I go into the forest every$"
+
+gUnknown_08620C34:: @ 8620C34
+ .string "day to catch BUG POKéMON.$"
+
+gUnknown_08620C4E:: @ 8620C4E
+ .string "Daze and confuse!$"
+
+gUnknown_08620C60:: @ 8620C60
+ .string "Ones with weird powers.$"
+
+gUnknown_08620C78:: @ 8620C78
+ .string "I can see through exactly$"
+
+gUnknown_08620C92:: @ 8620C92
+ .string "what you’re thinking!$"
+
+gUnknown_08620CA8:: @ 8620CA8
+ .string "Battle at full power.$"
+
+gUnknown_08620CBE:: @ 8620CBE
+ .string "POKéMON of many mysteries.$"
+
+gUnknown_08620CD9:: @ 8620CD9
+ .string "When we spoke, I was really$"
+
+gUnknown_08620CF5:: @ 8620CF5
+ .string "using telepathy.$"
+
+gUnknown_08620D06:: @ 8620D06
+ .string "Calm and collected.$"
+
+gUnknown_08620D1A:: @ 8620D1A
+ .string "POKéMON of distinction.$"
+
+gUnknown_08620D32:: @ 8620D32
+ .string "We enjoy a spot of tea$"
+
+gUnknown_08620D49:: @ 8620D49
+ .string "every day. It’s imported.$"
+
+gUnknown_08620D63:: @ 8620D63
+ .string "I use my head to battle.$"
+
+gUnknown_08620D7C:: @ 8620D7C
+ .string "I love any kind of POKéMON!$"
+
+gUnknown_08620D98:: @ 8620D98
+ .string "My daddy gives me spending$"
+
+gUnknown_08620DB3:: @ 8620DB3
+ .string "money if I ace a test.$"
+
+gUnknown_08620DCA:: @ 8620DCA
+ .string "My knowledge rules!$"
+
+gUnknown_08620DDE:: @ 8620DDE
+ .string "Any smart POKéMON!$"
+
+gUnknown_08620DF1:: @ 8620DF1
+ .string "I want to be a POKéMON$"
+
+gUnknown_08620E08:: @ 8620E08
+ .string "researcher in the future.$"
+
+gUnknown_08620E22:: @ 8620E22
+ .string "We talk it over first.$"
+
+gUnknown_08620E39:: @ 8620E39
+ .string "POKéMON that we both like.$"
+
+gUnknown_08620E54:: @ 8620E54
+ .string "We’re senior and junior$"
+
+gUnknown_08620E6C:: @ 8620E6C
+ .string "students into POKéMON!$"
+
+gUnknown_08620E83:: @ 8620E83
+ .string "Go for it, my dears!$"
+
+gUnknown_08620E98:: @ 8620E98
+ .string "I have no likes or dislikes.$"
+
+gUnknown_08620EB5:: @ 8620EB5
+ .string "While out shopping for$"
+
+gUnknown_08620ECC:: @ 8620ECC
+ .string "supper, I battle too.$"
+
+gUnknown_08620EE2:: @ 8620EE2
+ .string "I battle with love!$"
+
+gUnknown_08620EF6:: @ 8620EF6
+ .string "A POKéMON raised with love!$"
+
+gUnknown_08620F12:: @ 8620F12
+ .string "It’s important to build$"
+
+gUnknown_08620F2A:: @ 8620F2A
+ .string "trust with your POKéMON.$"
+
+gUnknown_08620F43:: @ 8620F43
+ .string "I see through your moves!$"
+
+gUnknown_08620F5D:: @ 8620F5D
+ .string "The essence of FIGHTING.$"
+
+gUnknown_08620F76:: @ 8620F76
+ .string "I’m not ready to give way$"
+
+gUnknown_08620F90:: @ 8620F90
+ .string "to the young yet!$"
+
+gUnknown_08620FA2:: @ 8620FA2
+ .string "Attack while defending.$"
+
+gUnknown_08620FBA:: @ 8620FBA
+ .string "The FIGHTING type.$"
+
+gUnknown_08620FCD:: @ 8620FCD
+ .string "Being old, I have my own$"
+
+gUnknown_08620FE6:: @ 8620FE6
+ .string "style of battling.$"
+
+gUnknown_08620FF9:: @ 8620FF9
+ .string "I do what I can.$"
+
+gUnknown_0862100A:: @ 862100A
+ .string "I use different types.$"
+
+gUnknown_08621021:: @ 8621021
+ .string "I’m going to keep working$"
+
+gUnknown_0862103B:: @ 862103B
+ .string "until I beat a GYM LEADER.$"
+
+gUnknown_08621056:: @ 8621056
+ .string "I battle patiently.$"
+
+gUnknown_0862106A:: @ 862106A
+ .string "WATER POKéMON to battle!$"
+
+gUnknown_08621083:: @ 8621083
+ .string "I’m the world’s only guy to$"
+
+gUnknown_0862109F:: @ 862109F
+ .string "catch a huge POKéMON!$"
+
+gUnknown_086210B5:: @ 86210B5
+ .string "Exploit the environment!$"
+
+gUnknown_086210CE:: @ 86210CE
+ .string "All hail the WATER type!$"
+
+gUnknown_086210E7:: @ 86210E7
+ .string "I won’t be beaten by some$"
+
+gUnknown_08621101:: @ 8621101
+ .string "beach bum SWIMMER!$"
+
+gUnknown_08621114:: @ 8621114
+ .string "Speed above all!$"
+
+gUnknown_08621125:: @ 8621125
+ .string "I use a speedy POKéMON.$"
+
+gUnknown_0862113D:: @ 862113D
+ .string "A marathon is a challenge$"
+
+gUnknown_08621157:: @ 8621157
+ .string "against your own self.$"
+
+gUnknown_0862116E:: @ 862116E
+ .string "Defense is crucial.$"
+
+gUnknown_08621182:: @ 8621182
+ .string "My POKéMON is solid.$"
+
+gUnknown_08621197:: @ 8621197
+ .string "I started this for dieting,$"
+
+gUnknown_086211B3:: @ 86211B3
+ .string "but I got right into it.$"
+
+gUnknown_086211CC:: @ 86211CC
+ .string "Strike before stricken!$"
+
+gUnknown_086211E4:: @ 86211E4
+ .string "A fast-running POKéMON!$"
+
+gUnknown_086211FC:: @ 86211FC
+ .string "If you ran and ran, you’d$"
+
+gUnknown_08621216:: @ 8621216
+ .string "become one with the wind.$"
+
+gUnknown_08621230:: @ 8621230
+ .string "All-out offensive!$"
+
+gUnknown_08621243:: @ 8621243
+ .string "WATER POKéMON rule!$"
+
+gUnknown_08621257:: @ 8621257
+ .string "I must swim over 6 miles$"
+
+gUnknown_08621270:: @ 8621270
+ .string "every day.$"
+
+gUnknown_0862127B:: @ 862127B
+ .string "Push and push again!$"
+
+gUnknown_08621290:: @ 8621290
+ .string "The strength of STEEL.$"
+
+gUnknown_086212A7:: @ 86212A7
+ .string "If you’re sweating, get$"
+
+gUnknown_086212BF:: @ 86212BF
+ .string "fluids into you regularly.$"
+
+gUnknown_086212DA:: @ 86212DA
+ .string "Draw the power of WATER.$"
+
+gUnknown_086212F3:: @ 86212F3
+ .string "Toughened WATER POKéMON.$"
+
+gUnknown_0862130C:: @ 862130C
+ .string "Training POKéMON is good,$"
+
+gUnknown_08621326:: @ 8621326
+ .string "but don’t neglect yourself.$"
+
+gUnknown_08621342:: @ 8621342
+ .string "It’s about POKéMON power!$"
+
+gUnknown_0862135C:: @ 862135C
+ .string "See the power of DRAGONS!$"
+
+gUnknown_08621376:: @ 8621376
+ .string "I’ll become legendary as the$"
+
+gUnknown_08621393:: @ 8621393
+ .string "strongest one day!$"
+
+gUnknown_086213A6:: @ 86213A6
+ .string "I’ll show you my technique!$"
+
+gUnknown_086213C2:: @ 86213C2
+ .string "Elegantly wheeling BIRDS.$"
+
+gUnknown_086213DC:: @ 86213DC
+ .string "My BIRD POKéMON, deliver my$"
+
+gUnknown_086213F8:: @ 86213F8
+ .string "love to that girl!$"
+
+gUnknown_0862140B:: @ 862140B
+ .string "You’ll suffer from poison!$"
+
+gUnknown_08621426:: @ 8621426
+ .string "Poisonous POKéMON.$"
+gUnknown_08621439:: @ 8621439
+ .string "I undertake training so$"
+
+gUnknown_08621451:: @ 8621451
+ .string "that I may become a ninja.$"
+
+gUnknown_0862146C:: @ 862146C
+ .string "The first strike wins!$"
+
+gUnknown_08621483:: @ 8621483
+ .string "Speedy FIGHTING type.$"
+
+gUnknown_08621499:: @ 8621499
+ .string "If my POKéMON lose,$"
+
+gUnknown_086214AD:: @ 86214AD
+ .string "I’ll carry on the fight!$"
+
+gUnknown_086214C6:: @ 86214C6
+ .string "Go, go, my POKéMON!$"
+
+gUnknown_086214DA:: @ 86214DA
+ .string "I’ll raise anything.$"
+
+gUnknown_086214EF:: @ 86214EF
+ .string "UV rays are your skin’s$"
+
+gUnknown_08621507:: @ 8621507
+ .string "enemy. Get protected.$"
+
+gUnknown_0862151D:: @ 862151D
+ .string "No mercy!$"
+
+gUnknown_08621527:: @ 8621527
+ .string "Cute WATER POKéMON.$"
+
+gUnknown_0862153B:: @ 862153B
+ .string "I have too many fans.$"
+
+gUnknown_08621551:: @ 8621551
+ .string "I was interviewed on TV.$"
+
+gUnknown_0862156A:: @ 862156A
+ .string "I think about this & that.$"
+
+gUnknown_08621585:: @ 8621585
+ .string "I like all POKéMON.$"
+
+gUnknown_08621599:: @ 8621599
+ .string "What lies beyond that$"
+
+gUnknown_086215AF:: @ 86215AF
+ .string "yonder hill?$"
+
+gUnknown_086215BC:: @ 86215BC
+ .string "We battle together!$"
+
+gUnknown_086215D0:: @ 86215D0
+ .string "We train together!$"
+
+gUnknown_086215E3:: @ 86215E3
+ .string "We like the same POKéMON,$"
+
+gUnknown_086215FD:: @ 86215FD
+ .string "but different desserts.$"
+
+gUnknown_08621615:: @ 8621615
+ .string "I force things with power!$"
+
+gUnknown_08621630:: @ 8621630
+ .string "WATER and FIGHTING types.$"
+
+gUnknown_0862164A:: @ 862164A
+ .string "Seamen are rough spirits!$"
+
+gUnknown_08621664:: @ 8621664
+ .string "Any complaints?$"
+
+gUnknown_08621674:: @ 8621674
+ .string "Up for a fight anytime!$"
+
+gUnknown_0862168C:: @ 862168C
+ .string "WATER POKéMON are my faves!$"
+
+gUnknown_086216A8:: @ 86216A8
+ .string "If you want to shout loud,$"
+
+gUnknown_086216C3:: @ 86216C3
+ .string "suck in air with your belly!$"
+
+gUnknown_086216E0:: @ 86216E0
+ .string "Protect POKéMON from harm.$"
+
+gUnknown_086216FB:: @ 86216FB
+ .string "I love rare POKéMON.$"
+
+gUnknown_08621710:: @ 8621710
+ .string "I want to collect all the$"
+
+gUnknown_0862172A:: @ 862172A
+ .string "world’s rare POKéMON.$"
+
+gUnknown_08621740:: @ 8621740
+ .string "I count on power.$"
+
+gUnknown_08621752:: @ 8621752
+ .string "POKéMON are my children.$"
+
+gUnknown_0862176B:: @ 862176B
+ .string "It takes knowledge and$"
+
+gUnknown_08621782:: @ 8621782
+ .string "love to raise POKéMON.$"
+
+gUnknown_08621799:: @ 8621799
+ .string "Full-on attack!$"
+
+gUnknown_086217A9:: @ 86217A9
+ .string "Anything. I’ll raise it.$"
+
+gUnknown_086217C2:: @ 86217C2
+ .string "I give them {POKEBLOCK}S for$"
+
+gUnknown_086217D9:: @ 86217D9
+ .string "going after CONTEST titles.$"
+
+gUnknown_086217F5:: @ 86217F5
+ .string "I raise POKéMON with care.$"
+
+gUnknown_08621810:: @ 8621810
+ .string "Fun-to-raise POKéMON.$"
+
+gUnknown_08621826:: @ 8621826
+ .string "Treat every POKéMON you$"
+
+gUnknown_0862183E:: @ 862183E
+ .string "meet with respect.$"
+
+gUnknown_08621851:: @ 8621851
+ .string "I believe in my POKéMON.$"
+
+gUnknown_0862186A:: @ 862186A
+ .string "I like strong POKéMON.$"
+
+gUnknown_08621881:: @ 8621881
+ .string "I’m training for rescue$"
+
+gUnknown_08621899:: @ 8621899
+ .string "work with my POKéMON.$"
+
+gUnknown_086218AF:: @ 86218AF
+ .string "Attack in waves!$"
+
+gUnknown_086218C0:: @ 86218C0
+ .string "I use different types.$"
+
+gUnknown_086218D7:: @ 86218D7
+ .string "Those who destroy nature$"
+
+gUnknown_086218F0:: @ 86218F0
+ .string "must never be forgiven!$"
+
+gUnknown_08621908:: @ 8621908
+ .string "I’ll show you some guts!$"
+
+gUnknown_08621921:: @ 8621921
+ .string "Cute POKéMON are my faves!$"
+
+gUnknown_0862193C:: @ 862193C
+ .string "After a battle, I always$"
+
+gUnknown_08621955:: @ 8621955
+ .string "bathe with my POKéMON.$"
+
+gUnknown_0862196C:: @ 862196C
+ .string "Lightning-fast attack!$"
+
+gUnknown_08621983:: @ 8621983
+ .string "BUG POKéMON are number 1!$"
+
+gUnknown_0862199D:: @ 862199D
+ .string "If you want to catch BUG$"
+
+gUnknown_086219B6:: @ 86219B6
+ .string "POKéMON, wake up early.$"
+
+gUnknown_086219CE:: @ 86219CE
+ .string "I battle with power.$"
+
+gUnknown_086219E3:: @ 86219E3
+ .string "Hard-bodied POKéMON.$"
+
+gUnknown_086219F8:: @ 86219F8
+ .string "I’ve been planning a month$"
+
+gUnknown_08621A13:: @ 8621A13
+ .string "for today’s hike.$"
+
+gUnknown_08621A25:: @ 8621A25
+ .string "I like it hot!$"
+
+gUnknown_08621A34:: @ 8621A34
+ .string "Hot POKéMON!$"
+
+gUnknown_08621A41:: @ 8621A41
+ .string "As much as I love POKéMON,$"
+
+gUnknown_08621A5C:: @ 8621A5C
+ .string "I surely like hiking!$"
+
+gUnknown_08621A72:: @ 8621A72
+ .string "Lovey-dovey strategy!$"
+
+gUnknown_08621A88:: @ 8621A88
+ .string "Lovey-dovey POKéMON!$"
+
+gUnknown_08621A9D:: @ 8621A9D
+ .string "We’re lovey-dovey!$"
+
+gUnknown_08621AB0:: @ 8621AB0
+ .string "Forever lovey-dovey!$"
+
+gUnknown_08621AC5:: @ 8621AC5
+ .string "We let it all hang out.$"
+
+gUnknown_08621ADD:: @ 8621ADD
+ .string "The 1st POKéMON I caught.$"
+
+gUnknown_08621AF7:: @ 8621AF7
+ .string "POKéMON and I have grown$"
+
+gUnknown_08621B10:: @ 8621B10
+ .string "stronger together.$"
+
+gUnknown_08621B23:: @ 8621B23
+ .string "ROCK-type power attack.$"
+
+gUnknown_08621B3B:: @ 8621B3B
+ .string "I prefer rock-hard POKéMON.$"
+
+gUnknown_08621B57:: @ 8621B57
+ .string "A LEADER of a big GYM bears$"
+
+gUnknown_08621B73:: @ 8621B73
+ .string "a lot of responsibility.$"
+
+gUnknown_08621B8C:: @ 8621B8C
+ .string "Direct physical action!$"
+
+gUnknown_08621BA4:: @ 8621BA4
+ .string "FIGHTING POKéMON rule!$"
+
+gUnknown_08621BBB:: @ 8621BBB
+ .string "The world awaits me as the$"
+
+gUnknown_08621BD6:: @ 8621BD6
+ .string "next big wave!$"
+
+gUnknown_08621BE5:: @ 8621BE5
+ .string "I choose to electrify.$"
+
+gUnknown_08621BFC:: @ 8621BFC
+ .string "Get shocked by electricity!$"
+
+gUnknown_08621C18:: @ 8621C18
+ .string "One must never throw a$"
+
+gUnknown_08621C2F:: @ 8621C2F
+ .string "match. Even I must not.$"
+
+gUnknown_08621C47:: @ 8621C47
+ .string "Battle aggressively.$"
+
+gUnknown_08621C5C:: @ 8621C5C
+ .string "Burn with passion!$"
+
+gUnknown_08621C6F:: @ 8621C6F
+ .string "Completely wash away daily$"
+
+gUnknown_08621C8A:: @ 8621C8A
+ .string "fatigue in hot springs!$"
+
+gUnknown_08621CA2:: @ 8621CA2
+ .string "I flexibly adapt my style.$"
+
+gUnknown_08621CBD:: @ 8621CBD
+ .string "Grown in a balanced manner.$"
+
+gUnknown_08621CD9:: @ 8621CD9
+ .string "I walk the 30 minutes from$"
+
+gUnknown_08621CF4:: @ 8621CF4
+ .string "home to here every day.$"
+
+gUnknown_08621D0C:: @ 8621D0C
+ .string "I take advantage of speed.$"
+
+gUnknown_08621D27:: @ 8621D27
+ .string "Graceful sky dancers.$"
+
+gUnknown_08621D3D:: @ 8621D3D
+ .string "The ultimate would be to$"
+
+gUnknown_08621D56:: @ 8621D56
+ .string "live as one with nature.$"
+
+gUnknown_08621D6F:: @ 8621D6F
+ .string "We battle in cooperation.$"
+
+gUnknown_08621D89:: @ 8621D89
+ .string "Always friendly POKéMON.$"
+
+gUnknown_08621DA2:: @ 8621DA2
+ .string "Papa has trouble telling$"
+
+gUnknown_08621DBB:: @ 8621DBB
+ .string "the two of us apart!$"
+
+gUnknown_08621DD0:: @ 8621DD0
+ .string "I use splendid waterpower.$"
+
+gUnknown_08621DEB:: @ 8621DEB
+ .string "POKéMON of elegance!$"
+
+gUnknown_08621E00:: @ 8621E00
+ .string "The adulation of beautiful$"
+
+gUnknown_08621E1B:: @ 8621E1B
+ .string "ladies fills me with energy!$"
+
+gUnknown_08621E38:: @ 8621E38
+ .string "Offense over defense!$"
+
+gUnknown_08621E4E:: @ 8621E4E
+ .string "The DARK side’s beauties.$"
+
+gUnknown_08621E68:: @ 8621E68
+ .string "They said I was a punk, but$"
+
+gUnknown_08621E84:: @ 8621E84
+ .string "I’m one of the ELITE FOUR!$"
+
+gUnknown_08621E9F:: @ 8621E9F
+ .string "Confuse and confound.$"
+
+gUnknown_08621EB5:: @ 8621EB5
+ .string "There’s nothing definite.$"
+
+gUnknown_08621ECF:: @ 8621ECF
+ .string "I wonder how my grandma at$"
+
+gUnknown_08621EEA:: @ 8621EEA
+ .string "MT. PYRE is doing?$"
+
+gUnknown_08621EFD:: @ 8621EFD
+ .string "I use items for help.$"
+
+gUnknown_08621F13:: @ 8621F13
+ .string "Flaming passion in icy cold!$"
+
+gUnknown_08621F30:: @ 8621F30
+ .string "The ICE type can be better$"
+
+gUnknown_08621F4B:: @ 8621F4B
+ .string "trained in this hot land.$"
+
+gUnknown_08621F65:: @ 8621F65
+ .string "Harness strong abilities.$"
+
+gUnknown_08621F7F:: @ 8621F7F
+ .string "The raw power of DRAGONS!$"
+
+gUnknown_08621F99:: @ 8621F99
+ .string "I dedicate myself to the$"
+
+gUnknown_08621FB2:: @ 8621FB2
+ .string "POKéMON that saved me.$"
+
+gUnknown_08621FC9:: @ 8621FC9
+ .string "Dignity and respect.$"
+
+gUnknown_08621FDE:: @ 8621FDE
+ .string "I prefer POKéMON of grace.$"
+
+gUnknown_08621FF9:: @ 8621FF9
+ .string "I represent beauty as$"
+
+gUnknown_0862200F:: @ 862200F
+ .string "well as intelligence.$"
+
+.align 2
+
+@ strategy, mon text, introduction1, introduction2
gUnknown_08622028:: @ 8622028
- .incbin "baserom.gba", 0x622028, 0x4e0
+ .4byte gUnknown_08620390, gUnknown_086203AA, gUnknown_086203C2, gUnknown_086203DB
+ .4byte gUnknown_086203F2, gUnknown_0862040D, gUnknown_08620428, gUnknown_08620444
+ .4byte gUnknown_08620456, gUnknown_0862046C, gUnknown_08620481, gUnknown_0862049C
+ .4byte gUnknown_086204B0, gUnknown_086204C7, gUnknown_086204DD, gUnknown_086204F9
+ .4byte gUnknown_0862050E, gUnknown_0862052B, gUnknown_08620546, gUnknown_08620562
+ .4byte gUnknown_0862057D, gUnknown_08620592, gUnknown_086205AC, gUnknown_086205C6
+ .4byte gUnknown_086205DD, gUnknown_086205F8, gUnknown_08620612, gUnknown_0862062F
+ .4byte gUnknown_08620638, gUnknown_08620654, gUnknown_08620668, gUnknown_08620681
+ .4byte gUnknown_08620693, gUnknown_086206A7, gUnknown_086206BC, gUnknown_086206D5
+ .4byte gUnknown_086206E7, gUnknown_086206FF, gUnknown_08620717, gUnknown_08620730
+ .4byte gUnknown_0862073D, gUnknown_0862074E, gUnknown_0862075D, gUnknown_08620779
+ .4byte gUnknown_0862078D, gUnknown_086207A9, gUnknown_086207BC, gUnknown_086207D7
+ .4byte gUnknown_086207F4, gUnknown_0862080A, gUnknown_0862081B, gUnknown_08620833
+ .4byte gUnknown_0862084B, gUnknown_08620863, gUnknown_0862087C, gUnknown_08620896
+ .4byte gUnknown_086208AA, gUnknown_086208C3, gUnknown_086208DC, gUnknown_086208F1
+ .4byte gUnknown_08620909, gUnknown_0862091C, gUnknown_0862092E, gUnknown_0862094A
+ .4byte gUnknown_08620963, gUnknown_08620979, gUnknown_08620988, gUnknown_086209A4
+ .4byte gUnknown_086209B4, gUnknown_086209CA, gUnknown_086209E3, gUnknown_086209FD
+ .4byte gUnknown_08620A18, gUnknown_08620A31, gUnknown_08620A4B, gUnknown_08620A66
+ .4byte gUnknown_08620A78, gUnknown_08620A8C, gUnknown_08620A9E, gUnknown_08620AB8
+ .4byte gUnknown_08620AD2, gUnknown_08620AE4, gUnknown_08620AFB, gUnknown_08620B16
+ .4byte gUnknown_08620B32, gUnknown_08620B4C, gUnknown_08620B64, gUnknown_08620B7F
+ .4byte gUnknown_08620B8C, gUnknown_08620BA6, gUnknown_08620BC0, gUnknown_08620BD8
+ .4byte gUnknown_08620BF2, gUnknown_08620C03, gUnknown_08620C19, gUnknown_08620C34
+ .4byte gUnknown_08620C4E, gUnknown_08620C60, gUnknown_08620C78, gUnknown_08620C92
+ .4byte gUnknown_08620CA8, gUnknown_08620CBE, gUnknown_08620CD9, gUnknown_08620CF5
+ .4byte gUnknown_08620D06, gUnknown_08620D1A, gUnknown_08620D32, gUnknown_08620D49
+ .4byte gUnknown_08620D63, gUnknown_08620D7C, gUnknown_08620D98, gUnknown_08620DB3
+ .4byte gUnknown_08620DCA, gUnknown_08620DDE, gUnknown_08620DF1, gUnknown_08620E08
+ .4byte gUnknown_08620E22, gUnknown_08620E39, gUnknown_08620E54, gUnknown_08620E6C
+ .4byte gUnknown_08620E83, gUnknown_08620E98, gUnknown_08620EB5, gUnknown_08620ECC
+ .4byte gUnknown_08620EE2, gUnknown_08620EF6, gUnknown_08620F12, gUnknown_08620F2A
+ .4byte gUnknown_08620F43, gUnknown_08620F5D, gUnknown_08620F76, gUnknown_08620F90
+ .4byte gUnknown_08620FA2, gUnknown_08620FBA, gUnknown_08620FCD, gUnknown_08620FE6
+ .4byte gUnknown_08620FF9, gUnknown_0862100A, gUnknown_08621021, gUnknown_0862103B
+ .4byte gUnknown_08621056, gUnknown_0862106A, gUnknown_08621083, gUnknown_0862109F
+ .4byte gUnknown_086210B5, gUnknown_086210CE, gUnknown_086210E7, gUnknown_08621101
+ .4byte gUnknown_08621114, gUnknown_08621125, gUnknown_0862113D, gUnknown_08621157
+ .4byte gUnknown_0862116E, gUnknown_08621182, gUnknown_08621197, gUnknown_086211B3
+ .4byte gUnknown_086211CC, gUnknown_086211E4, gUnknown_086211FC, gUnknown_08621216
+ .4byte gUnknown_08621230, gUnknown_08621243, gUnknown_08621257, gUnknown_08621270
+ .4byte gUnknown_0862127B, gUnknown_08621290, gUnknown_086212A7, gUnknown_086212BF
+ .4byte gUnknown_086212DA, gUnknown_086212F3, gUnknown_0862130C, gUnknown_08621326
+ .4byte gUnknown_08621342, gUnknown_0862135C, gUnknown_08621376, gUnknown_08621393
+ .4byte gUnknown_086213A6, gUnknown_086213C2, gUnknown_086213DC, gUnknown_086213F8
+ .4byte gUnknown_0862140B, gUnknown_08621426, gUnknown_08621439, gUnknown_08621451
+ .4byte gUnknown_0862146C, gUnknown_08621483, gUnknown_08621499, gUnknown_086214AD
+ .4byte gUnknown_086214C6, gUnknown_086214DA, gUnknown_086214EF, gUnknown_08621507
+ .4byte gUnknown_0862151D, gUnknown_08621527, gUnknown_0862153B, gUnknown_08621551
+ .4byte gUnknown_0862156A, gUnknown_08621585, gUnknown_08621599, gUnknown_086215AF
+ .4byte gUnknown_086215BC, gUnknown_086215D0, gUnknown_086215E3, gUnknown_086215FD
+ .4byte gUnknown_08621615, gUnknown_08621630, gUnknown_0862164A, gUnknown_08621664
+ .4byte gUnknown_08621674, gUnknown_0862168C, gUnknown_086216A8, gUnknown_086216C3
+ .4byte gUnknown_086216E0, gUnknown_086216FB, gUnknown_08621710, gUnknown_0862172A
+ .4byte gUnknown_08621740, gUnknown_08621752, gUnknown_0862176B, gUnknown_08621782
+ .4byte gUnknown_08621799, gUnknown_086217A9, gUnknown_086217C2, gUnknown_086217D9
+ .4byte gUnknown_086217F5, gUnknown_08621810, gUnknown_08621826, gUnknown_0862183E
+ .4byte gUnknown_08621851, gUnknown_0862186A, gUnknown_08621881, gUnknown_08621899
+ .4byte gUnknown_086218AF, gUnknown_086218C0, gUnknown_086218D7, gUnknown_086218F0
+ .4byte gUnknown_08621908, gUnknown_08621921, gUnknown_0862193C, gUnknown_08621955
+ .4byte gUnknown_0862196C, gUnknown_08621983, gUnknown_0862199D, gUnknown_086219B6
+ .4byte gUnknown_086219CE, gUnknown_086219E3, gUnknown_086219F8, gUnknown_08621A13
+ .4byte gUnknown_08621A25, gUnknown_08621A34, gUnknown_08621A41, gUnknown_08621A5C
+ .4byte gUnknown_08621A72, gUnknown_08621A88, gUnknown_08621A9D, gUnknown_08621AB0
+ .4byte gUnknown_08621AC5, gUnknown_08621ADD, gUnknown_08621AF7, gUnknown_08621B10
+ .4byte gUnknown_08621B23, gUnknown_08621B3B, gUnknown_08621B57, gUnknown_08621B73
+ .4byte gUnknown_08621B8C, gUnknown_08621BA4, gUnknown_08621BBB, gUnknown_08621BD6
+ .4byte gUnknown_08621BE5, gUnknown_08621BFC, gUnknown_08621C18, gUnknown_08621C2F
+ .4byte gUnknown_08621C47, gUnknown_08621C5C, gUnknown_08621C6F, gUnknown_08621C8A
+ .4byte gUnknown_08621CA2, gUnknown_08621CBD, gUnknown_08621CD9, gUnknown_08621CF4
+ .4byte gUnknown_08621D0C, gUnknown_08621D27, gUnknown_08621D3D, gUnknown_08621D56
+ .4byte gUnknown_08621D6F, gUnknown_08621D89, gUnknown_08621DA2, gUnknown_08621DBB
+ .4byte gUnknown_08621DD0, gUnknown_08621DEB, gUnknown_08621E00, gUnknown_08621E1B
+ .4byte gUnknown_08621E38, gUnknown_08621E4E, gUnknown_08621E68, gUnknown_08621E84
+ .4byte gUnknown_08621E9F, gUnknown_08621EB5, gUnknown_08621ECF, gUnknown_08621EEA
+ .4byte gUnknown_08621EFD, gUnknown_08621F13, gUnknown_08621F30, gUnknown_08621F4B
+ .4byte gUnknown_08621F65, gUnknown_08621F7F, gUnknown_08621F99, gUnknown_08621FB2
+ .4byte gUnknown_08621FC9, gUnknown_08621FDE, gUnknown_08621FF9, gUnknown_0862200F
gUnknown_08622508:: @ 8622508
.incbin "baserom.gba", 0x622508, 0x2
@@ -151,7 +1345,10 @@ gUnknown_08622530:: @ 8622530
.incbin "baserom.gba", 0x622530, 0xa4
gUnknown_086225D4:: @ 86225D4
- .incbin "baserom.gba", 0x6225d4, 0x10c
+ .incbin "baserom.gba", 0x6225d4, 0xC4
+
+gUnknown_08622698:: @ 8622698
+ .incbin "baserom.gba", 0x622698, 0x48
gUnknown_086226E0:: @ 86226E0
.incbin "baserom.gba", 0x6226e0, 0x20
@@ -172,7 +1369,22 @@ gUnknown_08622794:: @ 8622794
.incbin "baserom.gba", 0x622794, 0x4
gUnknown_08622798:: @ 8622798
- .incbin "baserom.gba", 0x622798, 0x40
+ .4byte NULL
+ .4byte sub_81CB510
+ .4byte sub_81CB588
+ .4byte sub_81CB600
+ .4byte sub_81CB678
+ .4byte sub_81CB6F0
+ .4byte sub_81CB734
+ .4byte sub_81CB75C
+ .4byte sub_81CB7A0
+ .4byte sub_81CB824
+ .4byte sub_81CB888
+ .4byte sub_81CB93C
+ .4byte sub_81CBAD4
+ .4byte sub_81CB9C8
+ .4byte sub_81CBA68
+ .4byte sub_81CBB74
gUnknown_086227D8:: @ 86227D8
.incbin "baserom.gba", 0x6227d8, 0x8
@@ -181,7 +1393,9 @@ gUnknown_086227E0:: @ 86227E0
.incbin "baserom.gba", 0x6227e0, 0x8
gUnknown_086227E8:: @ 86227E8
- .incbin "baserom.gba", 0x6227e8, 0xc
+ .4byte gUnknown_085EC017
+ .4byte gUnknown_085EC01C
+ .4byte gUnknown_085EC022
gUnknown_086227F4:: @ 86227F4
.incbin "baserom.gba", 0x6227f4, 0x14
@@ -193,40 +1407,151 @@ gUnknown_08622810:: @ 8622810
.incbin "baserom.gba", 0x622810, 0x8
gUnknown_08622818:: @ 8622818
- .incbin "baserom.gba", 0x622818, 0x18
+ obj_pal gUnknown_08622698, 12
+ null_obj_pal
+
+gUnknown_08622828:: @ 8622828
+ .2byte 0x8000
+ .2byte 0x0
+ .2byte 0x400
+ .2byte 0x0
gUnknown_08622830:: @ 8622830
- .incbin "baserom.gba", 0x622830, 0x20
+ spr_template 7, 12, gUnknown_08622828, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81CC34C
+
+gUnknown_08622848:: @ 8622848
+ .2byte 0x0
+ .2byte 0xC000
+ .2byte 0x400
+ .2byte 0x0
gUnknown_08622850:: @ 8622850
- .incbin "baserom.gba", 0x622850, 0x18
+ spr_template 8, 13, gUnknown_08622848, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08622868:: @ 8622868
.incbin "baserom.gba", 0x622868, 0x20
gUnknown_08622888:: @ 8622888
- .incbin "baserom.gba", 0x622888, 0x850
+ .incbin "baserom.gba", 0x622888, 0x1F4
+
+gUnknown_08622A7C:: @ 8622A7C
+ .incbin "baserom.gba", 0x622a7c, 0x44
+
+gUnknown_08622AC0:: @ 8622AC0
+ .incbin "baserom.gba", 0x622ac0, 0x48
+
+gUnknown_08622B08:: @ 8622B08
+ .incbin "baserom.gba", 0x622b08, 0x50
+
+gUnknown_08622B58:: @ 8622B58
+ .incbin "baserom.gba", 0x622b58, 0x60
+
+gUnknown_08622BB8:: @ 8622BB8
+ .incbin "baserom.gba", 0x622bb8, 0x4C
+
+gUnknown_08622C04:: @ 8622C04
+ .incbin "baserom.gba", 0x622c04, 0x54
+
+gUnknown_08622C58:: @ 8622C58
+ .incbin "baserom.gba", 0x622c58, 0x54
+
+gUnknown_08622CAC:: @ 8622CAC
+ .incbin "baserom.gba", 0x622cac, 0x40
+
+gUnknown_08622CEC:: @ 8622CEC
+ .incbin "baserom.gba", 0x622cec, 0x58
+
+gUnknown_08622D44:: @ 8622D44
+ .incbin "baserom.gba", 0x622d44, 0x54
+
+gUnknown_08622D98:: @ 8622D98
+ .incbin "baserom.gba", 0x622d98, 0x30
+
+gUnknown_08622DC8:: @ 8622DC8
+ .incbin "baserom.gba", 0x622dc8, 0x4C
+
+gUnknown_08622E14:: @ 8622E14
+ .incbin "baserom.gba", 0x622e14, 0x58
+
+gUnknown_08622E6C:: @ 8622E6C
+ .incbin "baserom.gba", 0x622e6c, 0x30
+
+gUnknown_08622E9C:: @ 8622E9C
+ .incbin "baserom.gba", 0x622e9c, 0x38
+
+gUnknown_08622ED4:: @ 8622ED4
+ .incbin "baserom.gba", 0x622ed4, 0x40
+
+gUnknown_08622F14:: @ 8622F14
+ .incbin "baserom.gba", 0x622f14, 0x48
+
+gUnknown_08622F5C:: @ 8622F5C
+ .incbin "baserom.gba", 0x622f5c, 0x44
+
+gUnknown_08622FA0:: @ 8622FA0
+ .incbin "baserom.gba", 0x622fa0, 0x38
+
+gUnknown_08622FD8:: @ 8622FD8
+ .incbin "baserom.gba", 0x622fd8, 0x48
+
+gUnknown_08623020:: @ 8623020
+ .incbin "baserom.gba", 0x623020, 0x5C
+
+gUnknown_0862307C:: @ 862307C
+ .incbin "baserom.gba", 0x62307c, 0x5C
gUnknown_086230D8:: @ 86230D8
.incbin "baserom.gba", 0x6230d8, 0xc
gUnknown_086230E4:: @ 86230E4
- .incbin "baserom.gba", 0x6230e4, 0x14
+ .4byte NULL
+ .4byte sub_81CC848
+ .4byte sub_81CC878
+ .4byte sub_81CC8D8
+ .4byte sub_81CC95C
gUnknown_086230F8:: @ 86230F8
- .incbin "baserom.gba", 0x6230f8, 0x8
+ obj_tiles gHoennMapZoomIcons_Gfx, 0x800, 6
gUnknown_08623100:: @ 8623100
- .incbin "baserom.gba", 0x623100, 0x10
+ obj_pal gHoennMapZoomIcons_Pal, 11
+ null_obj_pal
gUnknown_08623110:: @ 8623110
.incbin "baserom.gba", 0x623110, 0x8
gUnknown_08623118:: @ 8623118
- .incbin "baserom.gba", 0x623118, 0xb8
+ .4byte 0, gUnknown_08622E6C
+ .4byte 1, gUnknown_08622D98
+ .4byte 2, gUnknown_08622E9C
+ .4byte 3, gUnknown_08622A7C
+ .4byte 4, gUnknown_08622AC0
+ .4byte 5, gUnknown_08622FA0
+ .4byte 6, gUnknown_08622CAC
+ .4byte 7, gUnknown_0862307C
+ .4byte 8, gUnknown_08622B58
+ .4byte 0x10008, gUnknown_08622BB8
+ .4byte 9, gUnknown_08622D44
+ .4byte 0x10009, gUnknown_08622CEC
+ .4byte 0xA, gUnknown_08622C04
+ .4byte 0x1000A, gUnknown_08622C58
+ .4byte 0xB, gUnknown_08622B08
+ .4byte 0xC, gUnknown_08622E14
+ .4byte 0x1000C, gUnknown_08622DC8
+ .4byte 0xD, gUnknown_08623020
+ .4byte 0x1000D, gUnknown_08622FD8
+ .4byte 0xE, gUnknown_08622ED4
+ .4byte 0xF, gUnknown_08622F14
+ .4byte 0x1000F, gUnknown_08622F5C
+
+gUnknown_086231C8:: @ 86231C8
+ .2byte 0x4000
+ .2byte 0x4000
+ .2byte 0x400
+ .2byte 0x0
gUnknown_086231D0:: @ 86231D0
- .incbin "baserom.gba", 0x6231d0, 0x18
+ spr_template 6, 11, gUnknown_086231C8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81CCEF4
gUnknown_086231E8:: @ 86231E8
.incbin "baserom.gba", 0x6231e8, 0x20
@@ -259,13 +1584,22 @@ gUnknown_0862337C:: @ 862337C
.incbin "baserom.gba", 0x62337c, 0x8
gUnknown_08623384:: @ 8623384
- .incbin "baserom.gba", 0x623384, 0x1c
+ .4byte NULL
+ .4byte sub_81CE37C
+ .4byte sub_81CE2D0
+ .4byte sub_81CE4D8
+ .4byte sub_81CE5E4
+ .4byte sub_81CE6BC
+ .4byte sub_81CE700
gUnknown_086233A0:: @ 86233A0
.incbin "baserom.gba", 0x6233a0, 0x14
gUnknown_086233B4:: @ 86233B4
- .incbin "baserom.gba", 0x6233b4, 0x10
+ .4byte sub_81CF134
+ .4byte sub_81CF1C4
+ .4byte sub_81CF1D8
+ .4byte sub_81CF278
gUnknown_086233C4:: @ 86233C4
.incbin "baserom.gba", 0x6233c4, 0x20
@@ -286,7 +1620,13 @@ gUnknown_08623594:: @ 8623594
.incbin "baserom.gba", 0x623594, 0x4
gUnknown_08623598:: @ 8623598
- .incbin "baserom.gba", 0x623598, 0x1c
+ .4byte NULL
+ .4byte sub_81CF578
+ .4byte sub_81CF5F0
+ .4byte sub_81CF668
+ .4byte sub_81CF6E0
+ .4byte sub_81CF758
+ .4byte sub_81CF798
gUnknown_086235B4:: @ 86235B4
.incbin "baserom.gba", 0x6235b4, 0x8
@@ -301,7 +1641,9 @@ gUnknown_086235D4:: @ 86235D4
.incbin "baserom.gba", 0x6235d4, 0x4
gUnknown_086235D8:: @ 86235D8
- .incbin "baserom.gba", 0x6235d8, 0xc
+ .4byte sub_81CFB8C
+ .4byte sub_81CFC2C
+ .4byte sub_81CFC40
gUnknown_086235E4:: @ 86235E4
.incbin "baserom.gba", 0x6235e4, 0x20
@@ -322,7 +1664,13 @@ gUnknown_086237B4:: @ 86237B4
.incbin "baserom.gba", 0x6237b4, 0x4
gUnknown_086237B8:: @ 86237B8
- .incbin "baserom.gba", 0x6237b8, 0x1c
+ .4byte NULL
+ .4byte sub_81CFFFC
+ .4byte sub_81D0074
+ .4byte sub_81D00EC
+ .4byte sub_81D0164
+ .4byte sub_81D01DC
+ .4byte sub_81D021C
gUnknown_086237D4:: @ 86237D4
.incbin "baserom.gba", 0x6237d4, 0x8
@@ -346,19 +1694,39 @@ gUnknown_086237F8:: @ 86237F8
.include "data/text/gift_ribbon_descriptions.inc"
gUnknown_08623FF8:: @ 8623FF8
- .incbin "baserom.gba", 0x623ff8, 0xa0
+ .incbin "baserom.gba", 0x623ff8, 0x20
+
+gUnknown_08624018:: @ 8624018
+ .incbin "baserom.gba", 0x624018, 0x20
+
+gUnknown_08624038:: @ 8624038
+ .incbin "baserom.gba", 0x624038, 0x20
+
+gUnknown_08624058:: @ 8624058
+ .incbin "baserom.gba", 0x624058, 0x20
+
+gUnknown_08624078:: @ 8624078
+ .incbin "baserom.gba", 0x624078, 0x20
gUnknown_08624098:: @ 8624098
- .incbin "baserom.gba", 0x624098, 0x20
+ .incbin "baserom.gba", 0x624098, 0x20
gUnknown_086240B8:: @ 86240B8
- .incbin "baserom.gba", 0x6240b8, 0xae0
+ .incbin "baserom.gba", 0x6240b8, 0x1C8
+
+gUnknown_08624280:: @ 8624280
+ .incbin "baserom.gba", 0x624280, 0x918
gUnknown_08624B98:: @ 8624B98
.incbin "baserom.gba", 0x624b98, 0x8
gUnknown_08624BA0:: @ 8624BA0
- .incbin "baserom.gba", 0x624ba0, 0x18
+ .4byte NULL
+ .4byte sub_81D0C84
+ .4byte sub_81D0D2C
+ .4byte sub_81D0D8C
+ .4byte sub_81D0E00
+ .4byte sub_81D0C54
gUnknown_08624BB8:: @ 8624BB8
.incbin "baserom.gba", 0x624bb8, 0x8
@@ -385,37 +1753,156 @@ gUnknown_08624BF8:: @ 8624BF8
.incbin "baserom.gba", 0x624bf8, 0x80
gUnknown_08624C78:: @ 8624C78
- .incbin "baserom.gba", 0x624c78, 0x8
+ obj_tiles gUnknown_08624280, 0x1800, 9
gUnknown_08624C80:: @ 8624C80
- .incbin "baserom.gba", 0x624c80, 0x84
+ obj_pal gUnknown_08623FF8, 15
+ obj_pal gUnknown_08624018, 16
+ obj_pal gUnknown_08624038, 17
+ obj_pal gUnknown_08624058, 18
+ obj_pal gUnknown_08624078, 19
+ null_obj_pal
+
+gUnknown_08624CB0:: @ 8624CB0
+ .incbin "baserom.gba", 0x624cb0, 0x54
gUnknown_08624D04:: @ 8624D04
- .incbin "baserom.gba", 0x624d04, 0x5a4
+ .incbin "baserom.gba", 0x624d04, 0x78
+
+gUnknown_08624D7C:: @ 8624D7C
+ .incbin "baserom.gba", 0x624d7c, 0x60
+
+gUnknown_08624DDC:: @ 8624DDC
+ .incbin "baserom.gba", 0x624ddc, 0x14
+
+gUnknown_08624DF0:: @ 8624DF0
+ .incbin "baserom.gba", 0x624df0, 0x2C
+
+gUnknown_08624E1C:: @ 8624E1C
+ .incbin "baserom.gba", 0x624e1c, 0x50
+
+gUnknown_08624E6C:: @ 8624E6C
+ .incbin "baserom.gba", 0x624e6c, 0x90
+
+gUnknown_08624EFC:: @ 8624EFC
+ .incbin "baserom.gba", 0x624efc, 0x90
+
+gUnknown_08624F8C:: @ 8624F8C
+ .incbin "baserom.gba", 0x624f8c, 0x60
+
+gUnknown_08624FEC:: @ 8624FEC
+ .incbin "baserom.gba", 0x624fec, 0x54
+
+gUnknown_08625040:: @ 8625040
+ .incbin "baserom.gba", 0x625040, 0x38
+
+gUnknown_08625078:: @ 8625078
+ .incbin "baserom.gba", 0x625078, 0x3C
+
+gUnknown_086250B4:: @ 86250B4
+ .incbin "baserom.gba", 0x6250b4, 0x3C
+
+gUnknown_086250F0:: @ 86250F0
+ .incbin "baserom.gba", 0x6250f0, 0x3C
+
+gUnknown_0862512C:: @ 862512C
+ .incbin "baserom.gba", 0x62512c, 0x3C
+
+gUnknown_08625168:: @ 8625168
+ .incbin "baserom.gba", 0x625168, 0x3C
+
+gUnknown_086251A4:: @ 86251A4
+ .incbin "baserom.gba", 0x6251a4, 0x3C
+
+gUnknown_086251E0:: @ 86251E0
+ .incbin "baserom.gba", 0x6251e0, 0x24
+
+gUnknown_08625204:: @ 8625204
+ .incbin "baserom.gba", 0x625204, 0x24
+
+gUnknown_08625228:: @ 8625228
+ .incbin "baserom.gba", 0x625228, 0x24
+
+gUnknown_0862524C:: @ 862524C
+ .incbin "baserom.gba", 0x62524c, 0x24
+
+gUnknown_08625270:: @ 8625270
+ .incbin "baserom.gba", 0x625270, 0x24
+
+gUnknown_08625294:: @ 8625294
+ .incbin "baserom.gba", 0x625294, 0x14
gUnknown_086252A8:: @ 86252A8
- .incbin "baserom.gba", 0x6252a8, 0x54
+ .4byte gUnknown_08624D7C
+ .4byte gUnknown_08624DF0
+ .4byte gUnknown_08624F8C
+ .4byte gUnknown_08624EFC
+ .4byte gUnknown_08624FEC
+ .4byte gUnknown_08624DDC
+ .4byte gUnknown_08624E1C
+ .4byte gUnknown_08624E6C
+ .4byte gUnknown_08625040
+ .4byte gUnknown_08625078
+ .4byte gUnknown_086250B4
+ .4byte gUnknown_086250F0
+ .4byte gUnknown_0862512C
+ .4byte gUnknown_08625168
+ .4byte gUnknown_086251A4
+ .4byte gUnknown_086251E0
+ .4byte gUnknown_08625204
+ .4byte gUnknown_08625228
+ .4byte gUnknown_0862524C
+ .4byte gUnknown_08625270
+ .4byte gUnknown_08625294
gUnknown_086252FC:: @ 86252FC
- .incbin "baserom.gba", 0x6252fc, 0x14
+ .4byte sub_81D1628
+ .4byte sub_81D164C
+ .4byte sub_81D1670
+ .4byte sub_81D1694
+ .4byte sub_81D16CC
gUnknown_08625310:: @ 8625310
- .incbin "baserom.gba", 0x625310, 0x14
+ .4byte sub_81D1714
+ .4byte sub_81D1718
+ .4byte sub_81D171C
+ .4byte sub_81D1750
+ .4byte sub_81D1754
gUnknown_08625324:: @ 8625324
- .incbin "baserom.gba", 0x625324, 0x14
+ .4byte sub_81D178C
+ .4byte sub_81D1790
+ .4byte sub_81D17C0
+ .4byte sub_81D17E0
+ .4byte sub_81D17E4
gUnknown_08625338:: @ 8625338
- .incbin "baserom.gba", 0x625338, 0x14
+ .4byte sub_81D1840
+ .4byte sub_81D1844
+ .4byte sub_81D1848
+ .4byte sub_81D184C
+ .4byte sub_81D1850
gUnknown_0862534C:: @ 862534C
- .incbin "baserom.gba", 0x62534c, 0x14
+ .4byte sub_81D1888
+ .4byte sub_81D188C
+ .4byte sub_81D1890
+ .4byte sub_81D1894
+ .4byte sub_81D1898
gUnknown_08625360:: @ 8625360
- .incbin "baserom.gba", 0x625360, 0x14
+ .4byte sub_81D18D0
+ .4byte sub_81D18DC
+ .4byte sub_81D18FC
+ .4byte sub_81D1908
+ .4byte sub_81D1914
gUnknown_08625374:: @ 8625374
- .incbin "baserom.gba", 0x625374, 0x14
+ .4byte sub_81D1AB0
+ .4byte sub_81D1ABC
+ .4byte sub_81D1ADC
+ .4byte sub_81D1AF4
+ .4byte sub_81D1B00
gUnknown_08625388:: @ 8625388
.incbin "baserom.gba", 0x625388, 0x60
@@ -475,7 +1962,12 @@ gUnknown_08625B2C:: @ 8625B2C
.incbin "baserom.gba", 0x625b2c, 0x28
gUnknown_08625B54:: @ 8625B54
- .incbin "baserom.gba", 0x625b54, 0x18
+ .4byte gUnknown_085EEA46
+ .4byte gUnknown_085EEA4E
+ .4byte gUnknown_085EEA55
+ .4byte gUnknown_085EEA63
+ .4byte gUnknown_085EEA6B
+ .4byte gUnknown_085EEA5D
gUnknown_08625B6C:: @ 8625B6C
.incbin "baserom.gba", 0x625b6c, 0x520
@@ -502,10 +1994,30 @@ gUnknown_0862A5F8:: @ 862A5F8
.incbin "baserom.gba", 0x62a5f8, 0x20
gUnknown_0862A618:: @ 862A618
- .incbin "baserom.gba", 0x62a618, 0x48
+ .4byte sub_81D581C
+ .4byte sub_81D58D8
+ .4byte sub_81D5924
+ .4byte sub_81D59D0
+ .4byte sub_81D5A70
+ .4byte sub_81D5AB4
+ .4byte sub_81D5AD0
+ .4byte sub_81D5B2C
+ .4byte sub_81D5BBC
+ .4byte sub_81D5C00
+ .4byte sub_81D5C5C
+ .4byte sub_81D62B4
+ .4byte sub_81D64AC
+ .4byte sub_81D64DC
+ .4byte sub_81D64FC
+ .4byte sub_81D6518
+ .4byte sub_81D6568
+ .4byte sub_81D65A0
gUnknown_0862A660:: @ 862A660
- .incbin "baserom.gba", 0x62a660, 0x10
+ .4byte gUnknown_085EB32D
+ .4byte gUnknown_085EB33E
+ .4byte gUnknown_085EB350
+ .4byte gUnknown_085EB361
gUnknown_0862A670:: @ 862A670
.incbin "baserom.gba", 0x62a670, 0x18
diff --git a/data/rayquaza_scene.s b/data/rayquaza_scene.s
deleted file mode 100644
index 51a285285..000000000
--- a/data/rayquaza_scene.s
+++ /dev/null
@@ -1,160 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
-gUnknown_0862A6A0:: @ 862A6A0
- .incbin "baserom.gba", 0x62a6a0, 0x8c
-
-gUnknown_0862A72C:: @ 862A72C
- .incbin "baserom.gba", 0x62a72c, 0x24
-
-gUnknown_0862A750:: @ 862A750
- .incbin "baserom.gba", 0x62a750, 0x24
-
-gUnknown_0862A774:: @ 862A774
- .incbin "baserom.gba", 0x62a774, 0xa8
-
-gUnknown_0862A81C:: @ 862A81C
- .incbin "baserom.gba", 0x62a81c, 0x30
-
-gUnknown_0862A84C:: @ 862A84C
- .incbin "baserom.gba", 0x62a84c, 0x18
-
-gUnknown_0862A864:: @ 862A864
- .incbin "baserom.gba", 0x62a864, 0x18
-
-gUnknown_0862A87C:: @ 862A87C
- .incbin "baserom.gba", 0x62a87c, 0xc
-
-gUnknown_0862A888:: @ 862A888
- .incbin "baserom.gba", 0x62a888, 0x3c
-
-gUnknown_0862A8C4:: @ 862A8C4
- .incbin "baserom.gba", 0x62a8c4, 0x8
-
-gUnknown_0862A8CC:: @ 862A8CC
- .incbin "baserom.gba", 0x62a8cc, 0x8
-
-gUnknown_0862A8D4:: @ 862A8D4
- .incbin "baserom.gba", 0x62a8d4, 0x24
-
-gUnknown_0862A8F8:: @ 862A8F8
- .incbin "baserom.gba", 0x62a8f8, 0x8
-
-gUnknown_0862A900:: @ 862A900
- .incbin "baserom.gba", 0x62a900, 0x24
-
-gUnknown_0862A924:: @ 862A924
- .incbin "baserom.gba", 0x62a924, 0x8
-
-gUnknown_0862A92C:: @ 862A92C
- .incbin "baserom.gba", 0x62a92c, 0xa8
-
-gUnknown_0862A9D4:: @ 862A9D4
- .incbin "baserom.gba", 0x62a9d4, 0x8
-
-gUnknown_0862A9DC:: @ 862A9DC
- .incbin "baserom.gba", 0x62a9dc, 0x8
-
-gUnknown_0862A9E4:: @ 862A9E4
- .incbin "baserom.gba", 0x62a9e4, 0x30
-
-gUnknown_0862AA14:: @ 862AA14
- .incbin "baserom.gba", 0x62aa14, 0x8
-
-gUnknown_0862AA1C:: @ 862AA1C
- .incbin "baserom.gba", 0x62aa1c, 0x18
-
-gUnknown_0862AA34:: @ 862AA34
- .incbin "baserom.gba", 0x62aa34, 0x8
-
-gUnknown_0862AA3C:: @ 862AA3C
- .incbin "baserom.gba", 0x62aa3c, 0x18
-
-gUnknown_0862AA54:: @ 862AA54
- .incbin "baserom.gba", 0x62aa54, 0x3c
-
-gUnknown_0862AA90:: @ 862AA90
- .incbin "baserom.gba", 0x62aa90, 0x8
-
-gUnknown_0862AA98:: @ 862AA98
- .incbin "baserom.gba", 0x62aa98, 0x8
-
-gUnknown_0862AAA0:: @ 862AAA0
- .incbin "baserom.gba", 0x62aaa0, 0x18
-
-gUnknown_0862AAB8:: @ 862AAB8
- .incbin "baserom.gba", 0x62aab8, 0x14
-
-gUnknown_0862AACC:: @ 862AACC
- .incbin "baserom.gba", 0x62aacc, 0x30
-
-gUnknown_0862AAFC:: @ 862AAFC
- .incbin "baserom.gba", 0x62aafc, 0x8
-
-gUnknown_0862AB04:: @ 862AB04
- .incbin "baserom.gba", 0x62ab04, 0x8
-
-gUnknown_0862AB0C:: @ 862AB0C
- .incbin "baserom.gba", 0x62ab0c, 0x8
-
-gUnknown_0862AB14:: @ 862AB14
- .incbin "baserom.gba", 0x62ab14, 0x18
-
-gUnknown_0862AB2C:: @ 862AB2C
- .incbin "baserom.gba", 0x62ab2c, 0x18
-
-gUnknown_0862AB44:: @ 862AB44
- .incbin "baserom.gba", 0x62ab44, 0xe4
-
-gUnknown_0862AC28:: @ 862AC28
- .incbin "baserom.gba", 0x62ac28, 0x8
-
-gUnknown_0862AC30:: @ 862AC30
- .incbin "baserom.gba", 0x62ac30, 0x8
-
-gUnknown_0862AC38:: @ 862AC38
- .incbin "baserom.gba", 0x62ac38, 0x8
-
-gUnknown_0862AC40:: @ 862AC40
- .incbin "baserom.gba", 0x62ac40, 0x8
-
-gUnknown_0862AC48:: @ 862AC48
- .incbin "baserom.gba", 0x62ac48, 0x8
-
-gUnknown_0862AC50:: @ 862AC50
- .incbin "baserom.gba", 0x62ac50, 0x8
-
-gUnknown_0862AC58:: @ 862AC58
- .incbin "baserom.gba", 0x62ac58, 0x8
-
-gUnknown_0862AC60:: @ 862AC60
- .incbin "baserom.gba", 0x62ac60, 0x8
-
-gUnknown_0862AC68:: @ 862AC68
- .incbin "baserom.gba", 0x62ac68, 0x8
-
-gUnknown_0862AC70:: @ 862AC70
- .incbin "baserom.gba", 0x62ac70, 0x8
-
-gUnknown_0862AC78:: @ 862AC78
- .incbin "baserom.gba", 0x62ac78, 0x18
-
-gUnknown_0862AC90:: @ 862AC90
- .incbin "baserom.gba", 0x62ac90, 0x18
-
-gUnknown_0862ACA8:: @ 862ACA8
- .incbin "baserom.gba", 0x62aca8, 0x18
-
-gUnknown_0862ACC0:: @ 862ACC0
- .incbin "baserom.gba", 0x62acc0, 0x18
-
-gUnknown_0862ACD8:: @ 862ACD8
- .incbin "baserom.gba", 0x62acd8, 0x18
-
-gUnknown_0862ACF0:: @ 862ACF0
- .incbin "baserom.gba", 0x62acf0, 0x18
-
-gUnknown_0862AD08:: @ 862AD08
- .incbin "baserom.gba", 0x62ad08, 0xc
diff --git a/data/record_mixing.s b/data/record_mixing.s
index 6531633a5..0ef0a776a 100644
--- a/data/record_mixing.s
+++ b/data/record_mixing.s
@@ -2,7 +2,7 @@
.include "constants/constants.inc"
.section .rodata
- .align 2, 0
+ .align 2, 0
gUnknown_0858CF8C:: @ 858CF8C
.incbin "baserom.gba", 0x58cf8c, 0x2
diff --git a/data/reset_rtc_screen.s b/data/reset_rtc_screen.s
index f680a87bc..37c532497 100644
--- a/data/reset_rtc_screen.s
+++ b/data/reset_rtc_screen.s
@@ -1,8 +1,8 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
- .section .rodata
- .align 2, 0
+ .section .rodata
+ .align 2, 0
gUnknown_08510404:: @ 8510404 struct BgTemplate
.4byte 0x000001f0
diff --git a/data/rom_8525F58.s b/data/rom_8525F58.s
index 808300deb..d95af7e20 100644
--- a/data/rom_8525F58.s
+++ b/data/rom_8525F58.s
@@ -1,34 +1,34 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
- .section .rodata
+ .section .rodata
- .align 2
+ .align 2
gUnknown_08525F58:: @ 8525F58
.byte 0x48, 0x50, 0x00, 0x00, 0xb0, 0x28, 0x00, 0x00
.byte 0x30, 0x28, 0x00, 0x00, 0x70, 0x50, 0x00, 0x00
.byte 0x20, 0x50, 0x00, 0x00, 0xc8, 0x28, 0x00, 0x00
.byte 0x5a, 0x58, 0x00, 0x00, 0x98, 0x20, 0x00, 0x00
- .align 2
+ .align 2
gCastformFrontSpriteCoords:: @ 8525F78
.byte 0x44, 0x11, 0x00, 0x00, 0x66, 0x09, 0x00, 0x00
.byte 0x46, 0x09, 0x00, 0x00, 0x86, 0x08, 0x00, 0x00
- .align 2
+ .align 2
gUnknown_08525F88:: @ 8525F88
.byte 0x0d, 0x0e, 0x0d, 0x0d
- .align 2
+ .align 2
gUnknown_08525F8C:: @ 8525F8C
.byte 0x00, 0x00, 0x00, 0x00
- .align 2
+ .align 2
gUnknown_08525F90:: @ 8525F90
spr_template 0xd755, 0xd755, gUnknown_0852497C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
spr_template 0xd756, 0xd756, gUnknown_0852497C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
- .align 2
+ .align 2
gUnknown_08525FC0:: @ 8525FC0
obj_tiles gMiscBlank_Gfx, 0x0800, 0xd755
obj_tiles gMiscBlank_Gfx, 0x0800, 0xd756
diff --git a/data/save.s b/data/save.s
index 15e201baa..23a8d3928 100644
--- a/data/save.s
+++ b/data/save.s
@@ -4,17 +4,17 @@
.section .rodata
gSaveSectionOffsets:: @ 85CDC00
- .2byte 0, 0xF2C
- .2byte 0, 0xF80
- .2byte 0xF80, 0xF80
- .2byte 0x1F00, 0xF80
- .2byte 0x2E80, 0xF08
- .2byte 0, 0xF80
- .2byte 0xF80, 0xF80
- .2byte 0x1F00, 0xF80
- .2byte 0x2E80, 0xF80
- .2byte 0x3E00, 0xF80
- .2byte 0x4D80, 0xF80
- .2byte 0x5D00, 0xF80
- .2byte 0x6C80, 0xF80
- .2byte 0x7C00, 0x7D0
+ .2byte 0, 0xF2C
+ .2byte 0, 0xF80
+ .2byte 0xF80, 0xF80
+ .2byte 0x1F00, 0xF80
+ .2byte 0x2E80, 0xF08
+ .2byte 0, 0xF80
+ .2byte 0xF80, 0xF80
+ .2byte 0x1F00, 0xF80
+ .2byte 0x2E80, 0xF80
+ .2byte 0x3E00, 0xF80
+ .2byte 0x4D80, 0xF80
+ .2byte 0x5D00, 0xF80
+ .2byte 0x6C80, 0xF80
+ .2byte 0x7C00, 0x7D0
diff --git a/data/script_menu.s b/data/script_menu.s
index 8dd58262c..6cd7bf381 100644
--- a/data/script_menu.s
+++ b/data/script_menu.s
@@ -728,7 +728,7 @@ gUnknown_0858BAF0:: @ 858BAF0
gUnknown_0858BB68:: @ 858BB68
.byte 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F
- .align 2
+ .align 2
gUnknown_0858BB70:: @ 858BB70
.4byte gText_SomeonesPC
.4byte gText_LanettesPC
diff --git a/data/script_pokemon_util_80F87D8.s b/data/script_pokemon_util_80F87D8.s
index beda525c8..dcf9edeea 100644
--- a/data/script_pokemon_util_80F87D8.s
+++ b/data/script_pokemon_util_80F87D8.s
@@ -2,6 +2,6 @@
.include "constants/constants.inc"
.section .rodata
- .align 2, 0
+ .align 2, 0
gUnknown_0858D8EC:: @ 858D8EC
- .incbin "baserom.gba", 0x58d8ec, 0x4
+ .byte 3, 4, 5, 14
diff --git a/data/slot_machine.s b/data/slot_machine.s
index 08989ccdc..df1f71be9 100644
--- a/data/slot_machine.s
+++ b/data/slot_machine.s
@@ -241,8 +241,28 @@ gUnknown_085A8264:: @ 85A8264
gUnknown_085A82CC:: @ 85A82CC
.incbin "baserom.gba", 0x5a82cc, 0x68
+ .align 2
gUnknown_085A8334:: @ 85A8334
- .incbin "baserom.gba", 0x5a8334, 0xb0
+ obj_tiles gSlotMachineReelSymbol1Tiles, 0x0200, 0x0000
+ obj_tiles gSlotMachineReelSymbol2Tiles, 0x0200, 0x0001
+ obj_tiles gSlotMachineReelSymbol3Tiles, 0x0200, 0x0002
+ obj_tiles gSlotMachineReelSymbol4Tiles, 0x0200, 0x0003
+ obj_tiles gSlotMachineReelSymbol5Tiles, 0x0200, 0x0004
+ obj_tiles gSlotMachineReelSymbol6Tiles, 0x0200, 0x0005
+ obj_tiles gSlotMachineReelSymbol7Tiles, 0x0200, 0x0006
+ obj_tiles gSlotMachineNumber0Tiles, 0x0040, 0x0007
+ obj_tiles gSlotMachineNumber1Tiles, 0x0040, 0x0008
+ obj_tiles gSlotMachineNumber2Tiles, 0x0040, 0x0009
+ obj_tiles gSlotMachineNumber3Tiles, 0x0040, 0x000A
+ obj_tiles gSlotMachineNumber4Tiles, 0x0040, 0x000B
+ obj_tiles gSlotMachineNumber5Tiles, 0x0040, 0x000C
+ obj_tiles gSlotMachineNumber6Tiles, 0x0040, 0x000D
+ obj_tiles gSlotMachineNumber7Tiles, 0x0040, 0x000E
+ obj_tiles gSlotMachineNumber8Tiles, 0x0040, 0x000F
+ obj_tiles gSlotMachineNumber9Tiles, 0x0040, 0x0010
+
+ .align 2
+ .incbin "baserom.gba", 0x5a83bc, 0x28
gUnknown_085A83E4:: @ 85A83E4
.incbin "baserom.gba", 0x5a83e4, 0x24
@@ -277,8 +297,17 @@ gUnknown_085A8520:: @ 85A8520
gUnknown_085A8524:: @ 85A8524
.incbin "baserom.gba", 0x5a8524, 0x20
+ .align 2
gUnknown_085A8544:: @ 85A8544
- .incbin "baserom.gba", 0x5a8544, 0x48
+ obj_pal gUnknown_08DCF170, 0
+ obj_pal gUnknown_08DCF190, 1
+ obj_pal gUnknown_08DCF1B0, 2
+ obj_pal gSlotMachineReelTime_Pal, 3
+ obj_pal gUnknown_08DCF1F0, 4
+ obj_pal gUnknown_08DCF210, 5
+ obj_pal gUnknown_08DCF230, 6
+ obj_pal gUnknown_08DCF1F0, 7
+ null_obj_pal
gUnknown_085A858C:: @ 85A858C
.incbin "baserom.gba", 0x5a858c, 0x1154
diff --git a/data/smokescreen.s b/data/smokescreen.s
index d92c972df..aeb8e685b 100644
--- a/data/smokescreen.s
+++ b/data/smokescreen.s
@@ -14,11 +14,11 @@ gUnknown_0831C604:: @ 831C604
.align 2
gUnknown_0831C620:: @ 831C620
- obj_tiles gUnknown_08C01644, 0x0180, 0xd6eb
+ obj_tiles gSmokescreenImpactTiles, 0x0180, 0xd6eb
.align 2
gUnknown_0831C628:: @ 831C628
- obj_pal gUnknown_08C01724, 0xd6eb
+ obj_pal gSmokescreenImpactPalette, 0xd6eb
.align 2
gUnknown_0831C630:: @ 831C630
@@ -53,7 +53,7 @@ gUnknown_0831C688:: @ 831C688
.align 2
gSpriteSheet_EnemyShadow:: @ 831C6A0
- obj_tiles gUnknown_08D8FBC0, 0x0080, 0xd759
+ obj_tiles gEnemyMonShadow_Gfx, 0x0080, 0xd759
.align 2
gUnknown_0831C6A8:: @ 831C6A8
diff --git a/data/specials.inc b/data/specials.inc
index 578668fce..f0c1fa114 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -1,11 +1,11 @@
.macro def_special ptr
.set SPECIAL_\ptr, __special__
.set __special__, __special__ + 1
- .4byte \ptr
- .endm
+ .4byte \ptr
+ .endm
.set __special__, 0
- .align 2
+ .align 2
gSpecials:: @ 81DBA64
def_special HealPlayerParty
def_special sub_809D2BC
@@ -163,7 +163,7 @@ gSpecials:: @ 81DBA64
def_special SetFlagInVar
def_special CableCarWarp
def_special sub_814FC9C
- def_special sub_8085784
+ def_special Overworld_PlaySpecialMapMusic
def_special StartWallClock
def_special Special_ViewWallClock
def_special ChooseStarter
diff --git a/data/start_menu.s b/data/start_menu.s
deleted file mode 100644
index 07e428d0d..000000000
--- a/data/start_menu.s
+++ /dev/null
@@ -1,29 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
- .align 2, 0
-
-gSafariBallsWindowTemplate:: @ 8510508
- .incbin "baserom.gba", 0x510508, 0x8
-
-gUnknown_08510510:: @ 8510510
- .incbin "baserom.gba", 0x510510, 0x20
-
-gPyramidFloorWindowTemplate_2:: @ 8510530
- .incbin "baserom.gba", 0x510530, 0x8
-
-gPyramidFloorWindowTemplate_1:: @ 8510538
- .incbin "baserom.gba", 0x510538, 0x8
-
-sStartMenuItems:: @ 8510540
- .incbin "baserom.gba", 0x510540, 0x68
-
-gUnknown_085105A8:: @ 85105A8
- .incbin "baserom.gba", 0x5105a8, 0x4
-
-gUnknown_085105AC:: @ 85105AC
- .incbin "baserom.gba", 0x5105ac, 0x10
-
-gUnknown_085105BC:: @ 85105BC
- .incbin "baserom.gba", 0x5105bc, 0x8
diff --git a/data/starter_choose.s b/data/starter_choose.s
index 06bb8a356..160046d4c 100644
--- a/data/starter_choose.s
+++ b/data/starter_choose.s
@@ -1,7 +1,6 @@
-@ the fourth big chunk of data
-
.include "asm/macros.inc"
.include "constants/constants.inc"
+ .include "include/constants/species.h"
.section .rodata
@@ -36,8 +35,11 @@ gStarterChoose_LabelCoords:: @ 85B1DF2
.incbin "baserom.gba", 0x5b1df2, 0x6
sStarterMon:: @ 85B1DF8
- .incbin "baserom.gba", 0x5b1df8, 0x8
+ .2byte SPECIES_TREECKO
+ .2byte SPECIES_TORCHIC
+ .2byte SPECIES_MUDKIP
+.align 2
gUnknown_085B1E00:: @ 85B1E00
.incbin "baserom.gba", 0x5b1e00, 0xc
diff --git a/data/strings.s b/data/strings.s
index 82c5520e6..e3db2f0b0 100644
--- a/data/strings.s
+++ b/data/strings.s
@@ -2705,34 +2705,34 @@ gUnknown_085EBB4F:: @ 85EBB4F
gUnknown_085EBB56:: @ 85EBB56
.string "What would you like to do?$"
-gUnknown_085EBB71:: @ 85EBB71
+gText_WithdrawPokemon:: @ 85EBB71
.string "WITHDRAW POKéMON$"
-gUnknown_085EBB82:: @ 85EBB82
+gText_DepositPokemon:: @ 85EBB82
.string "DEPOSIT POKéMON$"
-gUnknown_085EBB92:: @ 85EBB92
+gText_MovePokemon:: @ 85EBB92
.string "MOVE POKéMON$"
-gUnknown_085EBB9F:: @ 85EBB9F
+gText_MoveItems:: @ 85EBB9F
.string "MOVE ITEMS$"
-gUnknown_085EBBAA:: @ 85EBBAA
+gText_SeeYa:: @ 85EBBAA
.string "SEE YA!$"
-gUnknown_085EBBB2:: @ 85EBBB2
+gText_WithdrawMonDescription:: @ 85EBBB2
.string "Move POKéMON stored in BOXES to\nyour party.$"
-gUnknown_085EBBDE:: @ 85EBBDE
+gText_DepositMonDescription:: @ 85EBBDE
.string "Store POKéMON in your party in BOXES.$"
-gUnknown_085EBC04:: @ 85EBC04
+gText_MoveMonDescription:: @ 85EBC04
.string "Organize the POKéMON in BOXES and\nin your party.$"
-gUnknown_085EBC35:: @ 85EBC35
+gText_MoveItemsDescription:: @ 85EBC35
.string "Move items held by any POKéMON\nin a BOX or your party.$"
-gUnknown_085EBC6C:: @ 85EBC6C
+gText_SeeYaDescription:: @ 85EBC6C
.string "Return to the previous menu.$"
gText_JustOnePkmn:: @ 85EBC89
@@ -3521,10 +3521,10 @@ gText_Var1sTrainerCard:: @ 85ECFA6
gText_HallOfFameDebut:: @ 85ECFB8
.string "HALL OF FAME DEBUT $"
-gUnknown_085ECFCD:: @ 85ECFCD
+gText_LinkBattles:: @ 85ECFCD
.string "LINK BATTLES$"
-gUnknown_085ECFDA:: @ 85ECFDA
+gText_LinkCableBattles:: @ 85ECFDA
.string "LINK CABLE BATTLES$"
gText_WinsLosses:: @ 85ECFED
@@ -4488,34 +4488,34 @@ gUnknown_085EE6AD:: @ 85EE6AD
gUnknown_085EE6B6:: @ 85EE6B6
.string "Updated time$"
-gUnknown_085EE6C3:: @ 85EE6C3
+gText_MenuPokedex:: @ 85EE6C3
.string "POKéDEX$"
-gUnknown_085EE6CB:: @ 85EE6CB
+gText_MenuPokemon:: @ 85EE6CB
.string "POKéMON$"
-gUnknown_085EE6D3:: @ 85EE6D3
+gText_MenuBag:: @ 85EE6D3
.string "BAG$"
-gUnknown_085EE6D7:: @ 85EE6D7
+gText_MenuPokenav:: @ 85EE6D7
.string "POKéNAV$"
-gUnknown_085EE6DF:: @ 85EE6DF
+gText_MenuPlayer:: @ 85EE6DF
.string "{PLAYER}$"
-gUnknown_085EE6E2:: @ 85EE6E2
+gText_MenuSave:: @ 85EE6E2
.string "SAVE$"
-gUnknown_085EE6E7:: @ 85EE6E7
+gText_MenuOption:: @ 85EE6E7
.string "OPTION$"
-gUnknown_085EE6EE:: @ 85EE6EE
+gText_MenuExit:: @ 85EE6EE
.string "EXIT$"
-gUnknown_085EE6F3:: @ 85EE6F3
+gText_MenuRetire:: @ 85EE6F3
.string "RETIRE$"
-gUnknown_085EE6FA:: @ 85EE6FA
+gText_MenuRest:: @ 85EE6FA
.string "REST$"
gText_SafariBallStock:: @ 85EE6FF
@@ -4524,28 +4524,28 @@ gText_SafariBallStock:: @ 85EE6FF
gText_BattlePyramidFloor:: @ 85EE716
.string "Battle Pyramid\n{STR_VAR_1}$"
-gUnknown_085EE728:: @ 85EE728
+gText_Floor1:: @ 85EE728
.string "Floor 1$"
-gUnknown_085EE730:: @ 85EE730
+gText_Floor2:: @ 85EE730
.string "Floor 2$"
-gUnknown_085EE738:: @ 85EE738
+gText_Floor3:: @ 85EE738
.string "Floor 3$"
-gUnknown_085EE740:: @ 85EE740
+gText_Floor4:: @ 85EE740
.string "Floor 4$"
-gUnknown_085EE748:: @ 85EE748
+gText_Floor5:: @ 85EE748
.string "Floor 5$"
-gUnknown_085EE750:: @ 85EE750
+gText_Floor6:: @ 85EE750
.string "Floor 6$"
-gUnknown_085EE758:: @ 85EE758
+gText_Floor7:: @ 85EE758
.string "Floor 7$"
-gUnknown_085EE760:: @ 85EE760
+gText_Peak:: @ 85EE760
.string "Peak$"
gText_LinkStandby2:: @ 85EE765
@@ -5393,4 +5393,3 @@ gText_Berry:: @ 85EFCDF
gText_Berries:: @ 85EFCE5
.string "BERRIES$"
-
diff --git a/data/text_window.s b/data/text_window.s
index a7389572b..716425100 100644
--- a/data/text_window.s
+++ b/data/text_window.s
@@ -1,17 +1,170 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
- .section .rodata
- .align 2, 0
+ .section .rodata
+ .align 2, 0
gUnknown_0850E87C:: @ 850E87C
- .incbin "baserom.gba", 0x50e87c, 0x1680
+ .incbin "baserom.gba", 0x50e87c, 0x120
+
+gUnknown_0850E99C:: @ 850E99C
+ .incbin "baserom.gba", 0x50e99c, 0x120
+
+gUnknown_0850EABC:: @ 850EABC
+ .incbin "baserom.gba", 0x50eabc, 0x120
+
+gUnknown_0850EBDC:: @ 850EBDC
+ .incbin "baserom.gba", 0x50ebdc, 0x120
+
+gUnknown_0850ECFC:: @ 850ECFC
+ .incbin "baserom.gba", 0x50ecfc, 0x120
+
+gUnknown_0850EE1C:: @ 850EE1C
+ .incbin "baserom.gba", 0x50ee1c, 0x120
+
+gUnknown_0850EF3C:: @ 850EF3C
+ .incbin "baserom.gba", 0x50ef3c, 0x120
+
+gUnknown_0850F05C:: @ 850F05C
+ .incbin "baserom.gba", 0x50f05c, 0x120
+
+gUnknown_0850F17C:: @ 850F17C
+ .incbin "baserom.gba", 0x50f17c, 0x120
+
+gUnknown_0850F29C:: @ 850F29C
+ .incbin "baserom.gba", 0x50f29c, 0x120
+
+gUnknown_0850F3BC:: @ 850F3BC
+ .incbin "baserom.gba", 0x50f3bc, 0x120
+
+gUnknown_0850F4DC:: @ 850F4DC
+ .incbin "baserom.gba", 0x50f4dc, 0x120
+
+gUnknown_0850F5FC:: @ 850F5FC
+ .incbin "baserom.gba", 0x50f5fc, 0x120
+
+gUnknown_0850F71C:: @ 850F71C
+ .incbin "baserom.gba", 0x50f71c, 0x120
+
+gUnknown_0850F83C:: @ 850F83C
+ .incbin "baserom.gba", 0x50f83c, 0x120
+
+gUnknown_0850F95C:: @ 850F95C
+ .incbin "baserom.gba", 0x50f95c, 0x120
+
+gUnknown_0850FA7C:: @ 850FA7C
+ .incbin "baserom.gba", 0x50fa7c, 0x120
+
+gUnknown_0850FB9C:: @ 850FB9C
+ .incbin "baserom.gba", 0x50fb9c, 0x120
+
+gUnknown_0850FCBC:: @ 850FCBC
+ .incbin "baserom.gba", 0x50fcbc, 0x120
+
+gUnknown_0850FDDC:: @ 850FDDC
+ .incbin "baserom.gba", 0x50fddc, 0x120
gUnknown_0850FEFC:: @ 850FEFC
- .incbin "baserom.gba", 0x50fefc, 0x280
+ .incbin "baserom.gba", 0x50fefc, 0x20
+
+gUnknown_0850FF1C:: @ 850FF1C
+ .incbin "baserom.gba", 0x50ff1c, 0x20
+
+gUnknown_0850FF3C:: @ 850FF3C
+ .incbin "baserom.gba", 0x50ff3c, 0x20
+
+gUnknown_0850FF5C:: @ 850FF5C
+ .incbin "baserom.gba", 0x50ff5c, 0x20
+
+gUnknown_0850FF7C:: @ 850FF7C
+ .incbin "baserom.gba", 0x50ff7c, 0x20
+
+gUnknown_0850FF9C:: @ 850FF9C
+ .incbin "baserom.gba", 0x50ff9c, 0x20
+
+gUnknown_0850FFBC:: @ 850FFBC
+ .incbin "baserom.gba", 0x50ffbc, 0x20
+
+gUnknown_0850FFDC:: @ 850FFDC
+ .incbin "baserom.gba", 0x50ffdc, 0x20
+
+gUnknown_0850FFFC:: @ 850FFFC
+ .incbin "baserom.gba", 0x50fffc, 0x20
+
+gUnknown_0851001C:: @ 851001C
+ .incbin "baserom.gba", 0x51001c, 0x20
+
+gUnknown_0851003C:: @ 851003C
+ .incbin "baserom.gba", 0x51003c, 0x20
+
+gUnknown_0851005C:: @ 851005C
+ .incbin "baserom.gba", 0x51005c, 0x20
+
+gUnknown_0851007C:: @ 851007C
+ .incbin "baserom.gba", 0x51007c, 0x20
+
+gUnknown_0851009C:: @ 851009C
+ .incbin "baserom.gba", 0x51009c, 0x20
+
+gUnknown_085100BC:: @ 85100BC
+ .incbin "baserom.gba", 0x5100bc, 0x20
+
+gUnknown_085100DC:: @ 85100DC
+ .incbin "baserom.gba", 0x5100dc, 0x20
+
+gUnknown_085100FC:: @ 85100FC
+ .incbin "baserom.gba", 0x5100fc, 0x20
+
+gUnknown_0851011C:: @ 851011C
+ .incbin "baserom.gba", 0x51011c, 0x20
+
+gUnknown_0851013C:: @ 851013C
+ .incbin "baserom.gba", 0x51013c, 0x20
+
+gUnknown_0851015C:: @ 851015C
+ .incbin "baserom.gba", 0x51015c, 0x20
gUnknown_0851017C:: @ 851017C
- .incbin "baserom.gba", 0x51017c, 0xa0
+ .incbin "baserom.gba", 0x51017c, 0xA0
gUnknown_0851021C:: @ 851021C
- .incbin "baserom.gba", 0x51021c, 0xa0
+ .4byte gUnknown_0850E87C
+ .4byte gUnknown_0850FEFC
+ .4byte gUnknown_0850E99C
+ .4byte gUnknown_0850FF1C
+ .4byte gUnknown_0850EABC
+ .4byte gUnknown_0850FF3C
+ .4byte gUnknown_0850EBDC
+ .4byte gUnknown_0850FF5C
+ .4byte gUnknown_0850ECFC
+ .4byte gUnknown_0850FF7C
+ .4byte gUnknown_0850EE1C
+ .4byte gUnknown_0850FF9C
+ .4byte gUnknown_0850EF3C
+ .4byte gUnknown_0850FFBC
+ .4byte gUnknown_0850F05C
+ .4byte gUnknown_0850FFDC
+ .4byte gUnknown_0850F17C
+ .4byte gUnknown_0850FFFC
+ .4byte gUnknown_0850F29C
+ .4byte gUnknown_0851001C
+ .4byte gUnknown_0850F3BC
+ .4byte gUnknown_0851003C
+ .4byte gUnknown_0850F4DC
+ .4byte gUnknown_0851005C
+ .4byte gUnknown_0850F5FC
+ .4byte gUnknown_0851007C
+ .4byte gUnknown_0850F71C
+ .4byte gUnknown_0851009C
+ .4byte gUnknown_0850F83C
+ .4byte gUnknown_085100BC
+ .4byte gUnknown_0850F95C
+ .4byte gUnknown_085100DC
+ .4byte gUnknown_0850FA7C
+ .4byte gUnknown_085100FC
+ .4byte gUnknown_0850FB9C
+ .4byte gUnknown_0851011C
+ .4byte gUnknown_0850FCBC
+ .4byte gUnknown_0851013C
+ .4byte gUnknown_0850FDDC
+ .4byte gUnknown_0851015C
diff --git a/data/trade.s b/data/trade.s
index b392fbc24..7308b92a3 100644
--- a/data/trade.s
+++ b/data/trade.s
@@ -1,9 +1,9 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
+
+ .section .rodata
+ .align 2, 0
- .section .rodata
- .align 2, 0
-
gUnknown_0832C6A8:: @ 832C6A8
.incbin "baserom.gba", 0x32C6A8, 0x18
diff --git a/data/trainer_card.s b/data/trainer_card.s
index 0d48cd0b6..08bf4d8fa 100644
--- a/data/trainer_card.s
+++ b/data/trainer_card.s
@@ -1,11 +1,44 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
- .section .rodata
- .align 2, 0
+ .section .rodata
+ .align 2, 0
+
+.macro unk_trainer_card_struct text1, text2, short1, short2, short3, short4
+ .4byte \text1
+ .4byte \text2
+ .2byte \short1
+ .2byte \short2
+ .2byte \short3
+ .2byte \short4
+.endm
gUnknown_0856F018:: @ 856F018
- .incbin "baserom.gba", 0x56f018, 0x494
+ .incbin "baserom.gba", 0x56f018, 0x194
+
+gEmeraldTrainerCard1Star_Pal:: @ 856F1AC
+ .incbin "baserom.gba", 0x56f1ac, 0x60
+
+gFireRedTrainerCard1Star_Pal:: @ 856F20C
+ .incbin "baserom.gba", 0x56f20c, 0x60
+
+gEmeraldTrainerCard2Star_Pal:: @ 856F26C
+ .incbin "baserom.gba", 0x56f26c, 0x60
+
+gFireRedTrainerCard2Star_Pal:: @ 856F2CC
+ .incbin "baserom.gba", 0x56f2cc, 0x60
+
+gEmeraldTrainerCard3Star_Pal:: @ 856F32C
+ .incbin "baserom.gba", 0x56f32c, 0x60
+
+gFireRedTrainerCard3Star_Pal:: @ 856F38C
+ .incbin "baserom.gba", 0x56f38c, 0x60
+
+gEmeraldTrainerCard4Star_Pal:: @ 856F3EC
+ .incbin "baserom.gba", 0x56f3ec, 0x60
+
+gFireRedTrainerCard4Star_Pal:: @ 856F44C
+ .incbin "baserom.gba", 0x56f44c, 0x60
gUnknown_0856F4AC:: @ 856F4AC
.incbin "baserom.gba", 0x56f4ac, 0x20
@@ -46,17 +79,30 @@ gUnknown_0856FAB4:: @ 856FAB4
gUnknown_0856FAC4:: @ 856FAC4
.incbin "baserom.gba", 0x56fac4, 0x20
-gUnknown_0856FAE4:: @ 856FAE4
- .incbin "baserom.gba", 0x56fae4, 0x14
-
-gUnknown_0856FAF8:: @ 856FAF8
- .incbin "baserom.gba", 0x56faf8, 0x14
+ .align 2
+gEmeraldTrainerCardStarPals:: @ 856FAE4
+ .4byte gEmeraldTrainerCard0Star_Pal
+ .4byte gEmeraldTrainerCard1Star_Pal
+ .4byte gEmeraldTrainerCard2Star_Pal
+ .4byte gEmeraldTrainerCard3Star_Pal
+ .4byte gEmeraldTrainerCard4Star_Pal
+
+ .align 2
+gFireRedTrainerCardStarPals:: @ 856FAF8
+ .4byte gFireRedTrainerCard0Star_Pal
+ .4byte gFireRedTrainerCard1Star_Pal
+ .4byte gFireRedTrainerCard2Star_Pal
+ .4byte gFireRedTrainerCard3Star_Pal
+ .4byte gFireRedTrainerCard4Star_Pal
gUnknown_0856FB0C:: @ 856FB0C
.incbin "baserom.gba", 0x56fb0c, 0x3
gUnknown_0856FB0F:: @ 856FB0F
- .incbin "baserom.gba", 0x56fb0f, 0x9
+ .incbin "baserom.gba", 0x56fb0f, 0x3
+
+gUnknown_0856FB12:: @ 856FB12
+ .incbin "baserom.gba", 0x56fb12, 0x6
gUnknown_0856FB18:: @ 856FB18
.incbin "baserom.gba", 0x56fb18, 0x8
@@ -65,10 +111,16 @@ gUnknown_0856FB20:: @ 856FB20
.incbin "baserom.gba", 0x56fb20, 0x8
gUnknown_0856FB28:: @ 856FB28
- .incbin "baserom.gba", 0x56fb28, 0x18
+ .4byte sub_80C4998
+ .4byte sub_80C49D8
+ .4byte sub_80C4B08
+ .4byte sub_80C4C1C
+ .4byte sub_80C4C84
+ .4byte sub_80C4DB0
gUnknown_0856FB40:: @ 856FB40
- .incbin "baserom.gba", 0x56fb40, 0x8
+ .4byte gUnknown_0856FB0C
+ .4byte gUnknown_0856FB12
gUnknown_0856FB48:: @ 856FB48
.incbin "baserom.gba", 0x56fb48, 0x2
@@ -86,7 +138,9 @@ gUnknown_0856FB57:: @ 856FB57
.incbin "baserom.gba", 0x56fb57, 0x5
gUnknown_0856FB5C:: @ 856FB5C
- .incbin "baserom.gba", 0x56fb5c, 0xc
+ .4byte gText_LinkBattles
+ .4byte gText_LinkCableBattles
+ .4byte gText_LinkBattles
gUnknown_0856FB68:: @ 856FB68
.incbin "baserom.gba", 0x56fb68, 0x6
@@ -98,10 +152,27 @@ gUnknown_0856FB74:: @ 856FB74
.incbin "baserom.gba", 0x56fb74, 0x4
gUnknown_0856FB78:: @ 856FB78
- .incbin "baserom.gba", 0x56fb78, 0x44
+ .incbin "baserom.gba", 0x56fb78, 0x4
+
+gUnknown_0856FB7C:: @ 856FB7C
+ .incbin "baserom.gba", 0x56fb7c, 0x20
+
+gUnknown_0856FB9C:: @ 856FB9C
+ .incbin "baserom.gba", 0x56fb9c, 0x20
gUnknown_0856FBBC:: @ 856FBBC
- .incbin "baserom.gba", 0x56fbbc, 0x1244
+ .incbin "baserom.gba", 0x56fbbc, 0xFEC
+
+ .align 2
+gFrontierPassCursor_Gfx:: @ 8570BA8
+ .incbin "graphics/frontier_pass/cursor.4bpp.lz"
+
+gUnknown_08570C44:: @ 8570C44
+ .incbin "baserom.gba", 0x570c44, 0xBC
+
+ .align 2
+gFrontierPassMapCursor_Gfx:: @ 8570D00
+ .incbin "graphics/frontier_pass/map_cursor.4bpp.lz"
gUnknown_08570E00:: @ 8570E00
.incbin "baserom.gba", 0x570e00, 0x260
@@ -143,25 +214,108 @@ gUnknown_08571454:: @ 8571454
.incbin "baserom.gba", 0x571454, 0x68
gUnknown_085714BC:: @ 85714BC
- .incbin "baserom.gba", 0x5714bc, 0x18
+ obj_tiles gFrontierPassCursor_Gfx, 0x100, 0
+ obj_tiles gFrontierPassMapCursor_Gfx, 0x400, 1
+ obj_tiles gFrontierPassMedals_Gfx, 0x380, 2
gUnknown_085714D4:: @ 85714D4
- .incbin "baserom.gba", 0x5714d4, 0x10
+ obj_tiles gUnknown_08570C44, 0x100, 4
+ null_obj_tiles
gUnknown_085714E4:: @ 85714E4
- .incbin "baserom.gba", 0x5714e4, 0xd0
+ obj_pal gFrontierPassCursor_Pal, 0
+ obj_pal gFrontierPassMapCursor_Pal, 1
+ obj_pal gFrontierPassMedalsSilver_Pal, 2
+ obj_pal gFrontierPassMedalsGold_Pal, 3
+ obj_pal gUnknown_0856FB7C, 4
+ obj_pal gUnknown_0856FB9C, 5
+ null_obj_pal
+
+ @ this doesnt look like its part of the same table.
+ .4byte 0x0, 0xFFFF
+
+gUnknown_08571524:: @ 8571524
+ .incbin "baserom.gba", 0x571524, 0x8
+
+gUnknown_0857152C:: @ 857152C
+ .incbin "baserom.gba", 0x57152c, 0x8
+
+gUnknown_08571534:: @ 8571534
+ .incbin "baserom.gba", 0x571534, 0x8
+
+gUnknown_0857153C:: @ 857153C
+ .incbin "baserom.gba", 0x57153c, 0x8
+
+gUnknown_08571544:: @ 8571544
+ .incbin "baserom.gba", 0x571544, 0x8
+
+gUnknown_0857154C:: @ 857154C
+ .incbin "baserom.gba", 0x57154c, 0x8
+
+gUnknown_08571554:: @ 8571554
+ .incbin "baserom.gba", 0x571554, 0x8
+
+gUnknown_0857155C:: @ 857155C
+ .incbin "baserom.gba", 0x57155c, 0xC
+
+gUnknown_08571568:: @ 8571568
+ .incbin "baserom.gba", 0x571568, 0xC
+
+gUnknown_08571574:: @ 8571574
+ .4byte gUnknown_08571524
+ .4byte gUnknown_0857152C
+
+gUnknown_0857157C:: @ 857157C
+ .4byte gUnknown_08571524
+ .4byte gUnknown_0857152C
+ .4byte gUnknown_08571534
+ .4byte gUnknown_0857153C
+ .4byte gUnknown_08571544
+ .4byte gUnknown_0857154C
+ .4byte gUnknown_08571554
+
+gUnknown_08571598:: @ 8571598
+ .4byte gUnknown_0857155C
+ .4byte gUnknown_08571568
+
+gUnknown_085715A0:: @ 85715A0
+ .incbin "baserom.gba", 0x5715a0, 0x10
+
+gUnknown_085715B0:: @ 85715B0
+ .4byte gUnknown_085715A0
gUnknown_085715B4:: @ 85715B4
- .incbin "baserom.gba", 0x5715b4, 0x30
+ spr_template 0, 0, gUnknown_0852490C, gUnknown_08571574, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
+ spr_template 1, 1, gUnknown_08524934, gUnknown_08571598, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_085715E4:: @ 85715E4
- .incbin "baserom.gba", 0x5715e4, 0x18
+ spr_template 2, 2, gUnknown_0852490C, gUnknown_0857157C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_085715FC:: @ 85715FC
- .incbin "baserom.gba", 0x5715fc, 0x18
+ spr_template 4, 4, gUnknown_0852490C, gUnknown_08571574, NULL, gDummySpriteAffineAnimTable, nullsub_39
gUnknown_08571614:: @ 8571614
- .incbin "baserom.gba", 0x571614, 0x3c
+ .4byte gUnknown_085EDA96
+ .4byte gUnknown_085ED932
+ .4byte gUnknown_085ED94D
+ .4byte gUnknown_085ED961
+ .4byte gUnknown_085ED977
+ .4byte gUnknown_085ED993
+ .4byte gUnknown_085ED9AF
+ .4byte gUnknown_085ED9C7
+ .4byte gUnknown_085ED9E5
+ .4byte gUnknown_085EDA02
+ .4byte gUnknown_085EDA21
+ .4byte gUnknown_085EDA3C
+ .4byte gUnknown_085EDA5E
+ .4byte gUnknown_085EDA78
+ .4byte gUnknown_085ED931
gUnknown_08571650:: @ 8571650
- .incbin "baserom.gba", 0x571650, 0x70
+ unk_trainer_card_struct gUnknown_085EDAB1, gUnknown_085EDB0F, 0x59, 0x28, 1, 0
+ unk_trainer_card_struct gUnknown_085EDABE, gUnknown_085EDB4E, 0x21, 0x2A, 1, 0
+ unk_trainer_card_struct gUnknown_085EDACA, gUnknown_085EDB8B, 0x78, 0x56, 0, 0
+ unk_trainer_card_struct gUnknown_085EDAD8, gUnknown_085EDBC2, 0x72, 0x3B, 0, 0
+ unk_trainer_card_struct gUnknown_085EDAE5, gUnknown_085EDC00, 0x19, 0x43, 0, 0
+ unk_trainer_card_struct gUnknown_085EDAF4, gUnknown_085EDC45, 0x39, 0x39, 1, 0
+ unk_trainer_card_struct gUnknown_085EDB00, gUnknown_085EDC84, 0x86, 0x29, 1, 0
diff --git a/data/trainer_money.inc b/data/trainer_money.inc
index 1e06668bd..00aaa6cfb 100644
--- a/data/trainer_money.inc
+++ b/data/trainer_money.inc
@@ -1,59 +1,59 @@
@ This is a factor in how much money you get for beating a trainer.
.align 2
gTrainerMoneyTable:: @ 831AEB8
- .byte TRAINER_CLASS_NAME_TEAM_AQUA, 5, 0, 0
- .byte TRAINER_CLASS_NAME_AQUA_ADMIN, 10, 0, 0
- .byte TRAINER_CLASS_NAME_AQUA_LEADER, 20, 0, 0
- .byte TRAINER_CLASS_NAME_AROMA_LADY, 10, 0, 0
- .byte TRAINER_CLASS_NAME_RUIN_MANIAC, 15, 0, 0
- .byte TRAINER_CLASS_NAME_INTERVIEWER, 12, 0, 0
- .byte TRAINER_CLASS_NAME_TUBER_1, 1, 0, 0
- .byte TRAINER_CLASS_NAME_TUBER_2, 1, 0, 0
- .byte TRAINER_CLASS_NAME_SIS_AND_BRO, 3, 0, 0
- .byte TRAINER_CLASS_NAME_COOLTRAINER_1, 12, 0, 0
- .byte TRAINER_CLASS_NAME_HEX_MANIAC, 6, 0, 0
- .byte TRAINER_CLASS_NAME_LADY, 50, 0, 0
- .byte TRAINER_CLASS_NAME_BEAUTY, 20, 0, 0
- .byte TRAINER_CLASS_NAME_RICH_BOY, 50, 0, 0
- .byte TRAINER_CLASS_NAME_POKEMANIAC, 15, 0, 0
- .byte TRAINER_CLASS_NAME_SWIMMER_M, 2, 0, 0
- .byte TRAINER_CLASS_NAME_BLACK_BELT, 8, 0, 0
- .byte TRAINER_CLASS_NAME_GUITARIST, 8, 0, 0
- .byte TRAINER_CLASS_NAME_KINDLER, 8, 0, 0
- .byte TRAINER_CLASS_NAME_CAMPER, 4, 0, 0
- .byte TRAINER_CLASS_NAME_OLD_COUPLE, 10, 0, 0
- .byte TRAINER_CLASS_NAME_BUG_MANIAC, 15, 0, 0
- .byte TRAINER_CLASS_NAME_PSYCHIC, 6, 0, 0
- .byte TRAINER_CLASS_NAME_GENTLEMAN, 20, 0, 0
- .byte TRAINER_CLASS_NAME_ELITE_FOUR, 25, 0, 0
- .byte TRAINER_CLASS_NAME_LEADER, 25, 0, 0
- .byte TRAINER_CLASS_NAME_SCHOOL_KID, 5, 0, 0
- .byte TRAINER_CLASS_NAME_SR_AND_JR, 4, 0, 0
- .byte TRAINER_CLASS_NAME_POKEFAN, 20, 0, 0
- .byte TRAINER_CLASS_NAME_EXPERT, 10, 0, 0
- .byte TRAINER_CLASS_NAME_YOUNGSTER, 4, 0, 0
- .byte TRAINER_CLASS_NAME_CHAMPION, 50, 0, 0
- .byte TRAINER_CLASS_NAME_FISHERMAN, 10, 0, 0
- .byte TRAINER_CLASS_NAME_TRIATHLETE, 10, 0, 0
- .byte TRAINER_CLASS_NAME_DRAGON_TAMER, 12, 0, 0
- .byte TRAINER_CLASS_NAME_BIRD_KEEPER, 8, 0, 0
- .byte TRAINER_CLASS_NAME_NINJA_BOY, 3, 0, 0
- .byte TRAINER_CLASS_NAME_BATTLE_GIRL, 6, 0, 0
- .byte TRAINER_CLASS_NAME_PARASOL_LADY, 10, 0, 0
- .byte TRAINER_CLASS_NAME_SWIMMER_F, 2, 0, 0
- .byte TRAINER_CLASS_NAME_PICNICKER, 4, 0, 0
- .byte TRAINER_CLASS_NAME_TWINS, 3, 0, 0
- .byte TRAINER_CLASS_NAME_SAILOR, 8, 0, 0
- .byte TRAINER_CLASS_NAME_COLLECTOR, 15, 0, 0
- .byte TRAINER_CLASS_NAME_PKMN_TRAINER_3, 15, 0, 0
- .byte TRAINER_CLASS_NAME_PKMN_BREEDER, 10, 0, 0
- .byte TRAINER_CLASS_NAME_PKMN_RANGER, 12, 0, 0
- .byte TRAINER_CLASS_NAME_TEAM_MAGMA, 5, 0, 0
- .byte TRAINER_CLASS_NAME_MAGMA_ADMIN, 10, 0, 0
- .byte TRAINER_CLASS_NAME_MAGMA_LEADER, 20, 0, 0
- .byte TRAINER_CLASS_NAME_LASS, 4, 0, 0
- .byte TRAINER_CLASS_NAME_BUG_CATCHER, 4, 0, 0
- .byte TRAINER_CLASS_NAME_HIKER, 10, 0, 0
- .byte TRAINER_CLASS_NAME_YOUNG_COUPLE, 8, 0, 0
- .byte TRAINER_CLASS_LEADER_1, 10, 0, 0
- .byte -1, 5, 0, 0
+ .byte TRAINER_CLASS_NAME_TEAM_AQUA, 5, 0, 0
+ .byte TRAINER_CLASS_NAME_AQUA_ADMIN, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_AQUA_LEADER, 20, 0, 0
+ .byte TRAINER_CLASS_NAME_AROMA_LADY, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_RUIN_MANIAC, 15, 0, 0
+ .byte TRAINER_CLASS_NAME_INTERVIEWER, 12, 0, 0
+ .byte TRAINER_CLASS_NAME_TUBER_1, 1, 0, 0
+ .byte TRAINER_CLASS_NAME_TUBER_2, 1, 0, 0
+ .byte TRAINER_CLASS_NAME_SIS_AND_BRO, 3, 0, 0
+ .byte TRAINER_CLASS_NAME_COOLTRAINER_1, 12, 0, 0
+ .byte TRAINER_CLASS_NAME_HEX_MANIAC, 6, 0, 0
+ .byte TRAINER_CLASS_NAME_LADY, 50, 0, 0
+ .byte TRAINER_CLASS_NAME_BEAUTY, 20, 0, 0
+ .byte TRAINER_CLASS_NAME_RICH_BOY, 50, 0, 0
+ .byte TRAINER_CLASS_NAME_POKEMANIAC, 15, 0, 0
+ .byte TRAINER_CLASS_NAME_SWIMMER_M, 2, 0, 0
+ .byte TRAINER_CLASS_NAME_BLACK_BELT, 8, 0, 0
+ .byte TRAINER_CLASS_NAME_GUITARIST, 8, 0, 0
+ .byte TRAINER_CLASS_NAME_KINDLER, 8, 0, 0
+ .byte TRAINER_CLASS_NAME_CAMPER, 4, 0, 0
+ .byte TRAINER_CLASS_NAME_OLD_COUPLE, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_BUG_MANIAC, 15, 0, 0
+ .byte TRAINER_CLASS_NAME_PSYCHIC, 6, 0, 0
+ .byte TRAINER_CLASS_NAME_GENTLEMAN, 20, 0, 0
+ .byte TRAINER_CLASS_NAME_ELITE_FOUR, 25, 0, 0
+ .byte TRAINER_CLASS_NAME_LEADER, 25, 0, 0
+ .byte TRAINER_CLASS_NAME_SCHOOL_KID, 5, 0, 0
+ .byte TRAINER_CLASS_NAME_SR_AND_JR, 4, 0, 0
+ .byte TRAINER_CLASS_NAME_POKEFAN, 20, 0, 0
+ .byte TRAINER_CLASS_NAME_EXPERT, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_YOUNGSTER, 4, 0, 0
+ .byte TRAINER_CLASS_NAME_CHAMPION, 50, 0, 0
+ .byte TRAINER_CLASS_NAME_FISHERMAN, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_TRIATHLETE, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_DRAGON_TAMER, 12, 0, 0
+ .byte TRAINER_CLASS_NAME_BIRD_KEEPER, 8, 0, 0
+ .byte TRAINER_CLASS_NAME_NINJA_BOY, 3, 0, 0
+ .byte TRAINER_CLASS_NAME_BATTLE_GIRL, 6, 0, 0
+ .byte TRAINER_CLASS_NAME_PARASOL_LADY, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_SWIMMER_F, 2, 0, 0
+ .byte TRAINER_CLASS_NAME_PICNICKER, 4, 0, 0
+ .byte TRAINER_CLASS_NAME_TWINS, 3, 0, 0
+ .byte TRAINER_CLASS_NAME_SAILOR, 8, 0, 0
+ .byte TRAINER_CLASS_NAME_COLLECTOR, 15, 0, 0
+ .byte TRAINER_CLASS_NAME_PKMN_TRAINER_3, 15, 0, 0
+ .byte TRAINER_CLASS_NAME_PKMN_BREEDER, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_PKMN_RANGER, 12, 0, 0
+ .byte TRAINER_CLASS_NAME_TEAM_MAGMA, 5, 0, 0
+ .byte TRAINER_CLASS_NAME_MAGMA_ADMIN, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_MAGMA_LEADER, 20, 0, 0
+ .byte TRAINER_CLASS_NAME_LASS, 4, 0, 0
+ .byte TRAINER_CLASS_NAME_BUG_CATCHER, 4, 0, 0
+ .byte TRAINER_CLASS_NAME_HIKER, 10, 0, 0
+ .byte TRAINER_CLASS_NAME_YOUNG_COUPLE, 8, 0, 0
+ .byte TRAINER_CLASS_LEADER_1, 10, 0, 0
+ .byte -1, 5, 0, 0
diff --git a/data/type_effectiveness.inc b/data/type_effectiveness.inc
index a24615592..0739199c2 100644
--- a/data/type_effectiveness.inc
+++ b/data/type_effectiveness.inc
@@ -1,119 +1,119 @@
@ format: attacking type, defending type, damage multiplier
@ the multiplier is a (decimal) fixed-point number:
-@ 20 is ×2.0
-@ 05 is ×0.5
-@ 00 is ×0
+@ 20 is ×2.0
+@ 05 is ×0.5
+@ 00 is ×0
gTypeEffectiveness:: @ 831ACE8
- .byte TYPE_NORMAL, TYPE_ROCK, 5
- .byte TYPE_NORMAL, TYPE_STEEL, 5
- .byte TYPE_FIRE, TYPE_FIRE, 5
- .byte TYPE_FIRE, TYPE_WATER, 5
- .byte TYPE_FIRE, TYPE_GRASS, 20
- .byte TYPE_FIRE, TYPE_ICE, 20
- .byte TYPE_FIRE, TYPE_BUG, 20
- .byte TYPE_FIRE, TYPE_ROCK, 5
- .byte TYPE_FIRE, TYPE_DRAGON, 5
- .byte TYPE_FIRE, TYPE_STEEL, 20
- .byte TYPE_WATER, TYPE_FIRE, 20
- .byte TYPE_WATER, TYPE_WATER, 5
- .byte TYPE_WATER, TYPE_GRASS, 5
- .byte TYPE_WATER, TYPE_GROUND, 20
- .byte TYPE_WATER, TYPE_ROCK, 20
- .byte TYPE_WATER, TYPE_DRAGON, 5
- .byte TYPE_ELECTRIC, TYPE_WATER, 20
+ .byte TYPE_NORMAL, TYPE_ROCK, 5
+ .byte TYPE_NORMAL, TYPE_STEEL, 5
+ .byte TYPE_FIRE, TYPE_FIRE, 5
+ .byte TYPE_FIRE, TYPE_WATER, 5
+ .byte TYPE_FIRE, TYPE_GRASS, 20
+ .byte TYPE_FIRE, TYPE_ICE, 20
+ .byte TYPE_FIRE, TYPE_BUG, 20
+ .byte TYPE_FIRE, TYPE_ROCK, 5
+ .byte TYPE_FIRE, TYPE_DRAGON, 5
+ .byte TYPE_FIRE, TYPE_STEEL, 20
+ .byte TYPE_WATER, TYPE_FIRE, 20
+ .byte TYPE_WATER, TYPE_WATER, 5
+ .byte TYPE_WATER, TYPE_GRASS, 5
+ .byte TYPE_WATER, TYPE_GROUND, 20
+ .byte TYPE_WATER, TYPE_ROCK, 20
+ .byte TYPE_WATER, TYPE_DRAGON, 5
+ .byte TYPE_ELECTRIC, TYPE_WATER, 20
.byte TYPE_ELECTRIC, TYPE_ELECTRIC, 5
- .byte TYPE_ELECTRIC, TYPE_GRASS, 5
+ .byte TYPE_ELECTRIC, TYPE_GRASS, 5
.byte TYPE_ELECTRIC, TYPE_GROUND, 0
.byte TYPE_ELECTRIC, TYPE_FLYING, 20
.byte TYPE_ELECTRIC, TYPE_DRAGON, 5
- .byte TYPE_GRASS, TYPE_FIRE, 5
- .byte TYPE_GRASS, TYPE_WATER, 20
- .byte TYPE_GRASS, TYPE_GRASS, 5
- .byte TYPE_GRASS, TYPE_POISON, 5
- .byte TYPE_GRASS, TYPE_GROUND, 20
- .byte TYPE_GRASS, TYPE_FLYING, 5
- .byte TYPE_GRASS, TYPE_BUG, 5
- .byte TYPE_GRASS, TYPE_ROCK, 20
- .byte TYPE_GRASS, TYPE_DRAGON, 5
- .byte TYPE_GRASS, TYPE_STEEL, 5
- .byte TYPE_ICE, TYPE_WATER, 5
- .byte TYPE_ICE, TYPE_GRASS, 20
- .byte TYPE_ICE, TYPE_ICE, 5
- .byte TYPE_ICE, TYPE_GROUND, 20
- .byte TYPE_ICE, TYPE_FLYING, 20
- .byte TYPE_ICE, TYPE_DRAGON, 20
- .byte TYPE_ICE, TYPE_STEEL, 5
- .byte TYPE_ICE, TYPE_FIRE, 5
+ .byte TYPE_GRASS, TYPE_FIRE, 5
+ .byte TYPE_GRASS, TYPE_WATER, 20
+ .byte TYPE_GRASS, TYPE_GRASS, 5
+ .byte TYPE_GRASS, TYPE_POISON, 5
+ .byte TYPE_GRASS, TYPE_GROUND, 20
+ .byte TYPE_GRASS, TYPE_FLYING, 5
+ .byte TYPE_GRASS, TYPE_BUG, 5
+ .byte TYPE_GRASS, TYPE_ROCK, 20
+ .byte TYPE_GRASS, TYPE_DRAGON, 5
+ .byte TYPE_GRASS, TYPE_STEEL, 5
+ .byte TYPE_ICE, TYPE_WATER, 5
+ .byte TYPE_ICE, TYPE_GRASS, 20
+ .byte TYPE_ICE, TYPE_ICE, 5
+ .byte TYPE_ICE, TYPE_GROUND, 20
+ .byte TYPE_ICE, TYPE_FLYING, 20
+ .byte TYPE_ICE, TYPE_DRAGON, 20
+ .byte TYPE_ICE, TYPE_STEEL, 5
+ .byte TYPE_ICE, TYPE_FIRE, 5
.byte TYPE_FIGHTING, TYPE_NORMAL, 20
- .byte TYPE_FIGHTING, TYPE_ICE, 20
+ .byte TYPE_FIGHTING, TYPE_ICE, 20
.byte TYPE_FIGHTING, TYPE_POISON, 5
.byte TYPE_FIGHTING, TYPE_FLYING, 5
.byte TYPE_FIGHTING, TYPE_PSYCHIC, 5
- .byte TYPE_FIGHTING, TYPE_BUG, 5
- .byte TYPE_FIGHTING, TYPE_ROCK, 20
- .byte TYPE_FIGHTING, TYPE_DARK, 20
- .byte TYPE_FIGHTING, TYPE_STEEL, 20
- .byte TYPE_POISON, TYPE_GRASS, 20
+ .byte TYPE_FIGHTING, TYPE_BUG, 5
+ .byte TYPE_FIGHTING, TYPE_ROCK, 20
+ .byte TYPE_FIGHTING, TYPE_DARK, 20
+ .byte TYPE_FIGHTING, TYPE_STEEL, 20
+ .byte TYPE_POISON, TYPE_GRASS, 20
.byte TYPE_POISON, TYPE_POISON, 5
.byte TYPE_POISON, TYPE_GROUND, 5
- .byte TYPE_POISON, TYPE_ROCK, 5
- .byte TYPE_POISON, TYPE_GHOST, 5
- .byte TYPE_POISON, TYPE_STEEL, 0
- .byte TYPE_GROUND, TYPE_FIRE, 20
+ .byte TYPE_POISON, TYPE_ROCK, 5
+ .byte TYPE_POISON, TYPE_GHOST, 5
+ .byte TYPE_POISON, TYPE_STEEL, 0
+ .byte TYPE_GROUND, TYPE_FIRE, 20
.byte TYPE_GROUND, TYPE_ELECTRIC, 20
- .byte TYPE_GROUND, TYPE_GRASS, 5
+ .byte TYPE_GROUND, TYPE_GRASS, 5
.byte TYPE_GROUND, TYPE_POISON, 20
.byte TYPE_GROUND, TYPE_FLYING, 0
- .byte TYPE_GROUND, TYPE_BUG, 5
- .byte TYPE_GROUND, TYPE_ROCK, 20
- .byte TYPE_GROUND, TYPE_STEEL, 20
+ .byte TYPE_GROUND, TYPE_BUG, 5
+ .byte TYPE_GROUND, TYPE_ROCK, 20
+ .byte TYPE_GROUND, TYPE_STEEL, 20
.byte TYPE_FLYING, TYPE_ELECTRIC, 5
- .byte TYPE_FLYING, TYPE_GRASS, 20
+ .byte TYPE_FLYING, TYPE_GRASS, 20
.byte TYPE_FLYING, TYPE_FIGHTING, 20
- .byte TYPE_FLYING, TYPE_BUG, 20
- .byte TYPE_FLYING, TYPE_ROCK, 5
- .byte TYPE_FLYING, TYPE_STEEL, 5
+ .byte TYPE_FLYING, TYPE_BUG, 20
+ .byte TYPE_FLYING, TYPE_ROCK, 5
+ .byte TYPE_FLYING, TYPE_STEEL, 5
.byte TYPE_PSYCHIC, TYPE_FIGHTING, 20
.byte TYPE_PSYCHIC, TYPE_POISON, 20
.byte TYPE_PSYCHIC, TYPE_PSYCHIC, 5
- .byte TYPE_PSYCHIC, TYPE_DARK, 0
- .byte TYPE_PSYCHIC, TYPE_STEEL, 5
- .byte TYPE_BUG, TYPE_FIRE, 5
- .byte TYPE_BUG, TYPE_GRASS, 20
- .byte TYPE_BUG, TYPE_FIGHTING, 5
- .byte TYPE_BUG, TYPE_POISON, 5
- .byte TYPE_BUG, TYPE_FLYING, 5
- .byte TYPE_BUG, TYPE_PSYCHIC, 20
- .byte TYPE_BUG, TYPE_GHOST, 5
- .byte TYPE_BUG, TYPE_DARK, 20
- .byte TYPE_BUG, TYPE_STEEL, 5
- .byte TYPE_ROCK, TYPE_FIRE, 20
- .byte TYPE_ROCK, TYPE_ICE, 20
- .byte TYPE_ROCK, TYPE_FIGHTING, 5
- .byte TYPE_ROCK, TYPE_GROUND, 5
- .byte TYPE_ROCK, TYPE_FLYING, 20
- .byte TYPE_ROCK, TYPE_BUG, 20
- .byte TYPE_ROCK, TYPE_STEEL, 5
- .byte TYPE_GHOST, TYPE_NORMAL, 0
- .byte TYPE_GHOST, TYPE_PSYCHIC, 20
- .byte TYPE_GHOST, TYPE_DARK, 5
- .byte TYPE_GHOST, TYPE_STEEL, 5
- .byte TYPE_GHOST, TYPE_GHOST, 20
+ .byte TYPE_PSYCHIC, TYPE_DARK, 0
+ .byte TYPE_PSYCHIC, TYPE_STEEL, 5
+ .byte TYPE_BUG, TYPE_FIRE, 5
+ .byte TYPE_BUG, TYPE_GRASS, 20
+ .byte TYPE_BUG, TYPE_FIGHTING, 5
+ .byte TYPE_BUG, TYPE_POISON, 5
+ .byte TYPE_BUG, TYPE_FLYING, 5
+ .byte TYPE_BUG, TYPE_PSYCHIC, 20
+ .byte TYPE_BUG, TYPE_GHOST, 5
+ .byte TYPE_BUG, TYPE_DARK, 20
+ .byte TYPE_BUG, TYPE_STEEL, 5
+ .byte TYPE_ROCK, TYPE_FIRE, 20
+ .byte TYPE_ROCK, TYPE_ICE, 20
+ .byte TYPE_ROCK, TYPE_FIGHTING, 5
+ .byte TYPE_ROCK, TYPE_GROUND, 5
+ .byte TYPE_ROCK, TYPE_FLYING, 20
+ .byte TYPE_ROCK, TYPE_BUG, 20
+ .byte TYPE_ROCK, TYPE_STEEL, 5
+ .byte TYPE_GHOST, TYPE_NORMAL, 0
+ .byte TYPE_GHOST, TYPE_PSYCHIC, 20
+ .byte TYPE_GHOST, TYPE_DARK, 5
+ .byte TYPE_GHOST, TYPE_STEEL, 5
+ .byte TYPE_GHOST, TYPE_GHOST, 20
.byte TYPE_DRAGON, TYPE_DRAGON, 20
- .byte TYPE_DRAGON, TYPE_STEEL, 5
- .byte TYPE_DARK, TYPE_FIGHTING, 5
- .byte TYPE_DARK, TYPE_PSYCHIC, 20
- .byte TYPE_DARK, TYPE_GHOST, 20
- .byte TYPE_DARK, TYPE_DARK, 5
- .byte TYPE_DARK, TYPE_STEEL, 5
- .byte TYPE_STEEL, TYPE_FIRE, 5
- .byte TYPE_STEEL, TYPE_WATER, 5
- .byte TYPE_STEEL, TYPE_ELECTRIC, 5
- .byte TYPE_STEEL, TYPE_ICE, 20
- .byte TYPE_STEEL, TYPE_ROCK, 20
- .byte TYPE_STEEL, TYPE_STEEL, 5
- .byte 0xFE, 0xFE, 0
- .byte TYPE_NORMAL, TYPE_GHOST, 0
- .byte TYPE_FIGHTING, TYPE_GHOST, 0
- .byte 0xFF, 0xFF, 0
+ .byte TYPE_DRAGON, TYPE_STEEL, 5
+ .byte TYPE_DARK, TYPE_FIGHTING, 5
+ .byte TYPE_DARK, TYPE_PSYCHIC, 20
+ .byte TYPE_DARK, TYPE_GHOST, 20
+ .byte TYPE_DARK, TYPE_DARK, 5
+ .byte TYPE_DARK, TYPE_STEEL, 5
+ .byte TYPE_STEEL, TYPE_FIRE, 5
+ .byte TYPE_STEEL, TYPE_WATER, 5
+ .byte TYPE_STEEL, TYPE_ELECTRIC, 5
+ .byte TYPE_STEEL, TYPE_ICE, 20
+ .byte TYPE_STEEL, TYPE_ROCK, 20
+ .byte TYPE_STEEL, TYPE_STEEL, 5
+ .byte 0xFE, 0xFE, 0
+ .byte TYPE_NORMAL, TYPE_GHOST, 0
+ .byte TYPE_FIGHTING, TYPE_GHOST, 0
+ .byte 0xFF, 0xFF, 0
diff --git a/data/unk_sprite_file.s b/data/unk_sprite_file.s
index 837e87c3f..2d5c9c12a 100644
--- a/data/unk_sprite_file.s
+++ b/data/unk_sprite_file.s
@@ -7,16 +7,36 @@ gUnknown_0862AD54:: @ 862AD54
.incbin "baserom.gba", 0x62ad54, 0x1dc
gUnknown_0862AF30:: @ 862AF30
- .incbin "baserom.gba", 0x62af30, 0x60c
+ .incbin "baserom.gba", 0x62af30, 0x1AC
+
+gUnknown_0862B0DC:: @ 862B0DC
+ .incbin "baserom.gba", 0x62b0dc, 0x460
gUnknown_0862B53C:: @ 862B53C
- .incbin "baserom.gba", 0x62b53c, 0x1e8
+ .incbin "baserom.gba", 0x62b53c, 0x1E0
+
+gUnknown_0862B71C:: @ 862B71C
+ .incbin "baserom.gba", 0x62b71c, 0x8
gUnknown_0862B724:: @ 862B724
- .incbin "baserom.gba", 0x62b724, 0x8
+ obj_tiles gUnknown_0862B0DC, 0x1800, 11920
gUnknown_0862B72C:: @ 862B72C
- .incbin "baserom.gba", 0x62b72c, 0x2c
+ obj_pal gUnknown_0862B53C, 11920
+
+gUnknown_0862B734:: @ 862B734
+ .incbin "baserom.gba", 0x62b734, 0x8
+
+gUnknown_0862B73C:: @ 862B73C
+ .incbin "baserom.gba", 0x62b73c, 0x8
+
+gUnknown_0862B744:: @ 862B744
+ .incbin "baserom.gba", 0x62b744, 0x8
+
+gUnknown_0862B74C:: @ 862B74C
+ .4byte gUnknown_0862B734
+ .4byte gUnknown_0862B73C
+ .4byte gUnknown_0862B744
gUnknown_0862B758:: @ 862B758
- .incbin "baserom.gba", 0x62b758, 0x18
+ spr_template 11920, 11920, gUnknown_0862B71C, gUnknown_0862B74C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
diff --git a/data/use_pokeblock.s b/data/use_pokeblock.s
index a45ea27e1..ffb7802d9 100644
--- a/data/use_pokeblock.s
+++ b/data/use_pokeblock.s
@@ -2,7 +2,7 @@
.include "constants/constants.inc"
.section .rodata
-
+
gUnknown_085DFA60:: @ 85DFA60
.incbin "baserom.gba", 0x5dfa60, 0x20
@@ -47,10 +47,10 @@ sContestStatNames:: @ 85DFD04
.4byte gText_Beauty3
gUnknown_085DFD18:: @ 85DFD18
- .incbin "baserom.gba", 0x5dfd18, 0x8
+ obj_tiles gUsePokeblockUpDown_Gfx, 0x200, 0
gUnknown_085DFD20:: @ 85DFD20
- .incbin "baserom.gba", 0x5dfd20, 0x8
+ obj_pal gUsePokeblockUpDown_Pal, 0
gUnknown_085DFD28:: @ 85DFD28
.incbin "baserom.gba", 0x5dfd28, 0x34
@@ -62,4 +62,5 @@ gUnknown_085DFDA0:: @ 85DFDA0
.incbin "baserom.gba", 0x5dfda0, 0x18
gUnknown_085DFDB8:: @ 85DFDB8
- .incbin "baserom.gba", 0x5dfdb8, 0x8
+ .4byte gUsePokeblockCondition_Pal
+ .4byte 1
diff --git a/data/wild_encounter.s b/data/wild_encounter.s
index 0b46e3d35..914471769 100644
--- a/data/wild_encounter.s
+++ b/data/wild_encounter.s
@@ -1,9 +1,9 @@
#include "constants/species.h"
- .include "asm/macros.inc"
- .include "constants/constants.inc"
+ .include "asm/macros.inc"
+ .include "constants/constants.inc"
- .section .rodata
- .align 2, 0
+ .section .rodata
+ .align 2, 0
@ 85507E4
.include "data/wild_mons.inc"
diff --git a/graphics/battle_anims/backgrounds/00.bin b/graphics/battle_anims/backgrounds/00.bin
new file mode 100755
index 000000000..dc70b2cf8
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/00.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/00.png b/graphics/battle_anims/backgrounds/00.png
new file mode 100755
index 000000000..f88de79c3
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/00.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/02.bin b/graphics/battle_anims/backgrounds/02.bin
new file mode 100755
index 000000000..fabe87b3f
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/02.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/02.png b/graphics/battle_anims/backgrounds/02.png
new file mode 100755
index 000000000..c4519d909
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/02.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/03.bin b/graphics/battle_anims/backgrounds/03.bin
new file mode 100755
index 000000000..f642d1c7a
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/03.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/03.png b/graphics/battle_anims/backgrounds/03.png
new file mode 100755
index 000000000..2c2f9de87
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/03.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/04.bin b/graphics/battle_anims/backgrounds/04.bin
new file mode 100755
index 000000000..91230cb01
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/04.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/04.png b/graphics/battle_anims/backgrounds/04.png
new file mode 100755
index 000000000..071684622
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/04.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/05.bin b/graphics/battle_anims/backgrounds/05.bin
new file mode 100755
index 000000000..42b26559c
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/05.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/06.bin b/graphics/battle_anims/backgrounds/06.bin
new file mode 100755
index 000000000..ef73f747c
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/06.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/07.bin b/graphics/battle_anims/backgrounds/07.bin
new file mode 100755
index 000000000..ca591c75e
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/07.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/07.png b/graphics/battle_anims/backgrounds/07.png
new file mode 100755
index 000000000..893bcee52
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/07.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/08.bin b/graphics/battle_anims/backgrounds/08.bin
new file mode 100755
index 000000000..8c9716842
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/08.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/09.bin b/graphics/battle_anims/backgrounds/09.bin
new file mode 100755
index 000000000..d414051ce
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/09.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/09.png b/graphics/battle_anims/backgrounds/09.png
new file mode 100755
index 000000000..5746191e7
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/09.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/10.bin b/graphics/battle_anims/backgrounds/10.bin
new file mode 100755
index 000000000..99b488a43
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/10.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/11.bin b/graphics/battle_anims/backgrounds/11.bin
new file mode 100755
index 000000000..6aaaae228
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/11.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/11.png b/graphics/battle_anims/backgrounds/11.png
new file mode 100755
index 000000000..1d63d85bf
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/11.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/12.bin b/graphics/battle_anims/backgrounds/12.bin
new file mode 100755
index 000000000..1c0ae690e
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/12.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/12.png b/graphics/battle_anims/backgrounds/12.png
new file mode 100755
index 000000000..cd831bb8f
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/12.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/13.bin b/graphics/battle_anims/backgrounds/13.bin
new file mode 100755
index 000000000..89556edc3
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/13.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/14.bin b/graphics/battle_anims/backgrounds/14.bin
new file mode 100755
index 000000000..2181a0227
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/14.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/15.bin b/graphics/battle_anims/backgrounds/15.bin
new file mode 100755
index 000000000..5b0aff44b
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/15.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/15.png b/graphics/battle_anims/backgrounds/15.png
new file mode 100755
index 000000000..818811701
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/15.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/16.bin b/graphics/battle_anims/backgrounds/16.bin
new file mode 100755
index 000000000..54740367a
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/16.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/16.png b/graphics/battle_anims/backgrounds/16.png
new file mode 100755
index 000000000..6b0aa4973
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/16.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/17.bin b/graphics/battle_anims/backgrounds/17.bin
new file mode 100755
index 000000000..8cb199d05
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/17.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/17.png b/graphics/battle_anims/backgrounds/17.png
new file mode 100755
index 000000000..5f9dd14dd
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/17.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/18.pal b/graphics/battle_anims/backgrounds/18.pal
new file mode 100755
index 000000000..df2b878f6
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/18.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+106 205 197
+222 0 0
+189 0 0
+156 0 0
+123 0 0
+98 0 0
+0 0 0
+255 255 255
+230 246 238
+205 238 230
+180 230 222
+156 222 213
+131 213 205
+106 205 197
+0 0 0
diff --git a/graphics/battle_anims/backgrounds/20.bin b/graphics/battle_anims/backgrounds/20.bin
new file mode 100755
index 000000000..d72acf171
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/20.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/20.png b/graphics/battle_anims/backgrounds/20.png
new file mode 100755
index 000000000..34f22002a
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/20.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/21.bin b/graphics/battle_anims/backgrounds/21.bin
new file mode 100755
index 000000000..e3d6f46e9
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/21.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/21.png b/graphics/battle_anims/backgrounds/21.png
new file mode 100755
index 000000000..1571a1d69
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/21.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/22.pal b/graphics/battle_anims/backgrounds/22.pal
new file mode 100755
index 000000000..e8c5f59dc
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/22.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+131 123 74
+139 139 90
+156 156 115
+172 172 139
+189 189 164
+205 205 180
+222 222 205
+238 238 230
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/backgrounds/24.pal b/graphics/battle_anims/backgrounds/24.pal
new file mode 100755
index 000000000..5eec18c67
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/24.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 197 74
+255 205 98
+255 213 123
+255 222 148
+255 230 172
+255 238 197
+255 246 222
+255 255 255
+255 189 74
+255 238 180
+255 230 139
+255 222 106
+255 213 74
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/backgrounds/attract.bin b/graphics/battle_anims/backgrounds/attract.bin
new file mode 100755
index 000000000..b06f46479
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/attract.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/attract.png b/graphics/battle_anims/backgrounds/attract.png
new file mode 100755
index 000000000..c5bba0f89
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/attract.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/fog.bin b/graphics/battle_anims/backgrounds/fog.bin
new file mode 100755
index 000000000..1f9d53f95
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/fog.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/sandstorm_brew.bin b/graphics/battle_anims/backgrounds/sandstorm_brew.bin
new file mode 100755
index 000000000..64e6d8584
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/sandstorm_brew.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/sandstorm_brew.png b/graphics/battle_anims/backgrounds/sandstorm_brew.png
new file mode 100755
index 000000000..87d5d41ea
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/sandstorm_brew.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/scary_face.png b/graphics/battle_anims/backgrounds/scary_face.png
new file mode 100755
index 000000000..a395485cf
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/scary_face.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/scary_face_contest.bin b/graphics/battle_anims/backgrounds/scary_face_contest.bin
new file mode 100755
index 000000000..e2d1e3a99
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/scary_face_contest.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/scary_face_opponent.bin b/graphics/battle_anims/backgrounds/scary_face_opponent.bin
new file mode 100755
index 000000000..dfaaf5f2f
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/scary_face_opponent.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/scary_face_player.bin b/graphics/battle_anims/backgrounds/scary_face_player.bin
new file mode 100755
index 000000000..690305126
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/scary_face_player.bin
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/water.png b/graphics/battle_anims/backgrounds/water.png
new file mode 100755
index 000000000..7740f99f8
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/water.png
Binary files differ
diff --git a/graphics/battle_anims/backgrounds/water_muddy.pal b/graphics/battle_anims/backgrounds/water_muddy.pal
new file mode 100755
index 000000000..0cb7218d9
--- /dev/null
+++ b/graphics/battle_anims/backgrounds/water_muddy.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+131 49 0
+148 74 32
+164 106 65
+180 131 106
+197 164 139
+213 189 180
+230 222 213
+255 255 255
+148 74 32
+164 106 65
+197 164 139
+230 222 213
+255 255 255
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/masks/cure_bubbles.bin b/graphics/battle_anims/masks/cure_bubbles.bin
new file mode 100755
index 000000000..fa2f572b6
--- /dev/null
+++ b/graphics/battle_anims/masks/cure_bubbles.bin
Binary files differ
diff --git a/graphics/battle_anims/masks/cure_bubbles.png b/graphics/battle_anims/masks/cure_bubbles.png
new file mode 100755
index 000000000..aa7f7b1f2
--- /dev/null
+++ b/graphics/battle_anims/masks/cure_bubbles.png
Binary files differ
diff --git a/graphics/battle_anims/masks/curse.bin b/graphics/battle_anims/masks/curse.bin
new file mode 100755
index 000000000..1e9623948
--- /dev/null
+++ b/graphics/battle_anims/masks/curse.bin
Binary files differ
diff --git a/graphics/battle_anims/masks/curse.png b/graphics/battle_anims/masks/curse.png
new file mode 100755
index 000000000..03979ee8d
--- /dev/null
+++ b/graphics/battle_anims/masks/curse.png
Binary files differ
diff --git a/graphics/battle_anims/masks/metal_shine.bin b/graphics/battle_anims/masks/metal_shine.bin
new file mode 100755
index 000000000..fed60df36
--- /dev/null
+++ b/graphics/battle_anims/masks/metal_shine.bin
Binary files differ
diff --git a/graphics/battle_anims/masks/metal_shine.png b/graphics/battle_anims/masks/metal_shine.png
new file mode 100755
index 000000000..a9c5a952c
--- /dev/null
+++ b/graphics/battle_anims/masks/metal_shine.png
Binary files differ
diff --git a/graphics/battle_anims/masks/morning_sun.bin b/graphics/battle_anims/masks/morning_sun.bin
new file mode 100755
index 000000000..cfa7b8069
--- /dev/null
+++ b/graphics/battle_anims/masks/morning_sun.bin
Binary files differ
diff --git a/graphics/battle_anims/masks/morning_sun.png b/graphics/battle_anims/masks/morning_sun.png
new file mode 100755
index 000000000..c10b02782
--- /dev/null
+++ b/graphics/battle_anims/masks/morning_sun.png
Binary files differ
diff --git a/graphics/battle_anims/masks/stat.png b/graphics/battle_anims/masks/stat.png
new file mode 100755
index 000000000..0a6014ccd
--- /dev/null
+++ b/graphics/battle_anims/masks/stat.png
Binary files differ
diff --git a/graphics/battle_anims/masks/stat1.pal b/graphics/battle_anims/masks/stat1.pal
new file mode 100755
index 000000000..d4128a31f
--- /dev/null
+++ b/graphics/battle_anims/masks/stat1.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+222 255 205
+189 255 164
+156 255 123
+115 222 90
+74 197 57
+32 172 24
+0 148 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/masks/stat2.pal b/graphics/battle_anims/masks/stat2.pal
new file mode 100755
index 000000000..434b06e8d
--- /dev/null
+++ b/graphics/battle_anims/masks/stat2.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+255 255 189
+255 255 123
+255 255 57
+255 189 41
+255 131 32
+255 65 16
+255 8 8
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/masks/stat3.pal b/graphics/battle_anims/masks/stat3.pal
new file mode 100755
index 000000000..784e5c640
--- /dev/null
+++ b/graphics/battle_anims/masks/stat3.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+238 222 246
+222 189 246
+205 156 246
+197 123 246
+197 123 246
+164 90 213
+131 57 180
+106 24 148
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/masks/stat4.pal b/graphics/battle_anims/masks/stat4.pal
new file mode 100755
index 000000000..2868f2479
--- /dev/null
+++ b/graphics/battle_anims/masks/stat4.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+189 255 255
+123 255 255
+57 255 255
+57 205 238
+57 156 230
+57 106 213
+65 57 205
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/masks/stat5.pal b/graphics/battle_anims/masks/stat5.pal
new file mode 100755
index 000000000..4991b1bd7
--- /dev/null
+++ b/graphics/battle_anims/masks/stat5.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+230 230 230
+205 205 205
+180 180 189
+164 164 164
+139 139 148
+115 115 123
+98 98 106
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/masks/stat6.pal b/graphics/battle_anims/masks/stat6.pal
new file mode 100755
index 000000000..f647ff4b3
--- /dev/null
+++ b/graphics/battle_anims/masks/stat6.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+205 246 230
+156 246 213
+106 246 197
+57 246 180
+32 213 148
+16 180 123
+0 148 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/masks/stat7.pal b/graphics/battle_anims/masks/stat7.pal
new file mode 100755
index 000000000..4935eba7c
--- /dev/null
+++ b/graphics/battle_anims/masks/stat7.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 8 8
+255 65 16
+255 131 32
+255 189 41
+255 255 57
+255 255 123
+255 255 189
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/masks/stat8.pal b/graphics/battle_anims/masks/stat8.pal
new file mode 100755
index 000000000..ab1758e37
--- /dev/null
+++ b/graphics/battle_anims/masks/stat8.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+0 148 0
+32 172 24
+74 197 57
+115 222 90
+156 255 123
+189 255 164
+222 255 205
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/masks/stat_tilemap_1.bin b/graphics/battle_anims/masks/stat_tilemap_1.bin
new file mode 100755
index 000000000..1b65e515a
--- /dev/null
+++ b/graphics/battle_anims/masks/stat_tilemap_1.bin
Binary files differ
diff --git a/graphics/battle_anims/masks/stat_tilemap_2.bin b/graphics/battle_anims/masks/stat_tilemap_2.bin
new file mode 100755
index 000000000..eb336cb74
--- /dev/null
+++ b/graphics/battle_anims/masks/stat_tilemap_2.bin
@@ -0,0 +1 @@
+$%&'$%&'$%&'$%&'$%&'$%&'$%&'$%&'45674567456745674567456745674567$%&'$%&'$%&'$%&'$%&'$%&'$%&'$%&'45674567456745674567456745674567$%&'$%&'$%&'$%&'$%&'$%&'$%&'$%&'45674567456745674567456745674567$%&'$%&'$%&'$%&'$%&'$%&'$%&'$%&'45674567456745674567456745674567$%&'$%&'$%&'$%&'$%&'$%&'$%&'$%&'45674567456745674567456745674567$%&'$%&'$%&'$%&'$%&'$%&'$%&'$%&'45674567456745674567456745674567$%&'$%&'$%&'$%&'$%&'$%&'$%&'$%&'45674567456745674567456745674567$%&'$%&'$%&'$%&'$%&'$%&'$%&'$%&'45674567456745674567456745674567 \ No newline at end of file
diff --git a/graphics/battle_anims/masks/unknown_C2EA50.bin b/graphics/battle_anims/masks/unknown_C2EA50.bin
new file mode 100755
index 000000000..712c1ee12
--- /dev/null
+++ b/graphics/battle_anims/masks/unknown_C2EA50.bin
Binary files differ
diff --git a/graphics/battle_anims/masks/unknown_C2EA50.png b/graphics/battle_anims/masks/unknown_C2EA50.png
new file mode 100755
index 000000000..d0b372cbb
--- /dev/null
+++ b/graphics/battle_anims/masks/unknown_C2EA50.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/000.png b/graphics/battle_anims/sprites/000.png
new file mode 100755
index 000000000..3d8662a86
--- /dev/null
+++ b/graphics/battle_anims/sprites/000.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/001.pal b/graphics/battle_anims/sprites/001.pal
new file mode 100755
index 000000000..81af310e1
--- /dev/null
+++ b/graphics/battle_anims/sprites/001.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+255 139 0
+255 156 8
+255 172 24
+255 197 41
+255 213 57
+255 230 74
+255 255 90
+255 255 255
+255 74 106
+255 115 148
+255 164 197
+255 205 238
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/001_0.png b/graphics/battle_anims/sprites/001_0.png
new file mode 100755
index 000000000..77c454dcb
--- /dev/null
+++ b/graphics/battle_anims/sprites/001_0.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/001_1.png b/graphics/battle_anims/sprites/001_1.png
new file mode 100755
index 000000000..2cfd6bd0b
--- /dev/null
+++ b/graphics/battle_anims/sprites/001_1.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/002.png b/graphics/battle_anims/sprites/002.png
new file mode 100755
index 000000000..c2a98f6f5
--- /dev/null
+++ b/graphics/battle_anims/sprites/002.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/003.png b/graphics/battle_anims/sprites/003.png
new file mode 100755
index 000000000..b3164ff01
--- /dev/null
+++ b/graphics/battle_anims/sprites/003.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/004.png b/graphics/battle_anims/sprites/004.png
new file mode 100755
index 000000000..c7cad5ef9
--- /dev/null
+++ b/graphics/battle_anims/sprites/004.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/005.png b/graphics/battle_anims/sprites/005.png
new file mode 100755
index 000000000..8bd4ac426
--- /dev/null
+++ b/graphics/battle_anims/sprites/005.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/006.png b/graphics/battle_anims/sprites/006.png
new file mode 100755
index 000000000..30e2dffc1
--- /dev/null
+++ b/graphics/battle_anims/sprites/006.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/007.png b/graphics/battle_anims/sprites/007.png
new file mode 100755
index 000000000..5a2369dad
--- /dev/null
+++ b/graphics/battle_anims/sprites/007.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/008.png b/graphics/battle_anims/sprites/008.png
new file mode 100755
index 000000000..634c4d2bb
--- /dev/null
+++ b/graphics/battle_anims/sprites/008.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/009.png b/graphics/battle_anims/sprites/009.png
new file mode 100755
index 000000000..5818ae41d
--- /dev/null
+++ b/graphics/battle_anims/sprites/009.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/010.pal b/graphics/battle_anims/sprites/010.pal
new file mode 100755
index 000000000..c5f241feb
--- /dev/null
+++ b/graphics/battle_anims/sprites/010.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+106 148 139
+98 90 255
+115 106 255
+139 131 255
+164 156 255
+180 180 255
+205 205 255
+230 230 255
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+180 180 255
+205 205 255
+230 230 255
diff --git a/graphics/battle_anims/sprites/010_0.png b/graphics/battle_anims/sprites/010_0.png
new file mode 100755
index 000000000..8eea99de0
--- /dev/null
+++ b/graphics/battle_anims/sprites/010_0.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/010_1.png b/graphics/battle_anims/sprites/010_1.png
new file mode 100755
index 000000000..ba3ca6192
--- /dev/null
+++ b/graphics/battle_anims/sprites/010_1.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/010_2.png b/graphics/battle_anims/sprites/010_2.png
new file mode 100755
index 000000000..b71a875e7
--- /dev/null
+++ b/graphics/battle_anims/sprites/010_2.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/010_3.png b/graphics/battle_anims/sprites/010_3.png
new file mode 100755
index 000000000..e310ca5df
--- /dev/null
+++ b/graphics/battle_anims/sprites/010_3.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/011.png b/graphics/battle_anims/sprites/011.png
new file mode 100755
index 000000000..23ce049b0
--- /dev/null
+++ b/graphics/battle_anims/sprites/011.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/012.png b/graphics/battle_anims/sprites/012.png
new file mode 100755
index 000000000..1a9e4c870
--- /dev/null
+++ b/graphics/battle_anims/sprites/012.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/013.png b/graphics/battle_anims/sprites/013.png
new file mode 100755
index 000000000..407671ff6
--- /dev/null
+++ b/graphics/battle_anims/sprites/013.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/014.png b/graphics/battle_anims/sprites/014.png
new file mode 100755
index 000000000..ab635306b
--- /dev/null
+++ b/graphics/battle_anims/sprites/014.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/015.png b/graphics/battle_anims/sprites/015.png
new file mode 100755
index 000000000..48895d36a
--- /dev/null
+++ b/graphics/battle_anims/sprites/015.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/016.png b/graphics/battle_anims/sprites/016.png
new file mode 100755
index 000000000..df9651411
--- /dev/null
+++ b/graphics/battle_anims/sprites/016.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/017.png b/graphics/battle_anims/sprites/017.png
new file mode 100755
index 000000000..e287698b4
--- /dev/null
+++ b/graphics/battle_anims/sprites/017.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/018.png b/graphics/battle_anims/sprites/018.png
new file mode 100755
index 000000000..c760ff81a
--- /dev/null
+++ b/graphics/battle_anims/sprites/018.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/019.png b/graphics/battle_anims/sprites/019.png
new file mode 100755
index 000000000..af29ec730
--- /dev/null
+++ b/graphics/battle_anims/sprites/019.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/020.png b/graphics/battle_anims/sprites/020.png
new file mode 100755
index 000000000..73c7f1344
--- /dev/null
+++ b/graphics/battle_anims/sprites/020.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/021.png b/graphics/battle_anims/sprites/021.png
new file mode 100755
index 000000000..c531b820c
--- /dev/null
+++ b/graphics/battle_anims/sprites/021.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/022.pal b/graphics/battle_anims/sprites/022.pal
new file mode 100755
index 000000000..35cbf0096
--- /dev/null
+++ b/graphics/battle_anims/sprites/022.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+205 255 255
+156 255 255
+106 255 255
+57 255 255
+8 255 255
+8 205 255
+8 156 255
+8 106 255
+8 57 255
+8 8 255
+8 8 106
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/023.png b/graphics/battle_anims/sprites/023.png
new file mode 100755
index 000000000..a1dbc20c2
--- /dev/null
+++ b/graphics/battle_anims/sprites/023.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/024.png b/graphics/battle_anims/sprites/024.png
new file mode 100755
index 000000000..7c5d0f382
--- /dev/null
+++ b/graphics/battle_anims/sprites/024.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/025.png b/graphics/battle_anims/sprites/025.png
new file mode 100755
index 000000000..864f71065
--- /dev/null
+++ b/graphics/battle_anims/sprites/025.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/026.png b/graphics/battle_anims/sprites/026.png
new file mode 100755
index 000000000..c531b820c
--- /dev/null
+++ b/graphics/battle_anims/sprites/026.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/027.png b/graphics/battle_anims/sprites/027.png
new file mode 100755
index 000000000..28b3876b7
--- /dev/null
+++ b/graphics/battle_anims/sprites/027.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/028.png b/graphics/battle_anims/sprites/028.png
new file mode 100755
index 000000000..b3a096996
--- /dev/null
+++ b/graphics/battle_anims/sprites/028.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/029.png b/graphics/battle_anims/sprites/029.png
new file mode 100755
index 000000000..b04a8dc65
--- /dev/null
+++ b/graphics/battle_anims/sprites/029.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/030.png b/graphics/battle_anims/sprites/030.png
new file mode 100755
index 000000000..ba7161fa1
--- /dev/null
+++ b/graphics/battle_anims/sprites/030.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/031.png b/graphics/battle_anims/sprites/031.png
new file mode 100755
index 000000000..c6727ad1c
--- /dev/null
+++ b/graphics/battle_anims/sprites/031.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/032.png b/graphics/battle_anims/sprites/032.png
new file mode 100755
index 000000000..80ffb7b72
--- /dev/null
+++ b/graphics/battle_anims/sprites/032.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/033.png b/graphics/battle_anims/sprites/033.png
new file mode 100755
index 000000000..eb1ed3473
--- /dev/null
+++ b/graphics/battle_anims/sprites/033.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/034.png b/graphics/battle_anims/sprites/034.png
new file mode 100755
index 000000000..22f836d1e
--- /dev/null
+++ b/graphics/battle_anims/sprites/034.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/035.png b/graphics/battle_anims/sprites/035.png
new file mode 100755
index 000000000..cde2105dd
--- /dev/null
+++ b/graphics/battle_anims/sprites/035.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/036.png b/graphics/battle_anims/sprites/036.png
new file mode 100755
index 000000000..bddf4a25a
--- /dev/null
+++ b/graphics/battle_anims/sprites/036.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/037.png b/graphics/battle_anims/sprites/037.png
new file mode 100755
index 000000000..62a692036
--- /dev/null
+++ b/graphics/battle_anims/sprites/037.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/038.png b/graphics/battle_anims/sprites/038.png
new file mode 100755
index 000000000..2dfa037c1
--- /dev/null
+++ b/graphics/battle_anims/sprites/038.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/039.png b/graphics/battle_anims/sprites/039.png
new file mode 100755
index 000000000..bc61b20d7
--- /dev/null
+++ b/graphics/battle_anims/sprites/039.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/040.png b/graphics/battle_anims/sprites/040.png
new file mode 100755
index 000000000..c7d493d92
--- /dev/null
+++ b/graphics/battle_anims/sprites/040.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/041.png b/graphics/battle_anims/sprites/041.png
new file mode 100755
index 000000000..e088c1f86
--- /dev/null
+++ b/graphics/battle_anims/sprites/041.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/042.png b/graphics/battle_anims/sprites/042.png
new file mode 100755
index 000000000..cf8909080
--- /dev/null
+++ b/graphics/battle_anims/sprites/042.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/043.png b/graphics/battle_anims/sprites/043.png
new file mode 100755
index 000000000..e5e929ede
--- /dev/null
+++ b/graphics/battle_anims/sprites/043.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/044.png b/graphics/battle_anims/sprites/044.png
new file mode 100755
index 000000000..7baf82357
--- /dev/null
+++ b/graphics/battle_anims/sprites/044.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/045.png b/graphics/battle_anims/sprites/045.png
new file mode 100755
index 000000000..45aeae356
--- /dev/null
+++ b/graphics/battle_anims/sprites/045.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/046.png b/graphics/battle_anims/sprites/046.png
new file mode 100755
index 000000000..85a052486
--- /dev/null
+++ b/graphics/battle_anims/sprites/046.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/047.pal b/graphics/battle_anims/sprites/047.pal
new file mode 100755
index 000000000..226cf039a
--- /dev/null
+++ b/graphics/battle_anims/sprites/047.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+148 246 197
+255 255 255
+255 255 205
+238 205 164
+222 164 131
+222 115 106
+230 65 82
+180 32 90
+131 0 106
+90 0 82
+57 0 57
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/048.png b/graphics/battle_anims/sprites/048.png
new file mode 100755
index 000000000..4a6631ab8
--- /dev/null
+++ b/graphics/battle_anims/sprites/048.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/049.pal b/graphics/battle_anims/sprites/049.pal
new file mode 100755
index 000000000..268ce4f4f
--- /dev/null
+++ b/graphics/battle_anims/sprites/049.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+255 255 148
+255 230 74
+255 205 0
+230 156 0
+205 106 0
+189 57 0
+255 148 24
+255 98 16
+255 49 8
+255 0 0
+156 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/050.png b/graphics/battle_anims/sprites/050.png
new file mode 100755
index 000000000..9f2c101e4
--- /dev/null
+++ b/graphics/battle_anims/sprites/050.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/051.png b/graphics/battle_anims/sprites/051.png
new file mode 100755
index 000000000..14d7036bc
--- /dev/null
+++ b/graphics/battle_anims/sprites/051.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/052.png b/graphics/battle_anims/sprites/052.png
new file mode 100755
index 000000000..9928271d5
--- /dev/null
+++ b/graphics/battle_anims/sprites/052.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/053.png b/graphics/battle_anims/sprites/053.png
new file mode 100755
index 000000000..9aaccf334
--- /dev/null
+++ b/graphics/battle_anims/sprites/053.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/054.png b/graphics/battle_anims/sprites/054.png
new file mode 100755
index 000000000..afffd9e77
--- /dev/null
+++ b/graphics/battle_anims/sprites/054.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/055.png b/graphics/battle_anims/sprites/055.png
new file mode 100755
index 000000000..bd6590322
--- /dev/null
+++ b/graphics/battle_anims/sprites/055.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/056.png b/graphics/battle_anims/sprites/056.png
new file mode 100755
index 000000000..1a10645a4
--- /dev/null
+++ b/graphics/battle_anims/sprites/056.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/057.png b/graphics/battle_anims/sprites/057.png
new file mode 100755
index 000000000..ffc3f7634
--- /dev/null
+++ b/graphics/battle_anims/sprites/057.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/058.png b/graphics/battle_anims/sprites/058.png
new file mode 100755
index 000000000..89e01f78a
--- /dev/null
+++ b/graphics/battle_anims/sprites/058.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/059.png b/graphics/battle_anims/sprites/059.png
new file mode 100755
index 000000000..4d93be124
--- /dev/null
+++ b/graphics/battle_anims/sprites/059.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/060.png b/graphics/battle_anims/sprites/060.png
new file mode 100755
index 000000000..c4c0fb53e
--- /dev/null
+++ b/graphics/battle_anims/sprites/060.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/061.png b/graphics/battle_anims/sprites/061.png
new file mode 100755
index 000000000..6efa4e537
--- /dev/null
+++ b/graphics/battle_anims/sprites/061.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/062.png b/graphics/battle_anims/sprites/062.png
new file mode 100755
index 000000000..bdfaa78c4
--- /dev/null
+++ b/graphics/battle_anims/sprites/062.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/063.png b/graphics/battle_anims/sprites/063.png
new file mode 100755
index 000000000..8828f4e8d
--- /dev/null
+++ b/graphics/battle_anims/sprites/063.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/064.png b/graphics/battle_anims/sprites/064.png
new file mode 100755
index 000000000..069f4a311
--- /dev/null
+++ b/graphics/battle_anims/sprites/064.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/065.png b/graphics/battle_anims/sprites/065.png
new file mode 100755
index 000000000..8916253e4
--- /dev/null
+++ b/graphics/battle_anims/sprites/065.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/066.png b/graphics/battle_anims/sprites/066.png
new file mode 100755
index 000000000..d70924235
--- /dev/null
+++ b/graphics/battle_anims/sprites/066.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/067.pal b/graphics/battle_anims/sprites/067.pal
new file mode 100755
index 000000000..4c3a4265e
--- /dev/null
+++ b/graphics/battle_anims/sprites/067.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 197 246
+255 255 255
+230 246 189
+213 246 123
+197 246 57
+180 246 0
+156 222 24
+131 197 49
+106 172 74
+82 148 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/068.pal b/graphics/battle_anims/sprites/068.pal
new file mode 100755
index 000000000..3075ab6b6
--- /dev/null
+++ b/graphics/battle_anims/sprites/068.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 197 246
+255 255 255
+255 246 164
+255 246 82
+255 246 0
+255 246 0
+246 213 0
+238 180 0
+230 148 0
+230 115 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/070.png b/graphics/battle_anims/sprites/070.png
new file mode 100755
index 000000000..dfb03010c
--- /dev/null
+++ b/graphics/battle_anims/sprites/070.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/071.png b/graphics/battle_anims/sprites/071.png
new file mode 100755
index 000000000..88d20bb5e
--- /dev/null
+++ b/graphics/battle_anims/sprites/071.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/072.png b/graphics/battle_anims/sprites/072.png
new file mode 100755
index 000000000..14976ded1
--- /dev/null
+++ b/graphics/battle_anims/sprites/072.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/073.png b/graphics/battle_anims/sprites/073.png
new file mode 100755
index 000000000..95484d2a0
--- /dev/null
+++ b/graphics/battle_anims/sprites/073.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/074.pal b/graphics/battle_anims/sprites/074.pal
new file mode 100755
index 000000000..f8976f672
--- /dev/null
+++ b/graphics/battle_anims/sprites/074.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+115 106 98
+82 82 82
+164 164 164
+255 255 255
+197 180 115
+164 148 82
+131 115 57
+98 82 24
+74 57 0
+205 205 197
+131 131 131
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/074_0.png b/graphics/battle_anims/sprites/074_0.png
new file mode 100755
index 000000000..81af47193
--- /dev/null
+++ b/graphics/battle_anims/sprites/074_0.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/074_1.png b/graphics/battle_anims/sprites/074_1.png
new file mode 100755
index 000000000..827ec5d48
--- /dev/null
+++ b/graphics/battle_anims/sprites/074_1.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/075.png b/graphics/battle_anims/sprites/075.png
new file mode 100755
index 000000000..9455a1962
--- /dev/null
+++ b/graphics/battle_anims/sprites/075.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/076.png b/graphics/battle_anims/sprites/076.png
new file mode 100755
index 000000000..4d6d9d0c1
--- /dev/null
+++ b/graphics/battle_anims/sprites/076.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/077.png b/graphics/battle_anims/sprites/077.png
new file mode 100755
index 000000000..c2cc22be3
--- /dev/null
+++ b/graphics/battle_anims/sprites/077.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/078.png b/graphics/battle_anims/sprites/078.png
new file mode 100755
index 000000000..b48af4900
--- /dev/null
+++ b/graphics/battle_anims/sprites/078.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/079.png b/graphics/battle_anims/sprites/079.png
new file mode 100755
index 000000000..193ba3942
--- /dev/null
+++ b/graphics/battle_anims/sprites/079.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/080.png b/graphics/battle_anims/sprites/080.png
new file mode 100755
index 000000000..f4089ee01
--- /dev/null
+++ b/graphics/battle_anims/sprites/080.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/081.png b/graphics/battle_anims/sprites/081.png
new file mode 100755
index 000000000..0d6783cd9
--- /dev/null
+++ b/graphics/battle_anims/sprites/081.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/082.png b/graphics/battle_anims/sprites/082.png
new file mode 100755
index 000000000..a1b2d7318
--- /dev/null
+++ b/graphics/battle_anims/sprites/082.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/083.png b/graphics/battle_anims/sprites/083.png
new file mode 100755
index 000000000..8e8178422
--- /dev/null
+++ b/graphics/battle_anims/sprites/083.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/084.png b/graphics/battle_anims/sprites/084.png
new file mode 100755
index 000000000..306668035
--- /dev/null
+++ b/graphics/battle_anims/sprites/084.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/085.png b/graphics/battle_anims/sprites/085.png
new file mode 100755
index 000000000..ab9fdce5e
--- /dev/null
+++ b/graphics/battle_anims/sprites/085.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/086.png b/graphics/battle_anims/sprites/086.png
new file mode 100755
index 000000000..ba93d952e
--- /dev/null
+++ b/graphics/battle_anims/sprites/086.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/087.png b/graphics/battle_anims/sprites/087.png
new file mode 100755
index 000000000..e0e88687e
--- /dev/null
+++ b/graphics/battle_anims/sprites/087.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/088.png b/graphics/battle_anims/sprites/088.png
new file mode 100755
index 000000000..09fed7d85
--- /dev/null
+++ b/graphics/battle_anims/sprites/088.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/089.png b/graphics/battle_anims/sprites/089.png
new file mode 100755
index 000000000..19155f2c4
--- /dev/null
+++ b/graphics/battle_anims/sprites/089.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/090.png b/graphics/battle_anims/sprites/090.png
new file mode 100755
index 000000000..c90ff299d
--- /dev/null
+++ b/graphics/battle_anims/sprites/090.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/091.png b/graphics/battle_anims/sprites/091.png
new file mode 100755
index 000000000..7648de5aa
--- /dev/null
+++ b/graphics/battle_anims/sprites/091.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/092.png b/graphics/battle_anims/sprites/092.png
new file mode 100755
index 000000000..8d98d6eaa
--- /dev/null
+++ b/graphics/battle_anims/sprites/092.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/093.png b/graphics/battle_anims/sprites/093.png
new file mode 100755
index 000000000..29f9e6a50
--- /dev/null
+++ b/graphics/battle_anims/sprites/093.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/094.png b/graphics/battle_anims/sprites/094.png
new file mode 100755
index 000000000..c29ff535d
--- /dev/null
+++ b/graphics/battle_anims/sprites/094.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/095.png b/graphics/battle_anims/sprites/095.png
new file mode 100755
index 000000000..616b02121
--- /dev/null
+++ b/graphics/battle_anims/sprites/095.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/096.png b/graphics/battle_anims/sprites/096.png
new file mode 100755
index 000000000..99873ba10
--- /dev/null
+++ b/graphics/battle_anims/sprites/096.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/097.png b/graphics/battle_anims/sprites/097.png
new file mode 100755
index 000000000..5366d02cf
--- /dev/null
+++ b/graphics/battle_anims/sprites/097.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/098.png b/graphics/battle_anims/sprites/098.png
new file mode 100755
index 000000000..33cfd705c
--- /dev/null
+++ b/graphics/battle_anims/sprites/098.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/099.png b/graphics/battle_anims/sprites/099.png
new file mode 100755
index 000000000..a7a79f8bf
--- /dev/null
+++ b/graphics/battle_anims/sprites/099.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/100.png b/graphics/battle_anims/sprites/100.png
new file mode 100755
index 000000000..057655918
--- /dev/null
+++ b/graphics/battle_anims/sprites/100.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/101.png b/graphics/battle_anims/sprites/101.png
new file mode 100755
index 000000000..f2fa227f2
--- /dev/null
+++ b/graphics/battle_anims/sprites/101.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/102.png b/graphics/battle_anims/sprites/102.png
new file mode 100755
index 000000000..aa8842244
--- /dev/null
+++ b/graphics/battle_anims/sprites/102.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/103.png b/graphics/battle_anims/sprites/103.png
new file mode 100755
index 000000000..0ad9c1b14
--- /dev/null
+++ b/graphics/battle_anims/sprites/103.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/104.png b/graphics/battle_anims/sprites/104.png
new file mode 100755
index 000000000..7c4244da0
--- /dev/null
+++ b/graphics/battle_anims/sprites/104.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/105.png b/graphics/battle_anims/sprites/105.png
new file mode 100755
index 000000000..5df0e7215
--- /dev/null
+++ b/graphics/battle_anims/sprites/105.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/106.png b/graphics/battle_anims/sprites/106.png
new file mode 100755
index 000000000..82297fb00
--- /dev/null
+++ b/graphics/battle_anims/sprites/106.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/107.png b/graphics/battle_anims/sprites/107.png
new file mode 100755
index 000000000..202152ab4
--- /dev/null
+++ b/graphics/battle_anims/sprites/107.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/108.png b/graphics/battle_anims/sprites/108.png
new file mode 100755
index 000000000..f3f5871b4
--- /dev/null
+++ b/graphics/battle_anims/sprites/108.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/109.png b/graphics/battle_anims/sprites/109.png
new file mode 100755
index 000000000..f848e388b
--- /dev/null
+++ b/graphics/battle_anims/sprites/109.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/110.png b/graphics/battle_anims/sprites/110.png
new file mode 100755
index 000000000..787cb58c3
--- /dev/null
+++ b/graphics/battle_anims/sprites/110.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/111.png b/graphics/battle_anims/sprites/111.png
new file mode 100755
index 000000000..2bbbe8694
--- /dev/null
+++ b/graphics/battle_anims/sprites/111.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/112.png b/graphics/battle_anims/sprites/112.png
new file mode 100755
index 000000000..4503849e9
--- /dev/null
+++ b/graphics/battle_anims/sprites/112.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/113.png b/graphics/battle_anims/sprites/113.png
new file mode 100755
index 000000000..3a4a5b328
--- /dev/null
+++ b/graphics/battle_anims/sprites/113.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/114.png b/graphics/battle_anims/sprites/114.png
new file mode 100755
index 000000000..b1bee0080
--- /dev/null
+++ b/graphics/battle_anims/sprites/114.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/115.png b/graphics/battle_anims/sprites/115.png
new file mode 100755
index 000000000..51c909134
--- /dev/null
+++ b/graphics/battle_anims/sprites/115.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/116.png b/graphics/battle_anims/sprites/116.png
new file mode 100755
index 000000000..b9e0df20e
--- /dev/null
+++ b/graphics/battle_anims/sprites/116.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/117.png b/graphics/battle_anims/sprites/117.png
new file mode 100755
index 000000000..f2c7e1b41
--- /dev/null
+++ b/graphics/battle_anims/sprites/117.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/118.png b/graphics/battle_anims/sprites/118.png
new file mode 100755
index 000000000..6e2075e51
--- /dev/null
+++ b/graphics/battle_anims/sprites/118.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/119.png b/graphics/battle_anims/sprites/119.png
new file mode 100755
index 000000000..93e03bb00
--- /dev/null
+++ b/graphics/battle_anims/sprites/119.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/120.png b/graphics/battle_anims/sprites/120.png
new file mode 100755
index 000000000..58e15e018
--- /dev/null
+++ b/graphics/battle_anims/sprites/120.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/121.png b/graphics/battle_anims/sprites/121.png
new file mode 100755
index 000000000..c4fc11f86
--- /dev/null
+++ b/graphics/battle_anims/sprites/121.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/122.png b/graphics/battle_anims/sprites/122.png
new file mode 100755
index 000000000..0a1da6c03
--- /dev/null
+++ b/graphics/battle_anims/sprites/122.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/123.png b/graphics/battle_anims/sprites/123.png
new file mode 100755
index 000000000..c1d71a8b7
--- /dev/null
+++ b/graphics/battle_anims/sprites/123.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/124.png b/graphics/battle_anims/sprites/124.png
new file mode 100755
index 000000000..343705a07
--- /dev/null
+++ b/graphics/battle_anims/sprites/124.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/125.png b/graphics/battle_anims/sprites/125.png
new file mode 100755
index 000000000..2bc2c212f
--- /dev/null
+++ b/graphics/battle_anims/sprites/125.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/126.png b/graphics/battle_anims/sprites/126.png
new file mode 100755
index 000000000..9f1962902
--- /dev/null
+++ b/graphics/battle_anims/sprites/126.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/127.png b/graphics/battle_anims/sprites/127.png
new file mode 100755
index 000000000..55706275c
--- /dev/null
+++ b/graphics/battle_anims/sprites/127.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/128.png b/graphics/battle_anims/sprites/128.png
new file mode 100755
index 000000000..fb9e61980
--- /dev/null
+++ b/graphics/battle_anims/sprites/128.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/129.png b/graphics/battle_anims/sprites/129.png
new file mode 100755
index 000000000..c29a44c06
--- /dev/null
+++ b/graphics/battle_anims/sprites/129.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/130.png b/graphics/battle_anims/sprites/130.png
new file mode 100755
index 000000000..4a753e6d5
--- /dev/null
+++ b/graphics/battle_anims/sprites/130.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/131.png b/graphics/battle_anims/sprites/131.png
new file mode 100755
index 000000000..4683e161f
--- /dev/null
+++ b/graphics/battle_anims/sprites/131.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/132.png b/graphics/battle_anims/sprites/132.png
new file mode 100755
index 000000000..ebed3740a
--- /dev/null
+++ b/graphics/battle_anims/sprites/132.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/133.png b/graphics/battle_anims/sprites/133.png
new file mode 100755
index 000000000..cebce575e
--- /dev/null
+++ b/graphics/battle_anims/sprites/133.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/134.png b/graphics/battle_anims/sprites/134.png
new file mode 100755
index 000000000..933852b07
--- /dev/null
+++ b/graphics/battle_anims/sprites/134.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/135.png b/graphics/battle_anims/sprites/135.png
new file mode 100755
index 000000000..38a04f373
--- /dev/null
+++ b/graphics/battle_anims/sprites/135.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/136.png b/graphics/battle_anims/sprites/136.png
new file mode 100755
index 000000000..cc99103d5
--- /dev/null
+++ b/graphics/battle_anims/sprites/136.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/137.png b/graphics/battle_anims/sprites/137.png
new file mode 100755
index 000000000..7f3d26644
--- /dev/null
+++ b/graphics/battle_anims/sprites/137.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/138.png b/graphics/battle_anims/sprites/138.png
new file mode 100755
index 000000000..559244bbc
--- /dev/null
+++ b/graphics/battle_anims/sprites/138.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/139.png b/graphics/battle_anims/sprites/139.png
new file mode 100755
index 000000000..38b74a9e4
--- /dev/null
+++ b/graphics/battle_anims/sprites/139.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/140.png b/graphics/battle_anims/sprites/140.png
new file mode 100755
index 000000000..1133f2ee8
--- /dev/null
+++ b/graphics/battle_anims/sprites/140.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/141.pal b/graphics/battle_anims/sprites/141.pal
new file mode 100755
index 000000000..c5f241feb
--- /dev/null
+++ b/graphics/battle_anims/sprites/141.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+106 148 139
+98 90 255
+115 106 255
+139 131 255
+164 156 255
+180 180 255
+205 205 255
+230 230 255
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+180 180 255
+205 205 255
+230 230 255
diff --git a/graphics/battle_anims/sprites/141_0.png b/graphics/battle_anims/sprites/141_0.png
new file mode 100755
index 000000000..631d344c8
--- /dev/null
+++ b/graphics/battle_anims/sprites/141_0.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/141_1.png b/graphics/battle_anims/sprites/141_1.png
new file mode 100755
index 000000000..95f24953f
--- /dev/null
+++ b/graphics/battle_anims/sprites/141_1.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/141_2.png b/graphics/battle_anims/sprites/141_2.png
new file mode 100755
index 000000000..ec1e4b090
--- /dev/null
+++ b/graphics/battle_anims/sprites/141_2.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/141_3.png b/graphics/battle_anims/sprites/141_3.png
new file mode 100755
index 000000000..02ac9d68e
--- /dev/null
+++ b/graphics/battle_anims/sprites/141_3.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/141_4.png b/graphics/battle_anims/sprites/141_4.png
new file mode 100755
index 000000000..a7af91f4b
--- /dev/null
+++ b/graphics/battle_anims/sprites/141_4.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/142.png b/graphics/battle_anims/sprites/142.png
new file mode 100755
index 000000000..130bcf82e
--- /dev/null
+++ b/graphics/battle_anims/sprites/142.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/143.png b/graphics/battle_anims/sprites/143.png
new file mode 100755
index 000000000..da3f273ac
--- /dev/null
+++ b/graphics/battle_anims/sprites/143.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/144.png b/graphics/battle_anims/sprites/144.png
new file mode 100755
index 000000000..069926395
--- /dev/null
+++ b/graphics/battle_anims/sprites/144.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/145.png b/graphics/battle_anims/sprites/145.png
new file mode 100755
index 000000000..b44edaadb
--- /dev/null
+++ b/graphics/battle_anims/sprites/145.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/146.png b/graphics/battle_anims/sprites/146.png
new file mode 100755
index 000000000..e7b0360a6
--- /dev/null
+++ b/graphics/battle_anims/sprites/146.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/147.png b/graphics/battle_anims/sprites/147.png
new file mode 100755
index 000000000..6dcc9cdff
--- /dev/null
+++ b/graphics/battle_anims/sprites/147.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/148.png b/graphics/battle_anims/sprites/148.png
new file mode 100755
index 000000000..ea5738321
--- /dev/null
+++ b/graphics/battle_anims/sprites/148.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/149.png b/graphics/battle_anims/sprites/149.png
new file mode 100755
index 000000000..8e52802d7
--- /dev/null
+++ b/graphics/battle_anims/sprites/149.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/150.png b/graphics/battle_anims/sprites/150.png
new file mode 100755
index 000000000..e6c55b573
--- /dev/null
+++ b/graphics/battle_anims/sprites/150.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/151.png b/graphics/battle_anims/sprites/151.png
new file mode 100755
index 000000000..bf7819273
--- /dev/null
+++ b/graphics/battle_anims/sprites/151.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/152.png b/graphics/battle_anims/sprites/152.png
new file mode 100755
index 000000000..1b5e8e904
--- /dev/null
+++ b/graphics/battle_anims/sprites/152.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/153.png b/graphics/battle_anims/sprites/153.png
new file mode 100755
index 000000000..d3dd12ae1
--- /dev/null
+++ b/graphics/battle_anims/sprites/153.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/154.png b/graphics/battle_anims/sprites/154.png
new file mode 100755
index 000000000..8b55a24a2
--- /dev/null
+++ b/graphics/battle_anims/sprites/154.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/155.png b/graphics/battle_anims/sprites/155.png
new file mode 100755
index 000000000..9547b39fa
--- /dev/null
+++ b/graphics/battle_anims/sprites/155.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/156.png b/graphics/battle_anims/sprites/156.png
new file mode 100755
index 000000000..c0567df8c
--- /dev/null
+++ b/graphics/battle_anims/sprites/156.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/157.png b/graphics/battle_anims/sprites/157.png
new file mode 100755
index 000000000..7fa6a0531
--- /dev/null
+++ b/graphics/battle_anims/sprites/157.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/158.png b/graphics/battle_anims/sprites/158.png
new file mode 100755
index 000000000..a91eaafdb
--- /dev/null
+++ b/graphics/battle_anims/sprites/158.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/159.pal b/graphics/battle_anims/sprites/159.pal
new file mode 100755
index 000000000..81af310e1
--- /dev/null
+++ b/graphics/battle_anims/sprites/159.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+255 139 0
+255 156 8
+255 172 24
+255 197 41
+255 213 57
+255 230 74
+255 255 90
+255 255 255
+255 74 106
+255 115 148
+255 164 197
+255 205 238
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/159_0.png b/graphics/battle_anims/sprites/159_0.png
new file mode 100755
index 000000000..4e9831863
--- /dev/null
+++ b/graphics/battle_anims/sprites/159_0.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/159_1.png b/graphics/battle_anims/sprites/159_1.png
new file mode 100755
index 000000000..065ea5052
--- /dev/null
+++ b/graphics/battle_anims/sprites/159_1.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/160.png b/graphics/battle_anims/sprites/160.png
new file mode 100755
index 000000000..35459b66b
--- /dev/null
+++ b/graphics/battle_anims/sprites/160.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/161.png b/graphics/battle_anims/sprites/161.png
new file mode 100755
index 000000000..5976b2b8c
--- /dev/null
+++ b/graphics/battle_anims/sprites/161.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/162.png b/graphics/battle_anims/sprites/162.png
new file mode 100755
index 000000000..f1fac116b
--- /dev/null
+++ b/graphics/battle_anims/sprites/162.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/163.png b/graphics/battle_anims/sprites/163.png
new file mode 100755
index 000000000..29c06f9b7
--- /dev/null
+++ b/graphics/battle_anims/sprites/163.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/164.pal b/graphics/battle_anims/sprites/164.pal
new file mode 100755
index 000000000..4fdffdcdb
--- /dev/null
+++ b/graphics/battle_anims/sprites/164.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+0 0 0
+156 24 255
+180 49 255
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/165.pal b/graphics/battle_anims/sprites/165.pal
new file mode 100755
index 000000000..048980708
--- /dev/null
+++ b/graphics/battle_anims/sprites/165.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+0 0 0
+49 148 255
+0 230 255
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/166.png b/graphics/battle_anims/sprites/166.png
new file mode 100755
index 000000000..b5fefee24
--- /dev/null
+++ b/graphics/battle_anims/sprites/166.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/167.pal b/graphics/battle_anims/sprites/167.pal
new file mode 100755
index 000000000..5f4852f39
--- /dev/null
+++ b/graphics/battle_anims/sprites/167.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+98 90 255
+115 106 255
+139 131 255
+164 156 255
+180 180 255
+205 205 255
+230 230 255
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+164 156 255
+180 180 255
+205 205 255
diff --git a/graphics/battle_anims/sprites/168.pal b/graphics/battle_anims/sprites/168.pal
new file mode 100755
index 000000000..a99d113d2
--- /dev/null
+++ b/graphics/battle_anims/sprites/168.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+255 74 106
+255 98 123
+255 123 148
+255 148 164
+255 172 189
+255 197 205
+255 222 230
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 148 164
+255 172 189
+255 197 205
diff --git a/graphics/battle_anims/sprites/169.pal b/graphics/battle_anims/sprites/169.pal
new file mode 100755
index 000000000..6d037b09f
--- /dev/null
+++ b/graphics/battle_anims/sprites/169.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+123 123 123
+139 139 139
+156 156 156
+172 172 172
+197 197 197
+213 213 213
+230 230 230
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+172 172 172
+197 197 197
+213 213 213
diff --git a/graphics/battle_anims/sprites/170.pal b/graphics/battle_anims/sprites/170.pal
new file mode 100755
index 000000000..63ff0a239
--- /dev/null
+++ b/graphics/battle_anims/sprites/170.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+255 205 32
+255 205 57
+255 213 90
+255 222 123
+255 230 156
+255 238 189
+255 246 222
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 222 123
+255 230 156
+255 238 189
diff --git a/graphics/battle_anims/sprites/171.png b/graphics/battle_anims/sprites/171.png
new file mode 100755
index 000000000..7b60d7450
--- /dev/null
+++ b/graphics/battle_anims/sprites/171.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/172.pal b/graphics/battle_anims/sprites/172.pal
new file mode 100755
index 000000000..4b1755b0c
--- /dev/null
+++ b/graphics/battle_anims/sprites/172.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+106 148 139
+98 90 255
+115 106 255
+139 131 255
+164 156 255
+180 180 255
+205 205 255
+230 230 255
+213 0 213
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+180 180 255
+205 205 255
+230 230 255
diff --git a/graphics/battle_anims/sprites/173.png b/graphics/battle_anims/sprites/173.png
new file mode 100755
index 000000000..d50982122
--- /dev/null
+++ b/graphics/battle_anims/sprites/173.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/174.png b/graphics/battle_anims/sprites/174.png
new file mode 100755
index 000000000..d8cf8dbe4
--- /dev/null
+++ b/graphics/battle_anims/sprites/174.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/175.png b/graphics/battle_anims/sprites/175.png
new file mode 100755
index 000000000..042ef87ac
--- /dev/null
+++ b/graphics/battle_anims/sprites/175.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/176.png b/graphics/battle_anims/sprites/176.png
new file mode 100755
index 000000000..aaa3c2f96
--- /dev/null
+++ b/graphics/battle_anims/sprites/176.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/177.png b/graphics/battle_anims/sprites/177.png
new file mode 100755
index 000000000..ec1b2246b
--- /dev/null
+++ b/graphics/battle_anims/sprites/177.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/178.png b/graphics/battle_anims/sprites/178.png
new file mode 100755
index 000000000..c7b68d278
--- /dev/null
+++ b/graphics/battle_anims/sprites/178.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/179.png b/graphics/battle_anims/sprites/179.png
new file mode 100755
index 000000000..94f102402
--- /dev/null
+++ b/graphics/battle_anims/sprites/179.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/180.png b/graphics/battle_anims/sprites/180.png
new file mode 100755
index 000000000..76eb7c9a8
--- /dev/null
+++ b/graphics/battle_anims/sprites/180.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/181.png b/graphics/battle_anims/sprites/181.png
new file mode 100755
index 000000000..ea561b9db
--- /dev/null
+++ b/graphics/battle_anims/sprites/181.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/182.png b/graphics/battle_anims/sprites/182.png
new file mode 100755
index 000000000..e586f630b
--- /dev/null
+++ b/graphics/battle_anims/sprites/182.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/183.png b/graphics/battle_anims/sprites/183.png
new file mode 100755
index 000000000..55b2044b8
--- /dev/null
+++ b/graphics/battle_anims/sprites/183.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/184.png b/graphics/battle_anims/sprites/184.png
new file mode 100755
index 000000000..99ba7e475
--- /dev/null
+++ b/graphics/battle_anims/sprites/184.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/185.png b/graphics/battle_anims/sprites/185.png
new file mode 100755
index 000000000..f3a4305c5
--- /dev/null
+++ b/graphics/battle_anims/sprites/185.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/186.png b/graphics/battle_anims/sprites/186.png
new file mode 100755
index 000000000..8fbc31367
--- /dev/null
+++ b/graphics/battle_anims/sprites/186.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/187.png b/graphics/battle_anims/sprites/187.png
new file mode 100755
index 000000000..b0caeb98f
--- /dev/null
+++ b/graphics/battle_anims/sprites/187.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/188.png b/graphics/battle_anims/sprites/188.png
new file mode 100755
index 000000000..3b0b6f402
--- /dev/null
+++ b/graphics/battle_anims/sprites/188.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/189.png b/graphics/battle_anims/sprites/189.png
new file mode 100755
index 000000000..67fdd4536
--- /dev/null
+++ b/graphics/battle_anims/sprites/189.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/190.png b/graphics/battle_anims/sprites/190.png
new file mode 100755
index 000000000..6fcb4826e
--- /dev/null
+++ b/graphics/battle_anims/sprites/190.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/191.png b/graphics/battle_anims/sprites/191.png
new file mode 100755
index 000000000..e1442ff5c
--- /dev/null
+++ b/graphics/battle_anims/sprites/191.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/192.png b/graphics/battle_anims/sprites/192.png
new file mode 100755
index 000000000..1f76354ab
--- /dev/null
+++ b/graphics/battle_anims/sprites/192.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/193.png b/graphics/battle_anims/sprites/193.png
new file mode 100755
index 000000000..f3b6bd2c2
--- /dev/null
+++ b/graphics/battle_anims/sprites/193.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/194.png b/graphics/battle_anims/sprites/194.png
new file mode 100755
index 000000000..228013658
--- /dev/null
+++ b/graphics/battle_anims/sprites/194.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/195.png b/graphics/battle_anims/sprites/195.png
new file mode 100755
index 000000000..9aefe398e
--- /dev/null
+++ b/graphics/battle_anims/sprites/195.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/196.png b/graphics/battle_anims/sprites/196.png
new file mode 100755
index 000000000..c3dee2e0a
--- /dev/null
+++ b/graphics/battle_anims/sprites/196.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/197.png b/graphics/battle_anims/sprites/197.png
new file mode 100755
index 000000000..ac7ac5083
--- /dev/null
+++ b/graphics/battle_anims/sprites/197.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/198.png b/graphics/battle_anims/sprites/198.png
new file mode 100755
index 000000000..abe613212
--- /dev/null
+++ b/graphics/battle_anims/sprites/198.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/199.png b/graphics/battle_anims/sprites/199.png
new file mode 100755
index 000000000..9468fddc9
--- /dev/null
+++ b/graphics/battle_anims/sprites/199.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/200.png b/graphics/battle_anims/sprites/200.png
new file mode 100755
index 000000000..b7b9d16e6
--- /dev/null
+++ b/graphics/battle_anims/sprites/200.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/201.png b/graphics/battle_anims/sprites/201.png
new file mode 100755
index 000000000..4b8cb700c
--- /dev/null
+++ b/graphics/battle_anims/sprites/201.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/202.png b/graphics/battle_anims/sprites/202.png
new file mode 100755
index 000000000..48af9a21e
--- /dev/null
+++ b/graphics/battle_anims/sprites/202.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/203.png b/graphics/battle_anims/sprites/203.png
new file mode 100755
index 000000000..f7a81679f
--- /dev/null
+++ b/graphics/battle_anims/sprites/203.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/204.png b/graphics/battle_anims/sprites/204.png
new file mode 100755
index 000000000..c36d57e10
--- /dev/null
+++ b/graphics/battle_anims/sprites/204.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/205.png b/graphics/battle_anims/sprites/205.png
new file mode 100755
index 000000000..8c558c433
--- /dev/null
+++ b/graphics/battle_anims/sprites/205.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/206.pal b/graphics/battle_anims/sprites/206.pal
new file mode 100755
index 000000000..b90e8d645
--- /dev/null
+++ b/graphics/battle_anims/sprites/206.pal
@@ -0,0 +1,83 @@
+JASC-PAL
+0100
+80
+0 0 0
+255 255 255
+255 189 189
+255 123 123
+255 57 57
+255 0 0
+213 0 0
+0 0 0
+197 148 197
+238 246 246
+238 222 180
+246 205 123
+246 189 57
+255 172 0
+213 148 0
+0 0 0
+0 0 0
+238 246 246
+238 246 180
+246 246 123
+246 246 57
+255 246 0
+213 205 0
+0 0 0
+197 148 197
+238 246 246
+189 246 180
+139 246 123
+90 246 57
+41 255 0
+41 213 0
+0 0 0
+0 0 0
+238 246 246
+172 238 230
+115 238 222
+57 230 205
+0 230 197
+0 189 156
+0 0 0
+197 148 197
+238 246 246
+172 205 246
+115 164 246
+57 123 246
+0 82 255
+0 57 205
+0 0 0
+0 0 0
+238 246 246
+222 180 246
+205 123 246
+189 57 246
+172 0 255
+148 0 205
+0 0 0
+197 148 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+238 246 246
+164 222 246
+98 197 246
+82 164 205
+65 139 172
+49 106 139
+0 0 0
+197 148 197
+255 255 255
+230 222 213
+205 189 180
+180 156 139
+164 131 106
+123 98 82
+0 0 0
diff --git a/graphics/battle_anims/sprites/206.png b/graphics/battle_anims/sprites/206.png
new file mode 100755
index 000000000..d3584f855
--- /dev/null
+++ b/graphics/battle_anims/sprites/206.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/207.png b/graphics/battle_anims/sprites/207.png
new file mode 100755
index 000000000..0d3450c6e
--- /dev/null
+++ b/graphics/battle_anims/sprites/207.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/208.png b/graphics/battle_anims/sprites/208.png
new file mode 100755
index 000000000..61bac622e
--- /dev/null
+++ b/graphics/battle_anims/sprites/208.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/209.png b/graphics/battle_anims/sprites/209.png
new file mode 100755
index 000000000..dea2a60bb
--- /dev/null
+++ b/graphics/battle_anims/sprites/209.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/210.png b/graphics/battle_anims/sprites/210.png
new file mode 100755
index 000000000..5ebfa0684
--- /dev/null
+++ b/graphics/battle_anims/sprites/210.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/211.png b/graphics/battle_anims/sprites/211.png
new file mode 100755
index 000000000..28f5317e5
--- /dev/null
+++ b/graphics/battle_anims/sprites/211.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/212.png b/graphics/battle_anims/sprites/212.png
new file mode 100755
index 000000000..8a8c3a0ac
--- /dev/null
+++ b/graphics/battle_anims/sprites/212.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/213.png b/graphics/battle_anims/sprites/213.png
new file mode 100755
index 000000000..90a622f64
--- /dev/null
+++ b/graphics/battle_anims/sprites/213.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/214.png b/graphics/battle_anims/sprites/214.png
new file mode 100755
index 000000000..9f6fc8d81
--- /dev/null
+++ b/graphics/battle_anims/sprites/214.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/215.png b/graphics/battle_anims/sprites/215.png
new file mode 100755
index 000000000..895ab4ec5
--- /dev/null
+++ b/graphics/battle_anims/sprites/215.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/216.pal b/graphics/battle_anims/sprites/216.pal
new file mode 100755
index 000000000..225cf9cf6
--- /dev/null
+++ b/graphics/battle_anims/sprites/216.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 238 205
+255 189 164
+255 139 131
+255 90 90
+255 41 57
+213 41 57
+180 41 57
+139 41 57
+106 41 57
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/217.png b/graphics/battle_anims/sprites/217.png
new file mode 100755
index 000000000..3583670eb
--- /dev/null
+++ b/graphics/battle_anims/sprites/217.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/218.png b/graphics/battle_anims/sprites/218.png
new file mode 100755
index 000000000..d22ff8ef9
--- /dev/null
+++ b/graphics/battle_anims/sprites/218.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/219.pal b/graphics/battle_anims/sprites/219.pal
new file mode 100755
index 000000000..27cf421cc
--- /dev/null
+++ b/graphics/battle_anims/sprites/219.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+255 180 255
+238 115 222
+230 57 189
+222 0 156
+189 8 131
+156 24 115
+123 32 90
+90 49 74
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/220.png b/graphics/battle_anims/sprites/220.png
new file mode 100755
index 000000000..900a9e428
--- /dev/null
+++ b/graphics/battle_anims/sprites/220.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/221.png b/graphics/battle_anims/sprites/221.png
new file mode 100755
index 000000000..f30ca7907
--- /dev/null
+++ b/graphics/battle_anims/sprites/221.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/222.png b/graphics/battle_anims/sprites/222.png
new file mode 100755
index 000000000..1205494d4
--- /dev/null
+++ b/graphics/battle_anims/sprites/222.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/223.png b/graphics/battle_anims/sprites/223.png
new file mode 100755
index 000000000..5f9dbf83e
--- /dev/null
+++ b/graphics/battle_anims/sprites/223.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/224.png b/graphics/battle_anims/sprites/224.png
new file mode 100755
index 000000000..c6e8a1c63
--- /dev/null
+++ b/graphics/battle_anims/sprites/224.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/225.png b/graphics/battle_anims/sprites/225.png
new file mode 100755
index 000000000..c4efbf2de
--- /dev/null
+++ b/graphics/battle_anims/sprites/225.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/226.png b/graphics/battle_anims/sprites/226.png
new file mode 100755
index 000000000..a8b2e817a
--- /dev/null
+++ b/graphics/battle_anims/sprites/226.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/227.png b/graphics/battle_anims/sprites/227.png
new file mode 100755
index 000000000..baa51d106
--- /dev/null
+++ b/graphics/battle_anims/sprites/227.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/228.png b/graphics/battle_anims/sprites/228.png
new file mode 100755
index 000000000..e569fea34
--- /dev/null
+++ b/graphics/battle_anims/sprites/228.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/229.png b/graphics/battle_anims/sprites/229.png
new file mode 100755
index 000000000..be1e038da
--- /dev/null
+++ b/graphics/battle_anims/sprites/229.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/230.png b/graphics/battle_anims/sprites/230.png
new file mode 100755
index 000000000..9157118fd
--- /dev/null
+++ b/graphics/battle_anims/sprites/230.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/231.png b/graphics/battle_anims/sprites/231.png
new file mode 100755
index 000000000..7b3474bb9
--- /dev/null
+++ b/graphics/battle_anims/sprites/231.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/232.png b/graphics/battle_anims/sprites/232.png
new file mode 100755
index 000000000..ebdf118e1
--- /dev/null
+++ b/graphics/battle_anims/sprites/232.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/233.png b/graphics/battle_anims/sprites/233.png
new file mode 100755
index 000000000..e71e97eda
--- /dev/null
+++ b/graphics/battle_anims/sprites/233.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/234.png b/graphics/battle_anims/sprites/234.png
new file mode 100755
index 000000000..e5efece20
--- /dev/null
+++ b/graphics/battle_anims/sprites/234.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/235.png b/graphics/battle_anims/sprites/235.png
new file mode 100755
index 000000000..1bbd9c027
--- /dev/null
+++ b/graphics/battle_anims/sprites/235.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/236.pal b/graphics/battle_anims/sprites/236.pal
new file mode 100755
index 000000000..0b587a87c
--- /dev/null
+++ b/graphics/battle_anims/sprites/236.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+139 222 255
+65 148 255
+0 74 255
+0 57 205
+0 49 156
+0 41 106
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/237.pal b/graphics/battle_anims/sprites/237.pal
new file mode 100755
index 000000000..3eddc5612
--- /dev/null
+++ b/graphics/battle_anims/sprites/237.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 172 74
+255 90 41
+255 8 8
+213 8 8
+172 8 8
+139 8 8
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/238.png b/graphics/battle_anims/sprites/238.png
new file mode 100755
index 000000000..1c9565881
--- /dev/null
+++ b/graphics/battle_anims/sprites/238.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/239.png b/graphics/battle_anims/sprites/239.png
new file mode 100755
index 000000000..b2c2d72ce
--- /dev/null
+++ b/graphics/battle_anims/sprites/239.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/240.png b/graphics/battle_anims/sprites/240.png
new file mode 100755
index 000000000..783dd40f9
--- /dev/null
+++ b/graphics/battle_anims/sprites/240.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/241.png b/graphics/battle_anims/sprites/241.png
new file mode 100755
index 000000000..21218ceb6
--- /dev/null
+++ b/graphics/battle_anims/sprites/241.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/242.png b/graphics/battle_anims/sprites/242.png
new file mode 100755
index 000000000..414225c8f
--- /dev/null
+++ b/graphics/battle_anims/sprites/242.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/243.png b/graphics/battle_anims/sprites/243.png
new file mode 100755
index 000000000..15cffcc85
--- /dev/null
+++ b/graphics/battle_anims/sprites/243.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/244.png b/graphics/battle_anims/sprites/244.png
new file mode 100755
index 000000000..09e0c0d68
--- /dev/null
+++ b/graphics/battle_anims/sprites/244.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/245.png b/graphics/battle_anims/sprites/245.png
new file mode 100755
index 000000000..39618d394
--- /dev/null
+++ b/graphics/battle_anims/sprites/245.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/246.png b/graphics/battle_anims/sprites/246.png
new file mode 100755
index 000000000..d1835b10b
--- /dev/null
+++ b/graphics/battle_anims/sprites/246.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/247.png b/graphics/battle_anims/sprites/247.png
new file mode 100755
index 000000000..858d4640d
--- /dev/null
+++ b/graphics/battle_anims/sprites/247.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/248.png b/graphics/battle_anims/sprites/248.png
new file mode 100755
index 000000000..5a3fb393f
--- /dev/null
+++ b/graphics/battle_anims/sprites/248.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/249.png b/graphics/battle_anims/sprites/249.png
new file mode 100755
index 000000000..33d6511ff
--- /dev/null
+++ b/graphics/battle_anims/sprites/249.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/250.png b/graphics/battle_anims/sprites/250.png
new file mode 100755
index 000000000..4088e3328
--- /dev/null
+++ b/graphics/battle_anims/sprites/250.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/251.png b/graphics/battle_anims/sprites/251.png
new file mode 100755
index 000000000..ad16940d9
--- /dev/null
+++ b/graphics/battle_anims/sprites/251.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/252.png b/graphics/battle_anims/sprites/252.png
new file mode 100755
index 000000000..2ed8eee4a
--- /dev/null
+++ b/graphics/battle_anims/sprites/252.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/253.png b/graphics/battle_anims/sprites/253.png
new file mode 100755
index 000000000..22f08ddef
--- /dev/null
+++ b/graphics/battle_anims/sprites/253.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/254.png b/graphics/battle_anims/sprites/254.png
new file mode 100755
index 000000000..1aa77e17f
--- /dev/null
+++ b/graphics/battle_anims/sprites/254.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/255.png b/graphics/battle_anims/sprites/255.png
new file mode 100755
index 000000000..f5f8c9e8b
--- /dev/null
+++ b/graphics/battle_anims/sprites/255.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/256.png b/graphics/battle_anims/sprites/256.png
new file mode 100755
index 000000000..7043d824b
--- /dev/null
+++ b/graphics/battle_anims/sprites/256.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/257.png b/graphics/battle_anims/sprites/257.png
new file mode 100755
index 000000000..d3fba6c4f
--- /dev/null
+++ b/graphics/battle_anims/sprites/257.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/258.png b/graphics/battle_anims/sprites/258.png
new file mode 100755
index 000000000..bf50cc099
--- /dev/null
+++ b/graphics/battle_anims/sprites/258.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/259.pal b/graphics/battle_anims/sprites/259.pal
new file mode 100755
index 000000000..ead25c0c6
--- /dev/null
+++ b/graphics/battle_anims/sprites/259.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+131 49 0
+148 74 32
+164 106 65
+180 131 106
+197 164 139
+213 189 180
+230 222 213
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/260.png b/graphics/battle_anims/sprites/260.png
new file mode 100755
index 000000000..c7883c900
--- /dev/null
+++ b/graphics/battle_anims/sprites/260.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/261.png b/graphics/battle_anims/sprites/261.png
new file mode 100755
index 000000000..12f0b1744
--- /dev/null
+++ b/graphics/battle_anims/sprites/261.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/262.png b/graphics/battle_anims/sprites/262.png
new file mode 100755
index 000000000..857558fd2
--- /dev/null
+++ b/graphics/battle_anims/sprites/262.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/263.png b/graphics/battle_anims/sprites/263.png
new file mode 100755
index 000000000..53148056c
--- /dev/null
+++ b/graphics/battle_anims/sprites/263.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/264.png b/graphics/battle_anims/sprites/264.png
new file mode 100755
index 000000000..a590d96a5
--- /dev/null
+++ b/graphics/battle_anims/sprites/264.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/265.pal b/graphics/battle_anims/sprites/265.pal
new file mode 100755
index 000000000..34914d257
--- /dev/null
+++ b/graphics/battle_anims/sprites/265.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+205 246 197
+106 246 98
+8 246 0
+8 172 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/266.png b/graphics/battle_anims/sprites/266.png
new file mode 100755
index 000000000..c53e8059c
--- /dev/null
+++ b/graphics/battle_anims/sprites/266.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/267.pal b/graphics/battle_anims/sprites/267.pal
new file mode 100755
index 000000000..1973e6f45
--- /dev/null
+++ b/graphics/battle_anims/sprites/267.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+246 255 246
+222 238 230
+197 230 213
+172 213 197
+156 205 189
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/268.pal b/graphics/battle_anims/sprites/268.pal
new file mode 100755
index 000000000..d40d72f69
--- /dev/null
+++ b/graphics/battle_anims/sprites/268.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+197 246 246
+148 180 246
+98 123 246
+49 65 246
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/269.png b/graphics/battle_anims/sprites/269.png
new file mode 100755
index 000000000..d699f4c48
--- /dev/null
+++ b/graphics/battle_anims/sprites/269.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/270.png b/graphics/battle_anims/sprites/270.png
new file mode 100755
index 000000000..1581ad1ea
--- /dev/null
+++ b/graphics/battle_anims/sprites/270.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/271.png b/graphics/battle_anims/sprites/271.png
new file mode 100755
index 000000000..d77ca0682
--- /dev/null
+++ b/graphics/battle_anims/sprites/271.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/272.png b/graphics/battle_anims/sprites/272.png
new file mode 100755
index 000000000..0acaa474d
--- /dev/null
+++ b/graphics/battle_anims/sprites/272.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/273.png b/graphics/battle_anims/sprites/273.png
new file mode 100755
index 000000000..6398df8c0
--- /dev/null
+++ b/graphics/battle_anims/sprites/273.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/274.png b/graphics/battle_anims/sprites/274.png
new file mode 100755
index 000000000..e284c57a6
--- /dev/null
+++ b/graphics/battle_anims/sprites/274.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/275.png b/graphics/battle_anims/sprites/275.png
new file mode 100755
index 000000000..b1b7b6644
--- /dev/null
+++ b/graphics/battle_anims/sprites/275.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/276.png b/graphics/battle_anims/sprites/276.png
new file mode 100755
index 000000000..21d51a22b
--- /dev/null
+++ b/graphics/battle_anims/sprites/276.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/277.png b/graphics/battle_anims/sprites/277.png
new file mode 100755
index 000000000..7745fc28c
--- /dev/null
+++ b/graphics/battle_anims/sprites/277.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/278.png b/graphics/battle_anims/sprites/278.png
new file mode 100755
index 000000000..7281bfdbd
--- /dev/null
+++ b/graphics/battle_anims/sprites/278.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/279.png b/graphics/battle_anims/sprites/279.png
new file mode 100755
index 000000000..46933b76e
--- /dev/null
+++ b/graphics/battle_anims/sprites/279.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/280.png b/graphics/battle_anims/sprites/280.png
new file mode 100755
index 000000000..ce7f086fd
--- /dev/null
+++ b/graphics/battle_anims/sprites/280.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/281.png b/graphics/battle_anims/sprites/281.png
new file mode 100755
index 000000000..e3cc13492
--- /dev/null
+++ b/graphics/battle_anims/sprites/281.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/282.png b/graphics/battle_anims/sprites/282.png
new file mode 100755
index 000000000..d89aab1ad
--- /dev/null
+++ b/graphics/battle_anims/sprites/282.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/283.png b/graphics/battle_anims/sprites/283.png
new file mode 100755
index 000000000..03853aef6
--- /dev/null
+++ b/graphics/battle_anims/sprites/283.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/284.png b/graphics/battle_anims/sprites/284.png
new file mode 100755
index 000000000..67c1bcd0a
--- /dev/null
+++ b/graphics/battle_anims/sprites/284.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/285.png b/graphics/battle_anims/sprites/285.png
new file mode 100755
index 000000000..eb54111b2
--- /dev/null
+++ b/graphics/battle_anims/sprites/285.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/286.pal b/graphics/battle_anims/sprites/286.pal
new file mode 100755
index 000000000..a2703b853
--- /dev/null
+++ b/graphics/battle_anims/sprites/286.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+230 238 255
+205 230 255
+180 222 255
+156 205 255
+131 197 255
+106 189 255
+90 164 230
+82 148 213
+74 123 189
+65 106 172
+57 90 156
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/287.pal b/graphics/battle_anims/sprites/287.pal
new file mode 100755
index 000000000..631948567
--- /dev/null
+++ b/graphics/battle_anims/sprites/287.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+98 197 197
+255 255 255
+222 246 230
+189 246 205
+156 246 180
+123 238 156
+90 238 131
+57 238 115
+57 238 115
+65 205 90
+74 180 74
+82 148 57
+90 123 41
+106 98 24
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/288.pal b/graphics/battle_anims/sprites/288.pal
new file mode 100755
index 000000000..f8ea0ca54
--- /dev/null
+++ b/graphics/battle_anims/sprites/288.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+164 148 139
+0 0 0
+255 255 255
+230 255 230
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/effect.pal b/graphics/battle_anims/sprites/effect.pal
new file mode 100755
index 000000000..3dcf4cff6
--- /dev/null
+++ b/graphics/battle_anims/sprites/effect.pal
@@ -0,0 +1,27 @@
+JASC-PAL
+0100
+24
+230 205 8
+230 172 41
+222 148 65
+222 115 90
+213 82 123
+213 57 148
+205 24 172
+205 0 205
+205 0 189
+205 0 164
+205 0 131
+205 0 106
+213 0 82
+213 0 49
+213 0 24
+222 0 0
+222 8 0
+222 41 0
+222 74 0
+222 98 0
+230 131 0
+230 156 0
+230 189 0
+238 222 0
diff --git a/graphics/battle_anims/sprites/particles.png b/graphics/battle_anims/sprites/particles.png
new file mode 100755
index 000000000..7edcd54ed
--- /dev/null
+++ b/graphics/battle_anims/sprites/particles.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/smokescreen_impact.pal b/graphics/battle_anims/sprites/smokescreen_impact.pal
new file mode 100755
index 000000000..64367bdc9
--- /dev/null
+++ b/graphics/battle_anims/sprites/smokescreen_impact.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+98 148 49
+57 98 197
+0 0 0
+0 0 0
+0 0 0
+164 156 106
+197 197 148
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_anims/sprites/smokescreen_impact.png b/graphics/battle_anims/sprites/smokescreen_impact.png
new file mode 100755
index 000000000..01a94429a
--- /dev/null
+++ b/graphics/battle_anims/sprites/smokescreen_impact.png
Binary files differ
diff --git a/graphics/battle_anims/sprites/substitute.bin b/graphics/battle_anims/sprites/substitute.bin
new file mode 100755
index 000000000..d30c07d4e
--- /dev/null
+++ b/graphics/battle_anims/sprites/substitute.bin
Binary files differ
diff --git a/graphics/battle_anims/sprites/substitute.png b/graphics/battle_anims/sprites/substitute.png
new file mode 100755
index 000000000..0b6dea850
--- /dev/null
+++ b/graphics/battle_anims/sprites/substitute.png
Binary files differ
diff --git a/graphics/battle_frontier/battle_tilemap1.bin b/graphics/battle_frontier/battle_tilemap1.bin
new file mode 100755
index 000000000..c38b76d4a
--- /dev/null
+++ b/graphics/battle_frontier/battle_tilemap1.bin
Binary files differ
diff --git a/graphics/battle_frontier/battle_tilemap2.bin b/graphics/battle_frontier/battle_tilemap2.bin
new file mode 100755
index 000000000..7cc984cff
--- /dev/null
+++ b/graphics/battle_frontier/battle_tilemap2.bin
Binary files differ
diff --git a/graphics/battle_frontier/dome_anim1.pal b/graphics/battle_frontier/dome_anim1.pal
new file mode 100755
index 000000000..f25d4150e
--- /dev/null
+++ b/graphics/battle_frontier/dome_anim1.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+205 148 8
+82 82 106
+115 115 131
+156 156 164
+189 189 197
+255 255 255
+115 131 98
+90 82 82
+205 222 197
+82 131 156
+115 164 197
+164 205 222
+131 106 82
+255 123 32
+156 139 106
+255 222 131
diff --git a/graphics/battle_frontier/dome_anim2.pal b/graphics/battle_frontier/dome_anim2.pal
new file mode 100755
index 000000000..32a85e03c
--- /dev/null
+++ b/graphics/battle_frontier/dome_anim2.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+205 148 8
+82 82 106
+115 115 131
+156 156 164
+189 189 197
+255 255 255
+115 131 98
+90 82 82
+205 222 197
+82 131 156
+115 164 197
+164 205 222
+131 106 82
+255 156 65
+156 139 106
+255 189 98
diff --git a/graphics/battle_frontier/dome_anim3.pal b/graphics/battle_frontier/dome_anim3.pal
new file mode 100755
index 000000000..214dadb48
--- /dev/null
+++ b/graphics/battle_frontier/dome_anim3.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+205 148 8
+82 82 106
+115 115 131
+156 156 164
+189 189 197
+255 255 255
+115 131 98
+90 82 82
+205 222 197
+82 131 156
+115 164 197
+164 205 222
+131 106 82
+255 189 98
+156 139 106
+255 156 65
diff --git a/graphics/battle_frontier/dome_anim4.pal b/graphics/battle_frontier/dome_anim4.pal
new file mode 100755
index 000000000..c96254979
--- /dev/null
+++ b/graphics/battle_frontier/dome_anim4.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+205 148 8
+82 82 106
+115 115 131
+156 156 164
+189 189 197
+255 255 255
+115 131 98
+90 82 82
+205 222 197
+82 131 156
+115 164 197
+164 205 222
+131 106 82
+255 222 131
+156 139 106
+255 123 32
diff --git a/graphics/battle_frontier/factory_menu.bin b/graphics/battle_frontier/factory_menu.bin
new file mode 100755
index 000000000..767257ac2
--- /dev/null
+++ b/graphics/battle_frontier/factory_menu.bin
Binary files differ
diff --git a/graphics/battle_frontier/factory_menu1.png b/graphics/battle_frontier/factory_menu1.png
new file mode 100755
index 000000000..52f073ff3
--- /dev/null
+++ b/graphics/battle_frontier/factory_menu1.png
Binary files differ
diff --git a/graphics/battle_frontier/factory_menu2.png b/graphics/battle_frontier/factory_menu2.png
new file mode 100755
index 000000000..0d103927e
--- /dev/null
+++ b/graphics/battle_frontier/factory_menu2.png
Binary files differ
diff --git a/graphics/battle_frontier/misc1.png b/graphics/battle_frontier/misc1.png
new file mode 100755
index 000000000..a3c225c89
--- /dev/null
+++ b/graphics/battle_frontier/misc1.png
Binary files differ
diff --git a/graphics/battle_frontier/options.png b/graphics/battle_frontier/options.png
new file mode 100755
index 000000000..0d8cec998
--- /dev/null
+++ b/graphics/battle_frontier/options.png
Binary files differ
diff --git a/graphics/battle_frontier/options_pal1.pal b/graphics/battle_frontier/options_pal1.pal
new file mode 100755
index 000000000..eec4c7d71
--- /dev/null
+++ b/graphics/battle_frontier/options_pal1.pal
@@ -0,0 +1,259 @@
+JASC-PAL
+0100
+256
+0 0 0
+255 172 65
+255 255 131
+222 213 180
+255 255 255
+230 222 222
+197 197 197
+213 57 49
+230 230 213
+255 246 205
+255 82 49
+164 24 0
+0 0 0
+106 106 106
+0 0 0
+0 0 0
+0 0 0
+90 172 131
+106 156 123
+123 222 139
+246 255 255
+0 0 0
+246 255 246
+0 0 0
+0 0 0
+0 0 0
+230 238 246
+222 255 238
+189 238 197
+123 123 123
+115 197 156
+0 0 0
+0 0 0
+197 205 230
+32 115 139
+255 255 255
+222 238 222
+0 0 0
+131 197 139
+0 0 0
+139 156 197
+115 139 189
+0 90 82
+106 164 139
+57 115 90
+189 222 197
+0 0 0
+0 0 0
+0 0 0
+205 205 246
+230 238 230
+213 213 255
+156 156 222
+238 238 255
+189 189 238
+230 230 255
+222 222 255
+197 197 246
+189 189 238
+180 180 230
+172 172 230
+164 164 222
+156 156 222
+0 0 0
+0 0 0
+131 148 180
+213 230 246
+189 189 222
+90 98 115
+230 238 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+197 238 222
+255 205 205
+205 222 255
+222 255 255
+246 230 164
+0 0 0
+189 246 180
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
+0 255 0
+164 180 180
+255 74 0
+246 255 246
+246 255 255
+0 0 0
+246 255 246
+0 0 0
+0 0 0
+0 0 0
+230 238 246
+0 0 0
+189 238 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 213 106
+255 74 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+246 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_frontier/options_pal2.pal b/graphics/battle_frontier/options_pal2.pal
new file mode 100755
index 000000000..4a7c1f786
--- /dev/null
+++ b/graphics/battle_frontier/options_pal2.pal
@@ -0,0 +1,259 @@
+JASC-PAL
+0100
+256
+230 230 213
+246 246 246
+0 0 0
+255 74 74
+197 197 197
+106 123 123
+0 0 0
+0 0 0
+189 189 197
+0 0 0
+0 0 0
+238 238 246
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+230 230 213
+180 246 205
+131 197 172
+0 0 0
+246 246 246
+82 123 74
+148 213 189
+222 246 222
+90 156 131
+115 180 156
+255 123 98
+189 65 41
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+230 230 213
+230 172 90
+123 82 57
+255 213 156
+0 0 0
+189 131 49
+197 197 246
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+131 131 131
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_frontier/options_pal3.pal b/graphics/battle_frontier/options_pal3.pal
new file mode 100755
index 000000000..912d5e9ec
--- /dev/null
+++ b/graphics/battle_frontier/options_pal3.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+246 230 189
+0 0 0
+246 230 180
+255 255 230
+0 0 0
+0 0 0
+246 230 172
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
diff --git a/graphics/battle_frontier/pyramid_light.pal b/graphics/battle_frontier/pyramid_light.pal
new file mode 100755
index 000000000..d2492ce34
--- /dev/null
+++ b/graphics/battle_frontier/pyramid_light.pal
@@ -0,0 +1,115 @@
+JASC-PAL
+0100
+112
+57 0 8
+82 82 106
+82 238 246
+41 156 246
+0 74 255
+49 49 98
+90 82 123
+106 98 139
+123 123 156
+139 148 172
+164 172 197
+255 156 0
+156 115 57
+65 82 115
+255 8 0
+255 230 0
+57 0 8
+82 82 106
+82 238 246
+41 156 246
+0 74 255
+57 57 98
+90 82 123
+115 106 131
+139 131 139
+180 172 148
+189 189 189
+255 156 0
+156 115 57
+65 82 115
+255 8 0
+255 230 0
+57 0 8
+82 82 106
+82 238 246
+41 156 246
+0 74 255
+65 65 106
+90 82 123
+123 115 123
+164 148 131
+222 205 131
+222 205 180
+255 156 0
+156 115 57
+65 82 115
+255 8 0
+255 230 0
+57 0 8
+82 82 106
+82 238 246
+41 156 246
+0 74 255
+74 82 115
+90 82 123
+139 123 123
+189 172 123
+246 222 123
+255 230 172
+255 156 0
+156 115 57
+65 82 115
+255 8 0
+255 230 0
+57 0 8
+82 82 106
+82 238 246
+41 156 246
+0 74 255
+82 90 123
+106 98 139
+156 148 139
+189 172 131
+246 230 139
+255 238 197
+255 156 0
+156 115 57
+65 82 115
+255 8 0
+255 230 0
+57 0 8
+82 82 106
+82 238 246
+41 156 246
+0 74 255
+90 98 131
+131 123 156
+180 172 156
+205 189 148
+246 238 172
+255 246 222
+255 156 0
+156 115 57
+65 82 115
+255 8 0
+255 230 0
+57 0 8
+82 82 106
+82 238 246
+41 156 246
+0 74 255
+106 115 139
+156 148 172
+205 197 172
+230 213 172
+255 246 205
+255 255 246
+255 156 0
+148 123 65
+65 82 115
+255 8 0
+255 230 0
diff --git a/graphics/battle_frontier/symbols.png b/graphics/battle_frontier/symbols.png
new file mode 100755
index 000000000..8e4c01e97
--- /dev/null
+++ b/graphics/battle_frontier/symbols.png
Binary files differ
diff --git a/graphics/battle_frontier/text.pal b/graphics/battle_frontier/text.pal
new file mode 100755
index 000000000..574999b72
--- /dev/null
+++ b/graphics/battle_frontier/text.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 0 0
+131 0 0
+255 164 98
+131 82 49
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+131 131 131
+74 74 74
+74 74 74
+255 255 255
+213 213 205
diff --git a/graphics/battle_frontier/text_pp.pal b/graphics/battle_frontier/text_pp.pal
new file mode 100755
index 000000000..8c2a27418
--- /dev/null
+++ b/graphics/battle_frontier/text_pp.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+213 197 0
+255 246 139
+255 131 0
+255 238 115
+230 24 0
+246 222 156
+74 74 74
+222 222 222
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_frontier/tourney_bg.png b/graphics/battle_frontier/tourney_bg.png
new file mode 100755
index 000000000..f60dd49d3
--- /dev/null
+++ b/graphics/battle_frontier/tourney_bg.png
Binary files differ
diff --git a/graphics/battle_frontier/tourney_line.png b/graphics/battle_frontier/tourney_line.png
new file mode 100755
index 000000000..f543dd18e
--- /dev/null
+++ b/graphics/battle_frontier/tourney_line.png
Binary files differ
diff --git a/graphics/battle_interface/ball_display_unused_extra.png b/graphics/battle_interface/ball_display_unused_extra.png
new file mode 100755
index 000000000..4eb765d28
--- /dev/null
+++ b/graphics/battle_interface/ball_display_unused_extra.png
Binary files differ
diff --git a/graphics/battle_interface/enemy_mon_shadow.png b/graphics/battle_interface/enemy_mon_shadow.png
new file mode 100755
index 000000000..3db333a92
--- /dev/null
+++ b/graphics/battle_interface/enemy_mon_shadow.png
Binary files differ
diff --git a/graphics/battle_interface/expbar.png b/graphics/battle_interface/expbar.png
new file mode 100755
index 000000000..b54dbe600
--- /dev/null
+++ b/graphics/battle_interface/expbar.png
Binary files differ
diff --git a/graphics/battle_interface/hpbar.png b/graphics/battle_interface/hpbar.png
new file mode 100755
index 000000000..f3a0314e4
--- /dev/null
+++ b/graphics/battle_interface/hpbar.png
Binary files differ
diff --git a/graphics/battle_interface/hpbar_anim.png b/graphics/battle_interface/hpbar_anim.png
new file mode 100755
index 000000000..9e7564234
--- /dev/null
+++ b/graphics/battle_interface/hpbar_anim.png
Binary files differ
diff --git a/graphics/battle_interface/misc.png b/graphics/battle_interface/misc.png
new file mode 100755
index 000000000..9d39df975
--- /dev/null
+++ b/graphics/battle_interface/misc.png
Binary files differ
diff --git a/graphics/battle_interface/misc_frameend.png b/graphics/battle_interface/misc_frameend.png
new file mode 100755
index 000000000..630f44242
--- /dev/null
+++ b/graphics/battle_interface/misc_frameend.png
Binary files differ
diff --git a/graphics/battle_interface/status2.png b/graphics/battle_interface/status2.png
new file mode 100755
index 000000000..a412e160e
--- /dev/null
+++ b/graphics/battle_interface/status2.png
Binary files differ
diff --git a/graphics/battle_interface/status3.png b/graphics/battle_interface/status3.png
new file mode 100755
index 000000000..8a0db0321
--- /dev/null
+++ b/graphics/battle_interface/status3.png
Binary files differ
diff --git a/graphics/battle_interface/status4.png b/graphics/battle_interface/status4.png
new file mode 100755
index 000000000..e267940be
--- /dev/null
+++ b/graphics/battle_interface/status4.png
Binary files differ
diff --git a/graphics/battle_interface/status_brn.png b/graphics/battle_interface/status_brn.png
new file mode 100755
index 000000000..8f13fe6de
--- /dev/null
+++ b/graphics/battle_interface/status_brn.png
Binary files differ
diff --git a/graphics/battle_interface/status_frz.png b/graphics/battle_interface/status_frz.png
new file mode 100755
index 000000000..ce10db3e4
--- /dev/null
+++ b/graphics/battle_interface/status_frz.png
Binary files differ
diff --git a/graphics/battle_interface/status_par.png b/graphics/battle_interface/status_par.png
new file mode 100755
index 000000000..904b13242
--- /dev/null
+++ b/graphics/battle_interface/status_par.png
Binary files differ
diff --git a/graphics/battle_interface/status_psn.png b/graphics/battle_interface/status_psn.png
new file mode 100755
index 000000000..700e7038a
--- /dev/null
+++ b/graphics/battle_interface/status_psn.png
Binary files differ
diff --git a/graphics/battle_interface/status_slp.png b/graphics/battle_interface/status_slp.png
new file mode 100755
index 000000000..bcbd16d1d
--- /dev/null
+++ b/graphics/battle_interface/status_slp.png
Binary files differ
diff --git a/graphics/battle_interface/unused_window.pal b/graphics/battle_interface/unused_window.pal
new file mode 100755
index 000000000..a5c40e694
--- /dev/null
+++ b/graphics/battle_interface/unused_window.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+82 106 98
+180 197 213
+148 139 139
+106 98 90
+255 189 57
+230 148 65
+255 255 255
+115 255 172
+74 205 123
+32 164 82
+0 123 41
+255 255 213
+131 205 238
+213 230 230
+82 139 189
diff --git a/graphics/battle_interface/unused_window.png b/graphics/battle_interface/unused_window.png
new file mode 100755
index 000000000..73086d4d2
--- /dev/null
+++ b/graphics/battle_interface/unused_window.png
Binary files differ
diff --git a/graphics/battle_interface/unused_window2.png b/graphics/battle_interface/unused_window2.png
new file mode 100755
index 000000000..32f3da0b0
--- /dev/null
+++ b/graphics/battle_interface/unused_window2.png
Binary files differ
diff --git a/graphics/battle_interface/unused_window2bar.png b/graphics/battle_interface/unused_window2bar.png
new file mode 100755
index 000000000..e3a2974e8
--- /dev/null
+++ b/graphics/battle_interface/unused_window2bar.png
Binary files differ
diff --git a/graphics/battle_interface/unused_window3.png b/graphics/battle_interface/unused_window3.png
new file mode 100755
index 000000000..e93b2ff88
--- /dev/null
+++ b/graphics/battle_interface/unused_window3.png
Binary files differ
diff --git a/graphics/battle_interface/unused_window4.png b/graphics/battle_interface/unused_window4.png
new file mode 100755
index 000000000..6c249c96d
--- /dev/null
+++ b/graphics/battle_interface/unused_window4.png
Binary files differ
diff --git a/graphics/battle_interface/window.png b/graphics/battle_interface/window.png
new file mode 100755
index 000000000..0862ca399
--- /dev/null
+++ b/graphics/battle_interface/window.png
Binary files differ
diff --git a/graphics/battle_interface/window2.png b/graphics/battle_interface/window2.png
new file mode 100755
index 000000000..52f70e858
--- /dev/null
+++ b/graphics/battle_interface/window2.png
Binary files differ
diff --git a/graphics/battle_interface/window3.png b/graphics/battle_interface/window3.png
new file mode 100755
index 000000000..f843c664b
--- /dev/null
+++ b/graphics/battle_interface/window3.png
Binary files differ
diff --git a/graphics/battle_interface/window4.png b/graphics/battle_interface/window4.png
new file mode 100755
index 000000000..def9d07af
--- /dev/null
+++ b/graphics/battle_interface/window4.png
Binary files differ
diff --git a/graphics/battle_interface/window5.png b/graphics/battle_interface/window5.png
new file mode 100755
index 000000000..e48f380a4
--- /dev/null
+++ b/graphics/battle_interface/window5.png
Binary files differ
diff --git a/graphics/battle_terrain/building/anim_map.bin b/graphics/battle_terrain/building/anim_map.bin
new file mode 100755
index 000000000..432e41c2f
--- /dev/null
+++ b/graphics/battle_terrain/building/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/building/anim_tiles.png b/graphics/battle_terrain/building/anim_tiles.png
new file mode 100755
index 000000000..a627523d8
--- /dev/null
+++ b/graphics/battle_terrain/building/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/building/map.bin b/graphics/battle_terrain/building/map.bin
new file mode 100755
index 000000000..d7bee6035
--- /dev/null
+++ b/graphics/battle_terrain/building/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/building/palette.pal b/graphics/battle_terrain/building/palette.pal
new file mode 100755
index 000000000..219cef565
--- /dev/null
+++ b/graphics/battle_terrain/building/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 255 255
+222 197 164
+238 222 180
+238 230 205
+230 205 164
+246 238 230
+222 213 180
+230 213 172
+0 0 0
+0 0 0
+246 246 156
+246 246 180
+246 246 205
+246 246 230
+246 246 246
+0 0 0
+255 255 255
+222 197 164
+238 222 180
+238 230 205
+230 205 164
+246 238 230
+222 213 180
+246 246 205
+0 0 0
+0 0 0
+246 246 156
+246 246 180
+246 246 205
+246 246 230
+246 246 246
+0 0 0
+246 205 139
+255 238 164
+246 222 156
+255 238 172
+255 246 180
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/building/palette2.pal b/graphics/battle_terrain/building/palette2.pal
new file mode 100755
index 000000000..3ca2e0b0c
--- /dev/null
+++ b/graphics/battle_terrain/building/palette2.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 255 255
+205 189 148
+222 213 172
+238 230 197
+205 197 156
+246 238 222
+213 205 164
+222 213 156
+0 0 0
+0 0 0
+213 189 148
+230 213 180
+238 230 213
+246 238 230
+246 246 246
+0 0 0
+255 255 255
+205 189 148
+222 213 172
+238 230 197
+205 197 156
+246 238 222
+213 205 164
+222 213 156
+0 0 0
+0 0 0
+213 189 148
+230 213 180
+238 230 213
+246 238 230
+246 246 246
+0 0 0
+164 197 246
+205 246 255
+180 222 255
+189 230 255
+197 238 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/building/palette3.pal b/graphics/battle_terrain/building/palette3.pal
new file mode 100755
index 000000000..cebf5e687
--- /dev/null
+++ b/graphics/battle_terrain/building/palette3.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 255 255
+205 189 148
+222 213 172
+238 230 197
+205 197 156
+246 238 222
+213 205 164
+222 213 156
+0 0 0
+0 0 0
+213 189 148
+230 213 180
+238 230 213
+246 238 230
+246 246 246
+0 0 0
+255 255 255
+205 189 148
+222 213 172
+238 230 197
+205 197 156
+246 238 222
+213 205 164
+222 213 156
+0 0 0
+0 0 0
+213 189 148
+230 213 180
+238 230 213
+246 238 230
+246 246 246
+0 0 0
+255 222 65
+255 255 180
+255 238 74
+255 246 115
+255 255 148
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/building/tiles.png b/graphics/battle_terrain/building/tiles.png
new file mode 100755
index 000000000..9a031c297
--- /dev/null
+++ b/graphics/battle_terrain/building/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/cave/anim_map.bin b/graphics/battle_terrain/cave/anim_map.bin
new file mode 100755
index 000000000..0ab486890
--- /dev/null
+++ b/graphics/battle_terrain/cave/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/cave/anim_tiles.png b/graphics/battle_terrain/cave/anim_tiles.png
new file mode 100755
index 000000000..464a2058b
--- /dev/null
+++ b/graphics/battle_terrain/cave/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/cave/groudon.pal b/graphics/battle_terrain/cave/groudon.pal
new file mode 100755
index 000000000..73021c957
--- /dev/null
+++ b/graphics/battle_terrain/cave/groudon.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+246 246 189
+222 213 106
+180 156 106
+197 172 123
+205 189 115
+213 197 148
+197 172 106
+230 222 172
+255 189 49
+238 230 123
+213 115 32
+222 172 106
+230 197 139
+230 213 156
+238 230 180
+0 0 0
+246 246 189
+222 213 106
+180 156 106
+197 172 123
+205 189 115
+213 197 148
+197 172 106
+230 222 172
+255 189 49
+238 230 123
+82 106 172
+148 156 164
+197 189 164
+230 213 180
+238 230 180
+0 0 0
+106 74 65
+148 115 82
+180 139 90
+213 180 131
+230 213 156
+0 0 0
+205 148 74
+230 156 57
+255 172 49
+255 189 49
+205 148 74
+205 148 74
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/cave/map.bin b/graphics/battle_terrain/cave/map.bin
new file mode 100755
index 000000000..61f358f53
--- /dev/null
+++ b/graphics/battle_terrain/cave/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/cave/palette.pal b/graphics/battle_terrain/cave/palette.pal
new file mode 100755
index 000000000..64894d62c
--- /dev/null
+++ b/graphics/battle_terrain/cave/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+197 180 131
+205 197 90
+164 139 90
+180 156 106
+189 172 98
+189 164 115
+180 156 90
+197 164 115
+189 172 98
+222 213 106
+172 139 82
+180 148 98
+189 156 106
+197 164 106
+197 172 115
+0 0 0
+197 180 131
+205 197 90
+164 139 90
+180 156 106
+189 172 98
+189 164 115
+180 156 90
+197 164 115
+189 172 98
+222 213 106
+172 139 82
+180 148 98
+189 156 106
+197 164 106
+197 172 115
+0 0 0
+106 74 65
+148 115 82
+180 139 90
+213 180 131
+230 213 156
+0 0 0
+180 139 90
+180 139 90
+180 139 90
+213 180 131
+106 74 65
+148 115 82
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/cave/tiles.png b/graphics/battle_terrain/cave/tiles.png
new file mode 100755
index 000000000..27386731f
--- /dev/null
+++ b/graphics/battle_terrain/cave/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/long_grass/anim_map.bin b/graphics/battle_terrain/long_grass/anim_map.bin
new file mode 100755
index 000000000..bd86cce6c
--- /dev/null
+++ b/graphics/battle_terrain/long_grass/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/long_grass/anim_tiles.png b/graphics/battle_terrain/long_grass/anim_tiles.png
new file mode 100755
index 000000000..e2f1bb2c1
--- /dev/null
+++ b/graphics/battle_terrain/long_grass/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/long_grass/map.bin b/graphics/battle_terrain/long_grass/map.bin
new file mode 100755
index 000000000..61f358f53
--- /dev/null
+++ b/graphics/battle_terrain/long_grass/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/long_grass/palette.pal b/graphics/battle_terrain/long_grass/palette.pal
new file mode 100755
index 000000000..645c3d0e6
--- /dev/null
+++ b/graphics/battle_terrain/long_grass/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+180 238 180
+74 172 98
+115 213 131
+131 230 156
+98 189 131
+156 230 164
+115 197 148
+172 230 180
+0 0 0
+0 0 0
+139 205 90
+148 205 106
+156 222 131
+164 230 156
+172 230 180
+0 0 0
+180 238 180
+74 172 98
+115 213 131
+131 230 156
+98 189 131
+156 230 164
+115 197 148
+172 230 180
+0 0 0
+0 0 0
+139 205 90
+148 205 106
+156 213 131
+164 222 156
+172 230 180
+0 0 0
+115 213 82
+98 180 90
+90 148 74
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/long_grass/tiles.png b/graphics/battle_terrain/long_grass/tiles.png
new file mode 100755
index 000000000..8676f2f37
--- /dev/null
+++ b/graphics/battle_terrain/long_grass/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/plain/palette.pal b/graphics/battle_terrain/plain/palette.pal
new file mode 100755
index 000000000..2377b7729
--- /dev/null
+++ b/graphics/battle_terrain/plain/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+238 255 230
+156 230 156
+230 230 148
+230 238 164
+189 230 148
+230 246 180
+205 230 172
+172 238 172
+0 0 0
+0 0 0
+164 222 246
+180 230 230
+197 238 222
+213 246 213
+230 255 205
+0 0 0
+238 255 230
+156 230 156
+230 230 148
+230 238 164
+189 230 148
+230 246 180
+205 230 172
+172 238 172
+0 0 0
+0 0 0
+164 222 246
+180 230 230
+197 238 222
+213 246 213
+230 255 205
+0 0 0
+74 189 65
+172 230 172
+106 205 90
+131 213 115
+156 213 148
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/pond_water/anim_map.bin b/graphics/battle_terrain/pond_water/anim_map.bin
new file mode 100755
index 000000000..00aee5135
--- /dev/null
+++ b/graphics/battle_terrain/pond_water/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/pond_water/anim_tiles.png b/graphics/battle_terrain/pond_water/anim_tiles.png
new file mode 100755
index 000000000..08568455f
--- /dev/null
+++ b/graphics/battle_terrain/pond_water/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/pond_water/map.bin b/graphics/battle_terrain/pond_water/map.bin
new file mode 100755
index 000000000..61f358f53
--- /dev/null
+++ b/graphics/battle_terrain/pond_water/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/pond_water/palette.pal b/graphics/battle_terrain/pond_water/palette.pal
new file mode 100755
index 000000000..b0f74a08f
--- /dev/null
+++ b/graphics/battle_terrain/pond_water/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 255 255
+98 164 230
+164 246 98
+197 255 139
+115 205 180
+205 255 197
+148 222 148
+230 255 222
+139 213 255
+0 0 0
+222 230 230
+230 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+255 255 255
+98 164 230
+164 246 98
+197 255 139
+115 205 180
+205 255 197
+148 222 148
+230 255 222
+139 213 255
+0 0 0
+222 230 230
+230 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+205 246 255
+148 213 238
+123 189 230
+90 148 222
+49 106 189
+16 74 156
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/pond_water/tiles.png b/graphics/battle_terrain/pond_water/tiles.png
new file mode 100755
index 000000000..81fac5393
--- /dev/null
+++ b/graphics/battle_terrain/pond_water/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/rock/anim_map.bin b/graphics/battle_terrain/rock/anim_map.bin
new file mode 100755
index 000000000..d2a2776bd
--- /dev/null
+++ b/graphics/battle_terrain/rock/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/rock/anim_tiles.png b/graphics/battle_terrain/rock/anim_tiles.png
new file mode 100755
index 000000000..41be70296
--- /dev/null
+++ b/graphics/battle_terrain/rock/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/rock/map.bin b/graphics/battle_terrain/rock/map.bin
new file mode 100755
index 000000000..61f358f53
--- /dev/null
+++ b/graphics/battle_terrain/rock/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/rock/palette.pal b/graphics/battle_terrain/rock/palette.pal
new file mode 100755
index 000000000..1702e3810
--- /dev/null
+++ b/graphics/battle_terrain/rock/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 255 255
+189 172 139
+213 213 172
+222 222 213
+205 189 156
+230 230 213
+213 197 172
+238 238 230
+172 156 131
+0 0 0
+222 230 230
+230 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+255 255 255
+189 172 139
+213 213 172
+222 222 213
+205 189 156
+230 230 213
+213 197 172
+238 238 230
+172 156 131
+0 0 0
+222 230 230
+230 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+131 98 90
+164 131 98
+197 156 106
+213 180 131
+230 213 156
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/rock/tiles.png b/graphics/battle_terrain/rock/tiles.png
new file mode 100755
index 000000000..efb139eb6
--- /dev/null
+++ b/graphics/battle_terrain/rock/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/sand/anim_map.bin b/graphics/battle_terrain/sand/anim_map.bin
new file mode 100755
index 000000000..83c6ba8f1
--- /dev/null
+++ b/graphics/battle_terrain/sand/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/sand/anim_tiles.png b/graphics/battle_terrain/sand/anim_tiles.png
new file mode 100755
index 000000000..79c774acf
--- /dev/null
+++ b/graphics/battle_terrain/sand/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/sand/map.bin b/graphics/battle_terrain/sand/map.bin
new file mode 100755
index 000000000..d7bee6035
--- /dev/null
+++ b/graphics/battle_terrain/sand/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/sand/palette.pal b/graphics/battle_terrain/sand/palette.pal
new file mode 100755
index 000000000..20f4c3f7c
--- /dev/null
+++ b/graphics/battle_terrain/sand/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 255 205
+213 213 90
+238 238 139
+246 246 172
+230 230 106
+255 255 189
+238 230 131
+255 255 230
+0 0 0
+0 0 0
+238 238 123
+238 238 148
+246 246 172
+246 246 180
+246 246 197
+0 0 0
+255 255 205
+222 213 82
+246 246 148
+246 246 189
+230 230 115
+255 255 197
+238 238 123
+255 255 230
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+197 197 74
+164 156 32
+222 222 131
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/sand/tiles.png b/graphics/battle_terrain/sand/tiles.png
new file mode 100755
index 000000000..a4f7342be
--- /dev/null
+++ b/graphics/battle_terrain/sand/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/sky/anim_map.bin b/graphics/battle_terrain/sky/anim_map.bin
new file mode 100755
index 000000000..c1712cdd8
--- /dev/null
+++ b/graphics/battle_terrain/sky/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/sky/anim_tiles.png b/graphics/battle_terrain/sky/anim_tiles.png
new file mode 100755
index 000000000..246ca2255
--- /dev/null
+++ b/graphics/battle_terrain/sky/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/sky/map.bin b/graphics/battle_terrain/sky/map.bin
new file mode 100755
index 000000000..d7bee6035
--- /dev/null
+++ b/graphics/battle_terrain/sky/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/sky/palette.pal b/graphics/battle_terrain/sky/palette.pal
new file mode 100755
index 000000000..1a547d6a1
--- /dev/null
+++ b/graphics/battle_terrain/sky/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+213 238 255
+222 230 255
+148 205 255
+172 213 255
+197 222 255
+197 230 255
+172 213 255
+230 246 255
+205 222 246
+238 246 255
+164 213 255
+180 222 255
+197 230 255
+213 238 255
+230 246 255
+0 0 0
+180 238 255
+222 230 255
+148 205 255
+172 213 255
+197 222 255
+197 230 255
+172 213 255
+230 246 255
+205 222 246
+238 246 255
+148 197 255
+164 205 255
+189 222 255
+205 230 255
+230 246 255
+0 0 0
+222 238 255
+230 238 255
+238 246 255
+246 246 255
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+139 172 205
+197 230 255
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/sky/tiles.png b/graphics/battle_terrain/sky/tiles.png
new file mode 100755
index 000000000..461bba675
--- /dev/null
+++ b/graphics/battle_terrain/sky/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/stadium/battle_frontier.pal b/graphics/battle_terrain/stadium/battle_frontier.pal
new file mode 100755
index 000000000..10a842bcc
--- /dev/null
+++ b/graphics/battle_terrain/stadium/battle_frontier.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 255 255
+189 189 156
+213 213 197
+230 230 213
+197 197 180
+238 238 222
+205 205 189
+197 197 180
+0 0 0
+0 0 0
+222 230 230
+230 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+255 255 255
+189 189 156
+213 213 197
+230 230 213
+197 197 180
+238 238 222
+205 205 189
+197 197 180
+0 0 0
+0 0 0
+222 230 230
+230 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+172 189 213
+238 238 246
+180 197 222
+205 222 238
+222 230 246
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/stadium/map.bin b/graphics/battle_terrain/stadium/map.bin
new file mode 100755
index 000000000..d7bee6035
--- /dev/null
+++ b/graphics/battle_terrain/stadium/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/stadium/palette1.pal b/graphics/battle_terrain/stadium/palette1.pal
new file mode 100755
index 000000000..8252e3c5e
--- /dev/null
+++ b/graphics/battle_terrain/stadium/palette1.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+230 246 255
+65 131 213
+131 197 255
+148 205 246
+82 148 222
+172 213 246
+106 172 238
+98 164 246
+82 148 230
+98 164 246
+65 164 213
+106 189 230
+139 205 238
+180 230 238
+205 238 246
+0 0 0
+255 255 255
+189 189 156
+213 213 197
+230 230 213
+197 197 180
+238 238 222
+205 205 189
+197 197 180
+0 0 0
+0 0 0
+222 230 230
+230 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+255 213 65
+255 246 197
+255 213 82
+255 230 115
+255 246 131
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/stadium/palette2.pal b/graphics/battle_terrain/stadium/palette2.pal
new file mode 100755
index 000000000..48b2d851b
--- /dev/null
+++ b/graphics/battle_terrain/stadium/palette2.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+222 222 222
+222 106 0
+156 148 156
+172 164 172
+197 106 49
+189 180 189
+172 123 98
+238 131 0
+230 115 0
+246 131 0
+139 139 139
+156 148 156
+180 172 180
+197 189 197
+205 197 213
+0 0 0
+255 255 255
+189 189 156
+213 213 197
+230 230 213
+197 197 180
+238 238 222
+205 205 189
+197 197 180
+0 0 0
+0 0 0
+222 230 230
+230 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+123 205 164
+189 255 230
+139 222 180
+156 238 197
+172 255 213
+0 0 0
+213 49 0
+255 222 139
+213 106 57
+246 180 16
+255 197 90
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/stadium/palette3.pal b/graphics/battle_terrain/stadium/palette3.pal
new file mode 100755
index 000000000..10c5b50d6
--- /dev/null
+++ b/graphics/battle_terrain/stadium/palette3.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+230 246 230
+222 197 148
+246 222 172
+230 222 189
+230 205 156
+213 230 205
+238 213 164
+246 222 172
+238 205 164
+230 213 164
+65 172 156
+98 197 180
+139 213 213
+164 230 222
+197 238 230
+0 0 0
+230 246 230
+205 172 131
+238 213 164
+238 222 189
+213 180 139
+238 230 222
+222 197 148
+230 205 156
+222 189 148
+230 213 164
+65 172 156
+98 197 180
+139 213 213
+164 230 222
+197 238 230
+0 0 0
+255 213 65
+255 246 197
+255 213 82
+255 230 115
+255 246 131
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/stadium/palette4.pal b/graphics/battle_terrain/stadium/palette4.pal
new file mode 100755
index 000000000..201de5471
--- /dev/null
+++ b/graphics/battle_terrain/stadium/palette4.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+230 246 230
+197 156 205
+230 205 238
+205 222 230
+205 172 213
+213 213 230
+213 189 222
+213 156 238
+205 164 222
+230 180 238
+65 172 156
+98 197 180
+139 213 213
+164 230 222
+197 238 230
+0 0 0
+230 246 230
+197 139 205
+230 205 238
+205 222 230
+205 156 213
+213 213 230
+213 180 222
+213 156 238
+205 156 213
+230 180 238
+65 172 156
+98 197 180
+139 213 213
+164 230 222
+197 238 230
+0 0 0
+189 90 230
+230 213 246
+189 115 230
+197 139 230
+213 189 230
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/stadium/palette5.pal b/graphics/battle_terrain/stadium/palette5.pal
new file mode 100755
index 000000000..16f50d89b
--- /dev/null
+++ b/graphics/battle_terrain/stadium/palette5.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+230 246 230
+139 172 238
+180 213 255
+180 213 255
+148 180 238
+189 222 255
+164 197 246
+164 197 255
+148 180 246
+180 213 255
+65 172 156
+98 197 180
+139 213 213
+164 230 222
+197 238 230
+0 0 0
+230 246 230
+131 164 230
+180 213 255
+180 213 255
+148 180 238
+189 222 255
+164 197 246
+164 197 255
+148 180 246
+180 213 255
+65 172 156
+98 197 180
+139 213 213
+164 230 222
+197 238 230
+0 0 0
+90 148 238
+172 238 255
+106 172 238
+123 189 246
+164 222 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/stadium/palette6.pal b/graphics/battle_terrain/stadium/palette6.pal
new file mode 100755
index 000000000..118a6a3bb
--- /dev/null
+++ b/graphics/battle_terrain/stadium/palette6.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+230 246 230
+246 156 90
+197 197 197
+197 205 205
+230 164 123
+197 222 213
+213 180 156
+255 189 90
+255 172 90
+255 172 32
+65 172 156
+98 197 180
+139 213 213
+164 230 222
+197 238 230
+0 0 0
+230 246 230
+230 115 32
+164 164 164
+172 189 180
+205 131 74
+180 213 205
+180 148 115
+255 148 32
+246 131 32
+255 172 32
+65 172 156
+98 197 180
+139 213 213
+164 230 222
+197 238 230
+0 0 0
+238 189 49
+255 255 131
+238 197 57
+246 222 74
+255 246 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/stadium/palette7.pal b/graphics/battle_terrain/stadium/palette7.pal
new file mode 100755
index 000000000..891151f87
--- /dev/null
+++ b/graphics/battle_terrain/stadium/palette7.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+230 246 255
+65 172 172
+131 238 213
+148 238 197
+82 189 180
+172 255 205
+106 205 197
+98 205 205
+82 189 189
+98 205 197
+65 164 213
+106 189 230
+139 205 238
+180 230 238
+205 238 246
+0 0 0
+230 246 255
+65 172 172
+131 238 213
+148 238 197
+82 189 180
+172 255 205
+106 205 197
+98 205 205
+82 189 189
+98 205 197
+65 164 213
+106 189 230
+139 205 238
+180 230 238
+205 238 246
+0 0 0
+246 172 0
+255 238 131
+255 180 16
+255 197 41
+255 238 57
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/stadium/tiles.png b/graphics/battle_terrain/stadium/tiles.png
new file mode 100755
index 000000000..ece531ec0
--- /dev/null
+++ b/graphics/battle_terrain/stadium/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/tall_grass/anim_map.bin b/graphics/battle_terrain/tall_grass/anim_map.bin
new file mode 100755
index 000000000..8e7d784f3
--- /dev/null
+++ b/graphics/battle_terrain/tall_grass/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/tall_grass/anim_tiles.png b/graphics/battle_terrain/tall_grass/anim_tiles.png
new file mode 100755
index 000000000..85aed13bb
--- /dev/null
+++ b/graphics/battle_terrain/tall_grass/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/tall_grass/map.bin b/graphics/battle_terrain/tall_grass/map.bin
new file mode 100755
index 000000000..61f358f53
--- /dev/null
+++ b/graphics/battle_terrain/tall_grass/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/tall_grass/palette.pal b/graphics/battle_terrain/tall_grass/palette.pal
new file mode 100755
index 000000000..11db31cad
--- /dev/null
+++ b/graphics/battle_terrain/tall_grass/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+222 255 213
+123 213 131
+172 246 115
+197 246 189
+139 230 131
+222 255 205
+156 238 123
+0 0 0
+0 0 0
+0 0 0
+180 230 148
+189 238 164
+197 238 189
+205 246 197
+213 246 213
+0 0 0
+222 255 213
+123 213 131
+172 246 115
+197 246 189
+139 230 131
+222 255 205
+156 238 123
+0 0 0
+0 0 0
+0 0 0
+180 230 148
+189 238 164
+197 238 189
+205 246 197
+213 246 213
+0 0 0
+123 205 115
+164 222 148
+82 164 57
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/tall_grass/tiles.png b/graphics/battle_terrain/tall_grass/tiles.png
new file mode 100755
index 000000000..2d163d7bb
--- /dev/null
+++ b/graphics/battle_terrain/tall_grass/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/underwater/anim_map.bin b/graphics/battle_terrain/underwater/anim_map.bin
new file mode 100755
index 000000000..616c2a242
--- /dev/null
+++ b/graphics/battle_terrain/underwater/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/underwater/anim_tiles.png b/graphics/battle_terrain/underwater/anim_tiles.png
new file mode 100755
index 000000000..3e75434db
--- /dev/null
+++ b/graphics/battle_terrain/underwater/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/underwater/map.bin b/graphics/battle_terrain/underwater/map.bin
new file mode 100755
index 000000000..61f358f53
--- /dev/null
+++ b/graphics/battle_terrain/underwater/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/underwater/palette.pal b/graphics/battle_terrain/underwater/palette.pal
new file mode 100755
index 000000000..b5859af6e
--- /dev/null
+++ b/graphics/battle_terrain/underwater/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+197 230 255
+131 139 197
+148 197 246
+172 205 255
+131 164 213
+189 213 255
+148 180 222
+205 222 255
+197 230 255
+0 0 0
+148 164 238
+156 189 238
+172 205 238
+189 213 246
+197 222 255
+0 0 0
+197 230 255
+131 139 197
+148 197 246
+172 205 255
+131 164 213
+189 213 255
+148 180 222
+205 222 255
+197 230 255
+0 0 0
+148 164 238
+156 189 238
+172 205 238
+189 213 246
+197 222 255
+0 0 0
+98 164 230
+131 197 255
+172 238 255
+255 255 255
+205 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+98 98 172
+131 131 230
+172 172 255
+255 255 255
diff --git a/graphics/battle_terrain/underwater/tiles.png b/graphics/battle_terrain/underwater/tiles.png
new file mode 100755
index 000000000..b0d49a9cc
--- /dev/null
+++ b/graphics/battle_terrain/underwater/tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/water/anim_map.bin b/graphics/battle_terrain/water/anim_map.bin
new file mode 100755
index 000000000..2b5f7a548
--- /dev/null
+++ b/graphics/battle_terrain/water/anim_map.bin
Binary files differ
diff --git a/graphics/battle_terrain/water/anim_tiles.png b/graphics/battle_terrain/water/anim_tiles.png
new file mode 100755
index 000000000..b50564029
--- /dev/null
+++ b/graphics/battle_terrain/water/anim_tiles.png
Binary files differ
diff --git a/graphics/battle_terrain/water/kyogre.pal b/graphics/battle_terrain/water/kyogre.pal
new file mode 100755
index 000000000..eaa19730f
--- /dev/null
+++ b/graphics/battle_terrain/water/kyogre.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+246 246 189
+90 148 222
+148 213 238
+180 222 222
+106 172 230
+172 213 213
+123 189 230
+205 222 197
+0 0 0
+0 0 0
+172 139 82
+189 156 106
+213 197 148
+230 213 164
+238 230 180
+0 0 0
+246 246 189
+90 148 222
+148 213 238
+180 222 222
+106 172 230
+172 213 213
+123 189 230
+205 222 197
+0 0 0
+0 0 0
+172 139 82
+189 156 106
+213 197 148
+230 213 164
+238 230 180
+0 0 0
+98 164 230
+131 197 255
+172 238 255
+255 255 255
+205 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/water/map.bin b/graphics/battle_terrain/water/map.bin
new file mode 100755
index 000000000..61f358f53
--- /dev/null
+++ b/graphics/battle_terrain/water/map.bin
Binary files differ
diff --git a/graphics/battle_terrain/water/palette.pal b/graphics/battle_terrain/water/palette.pal
new file mode 100755
index 000000000..cbef92774
--- /dev/null
+++ b/graphics/battle_terrain/water/palette.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 255 255
+90 148 222
+148 213 238
+180 230 246
+106 172 230
+197 238 255
+123 189 230
+222 246 255
+0 0 0
+0 0 0
+205 222 246
+222 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+255 255 255
+90 148 222
+148 213 238
+180 230 246
+106 172 230
+197 238 255
+123 189 230
+222 246 255
+0 0 0
+0 0 0
+205 222 246
+222 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+197 238 255
+148 213 238
+123 189 230
+90 148 222
+49 106 189
+16 74 156
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/battle_terrain/water/tiles.png b/graphics/battle_terrain/water/tiles.png
new file mode 100755
index 000000000..902047875
--- /dev/null
+++ b/graphics/battle_terrain/water/tiles.png
Binary files differ
diff --git a/graphics/battle_transitions/vs.png b/graphics/battle_transitions/vs.png
new file mode 100755
index 000000000..5491990f6
--- /dev/null
+++ b/graphics/battle_transitions/vs.png
Binary files differ
diff --git a/graphics/battle_transitions/vs_frame.bin b/graphics/battle_transitions/vs_frame.bin
new file mode 100755
index 000000000..2ad153964
--- /dev/null
+++ b/graphics/battle_transitions/vs_frame.bin
Binary files differ
diff --git a/graphics/battle_transitions/vs_frame.png b/graphics/battle_transitions/vs_frame.png
new file mode 100755
index 000000000..0b38c8960
--- /dev/null
+++ b/graphics/battle_transitions/vs_frame.png
Binary files differ
diff --git a/graphics/berry_blender/arrow_old.png b/graphics/berry_blender/arrow_old.png
new file mode 100755
index 000000000..12d57c07e
--- /dev/null
+++ b/graphics/berry_blender/arrow_old.png
Binary files differ
diff --git a/graphics/berry_crusher/tiles.bin b/graphics/berry_crusher/tiles.bin
new file mode 100755
index 000000000..c6cc0edb1
--- /dev/null
+++ b/graphics/berry_crusher/tiles.bin
@@ -0,0 +1 @@
+L@L@L@L@L@L@L@L@L@M@\@\@\@\@\@\@\@\@\@]@N@N@N@N@N@N@N@N@N@O@^@^@^@^@^@^@^@^@^@_@````````````````````nDm@m@m@m@m@m@m@m@m@~D}@}@}@}@}@}@}@}@}@d`````````d````````` \ No newline at end of file
diff --git a/graphics/berry_crusher/tiles.pal b/graphics/berry_crusher/tiles.pal
new file mode 100755
index 000000000..13ea34e59
--- /dev/null
+++ b/graphics/berry_crusher/tiles.pal
@@ -0,0 +1,147 @@
+JASC-PAL
+0100
+144
+98 172 180
+255 213 156
+255 197 139
+255 164 106
+238 131 82
+222 123 74
+213 98 49
+197 82 41
+156 213 189
+123 180 156
+222 156 255
+172 123 222
+255 0 255
+255 0 255
+230 230 255
+65 74 90
+156 148 172
+255 213 156
+255 197 139
+255 164 106
+238 131 82
+222 123 74
+213 98 49
+197 82 41
+255 238 0
+230 189 0
+180 180 180
+139 139 139
+255 0 255
+255 0 255
+230 230 255
+65 74 90
+156 148 172
+255 213 156
+255 197 139
+255 164 106
+238 131 82
+222 123 74
+213 98 49
+197 82 41
+197 213 246
+255 255 255
+238 238 246
+205 205 213
+255 0 255
+255 0 255
+230 230 255
+65 74 90
+255 180 255
+164 172 172
+98 106 115
+123 131 139
+139 148 156
+148 222 164
+156 189 222
+197 213 246
+180 164 115
+205 189 148
+213 205 172
+230 222 189
+246 238 205
+139 123 74
+74 131 189
+65 74 90
+0 0 0
+148 222 164
+164 230 172
+180 238 189
+197 246 205
+213 255 222
+238 255 238
+255 255 255
+65 180 238
+255 255 255
+0 197 57
+255 255 255
+246 213 0
+255 0 255
+246 238 205
+139 123 74
+255 164 106
+164 172 172
+98 106 115
+123 131 139
+139 148 156
+115 156 189
+156 189 222
+197 213 246
+180 164 115
+205 189 148
+213 205 172
+230 222 189
+246 238 205
+139 123 74
+74 131 189
+65 74 90
+0 0 0
+148 222 164
+164 230 172
+180 238 189
+197 246 205
+213 255 222
+238 255 238
+255 255 255
+189 65 255
+255 255 255
+123 123 123
+255 0 255
+246 238 205
+139 123 74
+180 189 189
+255 255 255
+0 0 255
+164 172 172
+98 106 115
+123 131 139
+139 148 156
+115 156 189
+156 189 222
+148 222 164
+180 164 115
+205 189 148
+213 205 172
+230 222 189
+246 238 205
+139 123 74
+74 131 189
+65 74 90
+98 172 180
+41 41 57
+213 213 222
+205 205 205
+238 238 238
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/berry_crusher/tiles.png b/graphics/berry_crusher/tiles.png
new file mode 100755
index 000000000..6e43adb27
--- /dev/null
+++ b/graphics/berry_crusher/tiles.png
Binary files differ
diff --git a/graphics/berry_fix/gba_small.bin b/graphics/berry_fix/gba_small.bin
new file mode 100755
index 000000000..96e956d95
--- /dev/null
+++ b/graphics/berry_fix/gba_small.bin
Binary files differ
diff --git a/graphics/berry_fix/gba_small.pal b/graphics/berry_fix/gba_small.pal
new file mode 100755
index 000000000..0e177217f
--- /dev/null
+++ b/graphics/berry_fix/gba_small.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+0 0 0
+255 255 255
+32 32 32
+172 172 172
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+164 213 90
+238 230 197
+148 197 213
+32 57 98
+106 148 197
+90 106 156
+255 255 255
+164 213 90
+32 32 32
+123 123 205
+255 255 255
+74 74 115
+197 197 197
+98 98 189
+106 106 197
+98 123 57
+131 131 131
+222 41 0
+189 123 41
+180 180 222
+0 0 0
+0 0 0
diff --git a/graphics/berry_fix/gba_small.png b/graphics/berry_fix/gba_small.png
new file mode 100755
index 000000000..3bf1f3e36
--- /dev/null
+++ b/graphics/berry_fix/gba_small.png
Binary files differ
diff --git a/graphics/berry_fix/gba_transfer.bin b/graphics/berry_fix/gba_transfer.bin
new file mode 100755
index 000000000..987356047
--- /dev/null
+++ b/graphics/berry_fix/gba_transfer.bin
Binary files differ
diff --git a/graphics/berry_fix/gba_transfer.pal b/graphics/berry_fix/gba_transfer.pal
new file mode 100755
index 000000000..0e177217f
--- /dev/null
+++ b/graphics/berry_fix/gba_transfer.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+0 0 0
+255 255 255
+32 32 32
+172 172 172
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+164 213 90
+238 230 197
+148 197 213
+32 57 98
+106 148 197
+90 106 156
+255 255 255
+164 213 90
+32 32 32
+123 123 205
+255 255 255
+74 74 115
+197 197 197
+98 98 189
+106 106 197
+98 123 57
+131 131 131
+222 41 0
+189 123 41
+180 180 222
+0 0 0
+0 0 0
diff --git a/graphics/berry_fix/gba_transfer.png b/graphics/berry_fix/gba_transfer.png
new file mode 100755
index 000000000..9b7eb5571
--- /dev/null
+++ b/graphics/berry_fix/gba_transfer.png
Binary files differ
diff --git a/graphics/berry_fix/gba_transfer_error.bin b/graphics/berry_fix/gba_transfer_error.bin
new file mode 100755
index 000000000..3ee81549b
--- /dev/null
+++ b/graphics/berry_fix/gba_transfer_error.bin
Binary files differ
diff --git a/graphics/berry_fix/gba_transfer_error.pal b/graphics/berry_fix/gba_transfer_error.pal
new file mode 100755
index 000000000..0e177217f
--- /dev/null
+++ b/graphics/berry_fix/gba_transfer_error.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+0 0 0
+255 255 255
+32 32 32
+172 172 172
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+164 213 90
+238 230 197
+148 197 213
+32 57 98
+106 148 197
+90 106 156
+255 255 255
+164 213 90
+32 32 32
+123 123 205
+255 255 255
+74 74 115
+197 197 197
+98 98 189
+106 106 197
+98 123 57
+131 131 131
+222 41 0
+189 123 41
+180 180 222
+0 0 0
+0 0 0
diff --git a/graphics/berry_fix/gba_transfer_error.png b/graphics/berry_fix/gba_transfer_error.png
new file mode 100755
index 000000000..d8db4bfb9
--- /dev/null
+++ b/graphics/berry_fix/gba_transfer_error.png
Binary files differ
diff --git a/graphics/berry_fix/gba_transfer_highlight.bin b/graphics/berry_fix/gba_transfer_highlight.bin
new file mode 100755
index 000000000..df4470061
--- /dev/null
+++ b/graphics/berry_fix/gba_transfer_highlight.bin
Binary files differ
diff --git a/graphics/berry_fix/gba_transfer_highlight.pal b/graphics/berry_fix/gba_transfer_highlight.pal
new file mode 100755
index 000000000..0e177217f
--- /dev/null
+++ b/graphics/berry_fix/gba_transfer_highlight.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+0 0 0
+255 255 255
+32 32 32
+172 172 172
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+164 213 90
+238 230 197
+148 197 213
+32 57 98
+106 148 197
+90 106 156
+255 255 255
+164 213 90
+32 32 32
+123 123 205
+255 255 255
+74 74 115
+197 197 197
+98 98 189
+106 106 197
+98 123 57
+131 131 131
+222 41 0
+189 123 41
+180 180 222
+0 0 0
+0 0 0
diff --git a/graphics/berry_fix/gba_transfer_highlight.png b/graphics/berry_fix/gba_transfer_highlight.png
new file mode 100755
index 000000000..9fb9b6a48
--- /dev/null
+++ b/graphics/berry_fix/gba_transfer_highlight.png
Binary files differ
diff --git a/graphics/berry_fix/logo.bin b/graphics/berry_fix/logo.bin
new file mode 100755
index 000000000..3abafb27f
--- /dev/null
+++ b/graphics/berry_fix/logo.bin
Binary files differ
diff --git a/graphics/berry_fix/logo.pal b/graphics/berry_fix/logo.pal
new file mode 100755
index 000000000..4c76f3f9a
--- /dev/null
+++ b/graphics/berry_fix/logo.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 255 255
+32 32 32
+172 172 172
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+164 213 90
+238 230 197
+148 197 213
+32 57 98
+106 148 197
+90 106 156
+255 255 255
+164 213 90
+32 32 32
+123 123 205
+255 255 255
+74 74 115
+197 197 197
+98 98 189
+106 106 197
+98 123 57
+131 131 131
+222 41 0
+189 123 41
+180 180 222
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+238 238 238
+222 222 230
+205 205 222
+197 197 205
+180 180 197
+164 164 189
+156 156 172
+139 139 164
+123 123 156
+115 115 139
+98 98 131
+82 82 123
+74 74 115
+32 32 32
diff --git a/graphics/berry_fix/logo.png b/graphics/berry_fix/logo.png
new file mode 100755
index 000000000..29cda79b0
--- /dev/null
+++ b/graphics/berry_fix/logo.png
Binary files differ
diff --git a/graphics/berry_fix/window.bin b/graphics/berry_fix/window.bin
new file mode 100755
index 000000000..cbbfd7ebc
--- /dev/null
+++ b/graphics/berry_fix/window.bin
Binary files differ
diff --git a/graphics/berry_fix/window.pal b/graphics/berry_fix/window.pal
new file mode 100755
index 000000000..0e177217f
--- /dev/null
+++ b/graphics/berry_fix/window.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+0 0 0
+255 255 255
+32 32 32
+172 172 172
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+164 213 90
+238 230 197
+148 197 213
+32 57 98
+106 148 197
+90 106 156
+255 255 255
+164 213 90
+32 32 32
+123 123 205
+255 255 255
+74 74 115
+197 197 197
+98 98 189
+106 106 197
+98 123 57
+131 131 131
+222 41 0
+189 123 41
+180 180 222
+0 0 0
+0 0 0
diff --git a/graphics/berry_fix/window.png b/graphics/berry_fix/window.png
new file mode 100755
index 000000000..7b57701e3
--- /dev/null
+++ b/graphics/berry_fix/window.png
Binary files differ
diff --git a/graphics/contest/applause.png b/graphics/contest/applause.png
new file mode 100755
index 000000000..35067b7e7
--- /dev/null
+++ b/graphics/contest/applause.png
Binary files differ
diff --git a/graphics/contest/applause_meter.png b/graphics/contest/applause_meter.png
new file mode 100755
index 000000000..8a4fce8c0
--- /dev/null
+++ b/graphics/contest/applause_meter.png
Binary files differ
diff --git a/graphics/contest/audience.png b/graphics/contest/audience.png
new file mode 100755
index 000000000..59f8d0add
--- /dev/null
+++ b/graphics/contest/audience.png
Binary files differ
diff --git a/graphics/contest/clink_tilemap1.bin b/graphics/contest/clink_tilemap1.bin
new file mode 100755
index 000000000..e22f21839
--- /dev/null
+++ b/graphics/contest/clink_tilemap1.bin
Binary files differ
diff --git a/graphics/contest/clink_tilemap10.bin b/graphics/contest/clink_tilemap10.bin
new file mode 100755
index 000000000..2a91bb78d
--- /dev/null
+++ b/graphics/contest/clink_tilemap10.bin
@@ -0,0 +1 @@
+@@@@@@@@@@ \ No newline at end of file
diff --git a/graphics/contest/clink_tilemap11.bin b/graphics/contest/clink_tilemap11.bin
new file mode 100755
index 000000000..3b46e00b8
--- /dev/null
+++ b/graphics/contest/clink_tilemap11.bin
Binary files differ
diff --git a/graphics/contest/clink_tilemap2.bin b/graphics/contest/clink_tilemap2.bin
new file mode 100755
index 000000000..21c804d12
--- /dev/null
+++ b/graphics/contest/clink_tilemap2.bin
Binary files differ
diff --git a/graphics/contest/clink_tilemap3.bin b/graphics/contest/clink_tilemap3.bin
new file mode 100755
index 000000000..d4bb7bae7
--- /dev/null
+++ b/graphics/contest/clink_tilemap3.bin
Binary files differ
diff --git a/graphics/contest/clink_tilemap4.bin b/graphics/contest/clink_tilemap4.bin
new file mode 100755
index 000000000..32f24abd6
--- /dev/null
+++ b/graphics/contest/clink_tilemap4.bin
Binary files differ
diff --git a/graphics/contest/clink_tilemap5.bin b/graphics/contest/clink_tilemap5.bin
new file mode 100755
index 000000000..cc07b0f1a
--- /dev/null
+++ b/graphics/contest/clink_tilemap5.bin
Binary files differ
diff --git a/graphics/contest/clink_tilemap6.bin b/graphics/contest/clink_tilemap6.bin
new file mode 100755
index 000000000..f3939831e
--- /dev/null
+++ b/graphics/contest/clink_tilemap6.bin
Binary files differ
diff --git a/graphics/contest/clink_tilemap7.bin b/graphics/contest/clink_tilemap7.bin
new file mode 100755
index 000000000..fe02ec0b5
--- /dev/null
+++ b/graphics/contest/clink_tilemap7.bin
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/graphics/contest/clink_tilemap8.bin b/graphics/contest/clink_tilemap8.bin
new file mode 100755
index 000000000..d37d6df3c
--- /dev/null
+++ b/graphics/contest/clink_tilemap8.bin
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/graphics/contest/clink_tilemap9.bin b/graphics/contest/clink_tilemap9.bin
new file mode 100755
index 000000000..79d2e3fbb
--- /dev/null
+++ b/graphics/contest/clink_tilemap9.bin
@@ -0,0 +1 @@
+0000000000 \ No newline at end of file
diff --git a/graphics/contest/faces.png b/graphics/contest/faces.png
new file mode 100755
index 000000000..bba47a91d
--- /dev/null
+++ b/graphics/contest/faces.png
Binary files differ
diff --git a/graphics/contest/heart.png b/graphics/contest/heart.png
new file mode 100755
index 000000000..bd1ede8fc
--- /dev/null
+++ b/graphics/contest/heart.png
Binary files differ
diff --git a/graphics/contest/judge.png b/graphics/contest/judge.png
new file mode 100755
index 000000000..c4dcf520b
--- /dev/null
+++ b/graphics/contest/judge.png
Binary files differ
diff --git a/graphics/contest/judge_symbols.png b/graphics/contest/judge_symbols.png
new file mode 100755
index 000000000..7669fb88b
--- /dev/null
+++ b/graphics/contest/judge_symbols.png
Binary files differ
diff --git a/graphics/contest/misc.png b/graphics/contest/misc.png
new file mode 100755
index 000000000..5e3b40462
--- /dev/null
+++ b/graphics/contest/misc.png
Binary files differ
diff --git a/graphics/contest/misc_2.pal b/graphics/contest/misc_2.pal
new file mode 100755
index 000000000..869aef9e1
--- /dev/null
+++ b/graphics/contest/misc_2.pal
@@ -0,0 +1,259 @@
+JASC-PAL
+0100
+256
+0 0 0
+255 255 255
+189 189 197
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+255 106 115
+255 57 57
+205 32 0
+246 213 0
+255 123 98
+156 180 90
+164 148 57
+90 106 139
+180 172 82
+0 0 0
+255 255 255
+189 189 197
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+164 222 255
+106 148 255
+24 57 205
+246 213 0
+255 123 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+189 189 197
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+255 197 255
+255 139 255
+213 0 139
+246 213 0
+255 123 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+189 189 197
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+180 255 197
+148 255 164
+65 172 57
+246 213 0
+255 123 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+189 189 197
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+255 255 164
+246 213 0
+230 106 0
+246 213 0
+255 123 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+197 255 255
+255 255 255
+213 213 213
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+164 222 255
+106 148 255
+49 82 255
+180 255 197
+148 255 164
+65 172 57
+0 0 0
+0 0 0
+0 0 0
+197 255 255
+255 255 255
+213 213 213
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+255 139 230
+255 139 230
+255 49 156
+255 255 0
+255 255 0
+189 172 0
+41 49 90
+41 49 90
+0 0 0
+197 123 131
+255 255 255
+230 246 255
+205 238 255
+180 238 255
+156 230 255
+139 230 255
+255 205 230
+255 255 139
+255 230 255
+255 255 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+197 255 255
+255 255 255
+213 213 213
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+255 172 197
+255 172 172
+255 180 148
+255 189 123
+255 197 98
+255 205 82
+156 156 156
+156 156 156
+156 156 156
+197 255 255
+255 255 255
+213 213 213
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+164 222 255
+106 148 255
+49 82 255
+180 255 197
+148 255 164
+65 172 57
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+164 222 255
+106 230 222
+49 238 189
+0 255 156
+0 255 156
+82 255 98
+164 255 49
+255 255 0
+255 172 16
+255 90 32
+255 8 57
+230 57 106
+205 115 156
+180 164 205
+164 222 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/contest/misc_2.png b/graphics/contest/misc_2.png
new file mode 100755
index 000000000..106b975cf
--- /dev/null
+++ b/graphics/contest/misc_2.png
Binary files differ
diff --git a/graphics/contest/misc_2_tilemap_1.bin b/graphics/contest/misc_2_tilemap_1.bin
new file mode 100755
index 000000000..197e88cee
--- /dev/null
+++ b/graphics/contest/misc_2_tilemap_1.bin
Binary files differ
diff --git a/graphics/contest/misc_2_tilemap_2.bin b/graphics/contest/misc_2_tilemap_2.bin
new file mode 100755
index 000000000..b31126836
--- /dev/null
+++ b/graphics/contest/misc_2_tilemap_2.bin
Binary files differ
diff --git a/graphics/contest/misc_2_tilemap_3.bin b/graphics/contest/misc_2_tilemap_3.bin
new file mode 100755
index 000000000..5055ab79e
--- /dev/null
+++ b/graphics/contest/misc_2_tilemap_3.bin
@@ -0,0 +1 @@
+`papat`tppttbpcpctbtppttdpepetdtppttfpgpgtftppttppqpqtptppttrpspstrtpptttpuputttppttvpwpwtvtppttppttfpgpgtftpptt`papat`tppttbpcpctbtppttdpepetdtppttvpwpwtvtppttppqpqtptppttrpspstrtpptttpuputttbpcpctbtppttdpepetdtppttfpgpgtftpptt`papat`tppttrpspstrtpptttpuputttppttvpwpwtvtppttppqpqtptppttpptt`papat`tppttbpcpctbtppttdpepetdtppttfpgpgtftppttppqpqtptppttrpspstrtpptttpuputttppttvpwpwtvtdpepetdtppttfpgpgtftpptt`papat`tppttbpcpctbtpptttpuputttppttvpwpwtvtppttppqpqtptppttrpspstrtppttppttbpcpctbtppttdpepetdtppttfpgpgtftpptt`papat`tppttrpspstrtpptttpuputttppttvpwpwtvtppttppqpqtptfpgpgtftpptt`papat`tppttbpcpctbtppttdpepetdtppttvpwpwtvtppttppqpqtptppttrpspstrtpptttpuputttppttppttdpepetdtppttfpgpgtftpptt`papat`tppttbpcpctbtpptttpuputttppttvpwpwtvtppttppqpqtptppttrpspstrt`papat`tppttbpcpctbtppttdpepetdtppttfpgpgtftppttppqpqtptppttrpspstrtpptttpuputttppttvpwpwtvtppttppttfpgpgtftpptt`papat`tppttbpcpctbtppttdpepetdtppttvpwpwtvtppttppqpqtptppttrpspstrtpptttpuputttbpcpctbtppttdpepetdtppttfpgpgtftpptt`papat`tppttrpspstrtpptttpuputttppttvpwpwtvtppttppqpqtptppttpptt`papat`tppttbpcpctbtppttdpepetdtppttfpgpgtftppttppqpqtptppttrpspstrtpptttpuputttppttvpwpwtvtdpepetdtppttfpgpgtftpptt`papat`tppttbpcpctbtpptttpuputttppttvpwpwtvtppttppqpqtptppttrpspstrtppttppttbpcpctbtppttdpepetdtppttfpgpgtftpptt`papat`tppttrpspstrtpptttpuputttppttvpwpwtvtppttppqpqtptfpgpgtftpptt`papat`tppttbpcpctbtppttdpepetdtppttvpwpwtvtppttppqpqtptppttrpspstrtpptttpuputttppttppttdpepetdtppttfpgpgtftpptt`papat`tppttbpcpctbtpptttpuputttppttvpwpwtvtppttppqpqtptppttrpspstrt \ No newline at end of file
diff --git a/graphics/contest/nextturn.png b/graphics/contest/nextturn.png
new file mode 100755
index 000000000..1d79d0608
--- /dev/null
+++ b/graphics/contest/nextturn.png
Binary files differ
diff --git a/graphics/contest/nextturn_numbers.png b/graphics/contest/nextturn_numbers.png
new file mode 100755
index 000000000..cd0305b16
--- /dev/null
+++ b/graphics/contest/nextturn_numbers.png
Binary files differ
diff --git a/graphics/contest/nextturn_random.png b/graphics/contest/nextturn_random.png
new file mode 100755
index 000000000..7205bad8c
--- /dev/null
+++ b/graphics/contest/nextturn_random.png
Binary files differ
diff --git a/graphics/easy_chat/cursor.png b/graphics/easy_chat/cursor.png
new file mode 100755
index 000000000..502ea2d69
--- /dev/null
+++ b/graphics/easy_chat/cursor.png
Binary files differ
diff --git a/graphics/easy_chat/mode.png b/graphics/easy_chat/mode.png
new file mode 100755
index 000000000..31fb3fdd3
--- /dev/null
+++ b/graphics/easy_chat/mode.png
Binary files differ
diff --git a/graphics/easy_chat/rwindow.png b/graphics/easy_chat/rwindow.png
new file mode 100755
index 000000000..6319f9a5d
--- /dev/null
+++ b/graphics/easy_chat/rwindow.png
Binary files differ
diff --git a/graphics/easy_chat/window.bin b/graphics/easy_chat/window.bin
new file mode 100755
index 000000000..c18d45d3f
--- /dev/null
+++ b/graphics/easy_chat/window.bin
Binary files differ
diff --git a/graphics/easy_chat/window.png b/graphics/easy_chat/window.png
new file mode 100755
index 000000000..269971224
--- /dev/null
+++ b/graphics/easy_chat/window.png
Binary files differ
diff --git a/graphics/frontier_pass/cursor.png b/graphics/frontier_pass/cursor.png
new file mode 100755
index 000000000..3a7af3dd2
--- /dev/null
+++ b/graphics/frontier_pass/cursor.png
Binary files differ
diff --git a/graphics/frontier_pass/gold.pal b/graphics/frontier_pass/gold.pal
new file mode 100755
index 000000000..6db146382
--- /dev/null
+++ b/graphics/frontier_pass/gold.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+156 164 65
+255 255 255
+205 205 205
+164 164 164
+230 164 8
+230 139 8
+230 123 16
+255 230 131
+255 213 65
+255 205 8
+238 189 8
+222 172 16
+205 156 16
+197 139 24
+164 106 32
+139 82 41
diff --git a/graphics/frontier_pass/map_cursor.png b/graphics/frontier_pass/map_cursor.png
new file mode 100755
index 000000000..c20bbb59a
--- /dev/null
+++ b/graphics/frontier_pass/map_cursor.png
Binary files differ
diff --git a/graphics/frontier_pass/medals.png b/graphics/frontier_pass/medals.png
new file mode 100755
index 000000000..1c0d36688
--- /dev/null
+++ b/graphics/frontier_pass/medals.png
Binary files differ
diff --git a/graphics/frontier_pass/silver.pal b/graphics/frontier_pass/silver.pal
new file mode 100755
index 000000000..2c99390bb
--- /dev/null
+++ b/graphics/frontier_pass/silver.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+156 164 65
+255 255 255
+205 205 205
+164 164 164
+230 213 197
+222 180 156
+222 156 115
+238 238 246
+222 222 230
+213 205 213
+197 197 197
+189 180 180
+172 164 164
+164 156 148
+148 139 131
+139 131 115
diff --git a/graphics/frontier_pass/tilemap1.bin b/graphics/frontier_pass/tilemap1.bin
new file mode 100755
index 000000000..c2aa0dc9a
--- /dev/null
+++ b/graphics/frontier_pass/tilemap1.bin
Binary files differ
diff --git a/graphics/frontier_pass/tilemap2.bin b/graphics/frontier_pass/tilemap2.bin
new file mode 100755
index 000000000..63c2f9b14
--- /dev/null
+++ b/graphics/frontier_pass/tilemap2.bin
Binary files differ
diff --git a/graphics/frontier_pass/tiles.bin b/graphics/frontier_pass/tiles.bin
new file mode 100755
index 000000000..e4e066ebe
--- /dev/null
+++ b/graphics/frontier_pass/tiles.bin
Binary files differ
diff --git a/graphics/frontier_pass/tiles.pal b/graphics/frontier_pass/tiles.pal
new file mode 100755
index 000000000..2bfcff098
--- /dev/null
+++ b/graphics/frontier_pass/tiles.pal
@@ -0,0 +1,131 @@
+JASC-PAL
+0100
+128
+57 74 74
+255 255 255
+205 205 205
+164 164 164
+123 123 123
+98 98 115
+57 74 74
+230 246 255
+98 41 65
+255 255 230
+230 230 197
+255 32 32
+98 164 222
+82 139 197
+74 115 172
+74 98 106
+139 98 115
+255 255 255
+230 255 222
+164 164 164
+123 123 123
+98 98 115
+41 57 65
+57 106 139
+65 139 197
+180 230 156
+148 238 131
+131 222 115
+82 172 74
+106 189 255
+205 205 205
+0 0 0
+139 98 115
+238 255 246
+213 238 230
+164 164 164
+123 123 123
+98 98 115
+41 57 65
+57 106 139
+65 139 197
+189 213 205
+148 180 164
+106 148 123
+65 115 90
+106 189 255
+205 205 205
+0 0 0
+139 98 115
+255 246 230
+246 230 213
+205 156 90
+180 131 65
+98 98 115
+41 57 65
+57 106 139
+65 139 197
+230 189 139
+205 156 115
+180 131 82
+156 106 41
+106 189 255
+205 205 205
+0 0 0
+139 98 115
+246 246 255
+230 230 238
+189 189 197
+156 156 156
+156 106 41
+41 57 65
+57 106 139
+65 139 197
+230 230 238
+189 189 197
+156 156 156
+123 123 123
+106 189 255
+205 205 205
+0 0 0
+139 98 115
+246 246 222
+246 238 172
+164 164 164
+123 123 123
+98 98 115
+41 57 65
+57 106 139
+65 139 197
+246 230 139
+230 213 49
+213 197 57
+156 115 57
+106 189 255
+205 205 205
+0 0 0
+0 0 0
+106 131 238
+139 164 213
+189 205 205
+213 197 131
+246 222 164
+172 131 131
+148 98 106
+115 106 148
+106 123 197
+197 230 230
+139 189 131
+106 156 74
+148 222 189
+238 156 131
+238 246 255
+0 0 0
+123 148 189
+65 74 106
+106 98 115
+82 90 180
+139 123 139
+164 172 189
+106 148 131
+180 205 213
+156 156 156
+213 238 230
+255 255 255
+213 180 172
+222 230 238
+213 205 156
+0 0 0
diff --git a/graphics/frontier_pass/tiles.png b/graphics/frontier_pass/tiles.png
new file mode 100755
index 000000000..520c34b3d
--- /dev/null
+++ b/graphics/frontier_pass/tiles.png
Binary files differ
diff --git a/graphics/frontier_pass/tiles2.png b/graphics/frontier_pass/tiles2.png
new file mode 100755
index 000000000..6bd420a8d
--- /dev/null
+++ b/graphics/frontier_pass/tiles2.png
Binary files differ
diff --git a/graphics/interface/bag_pyramid.pal b/graphics/interface/bag_pyramid.pal
new file mode 100755
index 000000000..200b001b5
--- /dev/null
+++ b/graphics/interface/bag_pyramid.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+115 197 164
+255 197 106
+230 172 90
+205 148 74
+180 123 65
+164 98 49
+139 74 32
+115 49 24
+90 24 8
+74 0 0
+255 222 123
+164 131 255
+213 205 255
+98 98 115
+255 255 255
+0 0 0
+115 197 164
+255 197 106
+230 172 90
+205 148 74
+180 123 65
+164 98 49
+139 74 32
+115 49 24
+90 24 8
+74 0 0
+255 222 123
+255 49 0
+255 213 172
+98 98 115
+255 255 255
+0 0 0
diff --git a/graphics/interface/bag_pyramid.png b/graphics/interface/bag_pyramid.png
new file mode 100755
index 000000000..42b709057
--- /dev/null
+++ b/graphics/interface/bag_pyramid.png
Binary files differ
diff --git a/graphics/interface/bag_screen.png b/graphics/interface/bag_screen.png
new file mode 100755
index 000000000..e634cdb27
--- /dev/null
+++ b/graphics/interface/bag_screen.png
Binary files differ
diff --git a/graphics/interface/bag_screen_female.pal b/graphics/interface/bag_screen_female.pal
new file mode 100755
index 000000000..07057ec9a
--- /dev/null
+++ b/graphics/interface/bag_screen_female.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+98 98 115
+255 255 255
+205 205 205
+164 164 164
+123 123 123
+98 98 115
+57 49 57
+156 65 106
+98 41 65
+255 255 205
+255 230 139
+255 32 32
+230 123 139
+164 49 115
+189 156 90
+0 0 0
+98 98 115
+0 0 0
+255 255 255
+213 213 205
+189 156 90
+255 0 0
+180 180 180
+0 0 0
+0 0 0
+238 205 131
+255 255 205
+90 0 123
+230 123 139
+164 49 115
+106 180 213
+255 148 180
diff --git a/graphics/interface/bag_screen_male.pal b/graphics/interface/bag_screen_male.pal
new file mode 100755
index 000000000..e773c384c
--- /dev/null
+++ b/graphics/interface/bag_screen_male.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+98 98 115
+255 255 255
+205 205 205
+164 164 164
+123 123 123
+98 98 115
+41 57 65
+57 106 139
+41 82 115
+255 255 205
+255 230 139
+255 32 32
+213 106 255
+74 131 255
+189 156 90
+0 0 0
+98 98 115
+0 0 0
+255 255 255
+213 213 205
+189 156 90
+255 0 0
+180 180 180
+0 0 0
+0 0 0
+238 205 131
+255 255 205
+90 0 123
+213 106 255
+74 131 255
+255 0 0
+255 148 180
diff --git a/graphics/interface/bag_swap.png b/graphics/interface/bag_swap.png
new file mode 100755
index 000000000..a9bed1e8a
--- /dev/null
+++ b/graphics/interface/bag_swap.png
Binary files differ
diff --git a/graphics/interface/ball/ultra.pal b/graphics/interface/ball/ultra.pal
new file mode 100755
index 000000000..3b7021097
--- /dev/null
+++ b/graphics/interface/ball/ultra.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+255 255 255
+180 139 16
+205 172 32
+230 205 49
+255 238 65
+255 255 255
+148 148 148
+65 65 65
+24 24 24
+255 255 255
+255 255 255
+255 255 255
+255 255 255
+255 255 255
+255 255 255
+255 255 255
diff --git a/graphics/interface/ball/ultra.png b/graphics/interface/ball/ultra.png
new file mode 100755
index 000000000..1221cec4e
--- /dev/null
+++ b/graphics/interface/ball/ultra.png
Binary files differ
diff --git a/graphics/interface/ball_open.png b/graphics/interface/ball_open.png
new file mode 100755
index 000000000..1030f4942
--- /dev/null
+++ b/graphics/interface/ball_open.png
Binary files differ
diff --git a/graphics/interface/berry_tag.bin b/graphics/interface/berry_tag.bin
new file mode 100755
index 000000000..fc809d6a7
--- /dev/null
+++ b/graphics/interface/berry_tag.bin
Binary files differ
diff --git a/graphics/interface/berry_tag_title.bin b/graphics/interface/berry_tag_title.bin
new file mode 100755
index 000000000..560eb6cfa
--- /dev/null
+++ b/graphics/interface/berry_tag_title.bin
Binary files differ
diff --git a/graphics/interface/check_berry.pal b/graphics/interface/check_berry.pal
new file mode 100755
index 000000000..f4f6cb4e3
--- /dev/null
+++ b/graphics/interface/check_berry.pal
@@ -0,0 +1,99 @@
+JASC-PAL
+0100
+96
+0 0 0
+255 255 255
+238 246 238
+222 238 230
+213 230 213
+197 230 205
+189 222 189
+172 213 180
+164 213 172
+148 156 123
+115 106 90
+90 57 65
+222 49 8
+213 106 74
+205 164 139
+213 213 213
+0 0 0
+255 255 255
+213 246 205
+172 246 156
+139 246 106
+106 213 74
+74 180 41
+41 148 8
+246 230 8
+222 197 8
+205 164 8
+189 131 8
+172 98 8
+90 82 106
+172 98 8
+0 0 172
+0 0 0
+246 246 222
+230 213 222
+222 180 222
+205 148 222
+197 123 222
+180 90 222
+172 57 222
+156 24 222
+148 0 222
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+246 246 255
+230 238 246
+213 230 246
+197 222 238
+180 213 238
+164 205 230
+148 197 230
+131 189 230
+0 0 0
+0 0 0
+0 0 0
+246 230 8
+222 197 8
+205 164 8
+189 131 8
+0 0 0
+189 131 65
+197 131 98
+222 189 131
+123 82 24
+0 0 0
+0 0 0
+180 123 123
+238 222 172
+189 131 65
+65 32 0
+255 0 0
+106 180 213
+41 123 164
+123 148 49
+246 246 246
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+230 123 139
+164 49 115
+0 0 0
+0 0 0
diff --git a/graphics/interface/check_berry.png b/graphics/interface/check_berry.png
new file mode 100755
index 000000000..56fc2966b
--- /dev/null
+++ b/graphics/interface/check_berry.png
Binary files differ
diff --git a/graphics/interface/check_berry_circle.png b/graphics/interface/check_berry_circle.png
new file mode 100755
index 000000000..4d66237e5
--- /dev/null
+++ b/graphics/interface/check_berry_circle.png
Binary files differ
diff --git a/graphics/interface/hm.png b/graphics/interface/hm.png
new file mode 100755
index 000000000..d6c7e8de9
--- /dev/null
+++ b/graphics/interface/hm.png
Binary files differ
diff --git a/graphics/interface/hpbar_anim.png b/graphics/interface/hpbar_anim.png
new file mode 100755
index 000000000..d4e79fdae
--- /dev/null
+++ b/graphics/interface/hpbar_anim.png
Binary files differ
diff --git a/graphics/interface/mart_frame.bin b/graphics/interface/mart_frame.bin
new file mode 100755
index 000000000..63156b8d5
--- /dev/null
+++ b/graphics/interface/mart_frame.bin
Binary files differ
diff --git a/graphics/interface/mart_frame.png b/graphics/interface/mart_frame.png
new file mode 100755
index 000000000..ece93b7c7
--- /dev/null
+++ b/graphics/interface/mart_frame.png
Binary files differ
diff --git a/graphics/interface/menu.png b/graphics/interface/menu.png
new file mode 100755
index 000000000..96f6b8b15
--- /dev/null
+++ b/graphics/interface/menu.png
Binary files differ
diff --git a/graphics/interface/menu_0.pal b/graphics/interface/menu_0.pal
new file mode 100755
index 000000000..67e1af896
--- /dev/null
+++ b/graphics/interface/menu_0.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 255 255
+255 0 0
+82 98 156
+106 139 189
+255 255 255
+106 90 115
+213 205 213
+65 74 123
+74 65 82
+131 139 139
+106 65 90
+172 106 98
+213 74 57
+156 74 98
+106 164 164
diff --git a/graphics/interface/menu_1.pal b/graphics/interface/menu_1.pal
new file mode 100755
index 000000000..3adc73766
--- /dev/null
+++ b/graphics/interface/menu_1.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+74 57 115
+82 98 156
+106 139 189
+41 49 49
+255 255 255
+106 90 115
+222 213 222
+90 82 82
+180 189 180
+139 156 213
+90 74 131
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/interface/menu_map.bin b/graphics/interface/menu_map.bin
new file mode 100755
index 000000000..8a7b3f1f0
--- /dev/null
+++ b/graphics/interface/menu_map.bin
Binary files differ
diff --git a/graphics/interface/money.png b/graphics/interface/money.png
new file mode 100755
index 000000000..d11fe06d1
--- /dev/null
+++ b/graphics/interface/money.png
Binary files differ
diff --git a/graphics/interface/numbers1.png b/graphics/interface/numbers1.png
new file mode 100755
index 000000000..f15757958
--- /dev/null
+++ b/graphics/interface/numbers1.png
Binary files differ
diff --git a/graphics/interface/numbers2.png b/graphics/interface/numbers2.png
new file mode 100755
index 000000000..4ddf364bf
--- /dev/null
+++ b/graphics/interface/numbers2.png
Binary files differ
diff --git a/graphics/interface/party_menu_hpbar.png b/graphics/interface/party_menu_hpbar.png
new file mode 100755
index 000000000..763b91210
--- /dev/null
+++ b/graphics/interface/party_menu_hpbar.png
Binary files differ
diff --git a/graphics/interface/party_menu_misc.bin b/graphics/interface/party_menu_misc.bin
new file mode 100755
index 000000000..d6ff1114d
--- /dev/null
+++ b/graphics/interface/party_menu_misc.bin
Binary files differ
diff --git a/graphics/interface/party_menu_misc.pal b/graphics/interface/party_menu_misc.pal
new file mode 100755
index 000000000..0b4b30f81
--- /dev/null
+++ b/graphics/interface/party_menu_misc.pal
@@ -0,0 +1,179 @@
+JASC-PAL
+0100
+176
+123 156 115
+255 255 255
+106 106 106
+0 0 0
+65 205 255
+0 139 189
+49 189 238
+255 156 148
+189 90 82
+222 123 115
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+139 148 123
+74 74 98
+65 156 148
+139 156 41
+205 213 123
+180 180 90
+82 65 74
+32 16 24
+255 0 255
+255 0 255
+255 255 255
+230 238 139
+98 90 0
+255 0 255
+255 0 255
+115 90 180
+139 148 123
+255 115 49
+65 156 148
+139 156 41
+205 213 123
+180 180 90
+82 65 74
+82 82 90
+255 0 255
+255 0 255
+255 255 255
+123 205 180
+57 148 123
+255 0 255
+255 0 255
+164 115 246
+123 156 115
+74 74 98
+115 115 115
+255 255 255
+131 197 222
+57 148 222
+41 123 180
+131 197 222
+41 123 180
+115 255 172
+90 213 131
+65 205 255
+0 98 148
+82 82 82
+255 213 82
+255 180 65
+123 156 115
+74 74 98
+115 115 115
+255 255 255
+213 197 90
+197 164 24
+156 156 32
+213 197 90
+156 156 32
+255 230 57
+205 172 8
+255 156 148
+156 65 57
+82 82 82
+255 213 82
+255 180 65
+123 156 115
+74 74 98
+115 115 115
+255 255 255
+213 164 32
+197 106 16
+164 74 0
+213 164 32
+164 74 0
+255 115 49
+197 57 0
+255 0 255
+255 0 255
+82 82 82
+255 213 82
+255 180 65
+123 156 115
+255 115 49
+115 115 115
+255 255 255
+180 255 164
+123 222 131
+123 156 98
+255 115 49
+255 115 49
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+82 82 82
+255 213 82
+255 180 65
+57 156 255
+255 115 49
+115 115 115
+255 255 255
+172 238 255
+123 213 238
+74 172 205
+255 115 49
+255 115 49
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+82 82 82
+255 213 82
+255 180 65
+57 156 255
+255 115 49
+115 115 115
+255 255 255
+246 246 148
+246 230 98
+222 197 32
+255 115 49
+255 115 49
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+82 82 82
+255 213 82
+255 180 65
+57 156 255
+255 115 49
+115 115 115
+255 255 255
+255 213 222
+255 189 148
+238 164 131
+255 115 49
+255 115 49
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+82 82 82
+255 213 82
+255 180 65
+57 156 255
+255 255 115
+115 115 115
+255 255 255
+180 255 164
+123 222 131
+131 172 106
+255 255 115
+255 255 115
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+82 82 82
+255 213 82
+255 180 65
diff --git a/graphics/interface/party_menu_misc.png b/graphics/interface/party_menu_misc.png
new file mode 100755
index 000000000..c58f3aae9
--- /dev/null
+++ b/graphics/interface/party_menu_misc.png
Binary files differ
diff --git a/graphics/interface/party_menu_pokeball.png b/graphics/interface/party_menu_pokeball.png
new file mode 100755
index 000000000..2aad54de8
--- /dev/null
+++ b/graphics/interface/party_menu_pokeball.png
Binary files differ
diff --git a/graphics/interface/party_menu_pokeball_small.png b/graphics/interface/party_menu_pokeball_small.png
new file mode 100755
index 000000000..d2eec4d45
--- /dev/null
+++ b/graphics/interface/party_menu_pokeball_small.png
Binary files differ
diff --git a/graphics/interface/pokeblock.bin b/graphics/interface/pokeblock.bin
new file mode 100755
index 000000000..1719bb5a6
--- /dev/null
+++ b/graphics/interface/pokeblock.bin
Binary files differ
diff --git a/graphics/interface/pokeblock_case_frame.pal b/graphics/interface/pokeblock_case_frame.pal
new file mode 100755
index 000000000..ef58ae778
--- /dev/null
+++ b/graphics/interface/pokeblock_case_frame.pal
@@ -0,0 +1,99 @@
+JASC-PAL
+0100
+96
+0 0 0
+123 205 189
+238 246 255
+213 230 255
+255 0 0
+115 131 238
+90 90 98
+123 180 189
+131 131 164
+0 0 0
+0 0 0
+197 197 197
+205 65 24
+255 123 90
+255 180 148
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+238 246 255
+0 0 0
+0 0 0
+90 90 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+197 197 197
+106 139 189
+148 213 255
+180 238 255
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+255 238 238
+0 0 0
+0 0 0
+90 90 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+197 197 197
+205 90 172
+255 156 197
+255 197 213
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+106 180 115
+148 246 98
+205 255 139
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+180 180 49
+246 230 49
+255 255 148
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+148 148 139
+222 222 222
+238 238 238
+255 255 255
diff --git a/graphics/interface/pokeblock_case_frame.png b/graphics/interface/pokeblock_case_frame.png
new file mode 100755
index 000000000..ffc658821
--- /dev/null
+++ b/graphics/interface/pokeblock_case_frame.png
Binary files differ
diff --git a/graphics/interface/pokeblock_device.png b/graphics/interface/pokeblock_device.png
new file mode 100755
index 000000000..65b29a8b3
--- /dev/null
+++ b/graphics/interface/pokeblock_device.png
Binary files differ
diff --git a/graphics/interface/pokeblock_feeding_bg_map.bin b/graphics/interface/pokeblock_feeding_bg_map.bin
new file mode 100755
index 000000000..9feebf8bc
--- /dev/null
+++ b/graphics/interface/pokeblock_feeding_bg_map.bin
Binary files differ
diff --git a/graphics/interface/powacc_tilemap.bin b/graphics/interface/powacc_tilemap.bin
new file mode 100755
index 000000000..5b492db68
--- /dev/null
+++ b/graphics/interface/powacc_tilemap.bin
Binary files differ
diff --git a/graphics/interface/status_icons.png b/graphics/interface/status_icons.png
new file mode 100755
index 000000000..fe802d7f6
--- /dev/null
+++ b/graphics/interface/status_icons.png
Binary files differ
diff --git a/graphics/interface/status_screen.bin b/graphics/interface/status_screen.bin
new file mode 100755
index 000000000..771d4db93
--- /dev/null
+++ b/graphics/interface/status_screen.bin
Binary files differ
diff --git a/graphics/interface/status_screen.pal b/graphics/interface/status_screen.pal
new file mode 100755
index 000000000..badbfe53b
--- /dev/null
+++ b/graphics/interface/status_screen.pal
@@ -0,0 +1,131 @@
+JASC-PAL
+0100
+128
+180 180 115
+74 65 57
+255 255 255
+222 230 246
+213 213 189
+246 255 255
+115 106 98
+98 156 222
+74 148 189
+57 148 164
+32 148 139
+16 148 115
+156 222 164
+98 180 139
+49 139 115
+0 106 98
+180 180 115
+74 65 57
+255 255 255
+90 106 0
+123 139 32
+255 246 205
+115 106 98
+90 222 123
+90 205 98
+90 189 74
+98 172 49
+98 156 24
+238 164 255
+189 156 164
+148 148 82
+106 148 0
+180 180 115
+74 65 57
+255 255 255
+172 180 172
+205 205 197
+246 255 238
+115 106 98
+238 222 24
+213 189 57
+189 164 98
+164 139 131
+139 115 172
+205 222 123
+172 172 148
+139 131 180
+115 90 213
+180 180 115
+74 65 57
+255 255 255
+0 0 0
+0 0 0
+246 255 246
+115 106 98
+222 24 238
+189 16 238
+164 8 238
+131 8 246
+106 0 246
+172 222 222
+139 148 230
+106 74 238
+82 0 255
+180 180 115
+74 65 57
+148 32 172
+189 106 213
+230 189 255
+255 255 255
+213 148 246
+189 139 205
+255 230 255
+230 180 213
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+115 98 90
+180 180 115
+74 65 57
+255 255 255
+222 230 246
+246 246 222
+246 255 255
+115 106 98
+255 205 74
+230 164 98
+205 123 123
+180 82 148
+156 41 172
+230 156 255
+197 98 238
+164 49 222
+131 0 205
+98 180 106
+0 0 0
+213 213 205
+255 255 255
+98 98 98
+230 8 8
+255 189 115
+65 205 255
+0 139 189
+255 156 148
+189 90 82
+139 246 255
+24 164 213
+255 189 180
+213 115 106
+0 0 0
+98 180 106
+0 0 0
+213 213 205
+255 255 255
+98 98 98
+230 8 8
+255 189 115
+238 238 172
+164 164 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 0 0
+164 0 0
+255 255 255
diff --git a/graphics/interface/status_screen.png b/graphics/interface/status_screen.png
new file mode 100755
index 000000000..2f9f8db85
--- /dev/null
+++ b/graphics/interface/status_screen.png
Binary files differ
diff --git a/graphics/interface/status_tilemap0.bin b/graphics/interface/status_tilemap0.bin
new file mode 100755
index 000000000..a869a9d03
--- /dev/null
+++ b/graphics/interface/status_tilemap0.bin
Binary files differ
diff --git a/graphics/interface/status_tilemap1.bin b/graphics/interface/status_tilemap1.bin
new file mode 100755
index 000000000..19cb94637
--- /dev/null
+++ b/graphics/interface/status_tilemap1.bin
Binary files differ
diff --git a/graphics/interface/status_tilemap2.bin b/graphics/interface/status_tilemap2.bin
new file mode 100755
index 000000000..f835047d1
--- /dev/null
+++ b/graphics/interface/status_tilemap2.bin
Binary files differ
diff --git a/graphics/interface/status_tilemap3.bin b/graphics/interface/status_tilemap3.bin
new file mode 100755
index 000000000..9c11ccc4f
--- /dev/null
+++ b/graphics/interface/status_tilemap3.bin
Binary files differ
diff --git a/graphics/interface/summary.bin b/graphics/interface/summary.bin
new file mode 100755
index 000000000..0a19222a3
--- /dev/null
+++ b/graphics/interface/summary.bin
Binary files differ
diff --git a/graphics/interface/summary_frames.png b/graphics/interface/summary_frames.png
new file mode 100755
index 000000000..2a579b012
--- /dev/null
+++ b/graphics/interface/summary_frames.png
Binary files differ
diff --git a/graphics/interface/textbox.png b/graphics/interface/textbox.png
new file mode 100755
index 000000000..ed8cd92ee
--- /dev/null
+++ b/graphics/interface/textbox.png
Binary files differ
diff --git a/graphics/interface/unk_tilemap.bin b/graphics/interface/unk_tilemap.bin
new file mode 100755
index 000000000..0b3837ae2
--- /dev/null
+++ b/graphics/interface/unk_tilemap.bin
Binary files differ
diff --git a/graphics/interface/wallclock.png b/graphics/interface/wallclock.png
new file mode 100755
index 000000000..e50f37e72
--- /dev/null
+++ b/graphics/interface/wallclock.png
Binary files differ
diff --git a/graphics/interface/wallclock1.bin b/graphics/interface/wallclock1.bin
new file mode 100755
index 000000000..49f21ed5b
--- /dev/null
+++ b/graphics/interface/wallclock1.bin
Binary files differ
diff --git a/graphics/interface/wallclock2.bin b/graphics/interface/wallclock2.bin
new file mode 100755
index 000000000..ba479e7b1
--- /dev/null
+++ b/graphics/interface/wallclock2.bin
Binary files differ
diff --git a/graphics/interface/wallclock_female.pal b/graphics/interface/wallclock_female.pal
new file mode 100755
index 000000000..a7909e2e0
--- /dev/null
+++ b/graphics/interface/wallclock_female.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+65 65 90
+222 230 238
+213 213 222
+205 205 213
+197 197 205
+255 197 255
+255 156 255
+255 115 255
+255 82 255
+74 180 189
+255 230 49
+90 90 123
+123 123 172
+65 65 90
+255 255 255
+0 0 0
diff --git a/graphics/interface/wallclock_male.pal b/graphics/interface/wallclock_male.pal
new file mode 100755
index 000000000..1582ebfd2
--- /dev/null
+++ b/graphics/interface/wallclock_male.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+65 65 90
+222 230 238
+213 213 222
+205 205 213
+197 197 205
+164 180 255
+115 139 255
+74 98 255
+32 65 255
+74 180 189
+255 230 49
+90 90 123
+123 123 172
+65 65 90
+255 255 255
+0 0 0
diff --git a/graphics/interface_fr/menu.png b/graphics/interface_fr/menu.png
new file mode 100755
index 000000000..a04c981d5
--- /dev/null
+++ b/graphics/interface_fr/menu.png
Binary files differ
diff --git a/graphics/interface_fr/menu1.pal b/graphics/interface_fr/menu1.pal
new file mode 100755
index 000000000..ab57da621
--- /dev/null
+++ b/graphics/interface_fr/menu1.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+123 156 131
+238 238 238
+0 0 0
+213 213 189
+172 164 123
+255 131 123
+238 49 0
+222 49 16
+197 49 41
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/interface_fr/menu2.pal b/graphics/interface_fr/menu2.pal
new file mode 100755
index 000000000..16a03be2c
--- /dev/null
+++ b/graphics/interface_fr/menu2.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+123 156 131
+238 49 0
+246 131 49
+255 180 16
+222 230 49
+123 205 82
+156 222 222
+106 148 246
+164 65 164
+172 172 123
+222 222 197
+189 164 57
+255 90 139
+82 123 139
+65 65 65
+255 255 255
diff --git a/graphics/interface_fr/menu3.pal b/graphics/interface_fr/menu3.pal
new file mode 100755
index 000000000..99b5b3464
--- /dev/null
+++ b/graphics/interface_fr/menu3.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 205 164
+255 255 255
+98 98 98
+213 213 205
+255 255 255
+230 230 230
+197 197 197
+238 238 238
+197 197 197
+148 148 148
+255 0 0
+180 0 0
+255 197 197
+82 82 255
+49 49 180
+197 197 255
diff --git a/graphics/intro/intro1_text.pal b/graphics/intro/intro1_text.pal
new file mode 100755
index 000000000..574921c0d
--- /dev/null
+++ b/graphics/intro/intro1_text.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+24 57 255
+49 74 255
+74 98 255
+98 123 255
+123 139 255
+148 164 255
+172 189 255
+197 205 255
+222 230 255
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+24 57 255
+24 57 230
+32 57 213
+41 65 197
+49 65 172
+49 65 156
+57 74 139
+65 74 115
+74 74 98
+82 82 82
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+24 57 255
+41 65 246
+57 82 238
+74 98 230
+90 106 222
+106 123 213
+123 139 205
+139 148 197
+156 164 189
+180 180 180
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/intro/intro3.pal b/graphics/intro/intro3.pal
new file mode 100755
index 000000000..909fae91d
--- /dev/null
+++ b/graphics/intro/intro3.pal
@@ -0,0 +1,259 @@
+JASC-PAL
+0100
+256
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+139 148 255
+0 0 0
+49 0 0
+238 123 0
+238 131 0
+238 139 0
+238 148 0
+238 156 0
+238 164 0
+238 172 0
+238 180 0
+238 189 0
+238 197 0
+238 213 0
+255 255 255
+0 32 205
+139 148 255
+0 0 0
+0 0 255
+8 16 255
+24 41 255
+41 57 255
+57 82 255
+74 98 255
+90 123 255
+106 148 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+180 0 0
+0 0 0
+65 0 0
+255 255 255
+82 0 0
+32 0 0
+0 0 0
+0 0 0
+0 0 0
+255 123 0
+172 82 57
+164 65 49
+156 57 41
+148 41 32
+139 32 24
+115 0 0
+0 32 205
+0 0 0
+0 41 82
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+139 172 255
+106 148 222
+82 123 189
+49 98 156
+24 74 123
+0 49 98
+180 0 0
+0 0 0
+0 0 0
+0 16 0
+82 115 98
+115 148 131
+131 172 148
+156 180 172
+255 255 197
+255 246 123
+180 164 98
+98 156 57
+123 164 131
+164 57 49
+172 205 246
+255 246 123
+0 0 0
+139 148 255
+0 0 0
+41 74 49
+82 115 98
+115 148 131
+131 172 148
+156 180 172
+172 205 246
+197 230 255
+213 246 255
+238 255 255
+255 197 106
+255 213 131
+255 222 156
+255 246 123
+255 255 197
+0 0 0
+74 82 82
+90 98 106
+106 123 131
+123 139 164
+139 164 189
+156 180 213
+172 205 246
+0 0 0
+0 0 0
+238 255 255
+255 197 106
+255 213 131
+255 222 156
+255 246 123
+255 255 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+74 82 82
+90 74 74
+106 65 65
+123 65 57
+139 57 49
+164 57 49
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+74 82 82
+106 115 90
+139 148 98
+180 180 106
+213 213 115
+255 246 123
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+74 82 82
+106 115 115
+139 148 148
+180 180 180
+213 213 213
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 32 205
+32 24 164
+65 16 123
+106 8 82
+139 0 41
+180 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/intro/intro3_clouds.png b/graphics/intro/intro3_clouds.png
new file mode 100755
index 000000000..aaa77f4a9
--- /dev/null
+++ b/graphics/intro/intro3_clouds.png
Binary files differ
diff --git a/graphics/intro/intro3_clouds1.bin b/graphics/intro/intro3_clouds1.bin
new file mode 100755
index 000000000..c2aa2533f
--- /dev/null
+++ b/graphics/intro/intro3_clouds1.bin
Binary files differ
diff --git a/graphics/intro/intro3_clouds2.bin b/graphics/intro/intro3_clouds2.bin
new file mode 100755
index 000000000..c256567f4
--- /dev/null
+++ b/graphics/intro/intro3_clouds2.bin
Binary files differ
diff --git a/graphics/intro/intro3_clouds2.png b/graphics/intro/intro3_clouds2.png
new file mode 100755
index 000000000..34b523e31
--- /dev/null
+++ b/graphics/intro/intro3_clouds2.png
Binary files differ
diff --git a/graphics/intro/intro3_clouds3.bin b/graphics/intro/intro3_clouds3.bin
new file mode 100755
index 000000000..c47ade01f
--- /dev/null
+++ b/graphics/intro/intro3_clouds3.bin
Binary files differ
diff --git a/graphics/intro/intro3_clouds4.bin b/graphics/intro/intro3_clouds4.bin
new file mode 100755
index 000000000..99bea908c
--- /dev/null
+++ b/graphics/intro/intro3_clouds4.bin
Binary files differ
diff --git a/graphics/intro/intro3_groudon.bin b/graphics/intro/intro3_groudon.bin
new file mode 100755
index 000000000..c0472196f
--- /dev/null
+++ b/graphics/intro/intro3_groudon.bin
Binary files differ
diff --git a/graphics/intro/intro3_groudon.png b/graphics/intro/intro3_groudon.png
new file mode 100755
index 000000000..3e4c6852b
--- /dev/null
+++ b/graphics/intro/intro3_groudon.png
Binary files differ
diff --git a/graphics/intro/intro3_kyogre.bin b/graphics/intro/intro3_kyogre.bin
new file mode 100755
index 000000000..b5bdbb37c
--- /dev/null
+++ b/graphics/intro/intro3_kyogre.bin
Binary files differ
diff --git a/graphics/intro/intro3_kyogre.png b/graphics/intro/intro3_kyogre.png
new file mode 100755
index 000000000..d84aa45a2
--- /dev/null
+++ b/graphics/intro/intro3_kyogre.png
Binary files differ
diff --git a/graphics/intro/intro3_rayquaza.bin b/graphics/intro/intro3_rayquaza.bin
new file mode 100755
index 000000000..be3a9c560
--- /dev/null
+++ b/graphics/intro/intro3_rayquaza.bin
Binary files differ
diff --git a/graphics/intro/intro3_rayquaza.png b/graphics/intro/intro3_rayquaza.png
new file mode 100755
index 000000000..f749ceb50
--- /dev/null
+++ b/graphics/intro/intro3_rayquaza.png
Binary files differ
diff --git a/graphics/intro/legend_bg.png b/graphics/intro/legend_bg.png
new file mode 100755
index 000000000..5baf32aec
--- /dev/null
+++ b/graphics/intro/legend_bg.png
Binary files differ
diff --git a/graphics/intro/legend_bg1.bin b/graphics/intro/legend_bg1.bin
new file mode 100755
index 000000000..e289ca779
--- /dev/null
+++ b/graphics/intro/legend_bg1.bin
Binary files differ
diff --git a/graphics/intro/legend_bg2.bin b/graphics/intro/legend_bg2.bin
new file mode 100755
index 000000000..a151b458e
--- /dev/null
+++ b/graphics/intro/legend_bg2.bin
@@ -0,0 +1 @@
+&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@$@%@&@'@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@4@5@6@7@@@@@ \ No newline at end of file
diff --git a/graphics/link/gba.png b/graphics/link/gba.png
new file mode 100755
index 000000000..1a0909468
--- /dev/null
+++ b/graphics/link/gba.png
Binary files differ
diff --git a/graphics/link/gba_pal2.pal b/graphics/link/gba_pal2.pal
new file mode 100755
index 000000000..e2fb95b4a
--- /dev/null
+++ b/graphics/link/gba_pal2.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+255 57 8
+255 90 8
+255 131 8
+255 172 8
+255 213 8
+255 255 8
+255 255 131
+255 255 255
+255 255 0
+65 0 0
+115 16 0
+172 32 0
+230 57 8
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+222 230 238
+189 205 230
+156 180 222
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+230 230 230
+205 205 205
+180 180 180
+156 156 156
+213 180 106
+205 156 82
+49 255 106
+0 0 0
+255 255 255
+222 230 238
+189 205 230
+156 180 222
+0 16 172
+32 32 106
+16 16 90
+0 0 74
+255 255 189
+230 230 164
+205 205 148
+189 180 115
+139 139 90
+74 74 57
+8 32 32
diff --git a/graphics/link/link1.pal b/graphics/link/link1.pal
new file mode 100755
index 000000000..a86815b0e
--- /dev/null
+++ b/graphics/link/link1.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+0 0 0
+213 205 205
+255 255 255
+255 255 255
+41 41 41
+255 156 82
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/link/link2.pal b/graphics/link/link2.pal
new file mode 100755
index 000000000..a8c95a3c0
--- /dev/null
+++ b/graphics/link/link2.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+156 197 98
+41 131 222
+0 82 172
+197 255 106
+172 230 49
+246 246 213
+255 49 49
+255 148 148
+131 164 213
+238 238 90
+65 65 65
+115 115 115
+172 172 172
+230 230 255
+0 0 0
+255 255 255
diff --git a/graphics/link/link_winedge.bin b/graphics/link/link_winedge.bin
new file mode 100755
index 000000000..f3e264d05
--- /dev/null
+++ b/graphics/link/link_winedge.bin
Binary files differ
diff --git a/graphics/link/link_winedge.png b/graphics/link/link_winedge.png
new file mode 100755
index 000000000..86ddacc03
--- /dev/null
+++ b/graphics/link/link_winedge.png
Binary files differ
diff --git a/graphics/link/misc.bin b/graphics/link/misc.bin
new file mode 100755
index 000000000..e91b50c8d
--- /dev/null
+++ b/graphics/link/misc.bin
Binary files differ
diff --git a/graphics/link/misc.png b/graphics/link/misc.png
new file mode 100755
index 000000000..ae6ba4d02
--- /dev/null
+++ b/graphics/link/misc.png
Binary files differ
diff --git a/graphics/mail/bead/map.bin b/graphics/mail/bead/map.bin
new file mode 100755
index 000000000..6ebb4932c
--- /dev/null
+++ b/graphics/mail/bead/map.bin
Binary files differ
diff --git a/graphics/mail/bead/palette.pal b/graphics/mail/bead/palette.pal
new file mode 100755
index 000000000..e2e6ca291
--- /dev/null
+++ b/graphics/mail/bead/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+65 90 123
+98 123 156
+213 230 238
+238 255 255
+139 189 164
+255 148 131
+213 106 90
+164 156 189
+255 197 82
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/bead/tiles.png b/graphics/mail/bead/tiles.png
new file mode 100755
index 000000000..d006fb987
--- /dev/null
+++ b/graphics/mail/bead/tiles.png
Binary files differ
diff --git a/graphics/mail/dream/map.bin b/graphics/mail/dream/map.bin
new file mode 100755
index 000000000..bc28d8864
--- /dev/null
+++ b/graphics/mail/dream/map.bin
Binary files differ
diff --git a/graphics/mail/dream/palette.pal b/graphics/mail/dream/palette.pal
new file mode 100755
index 000000000..47172825c
--- /dev/null
+++ b/graphics/mail/dream/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+255 189 205
+222 164 197
+197 148 189
+172 131 189
+255 213 230
+0 0 0
+205 255 213
+230 255 230
+0 0 0
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/dream/tiles.png b/graphics/mail/dream/tiles.png
new file mode 100755
index 000000000..cb4411757
--- /dev/null
+++ b/graphics/mail/dream/tiles.png
Binary files differ
diff --git a/graphics/mail/fab/map.bin b/graphics/mail/fab/map.bin
new file mode 100755
index 000000000..b11121bdf
--- /dev/null
+++ b/graphics/mail/fab/map.bin
Binary files differ
diff --git a/graphics/mail/fab/palette.pal b/graphics/mail/fab/palette.pal
new file mode 100755
index 000000000..17e1afcc3
--- /dev/null
+++ b/graphics/mail/fab/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+238 205 222
+255 230 238
+213 230 238
+238 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/fab/tiles.png b/graphics/mail/fab/tiles.png
new file mode 100755
index 000000000..99e9cac71
--- /dev/null
+++ b/graphics/mail/fab/tiles.png
Binary files differ
diff --git a/graphics/mail/glitter/map.bin b/graphics/mail/glitter/map.bin
new file mode 100755
index 000000000..fad949aa9
--- /dev/null
+++ b/graphics/mail/glitter/map.bin
Binary files differ
diff --git a/graphics/mail/glitter/palette.pal b/graphics/mail/glitter/palette.pal
new file mode 100755
index 000000000..544a0a11b
--- /dev/null
+++ b/graphics/mail/glitter/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+255 255 172
+255 238 123
+255 238 0
+255 41 41
+255 238 230
+255 189 41
+238 180 0
+0 0 0
+0 0 0
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/glitter/tiles.png b/graphics/mail/glitter/tiles.png
new file mode 100755
index 000000000..12bd11801
--- /dev/null
+++ b/graphics/mail/glitter/tiles.png
Binary files differ
diff --git a/graphics/mail/harbor/map.bin b/graphics/mail/harbor/map.bin
new file mode 100755
index 000000000..ce07a7539
--- /dev/null
+++ b/graphics/mail/harbor/map.bin
Binary files differ
diff --git a/graphics/mail/harbor/palette.pal b/graphics/mail/harbor/palette.pal
new file mode 100755
index 000000000..1a8795c33
--- /dev/null
+++ b/graphics/mail/harbor/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+24 172 255
+255 255 148
+115 205 255
+74 172 255
+16 57 230
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/harbor/tiles.png b/graphics/mail/harbor/tiles.png
new file mode 100755
index 000000000..b0a09ef69
--- /dev/null
+++ b/graphics/mail/harbor/tiles.png
Binary files differ
diff --git a/graphics/mail/mech/map.bin b/graphics/mail/mech/map.bin
new file mode 100755
index 000000000..d74974008
--- /dev/null
+++ b/graphics/mail/mech/map.bin
Binary files differ
diff --git a/graphics/mail/mech/palette.pal b/graphics/mail/mech/palette.pal
new file mode 100755
index 000000000..bb55d7c04
--- /dev/null
+++ b/graphics/mail/mech/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+230 230 230
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+230 230 189
+197 189 139
+172 164 115
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/mech/tiles.png b/graphics/mail/mech/tiles.png
new file mode 100755
index 000000000..4d47dd73b
--- /dev/null
+++ b/graphics/mail/mech/tiles.png
Binary files differ
diff --git a/graphics/mail/orange/map.bin b/graphics/mail/orange/map.bin
new file mode 100755
index 000000000..be4dbf9c5
--- /dev/null
+++ b/graphics/mail/orange/map.bin
Binary files differ
diff --git a/graphics/mail/orange/palette.pal b/graphics/mail/orange/palette.pal
new file mode 100755
index 000000000..20efef172
--- /dev/null
+++ b/graphics/mail/orange/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+246 213 148
+238 180 74
+205 139 65
+189 246 222
+148 222 197
+131 189 164
+255 255 148
+189 180 123
+139 123 65
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/orange/tiles.png b/graphics/mail/orange/tiles.png
new file mode 100755
index 000000000..1676bd258
--- /dev/null
+++ b/graphics/mail/orange/tiles.png
Binary files differ
diff --git a/graphics/mail/retro/map.bin b/graphics/mail/retro/map.bin
new file mode 100755
index 000000000..30ee05ba2
--- /dev/null
+++ b/graphics/mail/retro/map.bin
Binary files differ
diff --git a/graphics/mail/retro/palette.pal b/graphics/mail/retro/palette.pal
new file mode 100755
index 000000000..707bdff93
--- /dev/null
+++ b/graphics/mail/retro/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+246 106 41
+255 246 156
+255 205 65
+148 238 82
+172 106 49
+189 164 57
+123 213 246
+0 0 0
+255 230 90
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/retro/tiles.png b/graphics/mail/retro/tiles.png
new file mode 100755
index 000000000..da96ad486
--- /dev/null
+++ b/graphics/mail/retro/tiles.png
Binary files differ
diff --git a/graphics/mail/shadow/map.bin b/graphics/mail/shadow/map.bin
new file mode 100755
index 000000000..01fcfe4ce
--- /dev/null
+++ b/graphics/mail/shadow/map.bin
Binary files differ
diff --git a/graphics/mail/shadow/palette.pal b/graphics/mail/shadow/palette.pal
new file mode 100755
index 000000000..f08b838c5
--- /dev/null
+++ b/graphics/mail/shadow/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+139 139 164
+123 123 139
+106 106 123
+90 90 98
+0 0 0
+0 0 0
+0 0 0
+213 65 16
+148 49 0
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/shadow/tiles.png b/graphics/mail/shadow/tiles.png
new file mode 100755
index 000000000..cdc63cde1
--- /dev/null
+++ b/graphics/mail/shadow/tiles.png
Binary files differ
diff --git a/graphics/mail/tropic/map.bin b/graphics/mail/tropic/map.bin
new file mode 100755
index 000000000..8ef408f37
--- /dev/null
+++ b/graphics/mail/tropic/map.bin
Binary files differ
diff --git a/graphics/mail/tropic/palette.pal b/graphics/mail/tropic/palette.pal
new file mode 100755
index 000000000..99b2bb636
--- /dev/null
+++ b/graphics/mail/tropic/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+230 255 98
+197 246 131
+189 246 65
+123 213 41
+255 180 98
+255 255 148
+123 180 24
+197 238 65
+205 156 90
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/tropic/tiles.png b/graphics/mail/tropic/tiles.png
new file mode 100755
index 000000000..6cee88775
--- /dev/null
+++ b/graphics/mail/tropic/tiles.png
Binary files differ
diff --git a/graphics/mail/wave/map.bin b/graphics/mail/wave/map.bin
new file mode 100755
index 000000000..0af44f798
--- /dev/null
+++ b/graphics/mail/wave/map.bin
Binary files differ
diff --git a/graphics/mail/wave/palette.pal b/graphics/mail/wave/palette.pal
new file mode 100755
index 000000000..dd9bbfae4
--- /dev/null
+++ b/graphics/mail/wave/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+0 172 246
+65 90 156
+106 131 197
+197 222 255
+82 156 197
+230 246 255
+0 0 0
+0 0 0
+0 0 0
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/wave/tiles.png b/graphics/mail/wave/tiles.png
new file mode 100755
index 000000000..6b5af8a01
--- /dev/null
+++ b/graphics/mail/wave/tiles.png
Binary files differ
diff --git a/graphics/mail/wood/map.bin b/graphics/mail/wood/map.bin
new file mode 100755
index 000000000..4338a31c8
--- /dev/null
+++ b/graphics/mail/wood/map.bin
Binary files differ
diff --git a/graphics/mail/wood/palette.pal b/graphics/mail/wood/palette.pal
new file mode 100755
index 000000000..9ed936918
--- /dev/null
+++ b/graphics/mail/wood/palette.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+139 164 189
+139 131 74
+164 180 82
+189 180 106
+222 205 106
+180 156 65
+246 213 156
+189 164 90
+222 164 123
+255 205 180
+98 197 197
+57 148 148
+82 82 82
+139 139 139
+205 205 205
+255 255 255
diff --git a/graphics/mail/wood/tiles.png b/graphics/mail/wood/tiles.png
new file mode 100755
index 000000000..a55029fac
--- /dev/null
+++ b/graphics/mail/wood/tiles.png
Binary files differ
diff --git a/graphics/misc/bag.pal b/graphics/misc/bag.pal
new file mode 100755
index 000000000..3c7c2370a
--- /dev/null
+++ b/graphics/misc/bag.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 197 164
+115 255 139
+98 222 123
+82 197 106
+74 164 90
+57 139 74
+49 106 57
+32 82 41
+24 49 24
+8 24 8
+156 255 131
+213 213 222
+189 189 197
+98 98 115
+255 255 255
+0 0 0
diff --git a/graphics/misc/bag_female.png b/graphics/misc/bag_female.png
new file mode 100755
index 000000000..65446e269
--- /dev/null
+++ b/graphics/misc/bag_female.png
Binary files differ
diff --git a/graphics/misc/bag_male.png b/graphics/misc/bag_male.png
new file mode 100755
index 000000000..a12c66f39
--- /dev/null
+++ b/graphics/misc/bag_male.png
Binary files differ
diff --git a/graphics/misc/confetti.png b/graphics/misc/confetti.png
new file mode 100755
index 000000000..ef8b921d8
--- /dev/null
+++ b/graphics/misc/confetti.png
Binary files differ
diff --git a/graphics/naming_screen/cursor.png b/graphics/naming_screen/cursor.png
new file mode 100755
index 000000000..3d92ef6f4
--- /dev/null
+++ b/graphics/naming_screen/cursor.png
Binary files differ
diff --git a/graphics/naming_screen/keyboard_button.png b/graphics/naming_screen/keyboard_button.png
new file mode 100755
index 000000000..e5a004894
--- /dev/null
+++ b/graphics/naming_screen/keyboard_button.png
Binary files differ
diff --git a/graphics/naming_screen/menu.pal b/graphics/naming_screen/menu.pal
new file mode 100755
index 000000000..0da3b93f2
--- /dev/null
+++ b/graphics/naming_screen/menu.pal
@@ -0,0 +1,99 @@
+JASC-PAL
+0100
+96
+106 156 213
+255 255 255
+115 115 115
+139 139 131
+172 172 164
+197 189 180
+230 222 213
+197 230 156
+213 238 189
+230 246 222
+0 0 0
+0 0 0
+213 205 82
+230 222 90
+238 230 139
+246 238 197
+106 156 213
+255 255 255
+57 57 57
+115 115 115
+0 0 0
+0 0 0
+0 0 0
+0 0 255
+0 0 255
+0 0 255
+0 0 255
+74 115 139
+98 139 164
+123 172 197
+156 205 230
+180 222 246
+106 156 213
+255 255 255
+57 57 57
+115 115 115
+0 0 0
+0 0 0
+0 0 0
+0 0 255
+0 0 255
+0 0 255
+0 0 255
+172 115 74
+189 131 90
+213 156 115
+246 205 164
+255 230 197
+106 156 213
+255 255 255
+57 57 57
+115 115 115
+0 0 0
+0 0 0
+0 0 0
+0 0 255
+0 0 255
+0 0 255
+0 0 255
+98 156 57
+123 172 82
+148 189 106
+197 230 156
+213 238 189
+106 156 213
+255 255 255
+57 57 57
+139 139 131
+197 189 180
+230 222 213
+74 115 139
+123 172 197
+172 115 74
+213 156 115
+98 156 57
+148 189 106
+189 164 32
+230 222 90
+57 57 57
+57 57 57
+106 156 213
+255 8 8
+222 57 74
+180 65 82
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+230 222 213
+0 0 0
+230 222 213
+0 0 0
diff --git a/graphics/naming_screen/menu.png b/graphics/naming_screen/menu.png
new file mode 100755
index 000000000..ff8348514
--- /dev/null
+++ b/graphics/naming_screen/menu.png
Binary files differ
diff --git a/graphics/naming_screen/right_pointing_triangle.png b/graphics/naming_screen/right_pointing_triangle.png
new file mode 100755
index 000000000..e07b9e5a8
--- /dev/null
+++ b/graphics/naming_screen/right_pointing_triangle.png
Binary files differ
diff --git a/graphics/naming_screen/roptions.png b/graphics/naming_screen/roptions.png
new file mode 100755
index 000000000..dfb7e0105
--- /dev/null
+++ b/graphics/naming_screen/roptions.png
Binary files differ
diff --git a/graphics/naming_screen/rwindow.png b/graphics/naming_screen/rwindow.png
new file mode 100755
index 000000000..9571abb80
--- /dev/null
+++ b/graphics/naming_screen/rwindow.png
Binary files differ
diff --git a/graphics/naming_screen/underscore.png b/graphics/naming_screen/underscore.png
new file mode 100755
index 000000000..409ca82ed
--- /dev/null
+++ b/graphics/naming_screen/underscore.png
Binary files differ
diff --git a/graphics/pokeblock/use_screen/condition.png b/graphics/pokeblock/use_screen/condition.png
new file mode 100755
index 000000000..aaece5a38
--- /dev/null
+++ b/graphics/pokeblock/use_screen/condition.png
Binary files differ
diff --git a/graphics/pokeblock/use_screen/graph.bin b/graphics/pokeblock/use_screen/graph.bin
new file mode 100755
index 000000000..063c034b4
--- /dev/null
+++ b/graphics/pokeblock/use_screen/graph.bin
Binary files differ
diff --git a/graphics/pokeblock/use_screen/graph.png b/graphics/pokeblock/use_screen/graph.png
new file mode 100755
index 000000000..3b4b64473
--- /dev/null
+++ b/graphics/pokeblock/use_screen/graph.png
Binary files differ
diff --git a/graphics/pokeblock/use_screen/nature.pal b/graphics/pokeblock/use_screen/nature.pal
new file mode 100755
index 000000000..e0ce98921
--- /dev/null
+++ b/graphics/pokeblock/use_screen/nature.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+8 213 65
+8 213 65
+8 213 65
+8 213 65
+8 213 65
+8 213 65
+8 213 65
+8 213 65
+8 213 65
+8 213 65
+8 213 74
+0 213 74
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+32 213 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+131 180 65
+32 213 65
+24 213 65
+24 213 65
+24 213 65
+24 213 65
+24 213 65
+24 213 65
+24 213 65
+24 213 74
+24 213 65
+24 213 65
+24 213 65
+16 213 74
diff --git a/graphics/pokeblock/use_screen/updown.png b/graphics/pokeblock/use_screen/updown.png
new file mode 100755
index 000000000..7d4049d86
--- /dev/null
+++ b/graphics/pokeblock/use_screen/updown.png
Binary files differ
diff --git a/graphics/pokedex/area_unknown.png b/graphics/pokedex/area_unknown.png
new file mode 100755
index 000000000..ebde8d6fc
--- /dev/null
+++ b/graphics/pokedex/area_unknown.png
Binary files differ
diff --git a/graphics/pokedex/fade.pal b/graphics/pokedex/fade.pal
new file mode 100755
index 000000000..26da98a84
--- /dev/null
+++ b/graphics/pokedex/fade.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+123 131 0
+255 255 255
+255 238 0
+255 189 0
+255 115 0
+98 98 115
+41 57 65
+41 57 106
+0 0 41
+255 255 255
+238 246 57
+255 0 189
+49 213 74
+24 131 32
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+41 57 106
+0 0 41
+255 255 255
+238 246 57
+189 0 0
+74 148 180
+8 90 131
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+41 57 106
+0 0 41
+255 255 255
+238 246 57
+255 0 189
+180 205 246
+49 139 255
+189 156 90
+0 0 0
diff --git a/graphics/pokedex/hoenn_bg.pal b/graphics/pokedex/hoenn_bg.pal
new file mode 100755
index 000000000..41196a269
--- /dev/null
+++ b/graphics/pokedex/hoenn_bg.pal
@@ -0,0 +1,99 @@
+JASC-PAL
+0100
+96
+123 131 0
+255 255 255
+222 222 222
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+98 98 115
+49 49 65
+255 255 255
+238 246 57
+255 0 189
+123 148 32
+41 82 0
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+98 98 115
+49 49 65
+255 255 255
+238 246 57
+255 0 189
+123 148 32
+41 82 0
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+98 98 115
+49 49 65
+255 255 255
+238 246 57
+255 0 189
+180 205 246
+49 139 255
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+255 238 0
+255 189 0
+255 115 0
+98 98 115
+41 57 65
+98 98 115
+49 49 65
+255 255 255
+238 246 57
+255 0 189
+123 148 32
+41 82 0
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+98 98 115
+49 49 65
+255 255 255
+238 246 57
+180 0 0
+74 148 180
+8 90 131
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+98 98 115
+49 49 65
+255 255 255
+238 246 57
+180 0 0
+180 205 246
+49 139 255
+189 156 90
+0 0 0
diff --git a/graphics/pokedex/menu.png b/graphics/pokedex/menu.png
new file mode 100755
index 000000000..fea195312
--- /dev/null
+++ b/graphics/pokedex/menu.png
Binary files differ
diff --git a/graphics/pokedex/menu2.png b/graphics/pokedex/menu2.png
new file mode 100755
index 000000000..529914813
--- /dev/null
+++ b/graphics/pokedex/menu2.png
Binary files differ
diff --git a/graphics/pokedex/national_bg.pal b/graphics/pokedex/national_bg.pal
new file mode 100755
index 000000000..ea8f2bc64
--- /dev/null
+++ b/graphics/pokedex/national_bg.pal
@@ -0,0 +1,99 @@
+JASC-PAL
+0100
+96
+123 131 0
+255 255 255
+222 222 222
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+164 164 164
+41 57 65
+255 255 255
+238 246 57
+255 0 189
+123 164 115
+74 115 65
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+164 164 164
+41 57 65
+255 255 255
+238 246 57
+255 0 189
+123 164 115
+74 115 65
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+164 164 164
+41 57 65
+255 255 255
+238 246 57
+255 0 189
+180 205 246
+49 139 255
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+255 238 0
+255 189 0
+255 115 0
+98 98 115
+41 57 65
+164 164 164
+41 57 65
+255 255 255
+238 246 57
+255 0 189
+123 164 115
+74 115 65
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+164 164 164
+41 57 65
+255 255 255
+238 246 57
+189 0 0
+74 148 180
+8 90 131
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+164 164 164
+41 57 65
+255 255 255
+238 246 57
+255 0 189
+180 205 246
+49 139 255
+189 156 90
+0 0 0
diff --git a/graphics/pokedex/noball_unused.png b/graphics/pokedex/noball_unused.png
new file mode 100755
index 000000000..59979aed4
--- /dev/null
+++ b/graphics/pokedex/noball_unused.png
Binary files differ
diff --git a/graphics/pokedex/search1.bin b/graphics/pokedex/search1.bin
new file mode 100755
index 000000000..83bf29bec
--- /dev/null
+++ b/graphics/pokedex/search1.bin
Binary files differ
diff --git a/graphics/pokedex/search2.bin b/graphics/pokedex/search2.bin
new file mode 100755
index 000000000..838007715
--- /dev/null
+++ b/graphics/pokedex/search2.bin
Binary files differ
diff --git a/graphics/pokedex/search_menu.pal b/graphics/pokedex/search_menu.pal
new file mode 100755
index 000000000..b6142eb3f
--- /dev/null
+++ b/graphics/pokedex/search_menu.pal
@@ -0,0 +1,67 @@
+JASC-PAL
+0100
+64
+123 131 0
+0 0 0
+172 172 172
+255 255 255
+255 255 255
+98 98 115
+57 57 57
+123 115 74
+156 230 0
+57 115 0
+255 172 0
+131 32 32
+82 189 90
+24 131 32
+255 32 32
+0 0 0
+123 131 0
+0 0 0
+172 172 172
+255 255 255
+255 255 255
+98 98 115
+57 57 57
+123 115 74
+41 115 0
+32 49 32
+180 106 0
+16 0 0
+82 189 90
+24 131 32
+0 0 0
+0 0 0
+123 131 0
+0 0 0
+172 172 172
+172 172 172
+172 172 172
+98 98 115
+57 57 57
+123 115 74
+32 49 32
+32 32 32
+74 32 32
+32 32 32
+82 189 90
+24 131 32
+255 32 32
+0 0 0
+123 131 0
+0 0 0
+172 172 172
+172 172 172
+172 172 172
+98 98 115
+57 57 57
+123 115 74
+32 49 32
+32 32 32
+74 32 32
+32 32 32
+82 189 90
+24 131 32
+0 0 0
+0 0 0
diff --git a/graphics/pokedex/search_menu.png b/graphics/pokedex/search_menu.png
new file mode 100755
index 000000000..755c2d35d
--- /dev/null
+++ b/graphics/pokedex/search_menu.png
Binary files differ
diff --git a/graphics/pokedex/text.pal b/graphics/pokedex/text.pal
new file mode 100755
index 000000000..569c7821a
--- /dev/null
+++ b/graphics/pokedex/text.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+123 131 0
+255 255 255
+222 222 222
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+41 57 106
+0 0 41
+255 255 255
+238 246 57
+255 0 189
+49 213 74
+24 131 32
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+41 57 106
+0 0 41
+255 255 255
+238 246 57
+255 0 189
+49 213 74
+24 131 32
+189 156 90
+0 0 0
+123 131 0
+255 255 255
+197 32 32
+189 189 189
+164 164 164
+98 98 115
+41 57 65
+41 57 106
+0 0 41
+255 255 255
+238 246 57
+255 0 189
+180 205 246
+49 139 255
+189 156 90
+0 0 0
diff --git a/graphics/pokedex/tilemap1.bin b/graphics/pokedex/tilemap1.bin
new file mode 100755
index 000000000..585524bab
--- /dev/null
+++ b/graphics/pokedex/tilemap1.bin
Binary files differ
diff --git a/graphics/pokedex/tilemap2.bin b/graphics/pokedex/tilemap2.bin
new file mode 100755
index 000000000..ac2e068f2
--- /dev/null
+++ b/graphics/pokedex/tilemap2.bin
Binary files differ
diff --git a/graphics/pokedex/tilemap3.bin b/graphics/pokedex/tilemap3.bin
new file mode 100755
index 000000000..cd6a67be4
--- /dev/null
+++ b/graphics/pokedex/tilemap3.bin
Binary files differ
diff --git a/graphics/pokedex/tilemap4.bin b/graphics/pokedex/tilemap4.bin
new file mode 100755
index 000000000..300fa8ff4
--- /dev/null
+++ b/graphics/pokedex/tilemap4.bin
Binary files differ
diff --git a/graphics/pokedex/tilemap5.bin b/graphics/pokedex/tilemap5.bin
new file mode 100755
index 000000000..283aa518c
--- /dev/null
+++ b/graphics/pokedex/tilemap5.bin
Binary files differ
diff --git a/graphics/pokedex/tilemap6.bin b/graphics/pokedex/tilemap6.bin
new file mode 100755
index 000000000..154ed7196
--- /dev/null
+++ b/graphics/pokedex/tilemap6.bin
Binary files differ
diff --git a/graphics/pokedex/tilemap7.bin b/graphics/pokedex/tilemap7.bin
new file mode 100755
index 000000000..7183514e6
--- /dev/null
+++ b/graphics/pokedex/tilemap7.bin
Binary files differ
diff --git a/graphics/pokedex/tilemap8.bin b/graphics/pokedex/tilemap8.bin
new file mode 100755
index 000000000..dbfea3ba5
--- /dev/null
+++ b/graphics/pokedex/tilemap8.bin
Binary files differ
diff --git a/graphics/pokedex/tilemap9.bin b/graphics/pokedex/tilemap9.bin
new file mode 100755
index 000000000..6a72a88bc
--- /dev/null
+++ b/graphics/pokedex/tilemap9.bin
Binary files differ
diff --git a/graphics/pokemon_storage/menu.png b/graphics/pokemon_storage/menu.png
new file mode 100755
index 000000000..204c07504
--- /dev/null
+++ b/graphics/pokemon_storage/menu.png
Binary files differ
diff --git a/graphics/pokemon_storage/pss_window.pal b/graphics/pokemon_storage/pss_window.pal
new file mode 100755
index 000000000..bfd913069
--- /dev/null
+++ b/graphics/pokemon_storage/pss_window.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+255 255 255
+74 205 139
+172 106 148
+49 0 148
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+213 213 213
+156 156 156
+255 255 255
+164 164 164
+82 82 82
+255 255 255
+57 164 148
+230 180 148
+49 0 148
+0 0 0
+255 148 148
+255 230 131
+255 189 115
+0 0 0
+0 0 0
+0 0 0
+213 213 213
+156 156 156
+255 255 255
+164 164 164
+82 82 82
diff --git a/graphics/pokemon_storage/pss_window.png b/graphics/pokemon_storage/pss_window.png
new file mode 100755
index 000000000..59cc0b5d2
--- /dev/null
+++ b/graphics/pokemon_storage/pss_window.png
Binary files differ
diff --git a/graphics/pokemon_storage/pss_window2.bin b/graphics/pokemon_storage/pss_window2.bin
new file mode 100755
index 000000000..f348e6e1e
--- /dev/null
+++ b/graphics/pokemon_storage/pss_window2.bin
Binary files differ
diff --git a/graphics/pokemon_storage/pss_window2.pal b/graphics/pokemon_storage/pss_window2.pal
new file mode 100755
index 000000000..9696184a2
--- /dev/null
+++ b/graphics/pokemon_storage/pss_window2.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+255 255 255
+139 180 255
+222 238 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+213 213 213
+156 156 156
+255 255 255
+164 164 164
+82 82 82
+255 255 255
+197 222 255
+90 164 238
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+213 213 213
+156 156 156
+255 255 255
+164 164 164
+82 82 82
diff --git a/graphics/pokemon_storage/pss_window2.png b/graphics/pokemon_storage/pss_window2.png
new file mode 100755
index 000000000..ae2d3b969
--- /dev/null
+++ b/graphics/pokemon_storage/pss_window2.png
Binary files differ
diff --git a/graphics/pokenav/cancel.pal b/graphics/pokenav/cancel.pal
new file mode 100755
index 000000000..f32b77d07
--- /dev/null
+++ b/graphics/pokenav/cancel.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+255 255 139
+0 0 0
+255 180 8
+106 106 123
+0 0 8
+246 115 82
+255 123 90
+156 172 164
+246 189 131
+255 197 139
+222 246 230
+230 255 222
+238 246 246
+255 255 255
+0 98 98
+0 0 0
+255 255 139
+123 123 156
+246 255 255
+106 106 123
+0 0 8
+246 115 82
+255 123 90
+156 172 164
+246 189 131
+255 197 139
+222 246 230
+230 255 222
+238 246 246
+255 255 255
+0 98 98
+0 0 0
diff --git a/graphics/pokenav/cancel.png b/graphics/pokenav/cancel.png
new file mode 100755
index 000000000..1d57a4488
--- /dev/null
+++ b/graphics/pokenav/cancel.png
Binary files differ
diff --git a/graphics/pokenav/condition.bin b/graphics/pokenav/condition.bin
new file mode 100755
index 000000000..4c04c5f0d
--- /dev/null
+++ b/graphics/pokenav/condition.bin
Binary files differ
diff --git a/graphics/pokenav/condition.png b/graphics/pokenav/condition.png
new file mode 100755
index 000000000..eadd2c0aa
--- /dev/null
+++ b/graphics/pokenav/condition.png
Binary files differ
diff --git a/graphics/pokenav/header.bin b/graphics/pokenav/header.bin
new file mode 100755
index 000000000..f405a6dfc
--- /dev/null
+++ b/graphics/pokenav/header.bin
Binary files differ
diff --git a/graphics/pokenav/header.png b/graphics/pokenav/header.png
new file mode 100755
index 000000000..7fe891e22
--- /dev/null
+++ b/graphics/pokenav/header.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/beauty.png b/graphics/pokenav/left_headers/beauty.png
new file mode 100755
index 000000000..a9a85ce0c
--- /dev/null
+++ b/graphics/pokenav/left_headers/beauty.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/condition.png b/graphics/pokenav/left_headers/condition.png
new file mode 100755
index 000000000..aaece5a38
--- /dev/null
+++ b/graphics/pokenav/left_headers/condition.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/cool.png b/graphics/pokenav/left_headers/cool.png
new file mode 100755
index 000000000..4dd069495
--- /dev/null
+++ b/graphics/pokenav/left_headers/cool.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/cute.png b/graphics/pokenav/left_headers/cute.png
new file mode 100755
index 000000000..6da0f4973
--- /dev/null
+++ b/graphics/pokenav/left_headers/cute.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/hoenn_map.png b/graphics/pokenav/left_headers/hoenn_map.png
new file mode 100755
index 000000000..7ee6c8e99
--- /dev/null
+++ b/graphics/pokenav/left_headers/hoenn_map.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/main_menu.png b/graphics/pokenav/left_headers/main_menu.png
new file mode 100755
index 000000000..713de58b3
--- /dev/null
+++ b/graphics/pokenav/left_headers/main_menu.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/match_call.png b/graphics/pokenav/left_headers/match_call.png
new file mode 100755
index 000000000..5de8e41ab
--- /dev/null
+++ b/graphics/pokenav/left_headers/match_call.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/palette.pal b/graphics/pokenav/left_headers/palette.pal
new file mode 100755
index 000000000..eb13b1a87
--- /dev/null
+++ b/graphics/pokenav/left_headers/palette.pal
@@ -0,0 +1,83 @@
+JASC-PAL
+0100
+80
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+32 197 106
+148 255 98
+74 139 57
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+106 82 222
+197 180 255
+82 65 164
+98 197 246
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+246 106 106
+255 172 164
+205 74 65
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+180 172 123
+222 213 164
+131 123 74
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+255 65 32
+255 148 90
+180 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/pokenav/left_headers/party.png b/graphics/pokenav/left_headers/party.png
new file mode 100755
index 000000000..39e0461b1
--- /dev/null
+++ b/graphics/pokenav/left_headers/party.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/ribbons.png b/graphics/pokenav/left_headers/ribbons.png
new file mode 100755
index 000000000..ed4f94b93
--- /dev/null
+++ b/graphics/pokenav/left_headers/ribbons.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/search.png b/graphics/pokenav/left_headers/search.png
new file mode 100755
index 000000000..7e01e7779
--- /dev/null
+++ b/graphics/pokenav/left_headers/search.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/smart.png b/graphics/pokenav/left_headers/smart.png
new file mode 100755
index 000000000..e959df2b8
--- /dev/null
+++ b/graphics/pokenav/left_headers/smart.png
Binary files differ
diff --git a/graphics/pokenav/left_headers/tough.png b/graphics/pokenav/left_headers/tough.png
new file mode 100755
index 000000000..fbb471572
--- /dev/null
+++ b/graphics/pokenav/left_headers/tough.png
Binary files differ
diff --git a/graphics/pokenav/marker.png b/graphics/pokenav/marker.png
new file mode 100755
index 000000000..818446557
--- /dev/null
+++ b/graphics/pokenav/marker.png
Binary files differ
diff --git a/graphics/pokenav/message.bin b/graphics/pokenav/message.bin
new file mode 100755
index 000000000..5f9930568
--- /dev/null
+++ b/graphics/pokenav/message.bin
Binary files differ
diff --git a/graphics/pokenav/message.png b/graphics/pokenav/message.png
new file mode 100755
index 000000000..7df840d3a
--- /dev/null
+++ b/graphics/pokenav/message.png
Binary files differ
diff --git a/graphics/pokenav/options/beauty.png b/graphics/pokenav/options/beauty.png
new file mode 100755
index 000000000..194cc0c53
--- /dev/null
+++ b/graphics/pokenav/options/beauty.png
Binary files differ
diff --git a/graphics/pokenav/options/cancel.png b/graphics/pokenav/options/cancel.png
new file mode 100755
index 000000000..4093674a4
--- /dev/null
+++ b/graphics/pokenav/options/cancel.png
Binary files differ
diff --git a/graphics/pokenav/options/condition.png b/graphics/pokenav/options/condition.png
new file mode 100755
index 000000000..8820babbd
--- /dev/null
+++ b/graphics/pokenav/options/condition.png
Binary files differ
diff --git a/graphics/pokenav/options/cool.png b/graphics/pokenav/options/cool.png
new file mode 100755
index 000000000..e87a10810
--- /dev/null
+++ b/graphics/pokenav/options/cool.png
Binary files differ
diff --git a/graphics/pokenav/options/cute.png b/graphics/pokenav/options/cute.png
new file mode 100755
index 000000000..9aad1e961
--- /dev/null
+++ b/graphics/pokenav/options/cute.png
Binary files differ
diff --git a/graphics/pokenav/options/hoenn_map.png b/graphics/pokenav/options/hoenn_map.png
new file mode 100755
index 000000000..00e9724dc
--- /dev/null
+++ b/graphics/pokenav/options/hoenn_map.png
Binary files differ
diff --git a/graphics/pokenav/options/match_call.png b/graphics/pokenav/options/match_call.png
new file mode 100755
index 000000000..6c7effc9b
--- /dev/null
+++ b/graphics/pokenav/options/match_call.png
Binary files differ
diff --git a/graphics/pokenav/options/options.bin b/graphics/pokenav/options/options.bin
new file mode 100755
index 000000000..b7928d640
--- /dev/null
+++ b/graphics/pokenav/options/options.bin
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/graphics/pokenav/options/options.pal b/graphics/pokenav/options/options.pal
new file mode 100755
index 000000000..eb13b1a87
--- /dev/null
+++ b/graphics/pokenav/options/options.pal
@@ -0,0 +1,83 @@
+JASC-PAL
+0100
+80
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+32 197 106
+148 255 98
+74 139 57
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+106 82 222
+197 180 255
+82 65 164
+98 197 246
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+246 106 106
+255 172 164
+205 74 65
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+180 172 123
+222 213 164
+131 123 74
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+0 0 0
+255 255 255
+82 82 74
+172 172 172
+246 197 49
+255 238 98
+230 148 0
+0 0 0
+255 65 32
+255 148 90
+180 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/pokenav/options/party.png b/graphics/pokenav/options/party.png
new file mode 100755
index 000000000..67a1f231f
--- /dev/null
+++ b/graphics/pokenav/options/party.png
Binary files differ
diff --git a/graphics/pokenav/options/ribbons.png b/graphics/pokenav/options/ribbons.png
new file mode 100755
index 000000000..6b7daaa6a
--- /dev/null
+++ b/graphics/pokenav/options/ribbons.png
Binary files differ
diff --git a/graphics/pokenav/options/search.png b/graphics/pokenav/options/search.png
new file mode 100755
index 000000000..946d0cac7
--- /dev/null
+++ b/graphics/pokenav/options/search.png
Binary files differ
diff --git a/graphics/pokenav/options/smart.png b/graphics/pokenav/options/smart.png
new file mode 100755
index 000000000..b0665aadb
--- /dev/null
+++ b/graphics/pokenav/options/smart.png
Binary files differ
diff --git a/graphics/pokenav/options/switch_off.png b/graphics/pokenav/options/switch_off.png
new file mode 100755
index 000000000..01b539383
--- /dev/null
+++ b/graphics/pokenav/options/switch_off.png
Binary files differ
diff --git a/graphics/pokenav/options/tough.png b/graphics/pokenav/options/tough.png
new file mode 100755
index 000000000..bea12edbe
--- /dev/null
+++ b/graphics/pokenav/options/tough.png
Binary files differ
diff --git a/graphics/pokenav/ribbons.bin b/graphics/pokenav/ribbons.bin
new file mode 100755
index 000000000..ce0b74f60
--- /dev/null
+++ b/graphics/pokenav/ribbons.bin
Binary files differ
diff --git a/graphics/pokenav/ribbons.png b/graphics/pokenav/ribbons.png
new file mode 100755
index 000000000..a87bc7356
--- /dev/null
+++ b/graphics/pokenav/ribbons.png
Binary files differ
diff --git a/graphics/pokenav/zoom.png b/graphics/pokenav/zoom.png
new file mode 100755
index 000000000..4e2b41be6
--- /dev/null
+++ b/graphics/pokenav/zoom.png
Binary files differ
diff --git a/graphics/rayquaza_scene/chase.pal b/graphics/rayquaza_scene/chase.pal
new file mode 100755
index 000000000..960724b94
--- /dev/null
+++ b/graphics/rayquaza_scene/chase.pal
@@ -0,0 +1,67 @@
+JASC-PAL
+0100
+64
+156 156 255
+57 82 57
+65 131 65
+74 148 123
+90 189 139
+148 222 180
+98 90 106
+172 41 57
+230 74 49
+246 98 98
+197 148 98
+222 213 238
+255 255 255
+222 205 0
+255 238 0
+24 24 24
+156 156 255
+0 106 222
+57 148 230
+123 180 238
+189 222 246
+230 255 255
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 131 148
+255 255 246
+16 98 222
+115 255 230
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 131 148
+255 255 246
+255 205 0
+255 255 148
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/rayquaza_scene/chase_bg.bin b/graphics/rayquaza_scene/chase_bg.bin
new file mode 100755
index 000000000..c2daff206
--- /dev/null
+++ b/graphics/rayquaza_scene/chase_bg.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/chase_bg.png b/graphics/rayquaza_scene/chase_bg.png
new file mode 100755
index 000000000..896c0b046
--- /dev/null
+++ b/graphics/rayquaza_scene/chase_bg.png
Binary files differ
diff --git a/graphics/rayquaza_scene/chase_streaks.bin b/graphics/rayquaza_scene/chase_streaks.bin
new file mode 100755
index 000000000..cabc53fec
--- /dev/null
+++ b/graphics/rayquaza_scene/chase_streaks.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/chase_streaks.png b/graphics/rayquaza_scene/chase_streaks.png
new file mode 100755
index 000000000..a7e216259
--- /dev/null
+++ b/graphics/rayquaza_scene/chase_streaks.png
Binary files differ
diff --git a/graphics/rayquaza_scene/clouds.pal b/graphics/rayquaza_scene/clouds.pal
new file mode 100755
index 000000000..4b1a354ce
--- /dev/null
+++ b/graphics/rayquaza_scene/clouds.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+164 205 180
+82 82 90
+255 0 255
+205 115 0
+156 98 16
+98 82 32
+49 65 49
+0 49 65
+24 57 65
+49 65 74
+49 49 57
+74 74 82
+98 98 106
+115 115 131
+139 148 148
+0 0 0
+32 90 115
+131 131 131
+148 148 148
+172 172 172
+197 197 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/rayquaza_scene/clouds.png b/graphics/rayquaza_scene/clouds.png
new file mode 100755
index 000000000..a253f47cc
--- /dev/null
+++ b/graphics/rayquaza_scene/clouds.png
Binary files differ
diff --git a/graphics/rayquaza_scene/clouds1.bin b/graphics/rayquaza_scene/clouds1.bin
new file mode 100755
index 000000000..57a939ad8
--- /dev/null
+++ b/graphics/rayquaza_scene/clouds1.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/clouds2.bin b/graphics/rayquaza_scene/clouds2.bin
new file mode 100755
index 000000000..073c45ac7
--- /dev/null
+++ b/graphics/rayquaza_scene/clouds2.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/clouds3.bin b/graphics/rayquaza_scene/clouds3.bin
new file mode 100755
index 000000000..9b9eb4611
--- /dev/null
+++ b/graphics/rayquaza_scene/clouds3.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/groudon.png b/graphics/rayquaza_scene/groudon.png
new file mode 100755
index 000000000..5ac84d51a
--- /dev/null
+++ b/graphics/rayquaza_scene/groudon.png
Binary files differ
diff --git a/graphics/rayquaza_scene/groudon_claw.png b/graphics/rayquaza_scene/groudon_claw.png
new file mode 100755
index 000000000..c960a9779
--- /dev/null
+++ b/graphics/rayquaza_scene/groudon_claw.png
Binary files differ
diff --git a/graphics/rayquaza_scene/groudon_left.png b/graphics/rayquaza_scene/groudon_left.png
new file mode 100755
index 000000000..582336d46
--- /dev/null
+++ b/graphics/rayquaza_scene/groudon_left.png
Binary files differ
diff --git a/graphics/rayquaza_scene/groudon_shoulder.png b/graphics/rayquaza_scene/groudon_shoulder.png
new file mode 100755
index 000000000..c4c5f08b6
--- /dev/null
+++ b/graphics/rayquaza_scene/groudon_shoulder.png
Binary files differ
diff --git a/graphics/rayquaza_scene/groudon_tail.png b/graphics/rayquaza_scene/groudon_tail.png
new file mode 100755
index 000000000..38f6a41b2
--- /dev/null
+++ b/graphics/rayquaza_scene/groudon_tail.png
Binary files differ
diff --git a/graphics/rayquaza_scene/hush_bg.bin b/graphics/rayquaza_scene/hush_bg.bin
new file mode 100755
index 000000000..b9e86b907
--- /dev/null
+++ b/graphics/rayquaza_scene/hush_bg.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/hush_bg.pal b/graphics/rayquaza_scene/hush_bg.pal
new file mode 100755
index 000000000..b0b0602dd
--- /dev/null
+++ b/graphics/rayquaza_scene/hush_bg.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+156 156 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 164 197
+8 172 180
+24 189 156
+41 197 131
+57 205 106
+82 230 90
+115 255 82
+164 255 139
+213 255 197
+255 255 255
+0 0 0
+156 156 255
+74 74 189
+82 82 197
+90 90 197
+98 98 205
+106 106 205
+115 115 213
+131 131 213
+139 139 222
+148 148 222
+156 156 230
+164 164 230
+172 172 238
+180 180 238
+197 197 246
+0 0 0
+156 156 255
+57 82 57
+65 131 65
+74 148 123
+90 189 139
+148 222 180
+98 90 106
+172 41 57
+230 74 49
+246 98 98
+197 148 98
+222 213 238
+255 255 255
+222 205 0
+255 238 0
+24 24 24
diff --git a/graphics/rayquaza_scene/hush_bg.png b/graphics/rayquaza_scene/hush_bg.png
new file mode 100755
index 000000000..7ead765b9
--- /dev/null
+++ b/graphics/rayquaza_scene/hush_bg.png
Binary files differ
diff --git a/graphics/rayquaza_scene/hush_ring.bin b/graphics/rayquaza_scene/hush_ring.bin
new file mode 100755
index 000000000..22f5530ba
--- /dev/null
+++ b/graphics/rayquaza_scene/hush_ring.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/hush_ring.png b/graphics/rayquaza_scene/hush_ring.png
new file mode 100755
index 000000000..93d734e03
--- /dev/null
+++ b/graphics/rayquaza_scene/hush_ring.png
Binary files differ
diff --git a/graphics/rayquaza_scene/hush_ring_map.bin b/graphics/rayquaza_scene/hush_ring_map.bin
new file mode 100755
index 000000000..812fda11d
--- /dev/null
+++ b/graphics/rayquaza_scene/hush_ring_map.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/kyogre.png b/graphics/rayquaza_scene/kyogre.png
new file mode 100755
index 000000000..0f2e27e4e
--- /dev/null
+++ b/graphics/rayquaza_scene/kyogre.png
Binary files differ
diff --git a/graphics/rayquaza_scene/kyogre_fin.png b/graphics/rayquaza_scene/kyogre_fin.png
new file mode 100755
index 000000000..9d4f62da9
--- /dev/null
+++ b/graphics/rayquaza_scene/kyogre_fin.png
Binary files differ
diff --git a/graphics/rayquaza_scene/kyogre_right.png b/graphics/rayquaza_scene/kyogre_right.png
new file mode 100755
index 000000000..d5e1749e9
--- /dev/null
+++ b/graphics/rayquaza_scene/kyogre_right.png
Binary files differ
diff --git a/graphics/rayquaza_scene/kyogre_shoulder.png b/graphics/rayquaza_scene/kyogre_shoulder.png
new file mode 100755
index 000000000..16b221f97
--- /dev/null
+++ b/graphics/rayquaza_scene/kyogre_shoulder.png
Binary files differ
diff --git a/graphics/rayquaza_scene/overcast.bin b/graphics/rayquaza_scene/overcast.bin
new file mode 100755
index 000000000..82b9e5067
--- /dev/null
+++ b/graphics/rayquaza_scene/overcast.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/overcast.png b/graphics/rayquaza_scene/overcast.png
new file mode 100755
index 000000000..4ad9be8d2
--- /dev/null
+++ b/graphics/rayquaza_scene/overcast.png
Binary files differ
diff --git a/graphics/rayquaza_scene/overcast2.bin b/graphics/rayquaza_scene/overcast2.bin
new file mode 100755
index 000000000..0c2e5ec45
--- /dev/null
+++ b/graphics/rayquaza_scene/overcast2.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/overcast2.pal b/graphics/rayquaza_scene/overcast2.pal
new file mode 100755
index 000000000..6987c2cc1
--- /dev/null
+++ b/graphics/rayquaza_scene/overcast2.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+164 205 180
+255 255 255
+197 197 197
+106 164 197
+98 148 172
+82 123 148
+74 106 123
+49 82 90
+139 148 148
+49 65 74
+49 49 57
+74 74 82
+98 98 106
+115 115 131
+156 164 164
+0 0 0
+164 205 180
+255 255 255
+197 255 222
+139 255 180
+82 255 148
+24 246 106
+24 205 82
+32 164 57
+41 123 41
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/rayquaza_scene/overcast2.png b/graphics/rayquaza_scene/overcast2.png
new file mode 100755
index 000000000..c9dea2002
--- /dev/null
+++ b/graphics/rayquaza_scene/overcast2.png
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza.bin b/graphics/rayquaza_scene/rayquaza.bin
new file mode 100755
index 000000000..1a6d89234
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza.png b/graphics/rayquaza_scene/rayquaza.png
new file mode 100755
index 000000000..6198b945d
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza.png
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza_chase.bin b/graphics/rayquaza_scene/rayquaza_chase.bin
new file mode 100755
index 000000000..51307a4c1
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza_chase.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza_chase.png b/graphics/rayquaza_scene/rayquaza_chase.png
new file mode 100755
index 000000000..154a105a8
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza_chase.png
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza_chase2.bin b/graphics/rayquaza_scene/rayquaza_chase2.bin
new file mode 100755
index 000000000..37416ac1b
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza_chase2.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza_fly1.png b/graphics/rayquaza_scene/rayquaza_fly1.png
new file mode 100755
index 000000000..40dd0a6e3
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza_fly1.png
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza_flyin.png b/graphics/rayquaza_scene/rayquaza_flyin.png
new file mode 100755
index 000000000..f1b44c104
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza_flyin.png
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza_hover.png b/graphics/rayquaza_scene/rayquaza_hover.png
new file mode 100755
index 000000000..269d7dd2d
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza_hover.png
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza_light.bin b/graphics/rayquaza_scene/rayquaza_light.bin
new file mode 100755
index 000000000..97808b8b9
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza_light.bin
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza_light.png b/graphics/rayquaza_scene/rayquaza_light.png
new file mode 100755
index 000000000..4640149f3
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza_light.png
Binary files differ
diff --git a/graphics/rayquaza_scene/rayquaza_tail.png b/graphics/rayquaza_scene/rayquaza_tail.png
new file mode 100755
index 000000000..7e0577df1
--- /dev/null
+++ b/graphics/rayquaza_scene/rayquaza_tail.png
Binary files differ
diff --git a/graphics/rayquaza_scene/smoke.png b/graphics/rayquaza_scene/smoke.png
new file mode 100755
index 000000000..4aaa6ae75
--- /dev/null
+++ b/graphics/rayquaza_scene/smoke.png
Binary files differ
diff --git a/graphics/rayquaza_scene/splash.png b/graphics/rayquaza_scene/splash.png
new file mode 100755
index 000000000..406af9da3
--- /dev/null
+++ b/graphics/rayquaza_scene/splash.png
Binary files differ
diff --git a/graphics/roulette/center.png b/graphics/roulette/center.png
index 0653b0e97..0653b0e97 100644..100755
--- a/graphics/roulette/center.png
+++ b/graphics/roulette/center.png
Binary files differ
diff --git a/graphics/roulette/credit.png b/graphics/roulette/credit.png
index 687d47934..687d47934 100644..100755
--- a/graphics/roulette/credit.png
+++ b/graphics/roulette/credit.png
Binary files differ
diff --git a/graphics/roulette/headers.png b/graphics/roulette/headers.png
index 70f5fec90..70f5fec90 100644..100755
--- a/graphics/roulette/headers.png
+++ b/graphics/roulette/headers.png
Binary files differ
diff --git a/graphics/roulette/multiplier.png b/graphics/roulette/multiplier.png
index b993f8091..b993f8091 100644..100755
--- a/graphics/roulette/multiplier.png
+++ b/graphics/roulette/multiplier.png
Binary files differ
diff --git a/graphics/roulette/numbers.png b/graphics/roulette/numbers.png
index 97d0b0e03..97d0b0e03 100644..100755
--- a/graphics/roulette/numbers.png
+++ b/graphics/roulette/numbers.png
Binary files differ
diff --git a/graphics/roulette/wheel.png b/graphics/roulette/wheel.png
index a0f121843..a0f121843 100644..100755
--- a/graphics/roulette/wheel.png
+++ b/graphics/roulette/wheel.png
Binary files differ
diff --git a/graphics/roulette/window.png b/graphics/roulette/window.png
new file mode 100755
index 000000000..561c73bc2
--- /dev/null
+++ b/graphics/roulette/window.png
Binary files differ
diff --git a/graphics/slot_machine/bolt.png b/graphics/slot_machine/bolt.png
new file mode 100755
index 000000000..1afda2308
--- /dev/null
+++ b/graphics/slot_machine/bolt.png
Binary files differ
diff --git a/graphics/slot_machine/duck.png b/graphics/slot_machine/duck.png
new file mode 100755
index 000000000..1bf2afc30
--- /dev/null
+++ b/graphics/slot_machine/duck.png
Binary files differ
diff --git a/graphics/slot_machine/large_bolt/0.png b/graphics/slot_machine/large_bolt/0.png
new file mode 100755
index 000000000..6d833c264
--- /dev/null
+++ b/graphics/slot_machine/large_bolt/0.png
Binary files differ
diff --git a/graphics/slot_machine/large_bolt/1.png b/graphics/slot_machine/large_bolt/1.png
new file mode 100755
index 000000000..706f3fe8b
--- /dev/null
+++ b/graphics/slot_machine/large_bolt/1.png
Binary files differ
diff --git a/graphics/slot_machine/menu.bin b/graphics/slot_machine/menu.bin
new file mode 100755
index 000000000..a7ec95508
--- /dev/null
+++ b/graphics/slot_machine/menu.bin
Binary files differ
diff --git a/graphics/slot_machine/menu.pal b/graphics/slot_machine/menu.pal
new file mode 100755
index 000000000..56a9d31d0
--- /dev/null
+++ b/graphics/slot_machine/menu.pal
@@ -0,0 +1,83 @@
+JASC-PAL
+0100
+80
+0 0 0
+57 57 49
+230 230 230
+255 255 255
+131 213 172
+49 123 74
+90 172 106
+255 0 255
+90 172 106
+255 164 41
+255 98 57
+255 197 156
+172 57 0
+0 65 24
+98 98 90
+0 0 0
+222 222 222
+255 255 255
+131 213 172
+255 90 0
+222 41 0
+255 90 0
+222 41 0
+255 90 0
+222 41 0
+255 90 0
+222 41 0
+255 90 0
+222 41 0
+255 0 255
+156 0 0
+0 0 0
+0 0 0
+255 255 255
+74 74 213
+115 172 255
+115 164 74
+156 238 74
+230 65 24
+255 164 41
+255 238 32
+131 213 172
+189 189 189
+156 156 156
+123 123 123
+90 90 90
+65 65 65
+0 0 0
+255 0 255
+255 255 255
+65 164 82
+139 230 139
+139 230 139
+148 238 148
+164 246 164
+180 246 180
+189 246 189
+205 255 205
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+0 0 0
+222 222 222
+65 90 213
+90 172 106
+255 255 255
+131 213 172
+0 98 115
+90 90 0
+90 90 0
+156 16 0
+156 16 0
+106 156 246
+205 205 0
+205 205 0
+246 106 74
+246 106 74
+0 0 0
diff --git a/graphics/slot_machine/menu.png b/graphics/slot_machine/menu.png
new file mode 100755
index 000000000..08aa5989d
--- /dev/null
+++ b/graphics/slot_machine/menu.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/0.png b/graphics/slot_machine/numbers/0.png
new file mode 100755
index 000000000..07c668eea
--- /dev/null
+++ b/graphics/slot_machine/numbers/0.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/1.png b/graphics/slot_machine/numbers/1.png
new file mode 100755
index 000000000..0aa67e201
--- /dev/null
+++ b/graphics/slot_machine/numbers/1.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/2.png b/graphics/slot_machine/numbers/2.png
new file mode 100755
index 000000000..0ff2a0265
--- /dev/null
+++ b/graphics/slot_machine/numbers/2.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/3.png b/graphics/slot_machine/numbers/3.png
new file mode 100755
index 000000000..ea5f1e496
--- /dev/null
+++ b/graphics/slot_machine/numbers/3.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/4.png b/graphics/slot_machine/numbers/4.png
new file mode 100755
index 000000000..d5353c752
--- /dev/null
+++ b/graphics/slot_machine/numbers/4.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/5.png b/graphics/slot_machine/numbers/5.png
new file mode 100755
index 000000000..121a7b3c9
--- /dev/null
+++ b/graphics/slot_machine/numbers/5.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/6.png b/graphics/slot_machine/numbers/6.png
new file mode 100755
index 000000000..95a9ae0ff
--- /dev/null
+++ b/graphics/slot_machine/numbers/6.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/7.png b/graphics/slot_machine/numbers/7.png
new file mode 100755
index 000000000..1b8b77b2a
--- /dev/null
+++ b/graphics/slot_machine/numbers/7.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/8.png b/graphics/slot_machine/numbers/8.png
new file mode 100755
index 000000000..17fe7938f
--- /dev/null
+++ b/graphics/slot_machine/numbers/8.png
Binary files differ
diff --git a/graphics/slot_machine/numbers/9.png b/graphics/slot_machine/numbers/9.png
new file mode 100755
index 000000000..f684e0be7
--- /dev/null
+++ b/graphics/slot_machine/numbers/9.png
Binary files differ
diff --git a/graphics/slot_machine/pika_aura.png b/graphics/slot_machine/pika_aura.png
new file mode 100755
index 000000000..710d90256
--- /dev/null
+++ b/graphics/slot_machine/pika_aura.png
Binary files differ
diff --git a/graphics/slot_machine/reel_pikachu.png b/graphics/slot_machine/reel_pikachu.png
new file mode 100755
index 000000000..29b004c84
--- /dev/null
+++ b/graphics/slot_machine/reel_pikachu.png
Binary files differ
diff --git a/graphics/slot_machine/reel_symbols/1.png b/graphics/slot_machine/reel_symbols/1.png
new file mode 100755
index 000000000..73e9d3345
--- /dev/null
+++ b/graphics/slot_machine/reel_symbols/1.png
Binary files differ
diff --git a/graphics/slot_machine/reel_symbols/2.png b/graphics/slot_machine/reel_symbols/2.png
new file mode 100755
index 000000000..866f4cead
--- /dev/null
+++ b/graphics/slot_machine/reel_symbols/2.png
Binary files differ
diff --git a/graphics/slot_machine/reel_symbols/3.png b/graphics/slot_machine/reel_symbols/3.png
new file mode 100755
index 000000000..9641dc4c5
--- /dev/null
+++ b/graphics/slot_machine/reel_symbols/3.png
Binary files differ
diff --git a/graphics/slot_machine/reel_symbols/4.png b/graphics/slot_machine/reel_symbols/4.png
new file mode 100755
index 000000000..b3319e0e4
--- /dev/null
+++ b/graphics/slot_machine/reel_symbols/4.png
Binary files differ
diff --git a/graphics/slot_machine/reel_symbols/5.png b/graphics/slot_machine/reel_symbols/5.png
new file mode 100755
index 000000000..16ae0f318
--- /dev/null
+++ b/graphics/slot_machine/reel_symbols/5.png
Binary files differ
diff --git a/graphics/slot_machine/reel_symbols/6.png b/graphics/slot_machine/reel_symbols/6.png
new file mode 100755
index 000000000..3d170585f
--- /dev/null
+++ b/graphics/slot_machine/reel_symbols/6.png
Binary files differ
diff --git a/graphics/slot_machine/reel_symbols/7.png b/graphics/slot_machine/reel_symbols/7.png
new file mode 100755
index 000000000..e6535b380
--- /dev/null
+++ b/graphics/slot_machine/reel_symbols/7.png
Binary files differ
diff --git a/graphics/slot_machine/reel_time.png b/graphics/slot_machine/reel_time.png
new file mode 100755
index 000000000..4ba92175f
--- /dev/null
+++ b/graphics/slot_machine/reel_time.png
Binary files differ
diff --git a/graphics/slot_machine/reel_time_explosion/0.png b/graphics/slot_machine/reel_time_explosion/0.png
new file mode 100755
index 000000000..163b7ab66
--- /dev/null
+++ b/graphics/slot_machine/reel_time_explosion/0.png
Binary files differ
diff --git a/graphics/slot_machine/reel_time_explosion/1.png b/graphics/slot_machine/reel_time_explosion/1.png
new file mode 100755
index 000000000..33492bc45
--- /dev/null
+++ b/graphics/slot_machine/reel_time_explosion/1.png
Binary files differ
diff --git a/graphics/slot_machine/reel_time_numbers/0.png b/graphics/slot_machine/reel_time_numbers/0.png
new file mode 100755
index 000000000..117a625b8
--- /dev/null
+++ b/graphics/slot_machine/reel_time_numbers/0.png
Binary files differ
diff --git a/graphics/slot_machine/reel_time_numbers/1.png b/graphics/slot_machine/reel_time_numbers/1.png
new file mode 100755
index 000000000..5527465e7
--- /dev/null
+++ b/graphics/slot_machine/reel_time_numbers/1.png
Binary files differ
diff --git a/graphics/slot_machine/reel_time_numbers/2.png b/graphics/slot_machine/reel_time_numbers/2.png
new file mode 100755
index 000000000..f424b5ff9
--- /dev/null
+++ b/graphics/slot_machine/reel_time_numbers/2.png
Binary files differ
diff --git a/graphics/slot_machine/reel_time_numbers/3.png b/graphics/slot_machine/reel_time_numbers/3.png
new file mode 100755
index 000000000..281273f7d
--- /dev/null
+++ b/graphics/slot_machine/reel_time_numbers/3.png
Binary files differ
diff --git a/graphics/slot_machine/reel_time_numbers/4.png b/graphics/slot_machine/reel_time_numbers/4.png
new file mode 100755
index 000000000..772692ac4
--- /dev/null
+++ b/graphics/slot_machine/reel_time_numbers/4.png
Binary files differ
diff --git a/graphics/slot_machine/reel_time_numbers/5.png b/graphics/slot_machine/reel_time_numbers/5.png
new file mode 100755
index 000000000..21e2b2940
--- /dev/null
+++ b/graphics/slot_machine/reel_time_numbers/5.png
Binary files differ
diff --git a/graphics/slot_machine/shadow.png b/graphics/slot_machine/shadow.png
new file mode 100755
index 000000000..a7862ab30
--- /dev/null
+++ b/graphics/slot_machine/shadow.png
Binary files differ
diff --git a/graphics/slot_machine/slots_layout.bin b/graphics/slot_machine/slots_layout.bin
new file mode 100755
index 000000000..4009d8177
--- /dev/null
+++ b/graphics/slot_machine/slots_layout.bin
Binary files differ
diff --git a/graphics/slot_machine/smoke.png b/graphics/slot_machine/smoke.png
new file mode 100755
index 000000000..d38690d91
--- /dev/null
+++ b/graphics/slot_machine/smoke.png
Binary files differ
diff --git a/graphics/slot_machine/spr6.pal b/graphics/slot_machine/spr6.pal
new file mode 100755
index 000000000..4f74a3079
--- /dev/null
+++ b/graphics/slot_machine/spr6.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+98 98 90
+255 189 16
+131 0 0
+197 65 16
+197 65 16
+197 65 16
+197 65 16
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+0 0 0
diff --git a/graphics/title_screen/title_screen1.bin b/graphics/title_screen/title_screen1.bin
new file mode 100755
index 000000000..161f23cc1
--- /dev/null
+++ b/graphics/title_screen/title_screen1.bin
Binary files differ
diff --git a/graphics/title_screen/title_screen2.bin b/graphics/title_screen/title_screen2.bin
new file mode 100755
index 000000000..0e6b7e775
--- /dev/null
+++ b/graphics/title_screen/title_screen2.bin
Binary files differ
diff --git a/graphics/trade/buttons.png b/graphics/trade/buttons.png
new file mode 100755
index 000000000..568f40a42
--- /dev/null
+++ b/graphics/trade/buttons.png
Binary files differ
diff --git a/graphics/trade/menu.pal b/graphics/trade/menu.pal
new file mode 100755
index 000000000..98377bbb3
--- /dev/null
+++ b/graphics/trade/menu.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+0 0 0
+57 57 172
+98 98 180
+123 106 222
+82 90 213
+82 148 205
+131 115 230
+148 156 189
+205 106 0
+246 148 0
+49 49 90
+255 213 115
+205 74 90
+255 98 32
+205 205 222
+255 255 213
+0 0 0
+0 8 16
+0 16 32
+0 24 49
+0 41 65
+0 49 82
+0 57 98
+0 65 115
+0 82 131
+0 90 148
+0 98 164
+0 106 180
+0 123 197
+0 131 213
+0 139 230
+0 156 255
+0 0 0
+0 8 16
+0 16 32
+0 24 49
+0 41 65
+0 49 82
+0 57 98
+0 65 115
+0 82 131
+0 90 148
+0 98 164
+0 106 180
+0 123 197
+0 131 213
+0 139 230
+0 156 255
diff --git a/graphics/trade/menu.png b/graphics/trade/menu.png
new file mode 100755
index 000000000..91bc0f7eb
--- /dev/null
+++ b/graphics/trade/menu.png
Binary files differ
diff --git a/graphics/trainer_card/0star.pal b/graphics/trainer_card/0star.pal
new file mode 100755
index 000000000..f49b7f2c5
--- /dev/null
+++ b/graphics/trainer_card/0star.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+139 98 115
+255 255 255
+230 255 222
+164 164 164
+123 123 123
+98 98 115
+41 57 65
+57 106 139
+65 139 197
+180 230 156
+148 238 131
+131 222 115
+82 172 74
+106 189 255
+205 205 205
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+106 180 213
+41 123 164
+0 0 0
+0 0 0
+98 98 115
+255 255 255
+230 230 238
+164 164 164
+123 123 123
+255 255 255
+230 230 238
+164 164 164
+123 123 123
+255 255 255
+230 230 238
+164 164 164
+123 123 123
+106 189 255
+205 205 205
+0 0 0
diff --git a/graphics/trainer_card/0star_fr.pal b/graphics/trainer_card/0star_fr.pal
new file mode 100755
index 000000000..1e83a252c
--- /dev/null
+++ b/graphics/trainer_card/0star_fr.pal
@@ -0,0 +1,51 @@
+JASC-PAL
+0100
+48
+139 98 115
+230 246 246
+222 238 255
+213 230 246
+197 213 230
+246 205 148
+164 164 164
+98 98 115
+246 213 139
+180 205 148
+106 164 222
+90 156 205
+57 115 156
+255 246 189
+255 255 255
+131 189 230
+139 98 115
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+189 148 16
+255 213 82
+82 205 180
+49 156 148
+197 197 197
+90 90 90
+139 98 115
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+255 0 255
+189 148 16
+255 213 82
+230 148 82
+213 98 41
+197 197 197
+90 90 90
diff --git a/graphics/trainer_card/card.png b/graphics/trainer_card/card.png
new file mode 100755
index 000000000..eab827246
--- /dev/null
+++ b/graphics/trainer_card/card.png
Binary files differ
diff --git a/graphics/trainer_card/card_fr.png b/graphics/trainer_card/card_fr.png
new file mode 100755
index 000000000..2fea60d09
--- /dev/null
+++ b/graphics/trainer_card/card_fr.png
Binary files differ
diff --git a/graphics/types/bug.png b/graphics/types/bug.png
new file mode 100755
index 000000000..2f59a4838
--- /dev/null
+++ b/graphics/types/bug.png
Binary files differ
diff --git a/graphics/types/contest_beauty.png b/graphics/types/contest_beauty.png
new file mode 100755
index 000000000..b52fe3ca4
--- /dev/null
+++ b/graphics/types/contest_beauty.png
Binary files differ
diff --git a/graphics/types/contest_cool.png b/graphics/types/contest_cool.png
new file mode 100755
index 000000000..f0ca72323
--- /dev/null
+++ b/graphics/types/contest_cool.png
Binary files differ
diff --git a/graphics/types/contest_cute.png b/graphics/types/contest_cute.png
new file mode 100755
index 000000000..eeb86c431
--- /dev/null
+++ b/graphics/types/contest_cute.png
Binary files differ
diff --git a/graphics/types/contest_smart.png b/graphics/types/contest_smart.png
new file mode 100755
index 000000000..7659cc4f2
--- /dev/null
+++ b/graphics/types/contest_smart.png
Binary files differ
diff --git a/graphics/types/contest_tough.png b/graphics/types/contest_tough.png
new file mode 100755
index 000000000..f928596af
--- /dev/null
+++ b/graphics/types/contest_tough.png
Binary files differ
diff --git a/graphics/types/dark.png b/graphics/types/dark.png
new file mode 100755
index 000000000..3380297da
--- /dev/null
+++ b/graphics/types/dark.png
Binary files differ
diff --git a/graphics/types/dragon.png b/graphics/types/dragon.png
new file mode 100755
index 000000000..12430ad06
--- /dev/null
+++ b/graphics/types/dragon.png
Binary files differ
diff --git a/graphics/types/electric.png b/graphics/types/electric.png
new file mode 100755
index 000000000..0be6b890b
--- /dev/null
+++ b/graphics/types/electric.png
Binary files differ
diff --git a/graphics/types/fight.png b/graphics/types/fight.png
new file mode 100755
index 000000000..95ff5a928
--- /dev/null
+++ b/graphics/types/fight.png
Binary files differ
diff --git a/graphics/types/fire.png b/graphics/types/fire.png
new file mode 100755
index 000000000..f6db950c8
--- /dev/null
+++ b/graphics/types/fire.png
Binary files differ
diff --git a/graphics/types/flying.png b/graphics/types/flying.png
new file mode 100755
index 000000000..2f34851ca
--- /dev/null
+++ b/graphics/types/flying.png
Binary files differ
diff --git a/graphics/types/ghost.png b/graphics/types/ghost.png
new file mode 100755
index 000000000..b7347014d
--- /dev/null
+++ b/graphics/types/ghost.png
Binary files differ
diff --git a/graphics/types/grass.png b/graphics/types/grass.png
new file mode 100755
index 000000000..4432a52e6
--- /dev/null
+++ b/graphics/types/grass.png
Binary files differ
diff --git a/graphics/types/ground.png b/graphics/types/ground.png
new file mode 100755
index 000000000..d3f6787b2
--- /dev/null
+++ b/graphics/types/ground.png
Binary files differ
diff --git a/graphics/types/ice.png b/graphics/types/ice.png
new file mode 100755
index 000000000..5ff2f69aa
--- /dev/null
+++ b/graphics/types/ice.png
Binary files differ
diff --git a/graphics/types/move_types_1.pal b/graphics/types/move_types_1.pal
new file mode 100755
index 000000000..951aa69cb
--- /dev/null
+++ b/graphics/types/move_types_1.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+255 213 49
+246 131 49
+197 49 41
+230 197 106
+189 164 57
+139 106 49
+255 255 123
+172 172 123
+222 222 197
+115 90 74
+74 65 57
+189 189 213
+0 0 0
+131 123 115
+255 255 255
diff --git a/graphics/types/move_types_2.pal b/graphics/types/move_types_2.pal
new file mode 100755
index 000000000..08dcea47c
--- /dev/null
+++ b/graphics/types/move_types_2.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+205 197 255
+172 148 246
+115 90 156
+106 148 246
+156 222 222
+213 255 238
+74 57 82
+255 90 139
+255 197 180
+148 98 98
+164 65 164
+222 131 189
+148 148 164
+131 123 115
+255 255 255
diff --git a/graphics/types/move_types_3.pal b/graphics/types/move_types_3.pal
new file mode 100755
index 000000000..4db37235b
--- /dev/null
+++ b/graphics/types/move_types_3.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+197 255 98
+123 205 82
+90 131 65
+115 57 255
+74 57 148
+189 164 255
+172 189 32
+222 230 49
+123 148 16
+106 164 148
+115 205 180
+32 106 98
+0 0 0
+131 123 115
+255 255 255
diff --git a/graphics/types/mystery.png b/graphics/types/mystery.png
new file mode 100755
index 000000000..a2ea01d55
--- /dev/null
+++ b/graphics/types/mystery.png
Binary files differ
diff --git a/graphics/types/normal.png b/graphics/types/normal.png
new file mode 100755
index 000000000..608a1f9c9
--- /dev/null
+++ b/graphics/types/normal.png
Binary files differ
diff --git a/graphics/types/poison.png b/graphics/types/poison.png
new file mode 100755
index 000000000..502dfae37
--- /dev/null
+++ b/graphics/types/poison.png
Binary files differ
diff --git a/graphics/types/psychic.png b/graphics/types/psychic.png
new file mode 100755
index 000000000..975d1fb55
--- /dev/null
+++ b/graphics/types/psychic.png
Binary files differ
diff --git a/graphics/types/rock.png b/graphics/types/rock.png
new file mode 100755
index 000000000..3793597f9
--- /dev/null
+++ b/graphics/types/rock.png
Binary files differ
diff --git a/graphics/types/steel.png b/graphics/types/steel.png
new file mode 100755
index 000000000..29748639c
--- /dev/null
+++ b/graphics/types/steel.png
Binary files differ
diff --git a/graphics/types/water.png b/graphics/types/water.png
new file mode 100755
index 000000000..19ae3ebe3
--- /dev/null
+++ b/graphics/types/water.png
Binary files differ
diff --git a/graphics/unknown/unknown_5B3544.pal b/graphics/unknown/unknown_5B3544.pal
deleted file mode 100644
index d6994a324..000000000
--- a/graphics/unknown/unknown_5B3544.pal
+++ /dev/null
@@ -1,19 +0,0 @@
-JASC-PAL
-0100
-16
-115 197 164
-74 74 74
-189 131 156
-230 156 213
-222 238 255
-230 246 255
-148 115 139
-197 213 222
-172 164 189
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
-0 0 0
diff --git a/graphics/unknown/unknown_C035B8.png b/graphics/unknown/unknown_C035B8.png
new file mode 100755
index 000000000..0b2ae80f9
--- /dev/null
+++ b/graphics/unknown/unknown_C035B8.png
Binary files differ
diff --git a/graphics/unknown/unknown_C06D98.png b/graphics/unknown/unknown_C06D98.png
new file mode 100755
index 000000000..d36afa64d
--- /dev/null
+++ b/graphics/unknown/unknown_C06D98.png
Binary files differ
diff --git a/graphics/unknown/unknown_C06D98_2.pal b/graphics/unknown/unknown_C06D98_2.pal
new file mode 100755
index 000000000..44f4b55d6
--- /dev/null
+++ b/graphics/unknown/unknown_C06D98_2.pal
@@ -0,0 +1,35 @@
+JASC-PAL
+0100
+32
+98 156 131
+57 57 57
+156 156 156
+255 255 255
+255 205 0
+255 255 98
+213 98 24
+255 123 32
+106 65 172
+65 24 172
+255 205 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+98 156 131
+57 57 57
+156 156 156
+255 255 255
+57 123 0
+90 189 0
+123 255 8
+230 106 148
+255 139 255
+255 205 0
+255 255 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/unknown/unknown_C0CA1C.bin b/graphics/unknown/unknown_C0CA1C.bin
new file mode 100755
index 000000000..4b6b2b106
--- /dev/null
+++ b/graphics/unknown/unknown_C0CA1C.bin
Binary files differ
diff --git a/graphics/unknown/unknown_C0CA40.bin b/graphics/unknown/unknown_C0CA40.bin
new file mode 100755
index 000000000..25fc33a73
--- /dev/null
+++ b/graphics/unknown/unknown_C0CA40.bin
Binary files differ
diff --git a/graphics/unknown/unknown_C0CA64.bin b/graphics/unknown/unknown_C0CA64.bin
new file mode 100755
index 000000000..5b81e0216
--- /dev/null
+++ b/graphics/unknown/unknown_C0CA64.bin
Binary files differ
diff --git a/graphics/unknown/unknown_C0CAE0.bin b/graphics/unknown/unknown_C0CAE0.bin
new file mode 100755
index 000000000..15379a9ce
--- /dev/null
+++ b/graphics/unknown/unknown_C0CAE0.bin
Binary files differ
diff --git a/graphics/unknown/unknown_C15BC0.bin b/graphics/unknown/unknown_C15BC0.bin
new file mode 100755
index 000000000..40de9e529
--- /dev/null
+++ b/graphics/unknown/unknown_C15BC0.bin
Binary files differ
diff --git a/graphics/unknown/unknown_C17170.bin b/graphics/unknown/unknown_C17170.bin
new file mode 100755
index 000000000..9f5141c5b
--- /dev/null
+++ b/graphics/unknown/unknown_C17170.bin
Binary files differ
diff --git a/graphics/unknown/unknown_C17410.bin b/graphics/unknown/unknown_C17410.bin
new file mode 100755
index 000000000..b2567ca7c
--- /dev/null
+++ b/graphics/unknown/unknown_C17410.bin
Binary files differ
diff --git a/graphics/unknown/unknown_C1751C.bin b/graphics/unknown/unknown_C1751C.bin
new file mode 100755
index 000000000..e8a506838
--- /dev/null
+++ b/graphics/unknown/unknown_C1751C.bin
Binary files differ
diff --git a/graphics/unknown/unknown_C17980.bin b/graphics/unknown/unknown_C17980.bin
new file mode 100755
index 000000000..77e35348a
--- /dev/null
+++ b/graphics/unknown/unknown_C17980.bin
Binary files differ
diff --git a/graphics/unknown/unknown_C19470.png b/graphics/unknown/unknown_C19470.png
new file mode 100755
index 000000000..14cc50cf4
--- /dev/null
+++ b/graphics/unknown/unknown_C19470.png
Binary files differ
diff --git a/graphics/unknown/unknown_C2F9E0.pal b/graphics/unknown/unknown_C2F9E0.pal
new file mode 100755
index 000000000..2fd4607c2
--- /dev/null
+++ b/graphics/unknown/unknown_C2F9E0.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+115 205 164
+255 255 255
+98 98 98
+213 213 205
+230 8 8
+255 189 115
+32 156 8
+148 246 148
+49 82 205
+164 197 246
+255 255 255
+230 230 238
+255 255 255
+230 8 8
+180 8 8
+74 115 164
diff --git a/graphics/unknown/unknown_D0D2B4.bin b/graphics/unknown/unknown_D0D2B4.bin
new file mode 100755
index 000000000..d42729b58
--- /dev/null
+++ b/graphics/unknown/unknown_D0D2B4.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D12FEC.png b/graphics/unknown/unknown_D12FEC.png
new file mode 100755
index 000000000..96c49a992
--- /dev/null
+++ b/graphics/unknown/unknown_D12FEC.png
Binary files differ
diff --git a/graphics/unknown/unknown_D1300C.png b/graphics/unknown/unknown_D1300C.png
new file mode 100755
index 000000000..0c077dd0b
--- /dev/null
+++ b/graphics/unknown/unknown_D1300C.png
Binary files differ
diff --git a/graphics/unknown/unknown_D1C060.bin b/graphics/unknown/unknown_D1C060.bin
new file mode 100755
index 000000000..e4776cba4
--- /dev/null
+++ b/graphics/unknown/unknown_D1C060.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D1C060.png b/graphics/unknown/unknown_D1C060.png
new file mode 100755
index 000000000..2371241d7
--- /dev/null
+++ b/graphics/unknown/unknown_D1C060.png
Binary files differ
diff --git a/graphics/unknown/unknown_D83900.bin b/graphics/unknown/unknown_D83900.bin
new file mode 100755
index 000000000..7f3e36737
--- /dev/null
+++ b/graphics/unknown/unknown_D83900.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D83B2C.bin b/graphics/unknown/unknown_D83B2C.bin
new file mode 100755
index 000000000..34175237e
--- /dev/null
+++ b/graphics/unknown/unknown_D83B2C.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D83C3C.bin b/graphics/unknown/unknown_D83C3C.bin
new file mode 100755
index 000000000..acf7cf6ad
--- /dev/null
+++ b/graphics/unknown/unknown_D83C3C.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D84970.bin b/graphics/unknown/unknown_D84970.bin
new file mode 100755
index 000000000..d102290e4
--- /dev/null
+++ b/graphics/unknown/unknown_D84970.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D84F00.bin b/graphics/unknown/unknown_D84F00.bin
new file mode 100755
index 000000000..c38088d34
--- /dev/null
+++ b/graphics/unknown/unknown_D84F00.bin
@@ -0,0 +1 @@
+PPPTTTPPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTTPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTTPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTTPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTTPTPPPPPPTTPPPPPPPPPPPPPPTTPPPPPPPPPPPPPPTTPPPPPPTTPPPPPPTTPPPPPPTTPPPPPPTTTPPPPPTTPPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTPPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTTPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTTPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTTPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTTPTPPPPPPTTPPPPPPPPPPPPPPTTPPPPPPPPPPPPPPTTPPPPPPTTPPPPPPTTPPPPPPTTPPPPPPTTTPPPPPTTPPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTPPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTTPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTTPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTTPPPPPPPPPPPPTTTPPPPPPPPPPPPPTTTPTPPPPPPTTPPPPPPPPPPPPPPTTPPPPPPPPPPPPPPTTPPPPPPTTPPPPPPTTPPPPPPTTPPPPPPTTTPPPPPTTPPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTPPPPPTTTPPPPPPPPPPPPPTTTPPPPPPPPPPPPPTT \ No newline at end of file
diff --git a/graphics/unknown/unknown_D8C374.bin b/graphics/unknown/unknown_D8C374.bin
new file mode 100755
index 000000000..960ba873e
--- /dev/null
+++ b/graphics/unknown/unknown_D8C374.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D8C5C4.bin b/graphics/unknown/unknown_D8C5C4.bin
new file mode 100755
index 000000000..69dbe982a
--- /dev/null
+++ b/graphics/unknown/unknown_D8C5C4.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D95E00.bin b/graphics/unknown/unknown_D95E00.bin
new file mode 100755
index 000000000..d48de1d6f
--- /dev/null
+++ b/graphics/unknown/unknown_D95E00.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D960D0.bin b/graphics/unknown/unknown_D960D0.bin
new file mode 100755
index 000000000..6a6f7c049
--- /dev/null
+++ b/graphics/unknown/unknown_D960D0.bin
@@ -0,0 +1 @@
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000€ÀĀŀƀǀȀɀʀˀ̀̀000000000000000000ЀрҀӀԀՀր׀؀ـڀۀ܀݀ހ߀0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ No newline at end of file
diff --git a/graphics/unknown/unknown_D963A4.bin b/graphics/unknown/unknown_D963A4.bin
new file mode 100755
index 000000000..6312b8645
--- /dev/null
+++ b/graphics/unknown/unknown_D963A4.bin
@@ -0,0 +1 @@
+τ΄̈́̄˄ʄɄȄDŽƄńĄÄ„߄ބ݄܄ۄڄل؄ׄքՄԄӄ҄фЄ \ No newline at end of file
diff --git a/graphics/unknown/unknown_D9A88C.bin b/graphics/unknown/unknown_D9A88C.bin
new file mode 100755
index 000000000..c2ceaf139
--- /dev/null
+++ b/graphics/unknown/unknown_D9A88C.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D9AE04.bin b/graphics/unknown/unknown_D9AE04.bin
new file mode 100755
index 000000000..28ad3f927
--- /dev/null
+++ b/graphics/unknown/unknown_D9AE04.bin
Binary files differ
diff --git a/graphics/unknown/unknown_D9AF44.pal b/graphics/unknown/unknown_D9AF44.pal
new file mode 100755
index 000000000..dcfdcf2ef
--- /dev/null
+++ b/graphics/unknown/unknown_D9AF44.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+98 98 115
+255 255 255
+205 205 205
+164 164 164
+123 123 123
+98 98 115
+41 57 65
+57 106 139
+41 82 115
+255 255 205
+255 230 139
+255 32 32
+106 213 180
+41 164 123
+189 156 90
+0 0 0
diff --git a/graphics/unknown/unknown_DD19F8.bin b/graphics/unknown/unknown_DD19F8.bin
new file mode 100755
index 000000000..6338ade28
--- /dev/null
+++ b/graphics/unknown/unknown_DD19F8.bin
@@ -0,0 +1 @@
+33333333333333333333333333333333 \ No newline at end of file
diff --git a/graphics/unknown/unknown_DD1A18.png b/graphics/unknown/unknown_DD1A18.png
new file mode 100755
index 000000000..8b4a564bf
--- /dev/null
+++ b/graphics/unknown/unknown_DD1A18.png
Binary files differ
diff --git a/graphics/unknown/unknown_DD1F78.bin b/graphics/unknown/unknown_DD1F78.bin
new file mode 100755
index 000000000..4e58fafc6
--- /dev/null
+++ b/graphics/unknown/unknown_DD1F78.bin
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/graphics/unknown/unknown_DD2010.bin b/graphics/unknown/unknown_DD2010.bin
new file mode 100755
index 000000000..8ebf0b79a
--- /dev/null
+++ b/graphics/unknown/unknown_DD2010.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD21B0.bin b/graphics/unknown/unknown_DD21B0.bin
new file mode 100755
index 000000000..3ef599ce5
--- /dev/null
+++ b/graphics/unknown/unknown_DD21B0.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD228C.bin b/graphics/unknown/unknown_DD228C.bin
new file mode 100755
index 000000000..63c4b4978
--- /dev/null
+++ b/graphics/unknown/unknown_DD228C.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD2AE0.bin b/graphics/unknown/unknown_DD2AE0.bin
new file mode 100755
index 000000000..c0914427d
--- /dev/null
+++ b/graphics/unknown/unknown_DD2AE0.bin
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/graphics/unknown/unknown_DD2B78.bin b/graphics/unknown/unknown_DD2B78.bin
new file mode 100755
index 000000000..c83a6e494
--- /dev/null
+++ b/graphics/unknown/unknown_DD2B78.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD2D30.bin b/graphics/unknown/unknown_DD2D30.bin
new file mode 100755
index 000000000..14840e5e4
--- /dev/null
+++ b/graphics/unknown/unknown_DD2D30.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD2E5C.bin b/graphics/unknown/unknown_DD2E5C.bin
new file mode 100755
index 000000000..3169533c0
--- /dev/null
+++ b/graphics/unknown/unknown_DD2E5C.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD36C8.bin b/graphics/unknown/unknown_DD36C8.bin
new file mode 100755
index 000000000..973ef9e15
--- /dev/null
+++ b/graphics/unknown/unknown_DD36C8.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD4544.bin b/graphics/unknown/unknown_DD4544.bin
new file mode 100755
index 000000000..7e3604311
--- /dev/null
+++ b/graphics/unknown/unknown_DD4544.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD4620.bin b/graphics/unknown/unknown_DD4620.bin
new file mode 100755
index 000000000..bc4260b1f
--- /dev/null
+++ b/graphics/unknown/unknown_DD4620.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD46E0.bin b/graphics/unknown/unknown_DD46E0.bin
new file mode 100755
index 000000000..64095dce5
--- /dev/null
+++ b/graphics/unknown/unknown_DD46E0.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DD47A0.bin b/graphics/unknown/unknown_DD47A0.bin
new file mode 100755
index 000000000..847486432
--- /dev/null
+++ b/graphics/unknown/unknown_DD47A0.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DDB444.pal b/graphics/unknown/unknown_DDB444.pal
new file mode 100755
index 000000000..bb74b34a2
--- /dev/null
+++ b/graphics/unknown/unknown_DDB444.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+123 131 222
+98 98 180
+123 106 222
+106 172 238
+82 148 205
+180 189 230
+148 156 189
+205 106 0
+255 189 49
+246 148 0
+255 213 115
+205 74 90
+255 98 32
+205 205 222
+255 98 32
diff --git a/graphics/unknown/unknown_DDCF04.bin b/graphics/unknown/unknown_DDCF04.bin
new file mode 100755
index 000000000..46218245f
--- /dev/null
+++ b/graphics/unknown/unknown_DDCF04.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DDD704.bin b/graphics/unknown/unknown_DDD704.bin
new file mode 100755
index 000000000..354866137
--- /dev/null
+++ b/graphics/unknown/unknown_DDD704.bin
Binary files differ
diff --git a/graphics/unknown/unknown_DDD908.bin b/graphics/unknown/unknown_DDD908.bin
new file mode 100755
index 000000000..cb0a2fda1
--- /dev/null
+++ b/graphics/unknown/unknown_DDD908.bin
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/graphics/unknown/unknown_DDD920.bin b/graphics/unknown/unknown_DDD920.bin
new file mode 100755
index 000000000..cb0a2fda1
--- /dev/null
+++ b/graphics/unknown/unknown_DDD920.bin
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/graphics/unknown/unknown_DDD938.bin b/graphics/unknown/unknown_DDD938.bin
new file mode 100755
index 000000000..cb0a2fda1
--- /dev/null
+++ b/graphics/unknown/unknown_DDD938.bin
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/graphics/unknown/unknown_DDDB80.bin b/graphics/unknown/unknown_DDDB80.bin
new file mode 100755
index 000000000..d538583f6
--- /dev/null
+++ b/graphics/unknown/unknown_DDDB80.bin
Binary files differ
diff --git a/graphics/unknown/unknown_E6BC04.bin b/graphics/unknown/unknown_E6BC04.bin
new file mode 100755
index 000000000..91230cb01
--- /dev/null
+++ b/graphics/unknown/unknown_E6BC04.bin
Binary files differ
diff --git a/graphics/unused/basic_frame.bin b/graphics/unused/basic_frame.bin
new file mode 100755
index 000000000..8e83eb9f5
--- /dev/null
+++ b/graphics/unused/basic_frame.bin
Binary files differ
diff --git a/graphics/unused/basic_frame.png b/graphics/unused/basic_frame.png
new file mode 100755
index 000000000..132671581
--- /dev/null
+++ b/graphics/unused/basic_frame.png
Binary files differ
diff --git a/graphics/unused/battle_anim_023.pal b/graphics/unused/battle_anim_023.pal
new file mode 100755
index 000000000..8e6e6e902
--- /dev/null
+++ b/graphics/unused/battle_anim_023.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+0 0 0
+0 230 255
+115 230 255
+213 230 255
+0 0 0
+255 255 172
+255 255 115
+0 0 0
+98 139 98
+0 0 0
+0 0 0
+131 131 131
+164 164 164
+213 205 205
+255 255 255
diff --git a/graphics/unused/blank_frame.bin b/graphics/unused/blank_frame.bin
new file mode 100755
index 000000000..e9784eb4c
--- /dev/null
+++ b/graphics/unused/blank_frame.bin
Binary files differ
diff --git a/graphics/unused/blue_frame.bin b/graphics/unused/blue_frame.bin
new file mode 100755
index 000000000..d5c3b6600
--- /dev/null
+++ b/graphics/unused/blue_frame.bin
Binary files differ
diff --git a/graphics/unused/color_frames.png b/graphics/unused/color_frames.png
new file mode 100755
index 000000000..9270879eb
--- /dev/null
+++ b/graphics/unused/color_frames.png
Binary files differ
diff --git a/graphics/unused/goosuto.bin b/graphics/unused/goosuto.bin
new file mode 100755
index 000000000..8e5329157
--- /dev/null
+++ b/graphics/unused/goosuto.bin
Binary files differ
diff --git a/graphics/unused/goosuto.png b/graphics/unused/goosuto.png
new file mode 100755
index 000000000..257a25c71
--- /dev/null
+++ b/graphics/unused/goosuto.png
Binary files differ
diff --git a/graphics/unused/green_frame.bin b/graphics/unused/green_frame.bin
new file mode 100755
index 000000000..b381235d9
--- /dev/null
+++ b/graphics/unused/green_frame.bin
Binary files differ
diff --git a/graphics/unused/line_sketch.png b/graphics/unused/line_sketch.png
new file mode 100755
index 000000000..fdfc8d771
--- /dev/null
+++ b/graphics/unused/line_sketch.png
Binary files differ
diff --git a/graphics/unused/line_sketch_2.bin b/graphics/unused/line_sketch_2.bin
new file mode 100755
index 000000000..e68d116a3
--- /dev/null
+++ b/graphics/unused/line_sketch_2.bin
Binary files differ
diff --git a/graphics/unused/line_sketch_2.png b/graphics/unused/line_sketch_2.png
new file mode 100755
index 000000000..cb70b3d83
--- /dev/null
+++ b/graphics/unused/line_sketch_2.png
Binary files differ
diff --git a/graphics/unused/metronome_hand_small.png b/graphics/unused/metronome_hand_small.png
new file mode 100755
index 000000000..bd6cc8530
--- /dev/null
+++ b/graphics/unused/metronome_hand_small.png
Binary files differ
diff --git a/graphics/unused/music_notes.png b/graphics/unused/music_notes.png
new file mode 100755
index 000000000..af89e55a0
--- /dev/null
+++ b/graphics/unused/music_notes.png
Binary files differ
diff --git a/graphics/unused/old_battle_interface_1.png b/graphics/unused/old_battle_interface_1.png
new file mode 100755
index 000000000..0b2fe5eb7
--- /dev/null
+++ b/graphics/unused/old_battle_interface_1.png
Binary files differ
diff --git a/graphics/unused/old_battle_interface_2.png b/graphics/unused/old_battle_interface_2.png
new file mode 100755
index 000000000..04229ccda
--- /dev/null
+++ b/graphics/unused/old_battle_interface_2.png
Binary files differ
diff --git a/graphics/unused/old_battle_interface_3.png b/graphics/unused/old_battle_interface_3.png
new file mode 100755
index 000000000..428c7765d
--- /dev/null
+++ b/graphics/unused/old_battle_interface_3.png
Binary files differ
diff --git a/graphics/unused/old_battle_interface_tilemap.bin b/graphics/unused/old_battle_interface_tilemap.bin
new file mode 100755
index 000000000..aae3307e7
--- /dev/null
+++ b/graphics/unused/old_battle_interface_tilemap.bin
Binary files differ
diff --git a/graphics/unused/old_beatup.png b/graphics/unused/old_beatup.png
new file mode 100755
index 000000000..e2a0561e2
--- /dev/null
+++ b/graphics/unused/old_beatup.png
Binary files differ
diff --git a/graphics/unused/old_bulbasaur.png b/graphics/unused/old_bulbasaur.png
new file mode 100755
index 000000000..729ebe789
--- /dev/null
+++ b/graphics/unused/old_bulbasaur.png
Binary files differ
diff --git a/graphics/unused/old_bulbasaur2.png b/graphics/unused/old_bulbasaur2.png
new file mode 100755
index 000000000..f374e5a9f
--- /dev/null
+++ b/graphics/unused/old_bulbasaur2.png
Binary files differ
diff --git a/graphics/unused/old_charizard.png b/graphics/unused/old_charizard.png
new file mode 100755
index 000000000..e1470aada
--- /dev/null
+++ b/graphics/unused/old_charizard.png
Binary files differ
diff --git a/graphics/unused/old_charmap.bin b/graphics/unused/old_charmap.bin
new file mode 100755
index 000000000..13d3b873b
--- /dev/null
+++ b/graphics/unused/old_charmap.bin
Binary files differ
diff --git a/graphics/unused/old_charmap.pal b/graphics/unused/old_charmap.pal
new file mode 100755
index 000000000..cbcd5de4d
--- /dev/null
+++ b/graphics/unused/old_charmap.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+255 255 255
+24 0 0
+41 0 0
+255 255 255
+0 0 0
+255 255 255
+255 65 0
+0 0 0
+255 0 0
+255 24 0
+255 65 0
+255 98 0
+255 131 0
+255 180 0
+255 222 0
+255 255 255
diff --git a/graphics/unused/old_charmap.png b/graphics/unused/old_charmap.png
new file mode 100755
index 000000000..b5ea6e803
--- /dev/null
+++ b/graphics/unused/old_charmap.png
Binary files differ
diff --git a/graphics/unused/old_contest.bin b/graphics/unused/old_contest.bin
new file mode 100755
index 000000000..da6f4652e
--- /dev/null
+++ b/graphics/unused/old_contest.bin
Binary files differ
diff --git a/graphics/unused/old_contest.pal b/graphics/unused/old_contest.pal
new file mode 100755
index 000000000..69fde2000
--- /dev/null
+++ b/graphics/unused/old_contest.pal
@@ -0,0 +1,259 @@
+JASC-PAL
+0100
+256
+0 0 0
+255 255 255
+230 230 230
+197 197 197
+148 148 148
+74 65 82
+0 255 0
+0 255 0
+65 74 123
+139 123 131
+82 82 197
+189 82 74
+131 74 98
+74 74 131
+131 139 222
+106 164 164
+0 0 0
+255 255 255
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+222 230 230
+230 230 238
+230 238 238
+238 246 246
+246 246 255
+0 0 0
+255 255 255
+172 172 148
+213 213 189
+230 230 213
+189 189 172
+238 238 222
+197 197 180
+0 0 0
+156 156 131
+197 197 189
+139 139 131
+98 98 98
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+115 106 156
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+148 148 156
+131 139 156
+123 131 156
+131 123 164
+123 115 164
+0 0 0
+115 106 156
+255 255 255
+205 156 255
+172 148 197
+230 222 246
+139 131 172
+213 189 238
+0 0 0
+238 238 230
+189 172 197
+222 213 213
+189 172 189
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 164 131
+213 131 90
+255 189 172
+197 98 74
+74 65 82
+255 255 255
+156 156 156
+0 0 0
+0 0 0
+255 255 255
+148 148 148
+255 123 98
+131 246 90
+255 246 74
+131 148 255
+0 0 0
+164 238 98
+131 205 90
+213 255 148
+98 197 49
+74 65 82
+255 255 255
+156 156 156
+0 0 0
+0 0 0
+255 255 255
+148 148 148
+255 123 98
+131 246 90
+255 246 74
+131 148 255
+0 0 0
+246 246 90
+205 205 65
+255 255 180
+180 180 24
+74 65 82
+255 255 255
+156 156 156
+0 0 0
+0 0 0
+255 255 255
+148 148 148
+255 123 98
+131 246 90
+255 246 74
+131 148 255
+0 0 0
+115 205 255
+115 180 205
+156 238 255
+49 98 148
+74 65 82
+255 255 255
+156 156 156
+0 0 0
+0 0 0
+255 255 255
+148 148 148
+255 123 98
+131 246 90
+255 246 74
+131 148 255
+0 0 0
+0 0 0
+255 255 255
+230 230 213
+0 0 0
+197 197 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+230 230 213
+0 0 0
+197 197 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+230 230 213
+0 0 0
+197 197 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+230 230 213
+0 0 0
+197 197 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+74 65 82
+255 255 255
+222 222 222
+172 172 197
+255 0 0
+0 0 255
+255 255 0
+0 197 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 164 131
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/unused/old_contest_2.bin b/graphics/unused/old_contest_2.bin
new file mode 100755
index 000000000..06836cc19
--- /dev/null
+++ b/graphics/unused/old_contest_2.bin
Binary files differ
diff --git a/graphics/unused/old_contest_2.pal b/graphics/unused/old_contest_2.pal
new file mode 100755
index 000000000..3fb174790
--- /dev/null
+++ b/graphics/unused/old_contest_2.pal
@@ -0,0 +1,259 @@
+JASC-PAL
+0100
+256
+0 0 0
+255 255 255
+230 230 230
+197 197 197
+148 148 148
+74 65 82
+0 255 0
+0 255 0
+65 74 123
+139 123 131
+82 82 197
+189 82 74
+131 74 98
+74 74 131
+131 139 222
+106 164 164
+0 0 0
+115 123 156
+90 65 57
+148 197 106
+123 98 65
+131 123 49
+222 189 148
+164 131 106
+115 164 82
+164 148 57
+90 106 139
+180 172 82
+82 139 49
+255 230 189
+222 131 41
+246 246 222
+205 148 115
+255 106 115
+255 57 57
+156 0 0
+164 222 255
+106 148 255
+49 82 255
+255 255 115
+246 222 65
+230 106 0
+255 255 255
+189 189 197
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+0 0 0
+255 255 115
+246 222 90
+238 189 65
+238 164 41
+230 131 16
+230 106 0
+255 41 0
+255 148 82
+255 255 164
+255 255 255
+189 189 197
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+0 0 0
+255 131 106
+197 24 16
+164 222 255
+106 148 255
+49 82 255
+255 197 255
+255 139 255
+213 0 139
+148 255 164
+65 205 57
+246 222 65
+230 106 0
+255 255 255
+65 74 106
+65 74 106
+197 255 255
+246 246 90
+205 205 65
+255 255 180
+180 180 24
+74 65 82
+255 255 255
+156 156 156
+255 156 156
+0 0 0
+255 255 255
+255 148 148
+255 123 98
+255 0 0
+148 148 148
+0 0 0
+197 255 255
+246 246 90
+205 205 65
+255 255 180
+180 180 24
+74 65 82
+255 255 255
+156 156 156
+255 156 156
+0 0 0
+255 255 255
+255 148 148
+255 123 98
+255 0 0
+148 148 148
+0 0 0
+197 255 255
+246 246 90
+205 205 65
+255 255 180
+180 180 24
+74 65 82
+255 255 255
+156 156 156
+255 156 156
+0 0 0
+255 255 255
+255 148 148
+255 123 98
+255 0 0
+148 148 148
+0 0 0
+197 255 255
+213 255 213
+156 222 148
+222 255 230
+123 189 115
+74 65 82
+255 255 255
+156 156 156
+255 156 156
+0 0 0
+255 255 255
+255 148 148
+255 123 98
+255 0 0
+148 148 148
+0 0 0
+0 172 255
+0 0 0
+255 255 255
+230 230 213
+0 0 0
+197 197 197
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+255 255 255
+197 255 255
+0 0 0
+0 0 0
+0 0 0
+65 0 0
+123 0 0
+189 0 0
+255 8 0
+255 65 0
+255 123 0
+255 189 0
+255 255 0
+255 255 123
+255 255 255
+189 189 197
+131 131 139
+98 98 123
+65 74 106
+41 49 90
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/unused/old_contest_2_1.png b/graphics/unused/old_contest_2_1.png
new file mode 100755
index 000000000..67b81de2d
--- /dev/null
+++ b/graphics/unused/old_contest_2_1.png
Binary files differ
diff --git a/graphics/unused/old_contest_2_2.png b/graphics/unused/old_contest_2_2.png
new file mode 100755
index 000000000..a33a8c324
--- /dev/null
+++ b/graphics/unused/old_contest_2_2.png
Binary files differ
diff --git a/graphics/unused/old_contest_classes.png b/graphics/unused/old_contest_classes.png
new file mode 100755
index 000000000..c2e7b5e29
--- /dev/null
+++ b/graphics/unused/old_contest_classes.png
Binary files differ
diff --git a/graphics/unused/old_contest_floor.png b/graphics/unused/old_contest_floor.png
new file mode 100755
index 000000000..94877b921
--- /dev/null
+++ b/graphics/unused/old_contest_floor.png
Binary files differ
diff --git a/graphics/unused/old_contest_frame_1.png b/graphics/unused/old_contest_frame_1.png
new file mode 100755
index 000000000..28eaae905
--- /dev/null
+++ b/graphics/unused/old_contest_frame_1.png
Binary files differ
diff --git a/graphics/unused/old_contest_frame_2.png b/graphics/unused/old_contest_frame_2.png
new file mode 100755
index 000000000..c8b20408c
--- /dev/null
+++ b/graphics/unused/old_contest_frame_2.png
Binary files differ
diff --git a/graphics/unused/old_contest_meter.png b/graphics/unused/old_contest_meter.png
new file mode 100755
index 000000000..606208b1f
--- /dev/null
+++ b/graphics/unused/old_contest_meter.png
Binary files differ
diff --git a/graphics/unused/old_contest_numbers.png b/graphics/unused/old_contest_numbers.png
new file mode 100755
index 000000000..98c145976
--- /dev/null
+++ b/graphics/unused/old_contest_numbers.png
Binary files differ
diff --git a/graphics/unused/old_contest_symbols.png b/graphics/unused/old_contest_symbols.png
new file mode 100755
index 000000000..87cac733e
--- /dev/null
+++ b/graphics/unused/old_contest_symbols.png
Binary files differ
diff --git a/graphics/unused/old_pal1.pal b/graphics/unused/old_pal1.pal
new file mode 100755
index 000000000..1e2ef9083
--- /dev/null
+++ b/graphics/unused/old_pal1.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+16 139 0
+0 0 0
+148 65 65
+0 0 0
+148 65 32
+16 0 0
+148 65 32
+8 8 0
+148 65 32
+148 8 8
+148 65 65
+24 16 0
+16 139 98
+32 0 0
+0 16 139
+0 0 0
diff --git a/graphics/unused/old_pal2.pal b/graphics/unused/old_pal2.pal
new file mode 100755
index 000000000..3c5e6ad7f
--- /dev/null
+++ b/graphics/unused/old_pal2.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+16 139 0
+0 0 0
+148 65 65
+0 0 0
+148 65 32
+16 0 0
+148 65 32
+8 8 0
+148 65 32
+16 0 0
+148 65 65
+0 0 0
+16 139 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/unused/old_pal3.pal b/graphics/unused/old_pal3.pal
new file mode 100755
index 000000000..d07e21019
--- /dev/null
+++ b/graphics/unused/old_pal3.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+0 0 0
+0 0 0
+0 16 139
+0 0 0
+0 213 98
+32 0 0
+0 213 98
+24 16 0
+0 213 98
+156 8 8
+0 213 98
+24 16 0
+0 213 98
+32 0 0
+0 16 139
+0 0 0
diff --git a/graphics/unused/old_pal4.pal b/graphics/unused/old_pal4.pal
new file mode 100755
index 000000000..60b814f75
--- /dev/null
+++ b/graphics/unused/old_pal4.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+255 255 255
+41 41 57
+90 90 106
+172 172 180
+197 197 205
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
+0 0 0
diff --git a/graphics/unused/old_pal5.pal b/graphics/unused/old_pal5.pal
new file mode 100755
index 000000000..b6f481d46
--- /dev/null
+++ b/graphics/unused/old_pal5.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+98 156 131
+115 115 115
+189 189 189
+255 255 255
+189 164 41
+246 246 41
+222 106 32
+246 131 41
+115 98 246
+98 74 205
+238 115 156
+246 148 246
+115 172 246
+8 8 8
+90 90 90
+65 65 65
diff --git a/graphics/unused/old_pal6.pal b/graphics/unused/old_pal6.pal
new file mode 100755
index 000000000..6d91e9918
--- /dev/null
+++ b/graphics/unused/old_pal6.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+98 156 131
+115 115 115
+189 189 189
+255 255 255
+115 148 74
+156 205 74
+148 246 74
+238 115 156
+246 148 246
+189 164 41
+246 246 41
+8 8 8
+8 8 8
+8 8 8
+90 90 90
+65 65 65
diff --git a/graphics/unused/old_pal7.pal b/graphics/unused/old_pal7.pal
new file mode 100755
index 000000000..d380bc65d
--- /dev/null
+++ b/graphics/unused/old_pal7.pal
@@ -0,0 +1,19 @@
+JASC-PAL
+0100
+16
+98 156 131
+115 115 115
+156 156 156
+255 255 255
+98 115 246
+115 172 246
+164 98 41
+230 172 139
+189 164 41
+246 246 41
+246 98 82
+148 123 205
+197 164 205
+213 41 156
+90 90 90
+65 65 65
diff --git a/graphics/unused/red_frame.bin b/graphics/unused/red_frame.bin
new file mode 100755
index 000000000..5090b1b84
--- /dev/null
+++ b/graphics/unused/red_frame.bin
Binary files differ
diff --git a/graphics/unused/redyellowgreen_frame.bin b/graphics/unused/redyellowgreen_frame.bin
new file mode 100644
index 000000000..6852998fb
--- /dev/null
+++ b/graphics/unused/redyellowgreen_frame.bin
Binary files differ
diff --git a/graphics/unused/shadow.png b/graphics/unused/shadow.png
new file mode 100755
index 000000000..7d090ad3d
--- /dev/null
+++ b/graphics/unused/shadow.png
Binary files differ
diff --git a/graphics/unused/unused_DDCEE4.bin b/graphics/unused/unused_DDCEE4.bin
new file mode 100755
index 000000000..481183cbd
--- /dev/null
+++ b/graphics/unused/unused_DDCEE4.bin
Binary files differ
diff --git a/graphics/unused/water_splash.bin b/graphics/unused/water_splash.bin
new file mode 100755
index 000000000..059347fa7
--- /dev/null
+++ b/graphics/unused/water_splash.bin
Binary files differ
diff --git a/graphics/unused/water_splash.png b/graphics/unused/water_splash.png
new file mode 100755
index 000000000..a8439a050
--- /dev/null
+++ b/graphics/unused/water_splash.png
Binary files differ
diff --git a/graphics/unused/yellow_frame.bin b/graphics/unused/yellow_frame.bin
new file mode 100755
index 000000000..30ba3ed01
--- /dev/null
+++ b/graphics/unused/yellow_frame.bin
Binary files differ
diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk
index fb96dd9ad..78ebad569 100644
--- a/graphics_file_rules.mk
+++ b/graphics_file_rules.mk
@@ -4,8 +4,21 @@ monfrontdir := graphics/pokemon/anim_front_pics
monpaldir := graphics/pokemon/palettes
tilesetdir := data/tilesets
fontdir := data/graphics/fonts
+menudir := graphics/interface
+btanimgfxdir := graphics/battle_anims/sprites
+unusedgfxdir := graphics/unused
+unknowngfxdir := graphics/unknown
+btintgfxdir := graphics/battle_interface
+masksgfxdir := graphics/battle_anims/masks
+bttransgfxdir := graphics/battle_transitions
+typesdir := graphics/types
+raydir := graphics/rayquaza_scene
roulgfxdir := graphics/roulette
-battletransgfxdir := graphics/battle_transitions
+pknvdir := graphics/pokenav/
+pknvoptionsdir := graphics/pokenav/options
+
+types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark
+contest_types := cool beauty cute smart tough
$(monstillfrontdir)/castform_still_front_pic.4bpp: $(monstillfrontdir)/castform_normal_form_still_front_pic.4bpp \
$(monstillfrontdir)/castform_sunny_form_still_front_pic.4bpp \
@@ -295,6 +308,94 @@ graphics/pokenav/region_map.8bpp: %.8bpp: %.png
graphics/misc/japanese_hof.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 29
+$(menudir)/menu.gbapal: $(menudir)/menu_0.gbapal $(menudir)/menu_1.gbapal
+ @cat $(menudir)/menu_0.gbapal $(menudir)/menu_1.gbapal >$@
+
+$(btanimgfxdir)/010.4bpp: $(btanimgfxdir)/010_0.4bpp $(btanimgfxdir)/010_1.4bpp $(btanimgfxdir)/010_2.4bpp $(btanimgfxdir)/010_3.4bpp
+ @cat $(btanimgfxdir)/010_0.4bpp $(btanimgfxdir)/010_1.4bpp $(btanimgfxdir)/010_2.4bpp $(btanimgfxdir)/010_3.4bpp >$@
+
+$(unusedgfxdir)/obi_palpak1.gbapal: $(unusedgfxdir)/old_pal1.gbapal $(unusedgfxdir)/old_pal2.gbapal $(unusedgfxdir)/old_pal3.gbapal
+ @cat $(unusedgfxdir)/old_pal1.gbapal $(unusedgfxdir)/old_pal2.gbapal $(unusedgfxdir)/old_pal3.gbapal >$@
+
+$(unusedgfxdir)/obi_palpak3.gbapal: $(unusedgfxdir)/old_pal5.gbapal $(unusedgfxdir)/old_pal6.gbapal $(unusedgfxdir)/old_pal7.gbapal
+ @cat $(unusedgfxdir)/old_pal5.gbapal $(unusedgfxdir)/old_pal6.gbapal $(unusedgfxdir)/old_pal7.gbapal >$@
+
+$(unusedgfxdir)/obi1.4bpp: $(unusedgfxdir)/old_bulbasaur.4bpp $(unusedgfxdir)/old_charizard.4bpp
+ @cat $(unusedgfxdir)/old_bulbasaur.4bpp $(unusedgfxdir)/old_charizard.4bpp >$@
+
+$(unusedgfxdir)/obi2.4bpp: $(unusedgfxdir)/old_bulbasaur2.4bpp $(unusedgfxdir)/old_battle_interface_1.4bpp $(unusedgfxdir)/old_battle_interface_2.4bpp $(unusedgfxdir)/old_battle_interface_3.4bpp
+ @cat $(unusedgfxdir)/old_bulbasaur2.4bpp $(unusedgfxdir)/old_battle_interface_1.4bpp $(unusedgfxdir)/old_battle_interface_2.4bpp $(unusedgfxdir)/old_battle_interface_3.4bpp >$@
+
+$(menudir)/hp_numbers.4bpp: $(menudir)/hpbar_anim.4bpp $(menudir)/numbers1.4bpp $(menudir)/numbers2.4bpp
+ @cat $(menudir)/hpbar_anim.4bpp $(menudir)/numbers1.4bpp $(menudir)/numbers2.4bpp >$@
+
+$(unusedgfxdir)/redyellowgreen_frame.bin: $(unusedgfxdir)/red_frame.bin $(unusedgfxdir)/yellow_frame.bin $(unusedgfxdir)/green_frame.bin $(unusedgfxdir)/blank_frame.bin
+ @cat $(unusedgfxdir)/red_frame.bin $(unusedgfxdir)/yellow_frame.bin $(unusedgfxdir)/green_frame.bin $(unusedgfxdir)/blank_frame.bin >$@
+
+$(unusedgfxdir)/color_frames.4bpp: $(unusedgfxdir)/color_frames.png
+ $(GFX) $< $@ -num_tiles 353
+
+$(btintgfxdir)/unused_window2bar.4bpp: $(btintgfxdir)/unused_window2bar.png
+ $(GFX) $< $@ -num_tiles 5
+
+$(unusedgfxdir)/old_contest.4bpp: $(unusedgfxdir)/old_contest_frame_1.4bpp $(unusedgfxdir)/old_contest_floor.4bpp $(unusedgfxdir)/old_contest_frame_2.4bpp $(unusedgfxdir)/old_contest_symbols.4bpp $(unusedgfxdir)/old_contest_meter.4bpp $(unusedgfxdir)/old_contest_classes.4bpp $(unusedgfxdir)/old_contest_numbers.4bpp
+ @cat $(unusedgfxdir)/old_contest_frame_1.4bpp $(unusedgfxdir)/old_contest_floor.4bpp $(unusedgfxdir)/old_contest_frame_2.4bpp $(unusedgfxdir)/old_contest_symbols.4bpp $(unusedgfxdir)/old_contest_meter.4bpp $(unusedgfxdir)/old_contest_classes.4bpp $(unusedgfxdir)/old_contest_numbers.4bpp >$@
+
+$(unusedgfxdir)/old_contest_2.4bpp: $(unusedgfxdir)/old_contest_2_1.4bpp $(unusedgfxdir)/old_contest_2_2.4bpp
+ @cat $(unusedgfxdir)/old_contest_2_1.4bpp $(unusedgfxdir)/old_contest_2_2.4bpp >$@
+
+$(unknowngfxdir)/unknown_C19470.4bpp: $(unknowngfxdir)/unknown_C19470.png
+ $(GFX) $< $@ -num_tiles 36
+
+$(btanimgfxdir)/141.4bpp: $(btanimgfxdir)/141_0.4bpp $(btanimgfxdir)/141_1.4bpp $(btanimgfxdir)/141_2.4bpp $(btanimgfxdir)/141_3.4bpp $(btanimgfxdir)/141_4.4bpp
+ @cat $(btanimgfxdir)/141_0.4bpp $(btanimgfxdir)/141_1.4bpp $(btanimgfxdir)/141_2.4bpp $(btanimgfxdir)/141_3.4bpp $(btanimgfxdir)/141_4.4bpp >$@
+
+$(btanimgfxdir)/074.4bpp: $(btanimgfxdir)/074_0.4bpp $(btanimgfxdir)/074_1.4bpp
+ @cat $(btanimgfxdir)/074_0.4bpp $(btanimgfxdir)/074_1.4bpp >$@
+
+$(btanimgfxdir)/159.4bpp: $(btanimgfxdir)/159_0.4bpp $(btanimgfxdir)/159_1.4bpp
+ @cat $(btanimgfxdir)/159_0.4bpp $(btanimgfxdir)/159_1.4bpp >$@
+
+$(btanimgfxdir)/001.4bpp: $(btanimgfxdir)/001_0.4bpp $(btanimgfxdir)/001_1.4bpp
+ @cat $(btanimgfxdir)/001_0.4bpp $(btanimgfxdir)/001_1.4bpp >$@
+
+$(masksgfxdir)/unknown_C2EA50.4bpp: $(masksgfxdir)/unknown_C2EA50.png
+ $(GFX) $< $@ -num_tiles 14
+
+$(bttransgfxdir)/vs_frame.4bpp: $(bttransgfxdir)/vs_frame.png
+ $(GFX) $< $@ -num_tiles 16
+
+$(menudir)/party_menu_misc.4bpp: $(menudir)/party_menu_misc.png
+ $(GFX) $< $@ -num_tiles 62
+
+$(typesdir)/move_types.4bpp: $(types:%=$(typesdir)/%.4bpp) $(contest_types:%=$(typesdir)/contest_%.4bpp)
+ @cat $^ >$@
+
+$(typesdir)/move_types.gbapal: $(typesdir)/move_types_1.gbapal $(typesdir)/move_types_2.gbapal $(typesdir)/move_types_3.gbapal
+ @cat $(typesdir)/move_types_1.gbapal $(typesdir)/move_types_2.gbapal $(typesdir)/move_types_3.gbapal >$@
+
+$(menudir)/bag_screen.4bpp: $(menudir)/bag_screen.png
+ $(GFX) $< $@ -num_tiles 53
+
+$(raydir)/rayquaza.8bpp: $(raydir)/rayquaza.png
+ $(GFX) $< $@ -num_tiles 227
+
+$(raydir)/overcast.4bpp: $(raydir)/overcast.png
+ $(GFX) $< $@ -num_tiles 313
+
+$(raydir)/rayquaza_fly1.4bpp: $(raydir)/rayquaza_fly1.png
+ $(GFX) $< $@ -num_tiles 124
+
+$(raydir)/rayquaza_tail_fix.4bpp: $(raydir)/rayquaza_tail.4bpp
+ cp $< $@
+ head -c 12 /dev/zero >> $@
+
+$(raydir)/chase_streaks.4bpp: $(raydir)/chase_streaks.png
+ $(GFX) $< $@ -num_tiles 19
+
+$(raydir)/rayquaza_chase.4bpp: $(raydir)/rayquaza_chase.png
+ $(GFX) $< $@ -num_tiles 155
+
graphics/picture_frame/frame5.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 86
@@ -304,21 +405,26 @@ $(roulgfxdir)/roulette_tilt.4bpp: $(roulgfxdir)/shroomish.4bpp $(roulgfxdir)/tai
$(roulgfxdir)/poke_icons2.4bpp: $(roulgfxdir)/wynaut.4bpp $(roulgfxdir)/azurill.4bpp $(roulgfxdir)/skitty.4bpp $(roulgfxdir)/makuhita.4bpp
@cat $^ >$@
-$(battletransgfxdir)/85BBC14.4bpp: %.4bpp: %.png
+$(bttransgfxdir)/85BBC14.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 53
-$(battletransgfxdir)/rayquaza.4bpp: %.4bpp: %.png
+$(bttransgfxdir)/rayquaza.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 938
-$(battletransgfxdir)/frontier_square_1.4bpp: $(battletransgfxdir)/frontier_squares_blanktiles.4bpp $(battletransgfxdir)/frontier_squares_1.4bpp
+$(bttransgfxdir)/frontier_square_1.4bpp: $(bttransgfxdir)/frontier_squares_blanktiles.4bpp $(bttransgfxdir)/frontier_squares_1.4bpp
@cat $^ >$@
-$(battletransgfxdir)/frontier_square_2.4bpp: $(battletransgfxdir)/frontier_squares_blanktiles.4bpp $(battletransgfxdir)/frontier_squares_2.4bpp
+$(bttransgfxdir)/frontier_square_2.4bpp: $(bttransgfxdir)/frontier_squares_blanktiles.4bpp $(bttransgfxdir)/frontier_squares_2.4bpp
@cat $^ >$@
-$(battletransgfxdir)/frontier_square_3.4bpp: $(battletransgfxdir)/frontier_squares_blanktiles.4bpp $(battletransgfxdir)/frontier_squares_3.4bpp
+$(bttransgfxdir)/frontier_square_3.4bpp: $(bttransgfxdir)/frontier_squares_blanktiles.4bpp $(bttransgfxdir)/frontier_squares_3.4bpp
+ @cat $^ >$@
+
+$(bttransgfxdir)/frontier_square_4.4bpp: $(bttransgfxdir)/frontier_squares_blanktiles.4bpp $(bttransgfxdir)/frontier_squares_4.4bpp
@cat $^ >$@
-$(battletransgfxdir)/frontier_square_4.4bpp: $(battletransgfxdir)/frontier_squares_blanktiles.4bpp $(battletransgfxdir)/frontier_squares_4.4bpp
+$(pknvoptionsdir)/options.4bpp: $(pknvoptionsdir)/hoenn_map.4bpp $(pknvoptionsdir)/condition.4bpp $(pknvoptionsdir)/match_call.4bpp $(pknvoptionsdir)/ribbons.4bpp $(pknvoptionsdir)/switch_off.4bpp $(pknvoptionsdir)/party.4bpp $(pknvoptionsdir)/search.4bpp $(pknvoptionsdir)/cool.4bpp $(pknvoptionsdir)/beauty.4bpp $(pknvoptionsdir)/cute.4bpp $(pknvoptionsdir)/smart.4bpp $(pknvoptionsdir)/tough.4bpp $(pknvoptionsdir)/cancel.4bpp
@cat $^ >$@
+$(pknvdir)/header.4bpp: $(pknvdir)/header.png
+ $(GFX) $< $@ -num_tiles 53
diff --git a/include/battle.h b/include/battle.h
index 602d3eb53..4fd252676 100644
--- a/include/battle.h
+++ b/include/battle.h
@@ -778,52 +778,6 @@ extern struct BattleStruct* gBattleStruct;
#define MOVE_EFFECT_AFFECTS_USER 0x40
#define MOVE_EFFECT_CERTAIN 0x80
-// table ids for general animations
-#define B_ANIM_CASTFORM_CHANGE 0x0
-#define B_ANIM_STATS_CHANGE 0x1
-#define B_ANIM_SUBSTITUTE_FADE 0x2
-#define B_ANIM_SUBSTITUTE_APPEAR 0x3
-#define B_ANIM_x4 0x4
-#define B_ANIM_ITEM_KNOCKOFF 0x5
-#define B_ANIM_TURN_TRAP 0x6
-#define B_ANIM_ITEM_EFFECT 0x7
-#define B_ANIM_SMOKEBALL_ESCAPE 0x8
-#define B_ANIM_HANGED_ON 0x9
-#define B_ANIM_RAIN_CONTINUES 0xA
-#define B_ANIM_SUN_CONTINUES 0xB
-#define B_ANIM_SANDSTORM_CONTINUES 0xC
-#define B_ANIM_HAIL_CONTINUES 0xD
-#define B_ANIM_LEECH_SEED_DRAIN 0xE
-#define B_ANIM_MON_HIT 0xF
-#define B_ANIM_ITEM_STEAL 0x10
-#define B_ANIM_SNATCH_MOVE 0x11
-#define B_ANIM_FUTURE_SIGHT_HIT 0x12
-#define B_ANIM_DOOM_DESIRE_HIT 0x13
-#define B_ANIM_x14 0x14
-#define B_ANIM_INGRAIN_HEAL 0x15
-#define B_ANIM_WISH_HEAL 0x16
-
-// special animations table
-#define B_ANIM_LVL_UP 0x0
-#define B_ANIM_SWITCH_OUT_PLAYER_MON 0x1
-#define B_ANIM_SWITCH_OUT_OPPONENT_MON 0x2
-#define B_ANIM_BALL_THROW 0x3
-#define B_ANIM_SAFARI_BALL_THROW 0x4
-#define B_ANIM_SUBSTITUTE_TO_MON 0x5
-#define B_ANIM_MON_TO_SUBSTITUTE 0x6
-
-// status animation table
-#define B_ANIM_STATUS_PSN 0x0
-#define B_ANIM_STATUS_CONFUSION 0x1
-#define B_ANIM_STATUS_BRN 0x2
-#define B_ANIM_STATUS_INFATUATION 0x3
-#define B_ANIM_STATUS_SLP 0x4
-#define B_ANIM_STATUS_PRZ 0x5
-#define B_ANIM_STATUS_FRZ 0x6
-#define B_ANIM_STATUS_CURSED 0x7
-#define B_ANIM_STATUS_NIGHTMARE 0x8
-#define B_ANIM_STATUS_WRAPPED 0x9
-
#define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8
#define GET_STAT_BUFF_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40
#define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit
diff --git a/include/battle_anim.h b/include/battle_anim.h
index 9fb7ccd53..4046f7051 100644
--- a/include/battle_anim.h
+++ b/include/battle_anim.h
@@ -3,14 +3,6 @@
enum
{
- ANIM_BANK_ATTACKER,
- ANIM_BANK_TARGET,
- ANIM_BANK_ATK_PARTNER,
- ANIM_BANK_DEF_PARTNER,
-};
-
-enum
-{
BG_ANIM_SCREEN_SIZE,
BG_ANIM_AREA_OVERFLOW_MODE,
BG_ANIM2,
diff --git a/include/bike.h b/include/bike.h
new file mode 100644
index 000000000..e625ad438
--- /dev/null
+++ b/include/bike.h
@@ -0,0 +1,78 @@
+#ifndef GUARD_BIKE_H
+#define GUARD_BIKE_H
+
+// the struct below is used for checking button combinations of the last input so that the acro can potentially perform a side/turn jump.
+// its possible that at some point Game Freak intended for the acro bike to have more complex tricks: but only the acro jump combinations can be seen in the final ROM.
+struct BikeHistoryInputInfo
+{
+ u32 dirHistoryMatch; // the direction you need to press
+ u32 abStartSelectHistoryMatch; // the button you need to press
+ u32 dirHistoryMask; // mask applied so that way only the recent nybble (the recent input) is checked
+ u32 abStartSelectHistoryMask; // mask applied so that way only the recent nybble (the recent input) is checked
+ const u8 *dirTimerHistoryList; // list of timers to check for direction before the button+dir combination can be verified.
+ const u8 *abStartSelectHistoryList; // list of timers to check for buttons before the button+dir combination can be verified.
+ u32 direction; // direction to jump
+};
+
+// Player speeds
+enum
+{
+ SPEED_STANDING,
+ SPEED_NORMAL,
+ SPEED_FAST,
+ SPEED_FASTER,
+ SPEED_FASTEST,
+};
+
+// mach bike transitions enum
+enum
+{
+ MACH_TRANS_FACE_DIRECTION,
+ MACH_TRANS_TURN_DIRECTION,
+ MACH_TRANS_KEEP_MOVING,
+ MACH_TRANS_START_MOVING
+};
+
+// Acro bike states
+enum
+{
+ ACRO_STATE_NORMAL,
+ ACRO_STATE_TURNING,
+ ACRO_STATE_WHEELIE_STANDING,
+ ACRO_STATE_BUNNY_HOP,
+ ACRO_STATE_WHEELIE_MOVING,
+ ACRO_STATE_SIDE_JUMP,
+ ACRO_STATE_TURN_JUMP,
+};
+
+// Acro bike transitions
+enum
+{
+ ACRO_TRANS_FACE_DIRECTION,
+ ACRO_TRANS_TURN_DIRECTION,
+ ACRO_TRANS_MOVING,
+ ACRO_TRANS_NORMAL_TO_WHEELIE,
+ ACRO_TRANS_WHEELIE_TO_NORMAL,
+ ACRO_TRANS_WHEELIE_IDLE,
+ ACRO_TRANS_WHEELIE_HOPPING_STANDING,
+ ACRO_TRANS_WHEELIE_HOPPING_MOVING,
+ ACRO_TRANS_SIDE_JUMP,
+ ACRO_TRANS_TURN_JUMP,
+ ACRO_TRANS_WHEELIE_MOVING,
+ ACRO_TRANS_WHEELIE_RISING_MOVING,
+ ACRO_TRANS_WHEELIE_LOWERING_MOVING,
+};
+
+void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys);
+void Bike_TryAcroBikeHistoryUpdate(u16 newKeys, u16 heldKeys);
+bool8 RS_IsRunningDisallowed(u8 tile);
+bool8 IsBikingDisallowedByPlayer(void);
+bool8 player_should_look_direction_be_enforced_upon_movement(void);
+void GetOnOffBike(u8 transitionFlags);
+void BikeClearState(int newDirHistory, int newAbStartHistory);
+void Bike_UpdateBikeCounterSpeed(u8 counter);
+s16 GetPlayerSpeed(void);
+void Bike_HandleBumpySlopeJump(void);
+bool32 IsRunningDisallowed(u8 metatile);
+
+#endif // GUARD_BIKE_H
diff --git a/include/constants/battle_ai.h b/include/constants/battle_ai.h
new file mode 100644
index 000000000..9d89d75f0
--- /dev/null
+++ b/include/constants/battle_ai.h
@@ -0,0 +1,52 @@
+#ifndef GUARD_BATTLE_AI_H
+#define GUARD_BATTLE_AI_H
+
+// banks enum
+#define AI_TARGET 0
+#define AI_USER 1
+#define AI_TARGET_PARTNER 2
+#define AI_USER_PARTNER 3
+
+// get_type command
+#define AI_TYPE1_TARGET 0
+#define AI_TYPE1_USER 1
+#define AI_TYPE2_TARGET 2
+#define AI_TYPE2_USER 3
+#define AI_TYPE_MOVE 4
+
+// type effectiveness
+#define AI_EFFECTIVENESS_x4 160
+#define AI_EFFECTIVENESS_x2 80
+#define AI_EFFECTIVENESS_x1 40
+#define AI_EFFECTIVENESS_x0_5 20
+#define AI_EFFECTIVENESS_x0_25 10
+#define AI_EFFECTIVENESS_x0 0
+
+// ai weather enum
+#define AI_WEATHER_SUN 0
+#define AI_WEATHER_RAIN 1
+#define AI_WEATHER_SANDSTORM 2
+#define AI_WEATHER_HAIL 3
+
+// get_how_powerful_move_is
+#define MOVE_POWER_DISCOURAGED 0
+#define MOVE_NOT_MOST_POWERFUL 1
+#define MOVE_MOST_POWERFUL 2
+
+// script's table id to bit
+#define AI_SCRIPT_CHECK_BAD_MOVE (1 << 0)
+#define AI_SCRIPT_CHECK_VIABILITY (1 << 1)
+#define AI_SCRIPT_TRY_TO_FAINT (1 << 2)
+#define AI_SCRIPT_SETUP_FIRST_TURN (1 << 3)
+#define AI_SCRIPT_RISKY (1 << 4)
+#define AI_SCRIPT_PREFER_STRONGEST_MOVE (1 << 5)
+#define AI_SCRIPT_PREFER_BATON_PASS (1 << 6)
+#define AI_SCRIPT_DOUBLE_BATTLE (1 << 7)
+#define AI_SCRIPT_HP_AWARE (1 << 8)
+#define AI_SCRIPT_UNKNOWN (1 << 9)
+// 10 - 28 are not used
+#define AI_SCRIPT_ROAMING (1 << 29)
+#define AI_SCRIPT_SAFARI (1 << 30)
+#define AI_SCRIPT_FIRST_BATTLE (1 << 31)
+
+#endif // GUARD_BATTLE_AI_H
diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h
new file mode 100644
index 000000000..de2fbebb1
--- /dev/null
+++ b/include/constants/battle_anim.h
@@ -0,0 +1,85 @@
+#ifndef GUARD_CONSTANTS_BATTLE_ANIM_H
+#define GUARD_CONSTANTS_BATTLE_ANIM_H
+
+// banks enum used in scripts
+#define ANIM_ATTACKER 0
+#define ANIM_TARGET 1
+#define ANIM_ATK_PARTNER 2
+#define ANIM_DEF_PARTNER 3
+
+// move background ids
+#define BG_DARK_ 0 // the same as BG_DARK but is unused
+#define BG_DARK 1
+#define BG_GHOST 2
+#define BG_PSYCHIC 3
+#define BG_IMPACT_OPPONENT 4
+#define BG_IMPACT_PLAYER 5
+#define BG_IMPACT_CONTESTS 6
+#define BG_DRILL 7
+#define BG_DRILL_CONTESTS 8
+#define BG_HIGHSPEED_OPPONENT 9
+#define BG_HIGHSPEED_PLAYER 10
+#define BG_THUNDER 11
+#define BG_GUILLOTINE_OPPONENT 12
+#define BG_GUILLOTINE_PLAYER 13
+#define BG_GUILLOTINE_CONTESTS 14
+#define BG_ICE 15
+#define BG_COSMIC 16
+#define BG_SEISMICTOSS_SKUUPPERCUT 17
+#define BG_FLYING 18
+#define BG_FLYING_CONTESTS 19
+#define BG_AURORABEAM 20
+#define BG_FISSURE 21
+#define BG_BUG_OPPONENT 22
+#define BG_BUG_PLAYER 23
+#define BG_SOLARBEAM_OPPONENT 24
+#define BG_SOLARBEAM_PLAYER 25
+#define BG_SOLARBEAM_CONTESTS 26
+
+// table ids for general animations
+#define B_ANIM_CASTFORM_CHANGE 0x0
+#define B_ANIM_STATS_CHANGE 0x1
+#define B_ANIM_SUBSTITUTE_FADE 0x2
+#define B_ANIM_SUBSTITUTE_APPEAR 0x3
+#define B_ANIM_x4 0x4
+#define B_ANIM_ITEM_KNOCKOFF 0x5
+#define B_ANIM_TURN_TRAP 0x6
+#define B_ANIM_ITEM_EFFECT 0x7
+#define B_ANIM_SMOKEBALL_ESCAPE 0x8
+#define B_ANIM_HANGED_ON 0x9
+#define B_ANIM_RAIN_CONTINUES 0xA
+#define B_ANIM_SUN_CONTINUES 0xB
+#define B_ANIM_SANDSTORM_CONTINUES 0xC
+#define B_ANIM_HAIL_CONTINUES 0xD
+#define B_ANIM_LEECH_SEED_DRAIN 0xE
+#define B_ANIM_MON_HIT 0xF
+#define B_ANIM_ITEM_STEAL 0x10
+#define B_ANIM_SNATCH_MOVE 0x11
+#define B_ANIM_FUTURE_SIGHT_HIT 0x12
+#define B_ANIM_DOOM_DESIRE_HIT 0x13
+#define B_ANIM_x14 0x14
+#define B_ANIM_INGRAIN_HEAL 0x15
+#define B_ANIM_WISH_HEAL 0x16
+
+// special animations table
+#define B_ANIM_LVL_UP 0x0
+#define B_ANIM_SWITCH_OUT_PLAYER_MON 0x1
+#define B_ANIM_SWITCH_OUT_OPPONENT_MON 0x2
+#define B_ANIM_BALL_THROW 0x3
+#define B_ANIM_SAFARI_BALL_THROW 0x4
+#define B_ANIM_SUBSTITUTE_TO_MON 0x5
+#define B_ANIM_MON_TO_SUBSTITUTE 0x6
+
+// status animation table
+#define B_ANIM_STATUS_PSN 0x0
+#define B_ANIM_STATUS_CONFUSION 0x1
+#define B_ANIM_STATUS_BRN 0x2
+#define B_ANIM_STATUS_INFATUATION 0x3
+#define B_ANIM_STATUS_SLP 0x4
+#define B_ANIM_STATUS_PRZ 0x5
+#define B_ANIM_STATUS_FRZ 0x6
+#define B_ANIM_STATUS_CURSED 0x7
+#define B_ANIM_STATUS_NIGHTMARE 0x8
+#define B_ANIM_STATUS_WRAPPED 0x9 // does not actually exist
+
+#endif // GUARD_CONSTANTS_BATTLE_ANIM_H
diff --git a/include/constants/opponents.h b/include/constants/opponents.h
new file mode 100644
index 000000000..680a63763
--- /dev/null
+++ b/include/constants/opponents.h
@@ -0,0 +1,860 @@
+#ifndef GUARD_CONSTANTS_OPPONENTS_H
+#define GUARD_CONSTANTS_OPPONENTS_H
+
+#define OPPONENT_NONE 0
+#define OPPONENT_SAWYER_1 1
+#define OPPONENT_GRUNT_1 2
+#define OPPONENT_GRUNT_2 3
+#define OPPONENT_GRUNT_3 4
+#define OPPONENT_GRUNT_4 5
+#define OPPONENT_GRUNT_5 6
+#define OPPONENT_GRUNT_6 7
+#define OPPONENT_GRUNT_7 8
+#define OPPONENT_GABRIELLE_1 9
+#define OPPONENT_GRUNT_8 10
+#define OPPONENT_MARCEL 11
+#define OPPONENT_ALBERTO 12
+#define OPPONENT_ED 13
+#define OPPONENT_GRUNT_9 14
+#define OPPONENT_DECLAN 15
+#define OPPONENT_GRUNT_10 16
+#define OPPONENT_GRUNT_11 17
+#define OPPONENT_GRUNT_12 18
+#define OPPONENT_GRUNT_13 19
+#define OPPONENT_GRUNT_14 20
+#define OPPONENT_GRUNT_15 21
+#define OPPONENT_GRUNT_16 22
+#define OPPONENT_GRUNT_17 23
+#define OPPONENT_GRUNT_18 24
+#define OPPONENT_GRUNT_19 25
+#define OPPONENT_GRUNT_20 26
+#define OPPONENT_GRUNT_21 27
+#define OPPONENT_GRUNT_22 28
+#define OPPONENT_FREDRICK 29
+#define OPPONENT_MATT_1 30
+#define OPPONENT_ZANDER 31
+#define OPPONENT_SHELLY_1 32
+#define OPPONENT_SHELLY_2 33
+#define OPPONENT_ARCHIE 34
+#define OPPONENT_LEAH 35
+#define OPPONENT_DAISY 36
+#define OPPONENT_ROSE_1 37
+#define OPPONENT_FELIX 38
+#define OPPONENT_VIOLET 39
+#define OPPONENT_ROSE_2 40
+#define OPPONENT_ROSE_3 41
+#define OPPONENT_ROSE_4 42
+#define OPPONENT_ROSE_5 43
+#define OPPONENT_DUSTY_1 44
+#define OPPONENT_CHIP 45
+#define OPPONENT_FOSTER 46
+#define OPPONENT_DUSTY_2 47
+#define OPPONENT_DUSTY_3 48
+#define OPPONENT_DUSTY_4 49
+#define OPPONENT_DUSTY_5 50
+#define OPPONENT_GABBY_AND_TY_1 51
+#define OPPONENT_GABBY_AND_TY_2 52
+#define OPPONENT_GABBY_AND_TY_3 53
+#define OPPONENT_GABBY_AND_TY_4 54
+#define OPPONENT_GABBY_AND_TY_5 55
+#define OPPONENT_GABBY_AND_TY_6 56
+#define OPPONENT_LOLA_1 57
+#define OPPONENT_AUSTINA 58
+#define OPPONENT_GWEN 59
+#define OPPONENT_LOLA_2 60
+#define OPPONENT_LOLA_3 61
+#define OPPONENT_LOLA_4 62
+#define OPPONENT_LOLA_5 63
+#define OPPONENT_RICKY_1 64
+#define OPPONENT_SIMON 65
+#define OPPONENT_CHARLIE 66
+#define OPPONENT_RICKY_2 67
+#define OPPONENT_RICKY_3 68
+#define OPPONENT_RICKY_4 69
+#define OPPONENT_RICKY_5 70
+#define OPPONENT_RANDALL 71
+#define OPPONENT_PARKER 72
+#define OPPONENT_GEORGE 73
+#define OPPONENT_BERKE 74
+#define OPPONENT_BRAXTON 75
+#define OPPONENT_VINCENT 76
+#define OPPONENT_LEROY 77
+#define OPPONENT_WILTON_1 78
+#define OPPONENT_EDGAR 79
+#define OPPONENT_ALBERT 80
+#define OPPONENT_SAMUEL 81
+#define OPPONENT_VITO 82
+#define OPPONENT_OWEN 83
+#define OPPONENT_WILTON_2 84
+#define OPPONENT_WILTON_3 85
+#define OPPONENT_WILTON_4 86
+#define OPPONENT_WILTON_5 87
+#define OPPONENT_WARREN 88
+#define OPPONENT_MARY 89
+#define OPPONENT_ALEXIA 90
+#define OPPONENT_JODY 91
+#define OPPONENT_WENDY 92
+#define OPPONENT_KEIRA 93
+#define OPPONENT_BROOKE_1 94
+#define OPPONENT_JENNIFER 95
+#define OPPONENT_HOPE 96
+#define OPPONENT_SHANNON 97
+#define OPPONENT_MICHELLE 98
+#define OPPONENT_CAROLINE 99
+#define OPPONENT_JULIE 100
+#define OPPONENT_BROOKE_2 101
+#define OPPONENT_BROOKE_3 102
+#define OPPONENT_BROOKE_4 103
+#define OPPONENT_BROOKE_5 104
+#define OPPONENT_PATRICIA 105
+#define OPPONENT_KINDRA 106
+#define OPPONENT_TAMMY 107
+#define OPPONENT_VALERIE_1 108
+#define OPPONENT_TASHA 109
+#define OPPONENT_VALERIE_2 110
+#define OPPONENT_VALERIE_3 111
+#define OPPONENT_VALERIE_4 112
+#define OPPONENT_VALERIE_5 113
+#define OPPONENT_CINDY_1 114
+#define OPPONENT_DAPHNE 115
+#define OPPONENT_GRUNT_23 116
+#define OPPONENT_CINDY_2 117
+#define OPPONENT_BRIANNA 118
+#define OPPONENT_NAOMI 119
+#define OPPONENT_CINDY_3 120
+#define OPPONENT_CINDY_4 121
+#define OPPONENT_CINDY_5 122
+#define OPPONENT_CINDY_6 123
+#define OPPONENT_MELISSA 124
+#define OPPONENT_SHEILA 125
+#define OPPONENT_SHIRLEY 126
+#define OPPONENT_JESSICA_1 127
+#define OPPONENT_CONNIE 128
+#define OPPONENT_BRIDGET 129
+#define OPPONENT_OLIVIA 130
+#define OPPONENT_TIFFANY 131
+#define OPPONENT_JESSICA_2 132
+#define OPPONENT_JESSICA_3 133
+#define OPPONENT_JESSICA_4 134
+#define OPPONENT_JESSICA_5 135
+#define OPPONENT_WINSTON_1 136
+#define OPPONENT_MOLLIE 137
+#define OPPONENT_GARRET 138
+#define OPPONENT_WINSTON_2 139
+#define OPPONENT_WINSTON_3 140
+#define OPPONENT_WINSTON_4 141
+#define OPPONENT_WINSTON_5 142
+#define OPPONENT_STEVE_1 143
+#define OPPONENT_THALIA_1 144
+#define OPPONENT_MARK 145
+#define OPPONENT_GRUNT_24 146
+#define OPPONENT_STEVE_2 147
+#define OPPONENT_STEVE_3 148
+#define OPPONENT_STEVE_4 149
+#define OPPONENT_STEVE_5 150
+#define OPPONENT_LUIS 151
+#define OPPONENT_DOMINIK 152
+#define OPPONENT_DOUGLAS 153
+#define OPPONENT_DARRIN 154
+#define OPPONENT_TONY_1 155
+#define OPPONENT_JEROME 156
+#define OPPONENT_MATTHEW 157
+#define OPPONENT_DAVID 158
+#define OPPONENT_SPENCER 159
+#define OPPONENT_ROLAND 160
+#define OPPONENT_NOLEN 161
+#define OPPONENT_STAN 162
+#define OPPONENT_BARRY 163
+#define OPPONENT_DEAN 164
+#define OPPONENT_RODNEY 165
+#define OPPONENT_RICHARD 166
+#define OPPONENT_HERMAN 167
+#define OPPONENT_SANTIAGO 168
+#define OPPONENT_GILBERT 169
+#define OPPONENT_FRANKLIN 170
+#define OPPONENT_KEVIN 171
+#define OPPONENT_JACK 172
+#define OPPONENT_DUDLEY 173
+#define OPPONENT_CHAD 174
+#define OPPONENT_TONY_2 175
+#define OPPONENT_TONY_3 176
+#define OPPONENT_TONY_4 177
+#define OPPONENT_TONY_5 178
+#define OPPONENT_TAKAO 179
+#define OPPONENT_HITOSHI 180
+#define OPPONENT_KIYO 181
+#define OPPONENT_KOICHI 182
+#define OPPONENT_NOB_1 183
+#define OPPONENT_NOB_2 184
+#define OPPONENT_NOB_3 185
+#define OPPONENT_NOB_4 186
+#define OPPONENT_NOB_5 187
+#define OPPONENT_YUJI 188
+#define OPPONENT_DAISUKE 189
+#define OPPONENT_ATSUSHI 190
+#define OPPONENT_KIRK 191
+#define OPPONENT_GRUNT_25 192
+#define OPPONENT_GRUNT_26 193
+#define OPPONENT_SHAWN 194
+#define OPPONENT_FERNANDO_1 195
+#define OPPONENT_DALTON_1 196
+#define OPPONENT_DALTON_2 197
+#define OPPONENT_DALTON_3 198
+#define OPPONENT_DALTON_4 199
+#define OPPONENT_DALTON_5 200
+#define OPPONENT_COLE 201
+#define OPPONENT_JEFF 202
+#define OPPONENT_AXLE 203
+#define OPPONENT_JACE 204
+#define OPPONENT_KEEGAN 205
+#define OPPONENT_BERNIE_1 206
+#define OPPONENT_BERNIE_2 207
+#define OPPONENT_BERNIE_3 208
+#define OPPONENT_BERNIE_4 209
+#define OPPONENT_BERNIE_5 210
+#define OPPONENT_DREW 211
+#define OPPONENT_BEAU 212
+#define OPPONENT_LARRY 213
+#define OPPONENT_SHANE 214
+#define OPPONENT_JUSTIN 215
+#define OPPONENT_ETHAN_1 216
+#define OPPONENT_AUTUMN 217
+#define OPPONENT_TRAVIS 218
+#define OPPONENT_ETHAN_2 219
+#define OPPONENT_ETHAN_3 220
+#define OPPONENT_ETHAN_4 221
+#define OPPONENT_ETHAN_5 222
+#define OPPONENT_BRENT 223
+#define OPPONENT_DONALD 224
+#define OPPONENT_TAYLOR 225
+#define OPPONENT_JEFFREY_1 226
+#define OPPONENT_DEREK 227
+#define OPPONENT_JEFFREY_2 228
+#define OPPONENT_JEFFREY_3 229
+#define OPPONENT_JEFFREY_4 230
+#define OPPONENT_JEFFREY_5 231
+#define OPPONENT_EDWARD 232
+#define OPPONENT_PRESTON 233
+#define OPPONENT_VIRGIL 234
+#define OPPONENT_BLAKE 235
+#define OPPONENT_WILLIAM 236
+#define OPPONENT_JOSHUA 237
+#define OPPONENT_CAMERON_1 238
+#define OPPONENT_CAMERON_2 239
+#define OPPONENT_CAMERON_3 240
+#define OPPONENT_CAMERON_4 241
+#define OPPONENT_CAMERON_5 242
+#define OPPONENT_JACLYN 243
+#define OPPONENT_HANNAH 244
+#define OPPONENT_SAMANTHA 245
+#define OPPONENT_MAURA 246
+#define OPPONENT_KAYLA 247
+#define OPPONENT_ALEXIS 248
+#define OPPONENT_JACKI_1 249
+#define OPPONENT_JACKI_2 250
+#define OPPONENT_JACKI_3 251
+#define OPPONENT_JACKI_4 252
+#define OPPONENT_JACKI_5 253
+#define OPPONENT_WALTER_1 254
+#define OPPONENT_MICAH 255
+#define OPPONENT_THOMAS 256
+#define OPPONENT_WALTER_2 257
+#define OPPONENT_WALTER_3 258
+#define OPPONENT_WALTER_4 259
+#define OPPONENT_WALTER_5 260
+#define OPPONENT_SIDNEY 261
+#define OPPONENT_PHOEBE 262
+#define OPPONENT_GLACIA 263
+#define OPPONENT_DRAKE 264
+#define OPPONENT_ROXANNE_1 265
+#define OPPONENT_BRAWLY_1 266
+#define OPPONENT_WATTSON_1 267
+#define OPPONENT_FLANNERY_1 268
+#define OPPONENT_NORMAN_1 269
+#define OPPONENT_WINONA_1 270
+#define OPPONENT_TATE_AND_LIZA_1 271
+#define OPPONENT_JUAN_1 272
+#define OPPONENT_JERRY_1 273
+#define OPPONENT_TED 274
+#define OPPONENT_PAUL 275
+#define OPPONENT_JERRY_2 276
+#define OPPONENT_JERRY_3 277
+#define OPPONENT_JERRY_4 278
+#define OPPONENT_JERRY_5 279
+#define OPPONENT_KAREN_1 280
+#define OPPONENT_GEORGIA 281
+#define OPPONENT_KAREN_2 282
+#define OPPONENT_KAREN_3 283
+#define OPPONENT_KAREN_4 284
+#define OPPONENT_KAREN_5 285
+#define OPPONENT_KATE_AND_JOY 286
+#define OPPONENT_ANNA_AND_MEG_1 287
+#define OPPONENT_ANNA_AND_MEG_2 288
+#define OPPONENT_ANNA_AND_MEG_3 289
+#define OPPONENT_ANNA_AND_MEG_4 290
+#define OPPONENT_ANNA_AND_MEG_5 291
+#define OPPONENT_VICTOR 292
+#define OPPONENT_MIGUEL_1 293
+#define OPPONENT_COLTON 294
+#define OPPONENT_MIGUEL_2 295
+#define OPPONENT_MIGUEL_3 296
+#define OPPONENT_MIGUEL_4 297
+#define OPPONENT_MIGUEL_5 298
+#define OPPONENT_VICTORIA 299
+#define OPPONENT_VANESSA 300
+#define OPPONENT_BETHANY 301
+#define OPPONENT_ISABEL_1 302
+#define OPPONENT_ISABEL_2 303
+#define OPPONENT_ISABEL_3 304
+#define OPPONENT_ISABEL_4 305
+#define OPPONENT_ISABEL_5 306
+#define OPPONENT_TIMOTHY_1 307
+#define OPPONENT_TIMOTHY_2 308
+#define OPPONENT_TIMOTHY_3 309
+#define OPPONENT_TIMOTHY_4 310
+#define OPPONENT_TIMOTHY_5 311
+#define OPPONENT_VICKY 312
+#define OPPONENT_SHELBY_1 313
+#define OPPONENT_SHELBY_2 314
+#define OPPONENT_SHELBY_3 315
+#define OPPONENT_SHELBY_4 316
+#define OPPONENT_SHELBY_5 317
+#define OPPONENT_CALVIN_1 318
+#define OPPONENT_BILLY 319
+#define OPPONENT_JOSH 320
+#define OPPONENT_TOMMY 321
+#define OPPONENT_JOEY 322
+#define OPPONENT_BEN 323
+#define OPPONENT_QUINCY 324
+#define OPPONENT_KATELYNN 325
+#define OPPONENT_JAYLEN 326
+#define OPPONENT_DILLON 327
+#define OPPONENT_CALVIN_2 328
+#define OPPONENT_CALVIN_3 329
+#define OPPONENT_CALVIN_4 330
+#define OPPONENT_CALVIN_5 331
+#define OPPONENT_EDDIE 332
+#define OPPONENT_ALLEN 333
+#define OPPONENT_TIMMY 334
+#define OPPONENT_WALLACE 335
+#define OPPONENT_ANDREW 336
+#define OPPONENT_IVAN 337
+#define OPPONENT_CLAUDE 338
+#define OPPONENT_ELLIOT_1 339
+#define OPPONENT_NED 340
+#define OPPONENT_DALE 341
+#define OPPONENT_NOLAN 342
+#define OPPONENT_BARNY 343
+#define OPPONENT_WADE 344
+#define OPPONENT_CARTER 345
+#define OPPONENT_ELLIOT_2 346
+#define OPPONENT_ELLIOT_3 347
+#define OPPONENT_ELLIOT_4 348
+#define OPPONENT_ELLIOT_5 349
+#define OPPONENT_RONALD 350
+#define OPPONENT_JACOB 351
+#define OPPONENT_ANTHONY 352
+#define OPPONENT_BENJAMIN_1 353
+#define OPPONENT_BENJAMIN_2 354
+#define OPPONENT_BENJAMIN_3 355
+#define OPPONENT_BENJAMIN_4 356
+#define OPPONENT_BENJAMIN_5 357
+#define OPPONENT_ABIGAIL_1 358
+#define OPPONENT_JASMINE 359
+#define OPPONENT_ABIGAIL_2 360
+#define OPPONENT_ABIGAIL_3 361
+#define OPPONENT_ABIGAIL_4 362
+#define OPPONENT_ABIGAIL_5 363
+#define OPPONENT_DYLAN_1 364
+#define OPPONENT_DYLAN_2 365
+#define OPPONENT_DYLAN_3 366
+#define OPPONENT_DYLAN_4 367
+#define OPPONENT_DYLAN_5 368
+#define OPPONENT_MARIA_1 369
+#define OPPONENT_MARIA_2 370
+#define OPPONENT_MARIA_3 371
+#define OPPONENT_MARIA_4 372
+#define OPPONENT_MARIA_5 373
+#define OPPONENT_CAMDEN 374
+#define OPPONENT_DEMETRIUS 375
+#define OPPONENT_ISAIAH_1 376
+#define OPPONENT_PABLO_1 377
+#define OPPONENT_CHASE 378
+#define OPPONENT_ISAIAH_2 379
+#define OPPONENT_ISAIAH_3 380
+#define OPPONENT_ISAIAH_4 381
+#define OPPONENT_ISAIAH_5 382
+#define OPPONENT_ISOBEL 383
+#define OPPONENT_DONNY 384
+#define OPPONENT_TALIA 385
+#define OPPONENT_KATELYN_1 386
+#define OPPONENT_ALLISON 387
+#define OPPONENT_KATELYN_2 388
+#define OPPONENT_KATELYN_3 389
+#define OPPONENT_KATELYN_4 390
+#define OPPONENT_KATELYN_5 391
+#define OPPONENT_NICOLAS_1 392
+#define OPPONENT_NICOLAS_2 393
+#define OPPONENT_NICOLAS_3 394
+#define OPPONENT_NICOLAS_4 395
+#define OPPONENT_NICOLAS_5 396
+#define OPPONENT_AARON 397
+#define OPPONENT_PERRY 398
+#define OPPONENT_HUGH 399
+#define OPPONENT_PHIL 400
+#define OPPONENT_JARED 401
+#define OPPONENT_HUMBERTO 402
+#define OPPONENT_PRESLEY 403
+#define OPPONENT_EDWARDO 404
+#define OPPONENT_COLIN 405
+#define OPPONENT_ROBERT_1 406
+#define OPPONENT_BENNY 407
+#define OPPONENT_CHESTER 408
+#define OPPONENT_ROBERT_2 409
+#define OPPONENT_ROBERT_3 410
+#define OPPONENT_ROBERT_4 411
+#define OPPONENT_ROBERT_5 412
+#define OPPONENT_ALEX 413
+#define OPPONENT_BECK 414
+#define OPPONENT_YASU 415
+#define OPPONENT_TAKASHI 416
+#define OPPONENT_DIANNE 417
+#define OPPONENT_JANI 418
+#define OPPONENT_LAO_1 419
+#define OPPONENT_LUNG 420
+#define OPPONENT_LAO_2 421
+#define OPPONENT_LAO_3 422
+#define OPPONENT_LAO_4 423
+#define OPPONENT_LAO_5 424
+#define OPPONENT_JOCELYN 425
+#define OPPONENT_LAURA 426
+#define OPPONENT_CYNDY_1 427
+#define OPPONENT_CORA 428
+#define OPPONENT_PAULA 429
+#define OPPONENT_CYNDY_2 430
+#define OPPONENT_CYNDY_3 431
+#define OPPONENT_CYNDY_4 432
+#define OPPONENT_CYNDY_5 433
+#define OPPONENT_MADELINE_1 434
+#define OPPONENT_CLARISSA 435
+#define OPPONENT_ANGELICA 436
+#define OPPONENT_MADELINE_2 437
+#define OPPONENT_MADELINE_3 438
+#define OPPONENT_MADELINE_4 439
+#define OPPONENT_MADELINE_5 440
+#define OPPONENT_BEVERLY 441
+#define OPPONENT_IMANI 442
+#define OPPONENT_KYLA 443
+#define OPPONENT_DENISE 444
+#define OPPONENT_BETH 445
+#define OPPONENT_TARA 446
+#define OPPONENT_MISSY 447
+#define OPPONENT_ALICE 448
+#define OPPONENT_JENNY_1 449
+#define OPPONENT_GRACE 450
+#define OPPONENT_TANYA 451
+#define OPPONENT_SHARON 452
+#define OPPONENT_NIKKI 453
+#define OPPONENT_BRENDA 454
+#define OPPONENT_KATIE 455
+#define OPPONENT_SUSIE 456
+#define OPPONENT_KARA 457
+#define OPPONENT_DANA 458
+#define OPPONENT_SIENNA 459
+#define OPPONENT_DEBRA 460
+#define OPPONENT_LINDA 461
+#define OPPONENT_KAYLEE 462
+#define OPPONENT_LAUREL 463
+#define OPPONENT_CARLEE 464
+#define OPPONENT_JENNY_2 465
+#define OPPONENT_JENNY_3 466
+#define OPPONENT_JENNY_4 467
+#define OPPONENT_JENNY_5 468
+#define OPPONENT_HEIDI 469
+#define OPPONENT_BECKY 470
+#define OPPONENT_CAROL 471
+#define OPPONENT_NANCY 472
+#define OPPONENT_MARTHA 473
+#define OPPONENT_DIANA_1 474
+#define OPPONENT_CEDRIC 475
+#define OPPONENT_IRENE 476
+#define OPPONENT_DIANA_2 477
+#define OPPONENT_DIANA_3 478
+#define OPPONENT_DIANA_4 479
+#define OPPONENT_DIANA_5 480
+#define OPPONENT_AMY_AND_LIV_1 481
+#define OPPONENT_AMY_AND_LIV_2 482
+#define OPPONENT_GINA_AND_MIA_1 483
+#define OPPONENT_MIU_AND_YUKI 484
+#define OPPONENT_AMY_AND_LIV_3 485
+#define OPPONENT_GINA_AND_MIA_2 486
+#define OPPONENT_AMY_AND_LIV_4 487
+#define OPPONENT_AMY_AND_LIV_5 488
+#define OPPONENT_AMY_AND_LIV_6 489
+#define OPPONENT_HUEY 490
+#define OPPONENT_EDMOND 491
+#define OPPONENT_ERNEST_1 492
+#define OPPONENT_DWAYNE 493
+#define OPPONENT_PHILLIP 494
+#define OPPONENT_LEONARD 495
+#define OPPONENT_DUNCAN 496
+#define OPPONENT_ERNEST_2 497
+#define OPPONENT_ERNEST_3 498
+#define OPPONENT_ERNEST_4 499
+#define OPPONENT_ERNEST_5 500
+#define OPPONENT_ELI 501
+#define OPPONENT_ANNIKA 502
+#define OPPONENT_JAZMYN 503
+#define OPPONENT_JONAS 504
+#define OPPONENT_KAYLEY 505
+#define OPPONENT_AURON 506
+#define OPPONENT_KELVIN 507
+#define OPPONENT_MARLEY 508
+#define OPPONENT_REYNA 509
+#define OPPONENT_HUDSON 510
+#define OPPONENT_CONOR 511
+#define OPPONENT_EDWIN_1 512
+#define OPPONENT_HECTOR 513
+#define OPPONENT_TABITHA_1 514
+#define OPPONENT_EDWIN_2 515
+#define OPPONENT_EDWIN_3 516
+#define OPPONENT_EDWIN_4 517
+#define OPPONENT_EDWIN_5 518
+#define OPPONENT_WALLY_1 519
+#define OPPONENT_BRENDAN_1 520
+#define OPPONENT_BRENDAN_2 521
+#define OPPONENT_BRENDAN_3 522
+#define OPPONENT_BRENDAN_4 523
+#define OPPONENT_BRENDAN_5 524
+#define OPPONENT_BRENDAN_6 525
+#define OPPONENT_BRENDAN_7 526
+#define OPPONENT_BRENDAN_8 527
+#define OPPONENT_BRENDAN_9 528
+#define OPPONENT_MAY_1 529
+#define OPPONENT_MAY_2 530
+#define OPPONENT_MAY_3 531
+#define OPPONENT_MAY_4 532
+#define OPPONENT_MAY_5 533
+#define OPPONENT_MAY_6 534
+#define OPPONENT_MAY_7 535
+#define OPPONENT_MAY_8 536
+#define OPPONENT_MAY_9 537
+#define OPPONENT_ISAAC_1 538
+#define OPPONENT_DAVIS 539
+#define OPPONENT_MITCHELL 540
+#define OPPONENT_ISAAC_2 541
+#define OPPONENT_ISAAC_3 542
+#define OPPONENT_ISAAC_4 543
+#define OPPONENT_ISAAC_5 544
+#define OPPONENT_LYDIA_1 545
+#define OPPONENT_HALLE 546
+#define OPPONENT_GARRISON 547
+#define OPPONENT_LYDIA_2 548
+#define OPPONENT_LYDIA_3 549
+#define OPPONENT_LYDIA_4 550
+#define OPPONENT_LYDIA_5 551
+#define OPPONENT_JACKSON_1 552
+#define OPPONENT_LORENZO 553
+#define OPPONENT_SEBASTIAN 554
+#define OPPONENT_JACKSON_2 555
+#define OPPONENT_JACKSON_3 556
+#define OPPONENT_JACKSON_4 557
+#define OPPONENT_JACKSON_5 558
+#define OPPONENT_CATHERINE_1 559
+#define OPPONENT_JENNA 560
+#define OPPONENT_SOPHIA 561
+#define OPPONENT_CATHERINE_2 562
+#define OPPONENT_CATHERINE_3 563
+#define OPPONENT_CATHERINE_4 564
+#define OPPONENT_CATHERINE_5 565
+#define OPPONENT_JULIO 566
+#define OPPONENT_GRUNT_27 567
+#define OPPONENT_GRUNT_28 568
+#define OPPONENT_GRUNT_29 569
+#define OPPONENT_GRUNT_30 570
+#define OPPONENT_MARC 571
+#define OPPONENT_BRENDEN 572
+#define OPPONENT_LILITH 573
+#define OPPONENT_CRISTIAN 574
+#define OPPONENT_SYLVIA 575
+#define OPPONENT_LEONARDO 576
+#define OPPONENT_ATHENA 577
+#define OPPONENT_HARRISON 578
+#define OPPONENT_GRUNT_31 579
+#define OPPONENT_CLARENCE 580
+#define OPPONENT_TERRY 581
+#define OPPONENT_NATE 582
+#define OPPONENT_KATHLEEN 583
+#define OPPONENT_CLIFFORD 584
+#define OPPONENT_NICHOLAS 585
+#define OPPONENT_GRUNT_32 586
+#define OPPONENT_GRUNT_33 587
+#define OPPONENT_GRUNT_34 588
+#define OPPONENT_GRUNT_35 589
+#define OPPONENT_GRUNT_36 590
+#define OPPONENT_MACEY 591
+#define OPPONENT_BRENDAN_10 592
+#define OPPONENT_BRENDAN_11 593
+#define OPPONENT_PAXTON 594
+#define OPPONENT_ISABELLA 595
+#define OPPONENT_GRUNT_37 596
+#define OPPONENT_TABITHA_2 597
+#define OPPONENT_JONATHAN 598
+#define OPPONENT_BRENDAN_12 599
+#define OPPONENT_MAY_10 600
+#define OPPONENT_MAXIE_1 601
+#define OPPONENT_MAXIE_2 602
+#define OPPONENT_TIANA 603
+#define OPPONENT_HALEY_1 604
+#define OPPONENT_JANICE 605
+#define OPPONENT_VIVI 606
+#define OPPONENT_HALEY_2 607
+#define OPPONENT_HALEY_3 608
+#define OPPONENT_HALEY_4 609
+#define OPPONENT_HALEY_5 610
+#define OPPONENT_SALLY 611
+#define OPPONENT_ROBIN 612
+#define OPPONENT_ANDREA 613
+#define OPPONENT_CRISSY 614
+#define OPPONENT_RICK 615
+#define OPPONENT_LYLE 616
+#define OPPONENT_JOSE 617
+#define OPPONENT_DOUG 618
+#define OPPONENT_GREG 619
+#define OPPONENT_KENT 620
+#define OPPONENT_JAMES_1 621
+#define OPPONENT_JAMES_2 622
+#define OPPONENT_JAMES_3 623
+#define OPPONENT_JAMES_4 624
+#define OPPONENT_JAMES_5 625
+#define OPPONENT_BRICE 626
+#define OPPONENT_TRENT_1 627
+#define OPPONENT_LENNY 628
+#define OPPONENT_LUCAS_1 629
+#define OPPONENT_ALAN 630
+#define OPPONENT_CLARK 631
+#define OPPONENT_ERIC 632
+#define OPPONENT_LUCAS_2 633
+#define OPPONENT_MIKE_1 634
+#define OPPONENT_MIKE_2 635
+#define OPPONENT_TRENT_2 636
+#define OPPONENT_TRENT_3 637
+#define OPPONENT_TRENT_4 638
+#define OPPONENT_TRENT_5 639
+#define OPPONENT_DEZ_AND_LUKE 640
+#define OPPONENT_LEA_AND_JED 641
+#define OPPONENT_KIRA_AND_DAN_1 642
+#define OPPONENT_KIRA_AND_DAN_2 643
+#define OPPONENT_KIRA_AND_DAN_3 644
+#define OPPONENT_KIRA_AND_DAN_4 645
+#define OPPONENT_KIRA_AND_DAN_5 646
+#define OPPONENT_JOHANNA 647
+#define OPPONENT_GERALD 648
+#define OPPONENT_VIVIAN 649
+#define OPPONENT_DANIELLE 650
+#define OPPONENT_HIDEO 651
+#define OPPONENT_KEIGO 652
+#define OPPONENT_RILEY 653
+#define OPPONENT_FLINT 654
+#define OPPONENT_ASHLEY 655
+#define OPPONENT_WALLY_2 656
+#define OPPONENT_WALLY_3 657
+#define OPPONENT_WALLY_4 658
+#define OPPONENT_WALLY_5 659
+#define OPPONENT_WALLY_6 660
+#define OPPONENT_BRENDAN_13 661
+#define OPPONENT_BRENDAN_14 662
+#define OPPONENT_BRENDAN_15 663
+#define OPPONENT_MAY_11 664
+#define OPPONENT_MAY_12 665
+#define OPPONENT_MAY_13 666
+#define OPPONENT_JONAH 667
+#define OPPONENT_HENRY 668
+#define OPPONENT_ROGER 669
+#define OPPONENT_ALEXA 670
+#define OPPONENT_RUBEN 671
+#define OPPONENT_KOJI_1 672
+#define OPPONENT_WAYNE 673
+#define OPPONENT_AIDAN 674
+#define OPPONENT_REED 675
+#define OPPONENT_TISHA 676
+#define OPPONENT_TORI_AND_TIA 677
+#define OPPONENT_KIM_AND_IRIS 678
+#define OPPONENT_TYRA_AND_IVY 679
+#define OPPONENT_MEL_AND_PAUL 680
+#define OPPONENT_JOHN_AND_JAY_1 681
+#define OPPONENT_JOHN_AND_JAY_2 682
+#define OPPONENT_JOHN_AND_JAY_3 683
+#define OPPONENT_JOHN_AND_JAY_4 684
+#define OPPONENT_JOHN_AND_JAY_5 685
+#define OPPONENT_RELI_AND_IAN 686
+#define OPPONENT_LILA_AND_ROY_1 687
+#define OPPONENT_LILA_AND_ROY_2 688
+#define OPPONENT_LILA_AND_ROY_3 689
+#define OPPONENT_LILA_AND_ROY_4 690
+#define OPPONENT_LILA_AND_ROY_5 691
+#define OPPONENT_LISA_AND_RAY 692
+#define OPPONENT_CHRIS 693
+#define OPPONENT_DAWSON 694
+#define OPPONENT_SARAH 695
+#define OPPONENT_DARIAN 696
+#define OPPONENT_HAILEY 697
+#define OPPONENT_CHANDLER 698
+#define OPPONENT_KALEB 699
+#define OPPONENT_JOSEPH 700
+#define OPPONENT_ALYSSA 701
+#define OPPONENT_MARCOS 702
+#define OPPONENT_RHETT 703
+#define OPPONENT_TYRON 704
+#define OPPONENT_CELINA 705
+#define OPPONENT_BIANCA 706
+#define OPPONENT_HAYDEN 707
+#define OPPONENT_SOPHIE 708
+#define OPPONENT_COBY 709
+#define OPPONENT_LAWRENCE 710
+#define OPPONENT_WYATT 711
+#define OPPONENT_ANGELINA 712
+#define OPPONENT_KAI 713
+#define OPPONENT_CHARLOTTE 714
+#define OPPONENT_DEANDRE 715
+#define OPPONENT_GRUNT_38 716
+#define OPPONENT_GRUNT_39 717
+#define OPPONENT_GRUNT_40 718
+#define OPPONENT_GRUNT_41 719
+#define OPPONENT_GRUNT_42 720
+#define OPPONENT_GRUNT_43 721
+#define OPPONENT_GRUNT_44 722
+#define OPPONENT_GRUNT_45 723
+#define OPPONENT_GRUNT_46 724
+#define OPPONENT_GRUNT_47 725
+#define OPPONENT_GRUNT_48 726
+#define OPPONENT_GRUNT_49 727
+#define OPPONENT_GRUNT_50 728
+#define OPPONENT_GRUNT_51 729
+#define OPPONENT_GRUNT_52 730
+#define OPPONENT_GRUNT_53 731
+#define OPPONENT_TABITHA_3 732
+#define OPPONENT_DARCY 733
+#define OPPONENT_MAXIE_3 734
+#define OPPONENT_PETE 735
+#define OPPONENT_ISABELLE 736
+#define OPPONENT_ANDRES_1 737
+#define OPPONENT_JOSUE 738
+#define OPPONENT_CAMRON 739
+#define OPPONENT_CORY_1 740
+#define OPPONENT_CAROLINA 741
+#define OPPONENT_ELIJAH 742
+#define OPPONENT_CELIA 743
+#define OPPONENT_BRYAN 744
+#define OPPONENT_BRANDEN 745
+#define OPPONENT_BRYANT 746
+#define OPPONENT_SHAYLA 747
+#define OPPONENT_KYRA 748
+#define OPPONENT_JAIDEN 749
+#define OPPONENT_ALIX 750
+#define OPPONENT_HELENE 751
+#define OPPONENT_MARLENE 752
+#define OPPONENT_DEVAN 753
+#define OPPONENT_JOHNSON 754
+#define OPPONENT_MELINA 755
+#define OPPONENT_BRANDI 756
+#define OPPONENT_AISHA 757
+#define OPPONENT_MAKAYLA 758
+#define OPPONENT_FABIAN 759
+#define OPPONENT_DAYTON 760
+#define OPPONENT_RACHEL 761
+#define OPPONENT_LEONEL 762
+#define OPPONENT_CALLIE 763
+#define OPPONENT_CALE 764
+#define OPPONENT_MYLES 765
+#define OPPONENT_PAT 766
+#define OPPONENT_CRISTIN_1 767
+#define OPPONENT_MAY_14 768
+#define OPPONENT_MAY_15 769
+#define OPPONENT_ROXANNE_2 770
+#define OPPONENT_ROXANNE_3 771
+#define OPPONENT_ROXANNE_4 772
+#define OPPONENT_ROXANNE_5 773
+#define OPPONENT_BRAWLY_2 774
+#define OPPONENT_BRAWLY_3 775
+#define OPPONENT_BRAWLY_4 776
+#define OPPONENT_BRAWLY_5 777
+#define OPPONENT_WATTSON_2 778
+#define OPPONENT_WATTSON_3 779
+#define OPPONENT_WATTSON_4 780
+#define OPPONENT_WATTSON_5 781
+#define OPPONENT_FLANNERY_2 782
+#define OPPONENT_FLANNERY_3 783
+#define OPPONENT_FLANNERY_4 784
+#define OPPONENT_FLANNERY_5 785
+#define OPPONENT_NORMAN_2 786
+#define OPPONENT_NORMAN_3 787
+#define OPPONENT_NORMAN_4 788
+#define OPPONENT_NORMAN_5 789
+#define OPPONENT_WINONA_2 790
+#define OPPONENT_WINONA_3 791
+#define OPPONENT_WINONA_4 792
+#define OPPONENT_WINONA_5 793
+#define OPPONENT_TATE_AND_LIZA_2 794
+#define OPPONENT_TATE_AND_LIZA_3 795
+#define OPPONENT_TATE_AND_LIZA_4 796
+#define OPPONENT_TATE_AND_LIZA_5 797
+#define OPPONENT_JUAN_2 798
+#define OPPONENT_JUAN_3 799
+#define OPPONENT_JUAN_4 800
+#define OPPONENT_JUAN_5 801
+#define OPPONENT_ANGELO 802
+#define OPPONENT_DARIUS 803
+#define OPPONENT_STEVEN 804
+#define OPPONENT_ANABEL 805
+#define OPPONENT_TUCKER 806
+#define OPPONENT_SPENSER 807
+#define OPPONENT_GRETA 808
+#define OPPONENT_NOLAND 809
+#define OPPONENT_LUCY 810
+#define OPPONENT_BRANDON 811
+#define OPPONENT_ANDRES_2 812
+#define OPPONENT_ANDRES_3 813
+#define OPPONENT_ANDRES_4 814
+#define OPPONENT_ANDRES_5 815
+#define OPPONENT_CORY_2 816
+#define OPPONENT_CORY_3 817
+#define OPPONENT_CORY_4 818
+#define OPPONENT_CORY_5 819
+#define OPPONENT_PABLO_2 820
+#define OPPONENT_PABLO_3 821
+#define OPPONENT_PABLO_4 822
+#define OPPONENT_PABLO_5 823
+#define OPPONENT_KOJI_2 824
+#define OPPONENT_KOJI_3 825
+#define OPPONENT_KOJI_4 826
+#define OPPONENT_KOJI_5 827
+#define OPPONENT_CRISTIN_2 828
+#define OPPONENT_CRISTIN_3 829
+#define OPPONENT_CRISTIN_4 830
+#define OPPONENT_CRISTIN_5 831
+#define OPPONENT_FERNANDO_2 832
+#define OPPONENT_FERNANDO_3 833
+#define OPPONENT_FERNANDO_4 834
+#define OPPONENT_FERNANDO_5 835
+#define OPPONENT_SAWYER_2 836
+#define OPPONENT_SAWYER_3 837
+#define OPPONENT_SAWYER_4 838
+#define OPPONENT_SAWYER_5 839
+#define OPPONENT_GABRIELLE_2 840
+#define OPPONENT_GABRIELLE_3 841
+#define OPPONENT_GABRIELLE_4 842
+#define OPPONENT_GABRIELLE_5 843
+#define OPPONENT_THALIA_2 844
+#define OPPONENT_THALIA_3 845
+#define OPPONENT_THALIA_4 846
+#define OPPONENT_THALIA_5 847
+#define OPPONENT_MARIELA 848
+#define OPPONENT_ALVARO 848
+#define OPPONENT_EVERETT 850
+#define OPPONENT_RED 851
+#define OPPONENT_LEAF 852
+#define OPPONENT_BRENDAN_16 853
+#define OPPONENT_MAY_16 854
+
+#endif // GUARD_CONSTANTS_OPPONENTS_H
diff --git a/include/constants/vars.h b/include/constants/vars.h
index 6dc8d0ccd..b8bd46a96 100644
--- a/include/constants/vars.h
+++ b/include/constants/vars.h
@@ -51,8 +51,7 @@
#define VAR_0x402D 0x402D
#define VAR_0x402E 0x402E
-#define VAR_FRONTIER_MANIAC_FACILITY 0x402F
-
+#define VAR_FRONTIER_MANIAC_FACILITY 0x402F
#define VAR_FRONTIER_GAMBLER_FACILITY 0x4030
#define VAR_FRONTIER_GAMBLER_SET_FACILITY_F 0x4031
#define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032
diff --git a/include/data/pokedex_orders.h b/include/data/pokedex_orders.h
new file mode 100644
index 000000000..61fbd289c
--- /dev/null
+++ b/include/data/pokedex_orders.h
@@ -0,0 +1,1199 @@
+#ifndef GUARD_DATA_POKEDEX_ORDERS
+#define GUARD_DATA_POKEDEX_ORDERS
+
+const u16 gPokedexOrder_Alphabetical[] =
+{
+ 387,
+ 388,
+ 389,
+ 390,
+ 391,
+ 392,
+ 393,
+ 394,
+ 395,
+ 396,
+ 397,
+ 398,
+ 399,
+ 400,
+ 401,
+ 402,
+ 403,
+ 404,
+ 405,
+ 406,
+ 407,
+ 408,
+ 409,
+ 410,
+ 411,
+ 63, // Abra
+ 359, // Absol
+ 142, // Aerodactyl
+ 306, // Aggron
+ 190, // Aipom
+ 65, // Alakazam
+ 334, // Altaria
+ 181, // Ampharos
+ 347, // Anorith
+ 24, // Arbok
+ 59, // Arcanine
+ 168, // Ariados
+ 348, // Armaldo
+ 304, // Aron
+ 144, // Articuno
+ 184, // Azumarill
+ 298, // Azurill
+ 371, // Bagon
+ 343, // Baltoy
+ 354, // Banette
+ 339, // Barboach
+ 153, // Bayleef
+ 267, // Beautifly
+ 15, // Beedrill
+ 374, // Beldum
+ 182, // Bellossom
+ 69, // Bellsprout
+ 9, // Blastoise
+ 257, // Blaziken
+ 242, // Blissey
+ 286, // Breloom
+ 1, // Bulbasaur
+ 12, // Butterfree
+ 331, // Cacnea
+ 332, // Cacturne
+ 323, // Camerupt
+ 318, // Carvanha
+ 268, // Cascoon
+ 351, // Castform
+ 10, // Caterpie
+ 251, // Celebi
+ 113, // Chansey
+ 6, // Charizard
+ 4, // Charmander
+ 5, // Charmeleon
+ 152, // Chikorita
+ 358, // Chimecho
+ 170, // Chinchou
+ 366, // Clamperl
+ 344, // Claydol
+ 36, // Clefable
+ 35, // Clefairy
+ 173, // Cleffa
+ 91, // Cloyster
+ 256, // Combusken
+ 341, // Corphish
+ 222, // Corsola
+ 346, // Cradily
+ 342, // Crawdaunt
+ 169, // Crobat
+ 159, // Croconaw
+ 104, // Cubone
+ 155, // Cyndaquil
+ 301, // Delcatty
+ 225, // Delibird
+ 386, // Deoxys
+ 87, // Dewgong
+ 50, // Diglett
+ 132, // Ditto
+ 85, // Dodrio
+ 84, // Doduo
+ 232, // Donphan
+ 148, // Dragonair
+ 149, // Dragonite
+ 147, // Dratini
+ 96, // Drowzee
+ 51, // Dugtrio
+ 206, // Dunsparce
+ 356, // Dusclops
+ 355, // Duskull
+ 269, // Dustox
+ 133, // Eevee
+ 23, // Ekans
+ 125, // Electabuzz
+ 309, // Electrike
+ 101, // Electrode
+ 239, // Elekid
+ 244, // Entei
+ 196, // Espeon
+ 102, // Exeggcute
+ 103, // Exeggutor
+ 295, // Exploud
+ 83, // Farfetch'd
+ 22, // Fearow
+ 349, // Feebas
+ 160, // Feraligatr
+ 180, // Flaaffy
+ 136, // Flareon
+ 330, // Flygon
+ 205, // Forretress
+ 162, // Furret
+ 282, // Gardevoir
+ 92, // Gastly
+ 94, // Gengar
+ 74, // Geodude
+ 203, // Girafarig
+ 362, // Glalie
+ 207, // Gligar
+ 44, // Gloom
+ 42, // Golbat
+ 118, // Goldeen
+ 55, // Golduck
+ 76, // Golem
+ 368, // Gorebyss
+ 210, // Granbull
+ 75, // Graveler
+ 88, // Grimer
+ 383, // Groudon
+ 253, // Grovyle
+ 58, // Growlithe
+ 326, // Grumpig
+ 316, // Gulpin
+ 130, // Gyarados
+ 297, // Hariyama
+ 93, // Haunter
+ 214, // Heracross
+ 107, // Hitmonchan
+ 106, // Hitmonlee
+ 237, // Hitmontop
+ 250, // Ho-Oh
+ 163, // Hoothoot
+ 187, // Hoppip
+ 116, // Horsea
+ 229, // Houndoom
+ 228, // Houndour
+ 367, // Huntail
+ 97, // Hypno
+ 174, // Igglybuff
+ 314, // Illumise
+ 2, // Ivysaur
+ 39, // Jigglypuff
+ 385, // Jirachi
+ 135, // Jolteon
+ 189, // Jumpluff
+ 124, // Jynx
+ 140, // Kabuto
+ 141, // Kabutops
+ 64, // Kadabra
+ 14, // Kakuna
+ 115, // Kangaskhan
+ 352, // Kecleon
+ 230, // Kingdra
+ 99, // Kingler
+ 281, // Kirlia
+ 109, // Koffing
+ 98, // Krabby
+ 382, // Kyogre
+ 305, // Lairon
+ 171, // Lanturn
+ 131, // Lapras
+ 246, // Larvitar
+ 380, // Latias
+ 381, // Latios
+ 166, // Ledian
+ 165, // Ledyba
+ 108, // Lickitung
+ 345, // Lileep
+ 264, // Linoone
+ 271, // Lombre
+ 270, // Lotad
+ 294, // Loudred
+ 272, // Ludicolo
+ 249, // Lugia
+ 337, // Lunatone
+ 370, // Luvdisc
+ 68, // Machamp
+ 67, // Machoke
+ 66, // Machop
+ 240, // Magby
+ 219, // Magcargo
+ 129, // Magikarp
+ 126, // Magmar
+ 81, // Magnemite
+ 82, // Magneton
+ 296, // Makuhita
+ 310, // Manectric
+ 56, // Mankey
+ 226, // Mantine
+ 179, // Mareep
+ 183, // Marill
+ 105, // Marowak
+ 259, // Marshtomp
+ 284, // Masquerain
+ 303, // Mawile
+ 308, // Medicham
+ 307, // Meditite
+ 154, // Meganium
+ 52, // Meowth
+ 376, // Metagross
+ 375, // Metang
+ 11, // Metapod
+ 151, // Mew
+ 150, // Mewtwo
+ 262, // Mightyena
+ 350, // Milotic
+ 241, // Miltank
+ 312, // Minun
+ 200, // Misdreavus
+ 146, // Moltres
+ 122, // Mr. mime
+ 258, // Mudkip
+ 89, // Muk
+ 198, // Murkrow
+ 177, // Natu
+ 34, // Nidoking
+ 31, // Nidoqueen
+ 29, // Nidoran?
+ 32, // Nidoran?
+ 30, // Nidorina
+ 33, // Nidorino
+ 290, // Nincada
+ 38, // Ninetales
+ 291, // Ninjask
+ 164, // Noctowl
+ 299, // Nosepass
+ 322, // Numel
+ 274, // Nuzleaf
+ 224, // Octillery
+ 43, // Oddish
+ 138, // Omanyte
+ 139, // Omastar
+ 95, // Onix
+ 46, // Paras
+ 47, // Parasect
+ 279, // Pelipper
+ 53, // Persian
+ 231, // Phanpy
+ 172, // Pichu
+ 18, // Pidgeot
+ 17, // Pidgeotto
+ 16, // Pidgey
+ 25, // Pikachu
+ 221, // Piloswine
+ 204, // Pineco
+ 127, // Pinsir
+ 311, // Plusle
+ 186, // Politoed
+ 60, // Poliwag
+ 61, // Poliwhirl
+ 62, // Poliwrath
+ 77, // Ponyta
+ 261, // Poochyena
+ 137, // Porygon
+ 233, // Porygon2
+ 57, // Primeape
+ 54, // Psyduck
+ 247, // Pupitar
+ 195, // Quagsire
+ 156, // Quilava
+ 211, // Qwilfish
+ 26, // Raichu
+ 243, // Raikou
+ 280, // Ralts
+ 78, // Rapidash
+ 20, // Raticate
+ 19, // Rattata
+ 384, // Rayquaza
+ 378, // Regice
+ 377, // Regirock
+ 379, // Registeel
+ 369, // Relicanth
+ 223, // Remoraid
+ 112, // Rhydon
+ 111, // Rhyhorn
+ 315, // Roselia
+ 302, // Sableye
+ 373, // Salamence
+ 27, // Sandshrew
+ 28, // Sandslash
+ 254, // Sceptile
+ 212, // Scizor
+ 123, // Scyther
+ 117, // Seadra
+ 119, // Seaking
+ 364, // Sealeo
+ 273, // Seedot
+ 86, // Seel
+ 161, // Sentret
+ 336, // Seviper
+ 319, // Sharpedo
+ 292, // Shedinja
+ 372, // Shelgon
+ 90, // Shellder
+ 275, // Shiftry
+ 285, // Shroomish
+ 213, // Shuckle
+ 353, // Shuppet
+ 266, // Silcoon
+ 227, // Skarmory
+ 188, // Skiploom
+ 300, // Skitty
+ 289, // Slaking
+ 287, // Slakoth
+ 80, // Slowbro
+ 199, // Slowking
+ 79, // Slowpoke
+ 218, // Slugma
+ 235, // Smeargle
+ 238, // Smoochum
+ 215, // Sneasel
+ 143, // Snorlax
+ 361, // Snorunt
+ 209, // Snubbull
+ 338, // Solrock
+ 21, // Spearow
+ 363, // Spheal
+ 167, // Spinarak
+ 327, // Spinda
+ 325, // Spoink
+ 7, // Squirtle
+ 234, // Stantler
+ 121, // Starmie
+ 120, // Staryu
+ 208, // Steelix
+ 185, // Sudowoodo
+ 245, // Suicune
+ 192, // Sunflora
+ 191, // Sunkern
+ 283, // Surskit
+ 333, // Swablu
+ 317, // Swalot
+ 260, // Swampert
+ 277, // Swellow
+ 220, // Swinub
+ 276, // Taillow
+ 114, // Tangela
+ 128, // Tauros
+ 216, // Teddiursa
+ 72, // Tentacool
+ 73, // Tentacruel
+ 175, // Togepi
+ 176, // Togetic
+ 255, // Torchic
+ 324, // Torkoal
+ 158, // Totodile
+ 328, // Trapinch
+ 252, // Treecko
+ 357, // Tropius
+ 157, // Typhlosion
+ 248, // Tyranitar
+ 236, // Tyrogue
+ 197, // Umbreon
+ 201, // Unown
+ 217, // Ursaring
+ 134, // Vaporeon
+ 49, // Venomoth
+ 48, // Venonat
+ 3, // Venusaur
+ 329, // Vibrava
+ 71, // Victreebel
+ 288, // Vigoroth
+ 45, // Vileplume
+ 313, // Volbeat
+ 100, // Voltorb
+ 37, // Vulpix
+ 320, // Wailmer
+ 321, // Wailord
+ 365, // Walrein
+ 8, // Wartortle
+ 13, // Weedle
+ 70, // Weepinbell
+ 110, // Weezing
+ 340, // Whiscash
+ 293, // Whismur
+ 40, // Wigglytuff
+ 278, // Wingull
+ 202, // Wobbuffet
+ 194, // Wooper
+ 265, // Wurmple
+ 360, // Wynaut
+ 178, // Xatu
+ 193, // Yanma
+ 335, // Zangoose
+ 145, // Zapdos
+ 263, // Zigzagoon
+ 41, // Zubat
+};
+
+const u16 gPokedexOrder_Weight[] =
+{
+ 92, // Gastly
+ 93, // Haunter
+ 187, // Hoppip
+ 50, // Diglett
+ 351, // Castform
+ 109, // Koffing
+ 174, // Igglybuff
+ 200, // Misdreavus
+ 358, // Chimecho
+ 188, // Skiploom
+ 385, // Jirachi
+ 333, // Swablu
+ 292, // Shedinja
+ 175, // Togepi
+ 283, // Surskit
+ 16, // Pidgey
+ 191, // Sunkern
+ 339, // Barboach
+ 172, // Pichu
+ 298, // Azurill
+ 315, // Roselia
+ 177, // Natu
+ 21, // Spearow
+ 198, // Murkrow
+ 353, // Shuppet
+ 276, // Taillow
+ 102, // Exeggcute
+ 255, // Torchic
+ 270, // Lotad
+ 10, // Caterpie
+ 189, // Jumpluff
+ 173, // Cleffa
+ 13, // Weedle
+ 176, // Togetic
+ 147, // Dratini
+ 19, // Rattata
+ 284, // Masquerain
+ 265, // Wurmple
+ 211, // Qwilfish
+ 151, // Mew
+ 90, // Shellder
+ 273, // Seedot
+ 132, // Ditto
+ 69, // Bellsprout
+ 311, // Plusle
+ 52, // Meowth
+ 312, // Minun
+ 285, // Shroomish
+ 251, // Celebi
+ 222, // Corsola
+ 252, // Treecko
+ 327, // Spinda
+ 201, // Unown
+ 46, // Paras
+ 43, // Oddish
+ 39, // Jigglypuff
+ 290, // Nincada
+ 182, // Bellossom
+ 81, // Magnemite
+ 25, // Pikachu
+ 238, // Smoochum
+ 161, // Sentret
+ 70, // Weepinbell
+ 152, // Chikorita
+ 220, // Swinub
+ 133, // Eevee
+ 98, // Krabby
+ 104, // Cubone
+ 280, // Ralts
+ 1, // Bulbasaur
+ 23, // Ekans
+ 29, // Nidoran?
+ 204, // Pineco
+ 349, // Feebas
+ 138, // Omanyte
+ 41, // Zubat
+ 35, // Clefairy
+ 258, // Mudkip
+ 209, // Snubbull
+ 179, // Mareep
+ 155, // Cyndaquil
+ 116, // Horsea
+ 4, // Charmander
+ 192, // Sunflora
+ 183, // Marill
+ 194, // Wooper
+ 167, // Spinarak
+ 44, // Gloom
+ 370, // Luvdisc
+ 216, // Teddiursa
+ 32, // Nidoran?
+ 7, // Squirtle
+ 278, // Wingull
+ 158, // Totodile
+ 110, // Weezing
+ 37, // Vulpix
+ 11, // Metapod
+ 266, // Silcoon
+ 129, // Magikarp
+ 14, // Kakuna
+ 316, // Gulpin
+ 100, // Voltorb
+ 165, // Ledyba
+ 228, // Houndour
+ 300, // Skitty
+ 302, // Sableye
+ 307, // Meditite
+ 341, // Corphish
+ 190, // Aipom
+ 268, // Cascoon
+ 303, // Mawile
+ 140, // Kabuto
+ 40, // Wigglytuff
+ 27, // Sandshrew
+ 223, // Remoraid
+ 291, // Ninjask
+ 170, // Chinchou
+ 60, // Poliwag
+ 347, // Anorith
+ 49, // Venomoth
+ 354, // Banette
+ 2, // Ivysaur
+ 180, // Flaaffy
+ 261, // Poochyena
+ 360, // Wynaut
+ 206, // Dunsparce
+ 178, // Xatu
+ 355, // Duskull
+ 83, // Farfetch'd
+ 328, // Trapinch
+ 118, // Goldeen
+ 309, // Electrike
+ 329, // Vibrava
+ 71, // Victreebel
+ 153, // Bayleef
+ 225, // Delibird
+ 293, // Whismur
+ 148, // Dragonair
+ 361, // Snorunt
+ 263, // Zigzagoon
+ 314, // Illumise
+ 313, // Volbeat
+ 20, // Raticate
+ 45, // Vileplume
+ 156, // Quilava
+ 5, // Charmeleon
+ 58, // Growlithe
+ 256, // Combusken
+ 66, // Machop
+ 63, // Abra
+ 33, // Nidorino
+ 54, // Psyduck
+ 277, // Swellow
+ 38, // Ninetales
+ 30, // Nidorina
+ 61, // Poliwhirl
+ 74, // Geodude
+ 281, // Kirlia
+ 213, // Shuckle
+ 334, // Altaria
+ 318, // Carvanha
+ 236, // Tyrogue
+ 163, // Hoothoot
+ 240, // Magby
+ 343, // Baltoy
+ 253, // Grovyle
+ 352, // Kecleon
+ 171, // Lanturn
+ 8, // Wartortle
+ 368, // Gorebyss
+ 369, // Relicanth
+ 239, // Elekid
+ 340, // Whiscash
+ 345, // Lileep
+ 322, // Numel
+ 287, // Slakoth
+ 135, // Jolteon
+ 159, // Croconaw
+ 136, // Flareon
+ 117, // Seadra
+ 196, // Espeon
+ 367, // Huntail
+ 197, // Umbreon
+ 259, // Marshtomp
+ 274, // Nuzleaf
+ 215, // Sneasel
+ 56, // Mankey
+ 279, // Pelipper
+ 267, // Beautifly
+ 224, // Octillery
+ 184, // Azumarill
+ 202, // Wobbuffet
+ 134, // Vaporeon
+ 28, // Sandslash
+ 47, // Parasect
+ 15, // Beedrill
+ 89, // Muk
+ 17, // Pidgeotto
+ 88, // Grimer
+ 26, // Raichu
+ 77, // Ponyta
+ 125, // Electabuzz
+ 48, // Venonat
+ 325, // Spoink
+ 356, // Dusclops
+ 308, // Medicham
+ 269, // Dustox
+ 53, // Persian
+ 12, // Butterfree
+ 57, // Primeape
+ 96, // Drowzee
+ 162, // Furret
+ 233, // Porygon2
+ 271, // Lombre
+ 264, // Linoone
+ 301, // Delcatty
+ 342, // Crawdaunt
+ 51, // Dugtrio
+ 168, // Ariados
+ 231, // Phanpy
+ 186, // Politoed
+ 120, // Staryu
+ 113, // Chansey
+ 139, // Omastar
+ 114, // Tangela
+ 218, // Slugma
+ 229, // Houndoom
+ 166, // Ledian
+ 79, // Slowpoke
+ 137, // Porygon
+ 262, // Mightyena
+ 193, // Yanma
+ 22, // Fearow
+ 185, // Sudowoodo
+ 119, // Seaking
+ 286, // Breloom
+ 84, // Doduo
+ 18, // Pidgeot
+ 363, // Spheal
+ 36, // Clefable
+ 380, // Latias
+ 310, // Manectric
+ 335, // Zangoose
+ 141, // Kabutops
+ 94, // Gengar
+ 294, // Loudred
+ 124, // Jynx
+ 164, // Noctowl
+ 203, // Girafarig
+ 371, // Bagon
+ 126, // Magmar
+ 105, // Marowak
+ 72, // Tentacool
+ 288, // Vigoroth
+ 242, // Blissey
+ 359, // Absol
+ 65, // Alakazam
+ 237, // Hitmontop
+ 282, // Gardevoir
+ 210, // Granbull
+ 106, // Hitmonlee
+ 107, // Hitmonchan
+ 227, // Skarmory
+ 331, // Cacnea
+ 257, // Blaziken
+ 254, // Sceptile
+ 336, // Seviper
+ 366, // Clamperl
+ 145, // Zapdos
+ 214, // Heracross
+ 62, // Poliwrath
+ 122, // Mr. mime
+ 127, // Pinsir
+ 272, // Ludicolo
+ 73, // Tentacruel
+ 42, // Golbat
+ 219, // Magcargo
+ 144, // Articuno
+ 221, // Piloswine
+ 123, // Scyther
+ 64, // Kadabra
+ 235, // Smeargle
+ 142, // Aerodactyl
+ 275, // Shiftry
+ 99, // Kingler
+ 31, // Nidoqueen
+ 82, // Magneton
+ 304, // Aron
+ 381, // Latios
+ 146, // Moltres
+ 346, // Cradily
+ 386, // Deoxys
+ 181, // Ampharos
+ 34, // Nidoking
+ 207, // Gligar
+ 24, // Arbok
+ 108, // Lickitung
+ 101, // Electrode
+ 348, // Armaldo
+ 67, // Machoke
+ 234, // Stantler
+ 326, // Grumpig
+ 246, // Larvitar
+ 169, // Crobat
+ 195, // Quagsire
+ 241, // Miltank
+ 97, // Hypno
+ 55, // Golduck
+ 332, // Cacturne
+ 80, // Slowbro
+ 157, // Typhlosion
+ 199, // Slowking
+ 115, // Kangaskhan
+ 121, // Starmie
+ 317, // Swalot
+ 324, // Torkoal
+ 260, // Swampert
+ 330, // Flygon
+ 295, // Exploud
+ 85, // Dodrio
+ 9, // Blastoise
+ 296, // Makuhita
+ 364, // Sealeo
+ 128, // Tauros
+ 319, // Sharpedo
+ 160, // Feraligatr
+ 86, // Seel
+ 6, // Charizard
+ 78, // Rapidash
+ 374, // Beldum
+ 299, // Nosepass
+ 3, // Venusaur
+ 357, // Tropius
+ 154, // Meganium
+ 373, // Salamence
+ 75, // Graveler
+ 344, // Claydol
+ 372, // Shelgon
+ 111, // Rhyhorn
+ 212, // Scizor
+ 87, // Dewgong
+ 112, // Rhydon
+ 232, // Donphan
+ 103, // Exeggutor
+ 305, // Lairon
+ 150, // Mewtwo
+ 217, // Ursaring
+ 205, // Forretress
+ 68, // Machamp
+ 320, // Wailmer
+ 289, // Slaking
+ 91, // Cloyster
+ 365, // Walrein
+ 247, // Pupitar
+ 230, // Kingdra
+ 338, // Solrock
+ 59, // Arcanine
+ 350, // Milotic
+ 337, // Lunatone
+ 378, // Regice
+ 243, // Raikou
+ 245, // Suicune
+ 244, // Entei
+ 250, // Ho-Oh
+ 248, // Tyranitar
+ 375, // Metang
+ 379, // Registeel
+ 384, // Rayquaza
+ 95, // Onix
+ 149, // Dragonite
+ 249, // Lugia
+ 131, // Lapras
+ 323, // Camerupt
+ 226, // Mantine
+ 377, // Regirock
+ 130, // Gyarados
+ 297, // Hariyama
+ 362, // Glalie
+ 76, // Golem
+ 382, // Kyogre
+ 306, // Aggron
+ 321, // Wailord
+ 208, // Steelix
+ 143, // Snorlax
+ 376, // Metagross
+ 383, // Groudon
+};
+
+const u16 gPokedexOrder_Height[] =
+{
+ 50, // Diglett
+ 298, // Azurill
+ 177, // Natu
+ 13, // Weedle
+ 172, // Pichu
+ 173, // Cleffa
+ 175, // Togepi
+ 351, // Castform
+ 174, // Igglybuff
+ 10, // Caterpie
+ 276, // Taillow
+ 132, // Ditto
+ 133, // Eevee
+ 315, // Roselia
+ 21, // Spearow
+ 16, // Pidgey
+ 191, // Sunkern
+ 90, // Shellder
+ 19, // Rattata
+ 81, // Magnemite
+ 46, // Paras
+ 265, // Wurmple
+ 385, // Jirachi
+ 104, // Cubone
+ 258, // Mudkip
+ 194, // Wooper
+ 116, // Horsea
+ 52, // Meowth
+ 29, // Nidoran?
+ 220, // Swinub
+ 151, // Mew
+ 333, // Swablu
+ 304, // Aron
+ 311, // Plusle
+ 312, // Minun
+ 102, // Exeggcute
+ 25, // Pikachu
+ 182, // Bellossom
+ 316, // Gulpin
+ 263, // Zigzagoon
+ 285, // Shroomish
+ 138, // Omanyte
+ 331, // Cacnea
+ 98, // Krabby
+ 280, // Ralts
+ 187, // Hoppip
+ 255, // Torchic
+ 366, // Clamperl
+ 74, // Geodude
+ 183, // Marill
+ 339, // Barboach
+ 238, // Smoochum
+ 100, // Voltorb
+ 290, // Nincada
+ 302, // Sableye
+ 198, // Murkrow
+ 211, // Qwilfish
+ 7, // Squirtle
+ 252, // Treecko
+ 343, // Baltoy
+ 43, // Oddish
+ 270, // Lotad
+ 39, // Jigglypuff
+ 283, // Surskit
+ 155, // Cyndaquil
+ 140, // Kabuto
+ 264, // Linoone
+ 324, // Torkoal
+ 32, // Nidoran?
+ 167, // Spinarak
+ 56, // Mankey
+ 273, // Seedot
+ 261, // Poochyena
+ 231, // Phanpy
+ 201, // Unown
+ 170, // Chinchou
+ 233, // Porygon2
+ 60, // Poliwag
+ 371, // Bagon
+ 349, // Feebas
+ 353, // Shuppet
+ 158, // Totodile
+ 251, // Celebi
+ 360, // Wynaut
+ 27, // Sandshrew
+ 358, // Chimecho
+ 370, // Luvdisc
+ 228, // Houndour
+ 266, // Silcoon
+ 309, // Electrike
+ 4, // Charmander
+ 307, // Meditite
+ 278, // Wingull
+ 223, // Remoraid
+ 341, // Corphish
+ 222, // Corsola
+ 314, // Illumise
+ 209, // Snubbull
+ 37, // Vulpix
+ 246, // Larvitar
+ 374, // Beldum
+ 293, // Whismur
+ 204, // Pineco
+ 239, // Elekid
+ 35, // Clefairy
+ 213, // Shuckle
+ 216, // Teddiursa
+ 14, // Kakuna
+ 300, // Skitty
+ 176, // Togetic
+ 118, // Goldeen
+ 303, // Mawile
+ 179, // Mareep
+ 188, // Skiploom
+ 109, // Koffing
+ 51, // Dugtrio
+ 268, // Cascoon
+ 322, // Numel
+ 347, // Anorith
+ 313, // Volbeat
+ 163, // Hoothoot
+ 328, // Trapinch
+ 325, // Spoink
+ 11, // Metapod
+ 69, // Bellsprout
+ 361, // Snorunt
+ 20, // Raticate
+ 259, // Marshtomp
+ 277, // Swellow
+ 240, // Magby
+ 58, // Growlithe
+ 200, // Misdreavus
+ 1, // Bulbasaur
+ 236, // Tyrogue
+ 218, // Slugma
+ 287, // Slakoth
+ 281, // Kirlia
+ 190, // Aipom
+ 135, // Jolteon
+ 30, // Nidorina
+ 184, // Azumarill
+ 292, // Shedinja
+ 66, // Machop
+ 291, // Ninjask
+ 284, // Masquerain
+ 355, // Duskull
+ 192, // Sunflora
+ 189, // Jumpluff
+ 120, // Staryu
+ 180, // Flaaffy
+ 363, // Spheal
+ 54, // Psyduck
+ 219, // Magcargo
+ 83, // Farfetch'd
+ 41, // Zubat
+ 137, // Porygon
+ 161, // Sentret
+ 318, // Carvanha
+ 44, // Gloom
+ 26, // Raichu
+ 129, // Magikarp
+ 215, // Sneasel
+ 305, // Lairon
+ 256, // Combusken
+ 224, // Octillery
+ 33, // Nidorino
+ 136, // Flareon
+ 225, // Delibird
+ 72, // Tentacool
+ 63, // Abra
+ 253, // Grovyle
+ 340, // Whiscash
+ 156, // Quilava
+ 196, // Espeon
+ 88, // Grimer
+ 152, // Chikorita
+ 326, // Grumpig
+ 299, // Nosepass
+ 53, // Persian
+ 262, // Mightyena
+ 48, // Venonat
+ 82, // Magneton
+ 77, // Ponyta
+ 296, // Makuhita
+ 337, // Lunatone
+ 28, // Sandslash
+ 96, // Drowzee
+ 114, // Tangela
+ 57, // Primeape
+ 165, // Ledyba
+ 40, // Wigglytuff
+ 47, // Parasect
+ 139, // Omastar
+ 294, // Loudred
+ 8, // Wartortle
+ 75, // Graveler
+ 197, // Umbreon
+ 345, // Lileep
+ 61, // Poliwhirl
+ 134, // Vaporeon
+ 15, // Beedrill
+ 105, // Marowak
+ 70, // Weepinbell
+ 369, // Relicanth
+ 111, // Rhyhorn
+ 2, // Ivysaur
+ 352, // Kecleon
+ 274, // Nuzleaf
+ 267, // Beautifly
+ 17, // Pidgeotto
+ 168, // Ariados
+ 86, // Seel
+ 186, // Politoed
+ 159, // Croconaw
+ 113, // Chansey
+ 354, // Banette
+ 232, // Donphan
+ 121, // Starmie
+ 5, // Charmeleon
+ 221, // Piloswine
+ 12, // Butterfree
+ 329, // Vibrava
+ 125, // Electabuzz
+ 342, // Crawdaunt
+ 301, // Delcatty
+ 334, // Altaria
+ 372, // Shelgon
+ 38, // Ninetales
+ 207, // Gligar
+ 364, // Sealeo
+ 327, // Spinda
+ 247, // Pupitar
+ 79, // Slowpoke
+ 338, // Solrock
+ 241, // Miltank
+ 22, // Fearow
+ 45, // Vileplume
+ 89, // Muk
+ 205, // Forretress
+ 185, // Sudowoodo
+ 359, // Absol
+ 193, // Yanma
+ 269, // Dustox
+ 108, // Lickitung
+ 235, // Smeargle
+ 171, // Lanturn
+ 101, // Electrode
+ 271, // Lombre
+ 286, // Breloom
+ 153, // Bayleef
+ 117, // Seadra
+ 110, // Weezing
+ 279, // Pelipper
+ 375, // Metang
+ 31, // Nidoqueen
+ 332, // Cacturne
+ 275, // Shiftry
+ 308, // Medicham
+ 335, // Zangoose
+ 141, // Kabutops
+ 99, // Kingler
+ 64, // Kadabra
+ 119, // Seaking
+ 36, // Clefable
+ 126, // Magmar
+ 202, // Wobbuffet
+ 92, // Gastly
+ 122, // Mr. mime
+ 62, // Poliwrath
+ 128, // Tauros
+ 380, // Latias
+ 181, // Ampharos
+ 288, // Vigoroth
+ 166, // Ledian
+ 76, // Golem
+ 365, // Walrein
+ 84, // Doduo
+ 229, // Houndoom
+ 34, // Nidoking
+ 124, // Jynx
+ 107, // Hitmonchan
+ 234, // Stantler
+ 210, // Granbull
+ 237, // Hitmontop
+ 195, // Quagsire
+ 344, // Claydol
+ 260, // Swampert
+ 242, // Blissey
+ 272, // Ludicolo
+ 295, // Exploud
+ 206, // Dunsparce
+ 127, // Pinsir
+ 91, // Cloyster
+ 67, // Machoke
+ 203, // Girafarig
+ 18, // Pidgeot
+ 178, // Xatu
+ 346, // Cradily
+ 106, // Hitmonlee
+ 49, // Venomoth
+ 94, // Gengar
+ 214, // Heracross
+ 362, // Glalie
+ 123, // Scyther
+ 373, // Salamence
+ 310, // Manectric
+ 348, // Armaldo
+ 65, // Alakazam
+ 97, // Hypno
+ 164, // Noctowl
+ 73, // Tentacruel
+ 356, // Dusclops
+ 145, // Zapdos
+ 42, // Golbat
+ 376, // Metagross
+ 282, // Gardevoir
+ 9, // Blastoise
+ 80, // Slowbro
+ 93, // Haunter
+ 68, // Machamp
+ 377, // Regirock
+ 317, // Swalot
+ 254, // Sceptile
+ 227, // Skarmory
+ 55, // Golduck
+ 386, // Deoxys
+ 71, // Victreebel
+ 78, // Rapidash
+ 6, // Charizard
+ 367, // Huntail
+ 87, // Dewgong
+ 144, // Articuno
+ 157, // Typhlosion
+ 142, // Aerodactyl
+ 368, // Gorebyss
+ 217, // Ursaring
+ 154, // Meganium
+ 378, // Regice
+ 212, // Scizor
+ 230, // Kingdra
+ 147, // Dratini
+ 85, // Dodrio
+ 319, // Sharpedo
+ 169, // Crobat
+ 162, // Furret
+ 59, // Arcanine
+ 243, // Raikou
+ 257, // Blaziken
+ 323, // Camerupt
+ 112, // Rhydon
+ 379, // Registeel
+ 23, // Ekans
+ 330, // Flygon
+ 357, // Tropius
+ 381, // Latios
+ 245, // Suicune
+ 146, // Moltres
+ 3, // Venusaur
+ 103, // Exeggutor
+ 199, // Slowking
+ 248, // Tyranitar
+ 289, // Slaking
+ 320, // Wailmer
+ 150, // Mewtwo
+ 306, // Aggron
+ 143, // Snorlax
+ 226, // Mantine
+ 244, // Entei
+ 149, // Dragonite
+ 115, // Kangaskhan
+ 297, // Hariyama
+ 160, // Feraligatr
+ 131, // Lapras
+ 336, // Seviper
+ 24, // Arbok
+ 383, // Groudon
+ 250, // Ho-Oh
+ 148, // Dragonair
+ 382, // Kyogre
+ 249, // Lugia
+ 350, // Milotic
+ 130, // Gyarados
+ 384, // Rayquaza
+ 95, // Onix
+ 208, // Steelix
+ 321, // Wailord
+};
+
+#endif // GUARD_DATA_POKEDEX_ORDERS
diff --git a/include/field_effect.h b/include/field_effect.h
index 772b20d37..fb0f20f6f 100644
--- a/include/field_effect.h
+++ b/include/field_effect.h
@@ -75,5 +75,7 @@ u32 FieldEffectStart(u8);
bool8 FieldEffectActiveListContains(u8 id);
void sub_80B69DC(void);
void FieldEffectStop(struct Sprite *sprite, u8 id);
+void sub_80B7FC8(void);
+void FieldEffectActiveListRemove(u8 id);
#endif //GUARD_FIELD_EFFECTS_H
diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h
index a3c40bc42..cc4c65448 100644
--- a/include/field_player_avatar.h
+++ b/include/field_player_avatar.h
@@ -9,6 +9,27 @@ void PlayerGetDestCoords(s16 *, s16 *);
u8 player_get_direction_lower_nybble(void);
u8 player_get_direction_upper_nybble(void);
u8 player_get_x22(void);
+void PlayerGoSpeed1(u8);
+void PlayerGoSpeed2(u8);
+void PlayerGoSpeed3(u8);
+void PlayerGoSpeed4(u8);
+void PlayerOnBikeCollide(u8);
+void PlayerFaceDirection(u8 a);
+void PlayerTurnInPlace(u8 a);
+void PlayerJumpLedge(u8 a);
+void PlayerIdleWheelie(u8 a);
+void PlayerStartWheelie(u8 a);
+void PlayerEndWheelie(u8 a);
+void PlayerStandingHoppingWheelie(u8 a);
+void PlayerMovingHoppingWheelie(u8 a);
+void PlayerLedgeHoppingWheelie(u8 a);
+void PlayerAcroTurnJump(u8 a);
+void PlayerSetAnimId(u8 a, u8 b);
+bool8 IsPlayerCollidingWithFarawayIslandMew(u8 direction);
+void PlayerOnBikeCollideWithFarawayIslandMew(u8 direction);
+u8 CheckForFieldObjectCollision(struct MapObject *a, s16 b, s16 c, u8 d, u8 e);
+u8 PlayerGetZCoord(void);
+void SetPlayerAvatarTransitionFlags(u16 a);
void sub_808BCE8(void);
void sub_808D074(u8);
diff --git a/include/fldeff_teleport.h b/include/fldeff_teleport.h
new file mode 100644
index 000000000..71fb64ad2
--- /dev/null
+++ b/include/fldeff_teleport.h
@@ -0,0 +1,7 @@
+#ifndef GUARD_FLDEFF_TELEPORT_H
+#define GUARD_FLDEFF_TELEPORT_H
+
+void hm_teleport_run_dp02scr(void);
+void sub_817C94C(void);
+
+#endif // GUARD_FLDEFF_TELEPORT_H
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index 3e9f13523..b12febefd 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -299,25 +299,42 @@ enum
COLLISION_LEDGE_JUMP = 6
};
-struct PlayerAvatar /* 0x202E858 */
+// player running states
+enum
+{
+ NOT_MOVING,
+ TURN_DIRECTION, // not the same as turning! turns your avatar without moving. also known as a turn frame in some circles
+ MOVING,
+};
+
+// player tile transition states
+enum
+{
+ T_NOT_MOVING,
+ T_TILE_TRANSITION,
+ T_TILE_CENTER, // player is on a frame in which they are centered on a tile during which the player either stops or keeps their momentum and keeps going, changing direction if necessary.
+};
+
+struct PlayerAvatar
{
/*0x00*/ u8 flags;
- /*0x01*/ u8 bike;
- /*0x02*/ u8 running2;
- /*0x03*/ u8 running1;
+ /*0x01*/ u8 unk1; // used to be named bike, but its definitely not that. seems to be some transition flags
+ /*0x02*/ u8 runningState; // this is a static running state. 00 is not moving, 01 is turn direction, 02 is moving.
+ /*0x03*/ u8 tileTransitionState; // this is a transition running state: 00 is not moving, 01 is transition between tiles, 02 means you are on the frame in which you have centered on a tile but are about to keep moving, even if changing directions. 2 is also used for a ledge hop, since you are transitioning.
/*0x04*/ u8 spriteId;
/*0x05*/ u8 mapObjectId;
- /*0x06*/ u8 unk6;
+ /*0x06*/ bool8 preventStep;
/*0x07*/ u8 gender;
- u8 acroBikeState;
- u8 unk9;
- u8 bikeFrameCounter;
- u8 unkB;
- u32 unkC;
- u32 unk10;
- u8 unk14[8];
- u8 unk1C[8];
- // TODO: rest of struct
+ /*0x08*/ u8 acroBikeState; // 00 is normal, 01 is turning, 02 is standing wheelie, 03 is hopping wheelie
+ /*0x09*/ u8 newDirBackup; // during bike movement, the new direction as opposed to player's direction is backed up here.
+ /*0x0A*/ u8 bikeFrameCounter; // on the mach bike, when this value is 1, the bike is moving but not accelerating yet for 1 tile. on the acro bike, this acts as a timer for acro bike.
+ /*0x0B*/ u8 bikeSpeed;
+ // acro bike only
+ /*0x0C*/ u32 directionHistory; // up/down/left/right history is stored in each nybble, but using the field directions and not the io inputs.
+ /*0x10*/ u32 abStartSelectHistory; // same as above but for A + B + start + select only
+ // these two are timer history arrays which [0] is the active timer for acro bike. every element is backed up to the next element upon update.
+ /*0x14*/ u8 dirTimerHistory[8];
+ /*0x1C*/ u8 abStartSelectTimerHistory[8];
};
struct Camera
diff --git a/include/global.h b/include/global.h
index b6a496dd1..7943fc569 100644
--- a/include/global.h
+++ b/include/global.h
@@ -31,6 +31,8 @@ char* strcpy(char *dst0, const char *src0);
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
+#define HEAP_SIZE 0x1C000
+
extern u8 gStringVar1[];
extern u8 gStringVar2[];
extern u8 gStringVar3[];
diff --git a/include/graphics.h b/include/graphics.h
index 0a38c9b82..85e31aec9 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -28,6 +28,2415 @@ extern const u8 gInterfaceGfx_PremierBall[];
extern const u8 gInterfacePal_PremierBall[];
extern const u8 gOpenPokeballGfx[];
+// pokemon gfx
+extern const u8 gMonFrontPic_Bulbasaur[];
+extern const u8 gMonPalette_Bulbasaur[];
+extern const u8 gMonBackPic_Bulbasaur[];
+extern const u8 gMonShinyPalette_Bulbasaur[];
+extern const u8 gMonIcon_Bulbasaur[];
+extern const u8 gMonFootprint_Bulbasaur[];
+extern const u8 gMonFrontPic_Ivysaur[];
+extern const u8 gMonPalette_Ivysaur[];
+extern const u8 gMonBackPic_Ivysaur[];
+extern const u8 gMonShinyPalette_Ivysaur[];
+extern const u8 gMonIcon_Ivysaur[];
+extern const u8 gMonFootprint_Ivysaur[];
+extern const u8 gMonFrontPic_Venusaur[];
+extern const u8 gMonPalette_Venusaur[];
+extern const u8 gMonBackPic_Venusaur[];
+extern const u8 gMonShinyPalette_Venusaur[];
+extern const u8 gMonIcon_Venusaur[];
+extern const u8 gMonFootprint_Venusaur[];
+extern const u8 gMonFrontPic_Charmander[];
+extern const u8 gMonPalette_Charmander[];
+extern const u8 gMonBackPic_Charmander[];
+extern const u8 gMonShinyPalette_Charmander[];
+extern const u8 gMonIcon_Charmander[];
+extern const u8 gMonFootprint_Charmander[];
+extern const u8 gMonFrontPic_Charmeleon[];
+extern const u8 gMonPalette_Charmeleon[];
+extern const u8 gMonBackPic_Charmeleon[];
+extern const u8 gMonShinyPalette_Charmeleon[];
+extern const u8 gMonIcon_Charmeleon[];
+extern const u8 gMonFootprint_Charmeleon[];
+extern const u8 gMonFrontPic_Charizard[];
+extern const u8 gMonPalette_Charizard[];
+extern const u8 gMonBackPic_Charizard[];
+extern const u8 gMonShinyPalette_Charizard[];
+extern const u8 gMonIcon_Charizard[];
+extern const u8 gMonFootprint_Charizard[];
+extern const u8 gMonFrontPic_Squirtle[];
+extern const u8 gMonPalette_Squirtle[];
+extern const u8 gMonBackPic_Squirtle[];
+extern const u8 gMonShinyPalette_Squirtle[];
+extern const u8 gMonIcon_Squirtle[];
+extern const u8 gMonFootprint_Squirtle[];
+extern const u8 gMonFrontPic_Wartortle[];
+extern const u8 gMonPalette_Wartortle[];
+extern const u8 gMonBackPic_Wartortle[];
+extern const u8 gMonShinyPalette_Wartortle[];
+extern const u8 gMonIcon_Wartortle[];
+extern const u8 gMonFootprint_Wartortle[];
+extern const u8 gMonFrontPic_Blastoise[];
+extern const u8 gMonPalette_Blastoise[];
+extern const u8 gMonBackPic_Blastoise[];
+extern const u8 gMonShinyPalette_Blastoise[];
+extern const u8 gMonIcon_Blastoise[];
+extern const u8 gMonFootprint_Blastoise[];
+extern const u8 gMonFrontPic_Caterpie[];
+extern const u8 gMonPalette_Caterpie[];
+extern const u8 gMonBackPic_Caterpie[];
+extern const u8 gMonShinyPalette_Caterpie[];
+extern const u8 gMonIcon_Caterpie[];
+extern const u8 gMonFootprint_Caterpie[];
+extern const u8 gMonFrontPic_Metapod[];
+extern const u8 gMonPalette_Metapod[];
+extern const u8 gMonBackPic_Metapod[];
+extern const u8 gMonShinyPalette_Metapod[];
+extern const u8 gMonIcon_Metapod[];
+extern const u8 gMonFootprint_Metapod[];
+extern const u8 gMonFrontPic_Butterfree[];
+extern const u8 gMonPalette_Butterfree[];
+extern const u8 gMonBackPic_Butterfree[];
+extern const u8 gMonShinyPalette_Butterfree[];
+extern const u8 gMonIcon_Butterfree[];
+extern const u8 gMonFootprint_Butterfree[];
+extern const u8 gMonFrontPic_Weedle[];
+extern const u8 gMonPalette_Weedle[];
+extern const u8 gMonBackPic_Weedle[];
+extern const u8 gMonShinyPalette_Weedle[];
+extern const u8 gMonIcon_Weedle[];
+extern const u8 gMonFootprint_Weedle[];
+extern const u8 gMonFrontPic_Kakuna[];
+extern const u8 gMonPalette_Kakuna[];
+extern const u8 gMonBackPic_Kakuna[];
+extern const u8 gMonShinyPalette_Kakuna[];
+extern const u8 gMonIcon_Kakuna[];
+extern const u8 gMonFootprint_Kakuna[];
+extern const u8 gMonFrontPic_Beedrill[];
+extern const u8 gMonPalette_Beedrill[];
+extern const u8 gMonBackPic_Beedrill[];
+extern const u8 gMonShinyPalette_Beedrill[];
+extern const u8 gMonIcon_Beedrill[];
+extern const u8 gMonFootprint_Beedrill[];
+extern const u8 gMonFrontPic_Pidgey[];
+extern const u8 gMonPalette_Pidgey[];
+extern const u8 gMonBackPic_Pidgey[];
+extern const u8 gMonShinyPalette_Pidgey[];
+extern const u8 gMonIcon_Pidgey[];
+extern const u8 gMonFootprint_Pidgey[];
+extern const u8 gMonFrontPic_Pidgeotto[];
+extern const u8 gMonPalette_Pidgeotto[];
+extern const u8 gMonBackPic_Pidgeotto[];
+extern const u8 gMonShinyPalette_Pidgeotto[];
+extern const u8 gMonIcon_Pidgeotto[];
+extern const u8 gMonFootprint_Pidgeotto[];
+extern const u8 gMonFrontPic_Pidgeot[];
+extern const u8 gMonPalette_Pidgeot[];
+extern const u8 gMonBackPic_Pidgeot[];
+extern const u8 gMonShinyPalette_Pidgeot[];
+extern const u8 gMonIcon_Pidgeot[];
+extern const u8 gMonFootprint_Pidgeot[];
+extern const u8 gMonFrontPic_Rattata[];
+extern const u8 gMonPalette_Rattata[];
+extern const u8 gMonBackPic_Rattata[];
+extern const u8 gMonShinyPalette_Rattata[];
+extern const u8 gMonIcon_Rattata[];
+extern const u8 gMonFootprint_Rattata[];
+extern const u8 gMonFrontPic_Raticate[];
+extern const u8 gMonPalette_Raticate[];
+extern const u8 gMonBackPic_Raticate[];
+extern const u8 gMonShinyPalette_Raticate[];
+extern const u8 gMonIcon_Raticate[];
+extern const u8 gMonFootprint_Raticate[];
+extern const u8 gMonFrontPic_Spearow[];
+extern const u8 gMonPalette_Spearow[];
+extern const u8 gMonBackPic_Spearow[];
+extern const u8 gMonShinyPalette_Spearow[];
+extern const u8 gMonIcon_Spearow[];
+extern const u8 gMonFootprint_Spearow[];
+extern const u8 gMonFrontPic_Fearow[];
+extern const u8 gMonPalette_Fearow[];
+extern const u8 gMonBackPic_Fearow[];
+extern const u8 gMonShinyPalette_Fearow[];
+extern const u8 gMonIcon_Fearow[];
+extern const u8 gMonFootprint_Fearow[];
+extern const u8 gMonFrontPic_Ekans[];
+extern const u8 gMonPalette_Ekans[];
+extern const u8 gMonBackPic_Ekans[];
+extern const u8 gMonShinyPalette_Ekans[];
+extern const u8 gMonIcon_Ekans[];
+extern const u8 gMonFootprint_Ekans[];
+extern const u8 gMonFrontPic_Arbok[];
+extern const u8 gMonPalette_Arbok[];
+extern const u8 gMonBackPic_Arbok[];
+extern const u8 gMonShinyPalette_Arbok[];
+extern const u8 gMonIcon_Arbok[];
+extern const u8 gMonFootprint_Arbok[];
+extern const u8 gMonFrontPic_Pikachu[];
+extern const u8 gMonPalette_Pikachu[];
+extern const u8 gMonBackPic_Pikachu[];
+extern const u8 gMonShinyPalette_Pikachu[];
+extern const u8 gMonIcon_Pikachu[];
+extern const u8 gMonFootprint_Pikachu[];
+extern const u8 gMonFrontPic_Raichu[];
+extern const u8 gMonPalette_Raichu[];
+extern const u8 gMonBackPic_Raichu[];
+extern const u8 gMonShinyPalette_Raichu[];
+extern const u8 gMonIcon_Raichu[];
+extern const u8 gMonFootprint_Raichu[];
+extern const u8 gMonFrontPic_Sandshrew[];
+extern const u8 gMonPalette_Sandshrew[];
+extern const u8 gMonBackPic_Sandshrew[];
+extern const u8 gMonShinyPalette_Sandshrew[];
+extern const u8 gMonIcon_Sandshrew[];
+extern const u8 gMonFootprint_Sandshrew[];
+extern const u8 gMonFrontPic_Sandslash[];
+extern const u8 gMonPalette_Sandslash[];
+extern const u8 gMonBackPic_Sandslash[];
+extern const u8 gMonShinyPalette_Sandslash[];
+extern const u8 gMonIcon_Sandslash[];
+extern const u8 gMonFootprint_Sandslash[];
+extern const u8 gMonFrontPic_NidoranF[];
+extern const u8 gMonPalette_NidoranF[];
+extern const u8 gMonBackPic_NidoranF[];
+extern const u8 gMonShinyPalette_NidoranF[];
+extern const u8 gMonIcon_NidoranF[];
+extern const u8 gMonFootprint_NidoranF[];
+extern const u8 gMonFrontPic_Nidorina[];
+extern const u8 gMonPalette_Nidorina[];
+extern const u8 gMonBackPic_Nidorina[];
+extern const u8 gMonShinyPalette_Nidorina[];
+extern const u8 gMonIcon_Nidorina[];
+extern const u8 gMonFootprint_Nidorina[];
+extern const u8 gMonFrontPic_Nidoqueen[];
+extern const u8 gMonPalette_Nidoqueen[];
+extern const u8 gMonBackPic_Nidoqueen[];
+extern const u8 gMonShinyPalette_Nidoqueen[];
+extern const u8 gMonIcon_Nidoqueen[];
+extern const u8 gMonFootprint_Nidoqueen[];
+extern const u8 gMonFrontPic_NidoranM[];
+extern const u8 gMonPalette_NidoranM[];
+extern const u8 gMonBackPic_NidoranM[];
+extern const u8 gMonShinyPalette_NidoranM[];
+extern const u8 gMonIcon_NidoranM[];
+extern const u8 gMonFootprint_NidoranM[];
+extern const u8 gMonFrontPic_Nidorino[];
+extern const u8 gMonPalette_Nidorino[];
+extern const u8 gMonBackPic_Nidorino[];
+extern const u8 gMonShinyPalette_Nidorino[];
+extern const u8 gMonIcon_Nidorino[];
+extern const u8 gMonFootprint_Nidorino[];
+extern const u8 gMonFrontPic_Nidoking[];
+extern const u8 gMonPalette_Nidoking[];
+extern const u8 gMonBackPic_Nidoking[];
+extern const u8 gMonShinyPalette_Nidoking[];
+extern const u8 gMonIcon_Nidoking[];
+extern const u8 gMonFootprint_Nidoking[];
+extern const u8 gMonFrontPic_Clefairy[];
+extern const u8 gMonPalette_Clefairy[];
+extern const u8 gMonBackPic_Clefairy[];
+extern const u8 gMonShinyPalette_Clefairy[];
+extern const u8 gMonIcon_Clefairy[];
+extern const u8 gMonFootprint_Clefairy[];
+extern const u8 gMonFrontPic_Clefable[];
+extern const u8 gMonPalette_Clefable[];
+extern const u8 gMonBackPic_Clefable[];
+extern const u8 gMonShinyPalette_Clefable[];
+extern const u8 gMonIcon_Clefable[];
+extern const u8 gMonFootprint_Clefable[];
+extern const u8 gMonFrontPic_Vulpix[];
+extern const u8 gMonPalette_Vulpix[];
+extern const u8 gMonBackPic_Vulpix[];
+extern const u8 gMonShinyPalette_Vulpix[];
+extern const u8 gMonIcon_Vulpix[];
+extern const u8 gMonFootprint_Vulpix[];
+extern const u8 gMonFrontPic_Ninetales[];
+extern const u8 gMonPalette_Ninetales[];
+extern const u8 gMonBackPic_Ninetales[];
+extern const u8 gMonShinyPalette_Ninetales[];
+extern const u8 gMonIcon_Ninetales[];
+extern const u8 gMonFootprint_Ninetales[];
+extern const u8 gMonFrontPic_Jigglypuff[];
+extern const u8 gMonPalette_Jigglypuff[];
+extern const u8 gMonBackPic_Jigglypuff[];
+extern const u8 gMonShinyPalette_Jigglypuff[];
+extern const u8 gMonIcon_Jigglypuff[];
+extern const u8 gMonFootprint_Jigglypuff[];
+extern const u8 gMonFrontPic_Wigglytuff[];
+extern const u8 gMonPalette_Wigglytuff[];
+extern const u8 gMonBackPic_Wigglytuff[];
+extern const u8 gMonShinyPalette_Wigglytuff[];
+extern const u8 gMonIcon_Wigglytuff[];
+extern const u8 gMonFootprint_Wigglytuff[];
+extern const u8 gMonFrontPic_Zubat[];
+extern const u8 gMonPalette_Zubat[];
+extern const u8 gMonBackPic_Zubat[];
+extern const u8 gMonShinyPalette_Zubat[];
+extern const u8 gMonIcon_Zubat[];
+extern const u8 gMonFootprint_Zubat[];
+extern const u8 gMonFrontPic_Golbat[];
+extern const u8 gMonPalette_Golbat[];
+extern const u8 gMonBackPic_Golbat[];
+extern const u8 gMonShinyPalette_Golbat[];
+extern const u8 gMonIcon_Golbat[];
+extern const u8 gMonFootprint_Golbat[];
+extern const u8 gMonFrontPic_Oddish[];
+extern const u8 gMonPalette_Oddish[];
+extern const u8 gMonBackPic_Oddish[];
+extern const u8 gMonShinyPalette_Oddish[];
+extern const u8 gMonIcon_Oddish[];
+extern const u8 gMonFootprint_Oddish[];
+extern const u8 gMonFrontPic_Gloom[];
+extern const u8 gMonPalette_Gloom[];
+extern const u8 gMonBackPic_Gloom[];
+extern const u8 gMonShinyPalette_Gloom[];
+extern const u8 gMonIcon_Gloom[];
+extern const u8 gMonFootprint_Gloom[];
+extern const u8 gMonFrontPic_Vileplume[];
+extern const u8 gMonPalette_Vileplume[];
+extern const u8 gMonBackPic_Vileplume[];
+extern const u8 gMonShinyPalette_Vileplume[];
+extern const u8 gMonIcon_Vileplume[];
+extern const u8 gMonFootprint_Vileplume[];
+extern const u8 gMonFrontPic_Paras[];
+extern const u8 gMonPalette_Paras[];
+extern const u8 gMonBackPic_Paras[];
+extern const u8 gMonShinyPalette_Paras[];
+extern const u8 gMonIcon_Paras[];
+extern const u8 gMonFootprint_Paras[];
+extern const u8 gMonFrontPic_Parasect[];
+extern const u8 gMonPalette_Parasect[];
+extern const u8 gMonBackPic_Parasect[];
+extern const u8 gMonShinyPalette_Parasect[];
+extern const u8 gMonIcon_Parasect[];
+extern const u8 gMonFootprint_Parasect[];
+extern const u8 gMonFrontPic_Venonat[];
+extern const u8 gMonPalette_Venonat[];
+extern const u8 gMonBackPic_Venonat[];
+extern const u8 gMonShinyPalette_Venonat[];
+extern const u8 gMonIcon_Venonat[];
+extern const u8 gMonFootprint_Venonat[];
+extern const u8 gMonFrontPic_Venomoth[];
+extern const u8 gMonPalette_Venomoth[];
+extern const u8 gMonBackPic_Venomoth[];
+extern const u8 gMonShinyPalette_Venomoth[];
+extern const u8 gMonIcon_Venomoth[];
+extern const u8 gMonFootprint_Venomoth[];
+extern const u8 gMonFrontPic_Diglett[];
+extern const u8 gMonPalette_Diglett[];
+extern const u8 gMonBackPic_Diglett[];
+extern const u8 gMonShinyPalette_Diglett[];
+extern const u8 gMonIcon_Diglett[];
+extern const u8 gMonFootprint_Diglett[];
+extern const u8 gMonFrontPic_Dugtrio[];
+extern const u8 gMonPalette_Dugtrio[];
+extern const u8 gMonBackPic_Dugtrio[];
+extern const u8 gMonShinyPalette_Dugtrio[];
+extern const u8 gMonIcon_Dugtrio[];
+extern const u8 gMonFootprint_Dugtrio[];
+extern const u8 gMonFrontPic_Meowth[];
+extern const u8 gMonPalette_Meowth[];
+extern const u8 gMonBackPic_Meowth[];
+extern const u8 gMonShinyPalette_Meowth[];
+extern const u8 gMonIcon_Meowth[];
+extern const u8 gMonFootprint_Meowth[];
+extern const u8 gMonFrontPic_Persian[];
+extern const u8 gMonPalette_Persian[];
+extern const u8 gMonBackPic_Persian[];
+extern const u8 gMonShinyPalette_Persian[];
+extern const u8 gMonIcon_Persian[];
+extern const u8 gMonFootprint_Persian[];
+extern const u8 gMonFrontPic_Psyduck[];
+extern const u8 gMonPalette_Psyduck[];
+extern const u8 gMonBackPic_Psyduck[];
+extern const u8 gMonShinyPalette_Psyduck[];
+extern const u8 gMonIcon_Psyduck[];
+extern const u8 gMonFootprint_Psyduck[];
+extern const u8 gMonFrontPic_Golduck[];
+extern const u8 gMonPalette_Golduck[];
+extern const u8 gMonBackPic_Golduck[];
+extern const u8 gMonShinyPalette_Golduck[];
+extern const u8 gMonIcon_Golduck[];
+extern const u8 gMonFootprint_Golduck[];
+extern const u8 gMonFrontPic_Mankey[];
+extern const u8 gMonPalette_Mankey[];
+extern const u8 gMonBackPic_Mankey[];
+extern const u8 gMonShinyPalette_Mankey[];
+extern const u8 gMonIcon_Mankey[];
+extern const u8 gMonFootprint_Mankey[];
+extern const u8 gMonFrontPic_Primeape[];
+extern const u8 gMonPalette_Primeape[];
+extern const u8 gMonBackPic_Primeape[];
+extern const u8 gMonShinyPalette_Primeape[];
+extern const u8 gMonIcon_Primeape[];
+extern const u8 gMonFootprint_Primeape[];
+extern const u8 gMonFrontPic_Growlithe[];
+extern const u8 gMonPalette_Growlithe[];
+extern const u8 gMonBackPic_Growlithe[];
+extern const u8 gMonShinyPalette_Growlithe[];
+extern const u8 gMonIcon_Growlithe[];
+extern const u8 gMonFootprint_Growlithe[];
+extern const u8 gMonFrontPic_Arcanine[];
+extern const u8 gMonPalette_Arcanine[];
+extern const u8 gMonBackPic_Arcanine[];
+extern const u8 gMonShinyPalette_Arcanine[];
+extern const u8 gMonIcon_Arcanine[];
+extern const u8 gMonFootprint_Arcanine[];
+extern const u8 gMonFrontPic_Poliwag[];
+extern const u8 gMonPalette_Poliwag[];
+extern const u8 gMonBackPic_Poliwag[];
+extern const u8 gMonShinyPalette_Poliwag[];
+extern const u8 gMonIcon_Poliwag[];
+extern const u8 gMonFootprint_Poliwag[];
+extern const u8 gMonFrontPic_Poliwhirl[];
+extern const u8 gMonPalette_Poliwhirl[];
+extern const u8 gMonBackPic_Poliwhirl[];
+extern const u8 gMonShinyPalette_Poliwhirl[];
+extern const u8 gMonIcon_Poliwhirl[];
+extern const u8 gMonFootprint_Poliwhirl[];
+extern const u8 gMonFrontPic_Poliwrath[];
+extern const u8 gMonPalette_Poliwrath[];
+extern const u8 gMonBackPic_Poliwrath[];
+extern const u8 gMonShinyPalette_Poliwrath[];
+extern const u8 gMonIcon_Poliwrath[];
+extern const u8 gMonFootprint_Poliwrath[];
+extern const u8 gMonFrontPic_Abra[];
+extern const u8 gMonPalette_Abra[];
+extern const u8 gMonBackPic_Abra[];
+extern const u8 gMonShinyPalette_Abra[];
+extern const u8 gMonIcon_Abra[];
+extern const u8 gMonFootprint_Abra[];
+extern const u8 gMonFrontPic_Kadabra[];
+extern const u8 gMonPalette_Kadabra[];
+extern const u8 gMonBackPic_Kadabra[];
+extern const u8 gMonShinyPalette_Kadabra[];
+extern const u8 gMonIcon_Kadabra[];
+extern const u8 gMonFootprint_Kadabra[];
+extern const u8 gMonFrontPic_Alakazam[];
+extern const u8 gMonPalette_Alakazam[];
+extern const u8 gMonBackPic_Alakazam[];
+extern const u8 gMonShinyPalette_Alakazam[];
+extern const u8 gMonIcon_Alakazam[];
+extern const u8 gMonFootprint_Alakazam[];
+extern const u8 gMonFrontPic_Machop[];
+extern const u8 gMonPalette_Machop[];
+extern const u8 gMonBackPic_Machop[];
+extern const u8 gMonShinyPalette_Machop[];
+extern const u8 gMonIcon_Machop[];
+extern const u8 gMonFootprint_Machop[];
+extern const u8 gMonFrontPic_Machoke[];
+extern const u8 gMonPalette_Machoke[];
+extern const u8 gMonBackPic_Machoke[];
+extern const u8 gMonShinyPalette_Machoke[];
+extern const u8 gMonIcon_Machoke[];
+extern const u8 gMonFootprint_Machoke[];
+extern const u8 gMonFrontPic_Machamp[];
+extern const u8 gMonPalette_Machamp[];
+extern const u8 gMonBackPic_Machamp[];
+extern const u8 gMonShinyPalette_Machamp[];
+extern const u8 gMonIcon_Machamp[];
+extern const u8 gMonFootprint_Machamp[];
+extern const u8 gMonFrontPic_Bellsprout[];
+extern const u8 gMonPalette_Bellsprout[];
+extern const u8 gMonBackPic_Bellsprout[];
+extern const u8 gMonShinyPalette_Bellsprout[];
+extern const u8 gMonIcon_Bellsprout[];
+extern const u8 gMonFootprint_Bellsprout[];
+extern const u8 gMonFrontPic_Weepinbell[];
+extern const u8 gMonPalette_Weepinbell[];
+extern const u8 gMonBackPic_Weepinbell[];
+extern const u8 gMonShinyPalette_Weepinbell[];
+extern const u8 gMonIcon_Weepinbell[];
+extern const u8 gMonFootprint_Weepinbell[];
+extern const u8 gMonFrontPic_Victreebel[];
+extern const u8 gMonPalette_Victreebel[];
+extern const u8 gMonBackPic_Victreebel[];
+extern const u8 gMonShinyPalette_Victreebel[];
+extern const u8 gMonIcon_Victreebel[];
+extern const u8 gMonFootprint_Victreebel[];
+extern const u8 gMonFrontPic_Tentacool[];
+extern const u8 gMonPalette_Tentacool[];
+extern const u8 gMonBackPic_Tentacool[];
+extern const u8 gMonShinyPalette_Tentacool[];
+extern const u8 gMonIcon_Tentacool[];
+extern const u8 gMonFootprint_Tentacool[];
+extern const u8 gMonFrontPic_Tentacruel[];
+extern const u8 gMonPalette_Tentacruel[];
+extern const u8 gMonBackPic_Tentacruel[];
+extern const u8 gMonShinyPalette_Tentacruel[];
+extern const u8 gMonIcon_Tentacruel[];
+extern const u8 gMonFootprint_Tentacruel[];
+extern const u8 gMonFrontPic_Geodude[];
+extern const u8 gMonPalette_Geodude[];
+extern const u8 gMonBackPic_Geodude[];
+extern const u8 gMonShinyPalette_Geodude[];
+extern const u8 gMonIcon_Geodude[];
+extern const u8 gMonFootprint_Geodude[];
+extern const u8 gMonFrontPic_Graveler[];
+extern const u8 gMonPalette_Graveler[];
+extern const u8 gMonBackPic_Graveler[];
+extern const u8 gMonShinyPalette_Graveler[];
+extern const u8 gMonIcon_Graveler[];
+extern const u8 gMonFootprint_Graveler[];
+extern const u8 gMonFrontPic_Golem[];
+extern const u8 gMonPalette_Golem[];
+extern const u8 gMonBackPic_Golem[];
+extern const u8 gMonShinyPalette_Golem[];
+extern const u8 gMonIcon_Golem[];
+extern const u8 gMonFootprint_Golem[];
+extern const u8 gMonFrontPic_Ponyta[];
+extern const u8 gMonPalette_Ponyta[];
+extern const u8 gMonBackPic_Ponyta[];
+extern const u8 gMonShinyPalette_Ponyta[];
+extern const u8 gMonIcon_Ponyta[];
+extern const u8 gMonFootprint_Ponyta[];
+extern const u8 gMonFrontPic_Rapidash[];
+extern const u8 gMonPalette_Rapidash[];
+extern const u8 gMonBackPic_Rapidash[];
+extern const u8 gMonShinyPalette_Rapidash[];
+extern const u8 gMonIcon_Rapidash[];
+extern const u8 gMonFootprint_Rapidash[];
+extern const u8 gMonFrontPic_Slowpoke[];
+extern const u8 gMonPalette_Slowpoke[];
+extern const u8 gMonBackPic_Slowpoke[];
+extern const u8 gMonShinyPalette_Slowpoke[];
+extern const u8 gMonIcon_Slowpoke[];
+extern const u8 gMonFootprint_Slowpoke[];
+extern const u8 gMonFrontPic_Slowbro[];
+extern const u8 gMonPalette_Slowbro[];
+extern const u8 gMonBackPic_Slowbro[];
+extern const u8 gMonShinyPalette_Slowbro[];
+extern const u8 gMonIcon_Slowbro[];
+extern const u8 gMonFootprint_Slowbro[];
+extern const u8 gMonFrontPic_Magnemite[];
+extern const u8 gMonPalette_Magnemite[];
+extern const u8 gMonBackPic_Magnemite[];
+extern const u8 gMonShinyPalette_Magnemite[];
+extern const u8 gMonIcon_Magnemite[];
+extern const u8 gMonFootprint_Magnemite[];
+extern const u8 gMonFrontPic_Magneton[];
+extern const u8 gMonPalette_Magneton[];
+extern const u8 gMonBackPic_Magneton[];
+extern const u8 gMonShinyPalette_Magneton[];
+extern const u8 gMonIcon_Magneton[];
+extern const u8 gMonFootprint_Magneton[];
+extern const u8 gMonFrontPic_Farfetchd[];
+extern const u8 gMonPalette_Farfetchd[];
+extern const u8 gMonBackPic_Farfetchd[];
+extern const u8 gMonShinyPalette_Farfetchd[];
+extern const u8 gMonIcon_Farfetchd[];
+extern const u8 gMonFootprint_Farfetchd[];
+extern const u8 gMonFrontPic_Doduo[];
+extern const u8 gMonPalette_Doduo[];
+extern const u8 gMonBackPic_Doduo[];
+extern const u8 gMonShinyPalette_Doduo[];
+extern const u8 gMonIcon_Doduo[];
+extern const u8 gMonFootprint_Doduo[];
+extern const u8 gMonFrontPic_Dodrio[];
+extern const u8 gMonPalette_Dodrio[];
+extern const u8 gMonBackPic_Dodrio[];
+extern const u8 gMonShinyPalette_Dodrio[];
+extern const u8 gMonIcon_Dodrio[];
+extern const u8 gMonFootprint_Dodrio[];
+extern const u8 gMonFrontPic_Seel[];
+extern const u8 gMonPalette_Seel[];
+extern const u8 gMonBackPic_Seel[];
+extern const u8 gMonShinyPalette_Seel[];
+extern const u8 gMonIcon_Seel[];
+extern const u8 gMonFootprint_Seel[];
+extern const u8 gMonFrontPic_Dewgong[];
+extern const u8 gMonPalette_Dewgong[];
+extern const u8 gMonBackPic_Dewgong[];
+extern const u8 gMonShinyPalette_Dewgong[];
+extern const u8 gMonIcon_Dewgong[];
+extern const u8 gMonFootprint_Dewgong[];
+extern const u8 gMonFrontPic_Grimer[];
+extern const u8 gMonPalette_Grimer[];
+extern const u8 gMonBackPic_Grimer[];
+extern const u8 gMonShinyPalette_Grimer[];
+extern const u8 gMonIcon_Grimer[];
+extern const u8 gMonFootprint_Grimer[];
+extern const u8 gMonFrontPic_Muk[];
+extern const u8 gMonPalette_Muk[];
+extern const u8 gMonBackPic_Muk[];
+extern const u8 gMonShinyPalette_Muk[];
+extern const u8 gMonIcon_Muk[];
+extern const u8 gMonFootprint_Muk[];
+extern const u8 gMonFrontPic_Shellder[];
+extern const u8 gMonPalette_Shellder[];
+extern const u8 gMonBackPic_Shellder[];
+extern const u8 gMonShinyPalette_Shellder[];
+extern const u8 gMonIcon_Shellder[];
+extern const u8 gMonFootprint_Shellder[];
+extern const u8 gMonFrontPic_Cloyster[];
+extern const u8 gMonPalette_Cloyster[];
+extern const u8 gMonBackPic_Cloyster[];
+extern const u8 gMonShinyPalette_Cloyster[];
+extern const u8 gMonIcon_Cloyster[];
+extern const u8 gMonFootprint_Cloyster[];
+extern const u8 gMonFrontPic_Gastly[];
+extern const u8 gMonPalette_Gastly[];
+extern const u8 gMonBackPic_Gastly[];
+extern const u8 gMonShinyPalette_Gastly[];
+extern const u8 gMonIcon_Gastly[];
+extern const u8 gMonFootprint_Gastly[];
+extern const u8 gMonFrontPic_Haunter[];
+extern const u8 gMonPalette_Haunter[];
+extern const u8 gMonBackPic_Haunter[];
+extern const u8 gMonShinyPalette_Haunter[];
+extern const u8 gMonIcon_Haunter[];
+extern const u8 gMonFootprint_Haunter[];
+extern const u8 gMonFrontPic_Gengar[];
+extern const u8 gMonPalette_Gengar[];
+extern const u8 gMonBackPic_Gengar[];
+extern const u8 gMonShinyPalette_Gengar[];
+extern const u8 gMonIcon_Gengar[];
+extern const u8 gMonFootprint_Gengar[];
+extern const u8 gMonFrontPic_Onix[];
+extern const u8 gMonPalette_Onix[];
+extern const u8 gMonBackPic_Onix[];
+extern const u8 gMonShinyPalette_Onix[];
+extern const u8 gMonIcon_Onix[];
+extern const u8 gMonFootprint_Onix[];
+extern const u8 gMonFrontPic_Drowzee[];
+extern const u8 gMonPalette_Drowzee[];
+extern const u8 gMonBackPic_Drowzee[];
+extern const u8 gMonShinyPalette_Drowzee[];
+extern const u8 gMonIcon_Drowzee[];
+extern const u8 gMonFootprint_Drowzee[];
+extern const u8 gMonFrontPic_Hypno[];
+extern const u8 gMonPalette_Hypno[];
+extern const u8 gMonBackPic_Hypno[];
+extern const u8 gMonShinyPalette_Hypno[];
+extern const u8 gMonIcon_Hypno[];
+extern const u8 gMonFootprint_Hypno[];
+extern const u8 gMonFrontPic_Krabby[];
+extern const u8 gMonPalette_Krabby[];
+extern const u8 gMonBackPic_Krabby[];
+extern const u8 gMonShinyPalette_Krabby[];
+extern const u8 gMonIcon_Krabby[];
+extern const u8 gMonFootprint_Krabby[];
+extern const u8 gMonFrontPic_Kingler[];
+extern const u8 gMonPalette_Kingler[];
+extern const u8 gMonBackPic_Kingler[];
+extern const u8 gMonShinyPalette_Kingler[];
+extern const u8 gMonIcon_Kingler[];
+extern const u8 gMonFootprint_Kingler[];
+extern const u8 gMonFrontPic_Voltorb[];
+extern const u8 gMonPalette_Voltorb[];
+extern const u8 gMonBackPic_Voltorb[];
+extern const u8 gMonShinyPalette_Voltorb[];
+extern const u8 gMonIcon_Voltorb[];
+extern const u8 gMonFootprint_Voltorb[];
+extern const u8 gMonFrontPic_Electrode[];
+extern const u8 gMonPalette_Electrode[];
+extern const u8 gMonBackPic_Electrode[];
+extern const u8 gMonShinyPalette_Electrode[];
+extern const u8 gMonIcon_Electrode[];
+extern const u8 gMonFootprint_Electrode[];
+extern const u8 gMonFrontPic_Exeggcute[];
+extern const u8 gMonPalette_Exeggcute[];
+extern const u8 gMonBackPic_Exeggcute[];
+extern const u8 gMonShinyPalette_Exeggcute[];
+extern const u8 gMonIcon_Exeggcute[];
+extern const u8 gMonFootprint_Exeggcute[];
+extern const u8 gMonFrontPic_Exeggutor[];
+extern const u8 gMonPalette_Exeggutor[];
+extern const u8 gMonBackPic_Exeggutor[];
+extern const u8 gMonShinyPalette_Exeggutor[];
+extern const u8 gMonIcon_Exeggutor[];
+extern const u8 gMonFootprint_Exeggutor[];
+extern const u8 gMonFrontPic_Cubone[];
+extern const u8 gMonPalette_Cubone[];
+extern const u8 gMonBackPic_Cubone[];
+extern const u8 gMonShinyPalette_Cubone[];
+extern const u8 gMonIcon_Cubone[];
+extern const u8 gMonFootprint_Cubone[];
+extern const u8 gMonFrontPic_Marowak[];
+extern const u8 gMonPalette_Marowak[];
+extern const u8 gMonBackPic_Marowak[];
+extern const u8 gMonShinyPalette_Marowak[];
+extern const u8 gMonIcon_Marowak[];
+extern const u8 gMonFootprint_Marowak[];
+extern const u8 gMonFrontPic_Hitmonlee[];
+extern const u8 gMonPalette_Hitmonlee[];
+extern const u8 gMonBackPic_Hitmonlee[];
+extern const u8 gMonShinyPalette_Hitmonlee[];
+extern const u8 gMonIcon_Hitmonlee[];
+extern const u8 gMonFootprint_Hitmonlee[];
+extern const u8 gMonFrontPic_Hitmonchan[];
+extern const u8 gMonPalette_Hitmonchan[];
+extern const u8 gMonBackPic_Hitmonchan[];
+extern const u8 gMonShinyPalette_Hitmonchan[];
+extern const u8 gMonIcon_Hitmonchan[];
+extern const u8 gMonFootprint_Hitmonchan[];
+extern const u8 gMonFrontPic_Lickitung[];
+extern const u8 gMonPalette_Lickitung[];
+extern const u8 gMonBackPic_Lickitung[];
+extern const u8 gMonShinyPalette_Lickitung[];
+extern const u8 gMonIcon_Lickitung[];
+extern const u8 gMonFootprint_Lickitung[];
+extern const u8 gMonFrontPic_Koffing[];
+extern const u8 gMonPalette_Koffing[];
+extern const u8 gMonBackPic_Koffing[];
+extern const u8 gMonShinyPalette_Koffing[];
+extern const u8 gMonIcon_Koffing[];
+extern const u8 gMonFootprint_Koffing[];
+extern const u8 gMonFrontPic_Weezing[];
+extern const u8 gMonPalette_Weezing[];
+extern const u8 gMonBackPic_Weezing[];
+extern const u8 gMonShinyPalette_Weezing[];
+extern const u8 gMonIcon_Weezing[];
+extern const u8 gMonFootprint_Weezing[];
+extern const u8 gMonFrontPic_Rhyhorn[];
+extern const u8 gMonPalette_Rhyhorn[];
+extern const u8 gMonBackPic_Rhyhorn[];
+extern const u8 gMonShinyPalette_Rhyhorn[];
+extern const u8 gMonIcon_Rhyhorn[];
+extern const u8 gMonFootprint_Rhyhorn[];
+extern const u8 gMonFrontPic_Rhydon[];
+extern const u8 gMonPalette_Rhydon[];
+extern const u8 gMonBackPic_Rhydon[];
+extern const u8 gMonShinyPalette_Rhydon[];
+extern const u8 gMonIcon_Rhydon[];
+extern const u8 gMonFootprint_Rhydon[];
+extern const u8 gMonFrontPic_Chansey[];
+extern const u8 gMonPalette_Chansey[];
+extern const u8 gMonBackPic_Chansey[];
+extern const u8 gMonShinyPalette_Chansey[];
+extern const u8 gMonIcon_Chansey[];
+extern const u8 gMonFootprint_Chansey[];
+extern const u8 gMonFrontPic_Tangela[];
+extern const u8 gMonPalette_Tangela[];
+extern const u8 gMonBackPic_Tangela[];
+extern const u8 gMonShinyPalette_Tangela[];
+extern const u8 gMonIcon_Tangela[];
+extern const u8 gMonFootprint_Tangela[];
+extern const u8 gMonFrontPic_Kangaskhan[];
+extern const u8 gMonPalette_Kangaskhan[];
+extern const u8 gMonBackPic_Kangaskhan[];
+extern const u8 gMonShinyPalette_Kangaskhan[];
+extern const u8 gMonIcon_Kangaskhan[];
+extern const u8 gMonFootprint_Kangaskhan[];
+extern const u8 gMonFrontPic_Horsea[];
+extern const u8 gMonPalette_Horsea[];
+extern const u8 gMonBackPic_Horsea[];
+extern const u8 gMonShinyPalette_Horsea[];
+extern const u8 gMonIcon_Horsea[];
+extern const u8 gMonFootprint_Horsea[];
+extern const u8 gMonFrontPic_Seadra[];
+extern const u8 gMonPalette_Seadra[];
+extern const u8 gMonBackPic_Seadra[];
+extern const u8 gMonShinyPalette_Seadra[];
+extern const u8 gMonIcon_Seadra[];
+extern const u8 gMonFootprint_Seadra[];
+extern const u8 gMonFrontPic_Goldeen[];
+extern const u8 gMonPalette_Goldeen[];
+extern const u8 gMonBackPic_Goldeen[];
+extern const u8 gMonShinyPalette_Goldeen[];
+extern const u8 gMonIcon_Goldeen[];
+extern const u8 gMonFootprint_Goldeen[];
+extern const u8 gMonFrontPic_Seaking[];
+extern const u8 gMonPalette_Seaking[];
+extern const u8 gMonBackPic_Seaking[];
+extern const u8 gMonShinyPalette_Seaking[];
+extern const u8 gMonIcon_Seaking[];
+extern const u8 gMonFootprint_Seaking[];
+extern const u8 gMonFrontPic_Staryu[];
+extern const u8 gMonPalette_Staryu[];
+extern const u8 gMonBackPic_Staryu[];
+extern const u8 gMonShinyPalette_Staryu[];
+extern const u8 gMonIcon_Staryu[];
+extern const u8 gMonFootprint_Staryu[];
+extern const u8 gMonFrontPic_Starmie[];
+extern const u8 gMonPalette_Starmie[];
+extern const u8 gMonBackPic_Starmie[];
+extern const u8 gMonShinyPalette_Starmie[];
+extern const u8 gMonIcon_Starmie[];
+extern const u8 gMonFootprint_Starmie[];
+extern const u8 gMonFrontPic_Mrmime[];
+extern const u8 gMonPalette_Mrmime[];
+extern const u8 gMonBackPic_Mrmime[];
+extern const u8 gMonShinyPalette_Mrmime[];
+extern const u8 gMonIcon_Mrmime[];
+extern const u8 gMonFootprint_Mrmime[];
+extern const u8 gMonFrontPic_Scyther[];
+extern const u8 gMonPalette_Scyther[];
+extern const u8 gMonBackPic_Scyther[];
+extern const u8 gMonShinyPalette_Scyther[];
+extern const u8 gMonIcon_Scyther[];
+extern const u8 gMonFootprint_Scyther[];
+extern const u8 gMonFrontPic_Jynx[];
+extern const u8 gMonPalette_Jynx[];
+extern const u8 gMonBackPic_Jynx[];
+extern const u8 gMonShinyPalette_Jynx[];
+extern const u8 gMonIcon_Jynx[];
+extern const u8 gMonFootprint_Jynx[];
+extern const u8 gMonFrontPic_Electabuzz[];
+extern const u8 gMonPalette_Electabuzz[];
+extern const u8 gMonBackPic_Electabuzz[];
+extern const u8 gMonShinyPalette_Electabuzz[];
+extern const u8 gMonIcon_Electabuzz[];
+extern const u8 gMonFootprint_Electabuzz[];
+extern const u8 gMonFrontPic_Magmar[];
+extern const u8 gMonPalette_Magmar[];
+extern const u8 gMonBackPic_Magmar[];
+extern const u8 gMonShinyPalette_Magmar[];
+extern const u8 gMonIcon_Magmar[];
+extern const u8 gMonFootprint_Magmar[];
+extern const u8 gMonFrontPic_Pinsir[];
+extern const u8 gMonPalette_Pinsir[];
+extern const u8 gMonBackPic_Pinsir[];
+extern const u8 gMonShinyPalette_Pinsir[];
+extern const u8 gMonIcon_Pinsir[];
+extern const u8 gMonFootprint_Pinsir[];
+extern const u8 gMonFrontPic_Tauros[];
+extern const u8 gMonPalette_Tauros[];
+extern const u8 gMonBackPic_Tauros[];
+extern const u8 gMonShinyPalette_Tauros[];
+extern const u8 gMonIcon_Tauros[];
+extern const u8 gMonFootprint_Tauros[];
+extern const u8 gMonFrontPic_Magikarp[];
+extern const u8 gMonPalette_Magikarp[];
+extern const u8 gMonBackPic_Magikarp[];
+extern const u8 gMonShinyPalette_Magikarp[];
+extern const u8 gMonIcon_Magikarp[];
+extern const u8 gMonFootprint_Magikarp[];
+extern const u8 gMonFrontPic_Gyarados[];
+extern const u8 gMonPalette_Gyarados[];
+extern const u8 gMonBackPic_Gyarados[];
+extern const u8 gMonShinyPalette_Gyarados[];
+extern const u8 gMonIcon_Gyarados[];
+extern const u8 gMonFootprint_Gyarados[];
+extern const u8 gMonFrontPic_Lapras[];
+extern const u8 gMonPalette_Lapras[];
+extern const u8 gMonBackPic_Lapras[];
+extern const u8 gMonShinyPalette_Lapras[];
+extern const u8 gMonIcon_Lapras[];
+extern const u8 gMonFootprint_Lapras[];
+extern const u8 gMonFrontPic_Ditto[];
+extern const u8 gMonPalette_Ditto[];
+extern const u8 gMonBackPic_Ditto[];
+extern const u8 gMonShinyPalette_Ditto[];
+extern const u8 gMonIcon_Ditto[];
+extern const u8 gMonFootprint_Ditto[];
+extern const u8 gMonFrontPic_Eevee[];
+extern const u8 gMonPalette_Eevee[];
+extern const u8 gMonBackPic_Eevee[];
+extern const u8 gMonShinyPalette_Eevee[];
+extern const u8 gMonIcon_Eevee[];
+extern const u8 gMonFootprint_Eevee[];
+extern const u8 gMonFrontPic_Vaporeon[];
+extern const u8 gMonPalette_Vaporeon[];
+extern const u8 gMonBackPic_Vaporeon[];
+extern const u8 gMonShinyPalette_Vaporeon[];
+extern const u8 gMonIcon_Vaporeon[];
+extern const u8 gMonFootprint_Vaporeon[];
+extern const u8 gMonFrontPic_Jolteon[];
+extern const u8 gMonPalette_Jolteon[];
+extern const u8 gMonBackPic_Jolteon[];
+extern const u8 gMonShinyPalette_Jolteon[];
+extern const u8 gMonIcon_Jolteon[];
+extern const u8 gMonFootprint_Jolteon[];
+extern const u8 gMonFrontPic_Flareon[];
+extern const u8 gMonPalette_Flareon[];
+extern const u8 gMonBackPic_Flareon[];
+extern const u8 gMonShinyPalette_Flareon[];
+extern const u8 gMonIcon_Flareon[];
+extern const u8 gMonFootprint_Flareon[];
+extern const u8 gMonFrontPic_Porygon[];
+extern const u8 gMonPalette_Porygon[];
+extern const u8 gMonBackPic_Porygon[];
+extern const u8 gMonShinyPalette_Porygon[];
+extern const u8 gMonIcon_Porygon[];
+extern const u8 gMonFootprint_Porygon[];
+extern const u8 gMonFrontPic_Omanyte[];
+extern const u8 gMonPalette_Omanyte[];
+extern const u8 gMonBackPic_Omanyte[];
+extern const u8 gMonShinyPalette_Omanyte[];
+extern const u8 gMonIcon_Omanyte[];
+extern const u8 gMonFootprint_Omanyte[];
+extern const u8 gMonFrontPic_Omastar[];
+extern const u8 gMonPalette_Omastar[];
+extern const u8 gMonBackPic_Omastar[];
+extern const u8 gMonShinyPalette_Omastar[];
+extern const u8 gMonIcon_Omastar[];
+extern const u8 gMonFootprint_Omastar[];
+extern const u8 gMonFrontPic_Kabuto[];
+extern const u8 gMonPalette_Kabuto[];
+extern const u8 gMonBackPic_Kabuto[];
+extern const u8 gMonShinyPalette_Kabuto[];
+extern const u8 gMonIcon_Kabuto[];
+extern const u8 gMonFootprint_Kabuto[];
+extern const u8 gMonFrontPic_Kabutops[];
+extern const u8 gMonPalette_Kabutops[];
+extern const u8 gMonBackPic_Kabutops[];
+extern const u8 gMonShinyPalette_Kabutops[];
+extern const u8 gMonIcon_Kabutops[];
+extern const u8 gMonFootprint_Kabutops[];
+extern const u8 gMonFrontPic_Aerodactyl[];
+extern const u8 gMonPalette_Aerodactyl[];
+extern const u8 gMonBackPic_Aerodactyl[];
+extern const u8 gMonShinyPalette_Aerodactyl[];
+extern const u8 gMonIcon_Aerodactyl[];
+extern const u8 gMonFootprint_Aerodactyl[];
+extern const u8 gMonFrontPic_Snorlax[];
+extern const u8 gMonPalette_Snorlax[];
+extern const u8 gMonBackPic_Snorlax[];
+extern const u8 gMonShinyPalette_Snorlax[];
+extern const u8 gMonIcon_Snorlax[];
+extern const u8 gMonFootprint_Snorlax[];
+extern const u8 gMonFrontPic_Articuno[];
+extern const u8 gMonPalette_Articuno[];
+extern const u8 gMonBackPic_Articuno[];
+extern const u8 gMonShinyPalette_Articuno[];
+extern const u8 gMonIcon_Articuno[];
+extern const u8 gMonFootprint_Articuno[];
+extern const u8 gMonFrontPic_Zapdos[];
+extern const u8 gMonPalette_Zapdos[];
+extern const u8 gMonBackPic_Zapdos[];
+extern const u8 gMonShinyPalette_Zapdos[];
+extern const u8 gMonIcon_Zapdos[];
+extern const u8 gMonFootprint_Zapdos[];
+extern const u8 gMonFrontPic_Moltres[];
+extern const u8 gMonPalette_Moltres[];
+extern const u8 gMonBackPic_Moltres[];
+extern const u8 gMonShinyPalette_Moltres[];
+extern const u8 gMonIcon_Moltres[];
+extern const u8 gMonFootprint_Moltres[];
+extern const u8 gMonFrontPic_Dratini[];
+extern const u8 gMonPalette_Dratini[];
+extern const u8 gMonBackPic_Dratini[];
+extern const u8 gMonShinyPalette_Dratini[];
+extern const u8 gMonIcon_Dratini[];
+extern const u8 gMonFootprint_Dratini[];
+extern const u8 gMonFrontPic_Dragonair[];
+extern const u8 gMonPalette_Dragonair[];
+extern const u8 gMonBackPic_Dragonair[];
+extern const u8 gMonShinyPalette_Dragonair[];
+extern const u8 gMonIcon_Dragonair[];
+extern const u8 gMonFootprint_Dragonair[];
+extern const u8 gMonFrontPic_Dragonite[];
+extern const u8 gMonPalette_Dragonite[];
+extern const u8 gMonBackPic_Dragonite[];
+extern const u8 gMonShinyPalette_Dragonite[];
+extern const u8 gMonIcon_Dragonite[];
+extern const u8 gMonFootprint_Dragonite[];
+extern const u8 gMonFrontPic_Mewtwo[];
+extern const u8 gMonPalette_Mewtwo[];
+extern const u8 gMonBackPic_Mewtwo[];
+extern const u8 gMonShinyPalette_Mewtwo[];
+extern const u8 gMonIcon_Mewtwo[];
+extern const u8 gMonFootprint_Mewtwo[];
+extern const u8 gMonFrontPic_Mew[];
+extern const u8 gMonPalette_Mew[];
+extern const u8 gMonBackPic_Mew[];
+extern const u8 gMonShinyPalette_Mew[];
+extern const u8 gMonIcon_Mew[];
+extern const u8 gMonFootprint_Mew[];
+extern const u8 gMonFrontPic_Chikorita[];
+extern const u8 gMonPalette_Chikorita[];
+extern const u8 gMonBackPic_Chikorita[];
+extern const u8 gMonShinyPalette_Chikorita[];
+extern const u8 gMonIcon_Chikorita[];
+extern const u8 gMonFootprint_Chikorita[];
+extern const u8 gMonFrontPic_Bayleef[];
+extern const u8 gMonPalette_Bayleef[];
+extern const u8 gMonBackPic_Bayleef[];
+extern const u8 gMonShinyPalette_Bayleef[];
+extern const u8 gMonIcon_Bayleef[];
+extern const u8 gMonFootprint_Bayleef[];
+extern const u8 gMonFrontPic_Meganium[];
+extern const u8 gMonPalette_Meganium[];
+extern const u8 gMonBackPic_Meganium[];
+extern const u8 gMonShinyPalette_Meganium[];
+extern const u8 gMonIcon_Meganium[];
+extern const u8 gMonFootprint_Meganium[];
+extern const u8 gMonFrontPic_Cyndaquil[];
+extern const u8 gMonPalette_Cyndaquil[];
+extern const u8 gMonBackPic_Cyndaquil[];
+extern const u8 gMonShinyPalette_Cyndaquil[];
+extern const u8 gMonIcon_Cyndaquil[];
+extern const u8 gMonFootprint_Cyndaquil[];
+extern const u8 gMonFrontPic_Quilava[];
+extern const u8 gMonPalette_Quilava[];
+extern const u8 gMonBackPic_Quilava[];
+extern const u8 gMonShinyPalette_Quilava[];
+extern const u8 gMonIcon_Quilava[];
+extern const u8 gMonFootprint_Quilava[];
+extern const u8 gMonFrontPic_Typhlosion[];
+extern const u8 gMonPalette_Typhlosion[];
+extern const u8 gMonBackPic_Typhlosion[];
+extern const u8 gMonShinyPalette_Typhlosion[];
+extern const u8 gMonIcon_Typhlosion[];
+extern const u8 gMonFootprint_Typhlosion[];
+extern const u8 gMonFrontPic_Totodile[];
+extern const u8 gMonPalette_Totodile[];
+extern const u8 gMonBackPic_Totodile[];
+extern const u8 gMonShinyPalette_Totodile[];
+extern const u8 gMonIcon_Totodile[];
+extern const u8 gMonFootprint_Totodile[];
+extern const u8 gMonFrontPic_Croconaw[];
+extern const u8 gMonPalette_Croconaw[];
+extern const u8 gMonBackPic_Croconaw[];
+extern const u8 gMonShinyPalette_Croconaw[];
+extern const u8 gMonIcon_Croconaw[];
+extern const u8 gMonFootprint_Croconaw[];
+extern const u8 gMonFrontPic_Feraligatr[];
+extern const u8 gMonPalette_Feraligatr[];
+extern const u8 gMonBackPic_Feraligatr[];
+extern const u8 gMonShinyPalette_Feraligatr[];
+extern const u8 gMonIcon_Feraligatr[];
+extern const u8 gMonFootprint_Feraligatr[];
+extern const u8 gMonFrontPic_Sentret[];
+extern const u8 gMonPalette_Sentret[];
+extern const u8 gMonBackPic_Sentret[];
+extern const u8 gMonShinyPalette_Sentret[];
+extern const u8 gMonIcon_Sentret[];
+extern const u8 gMonFootprint_Sentret[];
+extern const u8 gMonFrontPic_Furret[];
+extern const u8 gMonPalette_Furret[];
+extern const u8 gMonBackPic_Furret[];
+extern const u8 gMonShinyPalette_Furret[];
+extern const u8 gMonIcon_Furret[];
+extern const u8 gMonFootprint_Furret[];
+extern const u8 gMonFrontPic_Hoothoot[];
+extern const u8 gMonPalette_Hoothoot[];
+extern const u8 gMonBackPic_Hoothoot[];
+extern const u8 gMonShinyPalette_Hoothoot[];
+extern const u8 gMonIcon_Hoothoot[];
+extern const u8 gMonFootprint_Hoothoot[];
+extern const u8 gMonFrontPic_Noctowl[];
+extern const u8 gMonPalette_Noctowl[];
+extern const u8 gMonBackPic_Noctowl[];
+extern const u8 gMonShinyPalette_Noctowl[];
+extern const u8 gMonIcon_Noctowl[];
+extern const u8 gMonFootprint_Noctowl[];
+extern const u8 gMonFrontPic_Ledyba[];
+extern const u8 gMonPalette_Ledyba[];
+extern const u8 gMonBackPic_Ledyba[];
+extern const u8 gMonShinyPalette_Ledyba[];
+extern const u8 gMonIcon_Ledyba[];
+extern const u8 gMonFootprint_Ledyba[];
+extern const u8 gMonFrontPic_Ledian[];
+extern const u8 gMonPalette_Ledian[];
+extern const u8 gMonBackPic_Ledian[];
+extern const u8 gMonShinyPalette_Ledian[];
+extern const u8 gMonIcon_Ledian[];
+extern const u8 gMonFootprint_Ledian[];
+extern const u8 gMonFrontPic_Spinarak[];
+extern const u8 gMonPalette_Spinarak[];
+extern const u8 gMonBackPic_Spinarak[];
+extern const u8 gMonShinyPalette_Spinarak[];
+extern const u8 gMonIcon_Spinarak[];
+extern const u8 gMonFootprint_Spinarak[];
+extern const u8 gMonFrontPic_Ariados[];
+extern const u8 gMonPalette_Ariados[];
+extern const u8 gMonBackPic_Ariados[];
+extern const u8 gMonShinyPalette_Ariados[];
+extern const u8 gMonIcon_Ariados[];
+extern const u8 gMonFootprint_Ariados[];
+extern const u8 gMonFrontPic_Crobat[];
+extern const u8 gMonPalette_Crobat[];
+extern const u8 gMonBackPic_Crobat[];
+extern const u8 gMonShinyPalette_Crobat[];
+extern const u8 gMonIcon_Crobat[];
+extern const u8 gMonFootprint_Crobat[];
+extern const u8 gMonFrontPic_Chinchou[];
+extern const u8 gMonPalette_Chinchou[];
+extern const u8 gMonBackPic_Chinchou[];
+extern const u8 gMonShinyPalette_Chinchou[];
+extern const u8 gMonIcon_Chinchou[];
+extern const u8 gMonFootprint_Chinchou[];
+extern const u8 gMonFrontPic_Lanturn[];
+extern const u8 gMonPalette_Lanturn[];
+extern const u8 gMonBackPic_Lanturn[];
+extern const u8 gMonShinyPalette_Lanturn[];
+extern const u8 gMonIcon_Lanturn[];
+extern const u8 gMonFootprint_Lanturn[];
+extern const u8 gMonFrontPic_Pichu[];
+extern const u8 gMonPalette_Pichu[];
+extern const u8 gMonBackPic_Pichu[];
+extern const u8 gMonShinyPalette_Pichu[];
+extern const u8 gMonIcon_Pichu[];
+extern const u8 gMonFootprint_Pichu[];
+extern const u8 gMonFrontPic_Cleffa[];
+extern const u8 gMonPalette_Cleffa[];
+extern const u8 gMonBackPic_Cleffa[];
+extern const u8 gMonShinyPalette_Cleffa[];
+extern const u8 gMonIcon_Cleffa[];
+extern const u8 gMonFootprint_Cleffa[];
+extern const u8 gMonFrontPic_Igglybuff[];
+extern const u8 gMonPalette_Igglybuff[];
+extern const u8 gMonBackPic_Igglybuff[];
+extern const u8 gMonShinyPalette_Igglybuff[];
+extern const u8 gMonIcon_Igglybuff[];
+extern const u8 gMonFootprint_Igglybuff[];
+extern const u8 gMonFrontPic_Togepi[];
+extern const u8 gMonPalette_Togepi[];
+extern const u8 gMonBackPic_Togepi[];
+extern const u8 gMonShinyPalette_Togepi[];
+extern const u8 gMonIcon_Togepi[];
+extern const u8 gMonFootprint_Togepi[];
+extern const u8 gMonFrontPic_Togetic[];
+extern const u8 gMonPalette_Togetic[];
+extern const u8 gMonBackPic_Togetic[];
+extern const u8 gMonShinyPalette_Togetic[];
+extern const u8 gMonIcon_Togetic[];
+extern const u8 gMonFootprint_Togetic[];
+extern const u8 gMonFrontPic_Natu[];
+extern const u8 gMonPalette_Natu[];
+extern const u8 gMonBackPic_Natu[];
+extern const u8 gMonShinyPalette_Natu[];
+extern const u8 gMonIcon_Natu[];
+extern const u8 gMonFootprint_Natu[];
+extern const u8 gMonFrontPic_Xatu[];
+extern const u8 gMonPalette_Xatu[];
+extern const u8 gMonBackPic_Xatu[];
+extern const u8 gMonShinyPalette_Xatu[];
+extern const u8 gMonIcon_Xatu[];
+extern const u8 gMonFootprint_Xatu[];
+extern const u8 gMonFrontPic_Mareep[];
+extern const u8 gMonPalette_Mareep[];
+extern const u8 gMonBackPic_Mareep[];
+extern const u8 gMonShinyPalette_Mareep[];
+extern const u8 gMonIcon_Mareep[];
+extern const u8 gMonFootprint_Mareep[];
+extern const u8 gMonFrontPic_Flaaffy[];
+extern const u8 gMonPalette_Flaaffy[];
+extern const u8 gMonBackPic_Flaaffy[];
+extern const u8 gMonShinyPalette_Flaaffy[];
+extern const u8 gMonIcon_Flaaffy[];
+extern const u8 gMonFootprint_Flaaffy[];
+extern const u8 gMonFrontPic_Ampharos[];
+extern const u8 gMonPalette_Ampharos[];
+extern const u8 gMonBackPic_Ampharos[];
+extern const u8 gMonShinyPalette_Ampharos[];
+extern const u8 gMonIcon_Ampharos[];
+extern const u8 gMonFootprint_Ampharos[];
+extern const u8 gMonFrontPic_Bellossom[];
+extern const u8 gMonPalette_Bellossom[];
+extern const u8 gMonBackPic_Bellossom[];
+extern const u8 gMonShinyPalette_Bellossom[];
+extern const u8 gMonIcon_Bellossom[];
+extern const u8 gMonFootprint_Bellossom[];
+extern const u8 gMonFrontPic_Marill[];
+extern const u8 gMonPalette_Marill[];
+extern const u8 gMonBackPic_Marill[];
+extern const u8 gMonShinyPalette_Marill[];
+extern const u8 gMonIcon_Marill[];
+extern const u8 gMonFootprint_Marill[];
+extern const u8 gMonFrontPic_Azumarill[];
+extern const u8 gMonPalette_Azumarill[];
+extern const u8 gMonBackPic_Azumarill[];
+extern const u8 gMonShinyPalette_Azumarill[];
+extern const u8 gMonIcon_Azumarill[];
+extern const u8 gMonFootprint_Azumarill[];
+extern const u8 gMonFrontPic_Sudowoodo[];
+extern const u8 gMonPalette_Sudowoodo[];
+extern const u8 gMonBackPic_Sudowoodo[];
+extern const u8 gMonShinyPalette_Sudowoodo[];
+extern const u8 gMonIcon_Sudowoodo[];
+extern const u8 gMonFootprint_Sudowoodo[];
+extern const u8 gMonFrontPic_Politoed[];
+extern const u8 gMonPalette_Politoed[];
+extern const u8 gMonBackPic_Politoed[];
+extern const u8 gMonShinyPalette_Politoed[];
+extern const u8 gMonIcon_Politoed[];
+extern const u8 gMonFootprint_Politoed[];
+extern const u8 gMonFrontPic_Hoppip[];
+extern const u8 gMonPalette_Hoppip[];
+extern const u8 gMonBackPic_Hoppip[];
+extern const u8 gMonShinyPalette_Hoppip[];
+extern const u8 gMonIcon_Hoppip[];
+extern const u8 gMonFootprint_Hoppip[];
+extern const u8 gMonFrontPic_Skiploom[];
+extern const u8 gMonPalette_Skiploom[];
+extern const u8 gMonBackPic_Skiploom[];
+extern const u8 gMonShinyPalette_Skiploom[];
+extern const u8 gMonIcon_Skiploom[];
+extern const u8 gMonFootprint_Skiploom[];
+extern const u8 gMonFrontPic_Jumpluff[];
+extern const u8 gMonPalette_Jumpluff[];
+extern const u8 gMonBackPic_Jumpluff[];
+extern const u8 gMonShinyPalette_Jumpluff[];
+extern const u8 gMonIcon_Jumpluff[];
+extern const u8 gMonFootprint_Jumpluff[];
+extern const u8 gMonFrontPic_Aipom[];
+extern const u8 gMonPalette_Aipom[];
+extern const u8 gMonBackPic_Aipom[];
+extern const u8 gMonShinyPalette_Aipom[];
+extern const u8 gMonIcon_Aipom[];
+extern const u8 gMonFootprint_Aipom[];
+extern const u8 gMonFrontPic_Sunkern[];
+extern const u8 gMonPalette_Sunkern[];
+extern const u8 gMonBackPic_Sunkern[];
+extern const u8 gMonShinyPalette_Sunkern[];
+extern const u8 gMonIcon_Sunkern[];
+extern const u8 gMonFootprint_Sunkern[];
+extern const u8 gMonFrontPic_Sunflora[];
+extern const u8 gMonPalette_Sunflora[];
+extern const u8 gMonBackPic_Sunflora[];
+extern const u8 gMonShinyPalette_Sunflora[];
+extern const u8 gMonIcon_Sunflora[];
+extern const u8 gMonFootprint_Sunflora[];
+extern const u8 gMonFrontPic_Yanma[];
+extern const u8 gMonPalette_Yanma[];
+extern const u8 gMonBackPic_Yanma[];
+extern const u8 gMonShinyPalette_Yanma[];
+extern const u8 gMonIcon_Yanma[];
+extern const u8 gMonFootprint_Yanma[];
+extern const u8 gMonFrontPic_Wooper[];
+extern const u8 gMonPalette_Wooper[];
+extern const u8 gMonBackPic_Wooper[];
+extern const u8 gMonShinyPalette_Wooper[];
+extern const u8 gMonIcon_Wooper[];
+extern const u8 gMonFootprint_Wooper[];
+extern const u8 gMonFrontPic_Quagsire[];
+extern const u8 gMonPalette_Quagsire[];
+extern const u8 gMonBackPic_Quagsire[];
+extern const u8 gMonShinyPalette_Quagsire[];
+extern const u8 gMonIcon_Quagsire[];
+extern const u8 gMonFootprint_Quagsire[];
+extern const u8 gMonFrontPic_Espeon[];
+extern const u8 gMonPalette_Espeon[];
+extern const u8 gMonBackPic_Espeon[];
+extern const u8 gMonShinyPalette_Espeon[];
+extern const u8 gMonIcon_Espeon[];
+extern const u8 gMonFootprint_Espeon[];
+extern const u8 gMonFrontPic_Umbreon[];
+extern const u8 gMonPalette_Umbreon[];
+extern const u8 gMonBackPic_Umbreon[];
+extern const u8 gMonShinyPalette_Umbreon[];
+extern const u8 gMonIcon_Umbreon[];
+extern const u8 gMonFootprint_Umbreon[];
+extern const u8 gMonFrontPic_Murkrow[];
+extern const u8 gMonPalette_Murkrow[];
+extern const u8 gMonBackPic_Murkrow[];
+extern const u8 gMonShinyPalette_Murkrow[];
+extern const u8 gMonIcon_Murkrow[];
+extern const u8 gMonFootprint_Murkrow[];
+extern const u8 gMonFrontPic_Slowking[];
+extern const u8 gMonPalette_Slowking[];
+extern const u8 gMonBackPic_Slowking[];
+extern const u8 gMonShinyPalette_Slowking[];
+extern const u8 gMonIcon_Slowking[];
+extern const u8 gMonFootprint_Slowking[];
+extern const u8 gMonFrontPic_Misdreavus[];
+extern const u8 gMonPalette_Misdreavus[];
+extern const u8 gMonBackPic_Misdreavus[];
+extern const u8 gMonShinyPalette_Misdreavus[];
+extern const u8 gMonIcon_Misdreavus[];
+extern const u8 gMonFootprint_Misdreavus[];
+extern const u8 gMonFrontPic_UnownA[];
+extern const u8 gMonPalette_Unown[];
+extern const u8 gMonBackPic_UnownA[];
+extern const u8 gMonShinyPalette_Unown[];
+extern const u8 gMonIcon_UnownA[];
+extern const u8 gMonFootprint_Unown[];
+extern const u8 gMonFrontPic_Wobbuffet[];
+extern const u8 gMonPalette_Wobbuffet[];
+extern const u8 gMonBackPic_Wobbuffet[];
+extern const u8 gMonShinyPalette_Wobbuffet[];
+extern const u8 gMonIcon_Wobbuffet[];
+extern const u8 gMonFootprint_Wobbuffet[];
+extern const u8 gMonFrontPic_Girafarig[];
+extern const u8 gMonPalette_Girafarig[];
+extern const u8 gMonBackPic_Girafarig[];
+extern const u8 gMonShinyPalette_Girafarig[];
+extern const u8 gMonIcon_Girafarig[];
+extern const u8 gMonFootprint_Girafarig[];
+extern const u8 gMonFrontPic_Pineco[];
+extern const u8 gMonPalette_Pineco[];
+extern const u8 gMonBackPic_Pineco[];
+extern const u8 gMonShinyPalette_Pineco[];
+extern const u8 gMonIcon_Pineco[];
+extern const u8 gMonFootprint_Pineco[];
+extern const u8 gMonFrontPic_Forretress[];
+extern const u8 gMonPalette_Forretress[];
+extern const u8 gMonBackPic_Forretress[];
+extern const u8 gMonShinyPalette_Forretress[];
+extern const u8 gMonIcon_Forretress[];
+extern const u8 gMonFootprint_Forretress[];
+extern const u8 gMonFrontPic_Dunsparce[];
+extern const u8 gMonPalette_Dunsparce[];
+extern const u8 gMonBackPic_Dunsparce[];
+extern const u8 gMonShinyPalette_Dunsparce[];
+extern const u8 gMonIcon_Dunsparce[];
+extern const u8 gMonFootprint_Dunsparce[];
+extern const u8 gMonFrontPic_Gligar[];
+extern const u8 gMonPalette_Gligar[];
+extern const u8 gMonBackPic_Gligar[];
+extern const u8 gMonShinyPalette_Gligar[];
+extern const u8 gMonIcon_Gligar[];
+extern const u8 gMonFootprint_Gligar[];
+extern const u8 gMonFrontPic_Steelix[];
+extern const u8 gMonPalette_Steelix[];
+extern const u8 gMonBackPic_Steelix[];
+extern const u8 gMonShinyPalette_Steelix[];
+extern const u8 gMonIcon_Steelix[];
+extern const u8 gMonFootprint_Steelix[];
+extern const u8 gMonFrontPic_Snubbull[];
+extern const u8 gMonPalette_Snubbull[];
+extern const u8 gMonBackPic_Snubbull[];
+extern const u8 gMonShinyPalette_Snubbull[];
+extern const u8 gMonIcon_Snubbull[];
+extern const u8 gMonFootprint_Snubbull[];
+extern const u8 gMonFrontPic_Granbull[];
+extern const u8 gMonPalette_Granbull[];
+extern const u8 gMonBackPic_Granbull[];
+extern const u8 gMonShinyPalette_Granbull[];
+extern const u8 gMonIcon_Granbull[];
+extern const u8 gMonFootprint_Granbull[];
+extern const u8 gMonFrontPic_Qwilfish[];
+extern const u8 gMonPalette_Qwilfish[];
+extern const u8 gMonBackPic_Qwilfish[];
+extern const u8 gMonShinyPalette_Qwilfish[];
+extern const u8 gMonIcon_Qwilfish[];
+extern const u8 gMonFootprint_Qwilfish[];
+extern const u8 gMonFrontPic_Scizor[];
+extern const u8 gMonPalette_Scizor[];
+extern const u8 gMonBackPic_Scizor[];
+extern const u8 gMonShinyPalette_Scizor[];
+extern const u8 gMonIcon_Scizor[];
+extern const u8 gMonFootprint_Scizor[];
+extern const u8 gMonFrontPic_Shuckle[];
+extern const u8 gMonPalette_Shuckle[];
+extern const u8 gMonBackPic_Shuckle[];
+extern const u8 gMonShinyPalette_Shuckle[];
+extern const u8 gMonIcon_Shuckle[];
+extern const u8 gMonFootprint_Shuckle[];
+extern const u8 gMonFrontPic_Heracross[];
+extern const u8 gMonPalette_Heracross[];
+extern const u8 gMonBackPic_Heracross[];
+extern const u8 gMonShinyPalette_Heracross[];
+extern const u8 gMonIcon_Heracross[];
+extern const u8 gMonFootprint_Heracross[];
+extern const u8 gMonFrontPic_Sneasel[];
+extern const u8 gMonPalette_Sneasel[];
+extern const u8 gMonBackPic_Sneasel[];
+extern const u8 gMonShinyPalette_Sneasel[];
+extern const u8 gMonIcon_Sneasel[];
+extern const u8 gMonFootprint_Sneasel[];
+extern const u8 gMonFrontPic_Teddiursa[];
+extern const u8 gMonPalette_Teddiursa[];
+extern const u8 gMonBackPic_Teddiursa[];
+extern const u8 gMonShinyPalette_Teddiursa[];
+extern const u8 gMonIcon_Teddiursa[];
+extern const u8 gMonFootprint_Teddiursa[];
+extern const u8 gMonFrontPic_Ursaring[];
+extern const u8 gMonPalette_Ursaring[];
+extern const u8 gMonBackPic_Ursaring[];
+extern const u8 gMonShinyPalette_Ursaring[];
+extern const u8 gMonIcon_Ursaring[];
+extern const u8 gMonFootprint_Ursaring[];
+extern const u8 gMonFrontPic_Slugma[];
+extern const u8 gMonPalette_Slugma[];
+extern const u8 gMonBackPic_Slugma[];
+extern const u8 gMonShinyPalette_Slugma[];
+extern const u8 gMonIcon_Slugma[];
+extern const u8 gMonFootprint_Slugma[];
+extern const u8 gMonFrontPic_Magcargo[];
+extern const u8 gMonPalette_Magcargo[];
+extern const u8 gMonBackPic_Magcargo[];
+extern const u8 gMonShinyPalette_Magcargo[];
+extern const u8 gMonIcon_Magcargo[];
+extern const u8 gMonFootprint_Magcargo[];
+extern const u8 gMonFrontPic_Swinub[];
+extern const u8 gMonPalette_Swinub[];
+extern const u8 gMonBackPic_Swinub[];
+extern const u8 gMonShinyPalette_Swinub[];
+extern const u8 gMonIcon_Swinub[];
+extern const u8 gMonFootprint_Swinub[];
+extern const u8 gMonFrontPic_Piloswine[];
+extern const u8 gMonPalette_Piloswine[];
+extern const u8 gMonBackPic_Piloswine[];
+extern const u8 gMonShinyPalette_Piloswine[];
+extern const u8 gMonIcon_Piloswine[];
+extern const u8 gMonFootprint_Piloswine[];
+extern const u8 gMonFrontPic_Corsola[];
+extern const u8 gMonPalette_Corsola[];
+extern const u8 gMonBackPic_Corsola[];
+extern const u8 gMonShinyPalette_Corsola[];
+extern const u8 gMonIcon_Corsola[];
+extern const u8 gMonFootprint_Corsola[];
+extern const u8 gMonFrontPic_Remoraid[];
+extern const u8 gMonPalette_Remoraid[];
+extern const u8 gMonBackPic_Remoraid[];
+extern const u8 gMonShinyPalette_Remoraid[];
+extern const u8 gMonIcon_Remoraid[];
+extern const u8 gMonFootprint_Remoraid[];
+extern const u8 gMonFrontPic_Octillery[];
+extern const u8 gMonPalette_Octillery[];
+extern const u8 gMonBackPic_Octillery[];
+extern const u8 gMonShinyPalette_Octillery[];
+extern const u8 gMonIcon_Octillery[];
+extern const u8 gMonFootprint_Octillery[];
+extern const u8 gMonFrontPic_Delibird[];
+extern const u8 gMonPalette_Delibird[];
+extern const u8 gMonBackPic_Delibird[];
+extern const u8 gMonShinyPalette_Delibird[];
+extern const u8 gMonIcon_Delibird[];
+extern const u8 gMonFootprint_Delibird[];
+extern const u8 gMonFrontPic_Mantine[];
+extern const u8 gMonPalette_Mantine[];
+extern const u8 gMonBackPic_Mantine[];
+extern const u8 gMonShinyPalette_Mantine[];
+extern const u8 gMonIcon_Mantine[];
+extern const u8 gMonFootprint_Mantine[];
+extern const u8 gMonFrontPic_Skarmory[];
+extern const u8 gMonPalette_Skarmory[];
+extern const u8 gMonBackPic_Skarmory[];
+extern const u8 gMonShinyPalette_Skarmory[];
+extern const u8 gMonIcon_Skarmory[];
+extern const u8 gMonFootprint_Skarmory[];
+extern const u8 gMonFrontPic_Houndour[];
+extern const u8 gMonPalette_Houndour[];
+extern const u8 gMonBackPic_Houndour[];
+extern const u8 gMonShinyPalette_Houndour[];
+extern const u8 gMonIcon_Houndour[];
+extern const u8 gMonFootprint_Houndour[];
+extern const u8 gMonFrontPic_Houndoom[];
+extern const u8 gMonPalette_Houndoom[];
+extern const u8 gMonBackPic_Houndoom[];
+extern const u8 gMonShinyPalette_Houndoom[];
+extern const u8 gMonIcon_Houndoom[];
+extern const u8 gMonFootprint_Houndoom[];
+extern const u8 gMonFrontPic_Kingdra[];
+extern const u8 gMonPalette_Kingdra[];
+extern const u8 gMonBackPic_Kingdra[];
+extern const u8 gMonShinyPalette_Kingdra[];
+extern const u8 gMonIcon_Kingdra[];
+extern const u8 gMonFootprint_Kingdra[];
+extern const u8 gMonFrontPic_Phanpy[];
+extern const u8 gMonPalette_Phanpy[];
+extern const u8 gMonBackPic_Phanpy[];
+extern const u8 gMonShinyPalette_Phanpy[];
+extern const u8 gMonIcon_Phanpy[];
+extern const u8 gMonFootprint_Phanpy[];
+extern const u8 gMonFrontPic_Donphan[];
+extern const u8 gMonPalette_Donphan[];
+extern const u8 gMonBackPic_Donphan[];
+extern const u8 gMonShinyPalette_Donphan[];
+extern const u8 gMonIcon_Donphan[];
+extern const u8 gMonFootprint_Donphan[];
+extern const u8 gMonFrontPic_Porygon2[];
+extern const u8 gMonPalette_Porygon2[];
+extern const u8 gMonBackPic_Porygon2[];
+extern const u8 gMonShinyPalette_Porygon2[];
+extern const u8 gMonIcon_Porygon2[];
+extern const u8 gMonFootprint_Porygon2[];
+extern const u8 gMonFrontPic_Stantler[];
+extern const u8 gMonPalette_Stantler[];
+extern const u8 gMonBackPic_Stantler[];
+extern const u8 gMonShinyPalette_Stantler[];
+extern const u8 gMonIcon_Stantler[];
+extern const u8 gMonFootprint_Stantler[];
+extern const u8 gMonFrontPic_Smeargle[];
+extern const u8 gMonPalette_Smeargle[];
+extern const u8 gMonBackPic_Smeargle[];
+extern const u8 gMonShinyPalette_Smeargle[];
+extern const u8 gMonIcon_Smeargle[];
+extern const u8 gMonFootprint_Smeargle[];
+extern const u8 gMonFrontPic_Tyrogue[];
+extern const u8 gMonPalette_Tyrogue[];
+extern const u8 gMonBackPic_Tyrogue[];
+extern const u8 gMonShinyPalette_Tyrogue[];
+extern const u8 gMonIcon_Tyrogue[];
+extern const u8 gMonFootprint_Tyrogue[];
+extern const u8 gMonFrontPic_Hitmontop[];
+extern const u8 gMonPalette_Hitmontop[];
+extern const u8 gMonBackPic_Hitmontop[];
+extern const u8 gMonShinyPalette_Hitmontop[];
+extern const u8 gMonIcon_Hitmontop[];
+extern const u8 gMonFootprint_Hitmontop[];
+extern const u8 gMonFrontPic_Smoochum[];
+extern const u8 gMonPalette_Smoochum[];
+extern const u8 gMonBackPic_Smoochum[];
+extern const u8 gMonShinyPalette_Smoochum[];
+extern const u8 gMonIcon_Smoochum[];
+extern const u8 gMonFootprint_Smoochum[];
+extern const u8 gMonFrontPic_Elekid[];
+extern const u8 gMonPalette_Elekid[];
+extern const u8 gMonBackPic_Elekid[];
+extern const u8 gMonShinyPalette_Elekid[];
+extern const u8 gMonIcon_Elekid[];
+extern const u8 gMonFootprint_Elekid[];
+extern const u8 gMonFrontPic_Magby[];
+extern const u8 gMonPalette_Magby[];
+extern const u8 gMonBackPic_Magby[];
+extern const u8 gMonShinyPalette_Magby[];
+extern const u8 gMonIcon_Magby[];
+extern const u8 gMonFootprint_Magby[];
+extern const u8 gMonFrontPic_Miltank[];
+extern const u8 gMonPalette_Miltank[];
+extern const u8 gMonBackPic_Miltank[];
+extern const u8 gMonShinyPalette_Miltank[];
+extern const u8 gMonIcon_Miltank[];
+extern const u8 gMonFootprint_Miltank[];
+extern const u8 gMonFrontPic_Blissey[];
+extern const u8 gMonPalette_Blissey[];
+extern const u8 gMonBackPic_Blissey[];
+extern const u8 gMonShinyPalette_Blissey[];
+extern const u8 gMonIcon_Blissey[];
+extern const u8 gMonFootprint_Blissey[];
+extern const u8 gMonFrontPic_Raikou[];
+extern const u8 gMonPalette_Raikou[];
+extern const u8 gMonBackPic_Raikou[];
+extern const u8 gMonShinyPalette_Raikou[];
+extern const u8 gMonIcon_Raikou[];
+extern const u8 gMonFootprint_Raikou[];
+extern const u8 gMonFrontPic_Entei[];
+extern const u8 gMonPalette_Entei[];
+extern const u8 gMonBackPic_Entei[];
+extern const u8 gMonShinyPalette_Entei[];
+extern const u8 gMonIcon_Entei[];
+extern const u8 gMonFootprint_Entei[];
+extern const u8 gMonFrontPic_Suicune[];
+extern const u8 gMonPalette_Suicune[];
+extern const u8 gMonBackPic_Suicune[];
+extern const u8 gMonShinyPalette_Suicune[];
+extern const u8 gMonIcon_Suicune[];
+extern const u8 gMonFootprint_Suicune[];
+extern const u8 gMonFrontPic_Larvitar[];
+extern const u8 gMonPalette_Larvitar[];
+extern const u8 gMonBackPic_Larvitar[];
+extern const u8 gMonShinyPalette_Larvitar[];
+extern const u8 gMonIcon_Larvitar[];
+extern const u8 gMonFootprint_Larvitar[];
+extern const u8 gMonFrontPic_Pupitar[];
+extern const u8 gMonPalette_Pupitar[];
+extern const u8 gMonBackPic_Pupitar[];
+extern const u8 gMonShinyPalette_Pupitar[];
+extern const u8 gMonIcon_Pupitar[];
+extern const u8 gMonFootprint_Pupitar[];
+extern const u8 gMonFrontPic_Tyranitar[];
+extern const u8 gMonPalette_Tyranitar[];
+extern const u8 gMonBackPic_Tyranitar[];
+extern const u8 gMonShinyPalette_Tyranitar[];
+extern const u8 gMonIcon_Tyranitar[];
+extern const u8 gMonFootprint_Tyranitar[];
+extern const u8 gMonFrontPic_Lugia[];
+extern const u8 gMonPalette_Lugia[];
+extern const u8 gMonBackPic_Lugia[];
+extern const u8 gMonShinyPalette_Lugia[];
+extern const u8 gMonIcon_Lugia[];
+extern const u8 gMonFootprint_Lugia[];
+extern const u8 gMonFrontPic_HoOh[];
+extern const u8 gMonPalette_HoOh[];
+extern const u8 gMonBackPic_HoOh[];
+extern const u8 gMonShinyPalette_HoOh[];
+extern const u8 gMonIcon_HoOh[];
+extern const u8 gMonFootprint_HoOh[];
+extern const u8 gMonFrontPic_Celebi[];
+extern const u8 gMonPalette_Celebi[];
+extern const u8 gMonBackPic_Celebi[];
+extern const u8 gMonShinyPalette_Celebi[];
+extern const u8 gMonIcon_Celebi[];
+extern const u8 gMonFootprint_Celebi[];
+extern const u8 gMonFrontPic_QuestionMark[];
+extern const u8 gMonPalette_QuestionMark[];
+extern const u8 gMonBackPic_QuestionMark[];
+extern const u8 gMonShinyPalette_QuestionMark[];
+extern const u8 gMonFrontPic_Treecko[];
+extern const u8 gMonPalette_Treecko[];
+extern const u8 gMonBackPic_Treecko[];
+extern const u8 gMonShinyPalette_Treecko[];
+extern const u8 gMonIcon_Treecko[];
+extern const u8 gMonFootprint_Treecko[];
+extern const u8 gMonFrontPic_Grovyle[];
+extern const u8 gMonPalette_Grovyle[];
+extern const u8 gMonBackPic_Grovyle[];
+extern const u8 gMonShinyPalette_Grovyle[];
+extern const u8 gMonIcon_Grovyle[];
+extern const u8 gMonFootprint_Grovyle[];
+extern const u8 gMonFrontPic_Sceptile[];
+extern const u8 gMonPalette_Sceptile[];
+extern const u8 gMonBackPic_Sceptile[];
+extern const u8 gMonShinyPalette_Sceptile[];
+extern const u8 gMonIcon_Sceptile[];
+extern const u8 gMonFootprint_Sceptile[];
+extern const u8 gMonFrontPic_Torchic[];
+extern const u8 gMonPalette_Torchic[];
+extern const u8 gMonBackPic_Torchic[];
+extern const u8 gMonShinyPalette_Torchic[];
+extern const u8 gMonIcon_Torchic[];
+extern const u8 gMonFootprint_Torchic[];
+extern const u8 gMonFrontPic_Combusken[];
+extern const u8 gMonPalette_Combusken[];
+extern const u8 gMonBackPic_Combusken[];
+extern const u8 gMonShinyPalette_Combusken[];
+extern const u8 gMonIcon_Combusken[];
+extern const u8 gMonFootprint_Combusken[];
+extern const u8 gMonFrontPic_Blaziken[];
+extern const u8 gMonPalette_Blaziken[];
+extern const u8 gMonBackPic_Blaziken[];
+extern const u8 gMonShinyPalette_Blaziken[];
+extern const u8 gMonIcon_Blaziken[];
+extern const u8 gMonFootprint_Blaziken[];
+extern const u8 gMonFrontPic_Mudkip[];
+extern const u8 gMonPalette_Mudkip[];
+extern const u8 gMonBackPic_Mudkip[];
+extern const u8 gMonShinyPalette_Mudkip[];
+extern const u8 gMonIcon_Mudkip[];
+extern const u8 gMonFootprint_Mudkip[];
+extern const u8 gMonFrontPic_Marshtomp[];
+extern const u8 gMonPalette_Marshtomp[];
+extern const u8 gMonBackPic_Marshtomp[];
+extern const u8 gMonShinyPalette_Marshtomp[];
+extern const u8 gMonIcon_Marshtomp[];
+extern const u8 gMonFootprint_Marshtomp[];
+extern const u8 gMonFrontPic_Swampert[];
+extern const u8 gMonPalette_Swampert[];
+extern const u8 gMonBackPic_Swampert[];
+extern const u8 gMonShinyPalette_Swampert[];
+extern const u8 gMonIcon_Swampert[];
+extern const u8 gMonFootprint_Swampert[];
+extern const u8 gMonFrontPic_Poochyena[];
+extern const u8 gMonPalette_Poochyena[];
+extern const u8 gMonBackPic_Poochyena[];
+extern const u8 gMonShinyPalette_Poochyena[];
+extern const u8 gMonIcon_Poochyena[];
+extern const u8 gMonFootprint_Poochyena[];
+extern const u8 gMonFrontPic_Mightyena[];
+extern const u8 gMonPalette_Mightyena[];
+extern const u8 gMonBackPic_Mightyena[];
+extern const u8 gMonShinyPalette_Mightyena[];
+extern const u8 gMonIcon_Mightyena[];
+extern const u8 gMonFootprint_Mightyena[];
+extern const u8 gMonFrontPic_Zigzagoon[];
+extern const u8 gMonPalette_Zigzagoon[];
+extern const u8 gMonBackPic_Zigzagoon[];
+extern const u8 gMonShinyPalette_Zigzagoon[];
+extern const u8 gMonIcon_Zigzagoon[];
+extern const u8 gMonFootprint_Zigzagoon[];
+extern const u8 gMonFrontPic_Linoone[];
+extern const u8 gMonPalette_Linoone[];
+extern const u8 gMonBackPic_Linoone[];
+extern const u8 gMonShinyPalette_Linoone[];
+extern const u8 gMonIcon_Linoone[];
+extern const u8 gMonFootprint_Linoone[];
+extern const u8 gMonFrontPic_Wurmple[];
+extern const u8 gMonPalette_Wurmple[];
+extern const u8 gMonBackPic_Wurmple[];
+extern const u8 gMonShinyPalette_Wurmple[];
+extern const u8 gMonIcon_Wurmple[];
+extern const u8 gMonFootprint_Wurmple[];
+extern const u8 gMonFrontPic_Silcoon[];
+extern const u8 gMonPalette_Silcoon[];
+extern const u8 gMonBackPic_Silcoon[];
+extern const u8 gMonShinyPalette_Silcoon[];
+extern const u8 gMonIcon_Silcoon[];
+extern const u8 gMonFootprint_Silcoon[];
+extern const u8 gMonFrontPic_Beautifly[];
+extern const u8 gMonPalette_Beautifly[];
+extern const u8 gMonBackPic_Beautifly[];
+extern const u8 gMonShinyPalette_Beautifly[];
+extern const u8 gMonIcon_Beautifly[];
+extern const u8 gMonFootprint_Beautifly[];
+extern const u8 gMonFrontPic_Cascoon[];
+extern const u8 gMonPalette_Cascoon[];
+extern const u8 gMonBackPic_Cascoon[];
+extern const u8 gMonShinyPalette_Cascoon[];
+extern const u8 gMonIcon_Cascoon[];
+extern const u8 gMonFootprint_Cascoon[];
+extern const u8 gMonFrontPic_Dustox[];
+extern const u8 gMonPalette_Dustox[];
+extern const u8 gMonBackPic_Dustox[];
+extern const u8 gMonShinyPalette_Dustox[];
+extern const u8 gMonIcon_Dustox[];
+extern const u8 gMonFootprint_Dustox[];
+extern const u8 gMonFrontPic_Lotad[];
+extern const u8 gMonPalette_Lotad[];
+extern const u8 gMonBackPic_Lotad[];
+extern const u8 gMonShinyPalette_Lotad[];
+extern const u8 gMonIcon_Lotad[];
+extern const u8 gMonFootprint_Lotad[];
+extern const u8 gMonFrontPic_Lombre[];
+extern const u8 gMonPalette_Lombre[];
+extern const u8 gMonBackPic_Lombre[];
+extern const u8 gMonShinyPalette_Lombre[];
+extern const u8 gMonIcon_Lombre[];
+extern const u8 gMonFootprint_Lombre[];
+extern const u8 gMonFrontPic_Ludicolo[];
+extern const u8 gMonPalette_Ludicolo[];
+extern const u8 gMonBackPic_Ludicolo[];
+extern const u8 gMonShinyPalette_Ludicolo[];
+extern const u8 gMonIcon_Ludicolo[];
+extern const u8 gMonFootprint_Ludicolo[];
+extern const u8 gMonFrontPic_Seedot[];
+extern const u8 gMonPalette_Seedot[];
+extern const u8 gMonBackPic_Seedot[];
+extern const u8 gMonShinyPalette_Seedot[];
+extern const u8 gMonIcon_Seedot[];
+extern const u8 gMonFootprint_Seedot[];
+extern const u8 gMonFrontPic_Nuzleaf[];
+extern const u8 gMonPalette_Nuzleaf[];
+extern const u8 gMonBackPic_Nuzleaf[];
+extern const u8 gMonShinyPalette_Nuzleaf[];
+extern const u8 gMonIcon_Nuzleaf[];
+extern const u8 gMonFootprint_Nuzleaf[];
+extern const u8 gMonFrontPic_Shiftry[];
+extern const u8 gMonPalette_Shiftry[];
+extern const u8 gMonBackPic_Shiftry[];
+extern const u8 gMonShinyPalette_Shiftry[];
+extern const u8 gMonIcon_Shiftry[];
+extern const u8 gMonFootprint_Shiftry[];
+extern const u8 gMonFrontPic_Nincada[];
+extern const u8 gMonPalette_Nincada[];
+extern const u8 gMonBackPic_Nincada[];
+extern const u8 gMonShinyPalette_Nincada[];
+extern const u8 gMonIcon_Nincada[];
+extern const u8 gMonFootprint_Nincada[];
+extern const u8 gMonFrontPic_Ninjask[];
+extern const u8 gMonPalette_Ninjask[];
+extern const u8 gMonBackPic_Ninjask[];
+extern const u8 gMonShinyPalette_Ninjask[];
+extern const u8 gMonIcon_Ninjask[];
+extern const u8 gMonFootprint_Ninjask[];
+extern const u8 gMonFrontPic_Shedinja[];
+extern const u8 gMonPalette_Shedinja[];
+extern const u8 gMonBackPic_Shedinja[];
+extern const u8 gMonShinyPalette_Shedinja[];
+extern const u8 gMonIcon_Shedinja[];
+extern const u8 gMonFootprint_Shedinja[];
+extern const u8 gMonFrontPic_Taillow[];
+extern const u8 gMonPalette_Taillow[];
+extern const u8 gMonBackPic_Taillow[];
+extern const u8 gMonShinyPalette_Taillow[];
+extern const u8 gMonIcon_Taillow[];
+extern const u8 gMonFootprint_Taillow[];
+extern const u8 gMonFrontPic_Swellow[];
+extern const u8 gMonPalette_Swellow[];
+extern const u8 gMonBackPic_Swellow[];
+extern const u8 gMonShinyPalette_Swellow[];
+extern const u8 gMonIcon_Swellow[];
+extern const u8 gMonFootprint_Swellow[];
+extern const u8 gMonFrontPic_Shroomish[];
+extern const u8 gMonPalette_Shroomish[];
+extern const u8 gMonBackPic_Shroomish[];
+extern const u8 gMonShinyPalette_Shroomish[];
+extern const u8 gMonIcon_Shroomish[];
+extern const u8 gMonFootprint_Shroomish[];
+extern const u8 gMonFrontPic_Breloom[];
+extern const u8 gMonPalette_Breloom[];
+extern const u8 gMonBackPic_Breloom[];
+extern const u8 gMonShinyPalette_Breloom[];
+extern const u8 gMonIcon_Breloom[];
+extern const u8 gMonFootprint_Breloom[];
+extern const u8 gMonFrontPic_Spinda[];
+extern const u8 gMonPalette_Spinda[];
+extern const u8 gMonBackPic_Spinda[];
+extern const u8 gMonShinyPalette_Spinda[];
+extern const u8 gMonIcon_Spinda[];
+extern const u8 gMonFootprint_Spinda[];
+extern const u8 gMonFrontPic_Wingull[];
+extern const u8 gMonPalette_Wingull[];
+extern const u8 gMonBackPic_Wingull[];
+extern const u8 gMonShinyPalette_Wingull[];
+extern const u8 gMonIcon_Wingull[];
+extern const u8 gMonFootprint_Wingull[];
+extern const u8 gMonFrontPic_Pelipper[];
+extern const u8 gMonPalette_Pelipper[];
+extern const u8 gMonBackPic_Pelipper[];
+extern const u8 gMonShinyPalette_Pelipper[];
+extern const u8 gMonIcon_Pelipper[];
+extern const u8 gMonFootprint_Pelipper[];
+extern const u8 gMonFrontPic_Surskit[];
+extern const u8 gMonPalette_Surskit[];
+extern const u8 gMonBackPic_Surskit[];
+extern const u8 gMonShinyPalette_Surskit[];
+extern const u8 gMonIcon_Surskit[];
+extern const u8 gMonFootprint_Surskit[];
+extern const u8 gMonFrontPic_Masquerain[];
+extern const u8 gMonPalette_Masquerain[];
+extern const u8 gMonBackPic_Masquerain[];
+extern const u8 gMonShinyPalette_Masquerain[];
+extern const u8 gMonIcon_Masquerain[];
+extern const u8 gMonFootprint_Masquerain[];
+extern const u8 gMonFrontPic_Wailmer[];
+extern const u8 gMonPalette_Wailmer[];
+extern const u8 gMonBackPic_Wailmer[];
+extern const u8 gMonShinyPalette_Wailmer[];
+extern const u8 gMonIcon_Wailmer[];
+extern const u8 gMonFootprint_Wailmer[];
+extern const u8 gMonFrontPic_Wailord[];
+extern const u8 gMonPalette_Wailord[];
+extern const u8 gMonBackPic_Wailord[];
+extern const u8 gMonShinyPalette_Wailord[];
+extern const u8 gMonIcon_Wailord[];
+extern const u8 gMonFootprint_Wailord[];
+extern const u8 gMonFrontPic_Skitty[];
+extern const u8 gMonPalette_Skitty[];
+extern const u8 gMonBackPic_Skitty[];
+extern const u8 gMonShinyPalette_Skitty[];
+extern const u8 gMonIcon_Skitty[];
+extern const u8 gMonFootprint_Skitty[];
+extern const u8 gMonFrontPic_Delcatty[];
+extern const u8 gMonPalette_Delcatty[];
+extern const u8 gMonBackPic_Delcatty[];
+extern const u8 gMonShinyPalette_Delcatty[];
+extern const u8 gMonIcon_Delcatty[];
+extern const u8 gMonFootprint_Delcatty[];
+extern const u8 gMonFrontPic_Kecleon[];
+extern const u8 gMonPalette_Kecleon[];
+extern const u8 gMonBackPic_Kecleon[];
+extern const u8 gMonShinyPalette_Kecleon[];
+extern const u8 gMonIcon_Kecleon[];
+extern const u8 gMonFootprint_Kecleon[];
+extern const u8 gMonFrontPic_Baltoy[];
+extern const u8 gMonPalette_Baltoy[];
+extern const u8 gMonBackPic_Baltoy[];
+extern const u8 gMonShinyPalette_Baltoy[];
+extern const u8 gMonIcon_Baltoy[];
+extern const u8 gMonFootprint_Baltoy[];
+extern const u8 gMonFrontPic_Claydol[];
+extern const u8 gMonPalette_Claydol[];
+extern const u8 gMonBackPic_Claydol[];
+extern const u8 gMonShinyPalette_Claydol[];
+extern const u8 gMonIcon_Claydol[];
+extern const u8 gMonFootprint_Claydol[];
+extern const u8 gMonFrontPic_Nosepass[];
+extern const u8 gMonPalette_Nosepass[];
+extern const u8 gMonBackPic_Nosepass[];
+extern const u8 gMonShinyPalette_Nosepass[];
+extern const u8 gMonIcon_Nosepass[];
+extern const u8 gMonFootprint_Nosepass[];
+extern const u8 gMonFrontPic_Torkoal[];
+extern const u8 gMonPalette_Torkoal[];
+extern const u8 gMonBackPic_Torkoal[];
+extern const u8 gMonShinyPalette_Torkoal[];
+extern const u8 gMonIcon_Torkoal[];
+extern const u8 gMonFootprint_Torkoal[];
+extern const u8 gMonFrontPic_Sableye[];
+extern const u8 gMonPalette_Sableye[];
+extern const u8 gMonBackPic_Sableye[];
+extern const u8 gMonShinyPalette_Sableye[];
+extern const u8 gMonIcon_Sableye[];
+extern const u8 gMonFootprint_Sableye[];
+extern const u8 gMonFrontPic_Barboach[];
+extern const u8 gMonPalette_Barboach[];
+extern const u8 gMonBackPic_Barboach[];
+extern const u8 gMonShinyPalette_Barboach[];
+extern const u8 gMonIcon_Barboach[];
+extern const u8 gMonFootprint_Barboach[];
+extern const u8 gMonFrontPic_Whiscash[];
+extern const u8 gMonPalette_Whiscash[];
+extern const u8 gMonBackPic_Whiscash[];
+extern const u8 gMonShinyPalette_Whiscash[];
+extern const u8 gMonIcon_Whiscash[];
+extern const u8 gMonFootprint_Whiscash[];
+extern const u8 gMonFrontPic_Luvdisc[];
+extern const u8 gMonPalette_Luvdisc[];
+extern const u8 gMonBackPic_Luvdisc[];
+extern const u8 gMonShinyPalette_Luvdisc[];
+extern const u8 gMonIcon_Luvdisc[];
+extern const u8 gMonFootprint_Luvdisc[];
+extern const u8 gMonFrontPic_Corphish[];
+extern const u8 gMonPalette_Corphish[];
+extern const u8 gMonBackPic_Corphish[];
+extern const u8 gMonShinyPalette_Corphish[];
+extern const u8 gMonIcon_Corphish[];
+extern const u8 gMonFootprint_Corphish[];
+extern const u8 gMonFrontPic_Crawdaunt[];
+extern const u8 gMonPalette_Crawdaunt[];
+extern const u8 gMonBackPic_Crawdaunt[];
+extern const u8 gMonShinyPalette_Crawdaunt[];
+extern const u8 gMonIcon_Crawdaunt[];
+extern const u8 gMonFootprint_Crawdaunt[];
+extern const u8 gMonFrontPic_Feebas[];
+extern const u8 gMonPalette_Feebas[];
+extern const u8 gMonBackPic_Feebas[];
+extern const u8 gMonShinyPalette_Feebas[];
+extern const u8 gMonIcon_Feebas[];
+extern const u8 gMonFootprint_Feebas[];
+extern const u8 gMonFrontPic_Milotic[];
+extern const u8 gMonPalette_Milotic[];
+extern const u8 gMonBackPic_Milotic[];
+extern const u8 gMonShinyPalette_Milotic[];
+extern const u8 gMonIcon_Milotic[];
+extern const u8 gMonFootprint_Milotic[];
+extern const u8 gMonFrontPic_Carvanha[];
+extern const u8 gMonPalette_Carvanha[];
+extern const u8 gMonBackPic_Carvanha[];
+extern const u8 gMonShinyPalette_Carvanha[];
+extern const u8 gMonIcon_Carvanha[];
+extern const u8 gMonFootprint_Carvanha[];
+extern const u8 gMonFrontPic_Sharpedo[];
+extern const u8 gMonPalette_Sharpedo[];
+extern const u8 gMonBackPic_Sharpedo[];
+extern const u8 gMonShinyPalette_Sharpedo[];
+extern const u8 gMonIcon_Sharpedo[];
+extern const u8 gMonFootprint_Sharpedo[];
+extern const u8 gMonFrontPic_Trapinch[];
+extern const u8 gMonPalette_Trapinch[];
+extern const u8 gMonBackPic_Trapinch[];
+extern const u8 gMonShinyPalette_Trapinch[];
+extern const u8 gMonIcon_Trapinch[];
+extern const u8 gMonFootprint_Trapinch[];
+extern const u8 gMonFrontPic_Vibrava[];
+extern const u8 gMonPalette_Vibrava[];
+extern const u8 gMonBackPic_Vibrava[];
+extern const u8 gMonShinyPalette_Vibrava[];
+extern const u8 gMonIcon_Vibrava[];
+extern const u8 gMonFootprint_Vibrava[];
+extern const u8 gMonFrontPic_Flygon[];
+extern const u8 gMonPalette_Flygon[];
+extern const u8 gMonBackPic_Flygon[];
+extern const u8 gMonShinyPalette_Flygon[];
+extern const u8 gMonIcon_Flygon[];
+extern const u8 gMonFootprint_Flygon[];
+extern const u8 gMonFrontPic_Makuhita[];
+extern const u8 gMonPalette_Makuhita[];
+extern const u8 gMonBackPic_Makuhita[];
+extern const u8 gMonShinyPalette_Makuhita[];
+extern const u8 gMonIcon_Makuhita[];
+extern const u8 gMonFootprint_Makuhita[];
+extern const u8 gMonFrontPic_Hariyama[];
+extern const u8 gMonPalette_Hariyama[];
+extern const u8 gMonBackPic_Hariyama[];
+extern const u8 gMonShinyPalette_Hariyama[];
+extern const u8 gMonIcon_Hariyama[];
+extern const u8 gMonFootprint_Hariyama[];
+extern const u8 gMonFrontPic_Electrike[];
+extern const u8 gMonPalette_Electrike[];
+extern const u8 gMonBackPic_Electrike[];
+extern const u8 gMonShinyPalette_Electrike[];
+extern const u8 gMonIcon_Electrike[];
+extern const u8 gMonFootprint_Electrike[];
+extern const u8 gMonFrontPic_Manectric[];
+extern const u8 gMonPalette_Manectric[];
+extern const u8 gMonBackPic_Manectric[];
+extern const u8 gMonShinyPalette_Manectric[];
+extern const u8 gMonIcon_Manectric[];
+extern const u8 gMonFootprint_Manectric[];
+extern const u8 gMonFrontPic_Numel[];
+extern const u8 gMonPalette_Numel[];
+extern const u8 gMonBackPic_Numel[];
+extern const u8 gMonShinyPalette_Numel[];
+extern const u8 gMonIcon_Numel[];
+extern const u8 gMonFootprint_Numel[];
+extern const u8 gMonFrontPic_Camerupt[];
+extern const u8 gMonPalette_Camerupt[];
+extern const u8 gMonBackPic_Camerupt[];
+extern const u8 gMonShinyPalette_Camerupt[];
+extern const u8 gMonIcon_Camerupt[];
+extern const u8 gMonFootprint_Camerupt[];
+extern const u8 gMonFrontPic_Spheal[];
+extern const u8 gMonPalette_Spheal[];
+extern const u8 gMonBackPic_Spheal[];
+extern const u8 gMonShinyPalette_Spheal[];
+extern const u8 gMonIcon_Spheal[];
+extern const u8 gMonFootprint_Spheal[];
+extern const u8 gMonFrontPic_Sealeo[];
+extern const u8 gMonPalette_Sealeo[];
+extern const u8 gMonBackPic_Sealeo[];
+extern const u8 gMonShinyPalette_Sealeo[];
+extern const u8 gMonIcon_Sealeo[];
+extern const u8 gMonFootprint_Sealeo[];
+extern const u8 gMonFrontPic_Walrein[];
+extern const u8 gMonPalette_Walrein[];
+extern const u8 gMonBackPic_Walrein[];
+extern const u8 gMonShinyPalette_Walrein[];
+extern const u8 gMonIcon_Walrein[];
+extern const u8 gMonFootprint_Walrein[];
+extern const u8 gMonFrontPic_Cacnea[];
+extern const u8 gMonPalette_Cacnea[];
+extern const u8 gMonBackPic_Cacnea[];
+extern const u8 gMonShinyPalette_Cacnea[];
+extern const u8 gMonIcon_Cacnea[];
+extern const u8 gMonFootprint_Cacnea[];
+extern const u8 gMonFrontPic_Cacturne[];
+extern const u8 gMonPalette_Cacturne[];
+extern const u8 gMonBackPic_Cacturne[];
+extern const u8 gMonShinyPalette_Cacturne[];
+extern const u8 gMonIcon_Cacturne[];
+extern const u8 gMonFootprint_Cacturne[];
+extern const u8 gMonFrontPic_Snorunt[];
+extern const u8 gMonPalette_Snorunt[];
+extern const u8 gMonBackPic_Snorunt[];
+extern const u8 gMonShinyPalette_Snorunt[];
+extern const u8 gMonIcon_Snorunt[];
+extern const u8 gMonFootprint_Snorunt[];
+extern const u8 gMonFrontPic_Glalie[];
+extern const u8 gMonPalette_Glalie[];
+extern const u8 gMonBackPic_Glalie[];
+extern const u8 gMonShinyPalette_Glalie[];
+extern const u8 gMonIcon_Glalie[];
+extern const u8 gMonFootprint_Glalie[];
+extern const u8 gMonFrontPic_Lunatone[];
+extern const u8 gMonPalette_Lunatone[];
+extern const u8 gMonBackPic_Lunatone[];
+extern const u8 gMonShinyPalette_Lunatone[];
+extern const u8 gMonIcon_Lunatone[];
+extern const u8 gMonFootprint_Lunatone[];
+extern const u8 gMonFrontPic_Solrock[];
+extern const u8 gMonPalette_Solrock[];
+extern const u8 gMonBackPic_Solrock[];
+extern const u8 gMonShinyPalette_Solrock[];
+extern const u8 gMonIcon_Solrock[];
+extern const u8 gMonFootprint_Solrock[];
+extern const u8 gMonFrontPic_Azurill[];
+extern const u8 gMonPalette_Azurill[];
+extern const u8 gMonBackPic_Azurill[];
+extern const u8 gMonShinyPalette_Azurill[];
+extern const u8 gMonIcon_Azurill[];
+extern const u8 gMonFootprint_Azurill[];
+extern const u8 gMonFrontPic_Spoink[];
+extern const u8 gMonPalette_Spoink[];
+extern const u8 gMonBackPic_Spoink[];
+extern const u8 gMonShinyPalette_Spoink[];
+extern const u8 gMonIcon_Spoink[];
+extern const u8 gMonFootprint_Spoink[];
+extern const u8 gMonFrontPic_Grumpig[];
+extern const u8 gMonPalette_Grumpig[];
+extern const u8 gMonBackPic_Grumpig[];
+extern const u8 gMonShinyPalette_Grumpig[];
+extern const u8 gMonIcon_Grumpig[];
+extern const u8 gMonFootprint_Grumpig[];
+extern const u8 gMonFrontPic_Plusle[];
+extern const u8 gMonPalette_Plusle[];
+extern const u8 gMonBackPic_Plusle[];
+extern const u8 gMonShinyPalette_Plusle[];
+extern const u8 gMonIcon_Plusle[];
+extern const u8 gMonFootprint_Plusle[];
+extern const u8 gMonFrontPic_Minun[];
+extern const u8 gMonPalette_Minun[];
+extern const u8 gMonBackPic_Minun[];
+extern const u8 gMonShinyPalette_Minun[];
+extern const u8 gMonIcon_Minun[];
+extern const u8 gMonFootprint_Minun[];
+extern const u8 gMonFrontPic_Mawile[];
+extern const u8 gMonPalette_Mawile[];
+extern const u8 gMonBackPic_Mawile[];
+extern const u8 gMonShinyPalette_Mawile[];
+extern const u8 gMonIcon_Mawile[];
+extern const u8 gMonFootprint_Mawile[];
+extern const u8 gMonFrontPic_Meditite[];
+extern const u8 gMonPalette_Meditite[];
+extern const u8 gMonBackPic_Meditite[];
+extern const u8 gMonShinyPalette_Meditite[];
+extern const u8 gMonIcon_Meditite[];
+extern const u8 gMonFootprint_Meditite[];
+extern const u8 gMonFrontPic_Medicham[];
+extern const u8 gMonPalette_Medicham[];
+extern const u8 gMonBackPic_Medicham[];
+extern const u8 gMonShinyPalette_Medicham[];
+extern const u8 gMonIcon_Medicham[];
+extern const u8 gMonFootprint_Medicham[];
+extern const u8 gMonFrontPic_Swablu[];
+extern const u8 gMonPalette_Swablu[];
+extern const u8 gMonBackPic_Swablu[];
+extern const u8 gMonShinyPalette_Swablu[];
+extern const u8 gMonIcon_Swablu[];
+extern const u8 gMonFootprint_Swablu[];
+extern const u8 gMonFrontPic_Altaria[];
+extern const u8 gMonPalette_Altaria[];
+extern const u8 gMonBackPic_Altaria[];
+extern const u8 gMonShinyPalette_Altaria[];
+extern const u8 gMonIcon_Altaria[];
+extern const u8 gMonFootprint_Altaria[];
+extern const u8 gMonFrontPic_Wynaut[];
+extern const u8 gMonPalette_Wynaut[];
+extern const u8 gMonBackPic_Wynaut[];
+extern const u8 gMonShinyPalette_Wynaut[];
+extern const u8 gMonIcon_Wynaut[];
+extern const u8 gMonFootprint_Wynaut[];
+extern const u8 gMonFrontPic_Duskull[];
+extern const u8 gMonPalette_Duskull[];
+extern const u8 gMonBackPic_Duskull[];
+extern const u8 gMonShinyPalette_Duskull[];
+extern const u8 gMonIcon_Duskull[];
+extern const u8 gMonFootprint_Duskull[];
+extern const u8 gMonFrontPic_Dusclops[];
+extern const u8 gMonPalette_Dusclops[];
+extern const u8 gMonBackPic_Dusclops[];
+extern const u8 gMonShinyPalette_Dusclops[];
+extern const u8 gMonIcon_Dusclops[];
+extern const u8 gMonFootprint_Dusclops[];
+extern const u8 gMonFrontPic_Roselia[];
+extern const u8 gMonPalette_Roselia[];
+extern const u8 gMonBackPic_Roselia[];
+extern const u8 gMonShinyPalette_Roselia[];
+extern const u8 gMonIcon_Roselia[];
+extern const u8 gMonFootprint_Roselia[];
+extern const u8 gMonFrontPic_Slakoth[];
+extern const u8 gMonPalette_Slakoth[];
+extern const u8 gMonBackPic_Slakoth[];
+extern const u8 gMonShinyPalette_Slakoth[];
+extern const u8 gMonIcon_Slakoth[];
+extern const u8 gMonFootprint_Slakoth[];
+extern const u8 gMonFrontPic_Vigoroth[];
+extern const u8 gMonPalette_Vigoroth[];
+extern const u8 gMonBackPic_Vigoroth[];
+extern const u8 gMonShinyPalette_Vigoroth[];
+extern const u8 gMonIcon_Vigoroth[];
+extern const u8 gMonFootprint_Vigoroth[];
+extern const u8 gMonFrontPic_Slaking[];
+extern const u8 gMonPalette_Slaking[];
+extern const u8 gMonBackPic_Slaking[];
+extern const u8 gMonShinyPalette_Slaking[];
+extern const u8 gMonIcon_Slaking[];
+extern const u8 gMonFootprint_Slaking[];
+extern const u8 gMonFrontPic_Gulpin[];
+extern const u8 gMonPalette_Gulpin[];
+extern const u8 gMonBackPic_Gulpin[];
+extern const u8 gMonShinyPalette_Gulpin[];
+extern const u8 gMonIcon_Gulpin[];
+extern const u8 gMonFootprint_Gulpin[];
+extern const u8 gMonFrontPic_Swalot[];
+extern const u8 gMonPalette_Swalot[];
+extern const u8 gMonBackPic_Swalot[];
+extern const u8 gMonShinyPalette_Swalot[];
+extern const u8 gMonIcon_Swalot[];
+extern const u8 gMonFootprint_Swalot[];
+extern const u8 gMonFrontPic_Tropius[];
+extern const u8 gMonPalette_Tropius[];
+extern const u8 gMonBackPic_Tropius[];
+extern const u8 gMonShinyPalette_Tropius[];
+extern const u8 gMonIcon_Tropius[];
+extern const u8 gMonFootprint_Tropius[];
+extern const u8 gMonFrontPic_Whismur[];
+extern const u8 gMonPalette_Whismur[];
+extern const u8 gMonBackPic_Whismur[];
+extern const u8 gMonShinyPalette_Whismur[];
+extern const u8 gMonIcon_Whismur[];
+extern const u8 gMonFootprint_Whismur[];
+extern const u8 gMonFrontPic_Loudred[];
+extern const u8 gMonPalette_Loudred[];
+extern const u8 gMonBackPic_Loudred[];
+extern const u8 gMonShinyPalette_Loudred[];
+extern const u8 gMonIcon_Loudred[];
+extern const u8 gMonFootprint_Loudred[];
+extern const u8 gMonFrontPic_Exploud[];
+extern const u8 gMonPalette_Exploud[];
+extern const u8 gMonBackPic_Exploud[];
+extern const u8 gMonShinyPalette_Exploud[];
+extern const u8 gMonIcon_Exploud[];
+extern const u8 gMonFootprint_Exploud[];
+extern const u8 gMonFrontPic_Clamperl[];
+extern const u8 gMonPalette_Clamperl[];
+extern const u8 gMonBackPic_Clamperl[];
+extern const u8 gMonShinyPalette_Clamperl[];
+extern const u8 gMonIcon_Clamperl[];
+extern const u8 gMonFootprint_Clamperl[];
+extern const u8 gMonFrontPic_Huntail[];
+extern const u8 gMonPalette_Huntail[];
+extern const u8 gMonBackPic_Huntail[];
+extern const u8 gMonShinyPalette_Huntail[];
+extern const u8 gMonIcon_Huntail[];
+extern const u8 gMonFootprint_Huntail[];
+extern const u8 gMonFrontPic_Gorebyss[];
+extern const u8 gMonPalette_Gorebyss[];
+extern const u8 gMonBackPic_Gorebyss[];
+extern const u8 gMonShinyPalette_Gorebyss[];
+extern const u8 gMonIcon_Gorebyss[];
+extern const u8 gMonFootprint_Gorebyss[];
+extern const u8 gMonFrontPic_Absol[];
+extern const u8 gMonPalette_Absol[];
+extern const u8 gMonBackPic_Absol[];
+extern const u8 gMonShinyPalette_Absol[];
+extern const u8 gMonIcon_Absol[];
+extern const u8 gMonFootprint_Absol[];
+extern const u8 gMonFrontPic_Shuppet[];
+extern const u8 gMonPalette_Shuppet[];
+extern const u8 gMonBackPic_Shuppet[];
+extern const u8 gMonShinyPalette_Shuppet[];
+extern const u8 gMonIcon_Shuppet[];
+extern const u8 gMonFootprint_Shuppet[];
+extern const u8 gMonFrontPic_Banette[];
+extern const u8 gMonPalette_Banette[];
+extern const u8 gMonBackPic_Banette[];
+extern const u8 gMonShinyPalette_Banette[];
+extern const u8 gMonIcon_Banette[];
+extern const u8 gMonFootprint_Banette[];
+extern const u8 gMonFrontPic_Seviper[];
+extern const u8 gMonPalette_Seviper[];
+extern const u8 gMonBackPic_Seviper[];
+extern const u8 gMonShinyPalette_Seviper[];
+extern const u8 gMonIcon_Seviper[];
+extern const u8 gMonFootprint_Seviper[];
+extern const u8 gMonFrontPic_Zangoose[];
+extern const u8 gMonPalette_Zangoose[];
+extern const u8 gMonBackPic_Zangoose[];
+extern const u8 gMonShinyPalette_Zangoose[];
+extern const u8 gMonIcon_Zangoose[];
+extern const u8 gMonFootprint_Zangoose[];
+extern const u8 gMonFrontPic_Relicanth[];
+extern const u8 gMonPalette_Relicanth[];
+extern const u8 gMonBackPic_Relicanth[];
+extern const u8 gMonShinyPalette_Relicanth[];
+extern const u8 gMonIcon_Relicanth[];
+extern const u8 gMonFootprint_Relicanth[];
+extern const u8 gMonFrontPic_Aron[];
+extern const u8 gMonPalette_Aron[];
+extern const u8 gMonBackPic_Aron[];
+extern const u8 gMonShinyPalette_Aron[];
+extern const u8 gMonIcon_Aron[];
+extern const u8 gMonFootprint_Aron[];
+extern const u8 gMonFrontPic_Lairon[];
+extern const u8 gMonPalette_Lairon[];
+extern const u8 gMonBackPic_Lairon[];
+extern const u8 gMonShinyPalette_Lairon[];
+extern const u8 gMonIcon_Lairon[];
+extern const u8 gMonFootprint_Lairon[];
+extern const u8 gMonFrontPic_Aggron[];
+extern const u8 gMonPalette_Aggron[];
+extern const u8 gMonBackPic_Aggron[];
+extern const u8 gMonShinyPalette_Aggron[];
+extern const u8 gMonIcon_Aggron[];
+extern const u8 gMonFootprint_Aggron[];
+extern const u8 gMonFrontPic_Castform[];
+extern const u8 gMonPalette_Castform[];
+extern const u8 gMonBackPic_Castform[];
+extern const u8 gMonShinyPalette_Castform[];
+extern const u8 gMonIcon_Castform[];
+extern const u8 gMonFootprint_Castform[];
+extern const u8 gMonFrontPic_Volbeat[];
+extern const u8 gMonPalette_Volbeat[];
+extern const u8 gMonBackPic_Volbeat[];
+extern const u8 gMonShinyPalette_Volbeat[];
+extern const u8 gMonIcon_Volbeat[];
+extern const u8 gMonFootprint_Volbeat[];
+extern const u8 gMonFrontPic_Illumise[];
+extern const u8 gMonPalette_Illumise[];
+extern const u8 gMonBackPic_Illumise[];
+extern const u8 gMonShinyPalette_Illumise[];
+extern const u8 gMonIcon_Illumise[];
+extern const u8 gMonFootprint_Illumise[];
+extern const u8 gMonFrontPic_Lileep[];
+extern const u8 gMonPalette_Lileep[];
+extern const u8 gMonBackPic_Lileep[];
+extern const u8 gMonShinyPalette_Lileep[];
+extern const u8 gMonIcon_Lileep[];
+extern const u8 gMonFootprint_Lileep[];
+extern const u8 gMonFrontPic_Cradily[];
+extern const u8 gMonPalette_Cradily[];
+extern const u8 gMonBackPic_Cradily[];
+extern const u8 gMonShinyPalette_Cradily[];
+extern const u8 gMonIcon_Cradily[];
+extern const u8 gMonFootprint_Cradily[];
+extern const u8 gMonFrontPic_Anorith[];
+extern const u8 gMonPalette_Anorith[];
+extern const u8 gMonBackPic_Anorith[];
+extern const u8 gMonShinyPalette_Anorith[];
+extern const u8 gMonIcon_Anorith[];
+extern const u8 gMonFootprint_Anorith[];
+extern const u8 gMonFrontPic_Armaldo[];
+extern const u8 gMonPalette_Armaldo[];
+extern const u8 gMonBackPic_Armaldo[];
+extern const u8 gMonShinyPalette_Armaldo[];
+extern const u8 gMonIcon_Armaldo[];
+extern const u8 gMonFootprint_Armaldo[];
+extern const u8 gMonFrontPic_Ralts[];
+extern const u8 gMonPalette_Ralts[];
+extern const u8 gMonBackPic_Ralts[];
+extern const u8 gMonShinyPalette_Ralts[];
+extern const u8 gMonIcon_Ralts[];
+extern const u8 gMonFootprint_Ralts[];
+extern const u8 gMonFrontPic_Kirlia[];
+extern const u8 gMonPalette_Kirlia[];
+extern const u8 gMonBackPic_Kirlia[];
+extern const u8 gMonShinyPalette_Kirlia[];
+extern const u8 gMonIcon_Kirlia[];
+extern const u8 gMonFootprint_Kirlia[];
+extern const u8 gMonFrontPic_Gardevoir[];
+extern const u8 gMonPalette_Gardevoir[];
+extern const u8 gMonBackPic_Gardevoir[];
+extern const u8 gMonShinyPalette_Gardevoir[];
+extern const u8 gMonIcon_Gardevoir[];
+extern const u8 gMonFootprint_Gardevoir[];
+extern const u8 gMonFrontPic_Bagon[];
+extern const u8 gMonPalette_Bagon[];
+extern const u8 gMonBackPic_Bagon[];
+extern const u8 gMonShinyPalette_Bagon[];
+extern const u8 gMonIcon_Bagon[];
+extern const u8 gMonFootprint_Bagon[];
+extern const u8 gMonFrontPic_Shelgon[];
+extern const u8 gMonPalette_Shelgon[];
+extern const u8 gMonBackPic_Shelgon[];
+extern const u8 gMonShinyPalette_Shelgon[];
+extern const u8 gMonIcon_Shelgon[];
+extern const u8 gMonFootprint_Shelgon[];
+extern const u8 gMonFrontPic_Salamence[];
+extern const u8 gMonPalette_Salamence[];
+extern const u8 gMonBackPic_Salamence[];
+extern const u8 gMonShinyPalette_Salamence[];
+extern const u8 gMonIcon_Salamence[];
+extern const u8 gMonFootprint_Salamence[];
+extern const u8 gMonFrontPic_Beldum[];
+extern const u8 gMonPalette_Beldum[];
+extern const u8 gMonBackPic_Beldum[];
+extern const u8 gMonShinyPalette_Beldum[];
+extern const u8 gMonIcon_Beldum[];
+extern const u8 gMonFootprint_Beldum[];
+extern const u8 gMonFrontPic_Metang[];
+extern const u8 gMonPalette_Metang[];
+extern const u8 gMonBackPic_Metang[];
+extern const u8 gMonShinyPalette_Metang[];
+extern const u8 gMonIcon_Metang[];
+extern const u8 gMonFootprint_Metang[];
+extern const u8 gMonFrontPic_Metagross[];
+extern const u8 gMonPalette_Metagross[];
+extern const u8 gMonBackPic_Metagross[];
+extern const u8 gMonShinyPalette_Metagross[];
+extern const u8 gMonIcon_Metagross[];
+extern const u8 gMonFootprint_Metagross[];
+extern const u8 gMonFrontPic_Regirock[];
+extern const u8 gMonPalette_Regirock[];
+extern const u8 gMonBackPic_Regirock[];
+extern const u8 gMonShinyPalette_Regirock[];
+extern const u8 gMonIcon_Regirock[];
+extern const u8 gMonFootprint_Regirock[];
+extern const u8 gMonFrontPic_Regice[];
+extern const u8 gMonPalette_Regice[];
+extern const u8 gMonBackPic_Regice[];
+extern const u8 gMonShinyPalette_Regice[];
+extern const u8 gMonIcon_Regice[];
+extern const u8 gMonFootprint_Regice[];
+extern const u8 gMonFrontPic_Registeel[];
+extern const u8 gMonPalette_Registeel[];
+extern const u8 gMonBackPic_Registeel[];
+extern const u8 gMonShinyPalette_Registeel[];
+extern const u8 gMonIcon_Registeel[];
+extern const u8 gMonFootprint_Registeel[];
+extern const u8 gMonFrontPic_Kyogre[];
+extern const u8 gMonPalette_Kyogre[];
+extern const u8 gMonBackPic_Kyogre[];
+extern const u8 gMonShinyPalette_Kyogre[];
+extern const u8 gMonIcon_Kyogre[];
+extern const u8 gMonFootprint_Kyogre[];
+extern const u8 gMonFrontPic_Groudon[];
+extern const u8 gMonPalette_Groudon[];
+extern const u8 gMonBackPic_Groudon[];
+extern const u8 gMonShinyPalette_Groudon[];
+extern const u8 gMonIcon_Groudon[];
+extern const u8 gMonFootprint_Groudon[];
+extern const u8 gMonFrontPic_Rayquaza[];
+extern const u8 gMonPalette_Rayquaza[];
+extern const u8 gMonBackPic_Rayquaza[];
+extern const u8 gMonShinyPalette_Rayquaza[];
+extern const u8 gMonIcon_Rayquaza[];
+extern const u8 gMonFootprint_Rayquaza[];
+extern const u8 gMonFrontPic_Latias[];
+extern const u8 gMonPalette_Latias[];
+extern const u8 gMonBackPic_Latias[];
+extern const u8 gMonShinyPalette_Latias[];
+extern const u8 gMonIcon_Latias[];
+extern const u8 gMonFootprint_Latias[];
+extern const u8 gMonFrontPic_Latios[];
+extern const u8 gMonPalette_Latios[];
+extern const u8 gMonBackPic_Latios[];
+extern const u8 gMonShinyPalette_Latios[];
+extern const u8 gMonIcon_Latios[];
+extern const u8 gMonFootprint_Latios[];
+extern const u8 gMonFrontPic_Jirachi[];
+extern const u8 gMonPalette_Jirachi[];
+extern const u8 gMonBackPic_Jirachi[];
+extern const u8 gMonShinyPalette_Jirachi[];
+extern const u8 gMonIcon_Jirachi[];
+extern const u8 gMonFootprint_Jirachi[];
+extern const u8 gMonFrontPic_Deoxys[];
+extern const u8 gMonPalette_Deoxys[];
+extern const u8 gMonBackPic_Deoxys[];
+extern const u8 gMonShinyPalette_Deoxys[];
+extern const u8 gMonIcon_Deoxys[];
+extern const u8 gMonFootprint_Deoxys[];
+extern const u8 gMonFrontPic_Chimecho[];
+extern const u8 gMonPalette_Chimecho[];
+extern const u8 gMonBackPic_Chimecho[];
+extern const u8 gMonShinyPalette_Chimecho[];
+extern const u8 gMonIcon_Chimecho[];
+extern const u8 gMonFootprint_Chimecho[];
+extern const u8 gMonPic_Egg[];
+extern const u8 gMonPalette_Egg[];
+extern const u8 gMonFrontPic_UnownB[];
+extern const u8 gMonBackPic_UnownB[];
+extern const u8 gMonIcon_UnownB[];
+extern const u8 gMonFrontPic_UnownC[];
+extern const u8 gMonBackPic_UnownC[];
+extern const u8 gMonIcon_UnownC[];
+extern const u8 gMonFrontPic_UnownD[];
+extern const u8 gMonBackPic_UnownD[];
+extern const u8 gMonIcon_UnownD[];
+extern const u8 gMonFrontPic_UnownE[];
+extern const u8 gMonBackPic_UnownE[];
+extern const u8 gMonIcon_UnownE[];
+extern const u8 gMonFrontPic_UnownF[];
+extern const u8 gMonBackPic_UnownF[];
+extern const u8 gMonIcon_UnownF[];
+extern const u8 gMonFrontPic_UnownG[];
+extern const u8 gMonBackPic_UnownG[];
+extern const u8 gMonIcon_UnownG[];
+extern const u8 gMonFrontPic_UnownH[];
+extern const u8 gMonBackPic_UnownH[];
+extern const u8 gMonIcon_UnownH[];
+extern const u8 gMonFrontPic_UnownI[];
+extern const u8 gMonBackPic_UnownI[];
+extern const u8 gMonIcon_UnownI[];
+extern const u8 gMonFrontPic_UnownJ[];
+extern const u8 gMonBackPic_UnownJ[];
+extern const u8 gMonIcon_UnownJ[];
+extern const u8 gMonFrontPic_UnownK[];
+extern const u8 gMonBackPic_UnownK[];
+extern const u8 gMonIcon_UnownK[];
+extern const u8 gMonFrontPic_UnownL[];
+extern const u8 gMonBackPic_UnownL[];
+extern const u8 gMonIcon_UnownL[];
+extern const u8 gMonFrontPic_UnownM[];
+extern const u8 gMonBackPic_UnownM[];
+extern const u8 gMonIcon_UnownM[];
+extern const u8 gMonFrontPic_UnownN[];
+extern const u8 gMonBackPic_UnownN[];
+extern const u8 gMonIcon_UnownN[];
+extern const u8 gMonFrontPic_UnownO[];
+extern const u8 gMonBackPic_UnownO[];
+extern const u8 gMonIcon_UnownO[];
+extern const u8 gMonFrontPic_UnownP[];
+extern const u8 gMonBackPic_UnownP[];
+extern const u8 gMonIcon_UnownP[];
+extern const u8 gMonFrontPic_UnownQ[];
+extern const u8 gMonBackPic_UnownQ[];
+extern const u8 gMonIcon_UnownQ[];
+extern const u8 gMonFrontPic_UnownR[];
+extern const u8 gMonBackPic_UnownR[];
+extern const u8 gMonIcon_UnownR[];
+extern const u8 gMonFrontPic_UnownS[];
+extern const u8 gMonBackPic_UnownS[];
+extern const u8 gMonIcon_UnownS[];
+extern const u8 gMonFrontPic_UnownT[];
+extern const u8 gMonBackPic_UnownT[];
+extern const u8 gMonIcon_UnownT[];
+extern const u8 gMonFrontPic_UnownU[];
+extern const u8 gMonBackPic_UnownU[];
+extern const u8 gMonIcon_UnownU[];
+extern const u8 gMonFrontPic_UnownV[];
+extern const u8 gMonBackPic_UnownV[];
+extern const u8 gMonIcon_UnownV[];
+extern const u8 gMonFrontPic_UnownW[];
+extern const u8 gMonBackPic_UnownW[];
+extern const u8 gMonIcon_UnownW[];
+extern const u8 gMonFrontPic_UnownX[];
+extern const u8 gMonBackPic_UnownX[];
+extern const u8 gMonIcon_UnownX[];
+extern const u8 gMonFrontPic_UnownY[];
+extern const u8 gMonBackPic_UnownY[];
+extern const u8 gMonIcon_UnownY[];
+extern const u8 gMonFrontPic_UnownZ[];
+extern const u8 gMonBackPic_UnownZ[];
+extern const u8 gMonIcon_UnownZ[];
+extern const u8 gMonFrontPic_UnownExclamationMark[];
+extern const u8 gMonBackPic_UnownExclamationMark[];
+extern const u8 gMonIcon_UnownExclamationMark[];
+extern const u8 gMonFrontPic_UnownQuestionMark[];
+extern const u8 gMonBackPic_UnownQuestionMark[];
+extern const u8 gMonIcon_UnownQuestionMark[];
+
+extern const u8 gMonIcon_QuestionMark[];
+extern const u8 gMonIcon_Egg[];
+extern const u16 gMonIconPalettes[][16];
+
// pokeblock
extern const u8 gMenuPokeblock_Gfx[];
extern const u8 gMenuPokeblock_Pal[];
@@ -136,29 +2545,29 @@ extern const u8 gUnknown_08DB9F08[];
extern const u8 gUnknown_08DB9FFC[];
extern const u8 gUnknown_08DBA020[];
extern const u8 gUnknown_08DBA12C[];
-extern const u8 gUnknown_08DCC05C[];
-extern const u16 gUnknown_08DCC01C[];
-extern const u16 gUnknown_08DCC03C[];
+extern const u8 gWallclock_Gfx[];
+extern const u16 gWallclockMale_Pal[];
+extern const u16 gWallclockFemale_Pal[];
extern const u8 gUnknown_08DCC648[];
extern const u8 gUnknown_08DCC908[];
-extern const u8 gUnknown_08DD87C0[];
-extern const u8 gUnknown_08DD8EE0[];
-extern const u16 gUnknown_08DD8780[];
-extern const u8 gUnknown_08DD90E0[];
-extern const u8 gUnknown_08DD9718[];
-extern const u16 gUnknown_08DD9080[];
-extern const u8 gUnknown_08DD98B4[];
-extern const u8 gUnknown_08DD9E58[];
-extern const u16 gUnknown_08DD9874[];
-extern const u8 gUnknown_08DDA02C[];
-extern const u8 gUnknown_08DDA63C[];
-extern const u16 gUnknown_08DD9FEC[];
-extern const u8 gUnknown_08DDA840[];
-extern const u8 gUnknown_08DDAE40[];
-extern const u16 gUnknown_08DDA800[];
-extern const u8 gUnknown_08DDB020[];
-extern const u8 gUnknown_08DDB2C4[];
-extern const u16 gUnknown_08DDAFE0[];
+extern const u8 gBerryFixGameboy_Gfx[];
+extern const u8 gBerryFixGameboy_Tilemap[];
+extern const u16 gBerryFixGameboy_Pal[];
+extern const u8 gBerryFixGameboyLogo_Gfx[];
+extern const u8 gBerryFixGameboyLogo_Tilemap[];
+extern const u16 gBerryFixGameboyLogo_Pal[];
+extern const u8 gBerryFixGbaTransfer_Gfx[];
+extern const u8 gBerryFixGbaTransfer_Tilemap[];
+extern const u16 gBerryFixGbaTransfer_Pal[];
+extern const u8 gBerryFixGbaTransferHighlight_Gfx[];
+extern const u8 gBerryFixGbaTransferHighlight_Tilemap[];
+extern const u16 gBerryFixGbaTransferHighlight_Pal[];
+extern const u8 gBerryFixGbaTransferError_Gfx[];
+extern const u8 gBerryFixGbaTransferError_Tilemap[];
+extern const u16 gBerryFixGbaTransferError_Pal[];
+extern const u8 gBerryFixWindow_Gfx[];
+extern const u8 gBerryFixWindow_Tilemap[];
+extern const u16 gBerryFixWindow_Pal[];
extern const u8 gBattleTextboxTiles[];
extern const u8 gBattleTextboxTilemap[];
@@ -238,4 +2647,32 @@ extern const u8 gBattleTerrainPalette_StadiumGlacia[];
extern const u8 gBattleTerrainPalette_StadiumDrake[];
extern const u8 gBattleTerrainPalette_StadiumWallace[];
+extern const u8 gPokedexMenu2_Gfx[];
+extern const u8 gPokedexText_Pal[];
+
+// rayquaza scene gfx
+extern const u8 gRaySceneGroudon_Gfx[];
+extern const u8 gRaySceneGroudon2_Gfx[];
+extern const u8 gRaySceneGroudon3_Gfx[];
+extern const u8 gRaySceneKyogre_Gfx[];
+extern const u8 gRaySceneKyogre2_Gfx[];
+extern const u8 gRaySceneKyogre3_Gfx[];
+extern const u8 gRaySceneGroudon_Pal[];
+extern const u8 gRaySceneKyogre_Pal[];
+extern const u8 gRaySceneSmoke_Gfx[];
+extern const u8 gRaySceneSmoke_Pal[];
+extern const u8 gRaySceneRayquaza_Pal[];
+extern const u8 gRaySceneRayquazaFly1_Gfx[];
+extern const u8 gRaySceneRayquazaTail_Gfx[];
+extern const u8 gRaySceneGroudonLeft_Gfx[];
+extern const u8 gRaySceneGroudonTail_Gfx[];
+extern const u8 gRaySceneKyogreRight_Gfx[];
+extern const u8 gRaySceneRayquazaHover_Gfx[];
+extern const u8 gRaySceneRayquazaFlyIn_Gfx[];
+extern const u8 gRaySceneSplash_Gfx[];
+extern const u8 gRaySceneGroudonLeft_Pal[];
+extern const u8 gRaySceneKyogreRight_Pal[];
+extern const u8 gRaySceneRayquazaHover_Pal[];
+extern const u8 gRaySceneSplash_Pal[];
+
#endif //GUARD_GRAPHICS_H
diff --git a/include/overworld.h b/include/overworld.h
index a5fba0c10..d6f90b666 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -42,6 +42,9 @@ void sub_8084EBC(s16, s16);
void player_avatar_init_params_reset(void);
+bool8 Overworld_MapTypeAllowsTeleportAndFly(u8 mapType);
+void Overworld_ResetStateAfterTeleport(void);
+
void Overworld_SetFlashLevel(s32 a1);
//u8 Overworld_GetFlashLevel(void);
void sub_8085524(u16);
diff --git a/include/party_menu.h b/include/party_menu.h
index 3756ef569..1d1661cee 100644
--- a/include/party_menu.h
+++ b/include/party_menu.h
@@ -16,5 +16,7 @@ void sub_81B58A8(void);
void DoWallyTutorialBagMenu(void);
u8 pokemon_ailments_get_primary(u32 status);
u8 *GetMonNickname(struct Pokemon *mon, u8 *dst);
+u8 GetCursorSelectionMonId(void);
+bool8 FieldCallback_Teleport(void);
#endif // GUARD_PARTY_MENU_H
diff --git a/include/rom6.h b/include/rom6.h
index fc33b7d1f..f91b34b4a 100644
--- a/include/rom6.h
+++ b/include/rom6.h
@@ -11,5 +11,6 @@ void UpdateBirchState(u16 days);
void UpdateFrontierManiac(u16 days);
void UpdateFrontierGambler(u16 days);
void SetShoalItemFlag(u16 days);
+u8 oei_task_add(void);
#endif //GUARD_ROM6_H
diff --git a/include/sprite.h b/include/sprite.h
index 170d77c3f..d5c6bc402 100644
--- a/include/sprite.h
+++ b/include/sprite.h
@@ -120,10 +120,6 @@ union AffineAnimCmd
{.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}}
#define AFFINEANIMCMD_END \
{.type = AFFINEANIMCMDTYPE_END}
-#define AFFINEANIMCMD_LOOP(_count) \
- {.loop = {.type = AFFINEANIMCMDTYPE_LOOP, .count = _count}}
-#define AFFINEANIMCMD_JUMP(_target) \
- {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}}
struct AffineAnimState
{
diff --git a/include/strings.h b/include/strings.h
index 5521d828b..a382191a0 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -137,4 +137,37 @@ extern const u8 gMenuText_Give2[];
extern const u8 gText_Cancel2[];
+extern const u8 gText_WithdrawPokemon[];
+extern const u8 gText_WithdrawMonDescription[];
+extern const u8 gText_DepositPokemon[];
+extern const u8 gText_DepositMonDescription[];
+extern const u8 gText_MovePokemon[];
+extern const u8 gText_MoveMonDescription[];
+extern const u8 gText_MoveItems[];
+extern const u8 gText_MoveItemsDescription[];
+extern const u8 gText_SeeYa[];
+extern const u8 gText_SeeYaDescription[];
+
+// menu texts
+extern const u8 gText_MenuPokedex[];
+extern const u8 gText_MenuPokemon[];
+extern const u8 gText_MenuBag[];
+extern const u8 gText_MenuPokenav[];
+extern const u8 gText_MenuPlayer[];
+extern const u8 gText_MenuSave[];
+extern const u8 gText_MenuOption[];
+extern const u8 gText_MenuExit[];
+extern const u8 gText_MenuRetire[];
+extern const u8 gText_MenuRest[];
+extern const u8 gText_Floor1[];
+extern const u8 gText_Floor2[];
+extern const u8 gText_Floor3[];
+extern const u8 gText_Floor4[];
+extern const u8 gText_Floor5[];
+extern const u8 gText_Floor6[];
+extern const u8 gText_Floor7[];
+extern const u8 gText_Peak[];
+extern const u8 gText_SafariBallStock[];
+extern const u8 gText_BattlePyramidFloor[];
+
#endif //GUARD_STRINGS_H
diff --git a/ld_script.txt b/ld_script.txt
index e7a8f81f7..9f922126e 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -127,10 +127,12 @@ SECTIONS {
asm/field_effect.o(.text);
asm/unknown_task.o(.text);
asm/option_menu.o(.text);
+ src/pokedex.o(.text);
asm/pokedex.o(.text);
asm/trainer_card.o(.text);
src/pokemon_storage_system.o(.text);
asm/pokemon_storage_system.o(.text);
+ src/pokemon_icon.o(.text);
asm/pokemon_icon.o(.text);
asm/script_movement.o(.text);
asm/fldeff_cut.o(.text);
@@ -161,7 +163,7 @@ SECTIONS {
asm/contest_link_80FC4F4.o(.text);
asm/item_use.o(.text);
asm/battle_anim_80FE840.o(.text);
- asm/bike.o(.text);
+ src/bike.o(.text);
asm/easy_chat.o(.text);
asm/mon_markings.o(.text);
asm/mauville_old_man.o(.text);
@@ -235,7 +237,7 @@ SECTIONS {
asm/intro_credits_graphics.o(.text);
src/evolution_graphics.o(.text);
src/bard_music.o(.text);
- asm/fldeff_teleport.o(.text);
+ src/fldeff_teleport.o(.text);
asm/battle_link_817C95C.o(.text);
asm/pokemon_animation.o(.text);
src/recorded_battle.o(.text);
@@ -265,6 +267,7 @@ SECTIONS {
src/pokemon_summary_screen.o(.text);
asm/pokemon_summary_screen.o(.text);
asm/pokenav.o(.text);
+ src/rayquaza_scene.o(.text);
asm/rayquaza_scene.o(.text);
src/walda_phrase.o(.text);
asm/contest_link_81D9DE4.o(.text);
@@ -373,7 +376,7 @@ SECTIONS {
data/coord_event_weather.o(.rodata);
data/field_tasks.o(.rodata);
data/reset_rtc_screen.o(.rodata);
- data/start_menu.o(.rodata);
+ src/start_menu.o(.rodata);
src/tileset_anims.o(.rodata);
src/palette.o(.rodata);
data/fanfares.o(.rodata);
@@ -390,10 +393,12 @@ SECTIONS {
data/wild_encounter.o(.rodata);
data/field_effect.o(.rodata);
data/option_menu.o(.rodata);
+ src/pokedex.o(.rodata);
data/pokedex.o(.rodata);
data/trainer_card.o(.rodata);
+ src/pokemon_storage_system.o(.rodata);
data/pokemon_storage_system.o(.rodata);
- data/pokemon_icon.o(.rodata);
+ src/pokemon_icon.o(.rodata);
data/fldeff_cut.o(.rodata);
data/map_name_popup.o(.rodata);
data/item_menu_icons.o(.rodata);
@@ -415,7 +420,7 @@ SECTIONS {
data/rotating_gate.o(.rodata);
data/item_use.o(.rodata);
data/battle_anim_80FE840.o(.rodata);
- data/bike.o(.rodata);
+ src/bike.o(.rodata);
data/easy_chat.o(.rodata);
data/mon_markings.o(.rodata);
data/mauville_old_man.o(.rodata);
@@ -496,7 +501,7 @@ SECTIONS {
src/berry_fix_program.o(.rodata);
data/pokemon_summary_screen.o(.rodata);
data/pokenav.o(.rodata);
- data/rayquaza_scene.o(.rodata);
+ src/rayquaza_scene.o(.rodata);
src/walda_phrase.o(.rodata);
data/trainer_rematch.o(.rodata);
data/unk_sprite_file.o(.rodata);
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c
index 44be0a4d9..42cf0595f 100644
--- a/src/battle_ai_script_commands.c
+++ b/src/battle_ai_script_commands.c
@@ -9,6 +9,7 @@
#include "constants/battle_move_effects.h"
#include "constants/moves.h"
#include "util.h"
+#include "constants/battle_ai.h"
#define AIScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24)
#define AIScriptRead16(ptr) ((ptr)[0] | (ptr)[1] << 8)
@@ -26,14 +27,6 @@
#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(gBattleResources->ai))
#define BATTLE_HISTORY ((struct BattleHistory *)(gBattleResources->battleHistory))
-enum
-{
- AI_TARGET,
- AI_USER,
- AI_TARGET_PARTNER,
- AI_USER_PARTNER
-};
-
// AI states
enum
{
@@ -104,30 +97,30 @@ static void BattleAICmd_if_less_than(void);
static void BattleAICmd_if_more_than(void);
static void BattleAICmd_if_equal(void);
static void BattleAICmd_if_not_equal(void);
-static void BattleAICmd_if_less_than_32(void);
-static void BattleAICmd_if_more_than_32(void);
-static void BattleAICmd_if_equal_32(void);
-static void BattleAICmd_if_not_equal_32(void);
+static void BattleAICmd_if_less_than_ptr(void);
+static void BattleAICmd_if_more_than_ptr(void);
+static void BattleAICmd_if_equal_ptr(void);
+static void BattleAICmd_if_not_equal_ptr(void);
static void BattleAICmd_if_move(void);
static void BattleAICmd_if_not_move(void);
static void BattleAICmd_if_in_bytes(void);
static void BattleAICmd_if_not_in_bytes(void);
static void BattleAICmd_if_in_hwords(void);
static void BattleAICmd_if_not_in_hwords(void);
-static void BattleAICmd_if_user_can_damage(void);
-static void BattleAICmd_if_user_cant_damage(void);
+static void BattleAICmd_if_user_has_attacking_move(void);
+static void BattleAICmd_if_user_has_no_attacking_moves(void);
static void BattleAICmd_get_turn_count(void);
static void BattleAICmd_get_type(void);
-static void BattleAICmd_get_last_used_bank_move_power(void);
-static void BattleAICmd_is_most_powerful_move(void);
+static void BattleAICmd_get_considered_move_power(void);
+static void BattleAICmd_get_how_powerful_move_is(void);
static void BattleAICmd_get_last_used_bank_move(void);
-static void BattleAICmd_if_arg_equal(void);
-static void BattleAICmd_if_arg_not_equal(void);
-static void BattleAICmd_if_would_go_first(void);
-static void BattleAICmd_if_would_not_go_first(void);
+static void BattleAICmd_if_equal_(void);
+static void BattleAICmd_if_not_equal_(void);
+static void BattleAICmd_if_user_goes(void);
+static void BattleAICmd_if_user_doesnt_go(void);
static void BattleAICmd_nullsub_2A(void);
static void BattleAICmd_nullsub_2B(void);
-static void BattleAICmd_count_alive_pokemon(void);
+static void BattleAICmd_count_usable_party_mons(void);
static void BattleAICmd_get_considered_move(void);
static void BattleAICmd_get_considered_move_effect(void);
static void BattleAICmd_get_ability(void);
@@ -147,17 +140,17 @@ static void BattleAICmd_if_stat_level_not_equal(void);
static void BattleAICmd_if_can_faint(void);
static void BattleAICmd_if_cant_faint(void);
static void BattleAICmd_if_has_move(void);
-static void BattleAICmd_if_dont_have_move(void);
-static void BattleAICmd_if_move_effect(void);
-static void BattleAICmd_if_not_move_effect(void);
+static void BattleAICmd_if_doesnt_have_move(void);
+static void BattleAICmd_if_has_move_with_effect(void);
+static void BattleAICmd_if_doesnt_have_move_with_effect(void);
static void BattleAICmd_if_any_move_disabled_or_encored(void);
static void BattleAICmd_if_curr_move_disabled_or_encored(void);
static void BattleAICmd_flee(void);
-static void BattleAICmd_if_random_100(void);
+static void BattleAICmd_if_random_safari_flee(void);
static void BattleAICmd_watch(void);
static void BattleAICmd_get_hold_effect(void);
static void BattleAICmd_get_gender(void);
-static void BattleAICmd_is_first_turn(void);
+static void BattleAICmd_is_first_turn_for(void);
static void BattleAICmd_get_stockpile_count(void);
static void BattleAICmd_is_double_battle(void);
static void BattleAICmd_get_used_held_item(void);
@@ -172,7 +165,7 @@ static void BattleAICmd_nullsub_55(void);
static void BattleAICmd_nullsub_56(void);
static void BattleAICmd_nullsub_57(void);
static void BattleAICmd_call(void);
-static void BattleAICmd_jump(void);
+static void BattleAICmd_goto(void);
static void BattleAICmd_end(void);
static void BattleAICmd_if_level_cond(void);
static void BattleAICmd_if_target_taunted(void);
@@ -215,30 +208,30 @@ static const BattleAICmdFunc sBattleAICmdTable[] =
BattleAICmd_if_more_than, // 0x12
BattleAICmd_if_equal, // 0x13
BattleAICmd_if_not_equal, // 0x14
- BattleAICmd_if_less_than_32, // 0x15
- BattleAICmd_if_more_than_32, // 0x16
- BattleAICmd_if_equal_32, // 0x17
- BattleAICmd_if_not_equal_32, // 0x18
+ BattleAICmd_if_less_than_ptr, // 0x15
+ BattleAICmd_if_more_than_ptr, // 0x16
+ BattleAICmd_if_equal_ptr, // 0x17
+ BattleAICmd_if_not_equal_ptr, // 0x18
BattleAICmd_if_move, // 0x19
BattleAICmd_if_not_move, // 0x1A
BattleAICmd_if_in_bytes, // 0x1B
BattleAICmd_if_not_in_bytes, // 0x1C
BattleAICmd_if_in_hwords, // 0x1D
BattleAICmd_if_not_in_hwords, // 0x1E
- BattleAICmd_if_user_can_damage, // 0x1F
- BattleAICmd_if_user_cant_damage, // 0x20
+ BattleAICmd_if_user_has_attacking_move, // 0x1F
+ BattleAICmd_if_user_has_no_attacking_moves, // 0x20
BattleAICmd_get_turn_count, // 0x21
BattleAICmd_get_type, // 0x22
- BattleAICmd_get_last_used_bank_move_power, // 0x23
- BattleAICmd_is_most_powerful_move, // 0x24
+ BattleAICmd_get_considered_move_power, // 0x23
+ BattleAICmd_get_how_powerful_move_is, // 0x24
BattleAICmd_get_last_used_bank_move, // 0x25
- BattleAICmd_if_arg_equal, // 0x26
- BattleAICmd_if_arg_not_equal, // 0x27
- BattleAICmd_if_would_go_first, // 0x28
- BattleAICmd_if_would_not_go_first, // 0x29
+ BattleAICmd_if_equal_, // 0x26
+ BattleAICmd_if_not_equal_, // 0x27
+ BattleAICmd_if_user_goes, // 0x28
+ BattleAICmd_if_user_doesnt_go, // 0x29
BattleAICmd_nullsub_2A, // 0x2A
BattleAICmd_nullsub_2B, // 0x2B
- BattleAICmd_count_alive_pokemon, // 0x2C
+ BattleAICmd_count_usable_party_mons, // 0x2C
BattleAICmd_get_considered_move, // 0x2D
BattleAICmd_get_considered_move_effect, // 0x2E
BattleAICmd_get_ability, // 0x2F
@@ -258,17 +251,17 @@ static const BattleAICmdFunc sBattleAICmdTable[] =
BattleAICmd_if_can_faint, // 0x3D
BattleAICmd_if_cant_faint, // 0x3E
BattleAICmd_if_has_move, // 0x3F
- BattleAICmd_if_dont_have_move, // 0x40
- BattleAICmd_if_move_effect, // 0x41
- BattleAICmd_if_not_move_effect, // 0x42
+ BattleAICmd_if_doesnt_have_move, // 0x40
+ BattleAICmd_if_has_move_with_effect, // 0x41
+ BattleAICmd_if_doesnt_have_move_with_effect, // 0x42
BattleAICmd_if_any_move_disabled_or_encored, // 0x43
BattleAICmd_if_curr_move_disabled_or_encored, // 0x44
BattleAICmd_flee, // 0x45
- BattleAICmd_if_random_100, // 0x46
+ BattleAICmd_if_random_safari_flee, // 0x46
BattleAICmd_watch, // 0x47
BattleAICmd_get_hold_effect, // 0x48
BattleAICmd_get_gender, // 0x49
- BattleAICmd_is_first_turn, // 0x4A
+ BattleAICmd_is_first_turn_for, // 0x4A
BattleAICmd_get_stockpile_count, // 0x4B
BattleAICmd_is_double_battle, // 0x4C
BattleAICmd_get_used_held_item, // 0x4D
@@ -283,7 +276,7 @@ static const BattleAICmdFunc sBattleAICmdTable[] =
BattleAICmd_nullsub_56, // 0x56
BattleAICmd_nullsub_57, // 0x57
BattleAICmd_call, // 0x58
- BattleAICmd_jump, // 0x59
+ BattleAICmd_goto, // 0x59
BattleAICmd_end, // 0x5A
BattleAICmd_if_level_cond, // 0x5B
BattleAICmd_if_target_taunted, // 0x5C
@@ -374,32 +367,34 @@ void BattleAI_SetupAIData(u8 defaultScoreMoves)
// decide a random target bank in doubles
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
- gBankTarget = (Random() & 2) + (GetBankSide(gActiveBank) ^ 1);
+ gBankTarget = (Random() & BIT_MON) + (GetBankSide(gActiveBank) ^ BIT_SIDE);
if (gAbsentBankFlags & gBitTable[gBankTarget])
- gBankTarget ^= 2;
+ gBankTarget ^= BIT_MON;
}
// in singles there's only one choice
else
- gBankTarget = sBank_AI ^ 1;
+ {
+ gBankTarget = sBank_AI ^ BIT_SIDE;
+ }
if (gBattleTypeFlags & BATTLE_TYPE_RECORDED)
AI_THINKING_STRUCT->aiFlags = GetAiScriptsInRecordedBattle();
else if (gBattleTypeFlags & BATTLE_TYPE_SAFARI)
- AI_THINKING_STRUCT->aiFlags = 0x40000000;
+ AI_THINKING_STRUCT->aiFlags = AI_SCRIPT_SAFARI;
else if (gBattleTypeFlags & BATTLE_TYPE_ROAMER)
- AI_THINKING_STRUCT->aiFlags = 0x20000000;
+ AI_THINKING_STRUCT->aiFlags = AI_SCRIPT_ROAMING;
else if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
- AI_THINKING_STRUCT->aiFlags = 0x80000000;
+ AI_THINKING_STRUCT->aiFlags = AI_SCRIPT_FIRST_BATTLE;
else if (gBattleTypeFlags & BATTLE_TYPE_FACTORY)
AI_THINKING_STRUCT->aiFlags = GetAiScriptsInBattleFactory();
else if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_x4000000 | BATTLE_TYPE_SECRET_BASE))
- AI_THINKING_STRUCT->aiFlags = 7; // the smartest possible set
+ AI_THINKING_STRUCT->aiFlags = AI_SCRIPT_CHECK_BAD_MOVE | AI_SCRIPT_CHECK_VIABILITY | AI_SCRIPT_TRY_TO_FAINT;
else if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
AI_THINKING_STRUCT->aiFlags = gTrainers[gTrainerBattleOpponent_A].aiFlags | gTrainers[gTrainerBattleOpponent_B].aiFlags;
else
AI_THINKING_STRUCT->aiFlags = gTrainers[gTrainerBattleOpponent_A].aiFlags;
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
- AI_THINKING_STRUCT->aiFlags |= 0x80; // act smart in doubles and don't attack your partner
+ AI_THINKING_STRUCT->aiFlags |= AI_SCRIPT_DOUBLE_BATTLE; // act smart in doubles and don't attack your partner
}
u8 BattleAI_ChooseMoveOrAction(void)
@@ -723,14 +718,14 @@ static void BattleAICmd_score(void)
static void BattleAICmd_if_hp_less_than(void)
{
- u16 index;
+ u16 bank;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) < gAIScriptPtr[2])
+ if ((u32)(100 * gBattleMons[bank].hp / gBattleMons[bank].maxHP) < gAIScriptPtr[2])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
else
gAIScriptPtr += 7;
@@ -738,14 +733,14 @@ static void BattleAICmd_if_hp_less_than(void)
static void BattleAICmd_if_hp_more_than(void)
{
- u16 index;
+ u16 bank;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) > gAIScriptPtr[2])
+ if ((u32)(100 * gBattleMons[bank].hp / gBattleMons[bank].maxHP) > gAIScriptPtr[2])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
else
gAIScriptPtr += 7;
@@ -753,14 +748,14 @@ static void BattleAICmd_if_hp_more_than(void)
static void BattleAICmd_if_hp_equal(void)
{
- u16 index;
+ u16 bank;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) == gAIScriptPtr[2])
+ if ((u32)(100 * gBattleMons[bank].hp / gBattleMons[bank].maxHP) == gAIScriptPtr[2])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
else
gAIScriptPtr += 7;
@@ -768,14 +763,14 @@ static void BattleAICmd_if_hp_equal(void)
static void BattleAICmd_if_hp_not_equal(void)
{
- u16 index;
+ u16 bank;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- if ((u32)(100 * gBattleMons[index].hp / gBattleMons[index].maxHP) != gAIScriptPtr[2])
+ if ((u32)(100 * gBattleMons[bank].hp / gBattleMons[bank].maxHP) != gAIScriptPtr[2])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 3);
else
gAIScriptPtr += 7;
@@ -783,17 +778,17 @@ static void BattleAICmd_if_hp_not_equal(void)
static void BattleAICmd_if_status(void)
{
- u16 index;
- u32 arg;
+ u16 bank;
+ u32 status;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- arg = AIScriptRead32(gAIScriptPtr + 2);
+ status = AIScriptRead32(gAIScriptPtr + 2);
- if ((gBattleMons[index].status1 & arg) != 0)
+ if ((gBattleMons[bank].status1 & status) != 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -801,17 +796,17 @@ static void BattleAICmd_if_status(void)
static void BattleAICmd_if_not_status(void)
{
- u16 index;
- u32 arg;
+ u16 bank;
+ u32 status;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- arg = AIScriptRead32(gAIScriptPtr + 2);
+ status = AIScriptRead32(gAIScriptPtr + 2);
- if ((gBattleMons[index].status1 & arg) == 0)
+ if ((gBattleMons[bank].status1 & status) == 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -819,17 +814,17 @@ static void BattleAICmd_if_not_status(void)
static void BattleAICmd_if_status2(void)
{
- u16 index;
- u32 arg;
+ u16 bank;
+ u32 status;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- arg = AIScriptRead32(gAIScriptPtr + 2);
+ status = AIScriptRead32(gAIScriptPtr + 2);
- if ((gBattleMons[index].status2 & arg) != 0)
+ if ((gBattleMons[bank].status2 & status) != 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -837,17 +832,17 @@ static void BattleAICmd_if_status2(void)
static void BattleAICmd_if_not_status2(void)
{
- u16 index;
- u32 arg;
+ u16 bank;
+ u32 status;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- arg = AIScriptRead32(gAIScriptPtr + 2);
+ status = AIScriptRead32(gAIScriptPtr + 2);
- if ((gBattleMons[index].status2 & arg) == 0)
+ if ((gBattleMons[bank].status2 & status) == 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -855,17 +850,17 @@ static void BattleAICmd_if_not_status2(void)
static void BattleAICmd_if_status3(void)
{
- u16 index;
- u32 arg;
+ u16 bank;
+ u32 status;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- arg = AIScriptRead32(gAIScriptPtr + 2);
+ status = AIScriptRead32(gAIScriptPtr + 2);
- if ((gStatuses3[index] & arg) != 0)
+ if ((gStatuses3[bank] & status) != 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -873,17 +868,17 @@ static void BattleAICmd_if_status3(void)
static void BattleAICmd_if_not_status3(void)
{
- u16 index;
- u32 arg;
+ u16 bank;
+ u32 status;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- arg = AIScriptRead32(gAIScriptPtr + 2);
+ status = AIScriptRead32(gAIScriptPtr + 2);
- if ((gStatuses3[index] & arg) == 0)
+ if ((gStatuses3[bank] & status) == 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -891,18 +886,18 @@ static void BattleAICmd_if_not_status3(void)
static void BattleAICmd_if_side_affecting(void)
{
- u16 index;
- u32 arg1, arg2;
+ u16 bank;
+ u32 side, status;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- arg1 = GetBankIdentity(index) & 1;
- arg2 = AIScriptRead32(gAIScriptPtr + 2);
+ side = GET_BANK_SIDE(bank);
+ status = AIScriptRead32(gAIScriptPtr + 2);
- if ((gSideAffecting[arg1] & arg2) != 0)
+ if ((gSideAffecting[side] & status) != 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -910,18 +905,18 @@ static void BattleAICmd_if_side_affecting(void)
static void BattleAICmd_if_not_side_affecting(void)
{
- u16 index;
- u32 arg1, arg2;
+ u16 bank;
+ u32 side, status;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- arg1 = GetBankIdentity(index) & 1;
- arg2 = AIScriptRead32(gAIScriptPtr + 2);
+ side = GET_BANK_SIDE(bank);
+ status = AIScriptRead32(gAIScriptPtr + 2);
- if ((gSideAffecting[arg1] & arg2) == 0)
+ if ((gSideAffecting[side] & status) == 0)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 6);
else
gAIScriptPtr += 10;
@@ -959,41 +954,41 @@ static void BattleAICmd_if_not_equal(void)
gAIScriptPtr += 6;
}
-static void BattleAICmd_if_less_than_32(void)
+static void BattleAICmd_if_less_than_ptr(void)
{
- const u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1);
+ const u8 *value = AIScriptReadPtr(gAIScriptPtr + 1);
- if (AI_THINKING_STRUCT->funcResult < *temp)
+ if (AI_THINKING_STRUCT->funcResult < *value)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5);
else
gAIScriptPtr += 9;
}
-static void BattleAICmd_if_more_than_32(void)
+static void BattleAICmd_if_more_than_ptr(void)
{
- const u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1);
+ const u8 *value = AIScriptReadPtr(gAIScriptPtr + 1);
- if (AI_THINKING_STRUCT->funcResult > *temp)
+ if (AI_THINKING_STRUCT->funcResult > *value)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5);
else
gAIScriptPtr += 9;
}
-static void BattleAICmd_if_equal_32(void)
+static void BattleAICmd_if_equal_ptr(void)
{
- const u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1);
+ const u8 *value = AIScriptReadPtr(gAIScriptPtr + 1);
- if (AI_THINKING_STRUCT->funcResult == *temp)
+ if (AI_THINKING_STRUCT->funcResult == *value)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5);
else
gAIScriptPtr += 9;
}
-static void BattleAICmd_if_not_equal_32(void)
+static void BattleAICmd_if_not_equal_ptr(void)
{
- const u8 *temp = AIScriptReadPtr(gAIScriptPtr + 1);
+ const u8 *value = AIScriptReadPtr(gAIScriptPtr + 1);
- if (AI_THINKING_STRUCT->funcResult != *temp)
+ if (AI_THINKING_STRUCT->funcResult != *value)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5);
else
gAIScriptPtr += 9;
@@ -1083,7 +1078,7 @@ static void BattleAICmd_if_not_in_hwords(void)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 5);
}
-static void BattleAICmd_if_user_can_damage(void)
+static void BattleAICmd_if_user_has_attacking_move(void)
{
s32 i;
@@ -1099,7 +1094,7 @@ static void BattleAICmd_if_user_can_damage(void)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
}
-static void BattleAICmd_if_user_cant_damage(void)
+static void BattleAICmd_if_user_has_no_attacking_moves(void)
{
s32 i;
@@ -1127,28 +1122,28 @@ static void BattleAICmd_get_type(void)
switch (typeVar)
{
- case 1: // player primary type
+ case AI_TYPE1_USER: // AI user primary type
AI_THINKING_STRUCT->funcResult = gBattleMons[sBank_AI].type1;
break;
- case 0: // enemy primary type
+ case AI_TYPE1_TARGET: // target primary type
AI_THINKING_STRUCT->funcResult = gBattleMons[gBankTarget].type1;
break;
- case 3: // player secondary type
+ case AI_TYPE2_USER: // AI user secondary type
AI_THINKING_STRUCT->funcResult = gBattleMons[sBank_AI].type2;
break;
- case 2: // enemy secondary type
+ case AI_TYPE2_TARGET: // target secondary type
AI_THINKING_STRUCT->funcResult = gBattleMons[gBankTarget].type2;
break;
- case 4: // type of move being pointed to
+ case AI_TYPE_MOVE: // type of move being pointed to
AI_THINKING_STRUCT->funcResult = gBattleMoves[AI_THINKING_STRUCT->moveConsidered].type;
break;
}
gAIScriptPtr += 2;
}
-static u8 BattleAI_GetWantedBank(u8 index)
+static u8 BattleAI_GetWantedBank(u8 bank)
{
- switch (index)
+ switch (bank)
{
case AI_USER:
return sBank_AI;
@@ -1168,23 +1163,23 @@ static void BattleAICmd_is_of_type(void)
if(gBattleMons[bank].type1 == gAIScriptPtr[2] || gBattleMons[bank].type2 == gAIScriptPtr[2])
{
- AI_THINKING_STRUCT->funcResult = 1;
+ AI_THINKING_STRUCT->funcResult = TRUE;
}
else
{
- AI_THINKING_STRUCT->funcResult = 0;
+ AI_THINKING_STRUCT->funcResult = FALSE;
}
gAIScriptPtr += 3;
}
-static void BattleAICmd_get_last_used_bank_move_power(void)
+static void BattleAICmd_get_considered_move_power(void)
{
AI_THINKING_STRUCT->funcResult = gBattleMoves[AI_THINKING_STRUCT->moveConsidered].power;
gAIScriptPtr += 1;
}
-static void BattleAICmd_is_most_powerful_move(void)
+static void BattleAICmd_get_how_powerful_move_is(void)
{
s32 i, checkedMove;
s32 moveDmgs[4];
@@ -1236,13 +1231,13 @@ static void BattleAICmd_is_most_powerful_move(void)
}
if (checkedMove == 4)
- AI_THINKING_STRUCT->funcResult = 2; // is the most powerful
+ AI_THINKING_STRUCT->funcResult = MOVE_MOST_POWERFUL; // is the most powerful
else
- AI_THINKING_STRUCT->funcResult = 1; // not most powerful
+ AI_THINKING_STRUCT->funcResult = MOVE_NOT_MOST_POWERFUL; // not most powerful
}
else
{
- AI_THINKING_STRUCT->funcResult = 0; // highly discouraged in terms of power
+ AI_THINKING_STRUCT->funcResult = MOVE_POWER_DISCOURAGED; // highly discouraged in terms of power
}
gAIScriptPtr++;
@@ -1258,7 +1253,7 @@ static void BattleAICmd_get_last_used_bank_move(void)
gAIScriptPtr += 2;
}
-static void BattleAICmd_if_arg_equal(void)
+static void BattleAICmd_if_equal_(void) // same as if_equal
{
if (gAIScriptPtr[1] == AI_THINKING_STRUCT->funcResult)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
@@ -1266,7 +1261,7 @@ static void BattleAICmd_if_arg_equal(void)
gAIScriptPtr += 6;
}
-static void BattleAICmd_if_arg_not_equal(void)
+static void BattleAICmd_if_not_equal_(void) // same as if_not_equal
{
if (gAIScriptPtr[1] != AI_THINKING_STRUCT->funcResult)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
@@ -1274,7 +1269,7 @@ static void BattleAICmd_if_arg_not_equal(void)
gAIScriptPtr += 6;
}
-static void BattleAICmd_if_would_go_first(void)
+static void BattleAICmd_if_user_goes(void)
{
if (GetWhoStrikesFirst(sBank_AI, gBankTarget, TRUE) == gAIScriptPtr[1])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
@@ -1282,7 +1277,7 @@ static void BattleAICmd_if_would_go_first(void)
gAIScriptPtr += 6;
}
-static void BattleAICmd_if_would_not_go_first(void)
+static void BattleAICmd_if_user_doesnt_go(void)
{
if (GetWhoStrikesFirst(sBank_AI, gBankTarget, TRUE) != gAIScriptPtr[1])
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
@@ -1298,9 +1293,9 @@ static void BattleAICmd_nullsub_2B(void)
{
}
-static void BattleAICmd_count_alive_pokemon(void)
+static void BattleAICmd_count_usable_party_mons(void)
{
- u8 index;
+ u8 bank;
u8 bankOnField1, bankOnField2;
struct Pokemon *party;
int i;
@@ -1308,29 +1303,29 @@ static void BattleAICmd_count_alive_pokemon(void)
AI_THINKING_STRUCT->funcResult = 0;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- if (GetBankSide(index) == SIDE_PLAYER)
+ if (GetBankSide(bank) == SIDE_PLAYER)
party = gPlayerParty;
else
party = gEnemyParty;
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
- u32 status;
- bankOnField1 = gBattlePartyID[index];
- status = GetBankIdentity(index) ^ 2;
- bankOnField2 = gBattlePartyID[GetBankByIdentity(status)];
+ u32 identity;
+ bankOnField1 = gBattlePartyID[bank];
+ identity = GetBankIdentity(bank) ^ BIT_MON;
+ bankOnField2 = gBattlePartyID[GetBankByIdentity(identity)];
}
else // in singles there's only one bank by side
{
- bankOnField1 = gBattlePartyID[index];
- bankOnField2 = gBattlePartyID[index];
+ bankOnField1 = gBattlePartyID[bank];
+ bankOnField2 = gBattlePartyID[bank];
}
- for (i = 0; i < 6; i++)
+ for (i = 0; i < PARTY_SIZE; i++)
{
if (i != bankOnField1 && i != bankOnField2
&& GetMonData(&party[i], MON_DATA_HP) != 0
@@ -1358,60 +1353,60 @@ static void BattleAICmd_get_considered_move_effect(void)
static void BattleAICmd_get_ability(void)
{
- u8 index;
+ u8 bank;
if (gAIScriptPtr[1] == AI_USER)
- index = sBank_AI;
+ bank = sBank_AI;
else
- index = gBankTarget;
+ bank = gBankTarget;
- if(gActiveBank != index)
+ if (gActiveBank != bank)
{
- if(BATTLE_HISTORY->abilities[index] != 0)
+ if (BATTLE_HISTORY->abilities[bank] != 0)
{
- AI_THINKING_STRUCT->funcResult = BATTLE_HISTORY->abilities[index];
+ AI_THINKING_STRUCT->funcResult = BATTLE_HISTORY->abilities[bank];
gAIScriptPtr += 2;
return;
}
// abilities that prevent fleeing.
- if (gBattleMons[index].ability == ABILITY_SHADOW_TAG
- || gBattleMons[index].ability == ABILITY_MAGNET_PULL
- || gBattleMons[index].ability == ABILITY_ARENA_TRAP)
+ if (gBattleMons[bank].ability == ABILITY_SHADOW_TAG
+ || gBattleMons[bank].ability == ABILITY_MAGNET_PULL
+ || gBattleMons[bank].ability == ABILITY_ARENA_TRAP)
{
- AI_THINKING_STRUCT->funcResult = gBattleMons[index].ability;
+ AI_THINKING_STRUCT->funcResult = gBattleMons[bank].ability;
gAIScriptPtr += 2;
return;
}
- if (gBaseStats[gBattleMons[index].species].ability1 != ABILITY_NONE)
+ if (gBaseStats[gBattleMons[bank].species].ability1 != ABILITY_NONE)
{
- if (gBaseStats[gBattleMons[index].species].ability2 != ABILITY_NONE)
+ if (gBaseStats[gBattleMons[bank].species].ability2 != ABILITY_NONE)
{
// AI has no knowledge of opponent, so it guesses which ability.
if (Random() & 1)
{
- AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[index].species].ability1;
+ AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[bank].species].ability1;
}
else
{
- AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[index].species].ability2;
+ AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[bank].species].ability2;
}
}
else
{
- AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[index].species].ability1; // it's definitely ability 1.
+ AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[bank].species].ability1; // it's definitely ability 1.
}
}
else
{
- AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[index].species].ability2; // AI cant actually reach this part since every mon has at least 1 ability.
+ AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[bank].species].ability2; // AI cant actually reach this part since every mon has at least 1 ability.
}
}
else
{
// The AI knows its own ability.
- AI_THINKING_STRUCT->funcResult = gBattleMons[index].ability;
+ AI_THINKING_STRUCT->funcResult = gBattleMons[bank].ability;
}
gAIScriptPtr += 2;
}
@@ -1493,7 +1488,7 @@ static void BattleAICmd_get_highest_type_effectiveness(void)
for (i = 0; i < 4; i++)
{
- gBattleMoveDamage = 40;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x1;
gCurrentMove = gBattleMons[sBank_AI].moves[i];
if (gCurrentMove)
@@ -1502,16 +1497,16 @@ static void BattleAICmd_get_highest_type_effectiveness(void)
// reduce by 1/3.
if (gBattleMoveDamage == 120)
- gBattleMoveDamage = 80;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x2;
if (gBattleMoveDamage == 240)
- gBattleMoveDamage = 160;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x4;
if (gBattleMoveDamage == 30)
- gBattleMoveDamage = 20;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x0_5;
if (gBattleMoveDamage == 15)
- gBattleMoveDamage = 10;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x0_25;
if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED)
- gBattleMoveDamage = 0;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x0;
if (AI_THINKING_STRUCT->funcResult < gBattleMoveDamage)
AI_THINKING_STRUCT->funcResult = gBattleMoveDamage;
@@ -1530,22 +1525,22 @@ static void BattleAICmd_if_type_effectiveness(void)
gBattleMoveFlags = 0;
gCritMultiplier = 1;
- gBattleMoveDamage = 40;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x1;
gCurrentMove = AI_THINKING_STRUCT->moveConsidered;
TypeCalc(gCurrentMove, sBank_AI, gBankTarget);
if (gBattleMoveDamage == 120)
- gBattleMoveDamage = 80;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x2;
if (gBattleMoveDamage == 240)
- gBattleMoveDamage = 160;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x4;
if (gBattleMoveDamage == 30)
- gBattleMoveDamage = 20;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x0_5;
if (gBattleMoveDamage == 15)
- gBattleMoveDamage = 10;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x0_25;
if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED)
- gBattleMoveDamage = 0;
+ gBattleMoveDamage = AI_EFFECTIVENESS_x0;
// store gBattleMoveDamage in a u8 variable because gAIScriptPtr[1] is a u8.
damageVar = gBattleMoveDamage;
@@ -1569,23 +1564,23 @@ static void BattleAICmd_if_status_in_party(void)
struct Pokemon *party;
int i;
u32 statusToCompareTo;
- u8 index;
+ u8 bank;
switch(gAIScriptPtr[1])
{
case AI_USER:
- index = sBank_AI;
+ bank = sBank_AI;
break;
default:
- index = gBankTarget;
+ bank = gBankTarget;
break;
}
- party = (GetBankSide(index) == 0) ? gPlayerParty : gEnemyParty;
+ party = (GetBankSide(bank) == SIDE_PLAYER) ? gPlayerParty : gEnemyParty;
statusToCompareTo = AIScriptRead32(gAIScriptPtr + 2);
- for (i = 0; i < 6; i++)
+ for (i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&party[i], MON_DATA_SPECIES);
u16 hp = GetMonData(&party[i], MON_DATA_HP);
@@ -1606,23 +1601,23 @@ static void BattleAICmd_if_status_not_in_party(void)
struct Pokemon *party;
int i;
u32 statusToCompareTo;
- u8 index;
+ u8 bank;
switch(gAIScriptPtr[1])
{
case 1:
- index = sBank_AI;
+ bank = sBank_AI;
break;
default:
- index = gBankTarget;
+ bank = gBankTarget;
break;
}
- party = (GetBankSide(index) == 0) ? gPlayerParty : gEnemyParty;
+ party = (GetBankSide(bank) == SIDE_PLAYER) ? gPlayerParty : gEnemyParty;
statusToCompareTo = AIScriptRead32(gAIScriptPtr + 2);
- for (i = 0; i < 6; i++)
+ for (i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&party[i], MON_DATA_SPECIES);
u16 hp = GetMonData(&party[i], MON_DATA_HP);
@@ -1640,13 +1635,13 @@ static void BattleAICmd_if_status_not_in_party(void)
static void BattleAICmd_get_weather(void)
{
if (gBattleWeather & WEATHER_RAIN_ANY)
- AI_THINKING_STRUCT->funcResult = 1;
+ AI_THINKING_STRUCT->funcResult = AI_WEATHER_RAIN;
if (gBattleWeather & WEATHER_SANDSTORM_ANY)
- AI_THINKING_STRUCT->funcResult = 2;
+ AI_THINKING_STRUCT->funcResult = AI_WEATHER_SANDSTORM;
if (gBattleWeather & WEATHER_SUN_ANY)
- AI_THINKING_STRUCT->funcResult = 0;
+ AI_THINKING_STRUCT->funcResult = AI_WEATHER_SUN;
if (gBattleWeather & WEATHER_HAIL_ANY)
- AI_THINKING_STRUCT->funcResult = 3;
+ AI_THINKING_STRUCT->funcResult = AI_WEATHER_HAIL;
gAIScriptPtr += 1;
}
@@ -1786,14 +1781,14 @@ static void BattleAICmd_if_cant_faint(void)
static void BattleAICmd_if_has_move(void)
{
int i;
- const u16 *temp_ptr = (u16 *)(gAIScriptPtr + 2);
+ const u16 *movePtr = (u16 *)(gAIScriptPtr + 2);
- switch(gAIScriptPtr[1])
+ switch (gAIScriptPtr[1])
{
case AI_USER:
for (i = 0; i < 4; i++)
{
- if (gBattleMons[sBank_AI].moves[i] == *temp_ptr)
+ if (gBattleMons[sBank_AI].moves[i] == *movePtr)
break;
}
if (i == 4)
@@ -1807,7 +1802,7 @@ static void BattleAICmd_if_has_move(void)
return;
}
case AI_USER_PARTNER:
- if (gBattleMons[sBank_AI ^ 2].hp == 0)
+ if (gBattleMons[sBank_AI ^ BIT_MON].hp == 0)
{
gAIScriptPtr += 8;
return;
@@ -1816,7 +1811,7 @@ static void BattleAICmd_if_has_move(void)
{
for (i = 0; i < 4; i++)
{
- if (gBattleMons[sBank_AI ^ 2].moves[i] == *temp_ptr)
+ if (gBattleMons[sBank_AI ^ BIT_MON].moves[i] == *movePtr)
break;
}
}
@@ -1834,7 +1829,7 @@ static void BattleAICmd_if_has_move(void)
case AI_TARGET_PARTNER:
for (i = 0; i < 4; i++)
{
- if (BATTLE_HISTORY->usedMoves[gBankTarget].moves[i] == *temp_ptr)
+ if (BATTLE_HISTORY->usedMoves[gBankTarget].moves[i] == *movePtr)
break;
}
if (i == 4)
@@ -1850,10 +1845,10 @@ static void BattleAICmd_if_has_move(void)
}
}
-static void BattleAICmd_if_dont_have_move(void)
+static void BattleAICmd_if_doesnt_have_move(void)
{
int i;
- const u16 *temp_ptr = (u16 *)(gAIScriptPtr + 2);
+ const u16 *movePtr = (u16 *)(gAIScriptPtr + 2);
switch(gAIScriptPtr[1])
{
@@ -1861,7 +1856,7 @@ static void BattleAICmd_if_dont_have_move(void)
case AI_USER_PARTNER: // UB: no separate check for user partner
for (i = 0; i < 4; i++)
{
- if (gBattleMons[sBank_AI].moves[i] == *temp_ptr)
+ if (gBattleMons[sBank_AI].moves[i] == *movePtr)
break;
}
if (i != 4)
@@ -1878,7 +1873,7 @@ static void BattleAICmd_if_dont_have_move(void)
case AI_TARGET_PARTNER:
for (i = 0; i < 4; i++)
{
- if (BATTLE_HISTORY->usedMoves[gBankTarget].moves[i] == *temp_ptr)
+ if (BATTLE_HISTORY->usedMoves[gBankTarget].moves[i] == *movePtr)
break;
}
if (i != 4)
@@ -1894,7 +1889,7 @@ static void BattleAICmd_if_dont_have_move(void)
}
}
-static void BattleAICmd_if_move_effect(void)
+static void BattleAICmd_if_has_move_with_effect(void)
{
int i;
@@ -1904,7 +1899,7 @@ static void BattleAICmd_if_move_effect(void)
case AI_USER_PARTNER:
for (i = 0; i < 4; i++)
{
- if(gBattleMons[sBank_AI].moves[i] != 0 && gBattleMoves[gBattleMons[sBank_AI].moves[i]].effect == gAIScriptPtr[2])
+ if (gBattleMons[sBank_AI].moves[i] != 0 && gBattleMoves[gBattleMons[sBank_AI].moves[i]].effect == gAIScriptPtr[2])
break;
}
if (i == 4)
@@ -1916,6 +1911,7 @@ static void BattleAICmd_if_move_effect(void)
case AI_TARGET_PARTNER:
for (i = 0; i < 4; i++)
{
+ // UB: checks sBank_AI instead of gBankTarget
if (gBattleMons[sBank_AI].moves[i] != 0 && gBattleMoves[BATTLE_HISTORY->usedMoves[gBankTarget].moves[i]].effect == gAIScriptPtr[2])
break;
}
@@ -1927,7 +1923,7 @@ static void BattleAICmd_if_move_effect(void)
}
}
-static void BattleAICmd_if_not_move_effect(void)
+static void BattleAICmd_if_doesnt_have_move_with_effect(void)
{
int i;
@@ -2023,7 +2019,7 @@ static void BattleAICmd_flee(void)
AI_THINKING_STRUCT->aiAction |= (AI_ACTION_DONE | AI_ACTION_FLEE | AI_ACTION_DO_NOT_ATTACK);
}
-static void BattleAICmd_if_random_100(void)
+static void BattleAICmd_if_random_safari_flee(void)
{
u8 safariFleeRate = gBattleStruct->field_7B * 5; // safari flee rate, from 0-20
@@ -2041,7 +2037,6 @@ static void BattleAICmd_watch(void)
static void BattleAICmd_get_hold_effect(void)
{
u8 bank;
- u16 status;
if (gAIScriptPtr[1] == AI_USER)
bank = sBank_AI;
@@ -2049,9 +2044,7 @@ static void BattleAICmd_get_hold_effect(void)
bank = gBankTarget;
if (gActiveBank != bank)
- {
AI_THINKING_STRUCT->funcResult = ItemId_GetHoldEffect(BATTLE_HISTORY->itemEffects[bank]);
- }
else
AI_THINKING_STRUCT->funcResult = ItemId_GetHoldEffect(gBattleMons[bank].item);
@@ -2093,7 +2086,7 @@ static void BattleAICmd_get_gender(void)
gAIScriptPtr += 2;
}
-static void BattleAICmd_is_first_turn(void)
+static void BattleAICmd_is_first_turn_for(void)
{
u8 bank;
@@ -2212,7 +2205,7 @@ static void BattleAICmd_call(void)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
}
-static void BattleAICmd_jump(void)
+static void BattleAICmd_goto(void)
{
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
}
@@ -2272,7 +2265,7 @@ static void BattleAICmd_if_target_not_taunted(void)
static void BattleAICmd_if_target_is_ally(void)
{
- if((sBank_AI & 1) == (gBankTarget & 1))
+ if ((sBank_AI & BIT_SIDE) == (gBankTarget & BIT_SIDE))
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 1);
else
gAIScriptPtr += 5;
@@ -2280,9 +2273,9 @@ static void BattleAICmd_if_target_is_ally(void)
static void BattleAICmd_if_flash_fired(void)
{
- u8 index = BattleAI_GetWantedBank(gAIScriptPtr[1]);
+ u8 bank = BattleAI_GetWantedBank(gAIScriptPtr[1]);
- if(gBattleResources->flags->flags[index] & UNKNOWN_FLAG_FLASH_FIRE)
+ if (gBattleResources->flags->flags[bank] & UNKNOWN_FLAG_FLASH_FIRE)
gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2);
else
gAIScriptPtr += 6;
diff --git a/src/battle_anim.c b/src/battle_anim.c
index 2eec0bed5..fa4dfb48f 100644
--- a/src/battle_anim.c
+++ b/src/battle_anim.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "sprite.h"
#include "contest.h"
#include "m4a.h"
@@ -67,7 +68,7 @@ static void ScriptCmd_return(void);
static void ScriptCmd_setarg(void);
static void ScriptCmd_choosetwoturnanim(void);
static void ScriptCmd_jumpifmoveturn(void);
-static void ScriptCmd_jump(void);
+static void ScriptCmd_goto(void);
static void ScriptCmd_fadetobg(void);
static void ScriptCmd_restorebg(void);
static void ScriptCmd_waitbgfadeout(void);
@@ -156,7 +157,7 @@ static void (* const sScriptCmdTable[])(void) =
ScriptCmd_setarg,
ScriptCmd_choosetwoturnanim,
ScriptCmd_jumpifmoveturn,
- ScriptCmd_jump,
+ ScriptCmd_goto,
ScriptCmd_fadetobg,
ScriptCmd_restorebg,
ScriptCmd_waitbgfadeout,
@@ -605,7 +606,7 @@ static void ScriptCmd_monbg(void)
sBattleAnimScriptPtr++;
animBank = sBattleAnimScriptPtr[0];
- if (animBank & ANIM_BANK_TARGET)
+ if (animBank & ANIM_TARGET)
bank = gAnimBankTarget;
else
bank = gAnimBankAttacker;
@@ -862,12 +863,12 @@ static void ScriptCmd_clearmonbg(void)
sBattleAnimScriptPtr++;
animBankId = sBattleAnimScriptPtr[0];
- if (animBankId == ANIM_BANK_ATTACKER)
- animBankId = ANIM_BANK_ATK_PARTNER;
- else if (animBankId == ANIM_BANK_TARGET)
- animBankId = ANIM_BANK_DEF_PARTNER;
+ if (animBankId == ANIM_ATTACKER)
+ animBankId = ANIM_ATK_PARTNER;
+ else if (animBankId == ANIM_TARGET)
+ animBankId = ANIM_DEF_PARTNER;
- if (animBankId == ANIM_BANK_ATTACKER || animBankId == ANIM_BANK_ATK_PARTNER)
+ if (animBankId == ANIM_ATTACKER || animBankId == ANIM_ATK_PARTNER)
bank = gAnimBankAttacker;
else
bank = gAnimBankTarget;
@@ -924,12 +925,12 @@ static void ScriptCmd_monbg_22(void)
animBankId = sBattleAnimScriptPtr[0];
- if (animBankId == ANIM_BANK_ATTACKER)
- animBankId = ANIM_BANK_ATK_PARTNER;
- else if (animBankId == ANIM_BANK_TARGET)
- animBankId = ANIM_BANK_DEF_PARTNER;
+ if (animBankId == ANIM_ATTACKER)
+ animBankId = ANIM_ATK_PARTNER;
+ else if (animBankId == ANIM_TARGET)
+ animBankId = ANIM_DEF_PARTNER;
- if (animBankId == ANIM_BANK_ATTACKER || animBankId == ANIM_BANK_ATK_PARTNER)
+ if (animBankId == ANIM_ATTACKER || animBankId == ANIM_ATK_PARTNER)
bank = gAnimBankAttacker;
else
bank = gAnimBankTarget;
@@ -969,12 +970,12 @@ static void ScriptCmd_clearmonbg_23(void)
sBattleAnimScriptPtr++;
animBankId = sBattleAnimScriptPtr[0];
- if (animBankId == ANIM_BANK_ATTACKER)
- animBankId = ANIM_BANK_ATK_PARTNER;
- else if (animBankId == ANIM_BANK_TARGET)
- animBankId = ANIM_BANK_DEF_PARTNER;
+ if (animBankId == ANIM_ATTACKER)
+ animBankId = ANIM_ATK_PARTNER;
+ else if (animBankId == ANIM_TARGET)
+ animBankId = ANIM_DEF_PARTNER;
- if (animBankId == ANIM_BANK_ATTACKER || animBankId == ANIM_BANK_ATK_PARTNER)
+ if (animBankId == ANIM_ATTACKER || animBankId == ANIM_ATK_PARTNER)
bank = gAnimBankAttacker;
else
bank = gAnimBankTarget;
@@ -1099,7 +1100,7 @@ static void ScriptCmd_jumpifmoveturn(void)
sBattleAnimScriptPtr += 4;
}
-static void ScriptCmd_jump(void)
+static void ScriptCmd_goto(void)
{
sBattleAnimScriptPtr++;
sBattleAnimScriptPtr = SCRIPT_READ_PTR(sBattleAnimScriptPtr);
@@ -1699,7 +1700,7 @@ static void ScriptCmd_monbgprio_28(void)
wantedBank = sBattleAnimScriptPtr[1];
sBattleAnimScriptPtr += 2;
- if (wantedBank != ANIM_BANK_ATTACKER)
+ if (wantedBank != ANIM_ATTACKER)
bank = gAnimBankTarget;
else
bank = gAnimBankAttacker;
@@ -1732,7 +1733,7 @@ static void ScriptCmd_monbgprio_2A(void)
sBattleAnimScriptPtr += 2;
if (GetBankSide(gAnimBankAttacker) != GetBankSide(gAnimBankTarget))
{
- if (wantedBank != ANIM_BANK_ATTACKER)
+ if (wantedBank != ANIM_ATTACKER)
bank = gAnimBankTarget;
else
bank = gAnimBankAttacker;
@@ -1779,15 +1780,15 @@ static void ScriptCmd_doublebattle_2D(void)
if (!IsContest() && IsDoubleBattle()
&& GetBankSide(gAnimBankAttacker) == GetBankSide(gAnimBankTarget))
{
- if (wantedBank == ANIM_BANK_ATTACKER)
+ if (wantedBank == ANIM_ATTACKER)
{
r4 = sub_80A8364(gAnimBankAttacker);
- spriteId = GetAnimBankSpriteId(0);
+ spriteId = GetAnimBankSpriteId(ANIM_ATTACKER);
}
else
{
r4 = sub_80A8364(gAnimBankTarget);
- spriteId = GetAnimBankSpriteId(1);
+ spriteId = GetAnimBankSpriteId(ANIM_TARGET);
}
if (spriteId != 0xFF)
{
@@ -1814,15 +1815,15 @@ static void ScriptCmd_doublebattle_2E(void)
if (!IsContest() && IsDoubleBattle()
&& GetBankSide(gAnimBankAttacker) == GetBankSide(gAnimBankTarget))
{
- if (wantedBank == ANIM_BANK_ATTACKER)
+ if (wantedBank == ANIM_ATTACKER)
{
r4 = sub_80A8364(gAnimBankAttacker);
- spriteId = GetAnimBankSpriteId(0);
+ spriteId = GetAnimBankSpriteId(ANIM_ATTACKER);
}
else
{
r4 = sub_80A8364(gAnimBankTarget);
- spriteId = GetAnimBankSpriteId(1);
+ spriteId = GetAnimBankSpriteId(ANIM_TARGET);
}
if (spriteId != 0xFF && r4 == 2)
diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c
index dd8582618..58360b9a1 100644
--- a/src/battle_controller_link_opponent.c
+++ b/src/battle_controller_link_opponent.c
@@ -4,6 +4,7 @@
#include "battle_message.h"
#include "battle_interface.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "battle_ai_script_commands.h"
#include "battle_link_817C95C.h"
#include "pokemon.h"
diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c
index 9da468761..082b134b4 100644
--- a/src/battle_controller_link_partner.c
+++ b/src/battle_controller_link_partner.c
@@ -4,6 +4,7 @@
#include "battle_message.h"
#include "battle_interface.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "battle_ai_script_commands.h"
#include "battle_link_817C95C.h"
#include "pokemon.h"
diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c
index 0862e72a7..8aeab6a55 100644
--- a/src/battle_controller_opponent.c
+++ b/src/battle_controller_opponent.c
@@ -4,6 +4,7 @@
#include "battle_message.h"
#include "battle_interface.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "battle_link_817C95C.h"
#include "battle_ai_script_commands.h"
#include "pokemon.h"
diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c
index 08c666d11..6023552c3 100644
--- a/src/battle_controller_player.c
+++ b/src/battle_controller_player.c
@@ -4,6 +4,7 @@
#include "battle_message.h"
#include "battle_interface.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "battle_link_817C95C.h"
#include "pokemon.h"
#include "link.h"
diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c
index dc4a213cc..6b5211ceb 100644
--- a/src/battle_controller_player_partner.c
+++ b/src/battle_controller_player_partner.c
@@ -4,6 +4,7 @@
#include "battle_message.h"
#include "battle_interface.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "battle_ai_script_commands.h"
#include "pokemon.h"
#include "link.h"
diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c
index 8e2f31879..64dea0200 100644
--- a/src/battle_controller_recorded_opponent.c
+++ b/src/battle_controller_recorded_opponent.c
@@ -4,6 +4,7 @@
#include "battle_message.h"
#include "battle_interface.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "battle_ai_script_commands.h"
#include "battle_link_817C95C.h"
#include "recorded_battle.h"
diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c
index f558fde87..52fd803e1 100644
--- a/src/battle_controller_recorded_player.c
+++ b/src/battle_controller_recorded_player.c
@@ -4,6 +4,7 @@
#include "battle_message.h"
#include "battle_interface.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "battle_ai_script_commands.h"
#include "recorded_battle.h"
#include "pokemon.h"
diff --git a/src/battle_controller_safari.c b/src/battle_controller_safari.c
index 64e6a0bc3..682e8333d 100644
--- a/src/battle_controller_safari.c
+++ b/src/battle_controller_safari.c
@@ -4,6 +4,7 @@
#include "battle_message.h"
#include "battle_interface.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "pokemon.h"
#include "link.h"
#include "util.h"
diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c
index 446027944..eeb0b596d 100644
--- a/src/battle_controller_wally.c
+++ b/src/battle_controller_wally.c
@@ -4,6 +4,7 @@
#include "battle_message.h"
#include "battle_interface.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "battle_link_817C95C.h"
#include "pokemon.h"
#include "link.h"
diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c
index 70b4d7d31..4f444b8bf 100644
--- a/src/battle_gfx_sfx_util.c
+++ b/src/battle_gfx_sfx_util.c
@@ -3,6 +3,7 @@
#include "battle_controllers.h"
#include "battle_ai_script_commands.h"
#include "battle_anim.h"
+#include "constants/battle_anim.h"
#include "battle_interface.h"
#include "main.h"
#include "malloc.h"
@@ -39,8 +40,8 @@ extern struct MusicPlayerInfo gMPlay_BGM;
extern const struct BattleMove gBattleMoves[];
extern const u8 gUnknown_0831C604[];
-extern const u8 * const gUnknown_082C9320[];
-extern const u8 * const gUnknown_082C937C[];
+extern const u8 * const gBattleAnims_VariousTable[];
+extern const u8 * const gBattleAnims_Special[];
extern const struct CompressedSpriteSheet gMonFrontPicTable[];
extern const struct CompressedSpriteSheet gMonBackPicTable[];
extern const struct CompressedSpriteSheet gTrainerFrontPicTable[];
@@ -414,7 +415,7 @@ void InitAndLaunchChosenStatusAnimation(bool8 isStatus2, u32 status)
else if (status & STATUS2_NIGHTMARE)
LaunchStatusAnimation(gActiveBank, B_ANIM_STATUS_NIGHTMARE);
else if (status & STATUS2_WRAPPED)
- LaunchStatusAnimation(gActiveBank, B_ANIM_STATUS_WRAPPED);
+ LaunchStatusAnimation(gActiveBank, B_ANIM_STATUS_WRAPPED); // this animation doesn't actually exist
else // no animation
gBattleSpritesDataPtr->healthBoxesData[gActiveBank].statusAnimActive = 0;
}
@@ -448,7 +449,7 @@ bool8 TryHandleLaunchBattleTableAnimation(u8 activeBank, u8 atkBank, u8 defBank,
gAnimBankAttacker = atkBank;
gAnimBankTarget = defBank;
gBattleSpritesDataPtr->animationData->animArg = argument;
- LaunchBattleAnimation(gUnknown_082C9320, tableId, FALSE);
+ LaunchBattleAnimation(gBattleAnims_VariousTable, tableId, FALSE);
taskId = CreateTask(Task_ClearBitWhenBattleTableAnimDone, 10);
gTasks[taskId].tBank = activeBank;
gBattleSpritesDataPtr->healthBoxesData[gTasks[taskId].tBank].animFromTableActive = 1;
@@ -492,7 +493,7 @@ void InitAndLaunchSpecialAnimation(u8 activeBank, u8 atkBank, u8 defBank, u8 tab
gAnimBankAttacker = atkBank;
gAnimBankTarget = defBank;
- LaunchBattleAnimation(gUnknown_082C937C, tableId, FALSE);
+ LaunchBattleAnimation(gBattleAnims_Special, tableId, FALSE);
taskId = CreateTask(Task_ClearBitWhenSpecialAnimDone, 10);
gTasks[taskId].tBank = activeBank;
gBattleSpritesDataPtr->healthBoxesData[gTasks[taskId].tBank].specialAnimActive = 1;
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 43b802d0b..4ddf2472e 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -18,6 +18,7 @@
#include "constants/species.h"
#include "constants/songs.h"
#include "constants/trainers.h"
+#include "constants/battle_anim.h"
#include "text.h"
#include "sound.h"
#include "pokedex.h"
diff --git a/src/battle_util.c b/src/battle_util.c
index 1a624641d..2ce37cfbd 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -3,6 +3,7 @@
#include "constants/abilities.h"
#include "constants/moves.h"
#include "constants/hold_effects.h"
+#include "constants/battle_anim.h"
#include "pokemon.h"
#include "constants/species.h"
#include "item.h"
diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c
index 195490543..3b2bfb5f7 100644
--- a/src/berry_fix_program.c
+++ b/src/berry_fix_program.c
@@ -81,50 +81,50 @@ static const u8 *const gUnknown_08618160[] = {
Unknown_08617EA3
};
-extern const u8 gUnknown_08DD87C0[];
-extern const u8 gUnknown_08DD8EE0[];
-extern const u8 gUnknown_08DD8780[];
-extern const u8 gUnknown_08DD90E0[];
-extern const u8 gUnknown_08DD9718[];
-extern const u8 gUnknown_08DD9080[];
-extern const u8 gUnknown_08DD98B4[];
-extern const u8 gUnknown_08DD9E58[];
-extern const u8 gUnknown_08DD9874[];
-extern const u8 gUnknown_08DDA02C[];
-extern const u8 gUnknown_08DDA63C[];
-extern const u8 gUnknown_08DD9FEC[];
-extern const u8 gUnknown_08DDA840[];
-extern const u8 gUnknown_08DDAE40[];
-extern const u8 gUnknown_08DDA800[];
-extern const u8 gUnknown_08DDB020[];
-extern const u8 gUnknown_08DDB2C4[];
-extern const u8 gUnknown_08DDAFE0[];
+extern const u8 gBerryFixGameboy_Gfx[];
+extern const u8 gBerryFixGameboy_Tilemap[];
+extern const u8 gBerryFixGameboy_Pal[];
+extern const u8 gBerryFixGameboyLogo_Gfx[];
+extern const u8 gBerryFixGameboyLogo_Tilemap[];
+extern const u8 gBerryFixGameboyLogo_Pal[];
+extern const u8 gBerryFixGbaTransfer_Gfx[];
+extern const u8 gBerryFixGbaTransfer_Tilemap[];
+extern const u8 gBerryFixGbaTransfer_Pal[];
+extern const u8 gBerryFixGbaTransferHighlight_Gfx[];
+extern const u8 gBerryFixGbaTransferHighlight_Tilemap[];
+extern const u8 gBerryFixGbaTransferHighlight_Pal[];
+extern const u8 gBerryFixGbaTransferError_Gfx[];
+extern const u8 gBerryFixGbaTransferError_Tilemap[];
+extern const u8 gBerryFixGbaTransferError_Pal[];
+extern const u8 gBerryFixWindow_Gfx[];
+extern const u8 gBerryFixWindow_Tilemap[];
+extern const u8 gBerryFixWindow_Pal[];
static const u8 *const gUnknown_08618178[][3] = {
{
- gUnknown_08DD87C0,
- gUnknown_08DD8EE0,
- gUnknown_08DD8780
+ gBerryFixGameboy_Gfx,
+ gBerryFixGameboy_Tilemap,
+ gBerryFixGameboy_Pal
}, {
- gUnknown_08DD90E0,
- gUnknown_08DD9718,
- gUnknown_08DD9080
+ gBerryFixGameboyLogo_Gfx,
+ gBerryFixGameboyLogo_Tilemap,
+ gBerryFixGameboyLogo_Pal
}, {
- gUnknown_08DD98B4,
- gUnknown_08DD9E58,
- gUnknown_08DD9874
+ gBerryFixGbaTransfer_Gfx,
+ gBerryFixGbaTransfer_Tilemap,
+ gBerryFixGbaTransfer_Pal
}, {
- gUnknown_08DDA02C,
- gUnknown_08DDA63C,
- gUnknown_08DD9FEC
+ gBerryFixGbaTransferHighlight_Gfx,
+ gBerryFixGbaTransferHighlight_Tilemap,
+ gBerryFixGbaTransferHighlight_Pal
}, {
- gUnknown_08DDA840,
- gUnknown_08DDAE40,
- gUnknown_08DDA800
+ gBerryFixGbaTransferError_Gfx,
+ gBerryFixGbaTransferError_Tilemap,
+ gBerryFixGbaTransferError_Pal
}, {
- gUnknown_08DDB020,
- gUnknown_08DDB2C4,
- gUnknown_08DDAFE0
+ gBerryFixWindow_Gfx,
+ gBerryFixWindow_Tilemap,
+ gBerryFixWindow_Pal
},
};
diff --git a/src/bike.c b/src/bike.c
new file mode 100644
index 000000000..64af7c711
--- /dev/null
+++ b/src/bike.c
@@ -0,0 +1,1078 @@
+#include "global.h"
+#include "bike.h"
+#include "field_map_obj.h"
+#include "field_player_avatar.h"
+#include "fieldmap.h"
+#include "constants/flags.h"
+#include "global.fieldmap.h"
+#include "metatile_behavior.h"
+#include "overworld.h"
+#include "constants/songs.h"
+#include "sound.h"
+
+extern bool8 gBikeCyclingChallenge;
+extern u8 gBikeCollisions;
+extern bool8 gUnknown_02037348;
+
+extern u8 sub_8093514(u8 direction);
+extern u8 sub_808B980(u8 direction);
+extern u8 sub_808B9BC(u8 direction);
+extern u8 sub_808B9A4(u8 direction);
+extern u8 sub_808C1B4(u8 direction);
+extern u8 npc_use_some_d2s(u8 direction);
+extern void Overworld_ClearSavedMusic(void);
+extern void Overworld_PlaySpecialMapMusic(void);
+
+// this file's functions
+static void MovePlayerOnMachBike(u8, u16, u16);
+static u8 GetMachBikeTransition(u8 *);
+static void MachBikeTransition_FaceDirection(u8);
+static void MachBikeTransition_TurnDirection(u8);
+static void MachBikeTransition_TrySpeedUp(u8);
+static void MachBikeTransition_TrySlowDown(u8);
+static void MovePlayerOnAcroBike(u8, u16, u16);
+static u8 CheckMovementInputAcroBike(u8 *, u16, u16);
+static u8 AcroBikeHandleInputNormal(u8 *, u16, u16);
+static u8 AcroBikeHandleInputTurning(u8 *, u16, u16);
+static u8 AcroBikeHandleInputWheelieStanding(u8 *, u16, u16);
+static u8 AcroBikeHandleInputBunnyHop(u8 *, u16, u16);
+static u8 AcroBikeHandleInputWheelieMoving(u8 *, u16, u16);
+static u8 AcroBikeHandleInputSidewaysJump(u8 *, u16, u16);
+static u8 AcroBikeHandleInputTurnJump(u8 *, u16, u16);
+static void AcroBikeTransition_FaceDirection(u8);
+static void AcroBikeTransition_TurnDirection(u8);
+static void AcroBikeTransition_Moving(u8);
+static void AcroBikeTransition_NormalToWheelie(u8);
+static void AcroBikeTransition_WheelieToNormal(u8);
+static void AcroBikeTransition_WheelieIdle(u8);
+static void AcroBikeTransition_WheelieHoppingStanding(u8);
+static void AcroBikeTransition_WheelieHoppingMoving(u8);
+static void AcroBikeTransition_SideJump(u8);
+static void AcroBikeTransition_TurnJump(u8);
+static void AcroBikeTransition_WheelieMoving(u8);
+static void AcroBikeTransition_WheelieRisingMoving(u8);
+static void AcroBikeTransition_WheelieLoweringMoving(u8);
+static void AcroBike_TryHistoryUpdate(u16, u16);
+static u8 AcroBike_GetJumpDirection(void);
+static void Bike_UpdateDirTimerHistory(u8);
+static void Bike_UpdateABStartSelectHistory(u8);
+static u8 Bike_DPadToDirection(u16);
+static u8 get_some_collision(u8);
+static u8 Bike_CheckCollisionTryAdvanceCollisionCount(struct MapObject *, s16, s16, u8, u8);
+static bool8 IsRunningDisallowedByMetatile(u8);
+static void Bike_TryAdvanceCyclingRoadCollisions();
+static u8 CanBikeFaceDirOnMetatile(u8, u8);
+static bool8 WillPlayerCollideWithCollision(u8, u8);
+static void Bike_SetBikeStill(void);
+
+// const rom data
+
+/*
+ A bike transition is a type of callback for the bike that actually
+ modifies the bicycle's direction or momentum or otherwise movement.
+ Alternatively, a bike may also have input handlers which process the
+ bike transition to call: the acro bike has input handlers while the mach
+ bike does not. This is because the Acro needs to know the button inputs
+ for its complex tricks and actions.
+*/
+
+static void (*const sMachBikeTransitions[])(u8) =
+{
+ MachBikeTransition_FaceDirection, // Face vs Turn: Face has no anim while Turn does. Turn checks for collision because if you turn right as opposed to face right, if there is a wall there, turn will make a bonk sound effect while face will not.
+ MachBikeTransition_TurnDirection,
+ MachBikeTransition_TrySpeedUp,
+ MachBikeTransition_TrySlowDown,
+};
+
+// bikeFrameCounter is input which is represented by sMachBikeSpeeds in order: 0 is normal speed (1 speed), 1 is fast speed (2 speed), 2 is fastest speed (4 speed)
+static void (*const sMachBikeSpeedCallbacks[])(u8) =
+{
+ PlayerGoSpeed1, // normal speed (1 speed)
+ PlayerGoSpeed2, // fast speed (2 speed)
+ PlayerGoSpeed4, // fastest speed (4 speed)
+};
+
+static void (*const sAcroBikeTransitions[])(u8) =
+{
+ AcroBikeTransition_FaceDirection,
+ AcroBikeTransition_TurnDirection,
+ AcroBikeTransition_Moving,
+ AcroBikeTransition_NormalToWheelie,
+ AcroBikeTransition_WheelieToNormal,
+ AcroBikeTransition_WheelieIdle,
+ AcroBikeTransition_WheelieHoppingStanding,
+ AcroBikeTransition_WheelieHoppingMoving,
+ AcroBikeTransition_SideJump,
+ AcroBikeTransition_TurnJump,
+ AcroBikeTransition_WheelieMoving,
+ AcroBikeTransition_WheelieRisingMoving,
+ AcroBikeTransition_WheelieLoweringMoving,
+};
+
+static u8 (*const sAcroBikeInputHandlers[])(u8 *, u16, u16) =
+{
+ AcroBikeHandleInputNormal,
+ AcroBikeHandleInputTurning,
+ AcroBikeHandleInputWheelieStanding,
+ AcroBikeHandleInputBunnyHop,
+ AcroBikeHandleInputWheelieMoving,
+ AcroBikeHandleInputSidewaysJump,
+ AcroBikeHandleInputTurnJump,
+};
+
+// used with bikeFrameCounter from mach bike
+static const u16 sMachBikeSpeeds[] = {SPEED_NORMAL, SPEED_FAST, SPEED_FASTEST};
+
+// this is a list of timers to compare against later, terminated with 0. the only timer being compared against is 4 frames in this list.
+static const u8 sAcroBikeJumpTimerList[] = {4, 0};
+
+// this is a list of history inputs to do in order to do the check to retrieve a jump direction for acro bike. it seems to be an extensible list, so its possible that Game Freak may have intended for the Acro Bike to have more complex tricks at some point. The final list only has the acro jump.
+static const struct BikeHistoryInputInfo sAcroBikeTricksList[] =
+{
+ // the 0xF is a mask performed with each byte of the array in order to perform the check on only the last entry of the history list, otherwise the check wouldn't work as there can be 0xF0 as opposed to 0x0F.
+ {DIR_SOUTH, B_BUTTON, 0xF, 0xF, sAcroBikeJumpTimerList, sAcroBikeJumpTimerList, DIR_SOUTH},
+ {DIR_NORTH, B_BUTTON, 0xF, 0xF, sAcroBikeJumpTimerList, sAcroBikeJumpTimerList, DIR_NORTH},
+ {DIR_WEST, B_BUTTON, 0xF, 0xF, sAcroBikeJumpTimerList, sAcroBikeJumpTimerList, DIR_WEST},
+ {DIR_EAST, B_BUTTON, 0xF, 0xF, sAcroBikeJumpTimerList, sAcroBikeJumpTimerList, DIR_EAST},
+};
+
+// code
+void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys)
+{
+ if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_MACH_BIKE)
+ MovePlayerOnMachBike(direction, newKeys, heldKeys);
+ else
+ MovePlayerOnAcroBike(direction, newKeys, heldKeys);
+}
+
+static void MovePlayerOnMachBike(u8 direction, u16 newKeys, u16 heldKeys)
+{
+ sMachBikeTransitions[GetMachBikeTransition(&direction)](direction);
+}
+
+// dirTraveling is a variable that is 0 when the player is standing still.
+static u8 GetMachBikeTransition(u8 *dirTraveling)
+{
+ // if the dir updated before this function, get the relevent new direction to check later.
+ u8 direction = player_get_direction_upper_nybble();
+
+ // is the player standing still?
+ if (*dirTraveling == 0)
+ {
+ *dirTraveling = direction; // update the direction, since below we either faced a direction or we started moving.
+ if (gPlayerAvatar.bikeSpeed == SPEED_STANDING)
+ {
+ gPlayerAvatar.runningState = NOT_MOVING;
+ return MACH_TRANS_FACE_DIRECTION;
+ }
+ gPlayerAvatar.runningState = MOVING;
+ return MACH_TRANS_START_MOVING;
+ }
+
+ // we need to check if the last traveled direction changed from the new direction as well as ensuring that we dont update the state while the player is moving: see the else check.
+ if (*dirTraveling != direction && gPlayerAvatar.runningState != MOVING)
+ {
+ if (gPlayerAvatar.bikeSpeed != SPEED_STANDING)
+ {
+ *dirTraveling = direction; // implement the new direction
+ gPlayerAvatar.runningState = MOVING;
+ return MACH_TRANS_START_MOVING;
+ }
+ // if you didnt start moving but your dir was different, do a turn direction instead.
+ gPlayerAvatar.runningState = TURN_DIRECTION;
+ return MACH_TRANS_TURN_DIRECTION;
+ }
+ else // the player is either going in the current direction and hasnt changed or their state is currently moving.
+ {
+ gPlayerAvatar.runningState = MOVING;
+ return MACH_TRANS_KEEP_MOVING;
+ }
+}
+
+// the difference between face direction and turn direction is that one changes direction while the other does the animation of turning as well as changing direction.
+static void MachBikeTransition_FaceDirection(u8 direction)
+{
+ PlayerFaceDirection(direction);
+ Bike_SetBikeStill();
+}
+
+static void MachBikeTransition_TurnDirection(u8 direction)
+{
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E))
+ {
+ PlayerTurnInPlace(direction);
+ Bike_SetBikeStill();
+ }
+ else
+ {
+ MachBikeTransition_FaceDirection(playerMapObj->mapobj_unk_18);
+ }
+}
+
+static void MachBikeTransition_TrySpeedUp(u8 direction)
+{
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+ u8 collision;
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == FALSE)
+ {
+ // we cannot go forward, so either slow down or, if we are stopped, idle face direction.
+ if (gPlayerAvatar.bikeSpeed)
+ MachBikeTransition_TrySlowDown(playerMapObj->placeholder18);
+ else
+ MachBikeTransition_FaceDirection(playerMapObj->placeholder18);
+ }
+ else
+ {
+ collision = get_some_collision(direction);
+ if (collision > 0 && collision < 12)
+ {
+ // we hit a solid object, but check to see if its a ledge and then jump.
+ if (collision == COLLISION_LEDGE_JUMP)
+ {
+ PlayerJumpLedge(direction);
+ }
+ else
+ {
+ // we hit a solid object that is not a ledge, so perform the collision.
+ Bike_SetBikeStill();
+ if (collision == 4 && IsPlayerCollidingWithFarawayIslandMew(direction))
+ PlayerOnBikeCollideWithFarawayIslandMew(direction);
+ else if (collision < 5 || collision > 8)
+ PlayerOnBikeCollide(direction);
+ }
+ }
+ else
+ {
+ // we did not hit anything that can slow us down, so perform the advancement callback depending on the bikeFrameCounter and try to increase the mach bike's speed.
+ sMachBikeSpeedCallbacks[gPlayerAvatar.bikeFrameCounter](direction);
+ gPlayerAvatar.bikeSpeed = gPlayerAvatar.bikeFrameCounter + (gPlayerAvatar.bikeFrameCounter >> 1); // same as dividing by 2, but compiler is insistent on >> 1
+ if (gPlayerAvatar.bikeFrameCounter < 2) // do not go faster than the last element in the mach bike array
+ gPlayerAvatar.bikeFrameCounter++;
+ }
+ }
+}
+
+static void MachBikeTransition_TrySlowDown(u8 direction)
+{
+ u8 collision;
+
+ if (gPlayerAvatar.bikeSpeed != SPEED_STANDING)
+ gPlayerAvatar.bikeFrameCounter = --gPlayerAvatar.bikeSpeed;
+
+ collision = get_some_collision(direction);
+
+ if (collision > 0 && collision < 12)
+ {
+ if (collision == COLLISION_LEDGE_JUMP)
+ {
+ PlayerJumpLedge(direction);
+ }
+ else
+ {
+ Bike_SetBikeStill();
+ if (collision == 4 && IsPlayerCollidingWithFarawayIslandMew(direction))
+ PlayerOnBikeCollideWithFarawayIslandMew(direction);
+ else if (collision < 5 || collision > 8)
+ PlayerOnBikeCollide(direction);
+ }
+ }
+ else
+ {
+ sMachBikeSpeedCallbacks[gPlayerAvatar.bikeFrameCounter](direction);
+ }
+}
+
+// the acro bike requires the input handler to be executed before the transition can.
+static void MovePlayerOnAcroBike(u8 newDirection, u16 newKeys, u16 heldKeys)
+{
+ sAcroBikeTransitions[CheckMovementInputAcroBike(&newDirection, newKeys, heldKeys)](newDirection);
+}
+
+static u8 CheckMovementInputAcroBike(u8 *newDirection, u16 newKeys, u16 heldKeys)
+{
+ return sAcroBikeInputHandlers[gPlayerAvatar.acroBikeState](newDirection, newKeys, heldKeys);
+}
+
+static u8 AcroBikeHandleInputNormal(u8 *newDirection, u16 newKeys, u16 heldKeys)
+{
+ u8 direction = player_get_direction_upper_nybble();
+
+ gPlayerAvatar.bikeFrameCounter = 0;
+ if (*newDirection == DIR_NONE)
+ {
+ if (newKeys & B_BUTTON)
+ {
+ //We're standing still with the B button held.
+ //Do a wheelie.
+ *newDirection = direction;
+ gPlayerAvatar.runningState = NOT_MOVING;
+ gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_STANDING;
+ return ACRO_TRANS_NORMAL_TO_WHEELIE;
+ }
+ else
+ {
+ *newDirection = direction;
+ gPlayerAvatar.runningState = NOT_MOVING;
+ return ACRO_TRANS_FACE_DIRECTION;
+ }
+ }
+ if (*newDirection == direction && (heldKeys & B_BUTTON) && gPlayerAvatar.bikeSpeed == SPEED_STANDING)
+ {
+ gPlayerAvatar.bikeSpeed++;
+ gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_MOVING;
+ return ACRO_TRANS_WHEELIE_RISING_MOVING;
+ }
+ if (*newDirection != direction && gPlayerAvatar.runningState != MOVING)
+ {
+ gPlayerAvatar.acroBikeState = ACRO_STATE_TURNING;
+ gPlayerAvatar.newDirBackup = *newDirection;
+ gPlayerAvatar.runningState = NOT_MOVING;
+ return CheckMovementInputAcroBike(newDirection, newKeys, heldKeys);
+ }
+ gPlayerAvatar.runningState = MOVING;
+ return ACRO_TRANS_MOVING;
+}
+
+static u8 AcroBikeHandleInputTurning(u8 *newDirection, u16 newKeys, u16 heldKeys)
+{
+ u8 direction;
+
+ *newDirection = gPlayerAvatar.newDirBackup;
+ gPlayerAvatar.bikeFrameCounter++;
+
+ // Wait 6 frames before actually changing direction
+ if (gPlayerAvatar.bikeFrameCounter > 6) // ... because it takes 6 frames to advance 1 tile.
+ {
+ gPlayerAvatar.runningState = TURN_DIRECTION;
+ gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
+ Bike_SetBikeStill();
+ return ACRO_TRANS_TURN_DIRECTION;
+ }
+ direction = player_get_direction_upper_nybble();
+ if (*newDirection == AcroBike_GetJumpDirection())
+ {
+ Bike_SetBikeStill(); // Bike_SetBikeStill sets speed to standing, but the next line immediately overrides it. could have just reset acroBikeState to 0 here instead of wasting a jump.
+ gPlayerAvatar.bikeSpeed = SPEED_NORMAL;
+ if (*newDirection == GetOppositeDirection(direction))
+ {
+ // do a turn jump.
+ // no need to update runningState, didnt move.
+ gPlayerAvatar.acroBikeState = ACRO_STATE_TURN_JUMP;
+ return ACRO_TRANS_TURN_JUMP;
+ }
+ else
+ {
+ // do a sideways jump.
+ gPlayerAvatar.runningState = MOVING; // we need to move, set state to moving.
+ gPlayerAvatar.acroBikeState = ACRO_STATE_SIDE_JUMP;
+ return ACRO_TRANS_SIDE_JUMP;
+ }
+ }
+ *newDirection = direction;
+ return ACRO_TRANS_FACE_DIRECTION;
+}
+
+static u8 AcroBikeHandleInputWheelieStanding(u8 *newDirection, u16 newKeys, u16 heldKeys)
+{
+ u8 direction;
+ struct MapObject *playerMapObj;
+
+ direction = player_get_direction_upper_nybble();
+ playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+ gPlayerAvatar.runningState = NOT_MOVING;
+
+ if (heldKeys & B_BUTTON)
+ gPlayerAvatar.bikeFrameCounter++;
+ else
+ {
+ // B button was released.
+ gPlayerAvatar.bikeFrameCounter = 0;
+ if (!MetatileBehavior_IsBumpySlope(playerMapObj->mapobj_unk_1E))
+ {
+ // Go back to normal on flat ground
+ *newDirection = direction;
+ gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
+ Bike_SetBikeStill();
+ return ACRO_TRANS_WHEELIE_TO_NORMAL;
+ }
+ }
+ if (gPlayerAvatar.bikeFrameCounter >= 40)
+ {
+ *newDirection = direction;
+ gPlayerAvatar.acroBikeState = ACRO_STATE_BUNNY_HOP;
+ Bike_SetBikeStill();
+ return ACRO_TRANS_WHEELIE_HOPPING_STANDING;
+ }
+ if (*newDirection == direction)
+ {
+ gPlayerAvatar.runningState = MOVING;
+ gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_MOVING;
+ Bike_SetBikeStill();
+ return ACRO_TRANS_WHEELIE_MOVING;
+ }
+ if (*newDirection == 0)
+ {
+ *newDirection = direction;
+ return ACRO_TRANS_WHEELIE_IDLE;
+ }
+ gPlayerAvatar.runningState = TURN_DIRECTION;
+ return ACRO_TRANS_WHEELIE_IDLE;
+}
+
+static u8 AcroBikeHandleInputBunnyHop(u8 *newDirection, u16 newKeys, u16 heldKeys)
+{
+ u8 direction;
+ struct MapObject *playerMapObj;
+
+ direction = player_get_direction_upper_nybble();
+ playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+ if (!(heldKeys & B_BUTTON))
+ {
+ // B button was released
+ Bike_SetBikeStill();
+ if (MetatileBehavior_IsBumpySlope(playerMapObj->mapobj_unk_1E))
+ {
+ // even though B was released, dont undo the wheelie on the bumpy slope.
+ gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_STANDING;
+ return CheckMovementInputAcroBike(newDirection, newKeys, heldKeys);
+ }
+ else
+ {
+ // .. otherwise, go back to normal on flat ground
+ *newDirection = direction;
+ gPlayerAvatar.runningState = NOT_MOVING;
+ gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
+ return ACRO_TRANS_WHEELIE_TO_NORMAL;
+ }
+ }
+
+ // B Button is still held
+
+ if (*newDirection == DIR_NONE)
+ {
+ // we did not move, so keep hopping in place without moving.
+ *newDirection = direction;
+ gPlayerAvatar.runningState = NOT_MOVING;
+ return ACRO_TRANS_WHEELIE_HOPPING_STANDING;
+ }
+ if (*newDirection != direction && gPlayerAvatar.runningState != MOVING)
+ {
+ // we changed direction, so turn but do not move hop.
+ gPlayerAvatar.runningState = TURN_DIRECTION;
+ return ACRO_TRANS_WHEELIE_HOPPING_STANDING;
+ }
+ // otherwise, we started moving while hopping
+ gPlayerAvatar.runningState = MOVING;
+ return ACRO_TRANS_WHEELIE_HOPPING_MOVING;
+}
+
+static u8 AcroBikeHandleInputWheelieMoving(u8 *newDirection, u16 newKeys, u16 heldKeys)
+{
+ u8 direction;
+ struct MapObject *playerMapObj;
+
+ direction = player_get_direction_lower_nybble();
+ playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+ if (!(heldKeys & B_BUTTON))
+ {
+ // we were moving on a wheelie, but we let go while moving. reset bike still status
+ Bike_SetBikeStill();
+ if (!MetatileBehavior_IsBumpySlope(playerMapObj->mapobj_unk_1E))
+ {
+ // we let go of B and arent on a bumpy slope, set state to normal because now we need to handle this
+ gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
+ if (*newDirection == DIR_NONE)
+ {
+ // we stopped moving but are turning, still try to lower the wheelie in place.
+ *newDirection = direction;
+ gPlayerAvatar.runningState = NOT_MOVING;
+ return ACRO_TRANS_WHEELIE_TO_NORMAL;
+ }
+ if (*newDirection != direction && gPlayerAvatar.runningState != MOVING)
+ {
+ // we did not turn while lowering wheelie, so do so without turning.
+ gPlayerAvatar.runningState = NOT_MOVING;
+ return ACRO_TRANS_WHEELIE_TO_NORMAL;
+ }
+ // if we are moving while lowering wheelie, put the acro into a lowering state while moving.
+ gPlayerAvatar.runningState = MOVING;
+ return ACRO_TRANS_WHEELIE_LOWERING_MOVING;
+ }
+ // please do not undo the wheelie on a bumpy slope
+ gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_STANDING;
+ return CheckMovementInputAcroBike(newDirection, newKeys, heldKeys);
+ }
+ // we are still holding B.
+ if (*newDirection == DIR_NONE)
+ {
+ // idle the wheelie in place because we're holding B without moving.
+ *newDirection = direction;
+ gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_STANDING;
+ gPlayerAvatar.runningState = NOT_MOVING;
+ Bike_SetBikeStill();
+ return ACRO_TRANS_WHEELIE_IDLE;
+ }
+ if (direction != *newDirection && gPlayerAvatar.runningState != MOVING)
+ {
+ gPlayerAvatar.runningState = NOT_MOVING;
+ return ACRO_TRANS_WHEELIE_IDLE;
+ }
+ gPlayerAvatar.runningState = MOVING;
+ return ACRO_TRANS_WHEELIE_MOVING;
+}
+
+static u8 AcroBikeHandleInputSidewaysJump(u8 *ptr, u16 newKeys, u16 heldKeys)
+{
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ playerMapObj->mapobj_bit_9 = 0;
+ FieldObjectSetDirection(playerMapObj, playerMapObj->mapobj_unk_18);
+ gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
+ return CheckMovementInputAcroBike(ptr, newKeys, heldKeys);
+}
+
+static u8 AcroBikeHandleInputTurnJump(u8 *ptr, u16 newKeys, u16 heldKeys)
+{
+ gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
+ return CheckMovementInputAcroBike(ptr, newKeys, heldKeys);
+}
+
+static void AcroBikeTransition_FaceDirection(u8 direction)
+{
+ PlayerFaceDirection(direction);
+}
+
+static void AcroBikeTransition_TurnDirection(u8 direction)
+{
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ direction = playerMapObj->placeholder18;
+ PlayerFaceDirection(direction);
+}
+
+static void AcroBikeTransition_Moving(u8 direction)
+{
+ u8 collision;
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ {
+ AcroBikeTransition_FaceDirection(playerMapObj->placeholder18);
+ return;
+ }
+ collision = get_some_collision(direction);
+ if (collision > 0 && collision < 12)
+ {
+ if (collision == COLLISION_LEDGE_JUMP)
+ PlayerJumpLedge(direction);
+ else if (collision == 4 && IsPlayerCollidingWithFarawayIslandMew(direction))
+ PlayerOnBikeCollideWithFarawayIslandMew(direction);
+ else if (collision < 5 || collision > 8)
+ PlayerOnBikeCollide(direction);
+ }
+ else
+ {
+ PlayerGoSpeed3(direction);
+ }
+}
+
+static void AcroBikeTransition_NormalToWheelie(u8 direction)
+{
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ direction = playerMapObj->placeholder18;
+ PlayerStartWheelie(direction);
+}
+
+static void AcroBikeTransition_WheelieToNormal(u8 direction)
+{
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ direction = playerMapObj->placeholder18;
+ PlayerEndWheelie(direction);
+}
+
+static void AcroBikeTransition_WheelieIdle(u8 direction)
+{
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ direction = playerMapObj->placeholder18;
+ PlayerIdleWheelie(direction);
+}
+
+static void AcroBikeTransition_WheelieHoppingStanding(u8 direction)
+{
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ direction = playerMapObj->placeholder18;
+ PlayerStandingHoppingWheelie(direction);
+}
+
+static void AcroBikeTransition_WheelieHoppingMoving(u8 direction)
+{
+ u8 collision;
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ {
+ AcroBikeTransition_WheelieHoppingStanding(playerMapObj->placeholder18);
+ return;
+ }
+ collision = get_some_collision(direction);
+ // TODO: Try to get rid of this goto
+ if (collision == 0 || collision == 9)
+ {
+ goto derp;
+ }
+ else if (collision == 6)
+ {
+ PlayerLedgeHoppingWheelie(direction);
+ }
+ else if (collision < 5 || collision > 8)
+ {
+ if (collision <= 11)
+ {
+ AcroBikeTransition_WheelieHoppingStanding(direction);
+ }
+ else
+ {
+ derp:
+ PlayerMovingHoppingWheelie(direction);
+ }
+ }
+}
+
+static void AcroBikeTransition_SideJump(u8 direction)
+{
+ u8 collision;
+ struct MapObject *playerMapObj;
+
+ collision = get_some_collision(direction);
+ if (collision != 0)
+ {
+ if (collision == 7)
+ return;
+ if (collision < 10)
+ {
+ AcroBikeTransition_TurnDirection(direction);
+ return;
+ }
+ if (WillPlayerCollideWithCollision(collision, direction) == FALSE)
+ {
+ AcroBikeTransition_TurnDirection(direction);
+ return;
+ }
+ }
+ playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+ PlaySE(SE_JITE_PYOKO);
+ playerMapObj->mapobj_bit_9 = 1;
+ PlayerSetAnimId(sub_8093514(direction), 2);
+}
+
+static void AcroBikeTransition_TurnJump(u8 direction)
+{
+ PlayerAcroTurnJump(direction);
+}
+
+static void AcroBikeTransition_WheelieMoving(u8 direction)
+{
+ u8 collision;
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ {
+ PlayerIdleWheelie(playerMapObj->placeholder18);
+ return;
+ }
+ collision = get_some_collision(direction);
+ if (collision > 0 && collision < 12)
+ {
+ if (collision == 6)
+ {
+ PlayerLedgeHoppingWheelie(direction);
+ }
+ else if (collision == 9)
+ {
+ PlayerIdleWheelie(direction);
+ }
+ else if (collision <= 4)
+ {
+ if (MetatileBehavior_IsBumpySlope(playerMapObj->mapobj_unk_1E))
+ PlayerIdleWheelie(direction);
+ else
+ sub_808B980(direction); //hit wall?
+ }
+ return;
+ }
+ sub_808B9BC(direction);
+ gPlayerAvatar.runningState = MOVING;
+}
+
+static void AcroBikeTransition_WheelieRisingMoving(u8 direction)
+{
+ u8 collision;
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ {
+ PlayerStartWheelie(playerMapObj->placeholder18);
+ return;
+ }
+ collision = get_some_collision(direction);
+ if (collision > 0 && collision < 12)
+ {
+ if (collision == 6)
+ {
+ PlayerLedgeHoppingWheelie(direction);
+ }
+ else if (collision == 9)
+ {
+ PlayerIdleWheelie(direction);
+ }
+ else if (collision <= 4)
+ {
+ if (MetatileBehavior_IsBumpySlope(playerMapObj->mapobj_unk_1E))
+ PlayerIdleWheelie(direction);
+ else
+ sub_808B980(direction); //hit wall?
+ }
+ return;
+ }
+ sub_808B9A4(direction);
+ gPlayerAvatar.runningState = MOVING;
+}
+
+static void AcroBikeTransition_WheelieLoweringMoving(u8 direction)
+{
+ u8 collision;
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ if (CanBikeFaceDirOnMetatile(direction, playerMapObj->mapobj_unk_1E) == 0)
+ {
+ PlayerEndWheelie(playerMapObj->placeholder18);
+ return;
+ }
+ collision = get_some_collision(direction);
+ if (collision > 0 && collision < 12)
+ {
+ if (collision == 6)
+ PlayerJumpLedge(direction);
+ else if (collision < 5 || collision > 8)
+ PlayerEndWheelie(direction);
+ return;
+ }
+ npc_use_some_d2s(direction);
+}
+
+void Bike_TryAcroBikeHistoryUpdate(u16 newKeys, u16 heldKeys)
+{
+ if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_ACRO_BIKE)
+ AcroBike_TryHistoryUpdate(newKeys, heldKeys);
+}
+
+static void AcroBike_TryHistoryUpdate(u16 newKeys, u16 heldKeys) // newKeys is unused
+{
+ u8 direction = Bike_DPadToDirection(heldKeys);
+
+ if (direction == (gPlayerAvatar.directionHistory & 0xF))
+ {
+ // increment the timer for direction history since last input.
+ if (gPlayerAvatar.dirTimerHistory[0] < 0xFF)
+ gPlayerAvatar.dirTimerHistory[0]++;
+ }
+ else
+ {
+ Bike_UpdateDirTimerHistory(direction);
+ gPlayerAvatar.bikeSpeed = SPEED_STANDING;
+ }
+
+ direction = heldKeys & (A_BUTTON | B_BUTTON | SELECT_BUTTON | START_BUTTON); // directions is reused for some reason.
+ if (direction == (gPlayerAvatar.abStartSelectHistory & 0xF))
+ {
+ if (gPlayerAvatar.abStartSelectTimerHistory[0] < 0xFF)
+ gPlayerAvatar.abStartSelectTimerHistory[0]++;
+ }
+ else
+ {
+ Bike_UpdateABStartSelectHistory(direction);
+ gPlayerAvatar.bikeSpeed = SPEED_STANDING;
+ }
+}
+
+static bool8 HasPlayerInputTakenLongerThanList(const u8 *dirTimerList, const u8 *abStartSelectTimerList)
+{
+ u8 i;
+
+ for (i = 0; dirTimerList[i] != 0; i++)
+ {
+ if (gPlayerAvatar.dirTimerHistory[i] > dirTimerList[i])
+ return FALSE;
+ }
+ for (i = 0; abStartSelectTimerList[i] != 0; i++)
+ {
+ if (gPlayerAvatar.abStartSelectTimerHistory[i] > abStartSelectTimerList[i])
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static u8 AcroBike_GetJumpDirection(void)
+{
+ u32 i;
+
+ for (i = 0; i < ARRAY_COUNT(sAcroBikeTricksList); i++)
+ {
+ const struct BikeHistoryInputInfo *historyInputInfo = &sAcroBikeTricksList[i];
+ u32 dirHistory = gPlayerAvatar.directionHistory;
+ u32 abStartSelectHistory = gPlayerAvatar.abStartSelectHistory;
+
+ dirHistory &= historyInputInfo->dirHistoryMask;
+ abStartSelectHistory &= historyInputInfo->abStartSelectHistoryMask;
+ if (dirHistory == historyInputInfo->dirHistoryMatch && abStartSelectHistory == historyInputInfo->abStartSelectHistoryMatch && HasPlayerInputTakenLongerThanList(historyInputInfo->dirTimerHistoryList, historyInputInfo->abStartSelectHistoryList))
+ return historyInputInfo->direction;
+ }
+ return 0;
+}
+
+static void Bike_UpdateDirTimerHistory(u8 dir)
+{
+ u8 i;
+
+ gPlayerAvatar.directionHistory = (gPlayerAvatar.directionHistory << 4) | (dir & 0xF);
+
+ for (i = 7; i != 0; i--)
+ gPlayerAvatar.dirTimerHistory[i] = gPlayerAvatar.dirTimerHistory[i - 1];
+ gPlayerAvatar.dirTimerHistory[0] = 1;
+}
+
+static void Bike_UpdateABStartSelectHistory(u8 input)
+{
+ u8 i;
+
+ gPlayerAvatar.abStartSelectHistory = (gPlayerAvatar.abStartSelectHistory << 4) | (input & 0xF);
+
+ for (i = 7; i != 0; i--)
+ gPlayerAvatar.abStartSelectTimerHistory[i] = gPlayerAvatar.abStartSelectTimerHistory[i - 1];
+ gPlayerAvatar.abStartSelectTimerHistory[0] = 1;
+}
+
+static u8 Bike_DPadToDirection(u16 heldKeys)
+{
+ if (heldKeys & DPAD_UP)
+ return DIR_NORTH;
+ if (heldKeys & DPAD_DOWN)
+ return DIR_SOUTH;
+ if (heldKeys & DPAD_LEFT)
+ return DIR_WEST;
+ if (heldKeys & DPAD_RIGHT)
+ return DIR_EAST;
+ return DIR_NONE;
+}
+
+static u8 get_some_collision(u8 direction)
+{
+ s16 x;
+ s16 y;
+ u8 metatitleBehavior;
+ struct MapObject *playerMapObj = &gMapObjects[gPlayerAvatar.mapObjectId];
+
+ x = playerMapObj->coords2.x;
+ y = playerMapObj->coords2.y;
+ MoveCoords(direction, &x, &y);
+ metatitleBehavior = MapGridGetMetatileBehaviorAt(x, y);
+ return Bike_CheckCollisionTryAdvanceCollisionCount(playerMapObj, x, y, direction, metatitleBehavior);
+}
+
+static u8 Bike_CheckCollisionTryAdvanceCollisionCount(struct MapObject *mapObject, s16 x, s16 y, u8 direction, u8 metatitleBehavior)
+{
+ u8 collision = CheckForFieldObjectCollision(mapObject, x, y, direction, metatitleBehavior);
+
+ if (collision > 4)
+ return collision;
+
+ if (collision == 0 && IsRunningDisallowedByMetatile(metatitleBehavior))
+ collision = 2;
+
+ if (collision)
+ Bike_TryAdvanceCyclingRoadCollisions();
+
+ return collision;
+}
+
+bool8 RS_IsRunningDisallowed(u8 tile)
+{
+ if (IsRunningDisallowedByMetatile(tile) != FALSE || gMapHeader.mapType == MAP_TYPE_INDOOR)
+ return TRUE;
+ else
+ return FALSE;
+}
+
+static bool8 IsRunningDisallowedByMetatile(u8 tile)
+{
+ if (MetatileBehavior_IsRunningDisallowed(tile))
+ return TRUE;
+ if (MetatileBehavior_IsFortreeBridge(tile) && (PlayerGetZCoord() & 1) == 0)
+ return TRUE;
+ return FALSE;
+}
+
+static void Bike_TryAdvanceCyclingRoadCollisions(void)
+{
+ if (gBikeCyclingChallenge != FALSE && gBikeCollisions < 100)
+ gBikeCollisions++;
+}
+
+static bool8 CanBikeFaceDirOnMetatile(u8 direction, u8 tile)
+{
+ if (direction == DIR_EAST || direction == DIR_WEST)
+ {
+ // Bike cannot face east or west on a vertical rail
+ if (MetatileBehavior_IsIsolatedVerticalRail(tile)
+ || MetatileBehavior_IsVerticalRail(tile))
+ return FALSE;
+ }
+ else
+ {
+ // Bike cannot face north or south on a horizontal rail
+ if (MetatileBehavior_IsIsolatedHorizontalRail(tile)
+ || MetatileBehavior_IsHorizontalRail(tile))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static bool8 WillPlayerCollideWithCollision(u8 newTileCollision, u8 direction)
+{
+ if (direction == DIR_NORTH || direction == DIR_SOUTH)
+ {
+ if (newTileCollision == 10 || newTileCollision == 12)
+ return FALSE;
+ }
+ else if (newTileCollision == 11 || newTileCollision == 13)
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+bool8 IsBikingDisallowedByPlayer(void)
+{
+ s16 x, y;
+ u8 tileBehavior;
+
+ if (!(gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_SURFING | PLAYER_AVATAR_FLAG_4)))
+ {
+ PlayerGetDestCoords(&x, &y);
+ tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
+ if (!IsRunningDisallowedByMetatile(tileBehavior))
+ return FALSE;
+ }
+ return TRUE;
+}
+
+bool8 player_should_look_direction_be_enforced_upon_movement(void)
+{
+ if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_ACRO_BIKE) != FALSE && MetatileBehavior_IsBumpySlope(gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1E) != FALSE)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+void GetOnOffBike(u8 transitionFlags)
+{
+ gUnknown_02037348 = FALSE;
+
+ if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_MACH_BIKE | PLAYER_AVATAR_FLAG_ACRO_BIKE))
+ {
+ SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT);
+ Overworld_ClearSavedMusic();
+ Overworld_PlaySpecialMapMusic();
+ }
+ else
+ {
+ SetPlayerAvatarTransitionFlags(transitionFlags);
+ Overworld_SetSavedMusic(MUS_CYCLING);
+ Overworld_ChangeMusicTo(MUS_CYCLING);
+ }
+}
+
+void BikeClearState(int newDirHistory, int newAbStartHistory)
+{
+ u8 i;
+
+ gPlayerAvatar.acroBikeState = ACRO_STATE_NORMAL;
+ gPlayerAvatar.newDirBackup = DIR_NONE;
+ gPlayerAvatar.bikeFrameCounter = 0;
+ gPlayerAvatar.bikeSpeed = SPEED_STANDING;
+ gPlayerAvatar.directionHistory = newDirHistory;
+ gPlayerAvatar.abStartSelectHistory = newAbStartHistory;
+
+ for (i = 0; i < 8; i++)
+ gPlayerAvatar.dirTimerHistory[i] = 0;
+
+ for (i = 0; i < 8; i++)
+ gPlayerAvatar.abStartSelectTimerHistory[i] = 0;
+}
+
+void Bike_UpdateBikeCounterSpeed(u8 counter)
+{
+ gPlayerAvatar.bikeFrameCounter = counter;
+ gPlayerAvatar.bikeSpeed = gPlayerAvatar.bikeFrameCounter + (gPlayerAvatar.bikeFrameCounter >> 1); // lazy way of multiplying by 1.5.
+}
+
+static void Bike_SetBikeStill(void)
+{
+ gPlayerAvatar.bikeFrameCounter = 0;
+ gPlayerAvatar.bikeSpeed = SPEED_STANDING;
+}
+
+s16 GetPlayerSpeed(void)
+{
+ // because the player pressed a direction, it won't ever return a speed of 0 since this function returns the player's current speed.
+ s16 machSpeeds[3];
+
+ memcpy(machSpeeds, sMachBikeSpeeds, sizeof(machSpeeds));
+
+ if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_MACH_BIKE)
+ return machSpeeds[gPlayerAvatar.bikeFrameCounter];
+ else if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_ACRO_BIKE)
+ return SPEED_FASTER;
+ else if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_SURFING | PLAYER_AVATAR_FLAG_DASH))
+ return SPEED_FAST;
+ else
+ return SPEED_NORMAL;
+}
+
+void Bike_HandleBumpySlopeJump(void)
+{
+ s16 x, y;
+ u8 tileBehavior;
+
+ if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_ACRO_BIKE)
+ {
+ PlayerGetDestCoords(&x, &y);
+ tileBehavior = MapGridGetMetatileBehaviorAt(x, y);
+ if (MetatileBehavior_IsBumpySlope(tileBehavior))
+ {
+ gPlayerAvatar.acroBikeState = ACRO_STATE_WHEELIE_STANDING;
+ sub_808C1B4(player_get_direction_upper_nybble());
+ }
+ }
+}
+
+bool32 IsRunningDisallowed(u8 metatile)
+{
+ if (!(gMapHeader.flags & 4) || IsRunningDisallowedByMetatile(metatile) == TRUE)
+ return TRUE;
+ else
+ return FALSE;
+}
diff --git a/src/dma3_manager.c b/src/dma3_manager.c
index bb015c5cf..725bfb0e7 100644
--- a/src/dma3_manager.c
+++ b/src/dma3_manager.c
@@ -29,76 +29,92 @@ void ClearDma3Requests(void)
gDma3ManagerLocked = FALSE;
}
-#ifdef NONMATCHING
+// Maximum amount of data will will transfer in one operation
+#define DMA_MAX_BLOCK_SIZE 0x1000
+
+#define Dma3CopyLarge_(src, dest, size, bit) \
+{ \
+ const void *_src = src; \
+ void *_dest = dest; \
+ u32 _size = size; \
+ while (1) \
+ { \
+ if (_size <= DMA_MAX_BLOCK_SIZE) \
+ { \
+ DmaCopy##bit(3, _src, _dest, _size); \
+ break; \
+ } \
+ DmaCopy##bit(3, _src, _dest, DMA_MAX_BLOCK_SIZE); \
+ _src += DMA_MAX_BLOCK_SIZE; \
+ _dest += DMA_MAX_BLOCK_SIZE; \
+ _size -= DMA_MAX_BLOCK_SIZE; \
+ } \
+}
+
+#define Dma3CopyLarge16_(src, dest, size) Dma3CopyLarge_(src, dest, size, 16)
+#define Dma3CopyLarge32_(src, dest, size) Dma3CopyLarge_(src, dest, size, 32)
+
+#define Dma3FillLarge_(value, dest, size, bit) \
+{ \
+ void *_dest = dest; \
+ u32 _size = size; \
+ while (1) \
+ { \
+ if (_size <= DMA_MAX_BLOCK_SIZE) \
+ { \
+ DmaFill##bit(3, value, _dest, _size); \
+ break; \
+ } \
+ DmaFill##bit(3, value, _dest, DMA_MAX_BLOCK_SIZE); \
+ _dest += DMA_MAX_BLOCK_SIZE; \
+ _size -= DMA_MAX_BLOCK_SIZE; \
+ } \
+}
+
+#define Dma3FillLarge16_(value, dest, size) Dma3FillLarge_(value, dest, size, 16)
+#define Dma3FillLarge32_(value, dest, size) Dma3FillLarge_(value, dest, size, 32)
+
+
void ProcessDma3Requests(void)
{
- // NOTE: the fillerA member of the DMA struct is actually u32 value;
- u16 total_size;
+ u16 totalSize;
if (gDma3ManagerLocked)
return;
- total_size = 0;
+ totalSize = 0;
// as long as there are DMA requests to process (unless size or vblank is an issue), do not exit
- while (gDma3Requests[gDma3RequestCursor].size)
+ while (gDma3Requests[gDma3RequestCursor].size != 0)
{
- total_size += gDma3Requests[gDma3RequestCursor].size;
+ totalSize += gDma3Requests[gDma3RequestCursor].size;
- if (total_size > 0xA000)
+ if (totalSize > 0xA000)
return; // don't do too much at once
-
- if (REG_VCOUNT > 224)
- return;// we're about to leave vblank, stop
+ if (*(u8 *)REG_ADDR_VCOUNT > 224)
+ return; // we're about to leave vblank, stop
switch (gDma3Requests[gDma3RequestCursor].mode)
{
case 1: // regular 32-bit copy
- // _08000C8C
- if(gDma3Requests[gDma3RequestCursor].size <= 0x1000)
- {
- DmaCopy32(3, gDma3Requests[gDma3RequestCursor].src, gDma3Requests[gDma3RequestCursor].dest, gDma3Requests[gDma3RequestCursor].size);
- break;
- }
- while (gDma3Requests[gDma3RequestCursor].size > 0x1000)
- {
- DmaCopy32(3, gDma3Requests[gDma3RequestCursor].src, gDma3Requests[gDma3RequestCursor].dest, 0x1000);
- gDma3Requests[gDma3RequestCursor].src += 0x1000;
- gDma3Requests[gDma3RequestCursor].dest += 0x1000;
- gDma3Requests[gDma3RequestCursor].size -= 0x1000;
- }
- DmaCopy32(3, gDma3Requests[gDma3RequestCursor].src, gDma3Requests[gDma3RequestCursor].dest, gDma3Requests[gDma3RequestCursor].size);
+ Dma3CopyLarge32_(gDma3Requests[gDma3RequestCursor].src,
+ gDma3Requests[gDma3RequestCursor].dest,
+ gDma3Requests[gDma3RequestCursor].size);
break;
case 2: // repeat a single 32-bit value across RAM
- // _08000CD0
- while (gDma3Requests[gDma3RequestCursor].size > 0x1000)
- {
- DmaFill32(3, gDma3Requests[gDma3RequestCursor].value, gDma3Requests[gDma3RequestCursor].dest, 0x1000);
- gDma3Requests[gDma3RequestCursor].dest += 0x1000;
- gDma3Requests[gDma3RequestCursor].size -= 0x1000;
- }
- DmaFill32(3, gDma3Requests[gDma3RequestCursor].value, gDma3Requests[gDma3RequestCursor].dest, gDma3Requests[gDma3RequestCursor].size);
+ Dma3FillLarge32_(gDma3Requests[gDma3RequestCursor].value,
+ gDma3Requests[gDma3RequestCursor].dest,
+ gDma3Requests[gDma3RequestCursor].size);
break;
case 3: // regular 16-bit copy
- // _08000D3C
- while (gDma3Requests[gDma3RequestCursor].size > 0x1000)
- {
- DmaCopy16(3, gDma3Requests[gDma3RequestCursor].src, gDma3Requests[gDma3RequestCursor].dest, 0x1000);
- gDma3Requests[gDma3RequestCursor].src += 0x1000;
- gDma3Requests[gDma3RequestCursor].dest += 0x1000;
- gDma3Requests[gDma3RequestCursor].size -= 0x1000;
- }
- DmaCopy16(3, gDma3Requests[gDma3RequestCursor].src, gDma3Requests[gDma3RequestCursor].dest, gDma3Requests[gDma3RequestCursor].size);
+ Dma3CopyLarge16_(gDma3Requests[gDma3RequestCursor].src,
+ gDma3Requests[gDma3RequestCursor].dest,
+ gDma3Requests[gDma3RequestCursor].size);
break;
case 4: // repeat a single 16-bit value across RAM
- // _08000D88
- while (gDma3Requests[gDma3RequestCursor].size > 0x1000)
- {
- DmaFill16(3, gDma3Requests[gDma3RequestCursor].value, gDma3Requests[gDma3RequestCursor].dest, 0x1000);
- gDma3Requests[gDma3RequestCursor].dest += 0x1000;
- gDma3Requests[gDma3RequestCursor].size -= 0x1000;
- }
- DmaFill16(3, gDma3Requests[gDma3RequestCursor].value, gDma3Requests[gDma3RequestCursor].dest, gDma3Requests[gDma3RequestCursor].size);
+ Dma3FillLarge16_(gDma3Requests[gDma3RequestCursor].value,
+ gDma3Requests[gDma3RequestCursor].dest,
+ gDma3Requests[gDma3RequestCursor].size);
break;
}
gDma3Requests[gDma3RequestCursor].src = NULL;
@@ -112,322 +128,6 @@ void ProcessDma3Requests(void)
gDma3RequestCursor = 0;
}
}
-#else
-__attribute__((naked))
-void ProcessDma3Requests(void)
-{
- asm(".syntax unified\n\
- push {r4-r7,lr}\n\
- mov r7, r10\n\
- mov r6, r9\n\
- mov r5, r8\n\
- push {r5-r7}\n\
- sub sp, 0xC\n\
- ldr r0, =gDma3ManagerLocked\n\
- ldrb r0, [r0]\n\
- cmp r0, 0\n\
- beq _08000C06\n\
- b _08000E46\n\
-_08000C06:\n\
- movs r0, 0\n\
- str r0, [sp, 0x8]\n\
- ldr r1, =gDma3Requests\n\
- ldr r2, =gDma3RequestCursor\n\
- ldrb r0, [r2]\n\
- lsls r0, 4\n\
- adds r0, r1\n\
- ldrh r0, [r0, 0x8]\n\
- mov r12, r2\n\
- cmp r0, 0\n\
- bne _08000C1E\n\
- b _08000E46\n\
-_08000C1E:\n\
- mov r8, r1\n\
- adds r1, 0x4\n\
- mov r10, r1\n\
- movs r6, 0x80\n\
- lsls r6, 5\n\
- ldr r7, =0x040000D4 @REG_DMA3\n\
- movs r2, 0\n\
- mov r9, r2\n\
-_08000C2E:\n\
- mov r3, r12 @ gDma3RequestCursor\n\
- ldrb r0, [r3]\n\
- lsls r5, r0, 4\n\
- mov r0, r8 @ gDma3Requests\n\
- adds r1, r5, r0 @ gDma3Requests[gDma3RequestCursor]\n\
- ldrh r0, [r1, 0x8] @ gDma3Requests[gDma3RequestCursor].size\n\
- ldr r2, [sp, 0x8]\n\
- adds r0, r2, r0\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- str r0, [sp, 0x8]\n\
- movs r0, 0xA0\n\
- lsls r0, 8\n\
- ldr r3, [sp, 0x8]\n\
- cmp r3, r0\n\
- bls _08000C50\n\
- b _08000E46\n\
-_08000C50:\n\
- ldr r0, =0x04000006 @REG_VCOUNT\n\
- ldrb r0, [r0]\n\
- cmp r0, 0xE0\n\
- bls _08000C5A\n\
- b _08000E46\n\
-_08000C5A:\n\
- ldrh r0, [r1, 0xA]\n\
- cmp r0, 0x2\n\
- beq _08000CD0\n\
- cmp r0, 0x2\n\
- bgt _08000C80\n\
- cmp r0, 0x1\n\
- beq _08000C8C\n\
- b _08000DF0\n\
- .pool\n\
-_08000C80:\n\
- cmp r0, 0x3\n\
- beq _08000D3C\n\
- cmp r0, 0x4\n\
- bne _08000C8A\n\
- b _08000D88\n\
-_08000C8A:\n\
- b _08000DF0\n\
-_08000C8C:\n\
- ldr r3, [r1]\n\
- mov r2, r10\n\
- adds r0, r5, r2\n\
- ldr r2, [r0]\n\
- ldrh r1, [r1, 0x8]\n\
- cmp r1, r6\n\
- bhi _08000CA6\n\
- str r3, [r7]\n\
- str r2, [r7, 0x4]\n\
- lsrs r0, r1, 2\n\
- movs r1, 0x84\n\
- lsls r1, 24\n\
- b _08000DAA\n\
-_08000CA6:\n\
- ldr r4, =0x040000D4 @REG_DMA3\n\
- str r3, [r4]\n\
- str r2, [r4, 0x4]\n\
- ldr r0, =0x84000400\n\
- str r0, [r4, 0x8]\n\
- ldr r0, [r4, 0x8]\n\
- adds r3, r6\n\
- adds r2, r6\n\
- subs r1, r6\n\
- cmp r1, r6\n\
- bhi _08000CA6\n\
- str r3, [r4]\n\
- str r2, [r4, 0x4]\n\
- lsrs r0, r1, 2\n\
- movs r1, 0x84\n\
- lsls r1, 24\n\
- b _08000D76\n\
- .pool\n\
-_08000CD0:\n\
- mov r3, r10\n\
- adds r0, r5, r3\n\
- ldr r4, [r0]\n\
- ldrh r1, [r1, 0x8]\n\
- cmp r1, r6\n\
- bhi _08000CF4\n\
- mov r0, r8\n\
- adds r0, 0xC\n\
- adds r0, r5, r0\n\
- ldr r0, [r0]\n\
- str r0, [sp]\n\
- mov r5, sp\n\
- str r5, [r7]\n\
- str r4, [r7, 0x4]\n\
- lsrs r0, r1, 2\n\
- movs r1, 0x85\n\
- lsls r1, 24\n\
- b _08000DAA\n\
-_08000CF4:\n\
- mov r2, r12\n\
- ldrb r0, [r2]\n\
- lsls r0, 4\n\
- mov r5, r8\n\
- adds r5, 0xC\n\
- adds r0, r5\n\
- ldr r0, [r0]\n\
- str r0, [sp]\n\
- ldr r3, =0x040000D4 @REG_DMA3\n\
- mov r0, sp\n\
- str r0, [r3]\n\
- str r4, [r3, 0x4]\n\
- ldr r0, =0x85000400\n\
- str r0, [r3, 0x8]\n\
- ldr r0, [r3, 0x8]\n\
- adds r4, r6\n\
- subs r1, r6\n\
- cmp r1, r6\n\
- bhi _08000CF4\n\
- ldrb r0, [r2]\n\
- lsls r0, 4\n\
- adds r0, r5\n\
- ldr r0, [r0]\n\
- str r0, [sp]\n\
- mov r2, sp\n\
- str r2, [r3]\n\
- str r4, [r3, 0x4]\n\
- lsrs r0, r1, 2\n\
- movs r1, 0x85\n\
- lsls r1, 24\n\
- b _08000DEA\n\
- .pool\n\
-_08000D3C:\n\
- ldr r3, [r1]\n\
- mov r2, r10\n\
- adds r0, r5, r2\n\
- ldr r2, [r0]\n\
- ldrh r1, [r1, 0x8]\n\
- cmp r1, r6\n\
- bhi _08000D56\n\
- str r3, [r7]\n\
- str r2, [r7, 0x4]\n\
- lsrs r0, r1, 1\n\
- movs r1, 0x80\n\
- lsls r1, 24\n\
- b _08000DAA\n\
-_08000D56:\n\
- ldr r4, =0x040000D4 @REG_DMA3\n\
- str r3, [r4]\n\
- str r2, [r4, 0x4]\n\
- ldr r0, =0x80000800\n\
- str r0, [r4, 0x8]\n\
- ldr r0, [r4, 0x8]\n\
- adds r3, r6\n\
- adds r2, r6\n\
- subs r1, r6\n\
- cmp r1, r6\n\
- bhi _08000D56\n\
- str r3, [r4]\n\
- str r2, [r4, 0x4]\n\
- lsrs r0, r1, 1\n\
- movs r1, 0x80\n\
- lsls r1, 24\n\
-_08000D76:\n\
- orrs r0, r1\n\
- str r0, [r4, 0x8]\n\
- ldr r0, [r4, 0x8]\n\
- b _08000DF0\n\
- .pool\n\
-_08000D88:\n\
- mov r3, r10\n\
- adds r0, r5, r3\n\
- ldr r2, [r0]\n\
- ldrh r4, [r1, 0x8]\n\
- add r1, sp, 0x4\n\
- cmp r4, r6\n\
- bhi _08000DB2\n\
- mov r0, r8\n\
- adds r0, 0xC\n\
- adds r0, r5, r0\n\
- ldr r0, [r0]\n\
- strh r0, [r1]\n\
- str r1, [r7]\n\
- str r2, [r7, 0x4]\n\
- lsrs r0, r4, 1\n\
- movs r1, 0x81\n\
- lsls r1, 24\n\
-_08000DAA:\n\
- orrs r0, r1\n\
- str r0, [r7, 0x8]\n\
- ldr r0, [r7, 0x8]\n\
- b _08000DF0\n\
-_08000DB2:\n\
- mov r5, r12\n\
- ldrb r0, [r5]\n\
- lsls r0, 4\n\
- ldr r3, =gDma3Requests + 0x0C\n\
- adds r0, r3\n\
- ldr r0, [r0]\n\
- strh r0, [r1]\n\
- ldr r3, =0x040000D4 @REG_DMA3\n\
- str r1, [r3]\n\
- str r2, [r3, 0x4]\n\
- ldr r0, =0x81000800\n\
- str r0, [r3, 0x8]\n\
- ldr r0, [r3, 0x8]\n\
- adds r2, r6\n\
- subs r4, r6\n\
- cmp r4, r6\n\
- bhi _08000DB2\n\
- ldrb r0, [r5]\n\
- lsls r0, 4\n\
- ldr r5, =gDma3Requests + 0x0C\n\
- adds r0, r5\n\
- ldr r0, [r0]\n\
- strh r0, [r1]\n\
- str r1, [r3]\n\
- str r2, [r3, 0x4]\n\
- lsrs r0, r4, 1\n\
- movs r1, 0x81\n\
- lsls r1, 24\n\
-_08000DEA:\n\
- orrs r0, r1\n\
- str r0, [r3, 0x8]\n\
- ldr r0, [r3, 0x8]\n\
-_08000DF0:\n\
- ldr r1, =gDma3Requests\n\
- mov r3, r12\n\
- ldrb r0, [r3]\n\
- lsls r0, 4\n\
- adds r0, r1\n\
- mov r2, r9\n\
- str r2, [r0]\n\
- ldrb r0, [r3]\n\
- lsls r0, 4\n\
- add r0, r10\n\
- str r2, [r0]\n\
- ldrb r0, [r3]\n\
- lsls r0, 4\n\
- adds r0, r1\n\
- movs r4, 0\n\
- strh r2, [r0, 0x8]\n\
- ldrb r0, [r3]\n\
- lsls r0, 4\n\
- adds r0, r1\n\
- mov r5, r9\n\
- strh r5, [r0, 0xA]\n\
- ldrb r0, [r3]\n\
- lsls r0, 4\n\
- adds r1, 0xC\n\
- adds r0, r1\n\
- mov r1, r9\n\
- str r1, [r0]\n\
- ldrb r0, [r3]\n\
- adds r0, 0x1\n\
- strb r0, [r3]\n\
- lsls r0, 24\n\
- cmp r0, 0\n\
- bge _08000E34\n\
- strb r4, [r3]\n\
-_08000E34:\n\
- mov r2, r12\n\
- ldrb r0, [r2]\n\
- lsls r0, 4\n\
- ldr r3, =gDma3Requests\n\
- adds r0, r3\n\
- ldrh r0, [r0, 0x8]\n\
- cmp r0, 0\n\
- beq _08000E46\n\
- b _08000C2E\n\
-_08000E46:\n\
- add sp, 0xC\n\
- pop {r3-r5}\n\
- mov r8, r3\n\
- mov r9, r4\n\
- mov r10, r5\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0\n\
- .pool\n\
- .syntax divided");
-}
-#endif
int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode)
{
diff --git a/src/egg_hatch.c b/src/egg_hatch.c
index 721ba4a4f..1aff894b9 100644
--- a/src/egg_hatch.c
+++ b/src/egg_hatch.c
@@ -51,8 +51,8 @@ extern const struct CompressedSpriteSheet gMonFrontPicTable[];
extern const u8 gBattleTextboxTiles[];
extern const u8 gBattleTextboxTilemap[];
extern const u8 gBattleTextboxPalette[];
-extern const u16 gUnknown_08DD7300[]; // palette, gameboy advance
-extern const u32 gUnknown_08DD7360[]; // tileset gameboy advance
+extern const u16 gTradeGba2_Pal[]; // palette, gameboy advance
+extern const u32 gTradeGba_Gfx[]; // tileset gameboy advance
extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle
extern const u8 gText_HatchedFromEgg[];
extern const u8 gText_NickHatchPrompt[];
@@ -548,8 +548,8 @@ static void CB2_EggHatch_0(void)
break;
case 7:
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
- LoadPalette(gUnknown_08DD7300, 0x10, 0xA0);
- LoadBgTiles(1, gUnknown_08DD7360, 0x1420, 0);
+ LoadPalette(gTradeGba2_Pal, 0x10, 0xA0);
+ LoadBgTiles(1, gTradeGba_Gfx, 0x1420, 0);
CopyToBgTilemapBuffer(1, gUnknown_08331F60, 0x1000, 0);
CopyBgTilemapBufferToVram(1);
gMain.state++;
diff --git a/src/evolution_scene.c b/src/evolution_scene.c
index 580e88ad7..4b59147ff 100644
--- a/src/evolution_scene.c
+++ b/src/evolution_scene.c
@@ -78,7 +78,7 @@ extern void sub_806A068(u16, u8);
extern void sub_807F19C(void);
extern void sub_807B140(void);
extern void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies);
-extern void sub_8085784(void);
+extern void Overworld_PlaySpecialMapMusic(void);
extern void sub_81BFA38(struct Pokemon *party, u8 monId, u8 partyCount, void *CB2_ptr, u16 move);
extern u8 sub_81C1B94(void);
extern void sub_807F1A8(u8 arg0, const u8 *arg1, u8 arg2);
@@ -764,7 +764,7 @@ static void Task_EvolutionScene(u8 taskID)
if (!(gTasks[taskID].tBits & TASK_BIT_LEARN_MOVE))
{
StopMapMusic();
- sub_8085784();
+ Overworld_PlaySpecialMapMusic();
}
gTasks[taskID].tBits |= TASK_BIT_LEARN_MOVE;
@@ -793,7 +793,7 @@ static void Task_EvolutionScene(u8 taskID)
if (!(gTasks[taskID].tBits & TASK_BIT_LEARN_MOVE))
{
StopMapMusic();
- sub_8085784();
+ Overworld_PlaySpecialMapMusic();
}
if (!gTasks[taskID].tEvoWasStopped)
CreateShedinja(gTasks[taskID].tPreEvoSpecies, mon);
diff --git a/src/field_map_obj.c b/src/field_map_obj.c
index fc23a6e37..df80494b3 100755
--- a/src/field_map_obj.c
+++ b/src/field_map_obj.c
@@ -3231,7 +3231,7 @@ bool8 mss_npc_reset_oampriv3_1_unk2_unk3(struct MapObject *mapObject, struct Spr
bool8 sub_8091EC0(struct MapObject *mapObject, struct Sprite *sprite)
{
- if (gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1C == 0xFF || gPlayerAvatar.running1 == 2)
+ if (gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1C == 0xFF || gPlayerAvatar.tileTransitionState == 2)
{
return FALSE;
}
@@ -3410,7 +3410,7 @@ field_object_step(CopyPlayer2, gUnknown_0850DA90)
bool8 mss_08062EA4(struct MapObject *mapObject, struct Sprite *sprite)
{
- if (gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1C == 0xFF || gPlayerAvatar.running1 == 2)
+ if (gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1C == 0xFF || gPlayerAvatar.tileTransitionState == 2)
{
return FALSE;
}
diff --git a/src/fldeff_teleport.c b/src/fldeff_teleport.c
new file mode 100644
index 000000000..5b3492db0
--- /dev/null
+++ b/src/fldeff_teleport.c
@@ -0,0 +1,46 @@
+#include "global.h"
+#include "fldeff_teleport.h"
+#include "field_effect.h"
+#include "field_player_avatar.h"
+#include "party_menu.h"
+#include "overworld.h"
+#include "rom6.h"
+#include "task.h"
+
+extern bool8 (*gUnknown_03005DB0)(void);
+extern void (*gUnknown_0203CEEC)(void);
+
+bool8 SetUpFieldMove_Teleport(void)
+{
+ if (Overworld_MapTypeAllowsTeleportAndFly(gMapHeader.mapType) == TRUE)
+ {
+ gUnknown_03005DB0 = FieldCallback_Teleport;
+ gUnknown_0203CEEC = hm_teleport_run_dp02scr;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void hm_teleport_run_dp02scr(void)
+{
+ Overworld_ResetStateAfterTeleport();
+ FieldEffectStart(FLDEFF_USE_TELEPORT);
+ gFieldEffectArguments[0] = (u32)GetCursorSelectionMonId();
+}
+
+bool8 FldEff_UseTeleport(void)
+{
+ u8 taskId = oei_task_add();
+ gTasks[taskId].data[8] = (u32)sub_817C94C >> 16;
+ gTasks[taskId].data[9] = (u32)sub_817C94C;
+ SetPlayerAvatarTransitionFlags(1);
+ return FALSE;
+}
+
+void sub_817C94C(void)
+{
+ FieldEffectActiveListRemove(FLDEFF_USE_TELEPORT);
+ sub_80B7FC8();
+}
+
+
diff --git a/src/load_save.c b/src/load_save.c
index e0106c0a8..a516c08c2 100644
--- a/src/load_save.c
+++ b/src/load_save.c
@@ -80,45 +80,15 @@ void SetSaveBlocksPointers(u16 offset)
SetDecorationInventoriesPointers();
}
-// stuff i used to try and match MoveSaveBlocks_ResetHeap
-struct SaveBlocksInOne
-{
- struct SaveBlock2 sav2;
- struct SaveBlock1 sav1;
- struct PokemonStorage sav3;
-};
+extern u8 gHeap[];
-extern struct SaveBlocksInOne gHeap;
-
-#define ewram_addr 0x02000000 // oh no...
-#define ewram_addr2 0x02000f2c
-#define ewram_addr3 0x02004cb4
-
-#define eSaveBlockCopy (*(struct SaveBlocksInOne *)(ewram_addr + 0x0))
-#define eSaveBlock2Copy (*(struct SaveBlock2 *)((void*)(ewram_addr + 0x0)))
-#define eSaveBlock1Copy (*(struct SaveBlock1 *)((void*)(ewram_addr + sizeof(struct SaveBlock2))))
-#define eSaveBlock3Copy (*(struct PokemonStorage *)((void*)(ewram_addr + sizeof(struct SaveBlock2) + sizeof(struct SaveBlock1))))
-
-#ifdef NONMATCHING // this is one devil of a motherfucker
-/*
- The reason MoveSaveBlocks_ResetHeap mismatches is due to incorrect memcpys. Various
- things have been tried, such as: direct struct copys, ewram casts, use of defining
- the addresses manually, using memcpy anyway, delayed allocation of pointers at
- the start of function, as seen above and below. Scope declaration has been used to try and
- reproduce the correct macro thought to be used, but nothing has worked. It is worth
- noting that at this point that the compiler will delay the allocation of the save block
- pointers at the beginningto be allocated later: which might matter for matching this.
- Due to loading shared ewram heap areas directly, it is very likely emerald used ewram
- defines for this function, but there is no known example of a matching define.
- In addition, dead code might be present in the form of a runtime variable used
- to fix the address of the save blocks. This has been tested and is shown to affect
- the registers as well.
-*/
void MoveSaveBlocks_ResetHeap(void)
{
void *vblankCB, *hblankCB;
u32 encryptionKey;
- struct SaveBlock1 **sav1Copy = &gSaveBlock1Ptr; // r10;
+ struct SaveBlock2 *saveBlock2Copy;
+ struct SaveBlock1 *saveBlock1Copy;
+ struct PokemonStorage *pokemonStorageCopy;
// save interrupt functions and turn them off
vblankCB = gMain.vblankCallback;
@@ -127,22 +97,30 @@ void MoveSaveBlocks_ResetHeap(void)
gMain.hblankCallback = NULL;
gUnknown_0203CF5C = NULL;
+ saveBlock2Copy = (struct SaveBlock2 *)(gHeap);
+ saveBlock1Copy = (struct SaveBlock1 *)(gHeap + sizeof(struct SaveBlock2));
+ pokemonStorageCopy = (struct PokemonStorage *)(gHeap + sizeof(struct SaveBlock2) + sizeof(struct SaveBlock1));
+
// backup the saves.
- eSaveBlock1Copy = **sav1Copy;
- eSaveBlock2Copy = *gSaveBlock2Ptr;
- eSaveBlock3Copy = *gPokemonStoragePtr;
+ *saveBlock2Copy = *gSaveBlock2Ptr;
+ *saveBlock1Copy = *gSaveBlock1Ptr;
+ *pokemonStorageCopy = *gPokemonStoragePtr;
// change saveblocks' pointers
// argument is a sum of the individual trainerId bytes
- SetSaveBlocksPointers(eSaveBlock2Copy.playerTrainerId[0] + eSaveBlock2Copy.playerTrainerId[1] + eSaveBlock2Copy.playerTrainerId[2] + eSaveBlock2Copy.playerTrainerId[3]);
+ SetSaveBlocksPointers(
+ saveBlock2Copy->playerTrainerId[0] +
+ saveBlock2Copy->playerTrainerId[1] +
+ saveBlock2Copy->playerTrainerId[2] +
+ saveBlock2Copy->playerTrainerId[3]);
// restore saveblock data since the pointers changed
- **sav1Copy = eSaveBlock1Copy;
- *gSaveBlock2Ptr = eSaveBlock2Copy;
- *gPokemonStoragePtr = eSaveBlock3Copy;
+ *gSaveBlock2Ptr = *saveBlock2Copy;
+ *gSaveBlock1Ptr = *saveBlock1Copy;
+ *gPokemonStoragePtr = *pokemonStorageCopy;
// heap was destroyed in the copying process, so reset it
- InitHeap((void*)(0x02000000), 0x1C000);
+ InitHeap(gHeap, HEAP_SIZE);
// restore interrupt functions
gMain.hblankCallback = hblankCB;
@@ -153,105 +131,7 @@ void MoveSaveBlocks_ResetHeap(void)
ApplyNewEncryptionKeyToAllEncryptedData(encryptionKey);
gSaveBlock2Ptr->encryptionKey = encryptionKey;
}
-#else
-__attribute__((naked))
-void MoveSaveBlocks_ResetHeap(void)
-{
- asm(".syntax unified\n\
- push {r4-r7,lr}\n\
- mov r7, r10\n\
- mov r6, r9\n\
- mov r5, r8\n\
- push {r5-r7}\n\
- sub sp, 0x8\n\
- ldr r5, =gMain\n\
- ldr r0, [r5, 0xC]\n\
- str r0, [sp]\n\
- ldr r1, [r5, 0x10]\n\
- str r1, [sp, 0x4]\n\
- movs r0, 0\n\
- str r0, [r5, 0xC]\n\
- str r0, [r5, 0x10]\n\
- ldr r1, =gUnknown_0203CF5C\n\
- str r0, [r1]\n\
- ldr r4, =0x02000000\n\
- ldr r0, =gSaveBlock2Ptr\n\
- ldr r1, [r0]\n\
- ldr r6, =0x00000f2c\n\
- adds r0, r4, 0\n\
- adds r2, r6, 0\n\
- bl memcpy\n\
- ldr r1, =gSaveBlock1Ptr\n\
- mov r10, r1\n\
- ldr r1, [r1]\n\
- ldr r7, =0x00003d88\n\
- ldr r0, =0x02000f2c\n\
- adds r2, r7, 0\n\
- bl memcpy\n\
- ldr r0, =gPokemonStoragePtr\n\
- mov r8, r0\n\
- ldr r1, [r0]\n\
- ldr r0, =0x000083d0\n\
- mov r9, r0\n\
- ldr r0, =0x02004cb4\n\
- mov r2, r9\n\
- bl memcpy\n\
- ldrb r1, [r4, 0xA]\n\
- ldrb r0, [r4, 0xB]\n\
- adds r1, r0\n\
- ldrb r0, [r4, 0xC]\n\
- adds r1, r0\n\
- ldrb r0, [r4, 0xD]\n\
- adds r0, r1\n\
- bl SetSaveBlocksPointers\n\
- ldr r1, =gSaveBlock2Ptr\n\
- ldr r0, [r1]\n\
- adds r1, r4, 0\n\
- adds r2, r6, 0\n\
- bl memcpy\n\
- mov r1, r10\n\
- ldr r0, [r1]\n\
- ldr r1, =0x02000f2c\n\
- adds r2, r7, 0\n\
- bl memcpy\n\
- mov r1, r8\n\
- ldr r0, [r1]\n\
- ldr r1, =0x02004cb4\n\
- mov r2, r9\n\
- bl memcpy\n\
- movs r1, 0xE0\n\
- lsls r1, 9\n\
- adds r0, r4, 0\n\
- bl InitHeap\n\
- ldr r0, [sp, 0x4]\n\
- str r0, [r5, 0x10]\n\
- ldr r1, [sp]\n\
- str r1, [r5, 0xC]\n\
- bl Random\n\
- adds r4, r0, 0\n\
- bl Random\n\
- lsls r4, 16\n\
- lsls r0, 16\n\
- lsrs r0, 16\n\
- adds r4, r0\n\
- adds r0, r4, 0\n\
- bl ApplyNewEncryptionKeyToAllEncryptedData\n\
- ldr r1, =gSaveBlock2Ptr\n\
- ldr r0, [r1]\n\
- adds r0, 0xAC\n\
- str r4, [r0]\n\
- add sp, 0x8\n\
- pop {r3-r5}\n\
- mov r8, r3\n\
- mov r9, r4\n\
- mov r10, r5\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0\n\
- .pool\n\
- .syntax divided\n");
-}
-#endif
+
u8 sav2_x1_query_bit1(void)
{
diff --git a/src/mail.c b/src/mail.c
index ec7ff2ce2..68a55e242 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -20,42 +20,42 @@
#include "malloc.h"
#include "easy_chat.h"
-extern const u16 gUnknown_08DBE818[];
-extern const u16 gUnknown_08DBE838[];
-extern const u16 gUnknown_08DBE858[];
-extern const u16 gUnknown_08DBE878[];
-extern const u16 gUnknown_08DBE898[];
-extern const u16 gUnknown_08DBE8B8[];
-extern const u16 gUnknown_08DBE8D8[];
-extern const u16 gUnknown_08DBE8F8[];
-extern const u16 gUnknown_08DBE918[];
-extern const u16 gUnknown_08DBE938[];
-extern const u16 gUnknown_08DBE958[];
-extern const u16 gUnknown_08DBE978[];
-extern const u8 gUnknown_08DBE998[];
-extern const u8 gUnknown_08DBFBA4[];
-extern const u8 gUnknown_08DBEB38[];
-extern const u8 gUnknown_08DBFC7C[];
-extern const u8 gUnknown_08DBEC74[];
-extern const u8 gUnknown_08DBFD5C[];
-extern const u8 gUnknown_08DBEE84[];
-extern const u8 gUnknown_08DBFE68[];
-extern const u8 gUnknown_08DBEF5C[];
-extern const u8 gUnknown_08DBFF44[];
-extern const u8 gUnknown_08DBF154[];
-extern const u8 gUnknown_08DC0034[];
-extern const u8 gUnknown_08DBF2D4[];
-extern const u8 gUnknown_08DC0114[];
-extern const u8 gUnknown_08DBF37C[];
-extern const u8 gUnknown_08DC01F4[];
-extern const u8 gUnknown_08DBF50C[];
-extern const u8 gUnknown_08DC0300[];
-extern const u8 gUnknown_08DBF64C[];
-extern const u8 gUnknown_08DC03F0[];
-extern const u8 gUnknown_08DBF7B4[];
-extern const u8 gUnknown_08DC04E8[];
-extern const u8 gUnknown_08DBF904[];
-extern const u8 gUnknown_08DC0600[];
+extern const u16 gMailPalette_Orange[];
+extern const u16 gMailPalette_Harbor[];
+extern const u16 gMailPalette_Glitter[];
+extern const u16 gMailPalette_Mech[];
+extern const u16 gMailPalette_Wood[];
+extern const u16 gMailPalette_Wave[];
+extern const u16 gMailPalette_Bead[];
+extern const u16 gMailPalette_Shadow[];
+extern const u16 gMailPalette_Tropic[];
+extern const u16 gMailPalette_Dream[];
+extern const u16 gMailPalette_Fab[];
+extern const u16 gMailPalette_Retro[];
+extern const u8 gMailTiles_Orange[];
+extern const u8 gMailTilemap_Orange[];
+extern const u8 gMailTiles_Harbor[];
+extern const u8 gMailTilemap_Harbor[];
+extern const u8 gMailTiles_Glitter[];
+extern const u8 gMailTilemap_Glitter[];
+extern const u8 gMailTiles_Mech[];
+extern const u8 gMailTilemap_Mech[];
+extern const u8 gMailTiles_Wood[];
+extern const u8 gMailTilemap_Wood[];
+extern const u8 gMailTiles_Wave[];
+extern const u8 gMailTilemap_Wave[];
+extern const u8 gMailTiles_Bead[];
+extern const u8 gMailTilemap_Bead[];
+extern const u8 gMailTiles_Shadow[];
+extern const u8 gMailTilemap_Shadow[];
+extern const u8 gMailTiles_Tropic[];
+extern const u8 gMailTilemap_Tropic[];
+extern const u8 gMailTiles_Dream[];
+extern const u8 gMailTilemap_Dream[];
+extern const u8 gMailTiles_Fab[];
+extern const u8 gMailTilemap_Fab[];
+extern const u8 gMailTiles_Retro[];
+extern const u8 gMailTilemap_Retro[];
// Static type declarations
@@ -170,29 +170,29 @@ static const u16 sUnknown_0859F2B0[][2] = {
static const struct MailGraphics sUnknown_0859F2B8[] = {
{
- gUnknown_08DBE818, gUnknown_08DBE998, gUnknown_08DBFBA4, 0x02c0, 0x0000, 0x294a, 0x6739
+ gMailPalette_Orange, gMailTiles_Orange, gMailTilemap_Orange, 0x02c0, 0x0000, 0x294a, 0x6739
}, {
- gUnknown_08DBE838, gUnknown_08DBEB38, gUnknown_08DBFC7C, 0x02e0, 0x0000, 0x7fff, 0x4631
+ gMailPalette_Harbor, gMailTiles_Harbor, gMailTilemap_Harbor, 0x02e0, 0x0000, 0x7fff, 0x4631
}, {
- gUnknown_08DBE858, gUnknown_08DBEC74, gUnknown_08DBFD5C, 0x0400, 0x0000, 0x294a, 0x6739
+ gMailPalette_Glitter, gMailTiles_Glitter, gMailTilemap_Glitter, 0x0400, 0x0000, 0x294a, 0x6739
}, {
- gUnknown_08DBE878, gUnknown_08DBEE84, gUnknown_08DBFE68, 0x01e0, 0x0000, 0x7fff, 0x4631
+ gMailPalette_Mech, gMailTiles_Mech, gMailTilemap_Mech, 0x01e0, 0x0000, 0x7fff, 0x4631
}, {
- gUnknown_08DBE898, gUnknown_08DBEF5C, gUnknown_08DBFF44, 0x02e0, 0x0000, 0x7fff, 0x4631
+ gMailPalette_Wood, gMailTiles_Wood, gMailTilemap_Wood, 0x02e0, 0x0000, 0x7fff, 0x4631
}, {
- gUnknown_08DBE8B8, gUnknown_08DBF154, gUnknown_08DC0034, 0x0300, 0x0000, 0x294a, 0x6739
+ gMailPalette_Wave, gMailTiles_Wave, gMailTilemap_Wave, 0x0300, 0x0000, 0x294a, 0x6739
}, {
- gUnknown_08DBE8D8, gUnknown_08DBF2D4, gUnknown_08DC0114, 0x0140, 0x0000, 0x7fff, 0x4631
+ gMailPalette_Bead, gMailTiles_Bead, gMailTilemap_Bead, 0x0140, 0x0000, 0x7fff, 0x4631
}, {
- gUnknown_08DBE8F8, gUnknown_08DBF37C, gUnknown_08DC01F4, 0x0300, 0x0000, 0x7fff, 0x4631
+ gMailPalette_Shadow, gMailTiles_Shadow, gMailTilemap_Shadow, 0x0300, 0x0000, 0x7fff, 0x4631
}, {
- gUnknown_08DBE918, gUnknown_08DBF50C, gUnknown_08DC0300, 0x0220, 0x0000, 0x294a, 0x6739
+ gMailPalette_Tropic, gMailTiles_Tropic, gMailTilemap_Tropic, 0x0220, 0x0000, 0x294a, 0x6739
}, {
- gUnknown_08DBE938, gUnknown_08DBF64C, gUnknown_08DC03F0, 0x0340, 0x0000, 0x294a, 0x6739
+ gMailPalette_Dream, gMailTiles_Dream, gMailTilemap_Dream, 0x0340, 0x0000, 0x294a, 0x6739
}, {
- gUnknown_08DBE958, gUnknown_08DBF7B4, gUnknown_08DC04E8, 0x02a0, 0x0000, 0x294a, 0x6739
+ gMailPalette_Fab, gMailTiles_Fab, gMailTilemap_Fab, 0x02a0, 0x0000, 0x294a, 0x6739
}, {
- gUnknown_08DBE978, gUnknown_08DBF904, gUnknown_08DC0600, 0x0520, 0x0000, 0x294a, 0x6739
+ gMailPalette_Retro, gMailTiles_Retro, gMailTilemap_Retro, 0x0520, 0x0000, 0x294a, 0x6739
}
};
diff --git a/src/main.c b/src/main.c
index 07ce07f1c..18d1abdc2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -122,7 +122,7 @@ void AgbMain()
ClearDma3Requests();
ResetBgs();
SetDefaultFontsPointer();
- InitHeap(gHeap, 0x1C000);
+ InitHeap(gHeap, HEAP_SIZE);
gSoftResetDisabled = FALSE;
diff --git a/src/pokedex.c b/src/pokedex.c
new file mode 100644
index 000000000..a74594865
--- /dev/null
+++ b/src/pokedex.c
@@ -0,0 +1,542 @@
+#include "global.h"
+#include "gba/m4a_internal.h"
+#include "pokedex.h"
+#include "sprite.h"
+#include "graphics.h"
+#include "decompress.h"
+#include "bg.h"
+#include "window.h"
+
+// this file's functions
+void sub_80BE604(struct Sprite *sprite);
+void sub_80BE658(struct Sprite *sprite);
+void sub_80BE758(struct Sprite *sprite);
+void sub_80BE780(struct Sprite *sprite);
+void sub_80BE44C(struct Sprite *sprite);
+void sub_80BE834(struct Sprite *sprite);
+
+// const rom data
+#include "data/pokedex_orders.h"
+
+static const struct OamData sOamData_855CFE4 =
+{
+ .y = 160,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 0,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 0,
+ .tileNum = 0,
+ .priority = 1,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_855CFEC =
+{
+ .y = 160,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 1,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 0,
+ .tileNum = 0,
+ .priority = 0,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_855CFF4 =
+{
+ .y = 160,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 1,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 2,
+ .tileNum = 0,
+ .priority = 0,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_855CFFC =
+{
+ .y = 160,
+ .affineMode = 0,
+ .objMode = 2,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 0,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 2,
+ .tileNum = 0,
+ .priority = 1,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_855D004 =
+{
+ .y = 160,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 1,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 3,
+ .tileNum = 0,
+ .priority = 0,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_855D00C =
+{
+ .y = 160,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 2,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 0,
+ .tileNum = 0,
+ .priority = 0,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const union AnimCmd sSpriteAnim_855D014[] =
+{
+ ANIMCMD_FRAME(3, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D01C[] =
+{
+ ANIMCMD_FRAME(1, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D024[] =
+{
+ ANIMCMD_FRAME(16, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D02C[] =
+{
+ ANIMCMD_FRAME(48, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D034[] =
+{
+ ANIMCMD_FRAME(40, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D03C[] =
+{
+ ANIMCMD_FRAME(32, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D044[] =
+{
+ ANIMCMD_FRAME(56, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D04C[] =
+{
+ ANIMCMD_FRAME(64, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D054[] =
+{
+ ANIMCMD_FRAME(96, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D05C[] =
+{
+ ANIMCMD_FRAME(160, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D064[] =
+{
+ ANIMCMD_FRAME(168, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D06C[] =
+{
+ ANIMCMD_FRAME(128, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D074[] =
+{
+ ANIMCMD_FRAME(130, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D07C[] =
+{
+ ANIMCMD_FRAME(132, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D084[] =
+{
+ ANIMCMD_FRAME(134, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D08C[] =
+{
+ ANIMCMD_FRAME(136, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D094[] =
+{
+ ANIMCMD_FRAME(138, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D09C[] =
+{
+ ANIMCMD_FRAME(140, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0A4[] =
+{
+ ANIMCMD_FRAME(142, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0AC[] =
+{
+ ANIMCMD_FRAME(144, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0B4[] =
+{
+ ANIMCMD_FRAME(146, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0BC[] =
+{
+ ANIMCMD_FRAME(176, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0C4[] =
+{
+ ANIMCMD_FRAME(178, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0CC[] =
+{
+ ANIMCMD_FRAME(180, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0D4[] =
+{
+ ANIMCMD_FRAME(182, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0DC[] =
+{
+ ANIMCMD_FRAME(184, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0E4[] =
+{
+ ANIMCMD_FRAME(186, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0EC[] =
+{
+ ANIMCMD_FRAME(188, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0F4[] =
+{
+ ANIMCMD_FRAME(190, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D0FC[] =
+{
+ ANIMCMD_FRAME(192, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D104[] =
+{
+ ANIMCMD_FRAME(194, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_855D10C[] =
+{
+ ANIMCMD_FRAME(4, 30),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_855D114[] =
+{
+ sSpriteAnim_855D014
+};
+
+static const union AnimCmd *const sSpriteAnimTable_855D118[] =
+{
+ sSpriteAnim_855D01C
+};
+
+static const union AnimCmd *const sSpriteAnimTable_855D11C[] =
+{
+ sSpriteAnim_855D024
+};
+
+static const union AnimCmd *const sSpriteAnimTable_855D120[] =
+{
+ sSpriteAnim_855D02C,
+ sSpriteAnim_855D034,
+ sSpriteAnim_855D03C,
+ sSpriteAnim_855D044
+};
+
+static const union AnimCmd *const sSpriteAnimTable_855D130[] =
+{
+ sSpriteAnim_855D04C,
+ sSpriteAnim_855D054
+};
+
+static const union AnimCmd *const sSpriteAnimTable_855D138[] =
+{
+ sSpriteAnim_855D05C,
+ sSpriteAnim_855D064
+};
+
+static const union AnimCmd *const sSpriteAnimTable_855D140[] =
+{
+ sSpriteAnim_855D06C,
+ sSpriteAnim_855D074,
+ sSpriteAnim_855D07C,
+ sSpriteAnim_855D084,
+ sSpriteAnim_855D08C,
+ sSpriteAnim_855D094,
+ sSpriteAnim_855D09C,
+ sSpriteAnim_855D0A4,
+ sSpriteAnim_855D0AC,
+ sSpriteAnim_855D0B4
+};
+
+static const union AnimCmd *const sSpriteAnimTable_855D168[] =
+{
+ sSpriteAnim_855D0BC,
+ sSpriteAnim_855D0C4,
+ sSpriteAnim_855D0CC,
+ sSpriteAnim_855D0D4,
+ sSpriteAnim_855D0DC,
+ sSpriteAnim_855D0E4,
+ sSpriteAnim_855D0EC,
+ sSpriteAnim_855D0F4,
+ sSpriteAnim_855D0FC,
+ sSpriteAnim_855D104
+};
+
+static const union AnimCmd *const sSpriteAnimTable_855D190[] =
+{
+ sSpriteAnim_855D10C
+};
+
+const struct SpriteTemplate gUnknown_0855D194 =
+{
+ .tileTag = 4096,
+ .paletteTag = 4096,
+ .oam = &sOamData_855CFE4,
+ .anims = sSpriteAnimTable_855D114,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80BE604,
+};
+
+const struct SpriteTemplate gUnknown_0855D1AC =
+{
+ .tileTag = 4096,
+ .paletteTag = 4096,
+ .oam = &sOamData_855CFEC,
+ .anims = sSpriteAnimTable_855D118,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80BE658,
+};
+
+const struct SpriteTemplate gUnknown_0855D1C4 =
+{
+ .tileTag = 4096,
+ .paletteTag = 4096,
+ .oam = &sOamData_855CFF4,
+ .anims = sSpriteAnimTable_855D120,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80BE758,
+};
+
+const struct SpriteTemplate gUnknown_0855D1DC =
+{
+ .tileTag = 4096,
+ .paletteTag = 4096,
+ .oam = &sOamData_855CFFC,
+ .anims = sSpriteAnimTable_855D11C,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80BE780,
+};
+
+const struct SpriteTemplate gUnknown_0855D1F4 =
+{
+ .tileTag = 4096,
+ .paletteTag = 4096,
+ .oam = &sOamData_855D004,
+ .anims = sSpriteAnimTable_855D130,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80BE44C,
+};
+
+const struct SpriteTemplate gUnknown_0855D20C =
+{
+ .tileTag = 4096,
+ .paletteTag = 4096,
+ .oam = &sOamData_855CFF4,
+ .anims = sSpriteAnimTable_855D138,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80BE44C,
+};
+
+const struct SpriteTemplate gUnknown_0855D224 =
+{
+ .tileTag = 4096,
+ .paletteTag = 4096,
+ .oam = &sOamData_855D00C,
+ .anims = sSpriteAnimTable_855D140,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80BE44C,
+};
+
+const struct SpriteTemplate gUnknown_0855D23C =
+{
+ .tileTag = 4096,
+ .paletteTag = 4096,
+ .oam = &sOamData_855D00C,
+ .anims = sSpriteAnimTable_855D168,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80BE44C,
+};
+
+const struct SpriteTemplate gUnknown_0855D254 =
+{
+ .tileTag = 4096,
+ .paletteTag = 4096,
+ .oam = &sOamData_855D00C,
+ .anims = sSpriteAnimTable_855D190,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_80BE834,
+};
+
+const struct CompressedSpriteSheet gSpriteSheets_0855D26C[] =
+{
+ {gPokedexMenu2_Gfx, 0x2000, 4096},
+ {0}
+};
+
+const struct CompressedSpritePalette gSpritePalettes_0855D26C[] =
+{
+ {gPokedexText_Pal, 4096},
+ {0}
+};
+
+const u8 gUnknown_0855D28C[] = {0x4, 0x8, 0x10, 0x20, 0x20};
+const u8 gUnknown_0855D291[] = {0x8, 0x4, 0x2, 0x1, 0x1};
+
+const struct BgTemplate gBgTemplates_0855D298[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 12,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 1,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 13,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 14,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 15,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+const struct WindowTemplate sWindowTemplates_0855D2A8[] =
+{
+ {2, 0, 0, 0x20, 0x20, 0, 1},
+ DUMMY_WIN_TEMPLATE
+};
+
diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c
new file mode 100644
index 000000000..4d1cc51c5
--- /dev/null
+++ b/src/pokemon_icon.c
@@ -0,0 +1,1014 @@
+#include "global.h"
+#include "sprite.h"
+#include "graphics.h"
+
+#define POKE_ICON_BASE_PAL_TAG 56000
+
+const u8 * const gMonIconTable[] =
+{
+ gMonIcon_Bulbasaur,
+ gMonIcon_Bulbasaur,
+ gMonIcon_Ivysaur,
+ gMonIcon_Venusaur,
+ gMonIcon_Charmander,
+ gMonIcon_Charmeleon,
+ gMonIcon_Charizard,
+ gMonIcon_Squirtle,
+ gMonIcon_Wartortle,
+ gMonIcon_Blastoise,
+ gMonIcon_Caterpie,
+ gMonIcon_Metapod,
+ gMonIcon_Butterfree,
+ gMonIcon_Weedle,
+ gMonIcon_Kakuna,
+ gMonIcon_Beedrill,
+ gMonIcon_Pidgey,
+ gMonIcon_Pidgeotto,
+ gMonIcon_Pidgeot,
+ gMonIcon_Rattata,
+ gMonIcon_Raticate,
+ gMonIcon_Spearow,
+ gMonIcon_Fearow,
+ gMonIcon_Ekans,
+ gMonIcon_Arbok,
+ gMonIcon_Pikachu,
+ gMonIcon_Raichu,
+ gMonIcon_Sandshrew,
+ gMonIcon_Sandslash,
+ gMonIcon_NidoranF,
+ gMonIcon_Nidorina,
+ gMonIcon_Nidoqueen,
+ gMonIcon_NidoranM,
+ gMonIcon_Nidorino,
+ gMonIcon_Nidoking,
+ gMonIcon_Clefairy,
+ gMonIcon_Clefable,
+ gMonIcon_Vulpix,
+ gMonIcon_Ninetales,
+ gMonIcon_Jigglypuff,
+ gMonIcon_Wigglytuff,
+ gMonIcon_Zubat,
+ gMonIcon_Golbat,
+ gMonIcon_Oddish,
+ gMonIcon_Gloom,
+ gMonIcon_Vileplume,
+ gMonIcon_Paras,
+ gMonIcon_Parasect,
+ gMonIcon_Venonat,
+ gMonIcon_Venomoth,
+ gMonIcon_Diglett,
+ gMonIcon_Dugtrio,
+ gMonIcon_Meowth,
+ gMonIcon_Persian,
+ gMonIcon_Psyduck,
+ gMonIcon_Golduck,
+ gMonIcon_Mankey,
+ gMonIcon_Primeape,
+ gMonIcon_Growlithe,
+ gMonIcon_Arcanine,
+ gMonIcon_Poliwag,
+ gMonIcon_Poliwhirl,
+ gMonIcon_Poliwrath,
+ gMonIcon_Abra,
+ gMonIcon_Kadabra,
+ gMonIcon_Alakazam,
+ gMonIcon_Machop,
+ gMonIcon_Machoke,
+ gMonIcon_Machamp,
+ gMonIcon_Bellsprout,
+ gMonIcon_Weepinbell,
+ gMonIcon_Victreebel,
+ gMonIcon_Tentacool,
+ gMonIcon_Tentacruel,
+ gMonIcon_Geodude,
+ gMonIcon_Graveler,
+ gMonIcon_Golem,
+ gMonIcon_Ponyta,
+ gMonIcon_Rapidash,
+ gMonIcon_Slowpoke,
+ gMonIcon_Slowbro,
+ gMonIcon_Magnemite,
+ gMonIcon_Magneton,
+ gMonIcon_Farfetchd,
+ gMonIcon_Doduo,
+ gMonIcon_Dodrio,
+ gMonIcon_Seel,
+ gMonIcon_Dewgong,
+ gMonIcon_Grimer,
+ gMonIcon_Muk,
+ gMonIcon_Shellder,
+ gMonIcon_Cloyster,
+ gMonIcon_Gastly,
+ gMonIcon_Haunter,
+ gMonIcon_Gengar,
+ gMonIcon_Onix,
+ gMonIcon_Drowzee,
+ gMonIcon_Hypno,
+ gMonIcon_Krabby,
+ gMonIcon_Kingler,
+ gMonIcon_Voltorb,
+ gMonIcon_Electrode,
+ gMonIcon_Exeggcute,
+ gMonIcon_Exeggutor,
+ gMonIcon_Cubone,
+ gMonIcon_Marowak,
+ gMonIcon_Hitmonlee,
+ gMonIcon_Hitmonchan,
+ gMonIcon_Lickitung,
+ gMonIcon_Koffing,
+ gMonIcon_Weezing,
+ gMonIcon_Rhyhorn,
+ gMonIcon_Rhydon,
+ gMonIcon_Chansey,
+ gMonIcon_Tangela,
+ gMonIcon_Kangaskhan,
+ gMonIcon_Horsea,
+ gMonIcon_Seadra,
+ gMonIcon_Goldeen,
+ gMonIcon_Seaking,
+ gMonIcon_Staryu,
+ gMonIcon_Starmie,
+ gMonIcon_Mrmime,
+ gMonIcon_Scyther,
+ gMonIcon_Jynx,
+ gMonIcon_Electabuzz,
+ gMonIcon_Magmar,
+ gMonIcon_Pinsir,
+ gMonIcon_Tauros,
+ gMonIcon_Magikarp,
+ gMonIcon_Gyarados,
+ gMonIcon_Lapras,
+ gMonIcon_Ditto,
+ gMonIcon_Eevee,
+ gMonIcon_Vaporeon,
+ gMonIcon_Jolteon,
+ gMonIcon_Flareon,
+ gMonIcon_Porygon,
+ gMonIcon_Omanyte,
+ gMonIcon_Omastar,
+ gMonIcon_Kabuto,
+ gMonIcon_Kabutops,
+ gMonIcon_Aerodactyl,
+ gMonIcon_Snorlax,
+ gMonIcon_Articuno,
+ gMonIcon_Zapdos,
+ gMonIcon_Moltres,
+ gMonIcon_Dratini,
+ gMonIcon_Dragonair,
+ gMonIcon_Dragonite,
+ gMonIcon_Mewtwo,
+ gMonIcon_Mew,
+ gMonIcon_Chikorita,
+ gMonIcon_Bayleef,
+ gMonIcon_Meganium,
+ gMonIcon_Cyndaquil,
+ gMonIcon_Quilava,
+ gMonIcon_Typhlosion,
+ gMonIcon_Totodile,
+ gMonIcon_Croconaw,
+ gMonIcon_Feraligatr,
+ gMonIcon_Sentret,
+ gMonIcon_Furret,
+ gMonIcon_Hoothoot,
+ gMonIcon_Noctowl,
+ gMonIcon_Ledyba,
+ gMonIcon_Ledian,
+ gMonIcon_Spinarak,
+ gMonIcon_Ariados,
+ gMonIcon_Crobat,
+ gMonIcon_Chinchou,
+ gMonIcon_Lanturn,
+ gMonIcon_Pichu,
+ gMonIcon_Cleffa,
+ gMonIcon_Igglybuff,
+ gMonIcon_Togepi,
+ gMonIcon_Togetic,
+ gMonIcon_Natu,
+ gMonIcon_Xatu,
+ gMonIcon_Mareep,
+ gMonIcon_Flaaffy,
+ gMonIcon_Ampharos,
+ gMonIcon_Bellossom,
+ gMonIcon_Marill,
+ gMonIcon_Azumarill,
+ gMonIcon_Sudowoodo,
+ gMonIcon_Politoed,
+ gMonIcon_Hoppip,
+ gMonIcon_Skiploom,
+ gMonIcon_Jumpluff,
+ gMonIcon_Aipom,
+ gMonIcon_Sunkern,
+ gMonIcon_Sunflora,
+ gMonIcon_Yanma,
+ gMonIcon_Wooper,
+ gMonIcon_Quagsire,
+ gMonIcon_Espeon,
+ gMonIcon_Umbreon,
+ gMonIcon_Murkrow,
+ gMonIcon_Slowking,
+ gMonIcon_Misdreavus,
+ gMonIcon_UnownA,
+ gMonIcon_Wobbuffet,
+ gMonIcon_Girafarig,
+ gMonIcon_Pineco,
+ gMonIcon_Forretress,
+ gMonIcon_Dunsparce,
+ gMonIcon_Gligar,
+ gMonIcon_Steelix,
+ gMonIcon_Snubbull,
+ gMonIcon_Granbull,
+ gMonIcon_Qwilfish,
+ gMonIcon_Scizor,
+ gMonIcon_Shuckle,
+ gMonIcon_Heracross,
+ gMonIcon_Sneasel,
+ gMonIcon_Teddiursa,
+ gMonIcon_Ursaring,
+ gMonIcon_Slugma,
+ gMonIcon_Magcargo,
+ gMonIcon_Swinub,
+ gMonIcon_Piloswine,
+ gMonIcon_Corsola,
+ gMonIcon_Remoraid,
+ gMonIcon_Octillery,
+ gMonIcon_Delibird,
+ gMonIcon_Mantine,
+ gMonIcon_Skarmory,
+ gMonIcon_Houndour,
+ gMonIcon_Houndoom,
+ gMonIcon_Kingdra,
+ gMonIcon_Phanpy,
+ gMonIcon_Donphan,
+ gMonIcon_Porygon2,
+ gMonIcon_Stantler,
+ gMonIcon_Smeargle,
+ gMonIcon_Tyrogue,
+ gMonIcon_Hitmontop,
+ gMonIcon_Smoochum,
+ gMonIcon_Elekid,
+ gMonIcon_Magby,
+ gMonIcon_Miltank,
+ gMonIcon_Blissey,
+ gMonIcon_Raikou,
+ gMonIcon_Entei,
+ gMonIcon_Suicune,
+ gMonIcon_Larvitar,
+ gMonIcon_Pupitar,
+ gMonIcon_Tyranitar,
+ gMonIcon_Lugia,
+ gMonIcon_HoOh,
+ gMonIcon_Celebi,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_QuestionMark,
+ gMonIcon_Treecko,
+ gMonIcon_Grovyle,
+ gMonIcon_Sceptile,
+ gMonIcon_Torchic,
+ gMonIcon_Combusken,
+ gMonIcon_Blaziken,
+ gMonIcon_Mudkip,
+ gMonIcon_Marshtomp,
+ gMonIcon_Swampert,
+ gMonIcon_Poochyena,
+ gMonIcon_Mightyena,
+ gMonIcon_Zigzagoon,
+ gMonIcon_Linoone,
+ gMonIcon_Wurmple,
+ gMonIcon_Silcoon,
+ gMonIcon_Beautifly,
+ gMonIcon_Cascoon,
+ gMonIcon_Dustox,
+ gMonIcon_Lotad,
+ gMonIcon_Lombre,
+ gMonIcon_Ludicolo,
+ gMonIcon_Seedot,
+ gMonIcon_Nuzleaf,
+ gMonIcon_Shiftry,
+ gMonIcon_Nincada,
+ gMonIcon_Ninjask,
+ gMonIcon_Shedinja,
+ gMonIcon_Taillow,
+ gMonIcon_Swellow,
+ gMonIcon_Shroomish,
+ gMonIcon_Breloom,
+ gMonIcon_Spinda,
+ gMonIcon_Wingull,
+ gMonIcon_Pelipper,
+ gMonIcon_Surskit,
+ gMonIcon_Masquerain,
+ gMonIcon_Wailmer,
+ gMonIcon_Wailord,
+ gMonIcon_Skitty,
+ gMonIcon_Delcatty,
+ gMonIcon_Kecleon,
+ gMonIcon_Baltoy,
+ gMonIcon_Claydol,
+ gMonIcon_Nosepass,
+ gMonIcon_Torkoal,
+ gMonIcon_Sableye,
+ gMonIcon_Barboach,
+ gMonIcon_Whiscash,
+ gMonIcon_Luvdisc,
+ gMonIcon_Corphish,
+ gMonIcon_Crawdaunt,
+ gMonIcon_Feebas,
+ gMonIcon_Milotic,
+ gMonIcon_Carvanha,
+ gMonIcon_Sharpedo,
+ gMonIcon_Trapinch,
+ gMonIcon_Vibrava,
+ gMonIcon_Flygon,
+ gMonIcon_Makuhita,
+ gMonIcon_Hariyama,
+ gMonIcon_Electrike,
+ gMonIcon_Manectric,
+ gMonIcon_Numel,
+ gMonIcon_Camerupt,
+ gMonIcon_Spheal,
+ gMonIcon_Sealeo,
+ gMonIcon_Walrein,
+ gMonIcon_Cacnea,
+ gMonIcon_Cacturne,
+ gMonIcon_Snorunt,
+ gMonIcon_Glalie,
+ gMonIcon_Lunatone,
+ gMonIcon_Solrock,
+ gMonIcon_Azurill,
+ gMonIcon_Spoink,
+ gMonIcon_Grumpig,
+ gMonIcon_Plusle,
+ gMonIcon_Minun,
+ gMonIcon_Mawile,
+ gMonIcon_Meditite,
+ gMonIcon_Medicham,
+ gMonIcon_Swablu,
+ gMonIcon_Altaria,
+ gMonIcon_Wynaut,
+ gMonIcon_Duskull,
+ gMonIcon_Dusclops,
+ gMonIcon_Roselia,
+ gMonIcon_Slakoth,
+ gMonIcon_Vigoroth,
+ gMonIcon_Slaking,
+ gMonIcon_Gulpin,
+ gMonIcon_Swalot,
+ gMonIcon_Tropius,
+ gMonIcon_Whismur,
+ gMonIcon_Loudred,
+ gMonIcon_Exploud,
+ gMonIcon_Clamperl,
+ gMonIcon_Huntail,
+ gMonIcon_Gorebyss,
+ gMonIcon_Absol,
+ gMonIcon_Shuppet,
+ gMonIcon_Banette,
+ gMonIcon_Seviper,
+ gMonIcon_Zangoose,
+ gMonIcon_Relicanth,
+ gMonIcon_Aron,
+ gMonIcon_Lairon,
+ gMonIcon_Aggron,
+ gMonIcon_Castform,
+ gMonIcon_Volbeat,
+ gMonIcon_Illumise,
+ gMonIcon_Lileep,
+ gMonIcon_Cradily,
+ gMonIcon_Anorith,
+ gMonIcon_Armaldo,
+ gMonIcon_Ralts,
+ gMonIcon_Kirlia,
+ gMonIcon_Gardevoir,
+ gMonIcon_Bagon,
+ gMonIcon_Shelgon,
+ gMonIcon_Salamence,
+ gMonIcon_Beldum,
+ gMonIcon_Metang,
+ gMonIcon_Metagross,
+ gMonIcon_Regirock,
+ gMonIcon_Regice,
+ gMonIcon_Registeel,
+ gMonIcon_Kyogre,
+ gMonIcon_Groudon,
+ gMonIcon_Rayquaza,
+ gMonIcon_Latias,
+ gMonIcon_Latios,
+ gMonIcon_Jirachi,
+ gMonIcon_Deoxys,
+ gMonIcon_Chimecho,
+ gMonIcon_Egg,
+ gMonIcon_UnownB,
+ gMonIcon_UnownC,
+ gMonIcon_UnownD,
+ gMonIcon_UnownE,
+ gMonIcon_UnownF,
+ gMonIcon_UnownG,
+ gMonIcon_UnownH,
+ gMonIcon_UnownI,
+ gMonIcon_UnownJ,
+ gMonIcon_UnownK,
+ gMonIcon_UnownL,
+ gMonIcon_UnownM,
+ gMonIcon_UnownN,
+ gMonIcon_UnownO,
+ gMonIcon_UnownP,
+ gMonIcon_UnownQ,
+ gMonIcon_UnownR,
+ gMonIcon_UnownS,
+ gMonIcon_UnownT,
+ gMonIcon_UnownU,
+ gMonIcon_UnownV,
+ gMonIcon_UnownW,
+ gMonIcon_UnownX,
+ gMonIcon_UnownY,
+ gMonIcon_UnownZ,
+ gMonIcon_UnownExclamationMark,
+ gMonIcon_UnownQuestionMark,
+};
+
+const u8 gMonIconPaletteIndices[] =
+{
+ 0, // ??????????
+ 1, // Bulbasaur
+ 1, // Ivysaur
+ 1, // Venusaur
+ 0, // Charmander
+ 0, // Charmeleon
+ 0, // Charizard
+ 0, // Squirtle
+ 2, // Wartortle
+ 2, // Blastoise
+ 1, // Caterpie
+ 1, // Metapod
+ 0, // Butterfree
+ 1, // Weedle
+ 2, // Kakuna
+ 2, // Beedrill
+ 0, // Pidgey
+ 0, // Pidgeotto
+ 0, // Pidgeot
+ 2, // Rattata
+ 1, // Raticate
+ 0, // Spearow
+ 0, // Fearow
+ 2, // Ekans
+ 2, // Arbok
+ 2, // Pikachu
+ 0, // Raichu
+ 2, // Sandshrew
+ 2, // Sandslash
+ 2, // Nidoran♀
+ 2, // Nidorina
+ 2, // Nidoqueen
+ 2, // Nidoran♂
+ 2, // Nidorino
+ 2, // Nidoking
+ 0, // Clefairy
+ 0, // Clefable
+ 2, // Vulpix
+ 1, // Ninetales
+ 0, // Jigglypuff
+ 0, // Wigglytuff
+ 2, // Zubat
+ 2, // Golbat
+ 1, // Oddish
+ 0, // Gloom
+ 0, // Vileplume
+ 0, // Paras
+ 0, // Parasect
+ 0, // Venonat
+ 2, // Venomoth
+ 2, // Diglett
+ 2, // Dugtrio
+ 1, // Meowth
+ 1, // Persian
+ 1, // Psyduck
+ 2, // Golduck
+ 1, // Mankey
+ 2, // Primeape
+ 0, // Growlithe
+ 0, // Arcanine
+ 0, // Poliwag
+ 0, // Poliwhirl
+ 0, // Poliwrath
+ 2, // Abra
+ 2, // Kadabra
+ 2, // Alakazam
+ 0, // Machop
+ 2, // Machoke
+ 0, // Machamp
+ 1, // Bellsprout
+ 1, // Weepinbell
+ 1, // Victreebel
+ 2, // Tentacool
+ 2, // Tentacruel
+ 1, // Geodude
+ 1, // Graveler
+ 1, // Golem
+ 0, // Ponyta
+ 0, // Rapidash
+ 0, // Slowpoke
+ 0, // Slowbro
+ 0, // Magnemite
+ 0, // Magneton
+ 1, // Farfetch'd
+ 2, // Doduo
+ 2, // Dodrio
+ 2, // Seel
+ 2, // Dewgong
+ 2, // Grimer
+ 2, // Muk
+ 2, // Shellder
+ 2, // Cloyster
+ 2, // Gastly
+ 2, // Haunter
+ 2, // Gengar
+ 2, // Onix
+ 2, // Drowzee
+ 1, // Hypno
+ 2, // Krabby
+ 2, // Kingler
+ 0, // Voltorb
+ 0, // Electrode
+ 0, // Exeggcute
+ 1, // Exeggutor
+ 1, // Cubone
+ 1, // Marowak
+ 2, // Hitmonlee
+ 2, // Hitmonchan
+ 1, // Lickitung
+ 2, // Koffing
+ 2, // Weezing
+ 1, // Rhyhorn
+ 1, // Rhydon
+ 0, // Chansey
+ 0, // Tangela
+ 1, // Kangaskhan
+ 0, // Horsea
+ 0, // Seadra
+ 0, // Goldeen
+ 0, // Seaking
+ 2, // Staryu
+ 2, // Starmie
+ 0, // Mr. mime
+ 1, // Scyther
+ 2, // Jynx
+ 1, // Electabuzz
+ 0, // Magmar
+ 2, // Pinsir
+ 2, // Tauros
+ 0, // Magikarp
+ 0, // Gyarados
+ 2, // Lapras
+ 2, // Ditto
+ 2, // Eevee
+ 0, // Vaporeon
+ 0, // Jolteon
+ 0, // Flareon
+ 0, // Porygon
+ 0, // Omanyte
+ 0, // Omastar
+ 2, // Kabuto
+ 2, // Kabutops
+ 0, // Aerodactyl
+ 1, // Snorlax
+ 0, // Articuno
+ 0, // Zapdos
+ 0, // Moltres
+ 0, // Dratini
+ 0, // Dragonair
+ 2, // Dragonite
+ 2, // Mewtwo
+ 0, // Mew
+ 1, // Chikorita
+ 1, // Bayleef
+ 1, // Meganium
+ 1, // Cyndaquil
+ 1, // Quilava
+ 1, // Typhlosion
+ 2, // Totodile
+ 2, // Croconaw
+ 2, // Feraligatr
+ 2, // Sentret
+ 2, // Furret
+ 2, // Hoothoot
+ 2, // Noctowl
+ 0, // Ledyba
+ 0, // Ledian
+ 1, // Spinarak
+ 0, // Ariados
+ 2, // Crobat
+ 2, // Chinchou
+ 0, // Lanturn
+ 0, // Pichu
+ 0, // Cleffa
+ 1, // Igglybuff
+ 2, // Togepi
+ 2, // Togetic
+ 0, // Natu
+ 0, // Xatu
+ 2, // Mareep
+ 0, // Flaaffy
+ 0, // Ampharos
+ 1, // Bellossom
+ 2, // Marill
+ 2, // Azumarill
+ 1, // Sudowoodo
+ 1, // Politoed
+ 1, // Hoppip
+ 1, // Skiploom
+ 2, // Jumpluff
+ 2, // Aipom
+ 1, // Sunkern
+ 1, // Sunflora
+ 1, // Yanma
+ 0, // Wooper
+ 0, // Quagsire
+ 2, // Espeon
+ 2, // Umbreon
+ 2, // Murkrow
+ 0, // Slowking
+ 0, // Misdreavus
+ 0, // Unown A
+ 0, // Wobbuffet
+ 1, // Girafarig
+ 0, // Pineco
+ 2, // Forretress
+ 2, // Dunsparce
+ 2, // Gligar
+ 0, // Steelix
+ 0, // Snubbull
+ 2, // Granbull
+ 0, // Qwilfish
+ 0, // Scizor
+ 1, // Shuckle
+ 2, // Heracross
+ 0, // Sneasel
+ 0, // Teddiursa
+ 2, // Ursaring
+ 0, // Slugma
+ 0, // Magcargo
+ 2, // Swinub
+ 2, // Piloswine
+ 0, // Corsola
+ 0, // Remoraid
+ 0, // Octillery
+ 0, // Delibird
+ 2, // Mantine
+ 0, // Skarmory
+ 0, // Houndour
+ 0, // Houndoom
+ 0, // Kingdra
+ 0, // Phanpy
+ 0, // Donphan
+ 0, // Porygon2
+ 2, // Stantler
+ 1, // Smeargle
+ 2, // Tyrogue
+ 2, // Hitmontop
+ 1, // Smoochum
+ 1, // Elekid
+ 1, // Magby
+ 1, // Miltank
+ 1, // Blissey
+ 0, // Raikou
+ 2, // Entei
+ 0, // Suicune
+ 1, // Larvitar
+ 0, // Pupitar
+ 1, // Tyranitar
+ 0, // Lugia
+ 1, // Ho-Oh
+ 1, // Celebi
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 0, // ?
+ 1, // Treecko
+ 0, // Grovyle
+ 1, // Sceptile
+ 0, // Torchic
+ 0, // Combusken
+ 0, // Blaziken
+ 0, // Mudkip
+ 0, // Marshtomp
+ 0, // Swampert
+ 2, // Poochyena
+ 2, // Mightyena
+ 2, // Zigzagoon
+ 2, // Linoone
+ 0, // Wurmple
+ 2, // Silcoon
+ 0, // Beautifly
+ 2, // Cascoon
+ 1, // Dustox
+ 1, // Lotad
+ 1, // Lombre
+ 1, // Ludicolo
+ 1, // Seedot
+ 1, // Nuzleaf
+ 0, // Shiftry
+ 1, // Nincada
+ 1, // Ninjask
+ 1, // Shedinja
+ 2, // Taillow
+ 2, // Swellow
+ 1, // Shroomish
+ 1, // Breloom
+ 1, // Spinda
+ 0, // Wingull
+ 0, // Pelipper
+ 2, // Surskit
+ 0, // Masquerain
+ 2, // Wailmer
+ 0, // Wailord
+ 0, // Skitty
+ 2, // Delcatty
+ 1, // Kecleon
+ 1, // Baltoy
+ 0, // Claydol
+ 0, // Nosepass
+ 1, // Torkoal
+ 2, // Sableye
+ 0, // Barboach
+ 0, // Whiscash
+ 0, // Luvdisc
+ 0, // Corphish
+ 0, // Crawdaunt
+ 2, // Feebas
+ 0, // Milotic
+ 0, // Carvanha
+ 0, // Sharpedo
+ 1, // Trapinch
+ 1, // Vibrava
+ 1, // Flygon
+ 2, // Makuhita
+ 1, // Hariyama
+ 1, // Electrike
+ 0, // Manectric
+ 1, // Numel
+ 0, // Camerupt
+ 2, // Spheal
+ 2, // Sealeo
+ 0, // Walrein
+ 1, // Cacnea
+ 1, // Cacturne
+ 2, // Snorunt
+ 0, // Glalie
+ 1, // Lunatone
+ 0, // Solrock
+ 2, // Azurill
+ 0, // Spoink
+ 2, // Grumpig
+ 0, // Plusle
+ 0, // Minun
+ 2, // Mawile
+ 0, // Meditite
+ 0, // Medicham
+ 0, // Swablu
+ 0, // Altaria
+ 0, // Wynaut
+ 0, // Duskull
+ 0, // Dusclops
+ 0, // Roselia
+ 2, // Slakoth
+ 2, // Vigoroth
+ 1, // Slaking
+ 1, // Gulpin
+ 2, // Swalot
+ 1, // Tropius
+ 0, // Whismur
+ 2, // Loudred
+ 2, // Exploud
+ 0, // Clamperl
+ 0, // Huntail
+ 0, // Gorebyss
+ 0, // Absol
+ 0, // Shuppet
+ 0, // Banette
+ 2, // Seviper
+ 0, // Zangoose
+ 1, // Relicanth
+ 2, // Aron
+ 2, // Lairon
+ 2, // Aggron
+ 0, // Castform
+ 0, // Volbeat
+ 2, // Illumise
+ 2, // Lileep
+ 0, // Cradily
+ 0, // Anorith
+ 0, // Armaldo
+ 1, // Ralts
+ 1, // Kirlia
+ 1, // Gardevoir
+ 2, // Bagon
+ 2, // Shelgon
+ 0, // Salamence
+ 0, // Beldum
+ 0, // Metang
+ 0, // Metagross
+ 2, // Regirock
+ 2, // Regice
+ 2, // Registeel
+ 2, // Kyogre
+ 0, // Groudon
+ 1, // Rayquaza
+ 0, // Latias
+ 2, // Latios
+ 0, // Jirachi
+ 0, // Deoxys
+ 0, // Chimecho
+ 1, // Egg
+ 0, // Unown B
+ 0, // Unown C
+ 0, // Unown D
+ 0, // Unown E
+ 0, // Unown F
+ 0, // Unown G
+ 0, // Unown H
+ 0, // Unown I
+ 0, // Unown J
+ 0, // Unown K
+ 0, // Unown L
+ 0, // Unown M
+ 0, // Unown N
+ 0, // Unown O
+ 0, // Unown P
+ 0, // Unown Q
+ 0, // Unown R
+ 0, // Unown S
+ 0, // Unown T
+ 0, // Unown U
+ 0, // Unown V
+ 0, // Unown W
+ 0, // Unown X
+ 0, // Unown Y
+ 0, // Unown Z
+ 0, // Unown Exclamation Mark
+ 0, // Unown Question Mark
+};
+
+const struct SpritePalette gMonIconPaletteTable[] =
+{
+ { gMonIconPalettes[0], POKE_ICON_BASE_PAL_TAG + 0 },
+ { gMonIconPalettes[1], POKE_ICON_BASE_PAL_TAG + 1 },
+ { gMonIconPalettes[2], POKE_ICON_BASE_PAL_TAG + 2 },
+
+// There are only 3 actual palettes. The following are unused
+// and don't point to valid data.
+ { gMonIconPalettes[3], POKE_ICON_BASE_PAL_TAG + 3 },
+ { gMonIconPalettes[4], POKE_ICON_BASE_PAL_TAG + 4 },
+ { gMonIconPalettes[5], POKE_ICON_BASE_PAL_TAG + 5 },
+};
+
+const struct OamData sMonIconOamData =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 0,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 2,
+ .tileNum = 0,
+ .priority = 1,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+// fastest to slowest
+
+static const union AnimCmd sAnim_0[] =
+{
+ ANIMCMD_FRAME(0, 6),
+ ANIMCMD_FRAME(1, 6),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sAnim_1[] =
+{
+ ANIMCMD_FRAME(0, 8),
+ ANIMCMD_FRAME(1, 8),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sAnim_2[] =
+{
+ ANIMCMD_FRAME(0, 14),
+ ANIMCMD_FRAME(1, 14),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sAnim_3[] =
+{
+ ANIMCMD_FRAME(0, 22),
+ ANIMCMD_FRAME(1, 22),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sAnim_4[] =
+{
+ ANIMCMD_FRAME(0, 29),
+ ANIMCMD_FRAME(0, 29), // frame 0 is repeated
+ ANIMCMD_JUMP(0),
+};
+
+const union AnimCmd *const sMonIconAnims[] =
+{
+ sAnim_0,
+ sAnim_1,
+ sAnim_2,
+ sAnim_3,
+ sAnim_4,
+};
+
+static const union AffineAnimCmd sAffineAnim_0[] =
+{
+ AFFINEANIMCMD_FRAME(0, 0, 0, 10),
+ AFFINEANIMCMD_END,
+};
+
+static const union AffineAnimCmd sAffineAnim_1[] =
+{
+ AFFINEANIMCMD_FRAME(-2, -2, 0, 122),
+ AFFINEANIMCMD_END,
+};
+
+const union AffineAnimCmd *const sMonIconAffineAnims[] =
+{
+ sAffineAnim_0,
+ sAffineAnim_1,
+};
+
+const u16 sSpriteImageSizes[3][4] =
+{
+ // square
+ {
+ 0x20, // 1×1
+ 0x80, // 2×2
+ 0x200, // 4×4
+ 0x800, // 8×8
+ },
+
+ // horizontal rectangle
+ {
+ 0x40, // 2×1
+ 0x80, // 4×1
+ 0x100, // 4×2
+ 0x400, // 8×4
+ },
+
+ // vertical rectangle
+ {
+ 0x40, // 1×2
+ 0x80, // 1×4
+ 0x100, // 2×4
+ 0x400, // 4×8
+ },
+};
diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c
index bdf4427c7..bb196dd27 100644
--- a/src/pokemon_storage_system.c
+++ b/src/pokemon_storage_system.c
@@ -5,9 +5,76 @@
#include "event_data.h"
#include "string_util.h"
#include "text.h"
+#include "strings.h"
+#include "window.h"
IWRAM_DATA u8 gUnknown_03000F78[0x188];
+struct OptionAndDescription
+{
+ const u8 *optionTxt;
+ const u8 *descriptionTxt;
+};
+
+// const rom data
+const struct OptionAndDescription gUnknown_085716C0[] =
+{
+ {gText_WithdrawPokemon, gText_WithdrawMonDescription},
+ {gText_DepositPokemon, gText_DepositMonDescription},
+ {gText_MovePokemon, gText_MoveMonDescription},
+ {gText_MoveItems, gText_MoveItemsDescription},
+ {gText_SeeYa, gText_SeeYaDescription}
+};
+
+const struct WindowTemplate gUnknown_085716E8 = {0, 1, 1, 0x11, 0xA, 0xF, 1};
+
+static const union AnimCmd sSpriteAnim_85716F0[] =
+{
+ ANIMCMD_FRAME(0, 5),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_85716F8[] =
+{
+ ANIMCMD_FRAME(4, 5),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_8571700[] =
+{
+ ANIMCMD_FRAME(6, 5),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_8571708[] =
+{
+ ANIMCMD_FRAME(10, 5),
+ ANIMCMD_END
+};
+
+const union AnimCmd *const sSpriteAnimTable_8571710[] =
+{
+ sSpriteAnim_85716F0,
+ sSpriteAnim_85716F8,
+ sSpriteAnim_8571700,
+ sSpriteAnim_8571708
+};
+
+static const union AffineAnimCmd sSpriteAffineAnim_8571720[] =
+{
+ AFFINEANIMCMD_FRAME(0xE0, 0xE0, 0, 0),
+ AFFINEANIMCMD_END
+};
+
+static const union AffineAnimCmd *const sSpriteAffineAnimTable_8571730[] =
+{
+ sSpriteAffineAnim_8571720
+};
+
+const struct TextColor gUnknown_08571734[] = {4, 0xF, 0xE};
+const u8 gUnknown_08571737[] = _("/30");
+
+// code
u8 CountMonsInBox(u8 boxId)
{
u16 i, count;
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index ba0c4dde7..d659b2a02 100755
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -50,7 +50,7 @@ extern struct UnkStruct_61CC04 gUnknown_0861CC04;
extern struct UnkStruct_61CC04 gUnknown_0861CC10;
extern struct UnkStruct_61CC04 gUnknown_0861CBEC;
extern struct UnkStruct_61CC04 gUnknown_0861CBF8;
-extern u16 gUnknown_08DC3CD4[];
+extern u16 gSummaryScreenWindow_Tilemap[];
extern struct ContestMove gContestMoves[];
extern struct ContestEffect gContestEffects[];
extern struct WindowTemplate gUnknown_0861CC24;
@@ -93,7 +93,7 @@ extern struct CompressedSpriteSheet gUnknown_0861D074;
extern struct CompressedSpriteSheet gUnknown_0861D0F8;
extern struct CompressedSpritePalette gUnknown_0861D100;
extern struct CompressedSpritePalette gUnknown_0861D07C;
-extern u8 gUnknown_08D97B84;
+extern u8 gMoveTypes_Pal;
extern u8 gUnknown_08D97D0C;
extern void reset_temp_tile_data_buffers();
extern void decompress_and_copy_tile_data_to_vram(u8 a, void* tiledata, u8 b, u8 c, u8 d);
@@ -648,7 +648,7 @@ u8 sub_81BFEB0()
gUnknown_0203CF1C->unk40F0++;
break;
case 12:
- LoadCompressedPalette(&gUnknown_08D97B84, 0x1D0, 0x60);
+ LoadCompressedPalette(&gMoveTypes_Pal, 0x1D0, 0x60);
gUnknown_0203CF1C->unk40F0 = 0;
return 1;
}
@@ -2343,18 +2343,18 @@ void sub_81C2194(u16 *a, u16 b, u8 c)
{
for (i = 0; i < 20; i++)
{
- a[(i + var) << 1] = gUnknown_08DC3CD4[i] + b;
- a[((i + var) << 1) + 0x40] = gUnknown_08DC3CD4[i] + b;
- a[((i + var) << 1) + 0x80] = gUnknown_08DC3CD4[i + 20] + b;
+ a[(i + var) << 1] = gSummaryScreenWindow_Tilemap[i] + b;
+ a[((i + var) << 1) + 0x40] = gSummaryScreenWindow_Tilemap[i] + b;
+ a[((i + var) << 1) + 0x80] = gSummaryScreenWindow_Tilemap[i + 20] + b;
}
}
else
{
for (i = 0; i < 20; i++)
{
- a[(i + var)] = gUnknown_08DC3CD4[i + 20] + b;
- a[((i + var)) + 0x40] = gUnknown_08DC3CD4[i + 40] + b;
- a[((i + var)) + 0x80] = gUnknown_08DC3CD4[i + 40] + b;
+ a[(i + var)] = gSummaryScreenWindow_Tilemap[i + 20] + b;
+ a[((i + var)) + 0x40] = gSummaryScreenWindow_Tilemap[i + 40] + b;
+ a[((i + var)) + 0x80] = gSummaryScreenWindow_Tilemap[i + 40] + b;
}
}
}
@@ -2372,7 +2372,7 @@ void sub_81C2194(u16 *a, u16 b, u8 c)
cmp r2, 0\n\
bne _081C21E4\n\
movs r3, 0\n\
- ldr r5, =gUnknown_08DC3CD4\n\
+ ldr r5, =gSummaryScreenWindow_Tilemap\n\
_081C21A8:\n\
adds r2, r7, r3\n\
lsls r2, 1\n\
@@ -2402,7 +2402,7 @@ _081C21A8:\n\
.pool\n\
_081C21E4:\n\
movs r3, 0\n\
- ldr r5, =gUnknown_08DC3CD4\n\
+ ldr r5, =gSummaryScreenWindow_Tilemap\n\
_081C21E8:\n\
adds r1, r7, r3\n\
lsls r1, 1\n\
diff --git a/src/rayquaza_scene.c b/src/rayquaza_scene.c
new file mode 100644
index 000000000..ce8747395
--- /dev/null
+++ b/src/rayquaza_scene.c
@@ -0,0 +1,1164 @@
+#include "global.h"
+#include "sprite.h"
+#include "task.h"
+#include "graphics.h"
+#include "bg.h"
+
+struct UnkRayquazaStruct
+{
+ u32 field_0;
+ u32 field_4;
+ u32 field_8;
+};
+
+// this file's functions
+void sub_81D7134(u8 taskId);
+void sub_81D7F4C(u8 taskId);
+void sub_81D84EC(u8 taskId);
+void sub_81D8980(u8 taskId);
+void sub_81D8DB4(u8 taskId);
+void sub_81D6800(u8 taskId);
+
+void sub_81D8260(struct Sprite *sprite);
+void sub_81D961C(struct Sprite *sprite);
+
+// const rom data
+const TaskFunc gUnknown_0862A6A0[] =
+{
+ sub_81D7134,
+ sub_81D7134,
+ sub_81D7F4C,
+ sub_81D84EC,
+ sub_81D8980,
+ sub_81D8DB4,
+ sub_81D6800
+};
+
+static const struct OamData sOamData_862A6BC =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 0,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 3,
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_862A6C4 =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 0,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 2,
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_862A6CC =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 1,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 3,
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_862A6D4 =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 1,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 2,
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_862A6DC =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 1,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 0,
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_862A6E4 =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 2,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 2,
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_862A6EC =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 0,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 1,
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const struct OamData sOamData_862A6F4 =
+{
+ .y = 0,
+ .affineMode = 0,
+ .objMode = 0,
+ .mosaic = 0,
+ .bpp = 0,
+ .shape = 1,
+ .x = 0,
+ .matrixNum = 0,
+ .size = 1,
+ .tileNum = 0,
+ .priority = 2,
+ .paletteNum = 0,
+ .affineParam = 0
+};
+
+static const union AnimCmd sSpriteAnim_862A6FC[] =
+{
+ ANIMCMD_FRAME(0, 30),
+ ANIMCMD_FRAME(64, 30),
+ ANIMCMD_FRAME(128, 30),
+ ANIMCMD_FRAME(64, 30),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sSpriteAnim_862A710[] =
+{
+ ANIMCMD_FRAME(192, 30),
+ ANIMCMD_FRAME(256, 30),
+ ANIMCMD_FRAME(320, 30),
+ ANIMCMD_FRAME(256, 30),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862A724[] =
+{
+ sSpriteAnim_862A6FC,
+ sSpriteAnim_862A710
+};
+
+const struct SpriteTemplate gUnknown_0862A72C =
+{
+ .tileTag = 30505,
+ .paletteTag = 30505,
+ .oam = &sOamData_862A6BC,
+ .anims = sSpriteAnimTable_862A724,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+static const union AnimCmd sSpriteAnim_862A744[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862A74C[] =
+{
+ sSpriteAnim_862A744
+};
+
+const struct SpriteTemplate gUnknown_0862A750 =
+{
+ .tileTag = 30506,
+ .paletteTag = 30505,
+ .oam = &sOamData_862A6C4,
+ .anims = sSpriteAnimTable_862A74C,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+static const union AnimCmd sSpriteAnim_862A768[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862A770[] =
+{
+ sSpriteAnim_862A768
+};
+
+const struct SpriteTemplate gUnknown_0862A774 =
+{
+ .tileTag = 30507,
+ .paletteTag = 30505,
+ .oam = &sOamData_862A6CC,
+ .anims = sSpriteAnimTable_862A770,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+static const union AnimCmd sSpriteAnim_862A78C[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A794[] =
+{
+ ANIMCMD_FRAME(8, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A79C[] =
+{
+ ANIMCMD_FRAME(16, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A7A4[] =
+{
+ ANIMCMD_FRAME(24, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A7AC[] =
+{
+ ANIMCMD_FRAME(32, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A7B4[] =
+{
+ ANIMCMD_FRAME(40, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A7BC[] =
+{
+ ANIMCMD_FRAME(48, 36),
+ ANIMCMD_FRAME(64, 36),
+ ANIMCMD_FRAME(80, 36),
+ ANIMCMD_FRAME(64, 36),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sSpriteAnim_862A7D0[] =
+{
+ ANIMCMD_FRAME(56, 36),
+ ANIMCMD_FRAME(72, 36),
+ ANIMCMD_FRAME(88, 36),
+ ANIMCMD_FRAME(72, 36),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sSpriteAnim_862A7E4[] =
+{
+ ANIMCMD_FRAME(96, 36),
+ ANIMCMD_FRAME(104, 36),
+ ANIMCMD_FRAME(112, 36),
+ ANIMCMD_FRAME(104, 36),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862A7F8[] =
+{
+ sSpriteAnim_862A78C,
+ sSpriteAnim_862A794,
+ sSpriteAnim_862A79C,
+ sSpriteAnim_862A7A4,
+ sSpriteAnim_862A7AC,
+ sSpriteAnim_862A7B4,
+ sSpriteAnim_862A7BC,
+ sSpriteAnim_862A7D0,
+ sSpriteAnim_862A7E4
+};
+
+const struct SpriteTemplate gUnknown_0862A81C =
+{
+ .tileTag = 30508,
+ .paletteTag = 30508,
+ .oam = &sOamData_862A6D4,
+ .anims = sSpriteAnimTable_862A7F8,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+static const union AnimCmd sSpriteAnim_862A834[] =
+{
+ ANIMCMD_FRAME(0, 36),
+ ANIMCMD_FRAME(2, 36),
+ ANIMCMD_FRAME(4, 36),
+ ANIMCMD_FRAME(2, 36),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862A848[] =
+{
+ sSpriteAnim_862A834
+};
+
+const struct SpriteTemplate gUnknown_0862A84C =
+{
+ .tileTag = 30509,
+ .paletteTag = 30508,
+ .oam = &sOamData_862A6DC,
+ .anims = sSpriteAnimTable_862A848,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct SpriteTemplate gUnknown_0862A864 =
+{
+ .tileTag = 30510,
+ .paletteTag = 30508,
+ .oam = &sOamData_862A6C4,
+ .anims = sSpriteAnimTable_862A74C,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct UnkRayquazaStruct gUnknown_0862A87C = {0x4000014, 0xA2600001, 1};
+
+const struct BgTemplate gUnknown_0862A888[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 31,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 1,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 30,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 29,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+};
+
+static const union AnimCmd sSpriteAnim_862A894[] =
+{
+ ANIMCMD_FRAME(0, 20),
+ ANIMCMD_FRAME(64, 20),
+ ANIMCMD_FRAME(128, 20),
+ ANIMCMD_FRAME(64, 20),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sSpriteAnim_862A8A8[] =
+{
+ ANIMCMD_FRAME(192, 20),
+ ANIMCMD_FRAME(256, 20),
+ ANIMCMD_FRAME(320, 20),
+ ANIMCMD_FRAME(256, 20),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862A8BC[] =
+{
+ sSpriteAnim_862A894,
+ sSpriteAnim_862A8A8
+};
+
+const struct CompressedSpriteSheet gUnknown_0862A8C4 =
+{
+ gRaySceneGroudon_Gfx, 0x3000, 30505
+};
+
+const struct CompressedSpritePalette gUnknown_0862A8CC =
+{
+ gRaySceneGroudon_Pal, 30505
+};
+
+const struct SpriteTemplate gUnknown_0862A8D4 =
+{
+ .tileTag = 30505,
+ .paletteTag = 30505,
+ .oam = &sOamData_862A6BC,
+ .anims = sSpriteAnimTable_862A8BC,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+static const union AnimCmd sSpriteAnim_862A8EC[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862A8F4[] =
+{
+ sSpriteAnim_862A8EC
+};
+
+const struct CompressedSpriteSheet gUnknown_0862A8F8 =
+{
+ gRaySceneGroudon2_Gfx, 0x200, 30506
+};
+
+const struct SpriteTemplate gUnknown_0862A900 =
+{
+ .tileTag = 30506,
+ .paletteTag = 30505,
+ .oam = &sOamData_862A6C4,
+ .anims = sSpriteAnimTable_862A8F4,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+static const union AnimCmd sSpriteAnim_862A918[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862A920[] =
+{
+ sSpriteAnim_862A918
+};
+
+const struct CompressedSpriteSheet gUnknown_0862A924 =
+{
+ gRaySceneGroudon3_Gfx, 0x400, 30507
+};
+
+const struct SpriteTemplate gUnknown_0862A92C =
+{
+ .tileTag = 30507,
+ .paletteTag = 30505,
+ .oam = &sOamData_862A6CC,
+ .anims = sSpriteAnimTable_862A920,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+static const union AnimCmd sSpriteAnim_862A944[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A94C[] =
+{
+ ANIMCMD_FRAME(8, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A954[] =
+{
+ ANIMCMD_FRAME(16, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A95C[] =
+{
+ ANIMCMD_FRAME(24, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A964[] =
+{
+ ANIMCMD_FRAME(32, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A96C[] =
+{
+ ANIMCMD_FRAME(40, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862A974[] =
+{
+ ANIMCMD_FRAME(48, 24),
+ ANIMCMD_FRAME(64, 24),
+ ANIMCMD_FRAME(80, 24),
+ ANIMCMD_FRAME(64, 24),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sSpriteAnim_862A988[] =
+{
+ ANIMCMD_FRAME(56, 24),
+ ANIMCMD_FRAME(72, 24),
+ ANIMCMD_FRAME(88, 24),
+ ANIMCMD_FRAME(72, 24),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd sSpriteAnim_862A99C[] =
+{
+ ANIMCMD_FRAME(96, 24),
+ ANIMCMD_FRAME(104, 24),
+ ANIMCMD_FRAME(112, 24),
+ ANIMCMD_FRAME(104, 24),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862A9B0[] =
+{
+ sSpriteAnim_862A944,
+ sSpriteAnim_862A94C,
+ sSpriteAnim_862A954,
+ sSpriteAnim_862A95C,
+ sSpriteAnim_862A964,
+ sSpriteAnim_862A96C,
+ sSpriteAnim_862A974,
+ sSpriteAnim_862A988,
+ sSpriteAnim_862A99C
+};
+
+const struct CompressedSpriteSheet gUnknown_0862A9D4 =
+{
+ gRaySceneKyogre_Gfx, 0xF00, 30508
+};
+
+const struct CompressedSpritePalette gUnknown_0862A9DC =
+{
+ gRaySceneKyogre_Pal, 30508
+};
+
+const struct SpriteTemplate gUnknown_0862A9E4 =
+{
+ .tileTag = 30508,
+ .paletteTag = 30508,
+ .oam = &sOamData_862A6D4,
+ .anims = sSpriteAnimTable_862A9B0,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+static const union AnimCmd sSpriteAnim_862A9FC[] =
+{
+ ANIMCMD_FRAME(0, 24),
+ ANIMCMD_FRAME(2, 24),
+ ANIMCMD_FRAME(4, 24),
+ ANIMCMD_FRAME(2, 24),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862AA10[] =
+{
+ sSpriteAnim_862A9FC
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AA14 =
+{
+ gRaySceneKyogre2_Gfx, 0xC0, 30509
+};
+
+const struct SpriteTemplate gUnknown_0862AA1C =
+{
+ .tileTag = 30509,
+ .paletteTag = 30508,
+ .oam = &sOamData_862A6DC,
+ .anims = sSpriteAnimTable_862AA10,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AA34 =
+{
+ gRaySceneKyogre3_Gfx, 0x200, 30510
+};
+
+const struct SpriteTemplate gUnknown_0862AA3C =
+{
+ .tileTag = 30510,
+ .paletteTag = 30508,
+ .oam = &sOamData_862A6C4,
+ .anims = sSpriteAnimTable_862A8F4,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct BgTemplate gUnknown_0862AA54[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 31,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 1,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 30,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 29,
+ .screenSize = 1,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ }
+};
+
+static const union AnimCmd sSpriteAnim_862AA60[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862AA68[] =
+{
+ sSpriteAnim_862AA60
+};
+
+static const union AffineAnimCmd sSpriteAffineAnim_862AA6C[] =
+{
+ AFFINEANIMCMD_FRAME(-64, -64, 0, 1),
+ AFFINEANIMCMD_FRAME(32, 32, 0, 14),
+ AFFINEANIMCMD_FRAME(256, 256, 0, 0),
+ AFFINEANIMCMD_JUMP(0)
+};
+
+static const union AffineAnimCmd *const sSpriteAffineAnimTable_862AA8C[] =
+{
+ sSpriteAffineAnim_862AA6C
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AA90 =
+{
+ gRaySceneSmoke_Gfx, 0x100, 30555
+};
+
+const struct CompressedSpritePalette gUnknown_0862AA98 =
+{
+ gRaySceneSmoke_Pal, 30555
+};
+
+const struct SpriteTemplate gUnknown_0862AAA0 =
+{
+ .tileTag = 30555,
+ .paletteTag = 30555,
+ .oam = &sOamData_862A6D4,
+ .anims = sSpriteAnimTable_862AA68,
+ .images = NULL,
+ .affineAnims = sSpriteAffineAnimTable_862AA8C,
+ .callback = sub_81D8260,
+};
+
+const s8 gUnknown_0862AAB8[][2] =
+{
+ {-1, 5},
+ {-3, -4},
+ {5, -3},
+ {-7, 2},
+ {-9, -1},
+ {1, -5},
+ {3, 4},
+ {-5, 3},
+ {7, -2},
+ {9, 1}
+};
+
+const struct BgTemplate gUnknown_0862AACC[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 31,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 30,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 29,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 28,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+static const union AnimCmd sSpriteAnim_862AADC[] =
+{
+ ANIMCMD_FRAME(0, 32),
+ ANIMCMD_FRAME(64, 32),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862AAE8[] =
+{
+ sSpriteAnim_862AADC
+};
+
+static const union AnimCmd sSpriteAnim_862AAEC[] =
+{
+ ANIMCMD_FRAME(0, 32),
+ ANIMCMD_FRAME(8, 32),
+ ANIMCMD_JUMP(0),
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862AAF8[] =
+{
+ sSpriteAnim_862AAEC
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AAFC =
+{
+ gRaySceneRayquazaFly1_Gfx, 0x1000, 30556
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AB04 =
+{
+ gRaySceneRayquazaTail_Gfx, 0x200, 30557
+};
+
+const struct CompressedSpritePalette gUnknown_0862AB0C =
+{
+ gRaySceneRayquaza_Pal, 30556
+};
+
+const struct SpriteTemplate gUnknown_0862AB14 =
+{
+ .tileTag = 30556,
+ .paletteTag = 30556,
+ .oam = &sOamData_862A6BC,
+ .anims = sSpriteAnimTable_862AAE8,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct SpriteTemplate gUnknown_0862AB2C =
+{
+ .tileTag = 30557,
+ .paletteTag = 30556,
+ .oam = &sOamData_862A6E4,
+ .anims = sSpriteAnimTable_862AAF8,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct BgTemplate gUnknown_0862AB44[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 31,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 30,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 29,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 3,
+ .mapBaseIndex = 28,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+static const union AnimCmd sSpriteAnim_862AB54[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862AB5C[] =
+{
+ ANIMCMD_FRAME(0, 48),
+ ANIMCMD_FRAME(64, 32),
+ ANIMCMD_FRAME(0, 48),
+ ANIMCMD_FRAME(128, 32),
+ ANIMCMD_JUMP(0)
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862AB70[] =
+{
+ sSpriteAnim_862AB54,
+ sSpriteAnim_862AB5C
+};
+
+static const union AnimCmd sSpriteAnim_862AB78[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862AB80[] =
+{
+ sSpriteAnim_862AB78,
+};
+
+static const union AnimCmd sSpriteAnim_862AB84[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862AB8C[] =
+{
+ ANIMCMD_FRAME(16, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862AB94[] =
+{
+ ANIMCMD_FRAME(32, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862AB9C[] =
+{
+ sSpriteAnim_862AB84,
+ sSpriteAnim_862AB8C,
+ sSpriteAnim_862AB94
+};
+
+static const union AnimCmd sSpriteAnim_862ABA8[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862ABB0[] =
+{
+ ANIMCMD_FRAME(64, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862ABB8[] =
+{
+ ANIMCMD_FRAME(128, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862ABC0[] =
+{
+ ANIMCMD_FRAME(192, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862ABC8[] =
+{
+ sSpriteAnim_862ABA8,
+ sSpriteAnim_862ABB0,
+ sSpriteAnim_862ABB8,
+ sSpriteAnim_862ABC0
+};
+
+static const union AnimCmd sSpriteAnim_862ABD8[] =
+{
+ ANIMCMD_FRAME(0, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862ABE0[] =
+{
+ ANIMCMD_FRAME(16, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862ABE8[] =
+{
+ ANIMCMD_FRAME(32, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd sSpriteAnim_862ABF0[] =
+{
+ ANIMCMD_FRAME(48, 1),
+ ANIMCMD_END
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862ABF8[] =
+{
+ sSpriteAnim_862ABD8,
+ sSpriteAnim_862ABE0,
+ sSpriteAnim_862ABE8,
+ sSpriteAnim_862ABF0
+};
+
+static const union AnimCmd sSpriteAnim_862AC08[] =
+{
+ ANIMCMD_FRAME(0, 8),
+ ANIMCMD_FRAME(4, 8),
+ ANIMCMD_FRAME(8, 8),
+ ANIMCMD_FRAME(12, 8),
+ ANIMCMD_FRAME(16, 8),
+ ANIMCMD_FRAME(20, 8),
+ ANIMCMD_JUMP(0)
+};
+
+static const union AnimCmd *const sSpriteAnimTable_862AC24[] =
+{
+ sSpriteAnim_862AC08
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AC28 =
+{
+ gRaySceneGroudonLeft_Gfx, 0x1800, 30565
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AC30 =
+{
+ gRaySceneGroudonTail_Gfx, 0x80, 30566
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AC38 =
+{
+ gRaySceneKyogreRight_Gfx, 0x600, 30568
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AC40 =
+{
+ gRaySceneRayquazaHover_Gfx, 0x2000, 30569
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AC48 =
+{
+ gRaySceneRayquazaFlyIn_Gfx, 0x800, 30570
+};
+
+const struct CompressedSpriteSheet gUnknown_0862AC50 =
+{
+ gRaySceneSplash_Gfx, 0x300, 30571
+};
+
+const struct CompressedSpritePalette gUnknown_0862AC58 =
+{
+ gRaySceneGroudonLeft_Pal, 30565
+};
+
+const struct CompressedSpritePalette gUnknown_0862AC60 =
+{
+ gRaySceneKyogreRight_Pal, 30568
+};
+
+const struct CompressedSpritePalette gUnknown_0862AC68 =
+{
+ gRaySceneRayquazaHover_Pal, 30569
+};
+
+const struct CompressedSpritePalette gUnknown_0862AC70 =
+{
+ gRaySceneSplash_Pal, 30571
+};
+
+const struct SpriteTemplate gUnknown_0862AC78 =
+{
+ .tileTag = 30565,
+ .paletteTag = 30565,
+ .oam = &sOamData_862A6BC,
+ .anims = sSpriteAnimTable_862AB70,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct SpriteTemplate gUnknown_0862AC90 =
+{
+ .tileTag = 30566,
+ .paletteTag = 30565,
+ .oam = &sOamData_862A6EC,
+ .anims = sSpriteAnimTable_862AB80,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct SpriteTemplate gUnknown_0862ACA8 =
+{
+ .tileTag = 30568,
+ .paletteTag = 30568,
+ .oam = &sOamData_862A6C4,
+ .anims = sSpriteAnimTable_862AB9C,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct SpriteTemplate gUnknown_0862ACC0 =
+{
+ .tileTag = 30569,
+ .paletteTag = 30569,
+ .oam = &sOamData_862A6BC,
+ .anims = sSpriteAnimTable_862ABC8,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = sub_81D961C,
+};
+
+const struct SpriteTemplate gUnknown_0862ACD8 =
+{
+ .tileTag = 30570,
+ .paletteTag = 30569,
+ .oam = &sOamData_862A6C4,
+ .anims = sSpriteAnimTable_862ABF8,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct SpriteTemplate gUnknown_0862ACF0 =
+{
+ .tileTag = 30571,
+ .paletteTag = 30571,
+ .oam = &sOamData_862A6F4,
+ .anims = sSpriteAnimTable_862AC24,
+ .images = NULL,
+ .affineAnims = gDummySpriteAffineAnimTable,
+ .callback = SpriteCallbackDummy,
+};
+
+const struct BgTemplate gUnknown_0862AD08[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 31,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 1,
+ .baseTile = 0
+ },
+ {
+ .bg = 1,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 30,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 2,
+ .baseTile = 0
+ },
+ {
+ .bg = 2,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 29,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ }
+};
+
diff --git a/src/reset_save_heap.c b/src/reset_save_heap.c
index d4dbc5f42..099edce49 100644
--- a/src/reset_save_heap.c
+++ b/src/reset_save_heap.c
@@ -23,10 +23,8 @@ void sub_81700F8(void)
ResetSaveCounters();
sub_81534D0(0);
if (gSaveFileStatus == 0 || gSaveFileStatus == 2)
- {
Sav2_ClearSetDefault();
- }
SetPokemonCryStereo(gSaveBlock2Ptr->optionsSound);
- InitHeap(gHeap, 0x1c000);
+ InitHeap(gHeap, HEAP_SIZE);
SetMainCallback2(sub_8086230);
}
diff --git a/src/start_menu.c b/src/start_menu.c
index f45fd8626..a820cd992 100644
--- a/src/start_menu.c
+++ b/src/start_menu.c
@@ -6,6 +6,8 @@
#include "window.h"
#include "string_util.h"
#include "text.h"
+#include "strings.h"
+#include "bg.h"
// Menu actions
enum
@@ -25,15 +27,6 @@ enum
MENU_ACTION_PYRAMID_BAG
};
-static void BuildStartMenuActions_LinkMode(void);
-static void BuildStartMenuActions_UnionRoom(void);
-static void BuildStartMenuActions_SafariZone(void);
-static void BuildStartMenuActions_BattlePike(void);
-static void BuildStartMenuActions_BattlePyramid(void);
-static void BuildStartMenuActions_MultiBattleRoom(void);
-static void BuildStartMenuActions_Normal(void);
-u8 StartMenu_PlayerName(void);
-
extern bool32 is_c1_link_related_active(void);
extern bool32 InUnionRoom(void);
extern bool8 InBattlePike(void);
@@ -42,12 +35,91 @@ extern bool8 InMultiBattleRoom(void);
extern void sub_81973FC(u8 windowId, u8 a1);
extern void sub_8198070(u8 windowId, u8 a1);
+// this file's functions
+static void BuildStartMenuActions_LinkMode(void);
+static void BuildStartMenuActions_UnionRoom(void);
+static void BuildStartMenuActions_SafariZone(void);
+static void BuildStartMenuActions_BattlePike(void);
+static void BuildStartMenuActions_BattlePyramid(void);
+static void BuildStartMenuActions_MultiBattleRoom(void);
+static void BuildStartMenuActions_Normal(void);
+bool8 StartMenu_Pokedex(void);
+bool8 StartMenu_Pokemon(void);
+bool8 StartMenu_Bag(void);
+bool8 StartMenu_PokeNav(void);
+bool8 StartMenu_PlayerName(void);
+bool8 StartMenu_Save(void);
+bool8 StartMenu_Option(void);
+bool8 StartMenu_Exit(void);
+bool8 StartMenu_SafariZoneRetire(void);
+bool8 StartMenu_LinkModePlayerName(void);
+bool8 StartMenu_BattlePyramidRetire(void);
+bool8 StartMenu_BattlePyramidBag(void);
+
+// EWRAM vars
EWRAM_DATA u8 sSafariBallsWindowId = 0;
EWRAM_DATA u8 sBattlePyramidFloorWindowId = 0;
EWRAM_DATA u8 sStartMenuCursorPos = 0;
EWRAM_DATA u8 sNumStartMenuActions = 0;
EWRAM_DATA u8 sCurrentStartMenuActions[9] = {0};
+// const rom data
+static const struct WindowTemplate gSafariBallsWindowTemplate = {0, 1, 1, 9, 4, 0xF, 8};
+
+static const u8* const sPyramindFloorNames[] =
+{
+ gText_Floor1,
+ gText_Floor2,
+ gText_Floor3,
+ gText_Floor4,
+ gText_Floor5,
+ gText_Floor6,
+ gText_Floor7,
+ gText_Peak
+};
+
+static const struct WindowTemplate gPyramidFloorWindowTemplate_2 = {0, 1, 1, 0xA, 4, 0xF, 8};
+static const struct WindowTemplate gPyramidFloorWindowTemplate_1 = {0, 1, 1, 0xC, 4, 0xF, 8};
+
+const struct MenuAction sStartMenuItems[] =
+{
+ {gText_MenuPokedex, {.u8_void = StartMenu_Pokedex}},
+ {gText_MenuPokemon, {.u8_void = StartMenu_Pokemon}},
+ {gText_MenuBag, {.u8_void = StartMenu_Bag}},
+ {gText_MenuPokenav, {.u8_void = StartMenu_PokeNav}},
+ {gText_MenuPlayer, {.u8_void = StartMenu_PlayerName}},
+ {gText_MenuSave, {.u8_void = StartMenu_Save}},
+ {gText_MenuOption, {.u8_void = StartMenu_Option}},
+ {gText_MenuExit, {.u8_void = StartMenu_Exit}},
+ {gText_MenuRetire, {.u8_void = StartMenu_SafariZoneRetire}},
+ {gText_MenuPlayer, {.u8_void = StartMenu_LinkModePlayerName}},
+ {gText_MenuRest, {.u8_void = StartMenu_Save}},
+ {gText_MenuRetire, {.u8_void = StartMenu_BattlePyramidRetire}},
+ {gText_MenuBag, {.u8_void = StartMenu_BattlePyramidBag}}
+};
+
+const struct BgTemplate gUnknown_085105A8[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 2,
+ .mapBaseIndex = 31,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ }
+};
+
+const struct WindowTemplate gUnknown_085105AC[] =
+{
+ {0, 2, 0xF, 0x1A, 4, 0xF, 0x194},
+ DUMMY_WIN_TEMPLATE
+};
+
+const struct WindowTemplate gUnknown_085105BC = {0, 1, 1, 0xE, 0xA, 0xF, 8};
+
+// code
void BuildStartMenuActions(void)
{
sNumStartMenuActions = 0;
@@ -148,11 +220,6 @@ static void BuildStartMenuActions_MultiBattleRoom(void)
AddStartMenuAction(MENU_ACTION_EXIT);
}
-extern const struct WindowTemplate gSafariBallsWindowTemplate;
-extern const struct WindowTemplate gPyramidFloorWindowTemplate_1;
-extern const struct WindowTemplate gPyramidFloorWindowTemplate_2;
-extern const u8 gText_SafariBallStock[];
-
void DisplaySafariBallsWindow(void)
{
sSafariBallsWindowId = AddWindow(&gSafariBallsWindowTemplate);
@@ -164,9 +231,6 @@ void DisplaySafariBallsWindow(void)
CopyWindowToVram(sSafariBallsWindowId, 2);
}
-extern const u8* const gUnknown_08510510[];
-extern const u8 gText_BattlePyramidFloor[];
-
void DisplayPyramidFloorWindow(void)
{
// TODO: fix location
@@ -176,7 +240,7 @@ void DisplayPyramidFloorWindow(void)
sBattlePyramidFloorWindowId = AddWindow(&gPyramidFloorWindowTemplate_2);
PutWindowTilemap(sBattlePyramidFloorWindowId);
sub_81973FC(sBattlePyramidFloorWindowId, 0);
- StringCopy(gStringVar1, gUnknown_08510510[gSaveBlock2Ptr->field_CAA[4]]);
+ StringCopy(gStringVar1, sPyramindFloorNames[gSaveBlock2Ptr->field_CAA[4]]);
StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor);
PrintTextOnWindow(sBattlePyramidFloorWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL);
CopyWindowToVram(sBattlePyramidFloorWindowId, 2);
@@ -197,8 +261,6 @@ void RemoveExtraStartMenuWindows(void)
}
}
-extern const struct MenuAction sStartMenuItems[];
-
/*
// Prints n menu items starting at *index
static bool32 PrintStartMenuItemsMultistep(s16 *index, u32 n)
diff --git a/src/unk_81BAD84.c b/src/unk_81BAD84.c
index 9ba98dd87..c0d891c12 100644
--- a/src/unk_81BAD84.c
+++ b/src/unk_81BAD84.c
@@ -7,29 +7,29 @@ const struct {
const u16 *pltt;
} gUnknown_08617128[] = {
{
- gUnknown_08DD87C0,
- gUnknown_08DD8EE0,
- gUnknown_08DD8780
+ gBerryFixGameboy_Gfx,
+ gBerryFixGameboy_Tilemap,
+ gBerryFixGameboy_Pal
}, {
- gUnknown_08DD90E0,
- gUnknown_08DD9718,
- gUnknown_08DD9080
+ gBerryFixGameboyLogo_Gfx,
+ gBerryFixGameboyLogo_Tilemap,
+ gBerryFixGameboyLogo_Pal
}, {
- gUnknown_08DD98B4,
- gUnknown_08DD9E58,
- gUnknown_08DD9874
+ gBerryFixGbaTransfer_Gfx,
+ gBerryFixGbaTransfer_Tilemap,
+ gBerryFixGbaTransfer_Pal
}, {
- gUnknown_08DDA02C,
- gUnknown_08DDA63C,
- gUnknown_08DD9FEC
+ gBerryFixGbaTransferHighlight_Gfx,
+ gBerryFixGbaTransferHighlight_Tilemap,
+ gBerryFixGbaTransferHighlight_Pal
}, {
- gUnknown_08DDA840,
- gUnknown_08DDAE40,
- gUnknown_08DDA800
+ gBerryFixGbaTransferError_Gfx,
+ gBerryFixGbaTransferError_Tilemap,
+ gBerryFixGbaTransferError_Pal
}, {
- gUnknown_08DDB020,
- gUnknown_08DDB2C4,
- gUnknown_08DDAFE0
+ gBerryFixWindow_Gfx,
+ gBerryFixWindow_Tilemap,
+ gBerryFixWindow_Pal
}
};
diff --git a/src/wallclock.c b/src/wallclock.c
index 897576719..ea6137c5d 100644
--- a/src/wallclock.c
+++ b/src/wallclock.c
@@ -92,8 +92,8 @@ static const struct CompressedSpriteSheet gUnknown_085B2208 = {
};
static const u32 filler_85B2210[2] = {};
static const struct SpritePalette gUnknown_085B2218[] = {
- { gUnknown_08DCC01C, TAG_PAL_WALL_CLOCK_HAND },
- { gUnknown_08DCC03C, 0x1001 },
+ { gWallclockMale_Pal, TAG_PAL_WALL_CLOCK_HAND },
+ { gWallclockFemale_Pal, 0x1001 },
{}
};
static const struct OamData Unknown_085B2230 = {
@@ -561,14 +561,14 @@ static void LoadWallClockGraphics(void)
DmaFillLarge16(3, 0, (void *)VRAM, VRAM_SIZE, 0x1000);
DmaClear32(3, (void *)OAM, OAM_SIZE);
DmaClear16(3, (void *)PLTT, PLTT_SIZE);
- LZ77UnCompVram(gUnknown_08DCC05C, (void *)VRAM);
+ LZ77UnCompVram(gWallclock_Gfx, (void *)VRAM);
if (gSpecialVar_0x8004 == 0)
{
- LoadPalette(gUnknown_08DCC01C, 0x00, 0x20);
+ LoadPalette(gWallclockMale_Pal, 0x00, 0x20);
}
else
{
- LoadPalette(gUnknown_08DCC03C, 0x00, 0x20);
+ LoadPalette(gWallclockFemale_Pal, 0x00, 0x20);
}
LoadPalette(GetOverworldTextboxPalettePtr(), 0xe0, 0x20);
LoadPalette(sUnknown_085B21D4, 0xc0, 0x08);
diff --git a/src/window.c b/src/window.c
index f4cb48ec0..3913b5800 100644
--- a/src/window.c
+++ b/src/window.c
@@ -465,696 +465,74 @@ void FillWindowPixelBuffer(u8 windowId, u8 fillValue)
CpuFastFill8(fillValue, gWindows[windowId].tileData, 0x20 * fillSize);
}
-// functionally equivalent, its fucking hard to match
-#ifdef NONMATCHING
+#define MOVE_TILES_DOWN(a) \
+{ \
+ destOffset = i + (a); \
+ srcOffset = i + (((width * (distanceLoop & ~7)) | (distanceLoop & 7)) * 4); \
+ if (srcOffset < size) \
+ *(u32*)(tileData + destOffset) = *(u32*)(tileData + srcOffset); \
+ else \
+ *(u32*)(tileData + destOffset) = fillValue32; \
+ distanceLoop++; \
+}
+
+#define MOVE_TILES_UP(a) \
+{ \
+ destOffset = i + (a); \
+ srcOffset = i + (((width * (distanceLoop & ~7)) | (distanceLoop & 7)) * 4); \
+ if (srcOffset < size) \
+ *(u32*)(tileData - destOffset) = *(u32*)(tileData - srcOffset); \
+ else \
+ *(u32*)(tileData - destOffset) = fillValue32; \
+ distanceLoop++; \
+}
+
void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue)
{
- s32 i, id1, id2, size;
- u32 distanceLoop, toFill, width;
- u8 *tileData;
- struct WindowTemplate window;
-
- tileData = gWindows[windowId].tileData;
- toFill = (fillValue << 0x18) | (fillValue << 0x10) | (fillValue << 8) | fillValue;
- window = gWindows[windowId].window;
- size = 0x20 * (window.height * window.width);
- width = window.width;
- if (direction != 1)
+ struct WindowTemplate window = gWindows[windowId].window;
+ u8 *tileData = gWindows[windowId].tileData;
+ u32 fillValue32 = (fillValue << 24) | (fillValue << 16) | (fillValue << 8) | fillValue;
+ s32 size = window.height * window.width * 32;
+ u32 width = window.width;
+ s32 i;
+ s32 srcOffset, destOffset;
+ u32 distanceLoop;
+
+ switch (direction)
{
- s32 signedDirection = direction;
- if (signedDirection <= 1)
+ case 0:
+ for (i = 0; i < size; i += 32)
{
- if (signedDirection == 0)
- {
- for (i = 0; i < size; i += 0x20)
- {
- distanceLoop = distance;
- id1 = i + 0;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData + id1) = *(u32*)(tileData + id2);
- else
- *(u32*)(tileData + id1) = toFill;
-
- distanceLoop++;
- id1 = i + 4;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData + id1) = *(u32*)(tileData + id2);
- else
- *(u32*)(tileData + id1) = toFill;
-
- distanceLoop++;
- id1 = i + 8;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData + id1) = *(u32*)(tileData + id2);
- else
- *(u32*)(tileData + id1) = toFill;
-
- distanceLoop++;
- id1 = i + 12;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData + id1) = *(u32*)(tileData + id2);
- else
- *(u32*)(tileData + id1) = toFill;
-
- distanceLoop++;
- id1 = i + 16;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData + id1) = *(u32*)(tileData + id2);
- else
- *(u32*)(tileData + id1) = toFill;
-
- distanceLoop++;
- id1 = i + 20;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData + id1) = *(u32*)(tileData + id2);
- else
- *(u32*)(tileData + id1) = toFill;
-
- distanceLoop++;
- id1 = i + 24;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData + id1) = *(u32*)(tileData + id2);
- else
- *(u32*)(tileData + id1) = toFill;
-
- distanceLoop++;
- id1 = i + 28;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData + id1) = *(u32*)(tileData + id2);
- else
- *(u32*)(tileData + id1) = toFill;
- }
- }
+ distanceLoop = distance;
+ MOVE_TILES_DOWN(0)
+ MOVE_TILES_DOWN(4)
+ MOVE_TILES_DOWN(8)
+ MOVE_TILES_DOWN(12)
+ MOVE_TILES_DOWN(16)
+ MOVE_TILES_DOWN(20)
+ MOVE_TILES_DOWN(24)
+ MOVE_TILES_DOWN(28)
}
- }
- else
- {
+ break;
+ case 1:
tileData += size - 4;
- for (i = 0; i < size; i += 0x20)
+ for (i = 0; i < size; i += 32)
{
distanceLoop = distance;
- id1 = i + 0;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData - id1) = *(u32*)(tileData - id2);
- else
- *(u32*)(tileData - id1) = toFill;
-
- distanceLoop++;
- id1 = i + 4;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData - id1) = *(u32*)(tileData - id2);
- else
- *(u32*)(tileData - id1) = toFill;
-
- distanceLoop++;
- id1 = i + 8;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData - id1) = *(u32*)(tileData - id2);
- else
- *(u32*)(tileData - id1) = toFill;
-
- distanceLoop++;
- id1 = i + 12;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData - id1) = *(u32*)(tileData - id2);
- else
- *(u32*)(tileData - id1) = toFill;
-
- distanceLoop++;
- id1 = i + 16;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData - id1) = *(u32*)(tileData - id2);
- else
- *(u32*)(tileData - id1) = toFill;
-
- distanceLoop++;
- id1 = i + 20;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData - id1) = *(u32*)(tileData - id2);
- else
- *(u32*)(tileData - id1) = toFill;
-
- distanceLoop++;
- id1 = i + 24;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData - id1) = *(u32*)(tileData - id2);
- else
- *(u32*)(tileData - id1) = toFill;
-
- distanceLoop++;
- id1 = i + 28;
- id2 = i + (((width * ((distanceLoop) & ~(7))) | ((distanceLoop) & 7)) * 4);
- if (id2 < size)
- *(u32*)(tileData - id1) = *(u32*)(tileData - id2);
- else
- *(u32*)(tileData - id1) = toFill;
+ MOVE_TILES_UP(0)
+ MOVE_TILES_UP(4)
+ MOVE_TILES_UP(8)
+ MOVE_TILES_UP(12)
+ MOVE_TILES_UP(16)
+ MOVE_TILES_UP(20)
+ MOVE_TILES_UP(24)
+ MOVE_TILES_UP(28)
}
+ break;
+ case 2:
+ break;
}
}
-#else
-__attribute__((naked))
-void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue)
-{
- asm(".syntax unified\n\
- push {r4-r7,lr}\n\
- mov r7, r10\n\
- mov r6, r9\n\
- mov r5, r8\n\
- push {r5-r7}\n\
- sub sp, 0x8\n\
- lsls r0, 24\n\
- lsrs r0, 24\n\
- lsls r1, 24\n\
- lsrs r1, 24\n\
- mov r8, r1\n\
- lsls r2, 24\n\
- lsrs r2, 24\n\
- str r2, [sp]\n\
- lsls r3, 24\n\
- lsrs r3, 24\n\
- ldr r2, =gWindows\n\
- lsls r1, r0, 1\n\
- adds r1, r0\n\
- lsls r1, 2\n\
- adds r4, r1, r2\n\
- adds r2, 0x8\n\
- adds r1, r2\n\
- ldr r5, [r1]\n\
- lsls r7, r3, 24\n\
- lsls r0, r3, 16\n\
- orrs r7, r0\n\
- lsls r0, r3, 8\n\
- orrs r7, r0\n\
- orrs r7, r3\n\
- ldr r1, [r4]\n\
- ldr r2, [r4, 0x4]\n\
- ldrb r3, [r4, 0x4]\n\
- lsrs r0, r1, 24\n\
- muls r0, r3\n\
- lsls r6, r0, 5\n\
- lsrs r1, 24\n\
- mov r12, r1\n\
- mov r0, r8\n\
- cmp r0, 0x1\n\
- bne _08003CE8\n\
- b _08003E9E\n\
-_08003CE8:\n\
- cmp r0, 0x1\n\
- ble _08003CEE\n\
- b _08004046\n\
-_08003CEE:\n\
- cmp r0, 0\n\
- beq _08003CF4\n\
- b _08004046\n\
-_08003CF4:\n\
- movs r4, 0\n\
- cmp r4, r6\n\
- blt _08003CFC\n\
- b _08004046\n\
-_08003CFC:\n\
- movs r1, 0x8\n\
- negs r1, r1\n\
- mov r9, r1\n\
- movs r2, 0x7\n\
- mov r8, r2\n\
- mov r10, r5\n\
-_08003D08:\n\
- ldr r3, [sp]\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- adds r0, r3, 0\n\
- mov r2, r8\n\
- ands r0, r2\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003D34\n\
- adds r0, r5, r1\n\
- ldr r0, [r0]\n\
- mov r1, r10\n\
- str r0, [r1]\n\
- b _08003D38\n\
- .pool\n\
-_08003D34:\n\
- mov r2, r10\n\
- str r7, [r2]\n\
-_08003D38:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0x4\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003D64\n\
- adds r0, r5, r2\n\
- adds r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003D68\n\
-_08003D64:\n\
- adds r0, r5, r2\n\
- str r7, [r0]\n\
-_08003D68:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x8\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003D96\n\
- adds r0, r5, r2\n\
- adds r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003D9A\n\
-_08003D96:\n\
- adds r0, r5, r2\n\
- str r7, [r0]\n\
-_08003D9A:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0xC\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003DC8\n\
- adds r0, r5, r2\n\
- adds r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003DCC\n\
-_08003DC8:\n\
- adds r0, r5, r2\n\
- str r7, [r0]\n\
-_08003DCC:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x10\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003DFA\n\
- adds r0, r5, r2\n\
- adds r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003DFE\n\
-_08003DFA:\n\
- adds r0, r5, r2\n\
- str r7, [r0]\n\
-_08003DFE:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x14\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003E2C\n\
- adds r0, r5, r2\n\
- adds r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003E30\n\
-_08003E2C:\n\
- adds r0, r5, r2\n\
- str r7, [r0]\n\
-_08003E30:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x18\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003E5E\n\
- adds r0, r5, r2\n\
- adds r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003E62\n\
-_08003E5E:\n\
- adds r0, r5, r2\n\
- str r7, [r0]\n\
-_08003E62:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x1C\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- adds r0, r1, 0\n\
- mov r1, r8\n\
- ands r3, r1\n\
- orrs r0, r3\n\
- lsls r0, 2\n\
- adds r1, r4, r0\n\
- cmp r1, r6\n\
- bge _08003E8C\n\
- adds r0, r5, r2\n\
- adds r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003E90\n\
-_08003E8C:\n\
- adds r0, r5, r2\n\
- str r7, [r0]\n\
-_08003E90:\n\
- movs r2, 0x20\n\
- add r10, r2\n\
- adds r4, 0x20\n\
- cmp r4, r6\n\
- bge _08003E9C\n\
- b _08003D08\n\
-_08003E9C:\n\
- b _08004046\n\
-_08003E9E:\n\
- subs r0, r6, 0x4\n\
- adds r5, r0\n\
- movs r4, 0\n\
- cmp r4, r6\n\
- blt _08003EAA\n\
- b _08004046\n\
-_08003EAA:\n\
- movs r0, 0x8\n\
- negs r0, r0\n\
- mov r9, r0\n\
- movs r1, 0x7\n\
- mov r8, r1\n\
- mov r10, r5\n\
-_08003EB6:\n\
- ldr r3, [sp]\n\
- adds r0, r3, 0\n\
- mov r2, r9\n\
- ands r0, r2\n\
- mov r1, r12\n\
- muls r1, r0\n\
- adds r0, r3, 0\n\
- mov r2, r8\n\
- ands r0, r2\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003EDC\n\
- subs r0, r5, r1\n\
- ldr r0, [r0]\n\
- mov r1, r10\n\
- str r0, [r1]\n\
- b _08003EE0\n\
-_08003EDC:\n\
- mov r2, r10\n\
- str r7, [r2]\n\
-_08003EE0:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0x4\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003F0C\n\
- subs r0, r5, r2\n\
- subs r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003F10\n\
-_08003F0C:\n\
- subs r0, r5, r2\n\
- str r7, [r0]\n\
-_08003F10:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x8\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003F3E\n\
- subs r0, r5, r2\n\
- subs r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003F42\n\
-_08003F3E:\n\
- subs r0, r5, r2\n\
- str r7, [r0]\n\
-_08003F42:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0xC\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003F70\n\
- subs r0, r5, r2\n\
- subs r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003F74\n\
-_08003F70:\n\
- subs r0, r5, r2\n\
- str r7, [r0]\n\
-_08003F74:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x10\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003FA2\n\
- subs r0, r5, r2\n\
- subs r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003FA6\n\
-_08003FA2:\n\
- subs r0, r5, r2\n\
- str r7, [r0]\n\
-_08003FA6:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x14\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08003FD4\n\
- subs r0, r5, r2\n\
- subs r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08003FD8\n\
-_08003FD4:\n\
- subs r0, r5, r2\n\
- str r7, [r0]\n\
-_08003FD8:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x18\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- str r1, [sp, 0x4]\n\
- adds r0, r3, 0\n\
- mov r1, r8\n\
- ands r0, r1\n\
- ldr r1, [sp, 0x4]\n\
- orrs r1, r0\n\
- lsls r1, 2\n\
- adds r1, r4, r1\n\
- cmp r1, r6\n\
- bge _08004006\n\
- subs r0, r5, r2\n\
- subs r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _0800400A\n\
-_08004006:\n\
- subs r0, r5, r2\n\
- str r7, [r0]\n\
-_0800400A:\n\
- adds r3, 0x1\n\
- adds r2, r4, 0\n\
- adds r2, 0x1C\n\
- adds r0, r3, 0\n\
- mov r1, r9\n\
- ands r0, r1\n\
- mov r1, r12\n\
- muls r1, r0\n\
- adds r0, r1, 0\n\
- mov r1, r8\n\
- ands r3, r1\n\
- orrs r0, r3\n\
- lsls r0, 2\n\
- adds r1, r4, r0\n\
- cmp r1, r6\n\
- bge _08004034\n\
- subs r0, r5, r2\n\
- subs r1, r5, r1\n\
- ldr r1, [r1]\n\
- str r1, [r0]\n\
- b _08004038\n\
-_08004034:\n\
- subs r0, r5, r2\n\
- str r7, [r0]\n\
-_08004038:\n\
- movs r2, 0x20\n\
- negs r2, r2\n\
- add r10, r2\n\
- adds r4, 0x20\n\
- cmp r4, r6\n\
- bge _08004046\n\
- b _08003EB6\n\
-_08004046:\n\
- add sp, 0x8\n\
- pop {r3-r5}\n\
- mov r8, r3\n\
- mov r9, r4\n\
- mov r10, r5\n\
- pop {r4-r7}\n\
- pop {r0}\n\
- bx r0\n\
- .syntax divided");
-}
-#endif // NONMATCHING
void CallWindowFunction(u8 windowId, void ( *func)(u8, u8, u8, u8, u8, u8))
{
diff --git a/sym_ewram.txt b/sym_ewram.txt
index 82717b1a1..4af63595e 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -1118,10 +1118,10 @@ gUnknown_0203AB40: @ 203AB40
.include "src/pokeblock.o"
-gUnknown_0203AB54: @ 203AB54
+gBikeCyclingChallenge: @ 203AB54
.space 0x1
-gUnknown_0203AB55: @ 203AB55
+gBikeCollisions: @ 203AB55
.space 0x3
gUnknown_0203AB58: @ 203AB58
diff --git a/tools/aif2pcm/.gitignore b/tools/aif2pcm/.gitignore
new file mode 100644
index 000000000..31531797e
--- /dev/null
+++ b/tools/aif2pcm/.gitignore
@@ -0,0 +1,2 @@
+aif2pcm
+
diff --git a/tools/aif2pcm/LICENSE b/tools/aif2pcm/LICENSE
new file mode 100644
index 000000000..966b92bd6
--- /dev/null
+++ b/tools/aif2pcm/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2016 huderlem
+Copyright (c) 2005, 2006 by Marco Trillo <marcotrillo@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/aif2pcm/Makefile b/tools/aif2pcm/Makefile
new file mode 100644
index 000000000..967930c59
--- /dev/null
+++ b/tools/aif2pcm/Makefile
@@ -0,0 +1,15 @@
+CC = gcc
+
+CFLAGS = -Wall -Wextra -Wno-switch -Werror -std=c11 -O2 -s
+
+LIBS = -lm
+
+SRCS = main.c extended.c
+
+.PHONY: clean
+
+aif2pcm: $(SRCS)
+ $(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS)
+
+clean:
+ $(RM) aif2pcm aif2pcm.exe
diff --git a/tools/aif2pcm/extended.c b/tools/aif2pcm/extended.c
new file mode 100644
index 000000000..94449164b
--- /dev/null
+++ b/tools/aif2pcm/extended.c
@@ -0,0 +1,172 @@
+/* $Id: extended.c,v 1.8 2006/12/23 11:17:49 toad32767 Exp $ */
+/*-
+ * Copyright (c) 2005, 2006 by Marco Trillo <marcotrillo@gmail.com>
+ *
+ * Permission is hereby granted, free of charge, to any
+ * person obtaining a copy of this software and associated
+ * documentation files (the "Software"), to deal in the
+ * Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the
+ * Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice
+ * shall be included in all copies or substantial portions of
+ * the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+ * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+ * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <math.h>
+#include <string.h>
+#include <stdint.h>
+
+/*
+ * Infinite & NAN values
+ * for non-IEEE systems
+ */
+#ifndef HUGE_VAL
+#ifdef HUGE
+#define INFINITE_VALUE HUGE
+#define NAN_VALUE HUGE
+#endif
+#else
+#define INFINITE_VALUE HUGE_VAL
+#define NAN_VALUE HUGE_VAL
+#endif
+
+/*
+ * IEEE 754 Extended Precision
+ *
+ * Implementation here is the 80-bit extended precision
+ * format of Motorola 68881, Motorola 68882 and Motorola
+ * 68040 FPUs, as well as Intel 80x87 FPUs.
+ *
+ * See:
+ * http://www.freescale.com/files/32bit/doc/fact_sheet/BR509.pdf
+ */
+/*
+ * Exponent range: [-16383,16383]
+ * Precision for mantissa: 64 bits with no hidden bit
+ * Bias: 16383
+ */
+
+/*
+ * Write IEEE Extended Precision Numbers
+ */
+void
+ieee754_write_extended(double in, uint8_t* out)
+{
+ int sgn, exp, shift;
+ double fraction, t;
+ unsigned int lexp, hexp;
+ unsigned long low, high;
+
+ if (in == 0.0) {
+ memset(out, 0, 10);
+ return;
+ }
+ if (in < 0.0) {
+ in = fabs(in);
+ sgn = 1;
+ } else
+ sgn = 0;
+
+ fraction = frexp(in, &exp);
+
+ if (exp == 0 || exp > 16384) {
+ if (exp > 16384) /* infinite value */
+ low = high = 0;
+ else {
+ low = 0x80000000;
+ high = 0;
+ }
+ exp = 32767;
+ goto done;
+ }
+ fraction = ldexp(fraction, 32);
+ t = floor(fraction);
+ low = (unsigned long) t;
+ fraction -= t;
+ t = floor(ldexp(fraction, 32));
+ high = (unsigned long) t;
+
+ /* Convert exponents < -16382 to -16382 (then they will be
+ * stored as -16383) */
+ if (exp < -16382) {
+ shift = 0 - exp - 16382;
+ high >>= shift;
+ high |= (low << (32 - shift));
+ low >>= shift;
+ exp = -16382;
+ }
+ exp += 16383 - 1; /* bias */
+
+done:
+ lexp = ((unsigned int) exp) >> 8;
+ hexp = ((unsigned int) exp) & 0xFF;
+
+ /* big endian */
+ out[0] = ((uint8_t) sgn) << 7;
+ out[0] |= (uint8_t) lexp;
+ out[1] = (uint8_t) hexp;
+ out[2] = (uint8_t) (low >> 24);
+ out[3] = (uint8_t) ((low >> 16) & 0xFF);
+ out[4] = (uint8_t) ((low >> 8) & 0xFF);
+ out[5] = (uint8_t) (low & 0xFF);
+ out[6] = (uint8_t) (high >> 24);
+ out[7] = (uint8_t) ((high >> 16) & 0xFF);
+ out[8] = (uint8_t) ((high >> 8) & 0xFF);
+ out[9] = (uint8_t) (high & 0xFF);
+
+ return;
+}
+
+
+/*
+ * Read IEEE Extended Precision Numbers
+ */
+double
+ieee754_read_extended(uint8_t* in)
+{
+ int sgn, exp;
+ unsigned long low, high;
+ double out;
+
+ /* Extract the components from the big endian buffer */
+ sgn = (int) (in[0] >> 7);
+ exp = ((int) (in[0] & 0x7F) << 8) | ((int) in[1]);
+ low = (((unsigned long) in[2]) << 24)
+ | (((unsigned long) in[3]) << 16)
+ | (((unsigned long) in[4]) << 8) | (unsigned long) in[5];
+ high = (((unsigned long) in[6]) << 24)
+ | (((unsigned long) in[7]) << 16)
+ | (((unsigned long) in[8]) << 8) | (unsigned long) in[9];
+
+ if (exp == 0 && low == 0 && high == 0)
+ return (sgn ? -0.0 : 0.0);
+
+ switch (exp) {
+ case 32767:
+ if (low == 0 && high == 0)
+ return (sgn ? -INFINITE_VALUE : INFINITE_VALUE);
+ else
+ return (sgn ? -NAN_VALUE : NAN_VALUE);
+ default:
+ exp -= 16383; /* unbias exponent */
+
+ }
+
+ out = ldexp((double) low, -31 + exp);
+ out += ldexp((double) high, -63 + exp);
+
+ return (sgn ? -out : out);
+}
diff --git a/tools/aif2pcm/main.c b/tools/aif2pcm/main.c
new file mode 100644
index 000000000..fbb024a1d
--- /dev/null
+++ b/tools/aif2pcm/main.c
@@ -0,0 +1,830 @@
+// Copyright(c) 2016 huderlem
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <limits.h>
+
+/* extended.c */
+void ieee754_write_extended (double, uint8_t*);
+double ieee754_read_extended (uint8_t*);
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#endif // _MSC_VER
+
+typedef struct {
+ unsigned long num_samples;
+ uint8_t *samples;
+ uint8_t midi_note;
+ bool has_loop;
+ unsigned long loop_offset;
+ double sample_rate;
+ unsigned long real_num_samples;
+} AifData;
+
+struct Bytes {
+ unsigned long length;
+ uint8_t *data;
+};
+
+struct Bytes *read_bytearray(const char *filename)
+{
+ struct Bytes *bytes = malloc(sizeof(struct Bytes));
+ FILE *f = fopen(filename, "rb");
+ if (!f)
+ {
+ FATAL_ERROR("Failed to open '%s' for reading!\n", filename);
+ }
+ fseek(f, 0, SEEK_END);
+ bytes->length = ftell(f);
+ fseek(f, 0, SEEK_SET);
+ bytes->data = malloc(bytes->length);
+ unsigned long read = fread(bytes->data, bytes->length, 1, f);
+ fclose(f);
+ if (read <= 0)
+ {
+ FATAL_ERROR("Failed to read data from '%s'!\n", filename);
+ }
+ return bytes;
+}
+
+void write_bytearray(const char *filename, struct Bytes *bytes)
+{
+ FILE *f = fopen(filename, "wb");
+ if (!f)
+ {
+ FATAL_ERROR("Failed to open '%s' for writing!\n", filename);
+ }
+ fwrite(bytes->data, bytes->length, 1, f);
+ fclose(f);
+}
+
+void free_bytearray(struct Bytes *bytes)
+{
+ free(bytes->data);
+ free(bytes);
+}
+
+char *get_file_extension(char *filename)
+{
+ char *index = strrchr(filename, '.');
+ if (!index || index == filename)
+ {
+ return NULL;
+ }
+ return index + 1;
+}
+
+char *new_file_extension(char *filename, char *ext)
+{
+ char *index = strrchr(filename, '.');
+ if (!index || index == filename)
+ {
+ index = filename + strlen(filename);
+ }
+ int length = index - filename;
+ char *new_filename = malloc(length + 1 + strlen(ext) + 1);
+ if (new_filename)
+ {
+ strcpy(new_filename, filename);
+ new_filename[length] = '.';
+ strcpy(new_filename + length + 1, ext);
+ }
+ return new_filename;
+}
+
+void read_aif(struct Bytes *aif, AifData *aif_data)
+{
+ aif_data->has_loop = false;
+ aif_data->num_samples = 0;
+
+ unsigned long pos = 0;
+ char chunk_name[5]; chunk_name[4] = '\0';
+ char chunk_type[5]; chunk_type[4] = '\0';
+
+ // Check for FORM Chunk
+ memcpy(chunk_name, &aif->data[pos], 4);
+ pos += 4;
+ if (strcmp(chunk_name, "FORM") != 0)
+ {
+ FATAL_ERROR("Input .aif file has invalid header Chunk '%s'!\n", chunk_name);
+ }
+
+ // Read size of whole file.
+ unsigned long whole_chunk_size = aif->data[pos++] << 24;
+ whole_chunk_size |= (aif->data[pos++] << 16);
+ whole_chunk_size |= (aif->data[pos++] << 8);
+ whole_chunk_size |= (uint8_t)aif->data[pos++];
+
+ unsigned long expected_whole_chunk_size = aif->length - 8;
+ if (whole_chunk_size != expected_whole_chunk_size)
+ {
+ FATAL_ERROR("FORM Chunk ckSize '%lu' doesn't match actual size '%lu'!\n", whole_chunk_size, expected_whole_chunk_size);
+ }
+
+ // Check for AIFF Form Type
+ memcpy(chunk_type, &aif->data[pos], 4);
+ pos += 4;
+ if (strcmp(chunk_type, "AIFF") != 0)
+ {
+ FATAL_ERROR("FORM Type is '%s', but it must be AIFF!", chunk_type);
+ }
+
+ unsigned long num_sample_frames = 0;
+
+ // Read all the Chunks to populate the AifData struct.
+ while ((pos + 8) < aif->length)
+ {
+ // Read Chunk id
+ memcpy(chunk_name, &aif->data[pos], 4);
+ pos += 4;
+
+ unsigned long chunk_size = (aif->data[pos++] << 24);
+ chunk_size |= (aif->data[pos++] << 16);
+ chunk_size |= (aif->data[pos++] << 8);
+ chunk_size |= aif->data[pos++];
+
+ if ((pos + chunk_size) > aif->length)
+ {
+ FATAL_ERROR("%s chunk at 0x%lx reached end of file before finishing\n", chunk_name, pos);
+ }
+
+ if (strcmp(chunk_name, "COMM") == 0)
+ {
+ short num_channels = (aif->data[pos++] << 8);
+ num_channels |= (uint8_t)aif->data[pos++];
+ if (num_channels != 1)
+ {
+ FATAL_ERROR("numChannels (%d) in the COMM Chunk must be 1!\n", num_channels);
+ }
+
+ num_sample_frames = (aif->data[pos++] << 24);
+ num_sample_frames |= (aif->data[pos++] << 16);
+ num_sample_frames |= (aif->data[pos++] << 8);
+ num_sample_frames |= (uint8_t)aif->data[pos++];
+
+ short sample_size = (aif->data[pos++] << 8);
+ sample_size |= (uint8_t)aif->data[pos++];
+ if (sample_size != 8)
+ {
+ FATAL_ERROR("sampleSize (%d) in the COMM Chunk must be 8!\n", sample_size);
+ }
+
+ double sample_rate = ieee754_read_extended((uint8_t*)(aif->data + pos));
+ pos += 10;
+
+ aif_data->sample_rate = sample_rate;
+
+ if (aif_data->num_samples == 0)
+ {
+ aif_data->num_samples = num_sample_frames;
+ }
+ }
+ else if (strcmp(chunk_name, "MARK") == 0)
+ {
+ unsigned short num_markers = (aif->data[pos++] << 8);
+ num_markers |= (uint8_t)aif->data[pos++];
+
+ // Read each marker and look for the "START" marker.
+ for (int i = 0; i < num_markers; i++)
+ {
+ unsigned short marker_id = (aif->data[pos++] << 8);
+ marker_id |= (uint8_t)aif->data[pos++];
+
+ unsigned long marker_position = (aif->data[pos++] << 24);
+ marker_position |= (aif->data[pos++] << 16);
+ marker_position |= (aif->data[pos++] << 8);
+ marker_position |= (uint8_t)aif->data[pos++];
+
+ // Marker id is a pascal-style string.
+ uint8_t marker_name_size = aif->data[pos++];
+ char *marker_name = (char *)malloc((marker_name_size + 1) * sizeof(char));
+ memcpy(marker_name, &aif->data[pos], marker_name_size);
+ marker_name[marker_name_size] = '\0';
+ pos += marker_name_size;
+
+ if (strcmp(marker_name, "START") == 0)
+ {
+ aif_data->loop_offset = marker_position;
+ aif_data->has_loop = true;
+ }
+ else if (strcmp(marker_name, "END") == 0)
+ {
+ if (!aif_data->has_loop) {
+ aif_data->loop_offset = marker_position;
+ aif_data->has_loop = true;
+ }
+ aif_data->num_samples = marker_position;
+ }
+
+ free(marker_name);
+ }
+ }
+ else if (strcmp(chunk_name, "INST") == 0)
+ {
+ uint8_t midi_note = (uint8_t)aif->data[pos++];
+
+ aif_data->midi_note = midi_note;
+
+ // Skip over data we don't need.
+ pos += 19;
+ }
+ else if (strcmp(chunk_name, "SSND") == 0)
+ {
+ // SKip offset and blockSize
+ pos += 8;
+
+ unsigned long num_samples = chunk_size - 8;
+ uint8_t *sample_data = (uint8_t *)malloc(num_samples * sizeof(uint8_t));
+ memcpy(sample_data, &aif->data[pos], num_samples);
+
+ aif_data->samples = sample_data;
+ aif_data->real_num_samples = num_samples;
+ pos += chunk_size - 8;
+ }
+ else
+ {
+ // Skip over unsupported chunks.
+ pos += chunk_size;
+ }
+ }
+}
+
+// This is a table of deltas between sample values in compressed PCM data.
+const int gDeltaEncodingTable[] = {
+ 0, 1, 4, 9, 16, 25, 36, 49,
+ -64, -49, -36, -25, -16, -9, -4, -1,
+};
+
+struct Bytes *delta_decompress(struct Bytes *delta, unsigned int expected_length)
+{
+ struct Bytes *pcm = malloc(sizeof(struct Bytes));
+ pcm->length = expected_length;
+ pcm->data = malloc(pcm->length + 0x40);
+
+ uint8_t hi, lo;
+ unsigned int i = 0;
+ unsigned int j = 0;
+ int k;
+ int8_t base;
+ while (i < delta->length)
+ {
+ base = (int8_t)delta->data[i++];
+ pcm->data[j++] = (uint8_t)base;
+ if (i >= delta->length)
+ {
+ break;
+ }
+ if (j >= pcm->length)
+ {
+ break;
+ }
+ lo = delta->data[i] & 0xf;
+ base += gDeltaEncodingTable[lo];
+ pcm->data[j++] = base;
+ i++;
+ if (i >= delta->length)
+ {
+ break;
+ }
+ if (j >= pcm->length)
+ {
+ break;
+ }
+ for (k = 0; k < 31; k++)
+ {
+ hi = (delta->data[i] >> 4) & 0xf;
+ base += gDeltaEncodingTable[hi];
+ pcm->data[j++] = base;
+ if (j >= pcm->length)
+ {
+ break;
+ }
+ lo = delta->data[i] & 0xf;
+ base += gDeltaEncodingTable[lo];
+ pcm->data[j++] = base;
+ i++;
+ if (i >= delta->length)
+ {
+ break;
+ }
+ if (j >= pcm->length)
+ {
+ break;
+ }
+ }
+ if (j >= pcm->length)
+ {
+ break;
+ }
+ }
+
+ pcm->length = j;
+ return pcm;
+}
+
+int get_delta_index(uint8_t sample, uint8_t prev_sample)
+{
+ int best_error = INT_MAX;
+ int best_index = -1;
+
+ for (int i = 0; i < 16; i++)
+ {
+ uint8_t new_sample = prev_sample + gDeltaEncodingTable[i];
+ int error = sample > new_sample ? sample - new_sample : new_sample - sample;
+
+ if (error < best_error)
+ {
+ best_error = error;
+ best_index = i;
+ }
+ }
+
+ return best_index;
+}
+
+struct Bytes *delta_compress(struct Bytes *pcm)
+{
+ struct Bytes *delta = malloc(sizeof(struct Bytes));
+ // estimate the length so we can malloc
+ int num_blocks = pcm->length / 64;
+ delta->length = num_blocks * 33;
+
+ int extra = pcm->length % 64;
+ if (extra)
+ {
+ delta->length += 1;
+ extra -= 1;
+ }
+ if (extra)
+ {
+ delta->length += 1;
+ extra -= 1;
+ }
+ if (extra)
+ {
+ delta->length += (extra + 1) / 2;
+ }
+
+ delta->data = malloc(delta->length + 33);
+
+ unsigned int i = 0;
+ unsigned int j = 0;
+ int k;
+ uint8_t base;
+ int delta_index;
+
+ while (i < pcm->length)
+ {
+ base = pcm->data[i++];
+ delta->data[j++] = base;
+
+ if (i >= pcm->length)
+ {
+ break;
+ }
+ delta_index = get_delta_index(pcm->data[i++], base);
+ base += gDeltaEncodingTable[delta_index];
+ delta->data[j++] = delta_index;
+
+ for (k = 0; k < 31; k++)
+ {
+ if (i >= pcm->length)
+ {
+ break;
+ }
+ delta_index = get_delta_index(pcm->data[i++], base);
+ base += gDeltaEncodingTable[delta_index];
+ delta->data[j] = (delta_index << 4);
+
+ if (i >= pcm->length)
+ {
+ break;
+ }
+ delta_index = get_delta_index(pcm->data[i++], base);
+ base += gDeltaEncodingTable[delta_index];
+ delta->data[j++] |= delta_index;
+ }
+ }
+
+ delta->length = j;
+
+ return delta;
+}
+
+#define STORE_U32_LE(dest, value) \
+do { \
+ *(dest) = (value) & 0xff; \
+ *((dest) + 1) = ((value) >> 8) & 0xff; \
+ *((dest) + 2) = ((value) >> 16) & 0xff; \
+ *((dest) + 3) = ((value) >> 24) & 0xff; \
+} while (0)
+
+#define LOAD_U32_LE(var, src) \
+do { \
+ (var) = *(src); \
+ (var) |= (*((src) + 1) << 8); \
+ (var) |= (*((src) + 2) << 16); \
+ (var) |= (*((src) + 3) << 24); \
+} while (0)
+
+// Reads an .aif file and produces a .pcm file containing an array of 8-bit samples.
+void aif2pcm(const char *aif_filename, const char *pcm_filename, bool compress)
+{
+ struct Bytes *aif = read_bytearray(aif_filename);
+ AifData aif_data = {0};
+ read_aif(aif, &aif_data);
+
+ int header_size = 0x10;
+ struct Bytes *pcm;
+ struct Bytes output = {0};
+
+ if (compress)
+ {
+ struct Bytes *input = malloc(sizeof(struct Bytes));
+ input->data = aif_data.samples;
+ input->length = aif_data.real_num_samples;
+ pcm = delta_compress(input);
+ free(input);
+ }
+ else
+ {
+ pcm = malloc(sizeof(struct Bytes));
+ pcm->data = aif_data.samples;
+ pcm->length = aif_data.real_num_samples;
+ }
+ output.length = header_size + pcm->length;
+ output.data = malloc(output.length);
+
+ uint32_t pitch_adjust = (uint32_t)(aif_data.sample_rate * 1024);
+ uint32_t loop_offset = (uint32_t)(aif_data.loop_offset);
+ uint32_t adjusted_num_samples = (uint32_t)(aif_data.num_samples - 1);
+ uint32_t flags = 0;
+ if (aif_data.has_loop) flags |= 0x40000000;
+ if (compress) flags |= 1;
+ STORE_U32_LE(output.data + 0, flags);
+ STORE_U32_LE(output.data + 4, pitch_adjust);
+ STORE_U32_LE(output.data + 8, loop_offset);
+ STORE_U32_LE(output.data + 12, adjusted_num_samples);
+ memcpy(&output.data[header_size], pcm->data, pcm->length);
+ write_bytearray(pcm_filename, &output);
+
+ free(aif->data);
+ free(aif);
+ free(pcm);
+ free(output.data);
+ free(aif_data.samples);
+}
+
+// Reads a .pcm file containing an array of 8-bit samples and produces an .aif file.
+// See http://www-mmsp.ece.mcgill.ca/documents/audioformats/aiff/Docs/AIFF-1.3.pdf for .aif file specification.
+void pcm2aif(const char *pcm_filename, const char *aif_filename, uint32_t base_note)
+{
+ struct Bytes *pcm = read_bytearray(pcm_filename);
+
+ AifData *aif_data = malloc(sizeof(AifData));
+
+ uint32_t flags;
+ LOAD_U32_LE(flags, pcm->data + 0);
+ aif_data->has_loop = flags & 0x40000000;
+ bool compressed = flags & 1;
+
+ uint32_t pitch_adjust;
+ LOAD_U32_LE(pitch_adjust, pcm->data + 4);
+ aif_data->sample_rate = pitch_adjust / 1024.0;
+
+ LOAD_U32_LE(aif_data->loop_offset, pcm->data + 8);
+ LOAD_U32_LE(aif_data->num_samples, pcm->data + 12);
+ aif_data->num_samples += 1;
+
+ if (compressed)
+ {
+ struct Bytes *delta = pcm;
+ uint8_t *pcm_data = pcm->data;
+ delta->length -= 0x10;
+ delta->data += 0x10;
+ pcm = delta_decompress(delta, aif_data->num_samples);
+ free(pcm_data);
+ free(delta);
+ }
+ else
+ {
+ pcm->length -= 0x10;
+ pcm->data += 0x10;
+ }
+
+ aif_data->samples = malloc(pcm->length);
+ memcpy(aif_data->samples, pcm->data, pcm->length);
+
+ struct Bytes *aif = malloc(sizeof(struct Bytes));
+ aif->length = 54 + 60 + pcm->length;
+ aif->data = malloc(aif->length);
+
+ long pos = 0;
+
+ // First, write the FORM header chunk.
+ // FORM Chunk ckID
+ aif->data[pos++] = 'F';
+ aif->data[pos++] = 'O';
+ aif->data[pos++] = 'R';
+ aif->data[pos++] = 'M';
+
+ // FORM Chunk ckSize
+ unsigned long form_size = pos;
+ unsigned long data_size = aif->length - 8;
+ aif->data[pos++] = ((data_size >> 24) & 0xFF);
+ aif->data[pos++] = ((data_size >> 16) & 0xFF);
+ aif->data[pos++] = ((data_size >> 8) & 0xFF);
+ aif->data[pos++] = (data_size & 0xFF);
+
+ // FORM Chunk formType
+ aif->data[pos++] = 'A';
+ aif->data[pos++] = 'I';
+ aif->data[pos++] = 'F';
+ aif->data[pos++] = 'F';
+
+ // Next, write the Common Chunk
+ // Common Chunk ckID
+ aif->data[pos++] = 'C';
+ aif->data[pos++] = 'O';
+ aif->data[pos++] = 'M';
+ aif->data[pos++] = 'M';
+
+ // Common Chunk ckSize
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 18;
+
+ // Common Chunk numChannels
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 1; // 1 channel
+
+ // Common Chunk numSampleFrames
+ aif->data[pos++] = ((aif_data->num_samples >> 24) & 0xFF);
+ aif->data[pos++] = ((aif_data->num_samples >> 16) & 0xFF);
+ aif->data[pos++] = ((aif_data->num_samples >> 8) & 0xFF);
+ aif->data[pos++] = (aif_data->num_samples & 0xFF);
+
+ // Common Chunk sampleSize
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 8; // 8 bits per sample
+
+ // Common Chunk sampleRate
+ //double sample_rate = pitch_adjust / 1024.0;
+ uint8_t sample_rate_buffer[10];
+ ieee754_write_extended(aif_data->sample_rate, sample_rate_buffer);
+ for (int i = 0; i < 10; i++)
+ {
+ aif->data[pos++] = sample_rate_buffer[i];
+ }
+
+ if (aif_data->has_loop)
+ {
+
+ // Marker Chunk ckID
+ aif->data[pos++] = 'M';
+ aif->data[pos++] = 'A';
+ aif->data[pos++] = 'R';
+ aif->data[pos++] = 'K';
+
+ // Marker Chunk ckSize
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 12 + (aif_data->has_loop ? 12 : 0);
+
+ // Marker Chunk numMarkers
+ aif->data[pos++] = 0;
+ aif->data[pos++] = (aif_data->has_loop ? 2 : 1);
+
+ // Marker loop start
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 1; // id = 1
+
+ long loop_start = aif_data->loop_offset;
+ aif->data[pos++] = ((loop_start >> 24) & 0xFF);
+ aif->data[pos++] = ((loop_start >> 16) & 0xFF);
+ aif->data[pos++] = ((loop_start >> 8) & 0xFF);
+ aif->data[pos++] = (loop_start & 0xFF); // position
+
+ aif->data[pos++] = 5; // pascal-style string length
+ aif->data[pos++] = 'S';
+ aif->data[pos++] = 'T';
+ aif->data[pos++] = 'A';
+ aif->data[pos++] = 'R';
+ aif->data[pos++] = 'T'; // markerName
+
+ // Marker loop end
+ aif->data[pos++] = 0;
+ aif->data[pos++] = (aif_data->has_loop ? 2 : 1); // id = 2
+
+ long loop_end = aif_data->num_samples;
+ aif->data[pos++] = ((loop_end >> 24) & 0xFF);
+ aif->data[pos++] = ((loop_end >> 16) & 0xFF);
+ aif->data[pos++] = ((loop_end >> 8) & 0xFF);
+ aif->data[pos++] = (loop_end & 0xFF); // position
+
+ aif->data[pos++] = 3; // pascal-style string length
+ aif->data[pos++] = 'E';
+ aif->data[pos++] = 'N';
+ aif->data[pos++] = 'D';
+ }
+
+ // Instrument Chunk ckID
+ aif->data[pos++] = 'I';
+ aif->data[pos++] = 'N';
+ aif->data[pos++] = 'S';
+ aif->data[pos++] = 'T';
+
+ // Instrument Chunk ckSize
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 20;
+
+ aif->data[pos++] = base_note; // baseNote
+ aif->data[pos++] = 0; // detune
+ aif->data[pos++] = 0; // lowNote
+ aif->data[pos++] = 127; // highNote
+ aif->data[pos++] = 1; // lowVelocity
+ aif->data[pos++] = 127; // highVelocity
+ aif->data[pos++] = 0; // gain (hi)
+ aif->data[pos++] = 0; // gain (lo)
+
+ // Instrument Chunk sustainLoop
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 1; // playMode = ForwardLooping
+
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 1; // beginLoop marker id
+
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 2; // endLoop marker id
+
+ // Instrument Chunk releaseLoop
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 1; // playMode = ForwardLooping
+
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 1; // beginLoop marker id
+
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 2; // endLoop marker id
+
+ // Finally, write the Sound Data Chunk
+ // Sound Data Chunk ckID
+ aif->data[pos++] = 'S';
+ aif->data[pos++] = 'S';
+ aif->data[pos++] = 'N';
+ aif->data[pos++] = 'D';
+
+ // Sound Data Chunk ckSize
+ unsigned long sound_data_size = pcm->length + 8;
+ aif->data[pos++] = ((sound_data_size >> 24) & 0xFF);
+ aif->data[pos++] = ((sound_data_size >> 16) & 0xFF);
+ aif->data[pos++] = ((sound_data_size >> 8) & 0xFF);
+ aif->data[pos++] = (sound_data_size & 0xFF);
+
+ // Sound Data Chunk offset
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+
+ // Sound Data Chunk blockSize
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+ aif->data[pos++] = 0;
+
+ // Sound Data Chunk soundData
+ for (unsigned int i = 0; i < aif_data->loop_offset; i++)
+ {
+ aif->data[pos++] = aif_data->samples[i];
+ }
+
+ int j = 0;
+ for (unsigned int i = aif_data->loop_offset; i < pcm->length; i++)
+ {
+ int pcm_index = aif_data->loop_offset + (j++ % (pcm->length - aif_data->loop_offset));
+ aif->data[pos++] = aif_data->samples[pcm_index];
+ }
+
+ aif->length = pos;
+
+ // Go back and rewrite ckSize
+ data_size = aif->length - 8;
+ aif->data[form_size + 0] = ((data_size >> 24) & 0xFF);
+ aif->data[form_size + 1] = ((data_size >> 16) & 0xFF);
+ aif->data[form_size + 2] = ((data_size >> 8) & 0xFF);
+ aif->data[form_size + 3] = (data_size & 0xFF);
+
+ write_bytearray(aif_filename, aif);
+
+ free(aif->data);
+ free(aif);
+}
+
+void usage(void)
+{
+ fprintf(stderr, "Usage: aif2pcm bin_file [aif_file]\n");
+ fprintf(stderr, " aif2pcm aif_file [bin_file] [--compress]\n");
+}
+
+int main(int argc, char **argv)
+{
+ if (argc < 2)
+ {
+ usage();
+ exit(1);
+ }
+
+ char *input_file = argv[1];
+ char *extension = get_file_extension(input_file);
+ char *output_file;
+ bool compressed = false;
+
+ if (argc > 3)
+ {
+ for (int i = 3; i < argc; i++)
+ {
+ if (strcmp(argv[i], "--compress") == 0)
+ {
+ compressed = true;
+ }
+ }
+ }
+
+ if (strcmp(extension, "aif") == 0 || strcmp(extension, "aiff") == 0)
+ {
+ if (argc >= 3)
+ {
+ output_file = argv[2];
+ aif2pcm(input_file, output_file, compressed);
+ }
+ else
+ {
+ output_file = new_file_extension(input_file, "bin");
+ aif2pcm(input_file, output_file, compressed);
+ free(output_file);
+ }
+ }
+ else if (strcmp(extension, "bin") == 0)
+ {
+ if (argc >= 3)
+ {
+ output_file = argv[2];
+ pcm2aif(input_file, output_file, 60);
+ }
+ else
+ {
+ output_file = new_file_extension(input_file, "aif");
+ pcm2aif(input_file, output_file, 60);
+ free(output_file);
+ }
+ }
+ else
+ {
+ FATAL_ERROR("Input file must be .aif or .bin: '%s'\n", input_file);
+ }
+
+ return 0;
+}
diff --git a/tools/bin2c/.gitignore b/tools/bin2c/.gitignore
new file mode 100644
index 000000000..366f3d3e9
--- /dev/null
+++ b/tools/bin2c/.gitignore
@@ -0,0 +1 @@
+bin2c
diff --git a/tools/bin2c/LICENSE b/tools/bin2c/LICENSE
new file mode 100644
index 000000000..534d15349
--- /dev/null
+++ b/tools/bin2c/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2016 YamaArashi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/bin2c/Makefile b/tools/bin2c/Makefile
new file mode 100644
index 000000000..4cc23a25a
--- /dev/null
+++ b/tools/bin2c/Makefile
@@ -0,0 +1,13 @@
+CC = gcc
+
+CFLAGS = -Wall -Wextra -Werror -std=c11 -O2 -s
+
+.PHONY: clean
+
+SRCS = bin2c.c
+
+bin2c: $(SRCS)
+ $(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS)
+
+clean:
+ $(RM) bin2c bin2c.exe
diff --git a/tools/bin2c/bin2c.c b/tools/bin2c/bin2c.c
new file mode 100644
index 000000000..b4bd437f0
--- /dev/null
+++ b/tools/bin2c/bin2c.c
@@ -0,0 +1,201 @@
+// Copyright(c) 2015-2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#endif // _MSC_VER
+
+unsigned char *ReadWholeFile(char *path, int *size)
+{
+ FILE *fp = fopen(path, "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", path);
+
+ fseek(fp, 0, SEEK_END);
+
+ *size = ftell(fp);
+
+ unsigned char *buffer = malloc(*size);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for reading \"%s\".\n", path);
+
+ rewind(fp);
+
+ if (fread(buffer, *size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", path);
+
+ fclose(fp);
+
+ return buffer;
+}
+
+int ExtractData(unsigned char *buffer, int offset, int size)
+{
+ switch (size)
+ {
+ case 1:
+ return buffer[offset];
+ case 2:
+ return (buffer[offset + 1] << 8)
+ | buffer[offset];
+ case 4:
+ return (buffer[offset + 3] << 24)
+ | (buffer[offset + 2] << 16)
+ | (buffer[offset + 1] << 8)
+ | buffer[offset];
+ default:
+ FATAL_ERROR("Invalid size passed to ExtractData.\n");
+ }
+}
+
+int main(int argc, char **argv)
+{
+ if (argc < 3)
+ FATAL_ERROR("Usage: bin2c INPUT_FILE VAR_NAME [OPTIONS...]\n");
+
+ int fileSize;
+ unsigned char *buffer = ReadWholeFile(argv[1], &fileSize);
+ char *var_name = argv[2];
+ int col = 1;
+ int pad = 0;
+ int size = 1;
+ bool isSigned = false;
+ bool isStatic = false;
+ bool isDecimal = false;
+
+ for (int i = 3; i < argc; i++)
+ {
+ if (!strcmp(argv[i], "-col"))
+ {
+ i++;
+
+ if (i >= argc)
+ FATAL_ERROR("Missing argument after '-col'.\n");
+
+ col = atoi(argv[i]);
+ }
+ else if (!strcmp(argv[i], "-pad"))
+ {
+ i++;
+
+ if (i >= argc)
+ FATAL_ERROR("Missing argument after '-pad'.\n");
+
+ pad = atoi(argv[i]);
+ }
+ else if (!strcmp(argv[i], "-size"))
+ {
+ i++;
+
+ if (i >= argc)
+ FATAL_ERROR("Missing argument after '-size'.\n");
+
+ size = atoi(argv[i]);
+
+ if (size != 1 && size != 2 && size != 4)
+ FATAL_ERROR("Size must be 1, 2, or 4.\n");
+ }
+ else if (!strcmp(argv[i], "-signed"))
+ {
+ isSigned = true;
+ isDecimal = true;
+ }
+ else if (!strcmp(argv[i], "-static"))
+ {
+ isStatic = true;
+ }
+ else if (!strcmp(argv[i], "-decimal"))
+ {
+ isDecimal = true;
+ }
+ else
+ {
+ FATAL_ERROR("Unrecognized option '%s'.\n", argv[i]);
+ }
+ }
+
+ if ((fileSize & (size - 1)) != 0)
+ FATAL_ERROR("Size %d doesn't evenly divide file size %d.\n", size, fileSize);
+
+ printf("// Generated file. Do not edit.\n\n");
+
+ if (isStatic)
+ printf("static ");
+
+ printf("const ");
+
+ if (isSigned)
+ printf("s%d ", 8 * size);
+ else
+ printf("u%d ", 8 * size);
+
+ printf("%s[] =\n{", var_name);
+
+ int count = fileSize / size;
+ int offset = 0;
+
+ for (int i = 0; i < count; i++)
+ {
+ if (i % col == 0)
+ printf("\n ");
+
+ int data = ExtractData(buffer, offset, size);
+ offset += size;
+
+ if (isDecimal)
+ {
+ if (isSigned)
+ printf("%*d, ", pad, data);
+ else
+ printf("%*uu, ", pad, data);
+ }
+ else
+ {
+ printf("%#*xu, ", pad, data);
+ }
+ }
+
+ printf("\n};\n");
+
+ return 0;
+}
diff --git a/tools/gbagfx/.gitignore b/tools/gbagfx/.gitignore
new file mode 100644
index 000000000..dbbb3f04c
--- /dev/null
+++ b/tools/gbagfx/.gitignore
@@ -0,0 +1 @@
+gbagfx
diff --git a/tools/gbagfx/LICENSE b/tools/gbagfx/LICENSE
new file mode 100644
index 000000000..b66bf81c0
--- /dev/null
+++ b/tools/gbagfx/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015 YamaArashi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/gbagfx/Makefile b/tools/gbagfx/Makefile
new file mode 100644
index 000000000..d791dabb5
--- /dev/null
+++ b/tools/gbagfx/Makefile
@@ -0,0 +1,15 @@
+CC = gcc
+
+CFLAGS = -Wall -Wextra -Werror -std=c11 -O2 -s -DPNG_SKIP_SETJMP_CHECK
+
+LIBS = -lpng -lz
+
+SRCS = main.c convert_png.c gfx.c jasc_pal.c lz.c rl.c util.c font.c
+
+.PHONY: clean
+
+gbagfx: $(SRCS) convert_png.h gfx.h global.h jasc_pal.h lz.h rl.h util.h font.h
+ $(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS)
+
+clean:
+ $(RM) gbagfx gbagfx.exe
diff --git a/tools/gbagfx/convert_png.c b/tools/gbagfx/convert_png.c
new file mode 100644
index 000000000..37904318c
--- /dev/null
+++ b/tools/gbagfx/convert_png.c
@@ -0,0 +1,212 @@
+// Copyright (c) 2015 YamaArashi
+
+#include <stdio.h>
+#include <setjmp.h>
+#include <png.h>
+#include "global.h"
+#include "convert_png.h"
+#include "gfx.h"
+
+static FILE *PngReadOpen(char *path, png_structp *pngStruct, png_infop *pngInfo)
+{
+ FILE *fp = fopen(path, "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", path);
+
+ unsigned char sig[8];
+
+ if (fread(sig, 8, 1, fp) != 1)
+ FATAL_ERROR("Failed to read PNG signature from \"%s\".\n", path);
+
+ if (png_sig_cmp(sig, 0, 8))
+ FATAL_ERROR("\"%s\" does not have a valid PNG signature.\n", path);
+
+ png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+
+ if (!png_ptr)
+ FATAL_ERROR("Failed to create PNG read struct.\n");
+
+ png_infop info_ptr = png_create_info_struct(png_ptr);
+
+ if (!info_ptr)
+ FATAL_ERROR("Failed to create PNG info struct.\n");
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Failed to init I/O for reading \"%s\".\n", path);
+
+ png_init_io(png_ptr, fp);
+ png_set_sig_bytes(png_ptr, 8);
+ png_read_info(png_ptr, info_ptr);
+
+ *pngStruct = png_ptr;
+ *pngInfo = info_ptr;
+
+ return fp;
+}
+
+void ReadPng(char *path, struct Image *image)
+{
+ png_structp png_ptr;
+ png_infop info_ptr;
+
+ FILE *fp = PngReadOpen(path, &png_ptr, &info_ptr);
+
+ int bit_depth = png_get_bit_depth(png_ptr, info_ptr);
+
+ if (bit_depth != image->bitDepth)
+ FATAL_ERROR("\"%s\" has a bit depth of %d, but the expected bit depth is %d.\n", path, bit_depth, image->bitDepth);
+
+ int color_type = png_get_color_type(png_ptr, info_ptr);
+
+ if (color_type != PNG_COLOR_TYPE_GRAY && color_type != PNG_COLOR_TYPE_PALETTE)
+ FATAL_ERROR("\"%s\" has an unsupported color type.\n", path);
+
+ // Check if the image has a palette so that we can tell if the colors need to be inverted later.
+ // Don't read the palette because it's not needed for now.
+ image->hasPalette = (color_type == PNG_COLOR_TYPE_PALETTE);
+
+ image->width = png_get_image_width(png_ptr, info_ptr);
+ image->height = png_get_image_height(png_ptr, info_ptr);
+
+ int rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+
+ image->pixels = malloc(image->height * rowbytes);
+
+ if (image->pixels == NULL)
+ FATAL_ERROR("Failed to allocate pixel buffer.\n");
+
+ png_bytepp row_pointers = malloc(image->height * sizeof(png_bytep));
+
+ if (row_pointers == NULL)
+ FATAL_ERROR("Failed to allocate row pointers.\n");
+
+ for (int i = 0; i < image->height; i++)
+ row_pointers[i] = (png_bytep)(image->pixels + (i * rowbytes));
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Error reading from \"%s\".\n", path);
+
+ png_read_image(png_ptr, row_pointers);
+
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ free(row_pointers);
+ fclose(fp);
+}
+
+void ReadPngPalette(char *path, struct Palette *palette)
+{
+ png_structp png_ptr;
+ png_infop info_ptr;
+ png_colorp colors;
+ int numColors;
+
+ FILE *fp = PngReadOpen(path, &png_ptr, &info_ptr);
+
+ if (png_get_color_type(png_ptr, info_ptr) != PNG_COLOR_TYPE_PALETTE)
+ FATAL_ERROR("The image \"%s\" does not contain a palette.\n", path);
+
+ if (png_get_PLTE(png_ptr, info_ptr, &colors, &numColors) != PNG_INFO_PLTE)
+ FATAL_ERROR("Failed to retrieve palette from \"%s\".\n", path);
+
+ if (numColors > 256)
+ FATAL_ERROR("Images with more than 256 colors are not supported.\n");
+
+ palette->numColors = numColors;
+ for (int i = 0; i < numColors; i++) {
+ palette->colors[i].red = colors[i].red;
+ palette->colors[i].green = colors[i].green;
+ palette->colors[i].blue = colors[i].blue;
+ }
+
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ fclose(fp);
+}
+
+void SetPngPalette(png_structp png_ptr, png_infop info_ptr, struct Palette *palette)
+{
+ png_colorp colors = malloc(palette->numColors * sizeof(png_color));
+
+ if (colors == NULL)
+ FATAL_ERROR("Failed to allocate PNG palette.\n");
+
+ for (int i = 0; i < palette->numColors; i++) {
+ colors[i].red = palette->colors[i].red;
+ colors[i].green = palette->colors[i].green;
+ colors[i].blue = palette->colors[i].blue;
+ }
+
+ png_set_PLTE(png_ptr, info_ptr, colors, palette->numColors);
+
+ free(colors);
+}
+
+void WritePng(char *path, struct Image *image)
+{
+ FILE *fp = fopen(path, "wb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for writing.\n", path);
+
+ png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+
+ if (!png_ptr)
+ FATAL_ERROR("Failed to create PNG write struct.\n");
+
+ png_infop info_ptr = png_create_info_struct(png_ptr);
+
+ if (!info_ptr)
+ FATAL_ERROR("Failed to create PNG info struct.\n");
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Failed to init I/O for writing \"%s\".\n", path);
+
+ png_init_io(png_ptr, fp);
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Error writing header for \"%s\".\n", path);
+
+ int color_type = image->hasPalette ? PNG_COLOR_TYPE_PALETTE : PNG_COLOR_TYPE_GRAY;
+
+ png_set_IHDR(png_ptr, info_ptr, image->width, image->height,
+ image->bitDepth, color_type, PNG_INTERLACE_NONE,
+ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+
+ if (image->hasPalette) {
+ SetPngPalette(png_ptr, info_ptr, &image->palette);
+
+ if (image->hasTransparency) {
+ png_byte trans = 0;
+ png_set_tRNS(png_ptr, info_ptr, &trans, 1, 0);
+ }
+ }
+
+ png_write_info(png_ptr, info_ptr);
+
+ png_bytepp row_pointers = malloc(image->height * sizeof(png_bytep));
+
+ if (row_pointers == NULL)
+ FATAL_ERROR("Failed to allocate row pointers.\n");
+
+ int rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+
+ for (int i = 0; i < image->height; i++)
+ row_pointers[i] = (png_bytep)(image->pixels + (i * rowbytes));
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Error writing \"%s\".\n", path);
+
+ png_write_image(png_ptr, row_pointers);
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Error ending write of \"%s\".\n", path);
+
+ png_write_end(png_ptr, NULL);
+
+ fclose(fp);
+
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ free(row_pointers);
+}
diff --git a/tools/gbagfx/convert_png.h b/tools/gbagfx/convert_png.h
new file mode 100644
index 000000000..caf081b73
--- /dev/null
+++ b/tools/gbagfx/convert_png.h
@@ -0,0 +1,12 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef CONVERT_PNG_H
+#define CONVERT_PNG_H
+
+#include "gfx.h"
+
+void ReadPng(char *path, struct Image *image);
+void WritePng(char *path, struct Image *image);
+void ReadPngPalette(char *path, struct Palette *palette);
+
+#endif // CONVERT_PNG_H
diff --git a/tools/gbagfx/font.c b/tools/gbagfx/font.c
new file mode 100644
index 000000000..0dd6fbc3e
--- /dev/null
+++ b/tools/gbagfx/font.c
@@ -0,0 +1,326 @@
+// Copyright (c) 2015 YamaArashi
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include "global.h"
+#include "font.h"
+#include "gfx.h"
+#include "util.h"
+
+unsigned char gFontPalette[][3] = {
+ {0x90, 0xC8, 0xFF}, // bg (saturated blue that contrasts well with the shadow color)
+ {0x38, 0x38, 0x38}, // fg (dark grey)
+ {0xD8, 0xD8, 0xD8}, // shadow (light grey)
+ {0xFF, 0xFF, 0xFF} // box (white)
+};
+
+static void ConvertFromLatinFont(unsigned char *src, unsigned char *dest, unsigned int numRows)
+{
+ unsigned int srcPixelsOffset = 0;
+
+ for (unsigned int row = 0; row < numRows; row++) {
+ for (unsigned int column = 0; column < 16; column++) {
+ for (unsigned int glyphTile = 0; glyphTile < 4; glyphTile++) {
+ unsigned int pixelsX = (column * 16) + ((glyphTile & 1) * 8);
+
+ for (unsigned int i = 0; i < 8; i++) {
+ unsigned int pixelsY = (row * 16) + ((glyphTile >> 1) * 8) + i;
+ unsigned int destPixelsOffset = (pixelsY * 64) + (pixelsX / 4);
+
+ dest[destPixelsOffset] = src[srcPixelsOffset + 1];
+ dest[destPixelsOffset + 1] = src[srcPixelsOffset];
+
+ srcPixelsOffset += 2;
+ }
+ }
+ }
+ }
+}
+
+static void ConvertToLatinFont(unsigned char *src, unsigned char *dest, unsigned int numRows)
+{
+ unsigned int destPixelsOffset = 0;
+
+ for (unsigned int row = 0; row < numRows; row++) {
+ for (unsigned int column = 0; column < 16; column++) {
+ for (unsigned int glyphTile = 0; glyphTile < 4; glyphTile++) {
+ unsigned int pixelsX = (column * 16) + ((glyphTile & 1) * 8);
+
+ for (unsigned int i = 0; i < 8; i++) {
+ unsigned int pixelsY = (row * 16) + ((glyphTile >> 1) * 8) + i;
+ unsigned int srcPixelsOffset = (pixelsY * 64) + (pixelsX / 4);
+
+ dest[destPixelsOffset] = src[srcPixelsOffset + 1];
+ dest[destPixelsOffset + 1] = src[srcPixelsOffset];
+
+ destPixelsOffset += 2;
+ }
+ }
+ }
+ }
+}
+
+static void ConvertFromHalfwidthJapaneseFont(unsigned char *src, unsigned char *dest, unsigned int numRows)
+{
+ for (unsigned int row = 0; row < numRows; row++) {
+ for (unsigned int column = 0; column < 16; column++) {
+ unsigned int glyphIndex = (row * 16) + column;
+
+ for (unsigned int glyphTile = 0; glyphTile < 2; glyphTile++) {
+ unsigned int pixelsX = column * 8;
+ unsigned int srcPixelsOffset = 512 * (glyphIndex >> 4) + 16 * (glyphIndex & 0xF) + 256 * glyphTile;
+
+ for (unsigned int i = 0; i < 8; i++) {
+ unsigned int pixelsY = (row * 16) + (glyphTile * 8) + i;
+ unsigned int destPixelsOffset = (pixelsY * 32) + (pixelsX / 4);
+
+ dest[destPixelsOffset] = src[srcPixelsOffset + 1];
+ dest[destPixelsOffset + 1] = src[srcPixelsOffset];
+
+ srcPixelsOffset += 2;
+ }
+ }
+ }
+ }
+}
+
+static void ConvertToHalfwidthJapaneseFont(unsigned char *src, unsigned char *dest, unsigned int numRows)
+{
+ for (unsigned int row = 0; row < numRows; row++) {
+ for (unsigned int column = 0; column < 16; column++) {
+ unsigned int glyphIndex = (row * 16) + column;
+
+ for (unsigned int glyphTile = 0; glyphTile < 2; glyphTile++) {
+ unsigned int pixelsX = column * 8;
+ unsigned int destPixelsOffset = 512 * (glyphIndex >> 4) + 16 * (glyphIndex & 0xF) + 256 * glyphTile;
+
+ for (unsigned int i = 0; i < 8; i++) {
+ unsigned int pixelsY = (row * 16) + (glyphTile * 8) + i;
+ unsigned int srcPixelsOffset = (pixelsY * 32) + (pixelsX / 4);
+
+ dest[destPixelsOffset] = src[srcPixelsOffset + 1];
+ dest[destPixelsOffset + 1] = src[srcPixelsOffset];
+
+ destPixelsOffset += 2;
+ }
+ }
+ }
+ }
+}
+
+static void ConvertFromFullwidthJapaneseFont(unsigned char *src, unsigned char *dest, unsigned int numRows)
+{
+ for (unsigned int row = 0; row < numRows; row++) {
+ for (unsigned int column = 0; column < 16; column++) {
+ unsigned int glyphIndex = (row * 16) + column;
+
+ for (unsigned int glyphTile = 0; glyphTile < 4; glyphTile++) {
+ unsigned int pixelsX = (column * 16) + ((glyphTile & 1) * 8);
+ unsigned int srcPixelsOffset = 512 * (glyphIndex >> 3) + 32 * (glyphIndex & 7) + 256 * (glyphTile >> 1) + 16 * (glyphTile & 1);
+
+ for (unsigned int i = 0; i < 8; i++) {
+ unsigned int pixelsY = (row * 16) + ((glyphTile >> 1) * 8) + i;
+ unsigned int destPixelsOffset = (pixelsY * 64) + (pixelsX / 4);
+
+ dest[destPixelsOffset] = src[srcPixelsOffset + 1];
+ dest[destPixelsOffset + 1] = src[srcPixelsOffset];
+
+ srcPixelsOffset += 2;
+ }
+ }
+ }
+ }
+}
+
+static void ConvertToFullwidthJapaneseFont(unsigned char *src, unsigned char *dest, unsigned int numRows)
+{
+ for (unsigned int row = 0; row < numRows; row++) {
+ for (unsigned int column = 0; column < 16; column++) {
+ unsigned int glyphIndex = (row * 16) + column;
+
+ for (unsigned int glyphTile = 0; glyphTile < 4; glyphTile++) {
+ unsigned int pixelsX = (column * 16) + ((glyphTile & 1) * 8);
+ unsigned int destPixelsOffset = 512 * (glyphIndex >> 3) + 32 * (glyphIndex & 7) + 256 * (glyphTile >> 1) + 16 * (glyphTile & 1);
+
+ for (unsigned int i = 0; i < 8; i++) {
+ unsigned int pixelsY = (row * 16) + ((glyphTile >> 1) * 8) + i;
+ unsigned int srcPixelsOffset = (pixelsY * 64) + (pixelsX / 4);
+
+ dest[destPixelsOffset] = src[srcPixelsOffset + 1];
+ dest[destPixelsOffset + 1] = src[srcPixelsOffset];
+
+ destPixelsOffset += 2;
+ }
+ }
+ }
+ }
+}
+
+static void SetFontPalette(struct Image *image)
+{
+ image->hasPalette = true;
+
+ image->palette.numColors = 4;
+
+ for (int i = 0; i < image->palette.numColors; i++) {
+ image->palette.colors[i].red = gFontPalette[i][0];
+ image->palette.colors[i].green = gFontPalette[i][1];
+ image->palette.colors[i].blue = gFontPalette[i][2];
+ }
+
+ image->hasTransparency = false;
+}
+
+void ReadLatinFont(char *path, struct Image *image)
+{
+ int fileSize;
+ unsigned char *buffer = ReadWholeFile(path, &fileSize);
+
+ int numGlyphs = fileSize / 64;
+
+ if (numGlyphs % 16 != 0)
+ FATAL_ERROR("The number of glyphs (%d) is not a multiple of 16.\n", numGlyphs);
+
+ int numRows = numGlyphs / 16;
+
+ image->width = 256;
+ image->height = numRows * 16;
+ image->bitDepth = 2;
+ image->pixels = malloc(fileSize);
+
+ if (image->pixels == NULL)
+ FATAL_ERROR("Failed to allocate memory for font.\n");
+
+ ConvertFromLatinFont(buffer, image->pixels, numRows);
+
+ free(buffer);
+
+ SetFontPalette(image);
+}
+
+void WriteLatinFont(char *path, struct Image *image)
+{
+ if (image->width != 256)
+ FATAL_ERROR("The width of the font image (%d) is not 256.\n", image->width);
+
+ if (image->height % 16 != 0)
+ FATAL_ERROR("The height of the font image (%d) is not a multiple of 16.\n", image->height);
+
+ int numRows = image->height / 16;
+ int bufferSize = numRows * 16 * 64;
+ unsigned char *buffer = malloc(bufferSize);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for font.\n");
+
+ ConvertToLatinFont(image->pixels, buffer, numRows);
+
+ WriteWholeFile(path, buffer, bufferSize);
+
+ free(buffer);
+}
+
+void ReadHalfwidthJapaneseFont(char *path, struct Image *image)
+{
+ int fileSize;
+ unsigned char *buffer = ReadWholeFile(path, &fileSize);
+
+ int glyphSize = 32;
+
+ if (fileSize % glyphSize != 0)
+ FATAL_ERROR("The file size (%d) is not a multiple of %d.\n", fileSize, glyphSize);
+
+ int numGlyphs = fileSize / glyphSize;
+
+ if (numGlyphs % 16 != 0)
+ FATAL_ERROR("The number of glyphs (%d) is not a multiple of 16.\n", numGlyphs);
+
+ int numRows = numGlyphs / 16;
+
+ image->width = 128;
+ image->height = numRows * 16;
+ image->bitDepth = 2;
+ image->pixels = malloc(fileSize);
+
+ if (image->pixels == NULL)
+ FATAL_ERROR("Failed to allocate memory for font.\n");
+
+ ConvertFromHalfwidthJapaneseFont(buffer, image->pixels, numRows);
+
+ free(buffer);
+
+ SetFontPalette(image);
+}
+
+void WriteHalfwidthJapaneseFont(char *path, struct Image *image)
+{
+ if (image->width != 128)
+ FATAL_ERROR("The width of the font image (%d) is not 128.\n", image->width);
+
+ if (image->height % 16 != 0)
+ FATAL_ERROR("The height of the font image (%d) is not a multiple of 16.\n", image->height);
+
+ int numRows = image->height / 16;
+ int bufferSize = numRows * 16 * 32;
+ unsigned char *buffer = malloc(bufferSize);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for font.\n");
+
+ ConvertToHalfwidthJapaneseFont(image->pixels, buffer, numRows);
+
+ WriteWholeFile(path, buffer, bufferSize);
+
+ free(buffer);
+}
+
+void ReadFullwidthJapaneseFont(char *path, struct Image *image)
+{
+ int fileSize;
+ unsigned char *buffer = ReadWholeFile(path, &fileSize);
+
+ int numGlyphs = fileSize / 64;
+
+ if (numGlyphs % 16 != 0)
+ FATAL_ERROR("The number of glyphs (%d) is not a multiple of 16.\n", numGlyphs);
+
+ int numRows = numGlyphs / 16;
+
+ image->width = 256;
+ image->height = numRows * 16;
+ image->bitDepth = 2;
+ image->pixels = malloc(fileSize);
+
+ if (image->pixels == NULL)
+ FATAL_ERROR("Failed to allocate memory for font.\n");
+
+ ConvertFromFullwidthJapaneseFont(buffer, image->pixels, numRows);
+
+ free(buffer);
+
+ SetFontPalette(image);
+}
+
+void WriteFullwidthJapaneseFont(char *path, struct Image *image)
+{
+ if (image->width != 256)
+ FATAL_ERROR("The width of the font image (%d) is not 256.\n", image->width);
+
+ if (image->height % 16 != 0)
+ FATAL_ERROR("The height of the font image (%d) is not a multiple of 16.\n", image->height);
+
+ int numRows = image->height / 16;
+ int bufferSize = numRows * 16 * 64;
+ unsigned char *buffer = malloc(bufferSize);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for font.\n");
+
+ ConvertToFullwidthJapaneseFont(image->pixels, buffer, numRows);
+
+ WriteWholeFile(path, buffer, bufferSize);
+
+ free(buffer);
+}
diff --git a/tools/gbagfx/font.h b/tools/gbagfx/font.h
new file mode 100644
index 000000000..45086d02a
--- /dev/null
+++ b/tools/gbagfx/font.h
@@ -0,0 +1,16 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef FONT_H
+#define FONT_H
+
+#include <stdbool.h>
+#include "gfx.h"
+
+void ReadLatinFont(char *path, struct Image *image);
+void WriteLatinFont(char *path, struct Image *image);
+void ReadHalfwidthJapaneseFont(char *path, struct Image *image);
+void WriteHalfwidthJapaneseFont(char *path, struct Image *image);
+void ReadFullwidthJapaneseFont(char *path, struct Image *image);
+void WriteFullwidthJapaneseFont(char *path, struct Image *image);
+
+#endif // FONT_H
diff --git a/tools/gbagfx/gfx.c b/tools/gbagfx/gfx.c
new file mode 100644
index 000000000..c0f7f492c
--- /dev/null
+++ b/tools/gbagfx/gfx.c
@@ -0,0 +1,329 @@
+// Copyright (c) 2015 YamaArashi
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include "global.h"
+#include "gfx.h"
+#include "util.h"
+
+#define GET_GBA_PAL_RED(x) (((x) >> 0) & 0x1F)
+#define GET_GBA_PAL_GREEN(x) (((x) >> 5) & 0x1F)
+#define GET_GBA_PAL_BLUE(x) (((x) >> 10) & 0x1F)
+
+#define SET_GBA_PAL(r, g, b) (((b) << 10) | ((g) << 5) | (r))
+
+#define UPCONVERT_BIT_DEPTH(x) (((x) * 255) / 31)
+
+#define DOWNCONVERT_BIT_DEPTH(x) ((x) / 8)
+
+static void ConvertFromTiles1Bpp(unsigned char *src, unsigned char *dest, int numTiles, int tilesWidth, bool invertColors)
+{
+ int tilesX = 0;
+ int tilesY = 0;
+ int pitch = tilesWidth;
+
+ for (int i = 0; i < numTiles; i++) {
+ for (int j = 0; j < 8; j++) {
+ int destY = tilesY * 8 + j;
+ int destX = tilesX;
+ unsigned char srcPixelOctet = *src++;
+ unsigned char *destPixelOctet = &dest[destY * pitch + destX];
+
+ for (int k = 0; k < 8; k++) {
+ *destPixelOctet <<= 1;
+ *destPixelOctet |= (srcPixelOctet & 1) ^ invertColors;
+ srcPixelOctet >>= 1;
+ }
+ }
+
+ tilesX++;
+
+ if (tilesX == tilesWidth) {
+ tilesX = 0;
+ tilesY++;
+ }
+ }
+}
+
+static void ConvertFromTiles4Bpp(unsigned char *src, unsigned char *dest, int numTiles, int tilesWidth, bool invertColors)
+{
+ int tilesX = 0;
+ int tilesY = 0;
+ int pitch = tilesWidth * 4;
+
+ for (int i = 0; i < numTiles; i++) {
+ for (int j = 0; j < 8; j++) {
+ int destY = tilesY * 8 + j;
+
+ for (int k = 0; k < 4; k++) {
+ int destX = tilesX * 4 + k;
+ unsigned char srcPixelPair = *src++;
+ unsigned char leftPixel = srcPixelPair & 0xF;
+ unsigned char rightPixel = srcPixelPair >> 4;
+
+ if (invertColors) {
+ leftPixel = 15 - leftPixel;
+ rightPixel = 15 - rightPixel;
+ }
+
+ dest[destY * pitch + destX] = (leftPixel << 4) | rightPixel;
+ }
+ }
+
+ tilesX++;
+
+ if (tilesX == tilesWidth) {
+ tilesX = 0;
+ tilesY++;
+ }
+ }
+}
+
+static void ConvertFromTiles8Bpp(unsigned char *src, unsigned char *dest, int numTiles, int tilesWidth, bool invertColors)
+{
+ int tilesX = 0;
+ int tilesY = 0;
+ int pitch = tilesWidth * 8;
+
+ for (int i = 0; i < numTiles; i++) {
+ for (int j = 0; j < 8; j++) {
+ int destY = tilesY * 8 + j;
+
+ for (int k = 0; k < 8; k++) {
+ int destX = tilesX * 8 + k;
+ unsigned char srcPixel = *src++;
+
+ if (invertColors)
+ srcPixel = 255 - srcPixel;
+
+ dest[destY * pitch + destX] = srcPixel;
+ }
+ }
+
+ tilesX++;
+
+ if (tilesX == tilesWidth) {
+ tilesX = 0;
+ tilesY++;
+ }
+ }
+}
+
+static void ConvertToTiles1Bpp(unsigned char *src, unsigned char *dest, int numTiles, int tilesWidth, bool invertColors)
+{
+ int tilesX = 0;
+ int tilesY = 0;
+ int pitch = tilesWidth;
+
+ for (int i = 0; i < numTiles; i++) {
+ for (int j = 0; j < 8; j++) {
+ int srcY = tilesY * 8 + j;
+ int srcX = tilesX;
+ unsigned char srcPixelOctet = src[srcY * pitch + srcX];
+ unsigned char *destPixelOctet = dest++;
+
+ for (int k = 0; k < 8; k++) {
+ *destPixelOctet <<= 1;
+ *destPixelOctet |= (srcPixelOctet & 1) ^ invertColors;
+ srcPixelOctet >>= 1;
+ }
+ }
+
+ tilesX++;
+
+ if (tilesX == tilesWidth) {
+ tilesX = 0;
+ tilesY++;
+ }
+ }
+}
+
+static void ConvertToTiles4Bpp(unsigned char *src, unsigned char *dest, int numTiles, int tilesWidth, bool invertColors)
+{
+ int tilesX = 0;
+ int tilesY = 0;
+ int pitch = tilesWidth * 4;
+
+ for (int i = 0; i < numTiles; i++) {
+ for (int j = 0; j < 8; j++) {
+ int srcY = tilesY * 8 + j;
+
+ for (int k = 0; k < 4; k++) {
+ int srcX = tilesX * 4 + k;
+ unsigned char srcPixelPair = src[srcY * pitch + srcX];
+ unsigned char leftPixel = srcPixelPair >> 4;
+ unsigned char rightPixel = srcPixelPair & 0xF;
+
+ if (invertColors) {
+ leftPixel = 15 - leftPixel;
+ rightPixel = 15 - rightPixel;
+ }
+
+ *dest++ = (rightPixel << 4) | leftPixel;
+ }
+ }
+
+ tilesX++;
+
+ if (tilesX == tilesWidth) {
+ tilesX = 0;
+ tilesY++;
+ }
+ }
+}
+
+static void ConvertToTiles8Bpp(unsigned char *src, unsigned char *dest, int numTiles, int tilesWidth, bool invertColors)
+{
+ int tilesX = 0;
+ int tilesY = 0;
+ int pitch = tilesWidth * 8;
+
+ for (int i = 0; i < numTiles; i++) {
+ for (int j = 0; j < 8; j++) {
+ int srcY = tilesY * 8 + j;
+
+ for (int k = 0; k < 8; k++) {
+ int srcX = tilesX * 8 + k;
+ unsigned char srcPixel = src[srcY * pitch + srcX];
+
+ if (invertColors)
+ srcPixel = 255 - srcPixel;
+
+ *dest++ = srcPixel;
+ }
+ }
+
+ tilesX++;
+
+ if (tilesX == tilesWidth) {
+ tilesX = 0;
+ tilesY++;
+ }
+ }
+}
+
+void ReadImage(char *path, int tilesWidth, int bitDepth, struct Image *image, bool invertColors)
+{
+ int tileSize = bitDepth * 8;
+
+ int fileSize;
+ unsigned char *buffer = ReadWholeFile(path, &fileSize);
+
+ int numTiles = fileSize / tileSize;
+
+ int tilesHeight = (numTiles + tilesWidth - 1) / tilesWidth;
+
+ image->width = tilesWidth * 8;
+ image->height = tilesHeight * 8;
+ image->bitDepth = bitDepth;
+ image->pixels = calloc(tilesWidth * tilesHeight, tileSize);
+
+ if (image->pixels == NULL)
+ FATAL_ERROR("Failed to allocate memory for pixels.\n");
+
+ switch (bitDepth) {
+ case 1:
+ ConvertFromTiles1Bpp(buffer, image->pixels, numTiles, tilesWidth, invertColors);
+ break;
+ case 4:
+ ConvertFromTiles4Bpp(buffer, image->pixels, numTiles, tilesWidth, invertColors);
+ break;
+ case 8:
+ ConvertFromTiles8Bpp(buffer, image->pixels, numTiles, tilesWidth, invertColors);
+ break;
+ }
+
+ free(buffer);
+}
+
+void WriteImage(char *path, int numTiles, int bitDepth, struct Image *image, bool invertColors)
+{
+ int tileSize = bitDepth * 8;
+
+ if (image->width % 8 != 0)
+ FATAL_ERROR("The width in pixels (%d) isn't a multiple of 8.\n", image->width);
+
+ if (image->height % 8 != 0)
+ FATAL_ERROR("The height in pixels (%d) isn't a multiple of 8.\n", image->height);
+
+ int tilesWidth = image->width / 8;
+ int tilesHeight = image->height / 8;
+
+ int maxNumTiles = tilesWidth * tilesHeight;
+
+ if (numTiles == 0)
+ numTiles = maxNumTiles;
+ else if (numTiles > maxNumTiles)
+ FATAL_ERROR("The specified number of tiles (%d) is greater than the maximum possible value (%d).\n", numTiles, maxNumTiles);
+
+ int bufferSize = numTiles * tileSize;
+ unsigned char *buffer = malloc(bufferSize);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for pixels.\n");
+
+ switch (bitDepth) {
+ case 1:
+ ConvertToTiles1Bpp(image->pixels, buffer, numTiles, tilesWidth, invertColors);
+ break;
+ case 4:
+ ConvertToTiles4Bpp(image->pixels, buffer, numTiles, tilesWidth, invertColors);
+ break;
+ case 8:
+ ConvertToTiles8Bpp(image->pixels, buffer, numTiles, tilesWidth, invertColors);
+ break;
+ }
+
+ WriteWholeFile(path, buffer, bufferSize);
+
+ free(buffer);
+}
+
+void FreeImage(struct Image *image)
+{
+ free(image->pixels);
+ image->pixels = NULL;
+}
+
+void ReadGbaPalette(char *path, struct Palette *palette)
+{
+ int fileSize;
+ unsigned char *data = ReadWholeFile(path, &fileSize);
+
+ if (fileSize % 2 != 0)
+ FATAL_ERROR("The file size (%d) is not a multiple of 2.\n", fileSize);
+
+ palette->numColors = fileSize / 2;
+
+ for (int i = 0; i < palette->numColors; i++) {
+ uint16_t paletteEntry = (data[i * 2 + 1] << 8) | data[i * 2];
+ palette->colors[i].red = UPCONVERT_BIT_DEPTH(GET_GBA_PAL_RED(paletteEntry));
+ palette->colors[i].green = UPCONVERT_BIT_DEPTH(GET_GBA_PAL_GREEN(paletteEntry));
+ palette->colors[i].blue = UPCONVERT_BIT_DEPTH(GET_GBA_PAL_BLUE(paletteEntry));
+ }
+
+ free(data);
+}
+
+void WriteGbaPalette(char *path, struct Palette *palette)
+{
+ FILE *fp = fopen(path, "wb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for writing.\n", path);
+
+ for (int i = 0; i < palette->numColors; i++) {
+ unsigned char red = DOWNCONVERT_BIT_DEPTH(palette->colors[i].red);
+ unsigned char green = DOWNCONVERT_BIT_DEPTH(palette->colors[i].green);
+ unsigned char blue = DOWNCONVERT_BIT_DEPTH(palette->colors[i].blue);
+
+ uint16_t paletteEntry = SET_GBA_PAL(red, green, blue);
+
+ fputc(paletteEntry & 0xFF, fp);
+ fputc(paletteEntry >> 8, fp);
+ }
+
+ fclose(fp);
+}
diff --git a/tools/gbagfx/gfx.h b/tools/gbagfx/gfx.h
new file mode 100644
index 000000000..ecd436652
--- /dev/null
+++ b/tools/gbagfx/gfx.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef GFX_H
+#define GFX_H
+
+#include <stdint.h>
+#include <stdbool.h>
+
+struct Color {
+ unsigned char red;
+ unsigned char green;
+ unsigned char blue;
+};
+
+struct Palette {
+ struct Color colors[256];
+ int numColors;
+};
+
+struct Image {
+ int width;
+ int height;
+ int bitDepth;
+ unsigned char *pixels;
+ bool hasPalette;
+ struct Palette palette;
+ bool hasTransparency;
+};
+
+void ReadImage(char *path, int tilesWidth, int bitDepth, struct Image *image, bool invertColors);
+void WriteImage(char *path, int numTiles, int bitDepth, struct Image *image, bool invertColors);
+void FreeImage(struct Image *image);
+void ReadGbaPalette(char *path, struct Palette *palette);
+void WriteGbaPalette(char *path, struct Palette *palette);
+
+#endif // GFX_H
diff --git a/tools/gbagfx/global.h b/tools/gbagfx/global.h
new file mode 100644
index 000000000..65dd351d2
--- /dev/null
+++ b/tools/gbagfx/global.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED __attribute__((__unused__))
+
+#endif // _MSC_VER
+
+#endif // GLOBAL_H
diff --git a/tools/gbagfx/jasc_pal.c b/tools/gbagfx/jasc_pal.c
new file mode 100644
index 000000000..e5ba9c3c2
--- /dev/null
+++ b/tools/gbagfx/jasc_pal.c
@@ -0,0 +1,172 @@
+// Copyright (c) 2015 YamaArashi
+
+#include <stdio.h>
+#include <string.h>
+#include "global.h"
+#include "gfx.h"
+#include "util.h"
+
+// Read/write Paint Shop Pro palette files.
+
+// Format of a Paint Shop Pro palette file, line by line:
+// "JASC-PAL\r\n" (signature)
+// "0100\r\n" (version; seems to always be "0100")
+// "<NUMBER_OF_COLORS>\r\n" (number of colors in decimal)
+//
+// <NUMBER_OF_COLORS> times:
+// "<RED> <GREEN> <BLUE>\r\n" (color entry)
+//
+// Each color component is a decimal number from 0 to 255.
+// Examples:
+// Black - "0 0 0\r\n"
+// Blue - "0 0 255\r\n"
+// Brown - "150 75 0\r\n"
+
+#define MAX_LINE_LENGTH 11
+
+void ReadJascPaletteLine(FILE *fp, char *line)
+{
+ int c;
+ int length = 0;
+
+ for (;;)
+ {
+ c = fgetc(fp);
+
+ if (c == '\r')
+ {
+ c = fgetc(fp);
+
+ if (c != '\n')
+ FATAL_ERROR("CR line endings aren't supported.\n");
+
+ line[length] = 0;
+
+ return;
+ }
+
+ if (c == '\n')
+ FATAL_ERROR("LF line endings aren't supported.\n");
+
+ if (c == EOF)
+ FATAL_ERROR("Unexpected EOF. No CRLF at end of file.\n");
+
+ if (c == 0)
+ FATAL_ERROR("NUL character in file.\n");
+
+ if (length == MAX_LINE_LENGTH)
+ {
+ line[length] = 0;
+ FATAL_ERROR("The line \"%s\" is too long.\n", line);
+ }
+
+ line[length++] = c;
+ }
+}
+
+void ReadJascPalette(char *path, struct Palette *palette)
+{
+ char line[MAX_LINE_LENGTH + 1];
+
+ FILE *fp = fopen(path, "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open JASC-PAL file \"%s\" for reading.\n", path);
+
+ ReadJascPaletteLine(fp, line);
+
+ if (strcmp(line, "JASC-PAL") != 0)
+ FATAL_ERROR("Invalid JASC-PAL signature.\n");
+
+ ReadJascPaletteLine(fp, line);
+
+ if (strcmp(line, "0100") != 0)
+ FATAL_ERROR("Unsuported JASC-PAL version.\n");
+
+ ReadJascPaletteLine(fp, line);
+
+ if (!ParseNumber(line, NULL, 10, &palette->numColors))
+ FATAL_ERROR("Failed to parse number of colors.\n");
+
+ if (palette->numColors < 1 || palette->numColors > 256)
+ FATAL_ERROR("%d is an invalid number of colors. The number of colors must be in the range [1, 256].\n", palette->numColors);
+
+ for (int i = 0; i < palette->numColors; i++)
+ {
+ ReadJascPaletteLine(fp, line);
+
+ char *s = line;
+ char *end;
+
+ int red;
+ int green;
+ int blue;
+
+ if (!ParseNumber(s, &end, 10, &red))
+ FATAL_ERROR("Failed to parse red color component.\n");
+
+ s = end;
+
+ if (*s != ' ')
+ FATAL_ERROR("Expected a space after red color component.\n");
+
+ s++;
+
+ if (*s < '0' || *s > '9')
+ FATAL_ERROR("Expected only a space between red and green color components.\n");
+
+ if (!ParseNumber(s, &end, 10, &green))
+ FATAL_ERROR("Failed to parse green color component.\n");
+
+ s = end;
+
+ if (*s != ' ')
+ FATAL_ERROR("Expected a space after green color component.\n");
+
+ s++;
+
+ if (*s < '0' || *s > '9')
+ FATAL_ERROR("Expected only a space between green and blue color components.\n");
+
+ if (!ParseNumber(s, &end, 10, &blue))
+ FATAL_ERROR("Failed to parse blue color component.\n");
+
+ if (*end != 0)
+ FATAL_ERROR("Garbage after blue color component.\n");
+
+ if (red < 0 || red > 255)
+ FATAL_ERROR("Red color component (%d) is outside the range [0, 255].\n", red);
+
+ if (green < 0 || green > 255)
+ FATAL_ERROR("Green color component (%d) is outside the range [0, 255].\n", green);
+
+ if (blue < 0 || blue > 255)
+ FATAL_ERROR("Blue color component (%d) is outside the range [0, 255].\n", blue);
+
+ palette->colors[i].red = red;
+ palette->colors[i].green = green;
+ palette->colors[i].blue = blue;
+ }
+
+ if (fgetc(fp) != EOF)
+ FATAL_ERROR("Garbage after color data.\n");
+
+ fclose(fp);
+}
+
+void WriteJascPalette(char *path, struct Palette *palette)
+{
+ FILE *fp = fopen(path, "wb");
+
+ fputs("JASC-PAL\r\n", fp);
+ fputs("0100\r\n", fp);
+ fprintf(fp, "%d\r\n", palette->numColors);
+
+ for (int i = 0; i < palette->numColors; i++)
+ {
+ struct Color *color = &palette->colors[i];
+ fprintf(fp, "%d %d %d\r\n", color->red, color->green, color->blue);
+ }
+
+ fclose(fp);
+}
diff --git a/tools/gbagfx/jasc_pal.h b/tools/gbagfx/jasc_pal.h
new file mode 100644
index 000000000..b60b31fc8
--- /dev/null
+++ b/tools/gbagfx/jasc_pal.h
@@ -0,0 +1,9 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef JASC_PAL_H
+#define JASC_PAL_H
+
+void ReadJascPalette(char *path, struct Palette *palette);
+void WriteJascPalette(char *path, struct Palette *palette);
+
+#endif // JASC_PAL_H
diff --git a/tools/gbagfx/lz.c b/tools/gbagfx/lz.c
new file mode 100644
index 000000000..c2ba3e327
--- /dev/null
+++ b/tools/gbagfx/lz.c
@@ -0,0 +1,155 @@
+// Copyright (c) 2015 YamaArashi
+
+#include <stdlib.h>
+#include <stdbool.h>
+#include "global.h"
+#include "lz.h"
+
+unsigned char *LZDecompress(unsigned char *src, int srcSize, int *uncompressedSize)
+{
+ if (srcSize < 4)
+ goto fail;
+
+ int destSize = (src[3] << 16) | (src[2] << 8) | src[1];
+
+ unsigned char *dest = malloc(destSize);
+
+ if (dest == NULL)
+ goto fail;
+
+ int srcPos = 4;
+ int destPos = 0;
+
+ for (;;) {
+ if (srcPos >= srcSize)
+ goto fail;
+
+ unsigned char flags = src[srcPos++];
+
+ for (int i = 0; i < 8; i++) {
+ if (flags & 0x80) {
+ if (srcPos + 1 >= srcSize)
+ goto fail;
+
+ int blockSize = (src[srcPos] >> 4) + 3;
+ int blockDistance = (((src[srcPos] & 0xF) << 8) | src[srcPos + 1]) + 1;
+
+ srcPos += 2;
+
+ int blockPos = destPos - blockDistance;
+
+ // Some Ruby/Sapphire tilesets overflow.
+ if (destPos + blockSize > destSize) {
+ blockSize = destSize - destPos;
+ fprintf(stderr, "Destination buffer overflow.\n");
+ }
+
+ if (blockPos < 0)
+ goto fail;
+
+ for (int j = 0; j < blockSize; j++)
+ dest[destPos++] = dest[blockPos + j];
+ } else {
+ if (srcPos >= srcSize || destPos >= destSize)
+ goto fail;
+
+ dest[destPos++] = src[srcPos++];
+ }
+
+ if (destPos == destSize) {
+ *uncompressedSize = destSize;
+ return dest;
+ }
+
+ flags <<= 1;
+ }
+ }
+
+fail:
+ FATAL_ERROR("Fatal error while decompressing LZ file.\n");
+}
+
+unsigned char *LZCompress(unsigned char *src, int srcSize, int *compressedSize)
+{
+ const int minDistance = 2; // for compatibility with LZ77UnCompVram()
+
+ if (srcSize <= 0)
+ goto fail;
+
+ int worstCaseDestSize = 4 + srcSize + ((srcSize + 7) / 8);
+
+ // Round up to the next multiple of four.
+ worstCaseDestSize = (worstCaseDestSize + 3) & ~3;
+
+ unsigned char *dest = malloc(worstCaseDestSize);
+
+ if (dest == NULL)
+ goto fail;
+
+ // header
+ dest[0] = 0x10; // LZ compression type
+ dest[1] = (unsigned char)srcSize;
+ dest[2] = (unsigned char)(srcSize >> 8);
+ dest[3] = (unsigned char)(srcSize >> 16);
+
+ int srcPos = 0;
+ int destPos = 4;
+
+ for (;;) {
+ unsigned char *flags = &dest[destPos++];
+ *flags = 0;
+
+ for (int i = 0; i < 8; i++) {
+ int bestBlockDistance = 0;
+ int bestBlockSize = 0;
+ int blockDistance = minDistance;
+
+ while (blockDistance <= srcPos && blockDistance <= 0x1000) {
+ int blockStart = srcPos - blockDistance;
+ int blockSize = 0;
+
+ while (blockSize < 18
+ && srcPos + blockSize < srcSize
+ && src[blockStart + blockSize] == src[srcPos + blockSize])
+ blockSize++;
+
+ if (blockSize > bestBlockSize) {
+ bestBlockDistance = blockDistance;
+ bestBlockSize = blockSize;
+
+ if (blockSize == 18)
+ break;
+ }
+
+ blockDistance++;
+ }
+
+ if (bestBlockSize >= 3) {
+ *flags |= (0x80 >> i);
+ srcPos += bestBlockSize;
+ bestBlockSize -= 3;
+ bestBlockDistance--;
+ dest[destPos++] = (bestBlockSize << 4) | ((unsigned int)bestBlockDistance >> 8);
+ dest[destPos++] = (unsigned char)bestBlockDistance;
+ } else {
+ dest[destPos++] = src[srcPos++];
+ }
+
+ if (srcPos == srcSize) {
+ // Pad to multiple of 4 bytes.
+ int remainder = destPos % 4;
+
+ if (remainder != 0) {
+ for (int i = 0; i < 4 - remainder; i++)
+ dest[destPos++] = 0;
+ }
+
+ *compressedSize = destPos;
+ return dest;
+ }
+ }
+ }
+
+fail:
+ FATAL_ERROR("Fatal error while compressing LZ file.\n");
+}
diff --git a/tools/gbagfx/lz.h b/tools/gbagfx/lz.h
new file mode 100644
index 000000000..164d62279
--- /dev/null
+++ b/tools/gbagfx/lz.h
@@ -0,0 +1,9 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef LZ_H
+#define LZ_H
+
+unsigned char *LZDecompress(unsigned char *src, int srcSize, int *uncompressedSize);
+unsigned char *LZCompress(unsigned char *src, int srcSize, int *compressedSize);
+
+#endif // LZ_H
diff --git a/tools/gbagfx/main.c b/tools/gbagfx/main.c
new file mode 100644
index 000000000..97db60e84
--- /dev/null
+++ b/tools/gbagfx/main.c
@@ -0,0 +1,402 @@
+// Copyright (c) 2015 YamaArashi
+
+#include <stdio.h>
+#include <string.h>
+#include <stdbool.h>
+#include "global.h"
+#include "util.h"
+#include "gfx.h"
+#include "convert_png.h"
+#include "jasc_pal.h"
+#include "lz.h"
+#include "rl.h"
+#include "font.h"
+
+struct CommandHandler
+{
+ const char *inputFileExtension;
+ const char *outputFileExtension;
+ void(*function)(char *inputPath, char *outputPath, int argc, char **argv);
+};
+
+void ConvertGbaToPng(char *inputPath, char *outputPath, int width, int bitDepth, char *paletteFilePath, bool hasTransparency)
+{
+ struct Image image;
+
+ if (paletteFilePath != NULL)
+ {
+ ReadGbaPalette(paletteFilePath, &image.palette);
+ image.hasPalette = true;
+ }
+ else
+ {
+ image.hasPalette = false;
+ }
+
+ ReadImage(inputPath, width, bitDepth, &image, !image.hasPalette);
+
+ image.hasTransparency = hasTransparency;
+
+ WritePng(outputPath, &image);
+
+ FreeImage(&image);
+}
+
+void ConvertPngToGba(char *inputPath, char *outputPath, int numTiles, int bitDepth)
+{
+ struct Image image;
+
+ image.bitDepth = bitDepth;
+
+ ReadPng(inputPath, &image);
+
+ WriteImage(outputPath, numTiles, bitDepth, &image, !image.hasPalette);
+
+ FreeImage(&image);
+}
+
+void HandleGbaToPngCommand(char *inputPath, char *outputPath, int argc, char **argv)
+{
+ char *inputFileExtension = GetFileExtension(inputPath);
+ int bitDepth = inputFileExtension[0] - '0';
+ char *paletteFilePath = NULL;
+ bool hasTransparency = false;
+ int width = 1;
+
+ for (int i = 3; i < argc; i++)
+ {
+ char *option = argv[i];
+
+ if (strcmp(option, "-palette") == 0)
+ {
+ if (i + 1 >= argc)
+ FATAL_ERROR("No palette file path following \"-palette\".\n");
+
+ i++;
+
+ paletteFilePath = argv[i];
+ }
+ else if (strcmp(option, "-object") == 0)
+ {
+ hasTransparency = true;
+ }
+ else if (strcmp(option, "-width") == 0)
+ {
+ if (i + 1 >= argc)
+ FATAL_ERROR("No width following \"-width\".\n");
+
+ i++;
+
+ if (!ParseNumber(argv[i], NULL, 10, &width))
+ FATAL_ERROR("Failed to parse width.\n");
+
+ if (width < 1)
+ FATAL_ERROR("Width must be positive.\n");
+ }
+ else
+ {
+ FATAL_ERROR("Unrecognized option \"%s\".\n", option);
+ }
+ }
+
+ ConvertGbaToPng(inputPath, outputPath, width, bitDepth, paletteFilePath, hasTransparency);
+}
+
+void HandlePngToGbaCommand(char *inputPath, char *outputPath, int argc, char **argv)
+{
+ char *outputFileExtension = GetFileExtension(outputPath);
+ int bitDepth = outputFileExtension[0] - '0';
+ int numTiles = 0;
+
+ for (int i = 3; i < argc; i++)
+ {
+ char *option = argv[i];
+
+ if (strcmp(option, "-num_tiles") == 0)
+ {
+ if (i + 1 >= argc)
+ FATAL_ERROR("No number of tiles following \"-num_tiles\".\n");
+
+ i++;
+
+ if (!ParseNumber(argv[i], NULL, 10, &numTiles))
+ FATAL_ERROR("Failed to parse number of tiles.\n");
+
+ if (numTiles < 1)
+ FATAL_ERROR("Number of tiles must be positive.\n");
+ }
+ else
+ {
+ FATAL_ERROR("Unrecognized option \"%s\".\n", option);
+ }
+ }
+
+ ConvertPngToGba(inputPath, outputPath, numTiles, bitDepth);
+}
+
+void HandlePngToGbaPaletteCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ struct Palette palette;
+
+ ReadPngPalette(inputPath, &palette);
+ WriteGbaPalette(outputPath, &palette);
+}
+
+void HandleGbaToJascPaletteCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ struct Palette palette;
+
+ ReadGbaPalette(inputPath, &palette);
+ WriteJascPalette(outputPath, &palette);
+}
+
+void HandleJascToGbaPaletteCommand(char *inputPath, char *outputPath, int argc, char **argv)
+{
+ int numColors = 0;
+
+ for (int i = 3; i < argc; i++)
+ {
+ char *option = argv[i];
+
+ if (strcmp(option, "-num_colors") == 0)
+ {
+ if (i + 1 >= argc)
+ FATAL_ERROR("No number of colors following \"-num_colors\".\n");
+
+ i++;
+
+ if (!ParseNumber(argv[i], NULL, 10, &numColors))
+ FATAL_ERROR("Failed to parse number of colors.\n");
+
+ if (numColors < 1)
+ FATAL_ERROR("Number of colors must be positive.\n");
+ }
+ else
+ {
+ FATAL_ERROR("Unrecognized option \"%s\".\n", option);
+ }
+ }
+
+ struct Palette palette;
+
+ ReadJascPalette(inputPath, &palette);
+
+ if (numColors != 0)
+ palette.numColors = numColors;
+
+ WriteGbaPalette(outputPath, &palette);
+}
+
+void HandleLatinFontToPngCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ struct Image image;
+
+ ReadLatinFont(inputPath, &image);
+ WritePng(outputPath, &image);
+
+ FreeImage(&image);
+}
+
+void HandlePngToLatinFontCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ struct Image image;
+
+ image.bitDepth = 2;
+
+ ReadPng(inputPath, &image);
+ WriteLatinFont(outputPath, &image);
+
+ FreeImage(&image);
+}
+
+void HandleHalfwidthJapaneseFontToPngCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ struct Image image;
+
+ ReadHalfwidthJapaneseFont(inputPath, &image);
+ WritePng(outputPath, &image);
+
+ FreeImage(&image);
+}
+
+void HandlePngToHalfwidthJapaneseFontCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ struct Image image;
+
+ image.bitDepth = 2;
+
+ ReadPng(inputPath, &image);
+ WriteHalfwidthJapaneseFont(outputPath, &image);
+
+ FreeImage(&image);
+}
+
+void HandleFullwidthJapaneseFontToPngCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ struct Image image;
+
+ ReadFullwidthJapaneseFont(inputPath, &image);
+ WritePng(outputPath, &image);
+
+ FreeImage(&image);
+}
+
+void HandlePngToFullwidthJapaneseFontCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ struct Image image;
+
+ image.bitDepth = 2;
+
+ ReadPng(inputPath, &image);
+ WriteFullwidthJapaneseFont(outputPath, &image);
+
+ FreeImage(&image);
+}
+
+void HandleLZCompressCommand(char *inputPath, char *outputPath, int argc, char **argv)
+{
+ int overflowSize = 0;
+
+ for (int i = 3; i < argc; i++)
+ {
+ char *option = argv[i];
+
+ if (strcmp(option, "-overflow") == 0)
+ {
+ if (i + 1 >= argc)
+ FATAL_ERROR("No size following \"-overflow\".\n");
+
+ i++;
+
+ if (!ParseNumber(argv[i], NULL, 10, &overflowSize))
+ FATAL_ERROR("Failed to parse overflow size.\n");
+
+ if (overflowSize < 1)
+ FATAL_ERROR("Overflow size must be positive.\n");
+ }
+ else
+ {
+ FATAL_ERROR("Unrecognized option \"%s\".\n", option);
+ }
+ }
+
+ // The overflow option allows a quirk in some of Ruby/Sapphire's tilesets
+ // to be reproduced. It works by appending a number of zeros to the data
+ // before compressing it and then amending the LZ header's size field to
+ // reflect the expected size. This will cause an overflow when decompressing
+ // the data.
+
+ int fileSize;
+ unsigned char *buffer = ReadWholeFileZeroPadded(inputPath, &fileSize, overflowSize);
+
+ int compressedSize;
+ unsigned char *compressedData = LZCompress(buffer, fileSize + overflowSize, &compressedSize);
+
+ compressedData[1] = (unsigned char)fileSize;
+ compressedData[2] = (unsigned char)(fileSize >> 8);
+ compressedData[3] = (unsigned char)(fileSize >> 16);
+
+ free(buffer);
+
+ WriteWholeFile(outputPath, compressedData, compressedSize);
+
+ free(compressedData);
+}
+
+void HandleLZDecompressCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ int fileSize;
+ unsigned char *buffer = ReadWholeFile(inputPath, &fileSize);
+
+ int uncompressedSize;
+ unsigned char *uncompressedData = LZDecompress(buffer, fileSize, &uncompressedSize);
+
+ free(buffer);
+
+ WriteWholeFile(outputPath, uncompressedData, uncompressedSize);
+
+ free(uncompressedData);
+}
+
+void HandleRLCompressCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ int fileSize;
+ unsigned char *buffer = ReadWholeFile(inputPath, &fileSize);
+
+ int compressedSize;
+ unsigned char *compressedData = RLCompress(buffer, fileSize, &compressedSize);
+
+ free(buffer);
+
+ WriteWholeFile(outputPath, compressedData, compressedSize);
+
+ free(compressedData);
+}
+
+void HandleRLDecompressCommand(char *inputPath, char *outputPath, int argc UNUSED, char **argv UNUSED)
+{
+ int fileSize;
+ unsigned char *buffer = ReadWholeFile(inputPath, &fileSize);
+
+ int uncompressedSize;
+ unsigned char *uncompressedData = RLDecompress(buffer, fileSize, &uncompressedSize);
+
+ free(buffer);
+
+ WriteWholeFile(outputPath, uncompressedData, uncompressedSize);
+
+ free(uncompressedData);
+}
+
+int main(int argc, char **argv)
+{
+ if (argc < 3)
+ FATAL_ERROR("Usage: gbagfx INPUT_PATH OUTPUT_PATH [options...]\n");
+
+ struct CommandHandler handlers[] =
+ {
+ { "1bpp", "png", HandleGbaToPngCommand },
+ { "4bpp", "png", HandleGbaToPngCommand },
+ { "8bpp", "png", HandleGbaToPngCommand },
+ { "png", "1bpp", HandlePngToGbaCommand },
+ { "png", "4bpp", HandlePngToGbaCommand },
+ { "png", "8bpp", HandlePngToGbaCommand },
+ { "png", "gbapal", HandlePngToGbaPaletteCommand },
+ { "gbapal", "pal", HandleGbaToJascPaletteCommand },
+ { "pal", "gbapal", HandleJascToGbaPaletteCommand },
+ { "latfont", "png", HandleLatinFontToPngCommand },
+ { "png", "latfont", HandlePngToLatinFontCommand },
+ { "hwjpnfont", "png", HandleHalfwidthJapaneseFontToPngCommand },
+ { "png", "hwjpnfont", HandlePngToHalfwidthJapaneseFontCommand },
+ { "fwjpnfont", "png", HandleFullwidthJapaneseFontToPngCommand },
+ { "png", "fwjpnfont", HandlePngToFullwidthJapaneseFontCommand },
+ { NULL, "lz", HandleLZCompressCommand },
+ { "lz", NULL, HandleLZDecompressCommand },
+ { NULL, "rl", HandleRLCompressCommand },
+ { "rl", NULL, HandleRLDecompressCommand },
+ { NULL, NULL, NULL }
+ };
+
+ char *inputPath = argv[1];
+ char *outputPath = argv[2];
+ char *inputFileExtension = GetFileExtension(inputPath);
+ char *outputFileExtension = GetFileExtension(outputPath);
+
+ if (inputFileExtension == NULL)
+ FATAL_ERROR("Input file \"%s\" has no extension.\n", inputPath);
+
+ if (outputFileExtension == NULL)
+ FATAL_ERROR("Output file \"%s\" has no extension.\n", outputPath);
+
+ for (int i = 0; handlers[i].function != NULL; i++)
+ {
+ if ((handlers[i].inputFileExtension == NULL || strcmp(handlers[i].inputFileExtension, inputFileExtension) == 0)
+ && (handlers[i].outputFileExtension == NULL || strcmp(handlers[i].outputFileExtension, outputFileExtension) == 0))
+ {
+ handlers[i].function(inputPath, outputPath, argc, argv);
+ return 0;
+ }
+ }
+
+ FATAL_ERROR("Don't know how to convert \"%s\" to \"%s\".\n", inputPath, outputPath);
+}
diff --git a/tools/gbagfx/rl.c b/tools/gbagfx/rl.c
new file mode 100644
index 000000000..968c9347e
--- /dev/null
+++ b/tools/gbagfx/rl.c
@@ -0,0 +1,149 @@
+// Copyright (c) 2016 YamaArashi
+
+#include <stdlib.h>
+#include <stdbool.h>
+#include "global.h"
+#include "rl.h"
+
+unsigned char *RLDecompress(unsigned char *src, int srcSize, int *uncompressedSize)
+{
+ if (srcSize < 4)
+ goto fail;
+
+ int destSize = (src[3] << 16) | (src[2] << 8) | src[1];
+
+ unsigned char *dest = malloc(destSize);
+
+ if (dest == NULL)
+ goto fail;
+
+ int srcPos = 4;
+ int destPos = 0;
+
+ for (;;)
+ {
+ if (srcPos >= srcSize)
+ goto fail;
+
+ unsigned char flags = src[srcPos++];
+ bool compressed = ((flags & 0x80) != 0);
+
+ if (compressed)
+ {
+ int length = (flags & 0x7F) + 3;
+ unsigned char data = src[srcPos++];
+
+ if (destPos + length > destSize)
+ goto fail;
+
+ for (int i = 0; i < length; i++)
+ dest[destPos++] = data;
+ }
+ else
+ {
+ int length = (flags & 0x7F) + 1;
+
+ if (destPos + length > destSize)
+ goto fail;
+
+ for (int i = 0; i < length; i++)
+ dest[destPos++] = src[srcPos++];
+ }
+
+ if (destPos == destSize)
+ {
+ *uncompressedSize = destSize;
+ return dest;
+ }
+ }
+
+fail:
+ FATAL_ERROR("Fatal error while decompressing RL file.\n");
+}
+
+unsigned char *RLCompress(unsigned char *src, int srcSize, int *compressedSize)
+{
+ if (srcSize <= 0)
+ goto fail;
+
+ int worstCaseDestSize = 4 + srcSize * 2;
+
+ // Round up to the next multiple of four.
+ worstCaseDestSize = (worstCaseDestSize + 3) & ~3;
+
+ unsigned char *dest = malloc(worstCaseDestSize);
+
+ if (dest == NULL)
+ goto fail;
+
+ // header
+ dest[0] = 0x30; // RL compression type
+ dest[1] = (unsigned char)srcSize;
+ dest[2] = (unsigned char)(srcSize >> 8);
+ dest[3] = (unsigned char)(srcSize >> 16);
+
+ int srcPos = 0;
+ int destPos = 4;
+
+ for (;;)
+ {
+ bool compress = false;
+ int uncompressedStart = srcPos;
+ int uncompressedLength = 0;
+
+ while (srcPos < srcSize && uncompressedLength < (0x7F + 1))
+ {
+ compress = (srcPos + 2 < srcSize && src[srcPos] == src[srcPos + 1] && src[srcPos] == src[srcPos + 2]);
+
+ if (compress)
+ break;
+
+ srcPos++;
+ uncompressedLength++;
+ }
+
+ if (uncompressedLength > 0)
+ {
+ dest[destPos++] = uncompressedLength - 1;
+
+ for (int i = 0; i < uncompressedLength; i++)
+ dest[destPos++] = src[uncompressedStart + i];
+ }
+
+ if (compress)
+ {
+ unsigned char data = src[srcPos];
+ int compressedLength = 0;
+
+ while (compressedLength < (0x7F + 3)
+ && srcPos + compressedLength < srcSize
+ && src[srcPos + compressedLength] == data)
+ {
+ compressedLength++;
+ }
+
+ dest[destPos++] = 0x80 | (compressedLength - 3);
+ dest[destPos++] = data;
+
+ srcPos += compressedLength;
+ }
+
+ if (srcPos == srcSize)
+ {
+ // Pad to multiple of 4 bytes.
+ int remainder = destPos % 4;
+
+ if (remainder != 0)
+ {
+ for (int i = 0; i < 4 - remainder; i++)
+ dest[destPos++] = 0;
+ }
+
+ *compressedSize = destPos;
+ return dest;
+ }
+ }
+
+fail:
+ FATAL_ERROR("Fatal error while compressing RL file.\n");
+}
diff --git a/tools/gbagfx/rl.h b/tools/gbagfx/rl.h
new file mode 100644
index 000000000..02ad8d6d3
--- /dev/null
+++ b/tools/gbagfx/rl.h
@@ -0,0 +1,9 @@
+// Copyright (c) 2016 YamaArashi
+
+#ifndef RL_H
+#define RL_H
+
+unsigned char *RLDecompress(unsigned char *src, int srcSize, int *uncompressedSize);
+unsigned char *RLCompress(unsigned char *src, int srcSize, int *compressedSize);
+
+#endif // RL_H
diff --git a/tools/gbagfx/util.c b/tools/gbagfx/util.c
new file mode 100644
index 000000000..87abeb31c
--- /dev/null
+++ b/tools/gbagfx/util.c
@@ -0,0 +1,124 @@
+// Copyright (c) 2015 YamaArashi
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include <errno.h>
+#include <limits.h>
+#include "global.h"
+#include "util.h"
+
+bool ParseNumber(char *s, char **end, int radix, int *intValue)
+{
+ char *localEnd;
+
+ if (end == NULL)
+ end = &localEnd;
+
+ errno = 0;
+
+ const long longValue = strtol(s, end, radix);
+
+ if (*end == s)
+ return false; // not a number
+
+ if ((longValue == LONG_MIN || longValue == LONG_MAX) && errno == ERANGE)
+ return false;
+
+ if (longValue > INT_MAX)
+ return false;
+
+ if (longValue < INT_MIN)
+ return false;
+
+ *intValue = (int)longValue;
+
+ return true;
+}
+
+char *GetFileExtension(char *path)
+{
+ char *extension = path;
+
+ while (*extension != 0)
+ extension++;
+
+ while (extension > path && *extension != '.')
+ extension--;
+
+ if (extension == path)
+ return NULL;
+
+ extension++;
+
+ if (*extension == 0)
+ return NULL;
+
+ return extension;
+}
+
+unsigned char *ReadWholeFile(char *path, int *size)
+{
+ FILE *fp = fopen(path, "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", path);
+
+ fseek(fp, 0, SEEK_END);
+
+ *size = ftell(fp);
+
+ unsigned char *buffer = malloc(*size);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for reading \"%s\".\n", path);
+
+ rewind(fp);
+
+ if (fread(buffer, *size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", path);
+
+ fclose(fp);
+
+ return buffer;
+}
+
+unsigned char *ReadWholeFileZeroPadded(char *path, int *size, int padAmount)
+{
+ FILE *fp = fopen(path, "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", path);
+
+ fseek(fp, 0, SEEK_END);
+
+ *size = ftell(fp);
+
+ unsigned char *buffer = calloc(*size + padAmount, 1);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for reading \"%s\".\n", path);
+
+ rewind(fp);
+
+ if (fread(buffer, *size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", path);
+
+ fclose(fp);
+
+ return buffer;
+}
+
+void WriteWholeFile(char *path, void *buffer, int bufferSize)
+{
+ FILE *fp = fopen(path, "wb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for writing.\n", path);
+
+ if (fwrite(buffer, bufferSize, 1, fp) != 1)
+ FATAL_ERROR("Failed to write to \"%s\".\n", path);
+
+ fclose(fp);
+}
diff --git a/tools/gbagfx/util.h b/tools/gbagfx/util.h
new file mode 100644
index 000000000..6d7a9c21e
--- /dev/null
+++ b/tools/gbagfx/util.h
@@ -0,0 +1,14 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef UTIL_H
+#define UTIL_H
+
+#include <stdbool.h>
+
+bool ParseNumber(char *s, char **end, int radix, int *intValue);
+char *GetFileExtension(char *path);
+unsigned char *ReadWholeFile(char *path, int *size);
+unsigned char *ReadWholeFileZeroPadded(char *path, int *size, int padAmount);
+void WriteWholeFile(char *path, void *buffer, int bufferSize);
+
+#endif // UTIL_H
diff --git a/tools/mid2agb/.gitignore b/tools/mid2agb/.gitignore
new file mode 100644
index 000000000..0e7264c86
--- /dev/null
+++ b/tools/mid2agb/.gitignore
@@ -0,0 +1 @@
+mid2agb
diff --git a/tools/mid2agb/LICENSE b/tools/mid2agb/LICENSE
new file mode 100644
index 000000000..534d15349
--- /dev/null
+++ b/tools/mid2agb/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2016 YamaArashi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/mid2agb/Makefile b/tools/mid2agb/Makefile
new file mode 100644
index 000000000..f27f2cad4
--- /dev/null
+++ b/tools/mid2agb/Makefile
@@ -0,0 +1,15 @@
+CXX := g++
+
+CXXFLAGS := -std=c++11 -O2 -s -Wall -Wno-switch -Werror
+
+SRCS := agb.cpp error.cpp main.cpp midi.cpp tables.cpp
+
+HEADERS := agb.h error.h main.h midi.h tables.h
+
+.PHONY: clean
+
+mid2agb: $(SRCS) $(HEADERS)
+ $(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
+
+clean:
+ $(RM) mid2agb mid2agb.exe
diff --git a/tools/mid2agb/agb.cpp b/tools/mid2agb/agb.cpp
new file mode 100644
index 000000000..9ff1efa86
--- /dev/null
+++ b/tools/mid2agb/agb.cpp
@@ -0,0 +1,462 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstdarg>
+#include <cstring>
+#include <vector>
+#include "agb.h"
+#include "main.h"
+#include "midi.h"
+#include "tables.h"
+
+int g_agbTrack;
+
+static std::string s_lastOpName;
+static int s_blockNum;
+static bool s_keepLastOpName;
+static int s_lastNote;
+static int s_lastVelocity;
+static bool s_noteChanged;
+static bool s_velocityChanged;
+static bool s_inPattern;
+static int s_extendedCommand;
+
+void PrintAgbHeader()
+{
+ std::fprintf(g_outputFile, "\t.include \"MPlayDef.s\"\n\n");
+ std::fprintf(g_outputFile, "\t.equ\t%s_grp, voicegroup%03u\n", g_asmLabel.c_str(), g_voiceGroup);
+ std::fprintf(g_outputFile, "\t.equ\t%s_pri, %u\n", g_asmLabel.c_str(), g_priority);
+
+ if (g_reverb >= 0)
+ std::fprintf(g_outputFile, "\t.equ\t%s_rev, reverb_set+%u\n", g_asmLabel.c_str(), g_reverb);
+ else
+ std::fprintf(g_outputFile, "\t.equ\t%s_rev, 0\n", g_asmLabel.c_str());
+
+ std::fprintf(g_outputFile, "\t.equ\t%s_mvl, %u\n", g_asmLabel.c_str(), g_masterVolume);
+ std::fprintf(g_outputFile, "\t.equ\t%s_key, %u\n", g_asmLabel.c_str(), 0);
+ std::fprintf(g_outputFile, "\t.equ\t%s_tbs, %u\n", g_asmLabel.c_str(), g_clocksPerBeat);
+ std::fprintf(g_outputFile, "\t.equ\t%s_exg, %u\n", g_asmLabel.c_str(), g_exactGateTime);
+ std::fprintf(g_outputFile, "\t.equ\t%s_cmp, %u\n", g_asmLabel.c_str(), g_compressionEnabled);
+
+ std::fprintf(g_outputFile, "\n\t.section .rodata\n");
+ std::fprintf(g_outputFile, "\t.global\t%s\n", g_asmLabel.c_str());
+
+ std::fprintf(g_outputFile, "\t.align\t2\n");
+}
+
+void ResetTrackVars()
+{
+ s_lastVelocity = -1;
+ s_lastNote = -1;
+ s_velocityChanged = false;
+ s_noteChanged = false;
+ s_keepLastOpName = false;
+ s_lastOpName = "";
+ s_inPattern = false;
+}
+
+void PrintWait(int wait)
+{
+ if (wait > 0)
+ {
+ std::fprintf(g_outputFile, "\t.byte\tW%02d\n", wait);
+ s_velocityChanged = true;
+ s_noteChanged = true;
+ s_keepLastOpName = true;
+ }
+}
+
+void PrintOp(int wait, std::string name, const char *format, ...)
+{
+ std::va_list args;
+ va_start(args, format);
+ std::fprintf(g_outputFile, "\t.byte\t\t");
+
+ if (format != nullptr)
+ {
+ if (!g_compressionEnabled || s_lastOpName != name)
+ {
+ std::fprintf(g_outputFile, "%s, ", name.c_str());
+ s_lastOpName = name;
+ }
+ else
+ {
+ std::fprintf(g_outputFile, " ");
+ }
+ std::vfprintf(g_outputFile, format, args);
+ }
+ else
+ {
+ std::fputs(name.c_str(), g_outputFile);
+ s_lastOpName = name;
+ }
+
+ std::fprintf(g_outputFile, "\n");
+
+ va_end(args);
+
+ PrintWait(wait);
+}
+
+void PrintByte(const char *format, ...)
+{
+ std::va_list args;
+ va_start(args, format);
+ std::fprintf(g_outputFile, "\t.byte\t");
+ std::vfprintf(g_outputFile, format, args);
+ std::fprintf(g_outputFile, "\n");
+ s_velocityChanged = true;
+ s_noteChanged = true;
+ s_keepLastOpName = true;
+ va_end(args);
+}
+
+void PrintWord(const char *format, ...)
+{
+ std::va_list args;
+ va_start(args, format);
+ std::fprintf(g_outputFile, "\t .word\t");
+ std::vfprintf(g_outputFile, format, args);
+ std::fprintf(g_outputFile, "\n");
+ va_end(args);
+}
+
+void PrintNote(const Event& event)
+{
+ int note = event.note;
+ int velocity = g_noteVelocityLUT[event.param1];
+ int duration = -1;
+
+ if (event.param2 != -1)
+ duration = g_noteDurationLUT[event.param2];
+
+ int gateTimeParam = 0;
+
+ if (g_exactGateTime && duration != -1)
+ gateTimeParam = event.param2 - duration;
+
+ char gtpBuf[16];
+
+ if (gateTimeParam > 0)
+ std::snprintf(gtpBuf, sizeof(gtpBuf), ", gtp%u", gateTimeParam);
+ else
+ gtpBuf[0] = 0;
+
+ char opName[16];
+
+ if (duration == -1)
+ std::strcpy(opName, "TIE ");
+ else
+ std::snprintf(opName, sizeof(opName), "N%02u ", duration);
+
+ bool noteChanged = true;
+ bool velocityChanged = true;
+
+ if (g_compressionEnabled)
+ {
+ noteChanged = (note != s_lastNote);
+ velocityChanged = (velocity != s_lastVelocity);
+ }
+
+ if (s_keepLastOpName)
+ s_keepLastOpName = false;
+ else
+ s_lastOpName = "";
+
+ if (noteChanged || velocityChanged || (gateTimeParam > 0))
+ {
+ s_lastNote = note;
+
+ char noteBuf[16];
+
+ if (note >= 24)
+ std::snprintf(noteBuf, sizeof(noteBuf), g_noteTable[note % 12], note / 12 - 2);
+ else
+ std::snprintf(noteBuf, sizeof(noteBuf), g_minusNoteTable[note % 12], note / -12 + 2);
+
+ char velocityBuf[16];
+
+ if (velocityChanged || (gateTimeParam > 0))
+ {
+ s_lastVelocity = velocity;
+ std::snprintf(velocityBuf, sizeof(velocityBuf), ", v%03u", velocity);
+ }
+ else
+ {
+ velocityBuf[0] = 0;
+ }
+
+ PrintOp(event.time, opName, "%s%s%s", noteBuf, velocityBuf, gtpBuf);
+ }
+ else
+ {
+ PrintOp(event.time, opName, 0);
+ }
+
+ s_noteChanged = noteChanged;
+ s_velocityChanged = velocityChanged;
+}
+
+void PrintEndOfTieOp(const Event& event)
+{
+ int note = event.note;
+ bool noteChanged = (note != s_lastNote);
+
+ if (!noteChanged || !s_noteChanged)
+ s_lastOpName = "";
+
+ if (!noteChanged && g_compressionEnabled)
+ {
+ PrintOp(event.time, "EOT ", nullptr);
+ }
+ else
+ {
+ s_lastNote = note;
+ if (note >= 24)
+ PrintOp(event.time, "EOT ", g_noteTable[note % 12], note / 12 - 2);
+ else
+ PrintOp(event.time, "EOT ", g_minusNoteTable[note % 12], note / -12 + 2);
+ }
+
+ s_noteChanged = noteChanged;
+}
+
+void PrintSeqLoopLabel(const Event& event)
+{
+ s_blockNum = event.param1 + 1;
+ std::fprintf(g_outputFile, "%s_%u_B%u:\n", g_asmLabel.c_str(), g_agbTrack, s_blockNum);
+ PrintWait(event.time);
+ ResetTrackVars();
+}
+
+void PrintExtendedOp(const Event& event)
+{
+ // TODO: support for other extended commands
+
+ switch (s_extendedCommand)
+ {
+ case 0x08:
+ PrintOp(event.time, "XCMD ", "xIECV , %u", event.param2);
+ break;
+ case 0x09:
+ PrintOp(event.time, "XCMD ", "xIECL , %u", event.param2);
+ break;
+ default:
+ PrintWait(event.time);
+ break;
+ }
+}
+
+void PrintControllerOp(const Event& event)
+{
+ switch (event.param1)
+ {
+ case 0x01:
+ PrintOp(event.time, "MOD ", "%u", event.param2);
+ break;
+ case 0x07:
+ PrintOp(event.time, "VOL ", "%u*%s_mvl/mxv", event.param2, g_asmLabel.c_str());
+ break;
+ case 0x0A:
+ PrintOp(event.time, "PAN ", "c_v%+d", event.param2 - 64);
+ break;
+ case 0x0C:
+ case 0x10:
+ // TODO: memacc
+ break;
+ case 0x0D:
+ // TODO: memacc var
+ break;
+ case 0x0E:
+ // TODO: memacc var
+ break;
+ case 0x0F:
+ // TODO: memacc var
+ break;
+ case 0x11:
+ std::fprintf(g_outputFile, "%s_%u_L%u:\n", g_asmLabel.c_str(), g_agbTrack, event.param2);
+ PrintWait(event.time);
+ ResetTrackVars();
+ break;
+ case 0x14:
+ PrintOp(event.time, "BENDR ", "%u", event.param2);
+ break;
+ case 0x15:
+ PrintOp(event.time, "LFOS ", "%u", event.param2);
+ break;
+ case 0x16:
+ PrintOp(event.time, "MODT ", "%u", event.param2);
+ break;
+ case 0x18:
+ PrintOp(event.time, "TUNE ", "c_v%+d", event.param2 - 64);
+ break;
+ case 0x1A:
+ PrintOp(event.time, "LFODL ", "%u", event.param2);
+ break;
+ case 0x1D:
+ case 0x1F:
+ PrintExtendedOp(event);
+ break;
+ case 0x1E:
+ s_extendedCommand = event.param2;
+ // TODO: loop op
+ break;
+ case 0x21:
+ case 0x27:
+ PrintByte("PRIO , %u", event.param2);
+ PrintWait(event.time);
+ break;
+ default:
+ PrintWait(event.time);
+ break;
+ }
+}
+
+void PrintAgbTrack(std::vector<Event>& events)
+{
+ std::fprintf(g_outputFile, "\n@**************** Track %u (Midi-Chn.%u) ****************@\n\n", g_agbTrack, g_midiChan + 1);
+ std::fprintf(g_outputFile, "%s_%u:\n", g_asmLabel.c_str(), g_agbTrack);
+ PrintWait(g_initialWait);
+ PrintByte("KEYSH , %s_key%+d", g_asmLabel.c_str(), 0);
+
+ int wholeNoteCount = 0;
+ int loopEndBlockNum = 0;
+
+ ResetTrackVars();
+
+ bool foundVolBeforeNote = false;
+
+ for (const Event& event : events)
+ {
+ if (event.type == EventType::Note)
+ break;
+
+ if (event.type == EventType::Controller && event.param1 == 0x07)
+ {
+ foundVolBeforeNote = true;
+ break;
+ }
+ }
+
+ if (!foundVolBeforeNote)
+ PrintByte("\tVOL , 127*%s_mvl/mxv", g_asmLabel.c_str());
+
+ for (unsigned i = 0; events[i].type != EventType::EndOfTrack; i++)
+ {
+ const Event& event = events[i];
+
+ if (IsPatternBoundary(event.type))
+ {
+ if (s_inPattern)
+ PrintByte("PEND");
+ s_inPattern = false;
+ }
+
+ if (event.type == EventType::WholeNoteMark || event.type == EventType::Pattern)
+ std::fprintf(g_outputFile, "@ %03d ----------------------------------------\n", wholeNoteCount++);
+
+ switch (event.type)
+ {
+ case EventType::Note:
+ PrintNote(event);
+ break;
+ case EventType::EndOfTie:
+ PrintEndOfTieOp(event);
+ break;
+ case EventType::Label:
+ PrintSeqLoopLabel(event);
+ break;
+ case EventType::LoopEnd:
+ PrintByte("GOTO");
+ PrintWord("%s_%u_B%u", g_asmLabel.c_str(), g_agbTrack, loopEndBlockNum);
+ PrintSeqLoopLabel(event);
+ break;
+ case EventType::LoopEndBegin:
+ PrintByte("GOTO");
+ PrintWord("%s_%u_B%u", g_asmLabel.c_str(), g_agbTrack, loopEndBlockNum);
+ PrintSeqLoopLabel(event);
+ loopEndBlockNum = s_blockNum;
+ break;
+ case EventType::LoopBegin:
+ PrintSeqLoopLabel(event);
+ loopEndBlockNum = s_blockNum;
+ break;
+ case EventType::WholeNoteMark:
+ if (event.param2 & 0x80000000)
+ {
+ std::fprintf(g_outputFile, "%s_%u_%03lu:\n", g_asmLabel.c_str(), g_agbTrack, (unsigned long)(event.param2 & 0x7FFFFFFF));
+ ResetTrackVars();
+ s_inPattern = true;
+ }
+ PrintWait(event.time);
+ break;
+ case EventType::Pattern:
+ PrintByte("PATT");
+ PrintWord("%s_%u_%03lu", g_asmLabel.c_str(), g_agbTrack, event.param2);
+
+ while (!IsPatternBoundary(events[i + 1].type))
+ i++;
+
+ ResetTrackVars();
+ break;
+ case EventType::Tempo:
+ PrintByte("TEMPO , %u*%s_tbs/2", 60000000 / event.param2, g_asmLabel.c_str());
+ PrintWait(event.time);
+ break;
+ case EventType::InstrumentChange:
+ PrintOp(event.time, "VOICE ", "%u", event.param1);
+ break;
+ case EventType::PitchBend:
+ PrintOp(event.time, "BEND ", "c_v%+d", event.param2 - 64);
+ break;
+ case EventType::Controller:
+ PrintControllerOp(event);
+ break;
+ default:
+ PrintWait(event.time);
+ break;
+ }
+ }
+
+ PrintByte("FINE");
+}
+
+void PrintAgbFooter()
+{
+ int trackCount = g_agbTrack - 1;
+
+ std::fprintf(g_outputFile, "\n@******************************************************@\n");
+ std::fprintf(g_outputFile, "\t.align\t2\n");
+ std::fprintf(g_outputFile, "\n%s:\n", g_asmLabel.c_str());
+ std::fprintf(g_outputFile, "\t.byte\t%u\t@ NumTrks\n", trackCount);
+ std::fprintf(g_outputFile, "\t.byte\t%u\t@ NumBlks\n", 0);
+ std::fprintf(g_outputFile, "\t.byte\t%s_pri\t@ Priority\n", g_asmLabel.c_str());
+ std::fprintf(g_outputFile, "\t.byte\t%s_rev\t@ Reverb.\n", g_asmLabel.c_str());
+ std::fprintf(g_outputFile, "\n");
+ std::fprintf(g_outputFile, "\t.word\t%s_grp\n", g_asmLabel.c_str());
+ std::fprintf(g_outputFile, "\n");
+
+ // track pointers
+ for (int i = 1; i <= trackCount; i++)
+ std::fprintf(g_outputFile, "\t.word\t%s_%u\n", g_asmLabel.c_str(), i);
+
+ std::fprintf(g_outputFile, "\n\t.end\n");
+}
diff --git a/tools/mid2agb/agb.h b/tools/mid2agb/agb.h
new file mode 100644
index 000000000..7eab3c143
--- /dev/null
+++ b/tools/mid2agb/agb.h
@@ -0,0 +1,33 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef AGB_H
+#define AGB_H
+
+#include <vector>
+#include "midi.h"
+
+void PrintAgbHeader();
+void PrintAgbTrack(std::vector<Event>& events);
+void PrintAgbFooter();
+
+extern int g_agbTrack;
+
+#endif // AGB_H
diff --git a/tools/mid2agb/error.cpp b/tools/mid2agb/error.cpp
new file mode 100644
index 000000000..13e38ffa8
--- /dev/null
+++ b/tools/mid2agb/error.cpp
@@ -0,0 +1,36 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstdarg>
+
+// Reports an error diagnostic and terminates the program.
+[[noreturn]] void RaiseError(const char* format, ...)
+{
+ const int bufferSize = 1024;
+ char buffer[bufferSize];
+ std::va_list args;
+ va_start(args, format);
+ std::vsnprintf(buffer, bufferSize, format, args);
+ std::fprintf(stderr, "error: %s\n", buffer);
+ va_end(args);
+ std::exit(1);
+}
diff --git a/tools/mid2agb/error.h b/tools/mid2agb/error.h
new file mode 100644
index 000000000..da4f01142
--- /dev/null
+++ b/tools/mid2agb/error.h
@@ -0,0 +1,26 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef ERROR_H
+#define ERROR_H
+
+[[noreturn]] void RaiseError(const char* format, ...);
+
+#endif // ERROR_H
diff --git a/tools/mid2agb/main.cpp b/tools/mid2agb/main.cpp
new file mode 100644
index 000000000..9b883fba5
--- /dev/null
+++ b/tools/mid2agb/main.cpp
@@ -0,0 +1,230 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
+#include <cassert>
+#include <string>
+#include <set>
+#include "main.h"
+#include "error.h"
+#include "midi.h"
+#include "agb.h"
+
+FILE* g_inputFile = nullptr;
+FILE* g_outputFile = nullptr;
+
+std::string g_asmLabel;
+int g_masterVolume = 127;
+int g_voiceGroup = 0;
+int g_priority = 0;
+int g_reverb = -1;
+int g_clocksPerBeat = 1;
+bool g_exactGateTime = false;
+bool g_compressionEnabled = true;
+
+[[noreturn]] static void PrintUsage()
+{
+ std::printf(
+ "Usage: MID2AGB name [options]\n"
+ "\n"
+ " input_file filename(.mid) of MIDI file\n"
+ " output_file filename(.s) for AGB file (default:input_file)\n"
+ "\n"
+ "options -V??? master volume (default:127)\n"
+ " -G??? voice group number (default:0)\n"
+ " -P??? priority (default:0)\n"
+ " -R??? reverb (default:off)\n"
+ " -X 48 clocks/beat (default:24 clocks/beat)\n"
+ " -E exact gate-time\n"
+ " -N no compression\n"
+ );
+ std::exit(1);
+}
+
+static std::string StripExtension(std::string s)
+{
+ std::size_t pos = s.find_last_of('.');
+
+ if (pos > 0 && pos != std::string::npos)
+ {
+ s = s.substr(0, pos);
+ }
+
+ return s;
+}
+
+static std::string GetExtension(std::string s)
+{
+ std::size_t pos = s.find_last_of('.');
+
+ if (pos > 0 && pos != std::string::npos)
+ {
+ return s.substr(pos + 1);
+ }
+
+ return "";
+}
+
+struct Option
+{
+ char letter = 0;
+ const char *arg = NULL;
+};
+
+static Option ParseOption(int& index, const int argc, char** argv)
+{
+ static std::set<char> optionsWithArg = { 'L', 'V', 'G', 'P', 'R' };
+ static std::set<char> optionsWithoutArg = { 'X', 'E', 'N' };
+
+ assert(index >= 0 && index < argc);
+
+ const char *opt = argv[index];
+
+ assert(opt[0] == '-');
+ assert(std::strlen(opt) == 2);
+
+ char letter = std::toupper(opt[1]);
+
+ bool isOption = false;
+ bool hasArg = false;
+
+ if (optionsWithArg.count(letter) != 0)
+ {
+ isOption = true;
+ hasArg = true;
+ }
+ else if (optionsWithoutArg.count(letter) != 0)
+ {
+ isOption = true;
+ }
+
+ if (!isOption)
+ PrintUsage();
+
+ Option retVal;
+
+ retVal.letter = letter;
+
+ if (hasArg)
+ {
+ index++;
+
+ if (index >= argc)
+ RaiseError("missing argument for \"-%c\"", letter);
+
+ retVal.arg = argv[index];
+ }
+
+ return retVal;
+}
+
+int main(int argc, char** argv)
+{
+ std::string inputFilename;
+ std::string outputFilename;
+
+ for (int i = 1; i < argc; i++)
+ {
+ if (argv[i][0] == '-' && std::strlen(argv[i]) == 2)
+ {
+ Option option = ParseOption(i, argc, argv);
+
+ switch (option.letter)
+ {
+ case 'E':
+ g_exactGateTime = true;
+ break;
+ case 'G':
+ g_voiceGroup = std::stoi(option.arg);
+ break;
+ case 'L':
+ g_asmLabel = option.arg;
+ break;
+ case 'N':
+ g_compressionEnabled = false;
+ break;
+ case 'P':
+ g_priority = std::stoi(option.arg);
+ break;
+ case 'R':
+ g_reverb = std::stoi(option.arg);
+ break;
+ case 'V':
+ g_masterVolume = std::stoi(option.arg);
+ break;
+ case 'X':
+ g_clocksPerBeat = 2;
+ break;
+ }
+ }
+ else
+ {
+ switch (i)
+ {
+ case 1:
+ inputFilename = argv[i];
+ break;
+ case 2:
+ outputFilename = argv[i];
+ break;
+ default:
+ PrintUsage();
+ }
+ }
+ }
+
+ if (inputFilename.empty())
+ PrintUsage();
+
+ if (GetExtension(inputFilename) != "mid")
+ RaiseError("input filename extension is not \"mid\"");
+
+ if (outputFilename.empty())
+ outputFilename = StripExtension(inputFilename) + ".s";
+
+ if (GetExtension(outputFilename) != "s")
+ RaiseError("output filename extension is not \"s\"");
+
+ if (g_asmLabel.empty())
+ g_asmLabel = StripExtension(outputFilename);
+
+ g_inputFile = std::fopen(inputFilename.c_str(), "rb");
+
+ if (g_inputFile == nullptr)
+ RaiseError("failed to open \"%s\" for reading", inputFilename.c_str());
+
+ g_outputFile = std::fopen(outputFilename.c_str(), "w");
+
+ if (g_outputFile == nullptr)
+ RaiseError("failed to open \"%s\" for writing", outputFilename.c_str());
+
+ ReadMidiFileHeader();
+ PrintAgbHeader();
+ ReadMidiTracks();
+ PrintAgbFooter();
+
+ std::fclose(g_inputFile);
+ std::fclose(g_outputFile);
+
+ return 0;
+}
diff --git a/tools/mid2agb/main.h b/tools/mid2agb/main.h
new file mode 100644
index 000000000..6e71e73fd
--- /dev/null
+++ b/tools/mid2agb/main.h
@@ -0,0 +1,39 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef MAIN_H
+#define MAIN_H
+
+#include <cstdio>
+#include <string>
+
+extern FILE* g_inputFile;
+extern FILE* g_outputFile;
+
+extern std::string g_asmLabel;
+extern int g_masterVolume;
+extern int g_voiceGroup;
+extern int g_priority;
+extern int g_reverb;
+extern int g_clocksPerBeat;
+extern bool g_exactGateTime;
+extern bool g_compressionEnabled;
+
+#endif // MAIN_H
diff --git a/tools/mid2agb/midi.cpp b/tools/mid2agb/midi.cpp
new file mode 100644
index 000000000..ba5dd654a
--- /dev/null
+++ b/tools/mid2agb/midi.cpp
@@ -0,0 +1,942 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cassert>
+#include <string>
+#include <vector>
+#include <algorithm>
+#include <memory>
+#include "midi.h"
+#include "main.h"
+#include "error.h"
+#include "agb.h"
+#include "tables.h"
+
+enum class MidiEventCategory
+{
+ Control,
+ SysEx,
+ Meta,
+ Invalid,
+};
+
+MidiFormat g_midiFormat;
+std::int_fast32_t g_midiTrackCount;
+std::int16_t g_midiTimeDiv;
+
+int g_midiChan;
+std::int32_t g_initialWait;
+
+static long s_trackDataStart;
+static std::vector<Event> s_seqEvents;
+static std::vector<Event> s_trackEvents;
+static std::int32_t s_absoluteTime;
+static int s_blockCount = 0;
+static int s_minNote;
+static int s_maxNote;
+
+void Seek(long offset)
+{
+ if (std::fseek(g_inputFile, offset, SEEK_SET) != 0)
+ RaiseError("failed to seek to %l", offset);
+}
+
+void Skip(long offset)
+{
+ if (std::fseek(g_inputFile, offset, SEEK_CUR) != 0)
+ RaiseError("failed to skip %l bytes", offset);
+}
+
+std::string ReadSignature()
+{
+ char signature[4];
+
+ if (std::fread(signature, 4, 1, g_inputFile) != 1)
+ RaiseError("failed to read signature");
+
+ return std::string(signature, 4);
+}
+
+std::uint32_t ReadInt8()
+{
+ int c = std::fgetc(g_inputFile);
+
+ if (c < 0)
+ RaiseError("unexpected EOF");
+
+ return c;
+}
+
+std::uint32_t ReadInt16()
+{
+ std::uint32_t val = 0;
+ val |= ReadInt8() << 8;
+ val |= ReadInt8();
+ return val;
+}
+
+std::uint32_t ReadInt24()
+{
+ std::uint32_t val = 0;
+ val |= ReadInt8() << 16;
+ val |= ReadInt8() << 8;
+ val |= ReadInt8();
+ return val;
+}
+
+std::uint32_t ReadInt32()
+{
+ std::uint32_t val = 0;
+ val |= ReadInt8() << 24;
+ val |= ReadInt8() << 16;
+ val |= ReadInt8() << 8;
+ val |= ReadInt8();
+ return val;
+}
+
+std::uint32_t ReadVLQ()
+{
+ std::uint32_t val = 0;
+ std::uint32_t c;
+
+ do
+ {
+ c = ReadInt8();
+ val <<= 7;
+ val |= (c & 0x7F);
+ } while (c & 0x80);
+
+ return val;
+}
+
+void ReadMidiFileHeader()
+{
+ Seek(0);
+
+ if (ReadSignature() != "MThd")
+ RaiseError("MIDI file header signature didn't match \"MThd\"");
+
+ std::uint32_t headerLength = ReadInt32();
+
+ if (headerLength != 6)
+ RaiseError("MIDI file header length isn't 6");
+
+ std::uint16_t midiFormat = ReadInt16();
+
+ if (midiFormat >= 2)
+ RaiseError("unsupported MIDI format (%u)", midiFormat);
+
+ g_midiFormat = (MidiFormat)midiFormat;
+ g_midiTrackCount = ReadInt16();
+ g_midiTimeDiv = ReadInt16();
+
+ if (g_midiTimeDiv < 0)
+ RaiseError("unsupported MIDI time division (%d)", g_midiTimeDiv);
+}
+
+long ReadMidiTrackHeader(long offset)
+{
+ Seek(offset);
+
+ if (ReadSignature() != "MTrk")
+ RaiseError("MIDI track header signature didn't match \"MTrk\"");
+
+ long size = ReadInt32();
+
+ s_trackDataStart = std::ftell(g_inputFile);
+
+ return size + 8;
+}
+
+void StartTrack()
+{
+ Seek(s_trackDataStart);
+ s_absoluteTime = 0;
+}
+
+void SkipEventData()
+{
+ Skip(ReadVLQ());
+}
+
+void DetermineEventCategory(MidiEventCategory& category, int& typeChan, int& size)
+{
+ typeChan = ReadInt8();
+
+ if (typeChan == 0xFF)
+ {
+ category = MidiEventCategory::Meta;
+ size = 0;
+ }
+ else if (typeChan >= 0xF0)
+ {
+ category = MidiEventCategory::SysEx;
+ size = 0;
+ }
+ else if (typeChan >= 0x80)
+ {
+ category = MidiEventCategory::Control;
+
+ switch (typeChan >> 4)
+ {
+ case 0xC:
+ case 0xD:
+ size = 1;
+ break;
+ default:
+ size = 2;
+ break;
+ }
+ }
+ else
+ {
+ category = MidiEventCategory::Invalid;
+ }
+}
+
+void MakeBlockEvent(Event& event, EventType type)
+{
+ event.type = type;
+ event.param1 = s_blockCount++;
+ event.param2 = 0;
+}
+
+std::string ReadEventText()
+{
+ char buffer[2];
+ std::uint32_t length = ReadVLQ();
+
+ if (length <= 2)
+ {
+ if (fread(buffer, length, 1, g_inputFile) != 1)
+ RaiseError("failed to read event text");
+ }
+ else
+ {
+ Skip(length);
+ length = 0;
+ }
+
+ return std::string(buffer, length);
+}
+
+bool ReadSeqEvent(Event& event)
+{
+ s_absoluteTime += ReadVLQ();
+ event.time = s_absoluteTime;
+
+ MidiEventCategory category;
+ int typeChan;
+ int size;
+
+ DetermineEventCategory(category, typeChan, size);
+
+ if (category == MidiEventCategory::Control)
+ {
+ Skip(size);
+ return false;
+ }
+
+ if (category == MidiEventCategory::SysEx)
+ {
+ SkipEventData();
+ return false;
+ }
+
+ if (category == MidiEventCategory::Invalid)
+ RaiseError("invalid event");
+
+ // meta event
+ int metaEventType = ReadInt8();
+
+ if (metaEventType >= 1 && metaEventType <= 7)
+ {
+ // text event
+ std::string text = ReadEventText();
+
+ if (text == "[")
+ MakeBlockEvent(event, EventType::LoopBegin);
+ else if (text == "][")
+ MakeBlockEvent(event, EventType::LoopEndBegin);
+ else if (text == "]")
+ MakeBlockEvent(event, EventType::LoopEnd);
+ else if (text == ":")
+ MakeBlockEvent(event, EventType::Label);
+ else
+ return false;
+ }
+ else
+ {
+ switch (metaEventType)
+ {
+ case 0x2F: // end of track
+ SkipEventData();
+ event.type = EventType::EndOfTrack;
+ event.param1 = 0;
+ event.param2 = 0;
+ break;
+ case 0x51: // tempo
+ if (ReadVLQ() != 3)
+ RaiseError("invalid tempo size");
+
+ event.type = EventType::Tempo;
+ event.param1 = 0;
+ event.param2 = ReadInt24();
+ break;
+ case 0x58: // time signature
+ {
+ if (ReadVLQ() != 4)
+ RaiseError("invalid time signature size");
+
+ int numerator = ReadInt8();
+ int denominatorExponent = ReadInt8();
+
+ if (denominatorExponent >= 16)
+ RaiseError("invalid time signature denominator");
+
+ Skip(2); // ignore other values
+
+ int clockTicks = 96 * numerator * g_clocksPerBeat;
+ int denominator = 1 << denominatorExponent;
+ int timeSig = clockTicks / denominator;
+
+ if (timeSig <= 0 || timeSig >= 0x10000)
+ RaiseError("invalid time signature");
+
+ event.type = EventType::TimeSignature;
+ event.param1 = 0;
+ event.param2 = timeSig;
+ break;
+ }
+ default:
+ SkipEventData();
+ return false;
+ }
+ }
+
+ return true;
+}
+
+void ReadSeqEvents()
+{
+ StartTrack();
+
+ for (;;)
+ {
+ Event event = {};
+
+ if (ReadSeqEvent(event))
+ {
+ s_seqEvents.push_back(event);
+
+ if (event.type == EventType::EndOfTrack)
+ return;
+ }
+ }
+}
+
+bool CheckNoteEnd(Event& event)
+{
+ event.param2 += ReadVLQ();
+
+ MidiEventCategory category;
+ int typeChan;
+ int size;
+
+ DetermineEventCategory(category, typeChan, size);
+
+ if (category == MidiEventCategory::Control)
+ {
+ int chan = typeChan & 0xF;
+
+ if (chan != g_midiChan)
+ {
+ Skip(size);
+ return false;
+ }
+
+ switch (typeChan & 0xF0)
+ {
+ case 0x80: // note off
+ {
+ int note = ReadInt8();
+ ReadInt8(); // ignore velocity
+ if (note == event.note)
+ return true;
+ break;
+ }
+ case 0x90: // note on
+ {
+ int note = ReadInt8();
+ int velocity = ReadInt8();
+ if (velocity == 0 && note == event.note)
+ return true;
+ break;
+ }
+ default:
+ Skip(size);
+ break;
+ }
+
+ return false;
+ }
+
+ if (category == MidiEventCategory::SysEx)
+ {
+ SkipEventData();
+ return false;
+ }
+
+ if (category == MidiEventCategory::Meta)
+ {
+ int metaEventType = ReadInt8();
+ SkipEventData();
+
+ if (metaEventType == 0x2F)
+ RaiseError("note doesn't end");
+
+ return false;
+ }
+
+ RaiseError("invalid event");
+}
+
+void FindNoteEnd(Event& event)
+{
+ long startPos = ftell(g_inputFile);
+
+ event.param2 = 0;
+
+ while (!CheckNoteEnd(event))
+ ;
+
+ Seek(startPos);
+}
+
+bool ReadTrackEvent(Event& event)
+{
+ s_absoluteTime += ReadVLQ();
+ event.time = s_absoluteTime;
+
+ MidiEventCategory category;
+ int typeChan;
+ int size;
+
+ DetermineEventCategory(category, typeChan, size);
+
+ if (category == MidiEventCategory::Control)
+ {
+ int chan = typeChan & 0xF;
+
+ if (chan != g_midiChan)
+ {
+ Skip(size);
+ return false;
+ }
+
+ switch (typeChan & 0xF0)
+ {
+ case 0x90: // note on
+ {
+ int note = ReadInt8();
+ int velocity = ReadInt8();
+
+ if (velocity != 0)
+ {
+ event.type = EventType::Note;
+ event.note = note;
+ event.param1 = velocity;
+ FindNoteEnd(event);
+ if (event.param2 > 0)
+ {
+ if (note < s_minNote)
+ s_minNote = note;
+ if (note > s_maxNote)
+ s_maxNote = note;
+ }
+ }
+ break;
+ }
+ case 0xB0: // controller event
+ event.type = EventType::Controller;
+ event.param1 = ReadInt8(); // controller index
+ event.param2 = ReadInt8(); // value
+ break;
+ case 0xC0: // instrument change
+ event.type = EventType::InstrumentChange;
+ event.param1 = ReadInt8(); // instrument
+ event.param2 = 0;
+ break;
+ case 0xE0: // pitch bend
+ event.type = EventType::PitchBend;
+ event.param1 = ReadInt8();
+ event.param2 = ReadInt8();
+ break;
+ default:
+ Skip(size);
+ return false;
+ }
+
+ return true;
+ }
+
+ if (category == MidiEventCategory::SysEx)
+ {
+ SkipEventData();
+ return false;
+ }
+
+ if (category == MidiEventCategory::Meta)
+ {
+ int metaEventType = ReadInt8();
+ SkipEventData();
+
+ if (metaEventType == 0x2F)
+ {
+ event.type = EventType::EndOfTrack;
+ event.param1 = 0;
+ event.param2 = 0;
+ return true;
+ }
+
+ return false;
+ }
+
+ RaiseError("invalid event");
+}
+
+void ReadTrackEvents()
+{
+ StartTrack();
+
+ s_trackEvents.clear();
+
+ s_minNote = 0xFF;
+ s_maxNote = 0;
+
+ for (;;)
+ {
+ Event event = {};
+
+ if (ReadTrackEvent(event))
+ {
+ s_trackEvents.push_back(event);
+
+ if (event.type == EventType::EndOfTrack)
+ return;
+ }
+ }
+}
+
+bool EventCompare(const Event& event1, const Event& event2)
+{
+ if (event1.time < event2.time)
+ return true;
+
+ if (event1.time > event2.time)
+ return false;
+
+ unsigned event1Type = (unsigned)event1.type;
+ unsigned event2Type = (unsigned)event2.type;
+
+ if (event1.type == EventType::Note)
+ event1Type += event1.note;
+
+ if (event2.type == EventType::Note)
+ event2Type += event2.note;
+
+ if (event1Type < event2Type)
+ return true;
+
+ if (event1Type > event2Type)
+ return false;
+
+ if (event1.type == EventType::EndOfTie)
+ {
+ if (event1.note < event2.note)
+ return true;
+
+ if (event1.note > event2.note)
+ return false;
+ }
+
+ return false;
+}
+
+std::unique_ptr<std::vector<Event>> MergeEvents()
+{
+ std::unique_ptr<std::vector<Event>> events(new std::vector<Event>());
+
+ unsigned trackEventPos = 0;
+ unsigned seqEventPos = 0;
+
+ while (s_trackEvents[trackEventPos].type != EventType::EndOfTrack
+ && s_seqEvents[seqEventPos].type != EventType::EndOfTrack)
+ {
+ if (EventCompare(s_trackEvents[trackEventPos], s_seqEvents[seqEventPos]))
+ events->push_back(s_trackEvents[trackEventPos++]);
+ else
+ events->push_back(s_seqEvents[seqEventPos++]);
+ }
+
+ while (s_trackEvents[trackEventPos].type != EventType::EndOfTrack)
+ events->push_back(s_trackEvents[trackEventPos++]);
+
+ while (s_seqEvents[seqEventPos].type != EventType::EndOfTrack)
+ events->push_back(s_seqEvents[seqEventPos++]);
+
+ // Push the EndOfTrack event with the larger time.
+ if (EventCompare(s_trackEvents[trackEventPos], s_seqEvents[seqEventPos]))
+ events->push_back(s_seqEvents[seqEventPos]);
+ else
+ events->push_back(s_trackEvents[trackEventPos]);
+
+ return events;
+}
+
+void ConvertTimes(std::vector<Event>& events)
+{
+ for (Event& event : events)
+ {
+ event.time = (24 * g_clocksPerBeat * event.time) / g_midiTimeDiv;
+
+ if (event.type == EventType::Note)
+ {
+ event.param1 = g_noteVelocityLUT[event.param1];
+
+ std::uint32_t duration = (24 * g_clocksPerBeat * event.param2) / g_midiTimeDiv;
+
+ if (duration == 0)
+ duration = 1;
+
+ if (!g_exactGateTime && duration < 96)
+ duration = g_noteDurationLUT[duration];
+
+ event.param2 = duration;
+ }
+ }
+}
+
+std::unique_ptr<std::vector<Event>> InsertTimingEvents(std::vector<Event>& inEvents)
+{
+ std::unique_ptr<std::vector<Event>> outEvents(new std::vector<Event>());
+
+ Event timingEvent = {};
+ timingEvent.time = 0;
+ timingEvent.type = EventType::TimeSignature;
+ timingEvent.param2 = 96 * g_clocksPerBeat;
+
+ for (const Event& event : inEvents)
+ {
+ while (EventCompare(timingEvent, event))
+ {
+ outEvents->push_back(timingEvent);
+ timingEvent.time += timingEvent.param2;
+ }
+
+ if (event.type == EventType::TimeSignature)
+ {
+ if (g_agbTrack == 1 && event.param2 != timingEvent.param2)
+ {
+ Event originalTimingEvent = event;
+ originalTimingEvent.type = EventType::OriginalTimeSignature;
+ outEvents->push_back(originalTimingEvent);
+ }
+ timingEvent.param2 = event.param2;
+ timingEvent.time = event.time + timingEvent.param2;
+ }
+
+ outEvents->push_back(event);
+ }
+
+ return outEvents;
+}
+
+std::unique_ptr<std::vector<Event>> SplitTime(std::vector<Event>& inEvents)
+{
+ std::unique_ptr<std::vector<Event>> outEvents(new std::vector<Event>());
+
+ std::int32_t time = 0;
+
+ for (const Event& event : inEvents)
+ {
+ std::int32_t diff = event.time - time;
+
+ if (diff > 96)
+ {
+ int wholeNoteCount = (diff - 1) / 96;
+ diff -= 96 * wholeNoteCount;
+
+ for (int i = 0; i < wholeNoteCount; i++)
+ {
+ time += 96;
+ Event timeSplitEvent = {};
+ timeSplitEvent.time = time;
+ timeSplitEvent.type = EventType::TimeSplit;
+ outEvents->push_back(timeSplitEvent);
+ }
+ }
+
+ std::int32_t lutValue = g_noteDurationLUT[diff];
+
+ if (lutValue != diff)
+ {
+ Event timeSplitEvent = {};
+ timeSplitEvent.time = time + lutValue;
+ timeSplitEvent.type = EventType::TimeSplit;
+ outEvents->push_back(timeSplitEvent);
+ }
+
+ time = event.time;
+
+ outEvents->push_back(event);
+ }
+
+ return outEvents;
+}
+
+std::unique_ptr<std::vector<Event>> CreateTies(std::vector<Event>& inEvents)
+{
+ std::unique_ptr<std::vector<Event>> outEvents(new std::vector<Event>());
+
+ for (const Event& event : inEvents)
+ {
+ if (event.type == EventType::Note && event.param2 > 96)
+ {
+ Event tieEvent = event;
+ tieEvent.param2 = -1;
+ outEvents->push_back(tieEvent);
+
+ Event eotEvent = {};
+ eotEvent.time = event.time + event.param2;
+ eotEvent.type = EventType::EndOfTie;
+ eotEvent.note = event.note;
+ outEvents->push_back(eotEvent);
+ }
+ else
+ {
+ outEvents->push_back(event);
+ }
+ }
+
+ return outEvents;
+}
+
+void CalculateWaits(std::vector<Event>& events)
+{
+ g_initialWait = events[0].time;
+ int wholeNoteCount = 0;
+
+ for (unsigned i = 0; i < events.size() && events[i].type != EventType::EndOfTrack; i++)
+ {
+ events[i].time = events[i + 1].time - events[i].time;
+
+ if (events[i].type == EventType::TimeSignature)
+ {
+ events[i].type = EventType::WholeNoteMark;
+ events[i].param2 = wholeNoteCount++;
+ }
+ }
+}
+
+int CalculateCompressionScore(std::vector<Event>& events, int index)
+{
+ int score = 0;
+ std::uint8_t lastParam1 = events[index].param1;
+ std::uint8_t lastVelocity = 0x80u;
+ EventType lastType = events[index].type;
+ std::int32_t lastDuration = 0x80000000;
+ std::uint8_t lastNote = 0x80u;
+
+ if (events[index].time > 0)
+ score++;
+
+ for (int i = index + 1; !IsPatternBoundary(events[i].type); i++)
+ {
+ if (events[i].type == EventType::Note)
+ {
+ int val = 0;
+
+ if (events[i].note != lastNote)
+ {
+ val++;
+ lastNote = events[i].note;
+ }
+
+ if (events[i].param1 != lastVelocity)
+ {
+ val++;
+ lastVelocity = events[i].param1;
+ }
+
+ std::int32_t duration = events[i].param2;
+
+ if (g_noteDurationLUT[duration] != lastDuration)
+ {
+ val++;
+ lastDuration = g_noteDurationLUT[duration];
+ }
+
+ if (duration != lastDuration)
+ val++;
+
+ if (val == 0)
+ val = 1;
+
+ score += val;
+ }
+ else
+ {
+ lastDuration = 0x80000000;
+
+ if (events[i].type == lastType)
+ {
+ if ((lastType != EventType::Controller && (int)lastType != 0x25 && lastType != EventType::EndOfTie) || events[i].param1 == lastParam1)
+ {
+ score++;
+ }
+ else
+ {
+ score += 2;
+ }
+ }
+ else
+ {
+ score += 2;
+ }
+ }
+
+ lastParam1 = events[i].param1;
+ lastType = events[i].type;
+
+ if (events[i].time)
+ ++score;
+ }
+
+ return score;
+}
+
+bool IsCompressionMatch(std::vector<Event>& events, int index1, int index2)
+{
+ index1++;
+ index2++;
+
+ do
+ {
+ if (events[index1] != events[index2])
+ return false;
+
+ index1++;
+ index2++;
+ } while (!IsPatternBoundary(events[index1].type));
+
+ return IsPatternBoundary(events[index2].type);
+}
+
+void CompressWholeNote(std::vector<Event>& events, int index)
+{
+ for (int j = index + 1; events[j].type != EventType::EndOfTrack; j++)
+ {
+ while (events[j].type != EventType::WholeNoteMark)
+ {
+ j++;
+
+ if (events[j].type == EventType::EndOfTrack)
+ return;
+ }
+
+ if (IsCompressionMatch(events, index, j))
+ {
+ events[j].type = EventType::Pattern;
+ events[j].param2 = events[index].param2 & 0x7FFFFFFF;
+ events[index].param2 |= 0x80000000;
+ }
+ }
+}
+
+void Compress(std::vector<Event>& events)
+{
+ for (int i = 0; events[i].type != EventType::EndOfTrack; i++)
+ {
+ while (events[i].type != EventType::WholeNoteMark)
+ {
+ i++;
+
+ if (events[i].type == EventType::EndOfTrack)
+ return;
+ }
+
+ if (CalculateCompressionScore(events, i) >= 6)
+ {
+ CompressWholeNote(events, i);
+ }
+ }
+}
+
+void ReadMidiTracks()
+{
+ long trackHeaderStart = 14;
+
+ ReadMidiTrackHeader(trackHeaderStart);
+ ReadSeqEvents();
+
+ g_agbTrack = 1;
+
+ for (int midiTrack = 0; midiTrack < g_midiTrackCount; midiTrack++)
+ {
+ trackHeaderStart += ReadMidiTrackHeader(trackHeaderStart);
+
+ for (g_midiChan = 0; g_midiChan < 16; g_midiChan++)
+ {
+ ReadTrackEvents();
+
+ if (s_minNote != 0xFF)
+ {
+#ifdef DEBUG
+ printf("Track%d = Midi-Ch.%d\n", g_agbTrack, g_midiChan + 1);
+#endif
+
+ std::unique_ptr<std::vector<Event>> events(MergeEvents());
+
+ // We don't need TEMPO in anything but track 1.
+ if (g_agbTrack == 1)
+ {
+ auto it = std::remove_if(s_seqEvents.begin(), s_seqEvents.end(), [](const Event& event) { return event.type == EventType::Tempo; });
+ s_seqEvents.erase(it, s_seqEvents.end());
+ }
+
+ ConvertTimes(*events);
+ events = InsertTimingEvents(*events);
+ events = CreateTies(*events);
+ std::stable_sort(events->begin(), events->end(), EventCompare);
+ events = SplitTime(*events);
+ CalculateWaits(*events);
+
+ if (g_compressionEnabled)
+ Compress(*events);
+
+ PrintAgbTrack(*events);
+
+ g_agbTrack++;
+ }
+ }
+ }
+}
diff --git a/tools/mid2agb/midi.h b/tools/mid2agb/midi.h
new file mode 100644
index 000000000..434c8e8e8
--- /dev/null
+++ b/tools/mid2agb/midi.h
@@ -0,0 +1,87 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef MIDI_H
+#define MIDI_H
+
+#include <cstdint>
+
+enum class MidiFormat
+{
+ SingleTrack,
+ MultiTrack
+};
+
+enum class EventType
+{
+ EndOfTie = 0x01,
+ Label = 0x11,
+ LoopEnd = 0x12,
+ LoopEndBegin = 0x13,
+ LoopBegin = 0x14,
+ OriginalTimeSignature = 0x15,
+ WholeNoteMark = 0x16,
+ Pattern = 0x17,
+ TimeSignature = 0x18,
+ Tempo = 0x19,
+ InstrumentChange = 0x21,
+ Controller = 0x22,
+ PitchBend = 0x23,
+ KeyShift = 0x31,
+ Note = 0x40,
+ TimeSplit = 0xFE,
+ EndOfTrack = 0xFF,
+};
+
+struct Event
+{
+ std::int32_t time;
+ EventType type;
+ std::uint8_t note;
+ std::uint8_t param1;
+ std::int32_t param2;
+
+ bool operator==(const Event& other)
+ {
+ return (time == other.time
+ && type == other.type
+ && note == other.note
+ && param1 == other.param1
+ && param2 == other.param2);
+ }
+
+ bool operator!=(const Event& other)
+ {
+ return !(*this == other);
+ }
+};
+
+void ReadMidiFileHeader();
+void ReadMidiTracks();
+
+extern int g_midiChan;
+extern std::int32_t g_initialWait;
+
+inline bool IsPatternBoundary(EventType type)
+{
+ return type == EventType::EndOfTrack || (int)type <= 0x17;
+}
+
+#endif // MIDI_H
diff --git a/tools/mid2agb/tables.cpp b/tools/mid2agb/tables.cpp
new file mode 100644
index 000000000..f254664a4
--- /dev/null
+++ b/tools/mid2agb/tables.cpp
@@ -0,0 +1,286 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include "tables.h"
+
+const int g_noteDurationLUT[] =
+{
+ 0, // 0
+ 1, // 1
+ 2, // 2
+ 3, // 3
+ 4, // 4
+ 5, // 5
+ 6, // 6
+ 7, // 7
+ 8, // 8
+ 9, // 9
+ 10, // 10
+ 11, // 11
+ 12, // 12
+ 13, // 13
+ 14, // 14
+ 15, // 15
+ 16, // 16
+ 17, // 17
+ 18, // 18
+ 19, // 19
+ 20, // 20
+ 21, // 21
+ 22, // 22
+ 23, // 23
+ 24, // 24
+ 24, // 25
+ 24, // 26
+ 24, // 27
+ 28, // 28
+ 28, // 29
+ 30, // 30
+ 30, // 31
+ 32, // 32
+ 32, // 33
+ 32, // 34
+ 32, // 35
+ 36, // 36
+ 36, // 37
+ 36, // 38
+ 36, // 39
+ 40, // 40
+ 40, // 41
+ 42, // 42
+ 42, // 43
+ 44, // 44
+ 44, // 45
+ 44, // 46
+ 44, // 47
+ 48, // 48
+ 48, // 49
+ 48, // 50
+ 48, // 51
+ 52, // 52
+ 52, // 53
+ 54, // 54
+ 54, // 55
+ 56, // 56
+ 56, // 57
+ 56, // 58
+ 56, // 59
+ 60, // 60
+ 60, // 61
+ 60, // 62
+ 60, // 63
+ 64, // 64
+ 64, // 65
+ 66, // 66
+ 66, // 67
+ 68, // 68
+ 68, // 69
+ 68, // 70
+ 68, // 71
+ 72, // 72
+ 72, // 73
+ 72, // 74
+ 72, // 75
+ 76, // 76
+ 76, // 77
+ 78, // 78
+ 78, // 79
+ 80, // 80
+ 80, // 81
+ 80, // 82
+ 80, // 83
+ 84, // 84
+ 84, // 85
+ 84, // 86
+ 84, // 87
+ 88, // 88
+ 88, // 89
+ 90, // 90
+ 90, // 91
+ 92, // 92
+ 92, // 93
+ 92, // 94
+ 92, // 95
+ 96, // 96
+};
+
+const int g_noteVelocityLUT[] =
+{
+ 0, // 0
+ 4, // 1
+ 4, // 2
+ 4, // 3
+ 4, // 4
+ 8, // 5
+ 8, // 6
+ 8, // 7
+ 8, // 8
+ 12, // 9
+ 12, // 10
+ 12, // 11
+ 12, // 12
+ 16, // 13
+ 16, // 14
+ 16, // 15
+ 16, // 16
+ 20, // 17
+ 20, // 18
+ 20, // 19
+ 20, // 20
+ 24, // 21
+ 24, // 22
+ 24, // 23
+ 24, // 24
+ 28, // 25
+ 28, // 26
+ 28, // 27
+ 28, // 28
+ 32, // 29
+ 32, // 30
+ 32, // 31
+ 32, // 32
+ 36, // 33
+ 36, // 34
+ 36, // 35
+ 36, // 36
+ 40, // 37
+ 40, // 38
+ 40, // 39
+ 40, // 40
+ 44, // 41
+ 44, // 42
+ 44, // 43
+ 44, // 44
+ 48, // 45
+ 48, // 46
+ 48, // 47
+ 48, // 48
+ 52, // 49
+ 52, // 50
+ 52, // 51
+ 52, // 52
+ 56, // 53
+ 56, // 54
+ 56, // 55
+ 56, // 56
+ 60, // 57
+ 60, // 58
+ 60, // 59
+ 60, // 60
+ 64, // 61
+ 64, // 62
+ 64, // 63
+ 64, // 64
+ 68, // 65
+ 68, // 66
+ 68, // 67
+ 68, // 68
+ 72, // 69
+ 72, // 70
+ 72, // 71
+ 72, // 72
+ 76, // 73
+ 76, // 74
+ 76, // 75
+ 76, // 76
+ 80, // 77
+ 80, // 78
+ 80, // 79
+ 80, // 80
+ 84, // 81
+ 84, // 82
+ 84, // 83
+ 84, // 84
+ 88, // 85
+ 88, // 86
+ 88, // 87
+ 88, // 88
+ 92, // 89
+ 92, // 90
+ 92, // 91
+ 92, // 92
+ 96, // 93
+ 96, // 94
+ 96, // 95
+ 96, // 96
+ 100, // 97
+ 100, // 98
+ 100, // 99
+ 100, // 100
+ 104, // 101
+ 104, // 102
+ 104, // 103
+ 104, // 104
+ 108, // 105
+ 108, // 106
+ 108, // 107
+ 108, // 108
+ 112, // 109
+ 112, // 110
+ 112, // 111
+ 112, // 112
+ 116, // 113
+ 116, // 114
+ 116, // 115
+ 116, // 116
+ 120, // 117
+ 120, // 118
+ 120, // 119
+ 120, // 120
+ 124, // 121
+ 124, // 122
+ 124, // 123
+ 124, // 124
+ 127, // 125
+ 127, // 126
+ 127, // 127
+};
+
+const char* g_noteTable[] =
+{
+ "Cn%01u ",
+ "Cs%01u ",
+ "Dn%01u ",
+ "Ds%01u ",
+ "En%01u ",
+ "Fn%01u ",
+ "Fs%01u ",
+ "Gn%01u ",
+ "Gs%01u ",
+ "An%01u ",
+ "As%01u ",
+ "Bn%01u ",
+};
+
+const char* g_minusNoteTable[] =
+{
+ "CnM%01u",
+ "CsM%01u",
+ "DnM%01u",
+ "DsM%01u",
+ "EnM%01u",
+ "FnM%01u",
+ "FsM%01u",
+ "GnM%01u",
+ "GsM%01u",
+ "AnM%01u",
+ "AsM%01u",
+ "BnM%01u",
+};
diff --git a/tools/mid2agb/tables.h b/tools/mid2agb/tables.h
new file mode 100644
index 000000000..da3c9072d
--- /dev/null
+++ b/tools/mid2agb/tables.h
@@ -0,0 +1,29 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef TABLES_H
+#define TABLES_H
+
+extern const int g_noteDurationLUT[];
+extern const int g_noteVelocityLUT[];
+extern const char* g_noteTable[];
+extern const char* g_minusNoteTable[];
+
+#endif // TABLES_H
diff --git a/tools/preproc/.gitignore b/tools/preproc/.gitignore
new file mode 100644
index 000000000..eb3470879
--- /dev/null
+++ b/tools/preproc/.gitignore
@@ -0,0 +1 @@
+preproc
diff --git a/tools/preproc/LICENSE b/tools/preproc/LICENSE
new file mode 100644
index 000000000..534d15349
--- /dev/null
+++ b/tools/preproc/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2016 YamaArashi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/preproc/Makefile b/tools/preproc/Makefile
new file mode 100644
index 000000000..ec4a5f365
--- /dev/null
+++ b/tools/preproc/Makefile
@@ -0,0 +1,17 @@
+CXX := g++
+
+CXXFLAGS := -std=c++11 -O2 -s -Wall -Wno-switch -Werror
+
+SRCS := asm_file.cpp c_file.cpp charmap.cpp preproc.cpp string_parser.cpp \
+ utf8.cpp
+
+HEADERS := asm_file.h c_file.h char_util.h charmap.h preproc.h string_parser.h \
+ utf8.h
+
+.PHONY: clean
+
+preproc: $(SRCS) $(HEADERS)
+ $(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
+
+clean:
+ $(RM) preproc preproc.exe
diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp
new file mode 100644
index 000000000..bb296b78b
--- /dev/null
+++ b/tools/preproc/asm_file.cpp
@@ -0,0 +1,529 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstdarg>
+#include "preproc.h"
+#include "asm_file.h"
+#include "char_util.h"
+#include "utf8.h"
+#include "string_parser.h"
+
+AsmFile::AsmFile(std::string filename) : m_filename(filename)
+{
+ FILE *fp = std::fopen(filename.c_str(), "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", filename.c_str());
+
+ std::fseek(fp, 0, SEEK_END);
+
+ m_size = std::ftell(fp);
+
+ if (m_size < 0)
+ FATAL_ERROR("File size of \"%s\" is less than zero.\n", filename.c_str());
+
+ m_buffer = new char[m_size + 1];
+
+ std::rewind(fp);
+
+ if (std::fread(m_buffer, m_size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", filename.c_str());
+
+ m_buffer[m_size] = 0;
+
+ std::fclose(fp);
+
+ m_pos = 0;
+ m_lineNum = 1;
+ m_lineStart = 0;
+
+ RemoveComments();
+}
+
+AsmFile::AsmFile(AsmFile&& other) : m_filename(std::move(other.m_filename))
+{
+ m_buffer = other.m_buffer;
+ m_pos = other.m_pos;
+ m_size = other.m_size;
+ m_lineNum = other.m_lineNum;
+ m_lineStart = other.m_lineStart;
+
+ other.m_buffer = nullptr;
+}
+
+AsmFile::~AsmFile()
+{
+ delete[] m_buffer;
+}
+
+// Removes comments to simplify further processing.
+// It stops upon encountering a null character,
+// which may or may not be the end of file marker.
+// If it's not, the error will be caught later.
+void AsmFile::RemoveComments()
+{
+ long pos = 0;
+ char stringChar = 0;
+
+ for (;;)
+ {
+ if (m_buffer[pos] == 0)
+ return;
+
+ if (stringChar != 0)
+ {
+ if (m_buffer[pos] == '\\' && m_buffer[pos + 1] == stringChar)
+ {
+ pos += 2;
+ }
+ else
+ {
+ if (m_buffer[pos] == stringChar)
+ stringChar = 0;
+ pos++;
+ }
+ }
+ else if (m_buffer[pos] == '@' && (pos == 0 || m_buffer[pos - 1] != '\\'))
+ {
+ while (m_buffer[pos] != '\n' && m_buffer[pos] != 0)
+ m_buffer[pos++] = ' ';
+ }
+ else if (m_buffer[pos] == '/' && m_buffer[pos + 1] == '*')
+ {
+ m_buffer[pos++] = ' ';
+ m_buffer[pos++] = ' ';
+
+ for (;;)
+ {
+ if (m_buffer[pos] == 0)
+ return;
+
+ if (m_buffer[pos] == '*' && m_buffer[pos + 1] == '/')
+ {
+ m_buffer[pos++] = ' ';
+ m_buffer[pos++] = ' ';
+ break;
+ }
+ else
+ {
+ if (m_buffer[pos] != '\n')
+ m_buffer[pos] = ' ';
+ pos++;
+ }
+ }
+ }
+ else
+ {
+ if (m_buffer[pos] == '"' || m_buffer[pos] == '\'')
+ stringChar = m_buffer[pos];
+ pos++;
+ }
+ }
+}
+
+// Checks if we're at a particular directive and if so, consumes it.
+// Returns whether the directive was found.
+bool AsmFile::CheckForDirective(std::string name)
+{
+ long i;
+ long length = static_cast<long>(name.length());
+
+ for (i = 0; i < length && m_pos + i < m_size; i++)
+ if (name[i] != m_buffer[m_pos + i])
+ return false;
+
+ if (i < length)
+ return false;
+
+ m_pos += length;
+
+ return true;
+}
+
+// Checks if we're at a known directive and if so, consumes it.
+// Returns which directive was found.
+Directive AsmFile::GetDirective()
+{
+ SkipWhitespace();
+
+ if (CheckForDirective(".include"))
+ return Directive::Include;
+ else if (CheckForDirective(".string"))
+ return Directive::String;
+ else if (CheckForDirective(".braille"))
+ return Directive::Braille;
+ else
+ return Directive::Unknown;
+}
+
+// Checks if we're at label that ends with '::'.
+// Returns the name if so and an empty string if not.
+std::string AsmFile::GetGlobalLabel()
+{
+ long start = m_pos;
+ long pos = m_pos;
+
+ if (IsIdentifierStartingChar(m_buffer[pos]))
+ {
+ pos++;
+
+ while (IsIdentifierChar(m_buffer[pos]))
+ pos++;
+ }
+
+ if (m_buffer[pos] == ':' && m_buffer[pos + 1] == ':')
+ {
+ m_pos = pos + 2;
+ ExpectEmptyRestOfLine();
+ return std::string(&m_buffer[start], pos - start);
+ }
+
+ return std::string();
+}
+
+// Skips tabs and spaces.
+void AsmFile::SkipWhitespace()
+{
+ while (m_buffer[m_pos] == '\t' || m_buffer[m_pos] == ' ')
+ m_pos++;
+}
+
+// Reads include path.
+std::string AsmFile::ReadPath()
+{
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] != '"')
+ RaiseError("expected file path");
+
+ m_pos++;
+
+ int length = 0;
+ long startPos = m_pos;
+
+ while (m_buffer[m_pos] != '"')
+ {
+ unsigned char c = m_buffer[m_pos++];
+
+ if (c == 0)
+ {
+ if (m_pos >= m_size)
+ RaiseError("unexpected EOF in include string");
+ else
+ RaiseError("unexpected null character in include string");
+ }
+
+ if (!IsAsciiPrintable(c))
+ RaiseError("unexpected character '\\x%02X' in include string", c);
+
+ // Don't bother allowing any escape sequences.
+ if (c == '\\')
+ {
+ c = m_buffer[m_pos];
+ RaiseError("unexpected escape '\\%c' in include string", c);
+ }
+
+ length++;
+
+ if (length > kMaxPath)
+ RaiseError("path is too long");
+ }
+
+ m_pos++; // Go past the right quote.
+
+ ExpectEmptyRestOfLine();
+
+ return std::string(&m_buffer[startPos], length);
+}
+
+// Reads a charmap string.
+int AsmFile::ReadString(unsigned char* s)
+{
+ SkipWhitespace();
+
+ int length;
+ StringParser stringParser(m_buffer, m_size);
+
+ try
+ {
+ m_pos += stringParser.ParseString(m_pos, s, length);
+ }
+ catch (std::runtime_error e)
+ {
+ RaiseError(e.what());
+ }
+
+ SkipWhitespace();
+
+ if (ConsumeComma())
+ {
+ SkipWhitespace();
+ int padLength = ReadPadLength();
+
+ while (length < padLength)
+ {
+ s[length++] = 0;
+ }
+ }
+
+ ExpectEmptyRestOfLine();
+
+ return length;
+}
+
+int AsmFile::ReadBraille(unsigned char* s)
+{
+ static std::map<char, unsigned char> encoding =
+ {
+ { 'A', 0x01 },
+ { 'B', 0x05 },
+ { 'C', 0x03 },
+ { 'D', 0x0B },
+ { 'E', 0x09 },
+ { 'F', 0x07 },
+ { 'G', 0x0F },
+ { 'H', 0x0D },
+ { 'I', 0x06 },
+ { 'J', 0x0E },
+ { 'K', 0x11 },
+ { 'L', 0x15 },
+ { 'M', 0x13 },
+ { 'N', 0x1B },
+ { 'O', 0x19 },
+ { 'P', 0x17 },
+ { 'Q', 0x1F },
+ { 'R', 0x1D },
+ { 'S', 0x16 },
+ { 'T', 0x1E },
+ { 'U', 0x31 },
+ { 'V', 0x35 },
+ { 'W', 0x2E },
+ { 'X', 0x33 },
+ { 'Y', 0x3B },
+ { 'Z', 0x39 },
+ { ' ', 0x00 },
+ { ',', 0x04 },
+ { '.', 0x2C },
+ { '$', 0xFF },
+ };
+
+ SkipWhitespace();
+
+ int length = 0;
+
+ if (m_buffer[m_pos] != '"')
+ RaiseError("expected braille string literal");
+
+ m_pos++;
+
+ while (m_buffer[m_pos] != '"')
+ {
+ if (length == kMaxStringLength)
+ RaiseError("mapped string longer than %d bytes", kMaxStringLength);
+
+ if (m_buffer[m_pos] == '\\' && m_buffer[m_pos + 1] == 'n')
+ {
+ s[length++] = 0xFE;
+ m_pos += 2;
+ }
+ else
+ {
+ char c = m_buffer[m_pos];
+
+ if (encoding.count(c) == 0)
+ {
+ if (IsAsciiPrintable(c))
+ RaiseError("character '%c' not valid in braille string", m_buffer[m_pos]);
+ else
+ RaiseError("character '\\x%02X' not valid in braille string", m_buffer[m_pos]);
+ }
+
+ s[length++] = encoding[c];
+ m_pos++;
+ }
+ }
+
+ m_pos++; // Go past the right quote.
+
+ ExpectEmptyRestOfLine();
+
+ return length;
+}
+
+// If we're at a comma, consumes it.
+// Returns whether a comma was found.
+bool AsmFile::ConsumeComma()
+{
+ if (m_buffer[m_pos] == ',')
+ {
+ m_pos++;
+ return true;
+ }
+
+ return false;
+}
+
+// Converts digit character to numerical value.
+static int ConvertDigit(char c, int radix)
+{
+ int digit;
+
+ if (c >= '0' && c <= '9')
+ digit = c - '0';
+ else if (c >= 'A' && c <= 'F')
+ digit = 10 + c - 'A';
+ else if (c >= 'a' && c <= 'f')
+ digit = 10 + c - 'a';
+ else
+ return -1;
+
+ return (digit < radix) ? digit : -1;
+}
+
+// Reads an integer. If the integer is greater than maxValue, it returns -1.
+int AsmFile::ReadPadLength()
+{
+ if (!IsAsciiDigit(m_buffer[m_pos]))
+ RaiseError("expected integer");
+
+ int radix = 10;
+
+ if (m_buffer[m_pos] == '0' && m_buffer[m_pos + 1] == 'x')
+ {
+ radix = 16;
+ m_pos += 2;
+ }
+
+ unsigned n = 0;
+ int digit;
+
+ while ((digit = ConvertDigit(m_buffer[m_pos], radix)) != -1)
+ {
+ n = n * radix + digit;
+
+ if (n > kMaxStringLength)
+ RaiseError("pad length greater than maximum length (%d)", kMaxStringLength);
+
+ m_pos++;
+ }
+
+ return n;
+}
+
+// Outputs the current line and moves to the next one.
+void AsmFile::OutputLine()
+{
+ while (m_buffer[m_pos] != '\n' && m_buffer[m_pos] != 0)
+ m_pos++;
+
+ if (m_buffer[m_pos] == 0)
+ {
+ if (m_pos >= m_size)
+ {
+ RaiseWarning("file doesn't end with newline");
+ puts(&m_buffer[m_lineStart]);
+ }
+ else
+ {
+ RaiseError("unexpected null character");
+ }
+ }
+ else
+ {
+ m_buffer[m_pos] = 0;
+ puts(&m_buffer[m_lineStart]);
+ m_buffer[m_pos] = '\n';
+ m_pos++;
+ m_lineStart = m_pos;
+ m_lineNum++;
+ }
+}
+
+// Asserts that the rest of the line is empty and moves to the next one.
+void AsmFile::ExpectEmptyRestOfLine()
+{
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] == 0)
+ {
+ if (m_pos >= m_size)
+ RaiseWarning("file doesn't end with newline");
+ else
+ RaiseError("unexpected null character");
+ }
+ else if (m_buffer[m_pos] == '\n')
+ {
+ m_pos++;
+ m_lineStart = m_pos;
+ m_lineNum++;
+ }
+ else if (m_buffer[m_pos] == '\r')
+ {
+ RaiseError("only Unix-style LF newlines are supported");
+ }
+ else
+ {
+ RaiseError("junk at end of line");
+ }
+}
+
+// Checks if we're at the end of the file.
+bool AsmFile::IsAtEnd()
+{
+ return (m_pos >= m_size);
+}
+
+// Output the current location to set gas's logical file and line numbers.
+void AsmFile::OutputLocation()
+{
+ std::printf("# %ld \"%s\"\n", m_lineNum, m_filename.c_str());
+}
+
+// Reports a diagnostic message.
+void AsmFile::ReportDiagnostic(const char* type, const char* format, std::va_list args)
+{
+ const int bufferSize = 1024;
+ char buffer[bufferSize];
+ std::vsnprintf(buffer, bufferSize, format, args);
+ std::fprintf(stderr, "%s:%ld: %s: %s\n", m_filename.c_str(), m_lineNum, type, buffer);
+}
+
+#define DO_REPORT(type) \
+do \
+{ \
+ std::va_list args; \
+ va_start(args, format); \
+ ReportDiagnostic(type, format, args); \
+ va_end(args); \
+} while (0)
+
+// Reports an error diagnostic and terminates the program.
+void AsmFile::RaiseError(const char* format, ...)
+{
+ DO_REPORT("error");
+ std::exit(1);
+}
+
+// Reports a warning diagnostic.
+void AsmFile::RaiseWarning(const char* format, ...)
+{
+ DO_REPORT("warning");
+}
diff --git a/tools/preproc/asm_file.h b/tools/preproc/asm_file.h
new file mode 100644
index 000000000..d73b36e90
--- /dev/null
+++ b/tools/preproc/asm_file.h
@@ -0,0 +1,72 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef ASM_FILE_H
+#define ASM_FILE_H
+
+#include <cstdarg>
+#include <cstdint>
+#include <string>
+#include "preproc.h"
+
+enum class Directive
+{
+ Include,
+ String,
+ Braille,
+ Unknown
+};
+
+class AsmFile
+{
+public:
+ AsmFile(std::string filename);
+ AsmFile(AsmFile&& other);
+ AsmFile(const AsmFile&) = delete;
+ ~AsmFile();
+ Directive GetDirective();
+ std::string GetGlobalLabel();
+ std::string ReadPath();
+ int ReadString(unsigned char* s);
+ int ReadBraille(unsigned char* s);
+ bool IsAtEnd();
+ void OutputLine();
+ void OutputLocation();
+
+private:
+ char* m_buffer;
+ long m_pos;
+ long m_size;
+ long m_lineNum;
+ long m_lineStart;
+ std::string m_filename;
+
+ bool ConsumeComma();
+ int ReadPadLength();
+ void RemoveComments();
+ bool CheckForDirective(std::string name);
+ void SkipWhitespace();
+ void ExpectEmptyRestOfLine();
+ void ReportDiagnostic(const char* type, const char* format, std::va_list args);
+ void RaiseError(const char* format, ...);
+ void RaiseWarning(const char* format, ...);
+};
+
+#endif // ASM_FILE_H
diff --git a/tools/preproc/c_file.cpp b/tools/preproc/c_file.cpp
new file mode 100644
index 000000000..24b3453e8
--- /dev/null
+++ b/tools/preproc/c_file.cpp
@@ -0,0 +1,421 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstdarg>
+#include <string>
+#include <memory>
+#include "preproc.h"
+#include "c_file.h"
+#include "char_util.h"
+#include "utf8.h"
+#include "string_parser.h"
+
+CFile::CFile(std::string filename) : m_filename(filename)
+{
+ FILE *fp = std::fopen(filename.c_str(), "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", filename.c_str());
+
+ std::fseek(fp, 0, SEEK_END);
+
+ m_size = std::ftell(fp);
+
+ if (m_size < 0)
+ FATAL_ERROR("File size of \"%s\" is less than zero.\n", filename.c_str());
+
+ m_buffer = new char[m_size + 1];
+
+ std::rewind(fp);
+
+ if (std::fread(m_buffer, m_size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", filename.c_str());
+
+ m_buffer[m_size] = 0;
+
+ std::fclose(fp);
+
+ m_pos = 0;
+ m_lineNum = 1;
+}
+
+CFile::CFile(CFile&& other) : m_filename(std::move(other.m_filename))
+{
+ m_buffer = other.m_buffer;
+ m_pos = other.m_pos;
+ m_size = other.m_size;
+ m_lineNum = other.m_lineNum;
+
+ other.m_buffer = nullptr;
+}
+
+CFile::~CFile()
+{
+ delete[] m_buffer;
+}
+
+void CFile::Preproc()
+{
+ char stringChar = 0;
+
+ while (m_pos < m_size)
+ {
+ if (stringChar)
+ {
+ if (m_buffer[m_pos] == stringChar)
+ {
+ std::putchar(stringChar);
+ m_pos++;
+ stringChar = 0;
+ }
+ else if (m_buffer[m_pos] == '\\' && m_buffer[m_pos + 1] == stringChar)
+ {
+ std::putchar('\\');
+ std::putchar(stringChar);
+ m_pos += 2;
+ }
+ else
+ {
+ if (m_buffer[m_pos] == '\n')
+ m_lineNum++;
+ std::putchar(m_buffer[m_pos]);
+ m_pos++;
+ }
+ }
+ else
+ {
+ TryConvertString();
+ TryConvertIncbin();
+
+ if (m_pos >= m_size)
+ break;
+
+ char c = m_buffer[m_pos++];
+
+ std::putchar(c);
+
+ if (c == '\n')
+ m_lineNum++;
+ else if (c == '"')
+ stringChar = '"';
+ else if (c == '\'')
+ stringChar = '\'';
+ }
+ }
+}
+
+bool CFile::ConsumeHorizontalWhitespace()
+{
+ if (m_buffer[m_pos] == '\t' || m_buffer[m_pos] == ' ')
+ {
+ m_pos++;
+ return true;
+ }
+
+ return false;
+}
+
+bool CFile::ConsumeNewline()
+{
+ if (m_buffer[m_pos] == '\r' && m_buffer[m_pos + 1] == '\n')
+ {
+ m_pos += 2;
+ m_lineNum++;
+ std::putchar('\n');
+ return true;
+ }
+
+ if (m_buffer[m_pos] == '\n')
+ {
+ m_pos++;
+ m_lineNum++;
+ std::putchar('\n');
+ return true;
+ }
+
+ return false;
+}
+
+void CFile::SkipWhitespace()
+{
+ while (ConsumeHorizontalWhitespace() || ConsumeNewline())
+ ;
+}
+
+void CFile::TryConvertString()
+{
+ long oldPos = m_pos;
+ long oldLineNum = m_lineNum;
+ bool noTerminator = false;
+
+ if (m_buffer[m_pos] != '_' || (m_pos > 0 && IsIdentifierChar(m_buffer[m_pos - 1])))
+ return;
+
+ m_pos++;
+
+ if (m_buffer[m_pos] == '_')
+ {
+ noTerminator = true;
+ m_pos++;
+ }
+
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] != '(')
+ {
+ m_pos = oldPos;
+ m_lineNum = oldLineNum;
+ return;
+ }
+
+ m_pos++;
+
+ SkipWhitespace();
+
+ std::printf("{ ");
+
+ while (1)
+ {
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] == '"')
+ {
+ unsigned char s[kMaxStringLength];
+ int length;
+ StringParser stringParser(m_buffer, m_size);
+
+ try
+ {
+ m_pos += stringParser.ParseString(m_pos, s, length);
+ }
+ catch (std::runtime_error e)
+ {
+ RaiseError(e.what());
+ }
+
+ for (int i = 0; i < length; i++)
+ printf("0x%02X, ", s[i]);
+ }
+ else if (m_buffer[m_pos] == ')')
+ {
+ m_pos++;
+ break;
+ }
+ else
+ {
+ if (m_pos >= m_size)
+ RaiseError("unexpected EOF");
+ if (IsAsciiPrintable(m_buffer[m_pos]))
+ RaiseError("unexpected character '%c'", m_buffer[m_pos]);
+ else
+ RaiseError("unexpected character '\\x%02X'", m_buffer[m_pos]);
+ }
+ }
+
+ if (noTerminator)
+ std::printf(" }");
+ else
+ std::printf("0xFF }");
+}
+
+bool CFile::CheckIdentifier(const std::string& ident)
+{
+ unsigned int i;
+
+ for (i = 0; i < ident.length() && m_pos + i < (unsigned)m_size; i++)
+ if (ident[i] != m_buffer[m_pos + i])
+ return false;
+
+ return (i == ident.length());
+}
+
+std::unique_ptr<unsigned char[]> CFile::ReadWholeFile(const std::string& path, int& size)
+{
+ FILE* fp = std::fopen(path.c_str(), "rb");
+
+ if (fp == nullptr)
+ RaiseError("Failed to open \"%s\" for reading.\n", path.c_str());
+
+ std::fseek(fp, 0, SEEK_END);
+
+ size = std::ftell(fp);
+
+ std::unique_ptr<unsigned char[]> buffer = std::unique_ptr<unsigned char[]>(new unsigned char[size]);
+
+ std::rewind(fp);
+
+ if (std::fread(buffer.get(), size, 1, fp) != 1)
+ RaiseError("Failed to read \"%s\".\n", path.c_str());
+
+ std::fclose(fp);
+
+ return buffer;
+}
+
+int ExtractData(const std::unique_ptr<unsigned char[]>& buffer, int offset, int size)
+{
+ switch (size)
+ {
+ case 1:
+ return buffer[offset];
+ case 2:
+ return (buffer[offset + 1] << 8)
+ | buffer[offset];
+ case 4:
+ return (buffer[offset + 3] << 24)
+ | (buffer[offset + 2] << 16)
+ | (buffer[offset + 1] << 8)
+ | buffer[offset];
+ default:
+ FATAL_ERROR("Invalid size passed to ExtractData.\n");
+ }
+}
+
+void CFile::TryConvertIncbin()
+{
+ std::string idents[6] = { "INCBIN_S8", "INCBIN_U8", "INCBIN_S16", "INCBIN_U16", "INCBIN_S32", "INCBIN_U32" };
+ int incbinType = -1;
+
+ for (int i = 0; i < 6; i++)
+ {
+ if (CheckIdentifier(idents[i]))
+ {
+ incbinType = i;
+ break;
+ }
+ }
+
+ if (incbinType == -1)
+ return;
+
+ int size = 1 << (incbinType / 2);
+ bool isSigned = ((incbinType % 2) == 0);
+
+ long oldPos = m_pos;
+ long oldLineNum = m_lineNum;
+
+ m_pos += idents[incbinType].length();
+
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] != '(')
+ {
+ m_pos = oldPos;
+ m_lineNum = oldLineNum;
+ return;
+ }
+
+ m_pos++;
+
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] != '"')
+ RaiseError("expected double quote");
+
+ m_pos++;
+
+ int startPos = m_pos;
+
+ while (m_buffer[m_pos] != '"')
+ {
+ if (m_buffer[m_pos] == 0)
+ {
+ if (m_pos >= m_size)
+ RaiseError("unexpected EOF in path string");
+ else
+ RaiseError("unexpected null character in path string");
+ }
+
+ if (m_buffer[m_pos] == '\r' || m_buffer[m_pos] == '\n')
+ RaiseError("unexpected end of line character in path string");
+
+ if (m_buffer[m_pos] == '\\')
+ RaiseError("unexpected escape in path string");
+
+ m_pos++;
+ }
+
+ std::string path(&m_buffer[startPos], m_pos - startPos);
+
+ m_pos++;
+
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] != ')')
+ RaiseError("expected ')'");
+
+ m_pos++;
+
+ std::printf("{");
+
+ int fileSize;
+ std::unique_ptr<unsigned char[]> buffer = ReadWholeFile(path, fileSize);
+
+ if ((fileSize % size) != 0)
+ RaiseError("Size %d doesn't evenly divide file size %d.\n", size, fileSize);
+
+ int count = fileSize / size;
+ int offset = 0;
+
+ for (int i = 0; i < count; i++)
+ {
+ int data = ExtractData(buffer, offset, size);
+ offset += size;
+
+ if (isSigned)
+ std::printf("%d,", data);
+ else
+ std::printf("%uu,", data);
+ }
+
+ std::printf("}");
+}
+
+// Reports a diagnostic message.
+void CFile::ReportDiagnostic(const char* type, const char* format, std::va_list args)
+{
+ const int bufferSize = 1024;
+ char buffer[bufferSize];
+ std::vsnprintf(buffer, bufferSize, format, args);
+ std::fprintf(stderr, "%s:%ld: %s: %s\n", m_filename.c_str(), m_lineNum, type, buffer);
+}
+
+#define DO_REPORT(type) \
+do \
+{ \
+ std::va_list args; \
+ va_start(args, format); \
+ ReportDiagnostic(type, format, args); \
+ va_end(args); \
+} while (0)
+
+// Reports an error diagnostic and terminates the program.
+void CFile::RaiseError(const char* format, ...)
+{
+ DO_REPORT("error");
+ std::exit(1);
+}
+
+// Reports a warning diagnostic.
+void CFile::RaiseWarning(const char* format, ...)
+{
+ DO_REPORT("warning");
+}
diff --git a/tools/preproc/c_file.h b/tools/preproc/c_file.h
new file mode 100644
index 000000000..7369aba85
--- /dev/null
+++ b/tools/preproc/c_file.h
@@ -0,0 +1,58 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef C_FILE_H
+#define C_FILE_H
+
+#include <cstdarg>
+#include <cstdint>
+#include <string>
+#include <memory>
+#include "preproc.h"
+
+class CFile
+{
+public:
+ CFile(std::string filename);
+ CFile(CFile&& other);
+ CFile(const CFile&) = delete;
+ ~CFile();
+ void Preproc();
+
+private:
+ char* m_buffer;
+ long m_pos;
+ long m_size;
+ long m_lineNum;
+ std::string m_filename;
+
+ bool ConsumeHorizontalWhitespace();
+ bool ConsumeNewline();
+ void SkipWhitespace();
+ void TryConvertString();
+ std::unique_ptr<unsigned char[]> ReadWholeFile(const std::string& path, int& size);
+ bool CheckIdentifier(const std::string& ident);
+ void TryConvertIncbin();
+ void ReportDiagnostic(const char* type, const char* format, std::va_list args);
+ void RaiseError(const char* format, ...);
+ void RaiseWarning(const char* format, ...);
+};
+
+#endif // C_FILE_H
diff --git a/tools/preproc/char_util.h b/tools/preproc/char_util.h
new file mode 100644
index 000000000..02a6e1ceb
--- /dev/null
+++ b/tools/preproc/char_util.h
@@ -0,0 +1,71 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef CHAR_UTIL_H
+#define CHAR_UTIL_H
+
+#include <cstdint>
+#include <cassert>
+
+inline bool IsAscii(unsigned char c)
+{
+ return (c < 128);
+}
+
+inline bool IsAsciiAlpha(unsigned char c)
+{
+ return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
+}
+
+inline bool IsAsciiDigit(unsigned char c)
+{
+ return (c >= '0' && c <= '9');
+}
+
+inline bool IsAsciiHexDigit(unsigned char c)
+{
+ return ((c >= '0' && c <= '9')
+ || (c >= 'a' && c <= 'f')
+ || (c >= 'A' && c <= 'F'));
+}
+
+inline bool IsAsciiAlphanum(unsigned char c)
+{
+ return (IsAsciiAlpha(c) || IsAsciiDigit(c));
+}
+
+inline bool IsAsciiPrintable(unsigned char c)
+{
+ return (c >= ' ' && c <= '~');
+}
+
+// Returns whether the character can start a C identifier or the identifier of a "{FOO}" constant in strings.
+inline bool IsIdentifierStartingChar(unsigned char c)
+{
+ return IsAsciiAlpha(c) || c == '_';
+}
+
+// Returns whether the character can be used in a C identifier or the identifier of a "{FOO}" constant in strings.
+inline bool IsIdentifierChar(unsigned char c)
+{
+ return IsAsciiAlphanum(c) || c == '_';
+}
+
+#endif // CHAR_UTIL_H
diff --git a/tools/preproc/charmap.cpp b/tools/preproc/charmap.cpp
new file mode 100644
index 000000000..a7bedfe26
--- /dev/null
+++ b/tools/preproc/charmap.cpp
@@ -0,0 +1,408 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstdint>
+#include <cstdarg>
+#include "preproc.h"
+#include "charmap.h"
+#include "char_util.h"
+#include "utf8.h"
+
+enum LhsType
+{
+ Char,
+ Escape,
+ Constant,
+ None
+};
+
+struct Lhs
+{
+ LhsType type;
+ std::string name;
+ std::int32_t code;
+};
+
+class CharmapReader
+{
+public:
+ CharmapReader(std::string filename);
+ CharmapReader(const CharmapReader&) = delete;
+ ~CharmapReader();
+ Lhs ReadLhs();
+ void ExpectEqualsSign();
+ std::string ReadSequence();
+ void ExpectEmptyRestOfLine();
+ void RaiseError(const char* format, ...);
+
+private:
+ char* m_buffer;
+ long m_pos;
+ long m_size;
+ long m_lineNum;
+ std::string m_filename;
+
+ void RemoveComments();
+ std::string ReadConstant();
+ void SkipWhitespace();
+};
+
+CharmapReader::CharmapReader(std::string filename) : m_filename(filename)
+{
+ FILE *fp = std::fopen(filename.c_str(), "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", filename.c_str());
+
+ std::fseek(fp, 0, SEEK_END);
+
+ m_size = std::ftell(fp);
+
+ if (m_size < 0)
+ FATAL_ERROR("File size of \"%s\" is less than zero.\n", filename.c_str());
+
+ m_buffer = new char[m_size + 1];
+
+ std::rewind(fp);
+
+ if (std::fread(m_buffer, m_size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", filename.c_str());
+
+ m_buffer[m_size] = 0;
+
+ std::fclose(fp);
+
+ m_pos = 0;
+ m_lineNum = 1;
+
+ RemoveComments();
+}
+
+CharmapReader::~CharmapReader()
+{
+ delete[] m_buffer;
+}
+
+Lhs CharmapReader::ReadLhs()
+{
+ Lhs lhs;
+
+ for (;;)
+ {
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] == '\n')
+ {
+ m_pos++;
+ m_lineNum++;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ if (m_buffer[m_pos] == '\'')
+ {
+ m_pos++;
+
+ bool isEscape = (m_buffer[m_pos] == '\\');
+
+ if (isEscape)
+ {
+ m_pos++;
+ }
+
+ unsigned char c = m_buffer[m_pos];
+
+ if (c == 0)
+ {
+ if (m_pos >= m_size)
+ RaiseError("unexpected EOF in UTF-8 character literal");
+ else
+ RaiseError("unexpected null character in UTF-8 character literal");
+ }
+
+ if (IsAscii(c) && !IsAsciiPrintable(c))
+ RaiseError("unexpected character U+%X in UTF-8 character literal", c);
+
+ UnicodeChar unicodeChar = DecodeUtf8(&m_buffer[m_pos]);
+ std::int32_t code = unicodeChar.code;
+
+ if (code == -1)
+ RaiseError("invalid encoding in UTF-8 character literal");
+
+ m_pos += unicodeChar.encodingLength;
+
+ if (m_buffer[m_pos] != '\'')
+ RaiseError("unterminated character literal");
+
+ m_pos++;
+
+ lhs.code = code;
+
+ if (isEscape)
+ {
+ if (code >= 128)
+ RaiseError("escapes using non-ASCII characters are invalid");
+
+ switch (code)
+ {
+ case '\'':
+ lhs.type = LhsType::Char;
+ break;
+ case '\\':
+ lhs.type = LhsType::Char;
+ case '"':
+ RaiseError("cannot escape double quote");
+ break;
+ default:
+ lhs.type = LhsType::Escape;
+ }
+ }
+ else
+ {
+ if (code == '\'')
+ RaiseError("empty character literal");
+
+ lhs.type = LhsType::Char;
+ }
+ }
+ else if (IsIdentifierStartingChar(m_buffer[m_pos]))
+ {
+ lhs.type = LhsType::Constant;
+ lhs.name = ReadConstant();
+ }
+ else if (m_buffer[m_pos] == '\r')
+ {
+ RaiseError("only Unix-style LF newlines are supported");
+ }
+ else if (m_buffer[m_pos] == 0)
+ {
+ if (m_pos < m_size)
+ RaiseError("unexpected null character");
+ lhs.type = LhsType::None;
+ }
+ else
+ {
+ RaiseError("junk at start of line");
+ }
+
+ return lhs;
+}
+
+void CharmapReader::ExpectEqualsSign()
+{
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] != '=')
+ RaiseError("expected equals sign");
+
+ m_pos++;
+}
+
+static unsigned int ConvertHexDigit(char c)
+{
+ unsigned int digit = 0;
+
+ if (c >= '0' && c <= '9')
+ digit = c - '0';
+ else if (c >= 'A' && c <= 'F')
+ digit = 10 + c - 'A';
+ else if (c >= 'a' && c <= 'f')
+ digit = 10 + c - 'a';
+
+ return digit;
+}
+
+std::string CharmapReader::ReadSequence()
+{
+ SkipWhitespace();
+
+ long startPos = m_pos;
+
+ unsigned int length = 0;
+
+ while (IsAsciiHexDigit(m_buffer[m_pos]) && IsAsciiHexDigit(m_buffer[m_pos + 1]))
+ {
+ m_pos += 2;
+ length++;
+
+ if (length > kMaxCharmapSequenceLength)
+ RaiseError("byte sequence too long (max is %lu bytes)", kMaxCharmapSequenceLength);
+
+ SkipWhitespace();
+ }
+
+ if (IsAsciiHexDigit(m_buffer[m_pos]))
+ RaiseError("each byte must have 2 hex digits");
+
+ if (length == 0)
+ RaiseError("expected byte sequence");
+
+ std::string sequence;
+ sequence.reserve(length);
+
+ m_pos = startPos;
+
+ for (unsigned int i = 0; i < length; i++)
+ {
+ unsigned int digit1 = ConvertHexDigit(m_buffer[m_pos]);
+ unsigned int digit2 = ConvertHexDigit(m_buffer[m_pos + 1]);
+ unsigned char byte = digit1 * 16 + digit2;
+ sequence += byte;
+
+ m_pos += 2;
+ SkipWhitespace();
+ }
+
+ return sequence;
+}
+
+void CharmapReader::ExpectEmptyRestOfLine()
+{
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] == 0)
+ {
+ if (m_pos < m_size)
+ RaiseError("unexpected null character");
+ }
+ else if (m_buffer[m_pos] == '\n')
+ {
+ m_pos++;
+ m_lineNum++;
+ }
+ else if (m_buffer[m_pos] == '\r')
+ {
+ RaiseError("only Unix-style LF newlines are supported");
+ }
+ else
+ {
+ RaiseError("junk at end of line");
+ }
+}
+
+void CharmapReader::RaiseError(const char* format, ...)
+{
+ const int bufferSize = 1024;
+ char buffer[bufferSize];
+
+ std::va_list args;
+ va_start(args, format);
+ std::vsnprintf(buffer, bufferSize, format, args);
+ va_end(args);
+
+ std::fprintf(stderr, "%s:%ld: error: %s\n", m_filename.c_str(), m_lineNum, buffer);
+
+ std::exit(1);
+}
+
+void CharmapReader::RemoveComments()
+{
+ long pos = 0;
+ bool inString = false;
+
+ for (;;)
+ {
+ if (m_buffer[pos] == 0)
+ return;
+
+ if (inString)
+ {
+ if (m_buffer[pos] == '\\' && m_buffer[pos + 1] == '\'')
+ {
+ pos += 2;
+ }
+ else
+ {
+ if (m_buffer[pos] == '\'')
+ inString = false;
+ pos++;
+ }
+ }
+ else if (m_buffer[pos] == '@')
+ {
+ while (m_buffer[pos] != '\n' && m_buffer[pos] != 0)
+ m_buffer[pos++] = ' ';
+ }
+ else
+ {
+ if (m_buffer[pos] == '\'')
+ inString = true;
+ pos++;
+ }
+ }
+}
+
+std::string CharmapReader::ReadConstant()
+{
+ long startPos = m_pos;
+
+ while (IsIdentifierChar(m_buffer[m_pos]))
+ m_pos++;
+
+ return std::string(&m_buffer[startPos], m_pos - startPos);
+}
+
+void CharmapReader::SkipWhitespace()
+{
+ while (m_buffer[m_pos] == '\t' || m_buffer[m_pos] == ' ')
+ m_pos++;
+}
+
+Charmap::Charmap(std::string filename)
+{
+ CharmapReader reader(filename);
+
+ for (;;)
+ {
+ Lhs lhs = reader.ReadLhs();
+
+ if (lhs.type == LhsType::None)
+ return;
+
+ reader.ExpectEqualsSign();
+
+ std::string sequence = reader.ReadSequence();
+
+ switch (lhs.type)
+ {
+ case LhsType::Char:
+ if (m_chars.find(lhs.code) != m_chars.end())
+ reader.RaiseError("redefining char");
+ m_chars[lhs.code] = sequence;
+ break;
+ case LhsType::Escape:
+ if (m_escapes[lhs.code].length() != 0)
+ reader.RaiseError("redefining escape");
+ m_escapes[lhs.code] = sequence;
+ break;
+ case LhsType::Constant:
+ if (m_constants.find(lhs.name) != m_constants.end())
+ reader.RaiseError("redefining constant");
+ m_constants[lhs.name] = sequence;
+ break;
+ }
+
+ reader.ExpectEmptyRestOfLine();
+ }
+}
diff --git a/tools/preproc/charmap.h b/tools/preproc/charmap.h
new file mode 100644
index 000000000..0d752ac99
--- /dev/null
+++ b/tools/preproc/charmap.h
@@ -0,0 +1,64 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef CHARMAP_H
+#define CHARMAP_H
+
+#include <cstdint>
+#include <string>
+#include <map>
+#include <vector>
+
+class Charmap
+{
+public:
+ Charmap(std::string filename);
+
+ std::string Char(std::int32_t code)
+ {
+ auto it = m_chars.find(code);
+
+ if (it == m_chars.end())
+ return std::string();
+
+ return it->second;
+ }
+
+ std::string Escape(unsigned char code)
+ {
+ return m_escapes[code];
+ }
+
+ std::string Constant(std::string identifier)
+ {
+ auto it = m_constants.find(identifier);
+
+ if (it == m_constants.end())
+ return std::string();
+
+ return it->second;
+ }
+private:
+ std::map<std::int32_t, std::string> m_chars;
+ std::string m_escapes[128];
+ std::map<std::string, std::string> m_constants;
+};
+
+#endif // CHARMAP_H
diff --git a/tools/preproc/preproc.cpp b/tools/preproc/preproc.cpp
new file mode 100644
index 000000000..c9c6042df
--- /dev/null
+++ b/tools/preproc/preproc.cpp
@@ -0,0 +1,156 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <string>
+#include <stack>
+#include "preproc.h"
+#include "asm_file.h"
+#include "c_file.h"
+#include "charmap.h"
+
+Charmap* g_charmap;
+
+void PrintAsmBytes(unsigned char *s, int length)
+{
+ if (length > 0)
+ {
+ std::printf("\t.byte ");
+ for (int i = 0; i < length; i++)
+ {
+ std::printf("0x%02X", s[i]);
+
+ if (i < length - 1)
+ std::printf(", ");
+ }
+ std::putchar('\n');
+ }
+}
+
+void PreprocAsmFile(std::string filename)
+{
+ std::stack<AsmFile> stack;
+
+ stack.push(AsmFile(filename));
+
+ for (;;)
+ {
+ while (stack.top().IsAtEnd())
+ {
+ stack.pop();
+
+ if (stack.empty())
+ return;
+ else
+ stack.top().OutputLocation();
+ }
+
+ Directive directive = stack.top().GetDirective();
+
+ switch (directive)
+ {
+ case Directive::Include:
+ stack.push(AsmFile(stack.top().ReadPath()));
+ stack.top().OutputLocation();
+ break;
+ case Directive::String:
+ {
+ unsigned char s[kMaxStringLength];
+ int length = stack.top().ReadString(s);
+ PrintAsmBytes(s, length);
+ break;
+ }
+ case Directive::Braille:
+ {
+ unsigned char s[kMaxStringLength];
+ int length = stack.top().ReadBraille(s);
+ PrintAsmBytes(s, length);
+ break;
+ }
+ case Directive::Unknown:
+ {
+ std::string globalLabel = stack.top().GetGlobalLabel();
+
+ if (globalLabel.length() != 0)
+ {
+ const char *s = globalLabel.c_str();
+ std::printf("%s: ; .global %s\n", s, s);
+ }
+ else
+ {
+ stack.top().OutputLine();
+ }
+
+ break;
+ }
+ }
+ }
+}
+
+void PreprocCFile(std::string filename)
+{
+ CFile cFile(filename);
+ cFile.Preproc();
+}
+
+char* GetFileExtension(char* filename)
+{
+ char* extension = filename;
+
+ while (*extension != 0)
+ extension++;
+
+ while (extension > filename && *extension != '.')
+ extension--;
+
+ if (extension == filename)
+ return nullptr;
+
+ extension++;
+
+ if (*extension == 0)
+ return nullptr;
+
+ return extension;
+}
+
+int main(int argc, char **argv)
+{
+ if (argc != 3)
+ {
+ std::fprintf(stderr, "Usage: %s SRC_FILE CHARMAP_FILE", argv[0]);
+ return 1;
+ }
+
+ g_charmap = new Charmap(argv[2]);
+
+ char* extension = GetFileExtension(argv[1]);
+
+ if (!extension)
+ FATAL_ERROR("\"%s\" has no file extension.\n", argv[1]);
+
+ if ((extension[0] == 's') && extension[1] == 0)
+ PreprocAsmFile(argv[1]);
+ else if ((extension[0] == 'c' || extension[0] == 'i') && extension[1] == 0)
+ PreprocCFile(argv[1]);
+ else
+ FATAL_ERROR("\"%s\" has an unknown file extension of \"%s\".\n", argv[1], extension);
+
+ return 0;
+}
diff --git a/tools/preproc/preproc.h b/tools/preproc/preproc.h
new file mode 100644
index 000000000..515f64e07
--- /dev/null
+++ b/tools/preproc/preproc.h
@@ -0,0 +1,54 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef PREPROC_H
+#define PREPROC_H
+
+#include <cstdio>
+#include <cstdlib>
+#include "charmap.h"
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ std::fprintf(stderr, format, __VA_ARGS__); \
+ std::exit(1); \
+} while (0)
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ std::fprintf(stderr, format, ##__VA_ARGS__); \
+ std::exit(1); \
+} while (0)
+
+#endif // _MSC_VER
+
+const int kMaxPath = 256;
+const int kMaxStringLength = 1024;
+const unsigned long kMaxCharmapSequenceLength = 16;
+
+extern Charmap* g_charmap;
+
+#endif // PREPROC_H
diff --git a/tools/preproc/string_parser.cpp b/tools/preproc/string_parser.cpp
new file mode 100644
index 000000000..dd5196a44
--- /dev/null
+++ b/tools/preproc/string_parser.cpp
@@ -0,0 +1,355 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstdarg>
+#include <stdexcept>
+#include "preproc.h"
+#include "string_parser.h"
+#include "char_util.h"
+#include "utf8.h"
+
+// Reads a charmap char or escape sequence.
+std::string StringParser::ReadCharOrEscape()
+{
+ std::string sequence;
+
+ bool isEscape = (m_buffer[m_pos] == '\\');
+
+ if (isEscape)
+ {
+ m_pos++;
+
+ if (m_buffer[m_pos] == '"')
+ {
+ sequence = g_charmap->Char('"');
+
+ if (sequence.length() == 0)
+ RaiseError("no mapping exists for double quote");
+
+ return sequence;
+ }
+ else if (m_buffer[m_pos] == '\\')
+ {
+ sequence = g_charmap->Char('\\');
+
+ if (sequence.length() == 0)
+ RaiseError("no mapping exists for backslash");
+
+ return sequence;
+ }
+ }
+
+ unsigned char c = m_buffer[m_pos];
+
+ if (c == 0)
+ {
+ if (m_pos >= m_size)
+ RaiseError("unexpected EOF in UTF-8 string");
+ else
+ RaiseError("unexpected null character in UTF-8 string");
+ }
+
+ if (IsAscii(c) && !IsAsciiPrintable(c))
+ RaiseError("unexpected character U+%X in UTF-8 string", c);
+
+ UnicodeChar unicodeChar = DecodeUtf8(&m_buffer[m_pos]);
+ m_pos += unicodeChar.encodingLength;
+ std::int32_t code = unicodeChar.code;
+
+ if (code == -1)
+ RaiseError("invalid encoding in UTF-8 string");
+
+ if (isEscape && code >= 128)
+ RaiseError("escapes using non-ASCII characters are invalid");
+
+ sequence = isEscape ? g_charmap->Escape(code) : g_charmap->Char(code);
+
+ if (sequence.length() == 0)
+ {
+ if (isEscape)
+ RaiseError("unknown escape '\\%c'", code);
+ else
+ RaiseError("unknown character U+%X", code);
+ }
+
+ return sequence;
+}
+
+// Reads a charmap constant, i.e. "{FOO}".
+std::string StringParser::ReadBracketedConstants()
+{
+ std::string totalSequence;
+
+ m_pos++; // Assume we're on the left curly bracket.
+
+ while (m_buffer[m_pos] != '}')
+ {
+ SkipWhitespace();
+
+ if (IsIdentifierStartingChar(m_buffer[m_pos]))
+ {
+ long startPos = m_pos;
+
+ m_pos++;
+
+ while (IsIdentifierChar(m_buffer[m_pos]))
+ m_pos++;
+
+ std::string sequence = g_charmap->Constant(std::string(&m_buffer[startPos], m_pos - startPos));
+
+ if (sequence.length() == 0)
+ {
+ m_buffer[m_pos] = 0;
+ RaiseError("unknown constant '%s'", &m_buffer[startPos]);
+ }
+
+ totalSequence += sequence;
+ }
+ else if (IsAsciiDigit(m_buffer[m_pos]))
+ {
+ Integer integer = ReadInteger();
+
+ switch (integer.size)
+ {
+ case 1:
+ totalSequence += (unsigned char)integer.value;
+ break;
+ case 2:
+ totalSequence += (unsigned char)integer.value;
+ totalSequence += (unsigned char)(integer.value >> 8);
+ break;
+ case 4:
+ totalSequence += (unsigned char)integer.value;
+ totalSequence += (unsigned char)(integer.value >> 8);
+ totalSequence += (unsigned char)(integer.value >> 16);
+ totalSequence += (unsigned char)(integer.value >> 24);
+ break;
+ }
+ }
+ else if (m_buffer[m_pos] == 0)
+ {
+ if (m_pos >= m_size)
+ RaiseError("unexpected EOF after left curly bracket");
+ else
+ RaiseError("unexpected null character within curly brackets");
+ }
+ else
+ {
+ if (IsAsciiPrintable(m_buffer[m_pos]))
+ RaiseError("unexpected character '%c' within curly brackets", m_buffer[m_pos]);
+ else
+ RaiseError("unexpected character '\\x%02X' within curly brackets", m_buffer[m_pos]);
+ }
+ }
+
+ m_pos++; // Go past the right curly bracket.
+
+ return totalSequence;
+}
+
+// Reads a charmap string.
+int StringParser::ParseString(long srcPos, unsigned char* dest, int& destLength)
+{
+ m_pos = srcPos;
+
+ if (m_buffer[m_pos] != '"')
+ RaiseError("expected UTF-8 string literal");
+
+ long start = m_pos;
+
+ m_pos++;
+
+ destLength = 0;
+
+ while (m_buffer[m_pos] != '"')
+ {
+ std::string sequence = (m_buffer[m_pos] == '{') ? ReadBracketedConstants() : ReadCharOrEscape();
+
+ for (const char& c : sequence)
+ {
+ if (destLength == kMaxStringLength)
+ RaiseError("mapped string longer than %d bytes", kMaxStringLength);
+
+ dest[destLength++] = c;
+ }
+ }
+
+ m_pos++; // Go past the right quote.
+
+ return m_pos - start;
+}
+
+void StringParser::RaiseError(const char* format, ...)
+{
+ const int bufferSize = 1024;
+ char buffer[bufferSize];
+
+ std::va_list args;
+ va_start(args, format);
+ std::vsnprintf(buffer, bufferSize, format, args);
+ va_end(args);
+
+ throw std::runtime_error(buffer);
+}
+
+// Converts digit character to numerical value.
+static int ConvertDigit(char c, int radix)
+{
+ int digit;
+
+ if (c >= '0' && c <= '9')
+ digit = c - '0';
+ else if (c >= 'A' && c <= 'F')
+ digit = 10 + c - 'A';
+ else if (c >= 'a' && c <= 'f')
+ digit = 10 + c - 'a';
+ else
+ return -1;
+
+ return (digit < radix) ? digit : -1;
+}
+
+void StringParser::SkipRestOfInteger(int radix)
+{
+ while (ConvertDigit(m_buffer[m_pos], radix) != -1)
+ m_pos++;
+}
+
+StringParser::Integer StringParser::ReadDecimal()
+{
+ const int radix = 10;
+ std::uint64_t n = 0;
+ int digit;
+ std::uint64_t max = UINT32_MAX;
+ long startPos = m_pos;
+
+ while ((digit = ConvertDigit(m_buffer[m_pos], radix)) != -1)
+ {
+ n = n * radix + digit;
+
+ if (n >= max)
+ {
+ SkipRestOfInteger(radix);
+
+ std::string intLiteral(m_buffer + startPos, m_pos - startPos);
+ RaiseError("integer literal \"%s\" is too large", intLiteral.c_str());
+ }
+
+ m_pos++;
+ }
+
+ int size;
+
+ if (m_buffer[m_pos] == 'H')
+ {
+ if (n >= 0x10000)
+ {
+ RaiseError("%lu is too large to be a halfword", (unsigned long)n);
+ }
+
+ size = 2;
+ m_pos++;
+ }
+ else if (m_buffer[m_pos] == 'W')
+ {
+ size = 4;
+ m_pos++;
+ }
+ else
+ {
+ if (n >= 0x10000)
+ size = 4;
+ else if (n >= 0x100)
+ size = 2;
+ else
+ size = 1;
+ }
+
+ return{ static_cast<std::uint32_t>(n), size };
+}
+
+StringParser::Integer StringParser::ReadHex()
+{
+ const int radix = 16;
+ std::uint64_t n = 0;
+ int digit;
+ std::uint64_t max = UINT32_MAX;
+ long startPos = m_pos;
+
+ while ((digit = ConvertDigit(m_buffer[m_pos], radix)) != -1)
+ {
+ n = n * radix + digit;
+
+ if (n >= max)
+ {
+ SkipRestOfInteger(radix);
+
+ std::string intLiteral(m_buffer + startPos, m_pos - startPos);
+ RaiseError("integer literal \"%s\" is too large", intLiteral.c_str());
+ }
+
+ m_pos++;
+ }
+
+ int length = m_pos - startPos;
+ int size = 0;
+
+ switch (length)
+ {
+ case 2:
+ size = 1;
+ break;
+ case 4:
+ size = 2;
+ break;
+ case 8:
+ size = 4;
+ break;
+ default:
+ {
+ std::string intLiteral(m_buffer + startPos, m_pos - startPos);
+ RaiseError("hex integer literal \"0x%s\" doesn't have length of 2, 4, or 8 digits", intLiteral.c_str());
+ }
+ }
+
+ return{ static_cast<std::uint32_t>(n), size };
+}
+
+StringParser::Integer StringParser::ReadInteger()
+{
+ if (!IsAsciiDigit(m_buffer[m_pos]))
+ RaiseError("expected integer");
+
+ if (m_buffer[m_pos] == '0' && m_buffer[m_pos + 1] == 'x')
+ {
+ m_pos += 2;
+ return ReadHex();
+ }
+
+ return ReadDecimal();
+}
+
+// Skips tabs and spaces.
+void StringParser::SkipWhitespace()
+{
+ while (m_buffer[m_pos] == '\t' || m_buffer[m_pos] == ' ')
+ m_pos++;
+}
diff --git a/tools/preproc/string_parser.h b/tools/preproc/string_parser.h
new file mode 100644
index 000000000..abd2bfe9a
--- /dev/null
+++ b/tools/preproc/string_parser.h
@@ -0,0 +1,55 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef STRING_PARSER_H
+#define STRING_PARSER_H
+
+#include <cstdint>
+#include <string>
+#include "preproc.h"
+
+class StringParser
+{
+public:
+ StringParser(char* buffer, long size) : m_buffer(buffer), m_size(size), m_pos(0) {}
+ int ParseString(long srcPos, unsigned char* dest, int &destLength);
+
+private:
+ struct Integer
+ {
+ std::uint32_t value;
+ int size;
+ };
+
+ char* m_buffer;
+ long m_size;
+ long m_pos;
+
+ Integer ReadInteger();
+ Integer ReadDecimal();
+ Integer ReadHex();
+ std::string ReadCharOrEscape();
+ std::string ReadBracketedConstants();
+ void SkipWhitespace();
+ void SkipRestOfInteger(int radix);
+ void RaiseError(const char* format, ...);
+};
+
+#endif // STRING_PARSER_H
diff --git a/tools/preproc/utf8.cpp b/tools/preproc/utf8.cpp
new file mode 100644
index 000000000..7facfd44e
--- /dev/null
+++ b/tools/preproc/utf8.cpp
@@ -0,0 +1,92 @@
+// Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de>
+// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
+//
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdint>
+#include "utf8.h"
+
+static const unsigned char s_byteTypeTable[] =
+{
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00..1f
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 20..3f
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 40..5f
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 60..7f
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, // 80..9f
+ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, // a0..bf
+ 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, // c0..df
+ 0xa,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x4,0x3,0x3, // e0..ef
+ 0xb,0x6,0x6,0x6,0x5,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, // f0..ff
+};
+
+const unsigned char s0 = 0 * 12;
+const unsigned char s1 = 1 * 12;
+const unsigned char s2 = 2 * 12;
+const unsigned char s3 = 3 * 12;
+const unsigned char s4 = 4 * 12;
+const unsigned char s5 = 5 * 12;
+const unsigned char s6 = 6 * 12;
+const unsigned char s7 = 7 * 12;
+const unsigned char s8 = 8 * 12;
+
+static const unsigned char s_transitionTable[] =
+{
+ s0,s1,s2,s3,s5,s8,s7,s1,s1,s1,s4,s6, // s0
+ s1,s1,s1,s1,s1,s1,s1,s1,s1,s1,s1,s1, // s1
+ s1,s0,s1,s1,s1,s1,s1,s0,s1,s0,s1,s1, // s2
+ s1,s2,s1,s1,s1,s1,s1,s2,s1,s2,s1,s1, // s3
+ s1,s1,s1,s1,s1,s1,s1,s2,s1,s1,s1,s1, // s4
+ s1,s2,s1,s1,s1,s1,s1,s1,s1,s2,s1,s1, // s5
+ s1,s1,s1,s1,s1,s1,s1,s3,s1,s3,s1,s1, // s6
+ s1,s3,s1,s1,s1,s1,s1,s3,s1,s3,s1,s1, // s7
+ s1,s3,s1,s1,s1,s1,s1,s1,s1,s1,s1,s1, // s8
+};
+
+// Decodes UTF-8 encoded Unicode code point at "s".
+UnicodeChar DecodeUtf8(const char* s)
+{
+ UnicodeChar unicodeChar;
+ int state = s0;
+ auto start = s;
+
+ do
+ {
+ unsigned char byte = *s++;
+ int type = s_byteTypeTable[byte];
+
+ if (state == s0)
+ unicodeChar.code = (0xFF >> type) & byte;
+ else
+ unicodeChar.code = (unicodeChar.code << 6) | (byte & 0x3F);
+
+ state = s_transitionTable[state + type];
+
+ if (state == s1)
+ {
+ unicodeChar.code = -1;
+ return unicodeChar;
+ }
+ } while (state != s0);
+
+ unicodeChar.encodingLength = s - start;
+
+ return unicodeChar;
+}
diff --git a/tools/preproc/utf8.h b/tools/preproc/utf8.h
new file mode 100644
index 000000000..259de67c5
--- /dev/null
+++ b/tools/preproc/utf8.h
@@ -0,0 +1,34 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef UTF8_H
+#define UTF8_H
+
+#include <cstdint>
+
+struct UnicodeChar
+{
+ std::int32_t code;
+ int encodingLength;
+};
+
+UnicodeChar DecodeUtf8(const char* s);
+
+#endif // UTF8_H
diff --git a/tools/ramscrgen/.gitignore b/tools/ramscrgen/.gitignore
new file mode 100644
index 000000000..4d0ae82c3
--- /dev/null
+++ b/tools/ramscrgen/.gitignore
@@ -0,0 +1 @@
+ramscrgen
diff --git a/tools/ramscrgen/LICENSE b/tools/ramscrgen/LICENSE
new file mode 100644
index 000000000..534d15349
--- /dev/null
+++ b/tools/ramscrgen/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2016 YamaArashi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/ramscrgen/Makefile b/tools/ramscrgen/Makefile
new file mode 100644
index 000000000..cc6d458ba
--- /dev/null
+++ b/tools/ramscrgen/Makefile
@@ -0,0 +1,15 @@
+CXX := g++
+
+CXXFLAGS := -std=c++11 -O2 -s -Wall -Wno-switch -Werror
+
+SRCS := main.cpp sym_file.cpp elf.cpp
+
+HEADERS := ramscrgen.h sym_file.h elf.h char_util.h
+
+.PHONY: clean
+
+ramscrgen: $(SRCS) $(HEADERS)
+ $(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
+
+clean:
+ $(RM) ramscrgen ramscrgen.exe
diff --git a/tools/ramscrgen/char_util.h b/tools/ramscrgen/char_util.h
new file mode 100644
index 000000000..ab20dbc53
--- /dev/null
+++ b/tools/ramscrgen/char_util.h
@@ -0,0 +1,71 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef CHAR_UTIL_H
+#define CHAR_UTIL_H
+
+#include <cstdint>
+#include <cassert>
+
+inline bool IsAscii(unsigned char c)
+{
+ return (c < 128);
+}
+
+inline bool IsAsciiAlpha(unsigned char c)
+{
+ return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
+}
+
+inline bool IsAsciiDigit(unsigned char c)
+{
+ return (c >= '0' && c <= '9');
+}
+
+inline bool IsAsciiHexDigit(unsigned char c)
+{
+ return ((c >= '0' && c <= '9')
+ || (c >= 'a' && c <= 'f')
+ || (c >= 'A' && c <= 'F'));
+}
+
+inline bool IsAsciiAlphanum(unsigned char c)
+{
+ return (IsAsciiAlpha(c) || IsAsciiDigit(c));
+}
+
+inline bool IsAsciiPrintable(unsigned char c)
+{
+ return (c >= ' ' && c <= '~');
+}
+
+// Returns whether the character can start the identifier of a "{FOO}" constant in strings.
+inline bool IsIdentifierStartingChar(unsigned char c)
+{
+ return IsAsciiAlpha(c) || c == '_';
+}
+
+// Returns whether the character can be used in the identifier of a "{FOO}" constant in strings.
+inline bool IsIdentifierChar(unsigned char c)
+{
+ return IsAsciiAlphanum(c) || c == '_';
+}
+
+#endif // CHAR_UTIL_H
diff --git a/tools/ramscrgen/elf.cpp b/tools/ramscrgen/elf.cpp
new file mode 100644
index 000000000..7599fe0bb
--- /dev/null
+++ b/tools/ramscrgen/elf.cpp
@@ -0,0 +1,195 @@
+#include <cstdio>
+#include <cstring>
+#include <cstdint>
+#include <map>
+#include <vector>
+#include <string>
+#include "ramscrgen.h"
+#include "elf.h"
+
+#define SHN_COMMON 0xFFF2
+
+static std::string s_elfPath;
+
+static FILE *s_file;
+
+static std::uint32_t s_sectionHeaderOffset;
+static int s_sectionHeaderEntrySize;
+static int s_sectionCount;
+static int s_shstrtabIndex;
+
+static std::uint32_t s_symtabOffset;
+static std::uint32_t s_strtabOffset;
+
+static std::uint32_t s_symbolCount;
+
+struct Symbol
+{
+ std::uint32_t nameOffset;
+ std::uint32_t size;
+};
+
+static void Seek(long offset)
+{
+ if (std::fseek(s_file, offset, SEEK_SET) != 0)
+ FATAL_ERROR("error: failed to seek to %ld in \"%s\"", offset, s_elfPath.c_str());
+}
+
+static void Skip(long offset)
+{
+ if (std::fseek(s_file, offset, SEEK_CUR) != 0)
+ FATAL_ERROR("error: failed to skip %ld bytes in \"%s\"", offset, s_elfPath.c_str());
+}
+
+static std::uint32_t ReadInt8()
+{
+ int c = std::fgetc(s_file);
+
+ if (c < 0)
+ FATAL_ERROR("error: unexpected EOF when reading ELF file \"%s\"\n", s_elfPath.c_str());
+
+ return c;
+}
+
+static std::uint32_t ReadInt16()
+{
+ std::uint32_t val = 0;
+ val |= ReadInt8();
+ val |= ReadInt8() << 8;
+ return val;
+}
+
+static std::uint32_t ReadInt32()
+{
+ std::uint32_t val = 0;
+ val |= ReadInt8();
+ val |= ReadInt8() << 8;
+ val |= ReadInt8() << 16;
+ val |= ReadInt8() << 24;
+ return val;
+}
+
+static std::string ReadString()
+{
+ std::string s;
+ char c;
+
+ while ((c = ReadInt8()) != 0)
+ s += c;
+
+ return s;
+}
+
+static void VerifyElfIdent()
+{
+ char expectedMagic[4] = { 0x7F, 'E', 'L', 'F' };
+ char magic[4];
+
+ if (std::fread(magic, 4, 1, s_file) != 1)
+ FATAL_ERROR("error: failed to read ELF magic from \"%s\"\n", s_elfPath.c_str());
+
+ if (std::memcmp(magic, expectedMagic, 4) != 0)
+ FATAL_ERROR("error: ELF magic did not match in \"%s\"\n", s_elfPath.c_str());
+
+ if (std::fgetc(s_file) != 1)
+ FATAL_ERROR("error: \"%s\" not 32-bit ELF\n", s_elfPath.c_str());
+
+ if (std::fgetc(s_file) != 1)
+ FATAL_ERROR("error: \"%s\" not little-endian ELF\n", s_elfPath.c_str());
+}
+
+static void ReadElfHeader()
+{
+ Seek(0x20);
+ s_sectionHeaderOffset = ReadInt32();
+ Seek(0x2E);
+ s_sectionHeaderEntrySize = ReadInt16();
+ s_sectionCount = ReadInt16();
+ s_shstrtabIndex = ReadInt16();
+}
+
+static std::string GetSectionName(std::uint32_t shstrtabOffset, int index)
+{
+ Seek(s_sectionHeaderOffset + s_sectionHeaderEntrySize * index);
+ std::uint32_t nameOffset = ReadInt32();
+ Seek(shstrtabOffset + nameOffset);
+ return ReadString();
+}
+
+static void FindTableOffsets()
+{
+ s_symtabOffset = 0;
+ s_strtabOffset = 0;
+
+ Seek(s_sectionHeaderOffset + s_sectionHeaderEntrySize * s_shstrtabIndex + 0x10);
+ std::uint32_t shstrtabOffset = ReadInt32();
+
+ for (int i = 0; i < s_sectionCount; i++)
+ {
+ std::string name = GetSectionName(shstrtabOffset, i);
+
+ if (name == ".symtab")
+ {
+ if (s_symtabOffset)
+ FATAL_ERROR("error: mutiple .symtab sections found in \"%s\"\n", s_elfPath.c_str());
+ Seek(s_sectionHeaderOffset + s_sectionHeaderEntrySize * i + 0x10);
+ s_symtabOffset = ReadInt32();
+ std::uint32_t size = ReadInt32();
+ s_symbolCount = size / 16;
+ }
+ else if (name == ".strtab")
+ {
+ if (s_strtabOffset)
+ FATAL_ERROR("error: mutiple .strtab sections found in \"%s\"\n", s_elfPath.c_str());
+ Seek(s_sectionHeaderOffset + s_sectionHeaderEntrySize * i + 0x10);
+ s_strtabOffset = ReadInt32();
+ }
+ }
+
+ if (!s_symtabOffset)
+ FATAL_ERROR("error: couldn't find .symtab section in \"%s\"\n", s_elfPath.c_str());
+
+ if (!s_strtabOffset)
+ FATAL_ERROR("error: couldn't find .strtab section in \"%s\"\n", s_elfPath.c_str());
+}
+
+std::map<std::string, std::uint32_t> GetCommonSymbols(std::string path)
+{
+ s_elfPath = path;
+
+ std::map<std::string, std::uint32_t> commonSymbols;
+
+ s_file = std::fopen(s_elfPath.c_str(), "rb");
+
+ if (s_file == NULL)
+ FATAL_ERROR("error: failed to open \"%s\" for reading\n", path.c_str());
+
+ VerifyElfIdent();
+ ReadElfHeader();
+ FindTableOffsets();
+
+ std::vector<Symbol> commonSymbolVec;
+
+ Seek(s_symtabOffset);
+
+ for (std::uint32_t i = 0; i < s_symbolCount; i++)
+ {
+ Symbol sym;
+ sym.nameOffset = ReadInt32();
+ Skip(4);
+ sym.size = ReadInt32();
+ Skip(2);
+ std::uint16_t sectionIndex = ReadInt16();
+ if (sectionIndex == SHN_COMMON)
+ commonSymbolVec.push_back(sym);
+ }
+
+ for (const Symbol& sym : commonSymbolVec)
+ {
+ Seek(s_strtabOffset + sym.nameOffset);
+ std::string name = ReadString();
+ commonSymbols[name] = sym.size;
+ }
+
+ return commonSymbols;
+}
diff --git a/tools/ramscrgen/elf.h b/tools/ramscrgen/elf.h
new file mode 100644
index 000000000..0bfdd696f
--- /dev/null
+++ b/tools/ramscrgen/elf.h
@@ -0,0 +1,30 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef ELF_H
+#define ELF_H
+
+#include <cstdint>
+#include <map>
+#include <string>
+
+std::map<std::string, std::uint32_t> GetCommonSymbols(std::string path);
+
+#endif // ELF_H
diff --git a/tools/ramscrgen/main.cpp b/tools/ramscrgen/main.cpp
new file mode 100644
index 000000000..6c4f4bbd7
--- /dev/null
+++ b/tools/ramscrgen/main.cpp
@@ -0,0 +1,173 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstring>
+#include <string>
+#include "ramscrgen.h"
+#include "sym_file.h"
+#include "elf.h"
+
+void HandleCommonInclude(std::string filename, std::string sourcePath, std::string symOrderPath, std::string lang)
+{
+ auto commonSymbols = GetCommonSymbols(sourcePath + "/" + filename);
+
+ std::size_t dotIndex = filename.find_last_of('.');
+
+ if (dotIndex == std::string::npos)
+ FATAL_ERROR("error: \"%s\" doesn't have a file extension\n", filename.c_str());
+
+ std::string symOrderFilename = filename.substr(0, dotIndex + 1) + "txt";
+
+ SymFile symFile(symOrderPath + "/" + symOrderFilename);
+
+ while (!symFile.IsAtEnd())
+ {
+ symFile.HandleLangConditional(lang);
+
+ std::string label = symFile.GetLabel(false);
+
+ if (label.length() == 0)
+ {
+ unsigned long length;
+ if (symFile.ReadInteger(length))
+ {
+ if (length & 3)
+ symFile.RaiseWarning("gap length %d is not multiple of 4", length);
+ printf(". += 0x%lX;\n", length);
+ }
+ }
+ else
+ {
+ if (commonSymbols.count(label) == 0)
+ symFile.RaiseError("no common symbol named \"%s\"", label.c_str());
+ unsigned long size = commonSymbols[label];
+ int alignment = 4;
+ if (size > 4)
+ alignment = 8;
+ if (size > 8)
+ alignment = 16;
+ printf(". = ALIGN(%d);\n", alignment);
+ printf("%s = .;\n", label.c_str());
+ printf(". += 0x%lX;\n", size);
+ }
+
+ symFile.ExpectEmptyRestOfLine();
+ }
+}
+
+void ConvertSymFile(std::string filename, std::string sectionName, std::string lang, bool common, std::string sourcePath, std::string commonSymPath)
+{
+ SymFile symFile(filename);
+
+ while (!symFile.IsAtEnd())
+ {
+ symFile.HandleLangConditional(lang);
+
+ Directive directive = symFile.GetDirective();
+
+ switch (directive)
+ {
+ case Directive::Include:
+ {
+ std::string incFilename = symFile.ReadPath();
+ symFile.ExpectEmptyRestOfLine();
+ printf(". = ALIGN(4);\n");
+ if (common)
+ HandleCommonInclude(incFilename, sourcePath, commonSymPath, lang);
+ else
+ printf("%s(%s);\n", incFilename.c_str(), sectionName.c_str());
+ break;
+ }
+ case Directive::Space:
+ {
+ unsigned long length;
+ if (!symFile.ReadInteger(length))
+ symFile.RaiseError("expected integer after .space directive");
+ symFile.ExpectEmptyRestOfLine();
+ printf(". += 0x%lX;\n", length);
+ break;
+ }
+ case Directive::Align:
+ {
+ unsigned long amount;
+ if (!symFile.ReadInteger(amount))
+ symFile.RaiseError("expected integer after .align directive");
+ if (amount > 4)
+ symFile.RaiseError("max alignment amount is 4");
+ amount = 1UL << amount;
+ symFile.ExpectEmptyRestOfLine();
+ printf(". = ALIGN(%lu);\n", amount);
+ break;
+ }
+ case Directive::Unknown:
+ {
+ std::string label = symFile.GetLabel();
+
+ if (label.length() != 0)
+ {
+ printf("%s = .;\n", label.c_str());
+ }
+
+ symFile.ExpectEmptyRestOfLine();
+
+ break;
+ }
+ }
+ }
+}
+
+int main(int argc, char **argv)
+{
+ if (argc < 4)
+ {
+ fprintf(stderr, "Usage: %s SECTION_NAME SYM_FILE LANG [-c SRC_PATH,COMMON_SYM_PATH]", argv[0]);
+ return 1;
+ }
+
+ bool common = false;
+ std::string sectionName = std::string(argv[1]);
+ std::string symFileName = std::string(argv[2]);
+ std::string lang = std::string(argv[3]);
+ std::string sourcePath;
+ std::string commonSymPath;
+
+ if (argc > 4)
+ {
+ if (std::strcmp(argv[4], "-c") != 0)
+ FATAL_ERROR("error: unrecognized argument \"%s\"\n", argv[4]);
+
+ if (argc < 6)
+ FATAL_ERROR("error: missing SRC_PATH,COMMON_SYM_PATH after \"-c\"\n");
+
+ common = true;
+ std::string paths = std::string(argv[5]);
+ std::size_t commaPos = paths.find(',');
+
+ if (commaPos == std::string::npos)
+ FATAL_ERROR("error: missing comma in argument after \"-c\"\n");
+
+ sourcePath = paths.substr(0, commaPos);
+ commonSymPath = paths.substr(commaPos + 1);
+ }
+
+ ConvertSymFile(symFileName, sectionName, lang, common, sourcePath, commonSymPath);
+ return 0;
+}
diff --git a/tools/ramscrgen/ramscrgen.h b/tools/ramscrgen/ramscrgen.h
new file mode 100644
index 000000000..1aed1c05a
--- /dev/null
+++ b/tools/ramscrgen/ramscrgen.h
@@ -0,0 +1,49 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef RAMSCRGEN_H
+#define RAMSCRGEN_H
+
+#include <cstdio>
+#include <cstdlib>
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ std::fprintf(stderr, format, __VA_ARGS__); \
+ std::exit(1); \
+} while (0)
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do \
+{ \
+ std::fprintf(stderr, format, ##__VA_ARGS__); \
+ std::exit(1); \
+} while (0)
+
+#endif // _MSC_VER
+
+const int kMaxPath = 256;
+
+#endif // RAMSCRGEN_H
diff --git a/tools/ramscrgen/sym_file.cpp b/tools/ramscrgen/sym_file.cpp
new file mode 100644
index 000000000..5379bd93f
--- /dev/null
+++ b/tools/ramscrgen/sym_file.cpp
@@ -0,0 +1,492 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstdarg>
+#include <climits>
+#include "ramscrgen.h"
+#include "sym_file.h"
+#include "char_util.h"
+
+SymFile::SymFile(std::string filename) : m_filename(filename)
+{
+ FILE *fp = std::fopen(filename.c_str(), "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", filename.c_str());
+
+ std::fseek(fp, 0, SEEK_END);
+
+ m_size = std::ftell(fp);
+
+ if (m_size < 0)
+ FATAL_ERROR("File size of \"%s\" is less than zero.\n", filename.c_str());
+
+ m_buffer = new char[m_size + 1];
+
+ std::rewind(fp);
+
+ if (std::fread(m_buffer, m_size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", filename.c_str());
+
+ m_buffer[m_size] = 0;
+
+ std::fclose(fp);
+
+ m_pos = 0;
+ m_lineNum = 1;
+ m_lineStart = 0;
+ m_inLangConditional = false;
+
+ RemoveComments();
+}
+
+SymFile::SymFile(SymFile&& other) : m_filename(std::move(other.m_filename))
+{
+ m_buffer = other.m_buffer;
+ m_pos = other.m_pos;
+ m_size = other.m_size;
+ m_lineNum = other.m_lineNum;
+ m_lineStart = other.m_lineStart;
+
+ other.m_buffer = nullptr;
+}
+
+SymFile::~SymFile()
+{
+ delete[] m_buffer;
+}
+
+// Removes comments to simplify further processing.
+// It stops upon encountering a null character,
+// which may or may not be the end of file marker.
+// If it's not, the error will be caught later.
+void SymFile::RemoveComments()
+{
+ long pos = 0;
+ char stringChar = 0;
+
+ for (;;)
+ {
+ if (m_buffer[pos] == 0)
+ return;
+
+ if (stringChar != 0)
+ {
+ if (m_buffer[pos] == '\\' && m_buffer[pos + 1] == stringChar)
+ {
+ pos += 2;
+ }
+ else
+ {
+ if (m_buffer[pos] == stringChar)
+ stringChar = 0;
+ pos++;
+ }
+ }
+ else if (m_buffer[pos] == '@' && (pos == 0 || m_buffer[pos - 1] != '\\'))
+ {
+ while (m_buffer[pos] != '\n' && m_buffer[pos] != 0)
+ m_buffer[pos++] = ' ';
+ }
+ else if (m_buffer[pos] == '/' && m_buffer[pos + 1] == '*')
+ {
+ m_buffer[pos++] = ' ';
+ m_buffer[pos++] = ' ';
+
+ char commentStringChar = 0;
+
+ for (;;)
+ {
+ if (m_buffer[pos] == 0)
+ return;
+
+ if (commentStringChar != 0)
+ {
+ if (m_buffer[pos] == '\\' && m_buffer[pos + 1] == commentStringChar)
+ {
+ m_buffer[pos++] = ' ';
+ m_buffer[pos++] = ' ';
+ }
+ else
+ {
+ if (m_buffer[pos] == commentStringChar)
+ commentStringChar = 0;
+ if (m_buffer[pos] != '\n')
+ m_buffer[pos] = ' ';
+ pos++;
+ }
+ }
+ else
+ {
+ if (m_buffer[pos] == '*' && m_buffer[pos + 1] == '/')
+ {
+ m_buffer[pos++] = ' ';
+ m_buffer[pos++] = ' ';
+ break;
+ }
+ else
+ {
+ if (m_buffer[pos] == '"' || m_buffer[pos] == '\'')
+ commentStringChar = m_buffer[pos];
+ if (m_buffer[pos] != '\n')
+ m_buffer[pos] = ' ';
+ pos++;
+ }
+ }
+ }
+ }
+ else
+ {
+ if (m_buffer[pos] == '"' || m_buffer[pos] == '\'')
+ stringChar = m_buffer[pos];
+ pos++;
+ }
+ }
+}
+
+// Checks if we're at a particular directive and if so, consumes it.
+// Returns whether the directive was found.
+bool SymFile::CheckForDirective(std::string name)
+{
+ long i;
+ long length = static_cast<long>(name.length());
+
+ for (i = 0; i < length && m_pos + i < m_size; i++)
+ if (name[i] != m_buffer[m_pos + i])
+ return false;
+
+ if (i < length)
+ return false;
+
+ m_pos += length;
+
+ return true;
+}
+
+// Checks if we're at a known directive and if so, consumes it.
+// Returns which directive was found.
+Directive SymFile::GetDirective()
+{
+ SkipWhitespace();
+
+ if (CheckForDirective(".include"))
+ return Directive::Include;
+ else if (CheckForDirective(".space"))
+ return Directive::Space;
+ else if (CheckForDirective(".align"))
+ return Directive::Align;
+ else
+ return Directive::Unknown;
+}
+
+// Checks if we're at label.
+// Returns the name if so and an empty string if not.
+std::string SymFile::GetLabel(bool requireColon)
+{
+ long start = m_pos;
+ long pos = m_pos;
+
+ if (IsIdentifierStartingChar(m_buffer[pos]))
+ {
+ pos++;
+
+ while (IsIdentifierChar(m_buffer[pos]))
+ pos++;
+ }
+
+ if (requireColon)
+ {
+ if (m_buffer[pos] == ':')
+ {
+ if (pos != start)
+ m_pos = pos + 1;
+ }
+ else
+ {
+ pos = start;
+ }
+ }
+ else
+ {
+ m_pos = pos;
+ }
+
+ return std::string(&m_buffer[start], pos - start);
+}
+
+// Skips tabs and spaces.
+void SymFile::SkipWhitespace()
+{
+ while (m_buffer[m_pos] == '\t' || m_buffer[m_pos] == ' ')
+ m_pos++;
+}
+
+// Reads include path.
+std::string SymFile::ReadPath()
+{
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] != '"')
+ RaiseError("expected file path");
+
+ m_pos++;
+
+ int length = 0;
+ long startPos = m_pos;
+
+ while (m_buffer[m_pos] != '"')
+ {
+ unsigned char c = m_buffer[m_pos++];
+
+ if (c == 0)
+ {
+ if (m_pos >= m_size)
+ RaiseError("unexpected EOF in include string");
+ else
+ RaiseError("unexpected null character in include string");
+ }
+
+ if (!IsAsciiPrintable(c))
+ RaiseError("unexpected character '\\x%02X' in include string", c);
+
+ // Don't bother allowing any escape sequences.
+ if (c == '\\')
+ {
+ c = m_buffer[m_pos];
+ RaiseError("unexpected escape '\\%c' in include string", c);
+ }
+
+ length++;
+
+ if (length > kMaxPath)
+ RaiseError("path is too long");
+ }
+
+ m_pos++; // Go past the right quote.
+
+ return std::string(&m_buffer[startPos], length);
+}
+
+// If we're at a comma, consumes it.
+// Returns whether a comma was found.
+bool SymFile::ConsumeComma()
+{
+ if (m_buffer[m_pos] == ',')
+ {
+ m_pos++;
+ return true;
+ }
+
+ return false;
+}
+
+// Converts digit character to numerical value.
+static int ConvertDigit(char c, int radix)
+{
+ int digit;
+
+ if (c >= '0' && c <= '9')
+ digit = c - '0';
+ else if (c >= 'A' && c <= 'F')
+ digit = 10 + c - 'A';
+ else if (c >= 'a' && c <= 'f')
+ digit = 10 + c - 'a';
+ else
+ return -1;
+
+ return (digit < radix) ? digit : -1;
+}
+
+// Reads an integer.
+bool SymFile::ReadInteger(unsigned long& n)
+{
+ SkipWhitespace();
+
+ if (!IsAsciiDigit(m_buffer[m_pos]))
+ return false;
+
+ int startPos = m_pos;
+ int radix = 10;
+
+ if (m_buffer[m_pos] == '0' && m_buffer[m_pos + 1] == 'x')
+ {
+ radix = 16;
+ m_pos += 2;
+ }
+
+ unsigned long cutoff = ULONG_MAX / radix;
+ unsigned long cutoffRemainder = ULONG_MAX % radix;
+ int digit;
+
+ n = 0;
+
+ while ((digit = ConvertDigit(m_buffer[m_pos], radix)) != -1)
+ {
+ if (n < cutoff || (n == cutoff && (unsigned long)digit <= cutoffRemainder))
+ {
+ n = n * radix + digit;
+ }
+ else
+ {
+ m_pos++;
+
+ while (ConvertDigit(m_buffer[m_pos], radix) != -1)
+ m_pos++;
+
+ RaiseError("integer is too large (%s)", std::string(&m_buffer[startPos], m_pos - startPos).c_str());
+ }
+
+ m_pos++;
+ }
+
+ return true;
+}
+
+// Asserts that the rest of the line is empty and moves to the next one.
+void SymFile::ExpectEmptyRestOfLine()
+{
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] == 0)
+ {
+ if (m_pos >= m_size)
+ RaiseWarning("file doesn't end with newline");
+ else
+ RaiseError("unexpected null character");
+ }
+ else if (m_buffer[m_pos] == '\n')
+ {
+ m_pos++;
+ m_lineStart = m_pos;
+ m_lineNum++;
+ }
+ else if (m_buffer[m_pos] == '\r')
+ {
+ RaiseError("only Unix-style LF newlines are supported");
+ }
+ else
+ {
+ RaiseError("junk at end of line");
+ }
+}
+
+
+void SymFile::SkipLine()
+{
+ while (m_buffer[m_pos] != 0 && m_buffer[m_pos] != '\n')
+ m_pos++;
+
+ if (m_buffer[m_pos] == '\n')
+ m_pos++;
+}
+
+// Checks if we're at the end of the file.
+bool SymFile::IsAtEnd()
+{
+ return (m_pos >= m_size);
+}
+
+void SymFile::HandleLangConditional(std::string lang)
+{
+ if (m_buffer[m_pos] != '#')
+ return;
+
+ m_pos++;
+
+ if (CheckForDirective("begin"))
+ {
+ if (m_inLangConditional)
+ RaiseError("already inside language conditional");
+
+ SkipWhitespace();
+
+ std::string label = GetLabel(false);
+
+ if (label.length() == 0)
+ RaiseError("no language name after #begin");
+
+ ExpectEmptyRestOfLine();
+
+ if (lang == label)
+ {
+ m_inLangConditional = true;
+ }
+ else
+ {
+ while (!IsAtEnd() && m_buffer[m_pos] != '#')
+ SkipLine();
+
+ if (m_buffer[m_pos] != '#')
+ RaiseError("unterminated language conditional");
+
+ m_pos++;
+
+ if (!CheckForDirective("end"))
+ RaiseError("expected #end");
+
+ ExpectEmptyRestOfLine();
+ }
+ }
+ else if (CheckForDirective("end"))
+ {
+ if (!m_inLangConditional)
+ RaiseError("not inside language conditional");
+
+ m_inLangConditional = false;
+
+ ExpectEmptyRestOfLine();
+ }
+ else
+ {
+ RaiseError("unknown # directive");
+ }
+}
+
+// Reports a diagnostic message.
+void SymFile::ReportDiagnostic(const char* type, const char* format, std::va_list args)
+{
+ const int bufferSize = 1024;
+ char buffer[bufferSize];
+ std::vsnprintf(buffer, bufferSize, format, args);
+ std::fprintf(stderr, "%s:%ld: %s: %s\n", m_filename.c_str(), m_lineNum, type, buffer);
+}
+
+#define DO_REPORT(type) \
+do \
+{ \
+ std::va_list args; \
+ va_start(args, format); \
+ ReportDiagnostic(type, format, args); \
+ va_end(args); \
+} while (0)
+
+// Reports an error diagnostic and terminates the program.
+void SymFile::RaiseError(const char* format, ...)
+{
+ DO_REPORT("error");
+ std::exit(1);
+}
+
+// Reports a warning diagnostic.
+void SymFile::RaiseWarning(const char* format, ...)
+{
+ DO_REPORT("warning");
+}
diff --git a/tools/ramscrgen/sym_file.h b/tools/ramscrgen/sym_file.h
new file mode 100644
index 000000000..bb0c8038d
--- /dev/null
+++ b/tools/ramscrgen/sym_file.h
@@ -0,0 +1,71 @@
+// Copyright(c) 2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef SYM_FILE_H
+#define SYM_FILE_H
+
+#include <cstdarg>
+#include <cstdint>
+#include <string>
+#include "ramscrgen.h"
+
+enum class Directive
+{
+ Include,
+ Space,
+ Align,
+ Unknown
+};
+
+class SymFile
+{
+public:
+ SymFile(std::string filename);
+ SymFile(SymFile&& other);
+ SymFile(const SymFile&) = delete;
+ ~SymFile();
+ Directive GetDirective();
+ std::string GetLabel(bool requireColon = true);
+ std::string ReadPath();
+ bool ReadInteger(unsigned long& value);
+ void ExpectEmptyRestOfLine();
+ void SkipLine();
+ bool IsAtEnd();
+ void HandleLangConditional(std::string lang);
+ void RaiseError(const char* format, ...);
+ void RaiseWarning(const char* format, ...);
+
+private:
+ char* m_buffer;
+ long m_pos;
+ long m_size;
+ long m_lineNum;
+ long m_lineStart;
+ std::string m_filename;
+ bool m_inLangConditional;
+
+ bool ConsumeComma();
+ void RemoveComments();
+ bool CheckForDirective(std::string name);
+ void SkipWhitespace();
+ void ReportDiagnostic(const char* type, const char* format, std::va_list args);
+};
+
+#endif // SYM_FILE_H
diff --git a/tools/rsfont/.gitignore b/tools/rsfont/.gitignore
new file mode 100644
index 000000000..3140ececc
--- /dev/null
+++ b/tools/rsfont/.gitignore
@@ -0,0 +1 @@
+rsfont
diff --git a/tools/rsfont/LICENSE b/tools/rsfont/LICENSE
new file mode 100644
index 000000000..b497950c1
--- /dev/null
+++ b/tools/rsfont/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015-2016 YamaArashi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/rsfont/Makefile b/tools/rsfont/Makefile
new file mode 100644
index 000000000..a78beca50
--- /dev/null
+++ b/tools/rsfont/Makefile
@@ -0,0 +1,15 @@
+CC = gcc
+
+CFLAGS = -Wall -Wextra -Werror -std=c11 -O2 -s -DPNG_SKIP_SETJMP_CHECK
+
+LIBS = -lpng -lz
+
+SRCS = main.c convert_png.c util.c font.c
+
+.PHONY: clean
+
+rsfont: $(SRCS) convert_png.h gfx.h global.h util.h font.h
+ $(CC) $(CFLAGS) $(SRCS) -o $@ $(LDFLAGS) $(LIBS)
+
+clean:
+ $(RM) rsfont rsfont.exe
diff --git a/tools/rsfont/convert_png.c b/tools/rsfont/convert_png.c
new file mode 100644
index 000000000..f6a30804a
--- /dev/null
+++ b/tools/rsfont/convert_png.c
@@ -0,0 +1,169 @@
+// Copyright (c) 2015 YamaArashi
+
+#include <stdio.h>
+#include <setjmp.h>
+#include <png.h>
+#include "global.h"
+#include "convert_png.h"
+#include "gfx.h"
+
+void ReadPng(char *path, struct Image *image)
+{
+ FILE *fp = fopen(path, "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", path);
+
+ unsigned char sig[8];
+
+ if (fread(sig, 8, 1, fp) != 1)
+ FATAL_ERROR("Failed to read PNG signature from \"%s\".\n", path);
+
+ if (png_sig_cmp(sig, 0, 8))
+ FATAL_ERROR("\"%s\" does not have a valid PNG signature.\n", path);
+
+ png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+
+ if (!png_ptr)
+ FATAL_ERROR("Failed to create PNG read struct.\n");
+
+ png_infop info_ptr = png_create_info_struct(png_ptr);
+
+ if (!info_ptr)
+ FATAL_ERROR("Failed to create PNG info struct.\n");
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Failed to init I/O for reading \"%s\".\n", path);
+
+ png_init_io(png_ptr, fp);
+ png_set_sig_bytes(png_ptr, 8);
+ png_read_info(png_ptr, info_ptr);
+
+ int bit_depth = png_get_bit_depth(png_ptr, info_ptr);
+
+ if (bit_depth != image->bitDepth)
+ FATAL_ERROR("\"%s\" has a bit depth of %d, but the expected bit depth is %d.\n", path, bit_depth, image->bitDepth);
+
+ int color_type = png_get_color_type(png_ptr, info_ptr);
+
+ if (color_type != PNG_COLOR_TYPE_GRAY && color_type != PNG_COLOR_TYPE_PALETTE)
+ FATAL_ERROR("\"%s\" has an unsupported color type.\n", path);
+
+ // Check if the image has a palette so that we can tell if the colors need to be inverted later.
+ // Don't read the palette because it's not needed for now.
+ image->hasPalette = (color_type == PNG_COLOR_TYPE_PALETTE);
+
+ image->width = png_get_image_width(png_ptr, info_ptr);
+ image->height = png_get_image_height(png_ptr, info_ptr);
+
+ int rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+
+ image->pixels = malloc(image->height * rowbytes);
+
+ if (image->pixels == NULL)
+ FATAL_ERROR("Failed to allocate pixel buffer.\n");
+
+ png_bytepp row_pointers = malloc(image->height * sizeof(png_bytep));
+
+ if (row_pointers == NULL)
+ FATAL_ERROR("Failed to allocate row pointers.\n");
+
+ for (int i = 0; i < image->height; i++)
+ row_pointers[i] = (png_bytep)(image->pixels + (i * rowbytes));
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Error reading from \"%s\".\n", path);
+
+ png_read_image(png_ptr, row_pointers);
+
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ free(row_pointers);
+ fclose(fp);
+}
+
+void SetPngPalette(png_structp png_ptr, png_infop info_ptr, struct Palette *palette)
+{
+ png_colorp colors = malloc(palette->numColors * sizeof(png_color));
+
+ if (colors == NULL)
+ FATAL_ERROR("Failed to allocate PNG palette.\n");
+
+ for (int i = 0; i < palette->numColors; i++) {
+ colors[i].red = palette->colors[i].red;
+ colors[i].green = palette->colors[i].green;
+ colors[i].blue = palette->colors[i].blue;
+ }
+
+ png_set_PLTE(png_ptr, info_ptr, colors, palette->numColors);
+
+ free(colors);
+}
+
+void WritePng(char *path, struct Image *image)
+{
+ FILE *fp = fopen(path, "wb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for writing.\n", path);
+
+ png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+
+ if (!png_ptr)
+ FATAL_ERROR("Failed to create PNG write struct.\n");
+
+ png_infop info_ptr = png_create_info_struct(png_ptr);
+
+ if (!info_ptr)
+ FATAL_ERROR("Failed to create PNG info struct.\n");
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Failed to init I/O for writing \"%s\".\n", path);
+
+ png_init_io(png_ptr, fp);
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Error writing header for \"%s\".\n", path);
+
+ int color_type = image->hasPalette ? PNG_COLOR_TYPE_PALETTE : PNG_COLOR_TYPE_GRAY;
+
+ png_set_IHDR(png_ptr, info_ptr, image->width, image->height,
+ image->bitDepth, color_type, PNG_INTERLACE_NONE,
+ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+
+ if (image->hasPalette) {
+ SetPngPalette(png_ptr, info_ptr, &image->palette);
+
+ if (image->hasTransparency) {
+ png_byte trans = 0;
+ png_set_tRNS(png_ptr, info_ptr, &trans, 1, 0);
+ }
+ }
+
+ png_write_info(png_ptr, info_ptr);
+
+ png_bytepp row_pointers = malloc(image->height * sizeof(png_bytep));
+
+ if (row_pointers == NULL)
+ FATAL_ERROR("Failed to allocate row pointers.\n");
+
+ int rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+
+ for (int i = 0; i < image->height; i++)
+ row_pointers[i] = (png_bytep)(image->pixels + (i * rowbytes));
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Error writing \"%s\".\n", path);
+
+ png_write_image(png_ptr, row_pointers);
+
+ if (setjmp(png_jmpbuf(png_ptr)))
+ FATAL_ERROR("Error ending write of \"%s\".\n", path);
+
+ png_write_end(png_ptr, NULL);
+
+ fclose(fp);
+
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ free(row_pointers);
+}
diff --git a/tools/rsfont/convert_png.h b/tools/rsfont/convert_png.h
new file mode 100644
index 000000000..55d3d6942
--- /dev/null
+++ b/tools/rsfont/convert_png.h
@@ -0,0 +1,11 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef CONVERT_PNG_H
+#define CONVERT_PNG_H
+
+#include "gfx.h"
+
+void ReadPng(char *path, struct Image *image);
+void WritePng(char *path, struct Image *image);
+
+#endif // CONVERT_PNG_H
diff --git a/tools/rsfont/font.c b/tools/rsfont/font.c
new file mode 100644
index 000000000..ed48b31e6
--- /dev/null
+++ b/tools/rsfont/font.c
@@ -0,0 +1,455 @@
+// Copyright(c) 2015-2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include "global.h"
+#include "font.h"
+#include "gfx.h"
+#include "util.h"
+
+unsigned char gFontPalette[][3] =
+{
+ {0xFF, 0xFF, 0xFF}, // bg (white)
+ {0x38, 0x38, 0x38}, // fg (dark grey)
+ {0xD8, 0xD8, 0xD8}, // shadow (light grey)
+};
+
+void ConvertFromTiles1Bpp(unsigned char *src, unsigned char *dest, int numGlyphs, int layout)
+{
+ for (int glyph = 0; glyph < numGlyphs; glyph++)
+ {
+ if (layout == 0)
+ {
+ for (int i = 0; i < 8; i++)
+ {
+ uint8_t srcRow = src[(glyph * 8) + i];
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 8) + i;
+ dest[(y * 128) + x] = (srcRow >> (7 - j)) & 1;
+ }
+ }
+ }
+ else
+ {
+ // layout type 1
+
+ int tile1Offset = glyph * 16;
+ int tile2Offset = tile1Offset + 8;
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint8_t srcRow = src[tile1Offset + i];
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 16) + i;
+ dest[(y * 128) + x] = (srcRow >> (7 - j)) & 1;
+ }
+ }
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint8_t srcRow = src[tile2Offset + i];
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 16) + 8 + i;
+ dest[(y * 128) + x] = (srcRow >> (7 - j)) & 1;
+ }
+ }
+ }
+ }
+}
+
+void ConvertToTiles1Bpp(unsigned char *src, unsigned char *dest, int numGlyphs, int layout)
+{
+ for (int glyph = 0; glyph < numGlyphs; glyph++)
+ {
+ if (layout == 0)
+ {
+ for (int i = 0; i < 8; i++)
+ {
+ uint8_t destRow = 0;
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 8) + i;
+ unsigned char color = src[(y * 128) + x];
+
+ if (color > 1)
+ FATAL_ERROR("More than 2 colors in 1 BPP font.\n");
+
+ destRow <<= 1;
+ destRow |= color;
+ }
+
+ dest[(glyph * 8) + i] = destRow;
+ }
+ }
+ else
+ {
+ // layout type 1
+
+ int tile1Offset = glyph * 16;
+ int tile2Offset = tile1Offset + 8;
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint8_t destRow = 0;
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 16) + i;
+ unsigned char color = src[(y * 128) + x];
+
+ if (color > 1)
+ FATAL_ERROR("More than 2 colors in 1 BPP font.\n");
+
+ destRow <<= 1;
+ destRow |= color;
+ }
+
+ dest[tile1Offset + i] = destRow;
+ }
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint8_t destRow = 0;
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 16) + 8 + i;
+ unsigned char color = src[(y * 128) + x];
+
+ if (color > 1)
+ FATAL_ERROR("More than 2 colors in 1 BPP font.\n");
+
+ destRow <<= 1;
+ destRow |= color;
+ }
+
+ dest[tile2Offset + i] = destRow;
+ }
+ }
+ }
+}
+
+void ConvertFromTiles4Bpp(unsigned char *src, unsigned char *dest, int numGlyphs, int layout)
+{
+ static unsigned char table[16] =
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1,
+ };
+
+ for (int glyph = 0; glyph < numGlyphs; glyph++)
+ {
+ if (layout == 0)
+ {
+ int offset = glyph * 32;
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint32_t srcRow = (src[offset + 3] << 24)
+ | (src[offset + 2] << 16)
+ | (src[offset + 1] << 8)
+ | src[offset];
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 8) + i;
+ dest[(y * 128) + x] = table[srcRow & 0xF];
+ srcRow >>= 4;
+ }
+
+ offset += 4;
+ }
+ }
+ else
+ {
+ int tile1Offset;
+ int tile2Offset;
+
+ if (layout == 1)
+ {
+ tile1Offset = glyph * 64;
+ tile2Offset = tile1Offset + 32;
+ }
+ else
+ {
+ tile1Offset = ((glyph / 16) * 1024) + ((glyph % 16) * 32);
+ tile2Offset = tile1Offset + 512;
+ }
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint32_t srcRow = (src[tile1Offset + 3] << 24)
+ | (src[tile1Offset + 2] << 16)
+ | (src[tile1Offset + 1] << 8)
+ | src[tile1Offset];
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 16) + i;
+ dest[(y * 128) + x] = table[srcRow & 0xF];
+ srcRow >>= 4;
+ }
+
+ tile1Offset += 4;
+ }
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint32_t srcRow = (src[tile2Offset + 3] << 24)
+ | (src[tile2Offset + 2] << 16)
+ | (src[tile2Offset + 1] << 8)
+ | src[tile2Offset];
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 16) + 8 + i;
+ dest[(y * 128) + x] = table[srcRow & 0xF];
+ srcRow >>= 4;
+ }
+
+ tile2Offset += 4;
+ }
+ }
+ }
+}
+
+void ConvertToTiles4Bpp(unsigned char *src, unsigned char *dest, int numGlyphs, int layout)
+{
+ static unsigned char table[3] =
+ {
+ 0, 15, 14,
+ };
+
+ for (int glyph = 0; glyph < numGlyphs; glyph++)
+ {
+ if (layout == 0)
+ {
+ int offset = glyph * 32;
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint32_t destRow = 0;
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 8) + i;
+ unsigned char color = src[(y * 128) + x];
+
+ if (color > 2)
+ FATAL_ERROR("More than 3 colors in 4 BPP font.\n");
+
+ destRow >>= 4;
+ destRow |= (table[color] << 28);
+ }
+
+ dest[offset] = destRow & 0xFF;
+ dest[offset + 1] = (destRow >> 8) & 0xFF;
+ dest[offset + 2] = (destRow >> 16) & 0xFF;
+ dest[offset + 3] = (destRow >> 24) & 0xFF;
+
+ offset += 4;
+ }
+ }
+ else
+ {
+ int tile1Offset;
+ int tile2Offset;
+
+ if (layout == 1)
+ {
+ tile1Offset = glyph * 64;
+ tile2Offset = tile1Offset + 32;
+ }
+ else
+ {
+ tile1Offset = ((glyph / 16) * 1024) + ((glyph % 16) * 32);
+ tile2Offset = tile1Offset + 512;
+ }
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint32_t destRow = 0;
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 16) + i;
+ unsigned char color = src[(y * 128) + x];
+
+ if (color > 2)
+ FATAL_ERROR("More than 3 colors in 4 BPP font.\n");
+
+ destRow >>= 4;
+ destRow |= (table[color] << 28);
+ }
+
+ dest[tile1Offset] = destRow & 0xFF;
+ dest[tile1Offset + 1] = (destRow >> 8) & 0xFF;
+ dest[tile1Offset + 2] = (destRow >> 16) & 0xFF;
+ dest[tile1Offset + 3] = (destRow >> 24) & 0xFF;
+
+ tile1Offset += 4;
+ }
+
+ for (int i = 0; i < 8; i++)
+ {
+ uint32_t destRow = 0;
+
+ for (int j = 0; j < 8; j++)
+ {
+ int x = ((glyph % 16) * 8) + j;
+ int y = ((glyph / 16) * 16) + 8 + i;
+ unsigned char color = src[(y * 128) + x];
+
+ if (color > 2)
+ FATAL_ERROR("More than 3 colors in 4 BPP font.\n");
+
+ destRow >>= 4;
+ destRow |= (table[color] << 28);
+ }
+
+ dest[tile2Offset] = destRow & 0xFF;
+ dest[tile2Offset + 1] = (destRow >> 8) & 0xFF;
+ dest[tile2Offset + 2] = (destRow >> 16) & 0xFF;
+ dest[tile2Offset + 3] = (destRow >> 24) & 0xFF;
+
+ tile2Offset += 4;
+ }
+ }
+ }
+}
+
+static void SetFontPalette(struct Image *image)
+{
+ image->hasPalette = true;
+
+ image->palette.numColors = 3;
+
+ for (int i = 0; i < image->palette.numColors; i++)
+ {
+ image->palette.colors[i].red = gFontPalette[i][0];
+ image->palette.colors[i].green = gFontPalette[i][1];
+ image->palette.colors[i].blue = gFontPalette[i][2];
+ }
+
+ image->hasTransparency = false;
+}
+
+int CalcFileSize(int numGlyphs, int bpp, int layout)
+{
+ if (layout == 2)
+ {
+ // assume 4 BPP
+ int numFullRows = numGlyphs / 16;
+ int remainder = numGlyphs % 16;
+ int fullRowsSize = numFullRows * 1024;
+ int remainderSize = 0;
+
+ if (remainder != 0)
+ remainderSize = 1024 - (16 - remainder) * 32;
+
+ return fullRowsSize + remainderSize;
+ }
+ else
+ {
+ int tilesPerGlyph = layout > 0 ? 2 : 1;
+ int bytesPerTile = 8 * bpp;
+ return numGlyphs * tilesPerGlyph * bytesPerTile;
+ }
+}
+
+void ReadFont(char *path, struct Image *image, int numGlyphs, int bpp, int layout)
+{
+ int fileSize;
+ unsigned char *buffer = ReadWholeFile(path, &fileSize);
+
+ int expectedFileSize = CalcFileSize(numGlyphs, bpp, layout);
+
+ if (fileSize != expectedFileSize)
+ FATAL_ERROR("The file size is %d but should be %d.\n", fileSize, expectedFileSize);
+
+ int numRows = (numGlyphs + 15) / 16;
+ int rowHeight = layout > 0 ? 16 : 8;
+
+ image->width = 128;
+ image->height = numRows * rowHeight;
+ image->bitDepth = 8;
+ image->pixels = calloc(image->width * image->height, 1);
+
+ if (image->pixels == NULL)
+ FATAL_ERROR("Failed to allocate memory for font.\n");
+
+ if (bpp == 1)
+ ConvertFromTiles1Bpp(buffer, image->pixels, numGlyphs, layout);
+ else
+ ConvertFromTiles4Bpp(buffer, image->pixels, numGlyphs, layout);
+
+ free(buffer);
+
+ SetFontPalette(image);
+}
+
+void WriteFont(char *path, struct Image *image, int numGlyphs, int bpp, int layout)
+{
+ if (image->width != 128)
+ FATAL_ERROR("The width of the font image (%d) is not 128.\n", image->width);
+
+ int numRows = (numGlyphs + 15) / 16;
+ int rowHeight = layout > 0 ? 16 : 8;
+ int expectedHeight = numRows * rowHeight;
+
+ if (image->height < expectedHeight)
+ FATAL_ERROR("The height of the font image (%d) is less than %d.\n", image->height, expectedHeight);
+
+ int fileSize = CalcFileSize(numGlyphs, bpp, layout);
+
+ unsigned char *buffer = calloc(fileSize, 1);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for font.\n");
+
+ if (bpp == 1)
+ ConvertToTiles1Bpp(image->pixels, buffer, numGlyphs, layout);
+ else
+ ConvertToTiles4Bpp(image->pixels, buffer, numGlyphs, layout);
+
+ WriteWholeFile(path, buffer, fileSize);
+
+ free(buffer);
+}
diff --git a/tools/rsfont/font.h b/tools/rsfont/font.h
new file mode 100644
index 000000000..1cd48757f
--- /dev/null
+++ b/tools/rsfont/font.h
@@ -0,0 +1,30 @@
+// Copyright(c) 2015-2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef FONT_H
+#define FONT_H
+
+#include <stdbool.h>
+#include "gfx.h"
+
+void ReadFont(char *path, struct Image *image, int numGlyphs, int bpp, int layout);
+void WriteFont(char *path, struct Image *image, int numGlyphs, int bpp, int layout);
+
+#endif // FONT_H
diff --git a/tools/rsfont/gfx.h b/tools/rsfont/gfx.h
new file mode 100644
index 000000000..04a3d80c7
--- /dev/null
+++ b/tools/rsfont/gfx.h
@@ -0,0 +1,50 @@
+// Copyright(c) 2015-2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef GFX_H
+#define GFX_H
+
+#include <stdint.h>
+#include <stdbool.h>
+
+struct Color
+{
+ unsigned char red;
+ unsigned char green;
+ unsigned char blue;
+};
+
+struct Palette
+{
+ struct Color colors[256];
+ int numColors;
+};
+
+struct Image {
+ int width;
+ int height;
+ int bitDepth;
+ unsigned char *pixels;
+ bool hasPalette;
+ struct Palette palette;
+ bool hasTransparency;
+};
+
+#endif // GFX_H
diff --git a/tools/rsfont/global.h b/tools/rsfont/global.h
new file mode 100644
index 000000000..65dd351d2
--- /dev/null
+++ b/tools/rsfont/global.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef GLOBAL_H
+#define GLOBAL_H
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef _MSC_VER
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED
+
+#else
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define UNUSED __attribute__((__unused__))
+
+#endif // _MSC_VER
+
+#endif // GLOBAL_H
diff --git a/tools/rsfont/main.c b/tools/rsfont/main.c
new file mode 100644
index 000000000..2f5d9d971
--- /dev/null
+++ b/tools/rsfont/main.c
@@ -0,0 +1,93 @@
+// Copyright(c) 2015-2016 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <stdio.h>
+#include <string.h>
+#include <stdbool.h>
+#include "global.h"
+#include "util.h"
+#include "gfx.h"
+#include "convert_png.h"
+#include "font.h"
+
+int ExtensionToBpp(const char *extension)
+{
+ if (!strcmp(extension, "1bpp"))
+ return 1;
+ else if (!strcmp(extension, "4bpp"))
+ return 4;
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ if (argc < 5)
+ FATAL_ERROR("Usage: rsfont INPUT_FILE OUTPUT_FILE NUM_GLYPHS LAYOUT_TYPE\n");
+
+ char *inputPath = argv[1];
+ char *outputPath = argv[2];
+ char *inputFileExtension = GetFileExtension(inputPath);
+ char *outputFileExtension = GetFileExtension(outputPath);
+
+ if (inputFileExtension == NULL)
+ FATAL_ERROR("Input file \"%s\" has no extension.\n", inputPath);
+
+ if (outputFileExtension == NULL)
+ FATAL_ERROR("Output file \"%s\" has no extension.\n", outputPath);
+
+ int numGlyphs;
+ int bpp;
+ int layout;
+
+ if (!ParseNumber(argv[3], NULL, 10, &numGlyphs))
+ FATAL_ERROR("Failed to parse number of glyphs.\n");
+
+ if (!ParseNumber(argv[4], NULL, 10, &layout))
+ FATAL_ERROR("Failed to parse layout type.\n");
+
+ if (layout < 0 || layout > 2)
+ FATAL_ERROR("Layout type %d is invalid. Layout type must be 0, 1, or 2.\n", layout);
+
+ bool toPng;
+
+ if (!strcmp(inputFileExtension, "png") && (bpp = ExtensionToBpp(outputFileExtension)) != 0)
+ toPng = false;
+ else if ((bpp = ExtensionToBpp(inputFileExtension)) != 0 && !strcmp(outputFileExtension, "png"))
+ toPng = true;
+ else
+ FATAL_ERROR("Don't know how to convert \"%s\" to \"%s\".\n", inputPath, outputPath);
+
+ if (bpp == 1 && layout == 2)
+ FATAL_ERROR("Layout type 2 is not supported with 1 BPP fonts.\n");
+
+ struct Image image;
+
+ if (toPng)
+ {
+ ReadFont(inputPath, &image, numGlyphs, bpp, layout);
+ WritePng(outputPath, &image);
+ }
+ else
+ {
+ image.bitDepth = 8;
+ ReadPng(inputPath, &image);
+ WriteFont(outputPath, &image, numGlyphs, bpp, layout);
+ }
+}
diff --git a/tools/rsfont/util.c b/tools/rsfont/util.c
new file mode 100644
index 000000000..87abeb31c
--- /dev/null
+++ b/tools/rsfont/util.c
@@ -0,0 +1,124 @@
+// Copyright (c) 2015 YamaArashi
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include <errno.h>
+#include <limits.h>
+#include "global.h"
+#include "util.h"
+
+bool ParseNumber(char *s, char **end, int radix, int *intValue)
+{
+ char *localEnd;
+
+ if (end == NULL)
+ end = &localEnd;
+
+ errno = 0;
+
+ const long longValue = strtol(s, end, radix);
+
+ if (*end == s)
+ return false; // not a number
+
+ if ((longValue == LONG_MIN || longValue == LONG_MAX) && errno == ERANGE)
+ return false;
+
+ if (longValue > INT_MAX)
+ return false;
+
+ if (longValue < INT_MIN)
+ return false;
+
+ *intValue = (int)longValue;
+
+ return true;
+}
+
+char *GetFileExtension(char *path)
+{
+ char *extension = path;
+
+ while (*extension != 0)
+ extension++;
+
+ while (extension > path && *extension != '.')
+ extension--;
+
+ if (extension == path)
+ return NULL;
+
+ extension++;
+
+ if (*extension == 0)
+ return NULL;
+
+ return extension;
+}
+
+unsigned char *ReadWholeFile(char *path, int *size)
+{
+ FILE *fp = fopen(path, "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", path);
+
+ fseek(fp, 0, SEEK_END);
+
+ *size = ftell(fp);
+
+ unsigned char *buffer = malloc(*size);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for reading \"%s\".\n", path);
+
+ rewind(fp);
+
+ if (fread(buffer, *size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", path);
+
+ fclose(fp);
+
+ return buffer;
+}
+
+unsigned char *ReadWholeFileZeroPadded(char *path, int *size, int padAmount)
+{
+ FILE *fp = fopen(path, "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", path);
+
+ fseek(fp, 0, SEEK_END);
+
+ *size = ftell(fp);
+
+ unsigned char *buffer = calloc(*size + padAmount, 1);
+
+ if (buffer == NULL)
+ FATAL_ERROR("Failed to allocate memory for reading \"%s\".\n", path);
+
+ rewind(fp);
+
+ if (fread(buffer, *size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", path);
+
+ fclose(fp);
+
+ return buffer;
+}
+
+void WriteWholeFile(char *path, void *buffer, int bufferSize)
+{
+ FILE *fp = fopen(path, "wb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for writing.\n", path);
+
+ if (fwrite(buffer, bufferSize, 1, fp) != 1)
+ FATAL_ERROR("Failed to write to \"%s\".\n", path);
+
+ fclose(fp);
+}
diff --git a/tools/rsfont/util.h b/tools/rsfont/util.h
new file mode 100644
index 000000000..6d7a9c21e
--- /dev/null
+++ b/tools/rsfont/util.h
@@ -0,0 +1,14 @@
+// Copyright (c) 2015 YamaArashi
+
+#ifndef UTIL_H
+#define UTIL_H
+
+#include <stdbool.h>
+
+bool ParseNumber(char *s, char **end, int radix, int *intValue);
+char *GetFileExtension(char *path);
+unsigned char *ReadWholeFile(char *path, int *size);
+unsigned char *ReadWholeFileZeroPadded(char *path, int *size, int padAmount);
+void WriteWholeFile(char *path, void *buffer, int bufferSize);
+
+#endif // UTIL_H
diff --git a/tools/scaninc/.gitignore b/tools/scaninc/.gitignore
new file mode 100644
index 000000000..94bfbf989
--- /dev/null
+++ b/tools/scaninc/.gitignore
@@ -0,0 +1 @@
+scaninc
diff --git a/tools/scaninc/LICENSE b/tools/scaninc/LICENSE
new file mode 100644
index 000000000..b66bf81c0
--- /dev/null
+++ b/tools/scaninc/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015 YamaArashi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/tools/scaninc/Makefile b/tools/scaninc/Makefile
new file mode 100644
index 000000000..3e1c031a8
--- /dev/null
+++ b/tools/scaninc/Makefile
@@ -0,0 +1,15 @@
+CXX = g++
+
+CXXFLAGS = -Wall -Werror -std=c++11 -O2 -s
+
+SRCS = scaninc.cpp c_file.cpp asm_file.cpp
+
+HEADERS := scaninc.h asm_file.h c_file.h
+
+.PHONY: clean
+
+scaninc: $(SRCS) $(HEADERS)
+ $(CXX) $(CXXFLAGS) $(SRCS) -o $@ $(LDFLAGS)
+
+clean:
+ $(RM) scaninc scaninc.exe
diff --git a/tools/scaninc/asm_file.cpp b/tools/scaninc/asm_file.cpp
new file mode 100644
index 000000000..6322749e2
--- /dev/null
+++ b/tools/scaninc/asm_file.cpp
@@ -0,0 +1,191 @@
+// Copyright(c) 2015-2017 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <string>
+#include "scaninc.h"
+#include "asm_file.h"
+
+AsmFile::AsmFile(std::string path)
+{
+ m_path = path;
+
+ FILE *fp = std::fopen(path.c_str(), "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", path.c_str());
+
+ std::fseek(fp, 0, SEEK_END);
+
+ m_size = std::ftell(fp);
+
+ m_buffer = new char[m_size];
+
+ std::rewind(fp);
+
+ if (std::fread(m_buffer, m_size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", path.c_str());
+
+ std::fclose(fp);
+
+ m_pos = 0;
+ m_lineNum = 1;
+}
+
+AsmFile::~AsmFile()
+{
+ delete[] m_buffer;
+}
+
+IncDirectiveType AsmFile::ReadUntilIncDirective(std::string &path)
+{
+ // At the beginning of each loop iteration, the current file position
+ // should be at the start of a line or at the end of the file.
+ for (;;)
+ {
+ SkipTabsAndSpaces();
+
+ IncDirectiveType incDirectiveType = IncDirectiveType::None;
+
+ if (PeekChar() == '.')
+ {
+ m_pos++;
+
+ if (MatchIncDirective("incbin", path))
+ incDirectiveType = IncDirectiveType::Incbin;
+ else if (MatchIncDirective("include", path))
+ incDirectiveType = IncDirectiveType::Include;
+ }
+
+ for (;;)
+ {
+ int c = GetChar();
+
+ if (c == -1)
+ return incDirectiveType;
+
+ if (c == ';')
+ {
+ SkipEndOfLineComment();
+ break;
+ }
+ else if (c == '/' && PeekChar() == '*')
+ {
+ m_pos++;
+ SkipMultiLineComment();
+ }
+ else if (c == '"')
+ {
+ SkipString();
+ }
+ else if (c == '\n')
+ {
+ break;
+ }
+ }
+
+ if (incDirectiveType != IncDirectiveType::None)
+ return incDirectiveType;
+ }
+}
+
+std::string AsmFile::ReadPath()
+{
+ int length = 0;
+ int startPos = m_pos;
+
+ for (;;)
+ {
+ int c = GetChar();
+
+ if (c == '"')
+ break;
+
+ if (c == -1)
+ FATAL_INPUT_ERROR("unexpected EOF in include string\n");
+
+ if (c == 0)
+ FATAL_INPUT_ERROR("unexpected NUL character in include string\n");
+
+ if (c == '\n')
+ FATAL_INPUT_ERROR("unexpected end of line character in include string\n");
+
+ // Don't bother allowing any escape sequences.
+ if (c == '\\')
+ FATAL_INPUT_ERROR("unexpected escape in include string\n");
+
+ length++;
+
+ if (length > SCANINC_MAX_PATH)
+ FATAL_INPUT_ERROR("path is too long");
+ }
+
+ return std::string(m_buffer + startPos, length);
+}
+
+void AsmFile::SkipEndOfLineComment()
+{
+ int c;
+
+ do
+ {
+ c = GetChar();
+ } while (c != -1 && c != '\n');
+}
+
+void AsmFile::SkipMultiLineComment()
+{
+ for (;;)
+ {
+ int c = GetChar();
+
+ if (c == '*')
+ {
+ if (PeekChar() == '/')
+ {
+ m_pos++;
+ return;
+ }
+ }
+ else if (c == -1)
+ {
+ return;
+ }
+ }
+}
+
+void AsmFile::SkipString()
+{
+ for (;;)
+ {
+ int c = GetChar();
+
+ if (c == '"')
+ break;
+
+ if (c == -1)
+ FATAL_INPUT_ERROR("unexpected EOF in string\n");
+
+ if (c == '\\')
+ {
+ c = GetChar();
+ }
+ }
+}
diff --git a/tools/scaninc/asm_file.h b/tools/scaninc/asm_file.h
new file mode 100644
index 000000000..ad99b757e
--- /dev/null
+++ b/tools/scaninc/asm_file.h
@@ -0,0 +1,119 @@
+// Copyright(c) 2015-2017 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef ASM_FILE_H
+#define ASM_FILE_H
+
+#include <string>
+#include "scaninc.h"
+
+enum class IncDirectiveType
+{
+ None,
+ Include,
+ Incbin
+};
+
+class AsmFile
+{
+public:
+ AsmFile(std::string path);
+ ~AsmFile();
+ IncDirectiveType ReadUntilIncDirective(std::string& path);
+
+private:
+ char *m_buffer;
+ int m_pos;
+ int m_size;
+ int m_lineNum;
+ std::string m_path;
+
+ int GetChar()
+ {
+ if (m_pos >= m_size)
+ return -1;
+
+ int c = m_buffer[m_pos++];
+
+ if (c == '\r')
+ {
+ if (m_pos < m_size && m_buffer[m_pos++] == '\n')
+ {
+ m_lineNum++;
+ return '\n';
+ }
+ else
+ {
+ FATAL_INPUT_ERROR("CR line endings are not supported\n");
+ }
+ }
+
+ if (c == '\n')
+ m_lineNum++;
+
+ return c;
+ }
+
+ // No newline translation because it's not needed for any use of this function.
+ int PeekChar()
+ {
+ if (m_pos >= m_size)
+ return -1;
+
+ return m_buffer[m_pos];
+ }
+
+ void SkipTabsAndSpaces()
+ {
+ while (m_pos < m_size && (m_buffer[m_pos] == '\t' || m_buffer[m_pos] == ' '))
+ m_pos++;
+ }
+
+ bool MatchIncDirective(std::string directiveName, std::string& path)
+ {
+ int length = directiveName.length();
+ int i;
+
+ for (i = 0; i < length && m_pos + i < m_size; i++)
+ if (directiveName[i] != m_buffer[m_pos + i])
+ return false;
+
+ if (i < length)
+ return false;
+
+ m_pos += length;
+
+ SkipTabsAndSpaces();
+
+ if (GetChar() != '"')
+ FATAL_INPUT_ERROR("no path after \".%s\" directive\n", directiveName.c_str());
+
+ path = ReadPath();
+
+ return true;
+ }
+
+ std::string ReadPath();
+ void SkipEndOfLineComment();
+ void SkipMultiLineComment();
+ void SkipString();
+};
+
+#endif // ASM_FILE_H
diff --git a/tools/scaninc/c_file.cpp b/tools/scaninc/c_file.cpp
new file mode 100644
index 000000000..f7acc833f
--- /dev/null
+++ b/tools/scaninc/c_file.cpp
@@ -0,0 +1,298 @@
+// Copyright(c) 2017 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include "c_file.h"
+
+CFile::CFile(std::string path)
+{
+ m_path = path;
+
+ FILE *fp = std::fopen(path.c_str(), "rb");
+
+ if (fp == NULL)
+ FATAL_ERROR("Failed to open \"%s\" for reading.\n", path.c_str());
+
+ std::fseek(fp, 0, SEEK_END);
+
+ m_size = std::ftell(fp);
+
+ m_buffer = new char[m_size + 1];
+ m_buffer[m_size] = 0;
+
+ std::rewind(fp);
+
+ if (std::fread(m_buffer, m_size, 1, fp) != 1)
+ FATAL_ERROR("Failed to read \"%s\".\n", path.c_str());
+
+ std::fclose(fp);
+
+ m_pos = 0;
+ m_lineNum = 1;
+}
+
+CFile::~CFile()
+{
+ delete[] m_buffer;
+}
+
+void CFile::FindIncbins()
+{
+ char stringChar = 0;
+
+ while (m_pos < m_size)
+ {
+ if (stringChar)
+ {
+ if (m_buffer[m_pos] == stringChar)
+ {
+ m_pos++;
+ stringChar = 0;
+ }
+ else if (m_buffer[m_pos] == '\\' && m_buffer[m_pos + 1] == stringChar)
+ {
+ m_pos += 2;
+ }
+ else
+ {
+ if (m_buffer[m_pos] == '\n')
+ m_lineNum++;
+ m_pos++;
+ }
+ }
+ else
+ {
+ SkipWhitespace();
+ CheckInclude();
+ CheckIncbin();
+
+ if (m_pos >= m_size)
+ break;
+
+ char c = m_buffer[m_pos++];
+
+ if (c == '\n')
+ m_lineNum++;
+ else if (c == '"')
+ stringChar = '"';
+ else if (c == '\'')
+ stringChar = '\'';
+ else if (c == 0)
+ FATAL_INPUT_ERROR("unexpected null character");
+ }
+ }
+}
+
+bool CFile::ConsumeHorizontalWhitespace()
+{
+ if (m_buffer[m_pos] == '\t' || m_buffer[m_pos] == ' ')
+ {
+ m_pos++;
+ return true;
+ }
+
+ return false;
+}
+
+bool CFile::ConsumeNewline()
+{
+ if (m_buffer[m_pos] == '\n')
+ {
+ m_pos++;
+ m_lineNum++;
+ return true;
+ }
+
+ if (m_buffer[m_pos] == '\r' && m_buffer[m_pos + 1] == '\n')
+ {
+ m_pos += 2;
+ m_lineNum++;
+ return true;
+ }
+
+ return false;
+}
+
+bool CFile::ConsumeComment()
+{
+ if (m_buffer[m_pos] == '/' && m_buffer[m_pos + 1] == '*')
+ {
+ m_pos += 2;
+ while (m_buffer[m_pos] != '*' && m_buffer[m_pos + 1] != '/')
+ {
+ if (m_buffer[m_pos] == 0)
+ return false;
+ if (!ConsumeNewline())
+ m_pos++;
+ }
+ m_pos += 2;
+ return true;
+ }
+ else if (m_buffer[m_pos] == '/' && m_buffer[m_pos + 1] == '/')
+ {
+ m_pos += 2;
+ while (!ConsumeNewline())
+ {
+ if (m_buffer[m_pos] == 0)
+ return false;
+ m_pos++;
+ }
+ return true;
+ }
+
+ return false;
+}
+
+void CFile::SkipWhitespace()
+{
+ while (ConsumeHorizontalWhitespace() || ConsumeNewline() || ConsumeComment())
+ ;
+}
+
+bool CFile::CheckIdentifier(const std::string& ident)
+{
+ unsigned int i;
+
+ for (i = 0; i < ident.length() && m_pos + i < (unsigned)m_size; i++)
+ if (ident[i] != m_buffer[m_pos + i])
+ return false;
+
+ return (i == ident.length());
+}
+
+void CFile::CheckInclude()
+{
+ if (m_buffer[m_pos] != '#')
+ return;
+
+ std::string ident = "#include";
+
+ if (!CheckIdentifier(ident))
+ {
+ return;
+ }
+
+ m_pos += ident.length();
+
+ ConsumeHorizontalWhitespace();
+
+ std::string path = ReadPath();
+
+ if (!path.empty()) {
+ m_includes.emplace(path);
+ }
+}
+
+void CFile::CheckIncbin()
+{
+ // Optimization: assume most lines are not incbins
+ if (!(m_buffer[m_pos+0] == 'I'
+ && m_buffer[m_pos+1] == 'N'
+ && m_buffer[m_pos+2] == 'C'
+ && m_buffer[m_pos+3] == 'B'
+ && m_buffer[m_pos+4] == 'I'
+ && m_buffer[m_pos+5] == 'N'
+ && m_buffer[m_pos+6] == '_'))
+ {
+ return;
+ }
+
+ std::string idents[6] = { "INCBIN_S8", "INCBIN_U8", "INCBIN_S16", "INCBIN_U16", "INCBIN_S32", "INCBIN_U32" };
+ int incbinType = -1;
+
+ for (int i = 0; i < 6; i++)
+ {
+ if (CheckIdentifier(idents[i]))
+ {
+ incbinType = i;
+ break;
+ }
+ }
+
+ if (incbinType == -1)
+ return;
+
+ long oldPos = m_pos;
+ long oldLineNum = m_lineNum;
+
+ m_pos += idents[incbinType].length();
+
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] != '(')
+ {
+ m_pos = oldPos;
+ m_lineNum = oldLineNum;
+ return;
+ }
+
+ m_pos++;
+
+ SkipWhitespace();
+
+ std::string path = ReadPath();
+
+ SkipWhitespace();
+
+ if (m_buffer[m_pos] != ')')
+ FATAL_INPUT_ERROR("expected ')'");
+
+ m_pos++;
+
+ m_incbins.emplace(path);
+}
+
+std::string CFile::ReadPath()
+{
+ if (m_buffer[m_pos] != '"')
+ {
+ if (m_buffer[m_pos] == '<')
+ {
+ return std::string();
+ }
+ FATAL_INPUT_ERROR("expected '\"' or '<'");
+ }
+
+ m_pos++;
+
+ int startPos = m_pos;
+
+ while (m_buffer[m_pos] != '"')
+ {
+ if (m_buffer[m_pos] == 0)
+ {
+ if (m_pos >= m_size)
+ FATAL_INPUT_ERROR("unexpected EOF in path string");
+ else
+ FATAL_INPUT_ERROR("unexpected null character in path string");
+ }
+
+ if (m_buffer[m_pos] == '\r' || m_buffer[m_pos] == '\n')
+ FATAL_INPUT_ERROR("unexpected end of line character in path string");
+
+ if (m_buffer[m_pos] == '\\')
+ FATAL_INPUT_ERROR("unexpected escape in path string");
+
+ m_pos++;
+ }
+
+ m_pos++;
+
+ return std::string(m_buffer + startPos, m_pos - 1 - startPos);
+}
diff --git a/tools/scaninc/c_file.h b/tools/scaninc/c_file.h
new file mode 100644
index 000000000..618901b85
--- /dev/null
+++ b/tools/scaninc/c_file.h
@@ -0,0 +1,57 @@
+// Copyright(c) 2017 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef C_FILE_H
+#define C_FILE_H
+
+#include <string>
+#include <set>
+#include <memory>
+#include "scaninc.h"
+
+class CFile
+{
+public:
+ CFile(std::string path);
+ ~CFile();
+ void FindIncbins();
+ const std::set<std::string>& GetIncbins() { return m_incbins; }
+ const std::set<std::string>& GetIncludes() { return m_includes; }
+
+private:
+ char *m_buffer;
+ int m_pos;
+ int m_size;
+ int m_lineNum;
+ std::string m_path;
+ std::set<std::string> m_incbins;
+ std::set<std::string> m_includes;
+
+ bool ConsumeHorizontalWhitespace();
+ bool ConsumeNewline();
+ bool ConsumeComment();
+ void SkipWhitespace();
+ bool CheckIdentifier(const std::string& ident);
+ void CheckInclude();
+ void CheckIncbin();
+ std::string ReadPath();
+};
+
+#endif // C_FILE_H
diff --git a/tools/scaninc/scaninc.cpp b/tools/scaninc/scaninc.cpp
new file mode 100644
index 000000000..3dc221479
--- /dev/null
+++ b/tools/scaninc/scaninc.cpp
@@ -0,0 +1,165 @@
+// Copyright(c) 2015-2017 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include <cstdio>
+#include <cstdlib>
+#include <list>
+#include <queue>
+#include <set>
+#include <string>
+#include "scaninc.h"
+#include "asm_file.h"
+#include "c_file.h"
+
+bool CanOpenFile(std::string path)
+{
+ FILE *fp = std::fopen(path.c_str(), "rb");
+
+ if (fp == NULL)
+ return false;
+
+ std::fclose(fp);
+ return true;
+}
+
+const char *const USAGE = "Usage: scaninc [-I INCLUDE_PATH] FILE_PATH\n";
+
+int main(int argc, char **argv)
+{
+ std::queue<std::string> filesToProcess;
+ std::set<std::string> dependencies;
+
+ std::list<std::string> includeDirs;
+
+ argc--;
+ argv++;
+
+ while (argc > 1)
+ {
+ std::string arg(argv[0]);
+ if (arg.substr(0, 2) == "-I")
+ {
+ std::string includeDir = arg.substr(2);
+ if (includeDir.empty())
+ {
+ argc--;
+ argv++;
+ includeDir = std::string(argv[0]);
+ }
+ if (includeDir.back() != '/')
+ {
+ includeDir += '/';
+ }
+ includeDirs.push_back(includeDir);
+ }
+ else
+ {
+ FATAL_ERROR(USAGE);
+ }
+ argc--;
+ argv++;
+ }
+
+ if (argc != 1) {
+ FATAL_ERROR(USAGE);
+ }
+
+ std::string initialPath(argv[0]);
+
+ std::size_t pos = initialPath.find_last_of('.');
+
+ if (pos == std::string::npos)
+ FATAL_ERROR("no file extension in path \"%s\"\n", initialPath.c_str());
+
+ std::string extension = initialPath.substr(pos + 1);
+
+ std::string srcDir("");
+ std::size_t slash = initialPath.rfind('/');
+ if (slash != std::string::npos)
+ {
+ srcDir = initialPath.substr(0, slash + 1);
+ }
+ includeDirs.push_back(srcDir);
+
+ if (extension == "c" || extension == "h")
+ {
+ filesToProcess.push(initialPath);
+
+ while (!filesToProcess.empty())
+ {
+ CFile file(filesToProcess.front());
+ filesToProcess.pop();
+
+ file.FindIncbins();
+ for (auto incbin : file.GetIncbins())
+ {
+ dependencies.insert(incbin);
+ }
+ for (auto include : file.GetIncludes())
+ {
+ for (auto includeDir : includeDirs)
+ {
+ std::string path(includeDir + include);
+ if (CanOpenFile(path))
+ {
+ bool inserted = dependencies.insert(path).second;
+ if (inserted)
+ {
+ filesToProcess.push(path);
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+ else if (extension == "s" || extension == "inc")
+ {
+ filesToProcess.push(initialPath);
+
+ while (!filesToProcess.empty())
+ {
+ AsmFile file(filesToProcess.front());
+
+ filesToProcess.pop();
+
+ IncDirectiveType incDirectiveType;
+ std::string path;
+
+ while ((incDirectiveType = file.ReadUntilIncDirective(path)) != IncDirectiveType::None)
+ {
+ bool inserted = dependencies.insert(path).second;
+ if (inserted
+ && incDirectiveType == IncDirectiveType::Include
+ && CanOpenFile(path))
+ filesToProcess.push(path);
+ }
+ }
+ }
+ else
+ {
+ FATAL_ERROR("unknown extension \"%s\"\n", extension.c_str());
+ }
+
+ for (const std::string &path : dependencies)
+ {
+ std::printf("%s\n", path.c_str());
+ }
+}
diff --git a/tools/scaninc/scaninc.h b/tools/scaninc/scaninc.h
new file mode 100644
index 000000000..30cc9611c
--- /dev/null
+++ b/tools/scaninc/scaninc.h
@@ -0,0 +1,59 @@
+// Copyright(c) 2015-2017 YamaArashi
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef SCANINC_H
+#define SCANINC_H
+
+#include <cstdio>
+#include <cstdlib>
+
+#ifdef _MSC_VER
+
+#define FATAL_INPUT_ERROR(format, ...) \
+do { \
+ fprintf(stderr, "%s:%d " format, m_path.c_str(), m_lineNum, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, __VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#else
+
+#define FATAL_INPUT_ERROR(format, ...) \
+do { \
+ fprintf(stderr, "%s:%d " format, m_path.c_str(), m_lineNum, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#define FATAL_ERROR(format, ...) \
+do { \
+ fprintf(stderr, format, ##__VA_ARGS__); \
+ exit(1); \
+} while (0)
+
+#endif // _MSC_VER
+
+#define SCANINC_MAX_PATH 255
+
+#endif // SCANINC_H