From 19c25a8f2b3145b6a053cf3af9a76b306dbf3a88 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 21 Dec 2017 22:56:20 +0100 Subject: [PATCH] start dumping pokedex --- asm/pokedex.s | 10 +- data/pokedex.s | 12 +- include/data/pokedex_orders.h | 1199 +++++++++++++++++++++++++++++++++ ld_script.txt | 2 + src/pokedex.c | 295 ++++++++ 5 files changed, 1504 insertions(+), 14 deletions(-) create mode 100644 include/data/pokedex_orders.h create mode 100644 src/pokedex.c diff --git a/asm/pokedex.s b/asm/pokedex.s index a0edbab0e..3f7f55178 100644 --- a/asm/pokedex.s +++ b/asm/pokedex.s @@ -2609,7 +2609,7 @@ _080BCACC: movs r7, 0x1 mov r9, r7 _080BCADA: - ldr r1, =gUnknown_0855C6A4 + ldr r1, =gPokedexOrder_Alphabetical lsls r4, 16 asrs r0, r4, 15 adds r0, r1 @@ -2687,7 +2687,7 @@ _080BCB78: ldr r7, =gUnknown_02039B4C ldr r6, =0x0000060c _080BCB82: - ldr r1, =gUnknown_0855C9DA + ldr r1, =gPokedexOrder_Weight asrs r0, 15 adds r0, r1 ldrh r0, [r0] @@ -2752,7 +2752,7 @@ _080BCC08: ldr r0, =0x00000181 mov r9, r0 _080BCC16: - ldr r1, =gUnknown_0855C9DA + ldr r1, =gPokedexOrder_Weight lsls r4, 16 asrs r0, r4, 15 adds r0, r1 @@ -2819,7 +2819,7 @@ _080BCCA0: ldr r7, =gUnknown_02039B4C ldr r6, =0x0000060c _080BCCAA: - ldr r1, =gUnknown_0855CCDE + ldr r1, =gPokedexOrder_Height asrs r0, 15 adds r0, r1 ldrh r0, [r0] @@ -2884,7 +2884,7 @@ _080BCD30: ldr r0, =0x00000181 mov r9, r0 _080BCD3E: - ldr r1, =gUnknown_0855CCDE + ldr r1, =gPokedexOrder_Height lsls r4, 16 asrs r0, r4, 15 adds r0, r1 diff --git a/data/pokedex.s b/data/pokedex.s index 3ba94dbc5..02e8a78a4 100644 --- a/data/pokedex.s +++ b/data/pokedex.s @@ -3,15 +3,9 @@ .section .rodata .align 2, 0 - -gUnknown_0855C6A4:: @ 855C6A4 - .incbin "baserom.gba", 0x55c6a4, 0x336 - -gUnknown_0855C9DA:: @ 855C9DA - .incbin "baserom.gba", 0x55c9da, 0x304 - -gUnknown_0855CCDE:: @ 855CCDE - .incbin "baserom.gba", 0x55ccde, 0x4b6 + +gUnknown_0855D114:: @ 855D114 + .incbin "baserom.gba", 0x55D114, 0x80 gUnknown_0855D194:: @ 855D194 .incbin "baserom.gba", 0x55d194, 0x18 diff --git a/include/data/pokedex_orders.h b/include/data/pokedex_orders.h new file mode 100644 index 000000000..61fbd289c --- /dev/null +++ b/include/data/pokedex_orders.h @@ -0,0 +1,1199 @@ +#ifndef GUARD_DATA_POKEDEX_ORDERS +#define GUARD_DATA_POKEDEX_ORDERS + +const u16 gPokedexOrder_Alphabetical[] = +{ + 387, + 388, + 389, + 390, + 391, + 392, + 393, + 394, + 395, + 396, + 397, + 398, + 399, + 400, + 401, + 402, + 403, + 404, + 405, + 406, + 407, + 408, + 409, + 410, + 411, + 63, // Abra + 359, // Absol + 142, // Aerodactyl + 306, // Aggron + 190, // Aipom + 65, // Alakazam + 334, // Altaria + 181, // Ampharos + 347, // Anorith + 24, // Arbok + 59, // Arcanine + 168, // Ariados + 348, // Armaldo + 304, // Aron + 144, // Articuno + 184, // Azumarill + 298, // Azurill + 371, // Bagon + 343, // Baltoy + 354, // Banette + 339, // Barboach + 153, // Bayleef + 267, // Beautifly + 15, // Beedrill + 374, // Beldum + 182, // Bellossom + 69, // Bellsprout + 9, // Blastoise + 257, // Blaziken + 242, // Blissey + 286, // Breloom + 1, // Bulbasaur + 12, // Butterfree + 331, // Cacnea + 332, // Cacturne + 323, // Camerupt + 318, // Carvanha + 268, // Cascoon + 351, // Castform + 10, // Caterpie + 251, // Celebi + 113, // Chansey + 6, // Charizard + 4, // Charmander + 5, // Charmeleon + 152, // Chikorita + 358, // Chimecho + 170, // Chinchou + 366, // Clamperl + 344, // Claydol + 36, // Clefable + 35, // Clefairy + 173, // Cleffa + 91, // Cloyster + 256, // Combusken + 341, // Corphish + 222, // Corsola + 346, // Cradily + 342, // Crawdaunt + 169, // Crobat + 159, // Croconaw + 104, // Cubone + 155, // Cyndaquil + 301, // Delcatty + 225, // Delibird + 386, // Deoxys + 87, // Dewgong + 50, // Diglett + 132, // Ditto + 85, // Dodrio + 84, // Doduo + 232, // Donphan + 148, // Dragonair + 149, // Dragonite + 147, // Dratini + 96, // Drowzee + 51, // Dugtrio + 206, // Dunsparce + 356, // Dusclops + 355, // Duskull + 269, // Dustox + 133, // Eevee + 23, // Ekans + 125, // Electabuzz + 309, // Electrike + 101, // Electrode + 239, // Elekid + 244, // Entei + 196, // Espeon + 102, // Exeggcute + 103, // Exeggutor + 295, // Exploud + 83, // Farfetch'd + 22, // Fearow + 349, // Feebas + 160, // Feraligatr + 180, // Flaaffy + 136, // Flareon + 330, // Flygon + 205, // Forretress + 162, // Furret + 282, // Gardevoir + 92, // Gastly + 94, // Gengar + 74, // Geodude + 203, // Girafarig + 362, // Glalie + 207, // Gligar + 44, // Gloom + 42, // Golbat + 118, // Goldeen + 55, // Golduck + 76, // Golem + 368, // Gorebyss + 210, // Granbull + 75, // Graveler + 88, // Grimer + 383, // Groudon + 253, // Grovyle + 58, // Growlithe + 326, // Grumpig + 316, // Gulpin + 130, // Gyarados + 297, // Hariyama + 93, // Haunter + 214, // Heracross + 107, // Hitmonchan + 106, // Hitmonlee + 237, // Hitmontop + 250, // Ho-Oh + 163, // Hoothoot + 187, // Hoppip + 116, // Horsea + 229, // Houndoom + 228, // Houndour + 367, // Huntail + 97, // Hypno + 174, // Igglybuff + 314, // Illumise + 2, // Ivysaur + 39, // Jigglypuff + 385, // Jirachi + 135, // Jolteon + 189, // Jumpluff + 124, // Jynx + 140, // Kabuto + 141, // Kabutops + 64, // Kadabra + 14, // Kakuna + 115, // Kangaskhan + 352, // Kecleon + 230, // Kingdra + 99, // Kingler + 281, // Kirlia + 109, // Koffing + 98, // Krabby + 382, // Kyogre + 305, // Lairon + 171, // Lanturn + 131, // Lapras + 246, // Larvitar + 380, // Latias + 381, // Latios + 166, // Ledian + 165, // Ledyba + 108, // Lickitung + 345, // Lileep + 264, // Linoone + 271, // Lombre + 270, // Lotad + 294, // Loudred + 272, // Ludicolo + 249, // Lugia + 337, // Lunatone + 370, // Luvdisc + 68, // Machamp + 67, // Machoke + 66, // Machop + 240, // Magby + 219, // Magcargo + 129, // Magikarp + 126, // Magmar + 81, // Magnemite + 82, // Magneton + 296, // Makuhita + 310, // Manectric + 56, // Mankey + 226, // Mantine + 179, // Mareep + 183, // Marill + 105, // Marowak + 259, // Marshtomp + 284, // Masquerain + 303, // Mawile + 308, // Medicham + 307, // Meditite + 154, // Meganium + 52, // Meowth + 376, // Metagross + 375, // Metang + 11, // Metapod + 151, // Mew + 150, // Mewtwo + 262, // Mightyena + 350, // Milotic + 241, // Miltank + 312, // Minun + 200, // Misdreavus + 146, // Moltres + 122, // Mr. mime + 258, // Mudkip + 89, // Muk + 198, // Murkrow + 177, // Natu + 34, // Nidoking + 31, // Nidoqueen + 29, // Nidoran? + 32, // Nidoran? + 30, // Nidorina + 33, // Nidorino + 290, // Nincada + 38, // Ninetales + 291, // Ninjask + 164, // Noctowl + 299, // Nosepass + 322, // Numel + 274, // Nuzleaf + 224, // Octillery + 43, // Oddish + 138, // Omanyte + 139, // Omastar + 95, // Onix + 46, // Paras + 47, // Parasect + 279, // Pelipper + 53, // Persian + 231, // Phanpy + 172, // Pichu + 18, // Pidgeot + 17, // Pidgeotto + 16, // Pidgey + 25, // Pikachu + 221, // Piloswine + 204, // Pineco + 127, // Pinsir + 311, // Plusle + 186, // Politoed + 60, // Poliwag + 61, // Poliwhirl + 62, // Poliwrath + 77, // Ponyta + 261, // Poochyena + 137, // Porygon + 233, // Porygon2 + 57, // Primeape + 54, // Psyduck + 247, // Pupitar + 195, // Quagsire + 156, // Quilava + 211, // Qwilfish + 26, // Raichu + 243, // Raikou + 280, // Ralts + 78, // Rapidash + 20, // Raticate + 19, // Rattata + 384, // Rayquaza + 378, // Regice + 377, // Regirock + 379, // Registeel + 369, // Relicanth + 223, // Remoraid + 112, // Rhydon + 111, // Rhyhorn + 315, // Roselia + 302, // Sableye + 373, // Salamence + 27, // Sandshrew + 28, // Sandslash + 254, // Sceptile + 212, // Scizor + 123, // Scyther + 117, // Seadra + 119, // Seaking + 364, // Sealeo + 273, // Seedot + 86, // Seel + 161, // Sentret + 336, // Seviper + 319, // Sharpedo + 292, // Shedinja + 372, // Shelgon + 90, // Shellder + 275, // Shiftry + 285, // Shroomish + 213, // Shuckle + 353, // Shuppet + 266, // Silcoon + 227, // Skarmory + 188, // Skiploom + 300, // Skitty + 289, // Slaking + 287, // Slakoth + 80, // Slowbro + 199, // Slowking + 79, // Slowpoke + 218, // Slugma + 235, // Smeargle + 238, // Smoochum + 215, // Sneasel + 143, // Snorlax + 361, // Snorunt + 209, // Snubbull + 338, // Solrock + 21, // Spearow + 363, // Spheal + 167, // Spinarak + 327, // Spinda + 325, // Spoink + 7, // Squirtle + 234, // Stantler + 121, // Starmie + 120, // Staryu + 208, // Steelix + 185, // Sudowoodo + 245, // Suicune + 192, // Sunflora + 191, // Sunkern + 283, // Surskit + 333, // Swablu + 317, // Swalot + 260, // Swampert + 277, // Swellow + 220, // Swinub + 276, // Taillow + 114, // Tangela + 128, // Tauros + 216, // Teddiursa + 72, // Tentacool + 73, // Tentacruel + 175, // Togepi + 176, // Togetic + 255, // Torchic + 324, // Torkoal + 158, // Totodile + 328, // Trapinch + 252, // Treecko + 357, // Tropius + 157, // Typhlosion + 248, // Tyranitar + 236, // Tyrogue + 197, // Umbreon + 201, // Unown + 217, // Ursaring + 134, // Vaporeon + 49, // Venomoth + 48, // Venonat + 3, // Venusaur + 329, // Vibrava + 71, // Victreebel + 288, // Vigoroth + 45, // Vileplume + 313, // Volbeat + 100, // Voltorb + 37, // Vulpix + 320, // Wailmer + 321, // Wailord + 365, // Walrein + 8, // Wartortle + 13, // Weedle + 70, // Weepinbell + 110, // Weezing + 340, // Whiscash + 293, // Whismur + 40, // Wigglytuff + 278, // Wingull + 202, // Wobbuffet + 194, // Wooper + 265, // Wurmple + 360, // Wynaut + 178, // Xatu + 193, // Yanma + 335, // Zangoose + 145, // Zapdos + 263, // Zigzagoon + 41, // Zubat +}; + +const u16 gPokedexOrder_Weight[] = +{ + 92, // Gastly + 93, // Haunter + 187, // Hoppip + 50, // Diglett + 351, // Castform + 109, // Koffing + 174, // Igglybuff + 200, // Misdreavus + 358, // Chimecho + 188, // Skiploom + 385, // Jirachi + 333, // Swablu + 292, // Shedinja + 175, // Togepi + 283, // Surskit + 16, // Pidgey + 191, // Sunkern + 339, // Barboach + 172, // Pichu + 298, // Azurill + 315, // Roselia + 177, // Natu + 21, // Spearow + 198, // Murkrow + 353, // Shuppet + 276, // Taillow + 102, // Exeggcute + 255, // Torchic + 270, // Lotad + 10, // Caterpie + 189, // Jumpluff + 173, // Cleffa + 13, // Weedle + 176, // Togetic + 147, // Dratini + 19, // Rattata + 284, // Masquerain + 265, // Wurmple + 211, // Qwilfish + 151, // Mew + 90, // Shellder + 273, // Seedot + 132, // Ditto + 69, // Bellsprout + 311, // Plusle + 52, // Meowth + 312, // Minun + 285, // Shroomish + 251, // Celebi + 222, // Corsola + 252, // Treecko + 327, // Spinda + 201, // Unown + 46, // Paras + 43, // Oddish + 39, // Jigglypuff + 290, // Nincada + 182, // Bellossom + 81, // Magnemite + 25, // Pikachu + 238, // Smoochum + 161, // Sentret + 70, // Weepinbell + 152, // Chikorita + 220, // Swinub + 133, // Eevee + 98, // Krabby + 104, // Cubone + 280, // Ralts + 1, // Bulbasaur + 23, // Ekans + 29, // Nidoran? + 204, // Pineco + 349, // Feebas + 138, // Omanyte + 41, // Zubat + 35, // Clefairy + 258, // Mudkip + 209, // Snubbull + 179, // Mareep + 155, // Cyndaquil + 116, // Horsea + 4, // Charmander + 192, // Sunflora + 183, // Marill + 194, // Wooper + 167, // Spinarak + 44, // Gloom + 370, // Luvdisc + 216, // Teddiursa + 32, // Nidoran? + 7, // Squirtle + 278, // Wingull + 158, // Totodile + 110, // Weezing + 37, // Vulpix + 11, // Metapod + 266, // Silcoon + 129, // Magikarp + 14, // Kakuna + 316, // Gulpin + 100, // Voltorb + 165, // Ledyba + 228, // Houndour + 300, // Skitty + 302, // Sableye + 307, // Meditite + 341, // Corphish + 190, // Aipom + 268, // Cascoon + 303, // Mawile + 140, // Kabuto + 40, // Wigglytuff + 27, // Sandshrew + 223, // Remoraid + 291, // Ninjask + 170, // Chinchou + 60, // Poliwag + 347, // Anorith + 49, // Venomoth + 354, // Banette + 2, // Ivysaur + 180, // Flaaffy + 261, // Poochyena + 360, // Wynaut + 206, // Dunsparce + 178, // Xatu + 355, // Duskull + 83, // Farfetch'd + 328, // Trapinch + 118, // Goldeen + 309, // Electrike + 329, // Vibrava + 71, // Victreebel + 153, // Bayleef + 225, // Delibird + 293, // Whismur + 148, // Dragonair + 361, // Snorunt + 263, // Zigzagoon + 314, // Illumise + 313, // Volbeat + 20, // Raticate + 45, // Vileplume + 156, // Quilava + 5, // Charmeleon + 58, // Growlithe + 256, // Combusken + 66, // Machop + 63, // Abra + 33, // Nidorino + 54, // Psyduck + 277, // Swellow + 38, // Ninetales + 30, // Nidorina + 61, // Poliwhirl + 74, // Geodude + 281, // Kirlia + 213, // Shuckle + 334, // Altaria + 318, // Carvanha + 236, // Tyrogue + 163, // Hoothoot + 240, // Magby + 343, // Baltoy + 253, // Grovyle + 352, // Kecleon + 171, // Lanturn + 8, // Wartortle + 368, // Gorebyss + 369, // Relicanth + 239, // Elekid + 340, // Whiscash + 345, // Lileep + 322, // Numel + 287, // Slakoth + 135, // Jolteon + 159, // Croconaw + 136, // Flareon + 117, // Seadra + 196, // Espeon + 367, // Huntail + 197, // Umbreon + 259, // Marshtomp + 274, // Nuzleaf + 215, // Sneasel + 56, // Mankey + 279, // Pelipper + 267, // Beautifly + 224, // Octillery + 184, // Azumarill + 202, // Wobbuffet + 134, // Vaporeon + 28, // Sandslash + 47, // Parasect + 15, // Beedrill + 89, // Muk + 17, // Pidgeotto + 88, // Grimer + 26, // Raichu + 77, // Ponyta + 125, // Electabuzz + 48, // Venonat + 325, // Spoink + 356, // Dusclops + 308, // Medicham + 269, // Dustox + 53, // Persian + 12, // Butterfree + 57, // Primeape + 96, // Drowzee + 162, // Furret + 233, // Porygon2 + 271, // Lombre + 264, // Linoone + 301, // Delcatty + 342, // Crawdaunt + 51, // Dugtrio + 168, // Ariados + 231, // Phanpy + 186, // Politoed + 120, // Staryu + 113, // Chansey + 139, // Omastar + 114, // Tangela + 218, // Slugma + 229, // Houndoom + 166, // Ledian + 79, // Slowpoke + 137, // Porygon + 262, // Mightyena + 193, // Yanma + 22, // Fearow + 185, // Sudowoodo + 119, // Seaking + 286, // Breloom + 84, // Doduo + 18, // Pidgeot + 363, // Spheal + 36, // Clefable + 380, // Latias + 310, // Manectric + 335, // Zangoose + 141, // Kabutops + 94, // Gengar + 294, // Loudred + 124, // Jynx + 164, // Noctowl + 203, // Girafarig + 371, // Bagon + 126, // Magmar + 105, // Marowak + 72, // Tentacool + 288, // Vigoroth + 242, // Blissey + 359, // Absol + 65, // Alakazam + 237, // Hitmontop + 282, // Gardevoir + 210, // Granbull + 106, // Hitmonlee + 107, // Hitmonchan + 227, // Skarmory + 331, // Cacnea + 257, // Blaziken + 254, // Sceptile + 336, // Seviper + 366, // Clamperl + 145, // Zapdos + 214, // Heracross + 62, // Poliwrath + 122, // Mr. mime + 127, // Pinsir + 272, // Ludicolo + 73, // Tentacruel + 42, // Golbat + 219, // Magcargo + 144, // Articuno + 221, // Piloswine + 123, // Scyther + 64, // Kadabra + 235, // Smeargle + 142, // Aerodactyl + 275, // Shiftry + 99, // Kingler + 31, // Nidoqueen + 82, // Magneton + 304, // Aron + 381, // Latios + 146, // Moltres + 346, // Cradily + 386, // Deoxys + 181, // Ampharos + 34, // Nidoking + 207, // Gligar + 24, // Arbok + 108, // Lickitung + 101, // Electrode + 348, // Armaldo + 67, // Machoke + 234, // Stantler + 326, // Grumpig + 246, // Larvitar + 169, // Crobat + 195, // Quagsire + 241, // Miltank + 97, // Hypno + 55, // Golduck + 332, // Cacturne + 80, // Slowbro + 157, // Typhlosion + 199, // Slowking + 115, // Kangaskhan + 121, // Starmie + 317, // Swalot + 324, // Torkoal + 260, // Swampert + 330, // Flygon + 295, // Exploud + 85, // Dodrio + 9, // Blastoise + 296, // Makuhita + 364, // Sealeo + 128, // Tauros + 319, // Sharpedo + 160, // Feraligatr + 86, // Seel + 6, // Charizard + 78, // Rapidash + 374, // Beldum + 299, // Nosepass + 3, // Venusaur + 357, // Tropius + 154, // Meganium + 373, // Salamence + 75, // Graveler + 344, // Claydol + 372, // Shelgon + 111, // Rhyhorn + 212, // Scizor + 87, // Dewgong + 112, // Rhydon + 232, // Donphan + 103, // Exeggutor + 305, // Lairon + 150, // Mewtwo + 217, // Ursaring + 205, // Forretress + 68, // Machamp + 320, // Wailmer + 289, // Slaking + 91, // Cloyster + 365, // Walrein + 247, // Pupitar + 230, // Kingdra + 338, // Solrock + 59, // Arcanine + 350, // Milotic + 337, // Lunatone + 378, // Regice + 243, // Raikou + 245, // Suicune + 244, // Entei + 250, // Ho-Oh + 248, // Tyranitar + 375, // Metang + 379, // Registeel + 384, // Rayquaza + 95, // Onix + 149, // Dragonite + 249, // Lugia + 131, // Lapras + 323, // Camerupt + 226, // Mantine + 377, // Regirock + 130, // Gyarados + 297, // Hariyama + 362, // Glalie + 76, // Golem + 382, // Kyogre + 306, // Aggron + 321, // Wailord + 208, // Steelix + 143, // Snorlax + 376, // Metagross + 383, // Groudon +}; + +const u16 gPokedexOrder_Height[] = +{ + 50, // Diglett + 298, // Azurill + 177, // Natu + 13, // Weedle + 172, // Pichu + 173, // Cleffa + 175, // Togepi + 351, // Castform + 174, // Igglybuff + 10, // Caterpie + 276, // Taillow + 132, // Ditto + 133, // Eevee + 315, // Roselia + 21, // Spearow + 16, // Pidgey + 191, // Sunkern + 90, // Shellder + 19, // Rattata + 81, // Magnemite + 46, // Paras + 265, // Wurmple + 385, // Jirachi + 104, // Cubone + 258, // Mudkip + 194, // Wooper + 116, // Horsea + 52, // Meowth + 29, // Nidoran? + 220, // Swinub + 151, // Mew + 333, // Swablu + 304, // Aron + 311, // Plusle + 312, // Minun + 102, // Exeggcute + 25, // Pikachu + 182, // Bellossom + 316, // Gulpin + 263, // Zigzagoon + 285, // Shroomish + 138, // Omanyte + 331, // Cacnea + 98, // Krabby + 280, // Ralts + 187, // Hoppip + 255, // Torchic + 366, // Clamperl + 74, // Geodude + 183, // Marill + 339, // Barboach + 238, // Smoochum + 100, // Voltorb + 290, // Nincada + 302, // Sableye + 198, // Murkrow + 211, // Qwilfish + 7, // Squirtle + 252, // Treecko + 343, // Baltoy + 43, // Oddish + 270, // Lotad + 39, // Jigglypuff + 283, // Surskit + 155, // Cyndaquil + 140, // Kabuto + 264, // Linoone + 324, // Torkoal + 32, // Nidoran? + 167, // Spinarak + 56, // Mankey + 273, // Seedot + 261, // Poochyena + 231, // Phanpy + 201, // Unown + 170, // Chinchou + 233, // Porygon2 + 60, // Poliwag + 371, // Bagon + 349, // Feebas + 353, // Shuppet + 158, // Totodile + 251, // Celebi + 360, // Wynaut + 27, // Sandshrew + 358, // Chimecho + 370, // Luvdisc + 228, // Houndour + 266, // Silcoon + 309, // Electrike + 4, // Charmander + 307, // Meditite + 278, // Wingull + 223, // Remoraid + 341, // Corphish + 222, // Corsola + 314, // Illumise + 209, // Snubbull + 37, // Vulpix + 246, // Larvitar + 374, // Beldum + 293, // Whismur + 204, // Pineco + 239, // Elekid + 35, // Clefairy + 213, // Shuckle + 216, // Teddiursa + 14, // Kakuna + 300, // Skitty + 176, // Togetic + 118, // Goldeen + 303, // Mawile + 179, // Mareep + 188, // Skiploom + 109, // Koffing + 51, // Dugtrio + 268, // Cascoon + 322, // Numel + 347, // Anorith + 313, // Volbeat + 163, // Hoothoot + 328, // Trapinch + 325, // Spoink + 11, // Metapod + 69, // Bellsprout + 361, // Snorunt + 20, // Raticate + 259, // Marshtomp + 277, // Swellow + 240, // Magby + 58, // Growlithe + 200, // Misdreavus + 1, // Bulbasaur + 236, // Tyrogue + 218, // Slugma + 287, // Slakoth + 281, // Kirlia + 190, // Aipom + 135, // Jolteon + 30, // Nidorina + 184, // Azumarill + 292, // Shedinja + 66, // Machop + 291, // Ninjask + 284, // Masquerain + 355, // Duskull + 192, // Sunflora + 189, // Jumpluff + 120, // Staryu + 180, // Flaaffy + 363, // Spheal + 54, // Psyduck + 219, // Magcargo + 83, // Farfetch'd + 41, // Zubat + 137, // Porygon + 161, // Sentret + 318, // Carvanha + 44, // Gloom + 26, // Raichu + 129, // Magikarp + 215, // Sneasel + 305, // Lairon + 256, // Combusken + 224, // Octillery + 33, // Nidorino + 136, // Flareon + 225, // Delibird + 72, // Tentacool + 63, // Abra + 253, // Grovyle + 340, // Whiscash + 156, // Quilava + 196, // Espeon + 88, // Grimer + 152, // Chikorita + 326, // Grumpig + 299, // Nosepass + 53, // Persian + 262, // Mightyena + 48, // Venonat + 82, // Magneton + 77, // Ponyta + 296, // Makuhita + 337, // Lunatone + 28, // Sandslash + 96, // Drowzee + 114, // Tangela + 57, // Primeape + 165, // Ledyba + 40, // Wigglytuff + 47, // Parasect + 139, // Omastar + 294, // Loudred + 8, // Wartortle + 75, // Graveler + 197, // Umbreon + 345, // Lileep + 61, // Poliwhirl + 134, // Vaporeon + 15, // Beedrill + 105, // Marowak + 70, // Weepinbell + 369, // Relicanth + 111, // Rhyhorn + 2, // Ivysaur + 352, // Kecleon + 274, // Nuzleaf + 267, // Beautifly + 17, // Pidgeotto + 168, // Ariados + 86, // Seel + 186, // Politoed + 159, // Croconaw + 113, // Chansey + 354, // Banette + 232, // Donphan + 121, // Starmie + 5, // Charmeleon + 221, // Piloswine + 12, // Butterfree + 329, // Vibrava + 125, // Electabuzz + 342, // Crawdaunt + 301, // Delcatty + 334, // Altaria + 372, // Shelgon + 38, // Ninetales + 207, // Gligar + 364, // Sealeo + 327, // Spinda + 247, // Pupitar + 79, // Slowpoke + 338, // Solrock + 241, // Miltank + 22, // Fearow + 45, // Vileplume + 89, // Muk + 205, // Forretress + 185, // Sudowoodo + 359, // Absol + 193, // Yanma + 269, // Dustox + 108, // Lickitung + 235, // Smeargle + 171, // Lanturn + 101, // Electrode + 271, // Lombre + 286, // Breloom + 153, // Bayleef + 117, // Seadra + 110, // Weezing + 279, // Pelipper + 375, // Metang + 31, // Nidoqueen + 332, // Cacturne + 275, // Shiftry + 308, // Medicham + 335, // Zangoose + 141, // Kabutops + 99, // Kingler + 64, // Kadabra + 119, // Seaking + 36, // Clefable + 126, // Magmar + 202, // Wobbuffet + 92, // Gastly + 122, // Mr. mime + 62, // Poliwrath + 128, // Tauros + 380, // Latias + 181, // Ampharos + 288, // Vigoroth + 166, // Ledian + 76, // Golem + 365, // Walrein + 84, // Doduo + 229, // Houndoom + 34, // Nidoking + 124, // Jynx + 107, // Hitmonchan + 234, // Stantler + 210, // Granbull + 237, // Hitmontop + 195, // Quagsire + 344, // Claydol + 260, // Swampert + 242, // Blissey + 272, // Ludicolo + 295, // Exploud + 206, // Dunsparce + 127, // Pinsir + 91, // Cloyster + 67, // Machoke + 203, // Girafarig + 18, // Pidgeot + 178, // Xatu + 346, // Cradily + 106, // Hitmonlee + 49, // Venomoth + 94, // Gengar + 214, // Heracross + 362, // Glalie + 123, // Scyther + 373, // Salamence + 310, // Manectric + 348, // Armaldo + 65, // Alakazam + 97, // Hypno + 164, // Noctowl + 73, // Tentacruel + 356, // Dusclops + 145, // Zapdos + 42, // Golbat + 376, // Metagross + 282, // Gardevoir + 9, // Blastoise + 80, // Slowbro + 93, // Haunter + 68, // Machamp + 377, // Regirock + 317, // Swalot + 254, // Sceptile + 227, // Skarmory + 55, // Golduck + 386, // Deoxys + 71, // Victreebel + 78, // Rapidash + 6, // Charizard + 367, // Huntail + 87, // Dewgong + 144, // Articuno + 157, // Typhlosion + 142, // Aerodactyl + 368, // Gorebyss + 217, // Ursaring + 154, // Meganium + 378, // Regice + 212, // Scizor + 230, // Kingdra + 147, // Dratini + 85, // Dodrio + 319, // Sharpedo + 169, // Crobat + 162, // Furret + 59, // Arcanine + 243, // Raikou + 257, // Blaziken + 323, // Camerupt + 112, // Rhydon + 379, // Registeel + 23, // Ekans + 330, // Flygon + 357, // Tropius + 381, // Latios + 245, // Suicune + 146, // Moltres + 3, // Venusaur + 103, // Exeggutor + 199, // Slowking + 248, // Tyranitar + 289, // Slaking + 320, // Wailmer + 150, // Mewtwo + 306, // Aggron + 143, // Snorlax + 226, // Mantine + 244, // Entei + 149, // Dragonite + 115, // Kangaskhan + 297, // Hariyama + 160, // Feraligatr + 131, // Lapras + 336, // Seviper + 24, // Arbok + 383, // Groudon + 250, // Ho-Oh + 148, // Dragonair + 382, // Kyogre + 249, // Lugia + 350, // Milotic + 130, // Gyarados + 384, // Rayquaza + 95, // Onix + 208, // Steelix + 321, // Wailord +}; + +#endif // GUARD_DATA_POKEDEX_ORDERS diff --git a/ld_script.txt b/ld_script.txt index 508265cbf..f5b7ab94c 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -127,6 +127,7 @@ SECTIONS { asm/field_effect.o(.text); asm/unknown_task.o(.text); asm/option_menu.o(.text); + src/pokedex.o(.text); asm/pokedex.o(.text); asm/trainer_card.o(.text); src/pokemon_storage_system.o(.text); @@ -383,6 +384,7 @@ SECTIONS { data/wild_encounter.o(.rodata); data/field_effect.o(.rodata); data/option_menu.o(.rodata); + src/pokedex.o(.rodata); data/pokedex.o(.rodata); data/trainer_card.o(.rodata); data/pokemon_storage_system.o(.rodata); diff --git a/src/pokedex.c b/src/pokedex.c new file mode 100644 index 000000000..97716ef8a --- /dev/null +++ b/src/pokedex.c @@ -0,0 +1,295 @@ +#include "global.h" +#include "gba/m4a_internal.h" +#include "pokedex.h" + +#include "data/pokedex_orders.h" + +static const struct OamData gOamData_83A0404 = +{ + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 0, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; +static const struct OamData gOamData_83A040C = +{ + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 1, + .x = 0, + .matrixNum = 0, + .size = 0, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; +static const struct OamData gOamData_83A0414 = +{ + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 1, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; +static const struct OamData gOamData_83A041C = +{ + .y = 160, + .affineMode = 0, + .objMode = 2, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; +static const struct OamData gOamData_83A0424 = +{ + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 1, + .x = 0, + .matrixNum = 0, + .size = 3, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; +static const struct OamData gOamData_83A042C = +{ + .y = 160, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 2, + .x = 0, + .matrixNum = 0, + .size = 0, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + + +static const union AnimCmd sSpriteAnim_855D014[] = +{ + ANIMCMD_FRAME(3, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D01C[] = +{ + ANIMCMD_FRAME(1, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D024[] = +{ + ANIMCMD_FRAME(16, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D02C[] = +{ + ANIMCMD_FRAME(48, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D034[] = +{ + ANIMCMD_FRAME(40, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D03C[] = +{ + ANIMCMD_FRAME(32, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D044[] = +{ + ANIMCMD_FRAME(56, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D04C[] = +{ + ANIMCMD_FRAME(64, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D054[] = +{ + ANIMCMD_FRAME(96, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D05C[] = +{ + ANIMCMD_FRAME(160, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D064[] = +{ + ANIMCMD_FRAME(168, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D06C[] = +{ + ANIMCMD_FRAME(128, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D074[] = +{ + ANIMCMD_FRAME(130, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D07C[] = +{ + ANIMCMD_FRAME(132, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D084[] = +{ + ANIMCMD_FRAME(134, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D08C[] = +{ + ANIMCMD_FRAME(136, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D094[] = +{ + ANIMCMD_FRAME(138, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D09C[] = +{ + ANIMCMD_FRAME(140, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0A4[] = +{ + ANIMCMD_FRAME(142, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0AC[] = +{ + ANIMCMD_FRAME(144, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0B4[] = +{ + ANIMCMD_FRAME(146, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0BC[] = +{ + ANIMCMD_FRAME(176, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0C4[] = +{ + ANIMCMD_FRAME(178, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0CC[] = +{ + ANIMCMD_FRAME(180, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0D4[] = +{ + ANIMCMD_FRAME(182, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0DC[] = +{ + ANIMCMD_FRAME(184, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0E4[] = +{ + ANIMCMD_FRAME(186, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0EC[] = +{ + ANIMCMD_FRAME(188, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0F4[] = +{ + ANIMCMD_FRAME(190, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D0FC[] = +{ + ANIMCMD_FRAME(192, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D104[] = +{ + ANIMCMD_FRAME(194, 30), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_855D10C[] = +{ + ANIMCMD_FRAME(4, 30), + ANIMCMD_END +};