TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
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 (int p)
static class cGrScreen * grGetcurrentScreen (void)
static void grSetZoom (int zoom)
static void grSelectCamera (int camera)
static void grSelectBoard (int board)
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
tgrCarInfo * grCarInfo
ssgContext grContext
class cGrScreen * grScreens [GR_NB_MAX_SCREEN] = {NULL, NULL, NULL, NULL}
int grNbScreen = 1
tdble grLodFactorValue = 1.0
EWheelDetail grUseDetailedWheels = DETAILED

Function Documentation

◆ grAdaptScreenSize()

void grAdaptScreenSize ( void )
static

Definition at line 112 of file grmain.cpp.

◆ grGetcurrentScreen()

class cGrScreen * grGetcurrentScreen ( void )
static

Definition at line 166 of file grmain.cpp.

Here is the call graph for this function:

◆ grNextCar()

void grNextCar ( void * )
static

Definition at line 214 of file grmain.cpp.

Here is the call graph for this function:

◆ grPrevCar()

void grPrevCar ( void * )
static

Definition at line 208 of file grmain.cpp.

Here is the call graph for this function:

◆ grSelectBoard()

void grSelectBoard ( int board)
static

Definition at line 196 of file grmain.cpp.

Here is the call graph for this function:

◆ grSelectCamera()

void grSelectCamera ( int camera)
static

Definition at line 190 of file grmain.cpp.

Here is the call graph for this function:

◆ grSelectTrackMap()

void grSelectTrackMap ( void * )
static

Definition at line 202 of file grmain.cpp.

Here is the call graph for this function:

◆ grSetZoom()

void grSetZoom ( int zoom)
static

Definition at line 184 of file grmain.cpp.

Here is the call graph for this function:

◆ grSplitScreen()

void grSplitScreen ( int p)
static

Definition at line 144 of file grmain.cpp.

Here is the call graph for this function:

◆ grSwitchMirror()

void grSwitchMirror ( void * )
static

Definition at line 220 of file grmain.cpp.

Here is the call graph for this function:

◆ initCars()

int initCars ( tSituation * s)

Definition at line 344 of file grmain.cpp.

Here is the call graph for this function:

◆ InitMultiTex()

bool InitMultiTex ( void )

Definition at line 83 of file grmain.cpp.

Here is the call graph for this function:

◆ initTrack()

int initTrack ( tTrack * track)

Definition at line 449 of file grmain.cpp.

Here is the call graph for this function:

◆ initView()

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

Definition at line 226 of file grmain.cpp.

Here is the call graph for this function:

◆ muteForMenu()

void muteForMenu ( void )

Definition at line 493 of file grmain.cpp.

Here is the call graph for this function:

◆ refresh()

int refresh ( tSituation * s)

Definition at line 306 of file grmain.cpp.

Here is the call graph for this function:

◆ shutdownCars()

void shutdownCars ( void )

Definition at line 413 of file grmain.cpp.

Here is the call graph for this function:

◆ shutdownTrack()

void shutdownTrack ( void )

Definition at line 469 of file grmain.cpp.

Here is the call graph for this function:

Variable Documentation

◆ grCarInfo

tgrCarInfo* grCarInfo

Definition at line 65 of file grmain.cpp.

◆ grContext

ssgContext grContext

Definition at line 66 of file grmain.cpp.

◆ grCurTime

double grCurTime

Definition at line 51 of file grmain.cpp.

◆ grDeltaTime

double grDeltaTime

Definition at line 52 of file grmain.cpp.

◆ grFps

float grFps

Definition at line 50 of file grmain.cpp.

◆ grHandle

void* grHandle = NULL

Definition at line 58 of file grmain.cpp.

◆ grLodFactorValue

tdble grLodFactorValue = 1.0

Definition at line 69 of file grmain.cpp.

◆ grMaxDammage

tdble grMaxDammage = 10000.0

Definition at line 55 of file grmain.cpp.

◆ grMouseRatioX

float grMouseRatioX
static

Definition at line 63 of file grmain.cpp.

◆ grMouseRatioY

float grMouseRatioY
static

Definition at line 63 of file grmain.cpp.

◆ grNbCars

int grNbCars = 0

Definition at line 56 of file grmain.cpp.

◆ grNbScreen

int grNbScreen = 1

Definition at line 68 of file grmain.cpp.

◆ grScreens

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

Definition at line 67 of file grmain.cpp.

◆ grTrackHandle

void* grTrackHandle = NULL

Definition at line 59 of file grmain.cpp.

◆ grUseDetailedWheels

EWheelDetail grUseDetailedWheels = DETAILED

Definition at line 70 of file grmain.cpp.

◆ grWinh

int grWinh

Definition at line 61 of file grmain.cpp.

◆ grWinw

int grWinw

Definition at line 61 of file grmain.cpp.

◆ grWinx

int grWinx

Definition at line 61 of file grmain.cpp.

◆ grWiny

int grWiny

Definition at line 61 of file grmain.cpp.

◆ maxTextureUnits

int maxTextureUnits = 0

Definition at line 47 of file grmain.cpp.

◆ nFrame

int nFrame
static

Definition at line 49 of file grmain.cpp.

◆ OldTime

double OldTime
static

Definition at line 48 of file grmain.cpp.

◆ segIndice

int segIndice = 0

Definition at line 53 of file grmain.cpp.