diff --git a/PCCS b/PCCS index ca9ab8c..9002c56 160000 --- a/PCCS +++ b/PCCS @@ -1 +1 @@ -Subproject commit ca9ab8c6ab569cd962074487e5702b989430003b +Subproject commit 9002c562363b6525a156074e535a5c623522bd33 diff --git a/include/script_array.h b/include/script_array.h index f43f4db..728127e 100644 --- a/include/script_array.h +++ b/include/script_array.h @@ -5,6 +5,8 @@ #include "rom_data.h" #include "translated_text.h" +extern bool newPkmn; // This is stupid and dumb and stupid but we're storing it like this until this whole mess gets rewritten. + // Commands #define T_SCRIPT_START DIA_END + 0 #define E_SCRIPT_START DIA_END + 1 diff --git a/source/main.cpp b/source/main.cpp index 964ad7d..a0c8870 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -435,7 +435,7 @@ int main(void) set_background_pal(curr_GBA_rom.gamecode, false, true); - if (!g_debug_options.ignore_mg_e4_flags && (!get_tutorial_flag() || g_debug_options.force_tutorial)) + if (!get_tutorial_flag() || g_debug_options.force_tutorial) { obj_hide_multi(ptgb_logo_l, 2); text_loop(BTN_TRANSFER); diff --git a/source/mystery_gift_builder.cpp b/source/mystery_gift_builder.cpp index 5953bb4..ad326ea 100644 --- a/source/mystery_gift_builder.cpp +++ b/source/mystery_gift_builder.cpp @@ -6,6 +6,7 @@ #include "translated_text.h" #include "FileContainerReader.h" #include "text_tables.h" +#include "script_array.h" #define MG_SCRIPT false #define S30_SCRIPT true @@ -339,6 +340,7 @@ void mystery_gift_script::build_script(PokeBox *box) // it won't get called automatically because it's part of the union (and neither will the destructor) new (&decompressed_store.tables.data) PokemonTables(); + newPkmn = false; // TODO make it so that the table is added here(?) box->setTable(&decompressed_store.tables.data); box->convertAll(); diff --git a/source/ptgb_save_data_manager.cpp b/source/ptgb_save_data_manager.cpp index 92bc76c..8d73dbf 100644 --- a/source/ptgb_save_data_manager.cpp +++ b/source/ptgb_save_data_manager.cpp @@ -5,6 +5,7 @@ #include "button_menu.h" #include "pokemon_data.h" #include "libraries/Pokemon-Gen3-to-Gen-X/include/save.h" +#include "script_array.h" byte save_data_array[SAVE_DATA_SIZE]; @@ -31,6 +32,10 @@ bool is_caught(int dex_num) void set_caught(int dex_num) { + if (!is_caught(dex_num)) + { + newPkmn |= true; + } save_data_array[CAUGHT_DATA + (dex_num / 8)] = save_data_array[CAUGHT_DATA + (dex_num / 8)] | (1 << (dex_num % 8)); } diff --git a/source/script_array.cpp b/source/script_array.cpp index 39e1258..9f06fd9 100644 --- a/source/script_array.cpp +++ b/source/script_array.cpp @@ -17,6 +17,7 @@ #include int last_error; +bool newPkmn = false; PokemonTables pokeTable; PokeBox box(&pokeTable); @@ -573,7 +574,8 @@ bool run_conditional(int index) return get_tutorial_flag() && !g_debug_options.force_tutorial; case COND_NEW_POKEMON: - return box.getHasNewPkmn(); + //return box.getHasNewPkmn(); + return newPkmn; case COND_IS_HOENN_RS: return curr_GBA_rom.is_ruby_sapphire();