|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <windows.h>#include <dttr_mods.h>#include <dttr_pcdogs.h>#include <dttr_runtime.h>#include <sds.h>#include <SDL3/SDL.h>Go to the source code of this file.
Enumerations | |
| enum | { DTTR_EXE_HASH_LENGTH = 16 } |
Variables | |
| HINSTANCE | dttr_sidecar_module |
| char | dttr_loader_dir [MAX_PATH] |
| char | dttr_exe_hash [DTTR_EXE_HASH_LENGTH+1] |
| anonymous enum |
| Enumerator | |
|---|---|
| DTTR_EXE_HASH_LENGTH | |
Definition at line 17 of file sidecar_private.h.
| void dttr_game_data_cleanup | ( | ) |
Definition at line 23 of file game_data.c.
References source.
Referenced by cleanup_runtime(), dttr_game_data_init(), and DTTR_STORAGE_SLOT().
| const char * dttr_game_data_find_data_segment | ( | const char * | path | ) |
Definition at line 144 of file game_data.c.
References DTTR_Path_AsciiIeqN(), DTTR_Path_SegmentLen(), DTTR_Path_SkipSeparators(), and NULL.
Referenced by dttr_game_data_resolve_read_path(), DTTR_STORAGE_SLOT(), and resolve_stream_path().
| bool dttr_game_data_resolve_existing_read_path | ( | const char * | path, |
| char * | out_path, | ||
| size_t | out_path_size ) |
Definition at line 94 of file game_data.c.
References DTTR_ISO_MAX_PATH, DTTR_Path_AppendSegment(), DTTR_Path_CopySds(), DTTR_Path_ExactExists(), DTTR_Path_IsRelativeSegment(), DTTR_PATH_NATIVE_SEPARATOR, DTTR_Path_NativeRoot(), DTTR_Path_SegmentLen(), DTTR_Path_SkipSeparators(), find_case_match(), and NULL.
Referenced by dttr_game_data_resolve_media_path(), DTTR_STORAGE_SLOT(), and try_open_read_path().
| sds dttr_game_data_resolve_media_path | ( | const char * | relative | ) |
Definition at line 210 of file game_data.c.
References dttr_game_data_resolve_existing_read_path(), dttr_game_data_resolve_read_path(), DTTR_Path_AppendSegment(), DTTR_PCDOGS_D_AUDIO_OPEN_STREAM_PKG_BASE_PATH_COUNT, DTTR_PCDOGS_D_Audio_OpenStream_PKGBasePath, and NULL.
Referenced by dttr_movies_start(), DTTR_STORAGE_SLOT(), and resolve_stream_path().
| bool dttr_game_data_resolve_read_path | ( | const char * | path, |
| char * | out_path, | ||
| size_t | out_path_size ) |
Definition at line 184 of file game_data.c.
References append_game_path(), dttr_game_data_find_data_segment(), DTTR_ISO_CachePathForFile(), DTTR_ISO_MAX_PATH, DTTR_Path_ExactExists(), DTTR_Path_IsAnyAbsolute(), and source.
Referenced by dttr_game_data_resolve_media_path(), DTTR_STORAGE_SLOT(), and try_open_read_path().
| void dttr_pcdogs_crash_symbols_clear | ( | ) |
Definition at line 126 of file crash.c.
References DTTR_CrashDump_ClearSymbolProvider().
Referenced by cleanup_runtime(), dttr_pcdogs_crash_symbols_register(), and DTTR_STORAGE_SLOT().
| void dttr_pcdogs_crash_symbols_register | ( | const DTTR_Core_Context * | runtime | ) |
Definition at line 117 of file crash.c.
References DTTR_CrashDump_SetSymbolProvider(), dttr_pcdogs_crash_symbol_provider(), dttr_pcdogs_crash_symbols_clear(), and DTTR_Core_Context::game_module.
Referenced by DTTR_Hook_WinMainCallback(), and DTTR_STORAGE_SLOT().
| const DTTR_Mods_Context * dttr_sidecar_context | ( | ) |
Definition at line 152 of file entrypoint.c.
References sidecar_ctx.
Referenced by DTTR_Hook_WinMainCallback(), DTTR_STORAGE_SLOT(), and init_mod().
Definition at line 316 of file entrypoint.c.
References after_sdl_event, dttr_audio_handle_device_event(), dttr_graphics_handle_window_resize(), dttr_imgui_process_event(), dttr_inputs_handle_device_event(), dttr_mods_before_event(), dttr_mods_handle_event(), dttr_movies_handle_event(), DTTR_PCDOGS_D_Input_ProcessWindowMessages_ShouldQuit, event, REQUIRE_PCDOGS_CALL, and toggle_fullscreen().
Referenced by dttr_sidecar_poll_sdl_events(), and DTTR_STORAGE_SLOT().
|
inlinestatic |
Definition at line 57 of file sidecar_private.h.
References ctx, DTTR_Core_PatchGroupRelease(), DTTR_MODS_LOG_DEBUG, DTTR_MODS_LOG_ERROR, DTTR_PCDOGS_PatchGroup_Install(), DTTR_ResultOK(), dttr_sidecar_result_detail(), DTTR_PCDOGS_T_Patch_Report::failed_index, DTTR_PCDOGS_T_Patch_Report::installed, and DTTR_PCDOGS_T_Patch_Report::skipped_optional.
Referenced by dttr_audio_init(), dttr_game_hooks_init(), dttr_graphics_hooks_init(), dttr_inputs_hooks_init(), and dttr_movies_hooks_init().
| void dttr_sidecar_poll_sdl_events | ( | ) |
Definition at line 383 of file entrypoint.c.
References dttr_sidecar_handle_sdl_event(), and event.
Referenced by attempt_play_startup_movies(), DTTR_Hook_WinMainCallback(), dttr_movies_hook_movie_play_file_callback(), and DTTR_STORAGE_SLOT().
|
inlinestatic |
Definition at line 52 of file sidecar_private.h.
References dttr_sidecar_result_detail(), and DTTR_StatusName().
Referenced by dttr_hook_directdraw_create_ex_callback(), dttr_inputs_handle_device_event(), dttr_inputs_hook_dinput_poll_callback(), dttr_inputs_hooks_init(), dttr_mss_sdl_release_hooks(), dttr_sidecar_install_pcdogs_patch_group(), dttr_sidecar_result_detail(), file_open_with_mode(), install_pointer_hook(), require_pcdogs_call(), and set_joystick_available().
| const DTTR_Core_Context * dttr_sidecar_runtime_context | ( | ) |
Definition at line 156 of file entrypoint.c.
References sidecar_ctx.
Referenced by dttr_hook_resolve_pcdogs_path_callback(), dttr_inputs_hook_dinput_poll_callback(), DTTR_STORAGE_SLOT(), file_open_with_mode(), handle_audio_device_removed(), and tick_main_loop().
| DTTR_STORAGE_SLOT | ( | DTTR_PCDOGS_F_Title_CleanupScreenResources_proto | , |
| dttr_hook_cleanup_title_resources_original | ) |
References dttr_game_data_cleanup(), dttr_game_data_find_data_segment(), dttr_game_data_init(), dttr_game_data_resolve_existing_read_path(), dttr_game_data_resolve_media_path(), dttr_game_data_resolve_read_path(), dttr_pcdogs_crash_symbols_clear(), dttr_pcdogs_crash_symbols_register(), dttr_sidecar_context(), dttr_sidecar_handle_sdl_event(), dttr_sidecar_poll_sdl_events(), dttr_sidecar_runtime_context(), DTTR_STORAGE_SLOT, and event.
|
extern |
Definition at line 37 of file entrypoint.c.
Referenced by build_save_slot_dir(), compute_exe_hash(), init_sidecar_context(), kvec_t(), and set_default_exe_hash().
|
extern |
Definition at line 36 of file entrypoint.c.
Referenced by build_saves_dir(), DTTR_Hook_WinMainCallback(), init_sidecar_context(), kvec_t(), and resolve_mods_dir().
|
extern |
Definition at line 35 of file entrypoint.c.
Referenced by DllMain(), DTTR_Hook_WinMainCallback(), and get_loader_dir().