81 const char *race = info->_reRaceName;
83 int x1, x2, x3, x4, x5, x6;
86 const int BUFSIZE = 1024;
89 const int TIMEFMTSIZE = 256;
90 char timefmt[TIMEFMTSIZE];
91 float fgcolor[4] = {1.0, 0.0, 1.0, 1.0};
95 snprintf(buf, BUFSIZE,
"Practice Results");
123 for (i = 0 + start; i <
MIN(start +
MAX_LINES, totLaps); i++) {
127 snprintf(buf, BUFSIZE,
"%d", i+1);
158 "data/img/arrow-up.png",
"data/img/arrow-up-pushed.png",
184 "data/img/arrow-down.png",
"data/img/arrow-down-pushed.png",
212 const char *race = info->_reRaceName;
214 int x1, x2, x3, x4, x5, x6, x7, x8, x9;
217 const int BUFSIZE = 1024;
220 const int TIMEFMTSIZE = 256;
221 char timefmt[TIMEFMTSIZE];
222 float fgcolor[4] = {1.0, 0.0, 1.0, 1.0};
228 snprintf(buf, BUFSIZE,
"Race Results");
230 snprintf(buf, BUFSIZE,
"%s", info->
track->
name);
263 for (i = start; i <
MIN(start +
MAX_LINES, nbCars); i++) {
267 snprintf(buf, BUFSIZE,
"%d", i+1);
274 if (laps == totLaps) {
282 dlap = totLaps - laps;
284 snprintf(buf, BUFSIZE,
"+1 Lap");
286 snprintf(buf, BUFSIZE,
"+%d Laps", dlap);
296 snprintf(buf, BUFSIZE,
"%d", laps);
323 "data/img/arrow-up.png",
"data/img/arrow-up-pushed.png",
350 "data/img/arrow-down.png",
"data/img/arrow-down-pushed.png",
378 const char *race = info->_reRaceName;
382 const int BUFSIZE = 1024;
385 const int TIMEFMTSIZE = 256;
386 char timefmt[TIMEFMTSIZE];
387 float fgcolor[4] = {1.0, 0.0, 1.0, 1.0};
392 snprintf(buf, BUFSIZE,
"Qualification Results");
394 snprintf(buf, BUFSIZE,
"%s", info->
track->
name);
413 for (i = start; i <
MIN(start +
MAX_LINES, nbCars); i++) {
416 snprintf(buf, BUFSIZE,
"%d", i+1);
435 "data/img/arrow-up.png",
"data/img/arrow-up-pushed.png",
461 "data/img/arrow-down.png",
"data/img/arrow-down-pushed.png",
491 const int BUFSIZE = 1024;
494 float fgcolor[4] = {1.0, 0.0, 1.0, 1.0};
498 const char *race = info->_reRaceName;
501 snprintf(buf, BUFSIZE,
"%s Results", race);
518 for (i = start; i <
MIN(start +
MAX_LINES, nbCars); i++) {
521 snprintf(buf, BUFSIZE,
"%d", i+1);
540 "data/img/arrow-up.png",
"data/img/arrow-up-pushed.png",
580 "data/img/arrow-down.png",
"data/img/arrow-down-pushed.png",
602 switch (info->
s->_raceType) {
Race Manager General Info.
static void rmSaveRes(void *vInfo)
void GfuiScreenReplace(void *screen)
Activate a screen and make it current plus release the current screen.
int GfuiButtonCreate(void *scr, const char *text, int font, int x, int y, int width, int align, int mouse, void *userDataOnPush, tfuiCallback onPush, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost)
Add a button to a screen.
#define RE_SECT_STANDINGS
static void rmChgPracticeScreen(void *vprc)
#define RE_ATTR_NB_PIT_STOPS
static void rmQualifResults(void *prevHdle, tRmInfo *info, int start)
void * results
Race results.
#define RE_ATTR_BOT_SPEED
void GfuiAddKey(void *scr, unsigned char key, const char *descr, void *userData, tfuiCallback onKeyPressed, tfuiCallback onKeyReleased)
Add a Keyboard callback to a screen.
Robot Module Interface Definition.
void GfuiScreenRelease(void *scr)
Release the given screen.
int GfuiLabelCreate(void *scr, const char *text, int font, int x, int y, int align, int maxlen)
Add a label to a screen.
static void rmChgQualifScreen(void *vprc)
#define RE_ATTR_BEST_LAP_TIME
void GfuiScreenAddBgImg(void *scr, const char *filename)
Add an image background to a screen.
tSituation * s
Situation during race.
int GfParmWriteFile(const char *file, void *parmHandle, const char *name)
Write parameter set into file.
int GfParmCreateDirectory(const char *file, void *parmHandle)
Create directory for parameter set handle if it does not yet exist.
const char * GfParmGetStr(void *parmHandle, const char *path, const char *key, const char *deflt)
Get a string parameter from the parameter set handle.
#define GFUI_FONT_LARGE_C
The Gaming Framework API (client part).
static void rmRaceResults(void *prevHdle, tRmInfo *info, int start)
#define RE_ATTR_PENALTYTIME
float tdble
Floating point type used in TORCS.
const char * name
Name of the track.
tTrack * track
Current track.
static void rmShowStandings(void *prevHdle, tRmInfo *info, int start)
void(* tfuiCallback)(void *)
void GfuiScreenActivate(void *screen)
Activate a screen and make it current.
void GfuiAddSKey(void *scr, int key, const char *descr, void *userData, tfuiCallback onKeyPressed, tfuiCallback onKeyReleased)
Add a Special Keyboard shortcut to the screen.
#define GFUI_INVISIBLE
Object invisibility flag.
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 GfuiScreenShot(void *)
Save a screen shot in png format.
int GfuiLabelCreateEx(void *scr, const char *text, float *fgColor, int font, int x, int y, int align, int maxlen)
Create a new label (extended version).
int GfuiTitleCreate(void *scr, const char *text, int maxlen)
Add a Title to the screen.
static void rmChgRaceScreen(void *vprc)
int GfuiGrButtonCreate(void *scr, const char *disabled, const char *enabled, const char *focused, const char *pushed, int x, int y, int align, int mouse, void *userDataOnPush, tfuiCallback onPush, void *userDataOnFocus, tfuiCallback onFocus, tfuiCallback onFocusLost)
Add a graphical button to a screen.
void * GfuiScreenCreate(void)
Create a new screen.
#define GFUI_FONT_MEDIUM_C
int GfParmGetEltNb(void *handle, const char *path)
Count the number of subsections in a section in the parameter set handle.
static void rmChgStandingScreen(void *vprc)
void GfTime2Str(char *result, int resultSize, tdble sec, int sgn)
Convert a time in seconds (float) to an ascii string.
int GfuiVisibilitySet(void *scr, int id, int visible)
Set/unset the visibility attribute of an object.
#define RE_ATTR_TOP_SPEED
static void rmPracticeResults(void *prevHdle, tRmInfo *info, int start)