TORCS  1.3.9
The Open Racing Car Simulator
Race Managers API

Common functions for race managers. More...

Classes

struct  tRmTrackSelect
 Structure for track selection. More...
 
struct  tRmDrvSelect
 Structure for driver selection. More...
 
struct  tRmRaceParam
 Structure for configuring parameters. More...
 
struct  tRmFileSelect
 Structure for file selection. More...
 

Typedefs

typedef void(* tfSelectFile) (char *)
 Callback function definition for handling file selection. More...
 

Functions

void * RmCarSetupScreenInit (void *prevMenu, tCarElt *car, tRmInfo *reInfo)
 Display car setup screen, for loading, saving and changing car setups. More...
 
void RmDriversSelect (void *vs)
 Drivers list selection, the race manager parameter set is handed over in vs, tRmDrvSelect.param. More...
 
void RmFileSelect (void *vs)
 File selection. More...
 
void RmLoadingScreenStart (const char *title, const char *bgimg)
 Set up loading screen. More...
 
void RmShutdownLoadingScreen (void)
 Shut down loading screen. More...
 
void RmLoadingScreenSetText (const char *text)
 Set a new line of text on the loading screen. More...
 
void * RmTwoStateScreen (const char *title, const char *label1, const char *tip1, void *screen1, const char *label2, const char *tip2, void *screen2)
 Screen with 2 menu options (buttons) More...
 
void * RmTriStateScreen (const char *title, const char *label1, const char *tip1, void *screen1, const char *label2, const char *tip2, void *screen2, const char *label3, const char *tip3, void *screen3)
 Screen with 3 menu options (buttons) More...
 
void * RmFourStateScreen (const char *title, const char *label1, const char *tip1, void *screen1, const char *label2, const char *tip2, void *screen2, const char *label3, const char *tip3, void *screen3, const char *label4, const char *tip4, void *screen4)
 Screen with 4 menu options (buttons) More...
 
void * RmNStateScreen (const char *title, const char **label, const char **tip, void **screen, const int n)
 Screen with N menu options (buttons) More...
 
void RmPitMenuStart (tCarElt *car, tRmInfo *reInfo, void *userdata, tfuiCallback callback)
 Pit menu. More...
 
void RmRaceParamMenu (void *vrp)
 Race options menu. More...
 
void RmShowResults (void *prevHdle, tRmInfo *info)
 Display results. More...
 
void RmShowStandings (void *prevHdle, tRmInfo *info)
 Display standings. More...
 
char * RmGetTrackName (char *category, char *trackName)
 Get the track name defined in the parameters. More...
 
char * RmGetCategoryName (char *category)
 Get the track category name from the track category file. More...
 
void RmTrackSelect (void *vs)
 Track selection, the race manager parameter set is handed over in vs, tRmTrackSelect.param. More...
 

Detailed Description

Common functions for race managers.

Typedef Documentation

◆ tfSelectFile

typedef void(* tfSelectFile) (char *)

Callback function definition for handling file selection.

Definition at line 70 of file racescreens.h.

Function Documentation

◆ RmCarSetupScreenInit()

void* RmCarSetupScreenInit ( void *  prevMenu,
tCarElt car,
tRmInfo reInfo 
)

Display car setup screen, for loading, saving and changing car setups.

Parameters
[in]prevMenuLink to previous menu
[in,out]carCar to set up, changes go into tCarElt.pitcmd.setup, see tCarPitSetup
[in]reInfoInformation to construct setup file name (track name, session type)
Returns
Handle to car setup screen
See also
tCarPitCmd
tCarPitSetup

Definition at line 325 of file carsetupscreen.cpp.

Here is the call graph for this function:

◆ RmDriversSelect()

void RmDriversSelect ( void *  vs)

Drivers list selection, the race manager parameter set is handed over in vs, tRmDrvSelect.param.

Parameters
[in,out]vsPointer on tRmDrvSelect structure (cast to void)
Note
The race manager parameter set is modified in memory but not persisted.

Definition at line 249 of file driverselect.cpp.

Here is the call graph for this function:

◆ RmFileSelect()

void RmFileSelect ( void *  vs)

File selection.

The files listed are the ones contained in the directory given by the path in tRmFileSelect.path

Parameters
[in,out]vsPointer on tRmFileSelect structure (cast to void)

Definition at line 81 of file fileselect.cpp.

Here is the call graph for this function:

◆ RmFourStateScreen()

void* RmFourStateScreen ( const char *  title,
const char *  label1,
const char *  tip1,
void *  screen1,
const char *  label2,
const char *  tip2,
void *  screen2,
const char *  label3,
const char *  tip3,
void *  screen3,
const char *  label4,
const char *  tip4,
void *  screen4 
)

Screen with 4 menu options (buttons)

Parameters
[in]titleTitle of the screen
[in]label1Button text for first option
[in]tip1Description for first option
[in]screen1Target screen to activate for first option
[in]label2Button text for second option
[in]tip2Description for second option
[in]screen2Target screen to activate for second option
[in]label3Button text for third option
[in]tip3Description for third option
[in]screen3Target screen to activate for third option
[in]label4Button text for fourth option
[in]tip4Description for fourth option
[in]screen4Target screen to activate for fourth option
Returns
Handle to screen

Definition at line 123 of file miscscreens.cpp.

Here is the call graph for this function:

