|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include "sidecar_private.h"#include <dttr_iso.h>#include <dttr_path.h>#include <dttr_pcdogs.h>#include <sds.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <windows.h>Go to the source code of this file.
Data Structures | |
| struct | game_data_source |
Functions | |
| void | dttr_game_data_cleanup () |
| void | dttr_game_data_init () |
| static bool | name_matches_segment (const char *name, const char *segment, size_t segment_len) |
| static bool | find_case_match (const char *parent, const char *segment, size_t segment_len, char *out_name, size_t out_name_size) |
| bool | dttr_game_data_resolve_existing_read_path (const char *path, char *out_path, size_t out_path_size) |
| const char * | dttr_game_data_find_data_segment (const char *path) |
| static bool | append_game_path (const char *relative, char *out, size_t out_size) |
| bool | dttr_game_data_resolve_read_path (const char *path, char *out_path, size_t out_path_size) |
| sds | dttr_game_data_resolve_media_path (const char *relative) |
Variables | |
| static game_data_source | source |
|
static |
Definition at line 167 of file game_data.c.
References DTTR_Path_AppendSegment(), DTTR_Path_CopySds(), DTTR_Path_IsSafeRelative(), DTTR_Path_SkipSeparators(), and source.
Referenced by dttr_game_data_resolve_read_path().
| 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().
| void dttr_game_data_init | ( | ) |
Definition at line 27 of file game_data.c.
References game_data_source::cache_root, dttr_game_data_cleanup(), DTTR_Path_CopyString(), game_data_source::game_root, game_data_source::is_iso, and source.
Referenced by DTTR_Hook_WinMainCallback(), and DTTR_STORAGE_SLOT().
| 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().
|
static |
Definition at line 55 of file game_data.c.
References data, DTTR_ISO_MAX_PATH, DTTR_Path_CopyString(), DTTR_Path_IsSeparator(), and name_matches_segment().
Referenced by dttr_game_data_resolve_existing_read_path().
|
static |
Definition at line 47 of file game_data.c.
References DTTR_Path_AsciiIeqN().
Referenced by find_case_match().
|
static |
Definition at line 21 of file game_data.c.
Referenced by append_game_path(), button_source_in_range(), compile_shader(), config_apply_buttons(), config_format_gamepad_source(), draw_gamepad_button_row(), dttr_game_data_cleanup(), dttr_game_data_init(), dttr_game_data_resolve_read_path(), gamepad_button_label_state(), is_source_pressed(), process_events(), source_for_action(), source_label(), source_tooltip(), and sync_config_from_rows().