TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
raceresults.cpp
Go to the documentation of this file.
1/***************************************************************************
2
3 file : raceresults.cpp
4 created : Thu Jan 2 12:43:10 CET 2003
5 copyright : (C) 2002-2026 by Eric EspiƩ, Bernhard Wymann
6 email : berniw@bluewin.ch
7
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
23
24#include <stdlib.h>
25#include <stdio.h>
26#include <time.h>
27#include <tgfclient.h>
28#include <robot.h>
29#include <raceman.h>
30#include <racescreens.h>
31#include <robottools.h>
32#include <portability.h>
33
34#include "racemain.h"
35#include "racegl.h"
36#include "raceinit.h"
37#include "raceengine.h"
38#include "racepenalties.h"
39
40#include "raceresults.h"
41
42typedef struct
43{
44 char *carName;
45 char *modName;
46 int drvIdx;
47 int points;
49
50
51void
53{
54 struct tm *stm;
55 time_t t;
56 void *results;
57 const int BUFSIZE = 1024;
58 char buf[BUFSIZE];
59
60 t = time(NULL);
61 stm = localtime(&t);
62 snprintf(buf, BUFSIZE, "%sresults/%s/results-%4d-%02d-%02d-%02d-%02d-%02d.xml",
64 ReInfo->_reFilename,
65 stm->tm_year+1900,
66 stm->tm_mon+1,
67 stm->tm_mday,
68 stm->tm_hour,
69 stm->tm_min,
70 stm->tm_sec
71 );
72
74 results = ReInfo->results;
75 GfParmSetNum(results, RE_SECT_HEADER, RE_ATTR_DATE, NULL, (tdble)t);
79}
80
81void
83{
84 int nCars;
85 int i;
86 void *results = ReInfo->results;
87 void *params = ReInfo->params;
88 const int BUFSIZE = 1024;
89 char path[BUFSIZE], path2[BUFSIZE];
90
91 nCars = GfParmGetEltNb(params, RM_SECT_DRIVERS);
92 for (i = 1; i < nCars + 1; i++) {
93 snprintf(path, BUFSIZE, "%s/%s/%d", ReInfo->track->name, RM_SECT_DRIVERS, i);
94 snprintf(path2, BUFSIZE, "%s/%d", RM_SECT_DRIVERS, i);
95 GfParmSetStr(results, path, RE_ATTR_DLL_NAME, GfParmGetStr(params, path2, RM_ATTR_MODULE, ""));
96 GfParmSetNum(results, path, RE_ATTR_INDEX, NULL, GfParmGetNum(params, path2, RM_ATTR_IDX, (char*)NULL, tModInfo::INVALID_INDEX));
97 GfParmSetStr(results, path, RM_ATTR_DRVNAME, GfParmGetStr(params, path2, RM_ATTR_DRVNAME, ""));
98 }
99}
100
101void
103{
104 int maxDrv;
105 int curDrv;
106 int runDrv;
107 char *modName;
108 int drvIdx;
109 int points;
110 int i, j;
111 int found;
112 tReStandings *standings = 0;
113 void *results = ReInfo->results;
114 const int BUFSIZE = 1024;
115 char str1[BUFSIZE], str2[BUFSIZE], path[BUFSIZE], path2[BUFSIZE];
116
117 snprintf(path, BUFSIZE, "%s/%s/%s/%s", ReInfo->track->name, RE_SECT_RESULTS, ReInfo->_reRaceName, RE_SECT_RANK);
118
119 runDrv = GfParmGetEltNb(results, path);
120 curDrv = GfParmGetEltNb(results, RE_SECT_STANDINGS);
121 maxDrv = curDrv + runDrv;
122
123 standings = (tReStandings *)calloc(maxDrv, sizeof(tReStandings));
124
125 /* Read the current standings */
126 for (i = 0; i < curDrv; i++) {
127 snprintf(path2, BUFSIZE, "%s/%d", RE_SECT_STANDINGS, i + 1);
128 standings[i].carName = strdup(GfParmGetStr(results, path2, RE_ATTR_NAME, 0));
129 standings[i].modName = strdup(GfParmGetStr(results, path2, RE_ATTR_MODULE, 0));
130 standings[i].drvIdx = (int)GfParmGetNum(results, path2, RE_ATTR_IDX, NULL, 0);
131 standings[i].points = (int)GfParmGetNum(results, path2, RE_ATTR_POINTS, NULL, 0);
132 }
133
135
136 for (i = 0; i < runDrv; i++) {
137 /* Search the driver in the standings */
138 found = 0;
139 snprintf(path, BUFSIZE, "%s/%s/%s/%s/%d", ReInfo->track->name, RE_SECT_RESULTS, ReInfo->_reRaceName, RE_SECT_RANK, i + 1);
140 const char* carName = GfParmGetStr(results, path, RE_ATTR_NAME, 0);
141 for (j = 0; j < curDrv; j++) {
142 if (!strcmp(carName, standings[j].carName)) {
143 found = 1;
144 break;
145 }
146 }
147
148 if (!found) {
149 /* Add the new driver */
150 curDrv++;
151 standings[j].carName = strdup(carName);
152 standings[j].modName = strdup(GfParmGetStr(results, path, RE_ATTR_MODULE, 0));
153 standings[j].drvIdx = (int)GfParmGetNum(results, path, RE_ATTR_IDX, NULL, 0);
154 standings[j].points = (int)GfParmGetNum(results, path, RE_ATTR_POINTS, NULL, 0);
155 } else {
156 /* Add the new points */
157 standings[j].points += (int)GfParmGetNum(results, path, RE_ATTR_POINTS, NULL, 0);
158 }
159 /* bubble sort... */
160 while (j > 0) {
161 if (standings[j - 1].points >= standings[j].points) {
162 break;
163 }
164 /* Swap with preceeding */
165 char* tmpCarName;
166 tmpCarName = standings[j].carName;
167 modName = standings[j].modName;
168 drvIdx = standings[j].drvIdx;
169 points = standings[j].points;
170
171 standings[j].carName = standings[j - 1].carName;
172 standings[j].modName = standings[j - 1].modName;
173 standings[j].drvIdx = standings[j - 1].drvIdx;
174 standings[j].points = standings[j - 1].points;
175
176 standings[j - 1].carName = tmpCarName;
177 standings[j - 1].modName = modName;
178 standings[j - 1].drvIdx = drvIdx;
179 standings[j - 1].points = points;
180
181 j--;
182 }
183 }
184
185 /* Store the standing back */
186 for (i = 0; i < curDrv; i++) {
187 snprintf(path, BUFSIZE, "%s/%d", RE_SECT_STANDINGS, i + 1);
188 GfParmSetStr(results, path, RE_ATTR_NAME, standings[i].carName);
189 free(standings[i].carName);
190 GfParmSetStr(results, path, RE_ATTR_MODULE, standings[i].modName);
191 free(standings[i].modName);
192 GfParmSetNum(results, path, RE_ATTR_IDX, NULL, standings[i].drvIdx);
193 GfParmSetNum(results, path, RE_ATTR_POINTS, NULL, standings[i].points);
194 }
195 free(standings);
196
197 snprintf(str1, BUFSIZE, "%sconfig/params.dtd", GetDataDir());
198 snprintf(str2, BUFSIZE, "<?xml-stylesheet type=\"text/xsl\" href=\"file:///%sconfig/style.xsl\"?>", GetDataDir());
199
200 GfParmSetDTD (results, str1, str2);
201 GfParmCreateDirectory(0, results);
202 GfParmWriteFile(0, results, "Results");
203}
204
205
206void ReStoreRaceResults(const char *race)
207{
208 int i;
209 int nCars;
210 tCarElt *car;
211 tSituation *s = ReInfo->s;
212 char *carName;
213 void *carparam;
214 void *results = ReInfo->results;
215 void *params = ReInfo->params;
216 const int BUFSIZE = 1024;
217 char buf[BUFSIZE], path[BUFSIZE], path2[BUFSIZE];
218
219 /* Store the number of laps of the race */
220 switch (ReInfo->s->_raceType) {
221 case RM_TYPE_RACE:
222 car = s->cars[0];
223 if (car->_laps > s->_totLaps) car->_laps = s->_totLaps + 1;
224
225 snprintf(path, BUFSIZE, "%s/%s/%s", ReInfo->track->name, RE_SECT_RESULTS, race);
226 GfParmListClean(results, path);
227 GfParmSetNum(results, path, RE_ATTR_LAPS, NULL, car->_laps - 1);
228
229 ReApplyRaceTimePenalties(s, &ReInfo->track->pits);
230
231 for (i = 0; i < s->_ncars; i++) {
232 snprintf(path, BUFSIZE, "%s/%s/%s/%s/%d", ReInfo->track->name, RE_SECT_RESULTS, race, RE_SECT_RANK, i + 1);
233 car = s->cars[i];
234 if (car->_laps > s->_totLaps) car->_laps = s->_totLaps + 1;
235
236 GfParmSetStr(results, path, RE_ATTR_NAME, car->_name);
237
238 snprintf(buf, BUFSIZE, "cars/%s/%s.xml", car->_carName, car->_carName);
239 carparam = GfParmReadFile(buf, GFPARM_RMODE_STD);
240 carName = GfParmGetName(carparam);
241
242 GfParmSetStr(results, path, RE_ATTR_CAR, carName);
243 GfParmSetNum(results, path, RE_ATTR_INDEX, NULL, car->index);
244
245 GfParmSetNum(results, path, RE_ATTR_LAPS, NULL, car->_laps - 1);
246 GfParmSetNum(results, path, RE_ATTR_TIME, NULL, car->_curTime + car->_penaltyTime);
247 GfParmSetNum(results, path, RE_ATTR_PENALTYTIME, NULL, car->_penaltyTime);
248 GfParmSetNum(results, path, RE_ATTR_BEST_LAP_TIME, NULL, car->_bestLapTime);
249 GfParmSetNum(results, path, RE_ATTR_TOP_SPEED, NULL, car->_topSpeed);
250 GfParmSetNum(results, path, RE_ATTR_DAMMAGES, NULL, car->_dammage);
251 GfParmSetNum(results, path, RE_ATTR_NB_PIT_STOPS, NULL, car->_nbPitStops);
252
253 GfParmSetStr(results, path, RE_ATTR_MODULE, car->_modName);
254 GfParmSetNum(results, path, RE_ATTR_IDX, NULL, car->_driverIndex);
255
256 snprintf(path2, BUFSIZE, "%s/%s/%d", race, RM_SECT_POINTS, i + 1);
257 GfParmSetNum(results, path, RE_ATTR_POINTS, NULL,
258 (int)GfParmGetNum(params, path2, RE_ATTR_POINTS, NULL, 0));
259
260 GfParmReleaseHandle(carparam);
261 }
262 break;
263
264 case RM_TYPE_PRACTICE:
265 car = s->cars[0];
266 snprintf(path, BUFSIZE, "%s/%s/%s", ReInfo->track->name, RE_SECT_RESULTS, race);
267 GfParmSetStr(results, path, RM_ATTR_DRVNAME, car->_name);
268 break;
269
270 case RM_TYPE_QUALIF:
271 car = s->cars[0];
272 snprintf(path, BUFSIZE, "%s/%s/%s/%s", ReInfo->track->name, RE_SECT_RESULTS, race, RE_SECT_RANK);
273 nCars = GfParmGetEltNb(results, path);
274 for (i = nCars; i > 0; i--) {
275 snprintf(path, BUFSIZE, "%s/%s/%s/%s/%d", ReInfo->track->name, RE_SECT_RESULTS, race, RE_SECT_RANK, i);
276 float opponentBestLapTime = GfParmGetNum(results, path, RE_ATTR_BEST_LAP_TIME, NULL, 0);
277
278 if (
279 (car->_bestLapTime != 0.0) &&
280 ((round(car->_bestLapTime*1000.0f) < round(opponentBestLapTime*1000.0f)) || (opponentBestLapTime == 0.0))
281 ) {
282 /* shift */
283 snprintf(path2, BUFSIZE, "%s/%s/%s/%s/%d", ReInfo->track->name, RE_SECT_RESULTS, race, RE_SECT_RANK, i + 1);
284 GfParmSetStr(results, path2, RE_ATTR_NAME, GfParmGetStr(results, path, RE_ATTR_NAME, ""));
285 GfParmSetStr(results, path2, RE_ATTR_CAR, GfParmGetStr(results, path, RE_ATTR_CAR, ""));
286 GfParmSetNum(results, path2, RE_ATTR_BEST_LAP_TIME, NULL, GfParmGetNum(results, path, RE_ATTR_BEST_LAP_TIME, NULL, 0));
287 GfParmSetStr(results, path2, RE_ATTR_MODULE, GfParmGetStr(results, path, RM_ATTR_MODULE, ""));
288 GfParmSetNum(results, path2, RE_ATTR_IDX, NULL, GfParmGetNum(results, path, RM_ATTR_IDX, NULL, 0));
289 snprintf(path, BUFSIZE, "%s/%s/%d", race, RM_SECT_POINTS, i + 1);
290 GfParmSetNum(results, path2, RE_ATTR_POINTS, NULL,
291 (int)GfParmGetNum(params, path, RE_ATTR_POINTS, NULL, 0));
292 } else {
293 break;
294 }
295 }
296 /* insert after */
297 snprintf(path, BUFSIZE, "%s/%s/%s/%s/%d", ReInfo->track->name, RE_SECT_RESULTS, race, RE_SECT_RANK, i + 1);
298 GfParmSetStr(results, path, RE_ATTR_NAME, car->_name);
299
300 snprintf(buf, BUFSIZE, "cars/%s/%s.xml", car->_carName, car->_carName);
301 carparam = GfParmReadFile(buf, GFPARM_RMODE_STD);
302 carName = GfParmGetName(carparam);
303
304 GfParmSetStr(results, path, RE_ATTR_CAR, carName);
305 GfParmSetNum(results, path, RE_ATTR_BEST_LAP_TIME, NULL, round(car->_bestLapTime*1000.0f)/1000.0f);
306 GfParmSetStr(results, path, RE_ATTR_MODULE, car->_modName);
307 GfParmSetNum(results, path, RE_ATTR_IDX, NULL, car->_driverIndex);
308 snprintf(path2, BUFSIZE, "%s/%s/%d", race, RM_SECT_POINTS, i + 1);
309 GfParmSetNum(results, path, RE_ATTR_POINTS, NULL,
310 (int)GfParmGetNum(params, path2, RE_ATTR_POINTS, NULL, 0));
311
312 GfParmReleaseHandle(carparam);
313 break;
314 }
315}
316
317
318void
320{
321 int i;
322 int nCars;
323 int printed;
324 int maxLines;
325 void *carparam;
326 char *carName;
327 const char *race = ReInfo->_reRaceName;
328 void *results = ReInfo->results;
329 const int BUFSIZE = 1024;
330 char buf[BUFSIZE], path[BUFSIZE];
331 const int TIMEFMTSIZE = 256;
332 char timefmt[TIMEFMTSIZE];
333
335 maxLines = ReResGetLines();
336
337 snprintf(buf, BUFSIZE, "%s on %s - Lap %d", car->_name, ReInfo->track->name, car->_laps);
339
340 snprintf(buf, BUFSIZE, "cars/%s/%s.xml", car->_carName, car->_carName);
341 carparam = GfParmReadFile(buf, GFPARM_RMODE_STD);
342 carName = GfParmGetName(carparam);
343
344 printed = 0;
345 snprintf(path, BUFSIZE, "%s/%s/%s/%s", ReInfo->track->name, RE_SECT_RESULTS, race, RE_SECT_RANK);
346 nCars = GfParmGetEltNb(results, path);
347 nCars = MIN(nCars + 1, maxLines);
348 for (i = 1; i < nCars; i++) {
349 snprintf(path, BUFSIZE, "%s/%s/%s/%s/%d", ReInfo->track->name, RE_SECT_RESULTS, race, RE_SECT_RANK, i);
350 if (!printed) {
351 if ((car->_bestLapTime != 0.0) && (car->_bestLapTime < GfParmGetNum(results, path, RE_ATTR_BEST_LAP_TIME, NULL, 0))) {
352 GfTime2Str(timefmt, TIMEFMTSIZE, car->_bestLapTime, 0);
353 snprintf(buf, BUFSIZE, "%d - %s - %s (%s)", i, timefmt, car->_name, carName);
354 ReResScreenSetText(buf, i - 1, 1);
355 printed = 1;
356 }
357 }
358 GfTime2Str(timefmt, TIMEFMTSIZE, GfParmGetNum(results, path, RE_ATTR_BEST_LAP_TIME, NULL, 0), 0);
359 snprintf(buf, BUFSIZE, "%d - %s - %s (%s)", i + printed, timefmt, GfParmGetStr(results, path, RE_ATTR_NAME, ""), GfParmGetStr(results, path, RE_ATTR_CAR, ""));
360 ReResScreenSetText(buf, i - 1 + printed, 0);
361 }
362
363 if (!printed) {
364 GfTime2Str(timefmt, TIMEFMTSIZE, car->_bestLapTime, 0);
365 snprintf(buf, BUFSIZE, "%d - %s - %s (%s)", i, timefmt, car->_name, carName);
366 ReResScreenSetText(buf, i - 1, 1);
367 }
368
369 GfParmReleaseHandle(carparam);
370 ReInfo->_refreshDisplay = 1;
371}
372
373void
375{
376 void *results = ReInfo->results;
377 tReCarInfo *info = &(ReInfo->_reCarInfo[car->index]);
378 const int BUFSIZE = 1024;
379 char path[BUFSIZE];
380
381 snprintf(path, BUFSIZE, "%s/%s/%s/%d", ReInfo->track->name, RE_SECT_RESULTS, ReInfo->_reRaceName, car->_laps - 1);
382 GfParmSetNum(results, path, RE_ATTR_TIME, NULL, car->_lastLapTime);
383 GfParmSetNum(results, path, RE_ATTR_BEST_LAP_TIME, NULL, car->_bestLapTime);
384 GfParmSetNum(results, path, RE_ATTR_TOP_SPEED, NULL, info->topSpd);
385 GfParmSetNum(results, path, RE_ATTR_BOT_SPEED, NULL, info->botSpd);
386 GfParmSetNum(results, path, RE_ATTR_DAMMAGES, NULL, car->_dammage);
387}
388
389int
391{
392 void *params = ReInfo->params;
393
394 if (ReInfo->_displayMode != RM_DISP_MODE_CONSOLE) {
395 if ((!strcmp(GfParmGetStr(params, ReInfo->_reRaceName, RM_ATTR_DISPRES, RM_VAL_YES), RM_VAL_YES)) ||
396 (ReInfo->_displayMode == RM_DISP_MODE_NORMAL))
397 {
398 RmShowResults(ReInfo->_reGameScreen, ReInfo);
399 } else {
401 }
402
403 return RM_ASYNC | RM_NEXT_STEP;
404 }
405
406 return RM_SYNC | RM_NEXT_STEP;
407}
408
409
410void
412{
413 RmShowStandings(ReInfo->_reGameScreen, ReInfo);
414}
struct CarElt tCarElt
Car structure (tCarElt).
float tdble
Floating point type used in TORCS.
Definition tgf.h:47
const char * GfParmGetStr(void *parmHandle, const char *path, const char *key, const char *deflt)
Get a string parameter from the parameter set handle.
Definition params.cpp:2453
int GfParmSetStr(void *handle, const char *path, const char *key, const char *val)
Set a string parameter in the parameter set handle.
Definition params.cpp:2623
tdble GfParmGetNum(void *handle, const char *path, const char *key, const char *unit, tdble deflt)
Get a numerical parameter from the parameter set handle.
Definition params.cpp:2534
char * GfParmGetName(void *handle)
Get the name property of the parameter set handle.
Definition params.cpp:2192
int GfParmSetNum(void *handle, const char *path, const char *key, const char *unit, tdble val)
Set a numerical parameter in the parameter set handle.
Definition params.cpp:2737
void GfParmReleaseHandle(void *parmHandle)
Release given parameter set handle parmHandle.
Definition params.cpp:1963
int GfParmCreateDirectory(const char *file, void *parmHandle)
Create directory for parameter set handle if it does not yet exist.
Definition params.cpp:1793
int GfParmWriteFile(const char *file, void *parmHandle, const char *name)
Write parameter set into file.
Definition params.cpp:1732
void GfParmSetDTD(void *parmHandle, char *dtd, char *header)
Set the dtd path and header.
Definition params.cpp:1704
void * GfParmReadFile(const char *file, int mode)
Read parameter set from file and return handle to parameter set.
Definition params.cpp:1173
int GfParmListClean(void *handle, const char *path)
Remove all the subsections in a section in the parameter set handle.
Definition params.cpp:2362
int GfParmGetEltNb(void *handle, const char *path)
Count the number of subsections in a section in the parameter set handle.
Definition params.cpp:2243
void RmShowStandings(void *prevHdle, tRmInfo *info)
Display standings.
Definition results.cpp:598
void RmShowResults(void *, tRmInfo *)
Display results.
Definition results.cpp:575
void GfTime2Str(char *result, int resultSize, tdble sec, int sgn)
Convert a time in seconds (float) to an ascii string.
Definition tgf.cpp:192
tRmInfo * ReInfo
void ReResScreenSetText(const char *text, int line, int clr)
Definition racegl.cpp:382
void ReResShowCont(void)
Definition racegl.cpp:424
void ReResEraseScreen(void)
Definition racegl.cpp:404
int ReResGetLines(void)
Definition racegl.cpp:398
void ReResScreenSetTitle(char *title)
Definition racegl.cpp:356
#define RM_ATTR_DRVNAME
Definition raceman.h:259
#define RE_SECT_STANDINGS
Definition raceman.h:341
#define RE_ATTR_INDEX
Definition raceman.h:339
#define RE_ATTR_DLL_NAME
Definition raceman.h:338
#define RM_SECT_POINTS
Definition raceman.h:243
#define RE_SECT_CURRENT
Definition raceman.h:333
#define RE_ATTR_MODULE
Definition raceman.h:347
#define RM_NEXT_STEP
Definition raceman.h:46
#define RM_VAL_YES
Definition raceman.h:315
#define RM_ATTR_MODULE
Definition raceman.h:266
#define RM_SECT_DRIVERS
Definition raceman.h:237
#define RE_ATTR_CUR_TRACK
Definition raceman.h:335
#define RE_ATTR_POINTS
Definition raceman.h:356
#define RE_ATTR_CUR_RACE
Definition raceman.h:334
#define RE_SECT_RANK
Definition raceman.h:343
#define RM_TYPE_PRACTICE
Definition raceman.h:70
#define RE_ATTR_TOP_SPEED
Definition raceman.h:352
#define RM_ATTR_IDX
Definition raceman.h:267
#define RE_SECT_HEADER
Definition raceman.h:330
#define RE_ATTR_LAPS
Definition raceman.h:349
#define RE_ATTR_BOT_SPEED
Definition raceman.h:353
#define RM_TYPE_RACE
Definition raceman.h:72
#define RM_ASYNC
Definition raceman.h:41
#define RE_ATTR_IDX
Definition raceman.h:348
#define RE_ATTR_PENALTYTIME
Definition raceman.h:357
#define RE_ATTR_NAME
Definition raceman.h:345
#define RE_ATTR_CUR_DRIVER
Definition raceman.h:336
#define RE_ATTR_CAR
Definition raceman.h:346
#define RM_ATTR_DISPRES
Definition raceman.h:271
#define RE_ATTR_TIME
Definition raceman.h:351
#define RE_ATTR_DATE
Definition raceman.h:331
#define RE_ATTR_DAMMAGES
Definition raceman.h:354
#define RM_DISP_MODE_CONSOLE
Definition raceman.h:150
#define RM_SYNC
Definition raceman.h:40
#define RE_ATTR_BEST_LAP_TIME
Definition raceman.h:350
#define RE_ATTR_NB_PIT_STOPS
Definition raceman.h:355
#define RE_SECT_RESULTS
Definition raceman.h:342
#define RM_TYPE_QUALIF
Definition raceman.h:71
struct Situation tSituation
cars situation used to inform the GUI and the drivers
#define RM_DISP_MODE_NORMAL
Definition raceman.h:147
void ReApplyRaceTimePenalties(tSituation *s, const tTrackPitInfo *pits)
Apply race time penalties and update same-lap result order.
Race penalty application and penalty-aware race result ordering.
void ReInitResults(void)
void ReUpdateQualifCurRes(tCarElt *car)
void ReEventInitResults(void)
void ReUpdateStandings(void)
void ReDisplayStandings(void)
void ReSavePracticeLap(tCarElt *car)
void ReStoreRaceResults(const char *race)
int ReDisplayResults(void)
int index
car index
Definition car.h:459
@ INVALID_INDEX
Definition tgf.h:195
tCarElt ** cars
list of cars
Definition raceman.h:89
Race Engine Car Information about the race.
Definition raceman.h:116
tdble topSpd
Definition raceman.h:123
tdble botSpd
Definition raceman.h:124
char * GetDataDir(void)
Definition tgf.cpp:256
char * GetLocalDir(void)
Definition tgf.cpp:230
#define GFPARM_RMODE_CREAT
Allow an empty in-memory set on file-open failure; does not write a file.
Definition tgf.h:266
#define GFPARM_RMODE_STD
Return a new handle sharing cached data for this filename, if available.
Definition tgf.h:264
#define MIN(x, y)
Definition tgf.h:56