LibGame  v0.4.0
The LG Game Engine - Copyright (C) 2024-2025 ETMSoftware
lg_dirs_stuff.c File Reference

Functions

const char * lg_img (const char *file_name)
 
const char * lg_snd (const char *file_name)
 
const char * lg_mus (const char *file_name)
 
const char * lg_fnt (const char *file_name)
 
const char * lg_engine_fnt (const char *file_name)
 
const char * lg_mesh (const char *file_name)
 
const char * lg_shader (const char *file_name)
 
const char * lg_engine_shader (const char *file_name)
 
const char * lg_assets_file (const char *sub_path, const char *file_name)
 
const char * lg_app_wr_file (const char *file_name)
 
void lg_assets_file_free_buffer ()
 

Detailed Description

 === Data/assets ===

Function Documentation

◆ lg_img()

const char* lg_img ( const char *  file_name)

Return full path of file in the IMAGES folder (in assets)

Parameters
file_nameFile name
Returns
Full path

◆ lg_snd()

const char* lg_snd ( const char *  file_name)

Return full path of file in the SOUNDS folder (in assets)

Parameters
file_nameFile name
Returns
Full path

◆ lg_mus()

const char* lg_mus ( const char *  file_name)

Return full path of file in the MUSIC folder (in assets)

Parameters
file_nameFile name
Returns
Full path

◆ lg_fnt()

const char* lg_fnt ( const char *  file_name)

Return full path of file in the FONTS folder (in assets)

Parameters
file_nameFile name
Returns
Full path

◆ lg_engine_fnt()

const char* lg_engine_fnt ( const char *  file_name)

Return full path of file in the ENGINE FONTS folder (in assets)

Parameters
file_nameFile name
Returns
Full path

◆ lg_mesh()

const char* lg_mesh ( const char *  file_name)

Return full path of file in the MESHES folder (in assets)

Parameters
file_nameFile name
Returns
Full path

◆ lg_shader()

const char* lg_shader ( const char *  file_name)

Return full path of file in the SHADERS folder (in assets)

Parameters
file_nameFile name
Returns
Full path

◆ lg_engine_shader()

const char* lg_engine_shader ( const char *  file_name)

Return full path of file in the ENGINE SHADERS folder (in assets)

Parameters
file_nameFile name
Returns
Full path

◆ lg_assets_file()

const char* lg_assets_file ( const char *  sub_path,
const char *  file_name 
)

Return full path of sub_path/file_name in the ASSETS folder

Parameters
sub_path
file_nameFile name
Returns
Full path

◆ lg_app_wr_file()

const char* lg_app_wr_file ( const char *  file_name)

Return full path of file in the APP WRITABLE folder

NOTE: From: https://wiki.libsdl.org/SDL2/SDL_GetPrefPath 'The returned path is guaranteed to end with a path separator'

Parameters
file_nameFile name
Returns
Full path

◆ lg_assets_file_free_buffer()

void lg_assets_file_free_buffer ( )

Free assets file buffer - called by lg_quit(), you should never call this fuction directly