TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
grutil.cpp File Reference
#include <math.h>
#include <stdlib.h>
#include <sys/types.h>
#include <stdio.h>
#include <ctype.h>
#include <GL/glut.h>
#include <plib/ssg.h>
#include <tgfclient.h>
#include <portability.h>
#include "grutil.h"
#include "grmultitexstate.h"
#include "grscene.h"
#include "grtexture.h"
Include dependency graph for grutil.cpp:

Go to the source code of this file.

Classes

struct  stlist

Typedefs

typedef struct stlist stlist

Functions

int grGetFilename (const char *filename, char *filepath, char *buf, const int BUFSIZE)
bool grLoadPngTexture (const char *fname, ssgTextureInfo *info)
static grManagedState * grGetState (char *img)
void grRemoveState (char *img)
void grShutdownState (void)
static void grSetupState (grManagedState *st, char *buf)
ssgState * grSsgLoadTexState (const char *img)
ssgState * grSsgEnvTexState (const char *img)
ssgState * grSsgLoadTexStateEx (const char *img, char *filepath, int wrap, int mipmap)
void grWriteTime (float *color, int font, int x, int y, tdble sec, int sgn)
float grGetHOT (float x, float y)

Variables

float grGammaValue = 1.8
int grMipMap = 0
char * grFilePath
char * grTexturePath = NULL
static stlist * stateList = NULL

Typedef Documentation

◆ stlist

typedef struct stlist stlist

Function Documentation

◆ grGetFilename()

int grGetFilename ( const char * filename,
char * filepath,
char * buf,
const int BUFSIZE )

Definition at line 46 of file grutil.cpp.

◆ grGetHOT()

float grGetHOT ( float x,
float y )

Definition at line 354 of file grutil.cpp.

◆ grGetState()

grManagedState * grGetState ( char * img)
static

Definition at line 141 of file grutil.cpp.

◆ grLoadPngTexture()

bool grLoadPngTexture ( const char * fname,
ssgTextureInfo * info )

Definition at line 91 of file grutil.cpp.

Here is the call graph for this function:

◆ grRemoveState()

void grRemoveState ( char * img)

Definition at line 156 of file grutil.cpp.

◆ grSetupState()

void grSetupState ( grManagedState * st,
char * buf )
static

Definition at line 199 of file grutil.cpp.

◆ grShutdownState()

void grShutdownState ( void )

Definition at line 182 of file grutil.cpp.

◆ grSsgEnvTexState()

ssgState * grSsgEnvTexState ( const char * img)

Definition at line 251 of file grutil.cpp.

Here is the call graph for this function:

◆ grSsgLoadTexState()

ssgState * grSsgLoadTexState ( const char * img)

Definition at line 219 of file grutil.cpp.

Here is the call graph for this function:

◆ grSsgLoadTexStateEx()

ssgState * grSsgLoadTexStateEx ( const char * img,
char * filepath,
int wrap,
int mipmap )

Definition at line 284 of file grutil.cpp.

Here is the call graph for this function:

◆ grWriteTime()

void grWriteTime ( float * color,
int font,
int x,
int y,
tdble sec,
int sgn )

Definition at line 317 of file grutil.cpp.

Here is the call graph for this function:

Variable Documentation

◆ grFilePath

char* grFilePath

Definition at line 42 of file grutil.cpp.

◆ grGammaValue

float grGammaValue = 1.8

Definition at line 39 of file grutil.cpp.

◆ grMipMap

int grMipMap = 0

Definition at line 40 of file grutil.cpp.

◆ grTexturePath

char* grTexturePath = NULL

Definition at line 43 of file grutil.cpp.

◆ stateList

stlist* stateList = NULL
static

Definition at line 138 of file grutil.cpp.