mirror of
https://github.com/GearsProgress/Poke_Transporter_GB.git
synced 2026-10-23 16:03:34 -05:00
Formatting (again)
This commit is contained in:
@@ -110,7 +110,8 @@ Box_Menu box_viewer;
|
||||
// values So if adding a new dia, command or condition, make sure to add it in
|
||||
// the right position/index. defining it this way does not generate an expensive
|
||||
// function. It's all stored as read-only data in EWRAM.
|
||||
const script_obj_params transfer_script_params[SCRIPT_SIZE] = {// PTGB_DIA_OPEN
|
||||
const script_obj_params transfer_script_params[SCRIPT_SIZE] = {
|
||||
// PTGB_DIA_OPEN
|
||||
{.text_entry_index = PTGB_DIA_OPEN, .next_if_true = CMD_SET_TUTOR_TRUE},
|
||||
// PTGB_DIA_E4
|
||||
{.text_entry_index = PTGB_DIA_E4, .next_if_true = CMD_END_SCRIPT},
|
||||
@@ -129,92 +130,67 @@ const script_obj_params transfer_script_params[SCRIPT_SIZE] = {// PTGB_DIA_OPEN
|
||||
// PTGB_DIA_NO_NEW_DEX
|
||||
{.text_entry_index = PTGB_DIA_NO_NEW_DEX, .next_if_true = COND_IS_HOENN_RS},
|
||||
// PTGB_DIA_SEND_FRIEND_KANTO
|
||||
{.text_entry_index = PTGB_DIA_SEND_FRIEND_KANTO,
|
||||
.next_if_true = PTGB_DIA_THANK},
|
||||
{.text_entry_index = PTGB_DIA_SEND_FRIEND_KANTO, .next_if_true = PTGB_DIA_THANK},
|
||||
// PTGB_DIA_SEND_FRIEND_HOENN_RS
|
||||
{.text_entry_index = PTGB_DIA_SEND_FRIEND_HOENN_RS,
|
||||
.next_if_true = PTGB_DIA_THANK},
|
||||
{.text_entry_index = PTGB_DIA_SEND_FRIEND_HOENN_RS, .next_if_true = PTGB_DIA_THANK},
|
||||
// PTGB_DIA_SEND_FRIEND_HOENN_E
|
||||
{.text_entry_index = PTGB_DIA_SEND_FRIEND_HOENN_E,
|
||||
.next_if_true = PTGB_DIA_THANK},
|
||||
{.text_entry_index = PTGB_DIA_SEND_FRIEND_HOENN_E, .next_if_true = PTGB_DIA_THANK},
|
||||
// PTGB_DIA_THANK
|
||||
{.text_entry_index = PTGB_DIA_THANK, .next_if_true = CMD_END_SCRIPT},
|
||||
// PTGB_DIA_GET_MON (unused)
|
||||
{.text_entry_index = PTGB_DIA_GET_MON, .next_if_true = CMD_END_SCRIPT},
|
||||
// PTGB_DIA_MG_OTHER_EVENT
|
||||
{.text_entry_index = PTGB_DIA_MG_OTHER_EVENT,
|
||||
.next_if_true = PTGB_DIA_LETS_START},
|
||||
{.text_entry_index = PTGB_DIA_MG_OTHER_EVENT, .next_if_true = PTGB_DIA_LETS_START},
|
||||
// PTGB_DIA_PKMN_TO_COLLECT
|
||||
{.text_entry_index = PTGB_DIA_PKMN_TO_COLLECT,
|
||||
.next_if_true = CMD_END_SCRIPT},
|
||||
{.text_entry_index = PTGB_DIA_PKMN_TO_COLLECT, .next_if_true = CMD_END_SCRIPT},
|
||||
// PTGB_DIA_NO_VALID_PKMN
|
||||
{.text_entry_index = PTGB_DIA_NO_VALID_PKMN,
|
||||
.next_if_true = CMD_CANCEL_LINK},
|
||||
{.text_entry_index = PTGB_DIA_NO_VALID_PKMN, .next_if_true = CMD_CANCEL_LINK},
|
||||
// PTGB_DIA_ASK_QUEST
|
||||
{.text_entry_index = PTGB_DIA_ASK_QUEST,
|
||||
.next_if_true = CMD_SLIDE_PROF_LEFT},
|
||||
{.text_entry_index = PTGB_DIA_ASK_QUEST, .next_if_true = CMD_SLIDE_PROF_LEFT},
|
||||
// PTGB_DIA_WHAT_GAME_TRANS
|
||||
{.text_entry_index = PTGB_DIA_WHAT_GAME_TRANS,
|
||||
.next_if_true = CMD_GAME_MENU},
|
||||
{.text_entry_index = PTGB_DIA_WHAT_GAME_TRANS, .next_if_true = CMD_GAME_MENU},
|
||||
// PTGB_DIA_WHAT_LANG_TRANS
|
||||
{.text_entry_index = PTGB_DIA_WHAT_LANG_TRANS,
|
||||
.next_if_true = CMD_LANG_MENU},
|
||||
{.text_entry_index = PTGB_DIA_WHAT_LANG_TRANS, .next_if_true = CMD_LANG_MENU},
|
||||
// PTGB_DIA_NO_GB_ROM
|
||||
{.text_entry_index = PTGB_DIA_NO_GB_ROM,
|
||||
.next_if_true = PTGB_DIA_WHAT_LANG_TRANS},
|
||||
{.text_entry_index = PTGB_DIA_NO_GB_ROM, .next_if_true = PTGB_DIA_WHAT_LANG_TRANS},
|
||||
// PTGB_DIA_IN_BOX
|
||||
{.text_entry_index = PTGB_DIA_IN_BOX, .next_if_true = CMD_BOX_MENU},
|
||||
// PTGB_DIA_MYTHIC_CONVERT
|
||||
{.text_entry_index = PTGB_DIA_MYTHIC_CONVERT,
|
||||
.next_if_true = CMD_MYTHIC_MENU},
|
||||
{.text_entry_index = PTGB_DIA_MYTHIC_CONVERT, .next_if_true = CMD_MYTHIC_MENU},
|
||||
// PTGB_DIA_CANCEL
|
||||
{.text_entry_index = PTGB_DIA_CANCEL, .next_if_true = CMD_CANCEL_LINK},
|
||||
// PTGB_DIA_SOME_INVALID_PKMN
|
||||
{.text_entry_index = PTGB_DIA_SOME_INVALID_PKMN,
|
||||
.next_if_true = COND_CHECK_MYTHIC},
|
||||
{.text_entry_index = PTGB_DIA_SOME_INVALID_PKMN, .next_if_true = COND_CHECK_MYTHIC},
|
||||
// PTGB_DIA_MENU_BACK
|
||||
{.text_entry_index = PTGB_DIA_MENU_BACK, .next_if_true = CMD_END_SCRIPT},
|
||||
// PTGB_DIA_IS_MISSINGNO
|
||||
{.text_entry_index = PTGB_DIA_IS_MISSINGNO,
|
||||
.next_if_true = PTGB_DIA_IN_BOX},
|
||||
{.text_entry_index = PTGB_DIA_IS_MISSINGNO, .next_if_true = PTGB_DIA_IN_BOX},
|
||||
// PTGB_DIA_ERROR_COLOSSEUM
|
||||
{.text_entry_index = PTGB_DIA_ERROR_COLOSSEUM,
|
||||
.next_if_true = PTGB_DIA_START},
|
||||
{.text_entry_index = PTGB_DIA_ERROR_COLOSSEUM, .next_if_true = PTGB_DIA_START},
|
||||
// PTGB_DIA_ERROR_COM_ENDED
|
||||
{.text_entry_index = PTGB_DIA_ERROR_COM_ENDED,
|
||||
.next_if_true = PTGB_DIA_START},
|
||||
{.text_entry_index = PTGB_DIA_ERROR_COM_ENDED, .next_if_true = PTGB_DIA_START},
|
||||
// PTGB_DIA_ERROR_DISCONNECT
|
||||
{.text_entry_index = PTGB_DIA_ERROR_DISCONNECT,
|
||||
.next_if_true = PTGB_DIA_START},
|
||||
{.text_entry_index = PTGB_DIA_ERROR_DISCONNECT, .next_if_true = PTGB_DIA_START},
|
||||
// PTGB_DIA_ERROR_TIME_ONE
|
||||
{.text_entry_index = PTGB_DIA_ERROR_TIME_ONE,
|
||||
.next_if_true = PTGB_DIA_START},
|
||||
{.text_entry_index = PTGB_DIA_ERROR_TIME_ONE, .next_if_true = PTGB_DIA_START},
|
||||
// PTGB_DIA_ERROR_TIME_TWO
|
||||
{.text_entry_index = PTGB_DIA_ERROR_TIME_TWO,
|
||||
.next_if_true = PTGB_DIA_START},
|
||||
{.text_entry_index = PTGB_DIA_ERROR_TIME_TWO, .next_if_true = PTGB_DIA_START},
|
||||
// PTGB_DIA_WHAT_LANG_EVENT
|
||||
{.text_entry_index = PTGB_DIA_WHAT_LANG_EVENT,
|
||||
.next_if_true = CMD_LANG_MENU},
|
||||
{.text_entry_index = PTGB_DIA_WHAT_LANG_EVENT, .next_if_true = CMD_LANG_MENU},
|
||||
// PTGB_DIA_WHAT_GAME_EVENT
|
||||
{.text_entry_index = PTGB_DIA_WHAT_GAME_EVENT,
|
||||
.next_if_true = CMD_GAME_MENU},
|
||||
{.text_entry_index = PTGB_DIA_WHAT_GAME_EVENT, .next_if_true = CMD_GAME_MENU},
|
||||
// PTGB_DIA_K_DEX_NOT_FULL
|
||||
{.text_entry_index = PTGB_DIA_K_DEX_NOT_FULL,
|
||||
.next_if_true = CMD_END_SCRIPT},
|
||||
{.text_entry_index = PTGB_DIA_K_DEX_NOT_FULL, .next_if_true = CMD_END_SCRIPT},
|
||||
// PTGB_DIA_J_DEX_NOT_FULL
|
||||
{.text_entry_index = PTGB_DIA_J_DEX_NOT_FULL,
|
||||
.next_if_true = CMD_END_SCRIPT},
|
||||
{.text_entry_index = PTGB_DIA_J_DEX_NOT_FULL, .next_if_true = CMD_END_SCRIPT},
|
||||
// T_SCRIPT_START
|
||||
{.conditional_index = CMD_SHOW_PROF,
|
||||
.next_if_true = COND_TUTORIAL_COMPLETE},
|
||||
{.conditional_index = CMD_SHOW_PROF, .next_if_true = COND_TUTORIAL_COMPLETE},
|
||||
// E_SCRIPT_START
|
||||
{.conditional_index = CMD_SHOW_PROF, .next_if_true = PTGB_DIA_LETS_START},
|
||||
// CMD_START_LINK
|
||||
{.conditional_index = CMD_START_LINK,
|
||||
.next_if_true = COND_ERROR_TIMEOUT_ONE},
|
||||
{.conditional_index = CMD_START_LINK, .next_if_true = COND_ERROR_TIMEOUT_ONE},
|
||||
// CMD_IMPORT_POKEMON
|
||||
{.conditional_index = CMD_IMPORT_POKEMON,
|
||||
.next_if_true = CMD_CONTINUE_LINK},
|
||||
{.conditional_index = CMD_IMPORT_POKEMON, .next_if_true = CMD_CONTINUE_LINK},
|
||||
// CMD_BACK_TO_MENU
|
||||
{.conditional_index = CMD_BACK_TO_MENU, .next_if_true = T_SCRIPT_START},
|
||||
// CMD_SHOW_PROF (unused in this manner (not used in a next_if_true).
|
||||
@@ -238,11 +214,9 @@ const script_obj_params transfer_script_params[SCRIPT_SIZE] = {// PTGB_DIA_OPEN
|
||||
.next_if_true = PTGB_DIA_WHAT_GAME_TRANS,
|
||||
.next_if_false = PTGB_DIA_CANCEL},
|
||||
// CMD_SLIDE_PROF_LEFT
|
||||
{.conditional_index = CMD_SLIDE_PROF_LEFT,
|
||||
.next_if_true = PTGB_DIA_WHAT_LANG_TRANS},
|
||||
{.conditional_index = CMD_SLIDE_PROF_LEFT, .next_if_true = PTGB_DIA_WHAT_LANG_TRANS},
|
||||
// CMD_SLIDE_PROF_RIGHT
|
||||
{.conditional_index = CMD_SLIDE_PROF_RIGHT,
|
||||
.next_if_true = PTGB_DIA_LETS_START},
|
||||
{.conditional_index = CMD_SLIDE_PROF_RIGHT, .next_if_true = PTGB_DIA_LETS_START},
|
||||
// CMD_CONTINUE_LINK
|
||||
{.conditional_index = CMD_CONTINUE_LINK, .next_if_true = CMD_END_MISSINGNO},
|
||||
// CMD_BOX_MENU
|
||||
@@ -250,8 +224,7 @@ const script_obj_params transfer_script_params[SCRIPT_SIZE] = {// PTGB_DIA_OPEN
|
||||
.next_if_true = CMD_IMPORT_POKEMON,
|
||||
.next_if_false = PTGB_DIA_CANCEL},
|
||||
// CMD_MYTHIC_MENU
|
||||
{.conditional_index = CMD_MYTHIC_MENU,
|
||||
.next_if_true = COND_CHECK_MISSINGNO},
|
||||
{.conditional_index = CMD_MYTHIC_MENU, .next_if_true = COND_CHECK_MISSINGNO},
|
||||
// CMD_IS_A_VALID_PKMN
|
||||
{.conditional_index = CMD_IS_A_VALID_PKMN,
|
||||
.next_if_true = COND_SOME_INVALID_PKMN,
|
||||
@@ -259,8 +232,7 @@ const script_obj_params transfer_script_params[SCRIPT_SIZE] = {// PTGB_DIA_OPEN
|
||||
// CMD_CANCEL_LINK
|
||||
{.conditional_index = CMD_CANCEL_LINK, .next_if_true = CMD_END_SCRIPT},
|
||||
// CMD_END_MISSINGNO
|
||||
{.conditional_index = CMD_END_MISSINGNO,
|
||||
.next_if_true = PTGB_DIA_TRANS_GOOD},
|
||||
{.conditional_index = CMD_END_MISSINGNO, .next_if_true = PTGB_DIA_TRANS_GOOD},
|
||||
// COND_ERROR_TIMEOUT_ONE
|
||||
{.conditional_index = COND_ERROR_TIMEOUT_ONE,
|
||||
.next_if_true = COND_ERROR_TIMEOUT_TWO,
|
||||
@@ -322,9 +294,7 @@ const script_obj_params transfer_script_params[SCRIPT_SIZE] = {// PTGB_DIA_OPEN
|
||||
.next_if_true = PTGB_DIA_MYTHIC_CONVERT,
|
||||
.next_if_false = COND_CHECK_MISSINGNO},
|
||||
// COND_CHECK_DEX
|
||||
{.conditional_index = COND_CHECK_DEX,
|
||||
.next_if_true = 0,
|
||||
.next_if_false = COND_CHECK_KANTO},
|
||||
{.conditional_index = COND_CHECK_DEX, .next_if_true = 0, .next_if_false = COND_CHECK_KANTO},
|
||||
// COND_CHECK_KANTO
|
||||
{.conditional_index = COND_CHECK_KANTO,
|
||||
.next_if_true = PTGB_DIA_K_DEX_NOT_FULL,
|
||||
@@ -396,13 +366,11 @@ const script_obj_params event_script_params[SCRIPT_SIZE] = {
|
||||
{}, // PTGB_DIA_PKMN_TO_COLLECT
|
||||
{}, // PTGB_DIA_NO_VALID_PKMN
|
||||
// PTGB_DIA_ASK_QUEST
|
||||
{.text_entry_index = PTGB_DIA_ASK_QUEST,
|
||||
.next_if_true = CMD_SLIDE_PROF_LEFT},
|
||||
{.text_entry_index = PTGB_DIA_ASK_QUEST, .next_if_true = CMD_SLIDE_PROF_LEFT},
|
||||
{}, // PTGB_DIA_WHAT_GAME_TRANS
|
||||
{}, // PTGB_DIA_WHAT_LANG_TRANS
|
||||
// PTGB_DIA_NO_GB_ROM
|
||||
{.text_entry_index = PTGB_DIA_NO_GB_ROM,
|
||||
.next_if_true = PTGB_DIA_WHAT_LANG_EVENT},
|
||||
{.text_entry_index = PTGB_DIA_NO_GB_ROM, .next_if_true = PTGB_DIA_WHAT_LANG_EVENT},
|
||||
{}, // PTGB_DIA_IN_BOX
|
||||
{}, // PTGB_DIA_MYTHIC_CONVERT
|
||||
{}, // PTGB_DIA_CANCEL
|
||||
@@ -415,26 +383,20 @@ const script_obj_params event_script_params[SCRIPT_SIZE] = {
|
||||
{}, // PTGB_DIA_ERROR_TIME_ONE
|
||||
{}, // PTGB_DIA_ERROR_TIME_TWO
|
||||
// PTGB_DIA_WHAT_LANG_EVENT
|
||||
{.text_entry_index = PTGB_DIA_WHAT_LANG_EVENT,
|
||||
.next_if_true = CMD_LANG_MENU},
|
||||
{.text_entry_index = PTGB_DIA_WHAT_LANG_EVENT, .next_if_true = CMD_LANG_MENU},
|
||||
// PTGB_DIA_WHAT_GAME_EVENT
|
||||
{.text_entry_index = PTGB_DIA_WHAT_GAME_EVENT,
|
||||
.next_if_true = CMD_GAME_MENU},
|
||||
{.text_entry_index = PTGB_DIA_WHAT_GAME_EVENT, .next_if_true = CMD_GAME_MENU},
|
||||
// PTGB_DIA_K_DEX_NOT_FULL
|
||||
{.text_entry_index = PTGB_DIA_K_DEX_NOT_FULL,
|
||||
.next_if_true = CMD_END_SCRIPT},
|
||||
{.text_entry_index = PTGB_DIA_K_DEX_NOT_FULL, .next_if_true = CMD_END_SCRIPT},
|
||||
// PTGB_DIA_J_DEX_NOT_FULL
|
||||
{.text_entry_index = PTGB_DIA_J_DEX_NOT_FULL,
|
||||
.next_if_true = CMD_END_SCRIPT},
|
||||
{.text_entry_index = PTGB_DIA_J_DEX_NOT_FULL, .next_if_true = CMD_END_SCRIPT},
|
||||
{}, // T_SCRIPT_START
|
||||
// E_SCRIPT_START
|
||||
{.conditional_index = CMD_SHOW_PROF, .next_if_true = PTGB_DIA_ASK_QUEST},
|
||||
{}, // CMD_START_LINK
|
||||
{.conditional_index = CMD_SHOW_PROF, .next_if_true = PTGB_DIA_ASK_QUEST}, {}, // CMD_START_LINK
|
||||
{}, // CMD_IMPORT_POKEMON
|
||||
// CMD_BACK_TO_MENU
|
||||
{.conditional_index = CMD_BACK_TO_MENU, .next_if_true = T_SCRIPT_START},
|
||||
{}, // CMD_SHOW_PROF
|
||||
{}, // CMD_HIDE_PROF
|
||||
{.conditional_index = CMD_BACK_TO_MENU, .next_if_true = T_SCRIPT_START}, {}, // CMD_SHOW_PROF
|
||||
{}, // CMD_HIDE_PROF
|
||||
{}, // CMD_SET_TUTOR_TRUE
|
||||
// CMD_END_SCRIPT
|
||||
{.conditional_index = CMD_END_SCRIPT, .next_if_true = CMD_BACK_TO_MENU},
|
||||
@@ -443,11 +405,9 @@ const script_obj_params event_script_params[SCRIPT_SIZE] = {
|
||||
.next_if_true = COND_GB_ROM_EXISTS,
|
||||
.next_if_false = PTGB_DIA_WHAT_LANG_EVENT},
|
||||
// CMD_LANG_MENU
|
||||
{.conditional_index = CMD_LANG_MENU,
|
||||
.next_if_true = PTGB_DIA_WHAT_GAME_EVENT},
|
||||
{.conditional_index = CMD_LANG_MENU, .next_if_true = PTGB_DIA_WHAT_GAME_EVENT},
|
||||
// CMD_SLIDE_PROF_LEFT
|
||||
{.conditional_index = CMD_SLIDE_PROF_LEFT,
|
||||
.next_if_true = PTGB_DIA_WHAT_LANG_EVENT},
|
||||
{.conditional_index = CMD_SLIDE_PROF_LEFT, .next_if_true = PTGB_DIA_WHAT_LANG_EVENT},
|
||||
// CMD_SLIDE_PROF_RIGHT
|
||||
{.conditional_index = CMD_SLIDE_PROF_RIGHT, .next_if_true = COND_CHECK_DEX},
|
||||
{}, // CMD_CONTINUE_LINK
|
||||
@@ -475,9 +435,7 @@ const script_obj_params event_script_params[SCRIPT_SIZE] = {
|
||||
.next_if_false = PTGB_DIA_NO_GB_ROM},
|
||||
{}, // COND_CHECK_MYTHIC
|
||||
// COND_CHECK_DEX
|
||||
{.conditional_index = COND_CHECK_DEX,
|
||||
.next_if_true = 0,
|
||||
.next_if_false = COND_CHECK_KANTO},
|
||||
{.conditional_index = COND_CHECK_DEX, .next_if_true = 0, .next_if_false = COND_CHECK_KANTO},
|
||||
// COND_CHECK_KANTO
|
||||
{.conditional_index = COND_CHECK_KANTO,
|
||||
.next_if_true = PTGB_DIA_K_DEX_NOT_FULL,
|
||||
@@ -534,12 +492,10 @@ bool run_conditional(int index)
|
||||
return globalLinkCable.lastError != COND_ERROR_COLOSSEUM;
|
||||
|
||||
case COND_BEAT_E4:
|
||||
return read_flag(curr_GBA_rom.e4_flag) ||
|
||||
g_debug_options.ignore_mg_e4_flags;
|
||||
return read_flag(curr_GBA_rom.e4_flag) || g_debug_options.ignore_mg_e4_flags;
|
||||
|
||||
case COND_MG_ENABLED:
|
||||
return read_flag(curr_GBA_rom.mg_flag) ||
|
||||
g_debug_options.ignore_mg_e4_flags;
|
||||
return read_flag(curr_GBA_rom.mg_flag) || g_debug_options.ignore_mg_e4_flags;
|
||||
|
||||
case COND_TUTORIAL_COMPLETE:
|
||||
return get_tutorial_flag() && !g_debug_options.force_tutorial;
|
||||
@@ -555,13 +511,13 @@ bool run_conditional(int index)
|
||||
return !curr_GBA_rom.is_ruby_sapphire();
|
||||
|
||||
case COND_MG_OTHER_EVENT:
|
||||
return compare_map_and_npc_data(curr_GBA_rom.def_map_bank,
|
||||
curr_GBA_rom.def_map_id, curr_GBA_rom.def_npc_id) &&
|
||||
return compare_map_and_npc_data(
|
||||
curr_GBA_rom.def_map_bank, curr_GBA_rom.def_map_id, curr_GBA_rom.def_npc_id) &&
|
||||
!g_debug_options.ignore_mg_e4_flags;
|
||||
|
||||
case COND_PKMN_TO_COLLECT:
|
||||
return compare_map_and_npc_data(curr_GBA_rom.map_bank,
|
||||
curr_GBA_rom.map_id, curr_GBA_rom.npc_id) &&
|
||||
return compare_map_and_npc_data(
|
||||
curr_GBA_rom.map_bank, curr_GBA_rom.map_id, curr_GBA_rom.npc_id) &&
|
||||
!read_flag(curr_GBA_rom.all_collected_flag) &&
|
||||
!g_debug_options.ignore_unreceived_pkmn;
|
||||
|
||||
@@ -574,13 +530,11 @@ bool run_conditional(int index)
|
||||
case COND_CHECK_DEX:
|
||||
if (globalLinkCable.gen == 1)
|
||||
{
|
||||
return (get_dex_completion(1, false) == 150) ||
|
||||
g_debug_options.ignore_dex_completion;
|
||||
return (get_dex_completion(1, false) == 150) || g_debug_options.ignore_dex_completion;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (get_dex_completion(1, false) == 99) ||
|
||||
g_debug_options.ignore_dex_completion;
|
||||
return (get_dex_completion(1, false) == 99) || g_debug_options.ignore_dex_completion;
|
||||
}
|
||||
|
||||
case COND_CHECK_KANTO:
|
||||
@@ -619,17 +573,13 @@ bool run_conditional(int index)
|
||||
u32 numChunks;
|
||||
u32 chunkSize;
|
||||
|
||||
get_text_table_chunks(
|
||||
GENERAL_INDEX, &chunkList, &numChunks, &chunkSize);
|
||||
get_text_table_chunks(GENERAL_INDEX, &chunkList, &numChunks, &chunkSize);
|
||||
|
||||
FileContainerReader general_text_reader(
|
||||
chunkList, numChunks, chunkSize);
|
||||
general_text_reader.init(
|
||||
general_text_table_buffer, sizeof(general_text_table_buffer));
|
||||
FileContainerReader general_text_reader(chunkList, numChunks, chunkSize);
|
||||
general_text_reader.init(general_text_table_buffer, sizeof(general_text_table_buffer));
|
||||
|
||||
general_text_reader.readFile(GENERAL_connecting, lineBuffer);
|
||||
ptgb_write_textbox(lineBuffer, true, false, GENERAL_INDEX,
|
||||
GENERAL_connecting, false);
|
||||
ptgb_write_textbox(lineBuffer, true, false, GENERAL_INDEX, GENERAL_connecting, false);
|
||||
|
||||
load_select_sprites(NO_GB_ROM);
|
||||
obj_unhide(gba_cart, 0);
|
||||
@@ -651,22 +601,19 @@ bool run_conditional(int index)
|
||||
globalLinkCable.LinkCommand_InitalizeConnection(false);
|
||||
while (globalLinkCable.exitState != END)
|
||||
{
|
||||
if (globalLinkCable.subStateChanged &&
|
||||
!g_debug_options.print_link_data)
|
||||
if (globalLinkCable.subStateChanged && !g_debug_options.print_link_data)
|
||||
{
|
||||
switch (globalLinkCable.exitState)
|
||||
{
|
||||
case SAVE_SUCCESS:
|
||||
general_text_reader.readFile(
|
||||
GENERAL_link_success, lineBuffer);
|
||||
ptgb_write_textbox(lineBuffer, true, false,
|
||||
GENERAL_INDEX, GENERAL_link_success, false);
|
||||
general_text_reader.readFile(GENERAL_link_success, lineBuffer);
|
||||
ptgb_write_textbox(
|
||||
lineBuffer, true, false, GENERAL_INDEX, GENERAL_link_success, false);
|
||||
break;
|
||||
case TRADE_PREAMBLE:
|
||||
general_text_reader.readFile(
|
||||
GENERAL_transferring, lineBuffer);
|
||||
ptgb_write_textbox(lineBuffer, true, false,
|
||||
GENERAL_INDEX, GENERAL_transferring, false);
|
||||
general_text_reader.readFile(GENERAL_transferring, lineBuffer);
|
||||
ptgb_write_textbox(
|
||||
lineBuffer, true, false, GENERAL_INDEX, GENERAL_transferring, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -695,16 +642,13 @@ bool run_conditional(int index)
|
||||
obj_set_pos(gb_flag, 1.5 * 8, 14 * 8);
|
||||
|
||||
globalLinkCable.LinkCommand_ReadMemorySection(
|
||||
globalLinkCable.pccsROMptr->wCurrentBoxNum,
|
||||
&globalLinkCable.boxNum, 1);
|
||||
globalLinkCable.pccsROMptr->wCurrentBoxNum, &globalLinkCable.boxNum, 1);
|
||||
|
||||
byte boxDataArray[globalLinkCable.pccsROMptr->box_data_size];
|
||||
globalLinkCable.LinkCommand_ReadMemorySection(
|
||||
globalLinkCable.pccsROMptr->wBoxDataStart, boxDataArray,
|
||||
globalLinkCable.pccsROMptr->box_data_size);
|
||||
globalLinkCable.LinkCommand_ReadMemorySection(globalLinkCable.pccsROMptr->wBoxDataStart,
|
||||
boxDataArray, globalLinkCable.pccsROMptr->box_data_size);
|
||||
|
||||
box.loadData(
|
||||
globalLinkCable.gen, globalLinkCable.lang, boxDataArray);
|
||||
box.loadData(globalLinkCable.gen, globalLinkCable.lang, boxDataArray);
|
||||
}
|
||||
reload_textbox_background();
|
||||
load_flex_background(FBG_Fennel, 2);
|
||||
@@ -786,8 +730,7 @@ bool run_conditional(int index)
|
||||
if (box.getGen3Pokemon(i)->isValid)
|
||||
{
|
||||
box.removePokemon(i);
|
||||
if (!(DONT_TRANSFER_POKEMON_AT_INDEX_X &&
|
||||
i == POKEMON_INDEX_TO_SKIP))
|
||||
if (!(DONT_TRANSFER_POKEMON_AT_INDEX_X && i == POKEMON_INDEX_TO_SKIP))
|
||||
{
|
||||
boxRemovalPayload[arrayIndex] = i;
|
||||
arrayIndex++;
|
||||
@@ -803,8 +746,7 @@ bool run_conditional(int index)
|
||||
|
||||
case CMD_BOX_MENU:
|
||||
hide_textbox();
|
||||
ret =
|
||||
(box_viewer.box_main(&box, globalLinkCable.vers) == CONFIRM_BUTTON);
|
||||
ret = (box_viewer.box_main(&box, globalLinkCable.vers) == CONFIRM_BUTTON);
|
||||
show_textbox();
|
||||
return ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user