102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
game_data.c File Reference
#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

Function Documentation

◆ append_game_path()

bool append_game_path ( const char * relative,
char * out,
size_t out_size )
static

◆ dttr_game_data_cleanup()

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().

◆ dttr_game_data_find_data_segment()

const char * dttr_game_data_find_data_segment ( const char * path)

◆ dttr_game_data_init()

◆ dttr_game_data_resolve_existing_read_path()

◆ dttr_game_data_resolve_media_path()

◆ dttr_game_data_resolve_read_path()

bool dttr_game_data_resolve_read_path ( const char * path,
char * out_path,
size_t out_path_size )

◆ find_case_match()

bool find_case_match ( const char * parent,
const char * segment,
size_t segment_len,
char * out_name,
size_t out_name_size )
static

◆ name_matches_segment()

bool name_matches_segment ( const char * name,
const char * segment,
size_t segment_len )
static

Definition at line 47 of file game_data.c.

References DTTR_Path_AsciiIeqN().

Referenced by find_case_match().

Variable Documentation

◆ source