diff --git a/game/source/cseries/async_xoverlapped.cpp b/game/source/cseries/async_xoverlapped.cpp index 799383818..238f5af9b 100644 --- a/game/source/cseries/async_xoverlapped.cpp +++ b/game/source/cseries/async_xoverlapped.cpp @@ -21,7 +21,7 @@ HOOK_DECLARE(0x005A8DE0, overlapped_initialize); HOOK_DECLARE(0x005A8E20, overlapped_render); HOOK_DECLARE(0x005A8E30, overlapped_task_block_until_finished); HOOK_DECLARE(0x005A8ED0, overlapped_task_is_running); -//HOOK_DECLARE(0x005A8F40, overlapped_task_start_internal); +HOOK_DECLARE(0x005A8F40, overlapped_task_start_internal); HOOK_DECLARE(0x005A8F50, overlapped_task_terminate); HOOK_DECLARE(0x005A8FA0, overlapped_task_toggle_debug_rendering); HOOK_DECLARE(0x005A8FB0, overlapped_task_wait_for_all_tasks_to_finish); @@ -30,25 +30,25 @@ HOOK_DECLARE(0x005A91E0, task_block_until_finished); HOOK_DECLARE(0x005A9230, task_is_complete); HOOK_DECLARE(0x005A9280, task_now_finished); -HOOK_DECLARE_CALL(0x0074CA3C, overlapped_task_start_internal); // c_content_enumeration_overlapped_task::success -HOOK_DECLARE_CALL(0x00A82786, overlapped_task_start_internal); // user_interface_session_string_verify_update -//HOOK_DECLARE_CALL(0x00AA4306, overlapped_task_start_internal); // c_player_profile_interface::update_service_tag -//HOOK_DECLARE_CALL(0x00AD3699, overlapped_task_start_internal); // c_player_marketplace::show_purchase_ui -//HOOK_DECLARE_CALL(0x00AD36F6, overlapped_task_start_internal); // c_player_marketplace::start_asset_consume -//HOOK_DECLARE_CALL(0x00AD3810, overlapped_task_start_internal); // c_player_marketplace::start_assets_enumerate -HOOK_DECLARE_CALL(0x00AE668B, overlapped_task_start_internal); // c_saved_film_take_screenshot::update -HOOK_DECLARE_CALL(0x00AE6868, overlapped_task_start_internal); // c_saved_film_take_screenshot::update -HOOK_DECLARE_CALL(0x00AEA33B, overlapped_task_start_internal); // ? -HOOK_DECLARE_CALL(0x00AF0D67, overlapped_task_start_internal); // c_gui_start_menu_hq_service_record_file_share_choose_item::__vftable50 -HOOK_DECLARE_CALL(0x00AF0FBE, overlapped_task_start_internal); // c_gui_start_menu_hq_service_record_file_share_choose_item::__vftable49 -HOOK_DECLARE_CALL(0x00AF26D6, overlapped_task_start_internal); // c_gui_start_menu_hq_service_record_file_share_item_selected::__vftable50 -HOOK_DECLARE_CALL(0x00AF5088, overlapped_task_start_internal); // c_gui_start_menu_hq_screenshots_options::__vftable24 -HOOK_DECLARE_CALL(0x00AF52D2, overlapped_task_start_internal); // c_gui_start_menu_hq_screenshots_options::__vftable24 -HOOK_DECLARE_CALL(0x00AF8495, overlapped_task_start_internal); // c_start_menu_settings_appearance_emblem::handle_list_item_chosen -HOOK_DECLARE_CALL(0x00B0373C, overlapped_task_start_internal); // c_gui_screen_pregame_selection::begin_selected_item_text_edit -HOOK_DECLARE_CALL(0x00B0B8D6, overlapped_task_start_internal); // ? -HOOK_DECLARE_CALL(0x00B0BAA0, overlapped_task_start_internal); // ? -HOOK_DECLARE_CALL(0x00B0DA48, overlapped_task_start_internal); // c_gui_screen_game_options::update_save_as_new_operation +//HOOK_DECLARE_CALL(0x0074CA3C, overlapped_task_start_internal); // c_content_enumeration_overlapped_task::success +//HOOK_DECLARE_CALL(0x00A82786, overlapped_task_start_internal); // user_interface_session_string_verify_update +////HOOK_DECLARE_CALL(0x00AA4306, overlapped_task_start_internal); // c_player_profile_interface::update_service_tag +////HOOK_DECLARE_CALL(0x00AD3699, overlapped_task_start_internal); // c_player_marketplace::show_purchase_ui +////HOOK_DECLARE_CALL(0x00AD36F6, overlapped_task_start_internal); // c_player_marketplace::start_asset_consume +////HOOK_DECLARE_CALL(0x00AD3810, overlapped_task_start_internal); // c_player_marketplace::start_assets_enumerate +//HOOK_DECLARE_CALL(0x00AE668B, overlapped_task_start_internal); // c_saved_film_take_screenshot::update +//HOOK_DECLARE_CALL(0x00AE6868, overlapped_task_start_internal); // c_saved_film_take_screenshot::update +//HOOK_DECLARE_CALL(0x00AEA33B, overlapped_task_start_internal); // ? +//HOOK_DECLARE_CALL(0x00AF0D67, overlapped_task_start_internal); // c_gui_start_menu_hq_service_record_file_share_choose_item::__vftable50 +//HOOK_DECLARE_CALL(0x00AF0FBE, overlapped_task_start_internal); // c_gui_start_menu_hq_service_record_file_share_choose_item::__vftable49 +//HOOK_DECLARE_CALL(0x00AF26D6, overlapped_task_start_internal); // c_gui_start_menu_hq_service_record_file_share_item_selected::__vftable50 +//HOOK_DECLARE_CALL(0x00AF5088, overlapped_task_start_internal); // c_gui_start_menu_hq_screenshots_options::__vftable24 +//HOOK_DECLARE_CALL(0x00AF52D2, overlapped_task_start_internal); // c_gui_start_menu_hq_screenshots_options::__vftable24 +//HOOK_DECLARE_CALL(0x00AF8495, overlapped_task_start_internal); // c_start_menu_settings_appearance_emblem::handle_list_item_chosen +//HOOK_DECLARE_CALL(0x00B0373C, overlapped_task_start_internal); // c_gui_screen_pregame_selection::begin_selected_item_text_edit +//HOOK_DECLARE_CALL(0x00B0B8D6, overlapped_task_start_internal); // ? +//HOOK_DECLARE_CALL(0x00B0BAA0, overlapped_task_start_internal); // ? +//HOOK_DECLARE_CALL(0x00B0DA48, overlapped_task_start_internal); // c_gui_screen_game_options::update_save_as_new_operation // #TODO: add me to `s_overlapped_globals` c_static_array task_slot_overlapped; @@ -162,7 +162,7 @@ void __cdecl overlapped_initialize() { //INVOKE(0x005A8DE0, overlapped_initialize); - g_overlapped_globals.toggle_debug_rendering = true; + g_overlapped_globals.toggle_debug_rendering = false; csmemset(&g_overlapped_globals, 0, sizeof(g_overlapped_globals)); overlapped_memory_initialize(); c_virtual_keyboard_task::get_instance(__FILE__, __LINE__, k_any_controller, NULL, NULL, NULL, 0, 0, true); @@ -225,7 +225,7 @@ void __cdecl overlapped_render() } csnzprintf(string, sizeof(string), "#%ld task info: context= '%s', status= '%s', file= '%s', line= '%ld'\r\n", - task_slot_index++, + task_slot_index, task_slot->task->get_context_string(), status, task_slot->task->m_file, diff --git a/game/source/networking/tools/remote_command.cpp b/game/source/networking/tools/remote_command.cpp index 1ca2ad9e4..f3d33cb68 100644 --- a/game/source/networking/tools/remote_command.cpp +++ b/game/source/networking/tools/remote_command.cpp @@ -2005,3 +2005,14 @@ callback_result_t levels_add_map_multi_callback(void const* userdata, long token return result; } +callback_result_t xoverlapped_debug_render_callback(void const* userdata, long token_count, tokens_t const tokens) +{ + COMMAND_CALLBACK_PARAMETER_CHECK; + + long value = token_try_parse_bool(tokens[1]); + if (value != NONE) + overlapped_task_toggle_debug_rendering(static_cast(value - 1)); + + return result; +} + diff --git a/game/source/networking/tools/remote_command.hpp b/game/source/networking/tools/remote_command.hpp index 8200e9776..95f58074d 100644 --- a/game/source/networking/tools/remote_command.hpp +++ b/game/source/networking/tools/remote_command.hpp @@ -203,6 +203,7 @@ COMMAND_CALLBACK_DECLARE(levels_add_fake_map_solo); COMMAND_CALLBACK_DECLARE(levels_add_map_solo); COMMAND_CALLBACK_DECLARE(levels_add_fake_map_multi); COMMAND_CALLBACK_DECLARE(levels_add_map_multi); +COMMAND_CALLBACK_DECLARE(xoverlapped_debug_render); //----------------------------------------------------------------------------- @@ -348,6 +349,8 @@ s_command const k_registered_commands[] = COMMAND_CALLBACK_REGISTER(levels_add_map_solo, 2, " ", " adds a map with the specified map id for campaign\r\nNETWORK SAFE: Unknown, assumed unsafe"), COMMAND_CALLBACK_REGISTER(levels_add_fake_map_multi, 1, "", " adds a fake map for multiplayer\r\nNETWORK SAFE: Unknown, assumed unsafe"), COMMAND_CALLBACK_REGISTER(levels_add_map_multi, 2, " ", " adds a map with the specified map id for multiplayer\r\nNETWORK SAFE: Unknown, assumed unsafe"), + + COMMAND_CALLBACK_REGISTER(xoverlapped_debug_render, 1, "", "toggle display a list of active xoverlapped tasks\r\nNETWORK SAFE: Unknown, assumed unsafe"), }; extern void command_tokenize(char const* input, tokens_t& tokens, long* token_count);