diff --git a/Poke_Transporter_GB_mb-1.png b/Poke_Transporter_GB_mb-1.png new file mode 100644 index 0000000..f61e916 Binary files /dev/null and b/Poke_Transporter_GB_mb-1.png differ diff --git a/graphics/boxBG.png b/graphics/boxBG.png index 732f999..dfceccd 100644 Binary files a/graphics/boxBG.png and b/graphics/boxBG.png differ diff --git a/graphics/unused graphics/boxBG.png b/graphics/unused graphics/boxBG.png new file mode 100644 index 0000000..732f999 Binary files /dev/null and b/graphics/unused graphics/boxBG.png differ diff --git a/graphics/unused graphics/latin_short.png b/graphics/unused graphics/latin_short.png index 332a2cc..2025943 100644 Binary files a/graphics/unused graphics/latin_short.png and b/graphics/unused graphics/latin_short.png differ diff --git a/include/box_menu.h b/include/box_menu.h index 9c51767..08ff89c 100644 --- a/include/box_menu.h +++ b/include/box_menu.h @@ -13,7 +13,7 @@ #define CONFIRM_BUTTON 2 // Box is 144 x 104, top left is 88 32, sprite is 16x16, sprites are not centered -#define BOXMENU_TOP 32 +#define BOXMENU_TOP (32 - 12) #define BOXMENU_LEFT 88 #define BOXMENU_VSPACE -4 #define BOXMENU_HSPACE -10 diff --git a/include/debug_mode.h b/include/debug_mode.h index 0b6e1d5..f5137b0 100644 --- a/include/debug_mode.h +++ b/include/debug_mode.h @@ -8,13 +8,13 @@ #define PRINT_LINK_DATA (false && DEBUG_MODE) // This is currently broken... not sure why #define INSTANT_TEXT_SPEED (false && DEBUG_MODE) -#define IGNORE_GAME_PAK (true && DEBUG_MODE) +#define IGNORE_GAME_PAK (false && DEBUG_MODE) #define IGNORE_GAME_PAK_SPRITES (false && DEBUG_MODE) -#define IGNORE_LINK_CABLE (false && DEBUG_MODE) +#define IGNORE_LINK_CABLE (true && DEBUG_MODE) #define IGNORE_MG_E4_FLAGS (true && DEBUG_MODE) #define IGNORE_UNRECEIVED_PKMN (true && DEBUG_MODE) #define FORCE_TUTORIAL (false && DEBUG_MODE) -#define DONT_REMOVE_PKMN (false && DEBUG_MODE) +#define DONT_REMOVE_PKMN (true && DEBUG_MODE) #define DONT_HIDE_INVALID_PKMN (false && DEBUG_MODE) #define IGNORE_DEX_COMPLETION (false && DEBUG_MODE) #define FORCE_ALL_CAUGHT (false && DEBUG_MODE) diff --git a/source/box_menu.cpp b/source/box_menu.cpp index 4a91fd9..cc760e9 100644 --- a/source/box_menu.cpp +++ b/source/box_menu.cpp @@ -25,8 +25,8 @@ int Box_Menu::box_main(Pokemon_Party party_data) load_temp_box_sprites(&party_data); Button cancel_button(button_cancel_left, button_cancel_right, 64); Button confirm_button(button_confirm_left, button_confirm_right, 64); - cancel_button.set_location(88, 144); - confirm_button.set_location(160, 144); + cancel_button.set_location(88, 124); + confirm_button.set_location(160, 124); cancel_button.show(); confirm_button.show(); curr_button = 0; @@ -139,7 +139,7 @@ int Box_Menu::box_main(Pokemon_Party party_data) if (curr_pkmn.is_shiny) { tte_set_pos(64, 16); - val[0] = 0xF7; + val[0] = 0xF9; val[1] = 0xFF; ptgb_write(val, true); } diff --git a/source/gameboy_colour.cpp b/source/gameboy_colour.cpp index a29270b..3ae8229 100644 --- a/source/gameboy_colour.cpp +++ b/source/gameboy_colour.cpp @@ -91,24 +91,23 @@ byte data_packet[PACKET_SIZE]; static_assert(sizeof(struct GB_ROM) == 132); static_assert(sizeof(struct ROM_DATA) == 160); -void print(const char* format, ...) +void print(const char *format, ...) { va_list args; va_start(args, format); // 10 elements of 64 bytes, zero-initialized. char spi_text_out_array[10][SPI_TEXT_OUT_ARRAY_ELEMENT_SIZE] = { - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0} - }; + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}, + {0}}; for (int i = 10; i > 0; i--) { @@ -161,13 +160,13 @@ void setup(const u16 *debug_charset) create_textbox(5, 1, 128, 60, true); - { - u8 general_text_table_buffer[2048]; - text_data_table general_text(general_text_table_buffer); + { + u8 general_text_table_buffer[2048]; + text_data_table general_text(general_text_table_buffer); - general_text.decompress(get_compressed_general_table()); - ptgb_write(general_text.get_text_entry(GENERAL_connecting), true); - } + general_text.decompress(get_compressed_general_table()); + ptgb_write(general_text.get_text_entry(GENERAL_connecting), true); + } } byte handleIncomingByte(byte in, byte *box_data_storage, byte *curr_payload, GB_ROM *curr_gb_rom, Simplified_Pokemon *curr_simple_array, const u16 *debug_charset, bool cancel_connection) @@ -220,7 +219,14 @@ byte handleIncomingByte(byte in, byte *box_data_storage, byte *curr_payload, GB_ { tte_erase_rect(0, 0, H_MAX, V_MAX); tte_set_pos(40, 24); - ptgb_write_debug(debug_charset, curr_gb_rom->version != YELLOW_ID ? "\n\n\nLink was successful!\n\n Waiting for trade" : "\n\n\nLink was successful!\n\n Waiting for battle", true); + { + u8 general_text_table_buffer[2048]; + text_data_table general_text(general_text_table_buffer); + + general_text.decompress(get_compressed_general_table()); + ptgb_write(general_text.get_text_entry(curr_gb_rom->version != YELLOW_ID ? GENERAL_link_success_yellow : GENERAL_link_success), true); + } + link_animation_state(STATE_NO_ANIM); state = pretrade; data_counter = 0; @@ -265,7 +271,14 @@ byte handleIncomingByte(byte in, byte *box_data_storage, byte *curr_payload, GB_ { tte_erase_rect(0, 0, H_MAX, V_MAX); tte_set_pos(40, 24); - ptgb_write_debug(debug_charset, "\n\n\nTransferring data...\n please wait!", true); + { + u8 general_text_table_buffer[2048]; + text_data_table general_text(general_text_table_buffer); + + general_text.decompress(get_compressed_general_table()); + ptgb_write(general_text.get_text_entry(GENERAL_transferring), true); + } + link_animation_state(STATE_TRANSFER); mosi_delay = 1; state = party_preamble; diff --git a/source/latin_short.s b/source/latin_short.s index 5d8c6e3..0fa33bf 100644 --- a/source/latin_short.s +++ b/source/latin_short.s @@ -155,7 +155,7 @@ latin_shortGlyphs: .word 0x0E000011,0x11111111,0x0000000E,0x00000000,0x11000011,0x11111111,0x0000000E,0x00000000 .word 0x00001100,0x1911111E,0x00000016,0x00000000,0x00001100,0x1111110E,0x0000000E,0x00000000 .word 0x00001100,0x09090909,0x00000016,0x00000000,0x3F3F3E3C,0x0603392F,0x0000003C,0x00000000 - .word 0x07070301,0x03060407,0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 + .word 0x07070301,0x03060407,0x00000001,0x00000000,0x10020702,0x0E041038,0x00000004,0x00000000 .word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 .word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 .word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 diff --git a/source/sprite_data.cpp b/source/sprite_data.cpp index c3e82e9..49ac7ca 100644 --- a/source/sprite_data.cpp +++ b/source/sprite_data.cpp @@ -513,7 +513,7 @@ void load_temp_box_sprites(Pokemon_Party *party_data) load_sprite_compressed(button_confirm_right, button_edgeTiles, curr_tile_id, BTN_PAL, ATTR0_TALL, ATTR1_SIZE_8x32, 1); } -void load_type_sprites(const u8* pkmn_type_table, int pkmn_index, int dex_offset, bool is_caught) +void load_type_sprites(const u8 *pkmn_type_table, int pkmn_index, int dex_offset, bool is_caught) { if (is_caught) { @@ -907,13 +907,16 @@ void update_menu_sprite(Pokemon_Party *party_data, int index, int frame) int dex_num = curr_pkmn.dex_number; if (dex_num == 201) { - dex_num = POKEMON_ARRAY_SIZE + curr_pkmn.unown_letter; + if (curr_pkmn.unown_letter != 0) + { + dex_num = 0x19C + curr_pkmn.unown_letter; + } } else if (curr_pkmn.is_missingno) { dex_num = 0; } - + u32 sprite_location = (*(u32 *)(curr_rom.loc_gMonIconTable + (dex_num * 4))) + (frame == 0 ? 0 : 512); tonccpy(&tile_mem[SPRITE_CHAR_BLOCK][curr_tile_id], (const unsigned int *)sprite_location, 512); } \ No newline at end of file diff --git a/text_helper/main.py b/text_helper/main.py index 71cd619..9f86b9d 100755 --- a/text_helper/main.py +++ b/text_helper/main.py @@ -46,10 +46,11 @@ if os.path.exists(old_file_path): if new_file.equals(old_file): if os.path.exists(json_file_path): print("Downloaded file is identical. Skipping parse\n") - os.rename(new_file_path, old_file_path) + os.remove(new_file_path) exit() print("json file missing - forcing rebuild.") - os.remove(new_file_path) + os.remove(old_file_path) + os.rename(new_file_path, old_file_path) else: print("xlsx file missing - forcing rebuild.") os.rename(new_file_path, old_file_path) diff --git a/tools/data-generator/src/common.cpp b/tools/data-generator/src/common.cpp index 8d796f8..72ada3e 100644 --- a/tools/data-generator/src/common.cpp +++ b/tools/data-generator/src/common.cpp @@ -4,6 +4,8 @@ #include #include +// Data pulled from https://docs.google.com/spreadsheets/d/14LLs5lLqWasFcssBmJdGXjjYxARAJBa_QUOUhXZt4v8/edit + void writeTable(const char *input_path, const char *output_path, const char *filename, const char *buffer, size_t buffer_size) { char full_output_path[4096];