From add977cf028eba2d7db48d9f05182e8e451bcd61 Mon Sep 17 00:00:00 2001 From: The Gears of Progress Date: Wed, 3 Jul 2024 17:44:33 -0400 Subject: [PATCH] Prep for bug testing --- graphics/background.png | Bin 601 -> 1661 bytes graphics/unused graphics/backgroundNew.png | Bin 0 -> 601 bytes graphics/unused graphics/oldBackground.png | Bin 1661 -> 0 bytes include/background_engine.h | 2 +- include/debug_mode.h | 13 +- include/gba_rom_values/eng_gba_rom_values.h | 24 +- include/save_data_manager.h | 3 +- source/background_engine.cpp | 10 +- source/global_frame_controller.cpp | 2 +- source/main.cpp | 75 +- source/payload_builder.cpp | 5 +- source/pokemon_party.cpp | 1186 +------------------ 12 files changed, 167 insertions(+), 1153 deletions(-) create mode 100644 graphics/unused graphics/backgroundNew.png delete mode 100644 graphics/unused graphics/oldBackground.png diff --git a/graphics/background.png b/graphics/background.png index 514d0f1a597d308782ab89615d5d1e14c2aac15a..d77674b7d543b5eb5908b58eebed900501d077d4 100644 GIT binary patch literal 1661 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5C#Tjh5(-sS0EP%{sU1n!+#J3 zL=X(5nt@Vt_HuNu;V?`x8a~ttAIaPa zOMpSlSQ6wH%;50sMj9|E<_vG)%^`GkA_}}aQd-C^2`%3$7@7Xte zO|F0ZyBIG<)dR8+YT$R~8^1R0|M+(&J`A!4Ne_}EelzC$y>b7?zdQIa4u`-0yshrd zZT<=0lke9x0R8rj8R(|%@(S;d@B7ODwDB$biQgOZ?H%s**ZyV%dSF!PunU2|`|tDr ZU{(oi*y=RFb_1xG@^tlcS?83{1ORvL=PLjJ delta 540 zcmey%bCYF)1TPCS0|Udln605e%3z|ZN&Omby&Vh;j88mW978JRyuER7rLv&_+rxAA zB9+G&Z%FcVB_s&VXinO2tBhe+$EAflr_aAzDSmHrmp<2@&QBH3mj_5cJyARNirdP{ zQ*}YozsqdyJ-xN!E&G+nrBCe*q<=@guA4jc7AxP5ZC?L4Kh@7aEno1zUTJ0Tx8HMX zf~40zt>1oWbKq_M9lyU9{kPuow;{|+jwSbjt;05lya~D!q*J(`u-#A3B{_t^sV z++r3D?-=)Vd|*Bxwqt)N52~UX{uj)@8te|pH+*M^cLA~%@E-sg1fqcw2b4UQ@%z-g z{@OV4X|;p=1@?z;KV0eu!9)t8SXLH2)+clnc+LbO(wA0Uody8 k%(OH3xb`}`+c#$EUxNGBmvSiqqo2Xk)z5`xol`;+0E6c8_5c6? diff --git a/graphics/unused graphics/backgroundNew.png b/graphics/unused graphics/backgroundNew.png new file mode 100644 index 0000000000000000000000000000000000000000..514d0f1a597d308782ab89615d5d1e14c2aac15a GIT binary patch literal 601 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58CaNs)Vi3hp+L$Yz$e5NNCUxtAZlj#52Anw zf`L>sP-@Ozj_x%ahDnATmK;Ft8g9KEK!cumx;TbZ%z1m`;7Vmf0k((d>_sY%G2W2m z=}Jftn$euJ;Z_;Lu8vC!c}|~yw^IDx<}Q7%Kb@Z{o-YrOetM#I?iII{m8a^0q<@#$ z+Md5j9oxMAaek_we_Foaf4$Pm-fzF>)&xnfeY*Y9 z=D^$hJAQvJ`ft7EZ$p@u982y4TZe59c@uOeNT+Z=VY|t+({bB@@3RH!xy39R-ZAd! z_`rNXY{&jk9#lm&{4bb)HP{`HZ}`p-?*e2k;6DH~2t)%V4k&pp8a~ttAIaPa zOMpSlSQ6wH%;50sMj9|E<_vG)%^`GkA_}}aQd-C^2`%3$7@7Xte zO|F0ZyBIG<)dR8+YT$R~8^1R0|M+(&J`A!4Ne_}EelzC$y>b7?zdQIa4u`-0yshrd zZT<=0lke9x0R8rj8R(|%@(S;d@B7ODwDB$biQgOZ?H%s**ZyV%dSF!PunU2|`|tDr ZU{(oi*y=RFb_1xG@^tlcS?83{1ORvL=PLjJ diff --git a/include/background_engine.h b/include/background_engine.h index fa57323..9ce9105 100644 --- a/include/background_engine.h +++ b/include/background_engine.h @@ -1,7 +1,7 @@ #ifndef BACKGROUND_ENGINE_H #define BACKGROUND_ENGINE_H -void background_frame(); +void background_frame(int global_frame_count); void set_textbox_large(); void set_textbox_small(); void show_textbox(); diff --git a/include/debug_mode.h b/include/debug_mode.h index ecf7321..925b2fc 100644 --- a/include/debug_mode.h +++ b/include/debug_mode.h @@ -2,19 +2,20 @@ #define DEBUG_MODE_H #define DEBUG_MODE false -#define IGNORE_GAME_PAK true -#define IGNORE_LINK_CABLE true -#define IGNORE_MG_E4_FLAGS true -#define IGNORE_UNRECEIVED_PKMN true +#define IGNORE_GAME_PAK false +#define IGNORE_LINK_CABLE false +#define IGNORE_MG_E4_FLAGS false +#define IGNORE_UNRECEIVED_PKMN false #define FORCE_TUTORIAL false #define DONT_REMOVE_PKMN false #define SHOW_INVALID_PKMN false -#define DEBUG_GAME RUBY_ID -#define DEBUG_VERS VERS_1_1 +#define DEBUG_GAME FIRERED_ID +#define DEBUG_VERS VERS_1_0 #define DEBUG_LANG LANG_ENG #define ENABLE_MATCH_PID true #define ENABLE_OLD_EVENT true +#define ENABLE_DEBUG_SCREEN true #endif \ No newline at end of file diff --git a/include/gba_rom_values/eng_gba_rom_values.h b/include/gba_rom_values/eng_gba_rom_values.h index d9a4e62..a18982c 100644 --- a/include/gba_rom_values/eng_gba_rom_values.h +++ b/include/gba_rom_values/eng_gba_rom_values.h @@ -332,9 +332,9 @@ const struct ROM_DATA ENG_FIRERED_v0 = { .special_DrawWholeMapView = 0x8E, // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt - .e4_flag = 0x860 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" - .mg_flag = 0x860 + 0x7B, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS - .unused_flag_start = 0x20, // The start of the unused flags and must have 31 open flags in a row + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row .map_bank = 31, .map_id = 0, @@ -384,9 +384,9 @@ const struct ROM_DATA ENG_LEAFGREEN_v0 = { .special_DrawWholeMapView = 0x8E, // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt - .e4_flag = 0x860 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" - .mg_flag = 0x860 + 0x7B, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS - .unused_flag_start = 0x20, // The start of the unused flags and must have 31 open flags in a row + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row .map_bank = 31, .map_id = 0, @@ -436,9 +436,9 @@ const struct ROM_DATA ENG_FIRERED_v1 = { .special_DrawWholeMapView = 0x8E, // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt - .e4_flag = 0x860 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" - .mg_flag = 0x860 + 0x7B, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS - .unused_flag_start = 0x20, // The start of the unused flags and must have 31 open flags in a row + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row .map_bank = 31, .map_id = 0, @@ -488,9 +488,9 @@ const struct ROM_DATA ENG_LEAFGREEN_v1 = { .special_DrawWholeMapView = 0x8E, // PKHeX's list of flags is useful for making sure the detection is accurate: https://github.com/kwsch/PKHeX/blob/78a557c3cdaa6f48b42cc96df8ccb4d20b897937/PKHeX.Core/Resources/text/other/flags_rs.txt - .e4_flag = 0x860 + 0x04, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" - .mg_flag = 0x860 + 0x7B, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS - .unused_flag_start = 0x20, // The start of the unused flags and must have 31 open flags in a row + .e4_flag = 0x800 + 0x2C, // The flag that is set when you become champion. Often listed as "GAME_CLEAR" + .mg_flag = 0x800 + 0x39, // The flag that is set when you enable Mystery Gift. Known as "EXDATA_ENABLE" in RS + .unused_flag_start = 0xAF, // The start of the unused flags and must have 31 open flags in a row .map_bank = 31, .map_id = 0, diff --git a/include/save_data_manager.h b/include/save_data_manager.h index faee9ac..e493ab8 100644 --- a/include/save_data_manager.h +++ b/include/save_data_manager.h @@ -13,7 +13,7 @@ // | Offset | Size | Contents // -------------------------- #define CAUGHT_DATA 0x00 // | 0x0 | 32 | Flags for each Pokemon species -#define TUTORIAL_FLAG 0x20 // | 0x1 | 1 | Has made it through the tutorial +#define TUTORIAL_FLAG 0x20 // | 0x21 | 1 | Has made it through the tutorial #define DEFAULT_LANGUAGE 0x21 // | 0x22 | 1 | Default international language #define SAVE_DATA_SIZE 0x22 @@ -23,7 +23,6 @@ void load_custom_save_data(); void write_custom_save_data(); bool is_caught(int dex_num); void set_caught(int dex_num); -int get_def_lang(); void set_def_lang(int nLang); int get_def_lang_num(); bool get_tutorial_flag(); diff --git a/source/background_engine.cpp b/source/background_engine.cpp index 848b3cd..7ec0f53 100644 --- a/source/background_engine.cpp +++ b/source/background_engine.cpp @@ -8,13 +8,13 @@ #define SBB 24 int x, y; -void background_frame() +void background_frame(int global_frame_count) { - x++; - y++; + x++; + y++; - REG_BG0HOFS = x; - REG_BG0VOFS = y; + REG_BG0HOFS = x; + REG_BG0VOFS = y; } void set_textbox_large() diff --git a/source/global_frame_controller.cpp b/source/global_frame_controller.cpp index 6c2b837..44953e1 100644 --- a/source/global_frame_controller.cpp +++ b/source/global_frame_controller.cpp @@ -16,7 +16,7 @@ void global_next_frame() rand_next_frame(); // tte_set_pos(0, 0); // tte_write(std::to_string(get_rand_u32()).c_str()); - background_frame(); + background_frame(global_frame_count); oam_copy(oam_mem, obj_buffer, num_sprites); VBlankIntrWait(); // mmFrame(); //Music diff --git a/source/main.cpp b/source/main.cpp index 3b12719..5041968 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -40,6 +40,7 @@ TODO: - MissingNo/Enigma Berry - Text translations - Add support for other languages +- Add in dolls for gen 2/3 - Doxygen generation -------- */ @@ -80,6 +81,16 @@ int test_main(void) Music } */ +template +std::string n2hexstr(I w, size_t hex_len = sizeof(I) << 1) +{ + static const char *digits = "0123456789ABCDEF"; + std::string rc(hex_len, '0'); + for (size_t i = 0, j = (hex_len - 1) * 4; i < hex_len; ++i, j -= 4) + rc[i] = digits[(w >> j) & 0x0f]; + return rc; +} + void load_graphics() { tte_erase_rect(0, 0, H_MAX, V_MAX); @@ -144,7 +155,6 @@ void game_load_error(void) tte_set_margins(40, 24, 206, 104); set_textbox_large(); tte_write("#{cx:0xF000}The Pok@mon save\nfile was not loaded successfully.\n\nPlease remove and\nreinsert the Game\nPak, and then press the A button."); - // tte_write(std::to_string(get_gamecode() >> 8).c_str()); key_poll(); while (!key_hit(KEY_A)) { @@ -199,6 +209,7 @@ int credits() { set_textbox_large(); tte_write(credits_array[curr_credits_num].c_str()); + if (key_hit(KEY_B)) { hide_text_box(); @@ -213,9 +224,69 @@ int credits() { curr_credits_num++; } + if (ENABLE_DEBUG_SCREEN && key_hit(KEY_SELECT)) + { + u32 pkmn_flags = 0; + bool e4_flag = read_flag(curr_rom.e4_flag); + bool mg_flag = read_flag(curr_rom.mg_flag); + bool all_collected_flag = read_flag(curr_rom.all_collected_flag); + for (int i = 0; i < 30; i++) + { + pkmn_flags |= (read_flag(curr_rom.pkmn_collected_flag_start + i) << i); + } + + bool tutorial = get_tutorial_flag(); + int def_lang = get_def_lang_num(); + + set_textbox_large(); + tte_write("Debug info:\n\nG: "); + std::string lang; + lang += curr_rom.language; + tte_write(lang.c_str()); + switch (curr_rom.gamecode) + { + case RUBY_ID: + tte_write("-R-"); + break; + case SAPPHIRE_ID: + tte_write("-S-"); + break; + case FIRERED_ID: + tte_write("-F-"); + break; + case LEAFGREEN_ID: + tte_write("-L-"); + break; + case EMERALD_ID: + tte_write("-E-"); + break; + } + tte_write(std::to_string(curr_rom.version).c_str()); + + tte_write("\nF: "); + tte_write(std::to_string(e4_flag).c_str()); + tte_write(std::to_string(mg_flag).c_str()); + tte_write(std::to_string(all_collected_flag).c_str()); + tte_write("-"); + tte_write((n2hexstr(pkmn_flags)).c_str()); + tte_write("\nS: "); + tte_write(std::to_string(tutorial).c_str()); + tte_write("-"); + tte_write((n2hexstr(def_lang)).c_str()); + while (true) + { + if (key_hit(KEY_B)) + { + hide_text_box(); + set_textbox_small(); + return 0; + } + global_next_frame(); + } + } global_next_frame(); } -} +}; int main(void) { diff --git a/source/payload_builder.cpp b/source/payload_builder.cpp index e056fe6..5780d25 100644 --- a/source/payload_builder.cpp +++ b/source/payload_builder.cpp @@ -1000,6 +1000,8 @@ byte *generate_payload(GB_ROM curr_rom, bool debug) // ld [hl], a payload_storage[offset++] = 0x77; + // call TakePartyItem + // call _RemovePokemon if (DONT_REMOVE_PKMN) { @@ -1007,6 +1009,7 @@ byte *generate_payload(GB_ROM curr_rom, bool debug) } else { + //write_call(curr_rom.generation, payload_storage, offset, 0x046C60); write_call(curr_rom.generation, payload_storage, offset, curr_rom._RemovePokemon); } @@ -1092,7 +1095,7 @@ int test_main() // Rename to "main" to send the payload to test_payload.txt { freopen("test_payload.txt", "w", stdout); std::cout << std::endl; - byte *payload = generate_payload(ENG_YELLOW, true); + byte *payload = generate_payload(ENG_CRYSTAL, true); for (int i = 0; i < PAYLOAD_SIZE; i++) { std::cout << "0x" << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << (unsigned int)payload[i] << ", "; diff --git a/source/pokemon_party.cpp b/source/pokemon_party.cpp index b562f37..07fa715 100644 --- a/source/pokemon_party.cpp +++ b/source/pokemon_party.cpp @@ -22,1131 +22,71 @@ byte gen1_debug_box_data[0x462] = { 0x14, // Pokemon 1-20 // 0x02, 0x70, 0x70, 0x70, 0x71, 0x71, 0x70, 0x71, 0x7B, 0x71, 0x71, 0x7C, 0x71, 0x71, 0x71, 0x71, 0x24, 0x24, 0xA5, 0x15, 0xFF, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x15, - 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0xFF, // Pokemon list - 0x02, - 0x00, - 0x11, - 100, - 0x00, - 0x07, - 0x03, - 0xFF, - 0x28, - 0x51, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x40, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xE6, - 0xDE, - 0x23, - 0x28, - 0x00, - 0x00, - 0x70, - 0x00, - 0x12, - 0x04, - 0x00, - 0x07, - 0x03, - 0xFF, - 0x28, - 0x51, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x40, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x5D, - 0xD8, - 0x23, - 0x28, - 0x00, - 0x00, - 0x70, - 0x00, - 0x12, - 0x04, - 0x00, - 0x07, - 0x03, - 0xFF, - 0x28, - 0x51, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x40, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x34, - 0x13, - 0x23, - 0x28, - 0x00, - 0x00, - 0x70, - 0x00, - 0x0F, - 0x03, - 0x00, - 0x07, - 0x03, - 0xFF, - 0x28, - 0x51, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x1B, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xDA, - 0x81, - 0x23, - 0x28, - 0x00, - 0x00, - 0x71, - 0x00, - 0x14, - 0x05, - 0x00, - 0x07, - 0x03, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x7D, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xD6, - 0x80, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x71, - 0x00, - 0x15, - 0x05, - 0x00, - 0x07, - 0x03, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x7D, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xF7, - 0x95, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x70, - 0x00, - 0x13, - 0x05, - 0x00, - 0x07, - 0x03, - 0xFF, - 0x28, - 0x51, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x7D, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xC9, - 0xCC, - 0x23, - 0x28, - 0x00, - 0x00, - 0x71, - 0x00, - 0x11, - 0x04, - 0x00, - 0x07, - 0x03, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x40, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xCE, - 0x7A, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x7B, - 0x00, - 0x10, - 0x03, - 0x00, - 0x07, - 0x07, - 0xFF, - 0x21, - 0x51, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x1B, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x5C, - 0x84, - 0x23, - 0x28, - 0x00, - 0x00, - 0x71, - 0x00, - 0x15, - 0x06, - 0x00, - 0x07, - 0x03, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0xD8, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xAC, - 0x64, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x71, - 0x00, - 0x13, - 0x05, - 0x00, - 0x07, - 0x03, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x7D, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xC4, - 0x1D, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x7C, - 0x00, - 0x12, - 0x04, - 0x00, - 0x07, - 0x07, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x40, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xE0, - 0x31, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x71, - 0x00, - 0x12, - 0x04, - 0x00, - 0x07, - 0x03, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x40, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xF6, - 0x40, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x71, - 0x00, - 0x16, - 0x06, - 0x00, - 0x07, - 0x03, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0xD8, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x97, - 0xAA, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x71, - 0x00, - 0x12, - 0x04, - 0x00, - 0x07, - 0x03, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x40, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x72, - 0xE9, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x71, - 0x00, - 0x14, - 0x05, - 0x00, - 0x07, - 0x03, - 0x78, - 0x6A, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x7D, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0xFB, - 0xEC, - 0x1E, - 0x00, - 0x00, - 0x00, - 0x24, - 0x00, - 0x12, - 0x04, - 0x00, - 0x00, - 0x02, - 0xFF, - 0x10, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x60, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x35, - 0xC2, - 0x23, - 0x00, - 0x00, - 0x00, - 0x24, - 0x00, - 0x11, - 0x04, - 0x00, - 0x00, - 0x02, - 0xFF, - 0x10, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x60, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x4D, - 0x2A, - 0x23, - 0x00, - 0x00, - 0x00, - 0xA5, - 0x00, - 0x0E, - 0x03, - 0x00, - 0x00, - 0x00, - 0xFF, - 0x21, - 0x27, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x1B, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x2C, - 0xBE, - 0x23, - 0x1E, - 0x00, - 0x00, - 0x15, - 0x00, - 0x0F, - 0x03, - 0x00, - 0x00, - 0x02, - 0xFF, - 0x10, - 0x00, - 0x00, - 0x00, - 0x6F, - 0xC6, - 0x00, - 0x00, - 0x39, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x67, - 0xE6, - 0x23, - 0x00, - 0x00, - 0x00, + 0x02, 0x00, 0x11, 100, 0x00, 0x07, 0x03, 0xFF, 0x28, 0x51, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6, 0xDE, 0x23, 0x28, 0x00, 0x00, + 0x70, 0x00, 0x12, 0x04, 0x00, 0x07, 0x03, 0xFF, 0x28, 0x51, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xD8, 0x23, 0x28, 0x00, 0x00, + 0x70, 0x00, 0x12, 0x04, 0x00, 0x07, 0x03, 0xFF, 0x28, 0x51, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x13, 0x23, 0x28, 0x00, 0x00, + 0x70, 0x00, 0x0F, 0x03, 0x00, 0x07, 0x03, 0xFF, 0x28, 0x51, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDA, 0x81, 0x23, 0x28, 0x00, 0x00, + 0x71, 0x00, 0x14, 0x05, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0x80, 0x1E, 0x00, 0x00, 0x00, + 0x71, 0x00, 0x15, 0x05, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF7, 0x95, 0x1E, 0x00, 0x00, 0x00, + 0x70, 0x00, 0x13, 0x05, 0x00, 0x07, 0x03, 0xFF, 0x28, 0x51, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC9, 0xCC, 0x23, 0x28, 0x00, 0x00, + 0x71, 0x00, 0x11, 0x04, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x7A, 0x1E, 0x00, 0x00, 0x00, + 0x7B, 0x00, 0x10, 0x03, 0x00, 0x07, 0x07, 0xFF, 0x21, 0x51, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x84, 0x23, 0x28, 0x00, 0x00, + 0x71, 0x00, 0x15, 0x06, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAC, 0x64, 0x1E, 0x00, 0x00, 0x00, + 0x71, 0x00, 0x13, 0x05, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0x1D, 0x1E, 0x00, 0x00, 0x00, + 0x7C, 0x00, 0x12, 0x04, 0x00, 0x07, 0x07, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x31, 0x1E, 0x00, 0x00, 0x00, + 0x71, 0x00, 0x12, 0x04, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6, 0x40, 0x1E, 0x00, 0x00, 0x00, + 0x71, 0x00, 0x16, 0x06, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0xAA, 0x1E, 0x00, 0x00, 0x00, + 0x71, 0x00, 0x12, 0x04, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xE9, 0x1E, 0x00, 0x00, 0x00, + 0x71, 0x00, 0x14, 0x05, 0x00, 0x07, 0x03, 0x78, 0x6A, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFB, 0xEC, 0x1E, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x12, 0x04, 0x00, 0x00, 0x02, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0xC2, 0x23, 0x00, 0x00, 0x00, + 0x24, 0x00, 0x11, 0x04, 0x00, 0x00, 0x02, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x2A, 0x23, 0x00, 0x00, 0x00, + 0xA5, 0x00, 0x0E, 0x03, 0x00, 0x00, 0x00, 0xFF, 0x21, 0x27, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xBE, 0x23, 0x1E, 0x00, 0x00, + 0x15, 0x00, 0x0F, 0x03, 0x00, 0x00, 0x02, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x6F, 0xC6, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0xE6, 0x23, 0x00, 0x00, 0x00, // Trainer names - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x80, - 0x50, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Nicknames - 0x96, - 0x84, - 0x84, - 0x83, - 0x8B, - 0x84, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x96, - 0x84, - 0x84, - 0x83, - 0x8B, - 0x84, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x96, - 0x84, - 0x84, - 0x83, - 0x8B, - 0x84, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x96, - 0x84, - 0x84, - 0x83, - 0x8B, - 0x84, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8A, - 0x80, - 0x8A, - 0x94, - 0x8D, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8A, - 0x80, - 0x8A, - 0x94, - 0x8D, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x96, - 0x84, - 0x84, - 0x83, - 0x8B, - 0x84, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8A, - 0x80, - 0x8A, - 0x94, - 0x8D, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x82, - 0x80, - 0x93, - 0x84, - 0x91, - 0x8F, - 0x88, - 0x84, - 0x50, - 0x50, - 0x50, - 0x8A, - 0x80, - 0x8A, - 0x94, - 0x8D, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8A, - 0x80, - 0x8A, - 0x94, - 0x8D, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8C, - 0x84, - 0x93, - 0x80, - 0x8F, - 0x8E, - 0x83, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8A, - 0x80, - 0x8A, - 0x94, - 0x8D, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8A, - 0x80, - 0x8A, - 0x94, - 0x8D, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8A, - 0x80, - 0x8A, - 0x94, - 0x8D, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8A, - 0x80, - 0x8A, - 0x94, - 0x8D, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8F, - 0x88, - 0x83, - 0x86, - 0x84, - 0x98, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8F, - 0x88, - 0x83, - 0x86, - 0x84, - 0x98, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, - 0x91, - 0x80, - 0x93, - 0x93, - 0x80, - 0x93, - 0x80, - 0x50, - 0x50, - 0x50, - 0x50, - 0x8F, - 0x88, - 0x83, - 0x86, - 0x84, - 0x98, - 0x50, - 0x50, - 0x50, - 0x50, - 0x50, -}; + 0x96, 0x84, 0x84, 0x83, 0x8B, 0x84, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x96, 0x84, 0x84, 0x83, 0x8B, 0x84, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x96, 0x84, 0x84, 0x83, 0x8B, 0x84, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x96, 0x84, 0x84, 0x83, 0x8B, 0x84, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8A, 0x80, 0x8A, 0x94, 0x8D, 0x80, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8A, 0x80, 0x8A, 0x94, 0x8D, 0x80, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x96, 0x84, 0x84, 0x83, 0x8B, 0x84, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8A, 0x80, 0x8A, 0x94, 0x8D, 0x80, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x82, 0x80, 0x93, 0x84, 0x91, 0x8F, 0x88, 0x84, 0x50, 0x50, 0x50, + 0x8A, 0x80, 0x8A, 0x94, 0x8D, 0x80, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8A, 0x80, 0x8A, 0x94, 0x8D, 0x80, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8C, 0x84, 0x93, 0x80, 0x8F, 0x8E, 0x83, 0x50, 0x50, 0x50, 0x50, + 0x8A, 0x80, 0x8A, 0x94, 0x8D, 0x80, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8A, 0x80, 0x8A, 0x94, 0x8D, 0x80, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8A, 0x80, 0x8A, 0x94, 0x8D, 0x80, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8A, 0x80, 0x8A, 0x94, 0x8D, 0x80, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8F, 0x88, 0x83, 0x86, 0x84, 0x98, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x8F, 0x88, 0x83, 0x86, 0x84, 0x98, 0x50, 0x50, 0x50, 0x50, 0x50, + 0x91, 0x80, 0x93, 0x93, 0x80, 0x93, 0x80, 0x50, 0x50, 0x50, 0x50, + 0x8F, 0x88, 0x83, 0x86, 0x84, 0x98, 0x50, 0x50, 0x50, 0x50, 0x50}; + byte gen2_debug_box_data[0x44E] = { // Num of Pokemon 0x14, @@ -1354,7 +294,7 @@ bool Pokemon_Party::fill_simple_pkmn_array() int Pokemon_Party::get_num_pkmn() { - return box_data_array[0]; + return 30;//box_data_array[0]; } bool Pokemon_Party::get_contains_invalid()