torcs - 1.2.2

src/interfaces/graphic.h

Go to the documentation of this file.
00001 /***************************************************************************
00002 
00003     file                 : graphic.h
00004     created              : Sun Jan 30 22:58:45 CET 2000
00005     copyright            : (C) 2000 by Eric Espie
00006     email                : torcs@free.fr
00007     version              : $Id: graphic.h,v 1.9 2003/10/19 18:59:38 torcs Exp $
00008 
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   (at your option) any later version.                                   *
00017  *                                                                         *
00018  ***************************************************************************/
00019  
00020  
00021 #ifndef _GRAPHV1_H_
00022 #define _GRAPHV1_H_
00023 
00024 #include <track.h>
00025 #include <car.h>
00026 
00027 #define GRX_IDENT       0
00028 
00029 #define GR_PARAM_FILE           "config/graph.xml"
00030 
00031 #define GR_SCT_DISPMODE         "Display Mode"
00032 #define GR_ATT_CAM              "camera"
00033 #define GR_ATT_CAM_HEAD         "camera head list"
00034 #define GR_ATT_MIRROR           "enable mirror"
00035 #define GR_ATT_MAP              "map mode"
00036 #define GR_ATT_FOVY             "fovy"
00037 #define GR_ATT_BOARD            "driver board"
00038 #define GR_ATT_COUNTER          "driver counter"
00039 #define GR_ATT_LEADER           "leader board"
00040 #define GR_ATT_DEBUG            "debug info"
00041 #define GR_ATT_GGRAPH           "G graph"
00042 #define GR_ATT_ARCADE           "arcade"
00043 #define GR_ATT_NBLEADER         "Max leaders entries"
00044 
00045 #define GR_SCT_TVDIR            "TV Director View"
00046 #define GR_ATT_CHGCAMINT        "change camera interval"
00047 #define GR_ATT_EVTINT           "event interval"
00048 #define GR_ATT_PROXTHLD         "proximity threshold"
00049 
00050 #define GR_SCT_GRAPHIC          "Graphic"
00051 #define GR_ATT_SMOKENB          "smoke value"
00052 #define GR_ATT_SMOKEDELTAT      "smoke interval"
00053 #define GR_ATT_SMOKEDLIFE       "smoke duration"
00054 
00055 #define GR_ATT_MAXSTRIPBYWHEEL  "skid value"
00056 #define GR_ATT_MAXPOINTBYSTRIP  "skid length"
00057 #define GR_ATT_SKIDDELTAT       "skid interval"
00058 #define GR_ATT_FOVFACT          "fov factor"
00059 #define GR_ATT_LODFACTOR        "LOD Factor"
00060 
00061 #define GR_ATT_NB_SCREENS       "number of screens"
00062 #define GR_ATT_CUR_DRV          "current driver"
00063 
00064 #define GR_SCT_PLAYABLE_DOV     "Playable Cameras Distance of Views"
00065 #define GR_ATT_FRONT_GLOBAL     "Front Level Group Global"
00066 #define GR_ATT_FRONT_LEVEL3     "Front Level Group 3"
00067 #define GR_ATT_FRONT_LEVEL2     "Front Level Group 2"
00068 #define GR_ATT_FRONT_LEVEL1     "Front Level Group 1"
00069 #define GR_ATT_REAR_GLOBAL      "Rear Level Group Global"
00070 #define GR_ATT_REAR_LEVEL3      "Rear Level Group 3"
00071 #define GR_ATT_REAR_LEVEL2      "Rear Level Group 2"
00072 #define GR_ATT_REAR_LEVEL1      "Rear Level Group 1"
00073 
00074 #define GR_ATT_FRONT_MAP1       "Front Level Map 1" 
00075 #define GR_ATT_FRONT_MAP2       "Front Level Map 2"
00076 #define GR_ATT_FRONT_MAP3       "Front Level Map 3"
00077 #define GR_ATT_REAR_MAP1        "Rear Level Map 1"
00078 #define GR_ATT_REAR_MAP2        "Rear Level Map 2"
00079 #define GR_ATT_REAR_MAP3        "Rear Level Map 3"
00080 
00081 
00082 /* graphic functions prototypes */
00083 
00084 struct Situation;
00085 
00086 typedef int (*tfGraphicInitTrack)(tTrack *);
00087 typedef int (*tfGraphicInitCars)(struct Situation *); 
00088 typedef int (*tfGraphicInitView)(int /*x*/, int /*y*/, int /*width*/, int /*height*/, int /*flag*/, void * /*screen*/);
00089 #define GR_VIEW_STD  0 /* full screen view */
00090 #define GR_VIEW_PART 1 /* partial screen view (scissor test) */
00091 
00092 typedef int (*tfGraphicRefresh)(struct Situation *);
00093 typedef void (*tfGraphicShutdwnCars)(void);
00094 typedef void (*tfGraphicShutdwnTrack)(void);
00095 
00096 
00097 /* Interface with the graphic lib */
00098 typedef struct {
00099     tfGraphicInitTrack      inittrack;      /* Graphic init function */
00100     tfGraphicInitView       initview;       /* Graphic init function */
00101     tfGraphicInitCars       initcars;       /* Graphic init function */
00102     tfGraphicRefresh        refresh;        /* Graphic refresh function */
00103     tfGraphicShutdwnCars    shutdowncars;   /* Graphic shutdown function */
00104     tfGraphicShutdwnTrack   shutdowntrack;  /* Graphic shutdown function */
00105 } tGraphicItf;
00106 
00107 
00108     
00109 
00110 #endif /* _GRAPHV1_H_ */ 
00111 
00112 
00113 

Generated at Thu Feb 26 21:52:27 2004 for torcs by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-1999
TORCS © Eric Espié 1999, 2002.