TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
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.

Functions

void * RmCarSetupScreenInit (void *prevMenu, tCarElt *car, tRmInfo *reInfo)
 Display car setup screen, for loading, saving and changing car setups.
void RmDriversSelect (void *vs)
 Drivers list selection, the race manager parameter set is handed over in vs, tRmDrvSelect.param.
void RmFileSelect (void *vs)
 File selection.
void RmLoadingScreenStart (const char *title, const char *bgimg)
 Set up loading screen.
void RmShutdownLoadingScreen (void)
 Shut down loading screen.
void RmLoadingScreenSetText (const char *text)
 Set a new line of text on the loading screen.
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)
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)
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)
void * RmNStateScreen (const char *title, const char **label, const char **tip, void **screen, const int n)
 Screen with N menu options (buttons)
void RmPitMenuStartAction (tCarElt *car, tRmInfo *reInfo, const tGfuiAction &callback)
 Pit menu.
void RmRaceParamMenu (void *vrp)
 Race options menu.
void RmShowResults (void *prevHdle, tRmInfo *info)
 Display results.
void RmShowStandings (void *prevHdle, tRmInfo *info)
 Display standings.
char * RmGetTrackName (char *category, char *trackName)
 Get the track name defined in the parameters.
char * RmGetCategoryName (char *category)
 Get the track category name from the track category file.
void RmTrackSelect (void *vs)
 Track selection, the race manager parameter set is handed over in vs, tRmTrackSelect.param.

Detailed Description

Common functions for race managers.

Typedef Documentation

◆ tfSelectFile

typedef void(* tfSelectFile) (char *)

Callback function definition for handling file selection.

Definition at line 69 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 285 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 305 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 79 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 121 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 280 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 251 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 110 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 52 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 154 of file miscscreens.cpp.

Here is the call graph for this function:

◆ RmPitMenuStartAction()

void RmPitMenuStartAction ( tCarElt * car,
tRmInfo * reInfo,
const tGfuiAction & callback )

Pit menu.

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

Definition at line 255 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 134 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 575 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 598 of file results.cpp.

Here is the call graph for this function:

◆ RmShutdownLoadingScreen()

void RmShutdownLoadingScreen ( void )

Shut down loading screen.

Definition at line 96 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.
If the remembered track is no longer present, the selector falls back to the first available track and updates the current track entry in memory.

Definition at line 332 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 82 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 48 of file miscscreens.cpp.

Here is the call graph for this function: