Atrinik Client  4.0
Functions
File wrapper functions

Functions

FILE * client_fopen_wrapper (const char *fname, const char *mode)
 
SDL_Surface * IMG_Load_wrapper (const char *file)
 
TTF_Font * TTF_OpenFont_wrapper (const char *file, int ptsize)
 

Detailed Description

These functions are used as replacement to common C and SDL functions that are related to file opening and reading/writing.

For GNU/Linux, they call file_path() to determine the path to the file to open in ~/.atrinik, and if the file doesn't exist there, copy it there from the directory the client is running in.

Function Documentation

FILE* client_fopen_wrapper ( const char *  fname,
const char *  mode 
)

fopen wrapper.

Parameters
fnameThe file name.
modeFile mode.
Returns
Return value of fopen().

Definition at line 508 of file wrapper.c.

SDL_Surface* IMG_Load_wrapper ( const char *  file)

IMG_Load wrapper.

Parameters
fileThe file name
Returns
Return value of IMG_Load().

Definition at line 524 of file wrapper.c.

TTF_Font* TTF_OpenFont_wrapper ( const char *  file,
int  ptsize 
)

TTF_OpenFont wrapper.

Parameters
fileThe file name.
ptsizeSize of font.
Returns
Return value of TTF_OpenFont().

Definition at line 545 of file wrapper.c.