TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
raceinit.cpp File Reference
#include <stdlib.h>
#include <stdio.h>
#include <tgfclient.h>
#include <raceman.h>
#include <robot.h>
#include <racescreens.h>
#include <robottools.h>
#include <portability.h>
#include <string>
#include <map>
#include <musicplayer/musicplayer.h>
#include "raceengine.h"
#include "racemain.h"
#include "racestate.h"
#include "racegl.h"
#include "raceresults.h"
#include "racetrackselect.h"
#include "raceinit.h"
Include dependency graph for raceinit.cpp:

Go to the source code of this file.

Classes

struct  tMainMod

Functions

void ReInit (void)
void ReShutdown (void)
void ReStartNewRace (void *)
static void reSelectRaceman (void *params)
void ReRunRaceOnConsole (const char *raceconfig)
static void reRegisterRaceman (tFList *racemanCur)
static void reSortRacemanList (tFList **racemanList)
void ReAddRacemanListButton (void *menuHandle)
static void initStartingGrid (void)
static void initPits (void)
bool isItThisRobot (tRmInfo *reInfo, const char *path, tModInfo *modInfo)
int ReInitCars (void)
 Initialize the cars for a race.
static void reDumpTrack (tTrack *track, int verbose)
 Dump the track segments on screen.
int ReInitTrack (void)
 Initialize the current race-manager track.
void ReRaceCleanup (void)
void ReRaceCleanDrivers (void)
const char * ReGetCurrentRaceName (void)
const char * ReGetPrevRaceName (void)

Variables

static const char * level_str [] = { ROB_VAL_ROOKIE, ROB_VAL_AMATEUR, ROB_VAL_SEMI_PRO, ROB_VAL_PRO }
static tModList * reEventModList = 0
tModList * ReRaceModList = 0

Function Documentation

◆ initPits()

void initPits ( void )
static

Definition at line 405 of file raceinit.cpp.

Here is the call graph for this function:

◆ initStartingGrid()

void initStartingGrid ( void )
static

Definition at line 308 of file raceinit.cpp.

Here is the call graph for this function:

◆ isItThisRobot()

bool isItThisRobot ( tRmInfo * reInfo,
const char * path,
tModInfo * modInfo )

Definition at line 511 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReAddRacemanListButton()

void ReAddRacemanListButton ( void * menuHandle)

Definition at line 252 of file raceinit.cpp.

Here is the call graph for this function:

◆ reDumpTrack()

void reDumpTrack ( tTrack * track,
int verbose )
static

Dump the track segments on screen.

Parameters
tracktrack to dump
verboseif set to 1 all the segments are described (long)

Definition at line 739 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReGetCurrentRaceName()

const char * ReGetCurrentRaceName ( void )

Definition at line 939 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReGetPrevRaceName()

const char * ReGetPrevRaceName ( void )

Definition at line 953 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReInit()

void ReInit ( void )

Definition at line 60 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReInitCars()

int ReInitCars ( void )

Initialize the cars for a race.

The car are positionned on the starting grid.

Returns
0 Ok -1 Error

Definition at line 553 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReInitTrack()

int ReInitTrack ( void )

Initialize the current race-manager track.

The configured track is validated before the track loader is called. If the configured category/name pair no longer points to a readable track XML, an available fallback track is selected and written back to the race manager for interactive runs. Console runs keep the fallback in memory only.

Returns
0 ... Ok
-1 .. Error, no valid track could be selected or loaded

Definition at line 833 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReRaceCleanDrivers()

void ReRaceCleanDrivers ( void )

Definition at line 906 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReRaceCleanup()

void ReRaceCleanup ( void )

Definition at line 892 of file raceinit.cpp.

Here is the call graph for this function:

◆ reRegisterRaceman()

void reRegisterRaceman ( tFList * racemanCur)
static

Definition at line 205 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReRunRaceOnConsole()

void ReRunRaceOnConsole ( const char * raceconfig)

Definition at line 156 of file raceinit.cpp.

Here is the call graph for this function:

◆ reSelectRaceman()

void reSelectRaceman ( void * params)
static

Definition at line 136 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReShutdown()

void ReShutdown ( void )

Definition at line 104 of file raceinit.cpp.

Here is the call graph for this function:

◆ reSortRacemanList()

void reSortRacemanList ( tFList ** racemanList)
static

Definition at line 217 of file raceinit.cpp.

Here is the call graph for this function:

◆ ReStartNewRace()

void ReStartNewRace ( void * )

Definition at line 128 of file raceinit.cpp.

Here is the call graph for this function:

Variable Documentation

◆ level_str

const char* level_str[] = { ROB_VAL_ROOKIE, ROB_VAL_AMATEUR, ROB_VAL_SEMI_PRO, ROB_VAL_PRO }
static

Definition at line 47 of file raceinit.cpp.

◆ reEventModList

tModList* reEventModList = 0
static

Definition at line 49 of file raceinit.cpp.

◆ ReRaceModList

tModList* ReRaceModList = 0

Definition at line 50 of file raceinit.cpp.