26#include <portability.h>
52 theTrack->filename = strdup(trackfile);
82 theTrack->filename = strdup(trackfile);
124 const int BUFSIZE = 256;
151 if (graphic->
envnb < 1) {
155 graphic->
env = (
const char**)calloc(graphic->
envnb,
sizeof(
char*));
157 for (i = 1; i <= graphic->
envnb; i++) {
165 s = strrchr(
theTrack->filename,
'/');
173 s = strrchr(
theTrack->internalname,
'.');
224 nextSeg = nextSeg->
next;
231 nextSurf = curSurf->
next;
239 nextCam = curCam->
next;
float tdble
Floating point type used in TORCS.
const char * GfParmGetStr(void *parmHandle, const char *path, const char *key, const char *deflt)
Get a string parameter from the parameter set handle.
tdble GfParmGetNum(void *handle, const char *path, const char *key, const char *unit, tdble deflt)
Get a numerical parameter from the parameter set handle.
void GfParmReleaseHandle(void *parmHandle)
Release given parameter set handle parmHandle.
void * GfParmReadFile(const char *file, int mode)
Read parameter set from file and return handle to parameter set.
int GfParmGetEltNb(void *handle, const char *path)
Count the number of subsections in a section in the parameter set handle.
struct trackSeg tTrackSeg
Track segment (tTrackSeg) The segments can be straights (type TR_STR): (the track goes from the right...
tTurnMarksInfo turnMarksInfo
tTrackBarrier * barrier[2]
Segment barriers.
struct trackSeg * next
Next segment.
struct trackSurface * next
Next surface in list.
#define GFPARM_RMODE_CREAT
Allow an empty in-memory set on file-open failure; does not write a file.
#define GFPARM_RMODE_STD
Return a new handle sharing cached data for this filename, if available.
#define GFPARM_RMODE_PRIVATE
Private means the handle is not shared/cached.
void ReadTrack3(tTrack *theTrack, void *TrackHandle, tRoadCam **camList, int ext)
void ReadTrack4(tTrack *theTrack, void *TrackHandle, tRoadCam **camList, int ext)
static tRoadCam * theCamList
static void * TrackHandle
tTrack * TrackBuildEx(char *trackfile)
static void GetTrackHeader(void *TrackHandle)
tTrack * TrackBuildv1(char *trackfile)
static void freeSeg(tTrackSeg *seg)
struct trackSurface tTrackSurface
Surface.
struct RoadCam tRoadCam
road camera
#define TRK_SECT_TURNMARKS