Helpers for selecting a valid race-manager track. More...
#include <string>#include <vector>

Go to the source code of this file.
Classes | |
| struct | tReTrackCandidate |
| Track directory pair that can be selected by a race manager. More... | |
| struct | tReTrackSelection |
| Result of resolving a race-manager track selection. More... | |
Functions | |
| bool | ReTrackFileExists (const char *category, const char *trackName, char *trackFile, int trackFileSize) |
| Check whether a track XML file exists and can be parsed. | |
| std::vector< tReTrackCandidate > | ReFindAvailableTracks (void) |
| Find all available tracks under the current TORCS track search path. | |
| bool | ReResolveTrackSelection (void *params, int curTrackIndex, const std::vector< tReTrackCandidate > &availableTracks, tReTrackSelection *selection, bool updateParams) |
| Resolve the current race-manager track entry to an available track. | |
Helpers for selecting a valid race-manager track.
Definition in file racetrackselect.h.
|
extern |
Find all available tracks under the current TORCS track search path.
Definition at line 88 of file racetrackselect.cpp.

|
extern |
Resolve the current race-manager track entry to an available track.
The configured track is kept when it is present in availableTracks. If it is missing, the first available track in the same category is preferred, otherwise the first available track is used. When updateParams is true, a fallback selection is written back to the current race-manager track section.
| [in,out] | params | Race-manager parameter handle |
| [in] | curTrackIndex | Current track section index under RM_SECT_TRACKS |
| [in] | availableTracks | Ordered list of valid track candidates |
| [in,out] | selection | Resolved track selection result |
| [in] | updateParams | true to write fallback category/name to params |
Definition at line 125 of file racetrackselect.cpp.

|
extern |
Check whether a track XML file exists and can be parsed.
| [in] | category | Track category directory name |
| [in] | trackName | Track directory and XML base name |
| [in,out] | trackFile | Optional buffer receiving the generated track XML path |
| [in] | trackFileSize | Size of trackFile in bytes |
Definition at line 66 of file racetrackselect.cpp.
