From 8e55a2bd528dfc5527755fb5e45aab1c1607977a Mon Sep 17 00:00:00 2001 From: Philippe Symons Date: Mon, 28 Apr 2025 20:47:55 +0200 Subject: [PATCH] Bundle charsets per gen for slightly better compression and move some tables back as uncompressed The ones I moved back as uncompressed tables (EVOLUTIONS and gen_1_index_array) simply didn't compress well at all. It wasn't worth the runtime decompression cost. --- include/pokemon_data.h | 8 +- source/multiboot_upload.cpp | 17 +- source/pokemon.cpp | 3 +- source/pokemon_data.cpp | 558 +- tools/data-generator/src/pokemon_data.cpp | 5638 ++++++++++----------- 5 files changed, 3120 insertions(+), 3104 deletions(-) diff --git a/include/pokemon_data.h b/include/pokemon_data.h index cbcae02..82b5649 100644 --- a/include/pokemon_data.h +++ b/include/pokemon_data.h @@ -39,8 +39,10 @@ #define NUM_POKEMON 252 #define POKEMON_ARRAY_SIZE NUM_POKEMON + 1 +extern const byte gen_1_index_array[191]; extern const u32 EXP_MAXIMUMS[6]; extern const int GENDER_THRESHOLDS[2][8]; +extern const u8 EVOLUTIONS[POKEMON_ARRAY_SIZE]; /** * Okay, here's the thing: to reduce the rom size, we compressed a bunch of data with ZX0 @@ -67,9 +69,7 @@ public: bool gender_ratios_loaded; bool num_abilities_loaded; bool first_moves_loaded; - bool evolutions_loaded; bool power_points_loaded; - bool gen_1_index_array_loaded; bool event_pkmn_loaded; bool types_loaded; // a number representing the unique combination of gen 1/2 and the specific language @@ -83,9 +83,7 @@ public: u8 GENDER_RATIO[POKEMON_ARRAY_SIZE]; bool NUM_ABILITIES[POKEMON_ARRAY_SIZE]; byte FIRST_MOVES[POKEMON_ARRAY_SIZE]; - u8 EVOLUTIONS[POKEMON_ARRAY_SIZE]; u8 POWER_POINTS[252]; - byte gen_1_index_array[191]; byte EVENT_PKMN[8][80]; u8 TYPES[POKEMON_ARRAY_SIZE][2]; u16 input_charset[256]; @@ -98,9 +96,7 @@ public: void load_gender_ratios(); void load_num_abilities(); void load_first_moves(); - void load_evolutions(); void load_power_points(); - void load_gen1_index_array(); void load_event_pkmn(); void load_types(); void load_input_charset(byte gen, byte lang); diff --git a/source/multiboot_upload.cpp b/source/multiboot_upload.cpp index 7b69c2e..18d766c 100644 --- a/source/multiboot_upload.cpp +++ b/source/multiboot_upload.cpp @@ -5,11 +5,16 @@ #include "libraries/gba-link-connection/LinkCableMultiboot.hpp" #include "text_engine.h" +static void multiboot_show_textbox() +{ + tte_erase_rect(0, 0, RIGHT, BOTTOM); + create_textbox(4, 1, 152, 100, true); +} + void multiboot_upload_screen() { LinkCableMultiboot linkCableMultiboot; - tte_erase_rect(0, 0, RIGHT, BOTTOM); - create_textbox(4, 1, 152, 100, true); + multiboot_show_textbox(); ptgb_write(send_multiboot_instructions, true); // wait for key press @@ -25,8 +30,7 @@ void multiboot_upload_screen() } // start upload - tte_erase_rect(0, 0, RIGHT, BOTTOM); - create_textbox(4, 1, 152, 70, true); + multiboot_show_textbox(); ptgb_write(send_multiboot_wait, true); global_next_frame(); @@ -42,16 +46,13 @@ void multiboot_upload_screen() }); // show result // clear_textbox(); + multiboot_show_textbox(); if (multibootResult == LinkCableMultiboot::Result::SUCCESS) { - tte_erase_rect(0, 0, RIGHT, BOTTOM); - create_textbox(4, 1, 152, 70, true); ptgb_write(send_multiboot_success, true); } else { - tte_erase_rect(0, 0, RIGHT, BOTTOM); - create_textbox(4, 1, 152, 70, true); ptgb_write(send_multiboot_failure, true); } diff --git a/source/pokemon.cpp b/source/pokemon.cpp index 58856c6..05e9862 100644 --- a/source/pokemon.cpp +++ b/source/pokemon.cpp @@ -172,8 +172,7 @@ void Pokemon::convert_to_gen_three(PokemonTables& data_tables, bool simplified, } else { - data_tables.load_gen1_index_array(); - species_index_struct = data_tables.gen_1_index_array[species_index_struct]; + species_index_struct = gen_1_index_array[species_index_struct]; if (species_index_struct == 0xFF) { is_missingno = true; diff --git a/source/pokemon_data.cpp b/source/pokemon_data.cpp index 2b7f4b2..7a36d4a 100644 --- a/source/pokemon_data.cpp +++ b/source/pokemon_data.cpp @@ -4,23 +4,211 @@ #include "GENDER_RATIO_zx0_bin.h" #include "NUM_ABILITIES_zx0_bin.h" #include "FIRST_MOVES_zx0_bin.h" -#include "EVOLUTIONS_zx0_bin.h" #include "POWER_POINTS_zx0_bin.h" -#include "gen_1_index_array_zx0_bin.h" #include "EVENT_PKMN_zx0_bin.h" #include "TYPES_zx0_bin.h" #include "MOVESETS_zx0_bin.h" -#include "gen_1_Jpn_char_array_zx0_bin.h" -#include "gen_1_Eng_char_array_zx0_bin.h" -#include "gen_1_FreGer_char_array_zx0_bin.h" -#include "gen_1_ItaSpa_char_array_zx0_bin.h" -#include "gen_2_Jpn_char_array_zx0_bin.h" -#include "gen_2_Eng_char_array_zx0_bin.h" -#include "gen_2_FreGer_char_array_zx0_bin.h" -#include "gen_2_ItaSpa_char_array_zx0_bin.h" -#include "gen_3_Jpn_char_array_zx0_bin.h" -#include "gen_3_Intern_char_array_zx0_bin.h" +#include "gen_1_charsets_zx0_bin.h" +#include "gen_2_charsets_zx0_bin.h" +#include "gen_3_charsets_zx0_bin.h" #include +#include + +// All data was obtained using PokeAPI +// This data won't compress very well with ZX0 (only 1 byte reduction), so we leave it uncompressed. +const byte gen_1_index_array[191] = { + 0x00, // Offset the list to remove "off by one" errors + 0x70, // Rhydon + 0x73, // Kangaskhan + 0x20, // Nidoran♂ + 0x23, // Clefairy + 0x15, // Spearow + 0x64, // Voltorb + 0x22, // Nidoking + 0x50, // Slowbro + 0x02, // Ivysaur + 0x67, // Exeggutor + 0x6C, // Lickitung + 0x66, // Exeggcute + 0x58, // Grimer + 0x5E, // Gengar + 0x1D, // Nidoran♀ + 0x1F, // Nidoqueen + 0x68, // Cubone + 0x6F, // Rhyhorn + 0x83, // Lapras + 0x3B, // Arcanine + 0x97, // Mew + 0x82, // Gyarados + 0x5A, // Shellder + 0x48, // Tentacool + 0x5C, // Gastly + 0x7B, // Scyther + 0x78, // Staryu + 0x09, // Blastoise + 0x7F, // Pinsir + 0x72, // Tangela + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x3A, // Growlithe + 0x5F, // Onix + 0x16, // Fearow + 0x10, // Pidgey + 0x4F, // Slowpoke + 0x40, // Kadabra + 0x4B, // Graveler + 0x71, // Chansey + 0x43, // Machoke + 0x7A, // Mr. Mime + 0x6A, // Hitmonlee + 0x6B, // Hitmonchan + 0x18, // Arbok + 0x2F, // Parasect + 0x36, // Psyduck + 0x60, // Drowzee + 0x4C, // Golem + 0xFF, // MissingNo. + 0x7E, // Magmar + 0xFF, // MissingNo. + 0x7D, // Electabuzz + 0x52, // Magneton + 0x6D, // Koffing + 0xFF, // MissingNo. + 0x38, // Mankey + 0x56, // Seel + 0x32, // Diglett + 0x80, // Tauros + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x53, // Farfetch'd + 0x30, // Venonat + 0x95, // Dragonite + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x54, // Doduo + 0x3C, // Poliwag + 0x7C, // Jynx + 0x92, // Moltres + 0x90, // Articuno + 0x91, // Zapdos + 0x84, // Ditto + 0x34, // Meowth + 0x62, // Krabby + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x25, // Vulpix + 0x26, // Ninetales + 0x19, // Pikachu + 0x1A, // Raichu + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x93, // Dratini + 0x94, // Dragonair + 0x8C, // Kabuto + 0x8D, // Kabutops + 0x74, // Horsea + 0x75, // Seadra + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x1B, // Sandshrew + 0x1C, // Sandslash + 0x8A, // Omanyte + 0x8B, // Omastar + 0x27, // Jigglypuff + 0x28, // Wigglytuff + 0x85, // Eevee + 0x88, // Flareon + 0x87, // Jolteon + 0x86, // Vaporeon + 0x42, // Machop + 0x29, // Zubat + 0x17, // Ekans + 0x2E, // Paras + 0x3D, // Poliwhirl + 0x3E, // Poliwrath + 0x0D, // Weedle + 0x0E, // Kakuna + 0x0F, // Beedrill + 0xFF, // MissingNo. + 0x55, // Dodrio + 0x39, // Primeape + 0x33, // Dugtrio + 0x31, // Venomoth + 0x57, // Dewgong + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x0A, // Caterpie + 0x0B, // Metapod + 0x0C, // Butterfree + 0x44, // Machamp + 0xFF, // MissingNo. + 0x37, // Golduck + 0x61, // Hypno + 0x2A, // Golbat + 0x96, // Mewtwo + 0x8F, // Snorlax + 0x81, // Magikarp + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x59, // Muk + 0xFF, // MissingNo. + 0x63, // Kingler + 0x5B, // Cloyster + 0xFF, // MissingNo. + 0x65, // Electrode + 0x24, // Clefable + 0x6E, // Weezing + 0x35, // Persian + 0x69, // Marowak + 0xFF, // MissingNo. + 0x5D, // Haunter + 0x3F, // Abra + 0x41, // Alakazam + 0x11, // Pidgeotto + 0x12, // Pidgeot + 0x79, // Starmie + 0x01, // Bulbasaur + 0x03, // Venusaur + 0x49, // Tentacruel + 0xFF, // MissingNo. + 0x76, // Goldeen + 0x77, // Seaking + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x4D, // Ponyta + 0x4E, // Rapidash + 0x13, // Rattata + 0x14, // Raticate + 0x21, // Nidorino + 0x1E, // Nidorina + 0x4A, // Geodude + 0x89, // Porygon + 0x8E, // Aerodactyl + 0xFF, // MissingNo. + 0x51, // Magnemite + 0xFF, // MissingNo. + 0xFF, // MissingNo. + 0x04, // Charmander + 0x07, // Squirtle + 0x05, // Charmeleon + 0x08, // Wartortle + 0x06, // Charizard + 0xFF, // MissingNo. + 0xFF, // Kabutops Fossil MissingNo. + 0xFF, // Aerodactyl Fossil MissingNo. + 0xFF, // Ghost MissingNo. + 0x2B, // Oddish + 0x2C, // Gloom + 0x2D, // Vileplume + 0x45, // Bellsprout + 0x46, // Weepinbell + 0x47, // Victreebel +}; // Indexes found here: https://bulbapedia.bulbagarden.net/wiki/Experience#In_the_core_series const u32 EXP_MAXIMUMS[6] = { @@ -35,6 +223,264 @@ const int GENDER_THRESHOLDS[2][8]{ {-1, 2, 4, 8, 12, 14, -1, -1}, {-1, 31, 63, 127, 191, 225, -1, -1}}; +// The EVOLUTIONS table won't compress well with ZX0 (it would only save 12 bytes), so it's not worth the +// decompression runtime cost. Therefore we leave it uncompressed. +const u8 EVOLUTIONS[POKEMON_ARRAY_SIZE]{ + 0, // Offset the list to remove "off by one" errors + 0x0, // Bulbasaur is a base evolution + 0x1, // Ivysaur evolves from Bulbasaur + 0x2, // Venusaur evolves from Ivysaur + 0x0, // Charmander is a base evolution + 0x4, // Charmeleon evolves from Charmander + 0x5, // Charizard evolves from Charmeleon + 0x0, // Squirtle is a base evolution + 0x7, // Wartortle evolves from Squirtle + 0x8, // Blastoise evolves from Wartortle + 0x0, // Caterpie is a base evolution + 0xa, // Metapod evolves from Caterpie + 0xb, // Butterfree evolves from Metapod + 0x0, // Weedle is a base evolution + 0xd, // Kakuna evolves from Weedle + 0xe, // Beedrill evolves from Kakuna + 0x0, // Pidgey is a base evolution + 0x10, // Pidgeotto evolves from Pidgey + 0x11, // Pidgeot evolves from Pidgeotto + 0x0, // Rattata is a base evolution + 0x13, // Raticate evolves from Rattata + 0x0, // Spearow is a base evolution + 0x15, // Fearow evolves from Spearow + 0x0, // Ekans is a base evolution + 0x17, // Arbok evolves from Ekans + 0xac, // Pikachu evolves from Pichu + 0x19, // Raichu evolves from Pikachu + 0x0, // Sandshrew is a base evolution + 0x1b, // Sandslash evolves from Sandshrew + 0x0, // Nidoran-f is a base evolution + 0x1d, // Nidorina evolves from Nidoran-f + 0x1e, // Nidoqueen evolves from Nidorina + 0x0, // Nidoran-m is a base evolution + 0x20, // Nidorino evolves from Nidoran-m + 0x21, // Nidoking evolves from Nidorino + 0xad, // Clefairy evolves from Cleffa + 0x23, // Clefable evolves from Clefairy + 0x0, // Vulpix is a base evolution + 0x25, // Ninetales evolves from Vulpix + 0xae, // Jigglypuff evolves from Igglybuff + 0x27, // Wigglytuff evolves from Jigglypuff + 0x0, // Zubat is a base evolution + 0x29, // Golbat evolves from Zubat + 0x0, // Oddish is a base evolution + 0x2b, // Gloom evolves from Oddish + 0x2c, // Vileplume evolves from Gloom + 0x0, // Paras is a base evolution + 0x2e, // Parasect evolves from Paras + 0x0, // Venonat is a base evolution + 0x30, // Venomoth evolves from Venonat + 0x0, // Diglett is a base evolution + 0x32, // Dugtrio evolves from Diglett + 0x0, // Meowth is a base evolution + 0x34, // Persian evolves from Meowth + 0x0, // Psyduck is a base evolution + 0x36, // Golduck evolves from Psyduck + 0x0, // Mankey is a base evolution + 0x38, // Primeape evolves from Mankey + 0x0, // Growlithe is a base evolution + 0x3a, // Arcanine evolves from Growlithe + 0x0, // Poliwag is a base evolution + 0x3c, // Poliwhirl evolves from Poliwag + 0x3d, // Poliwrath evolves from Poliwhirl + 0x0, // Abra is a base evolution + 0x3f, // Kadabra evolves from Abra + 0x40, // Alakazam evolves from Kadabra + 0x0, // Machop is a base evolution + 0x42, // Machoke evolves from Machop + 0x43, // Machamp evolves from Machoke + 0x0, // Bellsprout is a base evolution + 0x45, // Weepinbell evolves from Bellsprout + 0x46, // Victreebel evolves from Weepinbell + 0x0, // Tentacool is a base evolution + 0x48, // Tentacruel evolves from Tentacool + 0x0, // Geodude is a base evolution + 0x4a, // Graveler evolves from Geodude + 0x4b, // Golem evolves from Graveler + 0x0, // Ponyta is a base evolution + 0x4d, // Rapidash evolves from Ponyta + 0x0, // Slowpoke is a base evolution + 0x4f, // Slowbro evolves from Slowpoke + 0x0, // Magnemite is a base evolution + 0x51, // Magneton evolves from Magnemite + 0x0, // Farfetchd is a base evolution + 0x0, // Doduo is a base evolution + 0x54, // Dodrio evolves from Doduo + 0x0, // Seel is a base evolution + 0x56, // Dewgong evolves from Seel + 0x0, // Grimer is a base evolution + 0x58, // Muk evolves from Grimer + 0x0, // Shellder is a base evolution + 0x5a, // Cloyster evolves from Shellder + 0x0, // Gastly is a base evolution + 0x5c, // Haunter evolves from Gastly + 0x5d, // Gengar evolves from Haunter + 0x0, // Onix is a base evolution + 0x0, // Drowzee is a base evolution + 0x60, // Hypno evolves from Drowzee + 0x0, // Krabby is a base evolution + 0x62, // Kingler evolves from Krabby + 0x0, // Voltorb is a base evolution + 0x64, // Electrode evolves from Voltorb + 0x0, // Exeggcute is a base evolution + 0x66, // Exeggutor evolves from Exeggcute + 0x0, // Cubone is a base evolution + 0x68, // Marowak evolves from Cubone + 0xec, // Hitmonlee evolves from Tyrogue + 0xec, // Hitmonchan evolves from Tyrogue + 0x0, // Lickitung is a base evolution + 0x0, // Koffing is a base evolution + 0x6d, // Weezing evolves from Koffing + 0x0, // Rhyhorn is a base evolution + 0x6f, // Rhydon evolves from Rhyhorn + 0x0, // Chansey is a base evolution (in gen 2) + 0x0, // Tangela is a base evolution + 0x0, // Kangaskhan is a base evolution + 0x0, // Horsea is a base evolution + 0x74, // Seadra evolves from Horsea + 0x0, // Goldeen is a base evolution + 0x76, // Seaking evolves from Goldeen + 0x0, // Staryu is a base evolution + 0x78, // Starmie evolves from Staryu + 0x0, // Mr-mime is a base evolution (in gen 2) + 0x0, // Scyther is a base evolution + 0xee, // Jynx evolves from Smoochum + 0xef, // Electabuzz evolves from Elekid + 0xf0, // Magmar evolves from Magby + 0x0, // Pinsir is a base evolution + 0x0, // Tauros is a base evolution + 0x0, // Magikarp is a base evolution + 0x81, // Gyarados evolves from Magikarp + 0x0, // Lapras is a base evolution + 0x0, // Ditto is a base evolution + 0x0, // Eevee is a base evolution + 0x85, // Vaporeon evolves from Eevee + 0x85, // Jolteon evolves from Eevee + 0x85, // Flareon evolves from Eevee + 0x0, // Porygon is a base evolution + 0x0, // Omanyte is a base evolution + 0x8a, // Omastar evolves from Omanyte + 0x0, // Kabuto is a base evolution + 0x8c, // Kabutops evolves from Kabuto + 0x0, // Aerodactyl is a base evolution + 0x0, // Snorlax is a base evolution (in gen 2) + 0x0, // Articuno is a base evolution + 0x0, // Zapdos is a base evolution + 0x0, // Moltres is a base evolution + 0x0, // Dratini is a base evolution + 0x93, // Dragonair evolves from Dratini + 0x94, // Dragonite evolves from Dragonair + 0x0, // Mewtwo is a base evolution + 0x0, // Mew is a base evolution + 0x0, // Chikorita is a base evolution + 0x98, // Bayleef evolves from Chikorita + 0x99, // Meganium evolves from Bayleef + 0x0, // Cyndaquil is a base evolution + 0x9b, // Quilava evolves from Cyndaquil + 0x9c, // Typhlosion evolves from Quilava + 0x0, // Totodile is a base evolution + 0x9e, // Croconaw evolves from Totodile + 0x9f, // Feraligatr evolves from Croconaw + 0x0, // Sentret is a base evolution + 0xa1, // Furret evolves from Sentret + 0x0, // Hoothoot is a base evolution + 0xa3, // Noctowl evolves from Hoothoot + 0x0, // Ledyba is a base evolution + 0xa5, // Ledian evolves from Ledyba + 0x0, // Spinarak is a base evolution + 0xa7, // Ariados evolves from Spinarak + 0x2a, // Crobat evolves from Golbat + 0x0, // Chinchou is a base evolution + 0xaa, // Lanturn evolves from Chinchou + 0x0, // Pichu is a base evolution + 0x0, // Cleffa is a base evolution + 0x0, // Igglybuff is a base evolution + 0x0, // Togepi is a base evolution + 0xaf, // Togetic evolves from Togepi + 0x0, // Natu is a base evolution + 0xb1, // Xatu evolves from Natu + 0x0, // Mareep is a base evolution + 0xb3, // Flaaffy evolves from Mareep + 0xb4, // Ampharos evolves from Flaaffy + 0x2c, // Bellossom evolves from Gloom + 0x0, // Marill is a base evolution (in gen 2) + 0xb7, // Azumarill evolves from Marill + 0x0, // Sudowoodo is a base evolution (in gen 2) + 0x3d, // Politoed evolves from Poliwhirl + 0x0, // Hoppip is a base evolution + 0xbb, // Skiploom evolves from Hoppip + 0xbc, // Jumpluff evolves from Skiploom + 0x0, // Aipom is a base evolution + 0x0, // Sunkern is a base evolution + 0xbf, // Sunflora evolves from Sunkern + 0x0, // Yanma is a base evolution + 0x0, // Wooper is a base evolution + 0xc2, // Quagsire evolves from Wooper + 0x85, // Espeon evolves from Eevee + 0x85, // Umbreon evolves from Eevee + 0x0, // Murkrow is a base evolution + 0x4f, // Slowking evolves from Slowpoke + 0x0, // Misdreavus is a base evolution + 0x0, // Unown is a base evolution + 0x0, // Wobbuffet is a base evolution (in gen 2) + 0x0, // Girafarig is a base evolution + 0x0, // Pineco is a base evolution + 0xcc, // Forretress evolves from Pineco + 0x0, // Dunsparce is a base evolution + 0x0, // Gligar is a base evolution + 0x5f, // Steelix evolves from Onix + 0x0, // Snubbull is a base evolution + 0xd1, // Granbull evolves from Snubbull + 0x0, // Qwilfish is a base evolution + 0x7b, // Scizor evolves from Scyther + 0x0, // Shuckle is a base evolution + 0x0, // Heracross is a base evolution + 0x0, // Sneasel is a base evolution + 0x0, // Teddiursa is a base evolution + 0xd8, // Ursaring evolves from Teddiursa + 0x0, // Slugma is a base evolution + 0xda, // Magcargo evolves from Slugma + 0x0, // Swinub is a base evolution + 0xdc, // Piloswine evolves from Swinub + 0x0, // Corsola is a base evolution + 0x0, // Remoraid is a base evolution + 0xdf, // Octillery evolves from Remoraid + 0x0, // Delibird is a base evolution + 0x0, // Mantine is a base evolution (in gen 2) + 0x0, // Skarmory is a base evolution + 0x0, // Houndour is a base evolution + 0xe4, // Houndoom evolves from Houndour + 0x75, // Kingdra evolves from Seadra + 0x0, // Phanpy is a base evolution + 0xe7, // Donphan evolves from Phanpy + 0x89, // Porygon2 evolves from Porygon + 0x0, // Stantler is a base evolution + 0x0, // Smeargle is a base evolution + 0x0, // Tyrogue is a base evolution + 0xec, // Hitmontop evolves from Tyrogue + 0x0, // Smoochum is a base evolution + 0x0, // Elekid is a base evolution + 0x0, // Magby is a base evolution + 0x0, // Miltank is a base evolution + 0x71, // Blissey evolves from Chansey + 0x0, // Raikou is a base evolution + 0x0, // Entei is a base evolution + 0x0, // Suicune is a base evolution + 0x0, // Larvitar is a base evolution + 0xf6, // Pupitar evolves from Larvitar + 0xf7, // Tyranitar evolves from Pupitar + 0x0, // Lugia is a base evolution + 0x0, // Ho-oh is a base evolution + 0x0, // Celebi is a base evolution + 0x0, // Treecko is a base evolution +}; + static void load_table(u8 *table, const u8* source, bool &loadedBool) { if(loadedBool) @@ -50,8 +496,8 @@ PokemonTables::PokemonTables() : exp_groups_loaded(false) , gender_ratios_loaded(false) , num_abilities_loaded(false) + , first_moves_loaded(false) , power_points_loaded(false) - , gen_1_index_array_loaded(false) , event_pkmn_loaded(false) , types_loaded(false) , input_charset_type(0) @@ -80,21 +526,11 @@ void PokemonTables::load_first_moves() load_table(FIRST_MOVES, FIRST_MOVES_zx0_bin, first_moves_loaded); } -void PokemonTables::load_evolutions() -{ - load_table(EVOLUTIONS, EVOLUTIONS_zx0_bin, evolutions_loaded); -} - void PokemonTables::load_power_points() { load_table(POWER_POINTS, POWER_POINTS_zx0_bin, power_points_loaded); } -void PokemonTables::load_gen1_index_array() -{ - load_table(gen_1_index_array, gen_1_index_array_zx0_bin, gen_1_index_array_loaded); -} - void PokemonTables::load_event_pkmn() { load_table((uint8_t*)EVENT_PKMN, EVENT_PKMN_zx0_bin, event_pkmn_loaded); @@ -167,7 +603,6 @@ bool PokemonTables::get_num_abilities(int index_num) bool PokemonTables::can_learn_move(int pkmn_index, int move_index) { load_movesets(); - load_evolutions(); byte data_byte = MOVESETS[pkmn_index][move_index / 8]; data_byte |= MOVESETS[EVOLUTIONS[pkmn_index]][move_index / 8]; // add in the previous evolution's moves (if they exist) data_byte |= MOVESETS[EVOLUTIONS[EVOLUTIONS[pkmn_index]]][move_index / 8]; // add in the first evolution's moves (if they exist) @@ -185,39 +620,62 @@ byte PokemonTables::get_gen_3_char(u16 input_char) return get_char_from_charset(gen3_charset, input_char); } -static const u8 *localization_charset_files[] +// This table indicates the index of each specific charset in their generations' charsets file +static const u8 localization_charset_indices[] { - gen_1_Jpn_char_array_zx0_bin, - gen_1_Eng_char_array_zx0_bin, - gen_1_FreGer_char_array_zx0_bin, - gen_1_FreGer_char_array_zx0_bin, - gen_1_ItaSpa_char_array_zx0_bin, - gen_1_ItaSpa_char_array_zx0_bin, - 0, - gen_2_Jpn_char_array_zx0_bin, - gen_2_Eng_char_array_zx0_bin, - gen_2_FreGer_char_array_zx0_bin, - gen_2_FreGer_char_array_zx0_bin, - gen_2_ItaSpa_char_array_zx0_bin, - gen_2_ItaSpa_char_array_zx0_bin, - 0, - gen_3_Jpn_char_array_zx0_bin, - gen_3_Intern_char_array_zx0_bin, - gen_3_Intern_char_array_zx0_bin, - gen_3_Intern_char_array_zx0_bin, - gen_3_Intern_char_array_zx0_bin, - gen_3_Intern_char_array_zx0_bin, - gen_3_Jpn_char_array_zx0_bin + 0, // gen 1 JPN + 1, // gen 1 ENG + 2, // gen 1 FR/GER + 2, // gen 1 FR/GER + 3, // gen 1 ITA/SPA + 3, // gen 1 ITA/SPA + 0, // gen 1 KOR -> JPN (unused in gen 1) + 0, // gen 2 JPN + 1, // gen 2 ENG + 2, // gen 2 FR/GER + 2, // gen 2 FR/GER + 3, // gen 2 ITA/SPA + 3, // gen 2 ITA/SPA + 0, // gen 2 KOR -> JPN + 0, // gen 3 JPN + 1, // gen 3 International + 1, // gen 3 International + 1, // gen 3 International + 1, // gen 3 International + 1, // gen 3 International + 0, // gen 3 KOR -> JPN }; void load_localized_charset(u16 *output_char_array, byte gen, byte lang) { - // in the localization_charset_files list, + u8 generation_charsets[2048]; + const u8 *input_data; + + // in the localization_charset_indices list, // gen 1 starts first and every gen has 7 entries (1 per language) // however, the language values are 1-based, so we need to convert to 0-based - const u8 *input_buffer = localization_charset_files[(gen - 1) * 7 + (lang - 1)]; - zx0_decompressor_start((u8*)output_char_array, input_buffer); - zx0_decompressor_read(sizeof(u16) * 256); + const u8 lang_index = localization_charset_indices[(gen - 1) * 7 + (lang - 1)]; + + switch(gen) + { + case 1: + input_data = gen_1_charsets_zx0_bin; + break; + case 2: + input_data = gen_2_charsets_zx0_bin; + break; + case 3: + input_data = gen_3_charsets_zx0_bin; + break; + default: + // Invalid generation, return without doing anything + return; + } + + zx0_decompressor_start(generation_charsets, input_data); + zx0_decompressor_read(zx0_decompressor_get_decompressed_size()); + + memcpy(output_char_array, generation_charsets + (lang_index * 256 * sizeof(u16)), 256 * sizeof(u16)); // copy the charset into the output array } byte get_char_from_charset(const u16 *charset, u16 input_char) diff --git a/tools/data-generator/src/pokemon_data.cpp b/tools/data-generator/src/pokemon_data.cpp index 8d41423..f710c17 100644 --- a/tools/data-generator/src/pokemon_data.cpp +++ b/tools/data-generator/src/pokemon_data.cpp @@ -8,2780 +8,2605 @@ typedef unsigned short u16; #define NUM_POKEMON 252 #define POKEMON_ARRAY_SIZE NUM_POKEMON + 1 -// All data was obtained using PokeAPI -const byte gen_1_index_array[191] = { - 0x00, // Offset the list to remove "off by one" errors - 0x70, // Rhydon - 0x73, // Kangaskhan - 0x20, // Nidoran♂ - 0x23, // Clefairy - 0x15, // Spearow - 0x64, // Voltorb - 0x22, // Nidoking - 0x50, // Slowbro - 0x02, // Ivysaur - 0x67, // Exeggutor - 0x6C, // Lickitung - 0x66, // Exeggcute - 0x58, // Grimer - 0x5E, // Gengar - 0x1D, // Nidoran♀ - 0x1F, // Nidoqueen - 0x68, // Cubone - 0x6F, // Rhyhorn - 0x83, // Lapras - 0x3B, // Arcanine - 0x97, // Mew - 0x82, // Gyarados - 0x5A, // Shellder - 0x48, // Tentacool - 0x5C, // Gastly - 0x7B, // Scyther - 0x78, // Staryu - 0x09, // Blastoise - 0x7F, // Pinsir - 0x72, // Tangela - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x3A, // Growlithe - 0x5F, // Onix - 0x16, // Fearow - 0x10, // Pidgey - 0x4F, // Slowpoke - 0x40, // Kadabra - 0x4B, // Graveler - 0x71, // Chansey - 0x43, // Machoke - 0x7A, // Mr. Mime - 0x6A, // Hitmonlee - 0x6B, // Hitmonchan - 0x18, // Arbok - 0x2F, // Parasect - 0x36, // Psyduck - 0x60, // Drowzee - 0x4C, // Golem - 0xFF, // MissingNo. - 0x7E, // Magmar - 0xFF, // MissingNo. - 0x7D, // Electabuzz - 0x52, // Magneton - 0x6D, // Koffing - 0xFF, // MissingNo. - 0x38, // Mankey - 0x56, // Seel - 0x32, // Diglett - 0x80, // Tauros - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x53, // Farfetch'd - 0x30, // Venonat - 0x95, // Dragonite - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x54, // Doduo - 0x3C, // Poliwag - 0x7C, // Jynx - 0x92, // Moltres - 0x90, // Articuno - 0x91, // Zapdos - 0x84, // Ditto - 0x34, // Meowth - 0x62, // Krabby - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x25, // Vulpix - 0x26, // Ninetales - 0x19, // Pikachu - 0x1A, // Raichu - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x93, // Dratini - 0x94, // Dragonair - 0x8C, // Kabuto - 0x8D, // Kabutops - 0x74, // Horsea - 0x75, // Seadra - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x1B, // Sandshrew - 0x1C, // Sandslash - 0x8A, // Omanyte - 0x8B, // Omastar - 0x27, // Jigglypuff - 0x28, // Wigglytuff - 0x85, // Eevee - 0x88, // Flareon - 0x87, // Jolteon - 0x86, // Vaporeon - 0x42, // Machop - 0x29, // Zubat - 0x17, // Ekans - 0x2E, // Paras - 0x3D, // Poliwhirl - 0x3E, // Poliwrath - 0x0D, // Weedle - 0x0E, // Kakuna - 0x0F, // Beedrill - 0xFF, // MissingNo. - 0x55, // Dodrio - 0x39, // Primeape - 0x33, // Dugtrio - 0x31, // Venomoth - 0x57, // Dewgong - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x0A, // Caterpie - 0x0B, // Metapod - 0x0C, // Butterfree - 0x44, // Machamp - 0xFF, // MissingNo. - 0x37, // Golduck - 0x61, // Hypno - 0x2A, // Golbat - 0x96, // Mewtwo - 0x8F, // Snorlax - 0x81, // Magikarp - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x59, // Muk - 0xFF, // MissingNo. - 0x63, // Kingler - 0x5B, // Cloyster - 0xFF, // MissingNo. - 0x65, // Electrode - 0x24, // Clefable - 0x6E, // Weezing - 0x35, // Persian - 0x69, // Marowak - 0xFF, // MissingNo. - 0x5D, // Haunter - 0x3F, // Abra - 0x41, // Alakazam - 0x11, // Pidgeotto - 0x12, // Pidgeot - 0x79, // Starmie - 0x01, // Bulbasaur - 0x03, // Venusaur - 0x49, // Tentacruel - 0xFF, // MissingNo. - 0x76, // Goldeen - 0x77, // Seaking - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x4D, // Ponyta - 0x4E, // Rapidash - 0x13, // Rattata - 0x14, // Raticate - 0x21, // Nidorino - 0x1E, // Nidorina - 0x4A, // Geodude - 0x89, // Porygon - 0x8E, // Aerodactyl - 0xFF, // MissingNo. - 0x51, // Magnemite - 0xFF, // MissingNo. - 0xFF, // MissingNo. - 0x04, // Charmander - 0x07, // Squirtle - 0x05, // Charmeleon - 0x08, // Wartortle - 0x06, // Charizard - 0xFF, // MissingNo. - 0xFF, // Kabutops Fossil MissingNo. - 0xFF, // Aerodactyl Fossil MissingNo. - 0xFF, // Ghost MissingNo. - 0x2B, // Oddish - 0x2C, // Gloom - 0x2D, // Vileplume - 0x45, // Bellsprout - 0x46, // Weepinbell - 0x47, // Victreebel +const u16 gen_1_charsets[4][256] { + // gen_1_Jpn_char_array + { + 0x20, + 0x30A4, + 0x30F4, + 0x30A8, + 0x30AA, + 0x30AC, + 0x30AE, + 0x30B0, + 0x30B2, + 0x30B4, + 0x30B6, + 0x30B8, + 0x30BA, + 0x30BC, + 0x30BE, + 0x30C0, + 0x20, + 0x30C5, + 0x30C7, + 0x30C9, + 0x30CA, + 0x30CB, + 0x30CC, + 0x30CD, + 0x30CE, + 0x30D0, + 0x30D3, + 0x30D6, + 0x30DC, + 0x30DE, + 0x30DF, + 0x30E0, + 0x30A3, + 0x3042, + 0x3044, + 0x3094, + 0x3048, + 0x304A, + 0x304C, + 0x304E, + 0x3050, + 0x3052, + 0x3054, + 0x3056, + 0x3058, + 0x305A, + 0x305C, + 0x305E, + 0x3060, + 0x3062, + 0x3065, + 0x3067, + 0x3069, + 0x306A, + 0x306B, + 0x306C, + 0x306D, + 0x306E, + 0x3070, + 0x3073, + 0x3076, + 0x3079, + 0x307C, + 0x307E, + 0x30D1, + 0x30D4, + 0x30D7, + 0x30DD, + 0x3071, + 0x3074, + 0x3077, + 0x307A, + 0x307D, + 0x307E, + 0x20, + 0x20, + 0x20, + 0x3082, + 0x20, + 0x20, + 0x19E, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x56, + 0x53, + 0x4C, + 0x4D, + 0xFF1A, + 0x3043, + 0x3045, + 0x300C, + 0x300D, + 0x300E, + 0x300F, + 0x30FB, + 0x2026, + 0x3041, + 0x3047, + 0x3049, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x30A2, + 0x30A4, + 0x30A6, + 0x30A8, + 0x30AA, + 0x30AB, + 0x30AD, + 0x30AF, + 0x30B1, + 0x30B3, + 0x30B5, + 0x30B7, + 0x30B9, + 0x30BB, + 0x30BD, + 0x30BF, + 0x30C1, + 0x30C4, + 0x30C6, + 0x30C8, + 0x30CA, + 0x30CB, + 0x30CC, + 0x30CD, + 0x30CE, + 0x30CF, + 0x30D2, + 0x30D5, + 0x30DB, + 0x30DE, + 0x30DF, + 0x30E0, + 0x30E1, + 0x30E2, + 0x30E4, + 0x30E6, + 0x30E8, + 0x30E9, + 0x30EB, + 0x30EC, + 0x30ED, + 0x30EF, + 0x30F2, + 0x30F3, + 0x30C3, + 0x30E3, + 0x30E5, + 0x30E7, + 0x30A3, + 0x3042, + 0x3044, + 0x3046, + 0x3048, + 0x304A, + 0x304B, + 0x304D, + 0x304F, + 0x3051, + 0x3053, + 0x3055, + 0x3057, + 0x3059, + 0x305B, + 0x305D, + 0x20, + 0x3061, + 0x3064, + 0x3066, + 0x3068, + 0x306A, + 0x306B, + 0x306C, + 0x306D, + 0x306E, + 0x306F, + 0x3072, + 0x3075, + 0x3078, + 0x307B, + 0x307E, + 0x307F, + 0x3080, + 0x3081, + 0x3082, + 0x3084, + 0x3086, + 0x3088, + 0x3089, + 0x30EA, + 0x308B, + 0x308C, + 0x308D, + 0x308F, + 0x3092, + 0x3093, + 0x3063, + 0x3083, + 0x50, + 0x4D, + 0x30FC, + 0x309C, + 0x309B, + 0x3F, + 0x21, + 0x3002, + 0x30A1, + 0x30A5, + 0x30A7, + 0x25B7, + 0x25B6, + 0x25BC, + 0x2642, + 0x5186, + 0xD7, + 0x2E, + 0x2F, + 0x30A9, + 0x2640, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + }, + // gen_1_Eng_char_array + { + 0x2400, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x19E, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x56, + 0x53, + 0x4C, + 0x4D, + 0x3A, + 0x3043, + 0x3045, + 0x2018, + 0x2019, + 0x201C, + 0x201D, + 0x30FB, + 0x2026, + 0x3041, + 0x3047, + 0x3049, + 0x2554, + 0x2550, + 0x2557, + 0x2551, + 0x255A, + 0x255D, + 0x2420, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, + 0x4F, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x55, + 0x56, + 0x57, + 0x58, + 0x59, + 0x5A, + 0x28, + 0x29, + 0x3A, + 0x3B, + 0x28, + 0x29, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6A, + 0x6B, + 0x6C, + 0x6D, + 0x6E, + 0x6F, + 0x70, + 0x71, + 0x72, + 0x73, + 0x74, + 0x75, + 0x76, + 0x77, + 0x78, + 0x79, + 0x7A, + 0xE9, + 0x64, + 0x6C, + 0x73, + 0x74, + 0x76, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x50, + 0x4D, + 0x2D, + 0x72, + 0x6D, + 0x3F, + 0x21, + 0x2E, + 0x30A1, + 0x30A5, + 0x30A7, + 0x25B7, + 0x25B6, + 0x25BC, + 0x2642, + 0x20, + 0xD7, + 0x2E, + 0x2F, + 0x2C, + 0x2640, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + }, + // gen_1_FreGer_char_array + { + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x19E, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x56, + 0x53, + 0x4C, + 0x4D, + 0x3A, + 0x3043, + 0x3045, + 0x2018, + 0x2019, + 0x201C, + 0x201D, + 0x30FB, + 0x22EF, + 0x3041, + 0x3047, + 0x3049, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x2420, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, + 0x4F, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x55, + 0x56, + 0x57, + 0x58, + 0x59, + 0x5A, + 0x28, + 0x29, + 0x3A, + 0x3B, + 0x28, + 0x29, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6A, + 0x6B, + 0x6C, + 0x6D, + 0x6E, + 0x6F, + 0x70, + 0x71, + 0x72, + 0x73, + 0x74, + 0x75, + 0x76, + 0x77, + 0x78, + 0x79, + 0x7A, + 0xE0, + 0xE8, + 0xE9, + 0xF9, + 0xDF, + 0xE7, + 0x20, + 0xD6, + 0xDC, + 0xE4, + 0xF6, + 0xFC, + 0xEB, + 0xEF, + 0xE2, + 0xF4, + 0xFB, + 0xEA, + 0xEE, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x63, + 0x64, + 0x6A, + 0x6C, + 0x6D, + 0x6E, + 0x70, + 0x73, + 0x73, + 0x74, + 0x75, + 0x79, + 0x20, + 0x50, + 0x4D, + 0x2D, + 0x2B, + 0x20, + 0x3F, + 0x21, + 0x2E, + 0x30A1, + 0x30A5, + 0x30A7, + 0x25B7, + 0x25B6, + 0x25BC, + 0x2642, + 0x20, + 0xD7, + 0x2E, + 0x2F, + 0x2C, + 0x2640, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + }, + // gen_1_ItaSpa_char_array + { + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x19E, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x56, + 0x53, + 0x4C, + 0x4D, + 0x3A, + 0x3043, + 0x3045, + 0x2018, + 0x2019, + 0x201C, + 0x201D, + 0x30FB, + 0x22EF, + 0x3041, + 0x3047, + 0x3049, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x2420, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, + 0x4F, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x55, + 0x56, + 0x57, + 0x58, + 0x59, + 0x5A, + 0x28, + 0x29, + 0x3A, + 0x3B, + 0x28, + 0x29, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6A, + 0x6B, + 0x6C, + 0x6D, + 0x6E, + 0x6F, + 0x70, + 0x71, + 0x72, + 0x73, + 0x74, + 0x75, + 0x76, + 0x77, + 0x78, + 0x79, + 0x7A, + 0xE0, + 0xE8, + 0xE9, + 0xF9, + 0xC0, + 0xC1, + 0x20, + 0xD6, + 0xDC, + 0xE4, + 0xF6, + 0xFC, + 0xC8, + 0xC9, + 0xCC, + 0xCD, + 0xD1, + 0xD2, + 0xD3, + 0xD9, + 0xDA, + 0xE1, + 0xEC, + 0xED, + 0xF1, + 0xF2, + 0xF3, + 0xFA, + 0xBA, + 0x26, + 0x64, + 0x6C, + 0x6D, + 0x72, + 0x73, + 0x74, + 0x76, + 0x20, + 0x20, + 0x50, + 0x4D, + 0x2D, + 0xBF, + 0xA1, + 0x3F, + 0x21, + 0x2E, + 0x30A1, + 0x30A5, + 0x30A7, + 0x25B7, + 0x25B6, + 0x25BC, + 0x2642, + 0x20, + 0xD7, + 0x2E, + 0x2F, + 0x2C, + 0x2640, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + } }; -const u16 gen_1_Jpn_char_array[256]{ - 0x20, - 0x30A4, - 0x30F4, - 0x30A8, - 0x30AA, - 0x30AC, - 0x30AE, - 0x30B0, - 0x30B2, - 0x30B4, - 0x30B6, - 0x30B8, - 0x30BA, - 0x30BC, - 0x30BE, - 0x30C0, - 0x20, - 0x30C5, - 0x30C7, - 0x30C9, - 0x30CA, - 0x30CB, - 0x30CC, - 0x30CD, - 0x30CE, - 0x30D0, - 0x30D3, - 0x30D6, - 0x30DC, - 0x30DE, - 0x30DF, - 0x30E0, - 0x30A3, - 0x3042, - 0x3044, - 0x3094, - 0x3048, - 0x304A, - 0x304C, - 0x304E, - 0x3050, - 0x3052, - 0x3054, - 0x3056, - 0x3058, - 0x305A, - 0x305C, - 0x305E, - 0x3060, - 0x3062, - 0x3065, - 0x3067, - 0x3069, - 0x306A, - 0x306B, - 0x306C, - 0x306D, - 0x306E, - 0x3070, - 0x3073, - 0x3076, - 0x3079, - 0x307C, - 0x307E, - 0x30D1, - 0x30D4, - 0x30D7, - 0x30DD, - 0x3071, - 0x3074, - 0x3077, - 0x307A, - 0x307D, - 0x307E, - 0x20, - 0x20, - 0x20, - 0x3082, - 0x20, - 0x20, - 0x19E, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x56, - 0x53, - 0x4C, - 0x4D, - 0xFF1A, - 0x3043, - 0x3045, - 0x300C, - 0x300D, - 0x300E, - 0x300F, - 0x30FB, - 0x2026, - 0x3041, - 0x3047, - 0x3049, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x30A2, - 0x30A4, - 0x30A6, - 0x30A8, - 0x30AA, - 0x30AB, - 0x30AD, - 0x30AF, - 0x30B1, - 0x30B3, - 0x30B5, - 0x30B7, - 0x30B9, - 0x30BB, - 0x30BD, - 0x30BF, - 0x30C1, - 0x30C4, - 0x30C6, - 0x30C8, - 0x30CA, - 0x30CB, - 0x30CC, - 0x30CD, - 0x30CE, - 0x30CF, - 0x30D2, - 0x30D5, - 0x30DB, - 0x30DE, - 0x30DF, - 0x30E0, - 0x30E1, - 0x30E2, - 0x30E4, - 0x30E6, - 0x30E8, - 0x30E9, - 0x30EB, - 0x30EC, - 0x30ED, - 0x30EF, - 0x30F2, - 0x30F3, - 0x30C3, - 0x30E3, - 0x30E5, - 0x30E7, - 0x30A3, - 0x3042, - 0x3044, - 0x3046, - 0x3048, - 0x304A, - 0x304B, - 0x304D, - 0x304F, - 0x3051, - 0x3053, - 0x3055, - 0x3057, - 0x3059, - 0x305B, - 0x305D, - 0x20, - 0x3061, - 0x3064, - 0x3066, - 0x3068, - 0x306A, - 0x306B, - 0x306C, - 0x306D, - 0x306E, - 0x306F, - 0x3072, - 0x3075, - 0x3078, - 0x307B, - 0x307E, - 0x307F, - 0x3080, - 0x3081, - 0x3082, - 0x3084, - 0x3086, - 0x3088, - 0x3089, - 0x30EA, - 0x308B, - 0x308C, - 0x308D, - 0x308F, - 0x3092, - 0x3093, - 0x3063, - 0x3083, - 0x50, - 0x4D, - 0x30FC, - 0x309C, - 0x309B, - 0x3F, - 0x21, - 0x3002, - 0x30A1, - 0x30A5, - 0x30A7, - 0x25B7, - 0x25B6, - 0x25BC, - 0x2642, - 0x5186, - 0xD7, - 0x2E, - 0x2F, - 0x30A9, - 0x2640, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, + +const u16 gen_2_charsets[4][256]{ + // gen_2_Jpn_char_array + { + 0x3F, + 0x30A4, + 0x30F4, + 0x30A8, + 0x30AA, + 0x30AC, + 0x30AE, + 0x30B0, + 0x30B2, + 0x30B4, + 0x30B6, + 0x30B8, + 0x30BA, + 0x30BC, + 0x30BE, + 0x30C0, + 0x30C2, + 0x30C5, + 0x30C7, + 0x30C9, + 0x2A, + 0x2A, + 0x2A, + 0x30CD, + 0x30CE, + 0x30D0, + 0x30D3, + 0x30D6, + 0x30DC, + 0x2A, + 0x2A, + 0x2A, + 0x30A3, + 0x3042, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x304C, + 0x304E, + 0x3050, + 0x3052, + 0x3054, + 0x3056, + 0x3058, + 0x305A, + 0x305C, + 0x305E, + 0x3060, + 0x3062, + 0x3065, + 0x3067, + 0x3069, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x3070, + 0x3073, + 0x3076, + 0x3079, + 0x307C, + 0x2A, + 0x30D1, + 0x30D4, + 0x30D7, + 0x30DD, + 0x3071, + 0x3074, + 0x3077, + 0x307A, + 0x307D, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x3082, + 0x2A, + 0x2A, + 0x19E, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x20, + 0x25B2, + 0x20, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x56, + 0x53, + 0x4C, + 0x4D, + 0x3A, + 0x3043, + 0x3045, + 0x300C, + 0x300D, + 0x300E, + 0x300F, + 0x30FB, + 0x22EF, + 0x3041, + 0x3047, + 0x3049, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x30A2, + 0x30A4, + 0x30A6, + 0x30A8, + 0x30AA, + 0x30AB, + 0x30AD, + 0x30AF, + 0x30B1, + 0x30B3, + 0x30B5, + 0x30B7, + 0x30B9, + 0x30BB, + 0x30BD, + 0x30BF, + 0x30C1, + 0x30C4, + 0x30C6, + 0x30C8, + 0x30CA, + 0x30CB, + 0x30CC, + 0x30CD, + 0x30CE, + 0x30CF, + 0x30D2, + 0x30D5, + 0x30DB, + 0x30DE, + 0x30DF, + 0x30E0, + 0x30E1, + 0x30E2, + 0x30E4, + 0x30E6, + 0x30E8, + 0x30E9, + 0x30EB, + 0x30EC, + 0x30ED, + 0x30EF, + 0x30F2, + 0x30F3, + 0x30C3, + 0x30E3, + 0x30E5, + 0x30E7, + 0x30A3, + 0x3042, + 0x3044, + 0x3046, + 0x3048, + 0x304A, + 0x304B, + 0x304D, + 0x304F, + 0x3051, + 0x3053, + 0x3055, + 0x3057, + 0x3059, + 0x305B, + 0x305D, + 0x305F, + 0x3061, + 0x3064, + 0x3066, + 0x3068, + 0x306A, + 0x306B, + 0x306C, + 0x306D, + 0x306E, + 0x306F, + 0x3072, + 0x3075, + 0x3078, + 0x307B, + 0x307E, + 0x307F, + 0x3080, + 0x3081, + 0x3082, + 0x3084, + 0x3086, + 0x3088, + 0x3089, + 0x30EA, + 0x308B, + 0x308C, + 0x308D, + 0x308F, + 0x3092, + 0x3093, + 0x3063, + 0x3083, + 0x3085, + 0x3087, + 0x30FC, + 0x309C, + 0x309B, + 0x3F, + 0x21, + 0x3002, + 0x30A1, + 0x30A5, + 0x30A7, + 0x25B7, + 0x25B6, + 0x25BC, + 0x2642, + 0x5186, + 0xD7, + 0x2E, + 0x2F, + 0x30A9, + 0x2640, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + }, + // gen_2_Eng_char_array + { + 0x3F, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, + 0x4F, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x20, + 0x20, + 0x20, + 0x58, + 0x59, + 0x5A, + 0x28, + 0x29, + 0x3A, + 0x3B, + 0x28, + 0x20, + 0x71, + 0x72, + 0x20, + 0x20, + 0x20, + 0x20, + 0x77, + 0x78, + 0x79, + 0x7A, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0xC4, + 0xD6, + 0xDC, + 0xE4, + 0xF6, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x5A, + 0x28, + 0x29, + 0x3A, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x72, + 0x20, + 0x20, + 0x19E, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x2588, + 0x25B2, + 0x20, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x56, + 0x53, + 0x4C, + 0x4D, + 0x3A, + 0x3043, + 0x3045, + 0x50, + 0x4B, + 0x201C, + 0x201D, + 0x30FB, + 0x2026, + 0x3041, + 0x3047, + 0x3049, + 0x20, + 0x2550, + 0x2557, + 0x2551, + 0x255A, + 0x255D, + 0x2420, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, + 0x4F, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x55, + 0x56, + 0x57, + 0x58, + 0x59, + 0x5A, + 0x28, + 0x29, + 0x3A, + 0x3B, + 0x28, + 0x29, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6A, + 0x6B, + 0x6C, + 0x6D, + 0x6E, + 0x6F, + 0x70, + 0x71, + 0x72, + 0x73, + 0x74, + 0x75, + 0x76, + 0x77, + 0x78, + 0x79, + 0x7A, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0xC4, + 0xD6, + 0xDC, + 0xE4, + 0xF6, + 0xFC, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x64, + 0x6C, + 0x6D, + 0x72, + 0x73, + 0x74, + 0x76, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0xD83E, + 0x20, + 0x50, + 0x4D, + 0x2D, + 0x20, + 0x20, + 0x3F, + 0x21, + 0x2E, + 0x26, + 0xE9, + 0xD83E, + 0x25B7, + 0x25B6, + 0x25BC, + 0x2642, + 0x20, + 0xD7, + 0x2E, + 0x2F, + 0x2C, + 0x2640, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + }, + // gen_2_FreGer_char_array + { + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x19E, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x25B2, + 0x20, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x56, + 0x53, + 0x4C, + 0x4D, + 0x3A, + 0x3043, + 0x3045, + 0x50, + 0x4B, + 0x201C, + 0x201D, + 0x30FB, + 0x2026, + 0x3041, + 0x3047, + 0x3049, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, + 0x4F, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x55, + 0x56, + 0x57, + 0x58, + 0x59, + 0x5A, + 0x28, + 0x29, + 0x3A, + 0x3B, + 0x28, + 0x29, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6A, + 0x6B, + 0x6C, + 0x6D, + 0x6E, + 0x6F, + 0x70, + 0x71, + 0x72, + 0x73, + 0x74, + 0x75, + 0x76, + 0x77, + 0x78, + 0x79, + 0x7A, + 0xE0, + 0xE8, + 0xE9, + 0xF9, + 0xDF, + 0xE7, + 0xC4, + 0xD6, + 0xDC, + 0xE4, + 0xF6, + 0xFC, + 0xEB, + 0xEF, + 0xE2, + 0xF4, + 0xFB, + 0xEA, + 0xEE, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x63, + 0x64, + 0x6A, + 0x6C, + 0x6D, + 0x6E, + 0x70, + 0x73, + 0x73, + 0x74, + 0x75, + 0x79, + 0x20, + 0x50, + 0x4D, + 0x2D, + 0x2B, + 0x20, + 0x3F, + 0x21, + 0x2E, + 0x26, + 0xE9, + 0x20, + 0x25B7, + 0x25B6, + 0x25BC, + 0x2642, + 0x20, + 0xD7, + 0x2E, + 0x2F, + 0x2C, + 0x2640, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + }, + // gen_2_ItaSpa_char_array + { + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x19E, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x25B2, + 0x20, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x56, + 0x53, + 0x4C, + 0x4D, + 0x3A, + 0x3043, + 0x3045, + 0x50, + 0x4B, + 0x201C, + 0x201D, + 0x30FB, + 0x2026, + 0x3041, + 0x3047, + 0x3049, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, + 0x4F, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x55, + 0x56, + 0x57, + 0x58, + 0x59, + 0x5A, + 0x28, + 0x29, + 0x3A, + 0x3B, + 0x28, + 0x29, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6A, + 0x6B, + 0x6C, + 0x6D, + 0x6E, + 0x6F, + 0x70, + 0x71, + 0x72, + 0x73, + 0x74, + 0x75, + 0x76, + 0x77, + 0x78, + 0x79, + 0x7A, + 0xE0, + 0xE8, + 0xE9, + 0xF9, + 0xC0, + 0xC1, + 0xC4, + 0xD6, + 0xDC, + 0xE4, + 0xF6, + 0xFC, + 0xC8, + 0xC9, + 0xCC, + 0xCD, + 0xD1, + 0xD2, + 0xD3, + 0xD9, + 0xDA, + 0xE1, + 0xEC, + 0xED, + 0xF1, + 0xF2, + 0xF3, + 0xFA, + 0xBA, + 0x26, + 0x64, + 0x6C, + 0x6D, + 0x72, + 0x73, + 0x74, + 0x76, + 0x20, + 0x20, + 0x50, + 0x4D, + 0x2D, + 0xBF, + 0xA1, + 0x3F, + 0x21, + 0x2E, + 0x26, + 0xE9, + 0x20, + 0x25B7, + 0x25B6, + 0x25BC, + 0x2642, + 0x20, + 0xD7, + 0x2E, + 0x2F, + 0x2C, + 0x2640, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + } }; -const u16 gen_1_Eng_char_array[256]{ - 0x2400, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x19E, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x56, - 0x53, - 0x4C, - 0x4D, - 0x3A, - 0x3043, - 0x3045, - 0x2018, - 0x2019, - 0x201C, - 0x201D, - 0x30FB, - 0x2026, - 0x3041, - 0x3047, - 0x3049, - 0x2554, - 0x2550, - 0x2557, - 0x2551, - 0x255A, - 0x255D, - 0x2420, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, - 0x4F, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x55, - 0x56, - 0x57, - 0x58, - 0x59, - 0x5A, - 0x28, - 0x29, - 0x3A, - 0x3B, - 0x28, - 0x29, - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x6E, - 0x6F, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - 0x7A, - 0xE9, - 0x64, - 0x6C, - 0x73, - 0x74, - 0x76, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x50, - 0x4D, - 0x2D, - 0x72, - 0x6D, - 0x3F, - 0x21, - 0x2E, - 0x30A1, - 0x30A5, - 0x30A7, - 0x25B7, - 0x25B6, - 0x25BC, - 0x2642, - 0x20, - 0xD7, - 0x2E, - 0x2F, - 0x2C, - 0x2640, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, -}; -const u16 gen_1_FreGer_char_array[256]{ - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x19E, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x56, - 0x53, - 0x4C, - 0x4D, - 0x3A, - 0x3043, - 0x3045, - 0x2018, - 0x2019, - 0x201C, - 0x201D, - 0x30FB, - 0x22EF, - 0x3041, - 0x3047, - 0x3049, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x2420, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, - 0x4F, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x55, - 0x56, - 0x57, - 0x58, - 0x59, - 0x5A, - 0x28, - 0x29, - 0x3A, - 0x3B, - 0x28, - 0x29, - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x6E, - 0x6F, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - 0x7A, - 0xE0, - 0xE8, - 0xE9, - 0xF9, - 0xDF, - 0xE7, - 0x20, - 0xD6, - 0xDC, - 0xE4, - 0xF6, - 0xFC, - 0xEB, - 0xEF, - 0xE2, - 0xF4, - 0xFB, - 0xEA, - 0xEE, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x63, - 0x64, - 0x6A, - 0x6C, - 0x6D, - 0x6E, - 0x70, - 0x73, - 0x73, - 0x74, - 0x75, - 0x79, - 0x20, - 0x50, - 0x4D, - 0x2D, - 0x2B, - 0x20, - 0x3F, - 0x21, - 0x2E, - 0x30A1, - 0x30A5, - 0x30A7, - 0x25B7, - 0x25B6, - 0x25BC, - 0x2642, - 0x20, - 0xD7, - 0x2E, - 0x2F, - 0x2C, - 0x2640, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, -}; -const u16 gen_1_ItaSpa_char_array[256]{ - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x19E, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x56, - 0x53, - 0x4C, - 0x4D, - 0x3A, - 0x3043, - 0x3045, - 0x2018, - 0x2019, - 0x201C, - 0x201D, - 0x30FB, - 0x22EF, - 0x3041, - 0x3047, - 0x3049, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x2420, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, - 0x4F, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x55, - 0x56, - 0x57, - 0x58, - 0x59, - 0x5A, - 0x28, - 0x29, - 0x3A, - 0x3B, - 0x28, - 0x29, - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x6E, - 0x6F, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - 0x7A, - 0xE0, - 0xE8, - 0xE9, - 0xF9, - 0xC0, - 0xC1, - 0x20, - 0xD6, - 0xDC, - 0xE4, - 0xF6, - 0xFC, - 0xC8, - 0xC9, - 0xCC, - 0xCD, - 0xD1, - 0xD2, - 0xD3, - 0xD9, - 0xDA, - 0xE1, - 0xEC, - 0xED, - 0xF1, - 0xF2, - 0xF3, - 0xFA, - 0xBA, - 0x26, - 0x64, - 0x6C, - 0x6D, - 0x72, - 0x73, - 0x74, - 0x76, - 0x20, - 0x20, - 0x50, - 0x4D, - 0x2D, - 0xBF, - 0xA1, - 0x3F, - 0x21, - 0x2E, - 0x30A1, - 0x30A5, - 0x30A7, - 0x25B7, - 0x25B6, - 0x25BC, - 0x2642, - 0x20, - 0xD7, - 0x2E, - 0x2F, - 0x2C, - 0x2640, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, -}; -const u16 gen_2_Jpn_char_array[256]{ - 0x3F, - 0x30A4, - 0x30F4, - 0x30A8, - 0x30AA, - 0x30AC, - 0x30AE, - 0x30B0, - 0x30B2, - 0x30B4, - 0x30B6, - 0x30B8, - 0x30BA, - 0x30BC, - 0x30BE, - 0x30C0, - 0x30C2, - 0x30C5, - 0x30C7, - 0x30C9, - 0x2A, - 0x2A, - 0x2A, - 0x30CD, - 0x30CE, - 0x30D0, - 0x30D3, - 0x30D6, - 0x30DC, - 0x2A, - 0x2A, - 0x2A, - 0x30A3, - 0x3042, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x304C, - 0x304E, - 0x3050, - 0x3052, - 0x3054, - 0x3056, - 0x3058, - 0x305A, - 0x305C, - 0x305E, - 0x3060, - 0x3062, - 0x3065, - 0x3067, - 0x3069, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x3070, - 0x3073, - 0x3076, - 0x3079, - 0x307C, - 0x2A, - 0x30D1, - 0x30D4, - 0x30D7, - 0x30DD, - 0x3071, - 0x3074, - 0x3077, - 0x307A, - 0x307D, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x3082, - 0x2A, - 0x2A, - 0x19E, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x20, - 0x25B2, - 0x20, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x56, - 0x53, - 0x4C, - 0x4D, - 0x3A, - 0x3043, - 0x3045, - 0x300C, - 0x300D, - 0x300E, - 0x300F, - 0x30FB, - 0x22EF, - 0x3041, - 0x3047, - 0x3049, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x30A2, - 0x30A4, - 0x30A6, - 0x30A8, - 0x30AA, - 0x30AB, - 0x30AD, - 0x30AF, - 0x30B1, - 0x30B3, - 0x30B5, - 0x30B7, - 0x30B9, - 0x30BB, - 0x30BD, - 0x30BF, - 0x30C1, - 0x30C4, - 0x30C6, - 0x30C8, - 0x30CA, - 0x30CB, - 0x30CC, - 0x30CD, - 0x30CE, - 0x30CF, - 0x30D2, - 0x30D5, - 0x30DB, - 0x30DE, - 0x30DF, - 0x30E0, - 0x30E1, - 0x30E2, - 0x30E4, - 0x30E6, - 0x30E8, - 0x30E9, - 0x30EB, - 0x30EC, - 0x30ED, - 0x30EF, - 0x30F2, - 0x30F3, - 0x30C3, - 0x30E3, - 0x30E5, - 0x30E7, - 0x30A3, - 0x3042, - 0x3044, - 0x3046, - 0x3048, - 0x304A, - 0x304B, - 0x304D, - 0x304F, - 0x3051, - 0x3053, - 0x3055, - 0x3057, - 0x3059, - 0x305B, - 0x305D, - 0x305F, - 0x3061, - 0x3064, - 0x3066, - 0x3068, - 0x306A, - 0x306B, - 0x306C, - 0x306D, - 0x306E, - 0x306F, - 0x3072, - 0x3075, - 0x3078, - 0x307B, - 0x307E, - 0x307F, - 0x3080, - 0x3081, - 0x3082, - 0x3084, - 0x3086, - 0x3088, - 0x3089, - 0x30EA, - 0x308B, - 0x308C, - 0x308D, - 0x308F, - 0x3092, - 0x3093, - 0x3063, - 0x3083, - 0x3085, - 0x3087, - 0x30FC, - 0x309C, - 0x309B, - 0x3F, - 0x21, - 0x3002, - 0x30A1, - 0x30A5, - 0x30A7, - 0x25B7, - 0x25B6, - 0x25BC, - 0x2642, - 0x5186, - 0xD7, - 0x2E, - 0x2F, - 0x30A9, - 0x2640, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, -}; -const u16 gen_2_Eng_char_array[256]{ - 0x3F, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, - 0x4F, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x20, - 0x20, - 0x20, - 0x58, - 0x59, - 0x5A, - 0x28, - 0x29, - 0x3A, - 0x3B, - 0x28, - 0x20, - 0x71, - 0x72, - 0x20, - 0x20, - 0x20, - 0x20, - 0x77, - 0x78, - 0x79, - 0x7A, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0xC4, - 0xD6, - 0xDC, - 0xE4, - 0xF6, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x5A, - 0x28, - 0x29, - 0x3A, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x72, - 0x20, - 0x20, - 0x19E, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x2588, - 0x25B2, - 0x20, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x56, - 0x53, - 0x4C, - 0x4D, - 0x3A, - 0x3043, - 0x3045, - 0x50, - 0x4B, - 0x201C, - 0x201D, - 0x30FB, - 0x2026, - 0x3041, - 0x3047, - 0x3049, - 0x20, - 0x2550, - 0x2557, - 0x2551, - 0x255A, - 0x255D, - 0x2420, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, - 0x4F, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x55, - 0x56, - 0x57, - 0x58, - 0x59, - 0x5A, - 0x28, - 0x29, - 0x3A, - 0x3B, - 0x28, - 0x29, - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x6E, - 0x6F, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - 0x7A, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0xC4, - 0xD6, - 0xDC, - 0xE4, - 0xF6, - 0xFC, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x64, - 0x6C, - 0x6D, - 0x72, - 0x73, - 0x74, - 0x76, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0xD83E, - 0x20, - 0x50, - 0x4D, - 0x2D, - 0x20, - 0x20, - 0x3F, - 0x21, - 0x2E, - 0x26, - 0xE9, - 0xD83E, - 0x25B7, - 0x25B6, - 0x25BC, - 0x2642, - 0x20, - 0xD7, - 0x2E, - 0x2F, - 0x2C, - 0x2640, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, -}; -const u16 gen_2_FreGer_char_array[256]{ - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x19E, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x25B2, - 0x20, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x56, - 0x53, - 0x4C, - 0x4D, - 0x3A, - 0x3043, - 0x3045, - 0x50, - 0x4B, - 0x201C, - 0x201D, - 0x30FB, - 0x2026, - 0x3041, - 0x3047, - 0x3049, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, - 0x4F, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x55, - 0x56, - 0x57, - 0x58, - 0x59, - 0x5A, - 0x28, - 0x29, - 0x3A, - 0x3B, - 0x28, - 0x29, - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x6E, - 0x6F, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - 0x7A, - 0xE0, - 0xE8, - 0xE9, - 0xF9, - 0xDF, - 0xE7, - 0xC4, - 0xD6, - 0xDC, - 0xE4, - 0xF6, - 0xFC, - 0xEB, - 0xEF, - 0xE2, - 0xF4, - 0xFB, - 0xEA, - 0xEE, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x63, - 0x64, - 0x6A, - 0x6C, - 0x6D, - 0x6E, - 0x70, - 0x73, - 0x73, - 0x74, - 0x75, - 0x79, - 0x20, - 0x50, - 0x4D, - 0x2D, - 0x2B, - 0x20, - 0x3F, - 0x21, - 0x2E, - 0x26, - 0xE9, - 0x20, - 0x25B7, - 0x25B6, - 0x25BC, - 0x2642, - 0x20, - 0xD7, - 0x2E, - 0x2F, - 0x2C, - 0x2640, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, -}; -const u16 gen_2_ItaSpa_char_array[256]{ - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x19E, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x25B2, - 0x20, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x56, - 0x53, - 0x4C, - 0x4D, - 0x3A, - 0x3043, - 0x3045, - 0x50, - 0x4B, - 0x201C, - 0x201D, - 0x30FB, - 0x2026, - 0x3041, - 0x3047, - 0x3049, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, - 0x4F, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x55, - 0x56, - 0x57, - 0x58, - 0x59, - 0x5A, - 0x28, - 0x29, - 0x3A, - 0x3B, - 0x28, - 0x29, - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x6E, - 0x6F, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - 0x7A, - 0xE0, - 0xE8, - 0xE9, - 0xF9, - 0xC0, - 0xC1, - 0xC4, - 0xD6, - 0xDC, - 0xE4, - 0xF6, - 0xFC, - 0xC8, - 0xC9, - 0xCC, - 0xCD, - 0xD1, - 0xD2, - 0xD3, - 0xD9, - 0xDA, - 0xE1, - 0xEC, - 0xED, - 0xF1, - 0xF2, - 0xF3, - 0xFA, - 0xBA, - 0x26, - 0x64, - 0x6C, - 0x6D, - 0x72, - 0x73, - 0x74, - 0x76, - 0x20, - 0x20, - 0x50, - 0x4D, - 0x2D, - 0xBF, - 0xA1, - 0x3F, - 0x21, - 0x2E, - 0x26, - 0xE9, - 0x20, - 0x25B7, - 0x25B6, - 0x25BC, - 0x2642, - 0x20, - 0xD7, - 0x2E, - 0x2F, - 0x2C, - 0x2640, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, -}; -const u16 gen_3_Jpn_char_array[256]{ - 0x20, - 0x3042, - 0x3044, - 0x3046, - 0x3048, - 0x304A, - 0x304B, - 0x304D, - 0x304F, - 0x3051, - 0x3053, - 0x3055, - 0x3057, - 0x3059, - 0x305B, - 0x305D, - 0x305F, - 0x3061, - 0x3064, - 0x3066, - 0x3068, - 0x306A, - 0x306B, - 0x306C, - 0x306D, - 0x306E, - 0x306F, - 0x3072, - 0x3075, - 0x3078, - 0x307B, - 0x307E, - 0x307F, - 0x3080, - 0x3081, - 0x3082, - 0x3084, - 0x3086, - 0x3088, - 0x3089, - 0x308A, - 0x308B, - 0x308C, - 0x308D, - 0x308F, - 0x3092, - 0x3093, - 0x3041, - 0x3043, - 0x3045, - 0x3047, - 0x3049, - 0x3083, - 0x3085, - 0x3087, - 0x304C, - 0x304E, - 0x3050, - 0x3052, - 0x3054, - 0x3056, - 0x3058, - 0x305A, - 0x305C, - 0x305E, - 0x3060, - 0x3062, - 0x3065, - 0x3067, - 0x3069, - 0x3070, - 0x3073, - 0x3076, - 0x3079, - 0x307C, - 0x3071, - 0x3074, - 0x3077, - 0x307A, - 0x307D, - 0x3063, - 0x30A2, - 0x30A4, - 0x30A6, - 0x30A8, - 0x30AA, - 0x30AB, - 0x30AD, - 0x30AF, - 0x30B1, - 0x30B3, - 0x30B5, - 0x30B7, - 0x30B9, - 0x30BB, - 0x30BD, - 0x30BF, - 0x30C1, - 0x30C4, - 0x30C6, - 0x30C8, - 0x30CA, - 0x30CB, - 0x30CC, - 0x30CD, - 0x30CE, - 0x30CF, - 0x30D2, - 0x30D5, - 0x30D8, - 0x30DB, - 0x30DE, - 0x30DF, - 0x30E0, - 0x30E1, - 0x30E2, - 0x30E4, - 0x30E6, - 0x30E8, - 0x30E9, - 0x30EA, - 0x20, - 0x30EC, - 0x30ED, - 0x30EF, - 0x30F2, - 0x30F3, - 0x30A1, - 0x30A3, - 0x30A5, - 0x30A7, - 0x30A9, - 0x30E3, - 0x30E5, - 0x30E7, - 0x30AC, - 0x30AE, - 0x30B0, - 0x30B2, - 0x30B4, - 0x30B6, - 0x30B8, - 0x30BA, - 0x30BC, - 0x30BE, - 0x30C0, - 0x30C2, - 0x30C5, - 0x30C7, - 0x30C9, - 0x30D0, - 0x30D3, - 0x30D6, - 0x30D9, - 0x30DC, - 0x30D1, - 0x30D4, - 0x30D7, - 0x30DA, - 0x30DD, - 0x30C3, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, - 0xFF01, - 0xFF1F, - 0x3002, - 0x30FC, - 0x30FB, - 0x30FB, - 0x300E, - 0x300F, - 0x300C, - 0x300D, - 0x2642, - 0x2640, - 0x5186, - 0x2E, - 0xD7, - 0x2F, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, - 0x4F, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x55, - 0x56, - 0x57, - 0x58, - 0x59, - 0x5A, - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x6E, - 0x6F, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - 0x7A, - 0x25B6, - 0x3A, - 0xC4, - 0xD6, - 0xDC, - 0xE4, - 0xF6, - 0xFC, - 0x2B06, - 0x2B07, - 0x2B05, - 0x15E, - 0x23C, - 0x206, - 0x1B2, - 0x147, - 0x19E, -}; -const u16 gen_3_Intern_char_array[256]{ - 0x20, - 0xC0, - 0xC1, - 0xC2, - 0xC7, - 0xC8, - 0xC9, - 0xCA, - 0xCB, - 0xCC, - 0x20, - 0xCE, - 0xCF, - 0xD2, - 0xD3, - 0xD4, - 0x152, - 0xD9, - 0xDA, - 0xDB, - 0xD1, - 0xDF, - 0xE0, - 0xE1, - 0x20, - 0xE7, - 0xE8, - 0xE9, - 0xEA, - 0xEB, - 0xEC, - 0x20, - 0xEE, - 0xEF, - 0xF2, - 0xF3, - 0xF4, - 0x153, - 0xF9, - 0xFA, - 0xFB, - 0xF1, - 0xBA, - 0xAA, - 0x1D49, - 0x26, - 0x2B, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x3D, - 0x3B, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x25AF, - 0xBF, - 0xA1, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0xCD, - 0x25, - 0x28, - 0x29, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0xE2, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0xED, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x2B07, - 0x2B05, - 0x27A1, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x2A, - 0x1D49, - 0x3C, - 0x3E, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x20, - 0x2B3, - 0x30, - 0x31, - 0x32, - 0x33, - 0x34, - 0x35, - 0x36, - 0x37, - 0x38, - 0x39, - 0x21, - 0x3F, - 0x2E, - 0x2D, - 0x30FB, - 0x2026, - 0x201C, - 0x201D, - 0x2018, - 0x2019, - 0x2642, - 0x2640, - 0x20, - 0x2C, - 0xD7, - 0x2F, - 0x41, - 0x42, - 0x43, - 0x44, - 0x45, - 0x46, - 0x47, - 0x48, - 0x49, - 0x4A, - 0x4B, - 0x4C, - 0x4D, - 0x4E, - 0x4F, - 0x50, - 0x51, - 0x52, - 0x53, - 0x54, - 0x55, - 0x56, - 0x57, - 0x58, - 0x59, - 0x5A, - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x6E, - 0x6F, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - 0x7A, - 0x25B6, - 0x3A, - 0xC4, - 0xD6, - 0xDC, - 0xE4, - 0xF6, - 0xFC, - 0x20, - 0x20, - 0x20, - 0x15E, - 0x23C, - 0x206, - 0x1B2, - 0x147, - 0x19E, + +const u16 gen_3_charsets[2][256]{ + // gen_3_Jpn_char_array + { + 0x20, + 0x3042, + 0x3044, + 0x3046, + 0x3048, + 0x304A, + 0x304B, + 0x304D, + 0x304F, + 0x3051, + 0x3053, + 0x3055, + 0x3057, + 0x3059, + 0x305B, + 0x305D, + 0x305F, + 0x3061, + 0x3064, + 0x3066, + 0x3068, + 0x306A, + 0x306B, + 0x306C, + 0x306D, + 0x306E, + 0x306F, + 0x3072, + 0x3075, + 0x3078, + 0x307B, + 0x307E, + 0x307F, + 0x3080, + 0x3081, + 0x3082, + 0x3084, + 0x3086, + 0x3088, + 0x3089, + 0x308A, + 0x308B, + 0x308C, + 0x308D, + 0x308F, + 0x3092, + 0x3093, + 0x3041, + 0x3043, + 0x3045, + 0x3047, + 0x3049, + 0x3083, + 0x3085, + 0x3087, + 0x304C, + 0x304E, + 0x3050, + 0x3052, + 0x3054, + 0x3056, + 0x3058, + 0x305A, + 0x305C, + 0x305E, + 0x3060, + 0x3062, + 0x3065, + 0x3067, + 0x3069, + 0x3070, + 0x3073, + 0x3076, + 0x3079, + 0x307C, + 0x3071, + 0x3074, + 0x3077, + 0x307A, + 0x307D, + 0x3063, + 0x30A2, + 0x30A4, + 0x30A6, + 0x30A8, + 0x30AA, + 0x30AB, + 0x30AD, + 0x30AF, + 0x30B1, + 0x30B3, + 0x30B5, + 0x30B7, + 0x30B9, + 0x30BB, + 0x30BD, + 0x30BF, + 0x30C1, + 0x30C4, + 0x30C6, + 0x30C8, + 0x30CA, + 0x30CB, + 0x30CC, + 0x30CD, + 0x30CE, + 0x30CF, + 0x30D2, + 0x30D5, + 0x30D8, + 0x30DB, + 0x30DE, + 0x30DF, + 0x30E0, + 0x30E1, + 0x30E2, + 0x30E4, + 0x30E6, + 0x30E8, + 0x30E9, + 0x30EA, + 0x20, + 0x30EC, + 0x30ED, + 0x30EF, + 0x30F2, + 0x30F3, + 0x30A1, + 0x30A3, + 0x30A5, + 0x30A7, + 0x30A9, + 0x30E3, + 0x30E5, + 0x30E7, + 0x30AC, + 0x30AE, + 0x30B0, + 0x30B2, + 0x30B4, + 0x30B6, + 0x30B8, + 0x30BA, + 0x30BC, + 0x30BE, + 0x30C0, + 0x30C2, + 0x30C5, + 0x30C7, + 0x30C9, + 0x30D0, + 0x30D3, + 0x30D6, + 0x30D9, + 0x30DC, + 0x30D1, + 0x30D4, + 0x30D7, + 0x30DA, + 0x30DD, + 0x30C3, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + 0xFF01, + 0xFF1F, + 0x3002, + 0x30FC, + 0x30FB, + 0x30FB, + 0x300E, + 0x300F, + 0x300C, + 0x300D, + 0x2642, + 0x2640, + 0x5186, + 0x2E, + 0xD7, + 0x2F, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, + 0x4F, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x55, + 0x56, + 0x57, + 0x58, + 0x59, + 0x5A, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6A, + 0x6B, + 0x6C, + 0x6D, + 0x6E, + 0x6F, + 0x70, + 0x71, + 0x72, + 0x73, + 0x74, + 0x75, + 0x76, + 0x77, + 0x78, + 0x79, + 0x7A, + 0x25B6, + 0x3A, + 0xC4, + 0xD6, + 0xDC, + 0xE4, + 0xF6, + 0xFC, + 0x2B06, + 0x2B07, + 0x2B05, + 0x15E, + 0x23C, + 0x206, + 0x1B2, + 0x147, + 0x19E, + }, + // gen_3_Intern_char_array + { + 0x20, + 0xC0, + 0xC1, + 0xC2, + 0xC7, + 0xC8, + 0xC9, + 0xCA, + 0xCB, + 0xCC, + 0x20, + 0xCE, + 0xCF, + 0xD2, + 0xD3, + 0xD4, + 0x152, + 0xD9, + 0xDA, + 0xDB, + 0xD1, + 0xDF, + 0xE0, + 0xE1, + 0x20, + 0xE7, + 0xE8, + 0xE9, + 0xEA, + 0xEB, + 0xEC, + 0x20, + 0xEE, + 0xEF, + 0xF2, + 0xF3, + 0xF4, + 0x153, + 0xF9, + 0xFA, + 0xFB, + 0xF1, + 0xBA, + 0xAA, + 0x1D49, + 0x26, + 0x2B, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x3D, + 0x3B, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x25AF, + 0xBF, + 0xA1, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0xCD, + 0x25, + 0x28, + 0x29, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0xE2, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0xED, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x2B07, + 0x2B05, + 0x27A1, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x2A, + 0x1D49, + 0x3C, + 0x3E, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x20, + 0x2B3, + 0x30, + 0x31, + 0x32, + 0x33, + 0x34, + 0x35, + 0x36, + 0x37, + 0x38, + 0x39, + 0x21, + 0x3F, + 0x2E, + 0x2D, + 0x30FB, + 0x2026, + 0x201C, + 0x201D, + 0x2018, + 0x2019, + 0x2642, + 0x2640, + 0x20, + 0x2C, + 0xD7, + 0x2F, + 0x41, + 0x42, + 0x43, + 0x44, + 0x45, + 0x46, + 0x47, + 0x48, + 0x49, + 0x4A, + 0x4B, + 0x4C, + 0x4D, + 0x4E, + 0x4F, + 0x50, + 0x51, + 0x52, + 0x53, + 0x54, + 0x55, + 0x56, + 0x57, + 0x58, + 0x59, + 0x5A, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6A, + 0x6B, + 0x6C, + 0x6D, + 0x6E, + 0x6F, + 0x70, + 0x71, + 0x72, + 0x73, + 0x74, + 0x75, + 0x76, + 0x77, + 0x78, + 0x79, + 0x7A, + 0x25B6, + 0x3A, + 0xC4, + 0xD6, + 0xDC, + 0xE4, + 0xF6, + 0xFC, + 0x20, + 0x20, + 0x20, + 0x15E, + 0x23C, + 0x206, + 0x1B2, + 0x147, + 0x19E, + } }; + const u8 EXP_GROUPS[POKEMON_ARRAY_SIZE] = { 0, // Offset the list to remove "off by one" errors 3, // Bulbasaur @@ -4317,261 +4142,7 @@ const u16 JPN_NAMES[POKEMON_ARRAY_SIZE][6]{ {0x30BB, 0x30EC, 0x30D3, 0x30A3, 0x19E}, // Celebi {0x30AD, 0x30E2, 0x30EA}, // Treecko }; -const u8 EVOLUTIONS[POKEMON_ARRAY_SIZE]{ - 0, // Offset the list to remove "off by one" errors - 0x0, // Bulbasaur is a base evolution - 0x1, // Ivysaur evolves from Bulbasaur - 0x2, // Venusaur evolves from Ivysaur - 0x0, // Charmander is a base evolution - 0x4, // Charmeleon evolves from Charmander - 0x5, // Charizard evolves from Charmeleon - 0x0, // Squirtle is a base evolution - 0x7, // Wartortle evolves from Squirtle - 0x8, // Blastoise evolves from Wartortle - 0x0, // Caterpie is a base evolution - 0xa, // Metapod evolves from Caterpie - 0xb, // Butterfree evolves from Metapod - 0x0, // Weedle is a base evolution - 0xd, // Kakuna evolves from Weedle - 0xe, // Beedrill evolves from Kakuna - 0x0, // Pidgey is a base evolution - 0x10, // Pidgeotto evolves from Pidgey - 0x11, // Pidgeot evolves from Pidgeotto - 0x0, // Rattata is a base evolution - 0x13, // Raticate evolves from Rattata - 0x0, // Spearow is a base evolution - 0x15, // Fearow evolves from Spearow - 0x0, // Ekans is a base evolution - 0x17, // Arbok evolves from Ekans - 0xac, // Pikachu evolves from Pichu - 0x19, // Raichu evolves from Pikachu - 0x0, // Sandshrew is a base evolution - 0x1b, // Sandslash evolves from Sandshrew - 0x0, // Nidoran-f is a base evolution - 0x1d, // Nidorina evolves from Nidoran-f - 0x1e, // Nidoqueen evolves from Nidorina - 0x0, // Nidoran-m is a base evolution - 0x20, // Nidorino evolves from Nidoran-m - 0x21, // Nidoking evolves from Nidorino - 0xad, // Clefairy evolves from Cleffa - 0x23, // Clefable evolves from Clefairy - 0x0, // Vulpix is a base evolution - 0x25, // Ninetales evolves from Vulpix - 0xae, // Jigglypuff evolves from Igglybuff - 0x27, // Wigglytuff evolves from Jigglypuff - 0x0, // Zubat is a base evolution - 0x29, // Golbat evolves from Zubat - 0x0, // Oddish is a base evolution - 0x2b, // Gloom evolves from Oddish - 0x2c, // Vileplume evolves from Gloom - 0x0, // Paras is a base evolution - 0x2e, // Parasect evolves from Paras - 0x0, // Venonat is a base evolution - 0x30, // Venomoth evolves from Venonat - 0x0, // Diglett is a base evolution - 0x32, // Dugtrio evolves from Diglett - 0x0, // Meowth is a base evolution - 0x34, // Persian evolves from Meowth - 0x0, // Psyduck is a base evolution - 0x36, // Golduck evolves from Psyduck - 0x0, // Mankey is a base evolution - 0x38, // Primeape evolves from Mankey - 0x0, // Growlithe is a base evolution - 0x3a, // Arcanine evolves from Growlithe - 0x0, // Poliwag is a base evolution - 0x3c, // Poliwhirl evolves from Poliwag - 0x3d, // Poliwrath evolves from Poliwhirl - 0x0, // Abra is a base evolution - 0x3f, // Kadabra evolves from Abra - 0x40, // Alakazam evolves from Kadabra - 0x0, // Machop is a base evolution - 0x42, // Machoke evolves from Machop - 0x43, // Machamp evolves from Machoke - 0x0, // Bellsprout is a base evolution - 0x45, // Weepinbell evolves from Bellsprout - 0x46, // Victreebel evolves from Weepinbell - 0x0, // Tentacool is a base evolution - 0x48, // Tentacruel evolves from Tentacool - 0x0, // Geodude is a base evolution - 0x4a, // Graveler evolves from Geodude - 0x4b, // Golem evolves from Graveler - 0x0, // Ponyta is a base evolution - 0x4d, // Rapidash evolves from Ponyta - 0x0, // Slowpoke is a base evolution - 0x4f, // Slowbro evolves from Slowpoke - 0x0, // Magnemite is a base evolution - 0x51, // Magneton evolves from Magnemite - 0x0, // Farfetchd is a base evolution - 0x0, // Doduo is a base evolution - 0x54, // Dodrio evolves from Doduo - 0x0, // Seel is a base evolution - 0x56, // Dewgong evolves from Seel - 0x0, // Grimer is a base evolution - 0x58, // Muk evolves from Grimer - 0x0, // Shellder is a base evolution - 0x5a, // Cloyster evolves from Shellder - 0x0, // Gastly is a base evolution - 0x5c, // Haunter evolves from Gastly - 0x5d, // Gengar evolves from Haunter - 0x0, // Onix is a base evolution - 0x0, // Drowzee is a base evolution - 0x60, // Hypno evolves from Drowzee - 0x0, // Krabby is a base evolution - 0x62, // Kingler evolves from Krabby - 0x0, // Voltorb is a base evolution - 0x64, // Electrode evolves from Voltorb - 0x0, // Exeggcute is a base evolution - 0x66, // Exeggutor evolves from Exeggcute - 0x0, // Cubone is a base evolution - 0x68, // Marowak evolves from Cubone - 0xec, // Hitmonlee evolves from Tyrogue - 0xec, // Hitmonchan evolves from Tyrogue - 0x0, // Lickitung is a base evolution - 0x0, // Koffing is a base evolution - 0x6d, // Weezing evolves from Koffing - 0x0, // Rhyhorn is a base evolution - 0x6f, // Rhydon evolves from Rhyhorn - 0x0, // Chansey is a base evolution (in gen 2) - 0x0, // Tangela is a base evolution - 0x0, // Kangaskhan is a base evolution - 0x0, // Horsea is a base evolution - 0x74, // Seadra evolves from Horsea - 0x0, // Goldeen is a base evolution - 0x76, // Seaking evolves from Goldeen - 0x0, // Staryu is a base evolution - 0x78, // Starmie evolves from Staryu - 0x0, // Mr-mime is a base evolution (in gen 2) - 0x0, // Scyther is a base evolution - 0xee, // Jynx evolves from Smoochum - 0xef, // Electabuzz evolves from Elekid - 0xf0, // Magmar evolves from Magby - 0x0, // Pinsir is a base evolution - 0x0, // Tauros is a base evolution - 0x0, // Magikarp is a base evolution - 0x81, // Gyarados evolves from Magikarp - 0x0, // Lapras is a base evolution - 0x0, // Ditto is a base evolution - 0x0, // Eevee is a base evolution - 0x85, // Vaporeon evolves from Eevee - 0x85, // Jolteon evolves from Eevee - 0x85, // Flareon evolves from Eevee - 0x0, // Porygon is a base evolution - 0x0, // Omanyte is a base evolution - 0x8a, // Omastar evolves from Omanyte - 0x0, // Kabuto is a base evolution - 0x8c, // Kabutops evolves from Kabuto - 0x0, // Aerodactyl is a base evolution - 0x0, // Snorlax is a base evolution (in gen 2) - 0x0, // Articuno is a base evolution - 0x0, // Zapdos is a base evolution - 0x0, // Moltres is a base evolution - 0x0, // Dratini is a base evolution - 0x93, // Dragonair evolves from Dratini - 0x94, // Dragonite evolves from Dragonair - 0x0, // Mewtwo is a base evolution - 0x0, // Mew is a base evolution - 0x0, // Chikorita is a base evolution - 0x98, // Bayleef evolves from Chikorita - 0x99, // Meganium evolves from Bayleef - 0x0, // Cyndaquil is a base evolution - 0x9b, // Quilava evolves from Cyndaquil - 0x9c, // Typhlosion evolves from Quilava - 0x0, // Totodile is a base evolution - 0x9e, // Croconaw evolves from Totodile - 0x9f, // Feraligatr evolves from Croconaw - 0x0, // Sentret is a base evolution - 0xa1, // Furret evolves from Sentret - 0x0, // Hoothoot is a base evolution - 0xa3, // Noctowl evolves from Hoothoot - 0x0, // Ledyba is a base evolution - 0xa5, // Ledian evolves from Ledyba - 0x0, // Spinarak is a base evolution - 0xa7, // Ariados evolves from Spinarak - 0x2a, // Crobat evolves from Golbat - 0x0, // Chinchou is a base evolution - 0xaa, // Lanturn evolves from Chinchou - 0x0, // Pichu is a base evolution - 0x0, // Cleffa is a base evolution - 0x0, // Igglybuff is a base evolution - 0x0, // Togepi is a base evolution - 0xaf, // Togetic evolves from Togepi - 0x0, // Natu is a base evolution - 0xb1, // Xatu evolves from Natu - 0x0, // Mareep is a base evolution - 0xb3, // Flaaffy evolves from Mareep - 0xb4, // Ampharos evolves from Flaaffy - 0x2c, // Bellossom evolves from Gloom - 0x0, // Marill is a base evolution (in gen 2) - 0xb7, // Azumarill evolves from Marill - 0x0, // Sudowoodo is a base evolution (in gen 2) - 0x3d, // Politoed evolves from Poliwhirl - 0x0, // Hoppip is a base evolution - 0xbb, // Skiploom evolves from Hoppip - 0xbc, // Jumpluff evolves from Skiploom - 0x0, // Aipom is a base evolution - 0x0, // Sunkern is a base evolution - 0xbf, // Sunflora evolves from Sunkern - 0x0, // Yanma is a base evolution - 0x0, // Wooper is a base evolution - 0xc2, // Quagsire evolves from Wooper - 0x85, // Espeon evolves from Eevee - 0x85, // Umbreon evolves from Eevee - 0x0, // Murkrow is a base evolution - 0x4f, // Slowking evolves from Slowpoke - 0x0, // Misdreavus is a base evolution - 0x0, // Unown is a base evolution - 0x0, // Wobbuffet is a base evolution (in gen 2) - 0x0, // Girafarig is a base evolution - 0x0, // Pineco is a base evolution - 0xcc, // Forretress evolves from Pineco - 0x0, // Dunsparce is a base evolution - 0x0, // Gligar is a base evolution - 0x5f, // Steelix evolves from Onix - 0x0, // Snubbull is a base evolution - 0xd1, // Granbull evolves from Snubbull - 0x0, // Qwilfish is a base evolution - 0x7b, // Scizor evolves from Scyther - 0x0, // Shuckle is a base evolution - 0x0, // Heracross is a base evolution - 0x0, // Sneasel is a base evolution - 0x0, // Teddiursa is a base evolution - 0xd8, // Ursaring evolves from Teddiursa - 0x0, // Slugma is a base evolution - 0xda, // Magcargo evolves from Slugma - 0x0, // Swinub is a base evolution - 0xdc, // Piloswine evolves from Swinub - 0x0, // Corsola is a base evolution - 0x0, // Remoraid is a base evolution - 0xdf, // Octillery evolves from Remoraid - 0x0, // Delibird is a base evolution - 0x0, // Mantine is a base evolution (in gen 2) - 0x0, // Skarmory is a base evolution - 0x0, // Houndour is a base evolution - 0xe4, // Houndoom evolves from Houndour - 0x75, // Kingdra evolves from Seadra - 0x0, // Phanpy is a base evolution - 0xe7, // Donphan evolves from Phanpy - 0x89, // Porygon2 evolves from Porygon - 0x0, // Stantler is a base evolution - 0x0, // Smeargle is a base evolution - 0x0, // Tyrogue is a base evolution - 0xec, // Hitmontop evolves from Tyrogue - 0x0, // Smoochum is a base evolution - 0x0, // Elekid is a base evolution - 0x0, // Magby is a base evolution - 0x0, // Miltank is a base evolution - 0x71, // Blissey evolves from Chansey - 0x0, // Raikou is a base evolution - 0x0, // Entei is a base evolution - 0x0, // Suicune is a base evolution - 0x0, // Larvitar is a base evolution - 0xf6, // Pupitar evolves from Larvitar - 0xf7, // Tyranitar evolves from Pupitar - 0x0, // Lugia is a base evolution - 0x0, // Ho-oh is a base evolution - 0x0, // Celebi is a base evolution - 0x0, // Treecko is a base evolution -}; + const u8 POWER_POINTS[252]{ 0, // Offset the list to remove "off by one" errors 35, // Pound @@ -5395,24 +4966,15 @@ const u8 TYPES[POKEMON_ARRAY_SIZE][2]{ void generate_pokemon_data() { - writeTable("gen_1_index_array.bin", gen_1_index_array, sizeof(gen_1_index_array)); - writeTable("gen_1_Jpn_char_array.bin", (const uint8_t*)gen_1_Jpn_char_array, sizeof(gen_1_Jpn_char_array)); - writeTable("gen_1_Eng_char_array.bin", (const uint8_t*)gen_1_Eng_char_array, sizeof(gen_1_Eng_char_array)); - writeTable("gen_1_FreGer_char_array.bin", (const uint8_t*)gen_1_FreGer_char_array, sizeof(gen_1_FreGer_char_array)); - writeTable("gen_1_ItaSpa_char_array.bin", (const uint8_t*)gen_1_ItaSpa_char_array, sizeof(gen_1_ItaSpa_char_array)); - writeTable("gen_2_Jpn_char_array.bin", (const uint8_t*)gen_2_Jpn_char_array, sizeof(gen_2_Jpn_char_array)); - writeTable("gen_2_Eng_char_array.bin", (const uint8_t*)gen_2_Eng_char_array, sizeof(gen_2_Eng_char_array)); - writeTable("gen_2_FreGer_char_array.bin", (const uint8_t*)gen_2_FreGer_char_array, sizeof(gen_2_FreGer_char_array)); - writeTable("gen_2_ItaSpa_char_array.bin", (const uint8_t*)gen_2_ItaSpa_char_array, sizeof(gen_2_ItaSpa_char_array)); - writeTable("gen_3_Jpn_char_array.bin", (const uint8_t*)gen_3_Jpn_char_array, sizeof(gen_3_Jpn_char_array)); - writeTable("gen_3_Intern_char_array.bin", (const uint8_t*)gen_3_Intern_char_array, sizeof(gen_3_Intern_char_array)); + writeTable("gen_1_charsets.bin", (const uint8_t*)gen_1_charsets, sizeof(gen_1_charsets)); + writeTable("gen_2_charsets.bin", (const uint8_t*)gen_2_charsets, sizeof(gen_2_charsets)); + writeTable("gen_3_charsets.bin", (const uint8_t*)gen_3_charsets, sizeof(gen_3_charsets)); writeTable("EXP_GROUPS.bin", EXP_GROUPS, sizeof(EXP_GROUPS)); writeTable("GENDER_RATIO.bin", GENDER_RATIO, sizeof(GENDER_RATIO)); writeTable("NUM_ABILITIES.bin", (const uint8_t*)(NUM_ABILITIES), sizeof(NUM_ABILITIES)); writeTable("MOVESETS.bin", (const uint8_t*)(MOVESETS), sizeof(MOVESETS)); writeTable("FIRST_MOVES.bin", FIRST_MOVES, sizeof(FIRST_MOVES)); writeTable("JPN_NAMES.bin", (const uint8_t*)JPN_NAMES, sizeof(JPN_NAMES)); - writeTable("EVOLUTIONS.bin", EVOLUTIONS, sizeof(EVOLUTIONS)); writeTable("POWER_POINTS.bin", POWER_POINTS, sizeof(POWER_POINTS)); writeTable("MENU_SPRITE_PALS.bin", (const uint8_t*)MENU_SPRITE_PALS, sizeof(MENU_SPRITE_PALS)); writeTable("EVENT_PKMN.bin", (const uint8_t*)EVENT_PKMN, sizeof(EVENT_PKMN));