diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-11-11 21:02:20 -0500 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2020-11-11 23:44:30 -0500 |
commit | 66e90595785f0e8e6277009ae25b497736394cf6 (patch) | |
tree | 3f7bfc9ec57b1523d79b30f4974da128440dd329 /src | |
parent | 20626595413f79d3a1b7b93abc60155082e142a6 (diff) |
Move pokedex_screen data from asm to C
Diffstat (limited to 'src')
-rw-r--r-- | src/data/pokemon/pokedex_categories.h | 1001 | ||||
-rw-r--r-- | src/graphics.c | 2 | ||||
-rw-r--r-- | src/pokedex_screen.c | 746 |
3 files changed, 1677 insertions, 72 deletions
diff --git a/src/data/pokemon/pokedex_categories.h b/src/data/pokemon/pokedex_categories.h new file mode 100644 index 000000000..0553fc0f7 --- /dev/null +++ b/src/data/pokemon/pokedex_categories.h @@ -0,0 +1,1001 @@ +static const u16 sDexCategory_GrasslandPkmn_Page1[] = { + SPECIES_RATTATA, + SPECIES_RATICATE, + SPECIES_SENTRET, + SPECIES_FURRET, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page2[] = { + SPECIES_ZIGZAGOON, + SPECIES_LINOONE, + SPECIES_POOCHYENA, + SPECIES_MIGHTYENA, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page3[] = { + SPECIES_NIDORAN_F, + SPECIES_NIDORINA, + SPECIES_NIDOQUEEN, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page4[] = { + SPECIES_NIDORAN_M, + SPECIES_NIDORINO, + SPECIES_NIDOKING, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page5[] = { + SPECIES_DODUO, + SPECIES_DODRIO, + SPECIES_TAILLOW, + SPECIES_SWELLOW, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page6[] = { + SPECIES_TANGELA, + SPECIES_ROSELIA, + SPECIES_SUNKERN, + SPECIES_SUNFLORA, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page7[] = { + SPECIES_HOPPIP, + SPECIES_SKIPLOOM, + SPECIES_JUMPLUFF, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page8[] = { + SPECIES_ODDISH, + SPECIES_GLOOM, + SPECIES_VILEPLUME, + SPECIES_BELLOSSOM, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page9[] = { + SPECIES_EKANS, + SPECIES_ARBOK, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page10[] = { + SPECIES_IGGLYBUFF, + SPECIES_JIGGLYPUFF, + SPECIES_WIGGLYTUFF, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page11[] = { + SPECIES_MAREEP, + SPECIES_FLAAFFY, + SPECIES_AMPHAROS, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page12[] = { + SPECIES_FARFETCHD, + SPECIES_LICKITUNG, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page13[] = { + SPECIES_SCYTHER, + SPECIES_SCIZOR, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page14[] = { + SPECIES_DROWZEE, + SPECIES_HYPNO, + SPECIES_GULPIN, + SPECIES_SWALOT, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page15[] = { + SPECIES_KANGASKHAN, + SPECIES_GIRAFARIG, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page16[] = { + SPECIES_TAUROS, + SPECIES_MILTANK, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page17[] = { + SPECIES_VULPIX, + SPECIES_NINETALES, + SPECIES_PONYTA, + SPECIES_RAPIDASH, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page18[] = { + SPECIES_ELEKID, + SPECIES_ELECTABUZZ, + SPECIES_ELECTRIKE, + SPECIES_MANECTRIC, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page19[] = { + SPECIES_ZANGOOSE, + SPECIES_SEVIPER, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page20[] = { + SPECIES_PLUSLE, + SPECIES_MINUN, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page21[] = { + SPECIES_GROWLITHE, + SPECIES_ARCANINE, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page22[] = { + SPECIES_CASTFORM, + SPECIES_CHIMECHO, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page23[] = { + SPECIES_BULBASAUR, + SPECIES_IVYSAUR, + SPECIES_VENUSAUR, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page24[] = { + SPECIES_CHIKORITA, + SPECIES_BAYLEEF, + SPECIES_MEGANIUM, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page25[] = { + SPECIES_CYNDAQUIL, + SPECIES_QUILAVA, + SPECIES_TYPHLOSION, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page26[] = { + SPECIES_TORCHIC, + SPECIES_COMBUSKEN, + SPECIES_BLAZIKEN, +}; + +static const u16 sDexCategory_GrasslandPkmn_Page27[] = { + SPECIES_RAIKOU, + SPECIES_ENTEI, + SPECIES_SUICUNE, +}; + +static const u16 sDexCategory_ForestPkmn_Page1[] = { + SPECIES_CATERPIE, + SPECIES_METAPOD, + SPECIES_BUTTERFREE, +}; + +static const u16 sDexCategory_ForestPkmn_Page2[] = { + SPECIES_WEEDLE, + SPECIES_KAKUNA, + SPECIES_BEEDRILL, +}; + +static const u16 sDexCategory_ForestPkmn_Page3[] = { + SPECIES_WURMPLE, + SPECIES_SILCOON, + SPECIES_BEAUTIFLY, +}; + +static const u16 sDexCategory_ForestPkmn_Page4[] = { + SPECIES_CASCOON, + SPECIES_DUSTOX, +}; + +static const u16 sDexCategory_ForestPkmn_Page5[] = { + SPECIES_PIDGEY, + SPECIES_PIDGEOTTO, + SPECIES_PIDGEOT, +}; + +static const u16 sDexCategory_ForestPkmn_Page6[] = { + SPECIES_HOOTHOOT, + SPECIES_NOCTOWL, + SPECIES_NATU, + SPECIES_XATU, +}; + +static const u16 sDexCategory_ForestPkmn_Page7[] = { + SPECIES_PICHU, + SPECIES_PIKACHU, + SPECIES_RAICHU, +}; + +static const u16 sDexCategory_ForestPkmn_Page8[] = { + SPECIES_BELLSPROUT, + SPECIES_WEEPINBELL, + SPECIES_VICTREEBEL, +}; + +static const u16 sDexCategory_ForestPkmn_Page9[] = { + SPECIES_PARAS, + SPECIES_PARASECT, + SPECIES_SHROOMISH, + SPECIES_BRELOOM, +}; + +static const u16 sDexCategory_ForestPkmn_Page10[] = { + SPECIES_SEEDOT, + SPECIES_NUZLEAF, + SPECIES_SHIFTRY, +}; + +static const u16 sDexCategory_ForestPkmn_Page11[] = { + SPECIES_VENONAT, + SPECIES_VENOMOTH, + SPECIES_YANMA, +}; + +static const u16 sDexCategory_ForestPkmn_Page12[] = { + SPECIES_LEDYBA, + SPECIES_LEDIAN, + SPECIES_SPINARAK, + SPECIES_ARIADOS, +}; + +static const u16 sDexCategory_ForestPkmn_Page13[] = { + SPECIES_NINCADA, + SPECIES_NINJASK, + SPECIES_SHEDINJA, +}; + +static const u16 sDexCategory_ForestPkmn_Page14[] = { + SPECIES_VOLBEAT, + SPECIES_ILLUMISE, +}; + +static const u16 sDexCategory_ForestPkmn_Page15[] = { + SPECIES_PINECO, + SPECIES_FORRETRESS, +}; + +static const u16 sDexCategory_ForestPkmn_Page16[] = { + SPECIES_SLAKOTH, + SPECIES_VIGOROTH, + SPECIES_SLAKING, +}; + +static const u16 sDexCategory_ForestPkmn_Page17[] = { + SPECIES_SKITTY, + SPECIES_DELCATTY, +}; + +static const u16 sDexCategory_ForestPkmn_Page18[] = { + SPECIES_MURKROW, + SPECIES_SNEASEL, +}; + +static const u16 sDexCategory_ForestPkmn_Page19[] = { + SPECIES_EXEGGCUTE, + SPECIES_EXEGGUTOR, + SPECIES_SUDOWOODO, +}; + +static const u16 sDexCategory_ForestPkmn_Page20[] = { + SPECIES_AIPOM, + SPECIES_STANTLER, + SPECIES_KECLEON, +}; + +static const u16 sDexCategory_ForestPkmn_Page21[] = { + SPECIES_PINSIR, + SPECIES_HERACROSS, +}; + +static const u16 sDexCategory_ForestPkmn_Page22[] = { + SPECIES_SWABLU, + SPECIES_ALTARIA, + SPECIES_TROPIUS, +}; + +static const u16 sDexCategory_ForestPkmn_Page23[] = { + SPECIES_DUSKULL, + SPECIES_DUSCLOPS, +}; + +static const u16 sDexCategory_ForestPkmn_Page24[] = { + SPECIES_TOGEPI, + SPECIES_TOGETIC, +}; + +static const u16 sDexCategory_ForestPkmn_Page25[] = { + SPECIES_TREECKO, + SPECIES_GROVYLE, + SPECIES_SCEPTILE, +}; + +static const u16 sDexCategory_ForestPkmn_Page26[] = { + SPECIES_CELEBI, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page1[] = { + SPECIES_GOLDEEN, + SPECIES_SEAKING, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page2[] = { + SPECIES_MAGIKARP, + SPECIES_GYARADOS, + SPECIES_KRABBY, + SPECIES_KINGLER, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page3[] = { + SPECIES_CORPHISH, + SPECIES_CRAWDAUNT, + SPECIES_BARBOACH, + SPECIES_WHISCASH, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page4[] = { + SPECIES_LOTAD, + SPECIES_LOMBRE, + SPECIES_LUDICOLO, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page5[] = { + SPECIES_SURSKIT, + SPECIES_MASQUERAIN, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page6[] = { + SPECIES_PSYDUCK, + SPECIES_GOLDUCK, + SPECIES_WOOPER, + SPECIES_QUAGSIRE, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page7[] = { + SPECIES_POLIWAG, + SPECIES_POLIWHIRL, + SPECIES_POLIWRATH, + SPECIES_POLITOED, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page8[] = { + SPECIES_AZURILL, + SPECIES_MARILL, + SPECIES_AZUMARILL, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page9[] = { + SPECIES_SLOWPOKE, + SPECIES_SLOWBRO, + SPECIES_SLOWKING, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page10[] = { + SPECIES_FEEBAS, + SPECIES_MILOTIC, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page11[] = { + SPECIES_ANORITH, + SPECIES_ARMALDO, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page12[] = { + SPECIES_DRATINI, + SPECIES_DRAGONAIR, + SPECIES_DRAGONITE, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page13[] = { + SPECIES_SQUIRTLE, + SPECIES_WARTORTLE, + SPECIES_BLASTOISE, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page14[] = { + SPECIES_TOTODILE, + SPECIES_CROCONAW, + SPECIES_FERALIGATR, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page15[] = { + SPECIES_MUDKIP, + SPECIES_MARSHTOMP, + SPECIES_SWAMPERT, +}; + +static const u16 sDexCategory_WatersEdgePkmn_Page16[] = { + SPECIES_LATIAS, + SPECIES_LATIOS, +}; + +static const u16 sDexCategory_SeaPkmn_Page1[] = { + SPECIES_TENTACOOL, + SPECIES_TENTACRUEL, +}; + +static const u16 sDexCategory_SeaPkmn_Page2[] = { + SPECIES_WINGULL, + SPECIES_PELIPPER, +}; + +static const u16 sDexCategory_SeaPkmn_Page3[] = { + SPECIES_STARYU, + SPECIES_STARMIE, +}; + +static const u16 sDexCategory_SeaPkmn_Page4[] = { + SPECIES_CHINCHOU, + SPECIES_LANTURN, + SPECIES_REMORAID, + SPECIES_OCTILLERY, +}; + +static const u16 sDexCategory_SeaPkmn_Page5[] = { + SPECIES_SHELLDER, + SPECIES_CLOYSTER, +}; + +static const u16 sDexCategory_SeaPkmn_Page6[] = { + SPECIES_CLAMPERL, + SPECIES_HUNTAIL, + SPECIES_GOREBYSS, +}; + +static const u16 sDexCategory_SeaPkmn_Page7[] = { + SPECIES_QWILFISH, + SPECIES_CORSOLA, + SPECIES_MANTINE, + SPECIES_LUVDISC, +}; + +static const u16 sDexCategory_SeaPkmn_Page8[] = { + SPECIES_SEEL, + SPECIES_DEWGONG, +}; + +static const u16 sDexCategory_SeaPkmn_Page9[] = { + SPECIES_SPHEAL, + SPECIES_SEALEO, + SPECIES_WALREIN, +}; + +static const u16 sDexCategory_SeaPkmn_Page10[] = { + SPECIES_CARVANHA, + SPECIES_SHARPEDO, + SPECIES_WAILMER, + SPECIES_WAILORD, +}; + +static const u16 sDexCategory_SeaPkmn_Page11[] = { + SPECIES_HORSEA, + SPECIES_SEADRA, + SPECIES_KINGDRA, +}; + +static const u16 sDexCategory_SeaPkmn_Page12[] = { + SPECIES_RELICANTH, +}; + +static const u16 sDexCategory_SeaPkmn_Page13[] = { + SPECIES_LAPRAS, +}; + +static const u16 sDexCategory_SeaPkmn_Page14[] = { + SPECIES_OMANYTE, + SPECIES_OMASTAR, + SPECIES_KABUTO, + SPECIES_KABUTOPS, +}; + +static const u16 sDexCategory_SeaPkmn_Page15[] = { + SPECIES_LILEEP, + SPECIES_CRADILY, +}; + +static const u16 sDexCategory_SeaPkmn_Page16[] = { + SPECIES_KYOGRE, +}; + +static const u16 sDexCategory_CavePkmn_Page1[] = { + SPECIES_ZUBAT, + SPECIES_GOLBAT, + SPECIES_CROBAT, +}; + +static const u16 sDexCategory_CavePkmn_Page2[] = { + SPECIES_DIGLETT, + SPECIES_DUGTRIO, + SPECIES_ONIX, + SPECIES_STEELIX, +}; + +static const u16 sDexCategory_CavePkmn_Page3[] = { + SPECIES_SWINUB, + SPECIES_PILOSWINE, + SPECIES_SNORUNT, + SPECIES_GLALIE, +}; + +static const u16 sDexCategory_CavePkmn_Page4[] = { + SPECIES_WHISMUR, + SPECIES_LOUDRED, + SPECIES_EXPLOUD, +}; + +static const u16 sDexCategory_CavePkmn_Page5[] = { + SPECIES_MISDREAVUS, + SPECIES_DUNSPARCE, + SPECIES_NOSEPASS, +}; + +static const u16 sDexCategory_CavePkmn_Page6[] = { + SPECIES_SABLEYE, + SPECIES_MAWILE, +}; + +static const u16 sDexCategory_CavePkmn_Page7[] = { + SPECIES_GASTLY, + SPECIES_HAUNTER, + SPECIES_GENGAR, +}; + +static const u16 sDexCategory_CavePkmn_Page8[] = { + SPECIES_WYNAUT, + SPECIES_WOBBUFFET, +}; + +static const u16 sDexCategory_CavePkmn_Page9[] = { + SPECIES_LUNATONE, + SPECIES_SOLROCK, +}; + +static const u16 sDexCategory_CavePkmn_Page10[] = { + SPECIES_REGIROCK, + SPECIES_REGICE, + SPECIES_REGISTEEL, +}; + +static const u16 sDexCategory_MountainPkmn_Page1[] = { + SPECIES_GEODUDE, + SPECIES_GRAVELER, + SPECIES_GOLEM, +}; + +static const u16 sDexCategory_MountainPkmn_Page2[] = { + SPECIES_MANKEY, + SPECIES_PRIMEAPE, + SPECIES_SPOINK, + SPECIES_GRUMPIG, +}; + +static const u16 sDexCategory_MountainPkmn_Page3[] = { + SPECIES_MACHOP, + SPECIES_MACHOKE, + SPECIES_MACHAMP, +}; + +static const u16 sDexCategory_MountainPkmn_Page4[] = { + SPECIES_CLEFFA, + SPECIES_CLEFAIRY, + SPECIES_CLEFABLE, +}; + +static const u16 sDexCategory_MountainPkmn_Page5[] = { + SPECIES_CUBONE, + SPECIES_MAROWAK, +}; + +static const u16 sDexCategory_MountainPkmn_Page6[] = { + SPECIES_SLUGMA, + SPECIES_MAGCARGO, + SPECIES_NUMEL, + SPECIES_CAMERUPT, +}; + +static const u16 sDexCategory_MountainPkmn_Page7[] = { + SPECIES_MAKUHITA, + SPECIES_HARIYAMA, + SPECIES_MEDITITE, + SPECIES_MEDICHAM, +}; + +static const u16 sDexCategory_MountainPkmn_Page8[] = { + SPECIES_SHUCKLE, + SPECIES_TEDDIURSA, + SPECIES_URSARING, + SPECIES_DELIBIRD, +}; + +static const u16 sDexCategory_MountainPkmn_Page9[] = { + SPECIES_GLIGAR, + SPECIES_SPINDA, +}; + +static const u16 sDexCategory_MountainPkmn_Page10[] = { + SPECIES_MAGBY, + SPECIES_MAGMAR, + SPECIES_TORKOAL, +}; + +static const u16 sDexCategory_MountainPkmn_Page11[] = { + SPECIES_ARON, + SPECIES_LAIRON, + SPECIES_AGGRON, +}; + +static const u16 sDexCategory_MountainPkmn_Page12[] = { + SPECIES_LARVITAR, + SPECIES_PUPITAR, + SPECIES_TYRANITAR, +}; + +static const u16 sDexCategory_MountainPkmn_Page13[] = { + SPECIES_SNORLAX, +}; + +static const u16 sDexCategory_MountainPkmn_Page14[] = { + SPECIES_ABSOL, +}; + +static const u16 sDexCategory_MountainPkmn_Page15[] = { + SPECIES_AERODACTYL, +}; + +static const u16 sDexCategory_MountainPkmn_Page16[] = { + SPECIES_CHARMANDER, + SPECIES_CHARMELEON, + SPECIES_CHARIZARD, +}; + +static const u16 sDexCategory_MountainPkmn_Page17[] = { + SPECIES_JIRACHI, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page1[] = { + SPECIES_SPEAROW, + SPECIES_FEAROW, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page2[] = { + SPECIES_SANDSHREW, + SPECIES_SANDSLASH, + SPECIES_RHYHORN, + SPECIES_RHYDON, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page3[] = { + SPECIES_MAGNEMITE, + SPECIES_MAGNETON, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page4[] = { + SPECIES_HOUNDOUR, + SPECIES_HOUNDOOM, + SPECIES_PHANPY, + SPECIES_DONPHAN, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page5[] = { + SPECIES_CACNEA, + SPECIES_CACTURNE, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page6[] = { + SPECIES_TRAPINCH, + SPECIES_VIBRAVA, + SPECIES_FLYGON, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page7[] = { + SPECIES_SKARMORY, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page8[] = { + SPECIES_BALTOY, + SPECIES_CLAYDOL, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page9[] = { + SPECIES_BAGON, + SPECIES_SHELGON, + SPECIES_SALAMENCE, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page10[] = { + SPECIES_BELDUM, + SPECIES_METANG, + SPECIES_METAGROSS, +}; + +static const u16 sDexCategory_RoughTerrainPkmn_Page11[] = { + SPECIES_GROUDON, +}; + +static const u16 sDexCategory_UrbanPkmn_Page1[] = { + SPECIES_MEOWTH, + SPECIES_PERSIAN, + SPECIES_SNUBBULL, + SPECIES_GRANBULL, +}; + +static const u16 sDexCategory_UrbanPkmn_Page2[] = { + SPECIES_GRIMER, + SPECIES_MUK, + SPECIES_KOFFING, + SPECIES_WEEZING, +}; + +static const u16 sDexCategory_UrbanPkmn_Page3[] = { + SPECIES_SHUPPET, + SPECIES_BANETTE, +}; + +static const u16 sDexCategory_UrbanPkmn_Page4[] = { + SPECIES_ABRA, + SPECIES_KADABRA, + SPECIES_ALAKAZAM, +}; + +static const u16 sDexCategory_UrbanPkmn_Page5[] = { + SPECIES_RALTS, + SPECIES_KIRLIA, + SPECIES_GARDEVOIR, +}; + +static const u16 sDexCategory_UrbanPkmn_Page6[] = { + SPECIES_SMOOCHUM, + SPECIES_JYNX, + SPECIES_MR_MIME, + SPECIES_SMEARGLE, +}; + +static const u16 sDexCategory_UrbanPkmn_Page7[] = { + SPECIES_TYROGUE, + SPECIES_HITMONLEE, + SPECIES_HITMONCHAN, + SPECIES_HITMONTOP, +}; + +static const u16 sDexCategory_UrbanPkmn_Page8[] = { + SPECIES_CHANSEY, + SPECIES_BLISSEY, +}; + +static const u16 sDexCategory_UrbanPkmn_Page9[] = { + SPECIES_VOLTORB, + SPECIES_ELECTRODE, + SPECIES_PORYGON, + SPECIES_PORYGON2, +}; + +static const u16 sDexCategory_UrbanPkmn_Page10[] = { + SPECIES_DITTO, +}; + +static const u16 sDexCategory_UrbanPkmn_Page11[] = { + SPECIES_EEVEE, + SPECIES_VAPOREON, + SPECIES_JOLTEON, + SPECIES_FLAREON, +}; + +static const u16 sDexCategory_UrbanPkmn_Page12[] = { + SPECIES_ESPEON, + SPECIES_UMBREON, +}; + +static const u16 sDexCategory_RarePkmn_Page1[] = { + SPECIES_UNOWN, +}; + +static const u16 sDexCategory_RarePkmn_Page2[] = { + SPECIES_ARTICUNO, + SPECIES_ZAPDOS, + SPECIES_MOLTRES, +}; + +static const u16 sDexCategory_RarePkmn_Page3[] = { + SPECIES_LUGIA, +}; + +static const u16 sDexCategory_RarePkmn_Page4[] = { + SPECIES_HO_OH, +}; + +static const u16 sDexCategory_RarePkmn_Page5[] = { + SPECIES_RAYQUAZA, +}; + +static const u16 sDexCategory_RarePkmn_Page6[] = { + SPECIES_DEOXYS, +}; + +static const u16 sDexCategory_RarePkmn_Page7[] = { + SPECIES_MEWTWO, +}; + +static const u16 sDexCategory_RarePkmn_Page8[] = { + SPECIES_MEW, +}; + +#define DEX_CATEGORY(name){sDexCategory_##name, NELEMS(sDexCategory_##name)} + +static const struct PokedexCategoryPage sDexCategory_GrasslandPkmn[] = { + DEX_CATEGORY(GrasslandPkmn_Page1), + DEX_CATEGORY(GrasslandPkmn_Page2), + DEX_CATEGORY(GrasslandPkmn_Page3), + DEX_CATEGORY(GrasslandPkmn_Page4), + DEX_CATEGORY(GrasslandPkmn_Page5), + DEX_CATEGORY(GrasslandPkmn_Page6), + DEX_CATEGORY(GrasslandPkmn_Page7), + DEX_CATEGORY(GrasslandPkmn_Page8), + DEX_CATEGORY(GrasslandPkmn_Page9), + DEX_CATEGORY(GrasslandPkmn_Page10), + DEX_CATEGORY(GrasslandPkmn_Page11), + DEX_CATEGORY(GrasslandPkmn_Page12), + DEX_CATEGORY(GrasslandPkmn_Page13), + DEX_CATEGORY(GrasslandPkmn_Page14), + DEX_CATEGORY(GrasslandPkmn_Page15), + DEX_CATEGORY(GrasslandPkmn_Page16), + DEX_CATEGORY(GrasslandPkmn_Page17), + DEX_CATEGORY(GrasslandPkmn_Page18), + DEX_CATEGORY(GrasslandPkmn_Page19), + DEX_CATEGORY(GrasslandPkmn_Page20), + DEX_CATEGORY(GrasslandPkmn_Page21), + DEX_CATEGORY(GrasslandPkmn_Page22), + DEX_CATEGORY(GrasslandPkmn_Page23), + DEX_CATEGORY(GrasslandPkmn_Page24), + DEX_CATEGORY(GrasslandPkmn_Page25), + DEX_CATEGORY(GrasslandPkmn_Page26), + DEX_CATEGORY(GrasslandPkmn_Page27), +}; + +static const struct PokedexCategoryPage sDexCategory_ForestPkmn[] = { + DEX_CATEGORY(ForestPkmn_Page1), + DEX_CATEGORY(ForestPkmn_Page2), + DEX_CATEGORY(ForestPkmn_Page3), + DEX_CATEGORY(ForestPkmn_Page4), + DEX_CATEGORY(ForestPkmn_Page5), + DEX_CATEGORY(ForestPkmn_Page6), + DEX_CATEGORY(ForestPkmn_Page7), + DEX_CATEGORY(ForestPkmn_Page8), + DEX_CATEGORY(ForestPkmn_Page9), + DEX_CATEGORY(ForestPkmn_Page10), + DEX_CATEGORY(ForestPkmn_Page11), + DEX_CATEGORY(ForestPkmn_Page12), + DEX_CATEGORY(ForestPkmn_Page13), + DEX_CATEGORY(ForestPkmn_Page14), + DEX_CATEGORY(ForestPkmn_Page15), + DEX_CATEGORY(ForestPkmn_Page16), + DEX_CATEGORY(ForestPkmn_Page17), + DEX_CATEGORY(ForestPkmn_Page18), + DEX_CATEGORY(ForestPkmn_Page19), + DEX_CATEGORY(ForestPkmn_Page20), + DEX_CATEGORY(ForestPkmn_Page21), + DEX_CATEGORY(ForestPkmn_Page22), + DEX_CATEGORY(ForestPkmn_Page23), + DEX_CATEGORY(ForestPkmn_Page24), + DEX_CATEGORY(ForestPkmn_Page25), + DEX_CATEGORY(ForestPkmn_Page26), +}; + +static const struct PokedexCategoryPage sDexCategory_WatersEdgePkmn[] = { + DEX_CATEGORY(WatersEdgePkmn_Page1), + DEX_CATEGORY(WatersEdgePkmn_Page2), + DEX_CATEGORY(WatersEdgePkmn_Page3), + DEX_CATEGORY(WatersEdgePkmn_Page4), + DEX_CATEGORY(WatersEdgePkmn_Page5), + DEX_CATEGORY(WatersEdgePkmn_Page6), + DEX_CATEGORY(WatersEdgePkmn_Page7), + DEX_CATEGORY(WatersEdgePkmn_Page8), + DEX_CATEGORY(WatersEdgePkmn_Page9), + DEX_CATEGORY(WatersEdgePkmn_Page10), + DEX_CATEGORY(WatersEdgePkmn_Page11), + DEX_CATEGORY(WatersEdgePkmn_Page12), + DEX_CATEGORY(WatersEdgePkmn_Page13), + DEX_CATEGORY(WatersEdgePkmn_Page14), + DEX_CATEGORY(WatersEdgePkmn_Page15), + DEX_CATEGORY(WatersEdgePkmn_Page16), +}; + +static const struct PokedexCategoryPage sDexCategory_SeaPkmn[] = { + DEX_CATEGORY(SeaPkmn_Page1), + DEX_CATEGORY(SeaPkmn_Page2), + DEX_CATEGORY(SeaPkmn_Page3), + DEX_CATEGORY(SeaPkmn_Page4), + DEX_CATEGORY(SeaPkmn_Page5), + DEX_CATEGORY(SeaPkmn_Page6), + DEX_CATEGORY(SeaPkmn_Page7), + DEX_CATEGORY(SeaPkmn_Page8), + DEX_CATEGORY(SeaPkmn_Page9), + DEX_CATEGORY(SeaPkmn_Page10), + DEX_CATEGORY(SeaPkmn_Page11), + DEX_CATEGORY(SeaPkmn_Page12), + DEX_CATEGORY(SeaPkmn_Page13), + DEX_CATEGORY(SeaPkmn_Page14), + DEX_CATEGORY(SeaPkmn_Page15), + DEX_CATEGORY(SeaPkmn_Page16), +}; + +static const struct PokedexCategoryPage sDexCategory_CavePkmn[] = { + DEX_CATEGORY(CavePkmn_Page1), + DEX_CATEGORY(CavePkmn_Page2), + DEX_CATEGORY(CavePkmn_Page3), + DEX_CATEGORY(CavePkmn_Page4), + DEX_CATEGORY(CavePkmn_Page5), + DEX_CATEGORY(CavePkmn_Page6), + DEX_CATEGORY(CavePkmn_Page7), + DEX_CATEGORY(CavePkmn_Page8), + DEX_CATEGORY(CavePkmn_Page9), + DEX_CATEGORY(CavePkmn_Page10), +}; + +static const struct PokedexCategoryPage sDexCategory_MountainPkmn[] = { + DEX_CATEGORY(MountainPkmn_Page1), + DEX_CATEGORY(MountainPkmn_Page2), + DEX_CATEGORY(MountainPkmn_Page3), + DEX_CATEGORY(MountainPkmn_Page4), + DEX_CATEGORY(MountainPkmn_Page5), + DEX_CATEGORY(MountainPkmn_Page6), + DEX_CATEGORY(MountainPkmn_Page7), + DEX_CATEGORY(MountainPkmn_Page8), + DEX_CATEGORY(MountainPkmn_Page9), + DEX_CATEGORY(MountainPkmn_Page10), + DEX_CATEGORY(MountainPkmn_Page11), + DEX_CATEGORY(MountainPkmn_Page12), + DEX_CATEGORY(MountainPkmn_Page13), + DEX_CATEGORY(MountainPkmn_Page14), + DEX_CATEGORY(MountainPkmn_Page15), + DEX_CATEGORY(MountainPkmn_Page16), + DEX_CATEGORY(MountainPkmn_Page17), +}; + +static const struct PokedexCategoryPage sDexCategory_RoughTerrainPkmn[] = { + DEX_CATEGORY(RoughTerrainPkmn_Page1), + DEX_CATEGORY(RoughTerrainPkmn_Page2), + DEX_CATEGORY(RoughTerrainPkmn_Page3), + DEX_CATEGORY(RoughTerrainPkmn_Page4), + DEX_CATEGORY(RoughTerrainPkmn_Page5), + DEX_CATEGORY(RoughTerrainPkmn_Page6), + DEX_CATEGORY(RoughTerrainPkmn_Page7), + DEX_CATEGORY(RoughTerrainPkmn_Page8), + DEX_CATEGORY(RoughTerrainPkmn_Page9), + DEX_CATEGORY(RoughTerrainPkmn_Page10), + DEX_CATEGORY(RoughTerrainPkmn_Page11), +}; + +static const struct PokedexCategoryPage sDexCategory_UrbanPkmn[] = { + DEX_CATEGORY(UrbanPkmn_Page1), + DEX_CATEGORY(UrbanPkmn_Page2), + DEX_CATEGORY(UrbanPkmn_Page3), + DEX_CATEGORY(UrbanPkmn_Page4), + DEX_CATEGORY(UrbanPkmn_Page5), + DEX_CATEGORY(UrbanPkmn_Page6), + DEX_CATEGORY(UrbanPkmn_Page7), + DEX_CATEGORY(UrbanPkmn_Page8), + DEX_CATEGORY(UrbanPkmn_Page9), + DEX_CATEGORY(UrbanPkmn_Page10), + DEX_CATEGORY(UrbanPkmn_Page11), + DEX_CATEGORY(UrbanPkmn_Page12), +}; + +static const struct PokedexCategoryPage sDexCategory_RarePkmn[] = { + DEX_CATEGORY(RarePkmn_Page1), + DEX_CATEGORY(RarePkmn_Page2), + DEX_CATEGORY(RarePkmn_Page3), + DEX_CATEGORY(RarePkmn_Page4), + DEX_CATEGORY(RarePkmn_Page5), + DEX_CATEGORY(RarePkmn_Page6), + DEX_CATEGORY(RarePkmn_Page7), + DEX_CATEGORY(RarePkmn_Page8), +}; + +struct { + const struct PokedexCategoryPage * page; + u8 count; +} const gDexCategories[] = { + DEX_CATEGORY(GrasslandPkmn), + DEX_CATEGORY(ForestPkmn), + DEX_CATEGORY(WatersEdgePkmn), + DEX_CATEGORY(SeaPkmn), + DEX_CATEGORY(CavePkmn), + DEX_CATEGORY(MountainPkmn), + DEX_CATEGORY(RoughTerrainPkmn), + DEX_CATEGORY(UrbanPkmn), + DEX_CATEGORY(RarePkmn), +}; diff --git a/src/graphics.c b/src/graphics.c index a262ef8e2..c9fc09a1e 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1246,7 +1246,7 @@ const u16 gUnknown_8E9BF28[] = INCBIN_U16("graphics/interface/link_rfu_frame.gba const u32 gUnknown_8E9BF48[] = INCBIN_U32("graphics/interface/link_rfu_status.4bpp.lz"); const u16 gUnknown_8E9C14C[] = INCBIN_U16("graphics/interface/pokedex_abc.gbapal"); -const u32 gUnknown_8E9C16C[] = INCBIN_U32("graphics/interface/pokedex_abc.4bpp.lz"); +const u16 gUnknown_8E9C16C[] = INCBIN_U16("graphics/interface/pokedex_abc.4bpp.lz"); const u16 gPSSMenu_Pal[] = INCBIN_U16("graphics/interface/box_tiles_pal1.gbapal"); const u16 gUnknown_8E9C3F8[] = INCBIN_U16("graphics/interface/box_tiles_pal2.gbapal"); diff --git a/src/pokedex_screen.c b/src/pokedex_screen.c index a36108425..c5efdd949 100644 --- a/src/pokedex_screen.c +++ b/src/pokedex_screen.c @@ -69,8 +69,14 @@ struct PokedexScreenData struct PokedexScreenWindowGfx { - const u16 *map; - const u16 *pal; + const u16 * map; + const u16 * pal; +}; + +struct PokedexCategoryPage +{ + const u16 * species; + u8 count; }; EWRAM_DATA struct PokedexScreenData * gUnknown_203ACF0 = NULL; @@ -114,6 +120,9 @@ void sub_81068DC(u8 category, u8 a1); u8 sub_8106AF8(u16 a0); void sub_8106B34(void); void sub_8106E78(const u8 *a0, s32 a1); +static void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list); +static void sub_8102F48(u8 windowId, s32 itemId, u8 y); +static void sub_8103A40(u8 windowId, s32 itemId, u8 y); #include "data/pokemon_graphics/footprint_table.h" @@ -132,21 +141,21 @@ const u16 gUnknown_84406C8[] = { }; const u16 gUnknown_84406E0[] = INCBIN_U16("graphics/pokedex/unk_84406E0.gbapal"); -const u32 gUnknown_84408E0[] = INCBIN_U32("graphics/pokedex/unk_84408E0.bin.lz"); -const u32 gUnknown_8440BD8[] = INCBIN_U32("graphics/pokedex/unk_8440BD8.bin.lz"); +const u16 gUnknown_84408E0[] = INCBIN_U16("graphics/pokedex/unk_84408E0.bin.lz"); +const u16 gUnknown_8440BD8[] = INCBIN_U16("graphics/pokedex/unk_8440BD8.bin.lz"); const u32 gUnknown_8440EF0[] = INCBIN_U32("graphics/pokedex/unk_8440EF0.bin.lz"); -const u32 gUnknown_844112C[] = INCBIN_U32("graphics/pokedex/unk_844112C.bin.lz"); -const u32 gUnknown_84414BC[] = INCBIN_U32("graphics/pokedex/unk_84414BC.bin.lz"); +const u16 gUnknown_844112C[] = INCBIN_U16("graphics/pokedex/unk_844112C.bin.lz"); +const u16 gUnknown_84414BC[] = INCBIN_U16("graphics/pokedex/unk_84414BC.bin.lz"); const u32 gUnknown_8441808[] = INCBIN_U32("graphics/pokedex/unk_8441808.bin.lz"); -const u32 gUnknown_8441A40[] = INCBIN_U32("graphics/pokedex/unk_8441A40.bin.lz"); -const u32 gUnknown_8441D54[] = INCBIN_U32("graphics/pokedex/unk_8441D54.bin.lz"); -const u32 gUnknown_8442004[] = INCBIN_U32("graphics/pokedex/unk_8442004.bin.lz"); -const u32 gUnknown_844223C[] = INCBIN_U32("graphics/pokedex/unk_844223C.bin.lz"); -const u32 gUnknown_84424E4[] = INCBIN_U32("graphics/pokedex/unk_84424E4.bin.lz"); -const u32 gUnknown_8442838[] = INCBIN_U32("graphics/pokedex/unk_8442838.bin.lz"); -const u32 gUnknown_8442BC0[] = INCBIN_U32("graphics/pokedex/unk_8442BC0.bin.lz"); -const u32 gUnknown_8442EF8[] = INCBIN_U32("graphics/pokedex/unk_8442EF8.bin.lz"); -const u32 gUnknown_844318C[] = INCBIN_U32("graphics/pokedex/unk_844318C.bin.lz"); +const u16 gUnknown_8441A40[] = INCBIN_U16("graphics/pokedex/unk_8441A40.bin.lz"); +const u16 gUnknown_8441D54[] = INCBIN_U16("graphics/pokedex/unk_8441D54.bin.lz"); +const u16 gUnknown_8442004[] = INCBIN_U16("graphics/pokedex/unk_8442004.bin.lz"); +const u16 gUnknown_844223C[] = INCBIN_U16("graphics/pokedex/unk_844223C.bin.lz"); +const u16 gUnknown_84424E4[] = INCBIN_U16("graphics/pokedex/unk_84424E4.bin.lz"); +const u16 gUnknown_8442838[] = INCBIN_U16("graphics/pokedex/unk_8442838.bin.lz"); +const u16 gUnknown_8442BC0[] = INCBIN_U16("graphics/pokedex/unk_8442BC0.bin.lz"); +const u16 gUnknown_8442EF8[] = INCBIN_U16("graphics/pokedex/unk_8442EF8.bin.lz"); +const u16 gUnknown_844318C[] = INCBIN_U16("graphics/pokedex/unk_844318C.bin.lz"); const u16 gUnknown_8443420[] = INCBIN_U16("graphics/pokedex/unk_8443420.gbapal"); const u16 gUnknown_8443440[] = INCBIN_U16("graphics/pokedex/unk_8443440.gbapal"); const u16 gUnknown_8443460[] = INCBIN_U16("graphics/pokedex/unk_8443460.gbapal"); @@ -180,29 +189,623 @@ static const u8 gExpandedPlaceholder_PokedexDescription[] = _(""); #include "data/pokemon/pokedex_text.h" #include "data/pokemon/pokedex_entries.h" -extern const struct BgTemplate gUnknown_8451EBC[4]; -extern const struct WindowTemplate gUnknown_8451ECC[]; -extern const struct PokedexScreenData gUnknown_8451EE4; -extern const struct WindowTemplate gUnknown_8451F54; -extern const struct WindowTemplate gUnknown_8451F5C; -extern const struct WindowTemplate gUnknown_8451F64; -extern const struct ListMenuTemplate gUnknown_8452004; -extern const struct ListMenuTemplate gUnknown_84520BC; -extern const struct ScrollArrowsTemplate gUnknown_84520D4; -extern const struct ScrollArrowsTemplate gUnknown_84520E4; -extern const struct PokedexScreenWindowGfx gUnknown_84520F4[]; -extern const struct WindowTemplate gUnknown_845216C; -extern const struct ListMenuTemplate gUnknown_8452174; -extern const struct ListMenuWindowRect gUnknown_845218C; -extern const struct ScrollArrowsTemplate gUnknown_84521B4; -extern const struct WindowTemplate gUnknown_84521C4; -extern const struct WindowTemplate gUnknown_84521CC; -extern const u16 gUnknown_845228C[]; -extern const u8 (*const gUnknown_8452334[])[4]; -extern const u8 *const gDexCategoryNamePtrs[]; -extern const u8 gUnknown_8452388[][30]; -extern const struct ScrollArrowsTemplate gUnknown_84524B4; -extern const struct CursorStruct gUnknown_84524C4; + +static const struct BgTemplate sUnknown_8451EBC[] = { + { + .bg = 0, + .charBaseIndex = 0, + .mapBaseIndex = 5, + .screenSize = 0, + .paletteMode = 0, + .priority = 0, + .baseTile = 0x0000 + }, + { + .bg = 1, + .charBaseIndex = 2, + .mapBaseIndex = 4, + .screenSize = 0, + .paletteMode = 0, + .priority = 1, + .baseTile = 0x0000 + }, + { + .bg = 2, + .charBaseIndex = 2, + .mapBaseIndex = 6, + .screenSize = 0, + .paletteMode = 0, + .priority = 2, + .baseTile = 0x0000 + }, + { + .bg = 3, + .charBaseIndex = 0, + .mapBaseIndex = 7, + .screenSize = 0, + .paletteMode = 0, + .priority = 3, + .baseTile = 0x0000 + }, +}; + +static const struct WindowTemplate sUnknown_8451ECC[] = { + { + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 30, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x03c4 + }, + { + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 18, + .width = 30, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x0388 + }, + { + .bg = 255, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 0, + .height = 0, + .paletteNum = 0, + .baseBlock = 0x0000 + }, +}; + +static const struct PokedexScreenData sUnknown_8451EE4 = { + .field_10 = 1, + .field_14 = -1, + .field_15 = -1, + .field_16 = -1, + .field_18 = {-1, -1, -1, -1}, + .field_20 = {-1, -1, -1, -1}, + .field_24 = {-1, -1, -1, -1}, + .field_40 = -1, + .field_4A = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, + .field_60 = -1, + .field_61 = -1, +}; + + +static const struct WindowTemplate sUnknown_8451F54 = { + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 2, + .width = 20, + .height = 16, + .paletteNum = 0, + .baseBlock = 0x0008 + }; + +static const struct WindowTemplate sUnknown_8451F5C = { + .bg = 1, + .tilemapLeft = 21, + .tilemapTop = 11, + .width = 8, + .height = 6, + .paletteNum = 1, + .baseBlock = 0x0148 + }; + +static const struct WindowTemplate sUnknown_8451F64 = { + .bg = 1, + .tilemapLeft = 21, + .tilemapTop = 2, + .width = 9, + .height = 9, + .paletteNum = 0, + .baseBlock = 0x0178 + }; + +static const struct ListMenuItem sUnknown_8451F6C[] = { + {gUnknown_8415EFB, -3}, + {gUnknown_8415E95, 9}, + {gUnknown_8415DE0, -3}, + {gText_DexCategory_GrasslandPkmn, 0}, + {gText_DexCategory_ForestPkmn, 1}, + {gText_DexCategory_WatersEdgePkmn, 2}, + {gText_DexCategory_SeaPkmn, 3}, + {gText_DexCategory_CavePkmn, 4}, + {gText_DexCategory_MountainPkmn, 5}, + {gText_DexCategory_RoughTerrainPkmn, 6}, + {gText_DexCategory_UrbanPkmn, 7}, + {gText_DexCategory_RarePkmn, 8}, + {gUnknown_8415E88, -3}, + {gUnknown_8415EA4, 10}, + {gUnknown_8415ED5, 11}, + {gUnknown_8415EDF, 12}, + {gUnknown_8415EED, 13}, + {gUnknown_8415EB0, -3}, + {gUnknown_8415EC7, -2}, +}; + +static const struct ListMenuTemplate sUnknown_8452004 = { + .items = sUnknown_8451F6C, + .moveCursorFunc = sub_8102EC0, + .itemPrintFunc = sub_8102F48, + .totalItems = NELEMS(sUnknown_8451F6C), + .maxShowed = 9, + .windowId 0, + .header_X = 0, + .item_X = 12, + .cursor_X = 4, + .upText_Y = 2, + .cursorPal = 1, + .fillValue = 0, + .cursorShadowPal = 3, + .lettersSpacing = 1, + .itemVerticalPadding = 0, + .scrollMultiple = 0, + .fontId = 2, + .cursorKind = 0, +}; + +static const struct ListMenuItem sUnknown_845201C[] = { + {gUnknown_8415EFB, -3}, + {gUnknown_8415F0E, 9}, + {gUnknown_8415F24, 14}, + {gUnknown_8415DE0, -3}, + {gText_DexCategory_GrasslandPkmn, 0}, + {gText_DexCategory_ForestPkmn, 1}, + {gText_DexCategory_WatersEdgePkmn, 2}, + {gText_DexCategory_SeaPkmn, 3}, + {gText_DexCategory_CavePkmn, 4}, + {gText_DexCategory_MountainPkmn, 5}, + {gText_DexCategory_RoughTerrainPkmn, 6}, + {gText_DexCategory_UrbanPkmn, 7}, + {gText_DexCategory_RarePkmn, 8}, + {gUnknown_8415E88, -3}, + {gUnknown_8415EA4, 10}, + {gUnknown_8415ED5, 11}, + {gUnknown_8415EDF, 12}, + {gUnknown_8415EED, 13}, + {gUnknown_8415EB0, -3}, + {gUnknown_8415EC7, -2}, +}; + +static const struct ListMenuTemplate sUnknown_84520BC = { + .items = sUnknown_845201C, + .moveCursorFunc = sub_8102EC0, + .itemPrintFunc = sub_8102F48, + .totalItems = NELEMS(sUnknown_845201C), + .maxShowed = 9, + .windowId 0, + .header_X = 0, + .item_X = 12, + .cursor_X = 4, + .upText_Y = 2, + .cursorPal = 1, + .fillValue = 0, + .cursorShadowPal = 3, + .lettersSpacing = 1, + .itemVerticalPadding = 0, + .scrollMultiple = 0, + .fontId = 2, + .cursorKind = 0, +}; + +static const struct ScrollArrowsTemplate sUnknown_84520D4 = { + .firstArrowType = 2, + .firstX = 200, + .firstY = 19, + .secondArrowType = 3, + .secondX = 200, + .secondY = 141, + .fullyUpThreshold = 0, + .fullyDownThreshold = 10, + .tileTag = 2000, + .palTag = 0xFFFF, + .palNum = 1 +}; + +static const struct ScrollArrowsTemplate sUnknown_84520E4 = { + .firstArrowType = 2, + .firstX = 200, + .firstY = 19, + .secondArrowType = 3, + .secondX = 200, + .secondY = 141, + .fullyUpThreshold = 0, + .fullyDownThreshold = 11, + .tileTag = 2000, + .palTag = 0xFFFF, + .palNum = 1 +}; + + +static const struct PokedexScreenWindowGfx sUnknown_84520F4[] = { + {.map = gUnknown_84414BC, .pal = gUnknown_84434A0}, + {.map = gUnknown_844112C, .pal = gUnknown_8443480}, + {.map = gUnknown_8442838, .pal = gUnknown_8443580}, + {.map = gUnknown_8442004, .pal = gUnknown_8443520}, + {.map = gUnknown_84408E0, .pal = gUnknown_8443420}, + {.map = gUnknown_8441A40, .pal = gUnknown_84434E0}, + {.map = gUnknown_84424E4, .pal = gUnknown_8443560}, + {.map = gUnknown_8440BD8, .pal = gUnknown_8443440}, + {.map = gUnknown_8441D54, .pal = gUnknown_8443500}, + {.map = gUnknown_844223C, .pal = gUnknown_8443540}, + {.map = gUnknown_8E9C16C, .pal = gUnknown_8E9C14C}, + {.map = gUnknown_8442BC0, .pal = gUnknown_84435A0}, + {.map = gUnknown_8442EF8, .pal = gUnknown_84435C0}, + {.map = gUnknown_844318C, .pal = gUnknown_84435E0}, + {.map = gUnknown_844223C, .pal = gUnknown_8443540}, +}; + +static const struct WindowTemplate sUnknown_845216C = { + .bg = 1, + .tilemapLeft = 2, + .tilemapTop = 2, + .width = 23, + .height = 16, + .paletteNum = 0, + .baseBlock = 0x0008 +}; + +static const struct ListMenuTemplate sUnknown_8452174 = { + .items = sUnknown_8451F6C, + .moveCursorFunc = ListMenuDefaultCursorMoveFunc, + .itemPrintFunc = sub_8103A40, + .totalItems = 0, + .maxShowed = 9, + .windowId = 0, + .header_X = 0, + .item_X = 56, + .cursor_X = 4, + .upText_Y = 2, + .cursorPal = 1, + .fillValue = 0, + .cursorShadowPal = 3, + .lettersSpacing = 1, + .itemVerticalPadding = 0, + .scrollMultiple = 1, + .fontId = 2, + .cursorKind = 0, +}; + +static const struct ListMenuWindowRect sUnknown_845218C = { + .x = 0, + .y = 0, + .width = 5, + .height = 16, + .palNum = 0, +}; + +// Unused +static const u8 gUnknown_8452194[] = { + 0x05, 0x00, 0x02, 0x10, 0x01, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x00, 0x08, 0x10, 0x02, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 +}; + +static const struct ScrollArrowsTemplate sUnknown_84521B4 = { + .firstArrowType = 2, + .firstX = 200, + .firstY = 19, + .secondArrowType = 3, + .secondX = 200, + .secondY = 141, + .fullyUpThreshold = 0, + .fullyDownThreshold = 0, + .tileTag = 2000, + .palTag = 0xFFFF, + .palNum = 1, +}; + +static const struct WindowTemplate sUnknown_84521C4 = { + .bg = 2, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 8, + .height = 8, + .paletteNum = 0, + .baseBlock = 0x0000 +}; + +static const struct WindowTemplate sUnknown_84521CC = { + .bg = 1, + .tilemapLeft = 0, + .tilemapTop = 0, + .width = 8, + .height = 5, + .paletteNum = 0, + .baseBlock = 0x0000 +}; + +const struct WindowTemplate gUnknown_84521D4 = { + .bg = 1, + .tilemapLeft = 19, + .tilemapTop = 3, + .width = 8, + .height = 8, + .paletteNum = 9, + .baseBlock = 0x01a8 +}; + +const struct WindowTemplate gUnknown_84521DC = { + .bg = 1, + .tilemapLeft = 2, + .tilemapTop = 3, + .width = 13, + .height = 8, + .paletteNum = 0, + .baseBlock = 0x01e8 +}; + +const struct WindowTemplate gUnknown_84521E4 = { + .bg = 1, + .tilemapLeft = 0, + .tilemapTop = 11, + .width = 30, + .height = 7, + .paletteNum = 0, + .baseBlock = 0x0250 +}; + +const struct WindowTemplate gUnknown_84521EC = { + .bg = 2, + .tilemapLeft = 1, + .tilemapTop = 2, + .width = 4, + .height = 4, + .paletteNum = 10, + .baseBlock = 0x01a8 +}; + +const struct WindowTemplate gUnknown_84521F4 = { + .bg = 2, + .tilemapLeft = 5, + .tilemapTop = 2, + .width = 8, + .height = 3, + .paletteNum = 0, + .baseBlock = 0x01b8 +}; + +const struct WindowTemplate gUnknown_84521FC = { + .bg = 2, + .tilemapLeft = 2, + .tilemapTop = 7, + .width = 10, + .height = 2, + .paletteNum = 0, + .baseBlock = 0x01d0 +}; + +const struct WindowTemplate gUnknown_8452204 = { + .bg = 2, + .tilemapLeft = 18, + .tilemapTop = 2, + .width = 10, + .height = 2, + .paletteNum = 0, + .baseBlock = 0x01e4 +}; + +const struct WindowTemplate gUnknown_845220C = { + .bg = 2, + .tilemapLeft = 5, + .tilemapTop = 5, + .width = 8, + .height = 2, + .paletteNum = 11, + .baseBlock = 0x01f8 +}; + +const struct WindowTemplate gUnknown_8452214 = { + .bg = 2, + .tilemapLeft = 17, + .tilemapTop = 4, + .width = 12, + .height = 9, + .paletteNum = 0, + .baseBlock = 0x0208 +}; + +static const struct WindowTemplate sUnknown_845221C = { + .bg = 2, + .tilemapLeft = 13, + .tilemapTop = 4, + .width = 4, + .height = 3, + .paletteNum = 0, + .baseBlock = 0x0274 +}; + +static const struct WindowTemplate sUnknown_8452224 = { + .bg = 2, + .tilemapLeft = 13, + .tilemapTop = 7, + .width = 4, + .height = 3, + .paletteNum = 0, + .baseBlock = 0x0280 +}; + +static const struct WindowTemplate sUnknown_845222C = { + .bg = 2, + .tilemapLeft = 13, + .tilemapTop = 10, + .width = 4, + .height = 3, + .paletteNum = 0, + .baseBlock = 0x028c +}; + +static const struct WindowTemplate sUnknown_8452234 = { + .bg = 2, + .tilemapLeft = 13, + .tilemapTop = 13, + .width = 4, + .height = 4, + .paletteNum = 0, + .baseBlock = 0x0298 +}; + +static const struct WindowTemplate sUnknown_845223C = { + .bg = 2, + .tilemapLeft = 17, + .tilemapTop = 13, + .width = 4, + .height = 4, + .paletteNum = 0, + .baseBlock = 0x02a8 +}; + +static const struct WindowTemplate sUnknown_8452244 = { + .bg = 2, + .tilemapLeft = 21, + .tilemapTop = 13, + .width = 4, + .height = 4, + .paletteNum = 0, + .baseBlock = 0x02b8 +}; + +static const struct WindowTemplate sUnknown_845224C = { + .bg = 2, + .tilemapLeft = 25, + .tilemapTop = 13, + .width = 4, + .height = 4, + .paletteNum = 0, + .baseBlock = 0x02c8 +}; + +struct { + const struct WindowTemplate * window; + const u32 * tilemap; +} const gUnknown_8452254[] = { + {&sUnknown_845221C, gUnknown_8443910}, + {&sUnknown_8452224, gUnknown_8443988}, + {&sUnknown_845222C, gUnknown_84439FC}, + {&sUnknown_8452234, gUnknown_8443A78}, + {&sUnknown_845223C, gUnknown_8443AF8}, + {&sUnknown_8452244, gUnknown_8443BB0}, + {&sUnknown_845224C, gUnknown_8443C54}, +}; + +static const u16 sUnknown_845228C[] = INCBIN_U16("graphics/pokedex/unk_845228C.bin"); + +static const u8 sUnknown_845230C[][4] = { + {0x0b, 0x03, 0x0b, 0x0b}, +}; + +static const u8 sUnknown_8452310[][4] = { + {0x03, 0x03, 0x0b, 0x03}, + {0x12, 0x09, 0x0a, 0x0b}, +}; + +static const u8 sUnknown_8452318[][4] = { + {0x01, 0x02, 0x09, 0x02}, + {0x0b, 0x09, 0x03, 0x0b}, + {0x15, 0x03, 0x15, 0x0b} +}; + +static const u8 sUnknown_8452324[][4] = { + {0x00, 0x02, 0x06, 0x03}, + {0x07, 0x0a, 0x00, 0x0c}, + {0x0f, 0x0a, 0x16, 0x0b}, + {0x16, 0x02, 0x0f, 0x04} +}; + +const u8 (*const gUnknown_8452334[])[4] = { + sUnknown_845230C, + sUnknown_8452310, + sUnknown_8452318, + sUnknown_8452324, +}; + +static const u8 * const sDexCategoryNamePtrs[] = { + gText_DexCategory_GrasslandPkmn, + gText_DexCategory_ForestPkmn, + gText_DexCategory_WatersEdgePkmn, + gText_DexCategory_SeaPkmn, + gText_DexCategory_CavePkmn, + gText_DexCategory_MountainPkmn, + gText_DexCategory_RoughTerrainPkmn, + gText_DexCategory_UrbanPkmn, + gText_DexCategory_RarePkmn, +}; + +const u16 gUnknown_8452368[] = INCBIN_U16("graphics/pokedex/unk_8452368.gbapal"); + +static const u8 sUnknown_8452388[][30] = { + { + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e + }, { + 0x05, 0x0b, 0x11, 0x17, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e + }, { + 0x02, 0x05, 0x08, 0x0b, 0x0e, 0x11, 0x14, 0x17, 0x1a, 0x1d, + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e + }, { + 0x02, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0d, 0x0f, 0x11, 0x13, + 0x15, 0x17, 0x19, 0x1b, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e + }, { + 0x02, 0x04, 0x05, 0x07, 0x08, 0x0a, 0x0b, 0x0d, 0x0e, 0x10, + 0x11, 0x13, 0x14, 0x16, 0x17, 0x19, 0x1a, 0x1c, 0x1d, 0x1e, + 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e + }, { + 0x01, 0x02, 0x03, 0x04, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, + 0x0d, 0x0f, 0x10, 0x11, 0x13, 0x14, 0x15, 0x17, 0x18, 0x19, + 0x1b, 0x1c, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e + }, { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x08, 0x09, 0x0a, 0x0b, + 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x14, 0x15, 0x16, + 0x17, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1e, 0x1e, 0x1e + }, { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0b, + 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x15, 0x16, + 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1e, 0x1e + }, { + 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, + 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e + }, { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, + 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, + 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d + }, +}; + +static const struct ScrollArrowsTemplate sUnknown_84524B4 = { + .firstArrowType = 0, + .firstX = 16, + .firstY = 80, + .secondArrowType = 1, + .secondX = 224, + .secondY = 80, + .fullyUpThreshold = 0, + .fullyDownThreshold = 0, + .tileTag = 2000, + .palTag = 0xFFFF, + .palNum = 1, +}; + +const struct CursorStruct gUnknown_84524C4 = { + .left = 0, + .top = 160, + .rowWidth = 64, + .rowHeight = 40, + .tileTag = 2002, + .palTag = 0xFFFF, + .palNum = 4, +}; + +#include "data/pokemon/pokedex_categories.h" void sub_81024C0(void) { @@ -239,7 +842,7 @@ void sub_810250C(void) ResetTasks(); ScanlineEffect_Stop(); ResetBgsAndClearDma3BusyFlags(TRUE); - InitBgsFromTemplates(0, gUnknown_8451EBC, NELEMS(gUnknown_8451EBC)); + InitBgsFromTemplates(0, sUnknown_8451EBC, NELEMS(sUnknown_8451EBC)); SetBgTilemapBuffer(3, (u16*)Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(2, (u16*)Alloc(BG_SCREEN_SIZE)); SetBgTilemapBuffer(1, (u16*)Alloc(BG_SCREEN_SIZE)); @@ -248,14 +851,14 @@ void sub_810250C(void) DecompressAndLoadBgGfxUsingHeap(3, (void*)gUnknown_84403AC, BG_SCREEN_SIZE, 0, 0); else DecompressAndLoadBgGfxUsingHeap(3, (void*)gUnknown_8440274, BG_SCREEN_SIZE, 0, 0); - InitWindows(gUnknown_8451ECC); + InitWindows(sUnknown_8451ECC); DeactivateAllTextPrinters(); m4aSoundVSyncOn(); SetVBlankCallback(sub_81024C0); EnableInterrupts(INTR_FLAG_VBLANK); taskId = CreateTask(sub_810287C, 0); gUnknown_203ACF0 = Alloc(sizeof(struct PokedexScreenData)); - *gUnknown_203ACF0 = gUnknown_8451EE4; + *gUnknown_203ACF0 = sUnknown_8451EE4; gUnknown_203ACF0->field_00 = taskId; gUnknown_203ACF0->field_44 = Alloc(NATIONAL_DEX_COUNT * sizeof(struct ListMenuItem)); gUnknown_203ACF0->field_6A = sub_8104BBC(0, 1); @@ -381,9 +984,9 @@ static void sub_810287C(u8 taskId) case 5: ListMenuGetScrollAndRow(gUnknown_203ACF0->field_17, &gUnknown_203ACF0->field_62, NULL); if (IsNationalPokedexEnabled()) - gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&gUnknown_84520E4, &gUnknown_203ACF0->field_62); + gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&sUnknown_84520E4, &gUnknown_203ACF0->field_62); else - gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&gUnknown_84520D4, &gUnknown_203ACF0->field_62); + gUnknown_203ACF0->field_60 = AddScrollIndicatorArrowPair(&sUnknown_84520D4, &gUnknown_203ACF0->field_62); gUnknown_203ACF0->field_01 = 6; break; case 6: @@ -478,12 +1081,12 @@ static void sub_8102C28(void) FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00); FillBgTilemapBufferRect(2, 0x000, 0, 0, 30, 20, 0x11); FillBgTilemapBufferRect(1, 0x000, 0, 0, 30, 20, 0x11); - gUnknown_203ACF0->field_14 = AddWindow(&gUnknown_8451F54); - gUnknown_203ACF0->field_15 = AddWindow(&gUnknown_8451F5C); - gUnknown_203ACF0->field_16 = AddWindow(&gUnknown_8451F64); + gUnknown_203ACF0->field_14 = AddWindow(&sUnknown_8451F54); + gUnknown_203ACF0->field_15 = AddWindow(&sUnknown_8451F5C); + gUnknown_203ACF0->field_16 = AddWindow(&sUnknown_8451F64); if (IsNationalPokedexEnabled()) { - listMenuTemplate = gUnknown_84520BC; + listMenuTemplate = sUnknown_84520BC; listMenuTemplate.windowId = gUnknown_203ACF0->field_14; gUnknown_203ACF0->field_17 = ListMenuInit(&listMenuTemplate, gUnknown_203ACF0->field_12, gUnknown_203ACF0->field_10); FillWindowPixelBuffer(gUnknown_203ACF0->field_16, PIXEL_FILL(0)); @@ -500,7 +1103,7 @@ static void sub_8102C28(void) } else { - listMenuTemplate = gUnknown_8452004; + listMenuTemplate = sUnknown_8452004; listMenuTemplate.windowId = gUnknown_203ACF0->field_14; gUnknown_203ACF0->field_17 = ListMenuInit(&listMenuTemplate, gUnknown_203ACF0->field_12, gUnknown_203ACF0->field_10); FillWindowPixelBuffer(gUnknown_203ACF0->field_16, PIXEL_FILL(0)); @@ -521,7 +1124,7 @@ static void sub_8102C28(void) CopyWindowToVram(gUnknown_203ACF0->field_16, COPYWIN_GFX); } -void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list) +static void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list) { if (!onInit) PlaySE(SE_SELECT); @@ -532,16 +1135,17 @@ void sub_8102EC0(s32 itemIndex, bool8 onInit, struct ListMenu *list) } else { - CopyToWindowPixelBuffer(gUnknown_203ACF0->field_15, gUnknown_84520F4[itemIndex].map, 0x000, 0x000); - LoadPalette(gUnknown_84520F4[itemIndex].pal, 0x10, 0x20); + CopyToWindowPixelBuffer(gUnknown_203ACF0->field_15, sUnknown_84520F4[itemIndex].map, 0x000, 0x000); + LoadPalette(sUnknown_84520F4[itemIndex].pal, 0x10, 0x20); } PutWindowTilemap(gUnknown_203ACF0->field_15); CopyWindowToVram(gUnknown_203ACF0->field_15, COPYWIN_GFX); } -void sub_8102F48(u8 windowId, u32 itemId, u8 y) +static void sub_8102F48(u8 windowId, s32 itemId, u8 y) { - if (itemId > 8 || gUnknown_203ACF0->field_08 & (1 << itemId)) + u32 itemId_ = itemId; + if (itemId_ > 8 || gUnknown_203ACF0->field_08 & (1 << itemId_)) ListMenuOverrideSetColors(1, 0, 3); else ListMenuOverrideSetColors(10, 0, 11); @@ -619,8 +1223,8 @@ static void sub_810317C(void) struct ListMenuTemplate template; FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00); FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); - gUnknown_203ACF0->field_40 = AddWindow(&gUnknown_845216C); - template = gUnknown_8452174; + gUnknown_203ACF0->field_40 = AddWindow(&sUnknown_845216C); + template = sUnknown_8452174; template.items = gUnknown_203ACF0->field_44; template.windowId = gUnknown_203ACF0->field_40; template.totalItems = gUnknown_203ACF0->field_48; @@ -705,8 +1309,8 @@ static void sub_810345C(void) struct ListMenuTemplate template; FillBgTilemapBufferRect(3, 0x00E, 0, 0, 30, 20, 0x00); FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11); - gUnknown_203ACF0->field_40 = AddWindow(&gUnknown_845216C); - template = gUnknown_8452174; + gUnknown_203ACF0->field_40 = AddWindow(&sUnknown_845216C); + template = sUnknown_8452174; template.items = gUnknown_203ACF0->field_44; template.windowId = gUnknown_203ACF0->field_40; template.totalItems = gUnknown_203ACF0->field_48; @@ -845,16 +1449,16 @@ static void sub_8103924(const struct ListMenuTemplate * template, u8 a1) { default: case 0: - gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &gUnknown_845218C, gUnknown_203ACF0->field_36, gUnknown_203ACF0->field_34); + gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &sUnknown_845218C, gUnknown_203ACF0->field_36, gUnknown_203ACF0->field_34); break; case 1: case 2: case 3: case 4: - gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &gUnknown_845218C, gUnknown_203ACF0->field_3A, gUnknown_203ACF0->field_38); + gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &sUnknown_845218C, gUnknown_203ACF0->field_3A, gUnknown_203ACF0->field_38); break; case 5: - gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &gUnknown_845218C, gUnknown_203ACF0->field_3E, gUnknown_203ACF0->field_3C); + gUnknown_203ACF0->field_41 = ListMenuInitInRect(template, &sUnknown_845218C, gUnknown_203ACF0->field_3E, gUnknown_203ACF0->field_3C); break; } } @@ -881,9 +1485,9 @@ static void sub_8103988(u8 a0) static u8 sub_81039F0(void) { - struct ScrollArrowsTemplate template = gUnknown_84521B4; - if (gUnknown_203ACF0->field_48 > gUnknown_8452174.maxShowed) - template.fullyDownThreshold = gUnknown_203ACF0->field_48 - gUnknown_8452174.maxShowed; + struct ScrollArrowsTemplate template = sUnknown_84521B4; + if (gUnknown_203ACF0->field_48 > sUnknown_8452174.maxShowed) + template.fullyDownThreshold = gUnknown_203ACF0->field_48 - sUnknown_8452174.maxShowed; else template.fullyDownThreshold = 0; return AddScrollIndicatorArrowPair(&template, &gUnknown_203ACF0->field_62); @@ -896,7 +1500,7 @@ struct PokedexListItem bool8 caught:1; }; -void sub_8103A40(u8 windowId, s32 itemId, u8 y) +static void sub_8103A40(u8 windowId, s32 itemId, u8 y) { u32 itemId_ = itemId; u16 species = itemId_; @@ -1222,7 +1826,7 @@ static void sub_8103AC8(u8 taskId) static u8 sub_8104234(void) { - struct ScrollArrowsTemplate template = gUnknown_84524B4; + struct ScrollArrowsTemplate template = sUnknown_84524B4; template.fullyUpThreshold = gUnknown_203ACF0->field_29; template.fullyDownThreshold = gUnknown_203ACF0->field_2A - 1; gUnknown_203ACF0->field_62 = gUnknown_203ACF0->field_2B; @@ -1649,10 +2253,10 @@ bool8 sub_8104C64(u16 a0, u8 a1, u8 a2) { struct WindowTemplate template; a2--; - CopyToBgTilemapBufferRect_ChangePalette(3, gUnknown_845228C, gUnknown_8452334[a2][a1][0], gUnknown_8452334[a2][a1][1], 8, 8, a1 + 5); + CopyToBgTilemapBufferRect_ChangePalette(3, sUnknown_845228C, gUnknown_8452334[a2][a1][0], gUnknown_8452334[a2][a1][1], 8, 8, a1 + 5); if (gUnknown_203ACF0->field_20[a1] == 0xFF) { - template = gUnknown_84521C4; + template = sUnknown_84521C4; template.tilemapLeft = gUnknown_8452334[a2][a1][0]; template.tilemapTop = gUnknown_8452334[a2][a1][1]; template.paletteNum = a1 + 1; @@ -1670,7 +2274,7 @@ bool8 sub_8104C64(u16 a0, u8 a1, u8 a2) { if (a0 != SPECIES_NONE) { - template = gUnknown_84521CC; + template = sUnknown_84521CC; template.tilemapLeft = gUnknown_8452334[a2][a1][2]; template.tilemapTop = gUnknown_8452334[a2][a1][3]; template.baseBlock = a1 * 40 + 0x108; @@ -1719,11 +2323,11 @@ bool8 sub_8104F0C(bool8 a0) FillWindowPixelBuffer(0, PIXEL_FILL(15)); if (a0) { - sub_8106E78(gDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 1); + sub_8106E78(sDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 1); } else { - sub_8106E78(gDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 0); + sub_8106E78(sDexCategoryNamePtrs[gUnknown_203ACF0->field_28], 0); sub_8104EC0(0, sub_8106AF8(gUnknown_203ACF0->field_2B), sub_8106AF8(gUnknown_203ACF0->field_2A - 1), 160, 2); } CopyWindowToVram(0, COPYWIN_GFX); @@ -1824,7 +2428,7 @@ bool8 sub_81051F0(u8 a0) u16 *sp0C = gUnknown_203ACF0->field_5C + 0x000; for (i = 0; i < 30; i++) { - r4 = gUnknown_8452388[a0][i]; + r4 = sUnknown_8452388[a0][i]; if (r4 == 30) { sub_81051D0(0x000, bg1buff, i); |