Merge branch 'master' into contest-data

This commit is contained in:
Phlosioneer
2019-03-31 20:22:47 -04:00
3196 changed files with 55655 additions and 75454 deletions
+416 -416
View File
@@ -1,424 +1,424 @@
#include "global.h"
const u32 gMonFrontPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/anim_front_pics/circled_question_mark_front_pic.4bpp.lz");
const u32 gMonFrontPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/circled_question_mark/anim_front.4bpp.lz");
const u32 gMonFrontPic_Bulbasaur[] = INCBIN_U32("graphics/pokemon/anim_front_pics/bulbasaur_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ivysaur[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ivysaur_front_pic.4bpp.lz");
const u32 gMonFrontPic_Venusaur[] = INCBIN_U32("graphics/pokemon/anim_front_pics/venusaur_front_pic.4bpp.lz");
const u32 gMonFrontPic_Charmander[] = INCBIN_U32("graphics/pokemon/anim_front_pics/charmander_front_pic.4bpp.lz");
const u32 gMonFrontPic_Charmeleon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/charmeleon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Charizard[] = INCBIN_U32("graphics/pokemon/anim_front_pics/charizard_front_pic.4bpp.lz");
const u32 gMonFrontPic_Squirtle[] = INCBIN_U32("graphics/pokemon/anim_front_pics/squirtle_front_pic.4bpp.lz");
const u32 gMonFrontPic_Wartortle[] = INCBIN_U32("graphics/pokemon/anim_front_pics/wartortle_front_pic.4bpp.lz");
const u32 gMonFrontPic_Blastoise[] = INCBIN_U32("graphics/pokemon/anim_front_pics/blastoise_front_pic.4bpp.lz");
const u32 gMonFrontPic_Caterpie[] = INCBIN_U32("graphics/pokemon/anim_front_pics/caterpie_front_pic.4bpp.lz");
const u32 gMonFrontPic_Metapod[] = INCBIN_U32("graphics/pokemon/anim_front_pics/metapod_front_pic.4bpp.lz");
const u32 gMonFrontPic_Butterfree[] = INCBIN_U32("graphics/pokemon/anim_front_pics/butterfree_front_pic.4bpp.lz");
const u32 gMonFrontPic_Weedle[] = INCBIN_U32("graphics/pokemon/anim_front_pics/weedle_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kakuna[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kakuna_front_pic.4bpp.lz");
const u32 gMonFrontPic_Beedrill[] = INCBIN_U32("graphics/pokemon/anim_front_pics/beedrill_front_pic.4bpp.lz");
const u32 gMonFrontPic_Pidgey[] = INCBIN_U32("graphics/pokemon/anim_front_pics/pidgey_front_pic.4bpp.lz");
const u32 gMonFrontPic_Pidgeotto[] = INCBIN_U32("graphics/pokemon/anim_front_pics/pidgeotto_front_pic.4bpp.lz");
const u32 gMonFrontPic_Pidgeot[] = INCBIN_U32("graphics/pokemon/anim_front_pics/pidgeot_front_pic.4bpp.lz");
const u32 gMonFrontPic_Rattata[] = INCBIN_U32("graphics/pokemon/anim_front_pics/rattata_front_pic.4bpp.lz");
const u32 gMonFrontPic_Raticate[] = INCBIN_U32("graphics/pokemon/anim_front_pics/raticate_front_pic.4bpp.lz");
const u32 gMonFrontPic_Spearow[] = INCBIN_U32("graphics/pokemon/anim_front_pics/spearow_front_pic.4bpp.lz");
const u32 gMonFrontPic_Fearow[] = INCBIN_U32("graphics/pokemon/anim_front_pics/fearow_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ekans[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ekans_front_pic.4bpp.lz");
const u32 gMonFrontPic_Arbok[] = INCBIN_U32("graphics/pokemon/anim_front_pics/arbok_front_pic.4bpp.lz");
const u32 gMonFrontPic_Pikachu[] = INCBIN_U32("graphics/pokemon/anim_front_pics/pikachu_front_pic.4bpp.lz");
const u32 gMonFrontPic_Raichu[] = INCBIN_U32("graphics/pokemon/anim_front_pics/raichu_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sandshrew[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sandshrew_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sandslash[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sandslash_front_pic.4bpp.lz");
const u32 gMonFrontPic_NidoranF[] = INCBIN_U32("graphics/pokemon/anim_front_pics/nidoran_f_front_pic.4bpp.lz");
const u32 gMonFrontPic_Nidorina[] = INCBIN_U32("graphics/pokemon/anim_front_pics/nidorina_front_pic.4bpp.lz");
const u32 gMonFrontPic_Nidoqueen[] = INCBIN_U32("graphics/pokemon/anim_front_pics/nidoqueen_front_pic.4bpp.lz");
const u32 gMonFrontPic_NidoranM[] = INCBIN_U32("graphics/pokemon/anim_front_pics/nidoran_m_front_pic.4bpp.lz");
const u32 gMonFrontPic_Nidorino[] = INCBIN_U32("graphics/pokemon/anim_front_pics/nidorino_front_pic.4bpp.lz");
const u32 gMonFrontPic_Nidoking[] = INCBIN_U32("graphics/pokemon/anim_front_pics/nidoking_front_pic.4bpp.lz");
const u32 gMonFrontPic_Clefairy[] = INCBIN_U32("graphics/pokemon/anim_front_pics/clefairy_front_pic.4bpp.lz");
const u32 gMonFrontPic_Clefable[] = INCBIN_U32("graphics/pokemon/anim_front_pics/clefable_front_pic.4bpp.lz");
const u32 gMonFrontPic_Vulpix[] = INCBIN_U32("graphics/pokemon/anim_front_pics/vulpix_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ninetales[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ninetales_front_pic.4bpp.lz");
const u32 gMonFrontPic_Jigglypuff[] = INCBIN_U32("graphics/pokemon/anim_front_pics/jigglypuff_front_pic.4bpp.lz");
const u32 gMonFrontPic_Wigglytuff[] = INCBIN_U32("graphics/pokemon/anim_front_pics/wigglytuff_front_pic.4bpp.lz");
const u32 gMonFrontPic_Zubat[] = INCBIN_U32("graphics/pokemon/anim_front_pics/zubat_front_pic.4bpp.lz");
const u32 gMonFrontPic_Golbat[] = INCBIN_U32("graphics/pokemon/anim_front_pics/golbat_front_pic.4bpp.lz");
const u32 gMonFrontPic_Oddish[] = INCBIN_U32("graphics/pokemon/anim_front_pics/oddish_front_pic.4bpp.lz");
const u32 gMonFrontPic_Gloom[] = INCBIN_U32("graphics/pokemon/anim_front_pics/gloom_front_pic.4bpp.lz");
const u32 gMonFrontPic_Vileplume[] = INCBIN_U32("graphics/pokemon/anim_front_pics/vileplume_front_pic.4bpp.lz");
const u32 gMonFrontPic_Paras[] = INCBIN_U32("graphics/pokemon/anim_front_pics/paras_front_pic.4bpp.lz");
const u32 gMonFrontPic_Parasect[] = INCBIN_U32("graphics/pokemon/anim_front_pics/parasect_front_pic.4bpp.lz");
const u32 gMonFrontPic_Venonat[] = INCBIN_U32("graphics/pokemon/anim_front_pics/venonat_front_pic.4bpp.lz");
const u32 gMonFrontPic_Venomoth[] = INCBIN_U32("graphics/pokemon/anim_front_pics/venomoth_front_pic.4bpp.lz");
const u32 gMonFrontPic_Diglett[] = INCBIN_U32("graphics/pokemon/anim_front_pics/diglett_front_pic.4bpp.lz");
const u32 gMonFrontPic_Dugtrio[] = INCBIN_U32("graphics/pokemon/anim_front_pics/dugtrio_front_pic.4bpp.lz");
const u32 gMonFrontPic_Meowth[] = INCBIN_U32("graphics/pokemon/anim_front_pics/meowth_front_pic.4bpp.lz");
const u32 gMonFrontPic_Persian[] = INCBIN_U32("graphics/pokemon/anim_front_pics/persian_front_pic.4bpp.lz");
const u32 gMonFrontPic_Psyduck[] = INCBIN_U32("graphics/pokemon/anim_front_pics/psyduck_front_pic.4bpp.lz");
const u32 gMonFrontPic_Golduck[] = INCBIN_U32("graphics/pokemon/anim_front_pics/golduck_front_pic.4bpp.lz");
const u32 gMonFrontPic_Mankey[] = INCBIN_U32("graphics/pokemon/anim_front_pics/mankey_front_pic.4bpp.lz");
const u32 gMonFrontPic_Primeape[] = INCBIN_U32("graphics/pokemon/anim_front_pics/primeape_front_pic.4bpp.lz");
const u32 gMonFrontPic_Growlithe[] = INCBIN_U32("graphics/pokemon/anim_front_pics/growlithe_front_pic.4bpp.lz");
const u32 gMonFrontPic_Arcanine[] = INCBIN_U32("graphics/pokemon/anim_front_pics/arcanine_front_pic.4bpp.lz");
const u32 gMonFrontPic_Poliwag[] = INCBIN_U32("graphics/pokemon/anim_front_pics/poliwag_front_pic.4bpp.lz");
const u32 gMonFrontPic_Poliwhirl[] = INCBIN_U32("graphics/pokemon/anim_front_pics/poliwhirl_front_pic.4bpp.lz");
const u32 gMonFrontPic_Poliwrath[] = INCBIN_U32("graphics/pokemon/anim_front_pics/poliwrath_front_pic.4bpp.lz");
const u32 gMonFrontPic_Abra[] = INCBIN_U32("graphics/pokemon/anim_front_pics/abra_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kadabra[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kadabra_front_pic.4bpp.lz");
const u32 gMonFrontPic_Alakazam[] = INCBIN_U32("graphics/pokemon/anim_front_pics/alakazam_front_pic.4bpp.lz");
const u32 gMonFrontPic_Machop[] = INCBIN_U32("graphics/pokemon/anim_front_pics/machop_front_pic.4bpp.lz");
const u32 gMonFrontPic_Machoke[] = INCBIN_U32("graphics/pokemon/anim_front_pics/machoke_front_pic.4bpp.lz");
const u32 gMonFrontPic_Machamp[] = INCBIN_U32("graphics/pokemon/anim_front_pics/machamp_front_pic.4bpp.lz");
const u32 gMonFrontPic_Bellsprout[] = INCBIN_U32("graphics/pokemon/anim_front_pics/bellsprout_front_pic.4bpp.lz");
const u32 gMonFrontPic_Weepinbell[] = INCBIN_U32("graphics/pokemon/anim_front_pics/weepinbell_front_pic.4bpp.lz");
const u32 gMonFrontPic_Victreebel[] = INCBIN_U32("graphics/pokemon/anim_front_pics/victreebel_front_pic.4bpp.lz");
const u32 gMonFrontPic_Tentacool[] = INCBIN_U32("graphics/pokemon/anim_front_pics/tentacool_front_pic.4bpp.lz");
const u32 gMonFrontPic_Tentacruel[] = INCBIN_U32("graphics/pokemon/anim_front_pics/tentacruel_front_pic.4bpp.lz");
const u32 gMonFrontPic_Geodude[] = INCBIN_U32("graphics/pokemon/anim_front_pics/geodude_front_pic.4bpp.lz");
const u32 gMonFrontPic_Graveler[] = INCBIN_U32("graphics/pokemon/anim_front_pics/graveler_front_pic.4bpp.lz");
const u32 gMonFrontPic_Golem[] = INCBIN_U32("graphics/pokemon/anim_front_pics/golem_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ponyta[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ponyta_front_pic.4bpp.lz");
const u32 gMonFrontPic_Rapidash[] = INCBIN_U32("graphics/pokemon/anim_front_pics/rapidash_front_pic.4bpp.lz");
const u32 gMonFrontPic_Slowpoke[] = INCBIN_U32("graphics/pokemon/anim_front_pics/slowpoke_front_pic.4bpp.lz");
const u32 gMonFrontPic_Slowbro[] = INCBIN_U32("graphics/pokemon/anim_front_pics/slowbro_front_pic.4bpp.lz");
const u32 gMonFrontPic_Magnemite[] = INCBIN_U32("graphics/pokemon/anim_front_pics/magnemite_front_pic.4bpp.lz");
const u32 gMonFrontPic_Magneton[] = INCBIN_U32("graphics/pokemon/anim_front_pics/magneton_front_pic.4bpp.lz");
const u32 gMonFrontPic_Farfetchd[] = INCBIN_U32("graphics/pokemon/anim_front_pics/farfetch_d_front_pic.4bpp.lz");
const u32 gMonFrontPic_Doduo[] = INCBIN_U32("graphics/pokemon/anim_front_pics/doduo_front_pic.4bpp.lz");
const u32 gMonFrontPic_Dodrio[] = INCBIN_U32("graphics/pokemon/anim_front_pics/dodrio_front_pic.4bpp.lz");
const u32 gMonFrontPic_Seel[] = INCBIN_U32("graphics/pokemon/anim_front_pics/seel_front_pic.4bpp.lz");
const u32 gMonFrontPic_Dewgong[] = INCBIN_U32("graphics/pokemon/anim_front_pics/dewgong_front_pic.4bpp.lz");
const u32 gMonFrontPic_Grimer[] = INCBIN_U32("graphics/pokemon/anim_front_pics/grimer_front_pic.4bpp.lz");
const u32 gMonFrontPic_Muk[] = INCBIN_U32("graphics/pokemon/anim_front_pics/muk_front_pic.4bpp.lz");
const u32 gMonFrontPic_Shellder[] = INCBIN_U32("graphics/pokemon/anim_front_pics/shellder_front_pic.4bpp.lz");
const u32 gMonFrontPic_Cloyster[] = INCBIN_U32("graphics/pokemon/anim_front_pics/cloyster_front_pic.4bpp.lz");
const u32 gMonFrontPic_Gastly[] = INCBIN_U32("graphics/pokemon/anim_front_pics/gastly_front_pic.4bpp.lz");
const u32 gMonFrontPic_Haunter[] = INCBIN_U32("graphics/pokemon/anim_front_pics/haunter_front_pic.4bpp.lz");
const u32 gMonFrontPic_Gengar[] = INCBIN_U32("graphics/pokemon/anim_front_pics/gengar_front_pic.4bpp.lz");
const u32 gMonFrontPic_Onix[] = INCBIN_U32("graphics/pokemon/anim_front_pics/onix_front_pic.4bpp.lz");
const u32 gMonFrontPic_Drowzee[] = INCBIN_U32("graphics/pokemon/anim_front_pics/drowzee_front_pic.4bpp.lz");
const u32 gMonFrontPic_Hypno[] = INCBIN_U32("graphics/pokemon/anim_front_pics/hypno_front_pic.4bpp.lz");
const u32 gMonFrontPic_Krabby[] = INCBIN_U32("graphics/pokemon/anim_front_pics/krabby_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kingler[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kingler_front_pic.4bpp.lz");
const u32 gMonFrontPic_Voltorb[] = INCBIN_U32("graphics/pokemon/anim_front_pics/voltorb_front_pic.4bpp.lz");
const u32 gMonFrontPic_Electrode[] = INCBIN_U32("graphics/pokemon/anim_front_pics/electrode_front_pic.4bpp.lz");
const u32 gMonFrontPic_Exeggcute[] = INCBIN_U32("graphics/pokemon/anim_front_pics/exeggcute_front_pic.4bpp.lz");
const u32 gMonFrontPic_Exeggutor[] = INCBIN_U32("graphics/pokemon/anim_front_pics/exeggutor_front_pic.4bpp.lz");
const u32 gMonFrontPic_Cubone[] = INCBIN_U32("graphics/pokemon/anim_front_pics/cubone_front_pic.4bpp.lz");
const u32 gMonFrontPic_Marowak[] = INCBIN_U32("graphics/pokemon/anim_front_pics/marowak_front_pic.4bpp.lz");
const u32 gMonFrontPic_Hitmonlee[] = INCBIN_U32("graphics/pokemon/anim_front_pics/hitmonlee_front_pic.4bpp.lz");
const u32 gMonFrontPic_Hitmonchan[] = INCBIN_U32("graphics/pokemon/anim_front_pics/hitmonchan_front_pic.4bpp.lz");
const u32 gMonFrontPic_Lickitung[] = INCBIN_U32("graphics/pokemon/anim_front_pics/lickitung_front_pic.4bpp.lz");
const u32 gMonFrontPic_Koffing[] = INCBIN_U32("graphics/pokemon/anim_front_pics/koffing_front_pic.4bpp.lz");
const u32 gMonFrontPic_Weezing[] = INCBIN_U32("graphics/pokemon/anim_front_pics/weezing_front_pic.4bpp.lz");
const u32 gMonFrontPic_Rhyhorn[] = INCBIN_U32("graphics/pokemon/anim_front_pics/rhyhorn_front_pic.4bpp.lz");
const u32 gMonFrontPic_Rhydon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/rhydon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Chansey[] = INCBIN_U32("graphics/pokemon/anim_front_pics/chansey_front_pic.4bpp.lz");
const u32 gMonFrontPic_Tangela[] = INCBIN_U32("graphics/pokemon/anim_front_pics/tangela_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kangaskhan[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kangaskhan_front_pic.4bpp.lz");
const u32 gMonFrontPic_Horsea[] = INCBIN_U32("graphics/pokemon/anim_front_pics/horsea_front_pic.4bpp.lz");
const u32 gMonFrontPic_Seadra[] = INCBIN_U32("graphics/pokemon/anim_front_pics/seadra_front_pic.4bpp.lz");
const u32 gMonFrontPic_Goldeen[] = INCBIN_U32("graphics/pokemon/anim_front_pics/goldeen_front_pic.4bpp.lz");
const u32 gMonFrontPic_Seaking[] = INCBIN_U32("graphics/pokemon/anim_front_pics/seaking_front_pic.4bpp.lz");
const u32 gMonFrontPic_Staryu[] = INCBIN_U32("graphics/pokemon/anim_front_pics/staryu_front_pic.4bpp.lz");
const u32 gMonFrontPic_Starmie[] = INCBIN_U32("graphics/pokemon/anim_front_pics/starmie_front_pic.4bpp.lz");
const u32 gMonFrontPic_Mrmime[] = INCBIN_U32("graphics/pokemon/anim_front_pics/mr_mime_front_pic.4bpp.lz");
const u32 gMonFrontPic_Scyther[] = INCBIN_U32("graphics/pokemon/anim_front_pics/scyther_front_pic.4bpp.lz");
const u32 gMonFrontPic_Jynx[] = INCBIN_U32("graphics/pokemon/anim_front_pics/jynx_front_pic.4bpp.lz");
const u32 gMonFrontPic_Electabuzz[] = INCBIN_U32("graphics/pokemon/anim_front_pics/electabuzz_front_pic.4bpp.lz");
const u32 gMonFrontPic_Magmar[] = INCBIN_U32("graphics/pokemon/anim_front_pics/magmar_front_pic.4bpp.lz");
const u32 gMonFrontPic_Pinsir[] = INCBIN_U32("graphics/pokemon/anim_front_pics/pinsir_front_pic.4bpp.lz");
const u32 gMonFrontPic_Tauros[] = INCBIN_U32("graphics/pokemon/anim_front_pics/tauros_front_pic.4bpp.lz");
const u32 gMonFrontPic_Magikarp[] = INCBIN_U32("graphics/pokemon/anim_front_pics/magikarp_front_pic.4bpp.lz");
const u32 gMonFrontPic_Gyarados[] = INCBIN_U32("graphics/pokemon/anim_front_pics/gyarados_front_pic.4bpp.lz");
const u32 gMonFrontPic_Lapras[] = INCBIN_U32("graphics/pokemon/anim_front_pics/lapras_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ditto[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ditto_front_pic.4bpp.lz");
const u32 gMonFrontPic_Eevee[] = INCBIN_U32("graphics/pokemon/anim_front_pics/eevee_front_pic.4bpp.lz");
const u32 gMonFrontPic_Vaporeon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/vaporeon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Jolteon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/jolteon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Flareon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/flareon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Porygon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/porygon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Omanyte[] = INCBIN_U32("graphics/pokemon/anim_front_pics/omanyte_front_pic.4bpp.lz");
const u32 gMonFrontPic_Omastar[] = INCBIN_U32("graphics/pokemon/anim_front_pics/omastar_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kabuto[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kabuto_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kabutops[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kabutops_front_pic.4bpp.lz");
const u32 gMonFrontPic_Aerodactyl[] = INCBIN_U32("graphics/pokemon/anim_front_pics/aerodactyl_front_pic.4bpp.lz");
const u32 gMonFrontPic_Snorlax[] = INCBIN_U32("graphics/pokemon/anim_front_pics/snorlax_front_pic.4bpp.lz");
const u32 gMonFrontPic_Articuno[] = INCBIN_U32("graphics/pokemon/anim_front_pics/articuno_front_pic.4bpp.lz");
const u32 gMonFrontPic_Zapdos[] = INCBIN_U32("graphics/pokemon/anim_front_pics/zapdos_front_pic.4bpp.lz");
const u32 gMonFrontPic_Moltres[] = INCBIN_U32("graphics/pokemon/anim_front_pics/moltres_front_pic.4bpp.lz");
const u32 gMonFrontPic_Dratini[] = INCBIN_U32("graphics/pokemon/anim_front_pics/dratini_front_pic.4bpp.lz");
const u32 gMonFrontPic_Dragonair[] = INCBIN_U32("graphics/pokemon/anim_front_pics/dragonair_front_pic.4bpp.lz");
const u32 gMonFrontPic_Dragonite[] = INCBIN_U32("graphics/pokemon/anim_front_pics/dragonite_front_pic.4bpp.lz");
const u32 gMonFrontPic_Mewtwo[] = INCBIN_U32("graphics/pokemon/anim_front_pics/mewtwo_front_pic.4bpp.lz");
const u32 gMonFrontPic_Mew[] = INCBIN_U32("graphics/pokemon/anim_front_pics/mew_front_pic.4bpp.lz");
const u32 gMonFrontPic_Bulbasaur[] = INCBIN_U32("graphics/pokemon/bulbasaur/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ivysaur[] = INCBIN_U32("graphics/pokemon/ivysaur/anim_front.4bpp.lz");
const u32 gMonFrontPic_Venusaur[] = INCBIN_U32("graphics/pokemon/venusaur/anim_front.4bpp.lz");
const u32 gMonFrontPic_Charmander[] = INCBIN_U32("graphics/pokemon/charmander/anim_front.4bpp.lz");
const u32 gMonFrontPic_Charmeleon[] = INCBIN_U32("graphics/pokemon/charmeleon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Charizard[] = INCBIN_U32("graphics/pokemon/charizard/anim_front.4bpp.lz");
const u32 gMonFrontPic_Squirtle[] = INCBIN_U32("graphics/pokemon/squirtle/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wartortle[] = INCBIN_U32("graphics/pokemon/wartortle/anim_front.4bpp.lz");
const u32 gMonFrontPic_Blastoise[] = INCBIN_U32("graphics/pokemon/blastoise/anim_front.4bpp.lz");
const u32 gMonFrontPic_Caterpie[] = INCBIN_U32("graphics/pokemon/caterpie/anim_front.4bpp.lz");
const u32 gMonFrontPic_Metapod[] = INCBIN_U32("graphics/pokemon/metapod/anim_front.4bpp.lz");
const u32 gMonFrontPic_Butterfree[] = INCBIN_U32("graphics/pokemon/butterfree/anim_front.4bpp.lz");
const u32 gMonFrontPic_Weedle[] = INCBIN_U32("graphics/pokemon/weedle/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kakuna[] = INCBIN_U32("graphics/pokemon/kakuna/anim_front.4bpp.lz");
const u32 gMonFrontPic_Beedrill[] = INCBIN_U32("graphics/pokemon/beedrill/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pidgey[] = INCBIN_U32("graphics/pokemon/pidgey/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pidgeotto[] = INCBIN_U32("graphics/pokemon/pidgeotto/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pidgeot[] = INCBIN_U32("graphics/pokemon/pidgeot/anim_front.4bpp.lz");
const u32 gMonFrontPic_Rattata[] = INCBIN_U32("graphics/pokemon/rattata/anim_front.4bpp.lz");
const u32 gMonFrontPic_Raticate[] = INCBIN_U32("graphics/pokemon/raticate/anim_front.4bpp.lz");
const u32 gMonFrontPic_Spearow[] = INCBIN_U32("graphics/pokemon/spearow/anim_front.4bpp.lz");
const u32 gMonFrontPic_Fearow[] = INCBIN_U32("graphics/pokemon/fearow/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ekans[] = INCBIN_U32("graphics/pokemon/ekans/anim_front.4bpp.lz");
const u32 gMonFrontPic_Arbok[] = INCBIN_U32("graphics/pokemon/arbok/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pikachu[] = INCBIN_U32("graphics/pokemon/pikachu/anim_front.4bpp.lz");
const u32 gMonFrontPic_Raichu[] = INCBIN_U32("graphics/pokemon/raichu/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sandshrew[] = INCBIN_U32("graphics/pokemon/sandshrew/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sandslash[] = INCBIN_U32("graphics/pokemon/sandslash/anim_front.4bpp.lz");
const u32 gMonFrontPic_NidoranF[] = INCBIN_U32("graphics/pokemon/nidoran_f/anim_front.4bpp.lz");
const u32 gMonFrontPic_Nidorina[] = INCBIN_U32("graphics/pokemon/nidorina/anim_front.4bpp.lz");
const u32 gMonFrontPic_Nidoqueen[] = INCBIN_U32("graphics/pokemon/nidoqueen/anim_front.4bpp.lz");
const u32 gMonFrontPic_NidoranM[] = INCBIN_U32("graphics/pokemon/nidoran_m/anim_front.4bpp.lz");
const u32 gMonFrontPic_Nidorino[] = INCBIN_U32("graphics/pokemon/nidorino/anim_front.4bpp.lz");
const u32 gMonFrontPic_Nidoking[] = INCBIN_U32("graphics/pokemon/nidoking/anim_front.4bpp.lz");
const u32 gMonFrontPic_Clefairy[] = INCBIN_U32("graphics/pokemon/clefairy/anim_front.4bpp.lz");
const u32 gMonFrontPic_Clefable[] = INCBIN_U32("graphics/pokemon/clefable/anim_front.4bpp.lz");
const u32 gMonFrontPic_Vulpix[] = INCBIN_U32("graphics/pokemon/vulpix/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ninetales[] = INCBIN_U32("graphics/pokemon/ninetales/anim_front.4bpp.lz");
const u32 gMonFrontPic_Jigglypuff[] = INCBIN_U32("graphics/pokemon/jigglypuff/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wigglytuff[] = INCBIN_U32("graphics/pokemon/wigglytuff/anim_front.4bpp.lz");
const u32 gMonFrontPic_Zubat[] = INCBIN_U32("graphics/pokemon/zubat/anim_front.4bpp.lz");
const u32 gMonFrontPic_Golbat[] = INCBIN_U32("graphics/pokemon/golbat/anim_front.4bpp.lz");
const u32 gMonFrontPic_Oddish[] = INCBIN_U32("graphics/pokemon/oddish/anim_front.4bpp.lz");
const u32 gMonFrontPic_Gloom[] = INCBIN_U32("graphics/pokemon/gloom/anim_front.4bpp.lz");
const u32 gMonFrontPic_Vileplume[] = INCBIN_U32("graphics/pokemon/vileplume/anim_front.4bpp.lz");
const u32 gMonFrontPic_Paras[] = INCBIN_U32("graphics/pokemon/paras/anim_front.4bpp.lz");
const u32 gMonFrontPic_Parasect[] = INCBIN_U32("graphics/pokemon/parasect/anim_front.4bpp.lz");
const u32 gMonFrontPic_Venonat[] = INCBIN_U32("graphics/pokemon/venonat/anim_front.4bpp.lz");
const u32 gMonFrontPic_Venomoth[] = INCBIN_U32("graphics/pokemon/venomoth/anim_front.4bpp.lz");
const u32 gMonFrontPic_Diglett[] = INCBIN_U32("graphics/pokemon/diglett/anim_front.4bpp.lz");
const u32 gMonFrontPic_Dugtrio[] = INCBIN_U32("graphics/pokemon/dugtrio/anim_front.4bpp.lz");
const u32 gMonFrontPic_Meowth[] = INCBIN_U32("graphics/pokemon/meowth/anim_front.4bpp.lz");
const u32 gMonFrontPic_Persian[] = INCBIN_U32("graphics/pokemon/persian/anim_front.4bpp.lz");
const u32 gMonFrontPic_Psyduck[] = INCBIN_U32("graphics/pokemon/psyduck/anim_front.4bpp.lz");
const u32 gMonFrontPic_Golduck[] = INCBIN_U32("graphics/pokemon/golduck/anim_front.4bpp.lz");
const u32 gMonFrontPic_Mankey[] = INCBIN_U32("graphics/pokemon/mankey/anim_front.4bpp.lz");
const u32 gMonFrontPic_Primeape[] = INCBIN_U32("graphics/pokemon/primeape/anim_front.4bpp.lz");
const u32 gMonFrontPic_Growlithe[] = INCBIN_U32("graphics/pokemon/growlithe/anim_front.4bpp.lz");
const u32 gMonFrontPic_Arcanine[] = INCBIN_U32("graphics/pokemon/arcanine/anim_front.4bpp.lz");
const u32 gMonFrontPic_Poliwag[] = INCBIN_U32("graphics/pokemon/poliwag/anim_front.4bpp.lz");
const u32 gMonFrontPic_Poliwhirl[] = INCBIN_U32("graphics/pokemon/poliwhirl/anim_front.4bpp.lz");
const u32 gMonFrontPic_Poliwrath[] = INCBIN_U32("graphics/pokemon/poliwrath/anim_front.4bpp.lz");
const u32 gMonFrontPic_Abra[] = INCBIN_U32("graphics/pokemon/abra/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kadabra[] = INCBIN_U32("graphics/pokemon/kadabra/anim_front.4bpp.lz");
const u32 gMonFrontPic_Alakazam[] = INCBIN_U32("graphics/pokemon/alakazam/anim_front.4bpp.lz");
const u32 gMonFrontPic_Machop[] = INCBIN_U32("graphics/pokemon/machop/anim_front.4bpp.lz");
const u32 gMonFrontPic_Machoke[] = INCBIN_U32("graphics/pokemon/machoke/anim_front.4bpp.lz");
const u32 gMonFrontPic_Machamp[] = INCBIN_U32("graphics/pokemon/machamp/anim_front.4bpp.lz");
const u32 gMonFrontPic_Bellsprout[] = INCBIN_U32("graphics/pokemon/bellsprout/anim_front.4bpp.lz");
const u32 gMonFrontPic_Weepinbell[] = INCBIN_U32("graphics/pokemon/weepinbell/anim_front.4bpp.lz");
const u32 gMonFrontPic_Victreebel[] = INCBIN_U32("graphics/pokemon/victreebel/anim_front.4bpp.lz");
const u32 gMonFrontPic_Tentacool[] = INCBIN_U32("graphics/pokemon/tentacool/anim_front.4bpp.lz");
const u32 gMonFrontPic_Tentacruel[] = INCBIN_U32("graphics/pokemon/tentacruel/anim_front.4bpp.lz");
const u32 gMonFrontPic_Geodude[] = INCBIN_U32("graphics/pokemon/geodude/anim_front.4bpp.lz");
const u32 gMonFrontPic_Graveler[] = INCBIN_U32("graphics/pokemon/graveler/anim_front.4bpp.lz");
const u32 gMonFrontPic_Golem[] = INCBIN_U32("graphics/pokemon/golem/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ponyta[] = INCBIN_U32("graphics/pokemon/ponyta/anim_front.4bpp.lz");
const u32 gMonFrontPic_Rapidash[] = INCBIN_U32("graphics/pokemon/rapidash/anim_front.4bpp.lz");
const u32 gMonFrontPic_Slowpoke[] = INCBIN_U32("graphics/pokemon/slowpoke/anim_front.4bpp.lz");
const u32 gMonFrontPic_Slowbro[] = INCBIN_U32("graphics/pokemon/slowbro/anim_front.4bpp.lz");
const u32 gMonFrontPic_Magnemite[] = INCBIN_U32("graphics/pokemon/magnemite/anim_front.4bpp.lz");
const u32 gMonFrontPic_Magneton[] = INCBIN_U32("graphics/pokemon/magneton/anim_front.4bpp.lz");
const u32 gMonFrontPic_Farfetchd[] = INCBIN_U32("graphics/pokemon/farfetch_d/anim_front.4bpp.lz");
const u32 gMonFrontPic_Doduo[] = INCBIN_U32("graphics/pokemon/doduo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Dodrio[] = INCBIN_U32("graphics/pokemon/dodrio/anim_front.4bpp.lz");
const u32 gMonFrontPic_Seel[] = INCBIN_U32("graphics/pokemon/seel/anim_front.4bpp.lz");
const u32 gMonFrontPic_Dewgong[] = INCBIN_U32("graphics/pokemon/dewgong/anim_front.4bpp.lz");
const u32 gMonFrontPic_Grimer[] = INCBIN_U32("graphics/pokemon/grimer/anim_front.4bpp.lz");
const u32 gMonFrontPic_Muk[] = INCBIN_U32("graphics/pokemon/muk/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shellder[] = INCBIN_U32("graphics/pokemon/shellder/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cloyster[] = INCBIN_U32("graphics/pokemon/cloyster/anim_front.4bpp.lz");
const u32 gMonFrontPic_Gastly[] = INCBIN_U32("graphics/pokemon/gastly/anim_front.4bpp.lz");
const u32 gMonFrontPic_Haunter[] = INCBIN_U32("graphics/pokemon/haunter/anim_front.4bpp.lz");
const u32 gMonFrontPic_Gengar[] = INCBIN_U32("graphics/pokemon/gengar/anim_front.4bpp.lz");
const u32 gMonFrontPic_Onix[] = INCBIN_U32("graphics/pokemon/onix/anim_front.4bpp.lz");
const u32 gMonFrontPic_Drowzee[] = INCBIN_U32("graphics/pokemon/drowzee/anim_front.4bpp.lz");
const u32 gMonFrontPic_Hypno[] = INCBIN_U32("graphics/pokemon/hypno/anim_front.4bpp.lz");
const u32 gMonFrontPic_Krabby[] = INCBIN_U32("graphics/pokemon/krabby/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kingler[] = INCBIN_U32("graphics/pokemon/kingler/anim_front.4bpp.lz");
const u32 gMonFrontPic_Voltorb[] = INCBIN_U32("graphics/pokemon/voltorb/anim_front.4bpp.lz");
const u32 gMonFrontPic_Electrode[] = INCBIN_U32("graphics/pokemon/electrode/anim_front.4bpp.lz");
const u32 gMonFrontPic_Exeggcute[] = INCBIN_U32("graphics/pokemon/exeggcute/anim_front.4bpp.lz");
const u32 gMonFrontPic_Exeggutor[] = INCBIN_U32("graphics/pokemon/exeggutor/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cubone[] = INCBIN_U32("graphics/pokemon/cubone/anim_front.4bpp.lz");
const u32 gMonFrontPic_Marowak[] = INCBIN_U32("graphics/pokemon/marowak/anim_front.4bpp.lz");
const u32 gMonFrontPic_Hitmonlee[] = INCBIN_U32("graphics/pokemon/hitmonlee/anim_front.4bpp.lz");
const u32 gMonFrontPic_Hitmonchan[] = INCBIN_U32("graphics/pokemon/hitmonchan/anim_front.4bpp.lz");
const u32 gMonFrontPic_Lickitung[] = INCBIN_U32("graphics/pokemon/lickitung/anim_front.4bpp.lz");
const u32 gMonFrontPic_Koffing[] = INCBIN_U32("graphics/pokemon/koffing/anim_front.4bpp.lz");
const u32 gMonFrontPic_Weezing[] = INCBIN_U32("graphics/pokemon/weezing/anim_front.4bpp.lz");
const u32 gMonFrontPic_Rhyhorn[] = INCBIN_U32("graphics/pokemon/rhyhorn/anim_front.4bpp.lz");
const u32 gMonFrontPic_Rhydon[] = INCBIN_U32("graphics/pokemon/rhydon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Chansey[] = INCBIN_U32("graphics/pokemon/chansey/anim_front.4bpp.lz");
const u32 gMonFrontPic_Tangela[] = INCBIN_U32("graphics/pokemon/tangela/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kangaskhan[] = INCBIN_U32("graphics/pokemon/kangaskhan/anim_front.4bpp.lz");
const u32 gMonFrontPic_Horsea[] = INCBIN_U32("graphics/pokemon/horsea/anim_front.4bpp.lz");
const u32 gMonFrontPic_Seadra[] = INCBIN_U32("graphics/pokemon/seadra/anim_front.4bpp.lz");
const u32 gMonFrontPic_Goldeen[] = INCBIN_U32("graphics/pokemon/goldeen/anim_front.4bpp.lz");
const u32 gMonFrontPic_Seaking[] = INCBIN_U32("graphics/pokemon/seaking/anim_front.4bpp.lz");
const u32 gMonFrontPic_Staryu[] = INCBIN_U32("graphics/pokemon/staryu/anim_front.4bpp.lz");
const u32 gMonFrontPic_Starmie[] = INCBIN_U32("graphics/pokemon/starmie/anim_front.4bpp.lz");
const u32 gMonFrontPic_Mrmime[] = INCBIN_U32("graphics/pokemon/mr_mime/anim_front.4bpp.lz");
const u32 gMonFrontPic_Scyther[] = INCBIN_U32("graphics/pokemon/scyther/anim_front.4bpp.lz");
const u32 gMonFrontPic_Jynx[] = INCBIN_U32("graphics/pokemon/jynx/anim_front.4bpp.lz");
const u32 gMonFrontPic_Electabuzz[] = INCBIN_U32("graphics/pokemon/electabuzz/anim_front.4bpp.lz");
const u32 gMonFrontPic_Magmar[] = INCBIN_U32("graphics/pokemon/magmar/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pinsir[] = INCBIN_U32("graphics/pokemon/pinsir/anim_front.4bpp.lz");
const u32 gMonFrontPic_Tauros[] = INCBIN_U32("graphics/pokemon/tauros/anim_front.4bpp.lz");
const u32 gMonFrontPic_Magikarp[] = INCBIN_U32("graphics/pokemon/magikarp/anim_front.4bpp.lz");
const u32 gMonFrontPic_Gyarados[] = INCBIN_U32("graphics/pokemon/gyarados/anim_front.4bpp.lz");
const u32 gMonFrontPic_Lapras[] = INCBIN_U32("graphics/pokemon/lapras/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ditto[] = INCBIN_U32("graphics/pokemon/ditto/anim_front.4bpp.lz");
const u32 gMonFrontPic_Eevee[] = INCBIN_U32("graphics/pokemon/eevee/anim_front.4bpp.lz");
const u32 gMonFrontPic_Vaporeon[] = INCBIN_U32("graphics/pokemon/vaporeon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Jolteon[] = INCBIN_U32("graphics/pokemon/jolteon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Flareon[] = INCBIN_U32("graphics/pokemon/flareon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Porygon[] = INCBIN_U32("graphics/pokemon/porygon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Omanyte[] = INCBIN_U32("graphics/pokemon/omanyte/anim_front.4bpp.lz");
const u32 gMonFrontPic_Omastar[] = INCBIN_U32("graphics/pokemon/omastar/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kabuto[] = INCBIN_U32("graphics/pokemon/kabuto/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kabutops[] = INCBIN_U32("graphics/pokemon/kabutops/anim_front.4bpp.lz");
const u32 gMonFrontPic_Aerodactyl[] = INCBIN_U32("graphics/pokemon/aerodactyl/anim_front.4bpp.lz");
const u32 gMonFrontPic_Snorlax[] = INCBIN_U32("graphics/pokemon/snorlax/anim_front.4bpp.lz");
const u32 gMonFrontPic_Articuno[] = INCBIN_U32("graphics/pokemon/articuno/anim_front.4bpp.lz");
const u32 gMonFrontPic_Zapdos[] = INCBIN_U32("graphics/pokemon/zapdos/anim_front.4bpp.lz");
const u32 gMonFrontPic_Moltres[] = INCBIN_U32("graphics/pokemon/moltres/anim_front.4bpp.lz");
const u32 gMonFrontPic_Dratini[] = INCBIN_U32("graphics/pokemon/dratini/anim_front.4bpp.lz");
const u32 gMonFrontPic_Dragonair[] = INCBIN_U32("graphics/pokemon/dragonair/anim_front.4bpp.lz");
const u32 gMonFrontPic_Dragonite[] = INCBIN_U32("graphics/pokemon/dragonite/anim_front.4bpp.lz");
const u32 gMonFrontPic_Mewtwo[] = INCBIN_U32("graphics/pokemon/mewtwo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Mew[] = INCBIN_U32("graphics/pokemon/mew/anim_front.4bpp.lz");
const u32 gMonFrontPic_Chikorita[] = INCBIN_U32("graphics/pokemon/anim_front_pics/chikorita_front_pic.4bpp.lz");
const u32 gMonFrontPic_Bayleef[] = INCBIN_U32("graphics/pokemon/anim_front_pics/bayleef_front_pic.4bpp.lz");
const u32 gMonFrontPic_Meganium[] = INCBIN_U32("graphics/pokemon/anim_front_pics/meganium_front_pic.4bpp.lz");
const u32 gMonFrontPic_Cyndaquil[] = INCBIN_U32("graphics/pokemon/anim_front_pics/cyndaquil_front_pic.4bpp.lz");
const u32 gMonFrontPic_Quilava[] = INCBIN_U32("graphics/pokemon/anim_front_pics/quilava_front_pic.4bpp.lz");
const u32 gMonFrontPic_Typhlosion[] = INCBIN_U32("graphics/pokemon/anim_front_pics/typhlosion_front_pic.4bpp.lz");
const u32 gMonFrontPic_Totodile[] = INCBIN_U32("graphics/pokemon/anim_front_pics/totodile_front_pic.4bpp.lz");
const u32 gMonFrontPic_Croconaw[] = INCBIN_U32("graphics/pokemon/anim_front_pics/croconaw_front_pic.4bpp.lz");
const u32 gMonFrontPic_Feraligatr[] = INCBIN_U32("graphics/pokemon/anim_front_pics/feraligatr_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sentret[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sentret_front_pic.4bpp.lz");
const u32 gMonFrontPic_Furret[] = INCBIN_U32("graphics/pokemon/anim_front_pics/furret_front_pic.4bpp.lz");
const u32 gMonFrontPic_Hoothoot[] = INCBIN_U32("graphics/pokemon/anim_front_pics/hoothoot_front_pic.4bpp.lz");
const u32 gMonFrontPic_Noctowl[] = INCBIN_U32("graphics/pokemon/anim_front_pics/noctowl_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ledyba[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ledyba_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ledian[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ledian_front_pic.4bpp.lz");
const u32 gMonFrontPic_Spinarak[] = INCBIN_U32("graphics/pokemon/anim_front_pics/spinarak_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ariados[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ariados_front_pic.4bpp.lz");
const u32 gMonFrontPic_Crobat[] = INCBIN_U32("graphics/pokemon/anim_front_pics/crobat_front_pic.4bpp.lz");
const u32 gMonFrontPic_Chinchou[] = INCBIN_U32("graphics/pokemon/anim_front_pics/chinchou_front_pic.4bpp.lz");
const u32 gMonFrontPic_Lanturn[] = INCBIN_U32("graphics/pokemon/anim_front_pics/lanturn_front_pic.4bpp.lz");
const u32 gMonFrontPic_Pichu[] = INCBIN_U32("graphics/pokemon/anim_front_pics/pichu_front_pic.4bpp.lz");
const u32 gMonFrontPic_Cleffa[] = INCBIN_U32("graphics/pokemon/anim_front_pics/cleffa_front_pic.4bpp.lz");
const u32 gMonFrontPic_Igglybuff[] = INCBIN_U32("graphics/pokemon/anim_front_pics/igglybuff_front_pic.4bpp.lz");
const u32 gMonFrontPic_Togepi[] = INCBIN_U32("graphics/pokemon/anim_front_pics/togepi_front_pic.4bpp.lz");
const u32 gMonFrontPic_Togetic[] = INCBIN_U32("graphics/pokemon/anim_front_pics/togetic_front_pic.4bpp.lz");
const u32 gMonFrontPic_Natu[] = INCBIN_U32("graphics/pokemon/anim_front_pics/natu_front_pic.4bpp.lz");
const u32 gMonFrontPic_Xatu[] = INCBIN_U32("graphics/pokemon/anim_front_pics/xatu_front_pic.4bpp.lz");
const u32 gMonFrontPic_Mareep[] = INCBIN_U32("graphics/pokemon/anim_front_pics/mareep_front_pic.4bpp.lz");
const u32 gMonFrontPic_Flaaffy[] = INCBIN_U32("graphics/pokemon/anim_front_pics/flaaffy_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ampharos[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ampharos_front_pic.4bpp.lz");
const u32 gMonFrontPic_Bellossom[] = INCBIN_U32("graphics/pokemon/anim_front_pics/bellossom_front_pic.4bpp.lz");
const u32 gMonFrontPic_Marill[] = INCBIN_U32("graphics/pokemon/anim_front_pics/marill_front_pic.4bpp.lz");
const u32 gMonFrontPic_Azumarill[] = INCBIN_U32("graphics/pokemon/anim_front_pics/azumarill_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sudowoodo[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sudowoodo_front_pic.4bpp.lz");
const u32 gMonFrontPic_Politoed[] = INCBIN_U32("graphics/pokemon/anim_front_pics/politoed_front_pic.4bpp.lz");
const u32 gMonFrontPic_Hoppip[] = INCBIN_U32("graphics/pokemon/anim_front_pics/hoppip_front_pic.4bpp.lz");
const u32 gMonFrontPic_Skiploom[] = INCBIN_U32("graphics/pokemon/anim_front_pics/skiploom_front_pic.4bpp.lz");
const u32 gMonFrontPic_Jumpluff[] = INCBIN_U32("graphics/pokemon/anim_front_pics/jumpluff_front_pic.4bpp.lz");
const u32 gMonFrontPic_Aipom[] = INCBIN_U32("graphics/pokemon/anim_front_pics/aipom_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sunkern[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sunkern_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sunflora[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sunflora_front_pic.4bpp.lz");
const u32 gMonFrontPic_Yanma[] = INCBIN_U32("graphics/pokemon/anim_front_pics/yanma_front_pic.4bpp.lz");
const u32 gMonFrontPic_Wooper[] = INCBIN_U32("graphics/pokemon/anim_front_pics/wooper_front_pic.4bpp.lz");
const u32 gMonFrontPic_Quagsire[] = INCBIN_U32("graphics/pokemon/anim_front_pics/quagsire_front_pic.4bpp.lz");
const u32 gMonFrontPic_Espeon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/espeon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Umbreon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/umbreon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Murkrow[] = INCBIN_U32("graphics/pokemon/anim_front_pics/murkrow_front_pic.4bpp.lz");
const u32 gMonFrontPic_Slowking[] = INCBIN_U32("graphics/pokemon/anim_front_pics/slowking_front_pic.4bpp.lz");
const u32 gMonFrontPic_Misdreavus[] = INCBIN_U32("graphics/pokemon/anim_front_pics/misdreavus_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownA[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_a_front_pic.4bpp.lz");
const u32 gMonFrontPic_Wobbuffet[] = INCBIN_U32("graphics/pokemon/anim_front_pics/wobbuffet_front_pic.4bpp.lz");
const u32 gMonFrontPic_Girafarig[] = INCBIN_U32("graphics/pokemon/anim_front_pics/girafarig_front_pic.4bpp.lz");
const u32 gMonFrontPic_Pineco[] = INCBIN_U32("graphics/pokemon/anim_front_pics/pineco_front_pic.4bpp.lz");
const u32 gMonFrontPic_Forretress[] = INCBIN_U32("graphics/pokemon/anim_front_pics/forretress_front_pic.4bpp.lz");
const u32 gMonFrontPic_Dunsparce[] = INCBIN_U32("graphics/pokemon/anim_front_pics/dunsparce_front_pic.4bpp.lz");
const u32 gMonFrontPic_Gligar[] = INCBIN_U32("graphics/pokemon/anim_front_pics/gligar_front_pic.4bpp.lz");
const u32 gMonFrontPic_Steelix[] = INCBIN_U32("graphics/pokemon/anim_front_pics/steelix_front_pic.4bpp.lz");
const u32 gMonFrontPic_Snubbull[] = INCBIN_U32("graphics/pokemon/anim_front_pics/snubbull_front_pic.4bpp.lz");
const u32 gMonFrontPic_Granbull[] = INCBIN_U32("graphics/pokemon/anim_front_pics/granbull_front_pic.4bpp.lz");
const u32 gMonFrontPic_Qwilfish[] = INCBIN_U32("graphics/pokemon/anim_front_pics/qwilfish_front_pic.4bpp.lz");
const u32 gMonFrontPic_Scizor[] = INCBIN_U32("graphics/pokemon/anim_front_pics/scizor_front_pic.4bpp.lz");
const u32 gMonFrontPic_Shuckle[] = INCBIN_U32("graphics/pokemon/anim_front_pics/shuckle_front_pic.4bpp.lz");
const u32 gMonFrontPic_Heracross[] = INCBIN_U32("graphics/pokemon/anim_front_pics/heracross_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sneasel[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sneasel_front_pic.4bpp.lz");
const u32 gMonFrontPic_Teddiursa[] = INCBIN_U32("graphics/pokemon/anim_front_pics/teddiursa_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ursaring[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ursaring_front_pic.4bpp.lz");
const u32 gMonFrontPic_Slugma[] = INCBIN_U32("graphics/pokemon/anim_front_pics/slugma_front_pic.4bpp.lz");
const u32 gMonFrontPic_Magcargo[] = INCBIN_U32("graphics/pokemon/anim_front_pics/magcargo_front_pic.4bpp.lz");
const u32 gMonFrontPic_Swinub[] = INCBIN_U32("graphics/pokemon/anim_front_pics/swinub_front_pic.4bpp.lz");
const u32 gMonFrontPic_Piloswine[] = INCBIN_U32("graphics/pokemon/anim_front_pics/piloswine_front_pic.4bpp.lz");
const u32 gMonFrontPic_Corsola[] = INCBIN_U32("graphics/pokemon/anim_front_pics/corsola_front_pic.4bpp.lz");
const u32 gMonFrontPic_Remoraid[] = INCBIN_U32("graphics/pokemon/anim_front_pics/remoraid_front_pic.4bpp.lz");
const u32 gMonFrontPic_Octillery[] = INCBIN_U32("graphics/pokemon/anim_front_pics/octillery_front_pic.4bpp.lz");
const u32 gMonFrontPic_Delibird[] = INCBIN_U32("graphics/pokemon/anim_front_pics/delibird_front_pic.4bpp.lz");
const u32 gMonFrontPic_Mantine[] = INCBIN_U32("graphics/pokemon/anim_front_pics/mantine_front_pic.4bpp.lz");
const u32 gMonFrontPic_Skarmory[] = INCBIN_U32("graphics/pokemon/anim_front_pics/skarmory_front_pic.4bpp.lz");
const u32 gMonFrontPic_Houndour[] = INCBIN_U32("graphics/pokemon/anim_front_pics/houndour_front_pic.4bpp.lz");
const u32 gMonFrontPic_Houndoom[] = INCBIN_U32("graphics/pokemon/anim_front_pics/houndoom_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kingdra[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kingdra_front_pic.4bpp.lz");
const u32 gMonFrontPic_Phanpy[] = INCBIN_U32("graphics/pokemon/anim_front_pics/phanpy_front_pic.4bpp.lz");
const u32 gMonFrontPic_Donphan[] = INCBIN_U32("graphics/pokemon/anim_front_pics/donphan_front_pic.4bpp.lz");
const u32 gMonFrontPic_Porygon2[] = INCBIN_U32("graphics/pokemon/anim_front_pics/porygon2_front_pic.4bpp.lz");
const u32 gMonFrontPic_Stantler[] = INCBIN_U32("graphics/pokemon/anim_front_pics/stantler_front_pic.4bpp.lz");
const u32 gMonFrontPic_Smeargle[] = INCBIN_U32("graphics/pokemon/anim_front_pics/smeargle_front_pic.4bpp.lz");
const u32 gMonFrontPic_Tyrogue[] = INCBIN_U32("graphics/pokemon/anim_front_pics/tyrogue_front_pic.4bpp.lz");
const u32 gMonFrontPic_Hitmontop[] = INCBIN_U32("graphics/pokemon/anim_front_pics/hitmontop_front_pic.4bpp.lz");
const u32 gMonFrontPic_Smoochum[] = INCBIN_U32("graphics/pokemon/anim_front_pics/smoochum_front_pic.4bpp.lz");
const u32 gMonFrontPic_Elekid[] = INCBIN_U32("graphics/pokemon/anim_front_pics/elekid_front_pic.4bpp.lz");
const u32 gMonFrontPic_Magby[] = INCBIN_U32("graphics/pokemon/anim_front_pics/magby_front_pic.4bpp.lz");
const u32 gMonFrontPic_Miltank[] = INCBIN_U32("graphics/pokemon/anim_front_pics/miltank_front_pic.4bpp.lz");
const u32 gMonFrontPic_Blissey[] = INCBIN_U32("graphics/pokemon/anim_front_pics/blissey_front_pic.4bpp.lz");
const u32 gMonFrontPic_Raikou[] = INCBIN_U32("graphics/pokemon/anim_front_pics/raikou_front_pic.4bpp.lz");
const u32 gMonFrontPic_Entei[] = INCBIN_U32("graphics/pokemon/anim_front_pics/entei_front_pic.4bpp.lz");
const u32 gMonFrontPic_Suicune[] = INCBIN_U32("graphics/pokemon/anim_front_pics/suicune_front_pic.4bpp.lz");
const u32 gMonFrontPic_Larvitar[] = INCBIN_U32("graphics/pokemon/anim_front_pics/larvitar_front_pic.4bpp.lz");
const u32 gMonFrontPic_Pupitar[] = INCBIN_U32("graphics/pokemon/anim_front_pics/pupitar_front_pic.4bpp.lz");
const u32 gMonFrontPic_Tyranitar[] = INCBIN_U32("graphics/pokemon/anim_front_pics/tyranitar_front_pic.4bpp.lz");
const u32 gMonFrontPic_Lugia[] = INCBIN_U32("graphics/pokemon/anim_front_pics/lugia_front_pic.4bpp.lz");
const u32 gMonFrontPic_HoOh[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ho_oh_front_pic.4bpp.lz");
const u32 gMonFrontPic_Celebi[] = INCBIN_U32("graphics/pokemon/anim_front_pics/celebi_front_pic.4bpp.lz");
const u32 gMonFrontPic_Chikorita[] = INCBIN_U32("graphics/pokemon/chikorita/anim_front.4bpp.lz");
const u32 gMonFrontPic_Bayleef[] = INCBIN_U32("graphics/pokemon/bayleef/anim_front.4bpp.lz");
const u32 gMonFrontPic_Meganium[] = INCBIN_U32("graphics/pokemon/meganium/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cyndaquil[] = INCBIN_U32("graphics/pokemon/cyndaquil/anim_front.4bpp.lz");
const u32 gMonFrontPic_Quilava[] = INCBIN_U32("graphics/pokemon/quilava/anim_front.4bpp.lz");
const u32 gMonFrontPic_Typhlosion[] = INCBIN_U32("graphics/pokemon/typhlosion/anim_front.4bpp.lz");
const u32 gMonFrontPic_Totodile[] = INCBIN_U32("graphics/pokemon/totodile/anim_front.4bpp.lz");
const u32 gMonFrontPic_Croconaw[] = INCBIN_U32("graphics/pokemon/croconaw/anim_front.4bpp.lz");
const u32 gMonFrontPic_Feraligatr[] = INCBIN_U32("graphics/pokemon/feraligatr/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sentret[] = INCBIN_U32("graphics/pokemon/sentret/anim_front.4bpp.lz");
const u32 gMonFrontPic_Furret[] = INCBIN_U32("graphics/pokemon/furret/anim_front.4bpp.lz");
const u32 gMonFrontPic_Hoothoot[] = INCBIN_U32("graphics/pokemon/hoothoot/anim_front.4bpp.lz");
const u32 gMonFrontPic_Noctowl[] = INCBIN_U32("graphics/pokemon/noctowl/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ledyba[] = INCBIN_U32("graphics/pokemon/ledyba/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ledian[] = INCBIN_U32("graphics/pokemon/ledian/anim_front.4bpp.lz");
const u32 gMonFrontPic_Spinarak[] = INCBIN_U32("graphics/pokemon/spinarak/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ariados[] = INCBIN_U32("graphics/pokemon/ariados/anim_front.4bpp.lz");
const u32 gMonFrontPic_Crobat[] = INCBIN_U32("graphics/pokemon/crobat/anim_front.4bpp.lz");
const u32 gMonFrontPic_Chinchou[] = INCBIN_U32("graphics/pokemon/chinchou/anim_front.4bpp.lz");
const u32 gMonFrontPic_Lanturn[] = INCBIN_U32("graphics/pokemon/lanturn/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pichu[] = INCBIN_U32("graphics/pokemon/pichu/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cleffa[] = INCBIN_U32("graphics/pokemon/cleffa/anim_front.4bpp.lz");
const u32 gMonFrontPic_Igglybuff[] = INCBIN_U32("graphics/pokemon/igglybuff/anim_front.4bpp.lz");
const u32 gMonFrontPic_Togepi[] = INCBIN_U32("graphics/pokemon/togepi/anim_front.4bpp.lz");
const u32 gMonFrontPic_Togetic[] = INCBIN_U32("graphics/pokemon/togetic/anim_front.4bpp.lz");
const u32 gMonFrontPic_Natu[] = INCBIN_U32("graphics/pokemon/natu/anim_front.4bpp.lz");
const u32 gMonFrontPic_Xatu[] = INCBIN_U32("graphics/pokemon/xatu/anim_front.4bpp.lz");
const u32 gMonFrontPic_Mareep[] = INCBIN_U32("graphics/pokemon/mareep/anim_front.4bpp.lz");
const u32 gMonFrontPic_Flaaffy[] = INCBIN_U32("graphics/pokemon/flaaffy/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ampharos[] = INCBIN_U32("graphics/pokemon/ampharos/anim_front.4bpp.lz");
const u32 gMonFrontPic_Bellossom[] = INCBIN_U32("graphics/pokemon/bellossom/anim_front.4bpp.lz");
const u32 gMonFrontPic_Marill[] = INCBIN_U32("graphics/pokemon/marill/anim_front.4bpp.lz");
const u32 gMonFrontPic_Azumarill[] = INCBIN_U32("graphics/pokemon/azumarill/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sudowoodo[] = INCBIN_U32("graphics/pokemon/sudowoodo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Politoed[] = INCBIN_U32("graphics/pokemon/politoed/anim_front.4bpp.lz");
const u32 gMonFrontPic_Hoppip[] = INCBIN_U32("graphics/pokemon/hoppip/anim_front.4bpp.lz");
const u32 gMonFrontPic_Skiploom[] = INCBIN_U32("graphics/pokemon/skiploom/anim_front.4bpp.lz");
const u32 gMonFrontPic_Jumpluff[] = INCBIN_U32("graphics/pokemon/jumpluff/anim_front.4bpp.lz");
const u32 gMonFrontPic_Aipom[] = INCBIN_U32("graphics/pokemon/aipom/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sunkern[] = INCBIN_U32("graphics/pokemon/sunkern/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sunflora[] = INCBIN_U32("graphics/pokemon/sunflora/anim_front.4bpp.lz");
const u32 gMonFrontPic_Yanma[] = INCBIN_U32("graphics/pokemon/yanma/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wooper[] = INCBIN_U32("graphics/pokemon/wooper/anim_front.4bpp.lz");
const u32 gMonFrontPic_Quagsire[] = INCBIN_U32("graphics/pokemon/quagsire/anim_front.4bpp.lz");
const u32 gMonFrontPic_Espeon[] = INCBIN_U32("graphics/pokemon/espeon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Umbreon[] = INCBIN_U32("graphics/pokemon/umbreon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Murkrow[] = INCBIN_U32("graphics/pokemon/murkrow/anim_front.4bpp.lz");
const u32 gMonFrontPic_Slowking[] = INCBIN_U32("graphics/pokemon/slowking/anim_front.4bpp.lz");
const u32 gMonFrontPic_Misdreavus[] = INCBIN_U32("graphics/pokemon/misdreavus/anim_front.4bpp.lz");
const u32 gMonFrontPic_UnownA[] = INCBIN_U32("graphics/pokemon/unown/anim_front_a.4bpp.lz");
const u32 gMonFrontPic_Wobbuffet[] = INCBIN_U32("graphics/pokemon/wobbuffet/anim_front.4bpp.lz");
const u32 gMonFrontPic_Girafarig[] = INCBIN_U32("graphics/pokemon/girafarig/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pineco[] = INCBIN_U32("graphics/pokemon/pineco/anim_front.4bpp.lz");
const u32 gMonFrontPic_Forretress[] = INCBIN_U32("graphics/pokemon/forretress/anim_front.4bpp.lz");
const u32 gMonFrontPic_Dunsparce[] = INCBIN_U32("graphics/pokemon/dunsparce/anim_front.4bpp.lz");
const u32 gMonFrontPic_Gligar[] = INCBIN_U32("graphics/pokemon/gligar/anim_front.4bpp.lz");
const u32 gMonFrontPic_Steelix[] = INCBIN_U32("graphics/pokemon/steelix/anim_front.4bpp.lz");
const u32 gMonFrontPic_Snubbull[] = INCBIN_U32("graphics/pokemon/snubbull/anim_front.4bpp.lz");
const u32 gMonFrontPic_Granbull[] = INCBIN_U32("graphics/pokemon/granbull/anim_front.4bpp.lz");
const u32 gMonFrontPic_Qwilfish[] = INCBIN_U32("graphics/pokemon/qwilfish/anim_front.4bpp.lz");
const u32 gMonFrontPic_Scizor[] = INCBIN_U32("graphics/pokemon/scizor/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shuckle[] = INCBIN_U32("graphics/pokemon/shuckle/anim_front.4bpp.lz");
const u32 gMonFrontPic_Heracross[] = INCBIN_U32("graphics/pokemon/heracross/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sneasel[] = INCBIN_U32("graphics/pokemon/sneasel/anim_front.4bpp.lz");
const u32 gMonFrontPic_Teddiursa[] = INCBIN_U32("graphics/pokemon/teddiursa/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ursaring[] = INCBIN_U32("graphics/pokemon/ursaring/anim_front.4bpp.lz");
const u32 gMonFrontPic_Slugma[] = INCBIN_U32("graphics/pokemon/slugma/anim_front.4bpp.lz");
const u32 gMonFrontPic_Magcargo[] = INCBIN_U32("graphics/pokemon/magcargo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Swinub[] = INCBIN_U32("graphics/pokemon/swinub/anim_front.4bpp.lz");
const u32 gMonFrontPic_Piloswine[] = INCBIN_U32("graphics/pokemon/piloswine/anim_front.4bpp.lz");
const u32 gMonFrontPic_Corsola[] = INCBIN_U32("graphics/pokemon/corsola/anim_front.4bpp.lz");
const u32 gMonFrontPic_Remoraid[] = INCBIN_U32("graphics/pokemon/remoraid/anim_front.4bpp.lz");
const u32 gMonFrontPic_Octillery[] = INCBIN_U32("graphics/pokemon/octillery/anim_front.4bpp.lz");
const u32 gMonFrontPic_Delibird[] = INCBIN_U32("graphics/pokemon/delibird/anim_front.4bpp.lz");
const u32 gMonFrontPic_Mantine[] = INCBIN_U32("graphics/pokemon/mantine/anim_front.4bpp.lz");
const u32 gMonFrontPic_Skarmory[] = INCBIN_U32("graphics/pokemon/skarmory/anim_front.4bpp.lz");
const u32 gMonFrontPic_Houndour[] = INCBIN_U32("graphics/pokemon/houndour/anim_front.4bpp.lz");
const u32 gMonFrontPic_Houndoom[] = INCBIN_U32("graphics/pokemon/houndoom/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kingdra[] = INCBIN_U32("graphics/pokemon/kingdra/anim_front.4bpp.lz");
const u32 gMonFrontPic_Phanpy[] = INCBIN_U32("graphics/pokemon/phanpy/anim_front.4bpp.lz");
const u32 gMonFrontPic_Donphan[] = INCBIN_U32("graphics/pokemon/donphan/anim_front.4bpp.lz");
const u32 gMonFrontPic_Porygon2[] = INCBIN_U32("graphics/pokemon/porygon2/anim_front.4bpp.lz");
const u32 gMonFrontPic_Stantler[] = INCBIN_U32("graphics/pokemon/stantler/anim_front.4bpp.lz");
const u32 gMonFrontPic_Smeargle[] = INCBIN_U32("graphics/pokemon/smeargle/anim_front.4bpp.lz");
const u32 gMonFrontPic_Tyrogue[] = INCBIN_U32("graphics/pokemon/tyrogue/anim_front.4bpp.lz");
const u32 gMonFrontPic_Hitmontop[] = INCBIN_U32("graphics/pokemon/hitmontop/anim_front.4bpp.lz");
const u32 gMonFrontPic_Smoochum[] = INCBIN_U32("graphics/pokemon/smoochum/anim_front.4bpp.lz");
const u32 gMonFrontPic_Elekid[] = INCBIN_U32("graphics/pokemon/elekid/anim_front.4bpp.lz");
const u32 gMonFrontPic_Magby[] = INCBIN_U32("graphics/pokemon/magby/anim_front.4bpp.lz");
const u32 gMonFrontPic_Miltank[] = INCBIN_U32("graphics/pokemon/miltank/anim_front.4bpp.lz");
const u32 gMonFrontPic_Blissey[] = INCBIN_U32("graphics/pokemon/blissey/anim_front.4bpp.lz");
const u32 gMonFrontPic_Raikou[] = INCBIN_U32("graphics/pokemon/raikou/anim_front.4bpp.lz");
const u32 gMonFrontPic_Entei[] = INCBIN_U32("graphics/pokemon/entei/anim_front.4bpp.lz");
const u32 gMonFrontPic_Suicune[] = INCBIN_U32("graphics/pokemon/suicune/anim_front.4bpp.lz");
const u32 gMonFrontPic_Larvitar[] = INCBIN_U32("graphics/pokemon/larvitar/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pupitar[] = INCBIN_U32("graphics/pokemon/pupitar/anim_front.4bpp.lz");
const u32 gMonFrontPic_Tyranitar[] = INCBIN_U32("graphics/pokemon/tyranitar/anim_front.4bpp.lz");
const u32 gMonFrontPic_Lugia[] = INCBIN_U32("graphics/pokemon/lugia/anim_front.4bpp.lz");
const u32 gMonFrontPic_HoOh[] = INCBIN_U32("graphics/pokemon/ho_oh/anim_front.4bpp.lz");
const u32 gMonFrontPic_Celebi[] = INCBIN_U32("graphics/pokemon/celebi/anim_front.4bpp.lz");
const u32 gMonFrontPic_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/anim_front_pics/double_question_mark_front_pic.4bpp.lz");
const u32 gMonFrontPic_DoubleQuestionMark[] = INCBIN_U32("graphics/pokemon/double_question_mark/anim_front.4bpp.lz");
const u32 gMonFrontPic_Treecko[] = INCBIN_U32("graphics/pokemon/anim_front_pics/treecko_front_pic.4bpp.lz");
const u32 gMonFrontPic_Grovyle[] = INCBIN_U32("graphics/pokemon/anim_front_pics/grovyle_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sceptile[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sceptile_front_pic.4bpp.lz");
const u32 gMonFrontPic_Torchic[] = INCBIN_U32("graphics/pokemon/anim_front_pics/torchic_front_pic.4bpp.lz");
const u32 gMonFrontPic_Combusken[] = INCBIN_U32("graphics/pokemon/anim_front_pics/combusken_front_pic.4bpp.lz");
const u32 gMonFrontPic_Blaziken[] = INCBIN_U32("graphics/pokemon/anim_front_pics/blaziken_front_pic.4bpp.lz");
const u32 gMonFrontPic_Mudkip[] = INCBIN_U32("graphics/pokemon/anim_front_pics/mudkip_front_pic.4bpp.lz");
const u32 gMonFrontPic_Marshtomp[] = INCBIN_U32("graphics/pokemon/anim_front_pics/marshtomp_front_pic.4bpp.lz");
const u32 gMonFrontPic_Swampert[] = INCBIN_U32("graphics/pokemon/anim_front_pics/swampert_front_pic.4bpp.lz");
const u32 gMonFrontPic_Poochyena[] = INCBIN_U32("graphics/pokemon/anim_front_pics/poochyena_front_pic.4bpp.lz");
const u32 gMonFrontPic_Mightyena[] = INCBIN_U32("graphics/pokemon/anim_front_pics/mightyena_front_pic.4bpp.lz");
const u32 gMonFrontPic_Zigzagoon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/zigzagoon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Linoone[] = INCBIN_U32("graphics/pokemon/anim_front_pics/linoone_front_pic.4bpp.lz");
const u32 gMonFrontPic_Wurmple[] = INCBIN_U32("graphics/pokemon/anim_front_pics/wurmple_front_pic.4bpp.lz");
const u32 gMonFrontPic_Silcoon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/silcoon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Beautifly[] = INCBIN_U32("graphics/pokemon/anim_front_pics/beautifly_front_pic.4bpp.lz");
const u32 gMonFrontPic_Cascoon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/cascoon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Dustox[] = INCBIN_U32("graphics/pokemon/anim_front_pics/dustox_front_pic.4bpp.lz");
const u32 gMonFrontPic_Lotad[] = INCBIN_U32("graphics/pokemon/anim_front_pics/lotad_front_pic.4bpp.lz");
const u32 gMonFrontPic_Lombre[] = INCBIN_U32("graphics/pokemon/anim_front_pics/lombre_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ludicolo[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ludicolo_front_pic.4bpp.lz");
const u32 gMonFrontPic_Seedot[] = INCBIN_U32("graphics/pokemon/anim_front_pics/seedot_front_pic.4bpp.lz");
const u32 gMonFrontPic_Nuzleaf[] = INCBIN_U32("graphics/pokemon/anim_front_pics/nuzleaf_front_pic.4bpp.lz");
const u32 gMonFrontPic_Shiftry[] = INCBIN_U32("graphics/pokemon/anim_front_pics/shiftry_front_pic.4bpp.lz");
const u32 gMonFrontPic_Nincada[] = INCBIN_U32("graphics/pokemon/anim_front_pics/nincada_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ninjask[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ninjask_front_pic.4bpp.lz");
const u32 gMonFrontPic_Shedinja[] = INCBIN_U32("graphics/pokemon/anim_front_pics/shedinja_front_pic.4bpp.lz");
const u32 gMonFrontPic_Taillow[] = INCBIN_U32("graphics/pokemon/anim_front_pics/taillow_front_pic.4bpp.lz");
const u32 gMonFrontPic_Swellow[] = INCBIN_U32("graphics/pokemon/anim_front_pics/swellow_front_pic.4bpp.lz");
const u32 gMonFrontPic_Shroomish[] = INCBIN_U32("graphics/pokemon/anim_front_pics/shroomish_front_pic.4bpp.lz");
const u32 gMonFrontPic_Breloom[] = INCBIN_U32("graphics/pokemon/anim_front_pics/breloom_front_pic.4bpp.lz");
const u32 gMonFrontPic_Spinda[] = INCBIN_U32("graphics/pokemon/anim_front_pics/spinda_front_pic.4bpp.lz");
const u32 gMonFrontPic_Wingull[] = INCBIN_U32("graphics/pokemon/anim_front_pics/wingull_front_pic.4bpp.lz");
const u32 gMonFrontPic_Pelipper[] = INCBIN_U32("graphics/pokemon/anim_front_pics/pelipper_front_pic.4bpp.lz");
const u32 gMonFrontPic_Surskit[] = INCBIN_U32("graphics/pokemon/anim_front_pics/surskit_front_pic.4bpp.lz");
const u32 gMonFrontPic_Masquerain[] = INCBIN_U32("graphics/pokemon/anim_front_pics/masquerain_front_pic.4bpp.lz");
const u32 gMonFrontPic_Wailmer[] = INCBIN_U32("graphics/pokemon/anim_front_pics/wailmer_front_pic.4bpp.lz");
const u32 gMonFrontPic_Wailord[] = INCBIN_U32("graphics/pokemon/anim_front_pics/wailord_front_pic.4bpp.lz");
const u32 gMonFrontPic_Skitty[] = INCBIN_U32("graphics/pokemon/anim_front_pics/skitty_front_pic.4bpp.lz");
const u32 gMonFrontPic_Delcatty[] = INCBIN_U32("graphics/pokemon/anim_front_pics/delcatty_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kecleon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kecleon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Baltoy[] = INCBIN_U32("graphics/pokemon/anim_front_pics/baltoy_front_pic.4bpp.lz");
const u32 gMonFrontPic_Claydol[] = INCBIN_U32("graphics/pokemon/anim_front_pics/claydol_front_pic.4bpp.lz");
const u32 gMonFrontPic_Nosepass[] = INCBIN_U32("graphics/pokemon/anim_front_pics/nosepass_front_pic.4bpp.lz");
const u32 gMonFrontPic_Torkoal[] = INCBIN_U32("graphics/pokemon/anim_front_pics/torkoal_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sableye[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sableye_front_pic.4bpp.lz");
const u32 gMonFrontPic_Barboach[] = INCBIN_U32("graphics/pokemon/anim_front_pics/barboach_front_pic.4bpp.lz");
const u32 gMonFrontPic_Whiscash[] = INCBIN_U32("graphics/pokemon/anim_front_pics/whiscash_front_pic.4bpp.lz");
const u32 gMonFrontPic_Luvdisc[] = INCBIN_U32("graphics/pokemon/anim_front_pics/luvdisc_front_pic.4bpp.lz");
const u32 gMonFrontPic_Corphish[] = INCBIN_U32("graphics/pokemon/anim_front_pics/corphish_front_pic.4bpp.lz");
const u32 gMonFrontPic_Crawdaunt[] = INCBIN_U32("graphics/pokemon/anim_front_pics/crawdaunt_front_pic.4bpp.lz");
const u32 gMonFrontPic_Feebas[] = INCBIN_U32("graphics/pokemon/anim_front_pics/feebas_front_pic.4bpp.lz");
const u32 gMonFrontPic_Milotic[] = INCBIN_U32("graphics/pokemon/anim_front_pics/milotic_front_pic.4bpp.lz");
const u32 gMonFrontPic_Carvanha[] = INCBIN_U32("graphics/pokemon/anim_front_pics/carvanha_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sharpedo[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sharpedo_front_pic.4bpp.lz");
const u32 gMonFrontPic_Trapinch[] = INCBIN_U32("graphics/pokemon/anim_front_pics/trapinch_front_pic.4bpp.lz");
const u32 gMonFrontPic_Vibrava[] = INCBIN_U32("graphics/pokemon/anim_front_pics/vibrava_front_pic.4bpp.lz");
const u32 gMonFrontPic_Flygon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/flygon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Makuhita[] = INCBIN_U32("graphics/pokemon/anim_front_pics/makuhita_front_pic.4bpp.lz");
const u32 gMonFrontPic_Hariyama[] = INCBIN_U32("graphics/pokemon/anim_front_pics/hariyama_front_pic.4bpp.lz");
const u32 gMonFrontPic_Electrike[] = INCBIN_U32("graphics/pokemon/anim_front_pics/electrike_front_pic.4bpp.lz");
const u32 gMonFrontPic_Manectric[] = INCBIN_U32("graphics/pokemon/anim_front_pics/manectric_front_pic.4bpp.lz");
const u32 gMonFrontPic_Numel[] = INCBIN_U32("graphics/pokemon/anim_front_pics/numel_front_pic.4bpp.lz");
const u32 gMonFrontPic_Camerupt[] = INCBIN_U32("graphics/pokemon/anim_front_pics/camerupt_front_pic.4bpp.lz");
const u32 gMonFrontPic_Spheal[] = INCBIN_U32("graphics/pokemon/anim_front_pics/spheal_front_pic.4bpp.lz");
const u32 gMonFrontPic_Sealeo[] = INCBIN_U32("graphics/pokemon/anim_front_pics/sealeo_front_pic.4bpp.lz");
const u32 gMonFrontPic_Walrein[] = INCBIN_U32("graphics/pokemon/anim_front_pics/walrein_front_pic.4bpp.lz");
const u32 gMonFrontPic_Cacnea[] = INCBIN_U32("graphics/pokemon/anim_front_pics/cacnea_front_pic.4bpp.lz");
const u32 gMonFrontPic_Cacturne[] = INCBIN_U32("graphics/pokemon/anim_front_pics/cacturne_front_pic.4bpp.lz");
const u32 gMonFrontPic_Snorunt[] = INCBIN_U32("graphics/pokemon/anim_front_pics/snorunt_front_pic.4bpp.lz");
const u32 gMonFrontPic_Glalie[] = INCBIN_U32("graphics/pokemon/anim_front_pics/glalie_front_pic.4bpp.lz");
const u32 gMonFrontPic_Lunatone[] = INCBIN_U32("graphics/pokemon/anim_front_pics/lunatone_front_pic.4bpp.lz");
const u32 gMonFrontPic_Solrock[] = INCBIN_U32("graphics/pokemon/anim_front_pics/solrock_front_pic.4bpp.lz");
const u32 gMonFrontPic_Azurill[] = INCBIN_U32("graphics/pokemon/anim_front_pics/azurill_front_pic.4bpp.lz");
const u32 gMonFrontPic_Spoink[] = INCBIN_U32("graphics/pokemon/anim_front_pics/spoink_front_pic.4bpp.lz");
const u32 gMonFrontPic_Grumpig[] = INCBIN_U32("graphics/pokemon/anim_front_pics/grumpig_front_pic.4bpp.lz");
const u32 gMonFrontPic_Plusle[] = INCBIN_U32("graphics/pokemon/anim_front_pics/plusle_front_pic.4bpp.lz");
const u32 gMonFrontPic_Minun[] = INCBIN_U32("graphics/pokemon/anim_front_pics/minun_front_pic.4bpp.lz");
const u32 gMonFrontPic_Mawile[] = INCBIN_U32("graphics/pokemon/anim_front_pics/mawile_front_pic.4bpp.lz");
const u32 gMonFrontPic_Meditite[] = INCBIN_U32("graphics/pokemon/anim_front_pics/meditite_front_pic.4bpp.lz");
const u32 gMonFrontPic_Medicham[] = INCBIN_U32("graphics/pokemon/anim_front_pics/medicham_front_pic.4bpp.lz");
const u32 gMonFrontPic_Swablu[] = INCBIN_U32("graphics/pokemon/anim_front_pics/swablu_front_pic.4bpp.lz");
const u32 gMonFrontPic_Altaria[] = INCBIN_U32("graphics/pokemon/anim_front_pics/altaria_front_pic.4bpp.lz");
const u32 gMonFrontPic_Wynaut[] = INCBIN_U32("graphics/pokemon/anim_front_pics/wynaut_front_pic.4bpp.lz");
const u32 gMonFrontPic_Duskull[] = INCBIN_U32("graphics/pokemon/anim_front_pics/duskull_front_pic.4bpp.lz");
const u32 gMonFrontPic_Dusclops[] = INCBIN_U32("graphics/pokemon/anim_front_pics/dusclops_front_pic.4bpp.lz");
const u32 gMonFrontPic_Roselia[] = INCBIN_U32("graphics/pokemon/anim_front_pics/roselia_front_pic.4bpp.lz");
const u32 gMonFrontPic_Slakoth[] = INCBIN_U32("graphics/pokemon/anim_front_pics/slakoth_front_pic.4bpp.lz");
const u32 gMonFrontPic_Vigoroth[] = INCBIN_U32("graphics/pokemon/anim_front_pics/vigoroth_front_pic.4bpp.lz");
const u32 gMonFrontPic_Slaking[] = INCBIN_U32("graphics/pokemon/anim_front_pics/slaking_front_pic.4bpp.lz");
const u32 gMonFrontPic_Gulpin[] = INCBIN_U32("graphics/pokemon/anim_front_pics/gulpin_front_pic.4bpp.lz");
const u32 gMonFrontPic_Swalot[] = INCBIN_U32("graphics/pokemon/anim_front_pics/swalot_front_pic.4bpp.lz");
const u32 gMonFrontPic_Tropius[] = INCBIN_U32("graphics/pokemon/anim_front_pics/tropius_front_pic.4bpp.lz");
const u32 gMonFrontPic_Whismur[] = INCBIN_U32("graphics/pokemon/anim_front_pics/whismur_front_pic.4bpp.lz");
const u32 gMonFrontPic_Loudred[] = INCBIN_U32("graphics/pokemon/anim_front_pics/loudred_front_pic.4bpp.lz");
const u32 gMonFrontPic_Exploud[] = INCBIN_U32("graphics/pokemon/anim_front_pics/exploud_front_pic.4bpp.lz");
const u32 gMonFrontPic_Clamperl[] = INCBIN_U32("graphics/pokemon/anim_front_pics/clamperl_front_pic.4bpp.lz");
const u32 gMonFrontPic_Huntail[] = INCBIN_U32("graphics/pokemon/anim_front_pics/huntail_front_pic.4bpp.lz");
const u32 gMonFrontPic_Gorebyss[] = INCBIN_U32("graphics/pokemon/anim_front_pics/gorebyss_front_pic.4bpp.lz");
const u32 gMonFrontPic_Absol[] = INCBIN_U32("graphics/pokemon/anim_front_pics/absol_front_pic.4bpp.lz");
const u32 gMonFrontPic_Shuppet[] = INCBIN_U32("graphics/pokemon/anim_front_pics/shuppet_front_pic.4bpp.lz");
const u32 gMonFrontPic_Banette[] = INCBIN_U32("graphics/pokemon/anim_front_pics/banette_front_pic.4bpp.lz");
const u32 gMonFrontPic_Seviper[] = INCBIN_U32("graphics/pokemon/anim_front_pics/seviper_front_pic.4bpp.lz");
const u32 gMonFrontPic_Zangoose[] = INCBIN_U32("graphics/pokemon/anim_front_pics/zangoose_front_pic.4bpp.lz");
const u32 gMonFrontPic_Relicanth[] = INCBIN_U32("graphics/pokemon/anim_front_pics/relicanth_front_pic.4bpp.lz");
const u32 gMonFrontPic_Aron[] = INCBIN_U32("graphics/pokemon/anim_front_pics/aron_front_pic.4bpp.lz");
const u32 gMonFrontPic_Lairon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/lairon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Aggron[] = INCBIN_U32("graphics/pokemon/anim_front_pics/aggron_front_pic.4bpp.lz");
const u32 gMonFrontPic_Castform[] = INCBIN_U32("graphics/pokemon/anim_front_pics/castform_front_pic.4bpp.lz");
const u32 gMonFrontPic_Volbeat[] = INCBIN_U32("graphics/pokemon/anim_front_pics/volbeat_front_pic.4bpp.lz");
const u32 gMonFrontPic_Illumise[] = INCBIN_U32("graphics/pokemon/anim_front_pics/illumise_front_pic.4bpp.lz");
const u32 gMonFrontPic_Lileep[] = INCBIN_U32("graphics/pokemon/anim_front_pics/lileep_front_pic.4bpp.lz");
const u32 gMonFrontPic_Cradily[] = INCBIN_U32("graphics/pokemon/anim_front_pics/cradily_front_pic.4bpp.lz");
const u32 gMonFrontPic_Anorith[] = INCBIN_U32("graphics/pokemon/anim_front_pics/anorith_front_pic.4bpp.lz");
const u32 gMonFrontPic_Armaldo[] = INCBIN_U32("graphics/pokemon/anim_front_pics/armaldo_front_pic.4bpp.lz");
const u32 gMonFrontPic_Ralts[] = INCBIN_U32("graphics/pokemon/anim_front_pics/ralts_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kirlia[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kirlia_front_pic.4bpp.lz");
const u32 gMonFrontPic_Gardevoir[] = INCBIN_U32("graphics/pokemon/anim_front_pics/gardevoir_front_pic.4bpp.lz");
const u32 gMonFrontPic_Bagon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/bagon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Shelgon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/shelgon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Salamence[] = INCBIN_U32("graphics/pokemon/anim_front_pics/salamence_front_pic.4bpp.lz");
const u32 gMonFrontPic_Beldum[] = INCBIN_U32("graphics/pokemon/anim_front_pics/beldum_front_pic.4bpp.lz");
const u32 gMonFrontPic_Metang[] = INCBIN_U32("graphics/pokemon/anim_front_pics/metang_front_pic.4bpp.lz");
const u32 gMonFrontPic_Metagross[] = INCBIN_U32("graphics/pokemon/anim_front_pics/metagross_front_pic.4bpp.lz");
const u32 gMonFrontPic_Regirock[] = INCBIN_U32("graphics/pokemon/anim_front_pics/regirock_front_pic.4bpp.lz");
const u32 gMonFrontPic_Regice[] = INCBIN_U32("graphics/pokemon/anim_front_pics/regice_front_pic.4bpp.lz");
const u32 gMonFrontPic_Registeel[] = INCBIN_U32("graphics/pokemon/anim_front_pics/registeel_front_pic.4bpp.lz");
const u32 gMonFrontPic_Kyogre[] = INCBIN_U32("graphics/pokemon/anim_front_pics/kyogre_front_pic.4bpp.lz");
const u32 gMonFrontPic_Groudon[] = INCBIN_U32("graphics/pokemon/anim_front_pics/groudon_front_pic.4bpp.lz");
const u32 gMonFrontPic_Rayquaza[] = INCBIN_U32("graphics/pokemon/anim_front_pics/rayquaza_front_pic.4bpp.lz");
const u32 gMonFrontPic_Latias[] = INCBIN_U32("graphics/pokemon/anim_front_pics/latias_front_pic.4bpp.lz");
const u32 gMonFrontPic_Latios[] = INCBIN_U32("graphics/pokemon/anim_front_pics/latios_front_pic.4bpp.lz");
const u32 gMonFrontPic_Jirachi[] = INCBIN_U32("graphics/pokemon/anim_front_pics/jirachi_front_pic.4bpp.lz");
const u32 gMonFrontPic_Deoxys[] = INCBIN_U32("graphics/pokemon/anim_front_pics/deoxys_front_pic.4bpp.lz");
const u32 gMonFrontPic_Chimecho[] = INCBIN_U32("graphics/pokemon/anim_front_pics/chimecho_front_pic.4bpp.lz");
const u32 gMonFrontPic_Treecko[] = INCBIN_U32("graphics/pokemon/treecko/anim_front.4bpp.lz");
const u32 gMonFrontPic_Grovyle[] = INCBIN_U32("graphics/pokemon/grovyle/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sceptile[] = INCBIN_U32("graphics/pokemon/sceptile/anim_front.4bpp.lz");
const u32 gMonFrontPic_Torchic[] = INCBIN_U32("graphics/pokemon/torchic/anim_front.4bpp.lz");
const u32 gMonFrontPic_Combusken[] = INCBIN_U32("graphics/pokemon/combusken/anim_front.4bpp.lz");
const u32 gMonFrontPic_Blaziken[] = INCBIN_U32("graphics/pokemon/blaziken/anim_front.4bpp.lz");
const u32 gMonFrontPic_Mudkip[] = INCBIN_U32("graphics/pokemon/mudkip/anim_front.4bpp.lz");
const u32 gMonFrontPic_Marshtomp[] = INCBIN_U32("graphics/pokemon/marshtomp/anim_front.4bpp.lz");
const u32 gMonFrontPic_Swampert[] = INCBIN_U32("graphics/pokemon/swampert/anim_front.4bpp.lz");
const u32 gMonFrontPic_Poochyena[] = INCBIN_U32("graphics/pokemon/poochyena/anim_front.4bpp.lz");
const u32 gMonFrontPic_Mightyena[] = INCBIN_U32("graphics/pokemon/mightyena/anim_front.4bpp.lz");
const u32 gMonFrontPic_Zigzagoon[] = INCBIN_U32("graphics/pokemon/zigzagoon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Linoone[] = INCBIN_U32("graphics/pokemon/linoone/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wurmple[] = INCBIN_U32("graphics/pokemon/wurmple/anim_front.4bpp.lz");
const u32 gMonFrontPic_Silcoon[] = INCBIN_U32("graphics/pokemon/silcoon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Beautifly[] = INCBIN_U32("graphics/pokemon/beautifly/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cascoon[] = INCBIN_U32("graphics/pokemon/cascoon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Dustox[] = INCBIN_U32("graphics/pokemon/dustox/anim_front.4bpp.lz");
const u32 gMonFrontPic_Lotad[] = INCBIN_U32("graphics/pokemon/lotad/anim_front.4bpp.lz");
const u32 gMonFrontPic_Lombre[] = INCBIN_U32("graphics/pokemon/lombre/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ludicolo[] = INCBIN_U32("graphics/pokemon/ludicolo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Seedot[] = INCBIN_U32("graphics/pokemon/seedot/anim_front.4bpp.lz");
const u32 gMonFrontPic_Nuzleaf[] = INCBIN_U32("graphics/pokemon/nuzleaf/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shiftry[] = INCBIN_U32("graphics/pokemon/shiftry/anim_front.4bpp.lz");
const u32 gMonFrontPic_Nincada[] = INCBIN_U32("graphics/pokemon/nincada/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ninjask[] = INCBIN_U32("graphics/pokemon/ninjask/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shedinja[] = INCBIN_U32("graphics/pokemon/shedinja/anim_front.4bpp.lz");
const u32 gMonFrontPic_Taillow[] = INCBIN_U32("graphics/pokemon/taillow/anim_front.4bpp.lz");
const u32 gMonFrontPic_Swellow[] = INCBIN_U32("graphics/pokemon/swellow/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shroomish[] = INCBIN_U32("graphics/pokemon/shroomish/anim_front.4bpp.lz");
const u32 gMonFrontPic_Breloom[] = INCBIN_U32("graphics/pokemon/breloom/anim_front.4bpp.lz");
const u32 gMonFrontPic_Spinda[] = INCBIN_U32("graphics/pokemon/spinda/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wingull[] = INCBIN_U32("graphics/pokemon/wingull/anim_front.4bpp.lz");
const u32 gMonFrontPic_Pelipper[] = INCBIN_U32("graphics/pokemon/pelipper/anim_front.4bpp.lz");
const u32 gMonFrontPic_Surskit[] = INCBIN_U32("graphics/pokemon/surskit/anim_front.4bpp.lz");
const u32 gMonFrontPic_Masquerain[] = INCBIN_U32("graphics/pokemon/masquerain/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wailmer[] = INCBIN_U32("graphics/pokemon/wailmer/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wailord[] = INCBIN_U32("graphics/pokemon/wailord/anim_front.4bpp.lz");
const u32 gMonFrontPic_Skitty[] = INCBIN_U32("graphics/pokemon/skitty/anim_front.4bpp.lz");
const u32 gMonFrontPic_Delcatty[] = INCBIN_U32("graphics/pokemon/delcatty/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kecleon[] = INCBIN_U32("graphics/pokemon/kecleon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Baltoy[] = INCBIN_U32("graphics/pokemon/baltoy/anim_front.4bpp.lz");
const u32 gMonFrontPic_Claydol[] = INCBIN_U32("graphics/pokemon/claydol/anim_front.4bpp.lz");
const u32 gMonFrontPic_Nosepass[] = INCBIN_U32("graphics/pokemon/nosepass/anim_front.4bpp.lz");
const u32 gMonFrontPic_Torkoal[] = INCBIN_U32("graphics/pokemon/torkoal/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sableye[] = INCBIN_U32("graphics/pokemon/sableye/anim_front.4bpp.lz");
const u32 gMonFrontPic_Barboach[] = INCBIN_U32("graphics/pokemon/barboach/anim_front.4bpp.lz");
const u32 gMonFrontPic_Whiscash[] = INCBIN_U32("graphics/pokemon/whiscash/anim_front.4bpp.lz");
const u32 gMonFrontPic_Luvdisc[] = INCBIN_U32("graphics/pokemon/luvdisc/anim_front.4bpp.lz");
const u32 gMonFrontPic_Corphish[] = INCBIN_U32("graphics/pokemon/corphish/anim_front.4bpp.lz");
const u32 gMonFrontPic_Crawdaunt[] = INCBIN_U32("graphics/pokemon/crawdaunt/anim_front.4bpp.lz");
const u32 gMonFrontPic_Feebas[] = INCBIN_U32("graphics/pokemon/feebas/anim_front.4bpp.lz");
const u32 gMonFrontPic_Milotic[] = INCBIN_U32("graphics/pokemon/milotic/anim_front.4bpp.lz");
const u32 gMonFrontPic_Carvanha[] = INCBIN_U32("graphics/pokemon/carvanha/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sharpedo[] = INCBIN_U32("graphics/pokemon/sharpedo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Trapinch[] = INCBIN_U32("graphics/pokemon/trapinch/anim_front.4bpp.lz");
const u32 gMonFrontPic_Vibrava[] = INCBIN_U32("graphics/pokemon/vibrava/anim_front.4bpp.lz");
const u32 gMonFrontPic_Flygon[] = INCBIN_U32("graphics/pokemon/flygon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Makuhita[] = INCBIN_U32("graphics/pokemon/makuhita/anim_front.4bpp.lz");
const u32 gMonFrontPic_Hariyama[] = INCBIN_U32("graphics/pokemon/hariyama/anim_front.4bpp.lz");
const u32 gMonFrontPic_Electrike[] = INCBIN_U32("graphics/pokemon/electrike/anim_front.4bpp.lz");
const u32 gMonFrontPic_Manectric[] = INCBIN_U32("graphics/pokemon/manectric/anim_front.4bpp.lz");
const u32 gMonFrontPic_Numel[] = INCBIN_U32("graphics/pokemon/numel/anim_front.4bpp.lz");
const u32 gMonFrontPic_Camerupt[] = INCBIN_U32("graphics/pokemon/camerupt/anim_front.4bpp.lz");
const u32 gMonFrontPic_Spheal[] = INCBIN_U32("graphics/pokemon/spheal/anim_front.4bpp.lz");
const u32 gMonFrontPic_Sealeo[] = INCBIN_U32("graphics/pokemon/sealeo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Walrein[] = INCBIN_U32("graphics/pokemon/walrein/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cacnea[] = INCBIN_U32("graphics/pokemon/cacnea/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cacturne[] = INCBIN_U32("graphics/pokemon/cacturne/anim_front.4bpp.lz");
const u32 gMonFrontPic_Snorunt[] = INCBIN_U32("graphics/pokemon/snorunt/anim_front.4bpp.lz");
const u32 gMonFrontPic_Glalie[] = INCBIN_U32("graphics/pokemon/glalie/anim_front.4bpp.lz");
const u32 gMonFrontPic_Lunatone[] = INCBIN_U32("graphics/pokemon/lunatone/anim_front.4bpp.lz");
const u32 gMonFrontPic_Solrock[] = INCBIN_U32("graphics/pokemon/solrock/anim_front.4bpp.lz");
const u32 gMonFrontPic_Azurill[] = INCBIN_U32("graphics/pokemon/azurill/anim_front.4bpp.lz");
const u32 gMonFrontPic_Spoink[] = INCBIN_U32("graphics/pokemon/spoink/anim_front.4bpp.lz");
const u32 gMonFrontPic_Grumpig[] = INCBIN_U32("graphics/pokemon/grumpig/anim_front.4bpp.lz");
const u32 gMonFrontPic_Plusle[] = INCBIN_U32("graphics/pokemon/plusle/anim_front.4bpp.lz");
const u32 gMonFrontPic_Minun[] = INCBIN_U32("graphics/pokemon/minun/anim_front.4bpp.lz");
const u32 gMonFrontPic_Mawile[] = INCBIN_U32("graphics/pokemon/mawile/anim_front.4bpp.lz");
const u32 gMonFrontPic_Meditite[] = INCBIN_U32("graphics/pokemon/meditite/anim_front.4bpp.lz");
const u32 gMonFrontPic_Medicham[] = INCBIN_U32("graphics/pokemon/medicham/anim_front.4bpp.lz");
const u32 gMonFrontPic_Swablu[] = INCBIN_U32("graphics/pokemon/swablu/anim_front.4bpp.lz");
const u32 gMonFrontPic_Altaria[] = INCBIN_U32("graphics/pokemon/altaria/anim_front.4bpp.lz");
const u32 gMonFrontPic_Wynaut[] = INCBIN_U32("graphics/pokemon/wynaut/anim_front.4bpp.lz");
const u32 gMonFrontPic_Duskull[] = INCBIN_U32("graphics/pokemon/duskull/anim_front.4bpp.lz");
const u32 gMonFrontPic_Dusclops[] = INCBIN_U32("graphics/pokemon/dusclops/anim_front.4bpp.lz");
const u32 gMonFrontPic_Roselia[] = INCBIN_U32("graphics/pokemon/roselia/anim_front.4bpp.lz");
const u32 gMonFrontPic_Slakoth[] = INCBIN_U32("graphics/pokemon/slakoth/anim_front.4bpp.lz");
const u32 gMonFrontPic_Vigoroth[] = INCBIN_U32("graphics/pokemon/vigoroth/anim_front.4bpp.lz");
const u32 gMonFrontPic_Slaking[] = INCBIN_U32("graphics/pokemon/slaking/anim_front.4bpp.lz");
const u32 gMonFrontPic_Gulpin[] = INCBIN_U32("graphics/pokemon/gulpin/anim_front.4bpp.lz");
const u32 gMonFrontPic_Swalot[] = INCBIN_U32("graphics/pokemon/swalot/anim_front.4bpp.lz");
const u32 gMonFrontPic_Tropius[] = INCBIN_U32("graphics/pokemon/tropius/anim_front.4bpp.lz");
const u32 gMonFrontPic_Whismur[] = INCBIN_U32("graphics/pokemon/whismur/anim_front.4bpp.lz");
const u32 gMonFrontPic_Loudred[] = INCBIN_U32("graphics/pokemon/loudred/anim_front.4bpp.lz");
const u32 gMonFrontPic_Exploud[] = INCBIN_U32("graphics/pokemon/exploud/anim_front.4bpp.lz");
const u32 gMonFrontPic_Clamperl[] = INCBIN_U32("graphics/pokemon/clamperl/anim_front.4bpp.lz");
const u32 gMonFrontPic_Huntail[] = INCBIN_U32("graphics/pokemon/huntail/anim_front.4bpp.lz");
const u32 gMonFrontPic_Gorebyss[] = INCBIN_U32("graphics/pokemon/gorebyss/anim_front.4bpp.lz");
const u32 gMonFrontPic_Absol[] = INCBIN_U32("graphics/pokemon/absol/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shuppet[] = INCBIN_U32("graphics/pokemon/shuppet/anim_front.4bpp.lz");
const u32 gMonFrontPic_Banette[] = INCBIN_U32("graphics/pokemon/banette/anim_front.4bpp.lz");
const u32 gMonFrontPic_Seviper[] = INCBIN_U32("graphics/pokemon/seviper/anim_front.4bpp.lz");
const u32 gMonFrontPic_Zangoose[] = INCBIN_U32("graphics/pokemon/zangoose/anim_front.4bpp.lz");
const u32 gMonFrontPic_Relicanth[] = INCBIN_U32("graphics/pokemon/relicanth/anim_front.4bpp.lz");
const u32 gMonFrontPic_Aron[] = INCBIN_U32("graphics/pokemon/aron/anim_front.4bpp.lz");
const u32 gMonFrontPic_Lairon[] = INCBIN_U32("graphics/pokemon/lairon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Aggron[] = INCBIN_U32("graphics/pokemon/aggron/anim_front.4bpp.lz");
const u32 gMonFrontPic_Castform[] = INCBIN_U32("graphics/pokemon/castform/anim_front.4bpp.lz");
const u32 gMonFrontPic_Volbeat[] = INCBIN_U32("graphics/pokemon/volbeat/anim_front.4bpp.lz");
const u32 gMonFrontPic_Illumise[] = INCBIN_U32("graphics/pokemon/illumise/anim_front.4bpp.lz");
const u32 gMonFrontPic_Lileep[] = INCBIN_U32("graphics/pokemon/lileep/anim_front.4bpp.lz");
const u32 gMonFrontPic_Cradily[] = INCBIN_U32("graphics/pokemon/cradily/anim_front.4bpp.lz");
const u32 gMonFrontPic_Anorith[] = INCBIN_U32("graphics/pokemon/anorith/anim_front.4bpp.lz");
const u32 gMonFrontPic_Armaldo[] = INCBIN_U32("graphics/pokemon/armaldo/anim_front.4bpp.lz");
const u32 gMonFrontPic_Ralts[] = INCBIN_U32("graphics/pokemon/ralts/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kirlia[] = INCBIN_U32("graphics/pokemon/kirlia/anim_front.4bpp.lz");
const u32 gMonFrontPic_Gardevoir[] = INCBIN_U32("graphics/pokemon/gardevoir/anim_front.4bpp.lz");
const u32 gMonFrontPic_Bagon[] = INCBIN_U32("graphics/pokemon/bagon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Shelgon[] = INCBIN_U32("graphics/pokemon/shelgon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Salamence[] = INCBIN_U32("graphics/pokemon/salamence/anim_front.4bpp.lz");
const u32 gMonFrontPic_Beldum[] = INCBIN_U32("graphics/pokemon/beldum/anim_front.4bpp.lz");
const u32 gMonFrontPic_Metang[] = INCBIN_U32("graphics/pokemon/metang/anim_front.4bpp.lz");
const u32 gMonFrontPic_Metagross[] = INCBIN_U32("graphics/pokemon/metagross/anim_front.4bpp.lz");
const u32 gMonFrontPic_Regirock[] = INCBIN_U32("graphics/pokemon/regirock/anim_front.4bpp.lz");
const u32 gMonFrontPic_Regice[] = INCBIN_U32("graphics/pokemon/regice/anim_front.4bpp.lz");
const u32 gMonFrontPic_Registeel[] = INCBIN_U32("graphics/pokemon/registeel/anim_front.4bpp.lz");
const u32 gMonFrontPic_Kyogre[] = INCBIN_U32("graphics/pokemon/kyogre/anim_front.4bpp.lz");
const u32 gMonFrontPic_Groudon[] = INCBIN_U32("graphics/pokemon/groudon/anim_front.4bpp.lz");
const u32 gMonFrontPic_Rayquaza[] = INCBIN_U32("graphics/pokemon/rayquaza/anim_front.4bpp.lz");
const u32 gMonFrontPic_Latias[] = INCBIN_U32("graphics/pokemon/latias/anim_front.4bpp.lz");
const u32 gMonFrontPic_Latios[] = INCBIN_U32("graphics/pokemon/latios/anim_front.4bpp.lz");
const u32 gMonFrontPic_Jirachi[] = INCBIN_U32("graphics/pokemon/jirachi/anim_front.4bpp.lz");
const u32 gMonFrontPic_Deoxys[] = INCBIN_U32("graphics/pokemon/deoxys/anim_front.4bpp.lz");
const u32 gMonFrontPic_Chimecho[] = INCBIN_U32("graphics/pokemon/chimecho/anim_front.4bpp.lz");
const u32 gMonFrontPic_Egg[] = INCBIN_U32("graphics/pokemon/anim_front_pics/egg_front_pic.4bpp.lz");
const u32 gMonFrontPic_Egg[] = INCBIN_U32("graphics/pokemon/egg/anim_front.4bpp.lz");
const u32 gMonFrontPic_UnownB[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_b_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownC[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_c_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownD[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_d_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownE[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_e_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownF[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_f_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownG[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_g_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownH[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_h_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownI[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_i_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownJ[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_j_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownK[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_k_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownL[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_l_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownM[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_m_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownN[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_n_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownO[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_o_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownP[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_p_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownQ[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_q_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownR[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_r_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownS[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_s_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownT[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_t_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownU[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_u_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownV[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_v_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownW[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_w_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownX[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_x_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownY[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_y_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownZ[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_z_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownExclamationMark[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_exclamation_mark_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownQuestionMark[] = INCBIN_U32("graphics/pokemon/anim_front_pics/unown_question_mark_front_pic.4bpp.lz");
const u32 gMonFrontPic_UnownB[] = INCBIN_U32("graphics/pokemon/unown/anim_front_b.4bpp.lz");
const u32 gMonFrontPic_UnownC[] = INCBIN_U32("graphics/pokemon/unown/anim_front_c.4bpp.lz");
const u32 gMonFrontPic_UnownD[] = INCBIN_U32("graphics/pokemon/unown/anim_front_d.4bpp.lz");
const u32 gMonFrontPic_UnownE[] = INCBIN_U32("graphics/pokemon/unown/anim_front_e.4bpp.lz");
const u32 gMonFrontPic_UnownF[] = INCBIN_U32("graphics/pokemon/unown/anim_front_f.4bpp.lz");
const u32 gMonFrontPic_UnownG[] = INCBIN_U32("graphics/pokemon/unown/anim_front_g.4bpp.lz");
const u32 gMonFrontPic_UnownH[] = INCBIN_U32("graphics/pokemon/unown/anim_front_h.4bpp.lz");
const u32 gMonFrontPic_UnownI[] = INCBIN_U32("graphics/pokemon/unown/anim_front_i.4bpp.lz");
const u32 gMonFrontPic_UnownJ[] = INCBIN_U32("graphics/pokemon/unown/anim_front_j.4bpp.lz");
const u32 gMonFrontPic_UnownK[] = INCBIN_U32("graphics/pokemon/unown/anim_front_k.4bpp.lz");
const u32 gMonFrontPic_UnownL[] = INCBIN_U32("graphics/pokemon/unown/anim_front_l.4bpp.lz");
const u32 gMonFrontPic_UnownM[] = INCBIN_U32("graphics/pokemon/unown/anim_front_m.4bpp.lz");
const u32 gMonFrontPic_UnownN[] = INCBIN_U32("graphics/pokemon/unown/anim_front_n.4bpp.lz");
const u32 gMonFrontPic_UnownO[] = INCBIN_U32("graphics/pokemon/unown/anim_front_o.4bpp.lz");
const u32 gMonFrontPic_UnownP[] = INCBIN_U32("graphics/pokemon/unown/anim_front_p.4bpp.lz");
const u32 gMonFrontPic_UnownQ[] = INCBIN_U32("graphics/pokemon/unown/anim_front_q.4bpp.lz");
const u32 gMonFrontPic_UnownR[] = INCBIN_U32("graphics/pokemon/unown/anim_front_r.4bpp.lz");
const u32 gMonFrontPic_UnownS[] = INCBIN_U32("graphics/pokemon/unown/anim_front_s.4bpp.lz");
const u32 gMonFrontPic_UnownT[] = INCBIN_U32("graphics/pokemon/unown/anim_front_t.4bpp.lz");
const u32 gMonFrontPic_UnownU[] = INCBIN_U32("graphics/pokemon/unown/anim_front_u.4bpp.lz");
const u32 gMonFrontPic_UnownV[] = INCBIN_U32("graphics/pokemon/unown/anim_front_v.4bpp.lz");
const u32 gMonFrontPic_UnownW[] = INCBIN_U32("graphics/pokemon/unown/anim_front_w.4bpp.lz");
const u32 gMonFrontPic_UnownX[] = INCBIN_U32("graphics/pokemon/unown/anim_front_x.4bpp.lz");
const u32 gMonFrontPic_UnownY[] = INCBIN_U32("graphics/pokemon/unown/anim_front_y.4bpp.lz");
const u32 gMonFrontPic_UnownZ[] = INCBIN_U32("graphics/pokemon/unown/anim_front_z.4bpp.lz");
const u32 gMonFrontPic_UnownExclamationMark[] = INCBIN_U32("graphics/pokemon/unown/anim_front_exclamation_mark.4bpp.lz");
const u32 gMonFrontPic_UnownQuestionMark[] = INCBIN_U32("graphics/pokemon/unown/anim_front_question_mark.4bpp.lz");
+1
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
#include "battle_ai_script_commands.h"
#include "battle_factory.h"
#include "battle_setup.h"
+1
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h"
#include "pokemon.h"
#include "random.h"
+144 -144
View File
@@ -119,8 +119,8 @@ const struct OamData gUnknown_08524904 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.priority = 2,
};
@@ -129,8 +129,8 @@ const struct OamData gUnknown_0852490C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2,
};
@@ -138,8 +138,8 @@ const struct OamData gUnknown_08524914 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 2,
};
@@ -147,8 +147,8 @@ const struct OamData gUnknown_0852491C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 2,
};
@@ -156,8 +156,8 @@ const struct OamData gUnknown_08524924 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.priority = 2,
};
@@ -165,8 +165,8 @@ const struct OamData gUnknown_0852492C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(32x8),
.size = SPRITE_SIZE(32x8),
.priority = 2,
};
@@ -174,8 +174,8 @@ const struct OamData gUnknown_08524934 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 2,
};
@@ -183,8 +183,8 @@ const struct OamData gUnknown_0852493C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(64x32),
.size = SPRITE_SIZE(64x32),
.priority = 2,
};
@@ -192,8 +192,8 @@ const struct OamData gUnknown_08524944 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(8x16),
.size = SPRITE_SIZE(8x16),
.priority = 2,
};
@@ -201,8 +201,8 @@ const struct OamData gUnknown_0852494C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(8x32),
.size = SPRITE_SIZE(8x32),
.priority = 2,
};
@@ -210,8 +210,8 @@ const struct OamData gUnknown_08524954 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.priority = 2,
};
@@ -219,8 +219,8 @@ const struct OamData gUnknown_0852495C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(32x64),
.size = SPRITE_SIZE(32x64),
.priority = 2,
};
@@ -228,8 +228,8 @@ const struct OamData gUnknown_08524964 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.priority = 2,
};
@@ -237,8 +237,8 @@ const struct OamData gUnknown_0852496C =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2,
};
@@ -246,8 +246,8 @@ const struct OamData gUnknown_08524974 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 2,
};
@@ -255,8 +255,8 @@ const struct OamData gUnknown_0852497C =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 2,
};
@@ -264,8 +264,8 @@ const struct OamData gUnknown_08524984 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.priority = 2,
};
@@ -273,8 +273,8 @@ const struct OamData gUnknown_0852498C =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(32x8),
.size = SPRITE_SIZE(32x8),
.priority = 2,
};
@@ -282,8 +282,8 @@ const struct OamData gUnknown_08524994 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 2,
};
@@ -291,8 +291,8 @@ const struct OamData gUnknown_0852499C =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(64x32),
.size = SPRITE_SIZE(64x32),
.priority = 2,
};
@@ -300,8 +300,8 @@ const struct OamData gUnknown_085249A4 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(8x16),
.size = SPRITE_SIZE(8x16),
.priority = 2,
};
@@ -309,8 +309,8 @@ const struct OamData gUnknown_085249AC =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(8x32),
.size = SPRITE_SIZE(8x32),
.priority = 2,
};
@@ -318,8 +318,8 @@ const struct OamData gUnknown_085249B4 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.priority = 2,
};
@@ -327,8 +327,8 @@ const struct OamData gUnknown_085249BC =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(32x64),
.size = SPRITE_SIZE(32x64),
.priority = 2,
};
@@ -336,8 +336,8 @@ const struct OamData gUnknown_085249C4 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.priority = 2,
};
@@ -345,8 +345,8 @@ const struct OamData gUnknown_085249CC =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2,
};
@@ -354,8 +354,8 @@ const struct OamData gUnknown_085249D4 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 2,
};
@@ -363,8 +363,8 @@ const struct OamData gUnknown_085249DC =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 2,
};
@@ -372,8 +372,8 @@ const struct OamData gUnknown_085249E4 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.priority = 2,
};
@@ -381,8 +381,8 @@ const struct OamData gUnknown_085249EC =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(32x8),
.size = SPRITE_SIZE(32x8),
.priority = 2,
};
@@ -390,8 +390,8 @@ const struct OamData gUnknown_085249F4 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 2,
};
@@ -399,8 +399,8 @@ const struct OamData gUnknown_085249FC =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(64x32),
.size = SPRITE_SIZE(64x32),
.priority = 2,
};
@@ -408,8 +408,8 @@ const struct OamData gUnknown_08524A04 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(8x16),
.size = SPRITE_SIZE(8x16),
.priority = 2,
};
@@ -417,8 +417,8 @@ const struct OamData gUnknown_08524A0C =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(8x32),
.size = SPRITE_SIZE(8x32),
.priority = 2,
};
@@ -426,8 +426,8 @@ const struct OamData gUnknown_08524A14 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.priority = 2,
};
@@ -435,8 +435,8 @@ const struct OamData gUnknown_08524A1C =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(32x64),
.size = SPRITE_SIZE(32x64),
.priority = 2,
};
@@ -444,8 +444,8 @@ const struct OamData gUnknown_08524A24 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.priority = 2,
};
@@ -453,8 +453,8 @@ const struct OamData gUnknown_08524A2C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2,
};
@@ -462,8 +462,8 @@ const struct OamData gUnknown_08524A34 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 2,
};
@@ -471,8 +471,8 @@ const struct OamData gUnknown_08524A3C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 2,
};
@@ -480,8 +480,8 @@ const struct OamData gUnknown_08524A44 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.priority = 2,
};
@@ -489,8 +489,8 @@ const struct OamData gUnknown_08524A4C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(32x8),
.size = SPRITE_SIZE(32x8),
.priority = 2,
};
@@ -498,8 +498,8 @@ const struct OamData gUnknown_08524A54 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 2,
};
@@ -507,8 +507,8 @@ const struct OamData gUnknown_08524A5C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(64x32),
.size = SPRITE_SIZE(64x32),
.priority = 2,
};
@@ -516,8 +516,8 @@ const struct OamData gUnknown_08524A64 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(8x16),
.size = SPRITE_SIZE(8x16),
.priority = 2,
};
@@ -525,8 +525,8 @@ const struct OamData gUnknown_08524A6C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(8x32),
.size = SPRITE_SIZE(8x32),
.priority = 2,
};
@@ -534,8 +534,8 @@ const struct OamData gUnknown_08524A74 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.priority = 2,
};
@@ -543,8 +543,8 @@ const struct OamData gUnknown_08524A7C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(32x64),
.size = SPRITE_SIZE(32x64),
.priority = 2,
};
@@ -552,8 +552,8 @@ const struct OamData gUnknown_08524A84 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.priority = 2,
};
@@ -561,8 +561,8 @@ const struct OamData gUnknown_08524A8C =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2,
};
@@ -570,8 +570,8 @@ const struct OamData gUnknown_08524A94 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 2,
};
@@ -579,8 +579,8 @@ const struct OamData gUnknown_08524A9C =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 2,
};
@@ -588,8 +588,8 @@ const struct OamData gUnknown_08524AA4 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.priority = 2,
};
@@ -597,8 +597,8 @@ const struct OamData gUnknown_08524AAC =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(32x8),
.size = SPRITE_SIZE(32x8),
.priority = 2,
};
@@ -606,8 +606,8 @@ const struct OamData gUnknown_08524AB4 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 2,
};
@@ -615,8 +615,8 @@ const struct OamData gUnknown_08524ABC =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(64x32),
.size = SPRITE_SIZE(64x32),
.priority = 2,
};
@@ -624,8 +624,8 @@ const struct OamData gUnknown_08524AC4 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(8x16),
.size = SPRITE_SIZE(8x16),
.priority = 2,
};
@@ -633,8 +633,8 @@ const struct OamData gUnknown_08524ACC =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(8x32),
.size = SPRITE_SIZE(8x32),
.priority = 2,
};
@@ -642,8 +642,8 @@ const struct OamData gUnknown_08524AD4 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.priority = 2,
};
@@ -651,8 +651,8 @@ const struct OamData gUnknown_08524ADC =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(32x64),
.size = SPRITE_SIZE(32x64),
.priority = 2,
};
@@ -660,8 +660,8 @@ const struct OamData gUnknown_08524AE4 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.priority = 2,
};
@@ -669,8 +669,8 @@ const struct OamData gUnknown_08524AEC =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2,
};
@@ -678,8 +678,8 @@ const struct OamData gUnknown_08524AF4 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 2,
};
@@ -687,8 +687,8 @@ const struct OamData gUnknown_08524AFC =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_SQUARE,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 2,
};
@@ -696,8 +696,8 @@ const struct OamData gUnknown_08524B04 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.priority = 2,
};
@@ -705,8 +705,8 @@ const struct OamData gUnknown_08524B0C =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(32x8),
.size = SPRITE_SIZE(32x8),
.priority = 2,
};
@@ -714,8 +714,8 @@ const struct OamData gUnknown_08524B14 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 2,
};
@@ -723,8 +723,8 @@ const struct OamData gUnknown_08524B1C =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_H_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(64x32),
.size = SPRITE_SIZE(64x32),
.priority = 2,
};
@@ -732,8 +732,8 @@ const struct OamData gUnknown_08524B24 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(8x16),
.size = SPRITE_SIZE(8x16),
.priority = 2,
};
@@ -741,8 +741,8 @@ const struct OamData gUnknown_08524B2C =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 1,
.shape = SPRITE_SHAPE(8x32),
.size = SPRITE_SIZE(8x32),
.priority = 2,
};
@@ -750,8 +750,8 @@ const struct OamData gUnknown_08524B34 =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.priority = 2,
};
@@ -759,8 +759,8 @@ const struct OamData gUnknown_08524B3C =
{
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_BLEND,
.shape = ST_OAM_V_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(32x64),
.size = SPRITE_SIZE(32x64),
.priority = 2,
};
+2 -2
View File
@@ -406,10 +406,10 @@ static const struct OamData sJudgementIconOamData =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 15,
+4 -4
View File
@@ -42,10 +42,10 @@ static const struct OamData gUnknown_0831A988 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -59,10 +59,10 @@ static const struct OamData gUnknown_0831A990 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 64,
.priority = 0,
.paletteNum = 0,
+8 -8
View File
@@ -872,10 +872,10 @@ static const struct OamData gUnknown_0860CF70 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -889,10 +889,10 @@ static const struct OamData gUnknown_0860CF78 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x16),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 1,
@@ -906,10 +906,10 @@ static const struct OamData gUnknown_0860CF80 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(16x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(16x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 2,
@@ -923,10 +923,10 @@ static const struct OamData gUnknown_0860CF88 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 2,
.shape = SPRITE_SHAPE(8x16),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 2,
+8 -8
View File
@@ -385,10 +385,10 @@ static const struct OamData gUnknown_0861047C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 3,
.paletteNum = 0,
@@ -402,10 +402,10 @@ static const struct OamData gUnknown_08610484 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 3,
.paletteNum = 0,
@@ -419,10 +419,10 @@ static const struct OamData gUnknown_0861048C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x16),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x16),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -436,10 +436,10 @@ static const struct OamData gUnknown_08610494 =
.objMode = 1,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+8 -8
View File
@@ -207,10 +207,10 @@ static const struct OamData sUnknown_0832C138 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(64x32),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -279,10 +279,10 @@ static const struct OamData sOamData_Healthbar =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x8),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(32x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -446,10 +446,10 @@ static const struct OamData sUnknown_0832C354 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(64x32),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -463,10 +463,10 @@ static const struct OamData sOamData_StatusSummaryBalls =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
+5 -4
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
#include "battle_ai_script_commands.h"
#include "battle_arena.h"
#include "battle_controllers.h"
@@ -296,10 +297,10 @@ const struct OamData gOamData_831ACA8 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -313,10 +314,10 @@ const struct OamData gOamData_831ACB0 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 2,
.paletteNum = 2,
+1
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h"
#include "battle_message.h"
#include "battle_setup.h"
+8 -8
View File
@@ -282,10 +282,10 @@ static const struct OamData gOamData_861F378 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -576,7 +576,7 @@ static void SetBagItemsListTemplate(void)
}
StringCopy(gPyramidBagResources->itemStrings[i], gText_CloseBag);
gPyramidBagResources->bagListItems[i].name = gPyramidBagResources->itemStrings[i];
gPyramidBagResources->bagListItems[i].id = LIST_B_PRESSED;
gPyramidBagResources->bagListItems[i].id = LIST_CANCEL;
gMultiuseListMenuTemplate = gUnknown_0861F2C0;
gMultiuseListMenuTemplate.totalItems = gPyramidBagResources->listMenuCount;
gMultiuseListMenuTemplate.items = gPyramidBagResources->bagListItems;
@@ -607,7 +607,7 @@ static void PyramidBagMoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMen
if (gPyramidBagResources->unk814 == 0xFF)
{
sub_81C6FF8(gPyramidBagResources->unk815 ^ 1);
if (itemIndex != LIST_B_PRESSED)
if (itemIndex != LIST_CANCEL)
ShowItemImage(gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode][itemIndex], gPyramidBagResources->unk815);
else
ShowItemImage(0xFFFF, gPyramidBagResources->unk815);
@@ -619,7 +619,7 @@ static void PyramidBagMoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMen
static void PrintItemQuantity(u8 windowId, s32 itemIndex, u8 y)
{
s32 xAlign;
if (itemIndex == LIST_B_PRESSED)
if (itemIndex == LIST_CANCEL)
return;
if (gPyramidBagResources->unk814 != 0xFF)
@@ -641,7 +641,7 @@ static void PrintItemQuantity(u8 windowId, s32 itemIndex, u8 y)
static void PrintItemDescription(s32 listMenuId)
{
const u8 *desc;
if (listMenuId != LIST_B_PRESSED)
if (listMenuId != LIST_CANCEL)
{
desc = ItemId_GetDescription(gSaveBlock2Ptr->frontier.pyramidBag.itemId[gSaveBlock2Ptr->frontier.lvlMode][listMenuId]);
}
@@ -859,7 +859,7 @@ static void Task_HandlePyramidBagInput(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
PlaySE(SE_SELECT);
gSpecialVar_ItemId = 0;
sub_81C5B14(taskId);
@@ -1293,7 +1293,7 @@ static void Task_ItemSwapHandleInput(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
PlaySE(SE_SELECT);
if (gMain.newKeys & A_BUTTON)
PerformItemSwap(taskId);
+10 -31
View File
@@ -49,14 +49,12 @@
#include "field_specials.h"
#include "pokemon_summary_screen.h"
#include "pokenav.h"
#include "menu_specialized.h"
extern struct MusicPlayerInfo gMPlayInfo_BGM;
extern const u8* const gBattleScriptsForMoveEffects[];
// functions
extern void sub_81D388C(struct Pokemon* mon, void* statStoreLocation); // pokenav.s
#define DEFENDER_IS_PROTECTED ((gProtectStructs[gBattlerTarget].protected) && (gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED))
// this file's functions
@@ -733,10 +731,10 @@ static const struct OamData sOamData_MonIconOnLvlUpBox =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -4482,28 +4480,6 @@ static void atk48_playstatchangeanimation(void)
}
}
enum
{
ATK49_RAGE,
ATK49_DEFROST,
ATK49_SYNCHRONIZE_TARGET,
ATK49_MOVE_END_ABILITIES,
ATK49_STATUS_IMMUNITY_ABILITIES,
ATK49_SYNCHRONIZE_ATTACKER,
ATK49_CHOICE_MOVE,
ATK49_CHANGED_ITEMS,
ATK49_ATTACKER_INVISIBLE,
ATK49_ATTACKER_VISIBLE,
ATK49_TARGET_VISIBLE,
ATK49_ITEM_EFFECTS_ALL,
ATK49_KINGSROCK_SHELLBELL,
ATK49_SUBSTITUTE,
ATK49_UPDATE_LAST_MOVES,
ATK49_MIRROR_MOVE,
ATK49_NEXT_TARGET,
ATK49_COUNT,
};
static void atk49_moveend(void)
{
s32 i;
@@ -6319,16 +6295,16 @@ static void sub_804F100(void)
{
struct StatsArray currentStats;
sub_81D388C(&gPlayerParty[gBattleStruct->expGetterMonId], &currentStats);
sub_81D3640(0xD, gBattleResources->statsBeforeLvlUp, &currentStats, 0xE, 0xD, 0xF);
GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], &currentStats);
DrawLevelUpWindowPg1(0xD, gBattleResources->statsBeforeLvlUp, &currentStats, 0xE, 0xD, 0xF);
}
static void sub_804F144(void)
{
struct StatsArray currentStats;
sub_81D388C(&gPlayerParty[gBattleStruct->expGetterMonId], &currentStats);
sub_81D3784(0xD, &currentStats, 0xE, 0xD, 0xF);
GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], &currentStats);
DrawLevelUpWindowPg2(0xD, &currentStats, 0xE, 0xD, 0xF);
}
static void sub_804F17C(void)
@@ -7212,6 +7188,9 @@ static void atk88_negativedamage(void)
gBattlescriptCurrInstr++;
}
#define STAT_CHANGE_WORKED 0
#define STAT_CHANGE_DIDNT_WORK 1
static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
{
bool8 certain = FALSE;
+2 -2
View File
@@ -763,10 +763,10 @@ static const struct OamData gOamData_85C8E80 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+1
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "pokemon.h"
#include "battle.h"
#include "battle_anim.h"
#include "battle_tv.h"
#include "constants/battle_string_ids.h"
#include "constants/battle_anim.h"
+1
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
#include "constants/battle_script_commands.h"
#include "constants/abilities.h"
#include "constants/moves.h"
+1
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h"
#include "alloc.h"
#include "pokemon.h"
+10 -10
View File
@@ -404,10 +404,10 @@ static const struct OamData sOamData_8216314 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -547,10 +547,10 @@ static const struct OamData sOamData_821640C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -616,10 +616,10 @@ static const struct OamData sOamData_8216474 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -703,10 +703,10 @@ static const struct OamData sOamData_8216514 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -761,10 +761,10 @@ static const struct OamData sOamData_8216560 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(64x32),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
+775
View File
@@ -0,0 +1,775 @@
#include "global.h"
#include "alloc.h"
#include "berry_powder.h"
#include "bg.h"
#include "event_data.h"
#include "gpu_regs.h"
#include "graphics.h"
#include "item_icon.h"
#include "item_menu.h"
#include "link.h"
#include "link_rfu.h"
#include "main.h"
#include "math_util.h"
#include "menu.h"
#include "overworld.h"
#include "palette.h"
#include "rom_8034C54.h"
#include "scanline_effect.h"
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
#include "task.h"
#include "text.h"
#include "trig.h"
#include "window.h"
#include "constants/items.h"
#include "constants/rgb.h"
#include "constants/songs.h"
struct BerryCrushGame_Player
{
u16 unk0;
u8 filler2[0x12];
u8 unk14[0xC];
};
struct BerryCrushGame_PlayersSeparate
{
struct BerryCrushGame_Player player;
struct BerryCrushGame_Player others[4];
};
typedef union BerryCrushGame_Players
{
struct BerryCrushGame_Player players[5];
struct BerryCrushGame_PlayersSeparate separate;
} BerryCrushGame_Players;
struct BerryCrushGame_138_C
{
u8 filler0[0x8];
s16 unk8;
u16 unkA;
};
struct BerryCrushGame_138
{
u8 filler0[0xC];
struct BerryCrushGame_138_C *unkC[5];
u8 filler1C[0x4];
struct Sprite *unk24[5];
struct Sprite *unk38[5];
struct Sprite *unk4C[5];
struct Sprite *unk60[5];
struct Sprite *unk74[5];
};
struct BerryCrushGame_4E
{
u8 filler0[0x4];
u8 unk4;
u8 filler5[0x5];
u16 unkA;
u16 unkC;
};
struct __attribute__((packed)) BerryCrushGame_40
{
u8 filler0[0xE];
struct BerryCrushGame_4E unkE;
};
struct BerryCrushGame
{
MainCallback unk0;
void (* unk4)(struct BerryCrushGame *, u8 *);
u8 unk8;
u8 unk9;
u8 unkA;
u8 unkB;
u8 unkC;
u8 fillerD[0x1];
u8 unkE;
u8 unkF;
u8 filler10[0x2];
u16 unk12;
u8 filler14[0x2];
u16 unk16;
u8 filler18[0x4];
int unk1C;
u8 filler20[0x5];
u8 unk25_0:1;
u8 unk25_1:1;
u8 unk25_2:1;
u8 filler26[0x2];
u16 unk28;
u16 unk2A;
u16 unk2C;
u8 filler2E[0x8];
u8 unk36[0xA];
struct BerryCrushGame_40 unk40;
u8 filler60[0x8];
int unk68;
u16 unk6C;
u8 filler6E[0x4];
u16 unk72;
u8 filler74[0x10];
BerryCrushGame_Players unk84;
u8 filler124[0x14];
struct BerryCrushGame_138 unk138;
u8 unk1C0[0x1000];
u8 unk11C0[0x1000];
u8 unk21C0[0x1000];
u8 unk31C0[0x1000];
};
static void sub_8020F74(void);
static void sub_8020F88(void);
static void sub_8020FA0(u8);
void sub_8020FC4(struct BerryCrushGame *);
void sub_8022BEC(u16, u8, u8 *);
void sub_8024604(u8 *, u8, s8, u8, u8, u8, u8);
static int sub_8021450(struct BerryCrushGame *);
void sub_8022588(struct BerryCrushGame *);
void sub_8022600(struct BerryCrushGame *);
void sub_80226D0(struct BerryCrushGame *);
void sub_8022730(struct BerryCrushGame *);
void sub_8022960(struct BerryCrushGame *);
void sub_8022524(struct BerryCrushGame_138 *, u16);
void sub_8022B28(struct Sprite *);
extern struct BerryCrushGame *gUnknown_02022C90;
extern const struct BgTemplate gUnknown_082F32C8[4];
extern const u8 gBerryCrushGrinderTopTilemap[];
extern const u8 gBerryCrushContainerCapTilemap[];
extern const u8 gBerryCrushBackgroundTilemap[];
extern const struct SpriteTemplate gUnknown_082F436C;
extern const u16 gUnknown_082F41E8[];
extern const s8 gUnknown_082F41CC[][2];
extern const s8 gUnknown_082F41D2[][2];
struct BerryCrushGame *sub_8020C00(void)
{
return gUnknown_02022C90;
}
int sub_8020C0C(MainCallback callback)
{
if (!gUnknown_02022C90)
return 2;
if (!callback)
callback = gUnknown_02022C90->unk0;
DestroyTask(gUnknown_02022C90->unkA);
FREE_AND_SET_NULL(gUnknown_02022C90);
SetMainCallback2(callback);
if (callback == CB2_ReturnToField)
{
gTextFlags.autoScroll = 1;
PlayNewMapMusic(MUS_POKECEN);
SetMainCallback1(CB1_Overworld);
}
return 0;
}
void sub_8020C70(MainCallback callback)
{
u8 playerCount = 0;
u8 multiplayerId;
if (!gReceivedRemoteLinkPlayers || gWirelessCommType == 0)
{
SetMainCallback2(callback);
gUnknown_03005000.unk_10 = 0;
gUnknown_03005000.unk_12 = 0;
gUnknown_03005000.unk_ee = 1;
return;
}
playerCount = GetLinkPlayerCount();
multiplayerId = GetMultiplayerId();
if (playerCount < 2 || multiplayerId >= playerCount)
{
SetMainCallback2(callback);
gUnknown_03005000.unk_10 = 0;
gUnknown_03005000.unk_12 = 0;
gUnknown_03005000.unk_ee = 1;
return;
}
gUnknown_02022C90 = AllocZeroed(sizeof(*gUnknown_02022C90));
if (!gUnknown_02022C90)
{
SetMainCallback2(callback);
gUnknown_03005000.unk_10 = 0;
gUnknown_03005000.unk_12 = 0;
gUnknown_03005000.unk_ee = 1;
return;
}
gUnknown_02022C90->unk0 = callback;
gUnknown_02022C90->unk8 = multiplayerId;
gUnknown_02022C90->unk9 = playerCount;
sub_8020FC4(gUnknown_02022C90);
gUnknown_02022C90->unk12 = 1;
gUnknown_02022C90->unkE = 1;
gUnknown_02022C90->unkF = 6;
sub_8024604(gUnknown_02022C90->unk36, 1, -1, 0, 16, 0, 0);
sub_8022BEC(4, 1, gUnknown_02022C90->unk36);
SetMainCallback2(sub_8020F88);
gUnknown_02022C90->unkA = CreateTask(sub_8020FA0, 8);
gTextFlags.autoScroll = 0;
}
static void sub_8020D8C(void)
{
if (gSpecialVar_ItemId < FIRST_BERRY_INDEX || gSpecialVar_ItemId > LAST_BERRY_INDEX + 1)
gSpecialVar_ItemId = ITEM_CHERI_BERRY;
else
RemoveBagItem(gSpecialVar_ItemId, 1);
gUnknown_02022C90->unk84.separate.others[gUnknown_02022C90->unk8].unk0 = gSpecialVar_ItemId - FIRST_BERRY_INDEX;
gUnknown_02022C90->unkE = 1;
gUnknown_02022C90->unkF = 9;
sub_8024604(gUnknown_02022C90->unk36, 0, -1, 0, 16, 0, 0);
sub_8022BEC(4, 1, gUnknown_02022C90->unk36);
gUnknown_02022C90->unkA = CreateTask(sub_8020FA0, 8);
SetMainCallback2(sub_8020F88);
}
void sub_8020E1C(void)
{
DestroyTask(gUnknown_02022C90->unkA);
sub_81AABF0(sub_8020D8C);
}
static void sub_8020E3C(void)
{
SetVBlankCallback(sub_8020F74);
}
void sub_8020E4C(void)
{
SetVBlankCallback(NULL);
}
void sub_8020E58(void)
{
u32 var0, var1;
var0 = gUnknown_02022C90->unk6C;
var0 <<= 8;
var0 = sub_81515FC(var0, 60 << 8);
var1 = gUnknown_02022C90->unk72;
var1 <<= 8;
var1 = sub_81515FC(var1, var0) & 0xFFFF;
gUnknown_02022C90->unk16 = var1;
switch (gUnknown_02022C90->unk9)
{
case 2:
if (gUnknown_02022C90->unk16 > gSaveBlock2Ptr->berryCrush.berryCrushResults[0])
{
gUnknown_02022C90->unk25_1 = 1;
gSaveBlock2Ptr->berryCrush.berryCrushResults[0] = gUnknown_02022C90->unk16;
}
break;
case 3:
if (gUnknown_02022C90->unk16 > gSaveBlock2Ptr->berryCrush.berryCrushResults[1])
{
gUnknown_02022C90->unk25_1 = 1;
gSaveBlock2Ptr->berryCrush.berryCrushResults[1] = gUnknown_02022C90->unk16;
}
break;
case 4:
if (gUnknown_02022C90->unk16 > gSaveBlock2Ptr->berryCrush.berryCrushResults[2])
{
gUnknown_02022C90->unk25_1 = 1;
gSaveBlock2Ptr->berryCrush.berryCrushResults[2] = gUnknown_02022C90->unk16;
}
break;
case 5:
if (gUnknown_02022C90->unk16 > gSaveBlock2Ptr->berryCrush.berryCrushResults[3])
{
gUnknown_02022C90->unk25_1 = 1;
gSaveBlock2Ptr->berryCrush.berryCrushResults[3] = gUnknown_02022C90->unk16;
}
break;
}
gUnknown_02022C90->unk1C = gUnknown_02022C90->unk68;
if (GiveBerryPowder(gUnknown_02022C90->unk1C))
return;
gUnknown_02022C90->unk25_0 = 1;
}
static void sub_8020F74(void)
{
TransferPlttBuffer();
LoadOam();
ProcessSpriteCopyRequests();
}
static void sub_8020F88(void)
{
RunTasks();
RunTextPrinters();
AnimateSprites();
BuildOamBuffer();
}
static void sub_8020FA0(u8 taskId)
{
if (gUnknown_02022C90->unk4)
gUnknown_02022C90->unk4(gUnknown_02022C90, gUnknown_02022C90->unk36);
sub_8021450(gUnknown_02022C90);
}
#ifdef NONMATCHING
void sub_8020FC4(struct BerryCrushGame *arg0)
{
u8 i;
for (i = 0; i < arg0->unk9; i++)
StringCopy(arg0->unk84.players[i].unk14, gLinkPlayers[i].name);
for (; i < 5; i++)
{
memset(arg0->unk84.players[i].unk14, 1, PLAYER_NAME_LENGTH);
arg0->unk84.players[i].unk14[PLAYER_NAME_LENGTH] = EOS;
}
switch (gSaveBlock2Ptr->optionsTextSpeed)
{
case OPTIONS_TEXT_SPEED_SLOW:
arg0->unkB = 8;
break;
case OPTIONS_TEXT_SPEED_MID:
arg0->unkB = 4;
break;
case OPTIONS_TEXT_SPEED_FAST:
arg0->unkB = 1;
break;
}
}
#else
NAKED
void sub_8020FC4(struct BerryCrushGame *arg0)
{
asm_unified("\n\
push {r4-r6,lr}\n\
adds r6, r0, 0\n\
movs r5, 0\n\
b _08020FE6\n\
LOOP_1:\n\
lsls r0, r5, 5\n\
adds r0, 0x98\n\
adds r0, r6, r0\n\
lsls r1, r5, 3\n\
subs r1, r5\n\
lsls r1, 2\n\
ldr r2, =gLinkPlayers + 8\n\
adds r1, r2\n\
bl StringCopy\n\
adds r0, r5, 0x1\n\
lsls r0, 24\n\
lsrs r5, r0, 24\n\
_08020FE6:\n\
ldrb r0, [r6, 0x9]\n\
cmp r5, r0\n\
bcc LOOP_1\n\
cmp r5, 0x4\n\
bhi _08021012\n\
_08020FF0:\n\
lsls r4, r5, 5\n\
adds r0, r4, 0\n\
adds r0, 0x98\n\
adds r0, r6, r0\n\
movs r1, 0x1\n\
movs r2, 0x7\n\
bl memset\n\
adds r4, r6, r4\n\
adds r4, 0x9F\n\
movs r0, 0xFF\n\
strb r0, [r4]\n\
adds r0, r5, 0x1\n\
lsls r0, 24\n\
lsrs r5, r0, 24\n\
cmp r5, 0x4\n\
bls _08020FF0\n\
_08021012:\n\
ldr r0, =gSaveBlock2Ptr\n\
ldr r0, [r0]\n\
ldrb r0, [r0, 0x14]\n\
lsls r0, 29\n\
lsrs r0, 29\n\
cmp r0, 0x1\n\
beq _0802103E\n\
cmp r0, 0x1\n\
bgt _08021034\n\
cmp r0, 0\n\
beq _0802103A\n\
b _08021046\n\
.pool\n\
_08021034:\n\
cmp r0, 0x2\n\
beq _08021042\n\
b _08021046\n\
_0802103A:\n\
movs r0, 0x8\n\
b _08021044\n\
_0802103E:\n\
movs r0, 0x4\n\
b _08021044\n\
_08021042:\n\
movs r0, 0x1\n\
_08021044:\n\
strb r0, [r6, 0xB]\n\
_08021046:\n\
pop {r4-r6}\n\
pop {r0}\n\
bx r0");
}
#endif // NONMATCHING
int sub_802104C(void)
{
struct BerryCrushGame *var0 = sub_8020C00();
if (!var0)
return -1;
switch (var0->unkC)
{
case 0:
SetVBlankCallback(NULL);
SetHBlankCallback(NULL);
SetGpuReg(REG_OFFSET_DISPCNT, 0);
ScanlineEffect_Stop();
reset_temp_tile_data_buffers();
break;
case 1:
CpuFill16(0, (void *)OAM, OAM_SIZE);
gReservedSpritePaletteCount = 0;
sub_8034C54(3);
break;
case 2:
ResetPaletteFade();
ResetSpriteData();
FreeAllSpritePalettes();
break;
case 3:
ResetBgsAndClearDma3BusyFlags(0);
InitBgsFromTemplates(0, gUnknown_082F32C8, ARRAY_COUNT(gUnknown_082F32C8));
SetBgTilemapBuffer(1, var0->unk1C0);
SetBgTilemapBuffer(2, var0->unk21C0);
SetBgTilemapBuffer(3, var0->unk31C0);
ChangeBgX(0, 0, 0);
ChangeBgY(0, 0, 0);
ChangeBgX(2, 0, 0);
ChangeBgY(2, 0, 0);
ChangeBgX(3, 0, 0);
ChangeBgY(3, 0, 0);
SetGpuReg(REG_OFFSET_BLDCNT, 0);
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
break;
case 4:
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 64);
FillBgTilemapBufferRect_Palette0(2, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(3, 0, 0, 0, 32, 32);
break;
case 5:
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(3);
decompress_and_copy_tile_data_to_vram(1, gUnknown_08DE34B8, 0, 0, 0);
break;
case 6:
if (free_temp_tile_data_buffers_if_possible())
return 0;
InitStandardTextBoxWindows();
sub_8197200();
sub_8022588(var0);
sub_8022600(var0);
gPaletteFade.bufferTransferDisabled = 1;
break;
case 7:
LoadPalette(gUnknown_08DE3398, 0, 0x180);
CopyToBgTilemapBuffer(1, gBerryCrushGrinderTopTilemap, 0, 0);
CopyToBgTilemapBuffer(2, gBerryCrushContainerCapTilemap, 0, 0);
CopyToBgTilemapBuffer(3, gBerryCrushBackgroundTilemap, 0, 0);
sub_80226D0(var0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(3);
break;
case 8:
sub_800E0E8();
CreateWirelessStatusIndicatorSprite(0, 0);
sub_8022730(var0);
SetGpuReg(REG_OFFSET_BG1VOFS, -gSpriteCoordOffsetY);
ChangeBgX(1, 0, 0);
ChangeBgY(1, 0, 0);
break;
case 9:
gPaletteFade.bufferTransferDisabled = 0;
BlendPalettes(0xFFFFFFFF, 16, RGB_BLACK);
ShowBg(0);
ShowBg(1);
ShowBg(2);
ShowBg(3);
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
sub_8020E3C();
var0->unkC = 0;
return 1;
}
var0->unkC++;
return 0;
}
int sub_802130C(void)
{
struct BerryCrushGame *var0 = sub_8020C00();
if (!var0)
return -1;
switch (var0->unkC)
{
case 0:
sub_8010434();
break;
case 1:
if (!IsLinkTaskFinished())
return 0;
// fall through. The original author forgot to use "break" here
// because this will call BeginNormalPaletteFade() twice.
case 2:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
UpdatePaletteFade();
break;
case 3:
if (UpdatePaletteFade())
return 0;
break;
case 4:
FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(1, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(2, 0, 0, 0, 32, 32);
FillBgTilemapBufferRect_Palette0(3, 0, 0, 0, 32, 32);
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(3);
break;
case 5:
FreeAllWindowBuffers();
HideBg(0);
UnsetBgTilemapBuffer(0);
HideBg(1);
UnsetBgTilemapBuffer(1);
HideBg(2);
UnsetBgTilemapBuffer(2);
HideBg(3);
UnsetBgTilemapBuffer(3);
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
break;
case 6:
sub_800E084();
sub_8022960(var0);
sub_8034CC8();
break;
case 7:
var0->unkC = 0;
return 1;
}
var0->unkC++;
return 0;
}
static int sub_8021450(struct BerryCrushGame *arg0)
{
gSpriteCoordOffsetY = arg0->unk2A + arg0->unk2C;
SetGpuReg(REG_OFFSET_BG1VOFS, -gSpriteCoordOffsetY);
if (arg0->unk12 == 7)
{
sub_8022524(&arg0->unk138, arg0->unk28);
}
return 0;
}
void sub_8021488(struct BerryCrushGame *arg0)
{
arg0->unk2A = -104;
arg0->unk2C = 0;
gSpriteCoordOffsetX = 0;
gSpriteCoordOffsetY = -104;
}
void sub_80214A8(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1)
{
u8 i;
u8 spriteId;
s16 var0, var1;
s16 *data;
int var3;
s16 var5;
u32 var6;
for (i = 0; i < arg0->unk9; i++)
{
spriteId = AddCustomItemIconSprite(
&gUnknown_082F436C,
gUnknown_082F41E8[i],
gUnknown_082F41E8[i],
arg0->unk84.separate.others[i].unk0 + 133);
arg1->unk38[i] = &gSprites[spriteId];
arg1->unk38[i]->oam.priority = 3;
arg1->unk38[i]->affineAnimPaused = 1;
arg1->unk38[i]->pos1.x = arg1->unkC[i]->unk8 + 120;
arg1->unk38[i]->pos1.y = -16;
data = arg1->unk38[i]->data;
var5 = 512;
data[1] = var5;
data[2] = 32;
data[7] = 112;
var0 = arg1->unkC[i]->unkA - arg1->unkC[i]->unk8;
var3 = var0;
if (var0 < 0)
var3 += 3;
data[6] = var3 >> 2;
var0 *= 128;
var6 = var5 + 32;
var6 = var6 / 2;
var1 = sub_81515D4(7, 0x3F80, var6);
data[0] = (u16)arg1->unk38[i]->pos1.x * 128;
data[3] = sub_81515D4(7, var0, var1);
var1 = sub_8151550(7, var1, 85);
data[4] = 0;
data[5] = sub_81515D4(7, 0x3F80, var1);
data[7] |= 0x8000;
if (arg1->unkC[i]->unk8 < 0)
StartSpriteAffineAnim(arg1->unk38[i], 1);
}
}
void sub_8021608(struct Sprite *sprite)
{
s16 *data = sprite->data;
data[1] += data[2];
sprite->pos2.y += data[1] >> 8;
if (data[7] & 0x8000)
{
sprite->data[0] += data[3];
data[4] += data[5];
sprite->pos2.x = Sin(data[4] >> 7, data[6]);
if ((data[7] & 0x8000) && (data[4] >> 7) > 126)
{
sprite->pos2.x = 0;
data[7] &= 0x7FFF;
}
}
sprite->pos1.x = data[0] >> 7;
if (sprite->pos1.y + sprite->pos2.y >= (data[7] & 0x7FFF))
{
sprite->callback = SpriteCallbackDummy;
FreeSpriteOamMatrix(sprite);
DestroySprite(sprite);
}
}
void sub_80216A8(struct BerryCrushGame *arg0)
{
u8 i;
for (i = 0; i < arg0->unk9; i++)
{
FreeSpritePaletteByTag(gUnknown_082F41E8[i]);
FreeSpriteTilesByTag(gUnknown_082F41E8[i]);
}
}
// void sub_80216E0(struct BerryCrushGame *arg0, struct BerryCrushGame_138 *arg1)
// {
// u8 sp4;
// struct BerryCrushGame_4E *var4E;
// u8 i;
// u16 var0;
// sp4 = 0;
// var4E = &arg0->unk40.unkE;
// for (i = 0; i < arg0->unk9; i++)
// {
// var0 = var4E->unkA >> (i * 3);
// var0 &= 7;
// if (var0)
// {
// int offset;
// sp4++;
// if (var0 & 0x4)
// StartSpriteAnim(arg1->unk24[i], 1);
// else
// StartSpriteAnim(arg1->unk24[i], 0);
// arg1->unk24[i]->invisible = 0;
// arg1->unk24[i]->animPaused = 0;
// offset = (var0 % 4) - 1;
// arg1->unk24[i]->pos2.x = gUnknown_082F41CC[offset][0];
// arg1->unk24[i]->pos2.y = gUnknown_082F41CC[offset][1];
// }
// }
// if (sp4 == 0)
// {
// arg0->unk25_2 = 0;
// }
// else
// {
// u8 var3 = arg0->unk28 % 3;
// u16 var2 = var3;
// for (i = 0; i < var4E->unkC * 2 + 3; i++)
// {
// if (arg1->unk4C[i]->invisible)
// {
// arg1->unk4C[i]->callback = sub_8022B28;
// arg1->unk4C[i]->pos1.x = gUnknown_082F41D2[i][0] + 120;
// arg1->unk4C[i]->pos1.y = gUnknown_082F41D2[i][1] + (136 - var2 * 4);
// arg1->unk4C[i]->pos2.x = gUnknown_082F41D2[i][0] / (var3 * 4);
// arg1->unk4C[i]->pos2.y = gUnknown_082F41D2[i][1];
// if (var4E->unk4 & 0x2)
// StartSpriteAnim(arg1->unk4C[i], 1);
// else
// StartSpriteAnim(arg1->unk4C[i], 0);
// var2++;
// if (var2 > 3)
// var2 = 0;
// }
// }
// if (arg0->unk25_2)
// {
// arg0->unk25_2 = 0;
// }
// else
// {
// if (sp4 == 1)
// PlaySE(SE_TOY_DANGO);
// else
// PlaySE(SE_TOY_KABE);
// arg0->unk25_2 = 1;
// }
// }
// }
+128
View File
@@ -0,0 +1,128 @@
#include "global.h"
#include "berry_powder.h"
#include "bg.h"
#include "event_data.h"
#include "load_save.h"
#include "menu.h"
#include "string_util.h"
#include "strings.h"
#include "text.h"
#include "text_window.h"
#include "window.h"
#define MAX_BERRY_POWDER 99999
static EWRAM_DATA u8 sBerryPowderVendorWindowId = 0;
static u32 DecryptBerryPowder(u32 *powder)
{
return *powder ^ gSaveBlock2Ptr->encryptionKey;
}
void SetBerryPowder(u32 *powder, u32 amount)
{
*powder = amount ^ gSaveBlock2Ptr->encryptionKey;
}
void ApplyNewEncryptionKeyToBerryPowder(u32 encryptionKey)
{
u32 *powder = &gSaveBlock2Ptr->berryCrush.berryPowderAmount;
ApplyNewEncryptionKeyToWord(powder, encryptionKey);
}
static bool8 HasEnoughBerryPowder_(u32 cost)
{
u32 *powder = &gSaveBlock2Ptr->berryCrush.berryPowderAmount;
if (DecryptBerryPowder(powder) < cost)
return FALSE;
else
return TRUE;
}
bool8 HasEnoughBerryPowder(void)
{
u32 *powder = &gSaveBlock2Ptr->berryCrush.berryPowderAmount;
if (DecryptBerryPowder(powder) < gSpecialVar_0x8004)
return FALSE;
else
return TRUE;
}
bool8 GiveBerryPowder(u32 amountToAdd)
{
u32 *powder = &gSaveBlock2Ptr->berryCrush.berryPowderAmount;
u32 amount = DecryptBerryPowder(powder) + amountToAdd;
if (amount > MAX_BERRY_POWDER)
{
SetBerryPowder(powder, MAX_BERRY_POWDER);
return FALSE;
}
else
{
SetBerryPowder(powder, amount);
return TRUE;
}
}
static bool8 TakeBerryPowder_(u32 cost)
{
u32 *powder = &gSaveBlock2Ptr->berryCrush.berryPowderAmount;
if (!HasEnoughBerryPowder_(cost))
return FALSE;
SetBerryPowder(powder, DecryptBerryPowder(powder) - cost);
return TRUE;
}
bool8 TakeBerryPowder(void)
{
u32 *powder = &gSaveBlock2Ptr->berryCrush.berryPowderAmount;
if (!HasEnoughBerryPowder_(gSpecialVar_0x8004))
return FALSE;
SetBerryPowder(powder, DecryptBerryPowder(powder) - gSpecialVar_0x8004);
return TRUE;
}
u32 GetBerryPowder(void)
{
u32 *powder = &gSaveBlock2Ptr->berryCrush.berryPowderAmount;
return DecryptBerryPowder(powder);
}
static void PrintBerryPowderAmount(u8 windowId, int amount, u8 x, u8 y, u8 speed)
{
ConvertIntToDecimalStringN(gStringVar1, amount, STR_CONV_MODE_RIGHT_ALIGN, 5);
AddTextPrinterParameterized(windowId, 1, gStringVar1, x, y, speed, NULL);
}
static void DrawPlayerPowderAmount(u8 windowId, u16 baseTileOffset, u8 paletteNum, u32 amount)
{
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, baseTileOffset, paletteNum);
AddTextPrinterParameterized(windowId, 1, gText_Powder, 0, 1, TEXT_SPEED_FF, NULL);
PrintBerryPowderAmount(windowId, amount, 26, 17, 0);
}
void PrintPlayerBerryPowderAmount(void)
{
u32 amount = GetBerryPowder();
PrintBerryPowderAmount(sBerryPowderVendorWindowId, amount, 26, 17, 0);
}
void DisplayBerryPowderVendorMenu(void)
{
struct WindowTemplate template;
SetWindowTemplateFields(&template, 0, 1, 1, 7, 4, 15, 0x1C);
sBerryPowderVendorWindowId = AddWindow(&template);
FillWindowPixelBuffer(sBerryPowderVendorWindowId, PIXEL_FILL(0));
PutWindowTilemap(sBerryPowderVendorWindowId);
LoadUserWindowBorderGfx_(sBerryPowderVendorWindowId, 0x21D, 0xD0);
DrawPlayerPowderAmount(sBerryPowderVendorWindowId, 0x21D, 13, GetBerryPowder());
}
void RemoveBerryPowderVendorMenu(void)
{
ClearWindowTilemap(sBerryPowderVendorWindowId);
ClearStdWindowAndFrameToTransparent(sBerryPowderVendorWindowId, TRUE);
RemoveWindow(sBerryPowderVendorWindowId);
}
+6 -3
View File
@@ -153,19 +153,22 @@ const struct SpritePalette gUnknown_085CDB74[] = {
const struct OamData gOamData_85CDB84 = {
.affineMode = ST_OAM_AFFINE_DOUBLE,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 2
};
const struct OamData gOamData_85CDB8C = {
.affineMode = ST_OAM_AFFINE_DOUBLE,
.shape = ST_OAM_H_RECTANGLE,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.priority = 2
};
const struct OamData gOamData_85CDB94 = {
.affineMode = ST_OAM_AFFINE_DOUBLE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2
};
+2 -1
View File
@@ -17,7 +17,8 @@
#include "menu.h"
#include "overworld.h"
#include "palette.h"
#include "rom_8011DC0.h"
#include "union_room.h"
#include "mevent2.h"
#include "script.h"
#include "script_pokemon_util_80F87D8.h"
#include "sound.h"
+2 -2
View File
@@ -154,10 +154,10 @@ const struct OamData gUnknown_085B0830 =
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 1,
.bpp = ST_OAM_8BPP,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+646 -55
View File
@@ -3,6 +3,13 @@
#include "contest_painting.h"
#include "constants/rgb.h"
struct Unk8125954
{
u8 unk0;
u8 unk1;
u16 unk2;
};
// IWRAM common
u8 gUnknown_03006164;
u16 (*gUnknown_03006168)[][32];
@@ -12,32 +19,46 @@ u8 gUnknown_03006174;
u8 gUnknown_03006178;
u8 gUnknown_0300617C;
u8 gUnknown_03006180;
u16 gUnknown_03006184;
u16 *gUnknown_03006184;
u16 gUnknown_03006188;
// this file's functions
void sub_8125230(void);
void sub_81252E8(void);
void sub_81254E0(void);
void sub_8125630(void);
void sub_8125448(void);
void sub_81257F8(void);
void sub_81258A0(void);
void sub_81256C8(void);
void sub_8125250(void);
void sub_81253A4(u8);
void sub_81250B8(u8);
void sub_8125170(u8);
void sub_8125954(u16);
u16 ConvertColorToGrayscale(u16*);
u16 sub_8125E18(u16*, u16*, u16*);
u16 ConvertCoolColor(u16*, u8);
u16 ConvertToBlackOrWhite(u16*);
u16 sub_8125C98(u16*, u16*);
u16 InvertColor(u16*);
u16 sub_8125F38(u16*, u16*, u16*);
u16 sub_8125CF4(u16*, u16*);
u16 GetCoolColorFromPersonality(u8);
static void sub_8125230(void);
static void sub_81252E8(void);
static void sub_81254E0(void);
static void sub_8125630(void);
static void sub_8125448(void);
static void sub_81257F8(void);
static void sub_81258A0(void);
static void sub_81256C8(void);
static void sub_8125250(void);
static void sub_81253A4(u8);
static void sub_81250B8(u8);
static void sub_8125170(u8);
static void sub_8125954(u16);
static u16 ConvertColorToGrayscale(u16*);
static u16 sub_8125E18(u16*, u16*, u16*);
static u16 ConvertCoolColor(u16*, u8);
static u16 ConvertToBlackOrWhite(u16*);
static u16 sub_8125C98(u16*, u16*);
static u16 InvertColor(u16*);
static u16 sub_8125F38(u16*, u16*, u16*);
static u16 sub_8125CF4(u16*, u16*);
static u16 GetCoolColorFromPersonality(u8);
static void sub_81263A4(bool8);
static void sub_8126270(void);
static void sub_8126714(void);
static void sub_8126370(void);
static void sub_8126664(void);
static void sub_8126334(void);
static void sub_81265B4(void);
static void sub_8126318(void);
static void sub_81264FC(void);
static u16 sub_81267C4(u16*);
static u16 sub_8126908(u16*);
static u16 sub_812693C(u16*);
static u16 sub_8126838(u16*);
extern const u8 gUnknown_085A1F94[][3];
void sub_8124F2C(struct Unk030061A0 *info)
{
@@ -104,7 +125,7 @@ void sub_8124F2C(struct Unk030061A0 *info)
}
}
void sub_81250B8(u8 a0) // it changes palette someway somehow... .__.
static void sub_81250B8(u8 a0) // it changes palette someway somehow... .__.
{
u8 i, j;
@@ -127,7 +148,7 @@ void sub_81250B8(u8 a0) // it changes palette someway somehow... .__.
}
}
void sub_8125170(u8 a0)
static void sub_8125170(u8 a0)
{
u8 i, j;
@@ -149,14 +170,14 @@ void sub_8125170(u8 a0)
}
}
void sub_8125230(void)
static void sub_8125230(void)
{
u32 i;
for (i = 0; i < 3200; i++)
sub_8125954(i);
}
void sub_8125250(void)
static void sub_8125250(void)
{
u8 i, j;
@@ -174,7 +195,7 @@ void sub_8125250(void)
}
}
void sub_81252E8(void)
static void sub_81252E8(void)
{
u8 i, j;
@@ -200,7 +221,7 @@ void sub_81252E8(void)
}
}
void sub_81253A4(u8 arg0)
static void sub_81253A4(u8 arg0)
{
u8 i, j;
@@ -218,7 +239,7 @@ void sub_81253A4(u8 arg0)
}
}
void sub_8125448(void)
static void sub_8125448(void)
{
u8 i, j;
@@ -236,7 +257,7 @@ void sub_8125448(void)
}
}
void sub_81254E0(void)
static void sub_81254E0(void)
{
u8 i, j;
u16 *palette;
@@ -270,7 +291,7 @@ void sub_81254E0(void)
}
}
void sub_8125630(void)
static void sub_8125630(void)
{
u8 i, j;
@@ -288,7 +309,7 @@ void sub_8125630(void)
}
}
void sub_81256C8(void)
static void sub_81256C8(void)
{
u8 i, j;
u16 *palette;
@@ -349,7 +370,7 @@ void sub_81256C8(void)
}
}
void sub_81257F8(void)
static void sub_81257F8(void)
{
u8 i, j;
@@ -369,7 +390,7 @@ void sub_81257F8(void)
}
}
void sub_81258A0(void)
static void sub_81258A0(void)
{
u8 i, j;
@@ -389,16 +410,7 @@ void sub_81258A0(void)
}
}
struct Unk8125954
{
u8 unk0;
u8 unk1;
u16 unk2;
};
extern const u8 gUnknown_085A1F94[][3];
void sub_8125954(u16 arg0)
static void sub_8125954(u16 arg0)
{
u8 i;
u8 r5, r9;
@@ -487,7 +499,7 @@ void sub_8125954(u16 arg0)
}
}
u16 ConvertColorToGrayscale(u16 *color)
static u16 ConvertColorToGrayscale(u16 *color)
{
s32 clr = *color;
s32 r = clr & 0x1F;
@@ -499,7 +511,7 @@ u16 ConvertColorToGrayscale(u16 *color)
// The dark colors are the colored edges of the Cool painting effect.
// Everything else is white.
u16 ConvertCoolColor(u16 *color, u8 personality)
static u16 ConvertCoolColor(u16 *color, u8 personality)
{
u16 red = *color & 0x1F;
u16 green = (*color >> 5) & 0x1F;
@@ -513,7 +525,7 @@ u16 ConvertCoolColor(u16 *color, u8 personality)
// Based on the given value, which comes from the first 8 bits of
// the mon's personality value, return a color.
u16 GetCoolColorFromPersonality(u8 personality)
static u16 GetCoolColorFromPersonality(u8 personality)
{
u16 red = 0;
u16 green = 0;
@@ -564,7 +576,7 @@ u16 GetCoolColorFromPersonality(u8 personality)
return RGB2(red, green, blue);
}
u16 ConvertToBlackOrWhite(u16 *color)
static u16 ConvertToBlackOrWhite(u16 *color)
{
u16 red = *color & 0x1F;
u16 green = (*color >> 5) & 0x1F;
@@ -576,7 +588,7 @@ u16 ConvertToBlackOrWhite(u16 *color)
return RGB_WHITE;
}
u16 sub_8125C98(u16 *colorA, u16 *colorB)
static u16 sub_8125C98(u16 *colorA, u16 *colorB)
{
if (*colorA)
{
@@ -591,7 +603,7 @@ u16 sub_8125C98(u16 *colorA, u16 *colorB)
return RGB_BLACK;
}
u16 InvertColor(u16 *color)
static u16 InvertColor(u16 *color)
{
u16 red = *color & 0x1F;
u16 green = (*color >> 5) & 0x1F;
@@ -604,7 +616,7 @@ u16 InvertColor(u16 *color)
return RGB2(red, green, blue);
}
u16 sub_8125CF4(u16 *a0, u16 *a1)
static u16 sub_8125CF4(u16 *a0, u16 *a1)
{
u16 sp0[2][3];
u16 spC[3];
@@ -660,7 +672,7 @@ u16 sub_8125CF4(u16 *a0, u16 *a1)
return RGB2(r, g, b);
}
u16 sub_8125E18(u16 * a0, u16 * a1, u16 * a2)
static u16 sub_8125E18(u16 * a0, u16 * a1, u16 * a2)
{
u16 red, green, blue;
u16 avg0, avg1, avg2;
@@ -704,7 +716,7 @@ u16 sub_8125E18(u16 * a0, u16 * a1, u16 * a2)
return RGB2(red, green, blue);
}
u16 sub_8125F38(u16 *a0, u16 *a1, u16 *a2)
static u16 sub_8125F38(u16 *a0, u16 *a1, u16 *a2)
{
u16 red, green, blue;
u16 avg0, avg1, avg2;
@@ -772,3 +784,582 @@ void sub_8126058(struct Unk030061A0 *arg0)
}
}
*/
NAKED
void sub_8126058(struct Unk030061A0 *arg0)
{
asm_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\
ldrb r1, [r0, 0x1D]\n\
lsrs r5, r1, 3\n\
ldrb r1, [r0, 0x1E]\n\
lsrs r1, 3\n\
str r1, [sp, 0x8]\n\
ldr r1, [r0, 0x4]\n\
str r1, [sp]\n\
ldr r2, [r0, 0x10]\n\
str r2, [sp, 0x4]\n\
ldrh r0, [r0, 0x16]\n\
cmp r0, 0x2\n\
bne _08126108\n\
movs r1, 0\n\
ldr r0, [sp, 0x8]\n\
cmp r1, r0\n\
bcc _08126086\n\
b _08126194\n\
_08126086:\n\
movs r0, 0\n\
adds r2, r1, 0x1\n\
mov r10, r2\n\
cmp r0, r5\n\
bcs _081260FA\n\
adds r2, r1, 0\n\
muls r2, r5\n\
mov r9, r2\n\
lsls r1, 3\n\
mov r8, r1\n\
_0812609A:\n\
movs r4, 0\n\
lsls r6, r0, 4\n\
adds r7, r0, 0x1\n\
add r0, r9\n\
lsls r0, 6\n\
ldr r1, [sp, 0x4]\n\
adds r1, r0\n\
mov r12, r1\n\
_081260AA:\n\
lsls r0, r4, 3\n\
mov r2, r12\n\
adds r3, r2, r0\n\
mov r1, r8\n\
adds r0, r1, r4\n\
lsls r0, 3\n\
muls r0, r5\n\
lsls r0, 1\n\
ldr r2, [sp]\n\
adds r0, r2, r0\n\
adds r2, r0, r6\n\
ldrh r0, [r2, 0x2]\n\
lsls r0, 8\n\
ldrh r1, [r2]\n\
orrs r0, r1\n\
strh r0, [r3]\n\
ldrh r0, [r2, 0x6]\n\
lsls r0, 8\n\
ldrh r1, [r2, 0x4]\n\
orrs r0, r1\n\
strh r0, [r3, 0x2]\n\
ldrh r0, [r2, 0xA]\n\
lsls r0, 8\n\
ldrh r1, [r2, 0x8]\n\
orrs r0, r1\n\
strh r0, [r3, 0x4]\n\
ldrh r0, [r2, 0xE]\n\
lsls r0, 8\n\
ldrh r1, [r2, 0xC]\n\
orrs r0, r1\n\
strh r0, [r3, 0x6]\n\
adds r0, r4, 0x1\n\
lsls r0, 16\n\
lsrs r4, r0, 16\n\
cmp r4, 0x7\n\
bls _081260AA\n\
lsls r0, r7, 16\n\
lsrs r0, 16\n\
cmp r0, r5\n\
bcc _0812609A\n\
_081260FA:\n\
mov r1, r10\n\
lsls r0, r1, 16\n\
lsrs r1, r0, 16\n\
ldr r2, [sp, 0x8]\n\
cmp r1, r2\n\
bcc _08126086\n\
b _08126194\n\
_08126108:\n\
movs r1, 0\n\
ldr r0, [sp, 0x8]\n\
cmp r1, r0\n\
bcs _08126194\n\
_08126110:\n\
movs r0, 0\n\
adds r2, r1, 0x1\n\
mov r10, r2\n\
cmp r0, r5\n\
bcs _08126188\n\
adds r2, r1, 0\n\
muls r2, r5\n\
mov r9, r2\n\
lsls r1, 3\n\
mov r8, r1\n\
_08126124:\n\
movs r4, 0\n\
lsls r6, r0, 4\n\
adds r7, r0, 0x1\n\
add r0, r9\n\
lsls r0, 5\n\
ldr r1, [sp, 0x4]\n\
adds r1, r0\n\
mov r12, r1\n\
_08126134:\n\
lsls r0, r4, 2\n\
mov r2, r12\n\
adds r3, r2, r0\n\
mov r1, r8\n\
adds r0, r1, r4\n\
lsls r0, 3\n\
muls r0, r5\n\
lsls r0, 1\n\
ldr r2, [sp]\n\
adds r0, r2, r0\n\
adds r2, r0, r6\n\
ldrh r1, [r2, 0x2]\n\
lsls r1, 4\n\
ldrh r0, [r2]\n\
orrs r1, r0\n\
ldrh r0, [r2, 0x4]\n\
lsls r0, 8\n\
orrs r1, r0\n\
ldrh r0, [r2, 0x6]\n\
lsls r0, 12\n\
orrs r1, r0\n\
strh r1, [r3]\n\
ldrh r1, [r2, 0xA]\n\
lsls r1, 4\n\
ldrh r0, [r2, 0x8]\n\
orrs r1, r0\n\
ldrh r0, [r2, 0xC]\n\
lsls r0, 8\n\
orrs r1, r0\n\
ldrh r0, [r2, 0xE]\n\
lsls r0, 12\n\
orrs r1, r0\n\
strh r1, [r3, 0x2]\n\
adds r0, r4, 0x1\n\
lsls r0, 16\n\
lsrs r4, r0, 16\n\
cmp r4, 0x7\n\
bls _08126134\n\
lsls r0, r7, 16\n\
lsrs r0, 16\n\
cmp r0, r5\n\
bcc _08126124\n\
_08126188:\n\
mov r1, r10\n\
lsls r0, r1, 16\n\
lsrs r1, r0, 16\n\
ldr r2, [sp, 0x8]\n\
cmp r1, r2\n\
bcc _08126110\n\
_08126194:\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");
}
void sub_81261A4(struct Unk030061A0 *arg0)
{
gUnknown_03006188 = arg0->var_18 * 16;
gUnknown_03006184 = &arg0->var_8[gUnknown_03006188];
gUnknown_03006168 = arg0->var_4;
gUnknown_03006164 = arg0->var_19;
gUnknown_03006178 = arg0->var_1A;
gUnknown_03006174 = arg0->var_1B;
gUnknown_0300616C = arg0->var_1C;
gUnknown_03006180 = arg0->var_1D;
gUnknown_03006170 = arg0->var_1E;
switch (arg0->var_14)
{
case 0:
sub_81263A4(FALSE);
break;
case 1:
sub_81263A4(TRUE);
break;
case 2:
sub_8126270();
sub_8126714();
break;
case 3:
sub_8126370();
sub_8126664();
break;
case 4:
sub_8126334();
sub_81265B4();
break;
case 5:
sub_8126318();
sub_81264FC();
break;
}
}
static void sub_8126270(void)
{
gUnknown_03006184[0] = RGB2(0, 0, 0);
gUnknown_03006184[1] = RGB2(6, 6, 6);
gUnknown_03006184[2] = RGB2(29, 29, 29);
gUnknown_03006184[3] = RGB2(11, 11, 11);
gUnknown_03006184[4] = RGB2(29, 6, 6);
gUnknown_03006184[5] = RGB2(6, 29, 6);
gUnknown_03006184[6] = RGB2(6, 6, 29);
gUnknown_03006184[7] = RGB2(29, 29, 6);
gUnknown_03006184[8] = RGB2(29, 6, 29);
gUnknown_03006184[9] = RGB2(6, 29, 29);
gUnknown_03006184[10] = RGB2(29, 11, 6);
gUnknown_03006184[11] = RGB2(11, 29, 6);
gUnknown_03006184[12] = RGB2(6, 11, 29);
gUnknown_03006184[13] = RGB2(29, 6, 11);
gUnknown_03006184[14] = RGB2(6, 29, 11);
gUnknown_03006184[15] = RGB2(11, 6, 29);
}
static void sub_8126318(void)
{
gUnknown_03006184[0] = RGB2(0, 0, 0);
gUnknown_03006184[1] = RGB2(0, 0, 0);
gUnknown_03006184[2] = RGB2(31, 31, 31);
}
static void sub_8126334(void)
{
u8 i;
gUnknown_03006184[0] = RGB2(0, 0, 0);
gUnknown_03006184[1] = RGB2(0, 0, 0);
for (i = 0; i < 14; i++)
gUnknown_03006184[i + 2] = RGB2(2 * (i + 2), 2 * (i + 2), 2 * (i + 2));
}
static void sub_8126370(void)
{
u8 i;
gUnknown_03006184[0] = RGB2(0, 0, 0);
for (i = 0; i < 32; i++)
gUnknown_03006184[i + 1] = RGB2(i, i, i);
}
static void sub_81263A4(bool8 arg0)
{
u8 i, j;
u16 maxIndex;
maxIndex = 0xDF;
if (!arg0)
maxIndex = 0xFF;
for (j = 0; j < maxIndex; j++)
gUnknown_03006184[j] = 0;
gUnknown_03006184[maxIndex] = RGB2(15, 15, 15);
for (i = 0; i < gUnknown_0300616C; i++)
{
u16* var2 = &(*gUnknown_03006168)[0][(gUnknown_03006178 + i) * gUnknown_03006180];
u16* pal = &var2[gUnknown_03006164];
for (j = 0; j < gUnknown_03006174; j++, pal++)
{
if (*pal & 0x8000)
{
*pal = gUnknown_03006188;
}
else
{
u16 color = sub_81267C4(pal);
u8 curIndex = 1;
if (curIndex < maxIndex)
{
if (gUnknown_03006184[curIndex] == RGB_BLACK)
{
gUnknown_03006184[curIndex] = color;
*pal = gUnknown_03006188 + curIndex;
}
else
{
while (curIndex < maxIndex)
{
if (gUnknown_03006184[curIndex] == RGB_BLACK)
{
gUnknown_03006184[curIndex] = color;
*pal = gUnknown_03006188 + curIndex;
break;
}
if (gUnknown_03006184[curIndex] == color)
{
*pal = gUnknown_03006188 + curIndex;
break;
}
curIndex++;
}
}
}
if (curIndex == maxIndex)
{
curIndex = maxIndex;
*pal = curIndex;
}
}
}
}
}
static void sub_81264FC(void)
{
u8 i, j;
for (i = 0; i < gUnknown_0300616C; i++)
{
u16* var2 = &(*gUnknown_03006168)[0][(gUnknown_03006178 + i) * gUnknown_03006180];
u16* pal = &var2[gUnknown_03006164];
for (j = 0; j < gUnknown_03006174; j++, pal++)
{
if (*pal & 0x8000)
{
*pal = gUnknown_03006188;
}
else
{
if (ConvertToBlackOrWhite(pal) == RGB_BLACK)
*pal = gUnknown_03006188 + 1;
else
*pal = gUnknown_03006188 + 2;
}
}
}
}
static void sub_81265B4(void)
{
u8 i, j;
for (i = 0; i < gUnknown_0300616C; i++)
{
u16* var2 = &(*gUnknown_03006168)[0][(gUnknown_03006178 + i) * gUnknown_03006180];
u16* pal = &var2[gUnknown_03006164];
for (j = 0; j < gUnknown_03006174; j++, pal++)
{
if (*pal & 0x8000)
*pal = gUnknown_03006188;
else
*pal = sub_8126908(pal) + gUnknown_03006188;
}
}
}
static void sub_8126664(void)
{
u8 i, j;
for (i = 0; i < gUnknown_0300616C; i++)
{
u16* var2 = &(*gUnknown_03006168)[0][(gUnknown_03006178 + i) * gUnknown_03006180];
u16* pal = &var2[gUnknown_03006164];
for (j = 0; j < gUnknown_03006174; j++, pal++)
{
if (*pal & 0x8000)
*pal = gUnknown_03006188;
else
*pal = sub_812693C(pal) + gUnknown_03006188;
}
}
}
static void sub_8126714(void)
{
u8 i, j;
for (i = 0; i < gUnknown_0300616C; i++)
{
u16* var2 = &(*gUnknown_03006168)[0][(gUnknown_03006178 + i) * gUnknown_03006180];
u16* pal = &var2[gUnknown_03006164];
for (j = 0; j < gUnknown_03006174; j++, pal++)
{
if (*pal & 0x8000)
*pal = gUnknown_03006188;
else
*pal = sub_8126838(pal) + gUnknown_03006188;
}
}
}
static u16 sub_81267C4(u16 *color)
{
u16 red = *color & 0x1F;
u16 green = (*color >> 5) & 0x1F;
u16 blue = (*color >> 10) & 0x1F;
if (red & 3)
red = (red & 0x1C) + 4;
if (green & 3)
green = (green & 0x1C) + 4;
if (blue & 3)
blue = (blue & 0x1C) + 4;
if (red < 6)
red = 6;
if (red > 30)
red = 30;
if (green < 6)
green = 6;
if (green > 30)
green = 30;
if (blue < 6)
blue = 6;
if (blue > 30)
blue = 30;
return RGB2(red, green, blue);
}
static u16 sub_8126838(u16* color)
{
u16 red = *color & 0x1F;
u16 green = (*color >> 5) & 0x1F;
u16 blue = (*color >> 10) & 0x1F;
if (red < 12 && green < 11 && blue < 11)
return 1;
if (red > 19 && green > 19 && blue > 19)
return 2;
if (red > 19)
{
if (green > 19)
{
if (blue > 14)
return 2;
else
return 7;
}
else if (blue > 19)
{
if (green > 14)
return 2;
else
return 8;
}
}
if (green > 19 && blue > 19)
{
if (red > 14)
return 2;
else
return 9;
}
if (red > 19)
{
if (green > 11)
{
if (blue > 11)
{
if (green < blue)
return 8;
else
return 7;
}
else
{
return 10;
}
}
else if (blue > 11)
{
return 13;
}
else
{
return 4;
}
}
if (green > 19)
{
if (red > 11)
{
if (blue > 11)
{
if (red < blue)
return 9;
else
return 7;
}
else
{
return 11;
}
}
else
{
if (blue > 11)
return 14;
else
return 5;
}
}
if (blue > 19)
{
if (red > 11)
{
if (green > 11)
{
if (red < green)
return 9;
else
return 8;
}
}
else if (green > 11)
{
return 12;
}
if (blue > 11)
return 15;
else
return 6;
}
return 3;
}
static u16 sub_8126908(u16 *color)
{
u16 red = *color & 0x1F;
u16 green = (*color >> 5) & 0x1F;
u16 blue = (*color >> 10) & 0x1F;
u16 average = ((red + green + blue) / 3) & 0x1E;
if (average == 0)
return 1;
else
return average / 2;
}
static u16 sub_812693C(u16 *color)
{
u16 red = *color & 0x1F;
u16 green = (*color >> 5) & 0x1F;
u16 blue = (*color >> 10) & 0x1F;
u16 average = (red + green + blue) / 3;
return average + 1;
}
+2 -2
View File
@@ -1056,10 +1056,10 @@ static const struct OamData gUnknown_085E703C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
+16 -16
View File
@@ -1,47 +1,47 @@
const struct OamData gEventObjectBaseOam_8x8 = {
.shape = 0,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.priority = 2
};
const struct OamData gEventObjectBaseOam_16x8 = {
.shape = 1,
.size = 0,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.priority = 2
};
const struct OamData gEventObjectBaseOam_16x16 = {
.shape = 0,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2
};
const struct OamData gEventObjectBaseOam_32x8 = {
.shape = 1,
.size = 1,
.shape = SPRITE_SHAPE(32x8),
.size = SPRITE_SIZE(32x8),
.priority = 2
};
const struct OamData gEventObjectBaseOam_64x32 = {
.shape = 1,
.size = 3,
.shape = SPRITE_SHAPE(64x32),
.size = SPRITE_SIZE(64x32),
.priority = 2
};
const struct OamData gEventObjectBaseOam_16x32 = {
.shape = 2,
.size = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.priority = 2
};
const struct OamData gEventObjectBaseOam_32x32 = {
.shape = 0,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 2
};
const struct OamData gEventObjectBaseOam_64x64 = {
.shape = 0,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 2
};
+2788 -2788
View File
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -392,7 +392,9 @@ const struct SpritePalette gUnknown_085A73E0 = {
};
const struct OamData Unknown_085A73E8 = {
.size = 1, .priority = 1
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 1
};
const union AnimCmd Unknown_085A73F0[] = {
@@ -939,7 +941,7 @@ void sub_812764C(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
PlaySE(SE_SELECT);
SecretBasePC_SelectedDecorActions[data[11]][1](taskId);
break;
+15 -15
View File
@@ -14,8 +14,8 @@
#include "gpu_regs.h"
#include "graphics.h"
#include "international_string_util.h"
#include "link.h"
#include "main.h"
#include "mevent.h"
#include "menu.h"
#include "overworld.h"
#include "palette.h"
@@ -772,10 +772,10 @@ static const struct OamData sOamData_8597D10 = {
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 3,
.paletteNum = 0,
@@ -798,10 +798,10 @@ static const struct OamData sUnknown_08597D30 = {
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_H_RECTANGLE,
.shape = SPRITE_SHAPE(64x32),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -851,10 +851,10 @@ static const struct OamData sUnknown_08597D80 = {
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_H_RECTANGLE,
.shape = SPRITE_SHAPE(64x32),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -913,10 +913,10 @@ static const struct OamData sUnknown_08597DE8 = {
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 3,
.paletteNum = 0,
@@ -939,10 +939,10 @@ static const struct OamData sUnknown_08597E08 = {
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_H_RECTANGLE,
.shape = SPRITE_SHAPE(32x8),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(32x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -955,10 +955,10 @@ static const struct OamData gUnknown_08597E10 = {
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -1318,7 +1318,7 @@ void ShowEasyChatScreen(void)
words = gSaveBlock2Ptr->apprentices[0].easyChatWords;
break;
case EASY_CHAT_TYPE_QUESTIONNAIRE:
words = GetSaveBlock1Field3564();
words = sub_801B058();
break;
default:
return;
@@ -5531,7 +5531,7 @@ void InitializeEasyChatWordArray(u16 *words, u16 length)
void sub_811F8BC(void)
{
int i;
u16 *words = GetSaveBlock1Field3564();
u16 *words = sub_801B058();
for (i = 0; i < 4; i++)
words[i] = 0xFFFF;
}
+6 -6
View File
@@ -75,7 +75,7 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8
static IWRAM_DATA struct EggHatchData *sEggHatchData;
// rom data
static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/palettes/egg_palette.gbapal");
static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/egg/normal.gbapal");
static const u8 sEggHatchTiles[] = INCBIN_U8("graphics/misc/egg_hatch.4bpp");
static const u8 sEggShardTiles[] = INCBIN_U8("graphics/misc/egg_shard.4bpp");
@@ -86,10 +86,10 @@ static const struct OamData sOamData_EggHatch =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -166,10 +166,10 @@ static const struct OamData sOamData_EggShard =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -469,7 +469,7 @@ static void Task_EggHatch(u8 taskID)
{
CleanupOverworldWindowsAndTilemaps();
SetMainCallback2(CB2_EggHatch_0);
gFieldCallback = sub_80AF168;
gFieldCallback = FieldCallback_ReturnToEventScript2;
DestroyTask(taskID);
}
}
+553
View File
@@ -0,0 +1,553 @@
#include "global.h"
#include "alloc.h"
#include "decompress.h"
#include "ereader_helpers.h"
#include "link.h"
#include "main.h"
#include "union_room.h"
#include "save.h"
#include "sprite.h"
#include "task.h"
#include "util.h"
struct Unknown030012C8
{
u8 unk0[8];
u32 *unk8;
int unkC;
int unk10;
int unk14;
};
static void sub_81D4170(void);
static u16 sub_81D3EE8(u8);
static void sub_81D413C(void);
static void sub_81D414C(void);
static void sub_81D3F1C(u32, u32*, u32*);
static void sub_81D3F68(void);
extern struct Unknown030012C8 gUnknown_030012C8;
extern u16 gUnknown_030012E0;
extern u16 gUnknown_030012E2;
extern u16 gUnknown_030012E4;
extern u16 gUnknown_030012E6;
extern u32 gUnknown_030012E8;
extern u16 gUnknown_030012EC;
extern u16 gUnknown_030012EE;
extern u16 gUnknown_030012F0;
extern u16 gUnknown_030012F2;
extern u16 gUnknown_030012F4;
extern const u8 gUnknown_08625B6C[];
static u8 sub_81D38D4(void)
{
return (gSaveBlock1Ptr->trainerHill.unused + 1) % 256;
}
static bool32 sub_81D38FC(struct Unk81D38FC *arg0)
{
int checksum = CalcByteArraySum(arg0->unk0, 0x270);
if (checksum != arg0->checksum)
return FALSE;
return TRUE;
}
bool8 sub_81D3920(u8 *buffer)
{
u32 i;
u32 checksum;
int var0 = buffer[0];
if (var0 < 1 || var0 > 8)
return FALSE;
for (i = 0; i < var0; i++)
{
struct Unk81D38FC *var1 = (struct Unk81D38FC *)(&buffer[i * (sizeof(struct Unk81D38FC)) + 8]);
if (!sub_81D38FC(var1))
return FALSE;
}
checksum = CalcByteArraySum(buffer + 8, var0 * 0x274);
if (checksum != ((int *)buffer)[1])
return FALSE;
return TRUE;
}
static bool32 sub_81D396C(u8 *buffer)
{
u32 checksum;
int var0 = buffer[0];
if (var0 < 1 || var0 > 8)
return FALSE;
checksum = CalcByteArraySum(buffer + 8, 0xEE0);
if (checksum != ((int *)buffer)[1])
return FALSE;
return TRUE;
}
static bool32 sub_81D3998(struct Unk81D38FC *arg0, u8 *buffer2)
{
int i;
const u8 *ereaderVals;
memset(buffer2, 0, 0x1000);
buffer2[0] = arg0->unk0[0];
buffer2[1] = sub_81D38D4();
buffer2[2] = (arg0->unk0[0] + 1) / 2;
for (i = 0; i < arg0->unk0[0]; i++)
{
if (!(i & 1))
{
u8 *var0 = &buffer2[(i / 2) * 0x3B8];
u8 *var1 = arg0[i].unk0;
var0[8] = var1[8];
memcpy(&var0[0x29C], &var1[0x154], 0x124);
var0 += 0xC;
var1 += 0xC;
memcpy(var0, var1, 0x148);
}
else
{
u8 *var0 = &buffer2[(i / 2) * 0x3B8];
u8 *var1 = arg0[i].unk0;
var0[9] = var1[8];
memcpy(&var0[0x154], &var1[0xC], 0x148);
}
}
if (i & 1)
{
u8 *var0 = &buffer2[(i / 2) * 0x3B8];
var0 += 0x154;
ereaderVals = gUnknown_08625B6C;
memcpy(var0, &ereaderVals[(i / 2) * 0x148], 0x148);
}
((int *)buffer2)[1] = CalcByteArraySum(buffer2 + 8, 0xEE0);
if (sub_8153634(SECTOR_ID_TRAINER_HILL, buffer2) != 1)
return FALSE;
return TRUE;
}
bool32 sub_81D3AB0(struct Unk81D38FC *arg0)
{
u8 *var0 = AllocZeroed(0x1000);
bool32 result = sub_81D3998(arg0, var0);
Free(var0);
return result;
}
static bool32 sub_81D3AD8(u8 *arg0, u8 *arg1)
{
if (TryCopySpecialSaveSection(SECTOR_ID_TRAINER_HILL, arg1) != 1)
return FALSE;
memcpy(arg0, arg1, 0xEE8);
if (!sub_81D396C(arg0))
return FALSE;
return TRUE;
}
static bool32 sub_81D3B0C(u8 *arg0)
{
u8 *var0 = AllocZeroed(0x1000);
bool32 result = sub_81D3AD8(arg0, var0);
Free(var0);
return result;
}
bool32 sub_81D3B34(void)
{
u8 *var0 = AllocZeroed(0x1000);
bool32 result = sub_81D3B0C(var0);
Free(var0);
return result;
}
static int unref_sub_81D3B54(int arg0, u32 *arg1)
{
int result;
u16 var0;
int var1;
sub_81D41A0();
while (1)
{
sub_81D4170();
if (gUnknown_030012E2 & 2)
gShouldAdvanceLinkState = 2;
var1 = sub_81D3D70(1, arg0, arg1, NULL);
gUnknown_030012E4 = var1;
if ((gUnknown_030012E4 & 0x13) == 0x10)
{
result = 0;
break;
}
if (gUnknown_030012E4 & 0x8)
{
result = 1;
break;
}
var0 = gUnknown_030012E4 & 0x4;
if (var0)
{
result = 2;
break;
}
gShouldAdvanceLinkState = var0;
VBlankIntrWait();
}
CpuFill32(0, &gUnknown_030012C8, sizeof(struct Unknown030012C8));
sub_81D41F4();
return result;
}
static int unref_sub_81D3BE8(u32 *arg0)
{
int result;
u16 var0;
int var1;
sub_81D41A0();
while (1)
{
sub_81D4170();
if (gUnknown_030012E2 & 2)
gShouldAdvanceLinkState = 2;
var1 = sub_81D3D70(0, 0, NULL, arg0);
gUnknown_030012E4 = var1;
if ((gUnknown_030012E4 & 0x13) == 0x10)
{
result = 0;
break;
}
if (gUnknown_030012E4 & 0x8)
{
result = 1;
break;
}
var0 = gUnknown_030012E4 & 0x4;
if (var0)
{
result = 2;
break;
}
gShouldAdvanceLinkState = var0;
VBlankIntrWait();
}
CpuFill32(0, &gUnknown_030012C8, sizeof(struct Unknown030012C8));
sub_81D41F4();
return result;
}
static void sub_81D3C7C(void)
{
REG_IME = 0;
REG_IE &= ~(INTR_FLAG_TIMER3 | INTR_FLAG_SERIAL);
REG_IME = 1;
REG_SIOCNT = 0;
REG_TM3CNT_H = 0;
REG_IF = INTR_FLAG_TIMER3 | INTR_FLAG_SERIAL;
}
static void sub_81D3CBC(void)
{
REG_IME = 0;
REG_IE &= ~(INTR_FLAG_TIMER3 | INTR_FLAG_SERIAL);
REG_IME = 1;
REG_RCNT = 0;
REG_SIOCNT = SIO_MULTI_MODE;
REG_SIOCNT |= SIO_INTR_ENABLE | SIO_115200_BPS;
REG_IME = 0;
REG_IE |= INTR_FLAG_SERIAL;
REG_IME = 1;
if (!gUnknown_030012C8.unk0[1])
CpuFill32(0, &gUnknown_030012C8, sizeof(struct Unknown030012C8));
}
static void sub_81D3D34(void)
{
REG_RCNT = 0;
REG_SIOCNT = SIO_32BIT_MODE | SIO_INTR_ENABLE;
REG_SIOCNT |= SIO_MULTI_SD;
gShouldAdvanceLinkState = 0;
gUnknown_030012E6 = 0;
gUnknown_030012E8 = 0;
}
int sub_81D3D70(u8 arg0, u32 arg1, u32 *arg2, u32 *arg3)
{
switch (gUnknown_030012C8.unk0[1])
{
case 0:
sub_81D3CBC();
gUnknown_030012C8.unk0[2] = 1;
gUnknown_030012C8.unk0[1] = 1;
break;
case 1:
if (sub_81D3EE8(arg0))
sub_81D413C();
if (gShouldAdvanceLinkState == 2)
{
gUnknown_030012C8.unk0[4] = 2;
gUnknown_030012C8.unk0[1] = 6;
}
break;
case 2:
sub_81D3D34();
sub_81D3F1C(arg1, arg2, arg3);
gUnknown_030012C8.unk0[1] = 3;
// fall through
case 3:
if (gShouldAdvanceLinkState == 2)
{
gUnknown_030012C8.unk0[4] = 2;
gUnknown_030012C8.unk0[1] = 6;
}
else
{
gUnknown_030012E6++;
gUnknown_030012E8++;
if (!gUnknown_030012C8.unk0[0] && gUnknown_030012E8 > 60)
{
gUnknown_030012C8.unk0[4] = 1;
gUnknown_030012C8.unk0[1] = 6;
}
if (gUnknown_030012C8.unk0[2] != 2)
{
if (gUnknown_030012C8.unk0[0] && gUnknown_030012E6 > 2)
{
sub_81D413C();
gUnknown_030012C8.unk0[2] = 2;
}
else
{
sub_81D413C();
gUnknown_030012C8.unk0[2] = 2;
}
}
}
break;
case 4:
sub_81D3CBC();
gUnknown_030012C8.unk0[1] = 5;
break;
case 5:
if (gUnknown_030012C8.unk0[0] == 1 && gUnknown_030012E6 > 2)
sub_81D413C();
if (++gUnknown_030012E6 > 60)
{
gUnknown_030012C8.unk0[4] = 1;
gUnknown_030012C8.unk0[1] = 6;
}
break;
case 6:
if (gUnknown_030012C8.unk0[2])
{
sub_81D3C7C();
gUnknown_030012C8.unk0[2] = 0;
}
break;
}
return gUnknown_030012C8.unk0[2] | (gUnknown_030012C8.unk0[4] << 2) | (gUnknown_030012C8.unk0[3] << 4);
}
static u16 sub_81D3EE8(u8 arg0)
{
u16 terminal = (*(vu32 *)REG_ADDR_SIOCNT) & (SIO_MULTI_SI | SIO_MULTI_SD);
if (terminal == SIO_MULTI_SD && arg0)
{
gUnknown_030012C8.unk0[0] = 1;
return 1;
}
else
{
gUnknown_030012C8.unk0[0] = 0;
return 0;
}
}
static void sub_81D3F1C(u32 arg0, u32 *arg1, u32 *arg2)
{
if (gUnknown_030012C8.unk0[0])
{
REG_SIOCNT |= SIO_38400_BPS;
gUnknown_030012C8.unk8 = arg1;
REG_SIODATA32 = arg0;
gUnknown_030012C8.unk10 = arg0 / 4 + 1;
sub_81D3F68();
}
else
{
REG_SIOCNT = REG_SIOCNT;
gUnknown_030012C8.unk8 = arg2;
}
}
static void sub_81D3F68(void)
{
REG_TM3CNT_L = 0xFDA7;
REG_TM3CNT_H = TIMER_INTR_ENABLE;
REG_IME = 0;
REG_IE |= INTR_FLAG_TIMER3;
REG_IME = 1;
}
void sub_81D3F9C(void)
{
sub_81D414C();
sub_81D413C();
}
void sub_81D3FAC(void)
{
u16 i, playerCount, k;
u32 value;
u16 var0;
u16 recvBuffer[4];
switch (gUnknown_030012C8.unk0[1])
{
case 1:
REG_SIOMLT_SEND = 0xCCD0; // Handshake id
*(u64 *)recvBuffer = REG_SIOMLT_RECV;
for (i = 0, playerCount = 0, k = 0; i < 4; i++)
{
if (recvBuffer[i] == 0xCCD0)
playerCount++;
else if (recvBuffer[i] != 0xFFFF)
k++;
}
if (playerCount == 2 && k == 0)
gUnknown_030012C8.unk0[1] = 2;
break;
case 3:
value = REG_SIODATA32;
if (!gUnknown_030012C8.unkC && !gUnknown_030012C8.unk0[0])
gUnknown_030012C8.unk10 = value / 4 + 1;
if (gUnknown_030012C8.unk0[0] == 1)
{
if (gUnknown_030012C8.unkC < gUnknown_030012C8.unk10)
{
REG_SIODATA32 = gUnknown_030012C8.unk8[gUnknown_030012C8.unkC];
gUnknown_030012C8.unk14 += gUnknown_030012C8.unk8[gUnknown_030012C8.unkC];
}
else
{
REG_SIODATA32 = gUnknown_030012C8.unk14;
}
}
else
{
if (gUnknown_030012C8.unkC > 0 && gUnknown_030012C8.unkC < gUnknown_030012C8.unk10 + 1)
{
gUnknown_030012C8.unk8[gUnknown_030012C8.unkC - 1] = value;
gUnknown_030012C8.unk14 += value;
}
else if (gUnknown_030012C8.unkC)
{
if (gUnknown_030012C8.unk14 == value)
gUnknown_030012C8.unk0[3] = 1;
else
gUnknown_030012C8.unk0[3] = 2;
}
gUnknown_030012E8 = 0;
}
if (++gUnknown_030012C8.unkC < gUnknown_030012C8.unk10 + 2)
{
if (gUnknown_030012C8.unk0[0])
REG_TM3CNT_H |= TIMER_ENABLE;
else
sub_81D413C();
}
else
{
gUnknown_030012C8.unk0[1] = 4;
gUnknown_030012E6 = 0;
}
break;
case 5:
if (!gUnknown_030012C8.unk0[0])
REG_SIOMLT_SEND = gUnknown_030012C8.unk0[3];
*(u64 *)recvBuffer = REG_SIOMLT_RECV;
var0 = recvBuffer[1] - 1;
if (var0 < 2)
{
if (gUnknown_030012C8.unk0[0] == 1)
gUnknown_030012C8.unk0[3] = recvBuffer[1];
gUnknown_030012C8.unk0[1] = 6;
}
break;
}
}
static void sub_81D413C(void)
{
REG_SIOCNT |= SIO_ENABLE;
}
static void sub_81D414C(void)
{
REG_TM3CNT_H &= ~TIMER_ENABLE;
REG_TM3CNT_L = 0xFDA7;
}
static void sub_81D4170(void)
{
int keysMask = REG_KEYINPUT ^ KEYS_MASK;
gUnknown_030012E2 = keysMask & ~gUnknown_030012E0;
gUnknown_030012E0 = keysMask;
}
void sub_81D41A0(void)
{
gUnknown_030012EC = REG_IME;
gUnknown_030012EE = REG_IE;
gUnknown_030012F0 = REG_TM3CNT_H;
gUnknown_030012F2 = REG_SIOCNT;
gUnknown_030012F4 = REG_RCNT;
}
void sub_81D41F4(void)
{
REG_IME = gUnknown_030012EC;
REG_IE = gUnknown_030012EE;
REG_TM3CNT_H = gUnknown_030012F0;
REG_SIOCNT = gUnknown_030012F2;
REG_RCNT = gUnknown_030012F4;
}
void sub_81D4238(void)
{
CpuFill32(0, &gUnknown_030012C8, sizeof(struct Unknown030012C8));
}
+464
View File
@@ -0,0 +1,464 @@
#include "global.h"
#include "alloc.h"
#include "decompress.h"
#include "ereader_helpers.h"
#include "link.h"
#include "main.h"
#include "union_room.h"
#include "save.h"
#include "sound.h"
#include "sprite.h"
#include "task.h"
#include "strings.h"
#include "util.h"
#include "constants/songs.h"
struct Unk81D5014
{
u16 unk0;
u16 unk2;
u16 unk4;
u16 unk6;
u8 unk8;
u8 unk9;
u8 unkA;
u8 unkB;
u8 unkC;
u8 unkD;
u8 unkE;
u8 *unk10;
};
struct Unk03006370
{
u16 unk0;
u32 unk4;
u32 *unk8;
};
static void sub_81D5084(u8);
extern struct Unk03006370 gUnknown_03006370;
extern const u8 gUnknown_089A3470[];
extern const u8 gMultiBootProgram_BerryGlitchFix_Start[];
static void sub_81D4D50(struct Unk03006370 *arg0, int arg1, u32 *arg2)
{
volatile u16 backupIME = REG_IME;
REG_IME = 0;
gIntrTable[1] = sub_81D3FAC;
gIntrTable[2] = sub_81D3F9C;
sub_81D41A0();
sub_81D4238();
REG_IE |= INTR_FLAG_VCOUNT;
REG_IME = backupIME;
arg0->unk0 = 0;
arg0->unk4 = arg1;
arg0->unk8 = arg2;
}
static void sub_81D4DB8(struct Unk03006370 *arg0)
{
volatile u16 backupIME = REG_IME;
REG_IME = 0;
sub_81D4238();
sub_81D41F4();
RestoreSerialTimer3IntrHandlers();
REG_IME = backupIME;
}
static u8 sub_81D4DE8(struct Unk03006370 *arg0)
{
u8 var0 = 0;
arg0->unk0 = sub_81D3D70(1, arg0->unk4, arg0->unk8, NULL);
if ((arg0->unk0 & 0x13) == 0x10)
var0 = 1;
if (arg0->unk0 & 0x8)
var0 = 2;
if (arg0->unk0 & 0x4)
var0 = 3;
gShouldAdvanceLinkState = 0;
return var0;
}
static void sub_81D4E30(void)
{
memset(gDecompressionBuffer, 0, 0x2000);
gLinkType = 0x5503;
OpenLink();
SetSuppressLinkErrorMessage(TRUE);
}
static bool32 sub_81D4E60(void)
{
volatile u16 backupIME;
u16 sp4[4];
backupIME = REG_IME;
REG_IME = 0;
*(u64 *)sp4 = *(u64 *)gLink.tempRecvBuffer;
REG_IME = backupIME;
if (sp4[0] == 0xB9A0 && sp4[1] == 0xCCD0
&& sp4[2] == 0xFFFF && sp4[3] == 0xFFFF)
{
return TRUE;
}
return FALSE;
}
static bool32 sub_81D4EC0(void)
{
if (IsLinkMaster() && GetLinkPlayerCount_2() == 2)
return TRUE;
return FALSE;
}
static u32 sub_81D4EE4(u8 *arg0, u16 *arg1)
{
u8 var0;
var0 = *arg0 - 3;
if (var0 < 3 && HasLinkErrorOccurred())
{
*arg0 = 0;
return 3;
}
switch (*arg0)
{
case 0:
if (IsLinkMaster() && GetLinkPlayerCount_2() > 1)
{
*arg0 = 1;
}
else if (gMain.newKeys & B_BUTTON)
{
*arg0 = 0;
return 1;
}
break;
case 1:
if (++(*arg1) > 5)
{
*arg1 = 0;
*arg0 = 2;
}
break;
case 2:
if (GetLinkPlayerCount_2() == 2)
{
PlaySE(SE_PINPON);
CheckShouldAdvanceLinkState();
*arg1 = 0;
*arg0 = 3;
}
else if (gMain.newKeys & B_BUTTON)
{
*arg0 = 0;
return 1;
}
break;
case 3:
if (++(*arg1) > 30)
{
*arg0 = 0;
return 5;
}
if (IsLinkConnectionEstablished())
{
if (gReceivedRemoteLinkPlayers)
{
if (IsLinkPlayerDataExchangeComplete())
{
*arg0 = 0;
return 2;
}
else
{
*arg0 = 4;
}
}
else
{
*arg0 = 3;
}
}
break;
case 4:
sub_800ABF4(0);
*arg0 = 5;
break;
case 5:
if (!gReceivedRemoteLinkPlayers)
{
*arg0 = 0;
return 4;
}
break;
default:
return 0;
}
return 0;
}
void sub_81D5014(void)
{
int value;
struct Unk81D5014 *data;
u8 taskId = CreateTask(sub_81D5084, 0);
data = (struct Unk81D5014 *)gTasks[taskId].data;
data->unk8 = 0;
data->unk9 = 0;
data->unkA = 0;
data->unkB = 0;
data->unkC = 0;
data->unkD = 0;
data->unk0 = 0;
data->unk2 = 0;
data->unk4 = 0;
data->unk6 = 0;
data->unkE = 0;
data->unk10 = AllocZeroed(0x40);
}
static void sub_81D505C(u16 *arg0)
{
*arg0 = 0;
}
static bool32 sub_81D5064(u16 *arg0, u16 arg1)
{
if (++(*arg0) > arg1)
{
*arg0 = 0;
return TRUE;
}
return FALSE;
}
static void sub_81D5084(u8 taskId)
{
struct Unk81D5014 *data = (struct Unk81D5014 *)gTasks[taskId].data;
switch (data->unk8)
{
case 0:
if (mevent_0814257C(&data->unk9, gUnknown_085EDFD6))
data->unk8 = 1;
break;
case 1:
sub_81D4E30();
sub_81D505C(&data->unk0);
data->unk8 = 2;
break;
case 2:
if (sub_81D5064(&data->unk0, 10))
data->unk8 = 3;
break;
case 3:
if (!sub_81D4EC0())
{
CloseLink();
data->unk8 = 4;
}
else
{
data->unk8 = 13;
}
break;
case 4:
if (mevent_0814257C(&data->unk9, gUnknown_085EDFF5))
{
sub_8018884(gUnknown_085EE014);
sub_81D505C(&data->unk0);
data->unk8 = 5;
}
break;
case 5:
if (sub_81D5064(&data->unk0, 90))
{
sub_81D4E30();
data->unk8 = 6;
}
else if (gMain.newKeys & B_BUTTON)
{
sub_81D505C(&data->unk0);
PlaySE(SE_SELECT);
data->unk8 = 23;
}
break;
case 6:
if (gMain.newKeys & B_BUTTON)
{
PlaySE(SE_SELECT);
CloseLink();
sub_81D505C(&data->unk0);
data->unk8 = 23;
}
else if (GetLinkPlayerCount_2() > 1)
{
sub_81D505C(&data->unk0);
CloseLink();
data->unk8 = 7;
}
else if (sub_81D4E60())
{
PlaySE(SE_SELECT);
CloseLink();
sub_81D505C(&data->unk0);
data->unk8 = 8;
}
else if (sub_81D5064(&data->unk0, 10))
{
CloseLink();
sub_81D4E30();
sub_81D505C(&data->unk0);
}
break;
case 7:
if (mevent_0814257C(&data->unk9, gUnknown_085EE05C))
data->unk8 = 4;
break;
case 8:
sub_8018884(gUnknown_085EE097);
// XXX: This (u32*) cast is discarding the const qualifier from gUnknown_089A3470
sub_81D4D50(&gUnknown_03006370, gMultiBootProgram_BerryGlitchFix_Start - gUnknown_089A3470, (u32*)gUnknown_089A3470);
data->unk8 = 9;
break;
case 9:
data->unkE = sub_81D4DE8(&gUnknown_03006370);
if (data->unkE)
data->unk8 = 10;
break;
case 10:
sub_81D4DB8(&gUnknown_03006370);
if (data->unkE == 3)
{
data->unk8 = 20;
}
else if (data->unkE == 1)
{
sub_81D505C(&data->unk0);
sub_8018884(gUnknown_085EE120);
data->unk8 = 11;
}
else
{
data->unk8 = 0;
}
break;
case 11:
if (sub_81D5064(&data->unk0, 840))
data->unk8 = 12;
break;
case 12:
sub_81D4E30();
sub_8018884(gUnknown_085EE0DC);
data->unk8 = 13;
break;
case 13:
switch (sub_81D4EE4(&data->unk9, &data->unk0))
{
case 0:
break;
case 2:
sub_8018884(gUnknown_085EE097);
data->unk8 = 14;
break;
case 1:
PlaySE(SE_SELECT);
CloseLink();
data->unk8 = 23;
break;
case 5:
CloseLink();
data->unk8 = 21;
break;
case 3:
case 4:
CloseLink();
data->unk8 = 20;
break;
}
break;
case 14:
if (HasLinkErrorOccurred())
{
CloseLink();
data->unk8 = 20;
}
else if (GetBlockReceivedStatus())
{
ResetBlockReceivedFlags();
data->unk8 = 15;
}
break;
case 15:
data->unkE = sub_81D3920(gDecompressionBuffer);
sub_800ABF4(data->unkE);
data->unk8 = 16;
break;
case 16:
if (!gReceivedRemoteLinkPlayers)
{
if (data->unkE == 1)
data->unk8 = 17;
else
data->unk8 = 20;
}
break;
case 17:
if (sub_81D3AB0((struct Unk81D38FC *)&gDecompressionBuffer))
{
sub_8018884(gUnknown_085EE0FA);
sub_81D505C(&data->unk0);
data->unk8 = 18;
}
else
{
data->unk8 = 22;
}
break;
case 18:
if (sub_81D5064(&data->unk0, 120))
{
sub_8018884(gUnknown_085EE107);
PlayFanfare(MUS_FANFA4);
data->unk8 = 19;
}
break;
case 19:
if (IsFanfareTaskInactive() && (gMain.newKeys & (A_BUTTON | B_BUTTON)))
data->unk8 = 26;
break;
case 23:
if (mevent_0814257C(&data->unk9,gUnknown_085EE06B))
data->unk8 = 26;
break;
case 20:
if (mevent_0814257C(&data->unk9, gUnknown_085EE0A3))
data->unk8 = 0;
break;
case 21:
if (mevent_0814257C(&data->unk9, gUnknown_085EE0BF))
data->unk8 = 0;
break;
case 22:
if (mevent_0814257C(&data->unk9, gUnknown_085EE12D))
data->unk8 = 0;
break;
case 26:
Free(data->unk10);
DestroyTask(taskId);
SetMainCallback2(sub_80186A4);
break;
}
}
+1 -1
View File
@@ -6,6 +6,7 @@
#include "event_data.h"
#include "event_object_movement.h"
#include "event_scripts.h"
#include "faraway_island.h"
#include "field_camera.h"
#include "field_effect.h"
#include "field_effect_helpers.h"
@@ -15,7 +16,6 @@
#include "metatile_behavior.h"
#include "overworld.h"
#include "palette.h"
#include "pokenav.h"
#include "random.h"
#include "sprite.h"
#include "task.h"
+2 -2
View File
@@ -53,10 +53,10 @@ static const struct OamData sOamData_EvoSparkle =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
+445
View File
@@ -0,0 +1,445 @@
#include "global.h"
#include "event_data.h"
#include "event_object_movement.h"
#include "field_weather.h"
#include "fieldmap.h"
#include "metatile_behavior.h"
#include "sprite.h"
#include "constants/event_objects.h"
#include "constants/flags.h"
#include "constants/maps.h"
#include "constants/metatile_behaviors.h"
#include "constants/vars.h"
static u8 sub_81D4890(u8);
static bool8 sub_81D4C14(struct EventObject*, u8);
static u8 sub_81D4C9C(struct EventObject*, u8);
static u8 sub_81D4C58(struct EventObject*, u8);
static u8 sub_81D4CE0(struct EventObject*, u8);
static u8 sub_81D4D24(u8);
static bool8 sub_81D4834(s16, s16);
extern u8 gUnknown_0203CF50;
extern s16 gUnknown_030012F8;
extern s16 gUnknown_030012FA;
extern u8 gUnknown_030012FC[4];
extern const struct SpritePalette gFieldEffectObjectPaletteInfo1;
extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[];
static const s16 sFarawayIslandRockCoords[4][2] =
{
{21, 16},
{25, 16},
{16, 17},
{20, 20},
};
static u8 sub_81D4258(void)
{
u8 eventObjectId;
TryGetEventObjectIdByLocalIdAndMap(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &eventObjectId);
return eventObjectId;
}
u32 sub_81D427C(void)
{
u8 i;
int skip;
struct EventObject *mew = &gEventObjects[sub_81D4258()];
gUnknown_030012F8 = gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x - mew->currentCoords.x;
gUnknown_030012FA = gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y - mew->currentCoords.y;
for (i = 0; i < ARRAY_COUNT(gUnknown_030012FC); i++)
gUnknown_030012FC[i] = DIR_NONE;
if (gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x == gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.x
&& gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y == gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.y)
{
return DIR_NONE;
}
if (VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) % 8 == 0)
mew->invisible = 0;
else
mew->invisible = 1;
if (VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) % 9 == 0)
return DIR_NONE;
for (i = 0; i < ARRAY_COUNT(sFarawayIslandRockCoords); i++)
{
if (gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x == sFarawayIslandRockCoords[i][0])
{
skip = 0;
if (gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y < sFarawayIslandRockCoords[i][1])
{
if (mew->currentCoords.y <= sFarawayIslandRockCoords[i][1])
skip = 1;
}
else
{
if (mew->currentCoords.y >= sFarawayIslandRockCoords[i][1])
skip = 1;
}
if (!skip)
{
if (gUnknown_030012F8 > 0)
{
if (mew->currentCoords.x + 1 == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x)
{
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
return DIR_EAST;
}
}
else if (gUnknown_030012F8 < 0)
{
if (mew->currentCoords.x - 1 == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x)
{
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
return DIR_WEST;
}
}
if (mew->currentCoords.x == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x)
{
if (gUnknown_030012FA > 0)
{
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
return DIR_NORTH;
}
else
{
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
return DIR_SOUTH;
}
}
}
}
if (gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y == sFarawayIslandRockCoords[i][1])
{
skip = 0;
if (gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.x < sFarawayIslandRockCoords[i][0])
{
if (mew->currentCoords.x <= sFarawayIslandRockCoords[i][0])
skip = 1;
}
else
{
if (mew->currentCoords.x >= sFarawayIslandRockCoords[i][0])
skip = 1;
}
if (!skip)
{
if (gUnknown_030012FA > 0)
{
if (mew->currentCoords.y + 1 == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y)
{
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
return DIR_SOUTH;
}
}
else if (gUnknown_030012FA < 0)
{
if (mew->currentCoords.y - 1 == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y)
{
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
return DIR_NORTH;
}
}
if (mew->currentCoords.y == gEventObjects[gPlayerAvatar.eventObjectId].previousCoords.y)
{
if (gUnknown_030012F8 > 0)
{
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
return DIR_WEST;
}
else
{
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
return DIR_EAST;
}
}
}
}
}
if (sub_81D4C14(mew, 0))
{
if (sub_81D4C58(mew, 1))
return sub_81D4D24(2);
else if (sub_81D4CE0(mew, 1))
return sub_81D4D24(2);
else
return DIR_NORTH;
}
if (sub_81D4C9C(mew, 0))
{
if (sub_81D4C58(mew, 1))
return sub_81D4D24(2);
else if (sub_81D4CE0(mew, 1))
return sub_81D4D24(2);
else
return DIR_SOUTH;
}
if (sub_81D4C58(mew, 0))
{
if (sub_81D4C14(mew, 1))
return sub_81D4D24(2);
else if (sub_81D4C9C(mew, 1))
return sub_81D4D24(2);
else
return DIR_EAST;
}
if (sub_81D4CE0(mew, 0))
{
if (sub_81D4C14(mew, 1))
return sub_81D4D24(2);
else if (sub_81D4C9C(mew, 1))
return sub_81D4D24(2);
else
return DIR_WEST;
}
if (gUnknown_030012FA == 0)
{
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.y > mew->currentCoords.y)
{
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
return DIR_NORTH;
}
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.y < mew->currentCoords.y)
{
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
return DIR_SOUTH;
}
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
return DIR_NORTH;
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
return DIR_SOUTH;
}
if (gUnknown_030012F8 == 0)
{
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.x > mew->currentCoords.x)
{
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
return DIR_WEST;
}
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.x < mew->currentCoords.x)
{
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
return DIR_EAST;
}
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
return DIR_EAST;
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
return DIR_WEST;
}
return sub_81D4890(DIR_NONE);
}
static bool8 sub_81D4834(s16 x, s16 y)
{
if (gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.x == x
&& gEventObjects[gPlayerAvatar.eventObjectId].currentCoords.y == y)
{
return FALSE;
}
return MetatileBehavior_IsPokeGrass(MapGridGetMetatileBehaviorAt(x, y));
}
static u8 sub_81D4890(u8 ignoredDir)
{
u8 i;
u8 count = 0;
struct EventObject *mew = &gEventObjects[sub_81D4258()];
for (i = 0; i < ARRAY_COUNT(gUnknown_030012FC); i++)
gUnknown_030012FC[i] = DIR_NONE;
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1) == TRUE && ignoredDir != DIR_NORTH)
{
gUnknown_030012FC[count] = DIR_NORTH;
count++;
}
if (sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y) == TRUE && ignoredDir != DIR_EAST)
{
gUnknown_030012FC[count] = DIR_EAST;
count++;
}
if (sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1) == TRUE && ignoredDir != DIR_SOUTH)
{
gUnknown_030012FC[count] = DIR_SOUTH;
count++;
}
if (sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y) == TRUE && ignoredDir != DIR_WEST)
{
gUnknown_030012FC[count] = DIR_WEST;
count++;
}
if (count > 1)
return gUnknown_030012FC[VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) % count];
else
return gUnknown_030012FC[0];
}
void UpdateFarawayIslandStepCounter(void)
{
u16 steps = VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER);
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(FARAWAY_ISLAND_INTERIOR)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(FARAWAY_ISLAND_INTERIOR))
{
steps++;
if (steps >= 9999)
VarSet(VAR_FARAWAY_ISLAND_STEP_COUNTER, 0);
else
VarSet(VAR_FARAWAY_ISLAND_STEP_COUNTER, steps);
}
}
bool8 EventObjectIsFarawayIslandMew(struct EventObject *eventObject)
{
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(FARAWAY_ISLAND_INTERIOR)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(FARAWAY_ISLAND_INTERIOR))
{
if (eventObject->graphicsId == EVENT_OBJ_GFX_MEW)
return TRUE;
}
return FALSE;
}
bool8 IsMewPlayingHideAndSeek(void)
{
if (gSaveBlock1Ptr->location.mapNum == MAP_NUM(FARAWAY_ISLAND_INTERIOR)
&& gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(FARAWAY_ISLAND_INTERIOR))
{
if (FlagGet(FLAG_CAUGHT_MEW) != TRUE && FlagGet(FLAG_HIDE_MEW) != TRUE)
return TRUE;
}
return FALSE;
}
bool8 sub_81D4A58(struct EventObject *eventObject)
{
if (VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) != 0xFFFF
&& VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) % 4 == 0)
return TRUE;
return FALSE;
}
void sub_81D4A90(void)
{
s16 x;
s16 y;
u8 spriteId;
struct EventObject *mew = &gEventObjects[sub_81D4258()];
mew->invisible = 0;
if (gSpecialVar_0x8004 == 1)
{
mew->fixedPriority = 1;
gSprites[mew->spriteId].subspriteMode = SUBSPRITES_IGNORE_PRIORITY;
gSprites[mew->spriteId].subpriority = 1;
}
else
{
VarSet(VAR_FARAWAY_ISLAND_STEP_COUNTER, 0xFFFF);
mew->fixedPriority = 1;
gSprites[mew->spriteId].subspriteMode = SUBSPRITES_IGNORE_PRIORITY;
if (gSpecialVar_Facing != DIR_NORTH)
gSprites[mew->spriteId].subpriority = 1;
LoadSpritePalette(&gFieldEffectObjectPaletteInfo1);
UpdateSpritePaletteWithWeather(IndexOfSpritePaletteTag(gFieldEffectObjectPaletteInfo1.tag));
x = mew->currentCoords.x;
y = mew->currentCoords.y;
sub_80930E0(&x, &y, 8, 8);
gUnknown_0203CF50 = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[15], x, y, gSprites[mew->spriteId].subpriority - 1);
if (gUnknown_0203CF50 != MAX_SPRITES)
{
struct Sprite *sprite = &gSprites[gUnknown_0203CF50];
sprite->coordOffsetEnabled = 1;
sprite->oam.priority = 2;
sprite->callback = SpriteCallbackDummy;
}
}
}
void sub_81D4BEC(void)
{
if (gUnknown_0203CF50 != MAX_SPRITES)
DestroySprite(&gSprites[gUnknown_0203CF50]);
}
static bool8 sub_81D4C14(struct EventObject *mew, u8 index)
{
if (gUnknown_030012FA > 0 && sub_81D4834(mew->currentCoords.x, mew->currentCoords.y - 1))
{
gUnknown_030012FC[index] = DIR_NORTH;
return TRUE;
}
return FALSE;
}
static u8 sub_81D4C58(struct EventObject *mew, u8 index)
{
if (gUnknown_030012F8 < 0 && sub_81D4834(mew->currentCoords.x + 1, mew->currentCoords.y))
{
gUnknown_030012FC[index] = DIR_EAST;
return TRUE;
}
return FALSE;
}
static u8 sub_81D4C9C(struct EventObject *mew, u8 index)
{
if (gUnknown_030012FA < 0 && sub_81D4834(mew->currentCoords.x, mew->currentCoords.y + 1))
{
gUnknown_030012FC[index] = DIR_SOUTH;
return TRUE;
}
return FALSE;
}
static u8 sub_81D4CE0(struct EventObject *mew, u8 index)
{
if (gUnknown_030012F8 > 0 && sub_81D4834(mew->currentCoords.x - 1, mew->currentCoords.y))
{
gUnknown_030012FC[index] = DIR_WEST;
return TRUE;
}
return FALSE;
}
static u8 sub_81D4D24(u8 mod)
{
return gUnknown_030012FC[VarGet(VAR_FARAWAY_ISLAND_STEP_COUNTER) % mod];
}
+4 -4
View File
@@ -3,6 +3,7 @@
#include "bike.h"
#include "coord_event_weather.h"
#include "daycare.h"
#include "faraway_island.h"
#include "event_data.h"
#include "event_object_movement.h"
#include "event_scripts.h"
@@ -18,7 +19,6 @@
#include "metatile_behavior.h"
#include "overworld.h"
#include "pokemon.h"
#include "pokenav.h"
#include "safari_zone.h"
#include "script.h"
#include "secret_base.h"
@@ -390,11 +390,11 @@ static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 me
if (MetatileBehavior_IsBookShelf(metatileBehavior) == TRUE)
return EventScript_BookShelf;
if (MetatileBehavior_IsPokeCenterBookShelf(metatileBehavior) == TRUE)
return EventScript_PokemonCenterBookshelf;
return EventScript_PokemonCenterBookShelf;
if (MetatileBehavior_IsVase(metatileBehavior) == TRUE)
return EventScript_Vase;
if (MetatileBehavior_IsTrashCan(metatileBehavior) == TRUE)
return EventScript_TrashCan;
return EventScript_EmptyTrashCan;
if (MetatileBehavior_IsShopShelf(metatileBehavior) == TRUE)
return EventScript_ShopShelf;
if (MetatileBehavior_IsBlueprint(metatileBehavior) == TRUE)
@@ -541,7 +541,7 @@ static bool8 TryStartStepCountScript(u16 metatileBehavior)
IncrementRematchStepCounter();
UpdateHappinessStepCounter();
sub_81D4998();
UpdateFarawayIslandStepCounter();
if (!(gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_6) && !MetatileBehavior_IsForcedMovementTile(metatileBehavior))
{
+103 -41
View File
@@ -270,7 +270,8 @@ const u8 gUnknown_0855C190[] = INCBIN_U8("graphics/unknown/unknown_55C190.4bpp")
const u8 gUnknown_0855C1B0[] = INCBIN_U8("graphics/unknown/unknown_55C1B0.4bpp");
const u8 gUnknown_0855C1D0[] = INCBIN_U8("graphics/unknown/unknown_55C1D0.4bpp");
bool8 (*const gFieldEffectScriptFuncs[])(u8 **, u32 *) = {
bool8 (*const gFieldEffectScriptFuncs[])(u8 **, u32 *) =
{
FieldEffectCmd_loadtiles,
FieldEffectCmd_loadfadedpal,
FieldEffectCmd_loadpal,
@@ -281,25 +282,48 @@ bool8 (*const gFieldEffectScriptFuncs[])(u8 **, u32 *) = {
FieldEffectCmd_loadfadedpal_callnative,
};
const struct OamData gNewGameBirchOamAttributes = {.size = 3};
const struct OamData gOamData_855C218 = {.size = 0};
const struct OamData gOamData_855C220 = {.size = 1};
const struct OamData gNewGameBirchOamAttributes =
{
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64)
};
const struct SpriteFrameImage gNewGameBirchPicTable[] = {
const struct OamData gOamData_855C218 =
{
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8)
};
const struct OamData gOamData_855C220 =
{
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16)
};
const struct SpriteFrameImage gNewGameBirchPicTable[] =
{
obj_frame_tiles(gNewGameBirchPic)
};
const struct SpritePalette gNewGameBirchObjectPaletteInfo = {.data = gNewGameBirchPalette, .tag = 0x1006};
const union AnimCmd gNewGameBirchImageAnim[] = {
const struct SpritePalette gNewGameBirchObjectPaletteInfo =
{
.data = gNewGameBirchPalette,
.tag = 0x1006
};
const union AnimCmd gNewGameBirchImageAnim[] =
{
ANIMCMD_FRAME(.imageValue = 0, .duration = 1),
ANIMCMD_END
};
const union AnimCmd *const gNewGameBirchImageAnimTable[] = {
const union AnimCmd *const gNewGameBirchImageAnimTable[] =
{
gNewGameBirchImageAnim
};
const struct SpriteTemplate gNewGameBirchObjectTemplate = {
const struct SpriteTemplate gNewGameBirchObjectTemplate =
{
.tileTag = 0xFFFF,
.paletteTag = 4102,
.oam = &gNewGameBirchOamAttributes,
@@ -309,31 +333,47 @@ const struct SpriteTemplate gNewGameBirchObjectTemplate = {
.callback = SpriteCallbackDummy
};
const struct SpritePalette gFieldEffectObjectPaletteInfo4 = {.data = gFieldEffectObjectPalette4, .tag = 0x1007};
const struct SpritePalette gFieldEffectObjectPaletteInfo5 = {.data = gFieldEffectObjectPalette5, .tag = 0x1010};
const struct OamData gOamData_855C26C = {
.shape = 1,
.size = 2
const struct SpritePalette gFieldEffectObjectPaletteInfo4 =
{
.data = gFieldEffectObjectPalette4,
.tag = 0x1007
};
const struct SpriteFrameImage gSpriteImageTable_855C274[] = {
const struct SpritePalette gFieldEffectObjectPaletteInfo5 =
{
.data = gFieldEffectObjectPalette5,
.tag = 0x1010
};
const struct OamData gOamData_855C26C =
{
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16)
};
const struct SpriteFrameImage gSpriteImageTable_855C274[] =
{
obj_frame_tiles(gSpriteImage_855A970)
};
const struct SpriteFrameImage gSpriteImageTable_855C27C[] = {
const struct SpriteFrameImage gSpriteImageTable_855C27C[] =
{
obj_frame_tiles(gSpriteImage_855A9B0),
obj_frame_tiles(gSpriteImage_855AA70)
};
const struct SpriteFrameImage gSpriteImageTable_855C28C[] = {
const struct SpriteFrameImage gSpriteImageTable_855C28C[] =
{
obj_frame_tiles(gSpriteImage_855AB30)
};
const struct SpriteFrameImage gSpriteImageTable_855C294[] = {
const struct SpriteFrameImage gSpriteImageTable_855C294[] =
{
{.data = gSpriteImage_855AD30, .size = 0x200} // the macro breaks down here
};
const struct Subsprite gSubspriteTable_855C29C[] = {
const struct Subsprite gSubspriteTable_855C29C[] =
{
{.x = -12, .y = -8, .priority = 2, .tileOffset = 0, .shape = 1, .size = 0},
{.x = 4, .y = -8, .priority = 2, .tileOffset = 2, .shape = 0, .size = 0},
{.x = -12, .y = 0, .priority = 2, .tileOffset = 3, .shape = 1, .size = 0},
@@ -342,7 +382,8 @@ const struct Subsprite gSubspriteTable_855C29C[] = {
const struct SubspriteTable gUnknown_0855C2AC = subsprite_table(gSubspriteTable_855C29C);
const struct Subsprite gSubspriteTable_855C2B4[] = {
const struct Subsprite gSubspriteTable_855C2B4[] =
{
{.x = -32, .y = -8, .priority = 2, .tileOffset = 0, .shape = 1, .size = 1},
{.x = 0, .y = -8, .priority = 2, .tileOffset = 4, .shape = 1, .size = 1},
{.x = -32, .y = 0, .priority = 2, .tileOffset = 8, .shape = 1, .size = 1},
@@ -351,12 +392,14 @@ const struct Subsprite gSubspriteTable_855C2B4[] = {
const struct SubspriteTable gUnknown_0855C2C4 = subsprite_table(gSubspriteTable_855C2B4);
const union AnimCmd gSpriteAnim_855C2CC[] = {
const union AnimCmd gSpriteAnim_855C2CC[] =
{
ANIMCMD_FRAME(.imageValue = 0, .duration = 1),
ANIMCMD_JUMP(0)
};
const union AnimCmd gSpriteAnim_855C2D4[] = {
const union AnimCmd gSpriteAnim_855C2D4[] =
{
ANIMCMD_FRAME(.imageValue = 0, .duration = 16),
ANIMCMD_FRAME(.imageValue = 1, .duration = 16),
ANIMCMD_FRAME(.imageValue = 0, .duration = 16),
@@ -368,16 +411,19 @@ const union AnimCmd gSpriteAnim_855C2D4[] = {
ANIMCMD_END
};
const union AnimCmd *const gSpriteAnimTable_855C2F8[] = {
const union AnimCmd *const gSpriteAnimTable_855C2F8[] =
{
gSpriteAnim_855C2CC,
gSpriteAnim_855C2D4
};
const union AnimCmd *const gSpriteAnimTable_855C300[] = {
const union AnimCmd *const gSpriteAnimTable_855C300[] =
{
gSpriteAnim_855C2CC
};
const struct SpriteTemplate gSpriteTemplate_855C304 = {
const struct SpriteTemplate gSpriteTemplate_855C304 =
{
.tileTag = 0xFFFF,
.paletteTag = 4103,
.oam = &gOamData_855C218,
@@ -387,7 +433,8 @@ const struct SpriteTemplate gSpriteTemplate_855C304 = {
.callback = SpriteCB_PokeballGlow
};
const struct SpriteTemplate gSpriteTemplate_855C31C = {
const struct SpriteTemplate gSpriteTemplate_855C31C =
{
.tileTag = 0xFFFF,
.paletteTag = 4100,
.oam = &gOamData_855C220,
@@ -397,7 +444,8 @@ const struct SpriteTemplate gSpriteTemplate_855C31C = {
.callback = SpriteCB_PokecenterMonitor
};
const struct SpriteTemplate gSpriteTemplate_855C334 = {
const struct SpriteTemplate gSpriteTemplate_855C334 =
{
.tileTag = 0xFFFF,
.paletteTag = 4112,
.oam = &gOamData_855C220,
@@ -407,7 +455,8 @@ const struct SpriteTemplate gSpriteTemplate_855C334 = {
.callback = SpriteCB_HallOfFameMonitor
};
const struct SpriteTemplate gSpriteTemplate_855C34C = {
const struct SpriteTemplate gSpriteTemplate_855C34C =
{
.tileTag = 0xFFFF,
.paletteTag = 4112,
.oam = &gOamData_855C26C,
@@ -417,21 +466,24 @@ const struct SpriteTemplate gSpriteTemplate_855C34C = {
.callback = SpriteCB_HallOfFameMonitor
};
void (*const gUnknown_0855C364[])(struct Task *) = {
void (*const gUnknown_0855C364[])(struct Task *) =
{
PokecenterHealEffect_0,
PokecenterHealEffect_1,
PokecenterHealEffect_2,
PokecenterHealEffect_3
};
void (*const gUnknown_0855C374[])(struct Task *) = {
void (*const gUnknown_0855C374[])(struct Task *) =
{
HallOfFameRecordEffect_0,
HallOfFameRecordEffect_1,
HallOfFameRecordEffect_2,
HallOfFameRecordEffect_3
};
void (*const gUnknown_0855C384[])(struct Sprite *) = {
void (*const gUnknown_0855C384[])(struct Sprite *) =
{
PokeballGlowEffect_0,
PokeballGlowEffect_1,
PokeballGlowEffect_2,
@@ -442,7 +494,8 @@ void (*const gUnknown_0855C384[])(struct Sprite *) = {
PokeballGlowEffect_7
};
const struct Coords16 gUnknown_0855C3A4[] = {
const struct Coords16 gUnknown_0855C3A4[] =
{
{.x = 0, .y = 0},
{.x = 6, .y = 0},
{.x = 0, .y = 4},
@@ -455,7 +508,8 @@ const u8 gUnknown_0855C3BC[] = {16, 12, 8, 0};
const u8 gUnknown_0855C3C0[] = {16, 12, 8, 0};
const u8 gUnknown_0855C3C4[] = { 0, 0, 0, 0};
bool8 (*const gUnknown_0855C3C8[])(struct Task *) = {
bool8 (*const gUnknown_0855C3C8[])(struct Task *) =
{
sub_80B6BCC,
sub_80B6C74,
sub_80B6C90,
@@ -465,7 +519,8 @@ bool8 (*const gUnknown_0855C3C8[])(struct Task *) = {
sub_80B6E18,
};
bool8 (*const gUnknown_0855C3E4[])(struct Task *) = {
bool8 (*const gUnknown_0855C3E4[])(struct Task *) =
{
sub_80B6EC0,
sub_80B6EE0,
sub_80B6F50,
@@ -474,7 +529,8 @@ bool8 (*const gUnknown_0855C3E4[])(struct Task *) = {
sub_80B6FA8,
};
bool8 (*const gUnknown_0855C3FC[])(struct Task *) = {
bool8 (*const gUnknown_0855C3FC[])(struct Task *) =
{
sub_80B7114,
sub_80B7190,
sub_80B71D0,
@@ -484,7 +540,8 @@ bool8 (*const gUnknown_0855C3FC[])(struct Task *) = {
sub_80B72F4,
};
bool8 (*const gUnknown_0855C418[])(struct Task *, struct EventObject *) = {
bool8 (*const gUnknown_0855C418[])(struct Task *, struct EventObject *) =
{
sub_80B73D0,
waterfall_1_do_anim_probably,
waterfall_2_wait_anim_finish_probably,
@@ -492,13 +549,15 @@ bool8 (*const gUnknown_0855C418[])(struct Task *, struct EventObject *) = {
sub_80B7478,
};
bool8 (*const gUnknown_0855C42C[])(struct Task *) = {
bool8 (*const gUnknown_0855C42C[])(struct Task *) =
{
dive_1_lock,
dive_2_unknown,
dive_3_unknown,
};
bool8 (*const gUnknown_0855C438[])(struct Task *, struct EventObject *, struct Sprite *) = {
bool8 (*const gUnknown_0855C438[])(struct Task *, struct EventObject *, struct Sprite *) =
{
sub_80B764C,
sub_80B7684,
sub_80B76B8,
@@ -507,14 +566,16 @@ bool8 (*const gUnknown_0855C438[])(struct Task *, struct EventObject *, struct S
sub_80B7814,
};
bool8 (*const gUnknown_0855C450[])(struct Task *, struct EventObject *, struct Sprite *) = {
bool8 (*const gUnknown_0855C450[])(struct Task *, struct EventObject *, struct Sprite *) =
{
sub_80B78EC,
sub_80B791C,
sub_80B7968,
sub_80B79BC,
};
bool8 (*const gUnknown_0855C460[])(struct Task *, struct EventObject *, struct Sprite *) = {
bool8 (*const gUnknown_0855C460[])(struct Task *, struct EventObject *, struct Sprite *) =
{
sub_80B7AE8,
sub_80B7B18,
sub_80B7B94,
@@ -522,7 +583,8 @@ bool8 (*const gUnknown_0855C460[])(struct Task *, struct EventObject *, struct S
sub_80B7BF4,
};
void (*const gEscapeRopeFieldEffectFuncs[])(struct Task *) = {
void (*const gEscapeRopeFieldEffectFuncs[])(struct Task *) =
{
EscapeRopeFieldEffect_Step0,
EscapeRopeFieldEffect_Step1,
};
+1 -1
View File
@@ -1508,7 +1508,7 @@ void sub_8155F80(struct Sprite *sprite)
}
}
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
FieldEffectStop(sprite, FLDEFF_64);
FieldEffectStop(sprite, FLDEFF_RAYQUAZA);
break;
}
+13 -13
View File
@@ -44,7 +44,7 @@ static void task0A_fade_n_map_maybe(u8);
static void sub_808115C(u8);
static void palette_bg_faded_fill_white(void);
static void sub_80AF438(u8);
static bool32 sub_80AF71C(void);
static bool32 WaitForWeatherFadeIn(void);
static void task0A_mpl_807E31C(u8 taskId);
static void sub_80AFA0C(u8 taskId);
static void sub_80AFA88(u8 taskId);
@@ -119,7 +119,7 @@ static void sub_80AF0F4(u8 arg)
static void task0A_nop_for_a_while(u8 taskId)
{
if (sub_80AF71C() == TRUE)
if (WaitForWeatherFadeIn() == TRUE)
DestroyTask(taskId);
}
@@ -133,14 +133,14 @@ void sub_80AF128(void)
static void task0A_asap_script_env_2_enable_and_set_ctx_running(u8 taskID)
{
if (sub_80AF71C() == TRUE)
if (WaitForWeatherFadeIn() == TRUE)
{
DestroyTask(taskID);
EnableBothScriptContexts();
}
}
void sub_80AF168(void)
void FieldCallback_ReturnToEventScript2(void)
{
ScriptContext2_Enable();
Overworld_PlaySpecialMapMusic();
@@ -173,7 +173,7 @@ static void task_mpl_807DD60(u8 taskId)
}
break;
case 2:
if (sub_80AF71C() == TRUE)
if (WaitForWeatherFadeIn() == TRUE)
{
ScriptContext2_Disable();
DestroyTask(taskId);
@@ -213,7 +213,7 @@ static void sub_80AF234(u8 taskId)
}
break;
case 2:
if (sub_80AF71C() == TRUE)
if (WaitForWeatherFadeIn() == TRUE)
{
sub_8009F18();
ScriptContext2_Disable();
@@ -333,7 +333,7 @@ static void sub_80AF438(u8 taskId)
task->data[0] = 1;
break;
case 1:
if (sub_80AF71C())
if (WaitForWeatherFadeIn())
{
u8 eventObjId;
sub_80AF0F4(1);
@@ -381,7 +381,7 @@ static void task_map_chg_seq_0807E20C(u8 taskId)
task->data[0] = 1;
break;
case 1:
if (sub_80AF71C())
if (WaitForWeatherFadeIn())
{
u8 eventObjId;
sub_80AF0F4(1);
@@ -414,7 +414,7 @@ static void task_map_chg_seq_0807E2CC(u8 taskId)
gTasks[taskId].data[0]++;
break;
case 1:
if (sub_80AF71C())
if (WaitForWeatherFadeIn())
{
UnfreezeEventObjects();
ScriptContext2_Disable();
@@ -426,7 +426,7 @@ static void task_map_chg_seq_0807E2CC(u8 taskId)
static void sub_80AF660(u8 taskId)
{
if (sub_80AF71C() == TRUE)
if (WaitForWeatherFadeIn() == TRUE)
{
DestroyTask(taskId);
CreateTask(sub_809FA34, 80);
@@ -448,7 +448,7 @@ bool8 sub_80AF6A4(void)
static void task_mpl_807E3C8(u8 taskId)
{
if (sub_80AF71C() == 1)
if (WaitForWeatherFadeIn() == 1)
{
ScriptContext2_Disable();
DestroyTask(taskId);
@@ -476,7 +476,7 @@ static bool32 PaletteFadeActive(void)
return gPaletteFade.active;
}
static bool32 sub_80AF71C(void)
static bool32 WaitForWeatherFadeIn(void)
{
if (IsWeatherNotFadingIn() == TRUE)
return TRUE;
@@ -1007,7 +1007,7 @@ static void task0A_mpl_807E31C(u8 taskId)
gTasks[taskId].data[0]++;
break;
case 1:
if (sub_80AF71C() && sub_808D1B4() != TRUE)
if (WaitForWeatherFadeIn() && sub_808D1B4() != TRUE)
{
UnfreezeEventObjects();
ScriptContext2_Disable();
+2 -2
View File
@@ -301,7 +301,7 @@ void Task_HandlePorthole(u8 taskId)
break;
case EXIT_PORTHOLE: // exit porthole.
FlagClear(FLAG_SPECIAL_FLAG_0x4001);
FlagClear(FLAG_SPECIAL_FLAG_0x4000);
FlagClear(FLAG_HIDE_MAP_NAME_POPUP);
SetWarpDestinationToDynamicWarp(0);
DoDiveWarp();
DestroyTask(taskId);
@@ -338,7 +338,7 @@ void sub_80FB7A4(void)
{
FlagSet(FLAG_SYS_CRUISE_MODE);
FlagSet(FLAG_SPECIAL_FLAG_0x4001);
FlagSet(FLAG_SPECIAL_FLAG_0x4000);
FlagSet(FLAG_HIDE_MAP_NAME_POPUP);
SetDynamicWarp(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1);
sub_80FB59C();
sub_80AF8B8();
+5 -5
View File
@@ -1,4 +1,5 @@
#include "global.h"
#include "alloc.h"
#include "battle.h"
#include "battle_tower.h"
#include "cable_club.h"
@@ -20,7 +21,7 @@
#include "link.h"
#include "list_menu.h"
#include "main.h"
#include "alloc.h"
#include "mevent.h"
#include "match_call.h"
#include "menu.h"
#include "overworld.h"
@@ -31,7 +32,6 @@
#include "random.h"
#include "rayquaza_scene.h"
#include "region_map.h"
#include "rom_8011DC0.h"
#include "rtc.h"
#include "script.h"
#include "script_menu.h"
@@ -2610,7 +2610,7 @@ static void sub_813A4EC(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
gSpecialVar_Result = 0x7F;
PlaySE(SE_SELECT);
sub_813A570(taskId);
@@ -2690,10 +2690,10 @@ static void sub_813A664(u8 taskId)
static void sub_813A694(u8 taskId)
{
static const struct ScrollArrowsTemplate gUnknown_085B3030 = {
.firstArrowType = 2,
.firstArrowType = SCROLL_ARROW_UP,
.firstX = 0,
.firstY = 0,
.secondArrowType = 3,
.secondArrowType = SCROLL_ARROW_DOWN,
.secondX = 0,
.secondY = 0,
.fullyUpThreshold = 0,
+14 -14
View File
@@ -48,10 +48,10 @@ static const struct OamData gOamData_839A9DC =
.objMode = 1,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 3,
.paletteNum = 0,
@@ -577,10 +577,10 @@ static const struct OamData gOamData_839AA68 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 2,
.shape = SPRITE_SHAPE(16x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(16x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 2,
@@ -648,10 +648,10 @@ static const struct OamData gOamData_839AAD4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -704,10 +704,10 @@ static const struct OamData gOamData_839AB2C =
.objMode = 1,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -1517,10 +1517,10 @@ const struct OamData gOamData_839ABB8 =
.objMode = 1,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 1,
.paletteNum = 15,
@@ -1754,10 +1754,10 @@ const struct OamData gOamData_839ABF0 =
.objMode = 1,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -1953,10 +1953,10 @@ const struct OamData gOamData_839AC1C =
.objMode = 1,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
+3 -4
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "event_obj_lock.h"
#include "event_object_movement.h"
#include "faraway_island.h"
#include "field_camera.h"
#include "field_effect.h"
#include "field_player_avatar.h"
@@ -20,8 +21,6 @@
#include "constants/field_effects.h"
#include "constants/songs.h"
extern bool8 IsMewPlayingHideAndSeek(void);
extern struct MapPosition gPlayerFacingPosition;
extern const u8 Route103_EventScript_290705[];
@@ -132,10 +131,10 @@ static const struct OamData sOamData_CutGrass =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 1,
.priority = 1,
.paletteNum = 1,
+4 -4
View File
@@ -93,8 +93,8 @@ static const struct OamData gOamData_858E4D8 =
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2,
};
@@ -246,8 +246,8 @@ static const struct OamData gOamData_858E658 =
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_V_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.priority = 2,
};
+7 -7
View File
@@ -4,10 +4,10 @@ const u32 gBattleTextboxTiles[] = INCBIN_U32("graphics/battle_interface/textbox.
const u32 gBattleTextboxPalette[] = INCBIN_U32("graphics/battle_interface/textbox.gbapal.lz");
const u32 gBattleTextboxTilemap[] = INCBIN_U32("graphics/battle_interface/textbox_map.bin.lz");
const u32 gMonStillFrontPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/front_pics/circled_question_mark_still_front_pic.4bpp.lz");
const u32 gMonBackPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/back_pics/circled_question_mark_back_pic.4bpp.lz");
const u32 gMonPalette_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/palettes/circled_question_mark_palette.gbapal.lz");
const u32 gMonShinyPalette_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/palettes/circled_question_mark_shiny_palette.gbapal.lz");
const u32 gMonStillFrontPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/circled_question_mark/front.4bpp.lz");
const u32 gMonBackPic_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/circled_question_mark/back.4bpp.lz");
const u32 gMonPalette_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/circled_question_mark/normal.gbapal.lz");
const u32 gMonShinyPalette_CircledQuestionMark[] = INCBIN_U32("graphics/pokemon/circled_question_mark/shiny.gbapal.lz");
const u32 gUnusedGfx_OldCharmap[] = INCBIN_U32("graphics/unused/old_charmap.4bpp.lz"); // japanese table and bunch of stuff
const u32 gUnusedTimemap_OldCharmap[] = INCBIN_U32("graphics/unused/old_charmap.bin.lz");
@@ -953,8 +953,8 @@ const u32 gUnknownPal_C2F9E0[] = INCBIN_U32("graphics/unknown/unknown_C2F9E0.gba
#include "data/graphics/pokemon.h"
#include "data/graphics/trainers.h"
const u8 gMonIcon_QuestionMark[] = INCBIN_U8("graphics/pokemon/icons/question_mark_icon.4bpp");
const u8 gMonFootprint_QuestionMark[] = INCBIN_U8("graphics/pokemon/footprints/question_mark_footprint.1bpp");
const u8 gMonIcon_QuestionMark[] = INCBIN_U8("graphics/pokemon/question_mark/icon.4bpp");
const u8 gMonFootprint_QuestionMark[] = INCBIN_U8("graphics/pokemon/question_mark/footprint.1bpp");
const u32 gUnknown_08D778F0[] = INCBIN_U32("graphics/battle_transitions/vs_frame.4bpp.lz");
const u32 gUnknown_08D779D8[] = INCBIN_U32("graphics/battle_transitions/vs_frame.bin.lz");
@@ -1064,7 +1064,7 @@ const u32 gEnemyMonShadow_Gfx[] = INCBIN_U32("graphics/battle_interface/enemy_mo
const u32 gBattleInterface_BallStatusBarGfx[] = INCBIN_U32("graphics/battle_interface/ball_status_bar.4bpp.lz");
const u8 gMonIcon_Egg[] = INCBIN_U8("graphics/pokemon/icons/egg_icon.4bpp");
const u8 gMonIcon_Egg[] = INCBIN_U8("graphics/pokemon/egg/icon.4bpp");
const u32 gBattleAnimBackgroundImage_02[] = INCBIN_U32("graphics/battle_anims/backgrounds/02.4bpp.lz");
const u32 gBattleAnimBackgroundPalette_02[] = INCBIN_U32("graphics/battle_anims/backgrounds/02.gbapal.lz");
+2 -2
View File
@@ -178,10 +178,10 @@ static const struct OamData sOamData_85E53FC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+30 -30
View File
@@ -145,10 +145,10 @@ static const struct OamData gUnknown_085E4A94 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -214,10 +214,10 @@ static const struct OamData gUnknown_085E4B28 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -251,10 +251,10 @@ static const struct OamData gUnknown_085E4B58 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -307,10 +307,10 @@ static const struct OamData gUnknown_085E4BBC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -356,10 +356,10 @@ static const struct OamData gUnknown_085E4C14 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -441,10 +441,10 @@ static const struct OamData gUnknown_085E4CF0 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 2,
.shape = SPRITE_SHAPE(16x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(16x32),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -481,10 +481,10 @@ static const struct OamData gUnknown_085E4D2C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -572,10 +572,10 @@ static const struct OamData gUnknown_085E4DD4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -588,10 +588,10 @@ static const struct OamData gUnknown_085E4DDC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -604,10 +604,10 @@ static const struct OamData gUnknown_085E4DE4 =
.objMode = 1,
.mosaic = 0,
.bpp = 0,
.shape = 2,
.shape = SPRITE_SHAPE(32x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(32x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -804,10 +804,10 @@ static const struct OamData gUnknown_085E4FB0 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(64x32),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x32),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -857,10 +857,10 @@ static const struct OamData gUnknown_085E501C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -2427,7 +2427,7 @@ static void Task_IntroWaterDrops_1(u8 taskId)
| BLDCNT_TGT2_BG3
| BLDCNT_TGT2_OBJ
| BLDCNT_TGT2_BD);
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[31]);
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[31]);
SetGpuReg(REG_OFFSET_BLDY, 0);
gTasks[taskId].data[1] = 0x40;
gTasks[taskId].data[0]++;
@@ -2439,11 +2439,11 @@ static void Task_IntroWaterDrops_1(u8 taskId)
gTasks[taskId].data[1]--;
tmp = gTasks[taskId].data[1] / 2;
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[tmp]);
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[tmp]);
}
else
{
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[0]);
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[0]);
gTasks[taskId].data[1] = 0x10;
gTasks[taskId].data[0]++;
}
@@ -2470,7 +2470,7 @@ static void Task_IntroWaterDrops_2(u8 taskId)
| BLDCNT_TGT2_BG3
| BLDCNT_TGT2_OBJ
| BLDCNT_TGT2_BD);
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[0]);
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[0]);
SetGpuReg(REG_OFFSET_BLDY, 0);
gTasks[taskId].data[1] = 0;
gTasks[taskId].data[0]++;
@@ -2482,11 +2482,11 @@ static void Task_IntroWaterDrops_2(u8 taskId)
gTasks[taskId].data[1]++;
tmp = gTasks[taskId].data[1] / 2;
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[tmp]);
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[tmp]);
}
else
{
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropData[31]);
SetGpuReg(REG_OFFSET_BLDALPHA, gIntroWaterDropAlphaBlend[31]);
gTasks[taskId].data[1] = 0x10;
gTasks[taskId].data[0]++;
}
+500 -125
View File
@@ -57,123 +57,380 @@ static void nullsub_65(struct Sprite *sprite);
static void sub_817B7C4(struct Sprite *sprite);
static void nullsub_66(struct Sprite *sprite);
static const struct SpriteTemplate gUnknown_085F504C = {
2000, 0xFFFF, &gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_817B62C
static const struct SpriteTemplate gUnknown_085F504C =
{
.tileTag = 2000,
.paletteTag = 0xFFFF,
.oam = &gDummyOamData,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_817B62C
};
static const struct CompressedSpriteSheet gUnknown_085F5064[] = {
{ gUnknown_085F16A8, 0x400, 2000 },
{ NULL }
static const struct CompressedSpriteSheet gUnknown_085F5064[] =
{
{
.data = gUnknown_085F16A8,
.size = 0x400,
.tag = 2000
},
{}
};
static const union AnimCmd gUnknown_085F5074[] = {
static const union AnimCmd gUnknown_085F5074[] =
{
ANIMCMD_FRAME( 0, 30),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085F507C[] = {
static const union AnimCmd gUnknown_085F507C[] =
{
ANIMCMD_FRAME(16, 30),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085F5084[] = {
static const union AnimCmd gUnknown_085F5084[] =
{
ANIMCMD_FRAME(20, 30),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085F508C[] = {
static const union AnimCmd gUnknown_085F508C[] =
{
ANIMCMD_FRAME(22, 30),
ANIMCMD_END
};
static const union AnimCmd *const gUnknown_085F5094[] = {
static const union AnimCmd *const gUnknown_085F5094[] =
{
gUnknown_085F5074,
gUnknown_085F507C,
gUnknown_085F5084,
gUnknown_085F508C
};
static const struct IntroCreditsSpriteMetadata gUnknown_085F50A4[] = {
{ 0, ST_OAM_SQUARE, 2, 72, 32, 100, 0xc00 },
{ 0, ST_OAM_SQUARE, 2, 158, 32, 100, 0xc00 },
{ 1, ST_OAM_SQUARE, 1, 192, 40, 101, 0x800 },
{ 1, ST_OAM_SQUARE, 1, 56, 40, 101, 0x800 },
{ 2, ST_OAM_H_RECTANGLE, 0, 100, 44, 102, 0x400 },
{ 2, ST_OAM_H_RECTANGLE, 0, 152, 44, 102, 0x400 },
{ 3, ST_OAM_H_RECTANGLE, 0, 8, 46, 103, 0x100 },
{ 3, ST_OAM_H_RECTANGLE, 0, 56, 46, 103, 0x100 },
{ 3, ST_OAM_H_RECTANGLE, 0, 240, 46, 103, 0x100 },
static const struct IntroCreditsSpriteMetadata gUnknown_085F50A4[] =
{
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 72,
.y = 32,
.subpriority = 100,
.xOff = 0xc00
},
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 158,
.y = 32,
.subpriority = 100,
.xOff = 0xc00
},
{
.animNum = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.x = 192,
.y = 40,
.subpriority = 101,
.xOff = 0x800
},
{
.animNum = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.x = 56,
.y = 40,
.subpriority = 101,
.xOff = 0x800
},
{
.animNum = 2,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.x = 100,
.y = 44,
.subpriority = 102,
.xOff = 0x400
},
{
.animNum = 2,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.x = 152,
.y = 44,
.subpriority = 102,
.xOff = 0x400
},
{
.animNum = 3,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.x = 8,
.y = 46,
.subpriority = 103,
.xOff = 0x100
},
{
.animNum = 3,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.x = 56,
.y = 46,
.subpriority = 103,
.xOff = 0x100
},
{
.animNum = 3,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.x = 240,
.y = 46,
.subpriority = 103,
.xOff = 0x100
},
};
static const struct CompressedSpriteSheet gUnknown_085F50EC[] = {
{ gIntro2TreeTiles, 0x400, 2000 },
{ NULL }
static const struct CompressedSpriteSheet gUnknown_085F50EC[] =
{
{
.data = gIntro2TreeTiles,
.size = 0x400,
.tag = 2000
},
{}
};
static const union AnimCmd gUnknown_085F50FC[] = {
static const union AnimCmd gUnknown_085F50FC[] =
{
ANIMCMD_FRAME( 0, 30),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085F5104[] = {
static const union AnimCmd gUnknown_085F5104[] =
{
ANIMCMD_FRAME(16, 30),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085F510C[] = {
static const union AnimCmd gUnknown_085F510C[] =
{
ANIMCMD_FRAME(24, 30),
ANIMCMD_END
};
static const union AnimCmd *const gUnknown_085F5114[] = {
static const union AnimCmd *const gUnknown_085F5114[] =
{
gUnknown_085F50FC,
gUnknown_085F5104,
gUnknown_085F510C
};
static const struct IntroCreditsSpriteMetadata gUnknown_085F5120[] = {
{ 0, ST_OAM_SQUARE, 2, 16, 88, 100, 0x2000 },
{ 0, ST_OAM_SQUARE, 2, 80, 88, 100, 0x2000 },
{ 0, ST_OAM_SQUARE, 2, 144, 88, 100, 0x2000 },
{ 0, ST_OAM_SQUARE, 2, 208, 88, 100, 0x2000 },
{ 1, ST_OAM_V_RECTANGLE, 2, 40, 88, 101, 0x1000 },
{ 1, ST_OAM_V_RECTANGLE, 2, 104, 88, 101, 0x1000 },
{ 1, ST_OAM_V_RECTANGLE, 2, 168, 88, 101, 0x1000 },
{ 1, ST_OAM_V_RECTANGLE, 2, 232, 88, 101, 0x1000 },
{ 2, ST_OAM_V_RECTANGLE, 2, 56, 88, 102, 0x800 },
{ 2, ST_OAM_V_RECTANGLE, 2, 120, 88, 102, 0x800 },
{ 2, ST_OAM_V_RECTANGLE, 2, 184, 88, 102, 0x800 },
{ 2, ST_OAM_V_RECTANGLE, 2, 248, 88, 102, 0x800 },
static const struct IntroCreditsSpriteMetadata gUnknown_085F5120[] =
{
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 16,
.y = 88,
.subpriority = 100,
.xOff = 0x2000,
},
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 80,
.y = 88,
.subpriority = 100,
.xOff = 0x2000,
},
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 144,
.y = 88,
.subpriority = 100,
.xOff = 0x2000,
},
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 208,
.y = 88,
.subpriority = 100,
.xOff = 0x2000,
},
{
.animNum = 1,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.x = 40,
.y = 88,
.subpriority = 101,
.xOff = 0x1000,
},
{
.animNum = 1,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.x = 104,
.y = 88,
.subpriority = 101,
.xOff = 0x1000,
},
{
.animNum = 1,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.x = 168,
.y = 88,
.subpriority = 101,
.xOff = 0x1000,
},
{
.animNum = 1,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.x = 232,
.y = 88,
.subpriority = 101,
.xOff = 0x1000,
},
{
.animNum = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.x = 56,
.y = 88,
.subpriority = 102,
.xOff = 0x800,
},
{
.animNum = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.x = 120,
.y = 88,
.subpriority = 102,
.xOff = 0x800,
},
{
.animNum = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.x = 184,
.y = 88,
.subpriority = 102,
.xOff = 0x800,
},
{
.animNum = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.x = 248,
.y = 88,
.subpriority = 102,
.xOff = 0x800,
}
};
static const struct CompressedSpriteSheet gUnknown_085F5180[] = {
{ gIntro2NightTiles, 0x400, 2000 },
{ NULL }
static const struct CompressedSpriteSheet gUnknown_085F5180[] =
{
{
.data = gIntro2NightTiles,
.size = 0x400,
.tag = 2000
},
{}
};
static const union AnimCmd gUnknown_085F5190[] = {
static const union AnimCmd gUnknown_085F5190[] =
{
ANIMCMD_FRAME(0, 30),
ANIMCMD_END
};
static const union AnimCmd *const gUnknown_085F5198[] = {
static const union AnimCmd *const gUnknown_085F5198[] =
{
gUnknown_085F5190
};
static const struct IntroCreditsSpriteMetadata gUnknown_085F519C[] = {
{ 0, ST_OAM_SQUARE, 2, 24, 88, 100, 0x1000 },
{ 0, ST_OAM_SQUARE, 2, 64, 88, 100, 0x1000 },
{ 0, ST_OAM_SQUARE, 2, 104, 88, 100, 0x1000 },
{ 0, ST_OAM_SQUARE, 2, 144, 88, 100, 0x1000 },
{ 0, ST_OAM_SQUARE, 2, 184, 88, 100, 0x1000 },
{ 0, ST_OAM_SQUARE, 2, 224, 88, 100, 0x1000 },
static const struct IntroCreditsSpriteMetadata gUnknown_085F519C[] =
{
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 24,
.y = 88,
.subpriority = 100,
.xOff = 0x1000,
},
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 64,
.y = 88,
.subpriority = 100,
.xOff = 0x1000,
},
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 104,
.y = 88,
.subpriority = 100,
.xOff = 0x1000,
},
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 144,
.y = 88,
.subpriority = 100,
.xOff = 0x1000,
},
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 184,
.y = 88,
.subpriority = 100,
.xOff = 0x1000,
},
{
.animNum = 0,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.x = 224,
.y = 88,
.subpriority = 100,
.xOff = 0x1000,
}
};
static const struct OamData gOamData_85F51CC = {
.y = 160, .shape = ST_OAM_SQUARE, .size = 3, .priority = 1
static const struct OamData gOamData_85F51CC =
{
.y = 160,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 1
};
static const union AnimCmd gUnknown_085F51D4[] = {
static const union AnimCmd gUnknown_085F51D4[] =
{
ANIMCMD_FRAME( 0, 8),
ANIMCMD_FRAME( 64, 8),
ANIMCMD_FRAME(128, 8),
@@ -181,23 +438,43 @@ static const union AnimCmd gUnknown_085F51D4[] = {
ANIMCMD_JUMP(0)
};
static const union AnimCmd *const gUnknown_085F51E8[] = {
static const union AnimCmd *const gUnknown_085F51E8[] =
{
gUnknown_085F51D4
};
static const struct SpriteTemplate gUnknown_085F51EC = {
1002, 1002, &gOamData_85F51CC, gUnknown_085F51E8, NULL, gDummySpriteAffineAnimTable, nullsub_65
static const struct SpriteTemplate gUnknown_085F51EC =
{
.tileTag = 1002,
.paletteTag = 1002,
.oam = &gOamData_85F51CC,
.anims = gUnknown_085F51E8,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = nullsub_65
};
static const struct SpriteTemplate gUnknown_085F5204 = {
1003, 1003, &gOamData_85F51CC, gUnknown_085F51E8, NULL, gDummySpriteAffineAnimTable, nullsub_65
static const struct SpriteTemplate gUnknown_085F5204 =
{
.tileTag = 1003,
.paletteTag = 1003,
.oam = &gOamData_85F51CC,
.anims = gUnknown_085F51E8,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = nullsub_65
};
static const struct OamData gUnknown_085F521C = {
.y = 160, .shape = ST_OAM_H_RECTANGLE, .size = 3, .priority = 1
static const struct OamData gUnknown_085F521C =
{
.y = 160,
.shape = SPRITE_SHAPE(64x32),
.size = SPRITE_SIZE(64x32),
.priority = 1
};
static const union AnimCmd gUnknown_085F5224[] = {
static const union AnimCmd gUnknown_085F5224[] =
{
ANIMCMD_FRAME( 0, 8),
ANIMCMD_FRAME( 32, 8),
ANIMCMD_FRAME( 64, 8),
@@ -205,119 +482,217 @@ static const union AnimCmd gUnknown_085F5224[] = {
ANIMCMD_JUMP(0)
};
static const union AnimCmd *const gUnknown_085F5238[] = {
static const union AnimCmd *const gUnknown_085F5238[] =
{
gUnknown_085F5224
};
static const struct SpriteTemplate gUnknown_085F523C = {
1001, 1002, &gUnknown_085F521C, gUnknown_085F5238, NULL, gDummySpriteAffineAnimTable, sub_817B7C4
static const struct SpriteTemplate gUnknown_085F523C =
{
.tileTag = 1001,
.paletteTag = 1002,
.oam = &gUnknown_085F521C,
.anims = gUnknown_085F5238,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_817B7C4
};
static const struct SpriteTemplate gUnknown_085F5254 = {
1001, 1003, &gUnknown_085F521C, gUnknown_085F5238, NULL, gDummySpriteAffineAnimTable, sub_817B7C4
static const struct SpriteTemplate gUnknown_085F5254 =
{
.tileTag = 1001,
.paletteTag = 1003,
.oam = &gUnknown_085F521C,
.anims = gUnknown_085F5238,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = sub_817B7C4
};
static const struct OamData gUnknown_085F526C = {
.y = 160, .shape = ST_OAM_SQUARE, .size = 3, .priority = 1
static const struct OamData gUnknown_085F526C =
{
.y = 160,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 1
};
static const union AnimCmd gUnknown_085F5274[] = {
static const union AnimCmd gUnknown_085F5274[] =
{
ANIMCMD_FRAME( 0, 16),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085F527C[] = {
static const union AnimCmd gUnknown_085F527C[] =
{
ANIMCMD_FRAME( 64, 16),
ANIMCMD_END
};
static const union AnimCmd *const gUnknown_085F5284[] = {
static const union AnimCmd *const gUnknown_085F5284[] =
{
gUnknown_085F5274,
gUnknown_085F527C
};
static const struct SpriteTemplate gUnknown_085F528C = {
1004, 1004, &gUnknown_085F526C, gUnknown_085F5284, NULL, gDummySpriteAffineAnimTable, nullsub_66
static const struct SpriteTemplate gUnknown_085F528C =
{
.tileTag = 1004,
.paletteTag = 1004,
.oam = &gUnknown_085F526C,
.anims = gUnknown_085F5284,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = nullsub_66
};
static const struct SpriteTemplate gUnknown_085F52A4 = {
1005, 1005, &gUnknown_085F526C, gUnknown_085F5284, NULL, gDummySpriteAffineAnimTable, nullsub_66
static const struct SpriteTemplate gUnknown_085F52A4 =
{
.tileTag = 1005,
.paletteTag = 1005,
.oam = &gUnknown_085F526C,
.anims = gUnknown_085F5284,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = nullsub_66
};
const struct CompressedSpriteSheet gIntro2BrendanSpriteSheet[] = {
{ gIntro2BrendanNoTurnGfx, 0x2000, 1002 },
{ NULL }
const struct CompressedSpriteSheet gIntro2BrendanSpriteSheet[] =
{
{
.data = gIntro2BrendanNoTurnGfx,
.size = 0x2000,
.tag = 1002
},
{}
};
const struct CompressedSpriteSheet gIntro2MaySpriteSheet[] = {
{ gIntro2MayNoTurnGfx, 0x2000, 1003 },
{ NULL }
const struct CompressedSpriteSheet gIntro2MaySpriteSheet[] =
{
{
.data = gIntro2MayNoTurnGfx,
.size = 0x2000,
.tag = 1003
},
{}
};
const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet[] = {
{ gIntro2BicycleTiles, 0x1000, 1001 },
{ NULL }
const struct CompressedSpriteSheet gIntro2BicycleSpriteSheet[] =
{
{
.data = gIntro2BicycleTiles,
.size = 0x1000,
.tag = 1001
},
{}
};
static const struct CompressedSpriteSheet gUnknown_085F52EC[] = {
{ gIntro2FlygonGfx, 0x1000, 1004 },
{ NULL }
static const struct CompressedSpriteSheet gUnknown_085F52EC[] =
{
{
.data = gIntro2FlygonGfx,
.size = 0x1000,
.tag = 1004
},
{}
};
const struct CompressedSpriteSheet gIntro2FlygonSpriteSheet[] = {
{ gIntro2FlygonGfx, 0x1000, 1005 },
{ NULL }
const struct CompressedSpriteSheet gIntro2FlygonSpriteSheet[] =
{
{
.data = gIntro2FlygonGfx,
.size = 0x1000,
.tag = 1005
},
{}
};
const struct SpritePalette gIntroBikeAndFlygonPalette[] = {
{ gIntro2BrendanNoTurnPal, 1002 },
{ gIntro2BrendanNoTurnPal, 1003 },
{ gIntro2FlygonPal, 1004 },
{ gIntro2FlygonPal, 1005 },
{ NULL }
const struct SpritePalette gIntroBikeAndFlygonPalette[] =
{
{ .data = gIntro2BrendanNoTurnPal, .tag = 1002 },
{ .data = gIntro2BrendanNoTurnPal, .tag = 1003 },
{ .data = gIntro2FlygonPal, .tag = 1004 },
{ .data = gIntro2FlygonPal, .tag = 1005 },
{}
};
const struct CompressedSpriteSheet gUnknown_085F5334[] = {
{ gIntro2BrendanTiles, 0x3800, 1002 },
{ NULL }
const struct CompressedSpriteSheet gUnknown_085F5334[] =
{
{
.data = gIntro2BrendanTiles,
.size = 0x3800,
.tag = 1002
},
{}
};
const struct CompressedSpriteSheet gUnknown_085F5344[] = {
{ gIntro2MayTiles, 0x3800, 1003 },
{ NULL }
const struct CompressedSpriteSheet gUnknown_085F5344[] =
{
{
.data = gIntro2MayTiles,
.size = 0x3800,
.tag = 1003
},
{}
};
const struct CompressedSpriteSheet gUnknown_085F5354[] = {
{ gIntro2BicycleTiles, 0x1000, 1001 },
{ NULL }
const struct CompressedSpriteSheet gUnknown_085F5354[] =
{
{
.data = gIntro2BicycleTiles,
.size = 0x1000,
.tag = 1001
},
{}
};
static const struct CompressedSpriteSheet gUnknown_085F5364[] = {
{ gIntro2LatiosTiles, 0x1000, 1004 },
{ NULL }
static const struct CompressedSpriteSheet gUnknown_085F5364[] =
{
{
.data = gIntro2LatiosTiles,
.size = 0x1000,
.tag = 1004
},
{}
};
static const struct CompressedSpriteSheet gUnknown_085F5374[] = {
{ gIntro2LatiasTiles, 0x1000, 1005 },
{ NULL }
static const struct CompressedSpriteSheet gUnknown_085F5374[] =
{
{
.data = gIntro2LatiasTiles,
.size = 0x1000,
.tag = 1005
},
{}
};
const struct SpritePalette gUnknown_085F5384[] = {
{ gIntro2BrendanPalette, 1002 },
{ gIntro2MayPalette, 1003 },
{ gIntro2LatiosPalette, 1004 },
{ gIntro2LatiasPalette, 1005 },
{ NULL }
const struct SpritePalette gUnknown_085F5384[] =
{
{ .data = gIntro2BrendanPalette, .tag = 1002 },
{ .data = gIntro2MayPalette, .tag = 1003 },
{ .data = gIntro2LatiosPalette, .tag = 1004 },
{ .data = gIntro2LatiasPalette, .tag = 1005 },
{}
};
const struct CompressedSpriteSheet gUnknown_085F53AC[] = {
{ gIntro2BrendanTiles, 0x2000, 1002},
{ NULL }
const struct CompressedSpriteSheet gUnknown_085F53AC[] =
{
{
.data = gIntro2BrendanTiles,
.size = 0x2000,
.tag = 1002
},
{}
};
const struct CompressedSpriteSheet gUnknown_085F53BC[] = {
{ gIntro2MayTiles, 0x2000, 1003},
{ NULL }
const struct CompressedSpriteSheet gUnknown_085F53BC[] =
{
{
.data = gIntro2MayTiles,
.size = 0x2000,
.tag = 1003
},
{}
};
EWRAM_DATA u16 gUnknown_0203BD24 = 0;
+3 -3
View File
@@ -20,10 +20,10 @@ static const struct OamData sOamData_ItemIcon =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 2,
@@ -122,7 +122,7 @@ u8 AddItemIconSprite(u16 tilesTag, u16 paletteTag, u16 itemId)
}
}
u8 AddCustomItemIconSprite(struct SpriteTemplate *customSpriteTemplate, u16 tilesTag, u16 paletteTag, u16 itemId)
u8 AddCustomItemIconSprite(const struct SpriteTemplate *customSpriteTemplate, u16 tilesTag, u16 paletteTag, u16 itemId)
{
if (!AllocItemIconTemporaryBuffers())
{
+4 -4
View File
@@ -447,7 +447,7 @@ static EWRAM_DATA struct TempWallyStruct *gUnknown_0203CE80 = 0;
extern u8 *const gPocketNamesStringsTable[];
extern u8* gReturnToXStringsTable[];
extern const u8 EventScript_2736B3[];
extern const u8 EventScript_SelectWithoutRegisteredItem[];
extern const u16 gUnknown_0860F074[];
void ResetBagScrollPositions(void)
@@ -1107,7 +1107,7 @@ void Task_BagMenu(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
if (gUnknown_0203CE58.location == 5)
{
PlaySE(SE_HAZURE);
@@ -1323,7 +1323,7 @@ void sub_81AC3C0(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
PlaySE(SE_SELECT);
if (gMain.newKeys & A_BUTTON)
sub_81AC498(taskId);
@@ -1900,7 +1900,7 @@ bool8 UseRegisteredKeyItemOnField(void)
else
gSaveBlock1Ptr->registeredItem = ITEM_NONE;
}
ScriptContext1_SetupScript(EventScript_2736B3);
ScriptContext1_SetupScript(EventScript_SelectWithoutRegisteredItem);
return TRUE;
}
+10 -10
View File
@@ -36,10 +36,10 @@ static const struct OamData sOamData_857FAA4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -146,10 +146,10 @@ static const struct OamData sOamData_857FB64 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 4,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -217,10 +217,10 @@ static const struct OamData sOamData_857FBC8 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 1,
.paletteNum = 7,
@@ -234,10 +234,10 @@ static const struct OamData sOamData_857FBD0 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 7,
@@ -374,10 +374,10 @@ static const struct OamData sOamData_857FDFC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
+2 -3
View File
@@ -4,6 +4,7 @@
#include "battle_pyramid.h"
#include "battle_pyramid_bag.h"
#include "berry.h"
#include "berry_powder.h"
#include "bike.h"
#include "coins.h"
#include "data2.h"
@@ -45,8 +46,6 @@ extern u8 Route102_EventScript_274482[];
extern u8 Route102_EventScript_2744C0[];
extern u8 BattleFrontier_OutsideEast_EventScript_242CFC[];
extern s32 sub_80247BC(void);
void SetUpItemUseCallback(u8 taskId);
void MapPostLoadHook_UseItem(void);
void sub_80AF6D4(void);
@@ -638,7 +637,7 @@ void ItemUseOutOfBattle_CoinCase(u8 taskId)
void ItemUseOutOfBattle_PowderJar(u8 taskId)
{
ConvertIntToDecimalStringN(gStringVar1, sub_80247BC(), 0, 5);
ConvertIntToDecimalStringN(gStringVar1, GetBerryPowder(), 0, 5);
StringExpandPlaceholders(gStringVar4, gText_PowderQty);
if (!gTasks[taskId].data[3])
-833
View File
@@ -1,833 +0,0 @@
#include "global.h"
#include "main.h"
#include "battle.h"
#include "bg.h"
#include "contest_effect.h"
#include "data2.h"
#include "event_data.h"
#include "field_screen_effect.h"
#include "gpu_regs.h"
#include "learn_move.h"
#include "list_menu.h"
#include "alloc.h"
#include "menu.h"
#include "menu_helpers.h"
#include "overworld.h"
#include "palette.h"
#include "pokemon_summary_screen.h"
#include "pokenav.h"
#include "script.h"
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
#include "strings.h"
#include "task.h"
#include "constants/rgb.h"
#include "constants/songs.h"
static EWRAM_DATA struct
{
u8 state;
u8 spriteIds[16]; /*0x001*/
u16 movesToLearn[4]; /*0x012*/
u8 filler1A[0x44 - 0x1A]; /*0x01A*/
u8 partyMon; /*0x044*/
u8 moveSlot; /*0x045*/
struct ListMenuItem menuItems[20]; /*0x048*/
u8 fillerE8[0x110 - 0xE8]; /*0x0E8*/
u8 numMenuChoices; /*0x110*/
u8 numToShowAtOnce; /*0x111*/
u8 listMenuTask; /*0x112*/
u8 scrollArrowTaskId1; /*0x113*/
u8 scrollArrowTaskId2; /*0x114*/
u16 scrollOffset; /*0x116*/
} *sLearnMoveStruct = {0};
static EWRAM_DATA struct {
u16 listOffset;
u16 listRow;
u8 showContestInfo;
} sLearnMoveStruct2 = {0};
const u16 gUnknown_085CE9F8[] = INCBIN_U16("graphics/interface/ui_learn_move.gbapal");
const u8 gUnknown_085CEA18[] = INCBIN_U8("graphics/interface/ui_learn_move.4bpp");
const struct OamData gUnknown_085CEB98 =
{
.y = 0,
.affineMode = 0,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.x = 0,
.matrixNum = 0,
.size = 0,
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
.affineParam = 0,
};
const struct OamData gUnknown_085CEBA0 =
{
.y = 0,
.affineMode = 0,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_V_RECTANGLE,
.x = 0,
.matrixNum = 0,
.size = 0,
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
.affineParam = 0,
};
const struct OamData gUnknown_085CEBA8 =
{
.y = 0,
.affineMode = 0,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_H_RECTANGLE,
.x = 0,
.matrixNum = 0,
.size = 0,
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
.affineParam = 0,
};
const struct SpriteSheet gUnknown_085CEBB0 =
{
.data = gUnknown_085CEA18,
.size = 0x180,
.tag = 5525
};
const struct SpritePalette gUnknown_085CEBB8 =
{
.data = gUnknown_085CE9F8,
.tag = 5526
};
const struct ScrollArrowsTemplate gUnknown_085CEBC0 =
{
.firstArrowType = 0,
.firstX = 27,
.firstY = 16,
.secondArrowType = 1,
.secondX = 117,
.secondY = 16,
.fullyUpThreshold = -1,
.fullyDownThreshold = -1,
.tileTag = 5325,
.palTag = 5325,
.palNum = 0,
};
const struct ScrollArrowsTemplate gUnknown_085CEBD0 =
{
.firstArrowType = 2,
.firstX = 192,
.firstY = 8,
.secondArrowType = 3,
.secondX = 192,
.secondY = 104,
.fullyUpThreshold = 0,
.fullyDownThreshold = 0,
.tileTag = 5425,
.palTag = 5425,
.palNum = 0,
};
const union AnimCmd gUnknown_085CEBE0[] =
{
ANIMCMD_FRAME(8, 5, FALSE, FALSE),
ANIMCMD_END
};
const union AnimCmd gUnknown_085CEBE8[] =
{
ANIMCMD_FRAME(9, 5, FALSE, FALSE),
ANIMCMD_END
};
const union AnimCmd gUnknown_085CEBF0[] =
{
ANIMCMD_FRAME(10, 5, FALSE, FALSE),
ANIMCMD_END
};
const union AnimCmd gUnknown_085CEBF8[] =
{
ANIMCMD_FRAME(11, 5, FALSE, FALSE),
ANIMCMD_END
};
const union AnimCmd *const gUnknown_085CEC00[] =
{
gUnknown_085CEBE0,
gUnknown_085CEBE8,
gUnknown_085CEBF0,
gUnknown_085CEBF8,
};
const struct SpriteTemplate gUnknown_085CEC10 =
{
.tileTag = 5525,
.paletteTag = 5526,
.oam = &gUnknown_085CEB98,
.anims = gUnknown_085CEC00,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy
};
const struct BgTemplate gUnknown_085CEC28[] =
{
{
.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 = 1,
.baseTile = 0,
},
};
static void LearnMoveMain(void);
static void CreateMenuItemsList(void);
static void CreateHearts(void);
static void CB2_Main(void);
static void Task_WaitForFadeOut(u8 taskId);
static void CB2_InitLearnMove(void);
static void CB2_InitLearnMoveReturnFromSelectMove(void);
static void InitBGs(void);
static void AddScrollArrows(void);
static void HandleInput(u8);
static void ShowTeachMoveText(u8);
static s32 GetCurrentItemId(void);
static void FreeListMenuResources(void);
static void RemoveScrollArrows(void);
static void HideSpritesAndPrintTeachText(bool8);
static void VBlankCB_LearnMove(void)
{
LoadOam();
ProcessSpriteCopyRequests();
TransferPlttBuffer();
}
void TeachMoveTutorMove(void)
{
ScriptContext2_Enable();
CreateTask(Task_WaitForFadeOut, 0xA);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, 0);
}
static void Task_WaitForFadeOut(u8 taskId)
{
if (!gPaletteFade.active)
{
SetMainCallback2(CB2_InitLearnMove);
gFieldCallback = sub_80AF168;
DestroyTask(taskId);
}
}
static void CB2_InitLearnMove(void)
{
ResetSpriteData();
FreeAllSpritePalettes();
ResetTasks();
clear_scheduled_bg_copies_to_vram();
sLearnMoveStruct = AllocZeroed(sizeof(*sLearnMoveStruct));
sLearnMoveStruct->partyMon = gSpecialVar_0x8004;
SetVBlankCallback(VBlankCB_LearnMove);
InitBGs();
sub_81D2824(0);
sLearnMoveStruct2.listOffset = 0;
sLearnMoveStruct2.listRow = 0;
sLearnMoveStruct2.showContestInfo = FALSE;
CreateMenuItemsList();
LoadSpriteSheet(&gUnknown_085CEBB0);
LoadSpritePalette(&gUnknown_085CEBB8);
CreateHearts();
sLearnMoveStruct->listMenuTask = ListMenuInit(&gMultiuseListMenuTemplate, sLearnMoveStruct2.listOffset, sLearnMoveStruct2.listRow);
FillPalette(RGB_BLACK, 0, 2);
SetMainCallback2(CB2_Main);
}
static void CB2_InitLearnMoveReturnFromSelectMove(void)
{
ResetSpriteData();
FreeAllSpritePalettes();
ResetTasks();
clear_scheduled_bg_copies_to_vram();
sLearnMoveStruct = AllocZeroed(sizeof(*sLearnMoveStruct));
sLearnMoveStruct->state = 28;
sLearnMoveStruct->partyMon = gSpecialVar_0x8004;
sLearnMoveStruct->moveSlot = gSpecialVar_0x8005;
SetVBlankCallback(VBlankCB_LearnMove);
InitBGs();
sub_81D2824(sLearnMoveStruct2.showContestInfo);
CreateMenuItemsList();
LoadSpriteSheet(&gUnknown_085CEBB0);
LoadSpritePalette(&gUnknown_085CEBB8);
CreateHearts();
sLearnMoveStruct->listMenuTask = ListMenuInit(&gMultiuseListMenuTemplate, sLearnMoveStruct2.listOffset, sLearnMoveStruct2.listRow);
FillPalette(RGB_BLACK, 0, 2);
SetMainCallback2(CB2_Main);
}
static void InitBGs(void)
{
ResetVramOamAndBgCntRegs();
ResetBgsAndClearDma3BusyFlags(0);
InitBgsFromTemplates(0, gUnknown_085CEC28, 2);
ResetAllBgsCoordinates();
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 |
DISPCNT_OBJ_1D_MAP |
DISPCNT_OBJ_ON);
ShowBg(0);
ShowBg(1);
SetGpuReg(REG_OFFSET_BLDCNT, 0);
}
static void CB2_Main(void)
{
LearnMoveMain();
RunTasks();
AnimateSprites();
BuildOamBuffer();
do_scheduled_bg_tilemap_copies_to_vram();
UpdatePaletteFade();
}
static void sub_816084C(const u8 *src)
{
StringExpandPlaceholders(gStringVar4, src);
sub_81D2BF4(gStringVar4);
}
static void LearnMoveMain(void)
{
switch (sLearnMoveStruct->state)
{
case 0:
sLearnMoveStruct->state++;
HideSpritesAndPrintTeachText(FALSE);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
break;
case 1:
if (!gPaletteFade.active)
{
sLearnMoveStruct->state = 4;
}
break;
case 2:
sLearnMoveStruct->state++;
break;
case 3:
HideSpritesAndPrintTeachText(FALSE);
sLearnMoveStruct->state++;
AddScrollArrows();
break;
case 4:
HandleInput(FALSE);
return;
case 5:
ShowTeachMoveText(FALSE);
sLearnMoveStruct->state++;
AddScrollArrows();
break;
case 6:
HandleInput(TRUE);
break;
case 8:
if (!sub_81D2C3C())
{
sub_81D2C50();
sLearnMoveStruct->state++;
}
break;
case 9:
{
s8 selection = Menu_ProcessInputNoWrapClearOnChoose();
if (selection == 0)
{
if (GiveMoveToMon(&gPlayerParty[sLearnMoveStruct->partyMon], GetCurrentItemId()) != 0xFFFF)
{
sub_816084C(gText_PkmnLearnedMove4);
gSpecialVar_0x8004 = 1;
sLearnMoveStruct->state = 31;
}
else
{
sLearnMoveStruct->state = 16;
}
}
else if (selection == -1 || selection == 1)
{
if (sLearnMoveStruct2.showContestInfo == FALSE)
{
sLearnMoveStruct->state = 3;
}
else if (sLearnMoveStruct2.showContestInfo == TRUE)
{
sLearnMoveStruct->state = 5;
}
}
}
break;
case 12:
if (!sub_81D2C3C())
{
sub_81D2C50();
sLearnMoveStruct->state++;
}
break;
case 13:
{
s8 selection = Menu_ProcessInputNoWrapClearOnChoose();
if (selection == 0)
{
gSpecialVar_0x8004 = selection;
sLearnMoveStruct->state = 14;
}
else if (selection == -1 || selection == 1)
{
if (sLearnMoveStruct2.showContestInfo == FALSE)
{
sLearnMoveStruct->state = 3;
}
else if (sLearnMoveStruct2.showContestInfo == TRUE)
{
sLearnMoveStruct->state = 5;
}
}
}
break;
case 16:
sub_816084C(gText_PkmnTryingToLearnMove);
sLearnMoveStruct->state++;
break;
case 17:
if (!sub_81D2C3C())
{
sub_81D2C50();
sLearnMoveStruct->state = 18;
}
break;
case 18:
{
s8 var = Menu_ProcessInputNoWrapClearOnChoose();
if (var == 0)
{
sub_816084C(gText_WhichMoveToForget2);
sLearnMoveStruct->state = 19;
}
else if (var == -1 || var == 1)
{
sLearnMoveStruct->state = 24;
}
}
break;
case 24:
StringCopy(gStringVar2, gMoveNames[GetCurrentItemId()]);
sub_816084C(gText_StopTryingToTeachMove);
sLearnMoveStruct->state++;
break;
case 25:
if (!sub_81D2C3C())
{
sub_81D2C50();
sLearnMoveStruct->state++;
}
break;
case 26:
{
s8 var = Menu_ProcessInputNoWrapClearOnChoose();
if (var == 0)
{
sLearnMoveStruct->state = 27;
}
else if (var == -1 || var == 1)
{
// What's the point? It gets set to 16, anyway.
if (sLearnMoveStruct2.showContestInfo == FALSE)
{
sLearnMoveStruct->state = 3;
}
else if (sLearnMoveStruct2.showContestInfo == TRUE)
{
sLearnMoveStruct->state = 5;
}
sLearnMoveStruct->state = 16;
}
}
break;
case 27:
if (!sub_81D2C3C())
{
FillWindowPixelBuffer(3, PIXEL_FILL(1));
if (sLearnMoveStruct2.showContestInfo == FALSE)
{
sLearnMoveStruct->state = 3;
}
else if (sLearnMoveStruct2.showContestInfo == TRUE)
{
sLearnMoveStruct->state = 5;
}
}
break;
case 19:
if (!sub_81D2C3C())
{
sLearnMoveStruct->state = 20;
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
}
break;
case 20:
if (!gPaletteFade.active)
{
ShowSelectMovePokemonSummaryScreen(gPlayerParty, sLearnMoveStruct->partyMon, gPlayerPartyCount - 1, CB2_InitLearnMoveReturnFromSelectMove, GetCurrentItemId());
FreeListMenuResources();
}
break;
case 21:
if (!sub_81D2C3C())
{
sLearnMoveStruct->state = 14;
}
break;
case 22:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
break;
case 14:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
sLearnMoveStruct->state++;
break;
case 15:
if (!gPaletteFade.active)
{
FreeListMenuResources();
SetMainCallback2(CB2_ReturnToField);
}
break;
case 28:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
sLearnMoveStruct->state++;
if (sLearnMoveStruct2.showContestInfo == FALSE)
{
HideSpritesAndPrintTeachText(TRUE);
}
else if (sLearnMoveStruct2.showContestInfo == TRUE)
{
ShowTeachMoveText(TRUE);
}
RemoveScrollArrows();
CopyWindowToVram(3, 2);
break;
case 29:
if (!gPaletteFade.active)
{
if (sLearnMoveStruct->moveSlot == MAX_MON_MOVES)
{
sLearnMoveStruct->state = 24;
}
else
{
u16 moveId = GetMonData(&gPlayerParty[sLearnMoveStruct->partyMon], MON_DATA_MOVE1 + sLearnMoveStruct->moveSlot);
StringCopy(gStringVar3, gMoveNames[moveId]);
RemoveMonPPBonus(&gPlayerParty[sLearnMoveStruct->partyMon], sLearnMoveStruct->moveSlot);
SetMonMoveSlot(&gPlayerParty[sLearnMoveStruct->partyMon], GetCurrentItemId(), sLearnMoveStruct->moveSlot);
StringCopy(gStringVar2, gMoveNames[GetCurrentItemId()]);
sub_816084C(gText_12AndPoof);
sLearnMoveStruct->state = 30;
gSpecialVar_0x8004 = 1;
}
}
break;
case 30:
if (!sub_81D2C3C())
{
sub_816084C(gText_PkmnForgotMoveAndLearnedNew);
sLearnMoveStruct->state = 31;
PlayFanfare(MUS_FANFA1);
}
break;
case 31:
if (!sub_81D2C3C())
{
PlayFanfare(MUS_FANFA1);
sLearnMoveStruct->state = 32;
}
break;
case 32:
if (IsFanfareTaskInactive())
{
sLearnMoveStruct->state = 33;
}
break;
case 33:
if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
sLearnMoveStruct->state = 14;
}
break;
}
}
static void FreeListMenuResources(void)
{
RemoveScrollArrows();
DestroyListMenuTask(sLearnMoveStruct->listMenuTask, &sLearnMoveStruct2.listOffset, &sLearnMoveStruct2.listRow);
FreeAllWindowBuffers();
FREE_AND_SET_NULL(sLearnMoveStruct);
ResetSpriteData();
FreeAllSpritePalettes();
}
static void HideSpritesAndPrintTeachText(bool8 a)
{
s32 i;
for (i = 0; i < 16; i++)
{
gSprites[sLearnMoveStruct->spriteIds[i]].invisible = TRUE;
}
if (!a)
{
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
FillWindowPixelBuffer(3, PIXEL_FILL(1));
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
}
}
static void HandleInput(bool8 showContest)
{
s32 itemId = ListMenu_ProcessInput(sLearnMoveStruct->listMenuTask);
ListMenuGetScrollAndRow(sLearnMoveStruct->listMenuTask, &sLearnMoveStruct2.listOffset, &sLearnMoveStruct2.listRow);
switch (itemId)
{
case LIST_NOTHING_CHOSEN:
if (!(gMain.newKeys & (DPAD_LEFT | DPAD_RIGHT)) && !GetLRKeysState())
{
break;
}
PlaySE(SE_SELECT);
if (showContest == FALSE)
{
PutWindowTilemap(1);
sLearnMoveStruct->state = 5;
sLearnMoveStruct2.showContestInfo = TRUE;
}
else
{
PutWindowTilemap(0);
sLearnMoveStruct->state = 3;
sLearnMoveStruct2.showContestInfo = FALSE;
}
schedule_bg_copy_tilemap_to_vram(1);
ShowHideHearts(GetCurrentItemId());
break;
case LIST_B_PRESSED:
PlaySE(SE_SELECT);
RemoveScrollArrows();
sLearnMoveStruct->state = 12;
StringExpandPlaceholders(gStringVar4, gText_GiveUpTeachingNewMove);
sub_81D2BF4(gStringVar4);
break;
default:
PlaySE(SE_SELECT);
RemoveScrollArrows();
sLearnMoveStruct->state = 8;
StringCopy(gStringVar2, gMoveNames[itemId]);
StringExpandPlaceholders(gStringVar4, gText_TeachX);
sub_81D2BF4(gStringVar4);
break;
}
}
static s32 GetCurrentItemId(void)
{
return sLearnMoveStruct->menuItems[sLearnMoveStruct2.listRow + sLearnMoveStruct2.listOffset].id;
}
static void ShowTeachMoveText(bool8 showContest)
{
if (showContest == FALSE)
{
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
FillWindowPixelBuffer(3, PIXEL_FILL(1));
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
}
}
static void CreateHearts(void)
{
int i;
sLearnMoveStruct->scrollArrowTaskId2 = -1;
sLearnMoveStruct->scrollArrowTaskId1 = -1;
AddScrollArrows();
for (i = 0; i < 8; i++)
{
sLearnMoveStruct->spriteIds[i] = CreateSprite(&gUnknown_085CEC10, (i - (i / 4) * 4) * 8 + 104, (i / 4) * 8 + 36, 0);
}
for (i = 0; i < 8; i++)
{
sLearnMoveStruct->spriteIds[i + 8] = CreateSprite(&gUnknown_085CEC10, (i - (i / 4) * 4) * 8 + 104, (i / 4) * 8 + 52, 0);
StartSpriteAnim(&gSprites[sLearnMoveStruct->spriteIds[i + 8]], 2);
}
for (i = 0; i < 16; i++)
{
gSprites[sLearnMoveStruct->spriteIds[i]].invisible = TRUE;
}
}
static void AddScrollArrows(void)
{
if (sLearnMoveStruct->scrollArrowTaskId2 == 0xFF)
{
sLearnMoveStruct->scrollArrowTaskId2 = AddScrollIndicatorArrowPair(&gUnknown_085CEBC0, &sLearnMoveStruct->scrollOffset);
}
if (sLearnMoveStruct->scrollArrowTaskId1 == 0xFF)
{
gTempScrollArrowTemplate = gUnknown_085CEBD0;
gTempScrollArrowTemplate.fullyDownThreshold = sLearnMoveStruct->numMenuChoices - sLearnMoveStruct->numToShowAtOnce;
sLearnMoveStruct->scrollArrowTaskId1 = AddScrollIndicatorArrowPair(&gTempScrollArrowTemplate, &sLearnMoveStruct2.listOffset);
}
}
static void RemoveScrollArrows(void)
{
if (sLearnMoveStruct->scrollArrowTaskId2 != 0xFF)
{
RemoveScrollIndicatorArrowPair(sLearnMoveStruct->scrollArrowTaskId2);
sLearnMoveStruct->scrollArrowTaskId2 = 0xFF;
}
if (sLearnMoveStruct->scrollArrowTaskId1 != 0xFF)
{
RemoveScrollIndicatorArrowPair(sLearnMoveStruct->scrollArrowTaskId1);
sLearnMoveStruct->scrollArrowTaskId1 = 0xFF;
}
}
static void CreateMenuItemsList(void)
{
s32 i;
u8 nickname[POKEMON_NAME_LENGTH + 1];
sLearnMoveStruct->numMenuChoices = GetMoveRelearnerMoves(&gPlayerParty[sLearnMoveStruct->partyMon], sLearnMoveStruct->movesToLearn);
for (i = 0; i < sLearnMoveStruct->numMenuChoices; i++)
{
sLearnMoveStruct->menuItems[i].name = gMoveNames[sLearnMoveStruct->movesToLearn[i]];
sLearnMoveStruct->menuItems[i].id = sLearnMoveStruct->movesToLearn[i];
}
GetMonData(&gPlayerParty[sLearnMoveStruct->partyMon], MON_DATA_NICKNAME, nickname);
StringCopy10(gStringVar1, nickname);
sLearnMoveStruct->menuItems[sLearnMoveStruct->numMenuChoices].name = gText_Cancel;
sLearnMoveStruct->menuItems[sLearnMoveStruct->numMenuChoices].id = LIST_B_PRESSED;
sLearnMoveStruct->numMenuChoices++;
sLearnMoveStruct->numToShowAtOnce = sub_81D28C8(sLearnMoveStruct->menuItems, sLearnMoveStruct->numMenuChoices);
}
void ShowHideHearts(s32 item)
{
u16 numHearts;
u16 i;
if (!sLearnMoveStruct2.showContestInfo || item == LIST_B_PRESSED)
{
for (i = 0; i < 16; i++)
{
gSprites[sLearnMoveStruct->spriteIds[i]].invisible = TRUE;
}
}
else
{
numHearts = (u8)(gContestEffects[gContestMoves[item].effect].appeal / 10);
if (numHearts == 0xFF)
{
numHearts = 0;
}
for (i = 0; i < 8; i++)
{
if (i < numHearts)
{
StartSpriteAnim(&gSprites[sLearnMoveStruct->spriteIds[i]], 1);
}
else
{
StartSpriteAnim(&gSprites[sLearnMoveStruct->spriteIds[i]], 0);
}
gSprites[sLearnMoveStruct->spriteIds[i]].invisible = FALSE;
}
numHearts = (u8)(gContestEffects[gContestMoves[item].effect].jam / 10);
if (numHearts == 0xFF)
{
numHearts = 0;
}
for (i = 0; i < 8; i++)
{
if (i < numHearts)
{
StartSpriteAnim(&gSprites[sLearnMoveStruct->spriteIds[i + 8]], 3);
}
else
{
StartSpriteAnim(&gSprites[sLearnMoveStruct->spriteIds[i + 8]], 2);
}
gSprites[sLearnMoveStruct->spriteIds[i + 8]].invisible = FALSE;
}
}
}
+21 -8
View File
@@ -11,13 +11,13 @@
#include "overworld.h"
#include "random.h"
#include "palette.h"
#include "rom_8011DC0.h"
#include "union_room.h"
#include "string_util.h"
#include "task.h"
#include "text.h"
#include "constants/species.h"
#include "save.h"
#include "rom_8011DC0.h"
#include "mystery_gift.h"
extern u16 gHeldKeyCodeToSend;
@@ -155,7 +155,8 @@ const u8 sWireless_RSEtoASCIITable[] = {
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00
};
const struct OamData sWirelessStatusIndicatorOamData = {
.size = 1
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16)
};
static const union AnimCmd sWirelessStatusIndicatorAnim0[] = {
// 3 bars
@@ -309,10 +310,22 @@ const char gUnknown_082ED7EC[] = "PokemonSioInfo";
const char gUnknown_082ED7FC[] = "LINK LOSS DISCONNECT!";
const char gUnknown_082ED814[] = "LINK LOSS RECOVERY NOW";
extern const char gUnknown_082ED82C[];
extern const char gUnknown_082ED84B[];
extern const char gUnknown_082ED85B[];
extern const char gUnknown_082ED868[];
ALIGNED(4) const char gUnknown_082ED82C[31] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',0x00};
const char gUnknown_082ED84B[16] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',0x00};
const char gUnknown_082ED85B[9] = {' ',' ',' ',' ',' ',' ',' ',' ',0x00};
ALIGNED(4) const char gUnknown_082ED864[2] = {' ',0x00};
const char gUnknown_082ED866[2] = {'*',0x00};
const char gUnknown_082ED868[8] = "NOWSLOT";
const char gUnknown_082ED870[12] = " ";
const char gUnknown_082ED87C[12] = "CLOCK DRIFT";
const char gUnknown_082ED888[12] = "BUSY SEND ";
const char gUnknown_082ED894[12] = "CMD REJECT ";
const char gUnknown_082ED8A0[12] = "CLOCK SLAVE";
const char gUnknown_082ED8A8[3][8] = {
"CHILD ",
"PARENT",
"SEARCH"
};
// .text
@@ -4728,7 +4741,7 @@ bool32 sub_8011A80(void)
return FALSE;
}
u8 sub_8011A9C(void)
bool32 sub_8011A9C(void)
{
return gUnknown_03005000.unk_ce8;
}
+23 -23
View File
@@ -129,10 +129,10 @@ static const struct OamData sOamData_ScrollArrowIndicator =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -186,8 +186,8 @@ static const struct Subsprite sSubsprite_RedOutline1 =
{
.x = 0,
.y = 0,
.shape = 0,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.tileOffset = 0,
.priority = 0,
};
@@ -196,8 +196,8 @@ static const struct Subsprite sSubsprite_RedOutline2 =
{
.x = 0,
.y = 0,
.shape = 0,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.tileOffset = 1,
.priority = 0,
};
@@ -206,8 +206,8 @@ static const struct Subsprite sSubsprite_RedOutline3 =
{
.x = 0,
.y = 0,
.shape = 0,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.tileOffset = 2,
.priority = 0,
};
@@ -216,8 +216,8 @@ static const struct Subsprite sSubsprite_RedOutline4 =
{
.x = 0,
.y = 0,
.shape = 0,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.tileOffset = 3,
.priority = 0,
};
@@ -226,8 +226,8 @@ static const struct Subsprite sSubsprite_RedOutline5 =
{
.x = 0,
.y = 0,
.shape = 0,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.tileOffset = 4,
.priority = 0,
};
@@ -236,8 +236,8 @@ static const struct Subsprite sSubsprite_RedOutline6 =
{
.x = 0,
.y = 0,
.shape = 0,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.tileOffset = 5,
.priority = 0,
};
@@ -246,8 +246,8 @@ static const struct Subsprite sSubsprite_RedOutline7 =
{
.x = 0,
.y = 0,
.shape = 0,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.tileOffset = 6,
.priority = 0,
};
@@ -256,8 +256,8 @@ static const struct Subsprite sSubsprite_RedOutline8 =
{
.x = 0,
.y = 0,
.shape = 0,
.size = 0,
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.tileOffset = 7,
.priority = 0,
};
@@ -269,10 +269,10 @@ static const struct OamData sOamData_RedArrowCursor =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -312,7 +312,7 @@ static void ListMenuDummyTask(u8 taskId)
}
s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum)
s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum)
{
switch (sMysteryGiftLinkMenu.state)
{
@@ -341,7 +341,7 @@ s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenu
}
if (gMain.newKeys & B_BUTTON)
{
sMysteryGiftLinkMenu.currItemId = LIST_B_PRESSED;
sMysteryGiftLinkMenu.currItemId = LIST_CANCEL;
sMysteryGiftLinkMenu.state = 2;
}
if (sMysteryGiftLinkMenu.state == 2)
@@ -416,7 +416,7 @@ s32 ListMenu_ProcessInput(u8 listTaskId)
}
else if (gMain.newKeys & B_BUTTON)
{
return LIST_B_PRESSED;
return LIST_CANCEL;
}
else if (gMain.newAndRepeatedKeys & DPAD_UP)
{
+1 -2
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "alloc.h"
#include "berry_powder.h"
#include "item.h"
#include "load_save.h"
#include "main.h"
@@ -15,8 +16,6 @@
static void ApplyNewEncryptionKeyToAllEncryptedData(u32 encryptionKey);
extern void ApplyNewEncryptionKeyToBerryPowder(u32 key);
#define SAVEBLOCK_MOVE_RANGE 128
struct LoadedSaveData
+3 -3
View File
@@ -525,7 +525,7 @@ enum
ACTION_OPTION,
ACTION_MYSTERY_GIFT,
ACTION_MYSTERY_EVENTS,
ACTION_UNKNOWN, // TODO: change when rom_8011DC0 decompiled
ACTION_EREADER,
ACTION_INVALID
};
@@ -1033,7 +1033,7 @@ static void Task_HandleMainMenuAPressed(u8 taskId)
}
else
{
action = ACTION_UNKNOWN;
action = ACTION_EREADER;
}
break;
case 3:
@@ -1082,7 +1082,7 @@ static void Task_HandleMainMenuAPressed(u8 taskId)
SetMainCallback2(CB2_InitMysteryEventMenu);
DestroyTask(taskId);
break;
case ACTION_UNKNOWN:
case ACTION_EREADER:
SetMainCallback2(sub_801867C);
DestroyTask(taskId);
break;
+1 -1
View File
@@ -207,7 +207,7 @@ bool8 sub_80D47D4(void)
void ShowMapNamePopup(void)
{
if (FlagGet(FLAG_SPECIAL_FLAG_0x4000) != TRUE)
if (FlagGet(FLAG_HIDE_MAP_NAME_POPUP) != TRUE)
{
if (!FuncIsActiveTask(Task_MapNamePopUpWindow))
{
+2 -2
View File
@@ -37,10 +37,10 @@ static const struct OamData sOamData_859F4E8 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
File diff suppressed because it is too large Load Diff
Executable
+626
View File
@@ -0,0 +1,626 @@
#include "global.h"
#include "util.h"
#include "main.h"
#include "event_data.h"
#include "easy_chat.h"
#include "script.h"
#include "battle_tower.h"
#include "mevent_news.h"
#include "string_util.h"
#include "new_game.h"
#include "mevent.h"
#include "constants/species.h"
static EWRAM_DATA bool32 gUnknown_02022C70 = FALSE;
static void sub_801B180(void);
static void sub_801B14C(void);
static bool32 sub_801B114(const struct MEventBuffer_3120_Sub *data);
static bool32 sub_801B2CC(const struct MEventBuffer_32E0_Sub *data);
static void sub_801B330(void);
static void sub_801B368(void);
static void sub_801B9F8(void);
static void sub_801BA8C(u32 a0, u32 a1, u32 *a2, int a3);
void sub_801AFD8(void)
{
CpuFill32(0, &gSaveBlock1Ptr->unk_322C, sizeof(gSaveBlock1Ptr->unk_322C));
sub_801B180();
sub_811F8BC();
}
struct MEventBuffer_3120_Sub *sub_801B00C(void)
{
return &gSaveBlock1Ptr->unk_322C.buffer_000.data;
}
struct MEventBuffer_32E0_Sub *sav1_get_mevent_buffer_1(void)
{
return &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
}
struct MEventBuffer_3430_Sub *sav1_get_mevent_buffer_2(void)
{
return &gSaveBlock1Ptr->unk_322C.buffer_310.data;
}
struct MysteryEventStruct *sub_801B044(void)
{
return &gSaveBlock1Ptr->unk_322C.unk_340;
}
u16 *sub_801B058(void)
{
return gSaveBlock1Ptr->unk_322C.unk_338;
}
void sub_801B06C(void)
{
sub_801B14C();
}
bool32 sub_801B078(const struct MEventBuffer_3120_Sub *src)
{
if (!sub_801B114(src))
return FALSE;
sub_801B14C();
gSaveBlock1Ptr->unk_322C.buffer_000.data = *src;
gSaveBlock1Ptr->unk_322C.buffer_000.crc = CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.buffer_000.data, sizeof(struct MEventBuffer_3120_Sub));
return TRUE;
}
bool32 sub_801B0CC(void)
{
if (CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.buffer_000.data, sizeof(struct MEventBuffer_3120_Sub)) != gSaveBlock1Ptr->unk_322C.buffer_000.crc)
return FALSE;
if (!sub_801B114(&gSaveBlock1Ptr->unk_322C.buffer_000.data))
return FALSE;
return TRUE;
}
static bool32 sub_801B114(const struct MEventBuffer_3120_Sub *data)
{
if (data->unk_00 == 0)
return FALSE;
return TRUE;
}
bool32 sub_801B128(void)
{
const struct MEventBuffer_3120_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_000.data;
if (data->unk_02 == 0)
return FALSE;
return TRUE;
}
static void sub_801B14C(void)
{
CpuFill32(0, sub_801B00C(), sizeof(gSaveBlock1Ptr->unk_322C.buffer_000.data));
gSaveBlock1Ptr->unk_322C.buffer_000.crc = 0;
}
static void sub_801B180(void)
{
CpuFill32(0, sub_801B044(), sizeof(struct MysteryEventStruct));
sub_801DBC0();
}
bool32 sub_801B1A4(const u8 *src)
{
const u8 *r5 = (const u8 *)&gSaveBlock1Ptr->unk_322C.buffer_000.data;
u32 i;
if (!sub_801B0CC())
return FALSE;
for (i = 0; i < sizeof(struct MEventBuffer_3120_Sub); i++)
{
if (r5[i] != src[i])
return FALSE;
}
return TRUE;
}
void sub_801B1E8(void)
{
sub_801B330();
sub_801B368();
sub_801B9F8();
ClearRamScript();
sub_809D4D8();
sub_809D570();
ClearEReaderTrainer(&gSaveBlock2Ptr->frontier.ereaderTrainer);
}
bool32 sub_801B21C(const struct MEventBuffer_32E0_Sub *data)
{
struct MEventBuffer_3430_Sub *r2;
struct MEventBuffer_32E0_Sub *r1;
if (!sub_801B2CC(data))
return FALSE;
sub_801B1E8();
memcpy(&gSaveBlock1Ptr->unk_322C.buffer_1c0.data, data, sizeof(struct MEventBuffer_32E0_Sub));
gSaveBlock1Ptr->unk_322C.buffer_1c0.crc = CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.buffer_1c0.data, sizeof(struct MEventBuffer_32E0_Sub));
r2 = &gSaveBlock1Ptr->unk_322C.buffer_310.data;
r1 = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
r2->unk_06 = r1->unk_02;
return TRUE;
}
bool32 sub_801B27C(void)
{
if (gSaveBlock1Ptr->unk_322C.buffer_1c0.crc != CalcCRC16WithTable((void *)&gSaveBlock1Ptr->unk_322C.buffer_1c0.data, sizeof(struct MEventBuffer_32E0_Sub)))
return FALSE;
if (!sub_801B2CC(&gSaveBlock1Ptr->unk_322C.buffer_1c0.data))
return FALSE;
if (!sub_80991F8())
return FALSE;
return TRUE;
}
static bool32 sub_801B2CC(const struct MEventBuffer_32E0_Sub *data)
{
if (data->unk_00 == 0)
return FALSE;
if (data->unk_08_0 > 2)
return FALSE;
if (!(data->unk_08_6 == 0 || data->unk_08_6 == 1 || data->unk_08_6 == 2))
return FALSE;
if (data->unk_08_2 > 7)
return FALSE;
if (data->unk_09 > 7)
return FALSE;
return TRUE;
}
bool32 sub_801B308(void)
{
const struct MEventBuffer_32E0_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
if (data->unk_08_6 == 0)
return FALSE;
return TRUE;
}
static void sub_801B330(void)
{
CpuFill32(0, &gSaveBlock1Ptr->unk_322C.buffer_1c0.data, sizeof(struct MEventBuffer_32E0_Sub));
gSaveBlock1Ptr->unk_322C.buffer_1c0.crc = 0;
}
static void sub_801B368(void)
{
CpuFill32(0, sav1_get_mevent_buffer_2(), 18 *sizeof(u16));
gSaveBlock1Ptr->unk_322C.buffer_310.crc = 0;
}
u16 sub_801B39C(void)
{
if (sub_801B27C())
return gSaveBlock1Ptr->unk_322C.buffer_1c0.data.unk_00;
return 0;
}
void sub_801B3C0(struct MEventBuffer_32E0_Sub *buffer)
{
if (buffer->unk_08_6 == 1)
buffer->unk_08_6 = 0;
}
static bool32 sub_801B3D8(u16 a0)
{
if (a0 >= 1000 && a0 < 1020)
return TRUE;
return FALSE;
}
static const u16 sMysteryGiftFlags[] =
{
FLAG_RECEIVED_AURORA_TICKET,
FLAG_RECEIVED_MYSTIC_TICKET,
FLAG_RECEIVED_OLD_SEA_MAP,
FLAG_UNUSED_MYSTERY_GIFT_0x13D,
FLAG_UNUSED_MYSTERY_GIFT_0x13E,
FLAG_UNUSED_MYSTERY_GIFT_0x13F,
FLAG_UNUSED_MYSTERY_GIFT_0x140,
FLAG_UNUSED_MYSTERY_GIFT_0x141,
FLAG_UNUSED_MYSTERY_GIFT_0x142,
FLAG_UNUSED_MYSTERY_GIFT_0x143,
FLAG_UNUSED_MYSTERY_GIFT_0x144,
FLAG_UNUSED_MYSTERY_GIFT_0x145,
FLAG_UNUSED_MYSTERY_GIFT_0x146,
FLAG_UNUSED_MYSTERY_GIFT_0x147,
FLAG_UNUSED_MYSTERY_GIFT_0x148,
FLAG_UNUSED_MYSTERY_GIFT_0x149,
FLAG_UNUSED_MYSTERY_GIFT_0x14A,
FLAG_UNUSED_MYSTERY_GIFT_0x14B,
FLAG_UNUSED_MYSTERY_GIFT_0x14C,
FLAG_UNUSED_MYSTERY_GIFT_0x14D,
};
bool32 sub_801B3F8(void)
{
u16 value = sub_801B39C();
if (!sub_801B3D8(value))
return FALSE;
if (FlagGet(sMysteryGiftFlags[value - 1000]) == TRUE)
return FALSE;
return TRUE;
}
static int sub_801B438(const struct MEventBuffer_3430_Sub *data, int size)
{
int r3 = 0;
int i;
for (i = 0; i < size; i++)
{
if (data->unk_08[1][i] && data->unk_08[0][i])
r3++;
}
return r3;
}
static bool32 sub_801B460(const struct MEventBuffer_3430_Sub *data1, const u16 *data2, int size)
{
int i;
for (i = 0; i < size; i++)
{
if (data1->unk_08[1][i] == data2[1])
return TRUE;
if (data1->unk_08[0][i] == data2[0])
return TRUE;
}
return FALSE;
}
static bool32 sub_801B4A4(const u16 *data)
{
if (data[1] == 0)
return FALSE;
if (data[0] == 0)
return FALSE;
if (data[0] >= NUM_SPECIES)
return FALSE;
return TRUE;
}
static int sub_801B4CC(void)
{
struct MEventBuffer_32E0_Sub *data;
if (!sub_801B27C())
return 0;
data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
if (data->unk_08_0 != 1)
return 0;
return sub_801B438(&gSaveBlock1Ptr->unk_322C.buffer_310.data, data->unk_09);
}
bool32 sub_801B508(const u16 *data)
{
struct MEventBuffer_32E0_Sub *buffer = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
int size = buffer->unk_09;
int i;
if (!sub_801B4A4(data))
return FALSE;
if (sub_801B460(&gSaveBlock1Ptr->unk_322C.buffer_310.data, data, size))
return FALSE;
for (i = 0; i < size; i++)
{
if (gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_08[1][i] == 0 && gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_08[0][i] == 0)
{
gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_08[1][i] = data[1];
gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_08[0][i] = data[0];
return TRUE;
}
}
return FALSE;
}
void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1)
{
int i;
CpuFill32(0, data, sizeof(struct MEventStruct_Unk1442CC));
data->unk_00 = 0x101;
data->unk_04 = 1;
data->unk_08 = 1;
if (a1)
{
data->unk_0C = 5;
data->unk_10 = 0x0201;
}
else
{
data->unk_0C = 4;
data->unk_10 = 0x0200;
}
if (sub_801B27C())
{
data->unk_14 = sav1_get_mevent_buffer_1()->unk_00;
data->unk_20 = *sav1_get_mevent_buffer_2();
data->unk_44 = sav1_get_mevent_buffer_1()->unk_09;
}
else
{
data->unk_14 = 0;
}
for (i = 0; i < 4; i++)
data->unk_16[i] = gSaveBlock1Ptr->unk_322C.unk_338[i];
CopyTrainerId(data->unk_4C, gSaveBlock2Ptr->playerTrainerId);
StringCopy(data->unk_45, gSaveBlock2Ptr->playerName);
for (i = 0; i < 6; i++)
data->unk_50[i] = gSaveBlock1Ptr->easyChatProfile[i];
memcpy(data->unk_5C, RomHeaderGameCode, 4);
data->unk_60 = RomHeaderSoftwareVersion;
}
bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1)
{
if (data->unk_00 != 0x101)
return FALSE;
if (!(data->unk_04 & 1))
return FALSE;
if (!(data->unk_08 & 1))
return FALSE;
if (!a1)
{
if (!(data->unk_0C & 4))
return FALSE;
if (!(data->unk_10 & 0x380))
return FALSE;
}
return TRUE;
}
u32 sub_801B6EC(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, void *unused)
{
if (a1->unk_14 == 0)
return 0;
if (*a0 == a1->unk_14)
return 1;
return 2;
}
u32 sub_801B708(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, void *unused)
{
int r4 = a1->unk_44 - sub_801B438(&a1->unk_20, a1->unk_44);
if (r4 == 0)
return 1;
if (sub_801B460(&a1->unk_20, a0, a1->unk_44))
return 3;
if (r4 == 1)
return 4;
return 2;
}
bool32 sub_801B748(const struct MEventStruct_Unk1442CC *a0, const u16 *a1)
{
int i;
for (i = 0; i < 4; i++)
{
if (a0->unk_16[i] != a1[i])
return FALSE;
}
return TRUE;
}
static int sub_801B770(const struct MEventStruct_Unk1442CC *a0)
{
return sub_801B438(&a0->unk_20, a0->unk_44);
}
u16 sub_801B784(const struct MEventStruct_Unk1442CC *a0, u32 command)
{
switch (command)
{
case 0:
return a0->unk_20.unk_00;
case 1:
return a0->unk_20.unk_02;
case 2:
return a0->unk_20.unk_04;
case 3:
return sub_801B770(a0);
case 4:
return a0->unk_44;
default:
AGB_ASSERT(0);
return 0;
}
}
static void sub_801B7D8(u32 command)
{
struct MEventBuffer_32E0_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
if (data->unk_08_0 == 2)
{
u16 *dest = NULL;
switch (command)
{
case 0:
dest = &gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_00;
break;
case 1:
dest = &gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_02;
break;
case 2:
dest = &gSaveBlock1Ptr->unk_322C.buffer_310.data.unk_04;
break;
case 3:
break;
case 4:
break;
}
if (dest == NULL)
AGB_ASSERT(0);
else if (++(*dest) > 999)
*dest = 999;
}
}
u16 mevent_081445C0(u32 command)
{
switch (command)
{
case 0:
{
struct MEventBuffer_32E0_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
if (data->unk_08_0 == 2)
{
struct MEventBuffer_3430_Sub *buffer = &gSaveBlock1Ptr->unk_322C.buffer_310.data;
return buffer->unk_00;
}
break;
}
case 1:
{
struct MEventBuffer_32E0_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
if (data->unk_08_0 == 2)
{
struct MEventBuffer_3430_Sub *buffer = &gSaveBlock1Ptr->unk_322C.buffer_310.data;
return buffer->unk_02;
}
break;
}
case 2:
{
struct MEventBuffer_32E0_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
if (data->unk_08_0 == 2)
{
struct MEventBuffer_3430_Sub *buffer = &gSaveBlock1Ptr->unk_322C.buffer_310.data;
return buffer->unk_04;
}
break;
}
case 3:
{
struct MEventBuffer_32E0_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
if (data->unk_08_0 == 1)
return sub_801B4CC();
break;
}
case 4:
{
struct MEventBuffer_32E0_Sub *data = &gSaveBlock1Ptr->unk_322C.buffer_1c0.data;
if (data->unk_08_0 == 1)
return data->unk_09;
break;
}
}
AGB_ASSERT(0);
return 0;
}
void sub_801B940(void)
{
gUnknown_02022C70 = FALSE;
}
bool32 sub_801B94C(u16 a0)
{
gUnknown_02022C70 = FALSE;
if (a0 == 0)
return FALSE;
if (!sub_801B27C())
return FALSE;
if (gSaveBlock1Ptr->unk_322C.buffer_1c0.data.unk_00 != a0)
return FALSE;
gUnknown_02022C70 = TRUE;
return TRUE;
}
void sub_801B990(u32 a0, u32 a1)
{
if (gUnknown_02022C70)
{
switch (a0)
{
case 2:
sub_801BA8C(2, a1, gSaveBlock1Ptr->unk_322C.unk_344[1], 5);
break;
case 0:
sub_801BA8C(0, a1, gSaveBlock1Ptr->unk_322C.unk_344[0], 5);
break;
case 1:
sub_801BA8C(1, a1, gSaveBlock1Ptr->unk_322C.unk_344[0], 5);
break;
default:
AGB_ASSERT(0);
}
}
}
static void sub_801B9F8(void)
{
CpuFill32(0, gSaveBlock1Ptr->unk_322C.unk_344, sizeof(gSaveBlock1Ptr->unk_322C.unk_344));
}
static bool32 sub_801BA24(u32 a0, u32 *a1, int size)
{
int i;
int j;
for (i = 0; i < size; i++)
{
if (a1[i] == a0)
break;
}
if (i == size)
{
for (j = size - 1; j > 0; j--)
a1[j] = a1[j - 1];
a1[0] = a0;
return TRUE;
}
else
{
for (j = i; j > 0; j--)
a1[j] = a1[j - 1];
a1[0] = a0;
return FALSE;
}
}
static void sub_801BA8C(u32 a0, u32 a1, u32 *a2, int a3)
{
if (sub_801BA24(a1, a2, a3))
sub_801B7D8(a0);
}
+826
View File
@@ -0,0 +1,826 @@
#include "global.h"
#include "constants/species.h"
#include "bg.h"
#include "gpu_regs.h"
#include "palette.h"
#include "decompress.h"
#include "alloc.h"
#include "menu.h"
#include "pokemon_icon.h"
#include "union_room.h"
#include "list_menu.h"
#include "text_window.h"
#include "string_util.h"
#include "link_rfu.h"
#include "mevent.h"
#include "mystery_gift.h"
struct UnkStruct_8467FB8
{
u8 textPal1:4;
u8 textPal2:4;
u8 textPal3:4;
u8 textPal4:4;
const u32 * tiles;
const u32 * map;
const u16 * pal;
};
struct UnkStruct_203F3C8_02DC
{
u8 unk_00;
u8 unk_01[41];
u8 unk_42[4];
};
struct UnkStruct_203F3C8
{
/*0000*/ struct MEventBuffer_32E0_Sub unk_0000;
/*014c*/ struct MEventBuffer_3430_Sub unk_014C;
/*0170*/ const struct UnkStruct_8467FB8 * unk_0170;
/*0174*/ u8 unk_0174;
/*0175*/ u8 unk_0175;
/*0176*/ u16 unk_0176[3];
/*017C*/ u8 unk_017C;
/*017D*/ u8 unk_017D[7][2];
/*018B*/ u8 unk_018B[41];
/*01B4*/ u8 unk_01B4[41];
/*01DD*/ u8 unk_01DD[7];
/*01E4*/ u8 unk_01E4[4][41];
/*0288*/ u8 unk_0288[41];
/*02B1*/ u8 unk_02B1[41];
/*02DC*/ struct UnkStruct_203F3C8_02DC unk_02DC[8];
/*045C*/ u8 buffer_045C[0x1000];
};
EWRAM_DATA struct UnkStruct_203F3C8 * gUnknown_02022C74 = NULL;
void sub_801BEF8(void);
void sub_801C178(u8 whichWindow);
void sub_801C4C0(void);
void sub_801C61C(void);
extern const struct OamData gUnknown_08524934;
const u8 gUnknown_082F0E10[][3] = {
{0, 2, 3},
{0, 1, 2}
};
const u8 ALIGNED(4) gUnknown_082F0E18[3] = {7, 4, 7};
const struct WindowTemplate gUnknown_082F0E1C[] = {
{
.bg = 1,
.tilemapLeft = 1,
.tilemapTop = 1,
.width = 25,
.height = 4,
.paletteNum = 2,
.baseBlock = 0x029c
}, {
.bg = 1,
.tilemapLeft = 1,
.tilemapTop = 6,
.width = 28,
.height = 8,
.paletteNum = 2,
.baseBlock = 0x01bc
}, {
.bg = 1,
.tilemapLeft = 1,
.tilemapTop = 14,
.width = 28,
.height = 5,
.paletteNum = 2,
.baseBlock = 0x0130
}
};
const u16 gWonderCardBgPal1[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_1.gbapal");
const u16 gWonderCardBgPal2[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_2.gbapal");
const u16 gWonderCardBgPal3[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_3.gbapal");
const u16 gWonderCardBgPal4[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_4.gbapal");
const u16 gWonderCardBgPal5[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_5.gbapal");
const u16 gWonderCardBgPal6[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_6.gbapal");
const u16 gWonderCardBgPal7[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_7.gbapal");
const u16 gWonderCardBgPal8[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_8.gbapal");
const u32 gWonderCardBgGfx1[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_1.4bpp.lz");
const u32 gWonderCardBgTilemap1[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_1.bin.lz");
const u32 gWonderCardBgGfx2[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_2.4bpp.lz");
const u32 gWonderCardBgTilemap2[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_2.bin.lz");
const u32 gWonderCardBgGfx3[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_3.4bpp.lz");
const u32 gWonderCardBgTilemap3[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_3.bin.lz");
const u32 gWonderCardBgGfx7[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_7.4bpp.lz");
const u32 gWonderCardBgTilemap7[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_7.bin.lz");
const u32 gWonderCardBgGfx8[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_8.4bpp.lz");
const u32 gWonderCardBgTilemap8[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_8.bin.lz");
const u16 gWonderCardShadowPal1[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_1.gbapal");
const u16 gWonderCardShadowPal2[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_2.gbapal");
const u16 gWonderCardShadowPal3[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_3.gbapal");
const u16 gWonderCardShadowPal4[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_4.gbapal");
const u16 gWonderCardShadowPal5[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_5.gbapal");
const u16 gWonderCardShadowPal6[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_6.gbapal");
const u16 gWonderCardShadowPal7[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_7.gbapal");
const u16 gWonderCardShadowPal8[] = INCBIN_U16("graphics/wonder_transfers/wonder_card_shadow_8.gbapal");
const u32 gWonderCardShadowGfx[] = INCBIN_U32("graphics/wonder_transfers/wonder_card_shadow.4bpp.lz");
const struct CompressedSpriteSheet gUnknown_082F1D00 = {
gWonderCardShadowGfx, 0x100, 0x8000
};
const struct SpritePalette gUnknown_082F1D08[] = {
{gWonderCardShadowPal1, 0x8000},
{gWonderCardShadowPal2, 0x8000},
{gWonderCardShadowPal3, 0x8000},
{gWonderCardShadowPal4, 0x8000},
{gWonderCardShadowPal5, 0x8000},
{gWonderCardShadowPal6, 0x8000},
{gWonderCardShadowPal7, 0x8000},
{gWonderCardShadowPal8, 0x8000}
};
const struct SpriteTemplate gUnknown_082F1D48 = {
0x8000, 0x8000, &gUnknown_08524934, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
};
const struct UnkStruct_8467FB8 gUnknown_082F1D60[8] = {
{1, 0, 0, 0, gWonderCardBgGfx1, gWonderCardBgTilemap1, gWonderCardBgPal1},
{1, 0, 0, 1, gWonderCardBgGfx2, gWonderCardBgTilemap2, gWonderCardBgPal2},
{1, 0, 0, 2, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal3},
{1, 0, 0, 3, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal4},
{1, 0, 0, 4, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal5},
{1, 0, 0, 5, gWonderCardBgGfx3, gWonderCardBgTilemap3, gWonderCardBgPal6},
{1, 0, 0, 6, gWonderCardBgGfx7, gWonderCardBgTilemap7, gWonderCardBgPal7},
{1, 0, 0, 7, gWonderCardBgGfx8, gWonderCardBgTilemap8, gWonderCardBgPal8}
};
bool32 sub_801BAAC(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_Sub * r6)
{
if (r5 == NULL || r6 == NULL)
return FALSE;
gUnknown_02022C74 = AllocZeroed(sizeof(struct UnkStruct_203F3C8));
if (gUnknown_02022C74 == NULL)
return FALSE;
gUnknown_02022C74->unk_0000 = *r5;
gUnknown_02022C74->unk_014C = *r6;
if (gUnknown_02022C74->unk_0000.unk_08_2 >= ARRAY_COUNT(gUnknown_082F1D60))
gUnknown_02022C74->unk_0000.unk_08_2 = 0;
if (gUnknown_02022C74->unk_0000.unk_08_0 >= ARRAY_COUNT(gUnknown_082F0E18))
gUnknown_02022C74->unk_0000.unk_08_0 = 0;
if (gUnknown_02022C74->unk_0000.unk_09 > ARRAY_COUNT(gUnknown_02022C74->unk_017D))
gUnknown_02022C74->unk_0000.unk_09 = 0;
gUnknown_02022C74->unk_0170 = &gUnknown_082F1D60[gUnknown_02022C74->unk_0000.unk_08_2];
return TRUE;
}
void sub_801BB48(void)
{
if (gUnknown_02022C74 != NULL)
{
*gUnknown_02022C74 = (struct UnkStruct_203F3C8){};
Free(gUnknown_02022C74);
gUnknown_02022C74 = NULL;
}
}
s32 sub_801BB74(void)
{
if (gUnknown_02022C74 == NULL)
return -1;
switch(gUnknown_02022C74->unk_0174)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
break;
case 1:
if (UpdatePaletteFade())
return 0;
break;
case 2:
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
decompress_and_copy_tile_data_to_vram(2, gUnknown_02022C74->unk_0170->tiles, 0, 0x008, 0);
gUnknown_02022C74->unk_0176[0] = AddWindow(&gUnknown_082F0E1C[0]);
gUnknown_02022C74->unk_0176[1] = AddWindow(&gUnknown_082F0E1C[1]);
gUnknown_02022C74->unk_0176[2] = AddWindow(&gUnknown_082F0E1C[2]);
break;
case 3:
if (free_temp_tile_data_buffers_if_possible())
return 0;
LoadPalette(stdpal_get(1), 0x20, 0x20);
gPaletteFade.bufferTransferDisabled = TRUE;
LoadPalette(gUnknown_02022C74->unk_0170->pal, 0x10, 0x20);
LZ77UnCompWram(gUnknown_02022C74->unk_0170->map, gUnknown_02022C74->buffer_045C);
CopyRectToBgTilemapBufferRect(2, gUnknown_02022C74->buffer_045C, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0);
CopyBgTilemapBufferToVram(2);
break;
case 4:
sub_801BEF8();
break;
case 5:
sub_801C178(0);
sub_801C178(1);
sub_801C178(2);
CopyBgTilemapBufferToVram(1);
break;
case 6:
LoadMonIconPalettes();
break;
case 7:
ShowBg(1);
ShowBg(2);
gPaletteFade.bufferTransferDisabled = FALSE;
sub_801C4C0();
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
UpdatePaletteFade();
break;
default:
if (UpdatePaletteFade())
return 0;
gUnknown_02022C74->unk_0174 = 0;
return 1;
}
++gUnknown_02022C74->unk_0174;
return 0;
}
s32 sub_801BDA4(bool32 flag)
{
if (gUnknown_02022C74 == NULL)
return -1;
switch (gUnknown_02022C74->unk_0174)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
break;
case 1:
if (UpdatePaletteFade())
return 0;
break;
case 2:
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
break;
case 3:
HideBg(1);
HideBg(2);
RemoveWindow(gUnknown_02022C74->unk_0176[2]);
RemoveWindow(gUnknown_02022C74->unk_0176[1]);
RemoveWindow(gUnknown_02022C74->unk_0176[0]);
break;
case 4:
sub_801C61C();
FreeMonIconPalettes();
break;
case 5:
sub_80186EC(gUnknown_02022C60, flag);
CopyBgTilemapBufferToVram(0);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
break;
default:
if (UpdatePaletteFade())
return 0;
gUnknown_02022C74->unk_0174 = 0;
return 1;
}
++gUnknown_02022C74->unk_0174;
return 0;
}
void sub_801BEF8(void)
{
u16 i = 0;
u16 r6;
u16 sp0[3] = {0, 0, 0};
memcpy(gUnknown_02022C74->unk_018B, gUnknown_02022C74->unk_0000.unk_0A, 40);
gUnknown_02022C74->unk_018B[40] = EOS;
memcpy(gUnknown_02022C74->unk_01B4, gUnknown_02022C74->unk_0000.unk_32, 40);
gUnknown_02022C74->unk_01B4[40] = EOS;
if (gUnknown_02022C74->unk_0000.unk_04 > 999999)
gUnknown_02022C74->unk_0000.unk_04 = 999999;
ConvertIntToDecimalStringN(gUnknown_02022C74->unk_01DD, gUnknown_02022C74->unk_0000.unk_04, STR_CONV_MODE_LEFT_ALIGN, 6);
for (i = 0; i < 4; i++)
{
memcpy(gUnknown_02022C74->unk_01E4[i], gUnknown_02022C74->unk_0000.unk_5A[i], 40);
gUnknown_02022C74->unk_01E4[i][40] = EOS;
}
memcpy(gUnknown_02022C74->unk_0288, gUnknown_02022C74->unk_0000.unk_FA, 40);
gUnknown_02022C74->unk_0288[40] = EOS;
switch (gUnknown_02022C74->unk_0000.unk_08_0)
{
case 0:
memcpy(gUnknown_02022C74->unk_02B1, gUnknown_02022C74->unk_0000.unk_122, 40);
gUnknown_02022C74->unk_02B1[40] = EOS;
break;
case 1:
gUnknown_02022C74->unk_02B1[00] = EOS;
break;
case 2:
gUnknown_02022C74->unk_02B1[00] = EOS;
sp0[0] = gUnknown_02022C74->unk_014C.unk_00 < 999 ? gUnknown_02022C74->unk_014C.unk_00 : 999;
sp0[1] = gUnknown_02022C74->unk_014C.unk_02 < 999 ? gUnknown_02022C74->unk_014C.unk_02 : 999;
sp0[2] = gUnknown_02022C74->unk_014C.unk_04 < 999 ? gUnknown_02022C74->unk_014C.unk_04 : 999;
for (i = 0; i < 8; i++)
{
memset(gUnknown_02022C74->unk_02DC[i].unk_42, EOS, 4);
memset(gUnknown_02022C74->unk_02DC[i].unk_01, EOS, 41);
}
for (i = 0, r6 = 0; i < 40; i++)
{
if (gUnknown_02022C74->unk_0000.unk_122[i] != 0xF7)
{
gUnknown_02022C74->unk_02DC[gUnknown_02022C74->unk_0175].unk_01[r6] = gUnknown_02022C74->unk_0000.unk_122[i];
r6++;
}
else
{
u8 r3 = gUnknown_02022C74->unk_0000.unk_122[i + 1];
if (r3 > 2)
{
i += 2;
}
else
{
ConvertIntToDecimalStringN(gUnknown_02022C74->unk_02DC[gUnknown_02022C74->unk_0175].unk_42, sp0[r3], STR_CONV_MODE_LEADING_ZEROS, 3);
gUnknown_02022C74->unk_02DC[gUnknown_02022C74->unk_0175].unk_00 = gUnknown_02022C74->unk_0000.unk_122[i + 2];
gUnknown_02022C74->unk_0175++;
if (gUnknown_02022C74->unk_0175 > 7)
break;
r6 = 0;
i += 2;
}
}
}
}
}
void sub_801C178(u8 whichWindow)
{
s8 sp0C = 0;
s32 windowId = gUnknown_02022C74->unk_0176[whichWindow];
PutWindowTilemap(windowId);
FillWindowPixelBuffer(windowId, 0);
switch (whichWindow)
{
case 0:
{
s32 x;
AddTextPrinterParameterized3(windowId, 3, 0, 1, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal1], 0, gUnknown_02022C74->unk_018B);
x = 160 - GetStringWidth(3, gUnknown_02022C74->unk_01B4, GetFontAttribute(3, 2));
if (x < 0)
x = 0;
AddTextPrinterParameterized3(windowId, 3, x, 17, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal1], 0, gUnknown_02022C74->unk_01B4);
if (gUnknown_02022C74->unk_0000.unk_04 != 0)
{
AddTextPrinterParameterized3(windowId, 1, 166, 17, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal1], 0, gUnknown_02022C74->unk_01DD);
}
break;
}
case 1:
for (; sp0C < 4; sp0C++)
{
AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal2], 0, gUnknown_02022C74->unk_01E4[sp0C]);
}
break;
case 2:
AddTextPrinterParameterized3(windowId, 3, 0, gUnknown_082F0E18[gUnknown_02022C74->unk_0000.unk_08_0], gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_0288);
if (gUnknown_02022C74->unk_0000.unk_08_0 != 2)
{
AddTextPrinterParameterized3(windowId, 3, 0, 16 + gUnknown_082F0E18[gUnknown_02022C74->unk_0000.unk_08_0], gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_02B1);
}
else
{
s32 x = 0;
s32 y = gUnknown_082F0E18[gUnknown_02022C74->unk_0000.unk_08_0] + 16;
s32 spacing = GetFontAttribute(3, 2);
for (; sp0C < gUnknown_02022C74->unk_0175; sp0C++)
{
AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_02DC[sp0C].unk_01);
if (gUnknown_02022C74->unk_02DC[sp0C].unk_42[0] != EOS)
{
x += GetStringWidth(3, gUnknown_02022C74->unk_02DC[sp0C].unk_01, spacing);
AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_082F0E10[gUnknown_02022C74->unk_0170->textPal3], 0, gUnknown_02022C74->unk_02DC[sp0C].unk_42);
x += GetStringWidth(3, gUnknown_02022C74->unk_02DC[sp0C].unk_42, spacing) + gUnknown_02022C74->unk_02DC[sp0C].unk_00;
}
}
}
break;
}
CopyWindowToVram(windowId, 3);
}
void sub_801C4C0(void)
{
u8 r7 = 0;
gUnknown_02022C74->unk_017C = 0xFF;
if (gUnknown_02022C74->unk_014C.unk_06 != SPECIES_NONE)
{
gUnknown_02022C74->unk_017C = sub_80D2D78(sub_80D2E84(gUnknown_02022C74->unk_014C.unk_06), SpriteCallbackDummy, 0xDC, 0x14, 0, FALSE);
gSprites[gUnknown_02022C74->unk_017C].oam.priority = 2;
}
if (gUnknown_02022C74->unk_0000.unk_09 != 0 && gUnknown_02022C74->unk_0000.unk_08_0 == 1)
{
LoadCompressedSpriteSheetUsingHeap(&gUnknown_082F1D00);
LoadSpritePalette(&gUnknown_082F1D08[gUnknown_02022C74->unk_0170->textPal4]);
for (; r7 < gUnknown_02022C74->unk_0000.unk_09; r7++)
{
gUnknown_02022C74->unk_017D[r7][0] = 0xFF;
gUnknown_02022C74->unk_017D[r7][1] = 0xFF;
gUnknown_02022C74->unk_017D[r7][0] = CreateSprite(&gUnknown_082F1D48, 0xd8 - 32 * r7, 0x90, 8);
if (gUnknown_02022C74->unk_014C.unk_08[0][r7] != 0)
{
gUnknown_02022C74->unk_017D[r7][1] = sub_80D2D78(sub_80D2E84(gUnknown_02022C74->unk_014C.unk_08[0][r7]), SpriteCallbackDummy, 0xd8 - 32 * r7, 0x88, 0, 0);
}
}
}
}
void sub_801C61C(void)
{
u8 r6 = 0;
if (gUnknown_02022C74->unk_017C != 0xFF)
sub_80D2EF8(&gSprites[gUnknown_02022C74->unk_017C]);
if (gUnknown_02022C74->unk_0000.unk_09 != 0 && gUnknown_02022C74->unk_0000.unk_08_0 == 1)
{
for (; r6 < gUnknown_02022C74->unk_0000.unk_09; r6++)
{
if (gUnknown_02022C74->unk_017D[r6][0] != 0xFF)
{
DestroySprite(&gSprites[gUnknown_02022C74->unk_017D[r6][0]]);
}
if (gUnknown_02022C74->unk_017D[r6][1] != 0xFF)
{
sub_80D2EF8(&gSprites[gUnknown_02022C74->unk_017D[r6][1]]);
}
}
FreeSpriteTilesByTag(0x8000);
FreeSpritePaletteByTag(0x8000);
}
}
struct UnkStruct_203F3CC
{
/*0000*/ struct MEventBuffer_3120_Sub unk_0000;
/*01bc*/ const struct UnkStruct_8467FB8 * unk_01BC;
/*01c0*/ u8 unk_01C0_0:1;
u8 unk_01C0_1:7;
/*01c1*/ u8 unk_01C1;
/*01c2*/ u8 unk_01C2_0:1;
u8 unk_01C2_1:7;
/*01c3*/ u8 unk_01C3_0:1;
u8 unk_01C3_1:7;
/*01c4*/ u16 unk_01C4;
/*01c6*/ u16 unk_01C6;
/*01c8*/ u16 unk_01C8[2];
/*01cc*/ u8 filler_01CC[2];
/*01ce*/ u8 unk_01CE[41];
/*01f7*/ u8 unk_01F7[10][41];
/*0394*/ struct ScrollArrowsTemplate unk_0394;
/*03a4*/ u8 buffer_03A4[0x1000];
};
EWRAM_DATA struct UnkStruct_203F3CC * gUnknown_02022C78 = NULL;
void sub_801CDCC(void);
void sub_801CE7C(void);
void sub_801CFA4(void);
const u8 gUnknown_082F1DE0[][3] = {
{0, 2, 3},
{0, 1, 2}
};
const struct WindowTemplate gUnknown_082F1DE8[] = {
{
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 0,
.width = 28,
.height = 3,
.paletteNum = 2,
.baseBlock = 0x2AC
}, {
.bg = 2,
.tilemapLeft = 1,
.tilemapTop = 3,
.width = 28,
.height = 20,
.paletteNum = 2,
.baseBlock = 0x07C
}
};
const struct ScrollArrowsTemplate gUnknown_082F1DF8 = {
0x02, 0xe8, 0x18, 0x03, 0xe8, 0x98,
0x0000, 0x0002, 0x1000, 0x1000, 0x0
};
const u16 gWonderNewsPal1[] = INCBIN_U16("graphics/wonder_transfers/wonder_news_1.gbapal");
const u16 gWonderNewsPal7[] = INCBIN_U16("graphics/wonder_transfers/wonder_news_7.gbapal");
const u16 gWonderNewsPal8[] = INCBIN_U16("graphics/wonder_transfers/wonder_news_8.gbapal");
const u32 gWonderNewsGfx1[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_1.4bpp.lz");
const u32 gWonderNewsTilemap1[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_1.bin.lz");
const u32 gWonderNewsGfx2[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_2.4bpp.lz");
const u32 gWonderNewsTilemap2[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_2.bin.lz");
const u32 gWonderNewsGfx3[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_3.4bpp.lz");
const u32 gWonderNewsTilemap3[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_3.bin.lz");
const u32 gWonderNewsGfx7[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_7.4bpp.lz");
const u32 gWonderNewsTilemap7[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_7.bin.lz");
const u32 gWonderNewsGfx8[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_8.4bpp.lz");
const u32 gWonderNewsTilemap8[] = INCBIN_U32("graphics/wonder_transfers/wonder_news_8.bin.lz");
const struct UnkStruct_8467FB8 gUnknown_082F24C8[] = {
{1, 0, 0, 0, gWonderNewsGfx1, gWonderNewsTilemap1, gWonderNewsPal1},
{1, 0, 0, 0, gWonderNewsGfx2, gWonderNewsTilemap2, gWonderCardBgPal2},
{1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal3},
{1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal4},
{1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal5},
{1, 0, 0, 0, gWonderNewsGfx3, gWonderNewsTilemap3, gWonderCardBgPal6},
{1, 0, 0, 0, gWonderNewsGfx7, gWonderNewsTilemap7, gWonderNewsPal7},
{1, 0, 0, 0, gWonderNewsGfx8, gWonderNewsTilemap8, gWonderNewsPal8}
};
bool32 sub_801C6C8(const struct MEventBuffer_3120_Sub * a0)
{
if (a0 == NULL)
return FALSE;
gUnknown_02022C78 = AllocZeroed(sizeof(struct UnkStruct_203F3CC));
if (gUnknown_02022C78 == NULL)
return FALSE;
gUnknown_02022C78->unk_0000 = *a0;
if (gUnknown_02022C78->unk_0000.unk_03 >= ARRAY_COUNT(gUnknown_082F24C8))
gUnknown_02022C78->unk_0000.unk_03 = 0;
gUnknown_02022C78->unk_01BC = &gUnknown_082F24C8[gUnknown_02022C78->unk_0000.unk_03];
gUnknown_02022C78->unk_01C1 = 0xFF;
return TRUE;
}
void sub_801C72C(void)
{
if (gUnknown_02022C78 != NULL)
{
*gUnknown_02022C78 = (struct UnkStruct_203F3CC){};
Free(gUnknown_02022C78);
gUnknown_02022C78 = NULL;
}
}
s32 sub_801C758(void)
{
if (gUnknown_02022C78 == NULL)
return -1;
switch (gUnknown_02022C78->unk_01C0_1)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
break;
case 1:
if (UpdatePaletteFade())
return 0;
ChangeBgY(0, 0, 0);
ChangeBgY(1, 0, 0);
ChangeBgY(2, 0, 0);
ChangeBgY(3, 0, 0);
SetGpuReg(REG_OFFSET_WIN0H, 0xF0);
SetGpuReg(REG_OFFSET_WIN0V, 0x1A98);
SetGpuReg(REG_OFFSET_WININ, 0x1F);
SetGpuReg(REG_OFFSET_WINOUT, 0x1B);
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
break;
case 2:
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 20);
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(3);
decompress_and_copy_tile_data_to_vram(3, gUnknown_02022C78->unk_01BC->tiles, 0, 8, 0);
gUnknown_02022C78->unk_01C8[0] = AddWindow(&gUnknown_082F1DE8[0]);
gUnknown_02022C78->unk_01C8[1] = AddWindow(&gUnknown_082F1DE8[1]);
break;
case 3:
if (free_temp_tile_data_buffers_if_possible())
return 0;
LoadPalette(stdpal_get(1), 0x20, 0x20);
gPaletteFade.bufferTransferDisabled = TRUE;
LoadPalette(gUnknown_02022C78->unk_01BC->pal, 0x10, 0x20);
LZ77UnCompWram(gUnknown_02022C78->unk_01BC->map, gUnknown_02022C78->buffer_03A4);
CopyRectToBgTilemapBufferRect(1, gUnknown_02022C78->buffer_03A4, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0);
CopyRectToBgTilemapBufferRect(3, gUnknown_02022C78->buffer_03A4, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(3);
break;
case 4:
sub_801CDCC();
break;
case 5:
sub_801CE7C();
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(2);
break;
case 6:
ShowBg(1);
ShowBg(2);
ShowBg(3);
gPaletteFade.bufferTransferDisabled = FALSE;
gUnknown_02022C78->unk_01C1 = AddScrollIndicatorArrowPair(&gUnknown_02022C78->unk_0394, &gUnknown_02022C78->unk_01C6);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
UpdatePaletteFade();
break;
default:
if (UpdatePaletteFade())
return 0;
gUnknown_02022C78->unk_01C0_1 = 0;
return 1;
}
++gUnknown_02022C78->unk_01C0_1;
return 0;
}
s32 sub_801CA50(bool32 flag)
{
if (gUnknown_02022C78 == NULL)
return -1;
switch (gUnknown_02022C78->unk_01C0_1)
{
case 0:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
break;
case 1:
if (UpdatePaletteFade())
return 0;
ChangeBgY(2, 0, 0);
SetGpuReg(REG_OFFSET_WIN0H, 0);
SetGpuReg(REG_OFFSET_WIN0V, 0);
SetGpuReg(REG_OFFSET_WININ, 0);
SetGpuReg(REG_OFFSET_WINOUT, 0);
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
break;
case 2:
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 24);
FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 24);
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(1);
CopyBgTilemapBufferToVram(2);
CopyBgTilemapBufferToVram(3);
break;
case 3:
HideBg(1);
HideBg(2);
RemoveWindow(gUnknown_02022C78->unk_01C8[1]);
RemoveWindow(gUnknown_02022C78->unk_01C8[0]);
break;
case 4:
ChangeBgY(2, 0, 0);
ChangeBgY(3, 0, 0);
if (gUnknown_02022C78->unk_01C1 != 0xFF)
{
RemoveScrollIndicatorArrowPair(gUnknown_02022C78->unk_01C1);
gUnknown_02022C78->unk_01C1 = 0xFF;
}
break;
case 5:
sub_80186EC(gUnknown_02022C60, flag);
sub_8018798(3);
CopyBgTilemapBufferToVram(0);
CopyBgTilemapBufferToVram(3);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
break;
default:
if (UpdatePaletteFade())
return 0;
gUnknown_02022C78->unk_01C0_1 = 0;
return 1;
}
++gUnknown_02022C78->unk_01C0_1;
return 0;
}
void sub_801CC38(void)
{
if (!gUnknown_02022C78->unk_01C0_0 && gUnknown_02022C78->unk_01C1 != 0xFF)
{
RemoveScrollIndicatorArrowPair(gUnknown_02022C78->unk_01C1);
gUnknown_02022C78->unk_01C1 = 0xFF;
gUnknown_02022C78->unk_01C0_0 = TRUE;
}
}
void sub_801CC80(void)
{
if (gUnknown_02022C78->unk_01C0_0)
{
gUnknown_02022C78->unk_01C1 = AddScrollIndicatorArrowPair(&gUnknown_02022C78->unk_0394, &gUnknown_02022C78->unk_01C6);
gUnknown_02022C78->unk_01C0_0 = FALSE;
}
}
u32 sub_801CCD0(u16 input)
{
if (gUnknown_02022C78->unk_01C2_0)
{
sub_801CFA4();
return 0xFF;
}
switch (input)
{
case A_BUTTON:
return 0;
case B_BUTTON:
return 1;
case DPAD_UP:
if (gUnknown_02022C78->unk_01C6 == 0)
return 0xFF;
if (gUnknown_02022C78->unk_01C0_0)
return 0xFF;
gUnknown_02022C78->unk_01C3_0 = FALSE;
break;
case DPAD_DOWN:
if (gUnknown_02022C78->unk_01C6 == gUnknown_02022C78->unk_01C4)
return 0xFF;
if (gUnknown_02022C78->unk_01C0_0)
return 0xFF;
gUnknown_02022C78->unk_01C3_0 = TRUE;
break;
default:
return 0xFF;
}
gUnknown_02022C78->unk_01C2_0 = TRUE;
gUnknown_02022C78->unk_01C2_1 = 2;
gUnknown_02022C78->unk_01C3_1 = 0;
if (gUnknown_02022C78->unk_01C3_0 == FALSE)
return 2;
else
return 3;
}
void sub_801CDCC(void)
{
u8 i = 0;
memcpy(gUnknown_02022C78->unk_01CE, gUnknown_02022C78->unk_0000.unk_04, 40);
gUnknown_02022C78->unk_01CE[40] = EOS;
for (; i < 10; ++i)
{
memcpy(gUnknown_02022C78->unk_01F7[i], gUnknown_02022C78->unk_0000.unk_2C[i], 40);
gUnknown_02022C78->unk_01F7[i][40] = EOS;
if (i > 7 && gUnknown_02022C78->unk_01F7[i][0] != EOS)
++gUnknown_02022C78->unk_01C4;
}
gUnknown_02022C78->unk_0394 = gUnknown_082F1DF8;
gUnknown_02022C78->unk_0394.fullyDownThreshold = gUnknown_02022C78->unk_01C4;
}
void sub_801CE7C(void)
{
u8 i = 0;
s32 x;
PutWindowTilemap(gUnknown_02022C78->unk_01C8[0]);
PutWindowTilemap(gUnknown_02022C78->unk_01C8[1]);
FillWindowPixelBuffer(gUnknown_02022C78->unk_01C8[0], 0);
FillWindowPixelBuffer(gUnknown_02022C78->unk_01C8[1], 0);
x = (0xe0 - GetStringWidth(3, gUnknown_02022C78->unk_01CE, GetFontAttribute(3, 2))) / 2;
if (x < 0)
x = 0;
AddTextPrinterParameterized3(gUnknown_02022C78->unk_01C8[0], 3, x, 6, gUnknown_082F1DE0[gUnknown_02022C78->unk_01BC->textPal1], 0, gUnknown_02022C78->unk_01CE);
for (; i < 10; ++i)
{
AddTextPrinterParameterized3(gUnknown_02022C78->unk_01C8[1], 3, 0, 16 * i + 2, gUnknown_082F1DE0[gUnknown_02022C78->unk_01BC->textPal2], 0, gUnknown_02022C78->unk_01F7[i]);
}
CopyWindowToVram(gUnknown_02022C78->unk_01C8[0], 3);
CopyWindowToVram(gUnknown_02022C78->unk_01C8[1], 3);
}
void sub_801CFA4(void)
{
u16 r4 = gUnknown_02022C78->unk_01C2_1;
r4 <<= 8;
if (gUnknown_02022C78->unk_01C3_0)
{
ChangeBgY(2, r4, 1);
ChangeBgY(3, r4, 1);
}
else
{
ChangeBgY(2, r4, 2);
ChangeBgY(3, r4, 2);
}
gUnknown_02022C78->unk_01C3_1 += gUnknown_02022C78->unk_01C2_1;
if (gUnknown_02022C78->unk_01C3_1 > 15)
{
if (gUnknown_02022C78->unk_01C3_0)
++gUnknown_02022C78->unk_01C6;
else
--gUnknown_02022C78->unk_01C6;
gUnknown_02022C78->unk_01C2_0 = FALSE;
gUnknown_02022C78->unk_01C3_1 = 0;
}
}
+147
View File
@@ -0,0 +1,147 @@
#include "global.h"
#include "mevent.h"
#include "random.h"
#include "event_data.h"
#include "mevent_news.h"
static u32 sub_801DCAC(struct MysteryEventStruct *);
static void sub_801DD10(struct MysteryEventStruct *);
static u32 sub_801DD44(struct MysteryEventStruct *);
static void sub_801DCD8(struct MysteryEventStruct *);
static void sub_801DCCC(struct MysteryEventStruct *);
void sub_801DB68(u32 a0)
{
struct MysteryEventStruct *r5 = sub_801B044();
r5->unk_0_0 = a0;
switch (a0)
{
case 0:
break;
case 1:
case 2:
r5->unk_1 = (Random() % 15) + 16;
break;
case 3:
r5->unk_1 = (Random() % 15) + 1;
break;
}
}
void sub_801DBC0(void)
{
struct MysteryEventStruct *r5 = sub_801B044();
r5->unk_0_0 = 0;
r5->unk_0_2 = 0;
r5->unk_0_5 = 0;
r5->unk_1 = 0;
VarSet(VAR_0x402E, 0);
}
void sub_801DBDC(void)
{
u16 *r4 = GetVarPointer(VAR_0x402E);
struct MysteryEventStruct *r2 = sub_801B044();
struct MysteryEventStruct r0 = *r2;
if ((u8)r0.unk_0_5 > 4 && ++(*r4) > 0x1f3)
{
r2->unk_0_5 = 0;
*r4 = 0;
}
}
u16 sub_801DC20(void)
{
u16 *r6 = &gSpecialVar_Result;
struct MysteryEventStruct *r4 = sub_801B044();
u16 r5;
if (!IsMysteryEventEnabled() || !sub_801B0CC())
return 0;
r5 = sub_801DD44(r4);
switch (r5)
{
case 0:
break;
case 1:
*r6 = sub_801DCAC(r4);
break;
case 2:
*r6 = sub_801DCAC(r4);
break;
case 3:
break;
case 4:
*r6 = sub_801DCAC(r4);
sub_801DCD8(r4);
break;
case 5:
*r6 = sub_801DCAC(r4);
sub_801DCCC(r4);
break;
case 6:
break;
}
return r5;
}
static u32 sub_801DCAC(struct MysteryEventStruct *a0)
{
u32 r4;
a0->unk_0_0 = 0;
r4 = a0->unk_1 + 0x84;
a0->unk_1 = 0;
sub_801DD10(a0);
return r4;
}
static void sub_801DCCC(struct MysteryEventStruct *a0)
{
a0->unk_0_2 = 0;
}
static void sub_801DCD8(struct MysteryEventStruct *a0)
{
a0->unk_0_2++;
if ((u8)a0->unk_0_2 > 4)
a0->unk_0_2 = 4;
}
static void sub_801DD10(struct MysteryEventStruct *a0)
{
a0->unk_0_5++;
if ((u8)a0->unk_0_5 > 5)
a0->unk_0_5 = 5;
}
static u32 sub_801DD44(struct MysteryEventStruct *a0)
{
struct MysteryEventStruct r0;
if ((u8)a0->unk_0_5 == 5)
return 6;
r0 = *a0;
switch (r0.unk_0_0)
{
case 0:
return 3;
case 1:
return 1;
case 2:
return 2;
case 3:
if ((u8)r0.unk_0_2 < 3)
return 4;
return 5;
default:
AGB_ASSERT(0);
return 0;
}
}
+6 -6
View File
@@ -142,10 +142,10 @@ static const struct OamData gOamData_8617DF4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 3,
@@ -192,10 +192,10 @@ static const struct OamData sCeilingCrumble2OamData =
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -230,10 +230,10 @@ static const struct OamData sCeilingCrumble1OamData =
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+6 -6
View File
@@ -30,10 +30,10 @@ static const struct OamData gUnknown_0859EE7C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -47,10 +47,10 @@ static const struct OamData gUnknown_0859EE84 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -156,10 +156,10 @@ static const struct OamData gUnknown_0859EF1C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x8),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(32x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+2 -2
View File
@@ -24,10 +24,10 @@ static const struct OamData sOamData_MoneyLabel =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x16),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+976
View File
@@ -0,0 +1,976 @@
#include "global.h"
#include "main.h"
#include "battle.h"
#include "bg.h"
#include "contest_effect.h"
#include "data2.h"
#include "event_data.h"
#include "field_screen_effect.h"
#include "gpu_regs.h"
#include "move_relearner.h"
#include "list_menu.h"
#include "alloc.h"
#include "menu.h"
#include "menu_helpers.h"
#include "menu_specialized.h"
#include "overworld.h"
#include "palette.h"
#include "pokemon_summary_screen.h"
#include "script.h"
#include "sound.h"
#include "sprite.h"
#include "string_util.h"
#include "strings.h"
#include "task.h"
#include "constants/rgb.h"
#include "constants/songs.h"
/*
* Move relearner state machine
* ------------------------
*
* Entry point: TeachMoveRelearnerMove
*
* TeachMoveRelearnerMove
* Task_WaitForFadeOut
* CB2_InitLearnMove
* - Creates moveDisplayArrowTask to listen to right/left buttons.
* - Creates moveListScrollArrowTask to listen to up/down buttons.
* - Whenever the selected move changes (and once on init), the MoveRelearnerCursorCallback
* is called (see sMoveRelearnerMovesListTemplate). That callback will reload the contest
* display and battle display windows for the new move. Both are always loaded in
* memory, but only the currently active one is copied to VRAM. The exception to this
* is the appeal and jam hearts, which are sprites. MoveRelearnerShowHideHearts is called
* while reloading the contest display to control them.
* DoMoveRelearnerMain: MENU_STATE_FADE_TO_BLACK
* DoMoveRelearnerMain: MENU_STATE_WAIT_FOR_FADE
* - Go to MENU_STATE_IDLE_BATTLE_MODE
*
* DoMoveRelearnerMain: MENU_STATE_SETUP_BATTLE_MODE
* DoMoveRelearnerMain: MENU_STATE_IDLE_BATTLE_MODE
* - If the player selected a move (pressed A), go to MENU_STATE_PRINT_TEACH_MOVE_PROMPT.
* - If the player cancelled (pressed B), go to MENU_STATE_PRINT_GIVE_UP_PROMPT.
* - If the player pressed left or right, swap the move display window to contest mode,
* and go to MENU_STATE_SETUP_CONTEST_MODE.
*
* DoMoveRelearnerMain: MENU_STATE_SETUP_CONTEST_MODE
* DoMoveRelearnerMain: MENU_STATE_IDLE_CONTEST_MODE
* - If the player selected a move, go to MENU_STATE_PRINT_TEACH_MOVE_PROMPT.
* - If the player cancelled, go to MENU_STATE_PRINT_GIVE_UP_PROMPT
* - If the player pressed left or right, swap the move display window to battle mode,
* and go to MENU_STATE_SETUP_BATTLE_MODE.
*
* DoMoveRelearnerMain: MENU_STATE_PRINT_TEACH_MOVE_PROMPT
* DoMoveRelearnerMain: MENU_STATE_TEACH_MOVE_CONFIRM
* - Wait for the player to confirm.
* - If cancelled, go to either MENU_STATE_SETUP_BATTLE_MODE or MENU_STATE_SETUP_CONTEST_MODE.
* - If confirmed and the pokemon had an empty move slot, set VAR_0x8004 to TRUE and go to
* MENU_STATE_PRINT_TEXT_THEN_FANFARE.
* - If confirmed and the pokemon doesn't have an empty move slot, go to
* MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT.
*
* DoMoveRelearnerMain: MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT
* DoMoveRelearnerMain: MENU_STATE_WAIT_FOR_TRYING_TO_LEARN
* DoMoveRelearnerMain: MENU_STATE_CONFIRM_DELETE_OLD_MOVE
* - If the player confirms, go to MENU_STATE_PRINT_WHICH_MOVE_PROMPT.
* - If the player cancels, go to MENU_STATE_PRINT_STOP_TEACHING
*
* DoMoveRelearnerMain: MENU_STATE_PRINT_STOP_TEACHING
* DoMoveRelearnerMain: MENU_STATE_WAIT_FOR_STOP_TEACHING
* DoMoveRelearnerMain: MENU_STATE_CONFIRM_STOP_TEACHING
* - If the player confirms, go to MENU_STATE_CHOOSE_SETUP_STATE.
* - If the player cancels, go back to MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT.
*
* DoMoveRelearnerMain: MENU_STATE_PRINT_WHICH_MOVE_PROMPT
* DoMoveRelearnerMain: MENU_STATE_SHOW_MOVE_SUMMARY_SCREEN
* - Go to ShowSelectMovePokemonSummaryScreen. When done, control returns to
* CB2_InitLearnMoveReturnFromSelectMove.
*
* DoMoveRelearnerMain: MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE
* DoMoveRelearnerMain: MENU_STATE_PRINT_TEXT_THEN_FANFARE
* DoMoveRelearnerMain: MENU_STATE_WAIT_FOR_FANFARE
* DoMoveRelearnerMain: MENU_STATE_WAIT_FOR_A_BUTTON
* DoMoveRelearnerMain: MENU_STATE_FADE_AND_RETURN
* DoMoveRelearnerMain: MENU_STATE_RETURN_TO_FIELD
* - Clean up and go to CB2_ReturnToField.
*
* DoMoveRelearnerMain: MENU_STATE_PRINT_GIVE_UP_PROMPT
* DoMoveRelearnerMain: MENU_STATE_GIVE_UP_CONFIRM
* - If the player confirms, go to MENU_STATE_FADE_AND_RETURN, and set VAR_0x8004 to FALSE.
* - If the player cancels, go to either MENU_STATE_SETUP_BATTLE_MODE or
* MENU_STATE_SETUP_CONTEST_MODE.
*
* CB2_InitLearnMoveReturnFromSelectMove:
* - Do most of the same stuff as CB2_InitLearnMove.
* DoMoveRelearnerMain: MENU_STATE_FADE_FROM_SUMMARY_SCREEN
* DoMoveRelearnerMain: MENU_STATE_TRY_OVERWRITE_MOVE
* - If any of the pokemon's existing moves were chosen, overwrite the move and
* go to MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE and set VAR_0x8004 to TRUE.
* - If the chosen move is the one the player selected before the summary screen,
* go to MENU_STATE_PRINT_STOP_TEACHING.
*
*/
#define MENU_STATE_FADE_TO_BLACK 0
#define MENU_STATE_WAIT_FOR_FADE 1
#define MENU_STATE_UNREACHABLE 2
#define MENU_STATE_SETUP_BATTLE_MODE 3
#define MENU_STATE_IDLE_BATTLE_MODE 4
#define MENU_STATE_SETUP_CONTEST_MODE 5
#define MENU_STATE_IDLE_CONTEST_MODE 6
// State 7 is skipped.
#define MENU_STATE_PRINT_TEACH_MOVE_PROMPT 8
#define MENU_STATE_TEACH_MOVE_CONFIRM 9
// States 10 and 11 are skipped.
#define MENU_STATE_PRINT_GIVE_UP_PROMPT 12
#define MENU_STATE_GIVE_UP_CONFIRM 13
#define MENU_STATE_FADE_AND_RETURN 14
#define MENU_STATE_RETURN_TO_FIELD 15
#define MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT 16
#define MENU_STATE_WAIT_FOR_TRYING_TO_LEARN 17
#define MENU_STATE_CONFIRM_DELETE_OLD_MOVE 18
#define MENU_STATE_PRINT_WHICH_MOVE_PROMPT 19
#define MENU_STATE_SHOW_MOVE_SUMMARY_SCREEN 20
// States 21, 22, and 23 are skipped.
#define MENU_STATE_PRINT_STOP_TEACHING 24
#define MENU_STATE_WAIT_FOR_STOP_TEACHING 25
#define MENU_STATE_CONFIRM_STOP_TEACHING 26
#define MENU_STATE_CHOOSE_SETUP_STATE 27
#define MENU_STATE_FADE_FROM_SUMMARY_SCREEN 28
#define MENU_STATE_TRY_OVERWRITE_MOVE 29
#define MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE 30
#define MENU_STATE_PRINT_TEXT_THEN_FANFARE 31
#define MENU_STATE_WAIT_FOR_FANFARE 32
#define MENU_STATE_WAIT_FOR_A_BUTTON 33
// The different versions of hearts are selected using animation
// commands.
#define APPEAL_HEART_EMPTY 0
#define APPEAL_HEART_FULL 1
#define JAM_HEART_EMPTY 2
#define JAM_HEART_FULL 3
static EWRAM_DATA struct
{
u8 state;
u8 heartSpriteIds[16]; /*0x001*/
u16 movesToLearn[4]; /*0x012*/
u8 filler1A[0x44 - 0x1A]; /*0x01A*/
u8 partyMon; /*0x044*/
u8 moveSlot; /*0x045*/
struct ListMenuItem menuItems[20]; /*0x048*/
u8 fillerE8[0x110 - 0xE8]; /*0x0E8*/
u8 numMenuChoices; /*0x110*/
u8 numToShowAtOnce; /*0x111*/
u8 moveListMenuTask; /*0x112*/
u8 moveListScrollArrowTask; /*0x113*/
u8 moveDisplayArrowTask; /*0x114*/
u16 scrollOffset; /*0x116*/
} *sMoveRelearnerStruct = {0};
static EWRAM_DATA struct {
u16 listOffset;
u16 listRow;
bool8 showContestInfo;
} sMoveRelearnerMenuSate = {0};
static const u16 sMoveRelearnerPaletteData[] = INCBIN_U16("graphics/interface/ui_learn_move.gbapal");
// The arrow sprites in this spritesheet aren't used. The scroll-arrow system provides its own
// arrow sprites.
static const u8 sMoveRelearnerSpriteSheetData[] = INCBIN_U8("graphics/interface/ui_learn_move.4bpp");
static const struct OamData sHeartSpriteOamData =
{
.y = 0,
.affineMode = 0,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.x = 0,
.matrixNum = 0,
.size = 0,
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
.affineParam = 0,
};
static const struct OamData sUnusedOam1 =
{
.y = 0,
.affineMode = 0,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_V_RECTANGLE,
.x = 0,
.matrixNum = 0,
.size = 0,
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
.affineParam = 0,
};
static const struct OamData sUnusedOam2 =
{
.y = 0,
.affineMode = 0,
.objMode = ST_OAM_OBJ_NORMAL,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_H_RECTANGLE,
.x = 0,
.matrixNum = 0,
.size = 0,
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
.affineParam = 0,
};
static const struct SpriteSheet sMoveRelearnerSpriteSheet =
{
.data = sMoveRelearnerSpriteSheetData,
.size = 0x180,
.tag = 5525
};
static const struct SpritePalette sMoveRelearnerPalette =
{
.data = sMoveRelearnerPaletteData,
.tag = 5526
};
static const struct ScrollArrowsTemplate sDisplayModeArrowsTemplate =
{
.firstArrowType = SCROLL_ARROW_LEFT,
.firstX = 27,
.firstY = 16,
.secondArrowType = SCROLL_ARROW_RIGHT,
.secondX = 117,
.secondY = 16,
.fullyUpThreshold = -1,
.fullyDownThreshold = -1,
.tileTag = 5325,
.palTag = 5325,
.palNum = 0,
};
static const struct ScrollArrowsTemplate sMoveListScrollArrowsTemplate =
{
.firstArrowType = SCROLL_ARROW_UP,
.firstX = 192,
.firstY = 8,
.secondArrowType = SCROLL_ARROW_DOWN,
.secondX = 192,
.secondY = 104,
.fullyUpThreshold = 0,
.fullyDownThreshold = 0,
.tileTag = 5425,
.palTag = 5425,
.palNum = 0,
};
static const union AnimCmd sHeartSprite_AppealEmptyFrame[] =
{
ANIMCMD_FRAME(8, 5, FALSE, FALSE),
ANIMCMD_END
};
static const union AnimCmd sHeartSprite_AppealFullFrame[] =
{
ANIMCMD_FRAME(9, 5, FALSE, FALSE),
ANIMCMD_END
};
static const union AnimCmd sHeartSprite_JamEmptyFrame[] =
{
ANIMCMD_FRAME(10, 5, FALSE, FALSE),
ANIMCMD_END
};
static const union AnimCmd sHeartSprite_JamFullFrame[] =
{
ANIMCMD_FRAME(11, 5, FALSE, FALSE),
ANIMCMD_END
};
static const union AnimCmd *const sHeartSpriteAnimationCommands[] =
{
[APPEAL_HEART_EMPTY] = sHeartSprite_AppealEmptyFrame,
[APPEAL_HEART_FULL] = sHeartSprite_AppealFullFrame,
[JAM_HEART_EMPTY] = sHeartSprite_JamEmptyFrame,
[JAM_HEART_FULL] = sHeartSprite_JamFullFrame,
};
static const struct SpriteTemplate sConstestMoveHeartSprite =
{
.tileTag = 5525,
.paletteTag = 5526,
.oam = &sHeartSpriteOamData,
.anims = sHeartSpriteAnimationCommands,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy
};
static const struct BgTemplate sMoveRelearnerMenuBackgroundTemplates[] =
{
{
.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 = 1,
.baseTile = 0,
},
};
static void DoMoveRelearnerMain(void);
static void CreateLearnableMovesList(void);
static void CreateUISprites(void);
static void CB2_MoveRelearnerMain(void);
static void Task_WaitForFadeOut(u8 taskId);
static void CB2_InitLearnMove(void);
static void CB2_InitLearnMoveReturnFromSelectMove(void);
static void InitMoveRelearnerBackgroundLayers(void);
static void AddScrollArrows(void);
static void HandleInput(u8);
static void ShowTeachMoveText(u8);
static s32 GetCurrentSelectedMove(void);
static void FreeMoveRelearnerResources(void);
static void RemoveScrollArrows(void);
static void HideHeartSpritesAndShowTeachMoveText(bool8);
static void VBlankCB_MoveRelearner(void)
{
LoadOam();
ProcessSpriteCopyRequests();
TransferPlttBuffer();
}
// Script arguments: The pokemon to teach is in VAR_0x8004
void TeachMoveRelearnerMove(void)
{
ScriptContext2_Enable();
CreateTask(Task_WaitForFadeOut, 10);
// Fade to black
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
}
static void Task_WaitForFadeOut(u8 taskId)
{
if (!gPaletteFade.active)
{
SetMainCallback2(CB2_InitLearnMove);
gFieldCallback = FieldCallback_ReturnToEventScript2;
DestroyTask(taskId);
}
}
static void CB2_InitLearnMove(void)
{
ResetSpriteData();
FreeAllSpritePalettes();
ResetTasks();
clear_scheduled_bg_copies_to_vram();
sMoveRelearnerStruct = AllocZeroed(sizeof(*sMoveRelearnerStruct));
sMoveRelearnerStruct->partyMon = gSpecialVar_0x8004;
SetVBlankCallback(VBlankCB_MoveRelearner);
InitMoveRelearnerBackgroundLayers();
InitMoveRelearnerWindows(FALSE);
sMoveRelearnerMenuSate.listOffset = 0;
sMoveRelearnerMenuSate.listRow = 0;
sMoveRelearnerMenuSate.showContestInfo = FALSE;
CreateLearnableMovesList();
LoadSpriteSheet(&sMoveRelearnerSpriteSheet);
LoadSpritePalette(&sMoveRelearnerPalette);
CreateUISprites();
sMoveRelearnerStruct->moveListMenuTask = ListMenuInit(&gMultiuseListMenuTemplate, sMoveRelearnerMenuSate.listOffset, sMoveRelearnerMenuSate.listRow);
FillPalette(RGB_BLACK, 0, 2);
SetMainCallback2(CB2_MoveRelearnerMain);
}
static void CB2_InitLearnMoveReturnFromSelectMove(void)
{
ResetSpriteData();
FreeAllSpritePalettes();
ResetTasks();
clear_scheduled_bg_copies_to_vram();
sMoveRelearnerStruct = AllocZeroed(sizeof(*sMoveRelearnerStruct));
sMoveRelearnerStruct->state = MENU_STATE_FADE_FROM_SUMMARY_SCREEN;
sMoveRelearnerStruct->partyMon = gSpecialVar_0x8004;
sMoveRelearnerStruct->moveSlot = gSpecialVar_0x8005;
SetVBlankCallback(VBlankCB_MoveRelearner);
InitMoveRelearnerBackgroundLayers();
InitMoveRelearnerWindows(sMoveRelearnerMenuSate.showContestInfo);
CreateLearnableMovesList();
LoadSpriteSheet(&sMoveRelearnerSpriteSheet);
LoadSpritePalette(&sMoveRelearnerPalette);
CreateUISprites();
sMoveRelearnerStruct->moveListMenuTask = ListMenuInit(&gMultiuseListMenuTemplate, sMoveRelearnerMenuSate.listOffset, sMoveRelearnerMenuSate.listRow);
FillPalette(RGB_BLACK, 0, 2);
SetMainCallback2(CB2_MoveRelearnerMain);
}
static void InitMoveRelearnerBackgroundLayers(void)
{
ResetVramOamAndBgCntRegs();
ResetBgsAndClearDma3BusyFlags(0);
InitBgsFromTemplates(0, sMoveRelearnerMenuBackgroundTemplates, ARRAY_COUNT(sMoveRelearnerMenuBackgroundTemplates));
ResetAllBgsCoordinates();
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 |
DISPCNT_OBJ_1D_MAP |
DISPCNT_OBJ_ON);
ShowBg(0);
ShowBg(1);
SetGpuReg(REG_OFFSET_BLDCNT, 0);
}
static void CB2_MoveRelearnerMain(void)
{
DoMoveRelearnerMain();
RunTasks();
AnimateSprites();
BuildOamBuffer();
do_scheduled_bg_tilemap_copies_to_vram();
UpdatePaletteFade();
}
static void FormatAndPrintText(const u8 *src)
{
StringExpandPlaceholders(gStringVar4, src);
MoveRelearnerPrintText(gStringVar4);
}
// See the state machine doc at the top of the file.
static void DoMoveRelearnerMain(void)
{
switch (sMoveRelearnerStruct->state)
{
case MENU_STATE_FADE_TO_BLACK:
sMoveRelearnerStruct->state++;
HideHeartSpritesAndShowTeachMoveText(FALSE);
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
break;
case MENU_STATE_WAIT_FOR_FADE:
if (!gPaletteFade.active)
{
sMoveRelearnerStruct->state = MENU_STATE_IDLE_BATTLE_MODE;
}
break;
case MENU_STATE_UNREACHABLE:
sMoveRelearnerStruct->state++;
break;
case MENU_STATE_SETUP_BATTLE_MODE:
HideHeartSpritesAndShowTeachMoveText(FALSE);
sMoveRelearnerStruct->state++;
AddScrollArrows();
break;
case MENU_STATE_IDLE_BATTLE_MODE:
HandleInput(FALSE);
break;
case MENU_STATE_SETUP_CONTEST_MODE:
ShowTeachMoveText(FALSE);
sMoveRelearnerStruct->state++;
AddScrollArrows();
break;
case MENU_STATE_IDLE_CONTEST_MODE:
HandleInput(TRUE);
break;
case MENU_STATE_PRINT_TEACH_MOVE_PROMPT:
if (!MoveRelearnerRunTextPrinters())
{
MoveRelearnerCreateYesNoMenu();
sMoveRelearnerStruct->state++;
}
break;
case MENU_STATE_TEACH_MOVE_CONFIRM:
{
s8 selection = Menu_ProcessInputNoWrapClearOnChoose();
if (selection == 0)
{
if (GiveMoveToMon(&gPlayerParty[sMoveRelearnerStruct->partyMon], GetCurrentSelectedMove()) != 0xFFFF)
{
FormatAndPrintText(gText_MoveRelearnerPkmnLearnedMove);
gSpecialVar_0x8004 = TRUE;
sMoveRelearnerStruct->state = MENU_STATE_PRINT_TEXT_THEN_FANFARE;
}
else
{
sMoveRelearnerStruct->state = MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT;
}
}
else if (selection == MENU_B_PRESSED || selection == 1)
{
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
{
sMoveRelearnerStruct->state = MENU_STATE_SETUP_BATTLE_MODE;
}
else if (sMoveRelearnerMenuSate.showContestInfo == TRUE)
{
sMoveRelearnerStruct->state = MENU_STATE_SETUP_CONTEST_MODE;
}
}
}
break;
case MENU_STATE_PRINT_GIVE_UP_PROMPT:
if (!MoveRelearnerRunTextPrinters())
{
MoveRelearnerCreateYesNoMenu();
sMoveRelearnerStruct->state++;
}
break;
case MENU_STATE_GIVE_UP_CONFIRM:
{
s8 selection = Menu_ProcessInputNoWrapClearOnChoose();
if (selection == 0)
{
gSpecialVar_0x8004 = FALSE;
sMoveRelearnerStruct->state = MENU_STATE_FADE_AND_RETURN;
}
else if (selection == -1 || selection == 1)
{
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
{
sMoveRelearnerStruct->state = MENU_STATE_SETUP_BATTLE_MODE;
}
else if (sMoveRelearnerMenuSate.showContestInfo == TRUE)
{
sMoveRelearnerStruct->state = MENU_STATE_SETUP_CONTEST_MODE;
}
}
}
break;
case MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT:
FormatAndPrintText(gText_MoveRelearnerPkmnTryingToLearnMove);
sMoveRelearnerStruct->state++;
break;
case MENU_STATE_WAIT_FOR_TRYING_TO_LEARN:
if (!MoveRelearnerRunTextPrinters())
{
MoveRelearnerCreateYesNoMenu();
sMoveRelearnerStruct->state = MENU_STATE_CONFIRM_DELETE_OLD_MOVE;
}
break;
case MENU_STATE_CONFIRM_DELETE_OLD_MOVE:
{
s8 var = Menu_ProcessInputNoWrapClearOnChoose();
if (var == 0)
{
FormatAndPrintText(gText_MoveRelearnerWhichMoveToForget);
sMoveRelearnerStruct->state = MENU_STATE_PRINT_WHICH_MOVE_PROMPT;
}
else if (var == -1 || var == 1)
{
sMoveRelearnerStruct->state = MENU_STATE_PRINT_STOP_TEACHING;
}
}
break;
case MENU_STATE_PRINT_STOP_TEACHING:
StringCopy(gStringVar2, gMoveNames[GetCurrentSelectedMove()]);
FormatAndPrintText(gText_MoveRelearnerStopTryingToTeachMove);
sMoveRelearnerStruct->state++;
break;
case MENU_STATE_WAIT_FOR_STOP_TEACHING:
if (!MoveRelearnerRunTextPrinters())
{
MoveRelearnerCreateYesNoMenu();
sMoveRelearnerStruct->state++;
}
break;
case MENU_STATE_CONFIRM_STOP_TEACHING:
{
s8 var = Menu_ProcessInputNoWrapClearOnChoose();
if (var == 0)
{
sMoveRelearnerStruct->state = MENU_STATE_CHOOSE_SETUP_STATE;
}
else if (var == MENU_B_PRESSED || var == 1)
{
// What's the point? It gets set to MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT, anyway.
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
{
sMoveRelearnerStruct->state = MENU_STATE_SETUP_BATTLE_MODE;
}
else if (sMoveRelearnerMenuSate.showContestInfo == TRUE)
{
sMoveRelearnerStruct->state = MENU_STATE_SETUP_CONTEST_MODE;
}
sMoveRelearnerStruct->state = MENU_STATE_PRINT_TRYING_TO_LEARN_PROMPT;
}
}
break;
case MENU_STATE_CHOOSE_SETUP_STATE:
if (!MoveRelearnerRunTextPrinters())
{
FillWindowPixelBuffer(3, 0x11);
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
{
sMoveRelearnerStruct->state = MENU_STATE_SETUP_BATTLE_MODE;
}
else if (sMoveRelearnerMenuSate.showContestInfo == TRUE)
{
sMoveRelearnerStruct->state = MENU_STATE_SETUP_CONTEST_MODE;
}
}
break;
case MENU_STATE_PRINT_WHICH_MOVE_PROMPT:
if (!MoveRelearnerRunTextPrinters())
{
sMoveRelearnerStruct->state = MENU_STATE_SHOW_MOVE_SUMMARY_SCREEN;
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
}
break;
case MENU_STATE_SHOW_MOVE_SUMMARY_SCREEN:
if (!gPaletteFade.active)
{
ShowSelectMovePokemonSummaryScreen(gPlayerParty, sMoveRelearnerStruct->partyMon, gPlayerPartyCount - 1, CB2_InitLearnMoveReturnFromSelectMove, GetCurrentSelectedMove());
FreeMoveRelearnerResources();
}
break;
case 21:
if (!MoveRelearnerRunTextPrinters())
{
sMoveRelearnerStruct->state = MENU_STATE_FADE_AND_RETURN;
}
break;
case 22:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
break;
case MENU_STATE_FADE_AND_RETURN:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
sMoveRelearnerStruct->state++;
break;
case MENU_STATE_RETURN_TO_FIELD:
if (!gPaletteFade.active)
{
FreeMoveRelearnerResources();
SetMainCallback2(CB2_ReturnToField);
}
break;
case MENU_STATE_FADE_FROM_SUMMARY_SCREEN:
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
sMoveRelearnerStruct->state++;
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
{
HideHeartSpritesAndShowTeachMoveText(TRUE);
}
else if (sMoveRelearnerMenuSate.showContestInfo == TRUE)
{
ShowTeachMoveText(TRUE);
}
RemoveScrollArrows();
CopyWindowToVram(3, 2);
break;
case MENU_STATE_TRY_OVERWRITE_MOVE:
if (!gPaletteFade.active)
{
if (sMoveRelearnerStruct->moveSlot == MAX_MON_MOVES)
{
sMoveRelearnerStruct->state = MENU_STATE_PRINT_STOP_TEACHING;
}
else
{
u16 moveId = GetMonData(&gPlayerParty[sMoveRelearnerStruct->partyMon], MON_DATA_MOVE1 + sMoveRelearnerStruct->moveSlot);
StringCopy(gStringVar3, gMoveNames[moveId]);
RemoveMonPPBonus(&gPlayerParty[sMoveRelearnerStruct->partyMon], sMoveRelearnerStruct->moveSlot);
SetMonMoveSlot(&gPlayerParty[sMoveRelearnerStruct->partyMon], GetCurrentSelectedMove(), sMoveRelearnerStruct->moveSlot);
StringCopy(gStringVar2, gMoveNames[GetCurrentSelectedMove()]);
FormatAndPrintText(gText_MoveRelearnerAndPoof);
sMoveRelearnerStruct->state = MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE;
gSpecialVar_0x8004 = TRUE;
}
}
break;
case MENU_STATE_DOUBLE_FANFARE_FORGOT_MOVE:
if (!MoveRelearnerRunTextPrinters())
{
FormatAndPrintText(gText_MoveRelearnerPkmnForgotMoveAndLearnedNew);
sMoveRelearnerStruct->state = MENU_STATE_PRINT_TEXT_THEN_FANFARE;
PlayFanfare(MUS_FANFA1);
}
break;
case MENU_STATE_PRINT_TEXT_THEN_FANFARE:
if (!MoveRelearnerRunTextPrinters())
{
PlayFanfare(MUS_FANFA1);
sMoveRelearnerStruct->state = MENU_STATE_WAIT_FOR_FANFARE;
}
break;
case MENU_STATE_WAIT_FOR_FANFARE:
if (IsFanfareTaskInactive())
{
sMoveRelearnerStruct->state = MENU_STATE_WAIT_FOR_A_BUTTON;
}
break;
case MENU_STATE_WAIT_FOR_A_BUTTON:
if (gMain.newKeys & A_BUTTON)
{
PlaySE(SE_SELECT);
sMoveRelearnerStruct->state = MENU_STATE_FADE_AND_RETURN;
}
break;
}
}
static void FreeMoveRelearnerResources(void)
{
RemoveScrollArrows();
DestroyListMenuTask(sMoveRelearnerStruct->moveListMenuTask, &sMoveRelearnerMenuSate.listOffset, &sMoveRelearnerMenuSate.listRow);
FreeAllWindowBuffers();
FREE_AND_SET_NULL(sMoveRelearnerStruct);
ResetSpriteData();
FreeAllSpritePalettes();
}
// Note: The hearts are already made invisible by MoveRelearnerShowHideHearts,
// which is called whenever the cursor in either list changes.
static void HideHeartSpritesAndShowTeachMoveText(bool8 onlyHideSprites)
{
s32 i;
for (i = 0; i < 16; i++)
{
gSprites[sMoveRelearnerStruct->heartSpriteIds[i]].invisible = TRUE;
}
if (!onlyHideSprites)
{
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
FillWindowPixelBuffer(3, 0x11);
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
}
}
static void HandleInput(bool8 showContest)
{
s32 itemId = ListMenu_ProcessInput(sMoveRelearnerStruct->moveListMenuTask);
ListMenuGetScrollAndRow(sMoveRelearnerStruct->moveListMenuTask, &sMoveRelearnerMenuSate.listOffset, &sMoveRelearnerMenuSate.listRow);
switch (itemId)
{
case LIST_NOTHING_CHOSEN:
if (!(gMain.newKeys & (DPAD_LEFT | DPAD_RIGHT)) && !GetLRKeysState())
{
break;
}
PlaySE(SE_SELECT);
if (showContest == FALSE)
{
PutWindowTilemap(1);
sMoveRelearnerStruct->state = MENU_STATE_SETUP_CONTEST_MODE;
sMoveRelearnerMenuSate.showContestInfo = TRUE;
}
else
{
PutWindowTilemap(0);
sMoveRelearnerStruct->state = MENU_STATE_SETUP_BATTLE_MODE;
sMoveRelearnerMenuSate.showContestInfo = FALSE;
}
schedule_bg_copy_tilemap_to_vram(1);
MoveRelearnerShowHideHearts(GetCurrentSelectedMove());
break;
case LIST_CANCEL:
PlaySE(SE_SELECT);
RemoveScrollArrows();
sMoveRelearnerStruct->state = MENU_STATE_PRINT_GIVE_UP_PROMPT;
StringExpandPlaceholders(gStringVar4, gText_MoveRelearnerGiveUp);
MoveRelearnerPrintText(gStringVar4);
break;
default:
PlaySE(SE_SELECT);
RemoveScrollArrows();
sMoveRelearnerStruct->state = MENU_STATE_PRINT_TEACH_MOVE_PROMPT;
StringCopy(gStringVar2, gMoveNames[itemId]);
StringExpandPlaceholders(gStringVar4, gText_MoveRelearnerTeachMoveConfirm);
MoveRelearnerPrintText(gStringVar4);
break;
}
}
static s32 GetCurrentSelectedMove(void)
{
return sMoveRelearnerStruct->menuItems[sMoveRelearnerMenuSate.listRow + sMoveRelearnerMenuSate.listOffset].id;
}
// Theory: This used to make the heart sprites visible again (i.e.
// this was the inverse of HideHeartsAndShowTeachMoveText), but the
// code was commented out. The bool argument would have been named
// "justShowHearts." The code for showing/hiding the heards was moved
// to MoveRelearnerShowHideHearts, which is called whenever a new move is
// selected and whenever the display mode changes.
static void ShowTeachMoveText(bool8 shouldDoNothingInstead)
{
if (shouldDoNothingInstead == FALSE)
{
StringExpandPlaceholders(gStringVar4, gText_TeachWhichMoveToPkmn);
FillWindowPixelBuffer(3, 0x11);
AddTextPrinterParameterized(3, 1, gStringVar4, 0, 1, 0, NULL);
}
}
static void CreateUISprites(void)
{
int i;
sMoveRelearnerStruct->moveDisplayArrowTask = 0xFF;
sMoveRelearnerStruct->moveListScrollArrowTask = 0xFF;
AddScrollArrows();
// These are the appeal hearts.
for (i = 0; i < 8; i++)
{
sMoveRelearnerStruct->heartSpriteIds[i] = CreateSprite(&sConstestMoveHeartSprite, (i - (i / 4) * 4) * 8 + 104, (i / 4) * 8 + 36, 0);
}
// These are the jam harts.
// The animation is used to toggle between full/empty heart sprites.
for (i = 0; i < 8; i++)
{
sMoveRelearnerStruct->heartSpriteIds[i + 8] = CreateSprite(&sConstestMoveHeartSprite, (i - (i / 4) * 4) * 8 + 104, (i / 4) * 8 + 52, 0);
StartSpriteAnim(&gSprites[sMoveRelearnerStruct->heartSpriteIds[i + 8]], 2);
}
for (i = 0; i < 16; i++)
{
gSprites[sMoveRelearnerStruct->heartSpriteIds[i]].invisible = TRUE;
}
}
static void AddScrollArrows(void)
{
if (sMoveRelearnerStruct->moveDisplayArrowTask == 0xFF)
{
sMoveRelearnerStruct->moveDisplayArrowTask = AddScrollIndicatorArrowPair(&sDisplayModeArrowsTemplate, &sMoveRelearnerStruct->scrollOffset);
}
if (sMoveRelearnerStruct->moveListScrollArrowTask == 0xFF)
{
gTempScrollArrowTemplate = sMoveListScrollArrowsTemplate;
gTempScrollArrowTemplate.fullyDownThreshold = sMoveRelearnerStruct->numMenuChoices - sMoveRelearnerStruct->numToShowAtOnce;
sMoveRelearnerStruct->moveListScrollArrowTask = AddScrollIndicatorArrowPair(&gTempScrollArrowTemplate, &sMoveRelearnerMenuSate.listOffset);
}
}
static void RemoveScrollArrows(void)
{
if (sMoveRelearnerStruct->moveDisplayArrowTask != 0xFF)
{
RemoveScrollIndicatorArrowPair(sMoveRelearnerStruct->moveDisplayArrowTask);
sMoveRelearnerStruct->moveDisplayArrowTask = 0xFF;
}
if (sMoveRelearnerStruct->moveListScrollArrowTask != 0xFF)
{
RemoveScrollIndicatorArrowPair(sMoveRelearnerStruct->moveListScrollArrowTask);
sMoveRelearnerStruct->moveListScrollArrowTask = 0xFF;
}
}
static void CreateLearnableMovesList(void)
{
s32 i;
u8 nickname[POKEMON_NAME_LENGTH + 1];
sMoveRelearnerStruct->numMenuChoices = GetMoveRelearnerMoves(&gPlayerParty[sMoveRelearnerStruct->partyMon], sMoveRelearnerStruct->movesToLearn);
for (i = 0; i < sMoveRelearnerStruct->numMenuChoices; i++)
{
sMoveRelearnerStruct->menuItems[i].name = gMoveNames[sMoveRelearnerStruct->movesToLearn[i]];
sMoveRelearnerStruct->menuItems[i].id = sMoveRelearnerStruct->movesToLearn[i];
}
GetMonData(&gPlayerParty[sMoveRelearnerStruct->partyMon], MON_DATA_NICKNAME, nickname);
StringCopy10(gStringVar1, nickname);
sMoveRelearnerStruct->menuItems[sMoveRelearnerStruct->numMenuChoices].name = gText_Cancel;
sMoveRelearnerStruct->menuItems[sMoveRelearnerStruct->numMenuChoices].id = LIST_CANCEL;
sMoveRelearnerStruct->numMenuChoices++;
sMoveRelearnerStruct->numToShowAtOnce = LoadMoveRelearnerMovesList(sMoveRelearnerStruct->menuItems, sMoveRelearnerStruct->numMenuChoices);
}
void MoveRelearnerShowHideHearts(s32 moveId)
{
u16 numHearts;
u16 i;
if (!sMoveRelearnerMenuSate.showContestInfo || moveId == LIST_CANCEL)
{
for (i = 0; i < 16; i++)
{
gSprites[sMoveRelearnerStruct->heartSpriteIds[i]].invisible = TRUE;
}
}
else
{
numHearts = (u8)(gContestEffects[gContestMoves[moveId].effect].appeal / 10);
if (numHearts == 0xFF)
{
numHearts = 0;
}
for (i = 0; i < 8; i++)
{
if (i < numHearts)
{
StartSpriteAnim(&gSprites[sMoveRelearnerStruct->heartSpriteIds[i]], 1);
}
else
{
StartSpriteAnim(&gSprites[sMoveRelearnerStruct->heartSpriteIds[i]], 0);
}
gSprites[sMoveRelearnerStruct->heartSpriteIds[i]].invisible = FALSE;
}
numHearts = (u8)(gContestEffects[gContestMoves[moveId].effect].jam / 10);
if (numHearts == 0xFF)
{
numHearts = 0;
}
for (i = 0; i < 8; i++)
{
if (i < numHearts)
{
StartSpriteAnim(&gSprites[sMoveRelearnerStruct->heartSpriteIds[i + 8]], 3);
}
else
{
StartSpriteAnim(&gSprites[sMoveRelearnerStruct->heartSpriteIds[i + 8]], 2);
}
gSprites[sMoveRelearnerStruct->heartSpriteIds[i + 8]].invisible = FALSE;
}
}
}
+1692
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -1910,10 +1910,10 @@ const struct OamData gOamData_858BFEC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -1927,10 +1927,10 @@ const struct OamData gOamData_858BFF4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -1944,10 +1944,10 @@ const struct OamData gOamData_858BFFC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x16),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+3 -4
View File
@@ -41,12 +41,11 @@
#include "secret_base.h"
#include "player_pc.h"
#include "field_specials.h"
#include "berry_powder.h"
#include "mevent.h"
#include "union_room_chat.h"
extern void copy_strings_to_sav1(void);
extern void sub_801AFD8(void);
extern void ResetPokeJumpResults(void);
extern void SetBerryPowder(u32* powder, u32 newValue);
extern const u8 EventScript_ResetAllMapFlags[];
+1 -1
View File
@@ -1688,7 +1688,7 @@ void CB2_ReturnToFieldContinueScript(void)
void CB2_ReturnToFieldContinueScriptPlayMapMusic(void)
{
FieldClearVBlankHBlankCallbacks();
gFieldCallback = sub_80AF168;
gFieldCallback = FieldCallback_ReturnToEventScript2;
CB2_ReturnToField();
}
+14 -13
View File
@@ -37,18 +37,19 @@
#include "main.h"
#include "menu.h"
#include "menu_helpers.h"
#include "menu_specialized.h"
#include "metatile_behavior.h"
#include "overworld.h"
#include "palette.h"
#include "party_menu.h"
#include "player_pc.h"
#include "pokemon.h"
#include "pokemon_icon.h"
#include "pokemon_storage_system.h"
#include "pokemon_summary_screen.h"
#include "pokenav.h"
#include "region_map.h"
#include "reshow_battle_screen.h"
#include "rom_8011DC0.h"
#include "union_room.h"
#include "scanline_effect.h"
#include "script.h"
#include "sound.h"
@@ -1175,10 +1176,10 @@ static const struct OamData gOamData_83765EC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -1231,10 +1232,10 @@ static const struct OamData sOamData_8615ED8 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -1287,10 +1288,10 @@ static const struct OamData sOamData_8615F20 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -1366,10 +1367,10 @@ static const struct OamData sOamData_8615F90 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x8),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(32x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -6006,7 +6007,7 @@ static void sub_81B767C(u8 taskId)
s16 *arrayPtr = gUnknown_0203CEC4->data;
arrayPtr[12] = sub_81B3364();
sub_81D3640(arrayPtr[12], arrayPtr, &arrayPtr[6], 1, 2, 3);
DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], 1, 2, 3);
CopyWindowToVram(arrayPtr[12], 2);
schedule_bg_copy_tilemap_to_vram(2);
}
@@ -6015,7 +6016,7 @@ static void sub_81B76C8(u8 taskId)
{
s16 *arrayPtr = gUnknown_0203CEC4->data;
sub_81D3784(arrayPtr[12], &arrayPtr[6], 1, 2, 3);
DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], 1, 2, 3);
CopyWindowToVram(arrayPtr[12], 2);
schedule_bg_copy_tilemap_to_vram(2);
}
@@ -7288,7 +7289,7 @@ static void sub_81B9640(u8 taskId)
void sub_81B968C(void)
{
ShowPokemonSummaryScreen(PSS_MODE_SELECT_MOVE, gPlayerParty, gSpecialVar_0x8004, gPlayerPartyCount - 1, CB2_ReturnToField);
gFieldCallback = sub_80AF168;
gFieldCallback = FieldCallback_ReturnToEventScript2;
}
void sub_81B96D0(void)
+4 -4
View File
@@ -20,7 +20,6 @@
#include "overworld.h"
#include "palette.h"
#include "party_menu.h"
#include "pokenav.h"
#include "player_pc.h"
#include "script.h"
#include "sound.h"
@@ -29,6 +28,7 @@
#include "strings.h"
#include "task.h"
#include "window.h"
#include "menu_specialized.h"
// structures
struct Struct203BCC4
@@ -645,7 +645,7 @@ static void Mailbox_ProcessInput(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
PlaySE(SE_SELECT);
RemoveScrollIndicatorArrowPair(playerPCItemPageInfo.scrollIndicatorId);
Mailbox_ReturnToPlayerPC(taskId);
@@ -1151,7 +1151,7 @@ static void ItemStorage_ProcessInput(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
PlaySE(SE_SELECT);
ItemStorage_GoBackToPlayerPCMenu(taskId);
break;
@@ -1226,7 +1226,7 @@ static void sub_816C4FC(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
if (gMain.newKeys & A_BUTTON)
{
ItemStorage_DoItemSwap(taskId, FALSE);
+2 -2
View File
@@ -99,10 +99,10 @@ static const struct OamData sBallOamData =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
+7 -7
View File
@@ -222,10 +222,10 @@ static const struct OamData sOamData_PokeblockCase =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -709,7 +709,7 @@ static void HandlePokeblockListMenuItems(void)
StringCopy(sPokeblockMenu->menuItemsStrings[i], gText_StowCase);
sPokeblockMenu->items[i].name = sPokeblockMenu->menuItemsStrings[i];
sPokeblockMenu->items[i].id = LIST_B_PRESSED;
sPokeblockMenu->items[i].id = LIST_CANCEL;
gMultiuseListMenuTemplate = sPokeblockListMenuTemplate;
gMultiuseListMenuTemplate.fontId = 7;
@@ -751,7 +751,7 @@ static void sub_8135FCC(s32 pkblId)
FillWindowPixelBuffer(7, PIXEL_FILL(0));
if (pkblId != LIST_B_PRESSED)
if (pkblId != LIST_CANCEL)
{
pokeblock = &gSaveBlock1Ptr->pokeblocks[pkblId];
rectTilemapSrc[0] = 0x17;
@@ -959,7 +959,7 @@ static void Task_FreeDataAndExitPokeblockCase(u8 taskId)
if (!gPaletteFade.active)
{
if (sPokeblockMenu->caseId == PBLOCK_CASE_FEEDER || sPokeblockMenu->caseId == PBLOCK_CASE_GIVE)
gFieldCallback = sub_80AF168;
gFieldCallback = FieldCallback_ReturnToEventScript2;
DestroyListMenuTask(data[0], &sSavedPokeblockData.lastItemPage, &sSavedPokeblockData.lastItemPos);
sub_8136418();
@@ -1011,7 +1011,7 @@ static void Task_HandlePokeblockMenuInput(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
PlaySE(SE_SELECT);
gSpecialVar_Result = 0xFFFF;
gSpecialVar_ItemId = 0;
@@ -1066,7 +1066,7 @@ static void Task_HandlePokeblocksSwapInput(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED: // same id as STOW CASE field
case LIST_CANCEL: // same id as STOW CASE field
PlaySE(SE_SELECT);
if (gMain.newKeys & A_BUTTON)
HandlePokeblocksSwap(taskId, FALSE);
+2 -2
View File
@@ -463,10 +463,10 @@ static const struct OamData sThrownPokeblockOamData =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
+12 -12
View File
@@ -248,10 +248,10 @@ static const struct OamData sOamData_855CFE4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -265,10 +265,10 @@ static const struct OamData sOamData_855CFEC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = ST_OAM_H_RECTANGLE,
.shape = SPRITE_SHAPE(16x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(16x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -282,10 +282,10 @@ static const struct OamData sOamData_855CFF4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = ST_OAM_H_RECTANGLE,
.shape = SPRITE_SHAPE(32x16),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -299,10 +299,10 @@ static const struct OamData sOamData_855CFFC =
.objMode = 2,
.mosaic = 0,
.bpp = 0,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -316,10 +316,10 @@ static const struct OamData sOamData_855D004 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = ST_OAM_H_RECTANGLE,
.shape = SPRITE_SHAPE(64x32),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x32),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -333,10 +333,10 @@ static const struct OamData sOamData_855D00C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = ST_OAM_V_RECTANGLE,
.shape = SPRITE_SHAPE(8x16),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+32 -14
View File
@@ -83,14 +83,21 @@ static const u32 sAreaGlow_Gfx[] = INCBIN_U32("graphics/pokedex/area_glow.4bpp.l
static const u16 sSpeciesHiddenFromAreaScreen[] = { SPECIES_WYNAUT };
static const u16 sMovingRegionMapSections[3] = { MAPSEC_MARINE_CAVE, MAPSEC_UNDERWATER_MARINE_CAVE, MAPSEC_TERRA_CAVE };
static const u16 sMovingRegionMapSections[3] =
{
MAPSEC_MARINE_CAVE,
MAPSEC_UNDERWATER_MARINE_CAVE,
MAPSEC_TERRA_CAVE
};
static const u16 sFeebasData[][3] = {
static const u16 sFeebasData[][3] =
{
{SPECIES_FEEBAS, MAP_GROUP(ROUTE119), MAP_NUM(ROUTE119)},
{NUM_SPECIES}
};
static const u16 sLandmarkData[][2] = {
static const u16 sLandmarkData[][2] =
{
{MAPSEC_SKY_PILLAR, FLAG_LANDMARK_SKY_PILLAR},
{MAPSEC_SEAFLOOR_CAVERN, FLAG_LANDMARK_SEAFLOOR_CAVERN},
{MAPSEC_ALTERING_CAVE_2, FLAG_LANDMARK_ALTERING_CAVE},
@@ -100,7 +107,8 @@ static const u16 sLandmarkData[][2] = {
{MAPSEC_NONE}
};
static const u8 sAreaGlowTilemapMapping[] = {
static const u8 sAreaGlowTilemapMapping[] =
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x11, 0x20, 0x02, 0x03, 0x27, 0x2d, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x12, 0x21, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x2a, 0x2e, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
@@ -119,7 +127,8 @@ static const u8 sAreaGlowTilemapMapping[] = {
0x1f, 0x22, 0x25, 0x03, 0x28, 0x2d, 0x2c, 0x07, 0x2b, 0x2e, 0x2f, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
};
static const struct UnkStruct_1C4D70 sUnknown_085B4018 = {
static const struct UnkStruct_1C4D70 sUnknown_085B4018 =
{
.bg = 3,
.unk2 = 0,
.unk10 = 0,
@@ -127,21 +136,26 @@ static const struct UnkStruct_1C4D70 sUnknown_085B4018 = {
};
static const u8 sAreaMarkerTiles[];
static const struct SpriteSheet sAreaMarkerSpriteSheet = {
static const struct SpriteSheet sAreaMarkerSpriteSheet =
{
sAreaMarkerTiles, 0x80, 2
};
static const u16 sAreaMarkerPalette[];
static const struct SpritePalette sAreaMarkerSpritePalette = {
static const struct SpritePalette sAreaMarkerSpritePalette =
{
sAreaMarkerPalette, 2
};
static const struct OamData sAreaMarkerOamData = {
.size = 1,
static const struct OamData sAreaMarkerOamData =
{
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 1
};
static const struct SpriteTemplate sAreaMarkerSpriteTemplate = {
static const struct SpriteTemplate sAreaMarkerSpriteTemplate =
{
2,
2,
&sAreaMarkerOamData,
@@ -154,16 +168,20 @@ static const struct SpriteTemplate sAreaMarkerSpriteTemplate = {
static const u16 sAreaMarkerPalette[] = INCBIN_U16("graphics/pokedex/area_marker.gbapal");
static const u8 sAreaMarkerTiles[] = INCBIN_U8("graphics/pokedex/area_marker.4bpp");
static const struct SpritePalette sAreaUnknownSpritePalette = {
static const struct SpritePalette sAreaUnknownSpritePalette =
{
gPokedexAreaScreenAreaUnknown_Pal, 3
};
static const struct OamData sAreaUnknownOamData = {
.size = 2,
static const struct OamData sAreaUnknownOamData =
{
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 1
};
static const struct SpriteTemplate sAreaUnknownSpriteTemplate = {
static const struct SpriteTemplate sAreaUnknownSpriteTemplate =
{
3,
3,
&sAreaUnknownOamData,
+18 -9
View File
@@ -54,7 +54,8 @@ const u16 gUnknown_085B8378[] = INCBIN_U16("graphics/pokedex/cry_meter_map.bin")
const u16 gUnknown_085B8418[] = INCBIN_U16("graphics/pokedex/cry_meter.gbapal");
const u8 gUnknown_085B8438[] = INCBIN_U8("graphics/pokedex/cry_meter.4bpp.lz");
const u16 gUnknown_085B8770[][72] = {
const u16 gUnknown_085B8770[][72] =
{
{
0x0000, 0x0004, 0x0008, 0x000C, 0x0010, 0x0014, 0x0018, 0x001C,
0x0400, 0x0404, 0x0408, 0x040C, 0x0410, 0x0414, 0x0418, 0x041C,
@@ -142,7 +143,8 @@ const u16 gUnknown_085B8BF0[] = INCBIN_U16("graphics/pokedex/85B8C10.gbapal");
const u8 gUnknown_085B8C10[] = INCBIN_U8("graphics/pokedex/85B8C10.4bpp");
const u8 gUnknown_085B8C30[] = {0xF0, 0x0F};
const u8 gUnknown_085B8C32[][16] = {
const u8 gUnknown_085B8C32[][16] =
{
{
0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
@@ -152,23 +154,28 @@ const u8 gUnknown_085B8C32[][16] = {
}
};
const union AnimCmd gSpriteAnim_85B8C54[] = {
const union AnimCmd gSpriteAnim_85B8C54[] =
{
ANIMCMD_FRAME(0, 30),
ANIMCMD_END
};
const union AnimCmd *const gSpriteAnimTable_85B8C5C[] = {
const union AnimCmd *const gSpriteAnimTable_85B8C5C[] =
{
gSpriteAnim_85B8C54
};
const struct OamData gOamData_85B8C60 = {
const struct OamData gOamData_85B8C60 =
{
.y = 160,
.affineMode = ST_OAM_AFFINE_NORMAL,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 1
};
const struct SpriteTemplate gUnknown_085B8C68 = {
const struct SpriteTemplate gUnknown_085B8C68 =
{
0x2000,
0x2000,
&gOamData_85B8C60,
@@ -178,12 +185,14 @@ const struct SpriteTemplate gUnknown_085B8C68 = {
sub_814596C
};
const struct SpriteSheet gCryMeterNeedleSpriteSheets[] = {
const struct SpriteSheet gCryMeterNeedleSpriteSheets[] =
{
{CryMeterNeedleTiles, 0x800, 0x2000},
{}
};
const struct SpritePalette gCryMeterNeedleSpritePalettes[] = {
const struct SpritePalette gCryMeterNeedleSpritePalettes[] =
{
{CryMeterNeedlePalette, 0x2000},
{}
};
+3 -2
View File
@@ -2,6 +2,7 @@
#include "alloc.h"
#include "apprentice.h"
#include "battle.h"
#include "battle_anim.h"
#include "battle_controllers.h"
#include "battle_message.h"
#include "battle_pike.h"
@@ -2462,10 +2463,10 @@ static const struct OamData sOamData_8329F20 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+2 -2
View File
@@ -931,10 +931,10 @@ const struct OamData sMonIconOamData =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
+19 -16
View File
@@ -969,10 +969,10 @@ static const struct OamData sOamData_857286C =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -986,10 +986,10 @@ static const struct OamData sOamData_8572874 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(16x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(16x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -1062,10 +1062,10 @@ static const struct OamData sOamData_85728EC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
@@ -1467,8 +1467,8 @@ static const struct SpriteSheet gUnknown_0857B080 = {gPCGfx_Arrow, 0x80, 6};
static const struct OamData gOamData_83BB298 =
{
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 2
};
@@ -1503,7 +1503,8 @@ static const struct SpriteTemplate gSpriteTemplate_857B0A8 =
static const struct OamData gOamData_83BB2D0 =
{
.shape = ST_OAM_V_RECTANGLE,
.shape = SPRITE_SHAPE(8x16),
.size = SPRITE_SIZE(8x16),
.priority = 2
};
@@ -2004,7 +2005,7 @@ static void sub_80C7958(u8 curBox)
u8 spriteId;
struct SpriteTemplate template;
struct OamData oamData = {};
oamData.size = 3;
oamData.size = SPRITE_SIZE(64x64);
oamData.paletteNum = 1;
template = (struct SpriteTemplate){
0, 0, &oamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
@@ -2017,8 +2018,8 @@ static void sub_80C7958(u8 curBox)
spriteId = CreateSprite(&template, 160, 96, 0);
gUnknown_02039D04->unk_0000 = gSprites + spriteId;
oamData.shape = ST_OAM_V_RECTANGLE;
oamData.size = 1;
oamData.shape = SPRITE_SHAPE(8x32);
oamData.size = SPRITE_SIZE(8x32);
template.tileTag = gUnknown_02039D04->unk_0240 + 1;
template.anims = sSpriteAnimTable_8571710;
for (i = 0; i < 4; i++)
@@ -8490,12 +8491,14 @@ static void sub_80CFC14(void)
static const struct OamData sOamData_857BA0C =
{
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 1,
};
static const struct OamData sOamData_857BA14 =
{
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 1,
};
@@ -9358,10 +9361,10 @@ static const struct OamData sOamData_857BBA4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
+6 -6
View File
@@ -710,10 +710,10 @@ static const struct OamData sOamData_MoveTypes =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x16),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x16),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -886,10 +886,10 @@ static const struct OamData gOamData_861CFF4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 1,
.paletteNum = 0,
@@ -975,10 +975,10 @@ static const struct OamData sOamData_StatusCondition =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x8),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(32x8),
.tileNum = 0,
.priority = 3,
.paletteNum = 0,
+16 -16
View File
@@ -105,10 +105,10 @@ static const struct OamData sOamData_862A6BC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -122,10 +122,10 @@ static const struct OamData sOamData_862A6C4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -139,10 +139,10 @@ static const struct OamData sOamData_862A6CC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(64x32),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x32),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -156,10 +156,10 @@ static const struct OamData sOamData_862A6D4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x16),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x16),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -173,10 +173,10 @@ static const struct OamData sOamData_862A6DC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(16x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(16x8),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -190,10 +190,10 @@ static const struct OamData sOamData_862A6E4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 2,
.shape = SPRITE_SHAPE(16x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(16x32),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -207,10 +207,10 @@ static const struct OamData sOamData_862A6EC =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
@@ -224,10 +224,10 @@ static const struct OamData sOamData_862A6F4 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 1,
.shape = SPRITE_SHAPE(32x8),
.x = 0,
.matrixNum = 0,
.size = 1,
.size = SPRITE_SIZE(32x8),
.tileNum = 0,
.priority = 2,
.paletteNum = 0,
+1
View File
@@ -1,5 +1,6 @@
#include "global.h"
#include "battle.h"
#include "battle_anim.h"
#include "recorded_battle.h"
#include "main.h"
#include "pokemon.h"
+164 -66
View File
@@ -36,6 +36,13 @@
// Static type declarations
struct FlagControlledFlyDest
{
const u8 *const *name;
u16 mapSecId;
u16 flag;
};
// Static RAM declarations
static EWRAM_DATA struct RegionMap *gRegionMap = NULL;
@@ -106,7 +113,8 @@ static const u8 sRegionMap_MapSectionLayout[] = INCBIN_U8("graphics/pokenav/regi
#include "data/region_map/region_map_entries.h"
static const u16 sRegionMap_SpecialPlaceLocations[][2] = {
static const u16 sRegionMap_SpecialPlaceLocations[][2] =
{
{MAPSEC_UNDERWATER_TERRA_CAVE, MAPSEC_ROUTE_105},
{MAPSEC_UNDERWATER_124, MAPSEC_ROUTE_124},
{MAPSEC_UNDERWATER_UNK1, MAPSEC_ROUTE_129},
@@ -133,13 +141,15 @@ static const u16 sRegionMap_SpecialPlaceLocations[][2] = {
{MAPSEC_NONE, MAPSEC_NONE}
};
static const u16 sRegionMap_MarineCaveMapSecIds[] = {
static const u16 sRegionMap_MarineCaveMapSecIds[] =
{
MAPSEC_MARINE_CAVE,
MAPSEC_UNDERWATER_MARINE_CAVE,
MAPSEC_UNDERWATER_MARINE_CAVE
};
static const u16 sTerraCaveMapSectionIds[] = {
static const u16 sTerraCaveMapSectionIds[] =
{
MAPSEC_ROUTE_114,
MAPSEC_ROUTE_114,
MAPSEC_ROUTE_115,
@@ -158,7 +168,8 @@ static const u16 sTerraCaveMapSectionIds[] = {
MAPSEC_ROUTE_129
};
static const struct UCoords16 sTerraCaveLocationCoords[] = {
static const struct UCoords16 sTerraCaveLocationCoords[] =
{
{0x00, 0x0a},
{0x00, 0x0c},
{0x18, 0x03},
@@ -169,21 +180,27 @@ static const struct UCoords16 sTerraCaveLocationCoords[] = {
{0x18, 0x0a}
};
static const u8 sRegionMap_MapSecAquaHideoutOld[] = {
static const u8 sRegionMap_MapSecAquaHideoutOld[] =
{
MAPSEC_AQUA_HIDEOUT_OLD
};
static const struct OamData sRegionMapCursorOam = {
.size = 1, .priority = 1
static const struct OamData sRegionMapCursorOam =
{
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 1
};
static const union AnimCmd sRegionMapCursorAnim1[] = {
static const union AnimCmd sRegionMapCursorAnim1[] =
{
ANIMCMD_FRAME(0, 20),
ANIMCMD_FRAME(4, 20),
ANIMCMD_JUMP(0)
};
static const union AnimCmd sRegionMapCursorAnim2[] = {
static const union AnimCmd sRegionMapCursorAnim2[] =
{
ANIMCMD_FRAME( 0, 10),
ANIMCMD_FRAME(16, 10),
ANIMCMD_FRAME(32, 10),
@@ -191,37 +208,49 @@ static const union AnimCmd sRegionMapCursorAnim2[] = {
ANIMCMD_JUMP(0)
};
static const union AnimCmd *const sRegionMapCursorAnimTable[] = {
static const union AnimCmd *const sRegionMapCursorAnimTable[] =
{
sRegionMapCursorAnim1,
sRegionMapCursorAnim2
};
static const struct SpritePalette sRegionMapCursorSpritePalette = { sRegionMapCursorPal, 0 };
static const struct SpriteTemplate sRegionMapCursorSpriteTemplate = {
0,
0,
&sRegionMapCursorOam,
sRegionMapCursorAnimTable,
NULL,
gDummySpriteAffineAnimTable,
SpriteCallback_CursorFull
static const struct SpritePalette sRegionMapCursorSpritePalette =
{
.data = sRegionMapCursorPal,
.tag = 0
};
static const struct OamData sRegionMapPlayerIconOam = {
.size = 1, .priority = 2
static const struct SpriteTemplate sRegionMapCursorSpriteTemplate =
{
.tileTag = 0,
.paletteTag = 0,
.oam = &sRegionMapCursorOam,
.anims = sRegionMapCursorAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallback_CursorFull
};
static const union AnimCmd sRegionMapPlayerIconAnim1[] = {
static const struct OamData sRegionMapPlayerIconOam =
{
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2
};
static const union AnimCmd sRegionMapPlayerIconAnim1[] =
{
ANIMCMD_FRAME(0, 5),
ANIMCMD_END
};
static const union AnimCmd *const sRegionMapPlayerIconAnimTable[] = {
static const union AnimCmd *const sRegionMapPlayerIconAnimTable[] =
{
sRegionMapPlayerIconAnim1
};
static const u8 sRegionMapEventSectionIds[] = {
static const u8 sRegionMapEventSectionIds[] =
{
MAPSEC_BIRTH_ISLAND_2,
MAPSEC_FARAWAY_ISLAND,
MAPSEC_NAVEL_ROCK2
@@ -237,7 +266,8 @@ static const u16 Unknown_085A1D48[] = INCBIN_U16("graphics/pokenav/fly_target_ic
static const u32 sUnknown_085A1D68[] = INCBIN_U32("graphics/pokenav/fly_target_icons.4bpp.lz");
static const u8 sMapHealLocations[][3] = {
static const u8 sMapHealLocations[][3] =
{
{MAP_GROUP(LITTLEROOT_TOWN), MAP_NUM(LITTLEROOT_TOWN), HEAL_LOCATION_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F},
{MAP_GROUP(OLDALE_TOWN), MAP_NUM(OLDALE_TOWN), HEAL_LOCATION_OLDALE_TOWN},
{MAP_GROUP(DEWFORD_TOWN), MAP_NUM(DEWFORD_TOWN), HEAL_LOCATION_DEWFORD_TOWN},
@@ -290,83 +320,150 @@ static const u8 sMapHealLocations[][3] = {
{MAP_GROUP(ROUTE134), MAP_NUM(ROUTE134), 0}
};
static const u8 *const gUnknown_085A1ED4[] = {
static const u8 *const gUnknown_085A1ED4[] =
{
gText_PokemonLeague,
gText_PokemonCenter
};
static const struct {
const u8 *const *name;
u16 mapSecId;
u16 flag;
} gUnknown_085A1EDC[] = {
gUnknown_085A1ED4,
MAPSEC_EVER_GRANDE_CITY,
FLAG_LANDMARK_POKEMON_LEAGUE
static const struct FlagControlledFlyDest gUnknown_085A1EDC[] =
{
{
.name = gUnknown_085A1ED4,
.mapSecId = MAPSEC_EVER_GRANDE_CITY,
.flag = FLAG_LANDMARK_POKEMON_LEAGUE
}
};
static const struct BgTemplate gUnknown_085A1EE4[] = {
{ .bg = 0, .charBaseIndex = 0, .mapBaseIndex = 31, .screenSize = 0, .paletteMode = 0, .priority = 0 },
{ .bg = 1, .charBaseIndex = 3, .mapBaseIndex = 30, .screenSize = 0, .paletteMode = 0, .priority = 1 },
{ .bg = 2, .charBaseIndex = 2, .mapBaseIndex = 28, .screenSize = 2, .paletteMode = 1, .priority = 2 }
static const struct BgTemplate gUnknown_085A1EE4[] =
{
{
.bg = 0,
.charBaseIndex = 0,
.mapBaseIndex = 31,
.screenSize = 0,
.paletteMode = 0,
.priority = 0
},
{
.bg = 1,
.charBaseIndex = 3,
.mapBaseIndex = 30,
.screenSize = 0,
.paletteMode = 0,
.priority = 1
},
{
.bg = 2,
.charBaseIndex = 2,
.mapBaseIndex = 28,
.screenSize = 2,
.paletteMode = 1,
.priority = 2
}
};
static const struct WindowTemplate gUnknown_085A1EF0[] = {
{ 0, 17, 17, 12, 2, 15, 0x01 },
{ 0, 17, 15, 12, 4, 15, 0x19 },
{ 0, 1, 18, 14, 2, 15, 0x49 },
static const struct WindowTemplate gUnknown_085A1EF0[] =
{
{
.bg = 0,
.tilemapLeft = 17,
.tilemapTop = 17,
.width = 12,
.height = 2,
.paletteNum = 15,
.baseBlock = 0x01
},
{
.bg = 0,
.tilemapLeft = 17,
.tilemapTop = 15,
.width = 12,
.height = 4,
.paletteNum = 15,
.baseBlock = 0x19
},
{
.bg = 0,
.tilemapLeft = 1,
.tilemapTop = 18,
.width = 14,
.height = 2,
.paletteNum = 15,
.baseBlock = 0x49
},
DUMMY_WIN_TEMPLATE
};
static const struct SpritePalette gUnknown_085A1F10 = {
Unknown_085A1D48, 2
static const struct SpritePalette gUnknown_085A1F10 =
{
.data = Unknown_085A1D48,
.tag = 2
};
static const u16 sUnknown_085A1F18[][2] = {
{FLAG_LANDMARK_BATTLE_FRONTIER, MAPSEC_BATTLE_FRONTIER},
{-1, MAPSEC_NONE}
static const u16 sUnknown_085A1F18[][2] =
{
{
FLAG_LANDMARK_BATTLE_FRONTIER,
MAPSEC_BATTLE_FRONTIER
},
{
-1,
MAPSEC_NONE
}
};
static const struct OamData gOamData_085A1F20 = {
static const struct OamData gOamData_085A1F20 =
{
.shape = SPRITE_SHAPE(8x8),
.size = SPRITE_SIZE(8x8),
.priority = 2
};
static const union AnimCmd gUnknown_085A1F28[] = {
static const union AnimCmd gUnknown_085A1F28[] =
{
ANIMCMD_FRAME( 0, 5),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085A1F30[] = {
static const union AnimCmd gUnknown_085A1F30[] =
{
ANIMCMD_FRAME( 1, 5),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085A1F38[] = {
static const union AnimCmd gUnknown_085A1F38[] =
{
ANIMCMD_FRAME( 3, 5),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085A1F40[] = {
static const union AnimCmd gUnknown_085A1F40[] =
{
ANIMCMD_FRAME( 5, 5),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085A1F48[] = {
static const union AnimCmd gUnknown_085A1F48[] =
{
ANIMCMD_FRAME( 6, 5),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085A1F50[] = {
static const union AnimCmd gUnknown_085A1F50[] =
{
ANIMCMD_FRAME( 8, 5),
ANIMCMD_END
};
static const union AnimCmd gUnknown_085A1F58[] = {
static const union AnimCmd gUnknown_085A1F58[] =
{
ANIMCMD_FRAME(10, 5),
ANIMCMD_END
};
static const union AnimCmd *const gUnknown_085A1F60[] = {
static const union AnimCmd *const gUnknown_085A1F60[] =
{
gUnknown_085A1F28,
gUnknown_085A1F30,
gUnknown_085A1F38,
@@ -376,14 +473,15 @@ static const union AnimCmd *const gUnknown_085A1F60[] = {
gUnknown_085A1F58
};
static const struct SpriteTemplate gUnknown_085A1F7C = {
2,
2,
&gOamData_085A1F20,
gUnknown_085A1F60,
NULL,
gDummySpriteAffineAnimTable,
SpriteCallbackDummy
static const struct SpriteTemplate gUnknown_085A1F7C =
{
.tileTag = 2,
.paletteTag = 2,
.oam = &gOamData_085A1F20,
.anims = gUnknown_085A1F60,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCallbackDummy
};
// .text
@@ -1679,7 +1777,7 @@ static void sub_8124904(void)
if (sFlyMap->regionMap.iconDrawType > MAPSECTYPE_NONE && sFlyMap->regionMap.iconDrawType <= MAPSECTYPE_BATTLE_FRONTIER)
{
flag = FALSE;
for (i = 0; i < 1; i++)
for (i = 0; i < ARRAY_COUNT(gUnknown_085A1EDC); i++)
{
if (sFlyMap->regionMap.mapSecId == gUnknown_085A1EDC[i].mapSecId)
{
+2 -2
View File
@@ -108,10 +108,10 @@ static const struct OamData sOamData_08510464 =
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = 0,
.shape = SPRITE_SHAPE(8x8),
.x = 0,
.matrixNum = 0,
.size = 0,
.size = SPRITE_SIZE(8x8),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
+4 -4
View File
@@ -236,10 +236,10 @@ static const struct OamData sOamData_RotatingGateLarge =
.objMode = 0,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(64x64),
.x = 0,
.matrixNum = 0,
.size = 3,
.size = SPRITE_SIZE(64x64),
.tileNum = 0,
.priority = 2,
.paletteNum = 2,
@@ -253,10 +253,10 @@ static const struct OamData sOamData_RotatingGateRegular =
.objMode = 0,
.mosaic = 0,
.bpp = ST_OAM_4BPP,
.shape = ST_OAM_SQUARE,
.shape = SPRITE_SHAPE(32x32),
.x = 0,
.matrixNum = 0,
.size = 2,
.size = SPRITE_SIZE(32x32),
.tileNum = 0,
.priority = 2,
.paletteNum = 2,
+181 -111
View File
@@ -1984,7 +1984,7 @@ static void sub_8141E7C(u8 taskId) // end roulette ?
ResetPaletteFade();
ResetSpriteData();
sub_8140418();
gFieldCallback = sub_80AF168;
gFieldCallback = FieldCallback_ReturnToEventScript2;
SetMainCallback2(CB2_ReturnToField);
DestroyTask(taskId);
}
@@ -2311,18 +2311,18 @@ static const u32 RouletteCursorTiles[] = INCBIN_U32("graphics/roulette/cursor.4b
static const struct SpritePalette gUnknown_085B7384[] =
{
{ RouletteSpritePalette_01, 1 },
{ RouletteSpritePalette_02, 2 },
{ RouletteSpritePalette_03, 3 },
{ RouletteSpritePalette_04, 4 },
{ RouletteSpritePalette_05, 5 },
{ RouletteSpritePalette_06, 6 },
{ RouletteSpritePalette_07, 7 },
{ RouletteSpritePalette_08, 8 },
{ RouletteSpritePalette_09, 9 },
{ RouletteSpritePalette_10, 10 },
{ RouletteSpritePalette_11, 11 },
{ RouletteSpritePalette_12, 12 },
{ .data = RouletteSpritePalette_01, .tag = 1 },
{ .data = RouletteSpritePalette_02, .tag = 2 },
{ .data = RouletteSpritePalette_03, .tag = 3 },
{ .data = RouletteSpritePalette_04, .tag = 4 },
{ .data = RouletteSpritePalette_05, .tag = 5 },
{ .data = RouletteSpritePalette_06, .tag = 6 },
{ .data = RouletteSpritePalette_07, .tag = 7 },
{ .data = RouletteSpritePalette_08, .tag = 8 },
{ .data = RouletteSpritePalette_09, .tag = 9 },
{ .data = RouletteSpritePalette_10, .tag = 10 },
{ .data = RouletteSpritePalette_11, .tag = 11 },
{ .data = RouletteSpritePalette_12, .tag = 12 },
{}
};
@@ -2330,8 +2330,8 @@ static const struct OamData gOamData_85B73EC =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 1,
};
@@ -2339,8 +2339,8 @@ static const struct OamData gOamData_85B73F4 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 1,
};
@@ -2349,35 +2349,41 @@ static const struct OamData gOamData_85B73FC =
.y = 60,
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(16x32),
.size = SPRITE_SIZE(16x32),
.priority = 2,
};
static const union AnimCmd gSpriteAnim_85B7404[] = {
static const union AnimCmd gSpriteAnim_85B7404[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_END
};
static const union AnimCmd *const gSpriteAnimTable_85B740C[] = {
static const union AnimCmd *const gSpriteAnimTable_85B740C[] =
{
gSpriteAnim_85B7404
};
static const union AffineAnimCmd gSpriteAffineAnim_85B7410[] = {
static const union AffineAnimCmd gSpriteAffineAnim_85B7410[] =
{
AFFINEANIMCMD_END
};
static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7418[] = {
static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7418[] =
{
gSpriteAffineAnim_85B7410
};
static const struct CompressedSpriteSheet gUnknown_085B741C = {
static const struct CompressedSpriteSheet gUnknown_085B741C =
{
.data = RoulettePokeIcons2Tiles,
.size = 0xC00,
.tag = 0
};
static const union AnimCmd gSpriteAnim_85B7420[] = {
static const union AnimCmd gSpriteAnim_85B7420[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_FRAME(32, 0),
ANIMCMD_FRAME(64, 0),
@@ -2393,67 +2399,82 @@ static const union AnimCmd gSpriteAnim_85B7420[] = {
ANIMCMD_END
};
static const union AnimCmd *const gSpriteAnimTable_85B7458[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7458[] =
{
&gSpriteAnim_85B7420[0]
};
static const union AnimCmd *const gSpriteAnimTable_85B745C[] = {
static const union AnimCmd *const gSpriteAnimTable_85B745C[] =
{
&gSpriteAnim_85B7420[1]
};
static const union AnimCmd *const gSpriteAnimTable_85B7460[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7460[] =
{
&gSpriteAnim_85B7420[2]
};
static const union AnimCmd *const gSpriteAnimTable_85B7464[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7464[] =
{
&gSpriteAnim_85B7420[3]
};
static const union AnimCmd *const gSpriteAnimTable_85B7468[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7468[] =
{
&gSpriteAnim_85B7420[4]
};
static const union AnimCmd *const gSpriteAnimTable_85B746C[] = {
static const union AnimCmd *const gSpriteAnimTable_85B746C[] =
{
&gSpriteAnim_85B7420[5]
};
static const union AnimCmd *const gSpriteAnimTable_85B7470[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7470[] =
{
&gSpriteAnim_85B7420[6]
};
static const union AnimCmd *const gSpriteAnimTable_85B7474[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7474[] =
{
&gSpriteAnim_85B7420[7]
};
static const union AnimCmd *const gSpriteAnimTable_85B7478[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7478[] =
{
&gSpriteAnim_85B7420[8]
};
static const union AnimCmd *const gSpriteAnimTable_85B747C[] = {
static const union AnimCmd *const gSpriteAnimTable_85B747C[] =
{
&gSpriteAnim_85B7420[9]
};
static const union AnimCmd *const gSpriteAnimTable_85B7480[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7480[] =
{
&gSpriteAnim_85B7420[10]
};
static const union AnimCmd *const gSpriteAnimTable_85B7484[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7484[] =
{
&gSpriteAnim_85B7420[11]
};
static const struct CompressedSpriteSheet gUnknown_085B7488 = {
static const struct CompressedSpriteSheet gUnknown_085B7488 =
{
.data = gRouletteHeadersTiles,
.size = 0x1600,
.tag = 4
};
static const struct CompressedSpriteSheet gUnknown_085B7490 = {
static const struct CompressedSpriteSheet gUnknown_085B7490 =
{
.data = RoulettePokeIconsTiles,
.size = 0x400,
.tag = 5
};
static const union AnimCmd gSpriteAnim_85B7498[] = {
static const union AnimCmd gSpriteAnim_85B7498[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_FRAME(16, 0),
ANIMCMD_FRAME(32, 0),
@@ -2468,7 +2489,8 @@ static const union AnimCmd gSpriteAnim_85B7498[] = {
ANIMCMD_END
};
static const union AnimCmd gSpriteAnim_85B74C8[] = {
static const union AnimCmd gSpriteAnim_85B74C8[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_FRAME(4, 0),
ANIMCMD_FRAME(8, 0),
@@ -2476,47 +2498,58 @@ static const union AnimCmd gSpriteAnim_85B74C8[] = {
ANIMCMD_END
};
static const union AnimCmd *const gSpriteAnimTable_85B74DC[] = {
static const union AnimCmd *const gSpriteAnimTable_85B74DC[] =
{
&gSpriteAnim_85B7498[0]
};
static const union AnimCmd *const gSpriteAnimTable_85B74E0[] = {
static const union AnimCmd *const gSpriteAnimTable_85B74E0[] =
{
&gSpriteAnim_85B7498[2]
};
static const union AnimCmd *const gSpriteAnimTable_85B74E4[] = {
static const union AnimCmd *const gSpriteAnimTable_85B74E4[] =
{
&gSpriteAnim_85B7498[4]
};
static const union AnimCmd *const gSpriteAnimTable_85B74E8[] = {
static const union AnimCmd *const gSpriteAnimTable_85B74E8[] =
{
&gSpriteAnim_85B7498[6]
};
static const union AnimCmd *const gSpriteAnimTable_85B74EC[] = {
static const union AnimCmd *const gSpriteAnimTable_85B74EC[] =
{
&gSpriteAnim_85B7498[8]
};
static const union AnimCmd *const gSpriteAnimTable_85B74F0[] = {
static const union AnimCmd *const gSpriteAnimTable_85B74F0[] =
{
&gSpriteAnim_85B7498[9]
};
static const union AnimCmd *const gSpriteAnimTable_85B74F4[] = {
static const union AnimCmd *const gSpriteAnimTable_85B74F4[] =
{
&gSpriteAnim_85B7498[10]
};
static const union AnimCmd *const gSpriteAnimTable_85B74F8[] = {
static const union AnimCmd *const gSpriteAnimTable_85B74F8[] =
{
&gSpriteAnim_85B74C8[0]
};
static const union AnimCmd *const gSpriteAnimTable_85B74FC[] = {
static const union AnimCmd *const gSpriteAnimTable_85B74FC[] =
{
&gSpriteAnim_85B74C8[1]
};
static const union AnimCmd *const gSpriteAnimTable_85B7500[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7500[] =
{
&gSpriteAnim_85B74C8[2]
};
static const union AnimCmd *const gSpriteAnimTable_85B7504[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7504[] =
{
&gSpriteAnim_85B74C8[3]
};
@@ -2747,8 +2780,8 @@ static const struct OamData gOamData_85B7730 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 3,
.shape = SPRITE_SHAPE(64x32),
.size = SPRITE_SIZE(64x32),
.priority = 1,
};
@@ -2756,8 +2789,8 @@ static const struct OamData gOamData_85B7738 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_V_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(8x16),
.size = SPRITE_SIZE(8x16),
.priority = 1,
};
@@ -2765,8 +2798,8 @@ static const struct OamData gOamData_85B7740 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 1,
};
@@ -2774,8 +2807,8 @@ static const struct OamData gOamData_85B7748 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 0,
.shape = SPRITE_SHAPE(16x8),
.size = SPRITE_SIZE(16x8),
.priority = 1,
};
@@ -2809,7 +2842,8 @@ static const struct CompressedSpriteSheet gUnknown_085B7750[] =
{}
};
static const union AnimCmd gSpriteAnim_85B7780[] = {
static const union AnimCmd gSpriteAnim_85B7780[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_FRAME(2, 0),
ANIMCMD_FRAME(4, 0),
@@ -2824,11 +2858,13 @@ static const union AnimCmd gSpriteAnim_85B7780[] = {
//ANIMCMD_END
};
static const union AnimCmd *const gSpriteAnimTable_85B77A8[] = {
static const union AnimCmd *const gSpriteAnimTable_85B77A8[] =
{
gSpriteAnim_85B7780
};
static const union AnimCmd gSpriteAnim_85B77AC[] = {
static const union AnimCmd gSpriteAnim_85B77AC[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_FRAME(8, 0),
ANIMCMD_FRAME(16, 0),
@@ -2837,11 +2873,13 @@ static const union AnimCmd gSpriteAnim_85B77AC[] = {
ANIMCMD_END
};
static const union AnimCmd *const gSpriteAnimTable_85B77C4[] = {
static const union AnimCmd *const gSpriteAnimTable_85B77C4[] =
{
gSpriteAnim_85B77AC
};
static const union AnimCmd gSpriteAnim_85B77C8[] = {
static const union AnimCmd gSpriteAnim_85B77C8[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_FRAME(2, 0),
ANIMCMD_FRAME(4, 0),
@@ -2850,7 +2888,8 @@ static const union AnimCmd gSpriteAnim_85B77C8[] = {
ANIMCMD_END
};
static const union AnimCmd *const gSpriteAnimTable_85B77E0[] = {
static const union AnimCmd *const gSpriteAnimTable_85B77E0[] =
{
gSpriteAnim_85B77C8
};
@@ -2913,8 +2952,8 @@ static const struct OamData gOamData_85B785C =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2,
};
@@ -2924,7 +2963,8 @@ static const struct CompressedSpriteSheet gUnknown_085B7864 = {
.tag = 12
};
static const union AnimCmd gSpriteAnim_85B786C[] = {
static const union AnimCmd gSpriteAnim_85B786C[] =
{
ANIMCMD_FRAME(0, 5),
ANIMCMD_FRAME(4, 5),
ANIMCMD_FRAME(8, 5),
@@ -2932,7 +2972,8 @@ static const union AnimCmd gSpriteAnim_85B786C[] = {
ANIMCMD_JUMP(0)
};
static const union AnimCmd gSpriteAnim_85B7880[] = {
static const union AnimCmd gSpriteAnim_85B7880[] =
{
ANIMCMD_FRAME(0, 10),
ANIMCMD_FRAME(4, 10),
ANIMCMD_FRAME(8, 10),
@@ -2940,7 +2981,8 @@ static const union AnimCmd gSpriteAnim_85B7880[] = {
ANIMCMD_JUMP(0)
};
static const union AnimCmd gSpriteAnim_85B7894[] = {
static const union AnimCmd gSpriteAnim_85B7894[] =
{
ANIMCMD_FRAME(0, 15),
ANIMCMD_FRAME(4, 15),
ANIMCMD_FRAME(8, 15),
@@ -2948,7 +2990,8 @@ static const union AnimCmd gSpriteAnim_85B7894[] = {
ANIMCMD_JUMP(0)
};
static const union AnimCmd gSpriteAnim_85B78A8[] = {
static const union AnimCmd gSpriteAnim_85B78A8[] =
{
ANIMCMD_FRAME(4, 2),
ANIMCMD_FRAME(8, 5),
ANIMCMD_FRAME(4, 5),
@@ -2956,7 +2999,8 @@ static const union AnimCmd gSpriteAnim_85B78A8[] = {
ANIMCMD_END
};
static const union AnimCmd gSpriteAnim_85B78BC[] = {
static const union AnimCmd gSpriteAnim_85B78BC[] =
{
ANIMCMD_FRAME(4, 2),
ANIMCMD_FRAME(0, 4),
ANIMCMD_FRAME(4, 4),
@@ -2965,7 +3009,8 @@ static const union AnimCmd gSpriteAnim_85B78BC[] = {
ANIMCMD_END
};
static const union AnimCmd gSpriteAnim_85B78D4[] = {
static const union AnimCmd gSpriteAnim_85B78D4[] =
{
ANIMCMD_FRAME(0, 2),
ANIMCMD_FRAME(4, 5),
ANIMCMD_FRAME(8, 5),
@@ -2973,12 +3018,14 @@ static const union AnimCmd gSpriteAnim_85B78D4[] = {
ANIMCMD_END
};
static const union AnimCmd gSpriteAnim_85B78E8[] = {
static const union AnimCmd gSpriteAnim_85B78E8[] =
{
ANIMCMD_FRAME(12, 0),
ANIMCMD_END
};
static const union AnimCmd gSpriteAnim_85B78F0[] = {
static const union AnimCmd gSpriteAnim_85B78F0[] =
{
ANIMCMD_FRAME(8, 2),
ANIMCMD_FRAME(4, 5),
ANIMCMD_FRAME(0, 5),
@@ -2986,7 +3033,8 @@ static const union AnimCmd gSpriteAnim_85B78F0[] = {
ANIMCMD_END
};
static const union AnimCmd *const gSpriteAnimTable_85B7904[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7904[] =
{
gSpriteAnim_85B786C,
gSpriteAnim_85B7880,
gSpriteAnim_85B7894,
@@ -3014,12 +3062,13 @@ static const struct OamData gOamData_85B7940 =
.y = 81,
.affineMode = ST_OAM_AFFINE_DOUBLE,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 3,
.shape = SPRITE_SHAPE(64x64),
.size = SPRITE_SIZE(64x64),
.priority = 2,
};
static const struct CompressedSpriteSheet gUnknown_085B7948 = {
static const struct CompressedSpriteSheet gUnknown_085B7948 =
{
.data = gRouletteCenter_Gfx,
.size = 0x800,
.tag = 6
@@ -3040,8 +3089,8 @@ static const struct OamData gOamData_85B7968 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 2,
};
@@ -3049,18 +3098,20 @@ static const struct OamData gOamData_85B7970 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 2,
.shape = SPRITE_SHAPE(32x32),
.size = SPRITE_SIZE(32x32),
.priority = 2,
};
static const struct CompressedSpriteSheet gUnknown_085B7978 = {
static const struct CompressedSpriteSheet gUnknown_085B7978 =
{
.data = gUnknown_085B67FC,
.size = 0xE00,
.tag = 13
};
static const union AnimCmd gSpriteAnim_85B7980[] = {
static const union AnimCmd gSpriteAnim_85B7980[] =
{
ANIMCMD_FRAME(0, 6),
ANIMCMD_FRAME(16, 6),
ANIMCMD_FRAME(32, 6),
@@ -3070,45 +3121,53 @@ static const union AnimCmd gSpriteAnim_85B7980[] = {
ANIMCMD_JUMP(2)
};
static const union AnimCmd gSpriteAnim_85B799C[] = {
static const union AnimCmd gSpriteAnim_85B799C[] =
{
ANIMCMD_FRAME(80, 10),
ANIMCMD_END
};
static const union AnimCmd gSpriteAnim_85B79A4[] = {
static const union AnimCmd gSpriteAnim_85B79A4[] =
{
ANIMCMD_FRAME(80, 10, .hFlip = TRUE),
ANIMCMD_END
};
static const union AnimCmd gSpriteAnim_85B79AC[] = {
static const union AnimCmd gSpriteAnim_85B79AC[] =
{
ANIMCMD_FRAME(80, 20),
ANIMCMD_FRAME(96, 20),
ANIMCMD_JUMP(0)
};
static const union AnimCmd gSpriteAnim_85B79B8[] = {
static const union AnimCmd gSpriteAnim_85B79B8[] =
{
ANIMCMD_FRAME(80, 20, .hFlip = TRUE),
ANIMCMD_FRAME(96, 20, .hFlip = TRUE),
ANIMCMD_JUMP(0)
};
static const union AnimCmd gSpriteAnim_85B79C4[] = {
static const union AnimCmd gSpriteAnim_85B79C4[] =
{
ANIMCMD_FRAME(80, 10),
ANIMCMD_FRAME(96, 10),
ANIMCMD_JUMP(0)
};
static const union AnimCmd gSpriteAnim_85B79D0[] = {
static const union AnimCmd gSpriteAnim_85B79D0[] =
{
ANIMCMD_FRAME(80, 10, .hFlip = TRUE),
ANIMCMD_FRAME(96, 10, .hFlip = TRUE),
ANIMCMD_JUMP(0)
};
static const union AnimCmd *const gSpriteAnimTable_85B79DC[] = {
static const union AnimCmd *const gSpriteAnimTable_85B79DC[] =
{
gSpriteAnim_85B7980
};
static const union AnimCmd *const gSpriteAnimTable_85B79E0[] = {
static const union AnimCmd *const gSpriteAnimTable_85B79E0[] =
{
gSpriteAnim_85B799C,
gSpriteAnim_85B79A4,
gSpriteAnim_85B79AC,
@@ -3143,8 +3202,8 @@ static const struct OamData gOamData_85B7A28 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_SQUARE,
.size = 1,
.shape = SPRITE_SHAPE(16x16),
.size = SPRITE_SIZE(16x16),
.priority = 2,
};
@@ -3152,8 +3211,8 @@ static const struct OamData gOamData_85B7A30 =
{
.affineMode = ST_OAM_AFFINE_OFF,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 2,
};
@@ -3161,24 +3220,27 @@ static const struct OamData gOamData_85B7A38 =
{
.affineMode = ST_OAM_AFFINE_NORMAL,
.objMode = ST_OAM_OBJ_NORMAL,
.shape = ST_OAM_H_RECTANGLE,
.size = 2,
.shape = SPRITE_SHAPE(32x16),
.size = SPRITE_SIZE(32x16),
.priority = 2,
};
static const struct CompressedSpriteSheet gUnknown_085B7A40 = {
static const struct CompressedSpriteSheet gUnknown_085B7A40 =
{
.data = gUnknown_085B7290,
.size = 0x180,
.tag = 14
};
static const union AffineAnimCmd gSpriteAffineAnim_85B7A48[] = {
static const union AffineAnimCmd gSpriteAffineAnim_85B7A48[] =
{
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
AFFINEANIMCMD_FRAME(2, 2, 0, 60),
AFFINEANIMCMD_END
};
static const union AffineAnimCmd gSpriteAffineAnim_85B7A60[] = {
static const union AffineAnimCmd gSpriteAffineAnim_85B7A60[] =
{
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
AFFINEANIMCMD_FRAME(-2, 0x0, 0, 15),
AFFINEANIMCMD_FRAME(-1, -2, 0, 15),
@@ -3186,38 +3248,46 @@ static const union AffineAnimCmd gSpriteAffineAnim_85B7A60[] = {
AFFINEANIMCMD_END
};
static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7A88[] = {
static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7A88[] =
{
gSpriteAffineAnim_85B7A48
};
static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7A8C[] = {
static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7A8C[] =
{
gSpriteAffineAnim_85B7A60
};
static const union AffineAnimCmd gSpriteAffineAnim_85B7A90[] = {
static const union AffineAnimCmd gSpriteAffineAnim_85B7A90[] =
{
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
AFFINEANIMCMD_END
};
static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7AA0[] = {
static const union AffineAnimCmd *const gSpriteAffineAnimTable_85B7AA0[] =
{
gSpriteAffineAnim_85B7A90
};
static const union AnimCmd gSpriteAnim_85B7AA4[] = {
static const union AnimCmd gSpriteAnim_85B7AA4[] =
{
ANIMCMD_FRAME(0, 0),
ANIMCMD_END
};
static const union AnimCmd gSpriteAnim_85B7AAC[] = {
static const union AnimCmd gSpriteAnim_85B7AAC[] =
{
ANIMCMD_FRAME(4, 0),
ANIMCMD_END
};
static const union AnimCmd *const gSpriteAnimTable_85B7AB4[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7AB4[] =
{
gSpriteAnim_85B7AA4
};
static const union AnimCmd *const gSpriteAnimTable_85B7AB8[] = {
static const union AnimCmd *const gSpriteAnimTable_85B7AB8[] =
{
gSpriteAnim_85B7AAC
};
+13 -13
View File
@@ -47,19 +47,19 @@ EWRAM_DATA u8 gSaveFailedUnused2[4] = {0};
static const struct OamData sClockOamData =
{
160, // Y
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0
.y = 160,
.affineMode = 0,
.objMode = 0,
.mosaic = 0,
.bpp = 0,
.shape = SPRITE_SHAPE(16x16),
.x = 0,
.matrixNum = 0,
.size = SPRITE_SIZE(16x16),
.tileNum = 0,
.priority = 0,
.paletteNum = 0,
.affineParam = 0
};
static const struct BgTemplate gUnknown_085EFD88[3] =
+1 -2
View File
@@ -1,6 +1,7 @@
#include "global.h"
#include "script.h"
#include "event_data.h"
#include "mevent.h"
#include "util.h"
#include "constants/map_scripts.h"
@@ -8,8 +9,6 @@
extern const u8* gUnknown_020375C0;
extern bool32 sub_801B27C(void);
// ewram bss
IWRAM_DATA static u8 sScriptContext1Status;
IWRAM_DATA static u32 sUnusedVariable1;
+2 -2
View File
@@ -389,7 +389,7 @@ void sub_80E8FD0(u8 taskId)
}
sub_80E8F9C();
WarpIntoMap();
gFieldCallback = sub_80AF168;
gFieldCallback = FieldCallback_ReturnToEventScript2;
SetMainCallback2(CB2_LoadMap);
DestroyTask(taskId);
break;
@@ -957,7 +957,7 @@ void sub_80E9E90(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
PlaySE(SE_SELECT);
DestroyListMenuTask(data[5], NULL, NULL);
RemoveScrollIndicatorArrowPair(data[8]);
+1 -1
View File
@@ -918,7 +918,7 @@ static void Task_BuyMenu(u8 taskId)
{
case LIST_NOTHING_CHOSEN:
break;
case LIST_B_PRESSED:
case LIST_CANCEL:
PlaySE(SE_SELECT);
ExitBuyMenu(taskId);
break;
+2 -2
View File
@@ -264,7 +264,7 @@ void FadeInNewBGM(u16 songNum, u8 speed)
{
if (gDisableMusic)
songNum = 0;
if (songNum == 0xFFFF)
if (songNum == MUS_NONE)
songNum = 0;
m4aSongNumStart(songNum);
m4aMPlayImmInit(&gMPlayInfo_BGM);
@@ -561,7 +561,7 @@ void PlayBGM(u16 songNum)
{
if (gDisableMusic)
songNum = 0;
if (songNum == 0xFFFF)
if (songNum == MUS_NONE)
songNum = 0;
m4aSongNumStart(songNum);
}
+15 -15
View File
@@ -91,21 +91,21 @@ typedef void (*AnimFunc)(struct Sprite *);
typedef void (*AnimCmdFunc)(struct Sprite *);
typedef void (*AffineAnimCmdFunc)(u8 matrixNum, struct Sprite *);
#define DUMMY_OAM_DATA \
{ \
160, /* Y (off-screen) */ \
0, \
0, \
0, \
0, \
0, \
304, /* X */ \
0, \
0, \
0, \
3, /* lowest priority */ \
0, \
0 \
#define DUMMY_OAM_DATA \
{ \
.y = 160, \
.affineMode = 0, \
.objMode = 0, \
.mosaic = 0, \
.bpp = 0, \
.shape = SPRITE_SHAPE(8x8), \
.x = 304, \
.matrixNum = 0, \
.size = SPRITE_SIZE(8x8), \
.tileNum = 0, \
.priority = 3, /* lowest priority */ \
.paletteNum = 0, \
.affineParam = 0 \
}
#define ANIM_END 0xFFFF
+1
View File
@@ -44,6 +44,7 @@
#include "window.h"
#include "constants/songs.h"
#include "rom_8011DC0.h"
#include "union_room.h"
// Menu actions
enum

Some files were not shown because too many files have changed in this diff Show More