TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
robot.h
Go to the documentation of this file.
1/***************************************************************************
2
3 file : robot.h
4 created : Sun Jan 30 22:59:40 CET 2000, 2002
5 copyright : (C) 2000-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
24
39
40#ifndef _ROBOTV1_H_
41#define _ROBOTV1_H_
42
43#include <raceman.h>
44
45#define ROB_IDENT 0
46
55typedef void (*tfRbNewTrack)(int index, tTrack *track, void *carHandle, void **myCarSettings, tSituation *s);
56
63typedef void (*tfRbNewRace) (int index, tCarElt *car, tSituation *s);
64
71typedef void (*tfRbEndRace) (int index, tCarElt *car, tSituation *s);
72
79typedef void (*tfRbDrive) (int index, tCarElt *car, tSituation *s);
80
85typedef void (*tfRbShutdown)(int index);
86
96typedef int (*tfRbPitCmd) (int index, tCarElt* car, tSituation *s);
97
98#define ROB_PIT_IM 0
99#define ROB_PIT_MENU 1
100
101
114
115
116
117/*
118 * Parameters definitions for driver
119 */
120#define ROB_SECT_ROBOTS "Robots"
121
122#define ROB_LIST_INDEX "index"
123
124#define ROB_ATTR_NAME "name"
125#define ROB_ATTR_TEAM "team"
126#define ROB_ATTR_DESC "desc"
127#define ROB_ATTR_AUTHOR "author"
128#define ROB_ATTR_CAR "car name"
129#define ROB_ATTR_CATEGORY "category"
130#define ROB_ATTR_RACENUM "race number"
131#define ROB_ATTR_RED "red"
132#define ROB_ATTR_GREEN "green"
133#define ROB_ATTR_BLUE "blue"
134
135#define ROB_ATTR_TYPE "type"
136
137#define ROB_VAL_HUMAN "human"
138#define ROB_VAL_ROBOT "robot"
139
140#define ROB_ATTR_LEVEL "skill level"
141
142#define ROB_VAL_ROOKIE "rookie"
143#define ROB_VAL_AMATEUR "amateur"
144#define ROB_VAL_SEMI_PRO "semi-pro"
145#define ROB_VAL_PRO "pro"
146
147#endif /* _ROBOTV1_H_ */
148
struct CarElt tCarElt
Car structure (tCarElt).
int(* tfRbPitCmd)(int index, tCarElt *car, tSituation *s)
Callback function prototype for robot module, handing over pit stop commands.
Definition robot.h:96
struct RobotItf tRobotItf
Interface Structure for Robots.
void(* tfRbShutdown)(int index)
Callback function prototype for robot module, shutdown robot instance for given index.
Definition robot.h:85
void(* tfRbNewRace)(int index, tCarElt *car, tSituation *s)
Callback function prototype for robot module, initialization for new race.
Definition robot.h:63
void(* tfRbDrive)(int index, tCarElt *car, tSituation *s)
Callback function prototype for robot module, driving the car.
Definition robot.h:79
void(* tfRbNewTrack)(int index, tTrack *track, void *carHandle, void **myCarSettings, tSituation *s)
Callback function prototype for robot module, give the robot the track view, called for every track c...
Definition robot.h:55
void(* tfRbEndRace)(int index, tCarElt *car, tSituation *s)
Callback function prototype for robot module, teardown after race, this is currently NOT called by TO...
Definition robot.h:71
This is the race information structures.
struct Situation tSituation
cars situation used to inform the GUI and the drivers
Interface Structure for Robots.
Definition robot.h:105
tfRbEndRace rbEndRace
Definition robot.h:108
tfRbPitCmd rbPitCmd
Definition robot.h:110
int index
Definition robot.h:112
tfRbShutdown rbShutdown
Definition robot.h:111
tfRbNewRace rbNewRace
Definition robot.h:107
tfRbDrive rbDrive
Definition robot.h:109
tfRbNewTrack rbNewTrack
Definition robot.h:106
Track structure.
Definition track.h:533
int track(tModInfo *modInfo)
Definition trackitf.cpp:85