maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
RetroFlat Assets API

Functions and macros for handling graphical asset files. More...

Collaboration diagram for RetroFlat Assets API:

Macros

#define retroflat_cmp_asset_path(a, b)
 Compare two asset paths. Return 0 if they're the same.
 
#define retroflat_assign_asset_path(tgt, src)
 
#define retroflat_assign_asset_trim_ext(tgt, src)
 

Typedefs

typedef char retroflat_asset_path[RETROFLAT_PATH_MAX]
 Path/name used to load an asset from disk.
 

Detailed Description

Functions and macros for handling graphical asset files.

Todo
This is kind of a mess and needs better integration with the rest!

Macro Definition Documentation

◆ retroflat_assign_asset_path

#define retroflat_assign_asset_path ( tgt,
src )
Value:
maug_strncpy( tgt, src, RETROFLAT_PATH_MAX )

◆ retroflat_assign_asset_trim_ext

#define retroflat_assign_asset_trim_ext ( tgt,
src )
Value:
maug_snprintf( tgt, RETROFLAT_PATH_MAX, "%s", src ); \
if( NULL != strrchr( tgt, '.' ) ) { \
*(strrchr( tgt, '.' )) = '\0'; \
}

◆ retroflat_cmp_asset_path

#define retroflat_cmp_asset_path ( a,
b )
Value:
strncmp( a, b, RETROFLAT_PATH_MAX )

Compare two asset paths. Return 0 if they're the same.