TORCS  1.3.9
The Open Racing Car Simulator
grmain.cpp File Reference
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <GL/glut.h>
#include <plib/ssg.h>
#include <tgfclient.h>
#include <portability.h>
#include <graphic.h>
#include "grmain.h"
#include "grshadow.h"
#include "grskidmarks.h"
#include "grsmoke.h"
#include "grcar.h"
#include "grscreen.h"
#include "grcam.h"
#include "grscene.h"
#include "grsound.h"
#include "grboard.h"
#include "grutil.h"
#include "grtrackmap.h"
#include "grcarlight.h"
#include <glfeatures.h>
Include dependency graph for grmain.cpp:

Go to the source code of this file.

Functions

bool InitMultiTex (void)
 
static void grAdaptScreenSize (void)
 
static void grSplitScreen (void *vp)
 
static class cGrScreengrGetcurrentScreen (void)
 
static void grSetZoom (void *vp)
 
static void grSelectCamera (void *vp)
 
static void grSelectBoard (void *vp)
 
static void grSelectTrackMap (void *)
 
static void grPrevCar (void *)
 
static void grNextCar (void *)
 
static void grSwitchMirror (void *)
 
int initView (int x, int y, int width, int height, int, void *screen)
 
int refresh (tSituation *s)
 
int initCars (tSituation *s)
 
void shutdownCars (void)
 
int initTrack (tTrack *track)
 
void shutdownTrack (void)
 
void muteForMenu (void)
 

Variables

int maxTextureUnits = 0
 
static double OldTime
 
static int nFrame
 
float grFps
 
double grCurTime
 
double grDeltaTime
 
int segIndice = 0
 
tdble grMaxDammage = 10000.0
 
int grNbCars = 0
 
void * grHandle = NULL
 
void * grTrackHandle = NULL
 
int grWinx
 
int grWiny
 
int grWinw
 
int grWinh
 
static float grMouseRatioX
 
static float grMouseRatioY
 
tgrCarInfogrCarInfo
 
ssgContext grContext
 
class cGrScreengrScreens [GR_NB_MAX_SCREEN] = {NULL, NULL, NULL, NULL}
 
int grNbScreen = 1
 
tdble grLodFactorValue = 1.0
 
EWheelDetail grUseDetailedWheels = DETAILED
 

Function Documentation

◆ grAdaptScreenSize()

static void grAdaptScreenSize ( void  )
static

Definition at line 113 of file grmain.cpp.

Here is the call graph for this function:

◆ grGetcurrentScreen()

static class cGrScreen* grGetcurrentScreen ( void  )
static

Definition at line 169 of file grmain.cpp.

Here is the call graph for this function:

◆ grNextCar()

static void grNextCar ( void *  )
static

Definition at line 217 of file grmain.cpp.

Here is the call graph for this function:

◆ grPrevCar()

static void grPrevCar ( void *  )
static

Definition at line 211 of file grmain.cpp.

Here is the call graph for this function:

◆ grSelectBoard()

static void grSelectBoard ( void *  vp)
static

Definition at line 199 of file grmain.cpp.

Here is the call graph for this function:

◆ grSelectCamera()

static void grSelectCamera ( void *  vp)
static

Definition at line 193 of file grmain.cpp.

Here is the call graph for this function:

◆ grSelectTrackMap()

static void grSelectTrackMap ( void *  )
static

Definition at line 205 of file grmain.cpp.

Here is the call graph for this function:

◆ grSetZoom()

static void grSetZoom ( void *  vp)
static

Definition at line 187 of file grmain.cpp.

Here is the call graph for this function:

◆ grSplitScreen()

static void grSplitScreen ( void *  vp)
static

Definition at line 145 of file grmain.cpp.

Here is the call graph for this function:

◆ grSwitchMirror()

static void grSwitchMirror ( void *  )
static

Definition at line 223 of file grmain.cpp.

Here is the call graph for this function:

◆ initCars()

int initCars ( tSituation s)

Definition at line 347 of file grmain.cpp.

Here is the call graph for this function:

◆ InitMultiTex()

bool InitMultiTex ( void  )

Definition at line 84 of file grmain.cpp.

Here is the call graph for this function:

◆ initTrack()

int initTrack ( tTrack track)

Definition at line 452 of file grmain.cpp.

Here is the call graph for this function:

◆ initView()

int initView ( int  x,
int  y,
int  width,
int  height,
int  ,
void *  screen 
)

Definition at line 229 of file grmain.cpp.

Here is the call graph for this function:

◆ muteForMenu()

void muteForMenu ( void  )

Definition at line 496 of file grmain.cpp.

Here is the call graph for this function:

◆ refresh()

int refresh ( tSituation s)

Definition at line 309 of file grmain.cpp.

Here is the call graph for this function:

◆ shutdownCars()

void shutdownCars ( void  )

Definition at line 416 of file grmain.cpp.

Here is the call graph for this function:

◆ shutdownTrack()

void shutdownTrack ( void  )

Definition at line 472 of file grmain.cpp.

Here is the call graph for this function:

Variable Documentation

◆ grCarInfo

tgrCarInfo* grCarInfo

Definition at line 66 of file grmain.cpp.

◆ grContext

ssgContext grContext

Definition at line 67 of file grmain.cpp.

◆ grCurTime

double grCurTime

Definition at line 52 of file grmain.cpp.

◆ grDeltaTime

double grDeltaTime

Definition at line 53 of file grmain.cpp.

◆ grFps

float grFps

Definition at line 51 of file grmain.cpp.

◆ grHandle

void* grHandle = NULL

Definition at line 59 of file grmain.cpp.

◆ grLodFactorValue

tdble grLodFactorValue = 1.0

Definition at line 70 of file grmain.cpp.

◆ grMaxDammage

tdble grMaxDammage = 10000.0

Definition at line 56 of file grmain.cpp.

◆ grMouseRatioX

float grMouseRatioX
static

Definition at line 64 of file grmain.cpp.

◆ grMouseRatioY

float grMouseRatioY
static

Definition at line 64 of file grmain.cpp.

◆ grNbCars

int grNbCars = 0

Definition at line 57 of file grmain.cpp.

◆ grNbScreen

int grNbScreen = 1

Definition at line 69 of file grmain.cpp.

◆ grScreens

class cGrScreen* grScreens[GR_NB_MAX_SCREEN] = {NULL, NULL, NULL, NULL}

Definition at line 68 of file grmain.cpp.

◆ grTrackHandle

void* grTrackHandle = NULL

Definition at line 60 of file grmain.cpp.

◆ grUseDetailedWheels

EWheelDetail grUseDetailedWheels = DETAILED

Definition at line 71 of file grmain.cpp.

◆ grWinh

int grWinh

Definition at line 62 of file grmain.cpp.

◆ grWinw

int grWinw

Definition at line 62 of file grmain.cpp.

◆ grWinx

int grWinx

Definition at line 62 of file grmain.cpp.

◆ grWiny

int grWiny

Definition at line 62 of file grmain.cpp.

◆ maxTextureUnits

int maxTextureUnits = 0

Definition at line 48 of file grmain.cpp.

◆ nFrame

int nFrame
static

Definition at line 50 of file grmain.cpp.

◆ OldTime

double OldTime
static

Definition at line 49 of file grmain.cpp.

◆ segIndice

int segIndice = 0

Definition at line 54 of file grmain.cpp.