TORCS  1.3.9
The Open Racing Car Simulator
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-2014 by Eric Espie, Bernhard Wymann
6  email : torcs@free.fr
7  version : $Id$
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
42 #ifndef _ROBOTV1_H_
43 #define _ROBOTV1_H_
44 
45 #include <raceman.h>
46 
47 #define ROB_IDENT 0
48 
57 typedef void (*tfRbNewTrack)(int index, tTrack *track, void *carHandle, void **myCarSettings, tSituation *s);
58 
65 typedef void (*tfRbNewRace) (int index, tCarElt *car, tSituation *s);
66 
73 typedef void (*tfRbEndRace) (int index, tCarElt *car, tSituation *s);
74 
81 typedef void (*tfRbDrive) (int index, tCarElt *car, tSituation *s);
82 
87 typedef void (*tfRbShutdown)(int index);
88 
98 typedef int (*tfRbPitCmd) (int index, tCarElt* car, tSituation *s);
99 
100 #define ROB_PIT_IM 0
101 #define ROB_PIT_MENU 1
107 typedef struct RobotItf {
114  int index;
115 } tRobotItf;
116 
117 
118 
119 /*
120  * Parameters definitions for driver
121  */
122 #define ROB_SECT_ROBOTS "Robots"
123 
124 #define ROB_LIST_INDEX "index"
125 
126 #define ROB_ATTR_NAME "name"
127 #define ROB_ATTR_TEAM "team"
128 #define ROB_ATTR_DESC "desc"
129 #define ROB_ATTR_AUTHOR "author"
130 #define ROB_ATTR_CAR "car name"
131 #define ROB_ATTR_CATEGORY "category"
132 #define ROB_ATTR_RACENUM "race number"
133 #define ROB_ATTR_RED "red"
134 #define ROB_ATTR_GREEN "green"
135 #define ROB_ATTR_BLUE "blue"
136 
137 #define ROB_ATTR_TYPE "type"
138 
139 #define ROB_VAL_HUMAN "human"
140 #define ROB_VAL_ROBOT "robot"
141 
142 #define ROB_ATTR_LEVEL "skill level"
143 
144 #define ROB_VAL_ROOKIE "rookie"
145 #define ROB_VAL_AMATEUR "amateur"
146 #define ROB_VAL_SEMI_PRO "semi-pro"
147 #define ROB_VAL_PRO "pro"
148 
149 #endif /* _ROBOTV1_H_ */
150 
151 
152 
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:73
int(* tfRbPitCmd)(int index, tCarElt *car, tSituation *s)
Callback function prototype for robot module, handing over pit stop commands.
Definition: robot.h:98
tfRbEndRace rbEndRace
Definition: robot.h:110
cars situation used to inform the GUI and the drivers
Definition: raceman.h:85
void(* tfRbDrive)(int index, tCarElt *car, tSituation *s)
Callback function prototype for robot module, driving the car.
Definition: robot.h:81
Car structure (tCarElt).
Definition: car.h:455
Track structure.
Definition: track.h:502
tfRbNewTrack rbNewTrack
Definition: robot.h:108
struct RobotItf tRobotItf
Interface Structure for Robots.
This is the race information structures.
tfRbDrive rbDrive
Definition: robot.h:111
int track(tModInfo *modInfo)
Definition: trackitf.cpp:85
tfRbShutdown rbShutdown
Definition: robot.h:113
void(* tfRbNewRace)(int index, tCarElt *car, tSituation *s)
Callback function prototype for robot module, initialization for new race.
Definition: robot.h:65
tfRbPitCmd rbPitCmd
Definition: robot.h:112
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:57
tfRbNewRace rbNewRace
Definition: robot.h:109
void(* tfRbShutdown)(int index)
Callback function prototype for robot module, shutdown robot instance for given index.
Definition: robot.h:87
int index
Definition: robot.h:114