◆ RmGetCategoryName()

char* RmGetCategoryName ( char *  category)

Get the track category name from the track category file.

Parameters
[in]categoryTrack category file
Returns
Category display name on success
Empty string on failure
Note
The returned string is allocated on the heap and must be released by the caller at some point

Definition at line 223 of file trackselect.cpp.

Here is the call graph for this function:

◆ RmGetTrackName()

char* RmGetTrackName ( char *  category,
char *  trackName 
)

Get the track name defined in the parameters.

Parameters
[in]categoryTrack category directory
[in]trackNameTrack file name
Returns
Long track name on success
Empty string on failure
Note
The returned string is allocated on the heap and must be released by the caller at some point

Definition at line 194 of file trackselect.cpp.

Here is the call graph for this function:

◆ RmLoadingScreenSetText()

void RmLoadingScreenSetText ( const char *  text)

Set a new line of text on the loading screen.

Parameters
[in]textText to display

Definition at line 112 of file loadingscreen.cpp.

Here is the call graph for this function:

◆ RmLoadingScreenStart()

void RmLoadingScreenStart ( const char *  title,
const char *  bgimg 
)

Set up loading screen.

Parameters
titleScreen title.
bgimgOptionnal backgrounf image (NULL for no img).

Definition at line 54 of file loadingscreen.cpp.

Here is the call graph for this function:

◆ RmNStateScreen()

void* RmNStateScreen ( const char *  title,
const char **  label,
const char **  tip,
void **  screen,
const int  n 
)

Screen with N menu options (buttons)

Parameters
[in]titleTitle of the screen
[in]labelArray of n button texts
[in]tipArray of n descriptions
[in]screenArray of n screens
[in]nSize of arrays
Returns
Handle to screen

Definition at line 156 of file miscscreens.cpp.

Here is the call graph for this function:

◆ RmPitMenuStart()

void RmPitMenuStart ( tCarElt car,
tRmInfo reInfo,
void *  userdata,
tfuiCallback  callback 
)

Pit menu.

Parameters
[in,out]carCar data is returned in tCarElt.pitcmd
[in]reInfoRequired for passing data to car setup screen, RmCarSetupScreenInit
[in]userdataUserdata for callback
[in]callbackCallback to take action on the changes made

Definition at line 129 of file pitmenu.cpp.

Here is the call graph for this function:

◆ RmRaceParamMenu()

void RmRaceParamMenu ( void *  vrp)

Race options menu.

Parameters
[in,out]vrpPointer on tRmRaceParam structure (cast to void)
Note
The race manager parameter set is modified in memory but not persisted.

Definition at line 136 of file racemenu.cpp.

Here is the call graph for this function:

◆ RmShowResults()

void RmShowResults ( void *  prevHdle,
tRmInfo info 
)

Display results.

Parameters
[in]prevHdleHandle to previous result screen (used if the results require more than one screen)
[in]infotRmInfo.results carries the result parameter set handle

Definition at line 600 of file results.cpp.

Here is the call graph for this function:

◆ RmShowStandings()

void RmShowStandings ( void *  prevHdle,
tRmInfo info 
)

Display standings.

Parameters
[in]prevHdleHandle to previous standings screen (used if the standings require more than one screen)
[in]infotRmInfo.results carries the result parameter set handle containing the standings

Definition at line 623 of file results.cpp.

Here is the call graph for this function:

◆ RmShutdownLoadingScreen()

void RmShutdownLoadingScreen ( void  )

Shut down loading screen.

Definition at line 98 of file loadingscreen.cpp.

Here is the call graph for this function:

◆ RmTrackSelect()

void RmTrackSelect ( void *  vs)

Track selection, the race manager parameter set is handed over in vs, tRmTrackSelect.param.

Parameters
[in,out]vsPointer on a tRmTrackSelect structure (cast to void *)
Note
The race manager parameter set is modified in memory but not persisted.

Definition at line 250 of file trackselect.cpp.

Here is the call graph for this function:

◆ RmTriStateScreen()

void* RmTriStateScreen ( const char *  title,
const char *  label1,
const char *  tip1,
void *  screen1,
const char *  label2,
const char *  tip2,
void *  screen2,
const char *  label3,
const char *  tip3,
void *  screen3 
)

Screen with 3 menu options (buttons)

Parameters
[in]titleTitle of the screen
[in]label1Button text for first option
[in]tip1Description for first option
[in]screen1Target screen to activate for first option
[in]label2Button text for second option
[in]tip2Description for second option
[in]screen2Target screen to activate for second option
[in]label3Button text for third option
[in]tip3Description for third option
[in]screen3Target screen to activate for third option
Returns
Handle to screen

Definition at line 84 of file miscscreens.cpp.

Here is the call graph for this function:

◆ RmTwoStateScreen()

void* RmTwoStateScreen ( const char *  title,
const char *  label1,
const char *  tip1,
void *  screen1,
const char *  label2,
const char *  tip2,
void *  screen2 
)

Screen with 2 menu options (buttons)

Parameters
[in]titleTitle of the screen
[in]label1Button text for first option
[in]tip1Description for first option
[in]screen1Target screen to activate for first option
[in]label2Button text for second option
[in]tip2Description for second option
[in]screen2Target screen to activate for second option
Returns
Handle to screen

Definition at line 50 of file miscscreens.cpp.

Here is the call graph for this function: