TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
tgf.cpp File Reference
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <portability.h>
#include <tgf.h>
#include <time.h>
Include dependency graph for tgf.cpp:

Go to the source code of this file.

Macros

#define mkdir(x)

Functions

void gfDirInit (void)
void gfModInit (void)
void gfOsInit (void)
 Init of the module.
void GfParmInit (void)
 Parameter set library API initialization, set up parameter set handle cache.
void gfRlstInit (void)
void GfInit (void)
void gfMeanReset (tdble v, tMeanVal *pvt)
tdble gfMean (tdble v, tMeanVal *pvt, int n, int w)
void GfTime2Str (char *result, int resultSize, tdble sec, int sgn)
 Convert a time in seconds (float) to an ascii string.
char * GetLocalDir (void)
void SetLocalDir (char *buf)
char * GetLibDir (void)
void SetLibDir (char *buf)
char * GetDataDir (void)
void SetDataDir (char *buf)
int GetSingleTextureMode (void)
void SetSingleTextureMode (void)
int GfNearestPow2 (int x)
int GfCreateDir (char *path)
 Create directory for given path recursively, so all missing parent directories are created as well.
int GfCreateDirForFile (const char *filenameandpath)
 Create directory for given file path recursively, so all missing parent directories are created as well.

Variables

static char * localDir = strdup("")
static char * libDir = strdup("")
static char * dataDir = strdup("")
static int singleTextureMode = 0

Macro Definition Documentation

◆ mkdir

#define mkdir ( x)
Value:
mkdir((x), S_IRWXU);
#define mkdir(x)

Function Documentation

◆ GetDataDir()

char * GetDataDir ( void )

Definition at line 256 of file tgf.cpp.

◆ GetLibDir()

char * GetLibDir ( void )

Definition at line 243 of file tgf.cpp.

◆ GetLocalDir()

char * GetLocalDir ( void )

Definition at line 230 of file tgf.cpp.

◆ GetSingleTextureMode()

int GetSingleTextureMode ( void )

Definition at line 272 of file tgf.cpp.

◆ GfCreateDir()

int GfCreateDir ( char * path)

Create directory for given path recursively, so all missing parent directories are created as well.

Parameters
[in]pathPath
Returns
GF_DIR_CREATED if directory was created or already exits
GF_DIR_CREATION_FAILED if directory could not be created

Definition at line 308 of file tgf.cpp.

Here is the call graph for this function:

◆ GfCreateDirForFile()

int GfCreateDirForFile ( const char * filenameandpath)

Create directory for given file path recursively, so all missing parent directories are created as well.

Parameters
[in]filenameandpathPath including file name
Returns
GF_DIR_CREATED if directory was created or already exits
GF_DIR_CREATION_FAILED if directory could not be created
See also
GfCreateDir

Definition at line 368 of file tgf.cpp.

Here is the call graph for this function:

◆ gfDirInit()

void gfDirInit ( void )
extern

Definition at line 33 of file directory.cpp.

◆ GfInit()

void GfInit ( void )

Definition at line 138 of file tgf.cpp.

Here is the call graph for this function:

◆ gfMean()

tdble gfMean ( tdble v,
tMeanVal * pvt,
int n,
int w )

Definition at line 157 of file tgf.cpp.

◆ gfMeanReset()

void gfMeanReset ( tdble v,
tMeanVal * pvt )

Definition at line 147 of file tgf.cpp.

◆ gfModInit()

void gfModInit ( void )
extern

Definition at line 42 of file module.cpp.

◆ GfNearestPow2()

int GfNearestPow2 ( int x)

Definition at line 284 of file tgf.cpp.

◆ gfOsInit()

void gfOsInit ( void )
extern

Init of the module.

Definition at line 41 of file os.cpp.

◆ gfRlstInit()

void gfRlstInit ( void )
extern

◆ SetDataDir()

void SetDataDir ( char * buf)

Definition at line 262 of file tgf.cpp.

◆ SetLibDir()

void SetLibDir ( char * buf)

Definition at line 249 of file tgf.cpp.

◆ SetLocalDir()

void SetLocalDir ( char * buf)

Definition at line 236 of file tgf.cpp.

◆ SetSingleTextureMode()

void SetSingleTextureMode ( void )

Definition at line 278 of file tgf.cpp.

Variable Documentation

◆ dataDir

char* dataDir = strdup("")
static

Definition at line 227 of file tgf.cpp.

◆ libDir

char* libDir = strdup("")
static

Definition at line 226 of file tgf.cpp.

◆ localDir

char* localDir = strdup("")
static

Definition at line 225 of file tgf.cpp.

◆ singleTextureMode

int singleTextureMode = 0
static

Definition at line 269 of file tgf.cpp.